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

1301 lines
1.3 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[7482],{70557:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});var y=k(60499),Ee=k(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},be=ie,J=k(7657),v=function(V,B){return Ee.createElement(J.Z,(0,y.Z)({},V,{ref:B,icon:be}))},de=Ee.forwardRef(v),ce=de},84105:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});var y=k(60499),Ee=k(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},be=ie,J=k(7657),v=function(V,B){return Ee.createElement(J.Z,(0,y.Z)({},V,{ref:B,icon:be}))},de=Ee.forwardRef(v),ce=de},73331:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});var y=k(60499),Ee=k(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},be=ie,J=k(7657),v=function(V,B){return Ee.createElement(J.Z,(0,y.Z)({},V,{ref:B,icon:be}))},de=Ee.forwardRef(v),ce=de},15277:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});var y=k(60499),Ee=k(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},be=ie,J=k(7657),v=function(V,B){return Ee.createElement(J.Z,(0,y.Z)({},V,{ref:B,icon:be}))},de=Ee.forwardRef(v),ce=de},61485:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});var y=k(60499),Ee=k(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},be=ie,J=k(7657),v=function(V,B){return Ee.createElement(J.Z,(0,y.Z)({},V,{ref:B,icon:be}))},de=Ee.forwardRef(v),ce=de},47472:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});var y=k(60499),Ee=k(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},be=ie,J=k(7657),v=function(V,B){return Ee.createElement(J.Z,(0,y.Z)({},V,{ref:B,icon:be}))},de=Ee.forwardRef(v),ce=de},87395:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});var y=k(60499),Ee=k(59301),ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},be=ie,J=k(7657),v=function(V,B){return Ee.createElement(J.Z,(0,y.Z)({},V,{ref:B,icon:be}))},de=Ee.forwardRef(v),ce=de},68196:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return mt}});var y=k(85899),Ee=k(72190),ie=k(42244),be=k(43403),J=k(92310),v=k.n(J),de=k(29301),ce=k(76846),l=k(96452),V=k(6089),B=k(80402),E=k(34280),L=k(49658),x=k(59301),P=k(60499),q=k(77900),H=k(8654);function U(ke){var Ce=ke.prefixCls,_e=ke.align,Ne=ke.arrow,Ke=ke.arrowPos,nt=Ne||{},te=nt.className,Ie=nt.content,Ue=Ke.x,ze=Ue===void 0?0:Ue,qe=Ke.y,gt=qe===void 0?0:qe,Rt=x.useRef();if(!_e||!_e.points)return null;var vt={position:"absolute"};if(_e.autoArrow!==!1){var _t=_e.points[0],St=_e.points[1],Nt=_t[0],Pt=_t[1],Ct=St[0],Ge=St[1];Nt===Ct||!["t","b"].includes(Nt)?vt.top=gt:Nt==="t"?vt.top=0:vt.bottom=0,Pt===Ge||!["l","r"].includes(Pt)?vt.left=ze:Pt==="l"?vt.left=0:vt.right=0}return x.createElement("div",{ref:Rt,className:v()("".concat(Ce,"-arrow"),te),style:vt},Ie)}function A(ke){var Ce=ke.prefixCls,_e=ke.open,Ne=ke.zIndex,Ke=ke.mask,nt=ke.motion;return Ke?x.createElement(q.default,(0,P.Z)({},nt,{motionAppear:!0,visible:_e,removeOnLeave:!0}),function(te){var Ie=te.className;return x.createElement("div",{style:{zIndex:Ne},className:v()("".concat(Ce,"-mask"),Ie)})}):null}var z=x.memo(function(ke){var Ce=ke.children;return Ce},function(ke,Ce){return Ce.cache}),O=z,N=x.forwardRef(function(ke,Ce){var _e=ke.popup,Ne=ke.className,Ke=ke.prefixCls,nt=ke.style,te=ke.target,Ie=ke.onVisibleChanged,Ue=ke.open,ze=ke.keepDom,qe=ke.fresh,gt=ke.onClick,Rt=ke.mask,vt=ke.arrow,_t=ke.arrowPos,St=ke.align,Nt=ke.motion,Pt=ke.maskMotion,Ct=ke.forceRender,Ge=ke.getPopupContainer,Tt=ke.autoDestroy,Et=ke.portal,ct=ke.zIndex,Lt=ke.onMouseEnter,_=ke.onMouseLeave,T=ke.onPointerEnter,Q=ke.onPointerDownCapture,C=ke.ready,G=ke.offsetX,Xe=ke.offsetY,fe=ke.offsetR,Ae=ke.offsetB,Pe=ke.onAlign,j=ke.onPrepare,X=ke.stretch,he=ke.targetWidth,Se=ke.targetHeight,$=typeof _e=="function"?_e():_e,Qe=Ue||ze,le=(Ge==null?void 0:Ge.length)>0,It=x.useState(!Ge||!le),$t=(0,Ee.Z)(It,2),zt=$t[0],sr=$t[1];if((0,E.Z)(function(){!zt&&le&&te&&sr(!0)},[zt,le,te]),!zt)return null;var or="auto",Kt={left:"-1000vw",top:"-1000vh",right:or,bottom:or};if(C||!Ue){var ur,Zr=St.points,Tr=St.dynamicInset||((ur=St._experimental)===null||ur===void 0?void 0:ur.dynamicInset),fr=Tr&&Zr[0][1]==="r",Ot=Tr&&Zr[0][0]==="b";fr?(Kt.right=fe,Kt.left=or):(Kt.left=G,Kt.right=or),Ot?(Kt.bottom=Ae,Kt.top=or):(Kt.top=Xe,Kt.bottom=or)}var yt={};return X&&(X.includes("height")&&Se?yt.height=Se:X.includes("minHeight")&&Se&&(yt.minHeight=Se),X.includes("width")&&he?yt.width=he:X.includes("minWidth")&&he&&(yt.minWidth=he)),Ue||(yt.pointerEvents="none"),x.createElement(Et,{open:Ct||Qe,getContainer:Ge&&function(){return Ge(te)},autoDestroy:Tt},x.createElement(A,{prefixCls:Ke,open:Ue,zIndex:ct,mask:Rt,motion:Pt}),x.createElement(de.Z,{onResize:Pe,disabled:!Ue},function(bt){return x.createElement(q.default,(0,P.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ct,leavedClassName:"".concat(Ke,"-hidden")},Nt,{onAppearPrepare:j,onEnterPrepare:j,visible:Ue,onVisibleChanged:function(Sr){var Dr;Nt==null||(Dr=Nt.onVisibleChanged)===null||Dr===void 0||Dr.call(Nt,Sr),Ie(Sr)}}),function(Jt,Sr){var Dr=Jt.className,hn=Jt.style,Re=v()(Ke,Dr,Ne);return x.createElement("div",{ref:(0,H.sQ)(bt,Ce,Sr),className:Re,style:(0,y.Z)((0,y.Z)((0,y.Z)((0,y.Z)({"--arrow-x":"".concat(_t.x||0,"px"),"--arrow-y":"".concat(_t.y||0,"px")},Kt),yt),hn),{},{boxSizing:"border-box",zIndex:ct},nt),onMouseEnter:Lt,onMouseLeave:_,onPointerEnter:T,onClick:gt,onPointerDownCapture:Q},vt&&x.createElement(U,{prefixCls:Ke,arrow:vt,arrowPos:_t,align:St}),x.createElement(O,{cache:!Ue&&!qe},$))})}))}),oe=N,ve=x.forwardRef(function(ke,Ce){var _e=ke.children,Ne=ke.getTriggerDOMNode,Ke=(0,H.Yr)(_e),nt=x.useCallback(function(Ie){(0,H.mH)(Ce,Ne?Ne(Ie):Ie)},[Ne]),te=(0,H.x1)(nt,(0,H.C4)(_e));return Ke?x.cloneElement(_e,{ref:te}):_e}),pe=ve,De=x.createContext(null),Oe=De;function Fe(ke){return ke?Array.isArray(ke)?ke:[ke]:[]}function st(ke,Ce,_e,Ne){return x.useMemo(function(){var Ke=Fe(_e!=null?_e:Ce),nt=Fe(Ne!=null?Ne:Ce),te=new Set(Ke),Ie=new Set(nt);return ke&&(te.has("hover")&&(te.delete("hover"),te.add("click")),Ie.has("hover")&&(Ie.delete("hover"),Ie.add("click"))),[te,Ie]},[ke,Ce,_e,Ne])}var re=k(29194);function W(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],_e=arguments.length>2?arguments[2]:void 0;return _e?ke[0]===Ce[0]:ke[0]===Ce[0]&&ke[1]===Ce[1]}function ee(ke,Ce,_e,Ne){for(var Ke=_e.points,nt=Object.keys(ke),te=0;te<nt.length;te+=1){var Ie,Ue=nt[te];if(W((Ie=ke[Ue])===null||Ie===void 0?void 0:Ie.points,Ke,Ne))return"".concat(Ce,"-placement-").concat(Ue)}return""}function ue(ke,Ce,_e,Ne){return Ce||(_e?{motionName:"".concat(ke,"-").concat(_e)}:Ne?{motionName:Ne}:null)}function ne(ke){return ke.ownerDocument.defaultView}function ae(ke){for(var Ce=[],_e=ke==null?void 0:ke.parentElement,Ne=["hidden","scroll","clip","auto"];_e;){var Ke=ne(_e).getComputedStyle(_e),nt=Ke.overflowX,te=Ke.overflowY,Ie=Ke.overflow;[nt,te,Ie].some(function(Ue){return Ne.includes(Ue)})&&Ce.push(_e),_e=_e.parentElement}return Ce}function S(ke){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(ke)?Ce:ke}function w(ke){return S(parseFloat(ke),0)}function K(ke,Ce){var _e=(0,y.Z)({},ke);return(Ce||[]).forEach(function(Ne){if(!(Ne instanceof HTMLBodyElement||Ne instanceof HTMLHtmlElement)){var Ke=ne(Ne).getComputedStyle(Ne),nt=Ke.overflow,te=Ke.overflowClipMargin,Ie=Ke.borderTopWidth,Ue=Ke.borderBottomWidth,ze=Ke.borderLeftWidth,qe=Ke.borderRightWidth,gt=Ne.getBoundingClientRect(),Rt=Ne.offsetHeight,vt=Ne.clientHeight,_t=Ne.offsetWidth,St=Ne.clientWidth,Nt=w(Ie),Pt=w(Ue),Ct=w(ze),Ge=w(qe),Tt=S(Math.round(gt.width/_t*1e3)/1e3),Et=S(Math.round(gt.height/Rt*1e3)/1e3),ct=(_t-St-Ct-Ge)*Tt,Lt=(Rt-vt-Nt-Pt)*Et,_=Nt*Et,T=Pt*Et,Q=Ct*Tt,C=Ge*Tt,G=0,Xe=0;if(nt==="clip"){var fe=w(te);G=fe*Tt,Xe=fe*Et}var Ae=gt.x+Q-G,Pe=gt.y+_-Xe,j=Ae+gt.width+2*G-Q-C-ct,X=Pe+gt.height+2*Xe-_-T-Lt;_e.left=Math.max(_e.left,Ae),_e.top=Math.max(_e.top,Pe),_e.right=Math.min(_e.right,j),_e.bottom=Math.min(_e.bottom,X)}}),_e}function ye(ke){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,_e="".concat(Ce),Ne=_e.match(/^(.*)\%$/);return Ne?ke*(parseFloat(Ne[1])/100):parseFloat(_e)}function Be(ke,Ce){var _e=Ce||[],Ne=(0,Ee.Z)(_e,2),Ke=Ne[0],nt=Ne[1];return[ye(ke.width,Ke),ye(ke.height,nt)]}function He(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[ke[0],ke[1]]}function ot(ke,Ce){var _e=Ce[0],Ne=Ce[1],Ke,nt;return _e==="t"?nt=ke.y:_e==="b"?nt=ke.y+ke.height:nt=ke.y+ke.height/2,Ne==="l"?Ke=ke.x:Ne==="r"?Ke=ke.x+ke.width:Ke=ke.x+ke.width/2,{x:Ke,y:nt}}function at(ke,Ce){var _e={t:"b",b:"t",l:"r",r:"l"};return ke.map(function(Ne,Ke){return Ke===Ce?_e[Ne]||"c":Ne}).join("")}function pt(ke,Ce,_e,Ne,Ke,nt,te){var Ie=x.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ke[Ne]||{}}),Ue=(0,Ee.Z)(Ie,2),ze=Ue[0],qe=Ue[1],gt=x.useRef(0),Rt=x.useMemo(function(){return Ce?ae(Ce):[]},[Ce]),vt=x.useRef({}),_t=function(){vt.current={}};ke||_t();var St=(0,V.Z)(function(){if(Ce&&_e&&ke){let Gn=function(ss,Yn){var di=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Dt,li=Qe.x+ss,zi=Qe.y+Yn,qi=li+Ot,Xi=zi+fr,ti=Math.max(li,di.left),lr=Math.max(zi,di.top),Or=Math.min(qi,di.right),gn=Math.min(Xi,di.bottom);return Math.max(0,(Or-ti)*(gn-lr))},Ui=function(){Ln=Qe.y+Jr,Sn=Ln+fr,ir=Qe.x+Nr,$r=ir+Ot};var Ct,Ge,Tt,Et,ct=Ce,Lt=ct.ownerDocument,_=ne(ct),T=_.getComputedStyle(ct),Q=T.position,C=ct.style.left,G=ct.style.top,Xe=ct.style.right,fe=ct.style.bottom,Ae=ct.style.overflow,Pe=(0,y.Z)((0,y.Z)({},Ke[Ne]),nt),j=Lt.createElement("div");(Ct=ct.parentElement)===null||Ct===void 0||Ct.appendChild(j),j.style.left="".concat(ct.offsetLeft,"px"),j.style.top="".concat(ct.offsetTop,"px"),j.style.position=Q,j.style.height="".concat(ct.offsetHeight,"px"),j.style.width="".concat(ct.offsetWidth,"px"),ct.style.left="0",ct.style.top="0",ct.style.right="auto",ct.style.bottom="auto",ct.style.overflow="hidden";var X;if(Array.isArray(_e))X={x:_e[0],y:_e[1],width:0,height:0};else{var he,Se,$=_e.getBoundingClientRect();$.x=(he=$.x)!==null&&he!==void 0?he:$.left,$.y=(Se=$.y)!==null&&Se!==void 0?Se:$.top,X={x:$.x,y:$.y,width:$.width,height:$.height}}var Qe=ct.getBoundingClientRect(),le=_.getComputedStyle(ct),It=le.height,$t=le.width;Qe.x=(Ge=Qe.x)!==null&&Ge!==void 0?Ge:Qe.left,Qe.y=(Tt=Qe.y)!==null&&Tt!==void 0?Tt:Qe.top;var zt=Lt.documentElement,sr=zt.clientWidth,or=zt.clientHeight,Kt=zt.scrollWidth,ur=zt.scrollHeight,Zr=zt.scrollTop,Tr=zt.scrollLeft,fr=Qe.height,Ot=Qe.width,yt=X.height,bt=X.width,Jt={left:0,top:0,right:sr,bottom:or},Sr={left:-Tr,top:-Zr,right:Kt-Tr,bottom:ur-Zr},Dr=Pe.htmlRegion,hn="visible",Re="visibleFirst";Dr!=="scroll"&&Dr!==Re&&(Dr=hn);var Je=Dr===Re,lt=K(Sr,Rt),Ze=K(Jt,Rt),Dt=Dr===hn?Ze:lt,Wt=Je?Ze:Dt;ct.style.left="auto",ct.style.top="auto",ct.style.right="0",ct.style.bottom="0";var cr=ct.getBoundingClientRect();ct.style.left=C,ct.style.top=G,ct.style.right=Xe,ct.style.bottom=fe,ct.style.overflow=Ae,(Et=ct.parentElement)===null||Et===void 0||Et.removeChild(j);var Ir=S(Math.round(Ot/parseFloat($t)*1e3)/1e3),Zt=S(Math.round(fr/parseFloat(It)*1e3)/1e3);if(Ir===0||Zt===0||(0,ce.Sh)(_e)&&!(0,re.Z)(_e))return;var qt=Pe.offset,gr=Pe.targetOffset,hr=Be(Qe,qt),vr=(0,Ee.Z)(hr,2),nr=vr[0],Ar=vr[1],Pr=Be(X,gr),Xr=(0,Ee.Z)(Pr,2),tn=Xr[0],xn=Xr[1];X.x-=tn,X.y-=xn;var _r=Pe.points||[],Gr=(0,Ee.Z)(_r,2),Yr=Gr[0],un=Gr[1],Vr=He(un),Rr=He(Yr),Br=ot(X,Vr),rn=ot(Qe,Rr),nn=(0,y.Z)({},Pe),Nr=Br.x-rn.x+nr,Jr=Br.y-rn.y+Ar,an=Gn(Nr,Jr),wn=Gn(Nr,Jr,Ze),mn=ot(X,["t","l"]),dn=ot(Qe,["t","l"]),Rn=ot(X,["b","r"]),Wr=ot(Qe,["b","r"]),Cn=Pe.overflow||{},ht=Cn.adjustX,Lr=Cn.adjustY,on=Cn.shiftX,$n=Cn.shiftY,Pn=function(Yn){return typeof Yn=="boolean"?Yn:Yn>=0},Ln,Sn,ir,$r;Ui();var ln=Pn(Lr),Hr=Rr[0]===Vr[0];if(ln&&Rr[0]==="t"&&(Sn>Wt.bottom||vt.current.bt)){var Xt=Jr;Hr?Xt-=fr-yt:Xt=mn.y-Wr.y-Ar;var dr=Gn(Nr,Xt),jr=Gn(Nr,Xt,Ze);dr>an||dr===an&&(!Je||jr>=wn)?(vt.current.bt=!0,Jr=Xt,Ar=-Ar,nn.points=[at(Rr,0),at(Vr,0)]):vt.current.bt=!1}if(ln&&Rr[0]==="b"&&(Ln<Wt.top||vt.current.tb)){var xr=Jr;Hr?xr+=fr-yt:xr=Rn.y-dn.y-Ar;var Gt=Gn(Nr,xr),fn=Gn(Nr,xr,Ze);Gt>an||Gt===an&&(!Je||fn>=wn)?(vt.current.tb=!0,Jr=xr,Ar=-Ar,nn.points=[at(Rr,0),at(Vr,0)]):vt.current.tb=!1}var vn=Pn(ht),kn=Rr[1]===Vr[1];if(vn&&Rr[1]==="l"&&($r>Wt.right||vt.current.rl)){var ii=Nr;kn?ii-=Ot-bt:ii=mn.x-Wr.x-nr;var si=Gn(ii,Jr),hi=Gn(ii,Jr,Ze);si>an||si===an&&(!Je||hi>=wn)?(vt.current.rl=!0,Nr=ii,nr=-nr,nn.points=[at(Rr,1),at(Vr,1)]):vt.current.rl=!1}if(vn&&Rr[1]==="r"&&(ir<Wt.left||vt.current.lr)){var ai=Nr;kn?ai+=Ot-bt:ai=Rn.x-dn.x-nr;var bn=Gn(ai,Jr),Qn=Gn(ai,Jr,Ze);bn>an||bn===an&&(!Je||Qn>=wn)?(vt.current.lr=!0,Nr=ai,nr=-nr,nn.points=[at(Rr,1),at(Vr,1)]):vt.current.lr=!1}Ui();var Mn=on===!0?0:on;typeof Mn=="number"&&(ir<Ze.left&&(Nr-=ir-Ze.left-nr,X.x+bt<Ze.left+Mn&&(Nr+=X.x-Ze.left+bt-Mn)),$r>Ze.right&&(Nr-=$r-Ze.right-nr,X.x>Ze.right-Mn&&(Nr+=X.x-Ze.right+Mn)));var Un=$n===!0?0:$n;typeof Un=="number"&&(Ln<Ze.top&&(Jr-=Ln-Ze.top-Ar,X.y+yt<Ze.top+Un&&(Jr+=X.y-Ze.top+yt-Un)),Sn>Ze.bottom&&(Jr-=Sn-Ze.bottom-Ar,X.y>Ze.bottom-Un&&(Jr+=X.y-Ze.bottom+Un)));var Jn=Qe.x+Nr,Zn=Jn+Ot,Kr=Qe.y+Jr,Ii=Kr+fr,vi=X.x,_i=vi+bt,Bn=X.y,kr=Bn+yt,ns=Math.max(Jn,vi),Ht=Math.min(Zn,_i),Nn=(ns+Ht)/2,Bi=Nn-Jn,Ni=Math.max(Kr,Bn),zn=Math.min(Ii,kr),oi=(Ni+zn)/2,Fr=oi-Kr;te==null||te(Ce,nn);var ei=cr.right-Qe.x-(Nr+Qe.width),$i=cr.bottom-Qe.y-(Jr+Qe.height);Ir===1&&(Nr=Math.floor(Nr),ei=Math.floor(ei)),Zt===1&&(Jr=Math.floor(Jr),$i=Math.floor($i));var is={ready:!0,offsetX:Nr/Ir,offsetY:Jr/Zt,offsetR:ei/Ir,offsetB:$i/Zt,arrowX:Bi/Ir,arrowY:Fr/Zt,scaleX:Ir,scaleY:Zt,align:nn};qe(is)}}),Nt=function(){gt.current+=1;var Ge=gt.current;Promise.resolve().then(function(){gt.current===Ge&&St()})},Pt=function(){qe(function(Ge){return(0,y.Z)((0,y.Z)({},Ge),{},{ready:!1})})};return(0,E.Z)(Pt,[Ne]),(0,E.Z)(function(){ke||Pt()},[ke]),[ze.ready,ze.offsetX,ze.offsetY,ze.offsetR,ze.offsetB,ze.arrowX,ze.arrowY,ze.scaleX,ze.scaleY,ze.align,Nt]}var At=k(77654);function ut(ke,Ce,_e,Ne,Ke){(0,E.Z)(function(){if(ke&&Ce&&_e){let gt=function(){Ne(),Ke()};var nt=Ce,te=_e,Ie=ae(nt),Ue=ae(te),ze=ne(te),qe=new Set([ze].concat((0,At.Z)(Ie),(0,At.Z)(Ue)));return qe.forEach(function(Rt){Rt.addEventListener("scroll",gt,{passive:!0})}),ze.addEventListener("resize",gt,{passive:!0}),Ne(),function(){qe.forEach(function(Rt){Rt.removeEventListener("scroll",gt),ze.removeEventListener("resize",gt)})}}},[ke,Ce,_e])}var jt=k(48736);function tt(ke,Ce,_e,Ne,Ke,nt,te,Ie){var Ue=x.useRef(ke);Ue.current=ke;var ze=x.useRef(!1);x.useEffect(function(){if(Ce&&Ne&&(!Ke||nt)){var gt=function(){ze.current=!1},Rt=function(Tt){var Et;Ue.current&&!te(((Et=Tt.composedPath)===null||Et===void 0||(Et=Et.call(Tt))===null||Et===void 0?void 0:Et[0])||Tt.target)&&!ze.current&&Ie(!1)},vt=ne(Ne);vt.addEventListener("pointerdown",gt,!0),vt.addEventListener("mousedown",Rt,!0),vt.addEventListener("contextmenu",Rt,!0);var _t=(0,l.A)(_e);if(_t&&(_t.addEventListener("mousedown",Rt,!0),_t.addEventListener("contextmenu",Rt,!0)),0)var St,Nt,Pt,Ct;return function(){vt.removeEventListener("pointerdown",gt,!0),vt.removeEventListener("mousedown",Rt,!0),vt.removeEventListener("contextmenu",Rt,!0),_t&&(_t.removeEventListener("mousedown",Rt,!0),_t.removeEventListener("contextmenu",Rt,!0))}}},[Ce,_e,Ne,Ke,nt]);function qe(){ze.current=!0}return qe}var Ft=["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 Me(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:be.Z,Ce=x.forwardRef(function(_e,Ne){var Ke=_e.prefixCls,nt=Ke===void 0?"rc-trigger-popup":Ke,te=_e.children,Ie=_e.action,Ue=Ie===void 0?"hover":Ie,ze=_e.showAction,qe=_e.hideAction,gt=_e.popupVisible,Rt=_e.defaultPopupVisible,vt=_e.onPopupVisibleChange,_t=_e.afterPopupVisibleChange,St=_e.mouseEnterDelay,Nt=_e.mouseLeaveDelay,Pt=Nt===void 0?.1:Nt,Ct=_e.focusDelay,Ge=_e.blurDelay,Tt=_e.mask,Et=_e.maskClosable,ct=Et===void 0?!0:Et,Lt=_e.getPopupContainer,_=_e.forceRender,T=_e.autoDestroy,Q=_e.destroyPopupOnHide,C=_e.popup,G=_e.popupClassName,Xe=_e.popupStyle,fe=_e.popupPlacement,Ae=_e.builtinPlacements,Pe=Ae===void 0?{}:Ae,j=_e.popupAlign,X=_e.zIndex,he=_e.stretch,Se=_e.getPopupClassNameFromAlign,$=_e.fresh,Qe=_e.alignPoint,le=_e.onPopupClick,It=_e.onPopupAlign,$t=_e.arrow,zt=_e.popupMotion,sr=_e.maskMotion,or=_e.popupTransitionName,Kt=_e.popupAnimation,ur=_e.maskTransitionName,Zr=_e.maskAnimation,Tr=_e.className,fr=_e.getTriggerDOMNode,Ot=(0,ie.Z)(_e,Ft),yt=T||Q||!1,bt=x.useState(!1),Jt=(0,Ee.Z)(bt,2),Sr=Jt[0],Dr=Jt[1];(0,E.Z)(function(){Dr((0,L.Z)())},[]);var hn=x.useRef({}),Re=x.useContext(Oe),Je=x.useMemo(function(){return{registerSubPopup:function(Or,gn){hn.current[Or]=gn,Re==null||Re.registerSubPopup(Or,gn)}}},[Re]),lt=(0,B.Z)(),Ze=x.useState(null),Dt=(0,Ee.Z)(Ze,2),Wt=Dt[0],cr=Dt[1],Ir=x.useRef(null),Zt=(0,V.Z)(function(lr){Ir.current=lr,(0,ce.Sh)(lr)&&Wt!==lr&&cr(lr),Re==null||Re.registerSubPopup(lt,lr)}),qt=x.useState(null),gr=(0,Ee.Z)(qt,2),hr=gr[0],vr=gr[1],nr=x.useRef(null),Ar=(0,V.Z)(function(lr){(0,ce.Sh)(lr)&&hr!==lr&&(vr(lr),nr.current=lr)}),Pr=x.Children.only(te),Xr=(Pr==null?void 0:Pr.props)||{},tn={},xn=(0,V.Z)(function(lr){var Or,gn,zr=hr;return(zr==null?void 0:zr.contains(lr))||((Or=(0,l.A)(zr))===null||Or===void 0?void 0:Or.host)===lr||lr===zr||(Wt==null?void 0:Wt.contains(lr))||((gn=(0,l.A)(Wt))===null||gn===void 0?void 0:gn.host)===lr||lr===Wt||Object.values(hn.current).some(function(Qr){return(Qr==null?void 0:Qr.contains(lr))||lr===Qr})}),_r=ue(nt,zt,Kt,or),Gr=ue(nt,sr,Zr,ur),Yr=x.useState(Rt||!1),un=(0,Ee.Z)(Yr,2),Vr=un[0],Rr=un[1],Br=gt!=null?gt:Vr,rn=(0,V.Z)(function(lr){gt===void 0&&Rr(lr)});(0,E.Z)(function(){Rr(gt||!1)},[gt]);var nn=x.useRef(Br);nn.current=Br;var Nr=x.useRef([]);Nr.current=[];var Jr=(0,V.Z)(function(lr){var Or;rn(lr),((Or=Nr.current[Nr.current.length-1])!==null&&Or!==void 0?Or:Br)!==lr&&(Nr.current.push(lr),vt==null||vt(lr))}),an=x.useRef(),wn=function(){clearTimeout(an.current)},mn=function(Or){var gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;wn(),gn===0?Jr(Or):an.current=setTimeout(function(){Jr(Or)},gn*1e3)};x.useEffect(function(){return wn},[]);var dn=x.useState(!1),Rn=(0,Ee.Z)(dn,2),Wr=Rn[0],Cn=Rn[1];(0,E.Z)(function(lr){(!lr||Br)&&Cn(!0)},[Br]);var ht=x.useState(null),Lr=(0,Ee.Z)(ht,2),on=Lr[0],$n=Lr[1],Pn=x.useState(null),Ln=(0,Ee.Z)(Pn,2),Sn=Ln[0],ir=Ln[1],$r=function(Or){ir([Or.clientX,Or.clientY])},ln=pt(Br,Wt,Qe&&Sn!==null?Sn:hr,fe,Pe,j,It),Hr=(0,Ee.Z)(ln,11),Xt=Hr[0],dr=Hr[1],jr=Hr[2],xr=Hr[3],Gt=Hr[4],fn=Hr[5],vn=Hr[6],kn=Hr[7],ii=Hr[8],si=Hr[9],hi=Hr[10],ai=st(Sr,Ue,ze,qe),bn=(0,Ee.Z)(ai,2),Qn=bn[0],Mn=bn[1],Un=Qn.has("click"),Jn=Mn.has("click")||Mn.has("contextMenu"),Zn=(0,V.Z)(function(){Wr||hi()}),Kr=function(){nn.current&&Qe&&Jn&&mn(!1)};ut(Br,hr,Wt,Zn,Kr),(0,E.Z)(function(){Zn()},[Sn,fe]),(0,E.Z)(function(){Br&&!(Pe!=null&&Pe[fe])&&Zn()},[JSON.stringify(j)]);var Ii=x.useMemo(function(){var lr=ee(Pe,nt,si,Qe);return v()(lr,Se==null?void 0:Se(si))},[si,Se,Pe,nt,Qe]);x.useImperativeHandle(Ne,function(){return{nativeElement:nr.current,popupElement:Ir.current,forceAlign:Zn}});var vi=x.useState(0),_i=(0,Ee.Z)(vi,2),Bn=_i[0],kr=_i[1],ns=x.useState(0),Ht=(0,Ee.Z)(ns,2),Nn=Ht[0],Bi=Ht[1],Ni=function(){if(he&&hr){var Or=hr.getBoundingClientRect();kr(Or.width),Bi(Or.height)}},zn=function(){Ni(),Zn()},oi=function(Or){Cn(!1),hi(),_t==null||_t(Or)},Fr=function(){return new Promise(function(Or){Ni(),$n(function(){return Or})})};(0,E.Z)(function(){on&&(hi(),on(),$n(null))},[on]);function ei(lr,Or,gn,zr){tn[lr]=function(Qr){var yi;zr==null||zr(Qr),mn(Or,gn);for(var fi=arguments.length,bi=new Array(fi>1?fi-1:0),Gi=1;Gi<fi;Gi++)bi[Gi-1]=arguments[Gi];(yi=Xr[lr])===null||yi===void 0||yi.call.apply(yi,[Xr,Qr].concat(bi))}}(Un||Jn)&&(tn.onClick=function(lr){var Or;nn.current&&Jn?mn(!1):!nn.current&&Un&&($r(lr),mn(!0));for(var gn=arguments.length,zr=new Array(gn>1?gn-1:0),Qr=1;Qr<gn;Qr++)zr[Qr-1]=arguments[Qr];(Or=Xr.onClick)===null||Or===void 0||Or.call.apply(Or,[Xr,lr].concat(zr))});var $i=tt(Br,Jn,hr,Wt,Tt,ct,xn,mn),is=Qn.has("hover"),Gn=Mn.has("hover"),Ui,ss;is&&(ei("onMouseEnter",!0,St,function(lr){$r(lr)}),ei("onPointerEnter",!0,St,function(lr){$r(lr)}),Ui=function(Or){(Br||Wr)&&Wt!==null&&Wt!==void 0&&Wt.contains(Or.target)&&mn(!0,St)},Qe&&(tn.onMouseMove=function(lr){var Or;(Or=Xr.onMouseMove)===null||Or===void 0||Or.call(Xr,lr)})),Gn&&(ei("onMouseLeave",!1,Pt),ei("onPointerLeave",!1,Pt),ss=function(){mn(!1,Pt)}),Qn.has("focus")&&ei("onFocus",!0,Ct),Mn.has("focus")&&ei("onBlur",!1,Ge),Qn.has("contextMenu")&&(tn.onContextMenu=function(lr){var Or;nn.current&&Mn.has("contextMenu")?mn(!1):($r(lr),mn(!0)),lr.preventDefault();for(var gn=arguments.length,zr=new Array(gn>1?gn-1:0),Qr=1;Qr<gn;Qr++)zr[Qr-1]=arguments[Qr];(Or=Xr.onContextMenu)===null||Or===void 0||Or.call.apply(Or,[Xr,lr].concat(zr))}),Tr&&(tn.className=v()(Xr.className,Tr));var Yn=x.useRef(!1);Yn.current||(Yn.current=_||Br||Wr);var di=(0,y.Z)((0,y.Z)({},Xr),tn),li={},zi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];zi.forEach(function(lr){Ot[lr]&&(li[lr]=function(){for(var Or,gn=arguments.length,zr=new Array(gn),Qr=0;Qr<gn;Qr++)zr[Qr]=arguments[Qr];(Or=di[lr])===null||Or===void 0||Or.call.apply(Or,[di].concat(zr)),Ot[lr].apply(Ot,zr)})});var qi=x.cloneElement(Pr,(0,y.Z)((0,y.Z)({},di),li)),Xi={x:fn,y:vn},ti=$t?(0,y.Z)({},$t!==!0?$t:{}):null;return x.createElement(x.Fragment,null,x.createElement(de.Z,{disabled:!Br,ref:Ar,onResize:zn},x.createElement(pe,{getTriggerDOMNode:fr},qi)),Yn.current&&x.createElement(Oe.Provider,{value:Je},x.createElement(oe,{portal:ke,ref:Zt,prefixCls:nt,popup:C,className:v()(G,Ii),style:Xe,target:hr,onMouseEnter:Ui,onMouseLeave:ss,onPointerEnter:Ui,zIndex:X,open:Br,keepDom:Wr,fresh:$,onClick:le,onPointerDownCapture:$i,mask:Tt,motion:_r,maskMotion:Gr,onVisibleChanged:oi,onPrepare:Fr,forceRender:_,autoDestroy:yt,getPopupContainer:Lt,align:si,arrow:ti,arrowPos:Xi,ready:Xt,offsetX:dr,offsetY:jr,offsetR:xr,offsetB:Gt,onAlign:Zn,stretch:he,targetWidth:Bn/kn,targetHeight:Nn/ii})))});return Ce}var mt=Me(be.Z)},46214:function(){"use strict"},42075:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return x}});var y=k(7939),Ee=k(59301),ie=Object.defineProperty,be=Object.defineProperties,J=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,l=(P,q,H)=>q in P?ie(P,q,{enumerable:!0,configurable:!0,writable:!0,value:H}):P[q]=H,V=(P,q)=>{for(var H in q||(q={}))de.call(q,H)&&l(P,H,q[H]);if(v)for(var H of v(q))ce.call(q,H)&&l(P,H,q[H]);return P},B=(P,q)=>be(P,J(q)),E=(P,q)=>{var H={};for(var U in P)de.call(P,U)&&q.indexOf(U)<0&&(H[U]=P[U]);if(P!=null&&v)for(var U of v(P))q.indexOf(U)<0&&ce.call(P,U)&&(H[U]=P[U]);return H},L=(P,q,H)=>new Promise((U,A)=>{var z=oe=>{try{N(H.next(oe))}catch(ve){A(ve)}},O=oe=>{try{N(H.throw(oe))}catch(ve){A(ve)}},N=oe=>oe.done?U(oe.value):Promise.resolve(oe.value).then(z,O);N((H=H.apply(P,q)).next())});const x=P=>{var q=P,{children:H}=q,U=E(q,["children"]);const[A,z]=(0,Ee.useState)(!1);return Ee.createElement(y.ZP,B(V({},U),{loading:A,onClick:O=>L(void 0,null,function*(){try{z(!0),yield U.onClick(O),z(!1)}catch(N){console.error(N),z(!1)}})}),H)}},90736:function(Vt,it,k){"use strict";var y=k(59301),Ee=k(4977),ie=k(7939),be=Object.defineProperty,J=Object.defineProperties,v=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,V=(x,P,q)=>P in x?be(x,P,{enumerable:!0,configurable:!0,writable:!0,value:q}):x[P]=q,B=(x,P)=>{for(var q in P||(P={}))ce.call(P,q)&&V(x,q,P[q]);if(de)for(var q of de(P))l.call(P,q)&&V(x,q,P[q]);return x},E=(x,P)=>J(x,v(P));const L=({img:x,buttonProps:P={},styles:q={},customText:H,ButtonText:U,ButtonClick:A,Buttonclass:z,ButtonTwo:O,imgStyles:N,loading:oe=!1,className:ve=""})=>y.createElement("section",{className:`tc animated fadeIn ${ve}`,style:B({color:"#999",margin:"100px auto",visibility:oe?"hidden":"visible"},q)},y.createElement("img",{src:x||Ee,style:E(B({},N),{pointerEvents:"none",userSelect:"none"})}),y.createElement("p",{className:"mt20 font14"},H||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),U&&y.createElement(ie.ZP,B({className:z,onClick:A},P),U),O&&O);it.Z=L},86974:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return z}});var y=k(59301),Ee={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},ie=k(7939),be=k(70557),J=k(34728),v=k(25399),de=k(76406),ce=k(84849),l=k(90736),V=k(14185),B=k(52078),E=k(59301),L=Object.defineProperty,x=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,H=(O,N,oe)=>N in O?L(O,N,{enumerable:!0,configurable:!0,writable:!0,value:oe}):O[N]=oe,U=(O,N)=>{for(var oe in N||(N={}))P.call(N,oe)&&H(O,oe,N[oe]);if(x)for(var oe of x(N))q.call(N,oe)&&H(O,oe,N[oe]);return O},A=(O,N,oe)=>new Promise((ve,pe)=>{var De=st=>{try{Fe(oe.next(st))}catch(re){pe(re)}},Oe=st=>{try{Fe(oe.throw(st))}catch(re){pe(re)}},Fe=st=>st.done?ve(st.value):Promise.resolve(st.value).then(De,Oe);Fe((oe=oe.apply(O,N)).next())}),z=({editOffice:O="view",data:N,issaver:oe,onSaver:ve,theme:pe,type:De,filename:Oe,monacoEditor:Fe,className:st,style:re,close:W,onClose:ee,hasMask:ue,disabledDownload:ne,onImgDimensions:ae,showNodata:S,recordInfo:w})=>{const[K,ye]=(0,y.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Be,He]=(0,y.useState)(""),[ot,at]=(0,y.useState)(),pt=window.ENV==="build"?"/react/build":"",At=location.host.startsWith("localhost")?V.Z.PROXY_SERVER:V.Z.API_SERVER,jt=10*(1024*1024),tt=(0,y.useRef)();N!=null&&N.startsWith("/api")&&De!=="txt"&&(N=V.Z.API_SERVER+N);const Ft=Ne=>Ne.substring(Ne.lastIndexOf("/")+1).split(".").pop();Oe&&Fe&&(Fe.filename=Oe),(0,y.useEffect)(()=>{var Ne,Ke;const nt=(Ke=(Ne=document.cookie)==null?void 0:Ne.replace(/\s/g,""))==null?void 0:Ke.split(";");nt==null||nt.map(te=>{let Ie=te.split("=");Ie[0]==="_educoder_session"&&He(Ie[1])})},[]),(0,y.useEffect)(()=>{De==="office"&&(N.indexOf("bigfilescdn.")>-1||N.indexOf("bigfiles1")>-1?at({url:N,fileType:Ft(N),model:N.indexOf("model=edit")?"edit":"view"}):N.indexOf("coze")>-1?at({url:N,fileType:"doc",model:"view"}):mt())},[De,N]);function Me(Ne){return A(this,null,function*(){Ne.data.type==="pdfdata"&&(ve(Ne.data.data),window.removeEventListener("message",Me,!1)),console.log("mess---:",Ne.data)})}const mt=()=>A(void 0,null,function*(){console.log("data:",N);let Ne=N;N.startsWith("http")||(Ne=location.origin+Ne);let Ke=new URL(Ne).pathname.split("/").pop();const nt=yield(0,ce.gJ)({attachment_id:Ke});nt.url=At+nt.url,at(nt)}),ke=()=>{if(N.startsWith("http")||N.startsWith("blob:")){Ce();return}(0,de.Sv)(Oe||"educoder",N,Oe)},Ce=()=>{w&&(0,B.fc)({id:w==null?void 0:w.id,watch_type:1,course_id:w==null?void 0:w.course_id}),(0,de.Nd)(Oe||"educoder",decodeURIComponent(N))};(0,y.useEffect)(()=>(window.addEventListener("message",_e),()=>{window.removeEventListener("message",_e)}),[]);const _e=Ne=>{var Ke;((Ke=Ne==null?void 0:Ne.data)==null?void 0:Ke.type)==="closePop"&&ee()};return E.createElement("div",{style:U({},re||{}),className:`${ue&&Ee.bgBlack} ${De?Ee.wrp:"hide"}`},!!De&&W&&E.createElement("div",{id:"closePop",className:Ee.close,ref:tt},!!ae&&E.createElement(v.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>tt.current},E.createElement("span",{onClick:()=>{ee(),ae()}},E.createElement("i",{className:"icon-yulanpizhu"}))),!ne&&window.parent===window&&E.createElement(v.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>tt.current},E.createElement("span",{onClick:Ce},E.createElement("i",{className:"icon-quxiaozhiding"}))),oe&&E.createElement(v.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>tt.current},E.createElement("span",{className:"",onClick:()=>{const Ne=document.getElementById("pdfiframe");window.addEventListener("message",Me,!1),setTimeout(()=>{Ne.contentWindow.postMessage("getData","*")},300)}},E.createElement("i",{className:"icon-baocun"}))),E.createElement(v.Z,{title:"\u5173\u95ED",getPopupContainer:()=>tt.current},E.createElement("span",{className:"",onClick:()=>{ee()}},E.createElement("i",{className:"icon-guanbi1"})))),E.createElement("div",{className:`${Ee[st]} ${st} ${Ee.monaco} ${De==="txt"?"show":"hide"}`},De==="txt"&&E.createElement(E.Fragment,null,E.createElement(J.ZP,U({},Fe)))),De==="audio"&&E.createElement("audio",{controls:!0,src:`${(N==null?void 0:N.indexOf("http://"))>-1||(N==null?void 0:N.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${N}`,autoPlay:!0}),De==="video"&&E.createElement(E.Fragment,null,(N==null?void 0:N.indexOf("http"))>-1?E.createElement("video",{controls:!0,src:`${N}`,autoPlay:!0}):E.createElement("video",{controls:!0,src:`data:video/mp4;base64,${N}`,autoPlay:!0})),De==="office"&&ot&&E.createElement("iframe",{src:`${pt}/office.html?key=${ot.key}&url=${btoa(ot.url)}&callbackUrl=${At+(ot.callbackUrl||"")}&fileType=${ot.fileType}&title=${ot.title||""}&model=${O}&officeServer=${V.Z.ONLYOFFICE}&disabledDownload=${!!ne}`}),De==="html"&&E.createElement("iframe",{src:N+"&disposition=inline"}),De==="pdf"&&E.createElement("iframe",{id:"pdfiframe",src:`${pt}/js/pdf/index.html?filename=${Oe||"educoder.pdf"}&url=${encodeURIComponent(N)}&disabledDownload=${!!ne}&model=${O}`}),De==="image"&&E.createElement("img",{src:`${(N==null?void 0:N.indexOf("http://"))>-1||(N==null?void 0:N.indexOf("https://"))>-1?"":"data:image/png;base64,"}${N}`}),(De==="other"||De==="download")&&E.createElement(E.Fragment,null,S?E.createElement(l.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:E.createElement(ie.ZP,{icon:E.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ke,disabled:ne},"\u4E0B\u8F7D")}):E.createElement(ie.ZP,{type:"primary",size:"middle",onClick:ke,disabled:ne},E.createElement(be.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),De==="flowChart"&&E.createElement("div",{className:"embed"},E.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${N||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(Vt,it,k){"use strict";k.d(it,{z:function(){return Fe},Z:function(){return st}});var y=k(59301),Ee=k(46214),ie=k(20047),be=k(64018),J=k(16471),v=k(14185),de=k(76406),ce=k(15342),l=k(44104),V=k(7939),B=k(1012),E=k(86974),L=k(59301),P=({html:re})=>{const W=(0,y.useRef)(null),ee=(0,y.useRef)(null),ue=`.markdown-body p {
margin: 0 0 16px 0 !important;
line-height: 28px;
white-space: pre-wrap;
}
ol,
ul,
li {
list-style-type: none
}
ol,
ul,
dl {
margin-bottom: 0px;
}
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
overflow: hidden;
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
word-break: break-word;
font-size: 16px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
position: relative;
}
.markdown-body ul>li {
list-style-type: disc;
}
.markdown-body ol>li {
list-style-type: decimal;
}
.markdown-body a {
background: transparent;
}
.markdown-body a:active,
.markdown-body a:hover {
outline: 0;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body h1 {
font-size: 2em;
margin: 0.67em 0;
}
.markdown-body img {
border: 0;
}
.markdown-body hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
.markdown-body pre {
overflow: auto;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
font-size: 1em;
}
.markdown-body input {
color: inherit;
font: inherit;
margin: 0;
}
.markdown-body html input[disabled] {
cursor: default;
}
.markdown-body input {
line-height: normal;
}
.markdown-body input[type="checkbox"] {
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body table {
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body * {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body input {
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
}
.markdown-body a {
color: #4183c4;
text-decoration: none;
}
.markdown-body a:hover,
.markdown-body a:active {
text-decoration: underline;
}
.markdown-body hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #ddd;
}
.markdown-body hr:before {
display: table;
content: "";
}
.markdown-body hr:after {
display: table;
clear: both;
content: "";
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 15px;
margin-bottom: 15px;
line-height: 1.1;
}
.markdown-body h1 {
font-size: 30px;
}
.markdown-body h2 {
font-size: 21px;
}
.markdown-body h3 {
font-size: 16px;
}
.markdown-body h4 {
font-size: 14px;
}
.markdown-body h5 {
font-size: 12px;
}
.markdown-body h6 {
font-size: 11px;
}
.markdown-body blockquote {
margin: 0;
}
.markdown-body ul,
.markdown-body ol {
padding: 0;
margin-top: 0;
margin-bottom: 0;
}
ul.linenums,
ol.linenums {
padding: 16px 0 0 56px !important;
}
.markdown-body ul,
.markdown-body ol {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.markdown-body .octicon {
font: normal normal 16px octicons-anchor;
line-height: 1;
display: inline-block;
text-decoration: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.markdown-body .octicon-link:before {
content: '\f05c';
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body .anchor {
position: absolute;
top: 0;
left: 0;
display: block;
padding-right: 6px;
padding-left: 30px;
margin-left: -30px;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
position: relative;
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
display: none;
color: #000;
vertical-align: middle;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
padding-left: 8px;
margin-left: -30px;
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
display: inline-block;
}
.markdown-body h1 {
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eee;
}
.markdown-body h1 .anchor {
line-height: 1;
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eee;
}
.markdown-body h2 .anchor {
line-height: 1;
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h3 .anchor {
line-height: 1.2;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h4 .anchor {
line-height: 1.2;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h5 .anchor {
line-height: 1.1;
}
.markdown-body h6 {
font-size: 1em;
color: #777;
}
.markdown-body h6 .anchor {
line-height: 1.1;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body blockquote {
padding: 0 15px;
color: #777;
border-left: 4px solid #ddd;
}
.markdown-body blockquote> :first-child {
margin-top: 0;
}
.markdown-body blockquote> :last-child {
margin-bottom: 0;
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
}
.markdown-body table th {
font-weight: bold;
text-align: revert;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #ddd;
}
.markdown-body table tr {
background-color: #fff;
border-top: 1px solid #ccc;
}
.markdown-body table tr:nth-child(2n) {
background-color: #f8f8f8;
}
.markdown-body img {
max-width: 100%;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, 0.04);
border-radius: 3px;
}
.markdown-body code:has(.katex) {
background-color: transparent;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\\00a0";
}
.markdown-body pre>code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body pre {
word-wrap: normal;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .pl-c {
color: #969896;
}
.markdown-body .pl-c1,
.markdown-body .pl-mdh,
.markdown-body .pl-mm,
.markdown-body .pl-mp,
.markdown-body .pl-mr,
.markdown-body .pl-s1 .pl-v,
.markdown-body .pl-s3,
.markdown-body .pl-sc,
.markdown-body .pl-sv {
color: #0086b3;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #795da3;
}
.markdown-body .pl-s1 .pl-s2,
.markdown-body .pl-smi,
.markdown-body .pl-smp,
.markdown-body .pl-stj,
.markdown-body .pl-vo,
.markdown-body .pl-vpf {
color: #333;
}
.markdown-body .pl-ent {
color: #63a35c;
}
.markdown-body .pl-k,
.markdown-body .pl-s,
.markdown-body .pl-st {
color: #a71d5d;
}
.markdown-body .pl-pds,
.markdown-body .pl-s1,
.markdown-body .pl-s1 .pl-pse .pl-s2,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sra,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-src {
color: #df5000;
}
.markdown-body .pl-mo,
.markdown-body .pl-v {
color: #1d3e81;
}
.markdown-body .pl-id {
color: #b52a1d;
}
.markdown-body .pl-ii {
background-color: #b52a1d;
color: #f8f8f8;
}
.markdown-body .pl-sr .pl-cce {
color: #63a35c;
font-weight: bold;
}
.markdown-body .pl-ml {
color: #693a17;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
color: #1d3e81;
font-weight: bold;
}
.markdown-body .pl-mq {
color: #008080;
}
.markdown-body .pl-mi {
color: #333;
font-style: italic;
}
.markdown-body .pl-mb {
color: #333;
font-weight: bold;
}
.markdown-body .pl-md,
.markdown-body .pl-mdhf {
background-color: #ffecec;
color: #bd2c00;
}
.markdown-body .pl-mdht,
.markdown-body .pl-mi1 {
background-color: #eaffea;
color: #55a532;
}
.markdown-body .pl-mdr {
color: #795da3;
font-weight: bold;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item input {
float: left;
margin: 0.3em 0 0.25em -1.6em;
vertical-align: middle;
}
.markdown-body :checked+.radio-label {
z-index: 1;
position: relative;
border-color: #4183c4;
}
/*! Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
.pln {
color: #000
}
/* plain text */
@media screen {
.str {
color: #080
}
/* string content */
.kwd {
color: #008
}
/* a keyword */
.com {
color: #800
}
/* a comment */
.typ {
color: #606
}
/* a type name */
.lit {
color: #066
}
/* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun,
.opn,
.clo {
color: #660
}
.tag {
color: #008
}
/* a markup tag name */
.atn {
color: #606
}
/* a markup attribute name */
.atv {
color: #080
}
/* a markup attribute value */
.dec,
.var {
color: #606
}
/* a declaration; a variable name */
.fun {
color: red
}
/* a function name */
}
/* Use higher contrast and text-weight for printable form. */
@media print,
projection {
.str {
color: #060
}
.kwd {
color: #006;
font-weight: bold
}
.com {
color: #600;
font-style: italic
}
.typ {
color: #404;
font-weight: bold
}
.lit {
color: #044
}
.pun,
.opn,
.clo {
color: #440
}
.tag {
color: #006;
font-weight: bold
}
.atn {
color: #404
}
.atv {
color: #060
}
}
/* Put a border around prettyprinted code snippets. */
pre.prettyprint {
padding: 2px;
/* border: 1px solid #888 */
}
/* Specify class=linenums on a pre to get line numbering */
ol.linenums {
margin-top: 0;
margin-bottom: 0
}
/* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 {
list-style-type: none
}
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 {
background: #eee
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}`;return(0,y.useEffect)(()=>{const ne=W.current.attachShadow({mode:"open"});ee.current=document.createElement("div"),ee.current.className="markdown-body",ee.current.innerHTML=re,ne.appendChild(ee.current);const ae=document.createElement("style");return ae.textContent=ue,ne.appendChild(ae),()=>{ne.innerHTML=""}},[]),(0,y.useEffect)(()=>{ee.current&&(ee.current.innerHTML=re)},[re]),L.createElement("div",{ref:W})};function q(re){const W=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],ee=new RegExp(`\\b(${W.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),ue=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return re.replace(ee,"").replace(ue,"").trim()}var H={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},U=Object.defineProperty,A=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,N=(re,W,ee)=>W in re?U(re,W,{enumerable:!0,configurable:!0,writable:!0,value:ee}):re[W]=ee,oe=(re,W)=>{for(var ee in W||(W={}))z.call(W,ee)&&N(re,ee,W[ee]);if(A)for(var ee of A(W))O.call(W,ee)&&N(re,ee,W[ee]);return re};const ve="@\u2581\u2581@",pe="@\u2581@",De=/<pre[^>]*>/g;function Oe(re){let W=document.createElement("div");return W.innerHTML=re,W.childNodes.length===0?"":W.childNodes[0].nodeValue}const Fe=(re,W)=>{re=re||"";const ee=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ue=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ne=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ae=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return W?re.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ee,(S,w,K,ye,Be,He,ot)=>{const at=w||ye||He,pt=K||Be||ot||"?";return v.Z.API_SERVER+"/api/attachments/"+at+pt+"&t="+(0,de.Jn)(at,Date.now())+(S.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(re=re.replace(ae,(S,w,K,ye,Be,He,ot)=>{const at=w||ye||He,pt=K||Be||ot||"?";return v.Z.API_SERVER+"/attachments/download/"+at+pt+"&t="+(0,de.Jn)(at,Date.now())+(S.indexOf(")")>-1?")":"&")}).replace(ee,(S,w,K,ye,Be,He,ot)=>{const at=w||ye||He,pt=K||Be||ot||"?";return v.Z.API_SERVER+"/api/attachments/"+at+pt+"&t="+(0,de.Jn)(at,Date.now())+(S.indexOf(")")>-1?")":"&")}).replace(ue,(S,w,K,ye,Be)=>{const He=w||ye,ot=K||Be||"";return'"'+v.Z.API_SERVER+"/api/attachments/"+He+ot+He+ot+"&t="+(0,de.Jn)(He,Date.now())}).replace(ne,(S,w,K,ye,Be)=>{const He=w||ye,ot=K||Be||"";return"("+v.Z.API_SERVER+"/files/uploads/"+He+ot+He+ot+"&t="+(0,de.Jn)(He,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,`
`),re)};var st=({value:re="",edit:W=!1,className:ee,showTextOnly:ue,showLines:ne,style:ae={},stylesPrev:S={},highlightKeywords:w,showProgramFill:K,isProgramFill:ye,disabledFill:Be=!1,programFillValue:He,openEditor:ot=()=>{},onFillChange:at=ut=>{},onFillBlur:pt=()=>{},onFillFocus:At=()=>{}})=>{let ut=q(String(re||""));const jt=(0,y.useRef)(),tt=(0,y.useRef)(),[Ft,Me]=(0,y.useState)(""),[mt,ke]=(0,y.useState)("office"),[Ce,_e]=(0,y.useState)([]),Ne=(0,y.useRef)("a"+(0,B.Z)()),Ke={},nt=Ge=>/<style[\s\S]*?>/i.test(Ge||""),te=(Ge,Tt,Et)=>{const ct=document.createElement(Ge===pe?"input":"textarea");ct.style.width="100%",ct.style.height=Ge===pe?"40px":"151px",ct.rows=5,ct.spellcheck=!1,ct.name="edu-program-fill",ct.placeholder="\u8BF7\u8F93\u5165",ct.dataset.id=Tt;const Lt=Object.keys(Ke).length;return Ke[Lt]=ct,`<span class="edu-program-fill-wrap ${Ge===pe?"":"show"}" style="width:${Ge===pe?"600px":"100%"}" title=${Et||""}><span>${ct.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ie(Ge){return Ge=Ge.replace(/!\[.*?\]\(.*?\)/g,""),Ge=Ge.replace(/\[.*?\]\(.*?\)/g,""),Ge=Ge.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ge=Ge.replace(/<embed.*?>/g,""),Ge=Ge.replace(/<img.*?>/g,""),Ge=Ge.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ge=Ge.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ge=Ge.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ge=Ge.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ge}const Ue=Ge=>!ue&&nt(ut)?Ge:Ge.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Tt,Et){let ct=Et.replace(/(\n|\r)/g,"").split("}"),Lt=[];return ct.map(_=>{_!=""&&Lt.push(`.${Ne.current} ${_}`)}),`<style>${Lt.join("}")}</style>`}),ze=(0,y.useMemo)(()=>{(0,ie.Iy)();try{const ct=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Lt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,_=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,T=/\(\/attachments\/download\//g;ut=ut.replace(T,"("+v.Z.API_SERVER+"/attachments/download/").replace(ct,"("+v.Z.API_SERVER+"/api/attachments/").replace(Lt,'"'+v.Z.API_SERVER+"/api/attachments/").replace(_,'"'+v.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,`
`),jt.current.style.display="none"}catch(ct){}if(K){let ct=-1;return ut=ut.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Lt,_,T){var Q;return++ct,te(Lt,ct,(Q=He==null?void 0:He[ct])==null?void 0:Q.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ue(ut||"")}</pre>`}let Ge=Ue(ut);Ge=(0,ie.ZP)(Ge);const Tt=(0,ie.ez)();ut.match(/\[TOC\]/)&&(Ge=Ge.replace("<p>[TOC]</p>",(0,ie.Qv)()),(0,ie.Iy)()),Ge=Ge.replace(/(__special_katext_id_\d+__)/g,(ct,Lt)=>{const{type:_,expression:T}=Tt[Lt];return(0,ce.renderToString)(Oe(T)||"",{displayMode:_==="block",throwOnError:!1,output:"html"})}),Ge=Ge.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ie.AL)();const Et=document.createElement("div");if(Et.innerHTML=Ge,ue)return Et.innerText;if(w){const ct=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return vt(Et,ct),Et.innerHTML}return setTimeout(()=>Nt(),500),Et.innerHTML},[ut,w]);(0,y.useEffect)(()=>{_t.current&&_t.current.querySelectorAll(["input","textarea"]).forEach(Tt=>{Tt.oninput=qe,Tt.onblur=gt,Tt.onfocus=Rt})},[Ce]),(0,y.useEffect)(()=>{var Ge,Tt,Et,ct,Lt;if(He!=null&&He.length)try{const _=_t.current.querySelectorAll(".edu-program-fill-score"),T=_t.current.querySelectorAll('[name="edu-program-fill"]');for(const[Q,C]of T.entries())C.value=((Ge=He==null?void 0:He[Q])==null?void 0:Ge.value)||"",((Tt=He==null?void 0:He[Q])==null?void 0:Tt.type)==="warning"?C.className="program-fill-warning":((Et=He==null?void 0:He[Q])==null?void 0:Et.type)==="success"?C.className="program-fill-success":C.className="";for(const[Q,C]of _.entries())C.innerHTML=(ct=He==null?void 0:He[Q])!=null&&ct.score?`${(Lt=He==null?void 0:He[Q])==null?void 0:Lt.score}\u5206`:"";_e(He)}catch(_){console.log(_,"error")}},[He]);const qe=Ge=>{Ce[Ge.target.dataset.id]=Ce[Ge.target.dataset.id]||{},Ce[Ge.target.dataset.id].value=Ge.target.value,_e([...Ce]),at(Ce,Ge.target.dataset.id)},gt=Ge=>{Ce[Ge.target.dataset.id]=Ce[Ge.target.dataset.id]||{},Ce[Ge.target.dataset.id].value=Ge.target.value,_e([...Ce]),pt(Ce,Ge.target.dataset.id)},Rt=Ge=>{Ce[Ge.target.dataset.id]=Ce[Ge.target.dataset.id]||{},Ce[Ge.target.dataset.id].value=Ge.target.value,_e([...Ce]),At(Ce,Ge.target.dataset.id)};function vt(Ge,Tt){return Ge.childNodes.forEach(Et=>{var ct;if(Et.childNodes.length>0)vt(Et,Tt);else if(Et.nodeName!=="IMG")if(Et.innerHTML)Et.innerHTML=(ct=Et.innerHTML)==null?void 0:ct.replace(new RegExp(Tt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Lt=document.createElement("span");Lt.innerHTML=Et.textContent.replace(new RegExp(Tt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Et.replaceWith(Lt)}})}const _t=(0,y.useRef)();ie.jb.WebkitLineClamp=ne,ne&&(ae=oe(oe({},ae),ie.jb));function St(Ge){let Tt=Ge.target;if(Tt.tagName.toUpperCase()==="A"){let Et=Tt.getAttribute("href");if(Et.indexOf("office")>-1)Ge.preventDefault(),Me(Et),ke("office");else if(Et.indexOf("application/pdf")>-1)Ge.preventDefault(),Me(Et),ke("pdf");else if(Et.indexOf("text/html")>-1)Ge.preventDefault(),Me(Et),ke("html");else if(Et.startsWith("#")){Ge.preventDefault();let ct=document.getElementById(Et.replace("#",""));ct&&ct.scrollIntoView(!0)}}}const Nt=()=>{var Ge;const Tt=(Ge=_t.current)==null?void 0:Ge.querySelectorAll("video");Tt==null||Tt.forEach(Et=>{if(Et.oncontextmenu=()=>!1,Et.src.indexOf(".m3u8")>-1&&!Et.canPlayType("application/vnd.apple.mpegurl")){if(J.ZP.isSupported()){var ct=new J.ZP;ct.loadSource(Et.src),ct.attachMedia(Et)}}})};(0,y.useEffect)(()=>{if(_t.current&&ze&&ze.match(De)&&window.PR.prettyPrint(),_t.current)return _t.current.addEventListener("click",St),()=>{var Ge;(Ge=_t.current)==null||Ge.removeEventListener("click",St),(0,ie.AL)(),(0,ie.Iy)()}},[ze,_t.current,St]);const Pt=Ge=>{Ge.target.nodeName==="IMG"&&Ge.target.className.indexOf("draw-flowchart")>-1?(jt.current.style.zIndex=1,jt.current.style.display="flex",jt.current.style.width=Ge.target.clientWidth+"px",jt.current.style.height=Ge.target.clientHeight+"px",jt.current.style.top=Ge.target.offsetTop+"px",jt.current.style.left=Ge.target.offsetLeft+"px",Ge.target.id&&(tt.current=Ge.target.id)):jt.current.style.display="none"},Ct=()=>{jt.current.style.display="none"};return(0,y.useEffect)(()=>{var Ge;const Tt=Et=>{Et.preventDefault(),Et.clipboardData.setData("text",window.getSelection().toString())};return(Ge=_t.current)==null||Ge.addEventListener("copy",Tt),()=>{var Et;(Et=_t.current)==null||Et.removeEventListener("copy",Tt)}},[_t.current]),y.createElement("div",{style:{position:"relative"},onMouseLeave:Ct},ue&&y.createElement("div",{ref:_t,className:`${H.mdBody} `},ze),!ue&&!nt(ze)&&y.createElement("div",{ref:_t,style:oe({},ae),onMouseOver:Pt,className:`${ee||""} ${Be?"disabled-fill":""} markdown-body ${H.mdBody} ${Ne.current}`,dangerouslySetInnerHTML:{__html:ze}}),!ue&&nt(ze)&&y.createElement(P,{html:ze}),y.createElement("div",{ref:jt,className:`${H.button} ${W?"":H.previewFlowChart}`},y.createElement(l.Z,null,y.createElement(V.ZP,{onClick:()=>{W?ot(tt.current):(Me(tt.current),ke("flowChart"))}},W?"\u7F16\u8F91":"\u9884\u89C8"))),y.createElement(E.Z,{close:!0,data:Ft,type:Ft!=null&&Ft.length?mt:"",style:oe({},S),onClose:()=>Me("")}))}},34728:function(Vt,it,k){"use strict";k.d(it,{SV:function(){return jt},ZP:function(){return ut}});var y=k(59301),Ee=k(76374);const ie={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"]},be={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"]},J={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(`
`)}]},v={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(`
`)}]},de={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 ce=k(53184),l=k.n(ce),V=(tt,Ft,Me)=>new Promise((mt,ke)=>{var Ce=Ke=>{try{Ne(Me.next(Ke))}catch(nt){ke(nt)}},_e=Ke=>{try{Ne(Me.throw(Ke))}catch(nt){ke(nt)}},Ne=Ke=>Ke.done?mt(Ke.value):Promise.resolve(Ke.value).then(Ce,_e);Ne((Me=Me.apply(tt,Ft)).next())});const B={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"]}},E=(tt,Ft,Me,mt)=>{const ke=Ft.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Me.lineNumber,endColumn:Me.column});return Array.from(new Set(ke.match(/\b\w{2,}\b/g)||[])).map(_e=>({label:_e,kind:tt.languages.CompletionItemKind.Text,insertText:_e,range:mt}))},L=(tt,Ft,Me,mt)=>{tt.languages.registerCompletionItemProvider(Ft,{provideCompletionItems(ke,Ce){const _e=ke.getWordUntilPosition(Ce),Ne={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:_e.startColumn,endColumn:_e.endColumn},Ke=ke.getLineContent(Ce.lineNumber).substring(_e.startColumn-2,_e.endColumn);return{suggestions:[...E(tt,ke,Ce,Ne),...Me.map(te=>({label:te,kind:tt.languages.CompletionItemKind.Keyword,documentation:te,insertText:te,insertTextRules:tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne})),...mt.map(te=>({label:te.label,kind:tt.languages.CompletionItemKind.Snippet,documentation:te.content,insertText:Ke.startsWith("#")?te.content.replace(/#/,""):te.content,insertTextRules:tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}))]}}})};var x=tt=>{B.languages.forEach(Ft=>{tt.languages.registerDocumentFormattingEditProvider(Ft,{provideDocumentFormattingEdits(Me){return V(this,null,function*(){const mt=l()(Me.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:Me.getFullModelRange(),text:mt}]})}})}),L(tt,"java",be.keywords,be.quickKey),L(tt,"cpp",J.keywords,J.quickKey),L(tt,"c",ie.keywords,[]),L(tt,"python",v.keywords,v.quickKey),L(tt,"scala",de.keywords,de.quickKey)};const P="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var q=Object.defineProperty,H=(tt,Ft,Me)=>Ft in tt?q(tt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Me}):tt[Ft]=Me,U=(tt,Ft,Me)=>H(tt,typeof Ft!="symbol"?Ft+"":Ft,Me);const A=class Eu{constructor(Ft,Me,mt){this.placeholder=Ft,this.editor=Me,this.monaco=mt,Me.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Eu.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)}};U(A,"ID","editor.widget.placeholderHint");var O=A,N=k(96236),oe=k(6767),ve=k(25399),pe=k(78267),De=k(33156),Oe=k(56102),Fe=Object.defineProperty,st=Object.defineProperties,re=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,ne=(tt,Ft,Me)=>Ft in tt?Fe(tt,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Me}):tt[Ft]=Me,ae=(tt,Ft)=>{for(var Me in Ft||(Ft={}))ee.call(Ft,Me)&&ne(tt,Me,Ft[Me]);if(W)for(var Me of W(Ft))ue.call(Ft,Me)&&ne(tt,Me,Ft[Me]);return tt},S=(tt,Ft)=>st(tt,re(Ft)),w=(tt,Ft)=>{var Me={};for(var mt in tt)ee.call(tt,mt)&&Ft.indexOf(mt)<0&&(Me[mt]=tt[mt]);if(tt!=null&&W)for(var mt of W(tt))Ft.indexOf(mt)<0&&ue.call(tt,mt)&&(Me[mt]=tt[mt]);return Me},K=(tt,Ft,Me)=>new Promise((mt,ke)=>{var Ce=Ke=>{try{Ne(Me.next(Ke))}catch(nt){ke(nt)}},_e=Ke=>{try{Ne(Me.throw(Ke))}catch(nt){ke(nt)}},Ne=Ke=>Ke.done?mt(Ke.value):Promise.resolve(Ke.value).then(Ce,_e);Ne((Me=Me.apply(tt,Ft)).next())});function ye(tt){return/^\d+$/.test(tt)?`${tt}px`:tt}function Be(){}let He=!1;const ot={"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 at(tt=[]){let Ft=tt;if(Array.isArray(tt)){for(let Me=0;Me<tt.length;Me++){let mt=ot[tt[Me]];if(mt)return mt}return Ft[0]}return ot[Ft]||Ft}let pt=null;const At=()=>K(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(tt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",tt)}});var ut=tt=>{var Ft=tt,{width:Me="100%",height:mt="100%",value:ke,language:Ce="javascript",style:_e={},options:Ne={},overrideServices:Ke={},theme:nt="vs-dark",onEditBlur:te,isCopy:Ie=!1,onSave:Ue,autoHeight:ze=!1,forbidCopy:qe=!1,forbidCopyTips:gt,onChange:Rt=Be,editorDidMount:vt=Be,onFocus:_t=Be,onBreakPoint:St=Be,breakPointValue:Nt=[],filename:Pt="educoder.txt",errorLine:Ct,errorContent:Ge="",highlightLine:Tt,openBreakPoint:Et=!1,placeholder:ct="",showMiniMap:Lt=!0}=Ft,_=w(Ft,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const T=(0,y.useRef)(),Q=(0,y.useRef)({}),C=(0,y.useRef)(),G=(0,y.useRef)(),Xe=(0,y.useRef)([]),fe=(0,y.useRef)(!1),Ae=(0,y.useRef)(),Pe=(0,y.useRef)(),j=(0,y.useRef)(!1),[X,he]=(0,y.useState)(!1);function Se(){let yt;return T.current&&(yt=new Ee.Z(bt=>{for(let Jt of bt)(Jt.target.offsetHeight>0||Jt.target.offsetWidth>0)&&Q.current.instance.layout()}),yt.observe(T.current)),yt}function $(){oe.ZP.warning({content:decodeURIComponent(gt||P),key:"monaco-editor-tip"})}const Qe=()=>{let yt=Q.current.instance;if(ke!=null&&yt&&X){const bt=yt.getModel();bt&&ke!==bt.getValue()&&(He=!0,bt.setValue(ke),yt.layout(),He=!1)}};(0,y.useEffect)(()=>{const yt=De.Z.subscribe("formatDocument",bt=>{var Jt;let Sr=Q.current.instance;(Jt=Sr==null?void 0:Sr.getAction)==null||Jt.call(Sr,"editor.action.formatDocument").run()});return window.updateMonacoValue=bt=>{Rt(bt)},yt},[]),(0,y.useEffect)(()=>{var yt;let bt=Q.current.instance;G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{Qe()},500),ke&&(ke!=null&&ke.length)&&((yt=bt==null?void 0:bt.updateOptions)==null||yt.call(bt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ke.split(/\r\n|\r|\n/g).length))+3,5)}))},[ke,X,Q.current]),(0,y.useEffect)(()=>{if(Ct&&Q.current&&Q.current.instance){let bt=Q.current.instance;bt.changeViewZones(function(Jt){var Sr=document.createElement("div");Sr.style.padding="10px 20px",Sr.style.width="calc(100% - 20px)",Sr.className="my-error-line-wrp",Sr.innerHTML=Ge,Jt.addZone({afterLineNumber:Ct||11,heightInLines:3,domNode:Sr})});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}};bt.addOverlayWidget(yt),bt.revealPositionInCenter({lineNumber:20,column:1})}},[Ct,Q.current,X]);const le=(yt="",bt)=>{if(!yt||yt.trim()==="")return!0;const Sr=Q.current.instance.getModel().getLineTokens(bt);let Dr=!1;for(let hn=0;hn<2;hn++)Sr.getStandardTokenType(hn)===1&&(Dr=!0);return Dr};(0,y.useEffect)(()=>{var yt;const bt=(yt=Q.current)==null?void 0:yt.instance;if(bt&&X&&qe){const Jt=bt.onDidBlurEditorWidget(()=>{j.current=!1}),Sr=bt.onDidFocusEditorText(()=>{j.current=!0});return()=>{Jt.dispose(),Sr.dispose()}}},[Q.current,X,qe]),(0,y.useEffect)(()=>{var yt;if((yt=Q.current)!=null&&yt.instance&&X&&Et){let bt=Q.current.instance,Jt=bt.getModel();if(!Jt)return;(()=>{var Zt;let qt=[],gr=[];const hr=Jt.getAllDecorations();for(let nr of hr)nr.options.className==="highlighted-line"&&(qt.push((Zt=nr==null?void 0:nr.range)==null?void 0:Zt.startLineNumber),gr.push(nr==null?void 0:nr.id));if(Tt===qt[0])return;Jt.deltaDecorations(gr,[]);const vr=Jt.getLineCount();Tt&&Tt<=vr&&(bt.deltaDecorations([],[{range:new pt.Range(Tt,1,Tt,Jt.getLineMaxColumn(Tt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),bt.revealLineInCenter(Tt))})();const Dr=(Zt=!1)=>{var qt;let gr=[],hr=[];const vr=Jt.getAllDecorations();for(let nr of vr)nr.options.linesDecorationsClassName==="breakpoints-select"&&(gr.push((qt=nr==null?void 0:nr.range)==null?void 0:qt.startLineNumber),hr.push(nr==null?void 0:nr.id));if(Zt)return{lines:gr,ids:hr};St(gr)},hn=Zt=>K(void 0,null,function*(){let qt={range:new pt.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Jt.deltaDecorations([],[qt]),Dr()}),Re=Zt=>K(void 0,null,function*(){let qt=[];const gr=bt.getLineDecorations(Zt);for(let hr of gr)hr.options.linesDecorationsClassName==="breakpoints-select"&&qt.push(hr.id);yield Jt.deltaDecorations(qt,[]),Dr()}),Je=Zt=>{let qt=bt.getLineDecorations(Zt);for(let gr of qt)if(gr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,pe.isEqual)(Nt,Dr(!0).lines)){Jt.deltaDecorations(Dr(!0).ids,[]);const Zt=Nt.map(qt=>({range:new pt.Range(qt,1,qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Jt.deltaDecorations([],Zt)}const lt=bt.onDidChangeModelContent(Zt=>{let qt=bt.getPosition();if(qt){let gr=qt.lineNumber;clearTimeout(Pe.current),Pe.current=setTimeout(()=>{le(Jt.getLineContent(gr),gr)?Re(gr):Je(gr)?(Re(gr),hn(gr)):Dr()},100)}}),Ze=bt.onMouseDown(Zt=>{var qt,gr,hr;if(Zt.target.detail&&((hr=(gr=(qt=Zt.target)==null?void 0:qt.element)==null?void 0:gr.className)!=null&&hr.includes("line-numbers"))){let vr=Zt.target.position.lineNumber;if(le(Jt.getLineContent(vr),vr))return;Je(vr)?Re(vr):hn(vr)}}),Dt=Zt=>{let qt={range:new pt.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Xe.current=bt.deltaDecorations(Xe.current,[qt])},Wt=()=>{Xe.current=bt.deltaDecorations(Xe.current,[])},cr=bt.onMouseMove(Zt=>{var qt,gr,hr;if(Wt(),Zt.target.detail&&((hr=(gr=(qt=Zt.target)==null?void 0:qt.element)==null?void 0:gr.className)!=null&&hr.includes("line-numbers"))){let vr=Zt.target.position.lineNumber;if(le(Jt.getLineContent(vr),vr))return;Dt(vr)}}),Ir=bt.onMouseLeave(()=>{Wt()});return()=>{lt.dispose(),Ze.dispose(),cr.dispose(),Ir.dispose()}}},[Q.current,X,Nt,Tt,Et,Ce]),(0,y.useEffect)(()=>{var yt;(yt=Q.current)!=null&&yt.instance&&Et&&Q.current.instance.setPosition({lineNumber:0,column:0})},[Tt]);function It(){let yt=Q.current.instance;if(yt){const bt=yt.getSelection(),Jt=Q.current.pastePos||{},Sr=new pt.Range(Jt.startLineNumber||bt.endLineNumber,Jt.startColumn||bt.endColumn,Jt.endLineNumber||bt.endLineNumber,Jt.endColumn||bt.endColumn);setTimeout(()=>{yt.executeEdits("",[{range:Sr,text:""}])},300)}}function $t(yt){(window.navigator.platform.match("Mac")?yt.metaKey:yt.ctrlKey)&&yt.keyCode==83&&(yt.preventDefault(),Ue())}const zt=()=>{if(ze&&Q.current.instance){const yt=Q.current.instance.getContentHeight();fr(yt<mt?mt:yt)}else fr(mt)};function sr(yt){var bt=document.createEvent("MouseEvents");bt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),yt.dispatchEvent(bt)}const or=yt=>{if(!j.current)return;const{keyCode:bt,ctrlKey:Jt,metaKey:Sr,target:Dr,type:hn}=yt;return(hn==="paste"||(bt===67||bt===86)&&(Sr||Jt))&&Dr.nodeName==="TEXTAREA"&&($(),yt.preventDefault()),!1};function Kt(yt,bt){var Jt=window.URL||window.webkitURL||window,Sr=new Blob([bt]),Dr=document.createElementNS("http://www.w3.org/1999/xhtml","a");Dr.href=Jt.createObjectURL(Sr),Dr.download=yt,sr(Dr)}(0,y.useEffect)(()=>{zt()},[zt]),(0,y.useEffect)(()=>{T.current&&!X&&Promise.all([k.e(8909),k.e(5977)]).then(k.bind(k,71448)).then(yt=>{try{pt=yt,Q.current.instance=pt.editor.create(T.current,{value:ke,language:at(Ce),theme:nt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Lt||!1}},Ke);const bt=Q.current.instance;let Dr=[...N.BH._menuItems].find(lt=>lt[0]._debugName=="EditorContext")[1],hn=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Re=(lt,Ze)=>{var Dt,Wt;let cr=lt._first;do Ze.includes((Wt=(Dt=cr.element)==null?void 0:Dt.command)==null?void 0:Wt.id)&&lt._remove(cr);while(cr=cr.next)};if(vt(bt,pt),setTimeout(()=>{zt(),Q.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Kt(Pt||"educoder.txt",bt.getValue())}})},500),Q.current.subscription=bt.onDidChangeModelContent(lt=>{fe.current?clearTimeout(Ae.current):(zt(),Rt(bt.getValue(),lt)),Ae.current=setTimeout(()=>{fe.current=!1},500)}),window.Monaco||x(pt,at(Ce)),qe&&(Re(Dr,hn),T.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",or),window.removeEventListener("paste",or),window.addEventListener("keydown",or),window.addEventListener("paste",or)),window.Monaco=pt,te&&bt.onDidBlurEditorWidget(()=>{te(bt.getValue())}),_t&&bt.onDidFocusEditorText(()=>{qe&&At(),_t(bt.getValue())}),qe){At();try{bt.onDidPaste(lt=>{const Ze=bt.getSelection(),Dt=Q.current.pastePos||{},Wt=new pt.Range(Dt.startLineNumber||Ze.endLineNumber,Dt.startColumn||Ze.endColumn,Dt.endLineNumber||Ze.endLineNumber,Dt.endColumn||Ze.endColumn);bt.executeEdits("",[{range:lt.range,text:""}])})}catch(lt){}}let Je=Se();return ct&&typeof ct=="string"&&new O(ct,bt,pt),he(!0),()=>{const lt=Q.current.instance;lt.dispose();const Ze=lt.getModel();Ze&&Ze.dispose(),Q.current.subscription&&Q.current.subscription.dispose(),Je.unobserve(T.current)}}catch(bt){}})},[]),(0,y.useEffect)(()=>{if(Q.current.instance&&X)return document.addEventListener("keydown",$t,!1),()=>{document.removeEventListener("keydown",$t)}},[Ue,X]),(0,y.useEffect)(()=>{let yt=Q.current.instance;if(yt&&X){let bt=at(Ce);pt.editor.setModelLanguage(yt.getModel(),bt)}},[Ce,X]),(0,y.useEffect)(()=>{Q.current.instance&&X&&pt.editor.setTheme(nt)},[nt,X]),(0,y.useEffect)(()=>{let yt=Q.current.instance;C.current=Ne,yt&&X&&(yt.updateOptions(ae({},Ne)),setTimeout(()=>{yt.getModel().updateOptions(ae({},Ne))},200))},[JSON.stringify(Ne),X]),(0,y.useEffect)(()=>{let yt=Q.current.instance;yt&&X&&yt.layout()},[Me,mt,X]);const[ur,Zr]=(0,y.useState)(ye(Me)),[Tr,fr]=(0,y.useState)(ye(mt)),Ot=S(ae({},_e),{width:ur,height:Tr,position:"relative"});return y.createElement("div",{className:"my-monaco-editor",ref:T,style:Ot,onFocus:()=>{qe&&At()}},Ie&&y.createElement(Oe.CopyToClipboard,{text:ke,onCopy:()=>oe.ZP.success("\u590D\u5236\u6210\u529F")},y.createElement(ve.Z,{title:"\u590D\u5236\u4EE3\u7801"},y.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},y.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function jt({width:tt="100%",height:Ft="100%",original:Me,modified:mt,language:ke,options:Ce={}}){const _e=(0,y.useRef)(),[Ne,Ke]=(0,y.useState)(null);function nt(ze){let qe;return _e.current&&(qe=new Ee.Z(gt=>{for(let Rt of gt)(Rt.target.offsetHeight>0||Rt.target.offsetWidth>0)&&ze.layout()}),qe.observe(_e.current)),qe}(0,y.useEffect)(()=>(_e.current&&Promise.all([k.e(8909),k.e(9404)]).then(k.bind(k,2550)).then(ze=>{pt=ze;const qe=pt.editor.createDiffEditor(_e.current,S(ae({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},Ce),{wordWrap:!0}));Ke(qe);let gt=nt(qe);return()=>{qe.dispose();const Rt=qe.getModel();Rt&&Rt.dispose(),gt.unobserve(_e.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,y.useEffect)(()=>{Ne&&Ne.setModel({original:pt.editor.createModel(Me,ke),modified:pt.editor.createModel(mt,ke)})},[Me,mt,ke,Ne]);const te=ye(tt),Ie=ye(Ft),Ue={width:te,height:Ie};return y.createElement("div",{className:"my-diff-editor",ref:_e,style:Ue})}},94791:function(Vt,it,k){"use strict";k.r(it),k.d(it,{default:function(){return ae}});var y=k(59301),Ee=k(77019),ie=k(5269),be=k(4875),J=k(28284),v=k(458),de=k(7939),ce=k(25399),l=k(62957),V=k(29787),B=k(6767),E=k(37568),L=k(44283),x={bg:"bg___YVx48",title:"title___NM3xC",textOverflow:"textOverflow___gz3GM",wrap:"wrap___if0Ln",infoTitle:"infoTitle___dk7YF",infoValue:"infoValue___kBWqL",itemTitle:"itemTitle___WP88A",circle:"circle___Rq79V",warnText:"warnText___cpZS0",greyText:"greyText___erT_A",linkText:"linkText___YWy1z",whiteList:"whiteList___NvpGC",num:"num___Dq7FU",fixBottom:"fixBottom___WHsNA",backBtn:"backBtn___swiNH",enterBtn:"enterBtn___pk16U",secureInput:"secureInput___D361C"},P=k(84849),q=k(42075),H=k(76406),U=k(66649),A=k.n(U),z=k(49317),O=k(15277),N=k(73331),oe=k(63392),ve=k(35883),pe=Object.defineProperty,De=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,st=(S,w,K)=>w in S?pe(S,w,{enumerable:!0,configurable:!0,writable:!0,value:K}):S[w]=K,re=(S,w)=>{for(var K in w||(w={}))Oe.call(w,K)&&st(S,K,w[K]);if(De)for(var K of De(w))Fe.call(w,K)&&st(S,K,w[K]);return S},W=(S,w,K)=>new Promise((ye,Be)=>{var He=pt=>{try{at(K.next(pt))}catch(At){Be(At)}},ot=pt=>{try{at(K.throw(pt))}catch(At){Be(At)}},at=pt=>pt.done?ye(pt.value):Promise.resolve(pt.value).then(He,ot);at((K=K.apply(S,w)).next())});const ee=({title:S,content:w})=>y.createElement("div",{className:"mb20"},y.createElement(Ee.Z,{align:"middle",style:{marginBottom:12}},y.createElement(ie.Z,{flex:"20px"},y.createElement("div",{className:x.circle})),y.createElement(ie.Z,null,y.createElement("div",null,S))),y.createElement(Ee.Z,{className:"pl20"},w)),ue=({value:S,onChange:w,MaxMinutes:K})=>y.createElement(y.Fragment,null,y.createElement("div",{className:"p10 mb20",style:{background:"#F6F7F9"}},"1.\u53EA\u6709\u5F53\u8003\u8BD5\u622A\u6B62\u65F6\u95F4\u665A\u4E8E\u5B66\u751F\u7684\u4EA4\u5377\u622A\u6B62\u65F6\u95F4\u65F6\uFF0C\u624D\u652F\u6301\u5BF9\u5B66\u751F\u8FDB\u884C\u5EF6\u65F6\u64CD\u4F5C\uFF1B",y.createElement("br",null),"2.\u6BCF\u4E2A\u5B66\u751F\u7684\u6700\u5927\u53EF\u5EF6\u65F6\u65F6\u95F4=\u8003\u8BD5\u622A\u6B62\u65F6\u95F4-\u5B66\u751F\u5F53\u524D\u7684\u4EA4\u5377\u622A\u6B62\u65F6\u95F4\u3002",y.createElement("br",null)),y.createElement(be.Z,{value:S,min:0,precision:0,max:K,style:{width:"100%"},placeholder:`\u6700\u5927\u53EF\u5EF6\u957F\u65F6\u95F4\u4E3A${K}\u5206\u949F\uFF0C\u5728\u5B66\u751F\u5269\u4F59\u65F6\u95F4\u57FA\u7840\u4E0A\u5EF6\u65F6`,addonAfter:"\u5206\u949F",onChange:w}));console.log("---",performance.navigation.type);const ne=({user:S,dispatch:w,globalSetting:K})=>{const ye=(0,L.useParams)(),[Be]=(0,L.useSearchParams)(),[He,ot]=(0,y.useState)(),[at,pt]=(0,y.useState)(!1),[At,ut]=(0,y.useState)(!1),[jt,tt]=(0,y.useState)(!1),[Ft,Me]=(0,y.useState)(!1),[mt]=J.default.useForm(),ke=J.default.useWatch("time",mt),Ce=(0,y.useMemo)(()=>new WebSocket("ws://localhost:8082"),[]),[,_e,Ne,Ke]=(0,oe.U)(P.n7,{id:ye.categoryId,user_id:ye.login});(0,y.useEffect)(()=>{Be.get("isShowApply")==="true"&&tt(!0)},[Be.get("isShowApply")]),(0,y.useEffect)(()=>(w({type:"globalSetting/headerFooterToggle",payload:!1}),()=>{w({type:"globalSetting/headerFooterToggle",payload:!0})}),[]),(0,y.useEffect)(()=>{W(void 0,null,function*(){pt(!0);const sr=yield(0,P.Cd)(ye);pt(!1),sr.status||ot(sr)})},[]);const{exercise_name:nt,exercise_type:te,user_simulate_num:Ie,simulate_exercise_num:Ue,time:ze,student_id:qe,screen_open:gt,screen_num:Rt,screen_sec:vt,real_name:_t,id:St,open_camera:Nt,inner_ip:Pt,public_ip:Ct,ip_limit:Ge,ip_bind:Tt,ip_bind_type:Et,open_phone_video_recording:ct,identity_verify:Lt,user_permission:_,total_score:T,question_type_count:Q,question_count:C,screen_shot_open:G,screen_total_num:Xe,screen_used_num:fe,end_time:Ae,user_end_time:Pe,only_on_client:j,forbid_screen:X,use_white_list:he,white_list:Se=[],exercise_description:$,forbid_virtual:Qe}=(He==null?void 0:He.exercise)||{},le=Ke!=null&&Ke.user_end_time?A()(Ke==null?void 0:Ke.user_end_time).add(1,"minutes"):A()(),It=A()(Ke==null?void 0:Ke.user_total_end_time)>le?Math.round(A().duration(A()(Ke==null?void 0:Ke.user_total_end_time).diff(le.startOf("minute"))).asMinutes()):0,$t=((Ke==null?void 0:Ke.student_left_minutes)||0)+(ke||0);(0,y.useEffect)(()=>{W(void 0,null,function*(){fe>Xe&&(yield Ne({}))})},[fe,Xe]);const zt=()=>{const sr=Ue-Ie;return sr>=0?sr:0};return y.createElement("div",{className:x.bg},y.createElement("div",{className:"edu-container"},y.createElement("div",{className:"pt30"}),y.createElement("div",{className:x.wrap},y.createElement(v.Z,{loading:at,active:!0,className:"mt20"},y.createElement("div",{className:x.title},nt),y.createElement(Ee.Z,{justify:"center",gutter:30,className:"mb20"},y.createElement(ie.Z,null,y.createElement("span",{className:x.infoTitle},"\u5927\u9898\u6570"),y.createElement("span",{className:x.infoValue},Q)),y.createElement(ie.Z,null,y.createElement("span",{className:x.infoTitle},"\u5C0F\u9898\u6570"),y.createElement("span",{className:x.infoValue},C)),y.createElement(ie.Z,null,y.createElement("span",{className:x.infoTitle},"\u6EE1\u5206"),y.createElement("span",{className:x.infoValue},T,"\u5206")),y.createElement(ie.Z,null,y.createElement("span",{className:x.infoTitle},"\u8003\u8BD5\u65F6\u957F"),y.createElement("span",{className:x.infoValue},ze===-1?"\u4E0D\u9650\u65F6\u957F":`${ze}\u5206\u949F`))),y.createElement(Ee.Z,{className:"mb20",align:"middle"},y.createElement(ie.Z,{flex:"20px"},y.createElement("i",{className:"iconfont icon-dangqiankaoshengxinxi font14",style:{color:"#3061D0"}})),y.createElement(ie.Z,null,y.createElement("div",{className:x.itemTitle},"\u5F53\u524D\u8003\u751F\u4FE1\u606F"))),y.createElement(Ee.Z,{className:"mb30 pl20"},y.createElement(ie.Z,{flex:"190px",className:`mr20 ${x.textOverflow}`},y.createElement("span",{className:x.infoTitle},"\u59D3\u540D"),y.createElement("span",{title:_t},_t)),y.createElement(ie.Z,null,y.createElement("span",{className:x.infoTitle},"\u5B66\u53F7"),y.createElement("span",null,qe||"--"))),y.createElement(Ee.Z,{className:"mb20",align:"middle"},y.createElement(ie.Z,{flex:"20px"},y.createElement("i",{className:"iconfont icon-chengxinkaoshishengming font14",style:{color:"#3061D0"}})),y.createElement(ie.Z,null,y.createElement("div",{className:x.itemTitle},"\u8BDA\u4FE1\u8003\u8BD5\u58F0\u660E"))),y.createElement("div",{className:"mb30 pl20"},y.createElement("p",null,"1.\u8003\u751F\u5728\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u5E94\u81EA\u89C9\u9075\u5B88\u8003\u8BD5\u7EAA\u5F8B\uFF0C\u8BDA\u4FE1\u5E94\u8003\uFF0C\u62D2\u7EDD\u4F5C\u5F0A\u884C\u4E3A\uFF0C\u4FDD\u6301\u826F\u597D\u8003\u8BD5\u79E9\u5E8F\u3002\u5B9E\u65BD\u4F5C\u5F0A\u884C\u4E3A\u4E00\u7ECF\u53D1\u73B0\uFF0C\u5C06\u6309\u8003\u8BD5\u7BA1\u7406\u529E\u6CD5\u4E25\u8083\u5904\u7406\uFF0C\u56E0\u4F5C\u5F0A\u4EA7\u751F\u7684\u4E00\u5207\u540E\u679C\u81EA\u8D1F\u3002"),y.createElement("p",{style:{color:"red"}},"2.\u82E5\u8003\u8BD5\u671F\u95F4\u9047\u5230\u95EE\u9898\uFF0C\u8BF7\u53CA\u65F6\u8DDF\u76D1\u8003\u8001\u5E08\u6C9F\u901A\u89E3\u51B3\uFF0C\u8003\u8BD5\u7ED3\u675F\u4E4B\u540E\u518D\u63D0\u51FA\u95EE\u9898\u89C6\u4E3A\u65E0\u6548\u3002"),y.createElement("p",{style:{color:"red"}},"3.\u5728\u5B8C\u6210\u5B9E\u8BAD\u9898\u3001\u7F16\u7A0B\u9898\u6216\u7A0B\u5E8F\u586B\u7A7A\u9898\u540E\uFF0C\u8BF7\u52A1\u5FC5\u786E\u8BA4\u60A8\u5728\u8003\u8BD5\u9875\u9762\u4E0A\u505C\u7559\u7684\u4EE3\u7801\u662F\u60A8\u6700\u7EC8\u60F3\u8981\u63D0\u4EA4\u7684\u7248\u672C\u3002")),$&&y.createElement(y.Fragment,null,y.createElement(Ee.Z,{className:"mb20",align:"middle"},y.createElement(ie.Z,{flex:"20px"},y.createElement("i",{className:"iconfont icon-kechengxuzhi font14",style:{color:"#3061D0"}})),y.createElement(ie.Z,null,y.createElement("div",{className:x.itemTitle},"\u8BD5\u5377\u987B\u77E5"))),y.createElement("div",{className:"mb30"},y.createElement(ve.Z,{style:{fontSize:14,color:"#333",paddingLeft:"20px"},value:$}))),(Nt||gt||ct||Ge!=="no"||Lt)&&y.createElement(Ee.Z,{className:"mb20",align:"middle"},y.createElement(ie.Z,{flex:"20px"},y.createElement("i",{className:"iconfont icon-yikaiqifangzuobimoshi font14",style:{color:"#3061D0"}})),y.createElement(ie.Z,null,y.createElement("div",{className:x.itemTitle},"\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u6A21\u5F0F"))),Lt&&y.createElement(ee,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u524D\u4EBA\u8138\u8EAB\u4EFD\u6838\u9A8C",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"\u8FDB\u5165\u8003\u8BD5\u524D\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u9700\u91C7\u96C6\u7167\u7247\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u901A\u8FC7\u5E76\u5F00\u542F\u624B\u673A\u5F55\u5236\u624D\u53EF\u4EE5\u8FDB\u5165\u8003\u8BD5\u3002"),y.createElement("span",{className:x.linkText,onClick:()=>(0,H.xg)("https://www.educoder.net/forums/4459")},"\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934?"))}),ct&&y.createElement(ee,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u4E2D\u624B\u673A\u89C6\u9891\u5F55\u5236",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u6253\u5F00\u6444\u50CF\u5934\u65B9\u53EF\u4F5C\u7B54\uFF01"),y.createElement("span",{className:x.linkText,onClick:()=>(0,H.xg)("https://www.educoder.net/forums/4459")},"\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934?"))}),Nt&&y.createElement(ee,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u4E2D\u62CD\u7167\u76D1\u63A7",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u6253\u5F00\u6444\u50CF\u5934\u65B9\u53EF\u4F5C\u7B54\uFF01"),y.createElement("span",{className:x.linkText,onClick:()=>(0,H.xg)("https://www.educoder.net/forums/4459")},"\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934?"))}),gt&&y.createElement(ee,{title:"\u5DF2\u5F00\u542F\u5207\u5C4F\u540E\u5F3A\u5236\u4EA4\u5377",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"\u5207\u5C4F\u8D85\u8FC7",y.createElement("span",{className:x.num},Rt),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377\uFF0C\u5207\u6362\u5230\u5176\u4ED6\u9875\u9762",y.createElement("span",{className:x.num},vt),"\u79D2\u540E\u5373\u5224\u5B9A\u4E3A\u4E00\u6B21\u5207\u5C4F\uFF0C",y.createElement("span",{className:x.num},vt*2),"\u79D2\u5219\u5224\u5B9A\u4E3A",y.createElement("span",{className:x.num},"2"),"\u6B21\u5207\u5C4F\uFF0C\u4EE5\u6B64\u7C7B\u63A8\uFF1B\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u8BF7\u52FF\u5207\u6362\u5230\u5176\u4ED6\u9875\u9762\u6216\u9000\u51FA\u5168\u5C4F\u3002"),y.createElement("span",{className:x.linkText,onClick:()=>(0,H.xg)("https://www.educoder.net/forums/4460")},"\u6D4F\u89C8\u5668\u65E0\u6CD5\u81EA\u52A8\u5168\u5C4F\uFF1F"))}),G&&y.createElement(ee,{title:"\u5DF2\u5F00\u542F\u9000\u51FA\u5168\u5C4F\u6216\u5207\u6362\u9875\u9762\u540E\u81EA\u52A8\u622A\u5C4F",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"\u8001\u5E08\u5DF2\u5F00\u542F\u9000\u51FA\u5168\u5C4F\u6216\u5207\u6362\u9875\u9762\u540E\u81EA\u52A8\u622A\u5C4F\uFF0C\u8003\u751F\u8FDB\u5165\u8003\u8BD5\u4E4B\u540E\u9700\u8981\u9009\u62E9\u4E3B\u5C4F\u5E55\u8FDB\u884C\u5171\u4EAB\uFF0C\u8003\u8BD5\u4F5C\u7B54\u8FC7\u7A0B\u4E2D\u4E5F\u4E0D\u5141\u8BB8\u5173\u95ED\u5C4F\u5E55\u5171\u4EAB\uFF0C\u5426\u5219\u5C06\u4F1A\u76F4\u63A5\u9000\u51FA\u8003\u8BD5\u3002"))}),Ge!=="no"&&y.createElement(ee,{title:"\u5DF2\u5F00\u542FIP\u8303\u56F4\u9650\u5B9A",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"IP\u5730\u5740\u4E0D\u5728\u8303\u56F4\u5185\u4E0D\u53EF\u53C2\u52A0\u8003\u8BD5\u3002"),y.createElement("span",{className:x.warnText},"\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"),y.createElement("div",null,y.createElement("span",{className:x.linkText,onClick:()=>(0,H.xg)("https://www.educoder.net/forums/4478")},"\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))}),Tt&&y.createElement(ee,{title:"\u5DF2\u5F00\u542F\u8003\u8BD5\u671F\u95F4IP\u7ED1\u5B9A",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"\u5F53\u60A8\u5F00\u59CB\u8003\u8BD5\u540E\uFF0C\u5C06\u81EA\u52A8\u7ED1\u5B9AIP\uFF0C\u8003\u8BD5\u671F\u95F4\u53EA\u5141\u8BB8\u4F7F\u7528\u552F\u4E00\u7684IP\u8FDB\u5165\u8003\u8BD5\u3002\u5982\u9047\u7279\u6B8A\u60C5\u51B5\uFF0C\u53EF\u5411\u8001\u5E08\u7533\u8BF7\u89E3\u9664IP\u7ED1\u5B9A\u3002"),y.createElement("span",{className:x.warnText},"\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"),y.createElement("div",null,y.createElement("span",{className:x.linkText,onClick:()=>(0,H.xg)("https://www.educoder.net/forums/4478")},"\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))}),(X||he)&&(0,H.WX)()&&y.createElement(y.Fragment,null,y.createElement(Ee.Z,{className:"mb20",align:"middle"},y.createElement(ie.Z,{flex:"20px"},y.createElement("i",{className:"iconfont icon-tishi11 font14",style:{color:"#3061D0"}})),y.createElement(ie.Z,null,y.createElement("div",{className:x.itemTitle},"\u6CE8\u610F\u4E8B\u9879"))),X&&y.createElement(ee,{title:"\u672C\u6B21\u8003\u8BD5\u5DF2\u8BBE\u7F6E\u7981\u6B62\u5207\u5C4F",content:y.createElement("div",null,y.createElement("span",{className:x.greyText},"\u4E00\u65E6\u8FDB\u5165\u8003\u8BD5\u7B54\u9898\u9875\u9762\uFF0C\u4E0D\u53EF\u5207\u5C4F\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5982\u9700\u8981\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C"),y.createElement("span",{className:x.linkText,style:{cursor:"default"}},"\u8BF7\u8054\u7CFB\u76D1\u8003\u8001\u5E08/\u8BD5\u5377\u53D1\u5E03\u8005\u586B\u5199\u89E3\u9664\u5207\u5C4F\u7801\u3002"))}),he&&y.createElement(ee,{title:"\u672C\u6B21\u8003\u8BD5\u5DF2\u7ECF\u8BBE\u7F6E\u6253\u5F00\u767D\u540D\u5355\u7A0B\u5E8F\u9650\u5236",content:y.createElement("div",null,y.createElement("div",{className:x.greyText},"\u8FDB\u5165\u8003\u8BD5\u524D\u8BF7\u5148\u5173\u95ED\u975E\u767D\u540D\u5355\u7A0B\u5E8F\uFF0C\u5426\u5219\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u5173\u95ED\u975E",y.createElement("span",{style:{cursor:"default"},className:x.linkText},"\u767D\u540D\u5355"),"\u7A0B\u5E8F\uFF0C\u53EF\u6253\u5F00\u7684\u767D\u540D\u5355\u7A0B\u5E8F\u5982\u4E0B\uFF1A"),y.createElement("div",{className:x.whiteList},Se==null?void 0:Se.map(sr=>y.createElement("div",null,sr))))})),j&&!(0,H.WX)()&&y.createElement("div",{className:"ml20",style:{color:"#E53333"}},y.createElement("i",{className:"iconfont icon-tishi11 font14 mr5"}),"\u672C\u6B21\u8003\u8BD5\u8BBE\u7F6E\u4E3A\u5BA2\u6237\u7AEF\u6A21\u5F0F\uFF0C\u4E0D\u53EF\u5728\u7F51\u9875\u7AEF\u8FDB\u884C\u8003\u8BD5\u7B54\u9898\uFF0C\u8BF7\u8FDB\u5165\u5BA2\u6237\u7AEF\u8FDB\u884C\u8003\u8BD5",y.createElement("a",{onClick:()=>{window.open("/download")}},"\u3010\u4E0B\u8F7D\u5BA2\u6237\u7AEF\u3011")),y.createElement("div",{className:x.fixBottom},y.createElement(de.ZP,{className:x.backBtn,onClick:()=>{if(Be.get("isShowApply")==="true"){L.history.push(`/classrooms/${ye.coursesId}/exercise/${ye.categoryId}/detail?random=true`);return}L.history.back()}},"\u8FD4\u56DE\u8003\u8BD5\u5217\u8868"),(!j||(0,H.WX)())&&y.createElement(ce.Z,{title:te===2&&y.createElement("span",null,"\u672C\u6B21\u8003\u8BD5\u53EF\u91CD\u590D\u8003\u8BD5",Ue,"\u6B21\uFF0C\u5269\u4F59",zt(),"\u6B21")},y.createElement(q.Z,{type:"primary",className:`${x.enterBtn} ml20`,onClick:()=>W(void 0,null,function*(){var sr;if((X||gt)&&(0,H.WX)()&&localStorage.screenNums>1){l.default.info({title:"\u63D0\u793A",icon:null,centered:!0,content:`\u5F53\u524D\u8003\u8BD5\u5F00\u542F\u4E86\u9632\u5207\u5C4F\u6A21\u5F0F\uFF0C\u7CFB\u7EDF\u68C0\u6D4B\u5230\u60A8\u7684\u7535\u8111\u6709${localStorage.screenNums}\u4E2A\u663E\u793A\u5668\uFF0C\u8BF7\u5148\u79FB\u9664\u6389\u5176\u5B83\u7684\u663E\u793A\u5668\u8BBE\u5907\uFF01`,okText:"\u6211\u77E5\u9053\u4E86"});return}if(Qe&&!(0,H.WX)()){l.default.info({title:"\u63D0\u793A",icon:null,centered:!0,content:"\u8BF7\u4F7F\u7528\u5BA2\u6237\u7AEF\u4F5C\u7B54",okText:"\u6211\u77E5\u9053\u4E86"});return}if(!(Qe&&(0,H.WX)()&&(Ce.send(JSON.stringify({type:"check-virtual-machine"})),(yield new Promise((Kt,ur)=>{Ce.onmessage=Zr=>{var Tr,fr;let Ot=JSON.parse(Zr.data);if((Ot==null?void 0:Ot.type)==="check-virtual-machine")switch((Tr=Ot==null?void 0:Ot.data)==null?void 0:Tr.value){case"1":l.default.info({title:"\u63D0\u793A",icon:null,centered:!0,content:"\u68C0\u6D4B\u5230\u60A8\u5F53\u524D\u6B63\u5728\u4F7F\u7528\u865A\u62DF\u673A\u6A21\u5F0F\u53C2\u52A0\u8003\u8BD5\uFF0C\u4E3A\u786E\u4FDD\u8003\u8BD5\u516C\u5E73\u6027\u4E0E\u7CFB\u7EDF\u7A33\u5B9A\u6027\uFF0C\u7981\u6B62\u5728\u865A\u62DF\u673A\u73AF\u5883\u4E2D\u8FDB\u884C\u7B54\u9898\u3002\u8BF7\u9000\u51FA\u865A\u62DF\u673A\uFF0C\u6539\u7528\u672C\u5730\u7535\u8111\u5BA2\u6237\u7AEF\u91CD\u65B0\u8FDB\u5165\u8003\u8BD5\u7CFB\u7EDF\u3002",okText:"\u6211\u77E5\u9053\u4E86"}),ur();break;case"2":l.default.info({content:(fr=Ot==null?void 0:Ot.data)==null?void 0:fr.message}),ur();break;case"0":Kt("0");break}}}))!=="0"))){if(fe>Xe){tt(!0);return}localStorage.removeItem("Refresh"),yield(0,H.nr)({inner_ip:Pt,public_ip:Ct,open_camera:Nt,ip_limit:Ge,ip_bind:Tt,ip_bind_type:Et,exercise_tips:[""],exerciseId:St,screen_open:gt,forbid_screen:X,screen_num:Rt,screen_sec:vt,coursesId:ye.coursesId,login:(sr=S.userInfo)==null?void 0:sr.login,history:L.history,identity_verify:Lt,open_phone_video_recording:ct,current_status:_,unlockClose:!0})}})},fe>Xe?"\u7ACB\u5373\u7533\u8BF7\u7EE7\u7EED\u8003\u8BD5":"\u6211\u5DF2\u9605\u8BFB\uFF0C\u8FDB\u5165\u8003\u8BD5"," ")))))),y.createElement(l.default,{centered:!0,title:"\u7533\u8BF7\u7EE7\u7EED\u8003\u8BD5",open:jt,onCancel:()=>{tt(!1)},onOk:()=>{mt.submit()},confirmLoading:At},y.createElement(V.Z,{spinning:at||_e},y.createElement(J.default,{layout:"vertical",size:"large",form:mt,onFinish:sr=>W(void 0,null,function*(){var or;let Kt=null;if(ut(!0),Kt=yield(0,z.ZP)(`/api/exercises/${ye==null?void 0:ye.categoryId}/check_key.json`,{method:"post",body:re({},sr)}),(Kt==null?void 0:Kt.status)==-1){mt.setFields([{name:"unlock_key",errors:[Kt==null?void 0:Kt.message]}]),ut(!1);return}Kt=yield(0,z.ZP)(`/api/exercises/${ye==null?void 0:ye.categoryId}/continue_exercise.json`,{method:"post",body:re({},sr)}),(Kt==null?void 0:Kt.status)===0&&(localStorage.removeItem("Refresh"),B.ZP.success("\u64CD\u4F5C\u6210\u529F\uFF01"),yield(0,H.nr)({inner_ip:Pt,public_ip:Ct,open_camera:Nt,ip_limit:Ge,ip_bind:Tt,ip_bind_type:Et,exercise_tips:[""],exerciseId:St,screen_open:gt,screen_num:Rt,screen_sec:vt,forbid_screen:X,coursesId:ye.coursesId,login:(or=S.userInfo)==null?void 0:or.login,history:L.history,identity_verify:Lt,open_phone_video_recording:ct,current_status:_,unlockClose:!0})),ut(!1)})},y.createElement(J.default.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801"}],name:"unlock_key",label:"\u7EE7\u7EED\u8003\u8BD5\u9700\u8981\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801\uFF08\u76D1\u8003\u8001\u5E08\u63D0\u4F9B\uFF09"},y.createElement(E.default,{autoComplete:"off",className:Ft?"":x.secureInput,suffix:y.createElement("span",{className:"current",onClick:()=>Me(!Ft)},Ft?y.createElement(O.Z,null):y.createElement(N.Z,null)),placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u89E3\u9501\u7801"})),ze!==-1?y.createElement(y.Fragment,null,y.createElement(J.default.Item,{name:"time",label:y.createElement("span",null,"\u5EF6\u957F\u65F6\u95F4\uFF08",y.createElement("span",{style:{color:"#9096A3"}},"\u5F53\u524D\u8003\u8BD5\u622A\u6B62\u65F6\u95F4",A()(Ke==null?void 0:Ke.user_total_end_time).format("YYYY-MM-DD HH:mm")),"\uFF09")},y.createElement(ue,{MaxMinutes:It})),y.createElement("div",{className:"mb20",style:{color:"#FA6400"}},"\u8BE5\u5B66\u751F\u5269\u4F59\u8003\u8BD5\u65F6\u95F4\uFF1A",y.createElement("span",{className:"ml5"},$t),"\u5206\u949F",$t!==0&&(Ke==null?void 0:Ke.user_end_time)&&y.createElement("span",null,"\uFF0C\u4EA4\u5377\u622A\u6B62\u65F6\u95F4\uFF1A",y.createElement("span",{className:"ml5"},A()(Ke==null?void 0:Ke.user_end_time).add(ke||0,"m").format("YYYY-MM-DD HH:mm:ss"))))):y.createElement("span",{style:{color:"#F6A53B"}}," \u5F53\u524D\u8003\u8BD5\u672A\u9650\u5236\u8003\u751F\u7B54\u9898\u65F6\u957F\uFF0C\u8003\u8BD5\u622A\u6B62\u65F6\u95F4\u4E3A ",A()(Ae).format("YYYY-MM-DD HH:mm"))))))};var ae=(0,L.connect)(({user:S,globalSetting:w})=>({globalSetting:w,user:S}))(ne)},63392:function(Vt,it,k){"use strict";k.d(it,{U:function(){return l}});var y=k(59301),Ee=Object.defineProperty,ie=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,v=(V,B,E)=>B in V?Ee(V,B,{enumerable:!0,configurable:!0,writable:!0,value:E}):V[B]=E,de=(V,B)=>{for(var E in B||(B={}))be.call(B,E)&&v(V,E,B[E]);if(ie)for(var E of ie(B))J.call(B,E)&&v(V,E,B[E]);return V},ce=(V,B,E)=>new Promise((L,x)=>{var P=U=>{try{H(E.next(U))}catch(A){x(A)}},q=U=>{try{H(E.throw(U))}catch(A){x(A)}},H=U=>U.done?L(U.value):Promise.resolve(U.value).then(P,q);H((E=E.apply(V,B)).next())});function l(V,B){const[E,L]=(0,y.useState)(B),[x,P]=(0,y.useState)(!1),[q,H]=(0,y.useState)();return[E,x,(A,z=!1)=>ce(this,null,function*(){const O=z?B:de(de({},E),A);P(!0),L(O);const N=yield V(O);return P(!1),H(N),N}),q,H]}},20047:function(Vt,it,k){"use strict";k.d(it,{AL:function(){return O},Iy:function(){return B},Qv:function(){return x},ez:function(){return z},jb:function(){return E}});var y=k(32834),Ee=k.n(y),ie=k(11690),be=k.n(ie);let J=1;function v(De,Oe){const Fe=De.match(/^(\s+)(?:```)/);if(Fe===null)return Oe;const st=Fe[1];return Oe.split(`
`).map(re=>{const W=re.match(/^\s+/);if(W===null)return re;const[ee]=W;return ee.length>=st.length?re.slice(st.length):re}).join(`
`)}let de=[],ce=["<ul>"];const l=new(Ee()).Renderer,V=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function B(){de.length=0,ce=["<ul>"]}const E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function L(De,Oe,Fe,st){if(Oe>=De.length||De[Oe].level<=Fe)return Oe;var re=De[Oe];st.push("<li><a href='#"+J+re.anchor+"'>"+re.text+"</a>"),Oe++;var W=[];return Oe=L(De,Oe,re.level,W),W.length>0&&(st.push("<ul>"),W.forEach(function(ee){st.push(ee)}),st.push("</ul>")),st.push("</li>"),Oe=L(De,Oe,Fe,st),Oe}function x(){return L(de,0,0,ce),ce.push("</ul>"),ce.join("")}const P={heading(De){const Oe=V.exec(De);if(J+=1,Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},fences(De){const Oe=this.rules.block.fences.exec(De);if(Oe){const Fe=Oe[0];let st=v(Fe,Oe[3]||"");const re=Oe[2]?Oe[2].trim():Oe[2];if(["latex","katex","math"].indexOf(re)>=0){const W=U(),ee=st;st=W,A[W]={type:"block",expression:ee}}return{type:"code",raw:Fe,lang:re,text:st}}}},q=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let H=0;const U=()=>`__special_katext_id_${H++}__`;let A={};function z(){return A}function O(){H=0,A={}}function N(De){return De=De.replace(q,(Oe,Fe)=>{const st=U();return A[st]={type:"inline",expression:Fe},st}),De}const oe=l.listitem;l.listitem=function(De){return oe(N(De))};const ve=l.paragraph;l.paragraph=function(De){return ve(N(De))};const pe=l.tablecell;l.tablecell=function(De,Oe){return pe(N(De),Oe)},l.code=function(De,Oe,Fe){const st=(Oe||"").match(/\S*/)[0];return st?["latex","katex","math"].indexOf(st)>=0?`<p class='editormd-tex'>${De}</p>`:`<pre class="prettyprint linenums"><code class="language-${Oe}">${Fe?De:(0,ie.escape)(De,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Fe?De:(0,ie.escape)(De,!0))+"</code></pre>"},l.heading=function(De,Oe,Fe){let st=this.options.headerPrefix+Fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return de.push({anchor:st,level:Oe,text:De}),"<h"+Oe+' id="'+J+st+'">'+De+"</h"+Oe+">"},Ee().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ee().use({tokenizer:P,renderer:l}),it.ZP=Ee()},29509:function(Vt,it,k){"use strict";k.d(it,{o2:function(){return J},yT:function(){return v}});var y=k(77654),Ee=k(34998);const ie=Ee.i.map(de=>`${de}-inverse`),be=["success","processing","error","default","warning"];function J(de){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,y.Z)(ie),(0,y.Z)(Ee.i)).includes(de):Ee.i.includes(de)}function v(de){return be.includes(de)}},99402:function(Vt,it,k){"use strict";k.d(it,{T:function(){return Ee},n:function(){return y}});function y(ie){return["small","middle","large"].includes(ie)}function Ee(ie){return ie?typeof ie=="number"&&!Number.isNaN(ie):!1}},86013:function(Vt,it,k){"use strict";var y=k(59301),Ee=k(19248);const ie=be=>{let J;return typeof be=="object"&&(be!=null&&be.clearIcon)?J=be:be&&(J={clearIcon:y.createElement(Ee.Z,null)}),J};it.Z=ie},52838:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return v}});var y=k(37645);function Ee(de,ce,l,V){if(V===!1)return{adjustX:!1,adjustY:!1};const B=V&&typeof V=="object"?V:{},E={};switch(de){case"top":case"bottom":E.shiftX=ce.arrowOffsetHorizontal*2+l,E.shiftY=!0,E.adjustY=!0;break;case"left":case"right":E.shiftY=ce.arrowOffsetVertical*2+l,E.shiftX=!0,E.adjustX=!0;break}const L=Object.assign(Object.assign({},E),B);return L.shiftX||(L.adjustX=!0),L.shiftY||(L.adjustY=!0),L}const ie={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},be={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},J=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function v(de){const{arrowWidth:ce,autoAdjustOverflow:l,arrowPointAtCenter:V,offset:B,borderRadius:E,visibleFirst:L}=de,x=ce/2,P={};return Object.keys(ie).forEach(q=>{const H=V&&be[q]||ie[q],U=Object.assign(Object.assign({},H),{offset:[0,0],dynamicInset:!0});switch(P[q]=U,J.has(q)&&(U.autoArrow=!1),q){case"top":case"topLeft":case"topRight":U.offset[1]=-x-B;break;case"bottom":case"bottomLeft":case"bottomRight":U.offset[1]=x+B;break;case"left":case"leftTop":case"leftBottom":U.offset[0]=-x-B;break;case"right":case"rightTop":case"rightBottom":U.offset[0]=x+B;break}const A=(0,y.wZ)({contentRadius:E,limitVerticalRadius:!0});if(V)switch(q){case"topLeft":case"bottomLeft":U.offset[0]=-A.arrowOffsetHorizontal-x;break;case"topRight":case"bottomRight":U.offset[0]=A.arrowOffsetHorizontal+x;break;case"leftTop":case"rightTop":U.offset[1]=-A.arrowOffsetHorizontal*2+x;break;case"leftBottom":case"rightBottom":U.offset[1]=A.arrowOffsetHorizontal*2-x;break}U.overflow=Ee(q,A,ce,l),L&&(U.htmlRegion="visibleFirst")}),P}},82855:function(Vt,it,k){"use strict";k.d(it,{F:function(){return J},Z:function(){return be}});var y=k(92310),Ee=k.n(y);const ie=null;function be(v,de,ce){return Ee()({[`${v}-status-success`]:de==="success",[`${v}-status-warning`]:de==="warning",[`${v}-status-error`]:de==="error",[`${v}-status-validating`]:de==="validating",[`${v}-has-feedback`]:ce})}const J=(v,de)=>de||v},24971:function(Vt,it,k){"use strict";var y=k(59301),Ee=k(56553),ie=k(48755);const be=function(J,v){let de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var ce,l;const{variant:V,[J]:B}=y.useContext(ie.E_),E=y.useContext(Ee.pg),L=B==null?void 0:B.variant;let x;typeof v!="undefined"?x=v:de===!1?x="borderless":x=(l=(ce=E!=null?E:L)!==null&&ce!==void 0?ce:V)!==null&&l!==void 0?l:"outlined";const P=ie.tr.includes(x);return[x,P]};it.Z=be},28284:function(Vt,it,k){"use strict";k.d(it,{default:function(){return hn}});var y=k(56553),Ee=k(77654),ie=k(59301),be=k(92310),J=k.n(be),v=k(77900),de=k(86641),ce=k(83397);function l(Re){const[Je,lt]=ie.useState(Re);return ie.useEffect(()=>{const Ze=setTimeout(()=>{lt(Re)},Re.length?0:10);return()=>{clearTimeout(Ze)}},[Re]),Je}var V=k(36237),B=k(63356),E=k(34925),L=k(34961),x=k(51636),P=k(16931),H=Re=>{const{componentCls:Je}=Re,lt=`${Je}-show-help`,Ze=`${Je}-show-help-item`;return{[lt]:{transition:`opacity ${Re.motionDurationFast} ${Re.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Ze]:{overflow:"hidden",transition:`height ${Re.motionDurationFast} ${Re.motionEaseInOut},
opacity ${Re.motionDurationFast} ${Re.motionEaseInOut},
transform ${Re.motionDurationFast} ${Re.motionEaseInOut} !important`,[`&${Ze}-appear, &${Ze}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Ze}-leave-active`]:{transform:"translateY(-5px)"}}}}};const U=Re=>({legend:{display:"block",width:"100%",marginBottom:Re.marginLG,padding:0,color:Re.colorTextDescription,fontSize:Re.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,V.unit)(Re.lineWidth)} ${Re.lineType} ${Re.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${(0,V.unit)(Re.controlOutlineWidth)} ${Re.controlOutline}`},output:{display:"block",paddingTop:15,color:Re.colorText,fontSize:Re.fontSize,lineHeight:Re.lineHeight}}),A=(Re,Je)=>{const{formItemCls:lt}=Re;return{[lt]:{[`${lt}-label > label`]:{height:Je},[`${lt}-control-input`]:{minHeight:Je}}}},z=Re=>{const{componentCls:Je}=Re;return{[Re.componentCls]:Object.assign(Object.assign(Object.assign({},(0,B.Wf)(Re)),U(Re)),{[`${Je}-text`]:{display:"inline-block",paddingInlineEnd:Re.paddingSM},"&-small":Object.assign({},A(Re,Re.controlHeightSM)),"&-large":Object.assign({},A(Re,Re.controlHeightLG))})}},O=Re=>{const{formItemCls:Je,iconCls:lt,rootPrefixCls:Ze,antCls:Dt,labelRequiredMarkColor:Wt,labelColor:cr,labelFontSize:Ir,labelHeight:Zt,labelColonMarginInlineStart:qt,labelColonMarginInlineEnd:gr,itemMarginBottom:hr}=Re;return{[Je]:Object.assign(Object.assign({},(0,B.Wf)(Re)),{marginBottom:hr,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden${Dt}-row`]:{display:"none"},"&-has-warning":{[`${Je}-split`]:{color:Re.colorError}},"&-has-error":{[`${Je}-split`]:{color:Re.colorWarning}},[`${Je}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:Re.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Zt,color:cr,fontSize:Ir,[`> ${lt}`]:{fontSize:Re.fontSize,verticalAlign:"top"},[`&${Je}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:Re.marginXXS,color:Wt,fontSize:Re.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${Je}-required-mark-hidden, &${Je}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${Je}-optional`]:{display:"inline-block",marginInlineStart:Re.marginXXS,color:Re.colorTextDescription,[`&${Je}-required-mark-hidden`]:{display:"none"}},[`${Je}-tooltip`]:{color:Re.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Re.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:qt,marginInlineEnd:gr},[`&${Je}-no-colon::after`]:{content:'"\\a0"'}}},[`${Je}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Ze}-col-'"]):not([class*="' ${Ze}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Re.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Je]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:Re.colorTextDescription,fontSize:Re.fontSize,lineHeight:Re.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Re.controlHeightSM,transition:`color ${Re.motionDurationMid} ${Re.motionEaseOut}`},"&-explain":{"&-error":{color:Re.colorError},"&-warning":{color:Re.colorWarning}}},[`&-with-help ${Je}-explain`]:{height:"auto",opacity:1},[`${Je}-feedback-icon`]:{fontSize:Re.fontSize,textAlign:"center",visibility:"visible",animationName:E.kr,animationDuration:Re.motionDurationMid,animationTimingFunction:Re.motionEaseOutBack,pointerEvents:"none","&-success":{color:Re.colorSuccess},"&-error":{color:Re.colorError},"&-warning":{color:Re.colorWarning},"&-validating":{color:Re.colorPrimary}}})}},N=(Re,Je)=>{const{formItemCls:lt}=Re;return{[`${Je}-horizontal`]:{[`${lt}-label`]:{flexGrow:0},[`${lt}-control`]:{flex:"1 1 0",minWidth:0},[`${lt}-label[class$='-24'], ${lt}-label[class*='-24 ']`]:{[`& + ${lt}-control`]:{minWidth:"unset"}}}}},oe=Re=>{const{componentCls:Je,formItemCls:lt,inlineItemMarginBottom:Ze}=Re;return{[`${Je}-inline`]:{display:"flex",flexWrap:"wrap",[lt]:{flex:"none",marginInlineEnd:Re.margin,marginBottom:Ze,"&-row":{flexWrap:"nowrap"},[`> ${lt}-label,
> ${lt}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${lt}-label`]:{flex:"none"},[`${Je}-text`]:{display:"inline-block"},[`${lt}-has-feedback`]:{display:"inline-block"}}}}},ve=Re=>({padding:Re.verticalLabelPadding,margin:Re.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),pe=Re=>{const{componentCls:Je,formItemCls:lt,rootPrefixCls:Ze}=Re;return{[`${lt} ${lt}-label`]:ve(Re),[`${Je}:not(${Je}-inline)`]:{[lt]:{flexWrap:"wrap",[`${lt}-label, ${lt}-control`]:{[`&:not([class*=" ${Ze}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},De=Re=>{const{componentCls:Je,formItemCls:lt,antCls:Ze}=Re;return{[`${Je}-vertical`]:{[`${lt}:not(${lt}-horizontal)`]:{[`${lt}-row`]:{flexDirection:"column"},[`${lt}-label > label`]:{height:"auto"},[`${lt}-control`]:{width:"100%"},[`${lt}-label,
${Ze}-col-24${lt}-label,
${Ze}-col-xl-24${lt}-label`]:ve(Re)}},[`@media (max-width: ${(0,V.unit)(Re.screenXSMax)})`]:[pe(Re),{[Je]:{[`${lt}:not(${lt}-horizontal)`]:{[`${Ze}-col-xs-24${lt}-label`]:ve(Re)}}}],[`@media (max-width: ${(0,V.unit)(Re.screenSMMax)})`]:{[Je]:{[`${lt}:not(${lt}-horizontal)`]:{[`${Ze}-col-sm-24${lt}-label`]:ve(Re)}}},[`@media (max-width: ${(0,V.unit)(Re.screenMDMax)})`]:{[Je]:{[`${lt}:not(${lt}-horizontal)`]:{[`${Ze}-col-md-24${lt}-label`]:ve(Re)}}},[`@media (max-width: ${(0,V.unit)(Re.screenLGMax)})`]:{[Je]:{[`${lt}:not(${lt}-horizontal)`]:{[`${Ze}-col-lg-24${lt}-label`]:ve(Re)}}}}},Oe=Re=>{const{formItemCls:Je,antCls:lt}=Re;return{[`${Je}-vertical`]:{[`${Je}-row`]:{flexDirection:"column"},[`${Je}-label > label`]:{height:"auto"},[`${Je}-control`]:{width:"100%"}},[`${Je}-vertical ${Je}-label,
${lt}-col-24${Je}-label,
${lt}-col-xl-24${Je}-label`]:ve(Re),[`@media (max-width: ${(0,V.unit)(Re.screenXSMax)})`]:[pe(Re),{[Je]:{[`${lt}-col-xs-24${Je}-label`]:ve(Re)}}],[`@media (max-width: ${(0,V.unit)(Re.screenSMMax)})`]:{[Je]:{[`${lt}-col-sm-24${Je}-label`]:ve(Re)}},[`@media (max-width: ${(0,V.unit)(Re.screenMDMax)})`]:{[Je]:{[`${lt}-col-md-24${Je}-label`]:ve(Re)}},[`@media (max-width: ${(0,V.unit)(Re.screenLGMax)})`]:{[Je]:{[`${lt}-col-lg-24${Je}-label`]:ve(Re)}}}},Fe=Re=>({labelRequiredMarkColor:Re.colorError,labelColor:Re.colorTextHeading,labelFontSize:Re.fontSize,labelHeight:Re.controlHeight,labelColonMarginInlineStart:Re.marginXXS/2,labelColonMarginInlineEnd:Re.marginXS,itemMarginBottom:Re.marginLG,verticalLabelPadding:`0 0 ${Re.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),st=(Re,Je)=>(0,x.mergeToken)(Re,{formItemCls:`${Re.componentCls}-item`,rootPrefixCls:Je});var re=(0,P.I$)("Form",(Re,Je)=>{let{rootPrefixCls:lt}=Je;const Ze=st(Re,lt);return[z(Ze),O(Ze),H(Ze),N(Ze,Ze.componentCls),N(Ze,Ze.formItemCls),oe(Ze),De(Ze),Oe(Ze),(0,L.Z)(Ze),E.kr]},Fe,{order:-1e3});const W=[];function ee(Re,Je,lt){let Ze=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Re=="string"?Re:`${Je}-${Ze}`,error:Re,errorStatus:lt}}var ne=Re=>{let{help:Je,helpStatus:lt,errors:Ze=W,warnings:Dt=W,className:Wt,fieldId:cr,onVisibleChanged:Ir}=Re;const{prefixCls:Zt}=ie.useContext(y.Rk),qt=`${Zt}-item-explain`,gr=(0,ce.Z)(Zt),[hr,vr,nr]=re(Zt,gr),Ar=ie.useMemo(()=>(0,de.Z)(Zt),[Zt]),Pr=l(Ze),Xr=l(Dt),tn=ie.useMemo(()=>Je!=null?[ee(Je,"help",lt)]:[].concat((0,Ee.Z)(Pr.map((Gr,Yr)=>ee(Gr,"error","error",Yr))),(0,Ee.Z)(Xr.map((Gr,Yr)=>ee(Gr,"warning","warning",Yr)))),[Je,lt,Pr,Xr]),xn=ie.useMemo(()=>{const Gr={};return tn.forEach(Yr=>{let{key:un}=Yr;Gr[un]=(Gr[un]||0)+1}),tn.map((Yr,un)=>Object.assign(Object.assign({},Yr),{key:Gr[Yr.key]>1?`${Yr.key}-fallback-${un}`:Yr.key}))},[tn]),_r={};return cr&&(_r.id=`${cr}_help`),hr(ie.createElement(v.default,{motionDeadline:Ar.motionDeadline,motionName:`${Zt}-show-help`,visible:!!xn.length,onVisibleChanged:Ir},Gr=>{const{className:Yr,style:un}=Gr;return ie.createElement("div",Object.assign({},_r,{className:J()(qt,Yr,nr,gr,Wt,vr),style:un}),ie.createElement(v.CSSMotionList,Object.assign({keys:xn},(0,de.Z)(Zt),{motionName:`${Zt}-show-help-item`,component:!1}),Vr=>{const{key:Rr,error:Br,errorStatus:rn,className:nn,style:Nr}=Vr;return ie.createElement("div",{key:Rr,className:J()(nn,{[`${qt}-${rn}`]:rn}),style:Nr},Br)}))}))},ae=k(69180),S=k(48755),w=k(2171),K=k(31756),ye=k(23069),Be=k(76846),He=k(16722);const ot=["parentNode"],at="form_item";function pt(Re){return Re===void 0||Re===!1?[]:Array.isArray(Re)?Re:[Re]}function At(Re,Je){if(!Re.length)return;const lt=Re.join("_");return Je?`${Je}_${lt}`:ot.includes(lt)?`${at}_${lt}`:lt}function ut(Re,Je,lt,Ze,Dt,Wt){let cr=Ze;return Wt!==void 0?cr=Wt:lt.validating?cr="validating":Re.length?cr="error":Je.length?cr="warning":(lt.touched||Dt&&lt.validated)&&(cr="success"),cr}var jt=function(Re,Je){var lt={};for(var Ze in Re)Object.prototype.hasOwnProperty.call(Re,Ze)&&Je.indexOf(Ze)<0&&(lt[Ze]=Re[Ze]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ze=Object.getOwnPropertySymbols(Re);Dt<Ze.length;Dt++)Je.indexOf(Ze[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ze[Dt])&&(lt[Ze[Dt]]=Re[Ze[Dt]]);return lt};function tt(Re){return pt(Re).join("_")}function Ft(Re,Je){const lt=Je.getFieldInstance(Re),Ze=(0,Be.bn)(lt);if(Ze)return Ze;const Dt=At(pt(Re),Je.__INTERNAL__.name);if(Dt)return document.getElementById(Dt)}function Me(Re){const[Je]=(0,ae.useForm)(),lt=ie.useRef({}),Ze=ie.useMemo(()=>Re!=null?Re:Object.assign(Object.assign({},Je),{__INTERNAL__:{itemRef:Dt=>Wt=>{const cr=tt(Dt);Wt?lt.current[cr]=Wt:delete lt.current[cr]}},scrollToField:function(Dt){let Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:cr}=Wt,Ir=jt(Wt,["focus"]),Zt=Ft(Dt,Ze);Zt&&((0,He.Z)(Zt,Object.assign({scrollMode:"if-needed",block:"nearest"},Ir)),cr&&Ze.focusField(Dt))},focusField:Dt=>{var Wt,cr;const Ir=Ze.getFieldInstance(Dt);typeof(Ir==null?void 0:Ir.focus)=="function"?Ir.focus():(cr=(Wt=Ft(Dt,Ze))===null||Wt===void 0?void 0:Wt.focus)===null||cr===void 0||cr.call(Wt)},getFieldInstance:Dt=>{const Wt=tt(Dt);return lt.current[Wt]}}),[Re,Je]);return[Ze]}var mt=k(98350),ke=function(Re,Je){var lt={};for(var Ze in Re)Object.prototype.hasOwnProperty.call(Re,Ze)&&Je.indexOf(Ze)<0&&(lt[Ze]=Re[Ze]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ze=Object.getOwnPropertySymbols(Re);Dt<Ze.length;Dt++)Je.indexOf(Ze[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ze[Dt])&&(lt[Ze[Dt]]=Re[Ze[Dt]]);return lt};const Ce=(Re,Je)=>{const lt=ie.useContext(w.Z),{getPrefixCls:Ze,direction:Dt,requiredMark:Wt,colon:cr,scrollToFirstError:Ir,className:Zt,style:qt}=(0,S.dj)("form"),{prefixCls:gr,className:hr,rootClassName:vr,size:nr,disabled:Ar=lt,form:Pr,colon:Xr,labelAlign:tn,labelWrap:xn,labelCol:_r,wrapperCol:Gr,hideRequiredMark:Yr,layout:un="horizontal",scrollToFirstError:Vr,requiredMark:Rr,onFinishFailed:Br,name:rn,style:nn,feedbackIcons:Nr,variant:Jr}=Re,an=ke(Re,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),wn=(0,K.Z)(nr),mn=ie.useContext(mt.Z),dn=ie.useMemo(()=>Rr!==void 0?Rr:Yr?!1:Wt!==void 0?Wt:!0,[Yr,Rr,Wt]),Rn=Xr!=null?Xr:cr,Wr=Ze("form",gr),Cn=(0,ce.Z)(Wr),[ht,Lr,on]=re(Wr,Cn),$n=J()(Wr,`${Wr}-${un}`,{[`${Wr}-hide-required-mark`]:dn===!1,[`${Wr}-rtl`]:Dt==="rtl",[`${Wr}-${wn}`]:wn},on,Cn,Lr,Zt,hr,vr),[Pn]=Me(Pr),{__INTERNAL__:Ln}=Pn;Ln.name=rn;const Sn=ie.useMemo(()=>({name:rn,labelAlign:tn,labelCol:_r,labelWrap:xn,wrapperCol:Gr,vertical:un==="vertical",colon:Rn,requiredMark:dn,itemRef:Ln.itemRef,form:Pn,feedbackIcons:Nr}),[rn,tn,_r,Gr,un,Rn,dn,Pn,Nr]),ir=ie.useRef(null);ie.useImperativeHandle(Je,()=>{var Hr;return Object.assign(Object.assign({},Pn),{nativeElement:(Hr=ir.current)===null||Hr===void 0?void 0:Hr.nativeElement})});const $r=(Hr,Xt)=>{if(Hr){let dr={block:"nearest"};typeof Hr=="object"&&(dr=Object.assign(Object.assign({},dr),Hr)),Pn.scrollToField(Xt,dr)}},ln=Hr=>{if(Br==null||Br(Hr),Hr.errorFields.length){const Xt=Hr.errorFields[0].name;if(Vr!==void 0){$r(Vr,Xt);return}Ir!==void 0&&$r(Ir,Xt)}};return ht(ie.createElement(y.pg.Provider,{value:Jr},ie.createElement(w.n,{disabled:Ar},ie.createElement(ye.Z.Provider,{value:wn},ie.createElement(y.RV,{validateMessages:mn},ie.createElement(y.q3.Provider,{value:Sn},ie.createElement(ae.default,Object.assign({id:rn},an,{name:rn,onFinishFailed:ln,form:Pn,ref:ir,style:Object.assign(Object.assign({},qt),nn),className:$n}))))))))};var Ne=ie.forwardRef(Ce),Ke=k(41799),nt=k(8654),te=k(22703),Ie=k(32383),Ue=k(11592);function ze(Re){if(typeof Re=="function")return Re;const Je=(0,Ue.Z)(Re);return Je.length<=1?Je[0]:Je}const qe=()=>{const{status:Re,errors:Je=[],warnings:lt=[]}=ie.useContext(y.aM);return{status:Re,errors:Je,warnings:lt}};qe.Context=y.aM;var gt=qe,Rt=k(16089);function vt(Re){const[Je,lt]=ie.useState(Re),Ze=ie.useRef(null),Dt=ie.useRef([]),Wt=ie.useRef(!1);ie.useEffect(()=>(Wt.current=!1,()=>{Wt.current=!0,Rt.Z.cancel(Ze.current),Ze.current=null}),[]);function cr(Ir){Wt.current||(Ze.current===null&&(Dt.current=[],Ze.current=(0,Rt.Z)(()=>{Ze.current=null,lt(Zt=>{let qt=Zt;return Dt.current.forEach(gr=>{qt=gr(qt)}),qt})})),Dt.current.push(Ir))}return[Je,cr]}function _t(){const{itemRef:Re}=ie.useContext(y.q3),Je=ie.useRef({});function lt(Ze,Dt){const Wt=Dt&&typeof Dt=="object"&&(0,nt.C4)(Dt),cr=Ze.join("_");return(Je.current.name!==cr||Je.current.originRef!==Wt)&&(Je.current.name=cr,Je.current.originRef=Wt,Je.current.ref=(0,nt.sQ)(Re(Ze),Wt)),Je.current.ref}return lt}var St=k(29194),Nt=k(34280),Pt=k(2738),Ct=k(65970),Ge=k(70425),Tt=k(5472);const Et=Re=>{const{formItemCls:Je}=Re;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Je}-control`]:{display:"flex"}}}};var ct=(0,P.bk)(["Form","item-item"],(Re,Je)=>{let{rootPrefixCls:lt}=Je;const Ze=st(Re,lt);return[Et(Ze)]}),Lt=function(Re,Je){var lt={};for(var Ze in Re)Object.prototype.hasOwnProperty.call(Re,Ze)&&Je.indexOf(Ze)<0&&(lt[Ze]=Re[Ze]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ze=Object.getOwnPropertySymbols(Re);Dt<Ze.length;Dt++)Je.indexOf(Ze[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ze[Dt])&&(lt[Ze[Dt]]=Re[Ze[Dt]]);return lt};const _=24;var Q=Re=>{const{prefixCls:Je,status:lt,labelCol:Ze,wrapperCol:Dt,children:Wt,errors:cr,warnings:Ir,_internalItemRender:Zt,extra:qt,help:gr,fieldId:hr,marginBottom:vr,onErrorVisibleChanged:nr,label:Ar}=Re,Pr=`${Je}-item`,Xr=ie.useContext(y.q3),tn=ie.useMemo(()=>{let an=Object.assign({},Dt||Xr.wrapperCol||{});return Ar===null&&!Ze&&!Dt&&Xr.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(mn=>{const dn=mn?[mn]:[],Rn=(0,Ge.U2)(Xr.labelCol,dn),Wr=typeof Rn=="object"?Rn:{},Cn=(0,Ge.U2)(an,dn),ht=typeof Cn=="object"?Cn:{};"span"in Wr&&!("offset"in ht)&&Wr.span<_&&(an=(0,Ge.t8)(an,[].concat(dn,["offset"]),Wr.span))}),an},[Dt,Xr]),xn=J()(`${Pr}-control`,tn.className),_r=ie.useMemo(()=>{const{labelCol:an,wrapperCol:wn}=Xr;return Lt(Xr,["labelCol","wrapperCol"])},[Xr]),Gr=ie.useRef(null),[Yr,un]=ie.useState(0);(0,Nt.Z)(()=>{qt&&Gr.current?un(Gr.current.clientHeight):un(0)},[qt]);const Vr=ie.createElement("div",{className:`${Pr}-control-input`},ie.createElement("div",{className:`${Pr}-control-input-content`},Wt)),Rr=ie.useMemo(()=>({prefixCls:Je,status:lt}),[Je,lt]),Br=vr!==null||cr.length||Ir.length?ie.createElement(y.Rk.Provider,{value:Rr},ie.createElement(ne,{fieldId:hr,errors:cr,warnings:Ir,help:gr,helpStatus:lt,className:`${Pr}-explain-connected`,onVisibleChanged:nr})):null,rn={};hr&&(rn.id=`${hr}_extra`);const nn=qt?ie.createElement("div",Object.assign({},rn,{className:`${Pr}-extra`,ref:Gr}),qt):null,Nr=Br||nn?ie.createElement("div",{className:`${Pr}-additional`,style:vr?{minHeight:vr+Yr}:{}},Br,nn):null,Jr=Zt&&Zt.mark==="pro_table_render"&&Zt.render?Zt.render(Re,{input:Vr,errorList:Br,extra:nn}):ie.createElement(ie.Fragment,null,Vr,Nr);return ie.createElement(y.q3.Provider,{value:_r},ie.createElement(Tt.Z,Object.assign({},tn,{className:xn}),Jr),ie.createElement(ct,{prefixCls:Je}))},C=k(61485),G=k(9017),Xe=k(85981),fe=k(25399),Ae=function(Re,Je){var lt={};for(var Ze in Re)Object.prototype.hasOwnProperty.call(Re,Ze)&&Je.indexOf(Ze)<0&&(lt[Ze]=Re[Ze]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ze=Object.getOwnPropertySymbols(Re);Dt<Ze.length;Dt++)Je.indexOf(Ze[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ze[Dt])&&(lt[Ze[Dt]]=Re[Ze[Dt]]);return lt};function Pe(Re){return Re?typeof Re=="object"&&!ie.isValidElement(Re)?Re:{title:Re}:null}var X=Re=>{let{prefixCls:Je,label:lt,htmlFor:Ze,labelCol:Dt,labelAlign:Wt,colon:cr,required:Ir,requiredMark:Zt,tooltip:qt,vertical:gr}=Re;var hr;const[vr]=(0,G.Z)("Form"),{labelAlign:nr,labelCol:Ar,labelWrap:Pr,colon:Xr}=ie.useContext(y.q3);if(!lt)return null;const tn=Dt||Ar||{},xn=Wt||nr,_r=`${Je}-item-label`,Gr=J()(_r,xn==="left"&&`${_r}-left`,tn.className,{[`${_r}-wrap`]:!!Pr});let Yr=lt;const un=cr===!0||Xr!==!1&&cr!==!1;un&&!gr&&typeof lt=="string"&&lt.trim()&&(Yr=lt.replace(/[:|]\s*$/,""));const Rr=Pe(qt);if(Rr){const{icon:an=ie.createElement(C.Z,null)}=Rr,wn=Ae(Rr,["icon"]),mn=ie.createElement(fe.Z,Object.assign({},wn),ie.cloneElement(an,{className:`${Je}-item-tooltip`,title:"",onClick:dn=>{dn.preventDefault()},tabIndex:null}));Yr=ie.createElement(ie.Fragment,null,Yr,mn)}const Br=Zt==="optional",rn=typeof Zt=="function",nn=Zt===!1;rn?Yr=Zt(Yr,{required:!!Ir}):Br&&!Ir&&(Yr=ie.createElement(ie.Fragment,null,Yr,ie.createElement("span",{className:`${Je}-item-optional`,title:""},(vr==null?void 0:vr.optional)||((hr=Xe.Z.Form)===null||hr===void 0?void 0:hr.optional))));let Nr;nn?Nr="hidden":(Br||rn)&&(Nr="optional");const Jr=J()({[`${Je}-item-required`]:Ir,[`${Je}-item-required-mark-${Nr}`]:Nr,[`${Je}-item-no-colon`]:!un});return ie.createElement(Tt.Z,Object.assign({},tn,{className:Gr}),ie.createElement("label",{htmlFor:Ze,className:Jr,title:typeof lt=="string"?lt:""},Yr))},he=k(29679),Se=k(19248),$=k(96512),Qe=k(58617);const le={success:he.Z,warning:$.Z,error:Se.Z,validating:Qe.Z};function It(Re){let{children:Je,errors:lt,warnings:Ze,hasFeedback:Dt,validateStatus:Wt,prefixCls:cr,meta:Ir,noStyle:Zt}=Re;const qt=`${cr}-item`,{feedbackIcons:gr}=ie.useContext(y.q3),hr=ut(lt,Ze,Ir,null,!!Dt,Wt),{isFormItemInput:vr,status:nr,hasFeedback:Ar,feedbackIcon:Pr}=ie.useContext(y.aM),Xr=ie.useMemo(()=>{var tn;let xn;if(Dt){const Gr=Dt!==!0&&Dt.icons||gr,Yr=hr&&((tn=Gr==null?void 0:Gr({status:hr,errors:lt,warnings:Ze}))===null||tn===void 0?void 0:tn[hr]),un=hr&&le[hr];xn=Yr!==!1&&un?ie.createElement("span",{className:J()(`${qt}-feedback-icon`,`${qt}-feedback-icon-${hr}`)},Yr||ie.createElement(un,null)):null}const _r={status:hr||"",errors:lt,warnings:Ze,hasFeedback:!!Dt,feedbackIcon:xn,isFormItemInput:!0};return Zt&&(_r.status=(hr!=null?hr:nr)||"",_r.isFormItemInput=vr,_r.hasFeedback=!!(Dt!=null?Dt:Ar),_r.feedbackIcon=Dt!==void 0?_r.feedbackIcon:Pr),_r},[hr,Dt,Zt,vr,nr]);return ie.createElement(y.aM.Provider,{value:Xr},Je)}var $t=function(Re,Je){var lt={};for(var Ze in Re)Object.prototype.hasOwnProperty.call(Re,Ze)&&Je.indexOf(Ze)<0&&(lt[Ze]=Re[Ze]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ze=Object.getOwnPropertySymbols(Re);Dt<Ze.length;Dt++)Je.indexOf(Ze[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ze[Dt])&&(lt[Ze[Dt]]=Re[Ze[Dt]]);return lt};function zt(Re){const{prefixCls:Je,className:lt,rootClassName:Ze,style:Dt,help:Wt,errors:cr,warnings:Ir,validateStatus:Zt,meta:qt,hasFeedback:gr,hidden:hr,children:vr,fieldId:nr,required:Ar,isRequired:Pr,onSubItemMetaChange:Xr,layout:tn}=Re,xn=$t(Re,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),_r=`${Je}-item`,{requiredMark:Gr,vertical:Yr}=ie.useContext(y.q3),un=Yr||tn==="vertical",Vr=ie.useRef(null),Rr=l(cr),Br=l(Ir),rn=Wt!=null,nn=!!(rn||cr.length||Ir.length),Nr=!!Vr.current&&(0,St.Z)(Vr.current),[Jr,an]=ie.useState(null);(0,Nt.Z)(()=>{if(nn&&Vr.current){const Wr=getComputedStyle(Vr.current);an(parseInt(Wr.marginBottom,10))}},[nn,Nr]);const wn=Wr=>{Wr||an(null)},dn=function(){let Wr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Cn=Wr?Rr:qt.errors,ht=Wr?Br:qt.warnings;return ut(Cn,ht,qt,"",!!gr,Zt)}(),Rn=J()(_r,lt,Ze,{[`${_r}-with-help`]:rn||Rr.length||Br.length,[`${_r}-has-feedback`]:dn&&gr,[`${_r}-has-success`]:dn==="success",[`${_r}-has-warning`]:dn==="warning",[`${_r}-has-error`]:dn==="error",[`${_r}-is-validating`]:dn==="validating",[`${_r}-hidden`]:hr,[`${_r}-${tn}`]:tn});return ie.createElement("div",{className:Rn,style:Dt,ref:Vr},ie.createElement(Ct.Z,Object.assign({className:`${_r}-row`},(0,Pt.Z)(xn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),ie.createElement(X,Object.assign({htmlFor:nr},Re,{requiredMark:Gr,required:Ar!=null?Ar:Pr,prefixCls:Je,vertical:un})),ie.createElement(Q,Object.assign({},Re,qt,{errors:Rr,warnings:Br,prefixCls:Je,status:dn,help:Wt,marginBottom:Jr,onErrorVisibleChanged:wn}),ie.createElement(y.qI.Provider,{value:Xr},ie.createElement(It,{prefixCls:Je,meta:qt,errors:qt.errors,warnings:qt.warnings,hasFeedback:gr,validateStatus:dn},vr)))),!!Jr&&ie.createElement("div",{className:`${_r}-margin-offset`,style:{marginBottom:-Jr}}))}const sr="__SPLIT__",or=null;function Kt(Re,Je){const lt=Object.keys(Re),Ze=Object.keys(Je);return lt.length===Ze.length&&lt.every(Dt=>{const Wt=Re[Dt],cr=Je[Dt];return Wt===cr||typeof Wt=="function"||typeof cr=="function"})}const ur=ie.memo(Re=>{let{children:Je}=Re;return Je},(Re,Je)=>Kt(Re.control,Je.control)&&Re.update===Je.update&&Re.childProps.length===Je.childProps.length&&Re.childProps.every((lt,Ze)=>lt===Je.childProps[Ze]));function Zr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Tr(Re){const{name:Je,noStyle:lt,className:Ze,dependencies:Dt,prefixCls:Wt,shouldUpdate:cr,rules:Ir,children:Zt,required:qt,label:gr,messageVariables:hr,trigger:vr="onChange",validateTrigger:nr,hidden:Ar,help:Pr,layout:Xr}=Re,{getPrefixCls:tn}=ie.useContext(S.E_),{name:xn}=ie.useContext(y.q3),_r=ze(Zt),Gr=typeof _r=="function",Yr=ie.useContext(y.qI),{validateTrigger:un}=ie.useContext(ae.FieldContext),Vr=nr!==void 0?nr:un,Rr=Je!=null,Br=tn("form",Wt),rn=(0,ce.Z)(Br),[nn,Nr,Jr]=re(Br,rn),an=(0,Ie.ln)("Form.Item"),wn=ie.useContext(ae.ListContext),mn=ie.useRef(null),[dn,Rn]=vt({}),[Wr,Cn]=(0,Ke.Z)(()=>Zr()),ht=ir=>{const $r=wn==null?void 0:wn.getKey(ir.name);if(Cn(ir.destroy?Zr():ir,!0),lt&&Pr!==!1&&Yr){let ln=ir.name;if(ir.destroy)ln=mn.current||ln;else if($r!==void 0){const[Hr,Xt]=$r;ln=[Hr].concat((0,Ee.Z)(Xt)),mn.current=ln}Yr(ir,ln)}},Lr=(ir,$r)=>{Rn(ln=>{const Hr=Object.assign({},ln),dr=[].concat((0,Ee.Z)(ir.name.slice(0,-1)),(0,Ee.Z)($r)).join(sr);return ir.destroy?delete Hr[dr]:Hr[dr]=ir,Hr})},[on,$n]=ie.useMemo(()=>{const ir=(0,Ee.Z)(Wr.errors),$r=(0,Ee.Z)(Wr.warnings);return Object.values(dn).forEach(ln=>{ir.push.apply(ir,(0,Ee.Z)(ln.errors||[])),$r.push.apply($r,(0,Ee.Z)(ln.warnings||[]))}),[ir,$r]},[dn,Wr.errors,Wr.warnings]),Pn=_t();function Ln(ir,$r,ln){return lt&&!Ar?ie.createElement(It,{prefixCls:Br,hasFeedback:Re.hasFeedback,validateStatus:Re.validateStatus,meta:Wr,errors:on,warnings:$n,noStyle:!0},ir):ie.createElement(zt,Object.assign({key:"row"},Re,{className:J()(Ze,Jr,rn,Nr),prefixCls:Br,fieldId:$r,isRequired:ln,errors:on,warnings:$n,meta:Wr,onSubItemMetaChange:Lr,layout:Xr}),ir)}if(!Rr&&!Gr&&!Dt)return nn(Ln(_r));let Sn={};return typeof gr=="string"?Sn.label=gr:Je&&(Sn.label=String(Je)),hr&&(Sn=Object.assign(Object.assign({},Sn),hr)),nn(ie.createElement(ae.Field,Object.assign({},Re,{messageVariables:Sn,trigger:vr,validateTrigger:Vr,onMetaChange:ht}),(ir,$r,ln)=>{const Hr=pt(Je).length&&$r?$r.name:[],Xt=At(Hr,xn),dr=qt!==void 0?qt:!!(Ir!=null&&Ir.some(Gt=>{if(Gt&&typeof Gt=="object"&&Gt.required&&!Gt.warningOnly)return!0;if(typeof Gt=="function"){const fn=Gt(ln);return(fn==null?void 0:fn.required)&&!(fn!=null&&fn.warningOnly)}return!1})),jr=Object.assign({},ir);let xr=null;if(Array.isArray(_r)&&Rr)xr=_r;else if(!(Gr&&(!(cr||Dt)||Rr))){if(!(Dt&&!Gr&&!Rr))if(ie.isValidElement(_r)){const Gt=Object.assign(Object.assign({},_r.props),jr);if(Gt.id||(Gt.id=Xt),Pr||on.length>0||$n.length>0||Re.extra){const kn=[];(Pr||on.length>0)&&kn.push(`${Xt}_help`),Re.extra&&kn.push(`${Xt}_extra`),Gt["aria-describedby"]=kn.join(" ")}on.length>0&&(Gt["aria-invalid"]="true"),dr&&(Gt["aria-required"]="true"),(0,nt.Yr)(_r)&&(Gt.ref=Pn(Hr,_r)),new Set([].concat((0,Ee.Z)(pt(vr)),(0,Ee.Z)(pt(Vr)))).forEach(kn=>{Gt[kn]=function(){for(var ii,si,hi,ai,bn,Qn=arguments.length,Mn=new Array(Qn),Un=0;Un<Qn;Un++)Mn[Un]=arguments[Un];(hi=jr[kn])===null||hi===void 0||(ii=hi).call.apply(ii,[jr].concat(Mn)),(bn=(ai=_r.props)[kn])===null||bn===void 0||(si=bn).call.apply(si,[ai].concat(Mn))}});const vn=[Gt["aria-required"],Gt["aria-invalid"],Gt["aria-describedby"]];xr=ie.createElement(ur,{control:jr,update:_r,childProps:vn},(0,te.Tm)(_r,Gt))}else Gr&&(cr||Dt)&&!Rr?xr=_r(ln):xr=_r}return Ln(xr,Xt,dr)}))}const fr=Tr;fr.useStatus=gt;var Ot=fr,yt=function(Re,Je){var lt={};for(var Ze in Re)Object.prototype.hasOwnProperty.call(Re,Ze)&&Je.indexOf(Ze)<0&&(lt[Ze]=Re[Ze]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Dt=0,Ze=Object.getOwnPropertySymbols(Re);Dt<Ze.length;Dt++)Je.indexOf(Ze[Dt])<0&&Object.prototype.propertyIsEnumerable.call(Re,Ze[Dt])&&(lt[Ze[Dt]]=Re[Ze[Dt]]);return lt},Jt=Re=>{var{prefixCls:Je,children:lt}=Re,Ze=yt(Re,["prefixCls","children"]);const{getPrefixCls:Dt}=ie.useContext(S.E_),Wt=Dt("form",Je),cr=ie.useMemo(()=>({prefixCls:Wt,status:"error"}),[Wt]);return ie.createElement(ae.List,Object.assign({},Ze),(Ir,Zt,qt)=>ie.createElement(y.Rk.Provider,{value:cr},lt(Ir.map(gr=>Object.assign(Object.assign({},gr),{fieldKey:gr.key})),Zt,{errors:qt.errors,warnings:qt.warnings})))};function Sr(){const{form:Re}=ie.useContext(y.q3);return Re}const Dr=Ne;Dr.Item=Ot,Dr.List=Jt,Dr.ErrorList=ne,Dr.useForm=Me,Dr.useFormInstance=Sr,Dr.useWatch=ae.useWatch,Dr.Provider=y.RV,Dr.create=()=>{};var hn=Dr},4875:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return T}});var y=k(59301),Ee=k(84105),ie=k(87395),be=k(92310),J=k.n(be),v=k(60499),de=k(18642),ce=k(43749),l=k(72190),V=k(42244),B=k(38705),E=k(17212);function L(){return typeof BigInt=="function"}function x(Q){return!Q&&Q!==0&&!Number.isNaN(Q)||!String(Q).trim()}function P(Q){var C=Q.trim(),G=C.startsWith("-");G&&(C=C.slice(1)),C=C.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),C.startsWith(".")&&(C="0".concat(C));var Xe=C||"0",fe=Xe.split("."),Ae=fe[0]||"0",Pe=fe[1]||"0";Ae==="0"&&Pe==="0"&&(G=!1);var j=G?"-":"";return{negative:G,negativeStr:j,trimStr:Xe,integerStr:Ae,decimalStr:Pe,fullStr:"".concat(j).concat(Xe)}}function q(Q){var C=String(Q);return!Number.isNaN(Number(C))&&C.includes("e")}function H(Q){var C=String(Q);if(q(Q)){var G=Number(C.slice(C.indexOf("e-")+2)),Xe=C.match(/\.(\d+)/);return Xe!=null&&Xe[1]&&(G+=Xe[1].length),G}return C.includes(".")&&A(C)?C.length-C.indexOf(".")-1:0}function U(Q){var C=String(Q);if(q(Q)){if(Q>Number.MAX_SAFE_INTEGER)return String(L()?BigInt(Q).toString():Number.MAX_SAFE_INTEGER);if(Q<Number.MIN_SAFE_INTEGER)return String(L()?BigInt(Q).toString():Number.MIN_SAFE_INTEGER);C=Q.toFixed(H(C))}return P(C).fullStr}function A(Q){return typeof Q=="number"?!Number.isNaN(Q):Q?/^\s*-?\d+(\.\d+)?\s*$/.test(Q)||/^\s*-?\d+\.\s*$/.test(Q)||/^\s*-?\.\d+\s*$/.test(Q):!1}var z=function(){function Q(C){if((0,B.Z)(this,Q),(0,de.Z)(this,"origin",""),(0,de.Z)(this,"negative",void 0),(0,de.Z)(this,"integer",void 0),(0,de.Z)(this,"decimal",void 0),(0,de.Z)(this,"decimalLen",void 0),(0,de.Z)(this,"empty",void 0),(0,de.Z)(this,"nan",void 0),x(C)){this.empty=!0;return}if(this.origin=String(C),C==="-"||Number.isNaN(C)){this.nan=!0;return}var G=C;if(q(G)&&(G=Number(G)),G=typeof G=="string"?G:U(G),A(G)){var Xe=P(G);this.negative=Xe.negative;var fe=Xe.trimStr.split(".");this.integer=BigInt(fe[0]);var Ae=fe[1]||"0";this.decimal=BigInt(Ae),this.decimalLen=Ae.length}else this.nan=!0}return(0,E.Z)(Q,[{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(G){var Xe="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(G,"0"));return BigInt(Xe)}},{key:"negate",value:function(){var G=new Q(this.toString());return G.negative=!G.negative,G}},{key:"cal",value:function(G,Xe,fe){var Ae=Math.max(this.getDecimalStr().length,G.getDecimalStr().length),Pe=this.alignDecimal(Ae),j=G.alignDecimal(Ae),X=Xe(Pe,j).toString(),he=fe(Ae),Se=P(X),$=Se.negativeStr,Qe=Se.trimStr,le="".concat($).concat(Qe.padStart(he+1,"0"));return new Q("".concat(le.slice(0,-he),".").concat(le.slice(-he)))}},{key:"add",value:function(G){if(this.isInvalidate())return new Q(G);var Xe=new Q(G);return Xe.isInvalidate()?this:this.cal(Xe,function(fe,Ae){return fe+Ae},function(fe){return fe})}},{key:"multi",value:function(G){var Xe=new Q(G);return this.isInvalidate()||Xe.isInvalidate()?new Q(NaN):this.cal(Xe,function(fe,Ae){return fe*Ae},function(fe){return fe*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(G){return this.toString()===(G==null?void 0:G.toString())}},{key:"lessEquals",value:function(G){return this.add(G.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return G?this.isInvalidate()?"":P("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),Q}(),O=function(){function Q(C){if((0,B.Z)(this,Q),(0,de.Z)(this,"origin",""),(0,de.Z)(this,"number",void 0),(0,de.Z)(this,"empty",void 0),x(C)){this.empty=!0;return}this.origin=String(C),this.number=Number(C)}return(0,E.Z)(Q,[{key:"negate",value:function(){return new Q(-this.toNumber())}},{key:"add",value:function(G){if(this.isInvalidate())return new Q(G);var Xe=Number(G);if(Number.isNaN(Xe))return this;var fe=this.number+Xe;if(fe>Number.MAX_SAFE_INTEGER)return new Q(Number.MAX_SAFE_INTEGER);if(fe<Number.MIN_SAFE_INTEGER)return new Q(Number.MIN_SAFE_INTEGER);var Ae=Math.max(H(this.number),H(Xe));return new Q(fe.toFixed(Ae))}},{key:"multi",value:function(G){var Xe=Number(G);if(this.isInvalidate()||Number.isNaN(Xe))return new Q(NaN);var fe=this.number*Xe;if(fe>Number.MAX_SAFE_INTEGER)return new Q(Number.MAX_SAFE_INTEGER);if(fe<Number.MIN_SAFE_INTEGER)return new Q(Number.MIN_SAFE_INTEGER);var Ae=Math.max(H(this.number),H(Xe));return new Q(fe.toFixed(Ae))}},{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(G){return this.toNumber()===(G==null?void 0:G.toNumber())}},{key:"lessEquals",value:function(G){return this.add(G.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return G?this.isInvalidate()?"":U(this.number):this.origin}}]),Q}();function N(Q){return L()?new z(Q):new O(Q)}function oe(Q,C,G){var Xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Q==="")return"";var fe=P(Q),Ae=fe.negativeStr,Pe=fe.integerStr,j=fe.decimalStr,X="".concat(C).concat(j),he="".concat(Ae).concat(Pe);if(G>=0){var Se=Number(j[G]);if(Se>=5&&!Xe){var $=N(Q).add("".concat(Ae,"0.").concat("0".repeat(G)).concat(10-Se));return oe($.toString(),C,G,Xe)}return G===0?he:"".concat(he).concat(C).concat(j.padEnd(G,"0").slice(0,G))}return X===".0"?he:"".concat(he).concat(X)}var ve=N,pe=k(36901),De=k(34280);function Oe(Q,C){return typeof Proxy!="undefined"&&Q?new Proxy(Q,{get:function(Xe,fe){if(C[fe])return C[fe];var Ae=Xe[fe];return typeof Ae=="function"?Ae.bind(Xe):Ae}}):Q}var Fe=k(8654),st=k(48736);function re(Q,C){var G=(0,y.useRef)(null);function Xe(){try{var Ae=Q.selectionStart,Pe=Q.selectionEnd,j=Q.value,X=j.substring(0,Ae),he=j.substring(Pe);G.current={start:Ae,end:Pe,value:j,beforeTxt:X,afterTxt:he}}catch(Se){}}function fe(){if(Q&&G.current&&C)try{var Ae=Q.value,Pe=G.current,j=Pe.beforeTxt,X=Pe.afterTxt,he=Pe.start,Se=Ae.length;if(Ae.startsWith(j))Se=j.length;else if(Ae.endsWith(X))Se=Ae.length-G.current.afterTxt.length;else{var $=j[he-1],Qe=Ae.indexOf($,he-1);Qe!==-1&&(Se=Qe+1)}Q.setSelectionRange(Se,Se)}catch(le){(0,st.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(le.message))}}return[Xe,fe]}var W=k(49658),ee=function(){var C=(0,y.useState)(!1),G=(0,l.Z)(C,2),Xe=G[0],fe=G[1];return(0,De.Z)(function(){fe((0,W.Z)())},[]),Xe},ue=ee,ne=k(16089),ae=200,S=600;function w(Q){var C=Q.prefixCls,G=Q.upNode,Xe=Q.downNode,fe=Q.upDisabled,Ae=Q.downDisabled,Pe=Q.onStep,j=y.useRef(),X=y.useRef([]),he=y.useRef();he.current=Pe;var Se=function(){clearTimeout(j.current)},$=function(Kt,ur){Kt.preventDefault(),Se(),he.current(ur);function Zr(){he.current(ur),j.current=setTimeout(Zr,ae)}j.current=setTimeout(Zr,S)};y.useEffect(function(){return function(){Se(),X.current.forEach(function(or){return ne.Z.cancel(or)})}},[]);var Qe=ue();if(Qe)return null;var le="".concat(C,"-handler"),It=J()(le,"".concat(le,"-up"),(0,de.Z)({},"".concat(le,"-up-disabled"),fe)),$t=J()(le,"".concat(le,"-down"),(0,de.Z)({},"".concat(le,"-down-disabled"),Ae)),zt=function(){return X.current.push((0,ne.Z)(Se))},sr={unselectable:"on",role:"button",onMouseUp:zt,onMouseLeave:zt};return y.createElement("div",{className:"".concat(le,"-wrap")},y.createElement("span",(0,v.Z)({},sr,{onMouseDown:function(Kt){$(Kt,!0)},"aria-label":"Increase Value","aria-disabled":fe,className:It}),G||y.createElement("span",{unselectable:"on",className:"".concat(C,"-handler-up-inner")})),y.createElement("span",(0,v.Z)({},sr,{onMouseDown:function(Kt){$(Kt,!1)},"aria-label":"Decrease Value","aria-disabled":Ae,className:$t}),Xe||y.createElement("span",{unselectable:"on",className:"".concat(C,"-handler-down-inner")})))}function K(Q){var C=typeof Q=="number"?U(Q):P(Q).fullStr,G=C.includes(".");return G?P(C.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:Q+"0"}var ye=k(30292),Be=function(){var Q=(0,y.useRef)(0),C=function(){ne.Z.cancel(Q.current)};return(0,y.useEffect)(function(){return C},[]),function(G){C(),Q.current=(0,ne.Z)(function(){G()})}},He=["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"],ot=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],at=function(C,G){return C||G.isEmpty()?G.toString():G.toNumber()},pt=function(C){var G=ve(C);return G.isInvalidate()?null:G},At=y.forwardRef(function(Q,C){var G=Q.prefixCls,Xe=Q.className,fe=Q.style,Ae=Q.min,Pe=Q.max,j=Q.step,X=j===void 0?1:j,he=Q.defaultValue,Se=Q.value,$=Q.disabled,Qe=Q.readOnly,le=Q.upHandler,It=Q.downHandler,$t=Q.keyboard,zt=Q.changeOnWheel,sr=zt===void 0?!1:zt,or=Q.controls,Kt=or===void 0?!0:or,ur=Q.classNames,Zr=Q.stringMode,Tr=Q.parser,fr=Q.formatter,Ot=Q.precision,yt=Q.decimalSeparator,bt=Q.onChange,Jt=Q.onInput,Sr=Q.onPressEnter,Dr=Q.onStep,hn=Q.changeOnBlur,Re=hn===void 0?!0:hn,Je=Q.domRef,lt=(0,V.Z)(Q,He),Ze="".concat(G,"-input"),Dt=y.useRef(null),Wt=y.useState(!1),cr=(0,l.Z)(Wt,2),Ir=cr[0],Zt=cr[1],qt=y.useRef(!1),gr=y.useRef(!1),hr=y.useRef(!1),vr=y.useState(function(){return ve(Se!=null?Se:he)}),nr=(0,l.Z)(vr,2),Ar=nr[0],Pr=nr[1];function Xr(Xt){Se===void 0&&Pr(Xt)}var tn=y.useCallback(function(Xt,dr){if(!dr)return Ot>=0?Ot:Math.max(H(Xt),H(X))},[Ot,X]),xn=y.useCallback(function(Xt){var dr=String(Xt);if(Tr)return Tr(dr);var jr=dr;return yt&&(jr=jr.replace(yt,".")),jr.replace(/[^\w.-]+/g,"")},[Tr,yt]),_r=y.useRef(""),Gr=y.useCallback(function(Xt,dr){if(fr)return fr(Xt,{userTyping:dr,input:String(_r.current)});var jr=typeof Xt=="number"?U(Xt):Xt;if(!dr){var xr=tn(jr,dr);if(A(jr)&&(yt||xr>=0)){var Gt=yt||".";jr=oe(jr,Gt,xr)}}return jr},[fr,tn,yt]),Yr=y.useState(function(){var Xt=he!=null?he:Se;return Ar.isInvalidate()&&["string","number"].includes((0,ce.Z)(Xt))?Number.isNaN(Xt)?"":Xt:Gr(Ar.toString(),!1)}),un=(0,l.Z)(Yr,2),Vr=un[0],Rr=un[1];_r.current=Vr;function Br(Xt,dr){Rr(Gr(Xt.isInvalidate()?Xt.toString(!1):Xt.toString(!dr),dr))}var rn=y.useMemo(function(){return pt(Pe)},[Pe,Ot]),nn=y.useMemo(function(){return pt(Ae)},[Ae,Ot]),Nr=y.useMemo(function(){return!rn||!Ar||Ar.isInvalidate()?!1:rn.lessEquals(Ar)},[rn,Ar]),Jr=y.useMemo(function(){return!nn||!Ar||Ar.isInvalidate()?!1:Ar.lessEquals(nn)},[nn,Ar]),an=re(Dt.current,Ir),wn=(0,l.Z)(an,2),mn=wn[0],dn=wn[1],Rn=function(dr){return rn&&!dr.lessEquals(rn)?rn:nn&&!nn.lessEquals(dr)?nn:null},Wr=function(dr){return!Rn(dr)},Cn=function(dr,jr){var xr=dr,Gt=Wr(xr)||xr.isEmpty();if(!xr.isEmpty()&&!jr&&(xr=Rn(xr)||xr,Gt=!0),!Qe&&!$&&Gt){var fn=xr.toString(),vn=tn(fn,jr);return vn>=0&&(xr=ve(oe(fn,".",vn)),Wr(xr)||(xr=ve(oe(fn,".",vn,!0)))),xr.equals(Ar)||(Xr(xr),bt==null||bt(xr.isEmpty()?null:at(Zr,xr)),Se===void 0&&Br(xr,jr)),xr}return Ar},ht=Be(),Lr=function Xt(dr){if(mn(),_r.current=dr,Rr(dr),!gr.current){var jr=xn(dr),xr=ve(jr);xr.isNaN()||Cn(xr,!0)}Jt==null||Jt(dr),ht(function(){var Gt=dr;Tr||(Gt=dr.replace(/。/g,".")),Gt!==dr&&Xt(Gt)})},on=function(){gr.current=!0},$n=function(){gr.current=!1,Lr(Dt.current.value)},Pn=function(dr){Lr(dr.target.value)},Ln=function(dr){var jr;if(!(dr&&Nr||!dr&&Jr)){qt.current=!1;var xr=ve(hr.current?K(X):X);dr||(xr=xr.negate());var Gt=(Ar||ve(0)).add(xr.toString()),fn=Cn(Gt,!1);Dr==null||Dr(at(Zr,fn),{offset:hr.current?K(X):X,type:dr?"up":"down"}),(jr=Dt.current)===null||jr===void 0||jr.focus()}},Sn=function(dr){var jr=ve(xn(Vr)),xr;jr.isNaN()?xr=Cn(Ar,dr):xr=Cn(jr,dr),Se!==void 0?Br(Ar,!1):xr.isNaN()||Br(xr,!1)},ir=function(){qt.current=!0},$r=function(dr){var jr=dr.key,xr=dr.shiftKey;qt.current=!0,hr.current=xr,jr==="Enter"&&(gr.current||(qt.current=!1),Sn(!1),Sr==null||Sr(dr)),$t!==!1&&!gr.current&&["Up","ArrowUp","Down","ArrowDown"].includes(jr)&&(Ln(jr==="Up"||jr==="ArrowUp"),dr.preventDefault())},ln=function(){qt.current=!1,hr.current=!1};y.useEffect(function(){if(sr&&Ir){var Xt=function(xr){Ln(xr.deltaY<0),xr.preventDefault()},dr=Dt.current;if(dr)return dr.addEventListener("wheel",Xt,{passive:!1}),function(){return dr.removeEventListener("wheel",Xt)}}});var Hr=function(){Re&&Sn(!1),Zt(!1),qt.current=!1};return(0,De.o)(function(){Ar.isInvalidate()||Br(Ar,!1)},[Ot,fr]),(0,De.o)(function(){var Xt=ve(Se);Pr(Xt);var dr=ve(xn(Vr));(!Xt.equals(dr)||!qt.current||fr)&&Br(Xt,qt.current)},[Se]),(0,De.o)(function(){fr&&dn()},[Vr]),y.createElement("div",{ref:Je,className:J()(G,Xe,(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(G,"-focused"),Ir),"".concat(G,"-disabled"),$),"".concat(G,"-readonly"),Qe),"".concat(G,"-not-a-number"),Ar.isNaN()),"".concat(G,"-out-of-range"),!Ar.isInvalidate()&&!Wr(Ar))),style:fe,onFocus:function(){Zt(!0)},onBlur:Hr,onKeyDown:$r,onKeyUp:ln,onCompositionStart:on,onCompositionEnd:$n,onBeforeInput:ir},Kt&&y.createElement(w,{prefixCls:G,upNode:le,downNode:It,upDisabled:Nr,downDisabled:Jr,onStep:Ln}),y.createElement("div",{className:"".concat(Ze,"-wrap")},y.createElement("input",(0,v.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":Pe,"aria-valuenow":Ar.isInvalidate()?null:Ar.toString(),step:X},lt,{ref:(0,Fe.sQ)(Dt,C),className:Ze,value:Vr,onChange:Pn,disabled:$,readOnly:Qe}))))}),ut=y.forwardRef(function(Q,C){var G=Q.disabled,Xe=Q.style,fe=Q.prefixCls,Ae=fe===void 0?"rc-input-number":fe,Pe=Q.value,j=Q.prefix,X=Q.suffix,he=Q.addonBefore,Se=Q.addonAfter,$=Q.className,Qe=Q.classNames,le=(0,V.Z)(Q,ot),It=y.useRef(null),$t=y.useRef(null),zt=y.useRef(null),sr=function(Kt){zt.current&&(0,ye.nH)(zt.current,Kt)};return y.useImperativeHandle(C,function(){return Oe(zt.current,{focus:sr,nativeElement:It.current.nativeElement||$t.current})}),y.createElement(pe.BaseInput,{className:$,triggerFocus:sr,prefixCls:Ae,value:Pe,disabled:G,style:Xe,prefix:j,suffix:X,addonAfter:Se,addonBefore:he,classNames:Qe,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:It},y.createElement(At,(0,v.Z)({prefixCls:Ae,disabled:G,ref:zt,domRef:$t,className:Qe==null?void 0:Qe.input},le)))}),jt=ut,tt=jt,Ft=k(62487),Me=k(82855),mt=k(48755),ke=k(60840),Ce=k(2171),_e=k(83397),Ne=k(31756),Ke=k(56553),nt=k(24971),te=k(70045),Ie=k(36237),Ue=k(53075),ze=k(64910),qe=k(39082),gt=k(63356),Rt=k(56119),vt=k(16931),_t=k(51636),St=k(17835);const Nt=Q=>{var C;const G=(C=Q.handleVisible)!==null&&C!==void 0?C:"auto",Xe=Q.controlHeightSM-Q.lineWidth*2;return Object.assign(Object.assign({},(0,ze.T)(Q)),{controlWidth:90,handleWidth:Xe,handleFontSize:Q.fontSize/2,handleVisible:G,handleActiveBg:Q.colorFillAlter,handleBg:Q.colorBgContainer,filledHandleBg:new St.FastColor(Q.colorFillSecondary).onBackground(Q.colorBgContainer).toHexString(),handleHoverColor:Q.colorPrimary,handleBorderColor:Q.colorBorder,handleOpacity:G===!0?1:0,handleVisibleWidth:G===!0?Xe:0})},Pt=(Q,C)=>{let{componentCls:G,borderRadiusSM:Xe,borderRadiusLG:fe}=Q;const Ae=C==="lg"?fe:Xe;return{[`&-${C}`]:{[`${G}-handler-wrap`]:{borderStartEndRadius:Ae,borderEndEndRadius:Ae},[`${G}-handler-up`]:{borderStartEndRadius:Ae},[`${G}-handler-down`]:{borderEndEndRadius:Ae}}}},Ct=Q=>{const{componentCls:C,lineWidth:G,lineType:Xe,borderRadius:fe,inputFontSizeSM:Ae,inputFontSizeLG:Pe,controlHeightLG:j,controlHeightSM:X,colorError:he,paddingInlineSM:Se,paddingBlockSM:$,paddingBlockLG:Qe,paddingInlineLG:le,colorTextDescription:It,motionDurationMid:$t,handleHoverColor:zt,handleOpacity:sr,paddingInline:or,paddingBlock:Kt,handleBg:ur,handleActiveBg:Zr,colorTextDisabled:Tr,borderRadiusSM:fr,borderRadiusLG:Ot,controlWidth:yt,handleBorderColor:bt,filledHandleBg:Jt,lineHeightLG:Sr,calc:Dr}=Q;return[{[C]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(Q)),(0,Ue.ik)(Q)),{display:"inline-block",width:yt,margin:0,padding:0,borderRadius:fe}),(0,qe.qG)(Q,{[`${C}-handler-wrap`]:{background:ur,[`${C}-handler-down`]:{borderBlockStart:`${(0,Ie.unit)(G)} ${Xe} ${bt}`}}})),(0,qe.H8)(Q,{[`${C}-handler-wrap`]:{background:Jt,[`${C}-handler-down`]:{borderBlockStart:`${(0,Ie.unit)(G)} ${Xe} ${bt}`}},"&:focus-within":{[`${C}-handler-wrap`]:{background:ur}}})),(0,qe.vc)(Q,{[`${C}-handler-wrap`]:{background:ur,[`${C}-handler-down`]:{borderBlockStart:`${(0,Ie.unit)(G)} ${Xe} ${bt}`}}})),(0,qe.Mu)(Q)),{"&-rtl":{direction:"rtl",[`${C}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:Pe,lineHeight:Sr,borderRadius:Ot,[`input${C}-input`]:{height:Dr(j).sub(Dr(G).mul(2)).equal(),padding:`${(0,Ie.unit)(Qe)} ${(0,Ie.unit)(le)}`}},"&-sm":{padding:0,fontSize:Ae,borderRadius:fr,[`input${C}-input`]:{height:Dr(X).sub(Dr(G).mul(2)).equal(),padding:`${(0,Ie.unit)($)} ${(0,Ie.unit)(Se)}`}},"&-out-of-range":{[`${C}-input-wrap`]:{input:{color:he}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(Q)),(0,Ue.s7)(Q)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${C}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${C}-group-addon`]:{borderRadius:Ot,fontSize:Q.fontSizeLG}},"&-sm":{[`${C}-group-addon`]:{borderRadius:fr}}},(0,qe.ir)(Q)),(0,qe.S5)(Q)),{[`&:not(${C}-compact-first-item):not(${C}-compact-last-item)${C}-compact-item`]:{[`${C}, ${C}-group-addon`]:{borderRadius:0}},[`&:not(${C}-compact-last-item)${C}-compact-first-item`]:{[`${C}, ${C}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${C}-compact-first-item)${C}-compact-last-item`]:{[`${C}, ${C}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${C}-input`]:{cursor:"not-allowed"},[C]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,gt.Wf)(Q)),{width:"100%",padding:`${(0,Ie.unit)(Kt)} ${(0,Ie.unit)(or)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:fe,outline:0,transition:`all ${$t} linear`,appearance:"textfield",fontSize:"inherit"}),(0,Ue.nz)(Q.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${C}-handler-wrap, &-focused ${C}-handler-wrap`]:{width:Q.handleWidth,opacity:1}})},{[C]:Object.assign(Object.assign(Object.assign({[`${C}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:Q.handleVisibleWidth,opacity:sr,height:"100%",borderStartStartRadius:0,borderStartEndRadius:fe,borderEndEndRadius:fe,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${$t}`,overflow:"hidden",[`${C}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${C}-handler-up-inner,
${C}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:Q.handleFontSize}}},[`${C}-handler`]:{height:"50%",overflow:"hidden",color:It,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${(0,Ie.unit)(G)} ${Xe} ${bt}`,transition:`all ${$t} linear`,"&:active":{background:Zr},"&:hover":{height:"60%",[`
${C}-handler-up-inner,
${C}-handler-down-inner
`]:{color:zt}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,gt.Ro)()),{color:It,transition:`all ${$t} linear`,userSelect:"none"})},[`${C}-handler-up`]:{borderStartEndRadius:fe},[`${C}-handler-down`]:{borderEndEndRadius:fe}},Pt(Q,"lg")),Pt(Q,"sm")),{"&-disabled, &-readonly":{[`${C}-handler-wrap`]:{display:"none"},[`${C}-input`]:{color:"inherit"}},[`
${C}-handler-up-disabled,
${C}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${C}-handler-up-disabled:hover &-handler-up-inner,
${C}-handler-down-disabled:hover &-handler-down-inner
`]:{color:Tr}})}]},Ge=Q=>{const{componentCls:C,paddingBlock:G,paddingInline:Xe,inputAffixPadding:fe,controlWidth:Ae,borderRadiusLG:Pe,borderRadiusSM:j,paddingInlineLG:X,paddingInlineSM:he,paddingBlockLG:Se,paddingBlockSM:$,motionDurationMid:Qe}=Q;return{[`${C}-affix-wrapper`]:Object.assign(Object.assign({[`input${C}-input`]:{padding:`${(0,Ie.unit)(G)} 0`}},(0,Ue.ik)(Q)),{position:"relative",display:"inline-flex",alignItems:"center",width:Ae,padding:0,paddingInlineStart:Xe,"&-lg":{borderRadius:Pe,paddingInlineStart:X,[`input${C}-input`]:{padding:`${(0,Ie.unit)(Se)} 0`}},"&-sm":{borderRadius:j,paddingInlineStart:he,[`input${C}-input`]:{padding:`${(0,Ie.unit)($)} 0`}},[`&:not(${C}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${C}-disabled`]:{background:"transparent"},[`> div${C}`]:{width:"100%",border:"none",outline:"none",[`&${C}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${C}-handler-wrap`]:{zIndex:2},[C]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:fe},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:Xe,marginInlineStart:fe,transition:`margin ${Qe}`}},[`&:hover ${C}-handler-wrap, &-focused ${C}-handler-wrap`]:{width:Q.handleWidth,opacity:1},[`&:not(${C}-affix-wrapper-without-controls):hover ${C}-suffix`]:{marginInlineEnd:Q.calc(Q.handleWidth).add(Xe).equal()}})}};var Tt=(0,vt.I$)("InputNumber",Q=>{const C=(0,_t.mergeToken)(Q,(0,ze.e)(Q));return[Ct(C),Ge(C),(0,Rt.c)(C)]},Nt,{unitless:{handleOpacity:!0}}),Et=function(Q,C){var G={};for(var Xe in Q)Object.prototype.hasOwnProperty.call(Q,Xe)&&C.indexOf(Xe)<0&&(G[Xe]=Q[Xe]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var fe=0,Xe=Object.getOwnPropertySymbols(Q);fe<Xe.length;fe++)C.indexOf(Xe[fe])<0&&Object.prototype.propertyIsEnumerable.call(Q,Xe[fe])&&(G[Xe[fe]]=Q[Xe[fe]]);return G};const ct=y.forwardRef((Q,C)=>{const{getPrefixCls:G,direction:Xe}=y.useContext(mt.E_),fe=y.useRef(null);y.useImperativeHandle(C,()=>fe.current);const{className:Ae,rootClassName:Pe,size:j,disabled:X,prefixCls:he,addonBefore:Se,addonAfter:$,prefix:Qe,suffix:le,bordered:It,readOnly:$t,status:zt,controls:sr,variant:or}=Q,Kt=Et(Q,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),ur=G("input-number",he),Zr=(0,_e.Z)(ur),[Tr,fr,Ot]=Tt(ur,Zr),{compactSize:yt,compactItemClassnames:bt}=(0,te.ri)(ur,Xe);let Jt=y.createElement(ie.Z,{className:`${ur}-handler-up-inner`}),Sr=y.createElement(Ee.Z,{className:`${ur}-handler-down-inner`});const Dr=typeof sr=="boolean"?sr:void 0;typeof sr=="object"&&(Jt=typeof sr.upIcon=="undefined"?Jt:y.createElement("span",{className:`${ur}-handler-up-inner`},sr.upIcon),Sr=typeof sr.downIcon=="undefined"?Sr:y.createElement("span",{className:`${ur}-handler-down-inner`},sr.downIcon));const{hasFeedback:hn,status:Re,isFormItemInput:Je,feedbackIcon:lt}=y.useContext(Ke.aM),Ze=(0,Me.F)(Re,zt),Dt=(0,Ne.Z)(nr=>{var Ar;return(Ar=j!=null?j:yt)!==null&&Ar!==void 0?Ar:nr}),Wt=y.useContext(Ce.Z),cr=X!=null?X:Wt,[Ir,Zt]=(0,nt.Z)("inputNumber",or,It),qt=hn&&y.createElement(y.Fragment,null,lt),gr=J()({[`${ur}-lg`]:Dt==="large",[`${ur}-sm`]:Dt==="small",[`${ur}-rtl`]:Xe==="rtl",[`${ur}-in-form-item`]:Je},fr),hr=`${ur}-group`,vr=y.createElement(tt,Object.assign({ref:fe,disabled:cr,className:J()(Ot,Zr,Ae,Pe,bt),upHandler:Jt,downHandler:Sr,prefixCls:ur,readOnly:$t,controls:Dr,prefix:Qe,suffix:qt||le,addonBefore:Se&&y.createElement(Ft.Z,{form:!0,space:!0},Se),addonAfter:$&&y.createElement(Ft.Z,{form:!0,space:!0},$),classNames:{input:gr,variant:J()({[`${ur}-${Ir}`]:Zt},(0,Me.Z)(ur,Ze,hn)),affixWrapper:J()({[`${ur}-affix-wrapper-sm`]:Dt==="small",[`${ur}-affix-wrapper-lg`]:Dt==="large",[`${ur}-affix-wrapper-rtl`]:Xe==="rtl",[`${ur}-affix-wrapper-without-controls`]:sr===!1||cr},fr),wrapper:J()({[`${hr}-rtl`]:Xe==="rtl"},fr),groupWrapper:J()({[`${ur}-group-wrapper-sm`]:Dt==="small",[`${ur}-group-wrapper-lg`]:Dt==="large",[`${ur}-group-wrapper-rtl`]:Xe==="rtl",[`${ur}-group-wrapper-${Ir}`]:Zt},(0,Me.Z)(`${ur}-group-wrapper`,Ze,hn),fr)}},Kt));return Tr(vr)}),Lt=ct,_=Q=>y.createElement(ke.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},y.createElement(ct,Object.assign({},Q)));Lt._InternalPanelDoNotUseOrYouWillBeFired=_;var T=Lt},49397:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return O}});var y=k(59301),Ee=k(92310),ie=k.n(Ee),be=k(36901),J=k(8654),v=k(62487),de=k(86013),ce=k(82855),l=k(48755),V=k(2171),B=k(83397),E=k(31756),L=k(56553),x=k(24971),P=k(70045),q=k(23826),H=k(53075);function U(N){return!!(N.prefix||N.suffix||N.allowClear||N.showCount)}var A=function(N,oe){var ve={};for(var pe in N)Object.prototype.hasOwnProperty.call(N,pe)&&oe.indexOf(pe)<0&&(ve[pe]=N[pe]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,pe=Object.getOwnPropertySymbols(N);De<pe.length;De++)oe.indexOf(pe[De])<0&&Object.prototype.propertyIsEnumerable.call(N,pe[De])&&(ve[pe[De]]=N[pe[De]]);return ve},O=(0,y.forwardRef)((N,oe)=>{const{prefixCls:ve,bordered:pe=!0,status:De,size:Oe,disabled:Fe,onBlur:st,onFocus:re,suffix:W,allowClear:ee,addonAfter:ue,addonBefore:ne,className:ae,style:S,styles:w,rootClassName:K,onChange:ye,classNames:Be,variant:He}=N,ot=A(N,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:at,direction:pt,allowClear:At,autoComplete:ut,className:jt,style:tt,classNames:Ft,styles:Me}=(0,l.dj)("input"),mt=at("input",ve),ke=(0,y.useRef)(null),Ce=(0,B.Z)(mt),[_e,Ne,Ke]=(0,H.TI)(mt,K),[nt]=(0,H.ZP)(mt,Ce),{compactSize:te,compactItemClassnames:Ie}=(0,P.ri)(mt,pt),Ue=(0,E.Z)(T=>{var Q;return(Q=Oe!=null?Oe:te)!==null&&Q!==void 0?Q:T}),ze=y.useContext(V.Z),qe=Fe!=null?Fe:ze,{status:gt,hasFeedback:Rt,feedbackIcon:vt}=(0,y.useContext)(L.aM),_t=(0,ce.F)(gt,De),St=U(N)||!!Rt,Nt=(0,y.useRef)(St),Pt=(0,q.Z)(ke,!0),Ct=T=>{Pt(),st==null||st(T)},Ge=T=>{Pt(),re==null||re(T)},Tt=T=>{Pt(),ye==null||ye(T)},Et=(Rt||W)&&y.createElement(y.Fragment,null,W,Rt&&vt),ct=(0,de.Z)(ee!=null?ee:At),[Lt,_]=(0,x.Z)("input",He,pe);return _e(nt(y.createElement(be.default,Object.assign({ref:(0,J.sQ)(oe,ke),prefixCls:mt,autoComplete:ut},ot,{disabled:qe,onBlur:Ct,onFocus:Ge,style:Object.assign(Object.assign({},tt),S),styles:Object.assign(Object.assign({},Me),w),suffix:Et,allowClear:ct,className:ie()(ae,K,Ke,Ce,Ie,jt),onChange:Tt,addonBefore:ne&&y.createElement(v.Z,{form:!0,space:!0},ne),addonAfter:ue&&y.createElement(v.Z,{form:!0,space:!0},ue),classNames:Object.assign(Object.assign(Object.assign({},Be),Ft),{input:ie()({[`${mt}-sm`]:Ue==="small",[`${mt}-lg`]:Ue==="large",[`${mt}-rtl`]:pt==="rtl"},Be==null?void 0:Be.input,Ft.input,Ne),variant:ie()({[`${mt}-${Lt}`]:_},(0,ce.Z)(mt,_t)),affixWrapper:ie()({[`${mt}-affix-wrapper-sm`]:Ue==="small",[`${mt}-affix-wrapper-lg`]:Ue==="large",[`${mt}-affix-wrapper-rtl`]:pt==="rtl"},Ne),wrapper:ie()({[`${mt}-group-rtl`]:pt==="rtl"},Ne),groupWrapper:ie()({[`${mt}-group-wrapper-sm`]:Ue==="small",[`${mt}-group-wrapper-lg`]:Ue==="large",[`${mt}-group-wrapper-rtl`]:pt==="rtl",[`${mt}-group-wrapper-${Lt}`]:_},(0,ce.Z)(`${mt}-group-wrapper`,_t,Rt),Ne)})}))))})},79809:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return oe}});var y=k(59301),Ee=k(92310),ie=k.n(Ee),be=k(22711),J=k(86013),v=k(82855),de=k(48755),ce=k(2171),l=k(83397),V=k(31756),B=k(56553),E=k(24971),L=k(70045),x=k(30292),P=k(53075),q=k(16931),H=k(51636),U=k(64910);const A=ve=>{const{componentCls:pe,paddingLG:De}=ve,Oe=`${pe}-textarea`;return{[`textarea${pe}`]:{maxWidth:"100%",height:"auto",minHeight:ve.controlHeight,lineHeight:ve.lineHeight,verticalAlign:"bottom",transition:`all ${ve.motionDurationSlow}`,resize:"vertical",[`&${pe}-mouse-active`]:{transition:`all ${ve.motionDurationSlow}, height 0s, width 0s`}},[`${pe}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Oe]:{position:"relative","&-show-count":{[`> ${pe}`]:{height:"100%"},[`${pe}-data-count`]:{position:"absolute",bottom:ve.calc(ve.fontSize).mul(ve.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:ve.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${pe},
&-affix-wrapper${Oe}-has-feedback ${pe}
`]:{paddingInlineEnd:De},[`&-affix-wrapper${pe}-affix-wrapper`]:{padding:0,[`> textarea${pe}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:ve.calc(ve.controlHeight).sub(ve.calc(ve.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${pe}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${pe}-clear-icon`]:{position:"absolute",insetInlineEnd:ve.paddingInline,insetBlockStart:ve.paddingXS},[`${Oe}-suffix`]:{position:"absolute",top:0,insetInlineEnd:ve.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${pe}-affix-wrapper-sm`]:{[`${pe}-suffix`]:{[`${pe}-clear-icon`]:{insetInlineEnd:ve.paddingInlineSM}}}}}};var z=(0,q.I$)(["Input","TextArea"],ve=>{const pe=(0,H.mergeToken)(ve,(0,U.e)(ve));return[A(pe)]},U.T,{resetFont:!1}),O=function(ve,pe){var De={};for(var Oe in ve)Object.prototype.hasOwnProperty.call(ve,Oe)&&pe.indexOf(Oe)<0&&(De[Oe]=ve[Oe]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Fe=0,Oe=Object.getOwnPropertySymbols(ve);Fe<Oe.length;Fe++)pe.indexOf(Oe[Fe])<0&&Object.prototype.propertyIsEnumerable.call(ve,Oe[Fe])&&(De[Oe[Fe]]=ve[Oe[Fe]]);return De},oe=(0,y.forwardRef)((ve,pe)=>{var De;const{prefixCls:Oe,bordered:Fe=!0,size:st,disabled:re,status:W,allowClear:ee,classNames:ue,rootClassName:ne,className:ae,style:S,styles:w,variant:K,showCount:ye,onMouseDown:Be,onResize:He}=ve,ot=O(ve,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:at,direction:pt,allowClear:At,autoComplete:ut,className:jt,style:tt,classNames:Ft,styles:Me}=(0,de.dj)("textArea"),mt=y.useContext(ce.Z),ke=re!=null?re:mt,{status:Ce,hasFeedback:_e,feedbackIcon:Ne}=y.useContext(B.aM),Ke=(0,v.F)(Ce,W),nt=y.useRef(null);y.useImperativeHandle(pe,()=>{var _;return{resizableTextArea:(_=nt.current)===null||_===void 0?void 0:_.resizableTextArea,focus:T=>{var Q,C;(0,x.nH)((C=(Q=nt.current)===null||Q===void 0?void 0:Q.resizableTextArea)===null||C===void 0?void 0:C.textArea,T)},blur:()=>{var T;return(T=nt.current)===null||T===void 0?void 0:T.blur()}}});const te=at("input",Oe),Ie=(0,l.Z)(te),[Ue,ze,qe]=(0,P.TI)(te,ne),[gt]=z(te,Ie),{compactSize:Rt,compactItemClassnames:vt}=(0,L.ri)(te,pt),_t=(0,V.Z)(_=>{var T;return(T=st!=null?st:Rt)!==null&&T!==void 0?T:_}),[St,Nt]=(0,E.Z)("textArea",K,Fe),Pt=(0,J.Z)(ee!=null?ee:At),[Ct,Ge]=y.useState(!1),[Tt,Et]=y.useState(!1),ct=_=>{Ge(!0),Be==null||Be(_);const T=()=>{Ge(!1),document.removeEventListener("mouseup",T)};document.addEventListener("mouseup",T)},Lt=_=>{var T,Q;if(He==null||He(_),Ct&&typeof getComputedStyle=="function"){const C=(Q=(T=nt.current)===null||T===void 0?void 0:T.nativeElement)===null||Q===void 0?void 0:Q.querySelector("textarea");C&&getComputedStyle(C).resize==="both"&&Et(!0)}};return Ue(gt(y.createElement(be.default,Object.assign({autoComplete:ut},ot,{style:Object.assign(Object.assign({},tt),S),styles:Object.assign(Object.assign({},Me),w),disabled:ke,allowClear:Pt,className:ie()(qe,Ie,ae,ne,vt,jt,Tt&&`${te}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},ue),Ft),{textarea:ie()({[`${te}-sm`]:_t==="small",[`${te}-lg`]:_t==="large"},ze,ue==null?void 0:ue.textarea,Ft.textarea,Ct&&`${te}-mouse-active`),variant:ie()({[`${te}-${St}`]:Nt},(0,v.Z)(te,Ke)),affixWrapper:ie()(`${te}-textarea-affix-wrapper`,{[`${te}-affix-wrapper-rtl`]:pt==="rtl",[`${te}-affix-wrapper-sm`]:_t==="small",[`${te}-affix-wrapper-lg`]:_t==="large",[`${te}-textarea-show-count`]:ye||((De=ve.count)===null||De===void 0?void 0:De.show)},ze)}),prefixCls:te,suffix:_e&&y.createElement("span",{className:`${te}-textarea-suffix`},Ne),showCount:ye,ref:nt,onResize:Lt,onMouseDown:ct}))))})},23826:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return Ee}});var y=k(59301);function Ee(ie,be){const J=(0,y.useRef)([]),v=()=>{J.current.push(setTimeout(()=>{var de,ce,l,V;!((de=ie.current)===null||de===void 0)&&de.input&&((ce=ie.current)===null||ce===void 0?void 0:ce.input.getAttribute("type"))==="password"&&(!((l=ie.current)===null||l===void 0)&&l.input.hasAttribute("value"))&&((V=ie.current)===null||V===void 0||V.input.removeAttribute("value"))}))};return(0,y.useEffect)(()=>(be&&v(),()=>J.current.forEach(de=>{de&&clearTimeout(de)})),[]),v}},37568:function(Vt,it,k){"use strict";k.d(it,{default:function(){return Ft}});var y=k(59301),Ee=k(92310),ie=k.n(Ee),be=k(48755),J=k(56553),v=k(53075),ce=Me=>{const{getPrefixCls:mt,direction:ke}=(0,y.useContext)(be.E_),{prefixCls:Ce,className:_e}=Me,Ne=mt("input-group",Ce),Ke=mt("input"),[nt,te,Ie]=(0,v.ZP)(Ke),Ue=ie()(Ne,Ie,{[`${Ne}-lg`]:Me.size==="large",[`${Ne}-sm`]:Me.size==="small",[`${Ne}-compact`]:Me.compact,[`${Ne}-rtl`]:ke==="rtl"},te,_e),ze=(0,y.useContext)(J.aM),qe=(0,y.useMemo)(()=>Object.assign(Object.assign({},ze),{isFormItemInput:!1}),[ze]);return nt(y.createElement("span",{className:Ue,style:Me.style,onMouseEnter:Me.onMouseEnter,onMouseLeave:Me.onMouseLeave,onFocus:Me.onFocus,onBlur:Me.onBlur},y.createElement(J.aM.Provider,{value:qe},Me.children)))},l=k(49397),V=k(77654),B=k(6089),E=k(26112),L=k(82855),x=k(31756),P=k(16931),q=k(51636),H=k(64910);const U=Me=>{const{componentCls:mt,paddingXS:ke}=Me;return{[mt]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:ke,"&-rtl":{direction:"rtl"},[`${mt}-input`]:{textAlign:"center",paddingInline:Me.paddingXXS},[`&${mt}-sm ${mt}-input`]:{paddingInline:Me.calc(Me.paddingXXS).div(2).equal()},[`&${mt}-lg ${mt}-input`]:{paddingInline:Me.paddingXS}}}};var A=(0,P.I$)(["Input","OTP"],Me=>{const mt=(0,q.mergeToken)(Me,(0,H.e)(Me));return[U(mt)]},H.T),z=k(16089),O=function(Me,mt){var ke={};for(var Ce in Me)Object.prototype.hasOwnProperty.call(Me,Ce)&&mt.indexOf(Ce)<0&&(ke[Ce]=Me[Ce]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,Ce=Object.getOwnPropertySymbols(Me);_e<Ce.length;_e++)mt.indexOf(Ce[_e])<0&&Object.prototype.propertyIsEnumerable.call(Me,Ce[_e])&&(ke[Ce[_e]]=Me[Ce[_e]]);return ke},oe=y.forwardRef((Me,mt)=>{const{value:ke,onChange:Ce,onActiveChange:_e,index:Ne,mask:Ke}=Me,nt=O(Me,["value","onChange","onActiveChange","index","mask"]),te=ke&&typeof Ke=="string"?Ke:ke,Ie=Rt=>{Ce(Ne,Rt.target.value)},Ue=y.useRef(null);y.useImperativeHandle(mt,()=>Ue.current);const ze=()=>{(0,z.Z)(()=>{var Rt;const vt=(Rt=Ue.current)===null||Rt===void 0?void 0:Rt.input;document.activeElement===vt&&vt&&vt.select()})},qe=Rt=>{const{key:vt,ctrlKey:_t,metaKey:St}=Rt;vt==="ArrowLeft"?_e(Ne-1):vt==="ArrowRight"?_e(Ne+1):vt==="z"&&(_t||St)&&Rt.preventDefault(),ze()},gt=Rt=>{Rt.key==="Backspace"&&!ke&&_e(Ne-1),ze()};return y.createElement(l.Z,Object.assign({type:Ke===!0?"password":"text"},nt,{ref:Ue,value:te,onInput:Ie,onFocus:ze,onKeyDown:qe,onKeyUp:gt,onMouseDown:ze,onMouseUp:ze}))}),ve=function(Me,mt){var ke={};for(var Ce in Me)Object.prototype.hasOwnProperty.call(Me,Ce)&&mt.indexOf(Ce)<0&&(ke[Ce]=Me[Ce]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,Ce=Object.getOwnPropertySymbols(Me);_e<Ce.length;_e++)mt.indexOf(Ce[_e])<0&&Object.prototype.propertyIsEnumerable.call(Me,Ce[_e])&&(ke[Ce[_e]]=Me[Ce[_e]]);return ke};function pe(Me){return(Me||"").split("")}const De=Me=>{const{index:mt,prefixCls:ke,separator:Ce}=Me,_e=typeof Ce=="function"?Ce(mt):Ce;return _e?y.createElement("span",{className:`${ke}-separator`},_e):null};var Fe=y.forwardRef((Me,mt)=>{const{prefixCls:ke,length:Ce=6,size:_e,defaultValue:Ne,value:Ke,onChange:nt,formatter:te,separator:Ie,variant:Ue,disabled:ze,status:qe,autoFocus:gt,mask:Rt,type:vt,onInput:_t,inputMode:St}=Me,Nt=ve(Me,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:Pt,direction:Ct}=y.useContext(be.E_),Ge=Pt("otp",ke),Tt=(0,E.Z)(Nt,{aria:!0,data:!0,attr:!0}),[Et,ct,Lt]=A(Ge),_=(0,x.Z)(Qe=>_e!=null?_e:Qe),T=y.useContext(J.aM),Q=(0,L.F)(T.status,qe),C=y.useMemo(()=>Object.assign(Object.assign({},T),{status:Q,hasFeedback:!1,feedbackIcon:null}),[T,Q]),G=y.useRef(null),Xe=y.useRef({});y.useImperativeHandle(mt,()=>({focus:()=>{var Qe;(Qe=Xe.current[0])===null||Qe===void 0||Qe.focus()},blur:()=>{var Qe;for(let le=0;le<Ce;le+=1)(Qe=Xe.current[le])===null||Qe===void 0||Qe.blur()},nativeElement:G.current}));const fe=Qe=>te?te(Qe):Qe,[Ae,Pe]=y.useState(()=>pe(fe(Ne||"")));y.useEffect(()=>{Ke!==void 0&&Pe(pe(Ke))},[Ke]);const j=(0,B.Z)(Qe=>{Pe(Qe),_t&&_t(Qe),nt&&Qe.length===Ce&&Qe.every(le=>le)&&Qe.some((le,It)=>Ae[It]!==le)&&nt(Qe.join(""))}),X=(0,B.Z)((Qe,le)=>{let It=(0,V.Z)(Ae);for(let zt=0;zt<Qe;zt+=1)It[zt]||(It[zt]="");le.length<=1?It[Qe]=le:It=It.slice(0,Qe).concat(pe(le)),It=It.slice(0,Ce);for(let zt=It.length-1;zt>=0&&!It[zt];zt-=1)It.pop();const $t=fe(It.map(zt=>zt||" ").join(""));return It=pe($t).map((zt,sr)=>zt===" "&&!It[sr]?It[sr]:zt),It}),he=(Qe,le)=>{var It;const $t=X(Qe,le),zt=Math.min(Qe+le.length,Ce-1);zt!==Qe&&$t[Qe]!==void 0&&((It=Xe.current[zt])===null||It===void 0||It.focus()),j($t)},Se=Qe=>{var le;(le=Xe.current[Qe])===null||le===void 0||le.focus()},$={variant:Ue,disabled:ze,status:Q,mask:Rt,type:vt,inputMode:St};return Et(y.createElement("div",Object.assign({},Tt,{ref:G,className:ie()(Ge,{[`${Ge}-sm`]:_==="small",[`${Ge}-lg`]:_==="large",[`${Ge}-rtl`]:Ct==="rtl"},Lt,ct)}),y.createElement(J.aM.Provider,{value:C},Array.from({length:Ce}).map((Qe,le)=>{const It=`otp-${le}`,$t=Ae[le]||"";return y.createElement(y.Fragment,{key:It},y.createElement(oe,Object.assign({ref:zt=>{Xe.current[le]=zt},index:le,size:_,htmlSize:1,className:`${Ge}-input`,onChange:he,value:$t,onActiveChange:Se,autoFocus:le===0&&gt},$)),le<Ce-1&&y.createElement(De,{separator:Ie,index:le,prefixCls:Ge}))}))))}),st=k(73331),re=k(15277),W=k(2738),ee=k(8654),ue=k(2171),ne=k(23826),ae=function(Me,mt){var ke={};for(var Ce in Me)Object.prototype.hasOwnProperty.call(Me,Ce)&&mt.indexOf(Ce)<0&&(ke[Ce]=Me[Ce]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,Ce=Object.getOwnPropertySymbols(Me);_e<Ce.length;_e++)mt.indexOf(Ce[_e])<0&&Object.prototype.propertyIsEnumerable.call(Me,Ce[_e])&&(ke[Ce[_e]]=Me[Ce[_e]]);return ke};const S=Me=>Me?y.createElement(re.Z,null):y.createElement(st.Z,null),w={click:"onClick",hover:"onMouseOver"};var ye=y.forwardRef((Me,mt)=>{const{disabled:ke,action:Ce="click",visibilityToggle:_e=!0,iconRender:Ne=S}=Me,Ke=y.useContext(ue.Z),nt=ke!=null?ke:Ke,te=typeof _e=="object"&&_e.visible!==void 0,[Ie,Ue]=(0,y.useState)(()=>te?_e.visible:!1),ze=(0,y.useRef)(null);y.useEffect(()=>{te&&Ue(_e.visible)},[te,_e]);const qe=(0,ne.Z)(ze),gt=()=>{var _;if(nt)return;Ie&&qe();const T=!Ie;Ue(T),typeof _e=="object"&&((_=_e.onVisibleChange)===null||_===void 0||_.call(_e,T))},Rt=_=>{const T=w[Ce]||"",Q=Ne(Ie),C={[T]:gt,className:`${_}-icon`,key:"passwordIcon",onMouseDown:G=>{G.preventDefault()},onMouseUp:G=>{G.preventDefault()}};return y.cloneElement(y.isValidElement(Q)?Q:y.createElement("span",null,Q),C)},{className:vt,prefixCls:_t,inputPrefixCls:St,size:Nt}=Me,Pt=ae(Me,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Ct}=y.useContext(be.E_),Ge=Ct("input",St),Tt=Ct("input-password",_t),Et=_e&&Rt(Tt),ct=ie()(Tt,vt,{[`${Tt}-${Nt}`]:!!Nt}),Lt=Object.assign(Object.assign({},(0,W.Z)(Pt,["suffix","iconRender","visibilityToggle"])),{type:Ie?"text":"password",className:ct,prefixCls:Ge,suffix:Et});return Nt&&(Lt.size=Nt),y.createElement(l.Z,Object.assign({ref:(0,ee.sQ)(mt,ze)},Lt))}),Be=k(47472),He=k(22703),ot=k(7939),at=k(70045),pt=function(Me,mt){var ke={};for(var Ce in Me)Object.prototype.hasOwnProperty.call(Me,Ce)&&mt.indexOf(Ce)<0&&(ke[Ce]=Me[Ce]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,Ce=Object.getOwnPropertySymbols(Me);_e<Ce.length;_e++)mt.indexOf(Ce[_e])<0&&Object.prototype.propertyIsEnumerable.call(Me,Ce[_e])&&(ke[Ce[_e]]=Me[Ce[_e]]);return ke},ut=y.forwardRef((Me,mt)=>{const{prefixCls:ke,inputPrefixCls:Ce,className:_e,size:Ne,suffix:Ke,enterButton:nt=!1,addonAfter:te,loading:Ie,disabled:Ue,onSearch:ze,onChange:qe,onCompositionStart:gt,onCompositionEnd:Rt}=Me,vt=pt(Me,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:_t,direction:St}=y.useContext(be.E_),Nt=y.useRef(!1),Pt=_t("input-search",ke),Ct=_t("input",Ce),{compactSize:Ge}=(0,at.ri)(Pt,St),Tt=(0,x.Z)(he=>{var Se;return(Se=Ne!=null?Ne:Ge)!==null&&Se!==void 0?Se:he}),Et=y.useRef(null),ct=he=>{he!=null&&he.target&&he.type==="click"&&ze&&ze(he.target.value,he,{source:"clear"}),qe==null||qe(he)},Lt=he=>{var Se;document.activeElement===((Se=Et.current)===null||Se===void 0?void 0:Se.input)&&he.preventDefault()},_=he=>{var Se,$;ze&&ze(($=(Se=Et.current)===null||Se===void 0?void 0:Se.input)===null||$===void 0?void 0:$.value,he,{source:"input"})},T=he=>{Nt.current||Ie||_(he)},Q=typeof nt=="boolean"?y.createElement(Be.Z,null):null,C=`${Pt}-button`;let G;const Xe=nt||{},fe=Xe.type&&Xe.type.__ANT_BUTTON===!0;fe||Xe.type==="button"?G=(0,He.Tm)(Xe,Object.assign({onMouseDown:Lt,onClick:he=>{var Se,$;($=(Se=Xe==null?void 0:Xe.props)===null||Se===void 0?void 0:Se.onClick)===null||$===void 0||$.call(Se,he),_(he)},key:"enterButton"},fe?{className:C,size:Tt}:{})):G=y.createElement(ot.ZP,{className:C,type:nt?"primary":void 0,size:Tt,disabled:Ue,key:"enterButton",onMouseDown:Lt,onClick:_,loading:Ie,icon:Q},nt),te&&(G=[G,(0,He.Tm)(te,{key:"addonAfter"})]);const Ae=ie()(Pt,{[`${Pt}-rtl`]:St==="rtl",[`${Pt}-${Tt}`]:!!Tt,[`${Pt}-with-button`]:!!nt},_e),Pe=Object.assign(Object.assign({},vt),{className:Ae,prefixCls:Ct,type:"search"}),j=he=>{Nt.current=!0,gt==null||gt(he)},X=he=>{Nt.current=!1,Rt==null||Rt(he)};return y.createElement(l.Z,Object.assign({ref:(0,ee.sQ)(Et,mt),onPressEnter:T},Pe,{size:Tt,onCompositionStart:j,onCompositionEnd:X,addonAfter:G,suffix:Ke,onChange:ct,disabled:Ue}))}),jt=k(79809);const tt=l.Z;tt.Group=ce,tt.Search=ut,tt.TextArea=jt.Z,tt.Password=ye,tt.OTP=Fe;var Ft=tt},53075:function(Vt,it,k){"use strict";k.d(it,{TI:function(){return z},ik:function(){return E},nz:function(){return ce},s7:function(){return L},x0:function(){return B}});var y=k(36237),Ee=k(63356),ie=k(56119),be=k(16931),J=k(51636),v=k(64910),de=k(39082);const ce=O=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:O,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),l=O=>({borderColor:O.activeBorderColor,boxShadow:O.activeShadow,outline:0,backgroundColor:O.activeBg}),V=O=>{const{paddingBlockLG:N,lineHeightLG:oe,borderRadiusLG:ve,paddingInlineLG:pe}=O;return{padding:`${(0,y.unit)(N)} ${(0,y.unit)(pe)}`,fontSize:O.inputFontSizeLG,lineHeight:oe,borderRadius:ve}},B=O=>({padding:`${(0,y.unit)(O.paddingBlockSM)} ${(0,y.unit)(O.paddingInlineSM)}`,fontSize:O.inputFontSizeSM,borderRadius:O.borderRadiusSM}),E=O=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,y.unit)(O.paddingBlock)} ${(0,y.unit)(O.paddingInline)}`,color:O.colorText,fontSize:O.inputFontSize,lineHeight:O.lineHeight,borderRadius:O.borderRadius,transition:`all ${O.motionDurationMid}`},ce(O.colorTextPlaceholder)),{"&-lg":Object.assign({},V(O)),"&-sm":Object.assign({},B(O)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),L=O=>{const{componentCls:N,antCls:oe}=O;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:O.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${N}, &-lg > ${N}-group-addon`]:Object.assign({},V(O)),[`&-sm ${N}, &-sm > ${N}-group-addon`]:Object.assign({},B(O)),[`&-lg ${oe}-select-single ${oe}-select-selector`]:{height:O.controlHeightLG},[`&-sm ${oe}-select-single ${oe}-select-selector`]:{height:O.controlHeightSM},[`> ${N}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${N}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${(0,y.unit)(O.paddingInline)}`,color:O.colorText,fontWeight:"normal",fontSize:O.inputFontSize,textAlign:"center",borderRadius:O.borderRadius,transition:`all ${O.motionDurationSlow}`,lineHeight:1,[`${oe}-select`]:{margin:`${(0,y.unit)(O.calc(O.paddingBlock).add(1).mul(-1).equal())} ${(0,y.unit)(O.calc(O.paddingInline).mul(-1).equal())}`,[`&${oe}-select-single:not(${oe}-select-customize-input):not(${oe}-pagination-size-changer)`]:{[`${oe}-select-selector`]:{backgroundColor:"inherit",border:`${(0,y.unit)(O.lineWidth)} ${O.lineType} transparent`,boxShadow:"none"}}},[`${oe}-cascader-picker`]:{margin:`-9px ${(0,y.unit)(O.calc(O.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${oe}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[N]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${N}-search-with-button &`]:{zIndex:0}}},[`> ${N}:first-child, ${N}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${oe}-select ${oe}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${N}-affix-wrapper`]:{[`&:not(:first-child) ${N}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${N}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${N}:last-child, ${N}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${oe}-select ${oe}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${N}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${N}-search &`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius}},[`&:not(:first-child), ${N}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${N}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,Ee.dF)()),{[`${N}-group-addon, ${N}-group-wrap, > ${N}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:O.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${N}-affix-wrapper,
& > ${N}-number-affix-wrapper,
& > ${oe}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:O.calc(O.lineWidth).mul(-1).equal(),borderInlineEndWidth:O.lineWidth},[N]:{float:"none"},[`& > ${oe}-select > ${oe}-select-selector,
& > ${oe}-select-auto-complete ${N},
& > ${oe}-cascader-picker ${N},
& > ${N}-group-wrapper ${N}`]:{borderInlineEndWidth:O.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${oe}-select-focused`]:{zIndex:1},[`& > ${oe}-select > ${oe}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${oe}-select:first-child > ${oe}-select-selector,
& > ${oe}-select-auto-complete:first-child ${N},
& > ${oe}-cascader-picker:first-child ${N}`]:{borderStartStartRadius:O.borderRadius,borderEndStartRadius:O.borderRadius},[`& > *:last-child,
& > ${oe}-select:last-child > ${oe}-select-selector,
& > ${oe}-cascader-picker:last-child ${N},
& > ${oe}-cascader-picker-focused:last-child ${N}`]:{borderInlineEndWidth:O.lineWidth,borderStartEndRadius:O.borderRadius,borderEndEndRadius:O.borderRadius},[`& > ${oe}-select-auto-complete ${N}`]:{verticalAlign:"top"},[`${N}-group-wrapper + ${N}-group-wrapper`]:{marginInlineStart:O.calc(O.lineWidth).mul(-1).equal(),[`${N}-affix-wrapper`]:{borderRadius:0}},[`${N}-group-wrapper:not(:last-child)`]:{[`&${N}-search > ${N}-group`]:{[`& > ${N}-group-addon > ${N}-search-button`]:{borderRadius:0},[`& > ${N}`]:{borderStartStartRadius:O.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:O.borderRadius}}}})}},x=O=>{const{componentCls:N,controlHeightSM:oe,lineWidth:ve,calc:pe}=O,Oe=pe(oe).sub(pe(ve).mul(2)).sub(16).div(2).equal();return{[N]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ee.Wf)(O)),E(O)),(0,de.qG)(O)),(0,de.H8)(O)),(0,de.Mu)(O)),(0,de.vc)(O)),{'&[type="color"]':{height:O.controlHeight,[`&${N}-lg`]:{height:O.controlHeightLG},[`&${N}-sm`]:{height:oe,paddingTop:Oe,paddingBottom:Oe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},P=O=>{const{componentCls:N}=O;return{[`${N}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:O.colorTextQuaternary,fontSize:O.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${O.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:O.colorTextTertiary},"&:active":{color:O.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,y.unit)(O.inputAffixPadding)}`}}}},q=O=>{const{componentCls:N,inputAffixPadding:oe,colorTextDescription:ve,motionDurationSlow:pe,colorIcon:De,colorIconHover:Oe,iconCls:Fe}=O,st=`${N}-affix-wrapper`,re=`${N}-affix-wrapper-disabled`;return{[st]:Object.assign(Object.assign(Object.assign(Object.assign({},E(O)),{display:"inline-flex",[`&:not(${N}-disabled):hover`]:{zIndex:1,[`${N}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${N}`]:{padding:0},[`> input${N}, > textarea${N}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[N]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:O.paddingXS}},"&-show-count-suffix":{color:ve},"&-show-count-has-suffix":{marginInlineEnd:O.paddingXXS},"&-prefix":{marginInlineEnd:oe},"&-suffix":{marginInlineStart:oe}}}),P(O)),{[`${Fe}${N}-password-icon`]:{color:De,cursor:"pointer",transition:`all ${pe}`,"&:hover":{color:Oe}}}),[`${N}-underlined`]:{borderRadius:0},[re]:{[`${Fe}${N}-password-icon`]:{color:De,cursor:"not-allowed","&:hover":{color:De}}}}},H=O=>{const{componentCls:N,borderRadiusLG:oe,borderRadiusSM:ve}=O;return{[`${N}-group`]:Object.assign(Object.assign(Object.assign({},(0,Ee.Wf)(O)),L(O)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${N}-group-addon`]:{borderRadius:oe,fontSize:O.inputFontSizeLG}},"&-sm":{[`${N}-group-addon`]:{borderRadius:ve}}},(0,de.ir)(O)),(0,de.S5)(O)),{[`&:not(${N}-compact-first-item):not(${N}-compact-last-item)${N}-compact-item`]:{[`${N}, ${N}-group-addon`]:{borderRadius:0}},[`&:not(${N}-compact-last-item)${N}-compact-first-item`]:{[`${N}, ${N}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${N}-compact-first-item)${N}-compact-last-item`]:{[`${N}, ${N}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${N}-compact-last-item)${N}-compact-item`]:{[`${N}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${N}-compact-first-item)${N}-compact-item`]:{[`${N}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},U=O=>{const{componentCls:N,antCls:oe}=O,ve=`${N}-search`;return{[ve]:{[N]:{"&:hover, &:focus":{[`+ ${N}-group-addon ${ve}-button:not(${oe}-btn-primary)`]:{borderInlineStartColor:O.colorPrimaryHover}}},[`${N}-affix-wrapper`]:{height:O.controlHeight,borderRadius:0},[`${N}-lg`]:{lineHeight:O.calc(O.lineHeightLG).sub(2e-4).equal()},[`> ${N}-group`]:{[`> ${N}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${ve}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${ve}-button:not(${oe}-btn-primary)`]:{color:O.colorTextDescription,"&:hover":{color:O.colorPrimaryHover},"&:active":{color:O.colorPrimaryActive},[`&${oe}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${ve}-button`]:{height:O.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${N}-affix-wrapper, ${ve}-button`]:{height:O.controlHeightLG}},"&-small":{[`${N}-affix-wrapper, ${ve}-button`]:{height:O.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${N}-compact-item`]:{[`&:not(${N}-compact-last-item)`]:{[`${N}-group-addon`]:{[`${N}-search-button`]:{marginInlineEnd:O.calc(O.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${N}-compact-first-item)`]:{[`${N},${N}-affix-wrapper`]:{borderRadius:0}},[`> ${N}-group-addon ${N}-search-button,
> ${N},
${N}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${N}-affix-wrapper-focused`]:{zIndex:2}}}}},A=O=>{const{componentCls:N}=O;return{[`${N}-out-of-range`]:{[`&, & input, & textarea, ${N}-show-count-suffix, ${N}-data-count`]:{color:O.colorError}}}},z=(0,be.I$)(["Input","Shared"],O=>{const N=(0,J.mergeToken)(O,(0,v.e)(O));return[x(N),q(N)]},v.T,{resetFont:!1});it.ZP=(0,be.I$)(["Input","Component"],O=>{const N=(0,J.mergeToken)(O,(0,v.e)(O));return[H(N),U(N),A(N),(0,ie.c)(N)]},v.T,{resetFont:!1})},64910:function(Vt,it,k){"use strict";k.d(it,{T:function(){return ie},e:function(){return Ee}});var y=k(51636);function Ee(be){return(0,y.mergeToken)(be,{inputAffixPadding:be.paddingXXS})}const ie=be=>{const{controlHeight:J,fontSize:v,lineHeight:de,lineWidth:ce,controlHeightSM:l,controlHeightLG:V,fontSizeLG:B,lineHeightLG:E,paddingSM:L,controlPaddingHorizontalSM:x,controlPaddingHorizontal:P,colorFillAlter:q,colorPrimaryHover:H,colorPrimary:U,controlOutlineWidth:A,controlOutline:z,colorErrorOutline:O,colorWarningOutline:N,colorBgContainer:oe,inputFontSize:ve,inputFontSizeLG:pe,inputFontSizeSM:De}=be,Oe=ve||v,Fe=De||Oe,st=pe||B,re=Math.round((J-Oe*de)/2*10)/10-ce,W=Math.round((l-Fe*de)/2*10)/10-ce,ee=Math.ceil((V-st*E)/2*10)/10-ce;return{paddingBlock:Math.max(re,0),paddingBlockSM:Math.max(W,0),paddingBlockLG:Math.max(ee,0),paddingInline:L-ce,paddingInlineSM:x-ce,paddingInlineLG:P-ce,addonBg:q,activeBorderColor:U,hoverBorderColor:H,activeShadow:`0 0 0 ${A}px ${z}`,errorActiveShadow:`0 0 0 ${A}px ${O}`,warningActiveShadow:`0 0 0 ${A}px ${N}`,hoverBg:oe,activeBg:oe,inputFontSize:Oe,inputFontSizeLG:st,inputFontSizeSM:Fe}}},39082:function(Vt,it,k){"use strict";k.d(it,{$U:function(){return J},H8:function(){return L},Mu:function(){return V},S5:function(){return P},Xy:function(){return be},ir:function(){return l},qG:function(){return de},vc:function(){return U}});var y=k(36237),Ee=k(51636);const ie=A=>({borderColor:A.hoverBorderColor,backgroundColor:A.hoverBg}),be=A=>({color:A.colorTextDisabled,backgroundColor:A.colorBgContainerDisabled,borderColor:A.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},ie((0,Ee.mergeToken)(A,{hoverBorderColor:A.colorBorder,hoverBg:A.colorBgContainerDisabled})))}),J=(A,z)=>({background:A.colorBgContainer,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:z.borderColor,"&:hover":{borderColor:z.hoverBorderColor,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:z.activeBorderColor,boxShadow:z.activeShadow,outline:0,backgroundColor:A.activeBg}}),v=(A,z)=>({[`&${A.componentCls}-status-${z.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},J(A,z)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:z.affixColor}}),[`&${A.componentCls}-status-${z.status}${A.componentCls}-disabled`]:{borderColor:z.borderColor}}),de=(A,z)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},J(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},be(A))}),v(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),v(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),z)}),ce=(A,z)=>({[`&${A.componentCls}-group-wrapper-status-${z.status}`]:{[`${A.componentCls}-group-addon`]:{borderColor:z.addonBorderColor,color:z.addonColor}}}),l=A=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.addonBg,border:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},ce(A,{status:"error",addonBorderColor:A.colorError,addonColor:A.colorErrorText})),ce(A,{status:"warning",addonBorderColor:A.colorWarning,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group-addon`]:Object.assign({},be(A))}})}),V=(A,z)=>{const{componentCls:O}=A;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${O}-disabled, &[disabled]`]:{color:A.colorTextDisabled,cursor:"not-allowed"},[`&${O}-status-error`]:{"&, & input, & textarea":{color:A.colorError}},[`&${O}-status-warning`]:{"&, & input, & textarea":{color:A.colorWarning}}},z)}},B=(A,z)=>{var O;return{background:z.bg,borderWidth:A.lineWidth,borderStyle:A.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(O=z==null?void 0:z.inputColor)!==null&&O!==void 0?O:"unset"},"&:hover":{background:z.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:z.activeBorderColor,backgroundColor:A.activeBg}}},E=(A,z)=>({[`&${A.componentCls}-status-${z.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},B(A,z)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:z.affixColor}})}),L=(A,z)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},B(A,{bg:A.colorFillTertiary,hoverBg:A.colorFillSecondary,activeBorderColor:A.activeBorderColor})),{[`&${A.componentCls}-disabled, &[disabled]`]:Object.assign({},be(A))}),E(A,{status:"error",bg:A.colorErrorBg,hoverBg:A.colorErrorBgHover,activeBorderColor:A.colorError,inputColor:A.colorErrorText,affixColor:A.colorError})),E(A,{status:"warning",bg:A.colorWarningBg,hoverBg:A.colorWarningBgHover,activeBorderColor:A.colorWarning,inputColor:A.colorWarningText,affixColor:A.colorWarning})),z)}),x=(A,z)=>({[`&${A.componentCls}-group-wrapper-status-${z.status}`]:{[`${A.componentCls}-group-addon`]:{background:z.addonBg,color:z.addonColor}}}),P=A=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary},[`${A.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorSplit}`}}}},x(A,{status:"error",addonBg:A.colorErrorBg,addonColor:A.colorErrorText})),x(A,{status:"warning",addonBg:A.colorWarningBg,addonColor:A.colorWarningText})),{[`&${A.componentCls}-group-wrapper-disabled`]:{[`${A.componentCls}-group`]:{"&-addon":{background:A.colorFillTertiary,color:A.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderTop:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`,borderBottom:`${(0,y.unit)(A.lineWidth)} ${A.lineType} ${A.colorBorder}`}}}})}),q=(A,z)=>({background:A.colorBgContainer,borderWidth:`${(0,y.unit)(A.lineWidth)} 0`,borderStyle:`${A.lineType} none`,borderColor:`transparent transparent ${z.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${z.borderColor} transparent`,backgroundColor:A.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${z.borderColor} transparent`,outline:0,backgroundColor:A.activeBg}}),H=(A,z)=>({[`&${A.componentCls}-status-${z.status}:not(${A.componentCls}-disabled)`]:Object.assign(Object.assign({},q(A,z)),{[`${A.componentCls}-prefix, ${A.componentCls}-suffix`]:{color:z.affixColor}}),[`&${A.componentCls}-status-${z.status}${A.componentCls}-disabled`]:{borderColor:`transparent transparent ${z.borderColor} transparent`}}),U=(A,z)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q(A,{borderColor:A.colorBorder,hoverBorderColor:A.hoverBorderColor,activeBorderColor:A.activeBorderColor,activeShadow:A.activeShadow})),{[`&${A.componentCls}-disabled, &[disabled]`]:{color:A.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${A.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),H(A,{status:"error",borderColor:A.colorError,hoverBorderColor:A.colorErrorBorderHover,activeBorderColor:A.colorError,activeShadow:A.errorActiveShadow,affixColor:A.colorError})),H(A,{status:"warning",borderColor:A.colorWarning,hoverBorderColor:A.colorWarningBorderHover,activeBorderColor:A.colorWarning,activeShadow:A.warningActiveShadow,affixColor:A.colorWarning})),z)})},44104:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return q}});var y=k(59301),Ee=k(92310),ie=k.n(Ee),be=k(11592),J=k(99402),v=k(48755),de=k(70045);const ce=y.createContext({latestIndex:0}),l=ce.Provider;var B=H=>{let{className:U,index:A,children:z,split:O,style:N}=H;const{latestIndex:oe}=y.useContext(ce);return z==null?null:y.createElement(y.Fragment,null,y.createElement("div",{className:U,style:N},z),A<oe&&O&&y.createElement("span",{className:`${U}-split`},O))},E=k(31547),L=function(H,U){var A={};for(var z in H)Object.prototype.hasOwnProperty.call(H,z)&&U.indexOf(z)<0&&(A[z]=H[z]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function")for(var O=0,z=Object.getOwnPropertySymbols(H);O<z.length;O++)U.indexOf(z[O])<0&&Object.prototype.propertyIsEnumerable.call(H,z[O])&&(A[z[O]]=H[z[O]]);return A};const P=y.forwardRef((H,U)=>{var A;const{getPrefixCls:z,direction:O,size:N,className:oe,style:ve,classNames:pe,styles:De}=(0,v.dj)("space"),{size:Oe=N!=null?N:"small",align:Fe,className:st,rootClassName:re,children:W,direction:ee="horizontal",prefixCls:ue,split:ne,style:ae,wrap:S=!1,classNames:w,styles:K}=H,ye=L(H,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Be,He]=Array.isArray(Oe)?Oe:[Oe,Oe],ot=(0,J.n)(He),at=(0,J.n)(Be),pt=(0,J.T)(He),At=(0,J.T)(Be),ut=(0,be.Z)(W,{keepEmpty:!0}),jt=Fe===void 0&&ee==="horizontal"?"center":Fe,tt=z("space",ue),[Ft,Me,mt]=(0,E.Z)(tt),ke=ie()(tt,oe,Me,`${tt}-${ee}`,{[`${tt}-rtl`]:O==="rtl",[`${tt}-align-${jt}`]:jt,[`${tt}-gap-row-${He}`]:ot,[`${tt}-gap-col-${Be}`]:at},st,re,mt),Ce=ie()(`${tt}-item`,(A=w==null?void 0:w.item)!==null&&A!==void 0?A:pe.item);let _e=0;const Ne=ut.map((te,Ie)=>{var Ue;te!=null&&(_e=Ie);const ze=(te==null?void 0:te.key)||`${Ce}-${Ie}`;return y.createElement(B,{className:Ce,key:ze,index:Ie,split:ne,style:(Ue=K==null?void 0:K.item)!==null&&Ue!==void 0?Ue:De.item},te)}),Ke=y.useMemo(()=>({latestIndex:_e}),[_e]);if(ut.length===0)return null;const nt={};return S&&(nt.flexWrap="wrap"),!at&&At&&(nt.columnGap=Be),!ot&&pt&&(nt.rowGap=He),Ft(y.createElement("div",Object.assign({ref:U,className:ke,style:Object.assign(Object.assign(Object.assign({},nt),ve),ae)},ye),y.createElement(l,{value:Ke},Ne)))});P.Compact=de.ZP;var q=P},37645:function(Vt,it,k){"use strict";k.d(it,{ZP:function(){return v},qN:function(){return ie},wZ:function(){return be}});var y=k(36237),Ee=k(36305);const ie=8;function be(de){const{contentRadius:ce,limitVerticalRadius:l}=de,V=ce>12?ce+2:12;return{arrowOffsetHorizontal:V,arrowOffsetVertical:l?ie:V}}function J(de,ce){return de?ce:{}}function v(de,ce,l){const{componentCls:V,boxShadowPopoverArrow:B,arrowOffsetVertical:E,arrowOffsetHorizontal:L}=de,{arrowDistance:x=0,arrowPlacement:P={left:!0,right:!0,top:!0,bottom:!0}}=l||{};return{[V]:Object.assign(Object.assign(Object.assign(Object.assign({[`${V}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,Ee.W)(de,ce,B)),{"&:before":{background:ce}})]},J(!!P.top,{[[`&-placement-top > ${V}-arrow`,`&-placement-topLeft > ${V}-arrow`,`&-placement-topRight > ${V}-arrow`].join(",")]:{bottom:x,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${V}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":L,[`> ${V}-arrow`]:{left:{_skip_check_:!0,value:L}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,y.unit)(L)})`,[`> ${V}-arrow`]:{right:{_skip_check_:!0,value:L}}}})),J(!!P.bottom,{[[`&-placement-bottom > ${V}-arrow`,`&-placement-bottomLeft > ${V}-arrow`,`&-placement-bottomRight > ${V}-arrow`].join(",")]:{top:x,transform:"translateY(-100%)"},[`&-placement-bottom > ${V}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":L,[`> ${V}-arrow`]:{left:{_skip_check_:!0,value:L}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,y.unit)(L)})`,[`> ${V}-arrow`]:{right:{_skip_check_:!0,value:L}}}})),J(!!P.left,{[[`&-placement-left > ${V}-arrow`,`&-placement-leftTop > ${V}-arrow`,`&-placement-leftBottom > ${V}-arrow`].join(",")]:{right:{_skip_check_:!0,value:x},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${V}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${V}-arrow`]:{top:E},[`&-placement-leftBottom > ${V}-arrow`]:{bottom:E}})),J(!!P.right,{[[`&-placement-right > ${V}-arrow`,`&-placement-rightTop > ${V}-arrow`,`&-placement-rightBottom > ${V}-arrow`].join(",")]:{left:{_skip_check_:!0,value:x},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${V}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${V}-arrow`]:{top:E},[`&-placement-rightBottom > ${V}-arrow`]:{bottom:E}}))}}},36305:function(Vt,it,k){"use strict";k.d(it,{W:function(){return ie},w:function(){return Ee}});var y=k(36237);function Ee(be){const{sizePopupArrow:J,borderRadiusXS:v,borderRadiusOuter:de}=be,ce=J/2,l=0,V=ce,B=de*1/Math.sqrt(2),E=ce-de*(1-1/Math.sqrt(2)),L=ce-v*(1/Math.sqrt(2)),x=de*(Math.sqrt(2)-1)+v*(1/Math.sqrt(2)),P=2*ce-L,q=x,H=2*ce-B,U=E,A=2*ce-l,z=V,O=ce*Math.sqrt(2)+de*(Math.sqrt(2)-2),N=de*(Math.sqrt(2)-1),oe=`polygon(${N}px 100%, 50% ${N}px, ${2*ce-N}px 100%, ${N}px 100%)`,ve=`path('M ${l} ${V} A ${de} ${de} 0 0 0 ${B} ${E} L ${L} ${x} A ${v} ${v} 0 0 1 ${P} ${q} L ${H} ${U} A ${de} ${de} 0 0 0 ${A} ${z} Z')`;return{arrowShadowWidth:O,arrowPath:ve,arrowPolygon:oe}}const ie=(be,J,v)=>{const{sizePopupArrow:de,arrowPolygon:ce,arrowPath:l,arrowShadowWidth:V,borderRadiusXS:B,calc:E}=be;return{pointerEvents:"none",width:de,height:de,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:de,height:E(de).div(2).equal(),background:J,clipPath:{_multi_value_:!0,value:[ce,l]},content:'""'},"&::after":{content:'""',position:"absolute",width:V,height:V,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,y.unit)(B)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:v,zIndex:0,background:"transparent"}}}},93427:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return Ee}});var y=k(34998);function Ee(ie,be){return y.i.reduce((J,v)=>{const de=ie[`${v}1`],ce=ie[`${v}3`],l=ie[`${v}6`],V=ie[`${v}7`];return Object.assign(Object.assign({},J),be(v,{lightColor:de,lightBorderColor:ce,darkColor:l,textColor:V}))},{})}},25399:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ue}});var y=k(59301),Ee=k(92310),ie=k.n(Ee),be=k(29125),J=k(18929),v=k(62487),de=k(75030),ce=k(86641),l=k(52838),V=k(22703),B=k(32383),E=k(55743),L=k(57700),x=k(48755),P=k(36237),q=k(63356),H=k(34925),U=k(37645),A=k(36305),z=k(93427),O=k(51636),N=k(16931);const oe=ne=>{const{calc:ae,componentCls:S,tooltipMaxWidth:w,tooltipColor:K,tooltipBg:ye,tooltipBorderRadius:Be,zIndexPopup:He,controlHeight:ot,boxShadowSecondary:at,paddingSM:pt,paddingXS:At,arrowOffsetHorizontal:ut,sizePopupArrow:jt}=ne,tt=ae(Be).add(jt).add(ut).equal(),Ft=ae(Be).mul(2).add(jt).equal();return[{[S]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,q.Wf)(ne)),{position:"absolute",zIndex:He,display:"block",width:"max-content",maxWidth:w,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":ye,[`${S}-inner`]:{minWidth:Ft,minHeight:ot,padding:`${(0,P.unit)(ne.calc(pt).div(2).equal())} ${(0,P.unit)(At)}`,color:K,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ye,borderRadius:Be,boxShadow:at,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:tt},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${S}-inner`]:{borderRadius:ne.min(Be,U.qN)}},[`${S}-content`]:{position:"relative"}}),(0,z.Z)(ne,(Me,mt)=>{let{darkColor:ke}=mt;return{[`&${S}-${Me}`]:{[`${S}-inner`]:{backgroundColor:ke},[`${S}-arrow`]:{"--antd-arrow-background-color":ke}}}})),{"&-rtl":{direction:"rtl"}})},(0,U.ZP)(ne,"var(--antd-arrow-background-color)"),{[`${S}-pure`]:{position:"relative",maxWidth:"none",margin:ne.sizePopupArrow}}]},ve=ne=>Object.assign(Object.assign({zIndexPopup:ne.zIndexPopupBase+70},(0,U.wZ)({contentRadius:ne.borderRadius,limitVerticalRadius:!0})),(0,A.w)((0,O.mergeToken)(ne,{borderRadiusOuter:Math.min(ne.borderRadiusOuter,4)})));var pe=function(ne){let ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,N.I$)("Tooltip",w=>{const{borderRadius:K,colorTextLightSolid:ye,colorBgSpotlight:Be}=w,He=(0,O.mergeToken)(w,{tooltipMaxWidth:250,tooltipColor:ye,tooltipBorderRadius:K,tooltipBg:Be});return[oe(He),(0,H._y)(w,"zoom-big-fast")]},ve,{resetStyle:!1,injectStyle:ae})(ne)},De=k(29509);function Oe(ne,ae){const S=(0,De.o2)(ae),w=ie()({[`${ne}-${ae}`]:ae&&S}),K={},ye={};return ae&&!S&&(K.background=ae,ye["--antd-arrow-background-color"]=ae),{className:w,overlayStyle:K,arrowStyle:ye}}var st=ne=>{const{prefixCls:ae,className:S,placement:w="top",title:K,color:ye,overlayInnerStyle:Be}=ne,{getPrefixCls:He}=y.useContext(x.E_),ot=He("tooltip",ae),[at,pt,At]=pe(ot),ut=Oe(ot,ye),jt=ut.arrowStyle,tt=Object.assign(Object.assign({},Be),ut.overlayStyle),Ft=ie()(pt,At,ot,`${ot}-pure`,`${ot}-placement-${w}`,S,ut.className);return at(y.createElement("div",{className:Ft,style:jt},y.createElement("div",{className:`${ot}-arrow`}),y.createElement(be.G,Object.assign({},ne,{className:pt,prefixCls:ot,overlayInnerStyle:tt}),K)))},re=function(ne,ae){var S={};for(var w in ne)Object.prototype.hasOwnProperty.call(ne,w)&&ae.indexOf(w)<0&&(S[w]=ne[w]);if(ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var K=0,w=Object.getOwnPropertySymbols(ne);K<w.length;K++)ae.indexOf(w[K])<0&&Object.prototype.propertyIsEnumerable.call(ne,w[K])&&(S[w[K]]=ne[w[K]]);return S};const ee=y.forwardRef((ne,ae)=>{var S,w;const{prefixCls:K,openClassName:ye,getTooltipContainer:Be,color:He,overlayInnerStyle:ot,children:at,afterOpenChange:pt,afterVisibleChange:At,destroyTooltipOnHide:ut,arrow:jt=!0,title:tt,overlay:Ft,builtinPlacements:Me,arrowPointAtCenter:mt=!1,autoAdjustOverflow:ke=!0,motion:Ce,getPopupContainer:_e,placement:Ne="top",mouseEnterDelay:Ke=.1,mouseLeaveDelay:nt=.1,overlayStyle:te,rootClassName:Ie,overlayClassName:Ue,styles:ze,classNames:qe}=ne,gt=re(ne,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),Rt=!!jt,[,vt]=(0,L.ZP)(),{getPopupContainer:_t,getPrefixCls:St,direction:Nt,className:Pt,style:Ct,classNames:Ge,styles:Tt}=(0,x.dj)("tooltip"),Et=(0,B.ln)("Tooltip"),ct=y.useRef(null),Lt=()=>{var Tr;(Tr=ct.current)===null||Tr===void 0||Tr.forceAlign()};y.useImperativeHandle(ae,()=>{var Tr,fr;return{forceAlign:Lt,forcePopupAlign:()=>{Et.deprecated(!1,"forcePopupAlign","forceAlign"),Lt()},nativeElement:(Tr=ct.current)===null||Tr===void 0?void 0:Tr.nativeElement,popupElement:(fr=ct.current)===null||fr===void 0?void 0:fr.popupElement}});const[_,T]=(0,J.Z)(!1,{value:(S=ne.open)!==null&&S!==void 0?S:ne.visible,defaultValue:(w=ne.defaultOpen)!==null&&w!==void 0?w:ne.defaultVisible}),Q=!tt&&!Ft&&tt!==0,C=Tr=>{var fr,Ot;T(Q?!1:Tr),Q||((fr=ne.onOpenChange)===null||fr===void 0||fr.call(ne,Tr),(Ot=ne.onVisibleChange)===null||Ot===void 0||Ot.call(ne,Tr))},G=y.useMemo(()=>{var Tr,fr;let Ot=mt;return typeof jt=="object"&&(Ot=(fr=(Tr=jt.pointAtCenter)!==null&&Tr!==void 0?Tr:jt.arrowPointAtCenter)!==null&&fr!==void 0?fr:mt),Me||(0,l.Z)({arrowPointAtCenter:Ot,autoAdjustOverflow:ke,arrowWidth:Rt?vt.sizePopupArrow:0,borderRadius:vt.borderRadius,offset:vt.marginXXS,visibleFirst:!0})},[mt,jt,Me,vt]),Xe=y.useMemo(()=>tt===0?tt:Ft||tt||"",[Ft,tt]),fe=y.createElement(v.Z,{space:!0},typeof Xe=="function"?Xe():Xe),Ae=St("tooltip",K),Pe=St(),j=ne["data-popover-inject"];let X=_;!("open"in ne)&&!("visible"in ne)&&Q&&(X=!1);const he=y.isValidElement(at)&&!(0,V.M2)(at)?at:y.createElement("span",null,at),Se=he.props,$=!Se.className||typeof Se.className=="string"?ie()(Se.className,ye||`${Ae}-open`):Se.className,[Qe,le,It]=pe(Ae,!j),$t=Oe(Ae,He),zt=$t.arrowStyle,sr=ie()(Ue,{[`${Ae}-rtl`]:Nt==="rtl"},$t.className,Ie,le,It,Pt,Ge.root,qe==null?void 0:qe.root),or=ie()(Ge.body,qe==null?void 0:qe.body),[Kt,ur]=(0,de.Cn)("Tooltip",gt.zIndex),Zr=y.createElement(be.Z,Object.assign({},gt,{zIndex:Kt,showArrow:Rt,placement:Ne,mouseEnterDelay:Ke,mouseLeaveDelay:nt,prefixCls:Ae,classNames:{root:sr,body:or},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zt),Tt.root),Ct),te),ze==null?void 0:ze.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},Tt.body),ot),ze==null?void 0:ze.body),$t.overlayStyle)},getTooltipContainer:_e||Be||_t,ref:ct,builtinPlacements:G,overlay:fe,visible:X,onVisibleChange:C,afterVisibleChange:pt!=null?pt:At,arrowContent:y.createElement("span",{className:`${Ae}-arrow-content`}),motion:{motionName:(0,ce.m)(Pe,"zoom-big-fast",ne.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!ut}),X?(0,V.Tm)(he,{className:$}):he);return Qe(y.createElement(E.Z.Provider,{value:ur},Zr))});ee._InternalPanelDoNotUseOrYouWillBeFired=st;var ue=ee},64018:function(){var Vt,it,k,y=!1,Ee,ie;window.PR_SHOULD_USE_CONTINUATION=!0;var be,J;(function(){var v=window,de=["break,continue,do,else,for,if,return,while"],ce=[de,"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"],l=[ce,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],V=[l,"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"],B=[l,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],E=[l,"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"],L="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",x=[l,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],P="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",q=[de,"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"],H=[de,"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"],U=[de,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],A=[V,E,B,x,P,q,H,U],z=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,O="str",N="kwd",oe="com",ve="typ",pe="lit",De="pun",Oe="pln",Fe="tag",st="dec",re="src",W="atn",ee="atv",ue="nocode",ne="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function ae(Ce){for(var _e=0,Ne=!1,Ke=!1,nt=0,te=Ce.length;nt<te;++nt){var Ie=Ce[nt];if(Ie.ignoreCase)Ke=!0;else if(/[a-z]/i.test(Ie.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,Ke=!1;break}}var Ue={b:8,t:9,n:10,v:11,f:12,r:13};function ze(_t){var St=_t.charCodeAt(0);if(St!==92)return St;var Nt=_t.charAt(1);return St=Ue[Nt],St||("0"<=Nt&&Nt<="7"?parseInt(_t.substring(1),8):Nt==="u"||Nt==="x"?parseInt(_t.substring(2),16):_t.charCodeAt(1))}function qe(_t){if(_t<32)return(_t<16?"\\x0":"\\x")+_t.toString(16);var St=String.fromCharCode(_t);return St==="\\"||St==="-"||St==="]"||St==="^"?"\\"+St:St}function gt(_t){var St=_t.substring(1,_t.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")),Nt=[],Pt=St[0]==="^",Ct=["["];Pt&&Ct.push("^");for(var Ge=Pt?1:0,Tt=St.length;Ge<Tt;++Ge){var Et=St[Ge];if(/\\[bdsw]/i.test(Et))Ct.push(Et);else{var ct=ze(Et),Lt;Ge+2<Tt&&St[Ge+1]==="-"?(Lt=ze(St[Ge+2]),Ge+=2):Lt=ct,Nt.push([ct,Lt]),Lt<65||ct>122||(Lt<65||ct>90||Nt.push([Math.max(65,ct)|32,Math.min(Lt,90)|32]),Lt<97||ct>122||Nt.push([Math.max(97,ct)&-33,Math.min(Lt,122)&-33]))}}Nt.sort(function(C,G){return C[0]-G[0]||G[1]-C[1]});for(var _=[],T=[],Ge=0;Ge<Nt.length;++Ge){var Q=Nt[Ge];Q[0]<=T[1]+1?T[1]=Math.max(T[1],Q[1]):_.push(T=Q)}for(var Ge=0;Ge<_.length;++Ge){var Q=_[Ge];Ct.push(qe(Q[0])),Q[1]>Q[0]&&(Q[1]+1>Q[0]&&Ct.push("-"),Ct.push(qe(Q[1])))}return Ct.push("]"),Ct.join("")}function Rt(_t){for(var St=_t.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")),Nt=St.length,Pt=[],Ct=0,Ge=0;Ct<Nt;++Ct){var Tt=St[Ct];if(Tt==="(")++Ge;else if(Tt.charAt(0)==="\\"){var Et=+Tt.substring(1);Et&&(Et<=Ge?Pt[Et]=-1:St[Ct]=qe(Et))}}for(var Ct=1;Ct<Pt.length;++Ct)Pt[Ct]===-1&&(Pt[Ct]=++_e);for(var Ct=0,Ge=0;Ct<Nt;++Ct){var Tt=St[Ct];if(Tt==="(")++Ge,Pt[Ge]||(St[Ct]="(?:");else if(Tt.charAt(0)==="\\"){var Et=+Tt.substring(1);Et&&Et<=Ge&&(St[Ct]="\\"+Pt[Et])}}for(var Ct=0;Ct<Nt;++Ct)St[Ct]==="^"&&St[Ct+1]!=="^"&&(St[Ct]="");if(_t.ignoreCase&&Ne)for(var Ct=0;Ct<Nt;++Ct){var Tt=St[Ct],ct=Tt.charAt(0);Tt.length>=2&&ct==="["?St[Ct]=gt(Tt):ct!=="\\"&&(St[Ct]=Tt.replace(/[a-zA-Z]/g,function(T){var Q=T.charCodeAt(0);return"["+String.fromCharCode(Q&-33,Q|32)+"]"}))}return St.join("")}for(var vt=[],nt=0,te=Ce.length;nt<te;++nt){var Ie=Ce[nt];if(Ie.global||Ie.multiline)throw new Error(""+Ie);vt.push("(?:"+Rt(Ie)+")")}return new RegExp(vt.join("|"),Ke?"gi":"g")}function S(Ce,_e){var Ne=/(?:^|\s)nocode(?:\s|$)/,Ke=[],nt=0,te=[],Ie=0;function Ue(ze){var qe=ze.nodeType;if(qe==1){if(Ne.test(ze.className))return;for(var gt=ze.firstChild;gt;gt=gt.nextSibling)Ue(gt);var Rt=ze.nodeName.toLowerCase();(Rt==="br"||Rt==="li")&&(Ke[Ie]=`
`,te[Ie<<1]=nt++,te[Ie++<<1|1]=ze)}else if(qe==3||qe==4){var vt=ze.nodeValue;vt.length&&(_e?vt=vt.replace(/\r\n?/g,`
`):vt=vt.replace(/[ \t\r\n]+/g," "),Ke[Ie]=vt,te[Ie<<1]=nt,nt+=vt.length,te[Ie++<<1|1]=ze)}}return Ue(Ce),{sourceCode:Ke.join("").replace(/\n$/,""),spans:te}}function w(Ce,_e,Ne,Ke,nt){if(Ne){var te={sourceNode:Ce,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:_e,decorations:null};Ke(te),nt.push.apply(nt,te.decorations)}}var K=/\S/;function ye(Ce){for(var _e=void 0,Ne=Ce.firstChild;Ne;Ne=Ne.nextSibling){var Ke=Ne.nodeType;_e=Ke===1?_e?Ce:Ne:Ke===3&&K.test(Ne.nodeValue)?Ce:_e}return _e===Ce?void 0:_e}function Be(Ce,_e){var Ne={},Ke;(function(){for(var Ie=Ce.concat(_e),Ue=[],ze={},qe=0,gt=Ie.length;qe<gt;++qe){var Rt=Ie[qe],vt=Rt[3];if(vt)for(var _t=vt.length;--_t>=0;)Ne[vt.charAt(_t)]=Rt;var St=Rt[1],Nt=""+St;ze.hasOwnProperty(Nt)||(Ue.push(St),ze[Nt]=null)}Ue.push(/[\0-\uffff]/),Ke=ae(Ue)})();var nt=_e.length,te=function(Ie){for(var Ue=Ie.sourceCode,ze=Ie.basePos,qe=Ie.sourceNode,gt=[ze,Oe],Rt=0,vt=Ue.match(Ke)||[],_t={},St=0,Nt=vt.length;St<Nt;++St){var Pt=vt[St],Ct=_t[Pt],Ge=void 0,Tt;if(typeof Ct=="string")Tt=!1;else{var Et=Ne[Pt.charAt(0)];if(Et)Ge=Pt.match(Et[1]),Ct=Et[0];else{for(var ct=0;ct<nt;++ct)if(Et=_e[ct],Ge=Pt.match(Et[1]),Ge){Ct=Et[0];break}Ge||(Ct=Oe)}Tt=Ct.length>=5&&Ct.substring(0,5)==="lang-",Tt&&!(Ge&&typeof Ge[1]=="string")&&(Tt=!1,Ct=re),Tt||(_t[Pt]=Ct)}var Lt=Rt;if(Rt+=Pt.length,!Tt)gt.push(ze+Lt,Ct);else{var _=Ge[1],T=Pt.indexOf(_),Q=T+_.length;Ge[2]&&(Q=Pt.length-Ge[2].length,T=Q-_.length);var C=Ct.substring(5);w(qe,ze+Lt,Pt.substring(0,T),te,gt),w(qe,ze+Lt+T,_,jt(C,_),gt),w(qe,ze+Lt+Q,Pt.substring(Q),te,gt)}}Ie.decorations=gt};return te}function He(Ce){var _e=[],Ne=[];Ce.tripleQuotedStrings?_e.push([O,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?_e.push([O,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):_e.push([O,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&Ne.push([O,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ke=Ce.hashComments;Ke&&(Ce.cStyleComments?(Ke>1?_e.push([oe,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):_e.push([oe,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([O,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):_e.push([oe,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(Ne.push([oe,/^\/\/[^\r\n]*/,null]),Ne.push([oe,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var nt=Ce.regexLiterals;if(nt){var te=nt>1?"":`
\r`,Ie=te?".":"[\\S\\s]",Ue="/(?=[^/*"+te+"])(?:[^/\\x5B\\x5C"+te+"]|\\x5C"+Ie+"|\\x5B(?:[^\\x5C\\x5D"+te+"]|\\x5C"+Ie+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+ne+"("+Ue+")")])}var ze=Ce.types;ze&&Ne.push([ve,ze]);var qe=(""+Ce.keywords).replace(/^ | $/g,"");qe.length&&Ne.push([N,new RegExp("^(?:"+qe.replace(/[\s,]+/g,"|")+")\\b"),null]),_e.push([Oe,/^\s+/,null,` \r
\xA0`]);var gt="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(gt+="(?!s*/)"),Ne.push([pe,/^@[a-z_$][a-z_$@0-9]*/i,null],[ve,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Oe,/^[a-z_$][a-z_$@0-9]*/i,null],[pe,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Oe,/^\\[\s\S]?/,null],[De,new RegExp(gt),null]),Be(_e,Ne)}var ot=He({keywords:A,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function at(Ce,_e,Ne){for(var Ke=/(?:^|\s)nocode(?:\s|$)/,nt=/\r\n?|\n/,te=Ce.ownerDocument,Ie=te.createElement("li");Ce.firstChild;)Ie.appendChild(Ce.firstChild);var Ue=[Ie];function ze(St){var Nt=St.nodeType;if(Nt==1&&!Ke.test(St.className))if(St.nodeName==="br")qe(St),St.parentNode&&St.parentNode.removeChild(St);else for(var Pt=St.firstChild;Pt;Pt=Pt.nextSibling)ze(Pt);else if((Nt==3||Nt==4)&&Ne){var Ct=St.nodeValue,Ge=Ct.match(nt);if(Ge){var Tt=Ct.substring(0,Ge.index);St.nodeValue=Tt;var Et=Ct.substring(Ge.index+Ge[0].length);if(Et){var ct=St.parentNode;ct.insertBefore(te.createTextNode(Et),St.nextSibling)}qe(St),Tt||St.parentNode.removeChild(St)}}}function qe(St){for(;!St.nextSibling;)if(St=St.parentNode,!St)return;function Nt(Ge,Tt){var Et=Tt?Ge.cloneNode(!1):Ge,ct=Ge.parentNode;if(ct){var Lt=Nt(ct,1),_=Ge.nextSibling;Lt.appendChild(Et);for(var T=_;T;T=_)_=T.nextSibling,Lt.appendChild(T)}return Et}for(var Pt=Nt(St.nextSibling,0),Ct;(Ct=Pt.parentNode)&&Ct.nodeType===1;)Pt=Ct;Ue.push(Pt)}for(var gt=0;gt<Ue.length;++gt)ze(Ue[gt]);_e===(_e|0)&&Ue[0].setAttribute("value",_e);var Rt=te.createElement("ol");Rt.className="linenums";for(var vt=Math.max(0,_e-1|0)||0,gt=0,_t=Ue.length;gt<_t;++gt)Ie=Ue[gt],Ie.className="L"+(gt+vt)%10,Ie.firstChild||Ie.appendChild(te.createTextNode("\xA0")),Rt.appendChild(Ie);Ce.appendChild(Rt)}function pt(Ce){var _e=/\bMSIE\s(\d+)/.exec(navigator.userAgent);_e=_e&&+_e[1]<=8;var Ne=/\n/g,Ke=Ce.sourceCode,nt=Ke.length,te=0,Ie=Ce.spans,Ue=Ie.length,ze=0,qe=Ce.decorations,gt=qe.length,Rt=0;qe[gt]=nt;var vt,_t;for(_t=vt=0;_t<gt;)qe[_t]!==qe[_t+2]?(qe[vt++]=qe[_t++],qe[vt++]=qe[_t++]):_t+=2;for(gt=vt,_t=vt=0;_t<gt;){for(var St=qe[_t],Nt=qe[_t+1],Pt=_t+2;Pt+2<=gt&&qe[Pt+1]===Nt;)Pt+=2;qe[vt++]=St,qe[vt++]=Nt,_t=Pt}gt=qe.length=vt;var Ct=Ce.sourceNode,Ge="";Ct&&(Ge=Ct.style.display,Ct.style.display="none");try{for(var Tt=null;ze<Ue;){var Et=Ie[ze],ct=Ie[ze+2]||nt,Lt=qe[Rt+2]||nt,Pt=Math.min(ct,Lt),_=Ie[ze+1],T;if(_.nodeType!==1&&(T=Ke.substring(te,Pt))){_e&&(T=T.replace(Ne,"\r")),_.nodeValue=T;var Q=_.ownerDocument,C=Q.createElement("span");C.className=qe[Rt+1];var G=_.parentNode;G.replaceChild(C,_),C.appendChild(_),te<ct&&(Ie[ze+1]=_=Q.createTextNode(Ke.substring(Pt,ct)),G.insertBefore(_,C.nextSibling))}te=Pt,te>=ct&&(ze+=2),te>=Lt&&(Rt+=2)}}finally{Ct&&(Ct.style.display=Ge)}}var At={};function ut(Ce,_e){for(var Ne=_e.length;--Ne>=0;){var Ke=_e[Ne];At.hasOwnProperty(Ke)?v.console&&console.warn("cannot override language handler %s",Ke):At[Ke]=Ce}}function jt(Ce,_e){return Ce&&At.hasOwnProperty(Ce)||(Ce=/^\s*</.test(_e)?"default-markup":"default-code"),At[Ce]}ut(ot,["default-code"]),ut(Be([],[[Oe,/^[^<?]+/],[st,/^<!\w[^>]*(?:>|$)/],[oe,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[De,/^(?:<[%?]|[%?]>)/],["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"]),ut(Be([[Oe,/^[\s]+/,null,` \r
`],[ee,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Fe,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[W,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[De,/^[=<>\/]+/],["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"]),ut(Be([],[[ee,/^[\s\S]+/]]),["uq.val"]),ut(He({keywords:V,hashComments:!0,cStyleComments:!0,types:z}),["c","cc","cpp","cxx","cyc","m"]),ut(He({keywords:"null,true,false"}),["json"]),ut(He({keywords:E,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:z}),["cs"]),ut(He({keywords:B,cStyleComments:!0}),["java"]),ut(He({keywords:U,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ut(He({keywords:q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ut(He({keywords:P,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ut(He({keywords:H,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ut(He({keywords:x,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ut(He({keywords:L,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ut(Be([],[[O,/^[\s\S]+/]]),["regex"]);function tt(Ce){var _e=Ce.langExtension;try{var Ne=S(Ce.sourceNode,Ce.pre),Ke=Ne.sourceCode;Ce.sourceCode=Ke,Ce.spans=Ne.spans,Ce.basePos=0,jt(_e,Ke)(Ce),pt(Ce)}catch(nt){v.console&&console.log(nt&&nt.stack||nt)}}function Ft(Ce,_e,Ne){var Ke=Ne||!1,nt=_e||null,te=document.createElement("div");te.innerHTML="<pre>"+Ce+"</pre>",te=te.firstChild,Ke&&at(te,Ke,!0);var Ie={langExtension:nt,numberLines:Ke,sourceNode:te,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return tt(Ie),te.innerHTML}function Me(Ce,_e){var Ne=_e||document.body,Ke=Ne.ownerDocument||document;function nt(Et){return Ne.getElementsByTagName(Et)}for(var te=[nt("pre"),nt("code"),nt("xmp")],Ie=[],Ue=0;Ue<te.length;++Ue)for(var ze=0,qe=te[Ue].length;ze<qe;++ze)Ie.push(te[Ue][ze]);te=null;var gt=Date;gt.now||(gt={now:function(){return+new Date}});var Rt=0,vt=/\blang(?:uage)?-([\w.]+)(?!\S)/,_t=/\bprettyprint\b/,St=/\bprettyprinted\b/,Nt=/pre|xmp/i,Pt=/^code$/i,Ct=/^(?:pre|code|xmp)$/i,Ge={};function Tt(){for(var Et=v.PR_SHOULD_USE_CONTINUATION?gt.now()+250:1/0;Rt<Ie.length&&gt.now()<Et;Rt++){for(var ct=Ie[Rt],Lt=Ge,_=ct;_=_.previousSibling;){var T=_.nodeType,Q=(T===7||T===8)&&_.nodeValue;if(Q?!/^\??prettify\b/.test(Q):T!==3||/\S/.test(_.nodeValue))break;if(Q){Lt={},Q.replace(/\b(\w+)=([\w:.%+-]+)/g,function(le,It,$t){Lt[It]=$t});break}}var C=ct.className;if((Lt!==Ge||_t.test(C))&&!St.test(C)){for(var G=!1,Xe=ct.parentNode;Xe;Xe=Xe.parentNode){var fe=Xe.tagName;if(Ct.test(fe)&&Xe.className&&_t.test(Xe.className)){G=!0;break}}if(!G){ct.className+=" prettyprinted";var Ae=Lt.lang;if(!Ae){Ae=C.match(vt);var Pe;!Ae&&(Pe=ye(ct))&&Pt.test(Pe.tagName)&&(Ae=Pe.className.match(vt)),Ae&&(Ae=Ae[1])}var j;if(Nt.test(ct.tagName))j=1;else{var X=ct.currentStyle,he=Ke.defaultView,Se=X?X.whiteSpace:he&&he.getComputedStyle?he.getComputedStyle(ct,null).getPropertyValue("white-space"):0;j=Se&&Se.substring(0,3)==="pre"}var $=Lt.linenums;($=$==="true"||+$)||($=C.match(/\blinenums\b(?::(\d+))?/),$=$?$[1]&&$[1].length?+$[1]:!0:!1),$&&at(ct,$,j);var Qe={langExtension:Ae,sourceNode:ct,numberLines:$,pre:j,sourceCode:null,basePos:null,spans:null,decorations:null};tt(Qe)}}}Rt<Ie.length?v.setTimeout(Tt,250):typeof Ce=="function"&&Ce()}Tt()}var mt=v.PR={createSimpleLexer:Be,registerLangHandler:ut,sourceDecorator:He,PR_ATTRIB_NAME:W,PR_ATTRIB_VALUE:ee,PR_COMMENT:oe,PR_DECLARATION:st,PR_KEYWORD:N,PR_LITERAL:pe,PR_NOCODE:ue,PR_PLAIN:Oe,PR_PUNCTUATION:De,PR_SOURCE:re,PR_STRING:O,PR_TAG:Fe,PR_TYPE:ve,prettyPrintOne:y?v.prettyPrintOne=Ft:be=Ft,prettyPrint:J=y?v.prettyPrint=Me:J=Me},ke=v.define;typeof ke=="function"&&ke.amd&&ke("google-code-prettify",[],function(){return mt})})()},25769:function(Vt,it,k){"use strict";var y=k(98040),Ee={"text/plain":"Text","text/html":"Url",default:"Text"},ie="Copy to clipboard: #{key}, Enter";function be(v){var de=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return v.replace(/#{\s*key\s*}/g,de)}function J(v,de){var ce,l,V,B,E,L,x=!1;de||(de={}),ce=de.debug||!1;try{V=y(),B=document.createRange(),E=document.getSelection(),L=document.createElement("span"),L.textContent=v,L.ariaHidden="true",L.style.all="unset",L.style.position="fixed",L.style.top=0,L.style.clip="rect(0, 0, 0, 0)",L.style.whiteSpace="pre",L.style.webkitUserSelect="text",L.style.MozUserSelect="text",L.style.msUserSelect="text",L.style.userSelect="text",L.addEventListener("copy",function(q){if(q.stopPropagation(),de.format)if(q.preventDefault(),typeof q.clipboardData=="undefined"){ce&&console.warn("unable to use e.clipboardData"),ce&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var H=Ee[de.format]||Ee.default;window.clipboardData.setData(H,v)}else q.clipboardData.clearData(),q.clipboardData.setData(de.format,v);de.onCopy&&(q.preventDefault(),de.onCopy(q.clipboardData))}),document.body.appendChild(L),B.selectNodeContents(L),E.addRange(B);var P=document.execCommand("copy");if(!P)throw new Error("copy command was unsuccessful");x=!0}catch(q){ce&&console.error("unable to copy using execCommand: ",q),ce&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(de.format||"text",v),de.onCopy&&de.onCopy(window.clipboardData),x=!0}catch(H){ce&&console.error("unable to copy using clipboardData: ",H),ce&&console.error("falling back to prompt"),l=be("message"in de?de.message:ie),window.prompt(l,v)}}finally{E&&(typeof E.removeRange=="function"?E.removeRange(B):E.removeAllRanges()),L&&document.body.removeChild(L),V()}return x}Vt.exports=J},53184:function(Vt,it,k){"use strict";var y,Ee;function ie(be,J,v){var de=function(ce,l){return be.js_beautify(ce,l)};return de.js=be.js_beautify,de.css=J.css_beautify,de.html=v.html_beautify,de.js_beautify=be.js_beautify,de.css_beautify=J.css_beautify,de.html_beautify=v.html_beautify,de}y=[k(58553),k(87804),k(40998)],Ee=function(be,J,v){return ie(be,J,v)}.apply(it,y),Ee!==void 0&&(Vt.exports=Ee)},87804:function(Vt,it){var k,y;(function(){var Ee;(function(){"use strict";var be=[,,function(ce){function l(E){this.__parent=E,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=[]}l.prototype.clone_empty=function(){var E=new l(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},l.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},l.prototype.has_match=function(E){for(var L=this.__items.length-1;L>=0;L--)if(this.__items[L].match(E))return!0;return!1},l.prototype.set_indent=function(E,L){this.is_empty()&&(this.__indent_count=E||0,this.__alignment_count=L||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.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)},l.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},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(E){this.__items.push(E);var L=E.lastIndexOf(`
`);L!==-1?this.__character_count=E.length-L:this.__character_count+=E.length},l.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function V(E,L){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),L=L||"",E.indent_level>0&&(L=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=L,this.__base_string_length=L.length}V.prototype.get_indent_size=function(E,L){var x=this.__base_string_length;return L=L||0,E<0&&(x=0),x+=E*this.__indent_size,x+=L,x},V.prototype.get_indent_string=function(E,L){var x=this.__base_string;return L=L||0,E<0&&(E=0,x=""),L+=E*this.__indent_size,this.__ensure_cache(L),x+=this.__cache[L],x},V.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},V.prototype.__add_column=function(){var E=this.__cache.length,L=0,x="";this.__indent_size&&E>=this.__indent_size&&(L=Math.floor(E/this.__indent_size),E-=L*this.__indent_size,x=new Array(L+1).join(this.__indent_string)),E&&(x+=new Array(E+1).join(" ")),this.__cache.push(x)};function B(E,L){this.__indent_cache=new V(E,L),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(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(E,L){return this.__indent_cache.get_indent_string(E,L)},B.prototype.get_indent_size=function(E,L){return this.__indent_cache.get_indent_size(E,L)},B.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},B.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},B.prototype.get_code=function(E){this.trim(!0);var L=this.current_line.pop();L&&(L[L.length-1]===`
`&&(L=L.replace(/\n+$/g,"")),this.current_line.push(L)),this._end_with_newline&&this.__add_outputline();var x=this.__lines.join(`
`);return E!==`
`&&(x=x.replace(/[\n]/g,E)),x},B.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},B.prototype.set_indent=function(E,L){return E=E||0,L=L||0,this.next_line.set_indent(E,L),this.__lines.length>1?(this.current_line.set_indent(E,L),!0):(this.current_line.set_indent(),!1)},B.prototype.add_raw_token=function(E){for(var L=0;L<E.newlines;L++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},B.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),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(E){for(var L=this.__lines.length;E<L;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},B.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&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(E,L){for(var x=this.__lines.length-2;x>=0;){var P=this.__lines[x];if(P.is_empty())break;if(P.item(0).indexOf(E)!==0&&P.item(-1)!==L){this.__lines.splice(x+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}x--}},ce.exports.Output=B},,,,function(ce){function l(E,L){this.raw_options=V(E,L),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"])}l.prototype._get_array=function(E,L){var x=this.raw_options[E],P=L||[];return typeof x=="object"?x!==null&&typeof x.concat=="function"&&(P=x.concat()):typeof x=="string"&&(P=x.split(/[^a-zA-Z0-9_\/\-]+/)),P},l.prototype._get_boolean=function(E,L){var x=this.raw_options[E],P=x===void 0?!!L:!!x;return P},l.prototype._get_characters=function(E,L){var x=this.raw_options[E],P=L||"";return typeof x=="string"&&(P=x.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),P},l.prototype._get_number=function(E,L){var x=this.raw_options[E];L=parseInt(L,10),isNaN(L)&&(L=0);var P=parseInt(x,10);return isNaN(P)&&(P=L),P},l.prototype._get_selection=function(E,L,x){var P=this._get_selection_list(E,L,x);if(P.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
`+L+`
You passed in: '`+this.raw_options[E]+"'");return P[0]},l.prototype._get_selection_list=function(E,L,x){if(!L||L.length===0)throw new Error("Selection list cannot be empty.");if(x=x||[L[0]],!this._is_valid_selection(x,L))throw new Error("Invalid Default Value!");var P=this._get_array(E,x);if(!this._is_valid_selection(P,L))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
`+L+`
You passed in: '`+this.raw_options[E]+"'");return P},l.prototype._is_valid_selection=function(E,L){return E.length&&L.length&&!E.some(function(x){return L.indexOf(x)===-1})};function V(E,L){var x={};E=B(E);var P;for(P in E)P!==L&&(x[P]=E[P]);if(L&&E[L])for(P in E[L])x[P]=E[L][P];return x}function B(E){var L={},x;for(x in E){var P=x.replace(/-/g,"_");L[P]=E[x]}return L}ce.exports.Options=l,ce.exports.normalizeOpts=B,ce.exports.mergeOpts=V},,function(ce){var l=RegExp.prototype.hasOwnProperty("sticky");function V(B){this.__input=B||"",this.__input_length=this.__input.length,this.__position=0}V.prototype.restart=function(){this.__position=0},V.prototype.back=function(){this.__position>0&&(this.__position-=1)},V.prototype.hasNext=function(){return this.__position<this.__input_length},V.prototype.next=function(){var B=null;return this.hasNext()&&(B=this.__input.charAt(this.__position),this.__position+=1),B},V.prototype.peek=function(B){var E=null;return B=B||0,B+=this.__position,B>=0&&B<this.__input_length&&(E=this.__input.charAt(B)),E},V.prototype.__match=function(B,E){B.lastIndex=E;var L=B.exec(this.__input);return L&&!(l&&B.sticky)&&L.index!==E&&(L=null),L},V.prototype.test=function(B,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(B,E):!1},V.prototype.testChar=function(B,E){var L=this.peek(E);return B.lastIndex=0,L!==null&&B.test(L)},V.prototype.match=function(B){var E=this.__match(B,this.__position);return E?this.__position+=E[0].length:E=null,E},V.prototype.read=function(B,E,L){var x="",P;return B&&(P=this.match(B),P&&(x+=P[0])),E&&(P||!B)&&(x+=this.readUntil(E,L)),x},V.prototype.readUntil=function(B,E){var L="",x=this.__position;B.lastIndex=this.__position;var P=B.exec(this.__input);return P?(x=P.index,E&&(x+=P[0].length)):x=this.__input_length,L=this.__input.substring(this.__position,x),this.__position=x,L},V.prototype.readUntilAfter=function(B){return this.readUntil(B,!0)},V.prototype.get_regexp=function(B,E){var L=null,x="g";return E&&l&&(x="y"),typeof B=="string"&&B!==""?L=new RegExp(B,x):B&&(L=new RegExp(B.source,x)),L},V.prototype.get_literal_regexp=function(B){return RegExp(B.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},V.prototype.peekUntilAfter=function(B){var E=this.__position,L=this.readUntilAfter(B);return this.__position=E,L},V.prototype.lookBack=function(B){var E=this.__position-1;return E>=B.length&&this.__input.substring(E-B.length,E).toLowerCase()===B},ce.exports.InputScanner=V},,,,,function(ce){function l(V,B){V=typeof V=="string"?V:V.source,B=typeof B=="string"?B:B.source,this.__directives_block_pattern=new RegExp(V+/ beautify( \w+[:]\w+)+ /.source+B,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(V+/\sbeautify\signore:end\s/.source+B,"g")}l.prototype.get_directives=function(V){if(!V.match(this.__directives_block_pattern))return null;var B={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(V);E;)B[E[1]]=E[2],E=this.__directive_pattern.exec(V);return B},l.prototype.readIgnored=function(V){return V.readUntilAfter(this.__directives_end_ignore_pattern)},ce.exports.Directives=l},,function(ce,l,V){var B=V(16).Beautifier,E=V(17).Options;function L(x,P){var q=new B(x,P);return q.beautify()}ce.exports=L,ce.exports.defaultOptions=function(){return new E}},function(ce,l,V){var B=V(17).Options,E=V(2).Output,L=V(8).InputScanner,x=V(13).Directives,P=new x(/\/\*/,/\*\//),q=/\r\n|[\r\n]/,H=/\r\n|[\r\n]/g,U=/\s/,A=/(?:\s|\n)+/g,z=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,O=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function N(oe,ve){this._source_text=oe||"",this._options=new B(ve),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"]}N.prototype.eatString=function(oe){var ve="";for(this._ch=this._input.next();this._ch;){if(ve+=this._ch,this._ch==="\\")ve+=this._input.next();else if(oe.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return ve},N.prototype.eatWhitespace=function(oe){for(var ve=U.test(this._input.peek()),pe=0;U.test(this._input.peek());)this._ch=this._input.next(),oe&&this._ch===`
`&&(pe===0||pe<this._options.max_preserve_newlines)&&(pe++,this._output.add_new_line(!0));return ve},N.prototype.foundNestedPseudoClass=function(){for(var oe=0,ve=1,pe=this._input.peek(ve);pe;){if(pe==="{")return!0;if(pe==="(")oe+=1;else if(pe===")"){if(oe===0)return!1;oe-=1}else if(pe===";"||pe==="}")return!1;ve++,pe=this._input.peek(ve)}return!1},N.prototype.print_string=function(oe){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(oe)},N.prototype.preserveSingleSpace=function(oe){oe&&(this._output.space_before_token=!0)},N.prototype.indent=function(){this._indentLevel++},N.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},N.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var oe=this._source_text,ve=this._options.eol;ve==="auto"&&(ve=`
`,oe&&q.test(oe||"")&&(ve=oe.match(q)[0])),oe=oe.replace(H,`
`);var pe=oe.match(/^[\t ]*/)[0];this._output=new E(this._options,pe),this._input=new L(oe),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var De=0,Oe=!1,Fe=!1,st=!1,re=!1,W=!1,ee=this._ch,ue=!1,ne,ae,S;ne=this._input.read(A),ae=ne!=="",S=ee,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),ee=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var w=this._input.read(z),K=P.get_directives(w);K&&K.ignore==="start"&&(w+=P.readIgnored(this._input)),this.print_string(w),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(O)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(ae),this.print_string(this._ch);var ye=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ye.match(/[ :]$/)&&(ye=this.eatString(": ").replace(/\s+$/,""),this.print_string(ye),this._output.space_before_token=!0),De===0&&ye.indexOf(":")!==-1&&(Fe=!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 Be=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Be.match(/[ :]$/)&&(Be=this.eatString(": ").replace(/\s+$/,""),this.print_string(Be),this._output.space_before_token=!0),De===0&&Be.indexOf(":")!==-1?(Fe=!0,this.indent()):Be in this.NESTED_AT_RULE?(this._nestedLevel+=1,Be in this.CONDITIONAL_GROUP_RULE&&(st=!0)):De===0&&!Fe&&(re=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(ae),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Fe&&(Fe=!1,this.outdent()),re=!1,st?(st=!1,Oe=this._indentLevel>=this._nestedLevel):Oe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Oe&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(S==="("?this._output.space_before_token=!1:S!==","&&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(),S==="{"&&this._output.trim(!0),Fe&&(this.outdent(),Fe=!1),this.print_string(this._ch),Oe=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var He=0;He<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;He++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[He])){ue=!0;break}(Oe||st)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!re&&De===0?(this.print_string(":"),Fe||(Fe=!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 ot=S==='"'||S==="'";this.preserveSingleSpace(ot||ae),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")ue=!1,De===0?(Fe&&(this.outdent(),Fe=!1),re=!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(),De++,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(")")),De&&(De--,this.outdent()));else{var at=!1;this._input.lookBack("with")&&(at=!0),this.preserveSingleSpace(ae||at),this.print_string(this._ch),Fe&&S==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),W=!0):(this.eatWhitespace(),De++,this.indent())}else if(this._ch===")")De&&(De--,this.outdent()),W&&this._input.peek()===";"&&this._options.selector_separator_newline&&(W=!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&&(!Fe||W)&&De===0&&!re?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Fe&&De===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&&U.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("="),U.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 pt=S==='"'||S==="'";this.preserveSingleSpace(pt||ae),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&ue&&this._output.add_new_line()}var At=this._output.get_code(ve);return At},ce.exports.Beautifier=N},function(ce,l,V){var B=V(6).Options;function E(L){B.call(this,L,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var x=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||x;var P=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var q=0;q<P.length;q++)P[q]!=="expand"?this.brace_style="collapse":this.brace_style=P[q]}E.prototype=new B,ce.exports.Options=E}],J={};function v(ce){var l=J[ce];if(l!==void 0)return l.exports;var V=J[ce]={exports:{}};return be[ce](V,V.exports,v),V.exports}var de=v(15);Ee=de})();var ie=Ee;k=[],y=function(){return{css_beautify:ie}}.apply(it,k),y!==void 0&&(Vt.exports=y)})()},40998:function(Vt,it,k){var y,Ee;(function(){var ie;(function(){"use strict";var de=[,,function(B){function E(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=[]}E.prototype.clone_empty=function(){var P=new E(this.__parent);return P.set_indent(this.__indent_count,this.__alignment_count),P},E.prototype.item=function(P){return P<0?this.__items[this.__items.length+P]:this.__items[P]},E.prototype.has_match=function(P){for(var q=this.__items.length-1;q>=0;q--)if(this.__items[q].match(P))return!0;return!1},E.prototype.set_indent=function(P,q){this.is_empty()&&(this.__indent_count=P||0,this.__alignment_count=q||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.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)},E.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},E.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},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(P){this.__items.push(P);var q=P.lastIndexOf(`
`);q!==-1?this.__character_count=P.length-q:this.__character_count+=P.length},E.prototype.pop=function(){var P=null;return this.is_empty()||(P=this.__items.pop(),this.__character_count-=P.length),P},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.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 L(P,q){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)),q=q||"",P.indent_level>0&&(q=new Array(P.indent_level+1).join(this.__indent_string)),this.__base_string=q,this.__base_string_length=q.length}L.prototype.get_indent_size=function(P,q){var H=this.__base_string_length;return q=q||0,P<0&&(H=0),H+=P*this.__indent_size,H+=q,H},L.prototype.get_indent_string=function(P,q){var H=this.__base_string;return q=q||0,P<0&&(P=0,H=""),q+=P*this.__indent_size,this.__ensure_cache(q),H+=this.__cache[q],H},L.prototype.__ensure_cache=function(P){for(;P>=this.__cache.length;)this.__add_column()},L.prototype.__add_column=function(){var P=this.__cache.length,q=0,H="";this.__indent_size&&P>=this.__indent_size&&(q=Math.floor(P/this.__indent_size),P-=q*this.__indent_size,H=new Array(q+1).join(this.__indent_string)),P&&(H+=new Array(P+1).join(" ")),this.__cache.push(H)};function x(P,q){this.__indent_cache=new L(P,q),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 E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}x.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},x.prototype.get_line_number=function(){return this.__lines.length},x.prototype.get_indent_string=function(P,q){return this.__indent_cache.get_indent_string(P,q)},x.prototype.get_indent_size=function(P,q){return this.__indent_cache.get_indent_size(P,q)},x.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},x.prototype.add_new_line=function(P){return this.is_empty()||!P&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},x.prototype.get_code=function(P){this.trim(!0);var q=this.current_line.pop();q&&(q[q.length-1]===`
`&&(q=q.replace(/\n+$/g,"")),this.current_line.push(q)),this._end_with_newline&&this.__add_outputline();var H=this.__lines.join(`
`);return P!==`
`&&(H=H.replace(/[\n]/g,P)),H},x.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},x.prototype.set_indent=function(P,q){return P=P||0,q=q||0,this.next_line.set_indent(P,q),this.__lines.length>1?(this.current_line.set_indent(P,q),!0):(this.current_line.set_indent(),!1)},x.prototype.add_raw_token=function(P){for(var q=0;q<P.newlines;q++)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},x.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()},x.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(" "))},x.prototype.remove_indent=function(P){for(var q=this.__lines.length;P<q;)this.__lines[P]._remove_indent(),P++;this.current_line._remove_wrap_indent()},x.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},x.prototype.just_added_newline=function(){return this.current_line.is_empty()},x.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},x.prototype.ensure_empty_line_above=function(P,q){for(var H=this.__lines.length-2;H>=0;){var U=this.__lines[H];if(U.is_empty())break;if(U.item(0).indexOf(P)!==0&&U.item(-1)!==q){this.__lines.splice(H+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}H--}},B.exports.Output=x},function(B){function E(L,x,P,q){this.type=L,this.text=x,this.comments_before=null,this.newlines=P||0,this.whitespace_before=q||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}B.exports.Token=E},,,function(B){function E(P,q){this.raw_options=L(P,q),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"])}E.prototype._get_array=function(P,q){var H=this.raw_options[P],U=q||[];return typeof H=="object"?H!==null&&typeof H.concat=="function"&&(U=H.concat()):typeof H=="string"&&(U=H.split(/[^a-zA-Z0-9_\/\-]+/)),U},E.prototype._get_boolean=function(P,q){var H=this.raw_options[P],U=H===void 0?!!q:!!H;return U},E.prototype._get_characters=function(P,q){var H=this.raw_options[P],U=q||"";return typeof H=="string"&&(U=H.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),U},E.prototype._get_number=function(P,q){var H=this.raw_options[P];q=parseInt(q,10),isNaN(q)&&(q=0);var U=parseInt(H,10);return isNaN(U)&&(U=q),U},E.prototype._get_selection=function(P,q,H){var U=this._get_selection_list(P,q,H);if(U.length!==1)throw new Error("Invalid Option Value: The option '"+P+`' can only be one of the following values:
`+q+`
You passed in: '`+this.raw_options[P]+"'");return U[0]},E.prototype._get_selection_list=function(P,q,H){if(!q||q.length===0)throw new Error("Selection list cannot be empty.");if(H=H||[q[0]],!this._is_valid_selection(H,q))throw new Error("Invalid Default Value!");var U=this._get_array(P,H);if(!this._is_valid_selection(U,q))throw new Error("Invalid Option Value: The option '"+P+`' can contain only the following values:
`+q+`
You passed in: '`+this.raw_options[P]+"'");return U},E.prototype._is_valid_selection=function(P,q){return P.length&&q.length&&!P.some(function(H){return q.indexOf(H)===-1})};function L(P,q){var H={};P=x(P);var U;for(U in P)U!==q&&(H[U]=P[U]);if(q&&P[q])for(U in P[q])H[U]=P[q][U];return H}function x(P){var q={},H;for(H in P){var U=H.replace(/-/g,"_");q[U]=P[H]}return q}B.exports.Options=E,B.exports.normalizeOpts=x,B.exports.mergeOpts=L},,function(B){var E=RegExp.prototype.hasOwnProperty("sticky");function L(x){this.__input=x||"",this.__input_length=this.__input.length,this.__position=0}L.prototype.restart=function(){this.__position=0},L.prototype.back=function(){this.__position>0&&(this.__position-=1)},L.prototype.hasNext=function(){return this.__position<this.__input_length},L.prototype.next=function(){var x=null;return this.hasNext()&&(x=this.__input.charAt(this.__position),this.__position+=1),x},L.prototype.peek=function(x){var P=null;return x=x||0,x+=this.__position,x>=0&&x<this.__input_length&&(P=this.__input.charAt(x)),P},L.prototype.__match=function(x,P){x.lastIndex=P;var q=x.exec(this.__input);return q&&!(E&&x.sticky)&&q.index!==P&&(q=null),q},L.prototype.test=function(x,P){return P=P||0,P+=this.__position,P>=0&&P<this.__input_length?!!this.__match(x,P):!1},L.prototype.testChar=function(x,P){var q=this.peek(P);return x.lastIndex=0,q!==null&&x.test(q)},L.prototype.match=function(x){var P=this.__match(x,this.__position);return P?this.__position+=P[0].length:P=null,P},L.prototype.read=function(x,P,q){var H="",U;return x&&(U=this.match(x),U&&(H+=U[0])),P&&(U||!x)&&(H+=this.readUntil(P,q)),H},L.prototype.readUntil=function(x,P){var q="",H=this.__position;x.lastIndex=this.__position;var U=x.exec(this.__input);return U?(H=U.index,P&&(H+=U[0].length)):H=this.__input_length,q=this.__input.substring(this.__position,H),this.__position=H,q},L.prototype.readUntilAfter=function(x){return this.readUntil(x,!0)},L.prototype.get_regexp=function(x,P){var q=null,H="g";return P&&E&&(H="y"),typeof x=="string"&&x!==""?q=new RegExp(x,H):x&&(q=new RegExp(x.source,H)),q},L.prototype.get_literal_regexp=function(x){return RegExp(x.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},L.prototype.peekUntilAfter=function(x){var P=this.__position,q=this.readUntilAfter(x);return this.__position=P,q},L.prototype.lookBack=function(x){var P=this.__position-1;return P>=x.length&&this.__input.substring(P-x.length,P).toLowerCase()===x},B.exports.InputScanner=L},function(B,E,L){var x=L(8).InputScanner,P=L(3).Token,q=L(10).TokenStream,H=L(11).WhitespacePattern,U={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},A=function(z,O){this._input=new x(z),this._options=O||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new H(this._input)};A.prototype.tokenize=function(){this._input.restart(),this.__tokens=new q,this._reset();for(var z,O=new P(U.START,""),N=null,oe=[],ve=new q;O.type!==U.EOF;){for(z=this._get_next_token(O,N);this._is_comment(z);)ve.add(z),z=this._get_next_token(O,N);ve.isEmpty()||(z.comments_before=ve,ve=new q),z.parent=N,this._is_opening(z)?(oe.push(N),N=z):N&&this._is_closing(z,N)&&(z.opened=N,N.closed=z,N=oe.pop(),z.parent=N),z.previous=O,O.next=z,this.__tokens.add(z),O=z}return this.__tokens},A.prototype._is_first_token=function(){return this.__tokens.isEmpty()},A.prototype._reset=function(){},A.prototype._get_next_token=function(z,O){this._readWhitespace();var N=this._input.read(/.+/g);return N?this._create_token(U.RAW,N):this._create_token(U.EOF,"")},A.prototype._is_comment=function(z){return!1},A.prototype._is_opening=function(z){return!1},A.prototype._is_closing=function(z,O){return!1},A.prototype._create_token=function(z,O){var N=new P(z,O,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return N},A.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},B.exports.Tokenizer=A,B.exports.TOKEN=U},function(B){function E(L){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=L}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position<this.__tokens_length},E.prototype.next=function(){var L=null;return this.hasNext()&&(L=this.__tokens[this.__position],this.__position+=1),L},E.prototype.peek=function(L){var x=null;return L=L||0,L+=this.__position,L>=0&&L<this.__tokens_length&&(x=this.__tokens[L]),x},E.prototype.add=function(L){this.__parent_token&&(L.parent=this.__parent_token),this.__tokens.push(L),this.__tokens_length+=1},B.exports.TokenStream=E},function(B,E,L){var x=L(12).Pattern;function P(q,H){x.call(this,q,H),H?this._line_regexp=this._input.get_regexp(H._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}P.prototype=new x,P.prototype.__set_whitespace_patterns=function(q,H){q+="\\t ",H+="\\n\\r",this._match_pattern=this._input.get_regexp("["+q+H+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+H+"]")},P.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var q=this._input.read(this._match_pattern);if(q===" ")this.whitespace_before_token=" ";else if(q){var H=this.__split(this._newline_regexp,q);this.newline_count=H.length-1,this.whitespace_before_token=H[this.newline_count]}return q},P.prototype.matching=function(q,H){var U=this._create();return U.__set_whitespace_patterns(q,H),U._update(),U},P.prototype._create=function(){return new P(this._input,this)},P.prototype.__split=function(q,H){q.lastIndex=0;for(var U=0,A=[],z=q.exec(H);z;)A.push(H.substring(U,z.index)),U=z.index+z[0].length,z=q.exec(H);return U<H.length?A.push(H.substring(U,H.length)):A.push(""),A},B.exports.WhitespacePattern=P},function(B){function E(L,x){this._input=L,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,x&&(this._starting_pattern=this._input.get_regexp(x._starting_pattern,!0),this._match_pattern=this._input.get_regexp(x._match_pattern,!0),this._until_pattern=this._input.get_regexp(x._until_pattern),this._until_after=x._until_after)}E.prototype.read=function(){var L=this._input.read(this._starting_pattern);return(!this._starting_pattern||L)&&(L+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),L},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.prototype.until_after=function(L){var x=this._create();return x._until_after=!0,x._until_pattern=this._input.get_regexp(L),x._update(),x},E.prototype.until=function(L){var x=this._create();return x._until_after=!1,x._until_pattern=this._input.get_regexp(L),x._update(),x},E.prototype.starting_with=function(L){var x=this._create();return x._starting_pattern=this._input.get_regexp(L,!0),x._update(),x},E.prototype.matching=function(L){var x=this._create();return x._match_pattern=this._input.get_regexp(L,!0),x._update(),x},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},B.exports.Pattern=E},function(B){function E(L,x){L=typeof L=="string"?L:L.source,x=typeof x=="string"?x:x.source,this.__directives_block_pattern=new RegExp(L+/ beautify( \w+[:]\w+)+ /.source+x,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(L+/\sbeautify\signore:end\s/.source+x,"g")}E.prototype.get_directives=function(L){if(!L.match(this.__directives_block_pattern))return null;var x={};this.__directive_pattern.lastIndex=0;for(var P=this.__directive_pattern.exec(L);P;)x[P[1]]=P[2],P=this.__directive_pattern.exec(L);return x},E.prototype.readIgnored=function(L){return L.readUntilAfter(this.__directives_end_ignore_pattern)},B.exports.Directives=E},function(B,E,L){var x=L(12).Pattern,P={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function q(H,U){x.call(this,H,U),this.__template_pattern=null,this._disabled=Object.assign({},P),this._excluded=Object.assign({},P),U&&(this.__template_pattern=this._input.get_regexp(U.__template_pattern),this._excluded=Object.assign(this._excluded,U._excluded),this._disabled=Object.assign(this._disabled,U._disabled));var A=new x(H);this.__patterns={handlebars_comment:A.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:A.starting_with(/{{{/).until_after(/}}}/),handlebars:A.starting_with(/{{/).until_after(/}}/),php:A.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:A.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:A.starting_with(/{%/).until_after(/%}/),django_value:A.starting_with(/{{/).until_after(/}}/),django_comment:A.starting_with(/{#/).until_after(/#}/),smarty:A.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:A.starting_with(/{\*/).until_after(/\*}/),smarty_literal:A.starting_with(/{literal}/).until_after(/{\/literal}/)}}q.prototype=new x,q.prototype._create=function(){return new q(this._input,this)},q.prototype._update=function(){this.__set_templated_pattern()},q.prototype.disable=function(H){var U=this._create();return U._disabled[H]=!0,U._update(),U},q.prototype.read_options=function(H){var U=this._create();for(var A in P)U._disabled[A]=H.templating.indexOf(A)===-1;return U._update(),U},q.prototype.exclude=function(H){var U=this._create();return U._excluded[H]=!0,U._update(),U},q.prototype.read=function(){var H="";this._match_pattern?H=this._input.read(this._starting_pattern):H=this._input.read(this._starting_pattern,this.__template_pattern);for(var U=this._read_template();U;)this._match_pattern?U+=this._input.read(this._match_pattern):U+=this._input.readUntil(this.__template_pattern),H+=U,U=this._read_template();return this._until_after&&(H+=this._input.readUntilAfter(this._until_pattern)),H},q.prototype.__set_templated_pattern=function(){var H=[];this._disabled.php||H.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||H.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||H.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||H.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(H.push(this.__patterns.django._starting_pattern.source),H.push(this.__patterns.django_value._starting_pattern.source),H.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||H.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&H.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+H.join("|")+")")},q.prototype._read_template=function(){var H="",U=this._input.peek();if(U==="<"){var A=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&A==="?"&&(H=H||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&A==="%"&&(H=H||this.__patterns.erb.read())}else U==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(H=H||this.__patterns.handlebars_comment.read(),H=H||this.__patterns.handlebars_unescaped.read(),H=H||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(H=H||this.__patterns.django_value.read()),this._excluded.django||(H=H||this.__patterns.django_comment.read(),H=H||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(H=H||this.__patterns.smarty_comment.read(),H=H||this.__patterns.smarty_literal.read(),H=H||this.__patterns.smarty.read()));return H},B.exports.TemplatablePattern=q},,,,function(B,E,L){var x=L(19).Beautifier,P=L(20).Options;function q(H,U,A,z){var O=new x(H,U,A,z);return O.beautify()}B.exports=q,B.exports.defaultOptions=function(){return new P}},function(B,E,L){var x=L(20).Options,P=L(2).Output,q=L(21).Tokenizer,H=L(21).TOKEN,U=/\r\n|[\r\n]/,A=/\r\n|[\r\n]/g,z=function(re,W){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=re.max_preserve_newlines,this.preserve_newlines=re.preserve_newlines,this._output=new P(re,W)};z.prototype.current_line_has_match=function(re){return this._output.current_line.has_match(re)},z.prototype.set_space_before_token=function(re,W){this._output.space_before_token=re,this._output.non_breaking_space=W},z.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},z.prototype.add_raw_token=function(re){this._output.add_raw_token(re)},z.prototype.print_preserved_newlines=function(re){var W=0;re.type!==H.TEXT&&re.previous.type!==H.TEXT&&(W=re.newlines?1:0),this.preserve_newlines&&(W=re.newlines<this.max_preserve_newlines+1?re.newlines:this.max_preserve_newlines+1);for(var ee=0;ee<W;ee++)this.print_newline(ee>0);return W!==0},z.prototype.traverse_whitespace=function(re){return re.whitespace_before||re.newlines?(this.print_preserved_newlines(re)||(this._output.space_before_token=!0),!0):!1},z.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},z.prototype.print_newline=function(re){this._output.add_new_line(re)},z.prototype.print_token=function(re){re.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(re.text))},z.prototype.indent=function(){this.indent_level++},z.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},z.prototype.get_full_indent=function(re){return re=this.indent_level+(re||0),re<1?"":this._output.get_indent_string(re)};var O=function(re){for(var W=null,ee=re.next;ee.type!==H.EOF&&re.closed!==ee;){if(ee.type===H.ATTRIBUTE&&ee.text==="type"){ee.next&&ee.next.type===H.EQUALS&&ee.next.next&&ee.next.next.type===H.VALUE&&(W=ee.next.next.text);break}ee=ee.next}return W},N=function(re,W){var ee=null,ue=null;return W.closed?(re==="script"?ee="text/javascript":re==="style"&&(ee="text/css"),ee=O(W)||ee,ee.search("text/css")>-1?ue="css":ee.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?ue="javascript":ee.search(/(text|application|dojo)\/(x-)?(html)/)>-1?ue="html":ee.search(/test\/null/)>-1&&(ue="null"),ue):null};function oe(re,W){return W.indexOf(re)!==-1}function ve(re,W,ee){this.parent=re||null,this.tag=W?W.tag_name:"",this.indent_level=ee||0,this.parser_token=W||null}function pe(re){this._printer=re,this._current_frame=null}pe.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},pe.prototype.record_tag=function(re){var W=new ve(this._current_frame,re,this._printer.indent_level);this._current_frame=W},pe.prototype._try_pop_frame=function(re){var W=null;return re&&(W=re.parser_token,this._printer.indent_level=re.indent_level,this._current_frame=re.parent),W},pe.prototype._get_frame=function(re,W){for(var ee=this._current_frame;ee&&re.indexOf(ee.tag)===-1;){if(W&&W.indexOf(ee.tag)!==-1){ee=null;break}ee=ee.parent}return ee},pe.prototype.try_pop=function(re,W){var ee=this._get_frame([re],W);return this._try_pop_frame(ee)},pe.prototype.indent_to_tag=function(re){var W=this._get_frame(re);W&&(this._printer.indent_level=W.indent_level)};function De(re,W,ee,ue){this._source_text=re||"",W=W||{},this._js_beautify=ee,this._css_beautify=ue,this._tag_stack=null;var ne=new x(W,"html");this._options=ne,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"}De.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var re=this._source_text,W=this._options.eol;this._options.eol==="auto"&&(W=`
`,re&&U.test(re)&&(W=re.match(U)[0])),re=re.replace(A,`
`);var ee=re.match(/^[\t ]*/)[0],ue={text:"",type:""},ne=new Oe(this._options),ae=new z(this._options,ee),S=new q(re,this._options).tokenize();this._tag_stack=new pe(ae);for(var w=null,K=S.next();K.type!==H.EOF;)K.type===H.TAG_OPEN||K.type===H.COMMENT?(w=this._handle_tag_open(ae,K,ne,ue,S),ne=w):K.type===H.ATTRIBUTE||K.type===H.EQUALS||K.type===H.VALUE||K.type===H.TEXT&&!ne.tag_complete?w=this._handle_inside_tag(ae,K,ne,ue):K.type===H.TAG_CLOSE?w=this._handle_tag_close(ae,K,ne):K.type===H.TEXT?w=this._handle_text(ae,K,ne):K.type===H.CONTROL_FLOW_OPEN?w=this._handle_control_flow_open(ae,K):K.type===H.CONTROL_FLOW_CLOSE?w=this._handle_control_flow_close(ae,K):ae.add_raw_token(K),ue=w,K=S.next();var ye=ae._output.get_code(W);return ye},De.prototype._handle_control_flow_open=function(re,W){var ee={text:W.text,type:W.type};return re.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),W.newlines?re.print_preserved_newlines(W):re.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),re.print_token(W),re.indent(),ee},De.prototype._handle_control_flow_close=function(re,W){var ee={text:W.text,type:W.type};return re.deindent(),W.newlines?re.print_preserved_newlines(W):re.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),re.print_token(W),ee},De.prototype._handle_tag_close=function(re,W,ee){var ue={text:W.text,type:W.type};return re.alignment_size=0,ee.tag_complete=!0,re.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),ee.is_unformatted?re.add_raw_token(W):(ee.tag_start_char==="<"&&(re.set_space_before_token(W.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&ee.has_wrapped_attrs&&re.print_newline(!1)),re.print_token(W)),ee.indent_content&&!(ee.is_unformatted||ee.is_content_unformatted)&&(re.indent(),ee.indent_content=!1),!ee.is_inline_element&&!(ee.is_unformatted||ee.is_content_unformatted)&&re.set_wrap_point(),ue},De.prototype._handle_inside_tag=function(re,W,ee,ue){var ne=ee.has_wrapped_attrs,ae={text:W.text,type:W.type};return re.set_space_before_token(W.newlines||W.whitespace_before!=="",!0),ee.is_unformatted?re.add_raw_token(W):ee.tag_start_char==="{"&&W.type===H.TEXT?re.print_preserved_newlines(W)?(W.newlines=0,re.add_raw_token(W)):re.print_token(W):(W.type===H.ATTRIBUTE?re.set_space_before_token(!0):(W.type===H.EQUALS||W.type===H.VALUE&&W.previous.type===H.EQUALS)&&re.set_space_before_token(!1),W.type===H.ATTRIBUTE&&ee.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(re.traverse_whitespace(W),ne=ne||W.newlines!==0),this._is_wrap_attributes_force&&ee.attr_count>=this._options.wrap_attributes_min_attrs&&(ue.type!==H.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(re.print_newline(!1),ne=!0)),re.print_token(W),ne=ne||re.previous_token_wrapped(),ee.has_wrapped_attrs=ne),ae},De.prototype._handle_text=function(re,W,ee){var ue={text:W.text,type:"TK_CONTENT"};return ee.custom_beautifier_name?this._print_custom_beatifier_text(re,W,ee):ee.is_unformatted||ee.is_content_unformatted?re.add_raw_token(W):(re.traverse_whitespace(W),re.print_token(W)),ue},De.prototype._print_custom_beatifier_text=function(re,W,ee){var ue=this;if(W.text!==""){var ne=W.text,ae,S=1,w="",K="";ee.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?ae=this._js_beautify:ee.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?ae=this._css_beautify:ee.custom_beautifier_name==="html"&&(ae=function(pt,At){var ut=new De(pt,At,ue._js_beautify,ue._css_beautify);return ut.beautify()}),this._options.indent_scripts==="keep"?S=0:this._options.indent_scripts==="separate"&&(S=-re.indent_level);var ye=re.get_full_indent(S);if(ne=ne.replace(/\n[ \t]*$/,""),ee.custom_beautifier_name!=="html"&&ne[0]==="<"&&ne.match(/^(<!--|<!\[CDATA\[)/)){var Be=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ne);if(!Be){re.add_raw_token(W);return}w=ye+Be[1]+`
`,ne=Be[4],Be[5]&&(K=ye+Be[5]),ne=ne.replace(/\n[ \t]*$/,""),(Be[2]||Be[3].indexOf(`
`)!==-1)&&(Be=Be[3].match(/[ \t]+$/),Be&&(W.whitespace_before=Be[0]))}if(ne)if(ae){var He=function(){this.eol=`
`};He.prototype=this._options.raw_options;var ot=new He;ne=ae(ye+ne,ot)}else{var at=W.whitespace_before;at&&(ne=ne.replace(new RegExp(`
(`+at+")?","g"),`
`)),ne=ye+ne.replace(/\n/g,`
`+ye)}w&&(ne?ne=w+ne+`
`+K:ne=w+K),re.print_newline(!1),ne&&(W.text=ne,W.whitespace_before="",W.newlines=0,re.add_raw_token(W),re.print_newline(!0))}},De.prototype._handle_tag_open=function(re,W,ee,ue,ne){var ae=this._get_tag_open_token(W);if((ee.is_unformatted||ee.is_content_unformatted)&&!ee.is_empty_element&&W.type===H.TAG_OPEN&&!ae.is_start_tag?(re.add_raw_token(W),ae.start_tag_token=this._tag_stack.try_pop(ae.tag_name)):(re.traverse_whitespace(W),this._set_tag_position(re,W,ae,ee,ue),ae.is_inline_element||re.set_wrap_point(),re.print_token(W)),ae.is_start_tag&&this._is_wrap_attributes_force){var S=0,w;do w=ne.peek(S),w.type===H.ATTRIBUTE&&(ae.attr_count+=1),S+=1;while(w.type!==H.EOF&&w.type!==H.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(ae.alignment_size=W.text.length+1),!ae.tag_complete&&!ae.is_unformatted&&(re.alignment_size=ae.alignment_size),ae};var Oe=function(re,W,ee){if(this.parent=W||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="",!ee)this.tag_complete=!0;else{var ue;this.tag_start_char=ee.text[0],this.text=ee.text,this.tag_start_char==="<"?(ue=ee.text.match(/^<([^\s>]*)/),this.tag_check=ue?ue[1]:""):(ue=ee.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=ue?ue[1]:"",(ee.text.startsWith("{{#>")||ee.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&ee.next!==null?this.tag_check=ee.next.text.split(" ")[0]:this.tag_check=ee.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),ee.type===H.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||ee.closed&&ee.closed.text==="/>";var ne=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ne=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!re.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ne)))}};De.prototype._get_tag_open_token=function(re){var W=new Oe(this._options,this._tag_stack.get_parser_token(),re);return W.alignment_size=this._options.wrap_attributes_indent_size,W.is_end_tag=W.is_end_tag||oe(W.tag_check,this._options.void_elements),W.is_empty_element=W.tag_complete||W.is_start_tag&&W.is_end_tag,W.is_unformatted=!W.tag_complete&&oe(W.tag_check,this._options.unformatted),W.is_content_unformatted=!W.is_empty_element&&oe(W.tag_check,this._options.content_unformatted),W.is_inline_element=oe(W.tag_name,this._options.inline)||this._options.inline_custom_elements&&W.tag_name.includes("-")||W.tag_start_char==="{",W},De.prototype._set_tag_position=function(re,W,ee,ue,ne){if(ee.is_empty_element||(ee.is_end_tag?ee.start_tag_token=this._tag_stack.try_pop(ee.tag_name):(this._do_optional_end_element(ee)&&(ee.is_inline_element||re.print_newline(!1)),this._tag_stack.record_tag(ee),(ee.tag_name==="script"||ee.tag_name==="style")&&!(ee.is_unformatted||ee.is_content_unformatted)&&(ee.custom_beautifier_name=N(ee.tag_check,W)))),oe(ee.tag_check,this._options.extra_liners)&&(re.print_newline(!1),re._output.just_added_blankline()||re.print_newline(!0)),ee.is_empty_element){if(ee.tag_start_char==="{"&&ee.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),ee.indent_content=!0;var ae=re.current_line_has_match(/{{#if/);ae||re.print_newline(!1)}ee.tag_name==="!--"&&ne.type===H.TAG_CLOSE&&ue.is_end_tag&&ee.text.indexOf(`
`)===-1||(ee.is_inline_element||ee.is_unformatted||re.print_newline(!1),this._calcluate_parent_multiline(re,ee))}else if(ee.is_end_tag){var S=!1;S=ee.start_tag_token&&ee.start_tag_token.multiline_content,S=S||!ee.is_inline_element&&!(ue.is_inline_element||ue.is_unformatted)&&!(ne.type===H.TAG_CLOSE&&ee.start_tag_token===ue)&&ne.type!=="TK_CONTENT",(ee.is_content_unformatted||ee.is_unformatted)&&(S=!1),S&&re.print_newline(!1)}else ee.indent_content=!ee.custom_beautifier_name,ee.tag_start_char==="<"&&(ee.tag_name==="html"?ee.indent_content=this._options.indent_inner_html:ee.tag_name==="head"?ee.indent_content=this._options.indent_head_inner_html:ee.tag_name==="body"&&(ee.indent_content=this._options.indent_body_inner_html)),!(ee.is_inline_element||ee.is_unformatted)&&(ne.type!=="TK_CONTENT"||ee.is_content_unformatted)&&re.print_newline(!1),this._calcluate_parent_multiline(re,ee)},De.prototype._calcluate_parent_multiline=function(re,W){W.parent&&re._output.just_added_newline()&&!((W.is_inline_element||W.is_unformatted)&&W.parent.is_inline_element)&&(W.parent.multiline_content=!0)};var Fe=["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"],st=["a","audio","del","ins","map","noscript","video"];De.prototype._do_optional_end_element=function(re){var W=null;if(!(re.is_empty_element||!re.is_start_tag||!re.parent)){if(re.tag_name==="body")W=W||this._tag_stack.try_pop("head");else if(re.tag_name==="li")W=W||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(re.tag_name==="dd"||re.tag_name==="dt")W=W||this._tag_stack.try_pop("dt",["dl"]),W=W||this._tag_stack.try_pop("dd",["dl"]);else if(re.parent.tag_name==="p"&&Fe.indexOf(re.tag_name)!==-1){var ee=re.parent.parent;(!ee||st.indexOf(ee.tag_name)===-1)&&(W=W||this._tag_stack.try_pop("p"))}else re.tag_name==="rp"||re.tag_name==="rt"?(W=W||this._tag_stack.try_pop("rt",["ruby","rtc"]),W=W||this._tag_stack.try_pop("rp",["ruby","rtc"])):re.tag_name==="optgroup"?W=W||this._tag_stack.try_pop("optgroup",["select"]):re.tag_name==="option"?W=W||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):re.tag_name==="colgroup"?W=W||this._tag_stack.try_pop("caption",["table"]):re.tag_name==="thead"?(W=W||this._tag_stack.try_pop("caption",["table"]),W=W||this._tag_stack.try_pop("colgroup",["table"])):re.tag_name==="tbody"||re.tag_name==="tfoot"?(W=W||this._tag_stack.try_pop("caption",["table"]),W=W||this._tag_stack.try_pop("colgroup",["table"]),W=W||this._tag_stack.try_pop("thead",["table"]),W=W||this._tag_stack.try_pop("tbody",["table"])):re.tag_name==="tr"?(W=W||this._tag_stack.try_pop("caption",["table"]),W=W||this._tag_stack.try_pop("colgroup",["table"]),W=W||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(re.tag_name==="th"||re.tag_name==="td")&&(W=W||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),W=W||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return re.parent=this._tag_stack.get_parser_token(),W}},B.exports.Beautifier=De},function(B,E,L){var x=L(6).Options;function P(q){x.call(this,q,"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"])}P.prototype=new x,B.exports.Options=P},function(B,E,L){var x=L(9).Tokenizer,P=L(9).TOKEN,q=L(13).Directives,H=L(14).TemplatablePattern,U=L(12).Pattern,A={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:P.START,RAW:P.RAW,EOF:P.EOF},z=new q(/<\!--/,/-->/),O=function(N,oe){x.call(this,N,oe),this._current_tag_name="";var ve=new H(this._input).read_options(this._options),pe=new U(this._input);if(this.__patterns={word:ve.until(/[\n\r\t <]/),word_control_flow_close_excluded:ve.until(/[\n\r\t <}]/),single_quote:ve.until_after(/'/),double_quote:ve.until_after(/"/),attribute:ve.until(/[\n\r\t =>]|\/>/),element_name:ve.until(/[\n\r\t >\/]/),angular_control_flow_start:pe.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:pe.starting_with(/{{!--/).until_after(/--}}/),handlebars:pe.starting_with(/{{/).until_after(/}}/),handlebars_open:pe.until(/[\n\r\t }]/),handlebars_raw_close:pe.until(/}}/),comment:pe.starting_with(/<!--/).until_after(/-->/),cdata:pe.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:pe.starting_with(/<!\[/).until_after(/]>/),processing:pe.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var De=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=pe.matching(De).until_after(De)}};O.prototype=new x,O.prototype._is_comment=function(N){return!1},O.prototype._is_opening=function(N){return N.type===A.TAG_OPEN||N.type===A.CONTROL_FLOW_OPEN},O.prototype._is_closing=function(N,oe){return N.type===A.TAG_CLOSE&&oe&&((N.text===">"||N.text==="/>")&&oe.text[0]==="<"||N.text==="}}"&&oe.text[0]==="{"&&oe.text[1]==="{")||N.type===A.CONTROL_FLOW_CLOSE&&N.text==="}"&&oe.text.endsWith("{")},O.prototype._reset=function(){this._current_tag_name=""},O.prototype._get_next_token=function(N,oe){var ve=null;this._readWhitespace();var pe=this._input.peek();return pe===null?this._create_token(A.EOF,""):(ve=ve||this._read_open_handlebars(pe,oe),ve=ve||this._read_attribute(pe,N,oe),ve=ve||this._read_close(pe,oe),ve=ve||this._read_script_and_style(pe,N),ve=ve||this._read_control_flows(pe,oe),ve=ve||this._read_raw_content(pe,N,oe),ve=ve||this._read_content_word(pe,oe),ve=ve||this._read_comment_or_cdata(pe),ve=ve||this._read_processing(pe),ve=ve||this._read_open(pe,oe),ve=ve||this._create_token(A.UNKNOWN,this._input.next()),ve)},O.prototype._read_comment_or_cdata=function(N){var oe=null,ve=null,pe=null;if(N==="<"){var De=this._input.peek(1);De==="!"&&(ve=this.__patterns.comment.read(),ve?(pe=z.get_directives(ve),pe&&pe.ignore==="start"&&(ve+=z.readIgnored(this._input))):ve=this.__patterns.cdata.read()),ve&&(oe=this._create_token(A.COMMENT,ve),oe.directives=pe)}return oe},O.prototype._read_processing=function(N){var oe=null,ve=null,pe=null;if(N==="<"){var De=this._input.peek(1);(De==="!"||De==="?")&&(ve=this.__patterns.conditional_comment.read(),ve=ve||this.__patterns.processing.read()),ve&&(oe=this._create_token(A.COMMENT,ve),oe.directives=pe)}return oe},O.prototype._read_open=function(N,oe){var ve=null,pe=null;return(!oe||oe.type===A.CONTROL_FLOW_OPEN)&&N==="<"&&(ve=this._input.next(),this._input.peek()==="/"&&(ve+=this._input.next()),ve+=this.__patterns.element_name.read(),pe=this._create_token(A.TAG_OPEN,ve)),pe},O.prototype._read_open_handlebars=function(N,oe){var ve=null,pe=null;return(!oe||oe.type===A.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&N==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ve=this.__patterns.handlebars_comment.read(),ve=ve||this.__patterns.handlebars.read(),pe=this._create_token(A.COMMENT,ve)):(ve=this.__patterns.handlebars_open.read(),pe=this._create_token(A.TAG_OPEN,ve))),pe},O.prototype._read_control_flows=function(N,oe){var ve="",pe=null;if(!this._options.templating.includes("angular"))return pe;if(N==="@"){if(ve=this.__patterns.angular_control_flow_start.read(),ve==="")return pe;for(var De=ve.endsWith("(")?1:0,Oe=0;!(ve.endsWith("{")&&De===Oe);){var Fe=this._input.next();if(Fe===null)break;Fe==="("?De++:Fe===")"&&Oe++,ve+=Fe}pe=this._create_token(A.CONTROL_FLOW_OPEN,ve)}else N==="}"&&oe&&oe.type===A.CONTROL_FLOW_OPEN&&(ve=this._input.next(),pe=this._create_token(A.CONTROL_FLOW_CLOSE,ve));return pe},O.prototype._read_close=function(N,oe){var ve=null,pe=null;return oe&&oe.type===A.TAG_OPEN&&(oe.text[0]==="<"&&(N===">"||N==="/"&&this._input.peek(1)===">")?(ve=this._input.next(),N==="/"&&(ve+=this._input.next()),pe=this._create_token(A.TAG_CLOSE,ve)):oe.text[0]==="{"&&N==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),pe=this._create_token(A.TAG_CLOSE,"}}"))),pe},O.prototype._read_attribute=function(N,oe,ve){var pe=null,De="";if(ve&&ve.text[0]==="<")if(N==="=")pe=this._create_token(A.EQUALS,this._input.next());else if(N==='"'||N==="'"){var Oe=this._input.next();N==='"'?Oe+=this.__patterns.double_quote.read():Oe+=this.__patterns.single_quote.read(),pe=this._create_token(A.VALUE,Oe)}else De=this.__patterns.attribute.read(),De&&(oe.type===A.EQUALS?pe=this._create_token(A.VALUE,De):pe=this._create_token(A.ATTRIBUTE,De));return pe},O.prototype._is_content_unformatted=function(N){return this._options.void_elements.indexOf(N)===-1&&(this._options.content_unformatted.indexOf(N)!==-1||this._options.unformatted.indexOf(N)!==-1)},O.prototype._read_raw_content=function(N,oe,ve){var pe="";if(ve&&ve.text[0]==="{")pe=this.__patterns.handlebars_raw_close.read();else if(oe.type===A.TAG_CLOSE&&oe.opened.text[0]==="<"&&oe.text[0]!=="/"){var De=oe.opened.text.substr(1).toLowerCase();this._is_content_unformatted(De)&&(pe=this._input.readUntil(new RegExp("</"+De+"[\\n\\r\\t ]*?>","ig")))}return pe?this._create_token(A.TEXT,pe):null},O.prototype._read_script_and_style=function(N,oe){if(oe.type===A.TAG_CLOSE&&oe.opened.text[0]==="<"&&oe.text[0]!=="/"){var ve=oe.opened.text.substr(1).toLowerCase();if(ve==="script"||ve==="style"){var pe=this._read_comment_or_cdata(N);if(pe)return pe.type=A.TEXT,pe;var De=this._input.readUntil(new RegExp("</"+ve+"[\\n\\r\\t ]*?>","ig"));if(De)return this._create_token(A.TEXT,De)}}return null},O.prototype._read_content_word=function(N,oe){var ve="";return this._options.unformatted_content_delimiter&&N===this._options.unformatted_content_delimiter[0]&&(ve=this.__patterns.unformatted_content_delimiter.read()),ve||(ve=oe&&oe.type===A.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ve?this._create_token(A.TEXT,ve):null},B.exports.Tokenizer=O,B.exports.TOKEN=A}],ce={};function l(B){var E=ce[B];if(E!==void 0)return E.exports;var L=ce[B]={exports:{}};return de[B](L,L.exports,l),L.exports}var V=l(18);ie=V})();var be=ie;if(1)y=[k,k(58553),k(87804)],Ee=function(de){var ce=k(58553),l=k(87804);return{html_beautify:function(V,B){return be(V,B,ce.js_beautify,l.css_beautify)}}}.apply(it,y),Ee!==void 0&&(Vt.exports=Ee);else var J,v})()},58553:function(Vt,it){var k,y;(function(){var Ee;(function(){"use strict";var be=[function(ce,l,V){var B=V(1).Beautifier,E=V(5).Options;function L(x,P){var q=new B(x,P);return q.beautify()}ce.exports=L,ce.exports.defaultOptions=function(){return new E}},function(ce,l,V){var B=V(2).Output,E=V(3).Token,L=V(4),x=V(5).Options,P=V(7).Tokenizer,q=V(7).line_starters,H=V(7).positionable_operators,U=V(7).TOKEN;function A(w,K){return K.indexOf(w)!==-1}function z(w){return w.replace(/^\s+/g,"")}function O(w){for(var K={},ye=0;ye<w.length;ye++)K[w[ye].replace(/-/g,"_")]=w[ye];return K}function N(w,K){return w&&w.type===U.RESERVED&&w.text===K}function oe(w,K){return w&&w.type===U.RESERVED&&A(w.text,K)}var ve=["case","return","do","if","throw","else","await","break","continue","async"],pe=["before-newline","after-newline","preserve-newline"],De=O(pe),Oe=[De.before_newline,De.preserve_newline],Fe={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function st(w,K){K.multiline_frame||K.mode===Fe.ForInitializer||K.mode===Fe.Conditional||w.remove_indent(K.start_line_index)}function re(w){w=w.replace(L.allLineBreaks,`
`);for(var K=[],ye=w.indexOf(`
`);ye!==-1;)K.push(w.substring(0,ye)),w=w.substring(ye+1),ye=w.indexOf(`
`);return w.length&&K.push(w),K}function W(w){return w===Fe.ArrayLiteral}function ee(w){return A(w,[Fe.Expression,Fe.ForInitializer,Fe.Conditional])}function ue(w,K){for(var ye=0;ye<w.length;ye++){var Be=w[ye].trim();if(Be.charAt(0)!==K)return!1}return!0}function ne(w,K){for(var ye=0,Be=w.length,He;ye<Be;ye++)if(He=w[ye],He&&He.indexOf(K)!==0)return!1;return!0}function ae(w,K){K=K||{},this._source_text=w||"",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 x(K)}ae.prototype.create_flags=function(w,K){var ye=0;w&&(ye=w.indentation_level,!this._output.just_added_newline()&&w.line_indent_level>ye&&(ye=w.line_indent_level));var Be={mode:K,parent:w,last_token:w?w.last_token:new E(U.START_BLOCK,""),last_word:w?w.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:ye,alignment:0,line_indent_level:w?w.line_indent_level:ye,start_line_index:this._output.get_line_number(),ternary_depth:0};return Be},ae.prototype._reset=function(w){var K=w.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new B(this._options,K),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Fe.BlockStatement);var ye=new P(w,this._options);return this._tokens=ye.tokenize(),w},ae.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w,K=this._reset(this._source_text),ye=this._options.eol;this._options.eol==="auto"&&(ye=`
`,K&&L.lineBreak.test(K||"")&&(ye=K.match(L.lineBreak)[0]));for(var Be=this._tokens.next();Be;)this.handle_token(Be),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Be,Be=this._tokens.next();return w=this._output.get_code(ye),w},ae.prototype.handle_token=function(w,K){w.type===U.START_EXPR?this.handle_start_expr(w):w.type===U.END_EXPR?this.handle_end_expr(w):w.type===U.START_BLOCK?this.handle_start_block(w):w.type===U.END_BLOCK?this.handle_end_block(w):w.type===U.WORD?this.handle_word(w):w.type===U.RESERVED?this.handle_word(w):w.type===U.SEMICOLON?this.handle_semicolon(w):w.type===U.STRING?this.handle_string(w):w.type===U.EQUALS?this.handle_equals(w):w.type===U.OPERATOR?this.handle_operator(w):w.type===U.COMMA?this.handle_comma(w):w.type===U.BLOCK_COMMENT?this.handle_block_comment(w,K):w.type===U.COMMENT?this.handle_comment(w,K):w.type===U.DOT?this.handle_dot(w):w.type===U.EOF?this.handle_eof(w):w.type===U.UNKNOWN?this.handle_unknown(w,K):this.handle_unknown(w,K)},ae.prototype.handle_whitespace_and_comments=function(w,K){var ye=w.newlines,Be=this._options.keep_array_indentation&&W(this._flags.mode);if(w.comments_before)for(var He=w.comments_before.next();He;)this.handle_whitespace_and_comments(He,K),this.handle_token(He,K),He=w.comments_before.next();if(Be)for(var ot=0;ot<ye;ot+=1)this.print_newline(ot>0,K);else if(this._options.max_preserve_newlines&&ye>this._options.max_preserve_newlines&&(ye=this._options.max_preserve_newlines),this._options.preserve_newlines&&ye>1){this.print_newline(!1,K);for(var at=1;at<ye;at+=1)this.print_newline(!0,K)}};var S=["async","break","continue","return","throw","yield"];ae.prototype.allow_wrap_or_preserved_newline=function(w,K){if(K=K===void 0?!1:K,!this._output.just_added_newline()){var ye=this._options.preserve_newlines&&w.newlines||K,Be=A(this._flags.last_token.text,H)||A(w.text,H);if(Be){var He=A(this._flags.last_token.text,H)&&A(this._options.operator_position,Oe)||A(w.text,H);ye=ye&&He}if(ye)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(oe(this._flags.last_token,S))return;this._output.set_wrap_point()}}},ae.prototype.print_newline=function(w,K){if(!K&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ye=this._tokens.peek();this._flags.mode===Fe.Statement&&!(this._flags.if_block&&N(ye,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(w)&&(this._flags.multiline_frame=!0)},ae.prototype.print_token_line_indentation=function(w){this._output.just_added_newline()&&(this._options.keep_array_indentation&&w.newlines&&(w.text==="["||W(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(w.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(w){if(this._output.raw){this._output.add_raw_token(w);return}if(this._options.comma_first&&w.previous&&w.previous.type===U.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var K=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(K),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(w),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(w),this._output.non_breaking_space=!0,this._output.add_token(w.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(w){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,w),this._flags=this.create_flags(this._previous_flags,w),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===Fe.Statement&&st(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===Fe.ObjectLiteral&&this._flags.mode===Fe.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oe(this._flags.last_token,["get","set"]))},ae.prototype.start_of_statement=function(w){var K=!1;return K=K||oe(this._flags.last_token,["var","let","const"])&&w.type===U.WORD,K=K||N(this._flags.last_token,"do"),K=K||!(this._flags.parent.mode===Fe.ObjectLiteral&&this._flags.mode===Fe.Statement)&&oe(this._flags.last_token,S)&&!w.newlines,K=K||N(this._flags.last_token,"else")&&!(N(w,"if")&&!w.comments_before),K=K||this._flags.last_token.type===U.END_EXPR&&(this._previous_flags.mode===Fe.ForInitializer||this._previous_flags.mode===Fe.Conditional),K=K||this._flags.last_token.type===U.WORD&&this._flags.mode===Fe.BlockStatement&&!this._flags.in_case&&!(w.text==="--"||w.text==="++")&&this._last_last_text!=="function"&&w.type!==U.WORD&&w.type!==U.RESERVED,K=K||this._flags.mode===Fe.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oe(this._flags.last_token,["get","set"])),K?(this.set_mode(Fe.Statement),this.indent(),this.handle_whitespace_and_comments(w,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w,oe(w,["do","for","if","while"])),!0):!1},ae.prototype.handle_start_expr=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w);var K=Fe.Expression;if(w.text==="["){if(this._flags.last_token.type===U.WORD||this._flags.last_token.text===")"){oe(this._flags.last_token,q)&&(this._output.space_before_token=!0),this.print_token(w),this.set_mode(K),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}K=Fe.ArrayLiteral,W(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()),A(this._flags.last_token.type,[U.START_EXPR,U.END_EXPR,U.WORD,U.OPERATOR,U.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===U.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,K=Fe.ForInitializer):A(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,K=Fe.Conditional):A(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&w.whitespace_before===""?this._output.space_before_token=!1:(A(this._flags.last_token.text,q)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w);else if(this._flags.last_token.type===U.WORD){this._output.space_before_token=!1;var ye=this._tokens.peek(-3);if(this._options.space_after_named_function&&ye){var Be=this._tokens.peek(-4);oe(ye,["async","function"])||ye.text==="*"&&oe(Be,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Fe.ObjectLiteral?(ye.text==="{"||ye.text===","||ye.text==="*"&&(Be.text==="{"||Be.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(w);(this._flags.last_token.type===U.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===Fe.ObjectLiteral&&A(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===U.START_BLOCK?this.print_newline():(this._flags.last_token.type===U.END_EXPR||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===U.COMMA)&&this.allow_wrap_or_preserved_newline(w,w.newlines),this.print_token(w),this.set_mode(K),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},ae.prototype.handle_end_expr=function(w){for(;this._flags.mode===Fe.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(w,w.text==="]"&&W(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===U.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(w),this.restore_mode(),st(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Fe.Conditional&&(this._previous_flags.mode=Fe.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},ae.prototype.handle_start_block=function(w){this.handle_whitespace_and_comments(w);var K=this._tokens.peek(),ye=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===U.END_EXPR?(this.set_mode(Fe.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Fe.BlockStatement):ye&&(A(ye.text,[":",","])&&A(K.type,[U.STRING,U.WORD,U.RESERVED])||A(K.text,["get","set","..."])&&A(ye.type,[U.WORD,U.RESERVED]))?A(this._last_last_text,["class","interface"])&&!A(ye.text,[":",","])?this.set_mode(Fe.BlockStatement):this.set_mode(Fe.ObjectLiteral):this._flags.last_token.type===U.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Fe.BlockStatement):A(this._flags.last_token.type,[U.EQUALS,U.START_EXPR,U.COMMA,U.OPERATOR])||oe(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Fe.ObjectLiteral):this.set_mode(Fe.BlockStatement),this._flags.last_token&&oe(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Be=!K.comments_before&&K.text==="}",He=Be&&this._flags.last_word==="function"&&this._flags.last_token.type===U.END_EXPR;if(this._options.brace_preserve_inline){var ot=0,at=null;this._flags.inline_frame=!0;do if(ot+=1,at=this._tokens.peek(ot-1),at.newlines){this._flags.inline_frame=!1;break}while(at.type!==U.EOF&&!(at.type===U.END_BLOCK&&at.opened===w))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==U.OPERATOR&&(He||this._flags.last_token.type===U.EQUALS||oe(this._flags.last_token,ve)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(W(this._previous_flags.mode)&&(this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.COMMA)&&((this._flags.last_token.type===U.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(w),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==U.OPERATOR&&this._flags.last_token.type!==U.START_EXPR&&(A(this._flags.last_token.type,[U.START_BLOCK,U.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(w),this.indent(),!Be&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},ae.prototype.handle_end_block=function(w){for(this.handle_whitespace_and_comments(w);this._flags.mode===Fe.Statement;)this.restore_mode();var K=this._flags.last_token.type===U.START_BLOCK;this._flags.inline_frame&&!K?this._output.space_before_token=!0:this._options.brace_style==="expand"?K||this.print_newline():K||(W(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(w)},ae.prototype.handle_word=function(w){if(w.type===U.RESERVED){if(A(w.text,["set","get"])&&this._flags.mode!==Fe.ObjectLiteral)w.type=U.WORD;else if(w.text==="import"&&A(this._tokens.peek().text,["(","."]))w.type=U.WORD;else if(A(w.text,["as","from"])&&!this._flags.import_block)w.type=U.WORD;else if(this._flags.mode===Fe.ObjectLiteral){var K=this._tokens.peek();K.text===":"&&(w.type=U.WORD)}}if(this.start_of_statement(w)?oe(this._flags.last_token,["var","let","const"])&&w.type===U.WORD&&(this._flags.declaration_statement=!0):w.newlines&&!ee(this._flags.mode)&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==U.EQUALS&&(this._options.preserve_newlines||!oe(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(w),this.print_newline()):this.handle_whitespace_and_comments(w),this._flags.do_block&&!this._flags.do_while)if(N(w,"while")){this._output.space_before_token=!0,this.print_token(w),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&&N(w,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Fe.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&oe(w,["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(w),this._flags.in_case=!0;return}if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)&&!this.start_of_object_property()&&!(A(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Fe.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(w),N(w,"function")){(A(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(A(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===U.OPERATOR))&&!this._output.just_added_blankline()&&!w.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD?oe(this._flags.last_token,["get","set","new","export"])||oe(this._flags.last_token,S)?this._output.space_before_token=!0:N(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===U.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(ee(this._flags.mode)||W(this._flags.mode))||this.print_newline(),this.print_token(w),this._flags.last_word=w.text;return}var ye="NONE";if(this._flags.last_token.type===U.END_BLOCK?this._previous_flags.inline_frame?ye="SPACE":oe(w,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines?ye="NEWLINE":(ye="SPACE",this._output.space_before_token=!0):ye="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&this._flags.mode===Fe.BlockStatement?ye="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&ee(this._flags.mode)?ye="SPACE":this._flags.last_token.type===U.STRING?ye="NEWLINE":this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===Fe.ObjectLiteral&&A(this._last_last_text,["{",","]))?ye="SPACE":this._flags.last_token.type===U.START_BLOCK?this._flags.inline_frame?ye="SPACE":ye="NEWLINE":this._flags.last_token.type===U.END_EXPR&&(this._output.space_before_token=!0,ye="NEWLINE"),oe(w,q)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ye="SPACE":ye="NEWLINE"),oe(w,["else","catch","finally"]))if((!(this._flags.last_token.type===U.END_BLOCK&&this._previous_flags.mode===Fe.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Be=this._output.current_line;Be.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ye==="NEWLINE"?oe(this._flags.last_token,ve)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&oe(w,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==U.END_EXPR?(this._flags.last_token.type!==U.START_EXPR||!oe(w,["var","let","const"]))&&this._flags.last_token.text!==":"&&(N(w,"if")&&N(w.previous,"else")?this._output.space_before_token=!0:this.print_newline()):oe(w,q)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&W(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ye==="SPACE"&&(this._output.space_before_token=!0);w.previous&&(w.previous.type===U.WORD||w.previous.type===U.RESERVED)&&(this._output.space_before_token=!0),this.print_token(w),this._flags.last_word=w.text,w.type===U.RESERVED&&(w.text==="do"?this._flags.do_block=!0:w.text==="if"?this._flags.if_block=!0:w.text==="import"?this._flags.import_block=!0:this._flags.import_block&&N(w,"from")&&(this._flags.import_block=!1))},ae.prototype.handle_semicolon=function(w){this.start_of_statement(w)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(w);for(var K=this._tokens.peek();this._flags.mode===Fe.Statement&&!(this._flags.if_block&&N(K,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(w)},ae.prototype.handle_string=function(w){w.text.startsWith("`")&&w.newlines===0&&w.whitespace_before===""&&(w.previous.text===")"||this._flags.last_token.type===U.WORD)||(this.start_of_statement(w)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(w),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w):w.text.startsWith("`")&&this._flags.last_token.type===U.END_EXPR&&(w.previous.text==="]"||w.previous.text===")")&&w.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(w)},ae.prototype.handle_equals=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0},ae.prototype.handle_comma=function(w){this.handle_whitespace_and_comments(w,!0),this.print_token(w),this._output.space_before_token=!0,this._flags.declaration_statement?(ee(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(w)):this._flags.mode===Fe.ObjectLiteral||this._flags.mode===Fe.Statement&&this._flags.parent.mode===Fe.ObjectLiteral?(this._flags.mode===Fe.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(w)},ae.prototype.handle_operator=function(w){var K=w.text==="*"&&(oe(this._flags.last_token,["function","yield"])||A(this._flags.last_token.type,[U.START_BLOCK,U.COMMA,U.END_BLOCK,U.SEMICOLON])),ye=A(w.text,["-","+"])&&(A(this._flags.last_token.type,[U.START_BLOCK,U.START_EXPR,U.EQUALS,U.OPERATOR])||A(this._flags.last_token.text,q)||this._flags.last_token.text===",");if(!this.start_of_statement(w)){var Be=!K;this.handle_whitespace_and_comments(w,Be)}if(w.text==="*"&&this._flags.last_token.type===U.DOT){this.print_token(w);return}if(w.text==="::"){this.print_token(w);return}if(A(w.text,["-","+"])&&this.start_of_object_property()){this.print_token(w);return}if(this._flags.last_token.type===U.OPERATOR&&A(this._options.operator_position,Oe)&&this.allow_wrap_or_preserved_newline(w),w.text===":"&&this._flags.in_case){this.print_token(w),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==U.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 He=!0,ot=!0,at=!1;if(w.text===":"?this._flags.ternary_depth===0?He=!1:(this._flags.ternary_depth-=1,at=!0):w.text==="?"&&(this._flags.ternary_depth+=1),!ye&&!K&&this._options.preserve_newlines&&A(w.text,H)){var pt=w.text===":",At=pt&&at,ut=pt&&!at;switch(this._options.operator_position){case De.before_newline:this._output.space_before_token=!ut,this.print_token(w),(!pt||At)&&this.allow_wrap_or_preserved_newline(w),this._output.space_before_token=!0;return;case De.after_newline:this._output.space_before_token=!0,!pt||At?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(w):this._output.space_before_token=!1,this.print_token(w),this._output.space_before_token=!0;return;case De.preserve_newline:ut||this.allow_wrap_or_preserved_newline(w),He=!(this._output.just_added_newline()||ut),this._output.space_before_token=He,this.print_token(w),this._output.space_before_token=!0;return}}if(K){this.allow_wrap_or_preserved_newline(w),He=!1;var jt=this._tokens.peek();ot=jt&&A(jt.type,[U.WORD,U.RESERVED])}else if(w.text==="...")this.allow_wrap_or_preserved_newline(w),He=this._flags.last_token.type===U.START_BLOCK,ot=!1;else if(A(w.text,["--","++","!","~"])||ye){if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR)&&this.allow_wrap_or_preserved_newline(w),He=!1,ot=!1,w.newlines&&(w.text==="--"||w.text==="++"||w.text==="~")){var tt=oe(this._flags.last_token,ve)&&w.newlines;tt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(tt,!0)}this._flags.last_token.text===";"&&ee(this._flags.mode)&&(He=!0),this._flags.last_token.type===U.RESERVED?He=!0:this._flags.last_token.type===U.END_EXPR?He=!(this._flags.last_token.text==="]"&&(w.text==="--"||w.text==="++")):this._flags.last_token.type===U.OPERATOR&&(He=A(w.text,["--","-","++","+"])&&A(this._flags.last_token.text,["--","-","++","+"]),A(w.text,["+","-"])&&A(this._flags.last_token.text,["--","++"])&&(ot=!0)),(this._flags.mode===Fe.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Fe.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||He,this.print_token(w),this._output.space_before_token=ot},ae.prototype.handle_block_comment=function(w,K){if(this._output.raw){this._output.add_raw_token(w),w.directives&&w.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(w.directives){this.print_newline(!1,K),this.print_token(w),w.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!L.newline.test(w.text)&&!w.newlines){this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0;return}else this.print_block_commment(w,K)},ae.prototype.print_block_commment=function(w,K){var ye=re(w.text),Be,He=!1,ot=!1,at=w.whitespace_before,pt=at.length;if(this.print_newline(!1,K),this.print_token_line_indentation(w),this._output.add_token(ye[0]),this.print_newline(!1,K),ye.length>1){for(ye=ye.slice(1),He=ue(ye,"*"),ot=ne(ye,at),He&&(this._flags.alignment=1),Be=0;Be<ye.length;Be++)He?(this.print_token_line_indentation(w),this._output.add_token(z(ye[Be]))):ot&&ye[Be]?(this.print_token_line_indentation(w),this._output.add_token(ye[Be].substring(pt))):(this._output.current_line.set_indent(-1),this._output.add_token(ye[Be])),this.print_newline(!1,K);this._flags.alignment=0}},ae.prototype.handle_comment=function(w,K){w.newlines?this.print_newline(!1,K):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(w),this.print_newline(!1,K)},ae.prototype.handle_dot=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),oe(this._flags.last_token,ve)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(w,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(w)},ae.prototype.handle_unknown=function(w,K){this.print_token(w),w.text[w.text.length-1]===`
`&&this.print_newline(!1,K)},ae.prototype.handle_eof=function(w){for(;this._flags.mode===Fe.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w)},ce.exports.Beautifier=ae},function(ce){function l(E){this.__parent=E,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=[]}l.prototype.clone_empty=function(){var E=new l(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},l.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},l.prototype.has_match=function(E){for(var L=this.__items.length-1;L>=0;L--)if(this.__items[L].match(E))return!0;return!1},l.prototype.set_indent=function(E,L){this.is_empty()&&(this.__indent_count=E||0,this.__alignment_count=L||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.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)},l.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},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(E){this.__items.push(E);var L=E.lastIndexOf(`
`);L!==-1?this.__character_count=E.length-L:this.__character_count+=E.length},l.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function V(E,L){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),L=L||"",E.indent_level>0&&(L=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=L,this.__base_string_length=L.length}V.prototype.get_indent_size=function(E,L){var x=this.__base_string_length;return L=L||0,E<0&&(x=0),x+=E*this.__indent_size,x+=L,x},V.prototype.get_indent_string=function(E,L){var x=this.__base_string;return L=L||0,E<0&&(E=0,x=""),L+=E*this.__indent_size,this.__ensure_cache(L),x+=this.__cache[L],x},V.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},V.prototype.__add_column=function(){var E=this.__cache.length,L=0,x="";this.__indent_size&&E>=this.__indent_size&&(L=Math.floor(E/this.__indent_size),E-=L*this.__indent_size,x=new Array(L+1).join(this.__indent_string)),E&&(x+=new Array(E+1).join(" ")),this.__cache.push(x)};function B(E,L){this.__indent_cache=new V(E,L),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(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(E,L){return this.__indent_cache.get_indent_string(E,L)},B.prototype.get_indent_size=function(E,L){return this.__indent_cache.get_indent_size(E,L)},B.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},B.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},B.prototype.get_code=function(E){this.trim(!0);var L=this.current_line.pop();L&&(L[L.length-1]===`
`&&(L=L.replace(/\n+$/g,"")),this.current_line.push(L)),this._end_with_newline&&this.__add_outputline();var x=this.__lines.join(`
`);return E!==`
`&&(x=x.replace(/[\n]/g,E)),x},B.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},B.prototype.set_indent=function(E,L){return E=E||0,L=L||0,this.next_line.set_indent(E,L),this.__lines.length>1?(this.current_line.set_indent(E,L),!0):(this.current_line.set_indent(),!1)},B.prototype.add_raw_token=function(E){for(var L=0;L<E.newlines;L++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},B.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),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(E){for(var L=this.__lines.length;E<L;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},B.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&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(E,L){for(var x=this.__lines.length-2;x>=0;){var P=this.__lines[x];if(P.is_empty())break;if(P.item(0).indexOf(E)!==0&&P.item(-1)!==L){this.__lines.splice(x+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}x--}},ce.exports.Output=B},function(ce){function l(V,B,E,L){this.type=V,this.text=B,this.comments_before=null,this.newlines=E||0,this.whitespace_before=L||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ce.exports.Token=l},function(ce,l){var V="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",B="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",E="\\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",L="\\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",x="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",P="(?:"+x+"|["+V+E+"])",q="(?:"+x+"|["+B+E+L+"])*";l.identifier=new RegExp(P+q,"g"),l.identifierStart=new RegExp(P),l.identifierMatch=new RegExp("(?:"+x+"|["+B+E+L+"])+");var H=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;l.newline=/[\n\r\u2028\u2029]/,l.lineBreak=new RegExp(`\r
|`+l.newline.source),l.allLineBreaks=new RegExp(l.lineBreak.source,"g")},function(ce,l,V){var B=V(6).Options,E=["before-newline","after-newline","preserve-newline"];function L(x){B.call(this,x,"js");var P=this.raw_options.brace_style||null;P==="expand-strict"?this.raw_options.brace_style="expand":P==="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 q=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var H=0;H<q.length;H++)q[H]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=q[H];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",E),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}L.prototype=new B,ce.exports.Options=L},function(ce){function l(E,L){this.raw_options=V(E,L),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"])}l.prototype._get_array=function(E,L){var x=this.raw_options[E],P=L||[];return typeof x=="object"?x!==null&&typeof x.concat=="function"&&(P=x.concat()):typeof x=="string"&&(P=x.split(/[^a-zA-Z0-9_\/\-]+/)),P},l.prototype._get_boolean=function(E,L){var x=this.raw_options[E],P=x===void 0?!!L:!!x;return P},l.prototype._get_characters=function(E,L){var x=this.raw_options[E],P=L||"";return typeof x=="string"&&(P=x.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),P},l.prototype._get_number=function(E,L){var x=this.raw_options[E];L=parseInt(L,10),isNaN(L)&&(L=0);var P=parseInt(x,10);return isNaN(P)&&(P=L),P},l.prototype._get_selection=function(E,L,x){var P=this._get_selection_list(E,L,x);if(P.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
`+L+`
You passed in: '`+this.raw_options[E]+"'");return P[0]},l.prototype._get_selection_list=function(E,L,x){if(!L||L.length===0)throw new Error("Selection list cannot be empty.");if(x=x||[L[0]],!this._is_valid_selection(x,L))throw new Error("Invalid Default Value!");var P=this._get_array(E,x);if(!this._is_valid_selection(P,L))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
`+L+`
You passed in: '`+this.raw_options[E]+"'");return P},l.prototype._is_valid_selection=function(E,L){return E.length&&L.length&&!E.some(function(x){return L.indexOf(x)===-1})};function V(E,L){var x={};E=B(E);var P;for(P in E)P!==L&&(x[P]=E[P]);if(L&&E[L])for(P in E[L])x[P]=E[L][P];return x}function B(E){var L={},x;for(x in E){var P=x.replace(/-/g,"_");L[P]=E[x]}return L}ce.exports.Options=l,ce.exports.normalizeOpts=B,ce.exports.mergeOpts=V},function(ce,l,V){var B=V(8).InputScanner,E=V(9).Tokenizer,L=V(9).TOKEN,x=V(13).Directives,P=V(4),q=V(12).Pattern,H=V(14).TemplatablePattern;function U(ue,ne){return ne.indexOf(ue)!==-1}var A={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:L.START,RAW:L.RAW,EOF:L.EOF},z=new x(/\/\*/,/\*\//),O=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,N=/[0-9]/,oe=/[^\d\.]/,ve=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),pe=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";pe=pe.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),pe="\\?\\.(?!\\d) "+pe,pe=pe.replace(/ /g,"|");var De=new RegExp(pe),Oe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Fe=Oe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),st=new RegExp("^(?:"+Fe.join("|")+")$"),re,W=function(ue,ne){E.call(this,ue,ne),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var ae=new q(this._input),S=new H(this._input).read_options(this._options);this.__patterns={template:S,identifier:S.starting_with(P.identifier).matching(P.identifierMatch),number:ae.matching(O),punct:ae.matching(De),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(P.lineBreak),shebang:ae.starting_with(/#!/).until_after(P.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:S.until(/['\\\n\r\u2028\u2029]/),double_quote:S.until(/["\\\n\r\u2028\u2029]/),template_text:S.until(/[`\\$]/),template_expression:S.until(/[`}\\]/)}};W.prototype=new E,W.prototype._is_comment=function(ue){return ue.type===A.COMMENT||ue.type===A.BLOCK_COMMENT||ue.type===A.UNKNOWN},W.prototype._is_opening=function(ue){return ue.type===A.START_BLOCK||ue.type===A.START_EXPR},W.prototype._is_closing=function(ue,ne){return(ue.type===A.END_BLOCK||ue.type===A.END_EXPR)&&ne&&(ue.text==="]"&&ne.text==="["||ue.text===")"&&ne.text==="("||ue.text==="}"&&ne.text==="{")},W.prototype._reset=function(){re=!1},W.prototype._get_next_token=function(ue,ne){var ae=null;this._readWhitespace();var S=this._input.peek();return S===null?this._create_token(A.EOF,""):(ae=ae||this._read_non_javascript(S),ae=ae||this._read_string(S),ae=ae||this._read_pair(S,this._input.peek(1)),ae=ae||this._read_word(ue),ae=ae||this._read_singles(S),ae=ae||this._read_comment(S),ae=ae||this._read_regexp(S,ue),ae=ae||this._read_xml(S,ue),ae=ae||this._read_punctuation(),ae=ae||this._create_token(A.UNKNOWN,this._input.next()),ae)},W.prototype._read_word=function(ue){var ne;if(ne=this.__patterns.identifier.read(),ne!=="")return ne=ne.replace(P.allLineBreaks,`
`),!(ue.type===A.DOT||ue.type===A.RESERVED&&(ue.text==="set"||ue.text==="get"))&&st.test(ne)?(ne==="in"||ne==="of")&&(ue.type===A.WORD||ue.type===A.STRING)?this._create_token(A.OPERATOR,ne):this._create_token(A.RESERVED,ne):this._create_token(A.WORD,ne);if(ne=this.__patterns.number.read(),ne!=="")return this._create_token(A.WORD,ne)},W.prototype._read_singles=function(ue){var ne=null;return ue==="("||ue==="["?ne=this._create_token(A.START_EXPR,ue):ue===")"||ue==="]"?ne=this._create_token(A.END_EXPR,ue):ue==="{"?ne=this._create_token(A.START_BLOCK,ue):ue==="}"?ne=this._create_token(A.END_BLOCK,ue):ue===";"?ne=this._create_token(A.SEMICOLON,ue):ue==="."&&oe.test(this._input.peek(1))?ne=this._create_token(A.DOT,ue):ue===","&&(ne=this._create_token(A.COMMA,ue)),ne&&this._input.next(),ne},W.prototype._read_pair=function(ue,ne){var ae=null;return ue==="#"&&ne==="{"&&(ae=this._create_token(A.START_BLOCK,ue+ne)),ae&&(this._input.next(),this._input.next()),ae},W.prototype._read_punctuation=function(){var ue=this.__patterns.punct.read();if(ue!=="")return ue==="="?this._create_token(A.EQUALS,ue):ue==="?."?this._create_token(A.DOT,ue):this._create_token(A.OPERATOR,ue)},W.prototype._read_non_javascript=function(ue){var ne="";if(ue==="#"){if(this._is_first_token()&&(ne=this.__patterns.shebang.read(),ne))return this._create_token(A.UNKNOWN,ne.trim()+`
`);if(ne=this.__patterns.include.read(),ne)return this._create_token(A.UNKNOWN,ne.trim()+`
`);ue=this._input.next();var ae="#";if(this._input.hasNext()&&this._input.testChar(N)){do ue=this._input.next(),ae+=ue;while(this._input.hasNext()&&ue!=="#"&&ue!=="=");return ue==="#"||(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(A.WORD,ae)}this._input.back()}else if(ue==="<"&&this._is_first_token()){if(ne=this.__patterns.html_comment_start.read(),ne){for(;this._input.hasNext()&&!this._input.testChar(P.newline);)ne+=this._input.next();return re=!0,this._create_token(A.COMMENT,ne)}}else if(re&&ue==="-"&&(ne=this.__patterns.html_comment_end.read(),ne))return re=!1,this._create_token(A.COMMENT,ne);return null},W.prototype._read_comment=function(ue){var ne=null;if(ue==="/"){var ae="";if(this._input.peek(1)==="*"){ae=this.__patterns.block_comment.read();var S=z.get_directives(ae);S&&S.ignore==="start"&&(ae+=z.readIgnored(this._input)),ae=ae.replace(P.allLineBreaks,`
`),ne=this._create_token(A.BLOCK_COMMENT,ae),ne.directives=S}else this._input.peek(1)==="/"&&(ae=this.__patterns.comment.read(),ne=this._create_token(A.COMMENT,ae))}return ne},W.prototype._read_string=function(ue){if(ue==="`"||ue==="'"||ue==='"'){var ne=this._input.next();return this.has_char_escapes=!1,ue==="`"?ne+=this._read_string_recursive("`",!0,"${"):ne+=this._read_string_recursive(ue),this.has_char_escapes&&this._options.unescape_strings&&(ne=ee(ne)),this._input.peek()===ue&&(ne+=this._input.next()),ne=ne.replace(P.allLineBreaks,`
`),this._create_token(A.STRING,ne)}return null},W.prototype._allow_regexp_or_xml=function(ue){return ue.type===A.RESERVED&&U(ue.text,["return","case","throw","else","do","typeof","yield"])||ue.type===A.END_EXPR&&ue.text===")"&&ue.opened.previous.type===A.RESERVED&&U(ue.opened.previous.text,["if","while","for"])||U(ue.type,[A.COMMENT,A.START_EXPR,A.START_BLOCK,A.START,A.END_BLOCK,A.OPERATOR,A.EQUALS,A.EOF,A.SEMICOLON,A.COMMA])},W.prototype._read_regexp=function(ue,ne){if(ue==="/"&&this._allow_regexp_or_xml(ne)){for(var ae=this._input.next(),S=!1,w=!1;this._input.hasNext()&&(S||w||this._input.peek()!==ue)&&!this._input.testChar(P.newline);)ae+=this._input.peek(),S?S=!1:(S=this._input.peek()==="\\",this._input.peek()==="["?w=!0:this._input.peek()==="]"&&(w=!1)),this._input.next();return this._input.peek()===ue&&(ae+=this._input.next(),ae+=this._input.read(P.identifier)),this._create_token(A.STRING,ae)}return null},W.prototype._read_xml=function(ue,ne){if(this._options.e4x&&ue==="<"&&this._allow_regexp_or_xml(ne)){var ae="",S=this.__patterns.xml.read_match();if(S){for(var w=S[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),K=w.indexOf("{")===0,ye=0;S;){var Be=!!S[1],He=S[2],ot=!!S[S.length-1]||He.slice(0,8)==="![CDATA[";if(!ot&&(He===w||K&&He.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Be?--ye:++ye),ae+=S[0],ye<=0)break;S=this.__patterns.xml.read_match()}return S||(ae+=this._input.match(/[\s\S]*/g)[0]),ae=ae.replace(P.allLineBreaks,`
`),this._create_token(A.STRING,ae)}}return null};function ee(ue){for(var ne="",ae=0,S=new B(ue),w=null;S.hasNext();)if(w=S.match(/([\s]|[^\\]|\\\\)+/g),w&&(ne+=w[0]),S.peek()==="\\"){if(S.next(),S.peek()==="x")w=S.match(/x([0-9A-Fa-f]{2})/g);else if(S.peek()==="u")w=S.match(/u([0-9A-Fa-f]{4})/g),w||(w=S.match(/u\{([0-9A-Fa-f]+)\}/g));else{ne+="\\",S.hasNext()&&(ne+=S.next());continue}if(!w||(ae=parseInt(w[1],16),ae>126&&ae<=255&&w[0].indexOf("x")===0))return ue;ae>=0&&ae<32||ae>1114111?ne+="\\"+w[0]:ae===34||ae===39||ae===92?ne+="\\"+String.fromCharCode(ae):ne+=String.fromCharCode(ae)}return ne}W.prototype._read_string_recursive=function(ue,ne,ae){var S,w;ue==="'"?w=this.__patterns.single_quote:ue==='"'?w=this.__patterns.double_quote:ue==="`"?w=this.__patterns.template_text:ue==="}"&&(w=this.__patterns.template_expression);for(var K=w.read(),ye="";this._input.hasNext();){if(ye=this._input.next(),ye===ue||!ne&&P.newline.test(ye)){this._input.back();break}else ye==="\\"&&this._input.hasNext()?(S=this._input.peek(),S==="x"||S==="u"?this.has_char_escapes=!0:S==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ye+=this._input.next()):ae&&(ae==="${"&&ye==="$"&&this._input.peek()==="{"&&(ye+=this._input.next()),ae===ye&&(ue==="`"?ye+=this._read_string_recursive("}",ne,"`"):ye+=this._read_string_recursive("`",ne,"${"),this._input.hasNext()&&(ye+=this._input.next())));ye+=w.read(),K+=ye}return K},ce.exports.Tokenizer=W,ce.exports.TOKEN=A,ce.exports.positionable_operators=ve.slice(),ce.exports.line_starters=Oe.slice()},function(ce){var l=RegExp.prototype.hasOwnProperty("sticky");function V(B){this.__input=B||"",this.__input_length=this.__input.length,this.__position=0}V.prototype.restart=function(){this.__position=0},V.prototype.back=function(){this.__position>0&&(this.__position-=1)},V.prototype.hasNext=function(){return this.__position<this.__input_length},V.prototype.next=function(){var B=null;return this.hasNext()&&(B=this.__input.charAt(this.__position),this.__position+=1),B},V.prototype.peek=function(B){var E=null;return B=B||0,B+=this.__position,B>=0&&B<this.__input_length&&(E=this.__input.charAt(B)),E},V.prototype.__match=function(B,E){B.lastIndex=E;var L=B.exec(this.__input);return L&&!(l&&B.sticky)&&L.index!==E&&(L=null),L},V.prototype.test=function(B,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(B,E):!1},V.prototype.testChar=function(B,E){var L=this.peek(E);return B.lastIndex=0,L!==null&&B.test(L)},V.prototype.match=function(B){var E=this.__match(B,this.__position);return E?this.__position+=E[0].length:E=null,E},V.prototype.read=function(B,E,L){var x="",P;return B&&(P=this.match(B),P&&(x+=P[0])),E&&(P||!B)&&(x+=this.readUntil(E,L)),x},V.prototype.readUntil=function(B,E){var L="",x=this.__position;B.lastIndex=this.__position;var P=B.exec(this.__input);return P?(x=P.index,E&&(x+=P[0].length)):x=this.__input_length,L=this.__input.substring(this.__position,x),this.__position=x,L},V.prototype.readUntilAfter=function(B){return this.readUntil(B,!0)},V.prototype.get_regexp=function(B,E){var L=null,x="g";return E&&l&&(x="y"),typeof B=="string"&&B!==""?L=new RegExp(B,x):B&&(L=new RegExp(B.source,x)),L},V.prototype.get_literal_regexp=function(B){return RegExp(B.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},V.prototype.peekUntilAfter=function(B){var E=this.__position,L=this.readUntilAfter(B);return this.__position=E,L},V.prototype.lookBack=function(B){var E=this.__position-1;return E>=B.length&&this.__input.substring(E-B.length,E).toLowerCase()===B},ce.exports.InputScanner=V},function(ce,l,V){var B=V(8).InputScanner,E=V(3).Token,L=V(10).TokenStream,x=V(11).WhitespacePattern,P={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},q=function(H,U){this._input=new B(H),this._options=U||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new x(this._input)};q.prototype.tokenize=function(){this._input.restart(),this.__tokens=new L,this._reset();for(var H,U=new E(P.START,""),A=null,z=[],O=new L;U.type!==P.EOF;){for(H=this._get_next_token(U,A);this._is_comment(H);)O.add(H),H=this._get_next_token(U,A);O.isEmpty()||(H.comments_before=O,O=new L),H.parent=A,this._is_opening(H)?(z.push(A),A=H):A&&this._is_closing(H,A)&&(H.opened=A,A.closed=H,A=z.pop(),H.parent=A),H.previous=U,U.next=H,this.__tokens.add(H),U=H}return this.__tokens},q.prototype._is_first_token=function(){return this.__tokens.isEmpty()},q.prototype._reset=function(){},q.prototype._get_next_token=function(H,U){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(P.RAW,A):this._create_token(P.EOF,"")},q.prototype._is_comment=function(H){return!1},q.prototype._is_opening=function(H){return!1},q.prototype._is_closing=function(H,U){return!1},q.prototype._create_token=function(H,U){var A=new E(H,U,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},q.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ce.exports.Tokenizer=q,ce.exports.TOKEN=P},function(ce){function l(V){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=V}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position<this.__tokens_length},l.prototype.next=function(){var V=null;return this.hasNext()&&(V=this.__tokens[this.__position],this.__position+=1),V},l.prototype.peek=function(V){var B=null;return V=V||0,V+=this.__position,V>=0&&V<this.__tokens_length&&(B=this.__tokens[V]),B},l.prototype.add=function(V){this.__parent_token&&(V.parent=this.__parent_token),this.__tokens.push(V),this.__tokens_length+=1},ce.exports.TokenStream=l},function(ce,l,V){var B=V(12).Pattern;function E(L,x){B.call(this,L,x),x?this._line_regexp=this._input.get_regexp(x._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}E.prototype=new B,E.prototype.__set_whitespace_patterns=function(L,x){L+="\\t ",x+="\\n\\r",this._match_pattern=this._input.get_regexp("["+L+x+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+x+"]")},E.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var L=this._input.read(this._match_pattern);if(L===" ")this.whitespace_before_token=" ";else if(L){var x=this.__split(this._newline_regexp,L);this.newline_count=x.length-1,this.whitespace_before_token=x[this.newline_count]}return L},E.prototype.matching=function(L,x){var P=this._create();return P.__set_whitespace_patterns(L,x),P._update(),P},E.prototype._create=function(){return new E(this._input,this)},E.prototype.__split=function(L,x){L.lastIndex=0;for(var P=0,q=[],H=L.exec(x);H;)q.push(x.substring(P,H.index)),P=H.index+H[0].length,H=L.exec(x);return P<x.length?q.push(x.substring(P,x.length)):q.push(""),q},ce.exports.WhitespacePattern=E},function(ce){function l(V,B){this._input=V,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)}l.prototype.read=function(){var V=this._input.read(this._starting_pattern);return(!this._starting_pattern||V)&&(V+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),V},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(V){var B=this._create();return B._until_after=!0,B._until_pattern=this._input.get_regexp(V),B._update(),B},l.prototype.until=function(V){var B=this._create();return B._until_after=!1,B._until_pattern=this._input.get_regexp(V),B._update(),B},l.prototype.starting_with=function(V){var B=this._create();return B._starting_pattern=this._input.get_regexp(V,!0),B._update(),B},l.prototype.matching=function(V){var B=this._create();return B._match_pattern=this._input.get_regexp(V,!0),B._update(),B},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},ce.exports.Pattern=l},function(ce){function l(V,B){V=typeof V=="string"?V:V.source,B=typeof B=="string"?B:B.source,this.__directives_block_pattern=new RegExp(V+/ beautify( \w+[:]\w+)+ /.source+B,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(V+/\sbeautify\signore:end\s/.source+B,"g")}l.prototype.get_directives=function(V){if(!V.match(this.__directives_block_pattern))return null;var B={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(V);E;)B[E[1]]=E[2],E=this.__directive_pattern.exec(V);return B},l.prototype.readIgnored=function(V){return V.readUntilAfter(this.__directives_end_ignore_pattern)},ce.exports.Directives=l},function(ce,l,V){var B=V(12).Pattern,E={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function L(x,P){B.call(this,x,P),this.__template_pattern=null,this._disabled=Object.assign({},E),this._excluded=Object.assign({},E),P&&(this.__template_pattern=this._input.get_regexp(P.__template_pattern),this._excluded=Object.assign(this._excluded,P._excluded),this._disabled=Object.assign(this._disabled,P._disabled));var q=new B(x);this.__patterns={handlebars_comment:q.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:q.starting_with(/{{{/).until_after(/}}}/),handlebars:q.starting_with(/{{/).until_after(/}}/),php:q.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:q.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:q.starting_with(/{%/).until_after(/%}/),django_value:q.starting_with(/{{/).until_after(/}}/),django_comment:q.starting_with(/{#/).until_after(/#}/),smarty:q.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:q.starting_with(/{\*/).until_after(/\*}/),smarty_literal:q.starting_with(/{literal}/).until_after(/{\/literal}/)}}L.prototype=new B,L.prototype._create=function(){return new L(this._input,this)},L.prototype._update=function(){this.__set_templated_pattern()},L.prototype.disable=function(x){var P=this._create();return P._disabled[x]=!0,P._update(),P},L.prototype.read_options=function(x){var P=this._create();for(var q in E)P._disabled[q]=x.templating.indexOf(q)===-1;return P._update(),P},L.prototype.exclude=function(x){var P=this._create();return P._excluded[x]=!0,P._update(),P},L.prototype.read=function(){var x="";this._match_pattern?x=this._input.read(this._starting_pattern):x=this._input.read(this._starting_pattern,this.__template_pattern);for(var P=this._read_template();P;)this._match_pattern?P+=this._input.read(this._match_pattern):P+=this._input.readUntil(this.__template_pattern),x+=P,P=this._read_template();return this._until_after&&(x+=this._input.readUntilAfter(this._until_pattern)),x},L.prototype.__set_templated_pattern=function(){var x=[];this._disabled.php||x.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||x.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||x.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||x.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(x.push(this.__patterns.django._starting_pattern.source),x.push(this.__patterns.django_value._starting_pattern.source),x.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||x.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&x.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+x.join("|")+")")},L.prototype._read_template=function(){var x="",P=this._input.peek();if(P==="<"){var q=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&q==="?"&&(x=x||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&q==="%"&&(x=x||this.__patterns.erb.read())}else P==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(x=x||this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars_unescaped.read(),x=x||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(x=x||this.__patterns.django_value.read()),this._excluded.django||(x=x||this.__patterns.django_comment.read(),x=x||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(x=x||this.__patterns.smarty_comment.read(),x=x||this.__patterns.smarty_literal.read(),x=x||this.__patterns.smarty.read()));return x},ce.exports.TemplatablePattern=L}],J={};function v(ce){var l=J[ce];if(l!==void 0)return l.exports;var V=J[ce]={exports:{}};return be[ce](V,V.exports,v),V.exports}var de=v(0);Ee=de})();var ie=Ee;k=[],y=function(){return{js_beautify:ie}}.apply(it,k),y!==void 0&&(Vt.exports=y)})()},15342:function(Vt){(function(k,y){Vt.exports=y()})(typeof self!="undefined"?self:this,function(){return function(it){var k={};function y(Ee){if(k[Ee])return k[Ee].exports;var ie=k[Ee]={i:Ee,l:!1,exports:{}};return it[Ee].call(ie.exports,ie,ie.exports,y),ie.l=!0,ie.exports}return y.m=it,y.c=k,y.d=function(Ee,ie,be){y.o(Ee,ie)||Object.defineProperty(Ee,ie,{enumerable:!0,get:be})},y.r=function(Ee){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Ee,"__esModule",{value:!0})},y.t=function(Ee,ie){if(ie&1&&(Ee=y(Ee)),ie&8||ie&4&&typeof Ee=="object"&&Ee&&Ee.__esModule)return Ee;var be=Object.create(null);if(y.r(be),Object.defineProperty(be,"default",{enumerable:!0,value:Ee}),ie&2&&typeof Ee!="string")for(var J in Ee)y.d(be,J,function(v){return Ee[v]}.bind(null,J));return be},y.n=function(Ee){var ie=Ee&&Ee.__esModule?function(){return Ee.default}:function(){return Ee};return y.d(ie,"a",ie),ie},y.o=function(Ee,ie){return Object.prototype.hasOwnProperty.call(Ee,ie)},y.p="",y(y.s=1)}([function(it,k,y){},function(it,k,y){"use strict";y.r(k);var Ee=y(0),ie=function(){function M(u,d,f){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=d,this.end=f}return M.range=function(d,f){return f?!d||!d.loc||!f.loc||d.loc.lexer!==f.loc.lexer?null:new M(d.loc.lexer,d.loc.start,f.loc.end):d&&d.loc},M}(),be=function(){function M(d,f){this.text=void 0,this.loc=void 0,this.text=d,this.loc=f}var u=M.prototype;return u.range=function(f,g){return new M(g,ie.range(this,f))},M}(),J=function M(u,d){this.position=void 0;var f="KaTeX parse error: "+u,g,D=d&&d.loc;if(D&&D.start<=D.end){var F=D.lexer.input;g=D.start;var se=D.end;g===F.length?f+=" at end of input: ":f+=" at position "+(g+1)+": ";var me=F.slice(g,se).replace(/[^]/g,"$&\u0332"),Le;g>15?Le="\u2026"+F.slice(g-15,g):Le=F.slice(0,g);var je;se+15<F.length?je=F.slice(se,se+15)+"\u2026":je=F.slice(se),f+=Le+me+je}var rt=new Error(f);return rt.name="ParseError",rt.__proto__=M.prototype,rt.position=g,rt};J.prototype.__proto__=Error.prototype;var v=J,de=function(u,d){return u.indexOf(d)!==-1},ce=function(u,d){return u===void 0?d:u},l=/([A-Z])/g,V=function(u){return u.replace(l,"-$1").toLowerCase()},B={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},E=/[&><"']/g;function L(M){return String(M).replace(E,function(u){return B[u]})}var x=function M(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?M(u.body[0]):u:u.type==="font"?M(u.body):u},P=function(u){var d=x(u);return d.type==="mathord"||d.type==="textord"||d.type==="atom"},q=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},H=function(u){var d=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(u);return d!=null?d[1]:"_relative"},U={contains:de,deflt:ce,escape:L,hyphenate:V,getBaseElem:x,isCharacterBox:P,protocolFromUrl:H},A=function(){function M(d){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,d=d||{},this.displayMode=U.deflt(d.displayMode,!1),this.output=U.deflt(d.output,"htmlAndMathml"),this.leqno=U.deflt(d.leqno,!1),this.fleqn=U.deflt(d.fleqn,!1),this.throwOnError=U.deflt(d.throwOnError,!0),this.errorColor=U.deflt(d.errorColor,"#cc0000"),this.macros=d.macros||{},this.minRuleThickness=Math.max(0,U.deflt(d.minRuleThickness,0)),this.colorIsTextColor=U.deflt(d.colorIsTextColor,!1),this.strict=U.deflt(d.strict,"warn"),this.trust=U.deflt(d.trust,!1),this.maxSize=Math.max(0,U.deflt(d.maxSize,1/0)),this.maxExpand=Math.max(0,U.deflt(d.maxExpand,1e3))}var u=M.prototype;return u.reportNonstrict=function(f,g,D){var F=this.strict;if(typeof F=="function"&&(F=F(f,g,D)),!(!F||F==="ignore")){if(F===!0||F==="error")throw new v("LaTeX-incompatible input and strict mode is set to 'error': "+(g+" ["+f+"]"),D);F==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(g+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+F+"': "+g+" ["+f+"]"))}},u.useStrictBehavior=function(f,g,D){var F=this.strict;if(typeof F=="function")try{F=F(f,g,D)}catch(se){F="error"}return!F||F==="ignore"?!1:F===!0||F==="error"?!0:F==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(g+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+F+"': "+g+" ["+f+"]")),!1)},u.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=U.protocolFromUrl(f.url));var g=typeof this.trust=="function"?this.trust(f):this.trust;return!!g},M}(),z=function(){function M(d,f,g){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=d,this.size=f,this.cramped=g}var u=M.prototype;return u.sup=function(){return st[re[this.id]]},u.sub=function(){return st[W[this.id]]},u.fracNum=function(){return st[ee[this.id]]},u.fracDen=function(){return st[ue[this.id]]},u.cramp=function(){return st[ne[this.id]]},u.text=function(){return st[ae[this.id]]},u.isTight=function(){return this.size>=2},M}(),O=0,N=1,oe=2,ve=3,pe=4,De=5,Oe=6,Fe=7,st=[new z(O,0,!1),new z(N,0,!0),new z(oe,1,!1),new z(ve,1,!0),new z(pe,2,!1),new z(De,2,!0),new z(Oe,3,!1),new z(Fe,3,!0)],re=[pe,De,pe,De,Oe,Fe,Oe,Fe],W=[De,De,De,De,Fe,Fe,Fe,Fe],ee=[oe,ve,pe,De,Oe,Fe,Oe,Fe],ue=[ve,ve,De,De,Fe,Fe,Fe,Fe],ne=[N,N,ve,ve,De,De,Fe,Fe],ae=[O,N,oe,ve,oe,ve,oe,ve],S={DISPLAY:st[O],TEXT:st[oe],SCRIPT:st[pe],SCRIPTSCRIPT:st[Oe]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function K(M){for(var u=0;u<w.length;u++)for(var d=w[u],f=0;f<d.blocks.length;f++){var g=d.blocks[f];if(M>=g[0]&&M<=g[1])return d.name}return null}var ye=[];w.forEach(function(M){return M.blocks.forEach(function(u){return ye.push.apply(ye,u)})});function Be(M){for(var u=0;u<ye.length;u+=2)if(M>=ye[u]&&M<=ye[u+1])return!0;return!1}var He=80,ot=function(u,d){return"M95,"+(622+u+d)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+u/2.075+" -"+u+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+u)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+u)+" "+d+"h400000v"+(40+u)+"h-400000z"},at=function(u,d){return"M263,"+(601+u+d)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+u/2.084+" -"+u+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+u)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+u)+" "+d+"h400000v"+(40+u)+"h-400000z"},pt=function(u,d){return"M983 "+(10+u+d)+`
l`+u/3.13+" -"+u+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+u)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+u)+" "+d+"h400000v"+(40+u)+"h-400000z"},At=function(u,d){return"M424,"+(2398+u+d)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+u/4.223+" -"+u+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+u)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+u)+" "+d+`
h400000v`+(40+u)+"h-400000z"},ut=function(u,d){return"M473,"+(2713+u+d)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+u/5.298+" -"+u+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+u)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+u)+" "+d+"h400000v"+(40+u)+"H1017.7z"},jt=function(u,d,f){var g=f-54-d-u;return"M702 "+(u+d)+"H400000"+(40+u)+`
H742v`+g+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+d+"H400000v"+(40+u)+"H742z"},tt=function(u,d,f){d=1e3*d;var g="";switch(u){case"sqrtMain":g=ot(d,He);break;case"sqrtSize1":g=at(d,He);break;case"sqrtSize2":g=pt(d,He);break;case"sqrtSize3":g=At(d,He);break;case"sqrtSize4":g=ut(d,He);break;case"sqrtTall":g=jt(d,He,f)}return g},Ft={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Me=function(){function M(d){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=d,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=M.prototype;return u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){for(var f=document.createDocumentFragment(),g=0;g<this.children.length;g++)f.appendChild(this.children[g].toNode());return f},u.toMarkup=function(){for(var f="",g=0;g<this.children.length;g++)f+=this.children[g].toMarkup();return f},u.toText=function(){var f=function(D){return D.toText()};return this.children.map(f).join("")},M}(),mt=function(u){return u.filter(function(d){return d}).join(" ")},ke=function(u,d,f){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=f||{},d){d.style.isTight()&&this.classes.push("mtight");var g=d.getColor();g&&(this.style.color=g)}},Ce=function(u){var d=document.createElement(u);d.className=mt(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(d.style[f]=this.style[f]);for(var g in this.attributes)this.attributes.hasOwnProperty(g)&&d.setAttribute(g,this.attributes[g]);for(var D=0;D<this.children.length;D++)d.appendChild(this.children[D].toNode());return d},_e=function(u){var d="<"+u;this.classes.length&&(d+=' class="'+U.escape(mt(this.classes))+'"');var f="";for(var g in this.style)this.style.hasOwnProperty(g)&&(f+=U.hyphenate(g)+":"+this.style[g]+";");f&&(d+=' style="'+U.escape(f)+'"');for(var D in this.attributes)this.attributes.hasOwnProperty(D)&&(d+=" "+D+'="'+U.escape(this.attributes[D])+'"');d+=">";for(var F=0;F<this.children.length;F++)d+=this.children[F].toMarkup();return d+="</"+u+">",d},Ne=function(){function M(d,f,g,D){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ke.call(this,d,g,D),this.children=f||[]}var u=M.prototype;return u.setAttribute=function(f,g){this.attributes[f]=g},u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){return Ce.call(this,"span")},u.toMarkup=function(){return _e.call(this,"span")},M}(),Ke=function(){function M(d,f,g,D){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ke.call(this,f,D),this.children=g||[],this.setAttribute("href",d)}var u=M.prototype;return u.setAttribute=function(f,g){this.attributes[f]=g},u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){return Ce.call(this,"a")},u.toMarkup=function(){return _e.call(this,"a")},M}(),nt=function(){function M(d,f,g){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=f,this.src=d,this.classes=["mord"],this.style=g}var u=M.prototype;return u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){var f=document.createElement("img");f.src=this.src,f.alt=this.alt,f.className="mord";for(var g in this.style)this.style.hasOwnProperty(g)&&(f.style[g]=this.style[g]);return f},u.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",g="";for(var D in this.style)this.style.hasOwnProperty(D)&&(g+=U.hyphenate(D)+":"+this.style[D]+";");return g&&(f+=' style="'+U.escape(g)+'"'),f+="'/>",f},M}(),te={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},Ie=function(){function M(d,f,g,D,F,se,me,Le){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=d,this.height=f||0,this.depth=g||0,this.italic=D||0,this.skew=F||0,this.width=se||0,this.classes=me||[],this.style=Le||{},this.maxFontSize=0;var je=K(this.text.charCodeAt(0));je&&this.classes.push(je+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=te[this.text])}var u=M.prototype;return u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){var f=document.createTextNode(this.text),g=null;this.italic>0&&(g=document.createElement("span"),g.style.marginRight=this.italic+"em"),this.classes.length>0&&(g=g||document.createElement("span"),g.className=mt(this.classes));for(var D in this.style)this.style.hasOwnProperty(D)&&(g=g||document.createElement("span"),g.style[D]=this.style[D]);return g?(g.appendChild(f),g):f},u.toMarkup=function(){var f=!1,g="<span";this.classes.length&&(f=!0,g+=' class="',g+=U.escape(mt(this.classes)),g+='"');var D="";this.italic>0&&(D+="margin-right:"+this.italic+"em;");for(var F in this.style)this.style.hasOwnProperty(F)&&(D+=U.hyphenate(F)+":"+this.style[F]+";");D&&(f=!0,g+=' style="'+U.escape(D)+'"');var se=U.escape(this.text);return f?(g+=">",g+=se,g+="</span>",g):se},M}(),Ue=function(){function M(d,f){this.children=void 0,this.attributes=void 0,this.children=d||[],this.attributes=f||{}}var u=M.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",g=document.createElementNS(f,"svg");for(var D in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,D)&&g.setAttribute(D,this.attributes[D]);for(var F=0;F<this.children.length;F++)g.appendChild(this.children[F].toNode());return g},u.toMarkup=function(){var f="<svg";for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(f+=" "+g+"='"+this.attributes[g]+"'");f+=">";for(var D=0;D<this.children.length;D++)f+=this.children[D].toMarkup();return f+="</svg>",f},M}(),ze=function(){function M(d,f){this.pathName=void 0,this.alternate=void 0,this.pathName=d,this.alternate=f}var u=M.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",g=document.createElementNS(f,"path");return this.alternate?g.setAttribute("d",this.alternate):g.setAttribute("d",Ft[this.pathName]),g},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Ft[this.pathName]+"'/>"},M}(),qe=function(){function M(d){this.attributes=void 0,this.attributes=d||{}}var u=M.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",g=document.createElementNS(f,"line");for(var D in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,D)&&g.setAttribute(D,this.attributes[D]);return g},u.toMarkup=function(){var f="<line";for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(f+=" "+g+"='"+this.attributes[g]+"'");return f+="/>",f},M}();function gt(M){if(M instanceof Ie)return M;throw new Error("Expected symbolNode but got "+String(M)+".")}function Rt(M){if(M instanceof Ne)return M;throw new Error("Expected span<HtmlDomNode> but got "+String(M)+".")}var vt={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},_t={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},St={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function Nt(M,u){vt[M]=u}function Pt(M,u,d){if(!vt[u])throw new Error("Font metrics not found for font: "+u+".");var f=M.charCodeAt(0),g=vt[u][f];if(!g&&M[0]in St&&(f=St[M[0]].charCodeAt(0),g=vt[u][f]),!g&&d==="text"&&Be(f)&&(g=vt[u][77]),g)return{depth:g[0],height:g[1],italic:g[2],skew:g[3],width:g[4]}}var Ct={};function Ge(M){var u;if(M>=5?u=0:M>=3?u=1:u=2,!Ct[u]){var d=Ct[u]={cssEmPerMu:_t.quad[u]/18};for(var f in _t)_t.hasOwnProperty(f)&&(d[f]=_t[f][u])}return Ct[u]}var Tt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Et={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ct={math:{},text:{}},Lt=ct;function _(M,u,d,f,g,D){ct[M][g]={font:u,group:d,replace:f},D&&f&&(ct[M][f]=ct[M][g])}var T="math",Q="text",C="main",G="ams",Xe="accent-token",fe="bin",Ae="close",Pe="inner",j="mathord",X="op-token",he="open",Se="punct",$="rel",Qe="spacing",le="textord";_(T,C,$,"\u2261","\\equiv",!0),_(T,C,$,"\u227A","\\prec",!0),_(T,C,$,"\u227B","\\succ",!0),_(T,C,$,"\u223C","\\sim",!0),_(T,C,$,"\u22A5","\\perp"),_(T,C,$,"\u2AAF","\\preceq",!0),_(T,C,$,"\u2AB0","\\succeq",!0),_(T,C,$,"\u2243","\\simeq",!0),_(T,C,$,"\u2223","\\mid",!0),_(T,C,$,"\u226A","\\ll",!0),_(T,C,$,"\u226B","\\gg",!0),_(T,C,$,"\u224D","\\asymp",!0),_(T,C,$,"\u2225","\\parallel"),_(T,C,$,"\u22C8","\\bowtie",!0),_(T,C,$,"\u2323","\\smile",!0),_(T,C,$,"\u2291","\\sqsubseteq",!0),_(T,C,$,"\u2292","\\sqsupseteq",!0),_(T,C,$,"\u2250","\\doteq",!0),_(T,C,$,"\u2322","\\frown",!0),_(T,C,$,"\u220B","\\ni",!0),_(T,C,$,"\u221D","\\propto",!0),_(T,C,$,"\u22A2","\\vdash",!0),_(T,C,$,"\u22A3","\\dashv",!0),_(T,C,$,"\u220B","\\owns"),_(T,C,Se,".","\\ldotp"),_(T,C,Se,"\u22C5","\\cdotp"),_(T,C,le,"#","\\#"),_(Q,C,le,"#","\\#"),_(T,C,le,"&","\\&"),_(Q,C,le,"&","\\&"),_(T,C,le,"\u2135","\\aleph",!0),_(T,C,le,"\u2200","\\forall",!0),_(T,C,le,"\u210F","\\hbar",!0),_(T,C,le,"\u2203","\\exists",!0),_(T,C,le,"\u2207","\\nabla",!0),_(T,C,le,"\u266D","\\flat",!0),_(T,C,le,"\u2113","\\ell",!0),_(T,C,le,"\u266E","\\natural",!0),_(T,C,le,"\u2663","\\clubsuit",!0),_(T,C,le,"\u2118","\\wp",!0),_(T,C,le,"\u266F","\\sharp",!0),_(T,C,le,"\u2662","\\diamondsuit",!0),_(T,C,le,"\u211C","\\Re",!0),_(T,C,le,"\u2661","\\heartsuit",!0),_(T,C,le,"\u2111","\\Im",!0),_(T,C,le,"\u2660","\\spadesuit",!0),_(Q,C,le,"\xA7","\\S",!0),_(Q,C,le,"\xB6","\\P",!0),_(T,C,le,"\u2020","\\dag"),_(Q,C,le,"\u2020","\\dag"),_(Q,C,le,"\u2020","\\textdagger"),_(T,C,le,"\u2021","\\ddag"),_(Q,C,le,"\u2021","\\ddag"),_(Q,C,le,"\u2021","\\textdaggerdbl"),_(T,C,Ae,"\u23B1","\\rmoustache",!0),_(T,C,he,"\u23B0","\\lmoustache",!0),_(T,C,Ae,"\u27EF","\\rgroup",!0),_(T,C,he,"\u27EE","\\lgroup",!0),_(T,C,fe,"\u2213","\\mp",!0),_(T,C,fe,"\u2296","\\ominus",!0),_(T,C,fe,"\u228E","\\uplus",!0),_(T,C,fe,"\u2293","\\sqcap",!0),_(T,C,fe,"\u2217","\\ast"),_(T,C,fe,"\u2294","\\sqcup",!0),_(T,C,fe,"\u25EF","\\bigcirc"),_(T,C,fe,"\u2219","\\bullet"),_(T,C,fe,"\u2021","\\ddagger"),_(T,C,fe,"\u2240","\\wr",!0),_(T,C,fe,"\u2A3F","\\amalg"),_(T,C,fe,"&","\\And"),_(T,C,$,"\u27F5","\\longleftarrow",!0),_(T,C,$,"\u21D0","\\Leftarrow",!0),_(T,C,$,"\u27F8","\\Longleftarrow",!0),_(T,C,$,"\u27F6","\\longrightarrow",!0),_(T,C,$,"\u21D2","\\Rightarrow",!0),_(T,C,$,"\u27F9","\\Longrightarrow",!0),_(T,C,$,"\u2194","\\leftrightarrow",!0),_(T,C,$,"\u27F7","\\longleftrightarrow",!0),_(T,C,$,"\u21D4","\\Leftrightarrow",!0),_(T,C,$,"\u27FA","\\Longleftrightarrow",!0),_(T,C,$,"\u21A6","\\mapsto",!0),_(T,C,$,"\u27FC","\\longmapsto",!0),_(T,C,$,"\u2197","\\nearrow",!0),_(T,C,$,"\u21A9","\\hookleftarrow",!0),_(T,C,$,"\u21AA","\\hookrightarrow",!0),_(T,C,$,"\u2198","\\searrow",!0),_(T,C,$,"\u21BC","\\leftharpoonup",!0),_(T,C,$,"\u21C0","\\rightharpoonup",!0),_(T,C,$,"\u2199","\\swarrow",!0),_(T,C,$,"\u21BD","\\leftharpoondown",!0),_(T,C,$,"\u21C1","\\rightharpoondown",!0),_(T,C,$,"\u2196","\\nwarrow",!0),_(T,C,$,"\u21CC","\\rightleftharpoons",!0),_(T,G,$,"\u226E","\\nless",!0),_(T,G,$,"\uE010","\\@nleqslant"),_(T,G,$,"\uE011","\\@nleqq"),_(T,G,$,"\u2A87","\\lneq",!0),_(T,G,$,"\u2268","\\lneqq",!0),_(T,G,$,"\uE00C","\\@lvertneqq"),_(T,G,$,"\u22E6","\\lnsim",!0),_(T,G,$,"\u2A89","\\lnapprox",!0),_(T,G,$,"\u2280","\\nprec",!0),_(T,G,$,"\u22E0","\\npreceq",!0),_(T,G,$,"\u22E8","\\precnsim",!0),_(T,G,$,"\u2AB9","\\precnapprox",!0),_(T,G,$,"\u2241","\\nsim",!0),_(T,G,$,"\uE006","\\@nshortmid"),_(T,G,$,"\u2224","\\nmid",!0),_(T,G,$,"\u22AC","\\nvdash",!0),_(T,G,$,"\u22AD","\\nvDash",!0),_(T,G,$,"\u22EA","\\ntriangleleft"),_(T,G,$,"\u22EC","\\ntrianglelefteq",!0),_(T,G,$,"\u228A","\\subsetneq",!0),_(T,G,$,"\uE01A","\\@varsubsetneq"),_(T,G,$,"\u2ACB","\\subsetneqq",!0),_(T,G,$,"\uE017","\\@varsubsetneqq"),_(T,G,$,"\u226F","\\ngtr",!0),_(T,G,$,"\uE00F","\\@ngeqslant"),_(T,G,$,"\uE00E","\\@ngeqq"),_(T,G,$,"\u2A88","\\gneq",!0),_(T,G,$,"\u2269","\\gneqq",!0),_(T,G,$,"\uE00D","\\@gvertneqq"),_(T,G,$,"\u22E7","\\gnsim",!0),_(T,G,$,"\u2A8A","\\gnapprox",!0),_(T,G,$,"\u2281","\\nsucc",!0),_(T,G,$,"\u22E1","\\nsucceq",!0),_(T,G,$,"\u22E9","\\succnsim",!0),_(T,G,$,"\u2ABA","\\succnapprox",!0),_(T,G,$,"\u2246","\\ncong",!0),_(T,G,$,"\uE007","\\@nshortparallel"),_(T,G,$,"\u2226","\\nparallel",!0),_(T,G,$,"\u22AF","\\nVDash",!0),_(T,G,$,"\u22EB","\\ntriangleright"),_(T,G,$,"\u22ED","\\ntrianglerighteq",!0),_(T,G,$,"\uE018","\\@nsupseteqq"),_(T,G,$,"\u228B","\\supsetneq",!0),_(T,G,$,"\uE01B","\\@varsupsetneq"),_(T,G,$,"\u2ACC","\\supsetneqq",!0),_(T,G,$,"\uE019","\\@varsupsetneqq"),_(T,G,$,"\u22AE","\\nVdash",!0),_(T,G,$,"\u2AB5","\\precneqq",!0),_(T,G,$,"\u2AB6","\\succneqq",!0),_(T,G,$,"\uE016","\\@nsubseteqq"),_(T,G,fe,"\u22B4","\\unlhd"),_(T,G,fe,"\u22B5","\\unrhd"),_(T,G,$,"\u219A","\\nleftarrow",!0),_(T,G,$,"\u219B","\\nrightarrow",!0),_(T,G,$,"\u21CD","\\nLeftarrow",!0),_(T,G,$,"\u21CF","\\nRightarrow",!0),_(T,G,$,"\u21AE","\\nleftrightarrow",!0),_(T,G,$,"\u21CE","\\nLeftrightarrow",!0),_(T,G,$,"\u25B3","\\vartriangle"),_(T,G,le,"\u210F","\\hslash"),_(T,G,le,"\u25BD","\\triangledown"),_(T,G,le,"\u25CA","\\lozenge"),_(T,G,le,"\u24C8","\\circledS"),_(T,G,le,"\xAE","\\circledR"),_(Q,G,le,"\xAE","\\circledR"),_(T,G,le,"\u2221","\\measuredangle",!0),_(T,G,le,"\u2204","\\nexists"),_(T,G,le,"\u2127","\\mho"),_(T,G,le,"\u2132","\\Finv",!0),_(T,G,le,"\u2141","\\Game",!0),_(T,G,le,"\u2035","\\backprime"),_(T,G,le,"\u25B2","\\blacktriangle"),_(T,G,le,"\u25BC","\\blacktriangledown"),_(T,G,le,"\u25A0","\\blacksquare"),_(T,G,le,"\u29EB","\\blacklozenge"),_(T,G,le,"\u2605","\\bigstar"),_(T,G,le,"\u2222","\\sphericalangle",!0),_(T,G,le,"\u2201","\\complement",!0),_(T,G,le,"\xF0","\\eth",!0),_(T,G,le,"\u2571","\\diagup"),_(T,G,le,"\u2572","\\diagdown"),_(T,G,le,"\u25A1","\\square"),_(T,G,le,"\u25A1","\\Box"),_(T,G,le,"\u25CA","\\Diamond"),_(T,G,le,"\xA5","\\yen",!0),_(Q,G,le,"\xA5","\\yen",!0),_(T,G,le,"\u2713","\\checkmark",!0),_(Q,G,le,"\u2713","\\checkmark"),_(T,G,le,"\u2136","\\beth",!0),_(T,G,le,"\u2138","\\daleth",!0),_(T,G,le,"\u2137","\\gimel",!0),_(T,G,le,"\u03DD","\\digamma",!0),_(T,G,le,"\u03F0","\\varkappa"),_(T,G,he,"\u250C","\\ulcorner",!0),_(T,G,Ae,"\u2510","\\urcorner",!0),_(T,G,he,"\u2514","\\llcorner",!0),_(T,G,Ae,"\u2518","\\lrcorner",!0),_(T,G,$,"\u2266","\\leqq",!0),_(T,G,$,"\u2A7D","\\leqslant",!0),_(T,G,$,"\u2A95","\\eqslantless",!0),_(T,G,$,"\u2272","\\lesssim",!0),_(T,G,$,"\u2A85","\\lessapprox",!0),_(T,G,$,"\u224A","\\approxeq",!0),_(T,G,fe,"\u22D6","\\lessdot"),_(T,G,$,"\u22D8","\\lll",!0),_(T,G,$,"\u2276","\\lessgtr",!0),_(T,G,$,"\u22DA","\\lesseqgtr",!0),_(T,G,$,"\u2A8B","\\lesseqqgtr",!0),_(T,G,$,"\u2251","\\doteqdot"),_(T,G,$,"\u2253","\\risingdotseq",!0),_(T,G,$,"\u2252","\\fallingdotseq",!0),_(T,G,$,"\u223D","\\backsim",!0),_(T,G,$,"\u22CD","\\backsimeq",!0),_(T,G,$,"\u2AC5","\\subseteqq",!0),_(T,G,$,"\u22D0","\\Subset",!0),_(T,G,$,"\u228F","\\sqsubset",!0),_(T,G,$,"\u227C","\\preccurlyeq",!0),_(T,G,$,"\u22DE","\\curlyeqprec",!0),_(T,G,$,"\u227E","\\precsim",!0),_(T,G,$,"\u2AB7","\\precapprox",!0),_(T,G,$,"\u22B2","\\vartriangleleft"),_(T,G,$,"\u22B4","\\trianglelefteq"),_(T,G,$,"\u22A8","\\vDash",!0),_(T,G,$,"\u22AA","\\Vvdash",!0),_(T,G,$,"\u2323","\\smallsmile"),_(T,G,$,"\u2322","\\smallfrown"),_(T,G,$,"\u224F","\\bumpeq",!0),_(T,G,$,"\u224E","\\Bumpeq",!0),_(T,G,$,"\u2267","\\geqq",!0),_(T,G,$,"\u2A7E","\\geqslant",!0),_(T,G,$,"\u2A96","\\eqslantgtr",!0),_(T,G,$,"\u2273","\\gtrsim",!0),_(T,G,$,"\u2A86","\\gtrapprox",!0),_(T,G,fe,"\u22D7","\\gtrdot"),_(T,G,$,"\u22D9","\\ggg",!0),_(T,G,$,"\u2277","\\gtrless",!0),_(T,G,$,"\u22DB","\\gtreqless",!0),_(T,G,$,"\u2A8C","\\gtreqqless",!0),_(T,G,$,"\u2256","\\eqcirc",!0),_(T,G,$,"\u2257","\\circeq",!0),_(T,G,$,"\u225C","\\triangleq",!0),_(T,G,$,"\u223C","\\thicksim"),_(T,G,$,"\u2248","\\thickapprox"),_(T,G,$,"\u2AC6","\\supseteqq",!0),_(T,G,$,"\u22D1","\\Supset",!0),_(T,G,$,"\u2290","\\sqsupset",!0),_(T,G,$,"\u227D","\\succcurlyeq",!0),_(T,G,$,"\u22DF","\\curlyeqsucc",!0),_(T,G,$,"\u227F","\\succsim",!0),_(T,G,$,"\u2AB8","\\succapprox",!0),_(T,G,$,"\u22B3","\\vartriangleright"),_(T,G,$,"\u22B5","\\trianglerighteq"),_(T,G,$,"\u22A9","\\Vdash",!0),_(T,G,$,"\u2223","\\shortmid"),_(T,G,$,"\u2225","\\shortparallel"),_(T,G,$,"\u226C","\\between",!0),_(T,G,$,"\u22D4","\\pitchfork",!0),_(T,G,$,"\u221D","\\varpropto"),_(T,G,$,"\u25C0","\\blacktriangleleft"),_(T,G,$,"\u2234","\\therefore",!0),_(T,G,$,"\u220D","\\backepsilon"),_(T,G,$,"\u25B6","\\blacktriangleright"),_(T,G,$,"\u2235","\\because",!0),_(T,G,$,"\u22D8","\\llless"),_(T,G,$,"\u22D9","\\gggtr"),_(T,G,fe,"\u22B2","\\lhd"),_(T,G,fe,"\u22B3","\\rhd"),_(T,G,$,"\u2242","\\eqsim",!0),_(T,C,$,"\u22C8","\\Join"),_(T,G,$,"\u2251","\\Doteq",!0),_(T,G,fe,"\u2214","\\dotplus",!0),_(T,G,fe,"\u2216","\\smallsetminus"),_(T,G,fe,"\u22D2","\\Cap",!0),_(T,G,fe,"\u22D3","\\Cup",!0),_(T,G,fe,"\u2A5E","\\doublebarwedge",!0),_(T,G,fe,"\u229F","\\boxminus",!0),_(T,G,fe,"\u229E","\\boxplus",!0),_(T,G,fe,"\u22C7","\\divideontimes",!0),_(T,G,fe,"\u22C9","\\ltimes",!0),_(T,G,fe,"\u22CA","\\rtimes",!0),_(T,G,fe,"\u22CB","\\leftthreetimes",!0),_(T,G,fe,"\u22CC","\\rightthreetimes",!0),_(T,G,fe,"\u22CF","\\curlywedge",!0),_(T,G,fe,"\u22CE","\\curlyvee",!0),_(T,G,fe,"\u229D","\\circleddash",!0),_(T,G,fe,"\u229B","\\circledast",!0),_(T,G,fe,"\u22C5","\\centerdot"),_(T,G,fe,"\u22BA","\\intercal",!0),_(T,G,fe,"\u22D2","\\doublecap"),_(T,G,fe,"\u22D3","\\doublecup"),_(T,G,fe,"\u22A0","\\boxtimes",!0),_(T,G,$,"\u21E2","\\dashrightarrow",!0),_(T,G,$,"\u21E0","\\dashleftarrow",!0),_(T,G,$,"\u21C7","\\leftleftarrows",!0),_(T,G,$,"\u21C6","\\leftrightarrows",!0),_(T,G,$,"\u21DA","\\Lleftarrow",!0),_(T,G,$,"\u219E","\\twoheadleftarrow",!0),_(T,G,$,"\u21A2","\\leftarrowtail",!0),_(T,G,$,"\u21AB","\\looparrowleft",!0),_(T,G,$,"\u21CB","\\leftrightharpoons",!0),_(T,G,$,"\u21B6","\\curvearrowleft",!0),_(T,G,$,"\u21BA","\\circlearrowleft",!0),_(T,G,$,"\u21B0","\\Lsh",!0),_(T,G,$,"\u21C8","\\upuparrows",!0),_(T,G,$,"\u21BF","\\upharpoonleft",!0),_(T,G,$,"\u21C3","\\downharpoonleft",!0),_(T,G,$,"\u22B8","\\multimap",!0),_(T,G,$,"\u21AD","\\leftrightsquigarrow",!0),_(T,G,$,"\u21C9","\\rightrightarrows",!0),_(T,G,$,"\u21C4","\\rightleftarrows",!0),_(T,G,$,"\u21A0","\\twoheadrightarrow",!0),_(T,G,$,"\u21A3","\\rightarrowtail",!0),_(T,G,$,"\u21AC","\\looparrowright",!0),_(T,G,$,"\u21B7","\\curvearrowright",!0),_(T,G,$,"\u21BB","\\circlearrowright",!0),_(T,G,$,"\u21B1","\\Rsh",!0),_(T,G,$,"\u21CA","\\downdownarrows",!0),_(T,G,$,"\u21BE","\\upharpoonright",!0),_(T,G,$,"\u21C2","\\downharpoonright",!0),_(T,G,$,"\u21DD","\\rightsquigarrow",!0),_(T,G,$,"\u21DD","\\leadsto"),_(T,G,$,"\u21DB","\\Rrightarrow",!0),_(T,G,$,"\u21BE","\\restriction"),_(T,C,le,"\u2018","`"),_(T,C,le,"$","\\$"),_(Q,C,le,"$","\\$"),_(Q,C,le,"$","\\textdollar"),_(T,C,le,"%","\\%"),_(Q,C,le,"%","\\%"),_(T,C,le,"_","\\_"),_(Q,C,le,"_","\\_"),_(Q,C,le,"_","\\textunderscore"),_(T,C,le,"\u2220","\\angle",!0),_(T,C,le,"\u221E","\\infty",!0),_(T,C,le,"\u2032","\\prime"),_(T,C,le,"\u25B3","\\triangle"),_(T,C,le,"\u0393","\\Gamma",!0),_(T,C,le,"\u0394","\\Delta",!0),_(T,C,le,"\u0398","\\Theta",!0),_(T,C,le,"\u039B","\\Lambda",!0),_(T,C,le,"\u039E","\\Xi",!0),_(T,C,le,"\u03A0","\\Pi",!0),_(T,C,le,"\u03A3","\\Sigma",!0),_(T,C,le,"\u03A5","\\Upsilon",!0),_(T,C,le,"\u03A6","\\Phi",!0),_(T,C,le,"\u03A8","\\Psi",!0),_(T,C,le,"\u03A9","\\Omega",!0),_(T,C,le,"A","\u0391"),_(T,C,le,"B","\u0392"),_(T,C,le,"E","\u0395"),_(T,C,le,"Z","\u0396"),_(T,C,le,"H","\u0397"),_(T,C,le,"I","\u0399"),_(T,C,le,"K","\u039A"),_(T,C,le,"M","\u039C"),_(T,C,le,"N","\u039D"),_(T,C,le,"O","\u039F"),_(T,C,le,"P","\u03A1"),_(T,C,le,"T","\u03A4"),_(T,C,le,"X","\u03A7"),_(T,C,le,"\xAC","\\neg",!0),_(T,C,le,"\xAC","\\lnot"),_(T,C,le,"\u22A4","\\top"),_(T,C,le,"\u22A5","\\bot"),_(T,C,le,"\u2205","\\emptyset"),_(T,G,le,"\u2205","\\varnothing"),_(T,C,j,"\u03B1","\\alpha",!0),_(T,C,j,"\u03B2","\\beta",!0),_(T,C,j,"\u03B3","\\gamma",!0),_(T,C,j,"\u03B4","\\delta",!0),_(T,C,j,"\u03F5","\\epsilon",!0),_(T,C,j,"\u03B6","\\zeta",!0),_(T,C,j,"\u03B7","\\eta",!0),_(T,C,j,"\u03B8","\\theta",!0),_(T,C,j,"\u03B9","\\iota",!0),_(T,C,j,"\u03BA","\\kappa",!0),_(T,C,j,"\u03BB","\\lambda",!0),_(T,C,j,"\u03BC","\\mu",!0),_(T,C,j,"\u03BD","\\nu",!0),_(T,C,j,"\u03BE","\\xi",!0),_(T,C,j,"\u03BF","\\omicron",!0),_(T,C,j,"\u03C0","\\pi",!0),_(T,C,j,"\u03C1","\\rho",!0),_(T,C,j,"\u03C3","\\sigma",!0),_(T,C,j,"\u03C4","\\tau",!0),_(T,C,j,"\u03C5","\\upsilon",!0),_(T,C,j,"\u03D5","\\phi",!0),_(T,C,j,"\u03C7","\\chi",!0),_(T,C,j,"\u03C8","\\psi",!0),_(T,C,j,"\u03C9","\\omega",!0),_(T,C,j,"\u03B5","\\varepsilon",!0),_(T,C,j,"\u03D1","\\vartheta",!0),_(T,C,j,"\u03D6","\\varpi",!0),_(T,C,j,"\u03F1","\\varrho",!0),_(T,C,j,"\u03C2","\\varsigma",!0),_(T,C,j,"\u03C6","\\varphi",!0),_(T,C,fe,"\u2217","*"),_(T,C,fe,"+","+"),_(T,C,fe,"\u2212","-"),_(T,C,fe,"\u22C5","\\cdot",!0),_(T,C,fe,"\u2218","\\circ"),_(T,C,fe,"\xF7","\\div",!0),_(T,C,fe,"\xB1","\\pm",!0),_(T,C,fe,"\xD7","\\times",!0),_(T,C,fe,"\u2229","\\cap",!0),_(T,C,fe,"\u222A","\\cup",!0),_(T,C,fe,"\u2216","\\setminus"),_(T,C,fe,"\u2227","\\land"),_(T,C,fe,"\u2228","\\lor"),_(T,C,fe,"\u2227","\\wedge",!0),_(T,C,fe,"\u2228","\\vee",!0),_(T,C,le,"\u221A","\\surd"),_(T,C,he,"(","("),_(T,C,he,"[","["),_(T,C,he,"\u27E8","\\langle",!0),_(T,C,he,"\u2223","\\lvert"),_(T,C,he,"\u2225","\\lVert"),_(T,C,Ae,")",")"),_(T,C,Ae,"]","]"),_(T,C,Ae,"?","?"),_(T,C,Ae,"!","!"),_(T,C,Ae,"\u27E9","\\rangle",!0),_(T,C,Ae,"\u2223","\\rvert"),_(T,C,Ae,"\u2225","\\rVert"),_(T,C,$,"=","="),_(T,C,$,"<","<"),_(T,C,$,">",">"),_(T,C,$,":",":"),_(T,C,$,"\u2248","\\approx",!0),_(T,C,$,"\u2245","\\cong",!0),_(T,C,$,"\u2265","\\ge"),_(T,C,$,"\u2265","\\geq",!0),_(T,C,$,"\u2190","\\gets"),_(T,C,$,">","\\gt"),_(T,C,$,"\u2208","\\in",!0),_(T,C,$,"\uE020","\\@not"),_(T,C,$,"\u2282","\\subset",!0),_(T,C,$,"\u2283","\\supset",!0),_(T,C,$,"\u2286","\\subseteq",!0),_(T,C,$,"\u2287","\\supseteq",!0),_(T,G,$,"\u2288","\\nsubseteq",!0),_(T,G,$,"\u2289","\\nsupseteq",!0),_(T,C,$,"\u22A8","\\models"),_(T,C,$,"\u2190","\\leftarrow",!0),_(T,C,$,"\u2264","\\le"),_(T,C,$,"\u2264","\\leq",!0),_(T,C,$,"<","\\lt"),_(T,C,$,"\u2192","\\rightarrow",!0),_(T,C,$,"\u2192","\\to"),_(T,G,$,"\u2271","\\ngeq",!0),_(T,G,$,"\u2270","\\nleq",!0),_(T,C,Qe,"\xA0","\\ "),_(T,C,Qe,"\xA0","~"),_(T,C,Qe,"\xA0","\\space"),_(T,C,Qe,"\xA0","\\nobreakspace"),_(Q,C,Qe,"\xA0","\\ "),_(Q,C,Qe,"\xA0","~"),_(Q,C,Qe,"\xA0","\\space"),_(Q,C,Qe,"\xA0","\\nobreakspace"),_(T,C,Qe,null,"\\nobreak"),_(T,C,Qe,null,"\\allowbreak"),_(T,C,Se,",",","),_(T,C,Se,";",";"),_(T,G,fe,"\u22BC","\\barwedge",!0),_(T,G,fe,"\u22BB","\\veebar",!0),_(T,C,fe,"\u2299","\\odot",!0),_(T,C,fe,"\u2295","\\oplus",!0),_(T,C,fe,"\u2297","\\otimes",!0),_(T,C,le,"\u2202","\\partial",!0),_(T,C,fe,"\u2298","\\oslash",!0),_(T,G,fe,"\u229A","\\circledcirc",!0),_(T,G,fe,"\u22A1","\\boxdot",!0),_(T,C,fe,"\u25B3","\\bigtriangleup"),_(T,C,fe,"\u25BD","\\bigtriangledown"),_(T,C,fe,"\u2020","\\dagger"),_(T,C,fe,"\u22C4","\\diamond"),_(T,C,fe,"\u22C6","\\star"),_(T,C,fe,"\u25C3","\\triangleleft"),_(T,C,fe,"\u25B9","\\triangleright"),_(T,C,he,"{","\\{"),_(Q,C,le,"{","\\{"),_(Q,C,le,"{","\\textbraceleft"),_(T,C,Ae,"}","\\}"),_(Q,C,le,"}","\\}"),_(Q,C,le,"}","\\textbraceright"),_(T,C,he,"{","\\lbrace"),_(T,C,Ae,"}","\\rbrace"),_(T,C,he,"[","\\lbrack"),_(Q,C,le,"[","\\lbrack"),_(T,C,Ae,"]","\\rbrack"),_(Q,C,le,"]","\\rbrack"),_(T,C,he,"(","\\lparen"),_(T,C,Ae,")","\\rparen"),_(Q,C,le,"<","\\textless"),_(Q,C,le,">","\\textgreater"),_(T,C,he,"\u230A","\\lfloor",!0),_(T,C,Ae,"\u230B","\\rfloor",!0),_(T,C,he,"\u2308","\\lceil",!0),_(T,C,Ae,"\u2309","\\rceil",!0),_(T,C,le,"\\","\\backslash"),_(T,C,le,"\u2223","|"),_(T,C,le,"\u2223","\\vert"),_(Q,C,le,"|","\\textbar"),_(T,C,le,"\u2225","\\|"),_(T,C,le,"\u2225","\\Vert"),_(Q,C,le,"\u2225","\\textbardbl"),_(Q,C,le,"~","\\textasciitilde"),_(Q,C,le,"\\","\\textbackslash"),_(Q,C,le,"^","\\textasciicircum"),_(T,C,$,"\u2191","\\uparrow",!0),_(T,C,$,"\u21D1","\\Uparrow",!0),_(T,C,$,"\u2193","\\downarrow",!0),_(T,C,$,"\u21D3","\\Downarrow",!0),_(T,C,$,"\u2195","\\updownarrow",!0),_(T,C,$,"\u21D5","\\Updownarrow",!0),_(T,C,X,"\u2210","\\coprod"),_(T,C,X,"\u22C1","\\bigvee"),_(T,C,X,"\u22C0","\\bigwedge"),_(T,C,X,"\u2A04","\\biguplus"),_(T,C,X,"\u22C2","\\bigcap"),_(T,C,X,"\u22C3","\\bigcup"),_(T,C,X,"\u222B","\\int"),_(T,C,X,"\u222B","\\intop"),_(T,C,X,"\u222C","\\iint"),_(T,C,X,"\u222D","\\iiint"),_(T,C,X,"\u220F","\\prod"),_(T,C,X,"\u2211","\\sum"),_(T,C,X,"\u2A02","\\bigotimes"),_(T,C,X,"\u2A01","\\bigoplus"),_(T,C,X,"\u2A00","\\bigodot"),_(T,C,X,"\u222E","\\oint"),_(T,C,X,"\u222F","\\oiint"),_(T,C,X,"\u2230","\\oiiint"),_(T,C,X,"\u2A06","\\bigsqcup"),_(T,C,X,"\u222B","\\smallint"),_(Q,C,Pe,"\u2026","\\textellipsis"),_(T,C,Pe,"\u2026","\\mathellipsis"),_(Q,C,Pe,"\u2026","\\ldots",!0),_(T,C,Pe,"\u2026","\\ldots",!0),_(T,C,Pe,"\u22EF","\\@cdots",!0),_(T,C,Pe,"\u22F1","\\ddots",!0),_(T,C,le,"\u22EE","\\varvdots"),_(T,C,Xe,"\u02CA","\\acute"),_(T,C,Xe,"\u02CB","\\grave"),_(T,C,Xe,"\xA8","\\ddot"),_(T,C,Xe,"~","\\tilde"),_(T,C,Xe,"\u02C9","\\bar"),_(T,C,Xe,"\u02D8","\\breve"),_(T,C,Xe,"\u02C7","\\check"),_(T,C,Xe,"^","\\hat"),_(T,C,Xe,"\u20D7","\\vec"),_(T,C,Xe,"\u02D9","\\dot"),_(T,C,Xe,"\u02DA","\\mathring"),_(T,C,j,"\u0131","\\imath",!0),_(T,C,j,"\u0237","\\jmath",!0),_(Q,C,le,"\u0131","\\i",!0),_(Q,C,le,"\u0237","\\j",!0),_(Q,C,le,"\xDF","\\ss",!0),_(Q,C,le,"\xE6","\\ae",!0),_(Q,C,le,"\xE6","\\ae",!0),_(Q,C,le,"\u0153","\\oe",!0),_(Q,C,le,"\xF8","\\o",!0),_(Q,C,le,"\xC6","\\AE",!0),_(Q,C,le,"\u0152","\\OE",!0),_(Q,C,le,"\xD8","\\O",!0),_(Q,C,Xe,"\u02CA","\\'"),_(Q,C,Xe,"\u02CB","\\`"),_(Q,C,Xe,"\u02C6","\\^"),_(Q,C,Xe,"\u02DC","\\~"),_(Q,C,Xe,"\u02C9","\\="),_(Q,C,Xe,"\u02D8","\\u"),_(Q,C,Xe,"\u02D9","\\."),_(Q,C,Xe,"\u02DA","\\r"),_(Q,C,Xe,"\u02C7","\\v"),_(Q,C,Xe,"\xA8",'\\"'),_(Q,C,Xe,"\u02DD","\\H"),_(Q,C,Xe,"\u25EF","\\textcircled");var It={"--":!0,"---":!0,"``":!0,"''":!0};_(Q,C,le,"\u2013","--"),_(Q,C,le,"\u2013","\\textendash"),_(Q,C,le,"\u2014","---"),_(Q,C,le,"\u2014","\\textemdash"),_(Q,C,le,"\u2018","`"),_(Q,C,le,"\u2018","\\textquoteleft"),_(Q,C,le,"\u2019","'"),_(Q,C,le,"\u2019","\\textquoteright"),_(Q,C,le,"\u201C","``"),_(Q,C,le,"\u201C","\\textquotedblleft"),_(Q,C,le,"\u201D","''"),_(Q,C,le,"\u201D","\\textquotedblright"),_(T,C,le,"\xB0","\\degree",!0),_(Q,C,le,"\xB0","\\degree"),_(Q,C,le,"\xB0","\\textdegree",!0),_(T,C,j,"\xA3","\\pounds"),_(T,C,j,"\xA3","\\mathsterling",!0),_(Q,C,j,"\xA3","\\pounds"),_(Q,C,j,"\xA3","\\textsterling",!0),_(T,G,le,"\u2720","\\maltese"),_(Q,G,le,"\u2720","\\maltese"),_(Q,C,Qe,"\xA0","\\ "),_(Q,C,Qe,"\xA0"," "),_(Q,C,Qe,"\xA0","~");for(var $t='0123456789/@."',zt=0;zt<$t.length;zt++){var sr=$t.charAt(zt);_(T,C,le,sr,sr)}for(var or='0123456789!@*()-=+[]<>|";:?/.,',Kt=0;Kt<or.length;Kt++){var ur=or.charAt(Kt);_(Q,C,le,ur,ur)}for(var Zr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Tr=0;Tr<Zr.length;Tr++){var fr=Zr.charAt(Tr);_(T,C,j,fr,fr),_(Q,C,le,fr,fr)}_(T,G,le,"C","\u2102"),_(Q,G,le,"C","\u2102"),_(T,G,le,"H","\u210D"),_(Q,G,le,"H","\u210D"),_(T,G,le,"N","\u2115"),_(Q,G,le,"N","\u2115"),_(T,G,le,"P","\u2119"),_(Q,G,le,"P","\u2119"),_(T,G,le,"Q","\u211A"),_(Q,G,le,"Q","\u211A"),_(T,G,le,"R","\u211D"),_(Q,G,le,"R","\u211D"),_(T,G,le,"Z","\u2124"),_(Q,G,le,"Z","\u2124"),_(T,C,j,"h","\u210E"),_(Q,C,j,"h","\u210E");for(var Ot="",yt=0;yt<Zr.length;yt++){var bt=Zr.charAt(yt);Ot=String.fromCharCode(55349,56320+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56372+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56424+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56580+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56736+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56788+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56840+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56944+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),yt<26&&(Ot=String.fromCharCode(55349,56632+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot),Ot=String.fromCharCode(55349,56476+yt),_(T,C,j,bt,Ot),_(Q,C,le,bt,Ot))}Ot="\u{1D55C}",_(T,C,j,"k",Ot),_(Q,C,le,"k",Ot);for(var Jt=0;Jt<10;Jt++){var Sr=Jt.toString();Ot=String.fromCharCode(55349,57294+Jt),_(T,C,j,Sr,Ot),_(Q,C,le,Sr,Ot),Ot=String.fromCharCode(55349,57314+Jt),_(T,C,j,Sr,Ot),_(Q,C,le,Sr,Ot),Ot=String.fromCharCode(55349,57324+Jt),_(T,C,j,Sr,Ot),_(Q,C,le,Sr,Ot),Ot=String.fromCharCode(55349,57334+Jt),_(T,C,j,Sr,Ot),_(Q,C,le,Sr,Ot)}for(var Dr="\xC7\xD0\xDE\xE7\xFE",hn=0;hn<Dr.length;hn++){var Re=Dr.charAt(hn);_(T,C,j,Re,Re),_(Q,C,le,Re,Re)}_(Q,C,le,"\xF0","\xF0"),_(Q,C,le,"\u2013","\u2013"),_(Q,C,le,"\u2014","\u2014"),_(Q,C,le,"\u2018","\u2018"),_(Q,C,le,"\u2019","\u2019"),_(Q,C,le,"\u201C","\u201C"),_(Q,C,le,"\u201D","\u201D");var Je=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],lt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ze=function(u,d){var f=u.charCodeAt(0),g=u.charCodeAt(1),D=(f-55296)*1024+(g-56320)+65536,F=d==="math"?0:1;if(119808<=D&&D<120484){var se=Math.floor((D-119808)/26);return[Je[se][2],Je[se][F]]}else if(120782<=D&&D<=120831){var me=Math.floor((D-120782)/10);return[lt[me][2],lt[me][F]]}else{if(D===120485||D===120486)return[Je[0][2],Je[0][F]];if(120486<D&&D<120782)return["",""];throw new v("Unsupported character: "+u)}},Dt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Wt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],cr=function(u,d){return d.size<2?u:Dt[u-1][d.size-1]},Ir=function(){function M(d){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=d.style,this.color=d.color,this.size=d.size||M.BASESIZE,this.textSize=d.textSize||this.size,this.phantom=!!d.phantom,this.font=d.font||"",this.fontFamily=d.fontFamily||"",this.fontWeight=d.fontWeight||"",this.fontShape=d.fontShape||"",this.sizeMultiplier=Wt[this.size-1],this.maxSize=d.maxSize,this.minRuleThickness=d.minRuleThickness,this._fontMetrics=void 0}var u=M.prototype;return u.extend=function(f){var g={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var D in f)f.hasOwnProperty(D)&&(g[D]=f[D]);return new M(g)},u.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:cr(this.textSize,f)})},u.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},u.havingSize=function(f){return this.size===f&&this.textSize===f?this:this.extend({style:this.style.text(),size:f,textSize:f,sizeMultiplier:Wt[f-1]})},u.havingBaseStyle=function(f){f=f||this.style.text();var g=cr(M.BASESIZE,f);return this.size===g&&this.textSize===M.BASESIZE&&this.style===f?this:this.extend({style:f,size:g})},u.havingBaseSizing=function(){var f;switch(this.style.id){case 4:case 5:f=3;break;case 6:case 7:f=1;break;default:f=6}return this.extend({style:this.style.text(),size:f})},u.withColor=function(f){return this.extend({color:f})},u.withPhantom=function(){return this.extend({phantom:!0})},u.withFont=function(f){return this.extend({font:f})},u.withTextFontFamily=function(f){return this.extend({fontFamily:f,font:""})},u.withTextFontWeight=function(f){return this.extend({fontWeight:f,font:""})},u.withTextFontShape=function(f){return this.extend({fontShape:f,font:""})},u.sizingClasses=function(f){return f.size!==this.size?["sizing","reset-size"+f.size,"size"+this.size]:[]},u.baseSizingClasses=function(){return this.size!==M.BASESIZE?["sizing","reset-size"+this.size,"size"+M.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Ge(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},M}();Ir.BASESIZE=6;var Zt=Ir,qt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},gr={ex:!0,em:!0,mu:!0},hr=function(u){return typeof u!="string"&&(u=u.unit),u in qt||u in gr||u==="ex"},vr=function(u,d){var f;if(u.unit in qt)f=qt[u.unit]/d.fontMetrics().ptPerEm/d.sizeMultiplier;else if(u.unit==="mu")f=d.fontMetrics().cssEmPerMu;else{var g;if(d.style.isTight()?g=d.havingStyle(d.style.text()):g=d,u.unit==="ex")f=g.fontMetrics().xHeight;else if(u.unit==="em")f=g.fontMetrics().quad;else throw new v("Invalid unit: '"+u.unit+"'");g!==d&&(f*=g.sizeMultiplier/d.sizeMultiplier)}return Math.min(u.number*f,d.maxSize)},nr=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Ar=function(u,d,f){return Lt[f][u]&&Lt[f][u].replace&&(u=Lt[f][u].replace),{value:u,metrics:Pt(u,d,f)}},Pr=function(u,d,f,g,D){var F=Ar(u,d,f),se=F.metrics;u=F.value;var me;if(se){var Le=se.italic;(f==="text"||g&&g.font==="mathit")&&(Le=0),me=new Ie(u,se.height,se.depth,Le,se.skew,se.width,D)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+d+"' and mode '"+f+"'")),me=new Ie(u,0,0,0,0,0,D);if(g){me.maxFontSize=g.sizeMultiplier,g.style.isTight()&&me.classes.push("mtight");var je=g.getColor();je&&(me.style.color=je)}return me},Xr=function(u,d,f,g){return g===void 0&&(g=[]),f.font==="boldsymbol"&&Ar(u,"Main-Bold",d).metrics?Pr(u,"Main-Bold",d,f,g.concat(["mathbf"])):u==="\\"||Lt[d][u].font==="main"?Pr(u,"Main-Regular",d,f,g):Pr(u,"AMS-Regular",d,f,g.concat(["amsrm"]))},tn=function(u,d,f,g){return/[0-9]/.test(u.charAt(0))||U.contains(nr,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},xn=function(u,d,f,g){return U.contains(nr,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},_r=function(u,d,f,g){return Ar(u,"Math-BoldItalic",d).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Gr=function(u,d,f){var g=u.mode,D=u.text,F=["mord"],se=g==="math"||g==="text"&&d.font,me=se?d.font:d.fontFamily;if(D.charCodeAt(0)===55349){var Le=Ze(D,g),je=Le[0],rt=Le[1];return Pr(D,je,g,d,F.concat(rt))}else if(me){var wt,Bt;if(me==="boldsymbol"||me==="mathnormal"){var Ut=me==="boldsymbol"?_r(D,g,d,F):xn(D,g,d,F);wt=Ut.fontName,Bt=[Ut.fontClass]}else U.contains(nr,D)?(wt="Main-Italic",Bt=["mathit"]):se?(wt=Rn[me].fontName,Bt=[me]):(wt=dn(me,d.fontWeight,d.fontShape),Bt=[me,d.fontWeight,d.fontShape]);if(Ar(D,wt,g).metrics)return Pr(D,wt,g,d,F.concat(Bt));if(It.hasOwnProperty(D)&&wt.substr(0,10)==="Typewriter"){for(var Qt=[],yr=0;yr<D.length;yr++)Qt.push(Pr(D[yr],wt,g,d,F.concat(Bt)));return Nr(Qt)}}if(f==="mathord"){var Er=tn(D,g,d,F);return Pr(D,Er.fontName,g,d,F.concat([Er.fontClass]))}else if(f==="textord"){var Mr=Lt[g][D]&&Lt[g][D].font;if(Mr==="ams"){var qr=dn("amsrm",d.fontWeight,d.fontShape);return Pr(D,qr,g,d,F.concat("amsrm",d.fontWeight,d.fontShape))}else if(Mr==="main"||!Mr){var An=dn("textrm",d.fontWeight,d.fontShape);return Pr(D,An,g,d,F.concat(d.fontWeight,d.fontShape))}else{var _n=dn(Mr,d.fontWeight,d.fontShape);return Pr(D,_n,g,d,F.concat(_n,d.fontWeight,d.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},Yr=function(u,d){if(mt(u.classes)!==mt(d.classes)||u.skew!==d.skew||u.maxFontSize!==d.maxFontSize)return!1;for(var f in u.style)if(u.style.hasOwnProperty(f)&&u.style[f]!==d.style[f])return!1;for(var g in d.style)if(d.style.hasOwnProperty(g)&&u.style[g]!==d.style[g])return!1;return!0},un=function(u){for(var d=0;d<u.length-1;d++){var f=u[d],g=u[d+1];f instanceof Ie&&g instanceof Ie&&Yr(f,g)&&(f.text+=g.text,f.height=Math.max(f.height,g.height),f.depth=Math.max(f.depth,g.depth),f.italic=g.italic,u.splice(d+1,1),d--)}return u},Vr=function(u){for(var d=0,f=0,g=0,D=0;D<u.children.length;D++){var F=u.children[D];F.height>d&&(d=F.height),F.depth>f&&(f=F.depth),F.maxFontSize>g&&(g=F.maxFontSize)}u.height=d,u.depth=f,u.maxFontSize=g},Rr=function(u,d,f,g){var D=new Ne(u,d,f,g);return Vr(D),D},Br=function(u,d,f,g){return new Ne(u,d,f,g)},rn=function(u,d,f){var g=Rr([u],[],d);return g.height=Math.max(f||d.fontMetrics().defaultRuleThickness,d.minRuleThickness),g.style.borderBottomWidth=g.height+"em",g.maxFontSize=1,g},nn=function(u,d,f,g){var D=new Ke(u,d,f,g);return Vr(D),D},Nr=function(u){var d=new Me(u);return Vr(d),d},Jr=function(u,d){return u instanceof Me?Rr([],[u],d):u},an=function(u){if(u.positionType==="individualShift"){for(var d=u.children,f=[d[0]],g=-d[0].shift-d[0].elem.depth,D=g,F=1;F<d.length;F++){var se=-d[F].shift-D-d[F].elem.depth,me=se-(d[F-1].elem.height+d[F-1].elem.depth);D=D+se,f.push({type:"kern",size:me}),f.push(d[F])}return{children:f,depth:g}}var Le;if(u.positionType==="top"){for(var je=u.positionData,rt=0;rt<u.children.length;rt++){var wt=u.children[rt];je-=wt.type==="kern"?wt.size:wt.elem.height+wt.elem.depth}Le=je}else if(u.positionType==="bottom")Le=-u.positionData;else{var Bt=u.children[0];if(Bt.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")Le=-Bt.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")Le=-Bt.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:Le}},wn=function(u,d){for(var f=an(u),g=f.children,D=f.depth,F=0,se=0;se<g.length;se++){var me=g[se];if(me.type==="elem"){var Le=me.elem;F=Math.max(F,Le.maxFontSize,Le.height)}}F+=2;var je=Rr(["pstrut"],[]);je.style.height=F+"em";for(var rt=[],wt=D,Bt=D,Ut=D,Qt=0;Qt<g.length;Qt++){var yr=g[Qt];if(yr.type==="kern")Ut+=yr.size;else{var Er=yr.elem,Mr=yr.wrapperClasses||[],qr=yr.wrapperStyle||{},An=Rr(Mr,[je,Er],void 0,qr);An.style.top=-F-Ut-Er.depth+"em",yr.marginLeft&&(An.style.marginLeft=yr.marginLeft),yr.marginRight&&(An.style.marginRight=yr.marginRight),rt.push(An),Ut+=Er.height+Er.depth}wt=Math.min(wt,Ut),Bt=Math.max(Bt,Ut)}var _n=Rr(["vlist"],rt);_n.style.height=Bt+"em";var Tn;if(wt<0){var Dn=Rr([],[]),En=Rr(["vlist"],[Dn]);En.style.height=-wt+"em";var Kn=Rr(["vlist-s"],[new Ie("\u200B")]);Tn=[Rr(["vlist-r"],[_n,Kn]),Rr(["vlist-r"],[En])]}else Tn=[Rr(["vlist-r"],[_n])];var In=Rr(["vlist-t"],Tn);return Tn.length===2&&In.classes.push("vlist-t2"),In.height=Bt,In.depth=-wt,In},mn=function(u,d){var f=Rr(["mspace"],[],d),g=vr(u,d);return f.style.marginRight=g+"em",f},dn=function(u,d,f){var g="";switch(u){case"amsrm":g="AMS";break;case"textrm":g="Main";break;case"textsf":g="SansSerif";break;case"texttt":g="Typewriter";break;default:g=u}var D;return d==="textbf"&&f==="textit"?D="BoldItalic":d==="textbf"?D="Bold":d==="textit"?D="Italic":D="Regular",g+"-"+D},Rn={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Wr={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Cn=function(u,d){var f=Wr[u],g=f[0],D=f[1],F=f[2],se=new ze(g),me=new Ue([se],{width:D+"em",height:F+"em",style:"width:"+D+"em",viewBox:"0 0 "+1e3*D+" "+1e3*F,preserveAspectRatio:"xMinYMin"}),Le=Br(["overlay"],[me],d);return Le.height=F,Le.style.height=F+"em",Le.style.width=D+"em",Le},ht={fontMap:Rn,makeSymbol:Pr,mathsym:Xr,makeSpan:Rr,makeSvgSpan:Br,makeLineSpan:rn,makeAnchor:nn,makeFragment:Nr,wrapFragment:Jr,makeVList:wn,makeOrd:Gr,makeGlue:mn,staticSvg:Cn,svgData:Wr,tryCombineChars:un};function Lr(M,u){var d=on(M,u);if(!d)throw new Error("Expected node of type "+u+", but got "+(M?"node of type "+M.type:String(M)));return d}function on(M,u){return M&&M.type===u?M:null}function $n(M,u){var d=Pn(M,u);if(!d)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(M?M.type==="atom"?"atom of family "+M.family:"node of type "+M.type:String(M)));return d}function Pn(M,u){return M&&M.type==="atom"&&M.family===u?M:null}function Ln(M){var u=Sn(M);if(!u)throw new Error("Expected node of symbol group type, but got "+(M?"node of type "+M.type:String(M)));return u}function Sn(M){return M&&(M.type==="atom"||Et.hasOwnProperty(M.type))?M:null}var ir={number:3,unit:"mu"},$r={number:4,unit:"mu"},ln={number:5,unit:"mu"},Hr={mord:{mop:ir,mbin:$r,mrel:ln,minner:ir},mop:{mord:ir,mop:ir,mrel:ln,minner:ir},mbin:{mord:$r,mop:$r,mopen:$r,minner:$r},mrel:{mord:ln,mop:ln,mopen:ln,minner:ln},mopen:{},mclose:{mop:ir,mbin:$r,mrel:ln,minner:ir},mpunct:{mord:ir,mop:ir,mrel:ln,mopen:ir,mclose:ir,mpunct:ir,minner:ir},minner:{mord:ir,mop:ir,mbin:$r,mrel:ln,mopen:ir,mpunct:ir,minner:ir}},Xt={mord:{mop:ir},mop:{mord:ir,mop:ir},mbin:{},mrel:{},mopen:{},mclose:{mop:ir},mpunct:{},minner:{mop:ir}},dr={},jr={},xr={};function Gt(M){for(var u=M.type,d=M.names,f=M.props,g=M.handler,D=M.htmlBuilder,F=M.mathmlBuilder,se={type:u,numArgs:f.numArgs,argTypes:f.argTypes,greediness:f.greediness===void 0?1:f.greediness,allowedInText:!!f.allowedInText,allowedInMath:f.allowedInMath===void 0?!0:f.allowedInMath,numOptionalArgs:f.numOptionalArgs||0,infix:!!f.infix,handler:g},me=0;me<d.length;++me)dr[d[me]]=se;u&&(D&&(jr[u]=D),F&&(xr[u]=F))}function fn(M){var u=M.type,d=M.htmlBuilder,f=M.mathmlBuilder;Gt({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:d,mathmlBuilder:f})}var vn=function(u){var d=on(u,"ordgroup");return d?d.body:[u]},kn=ht.makeSpan,ii=["leftmost","mbin","mopen","mrel","mop","mpunct"],si=["rightmost","mrel","mclose","mpunct"],hi={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT},ai={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},bn=function(u,d,f,g){g===void 0&&(g=[null,null]);for(var D=[],F=0;F<u.length;F++){var se=Kr(u[F],d);if(se instanceof Me){var me=se.children;D.push.apply(D,me)}else D.push(se)}if(!f)return D;var Le=d;if(u.length===1){var je=on(u[0],"sizing")||on(u[0],"styling");je&&(je.type==="sizing"?Le=d.havingSize(je.size):je.type==="styling"&&(Le=d.havingStyle(hi[je.style])))}var rt=kn([g[0]||"leftmost"],[],d),wt=kn([g[1]||"rightmost"],[],d);return Qn(D,function(Bt,Ut){var Qt=Ut.classes[0],yr=Bt.classes[0];Qt==="mbin"&&U.contains(si,yr)?Ut.classes[0]="mord":yr==="mbin"&&U.contains(ii,Qt)&&(Bt.classes[0]="mord")},{node:rt},wt),Qn(D,function(Bt,Ut){var Qt=Jn(Ut),yr=Jn(Bt),Er=Qt&&yr?Bt.hasClass("mtight")?Xt[Qt][yr]:Hr[Qt][yr]:null;if(Er)return ht.makeGlue(Er,Le)},{node:rt},wt),D},Qn=function M(u,d,f,g){g&&u.push(g);for(var D=0;D<u.length;D++){var F=u[D],se=Mn(F);if(se){M(se.children,d,f);continue}if(F.classes[0]!=="mspace"){var me=d(F,f.node);me&&(f.insertAfter?f.insertAfter(me):(u.unshift(me),D++)),f.node=F,f.insertAfter=function(Le){return function(je){u.splice(Le+1,0,je),D++}}(D)}}g&&u.pop()},Mn=function(u){return u instanceof Me||u instanceof Ke?u:null},Un=function M(u,d){var f=Mn(u);if(f){var g=f.children;if(g.length){if(d==="right")return M(g[g.length-1],"right");if(d==="left")return M(g[0],"left")}}return u},Jn=function(u,d){return u?(d&&(u=Un(u,d)),ai[u.classes[0]]||null):null},Zn=function(u,d){var f=["nulldelimiter"].concat(u.baseSizingClasses());return kn(d.concat(f))},Kr=function(u,d,f){if(!u)return kn();if(jr[u.type]){var g=jr[u.type](u,d);if(f&&d.size!==f.size){g=kn(d.sizingClasses(f),[g],d);var D=d.sizeMultiplier/f.sizeMultiplier;g.height*=D,g.depth*=D}return g}else throw new v("Got group of unknown type: '"+u.type+"'")};function Ii(M,u){var d=kn(["base"],M,u),f=kn(["strut"]);return f.style.height=d.height+d.depth+"em",f.style.verticalAlign=-d.depth+"em",d.children.unshift(f),d}function vi(M,u){var d=null;M.length===1&&M[0].type==="tag"&&(d=M[0].tag,M=M[0].body);for(var f=bn(M,u,!0),g=[],D=[],F=0;F<f.length;F++)if(D.push(f[F]),f[F].hasClass("mbin")||f[F].hasClass("mrel")||f[F].hasClass("allowbreak")){for(var se=!1;F<f.length-1&&f[F+1].hasClass("mspace")&&!f[F+1].hasClass("newline");)F++,D.push(f[F]),f[F].hasClass("nobreak")&&(se=!0);se||(g.push(Ii(D,u)),D=[])}else f[F].hasClass("newline")&&(D.pop(),D.length>0&&(g.push(Ii(D,u)),D=[]),g.push(f[F]));D.length>0&&g.push(Ii(D,u));var me;d&&(me=Ii(bn(d,u,!0)),me.classes=["tag"],g.push(me));var Le=kn(["katex-html"],g);if(Le.setAttribute("aria-hidden","true"),me){var je=me.children[0];je.style.height=Le.height+Le.depth+"em",je.style.verticalAlign=-Le.depth+"em"}return Le}function _i(M){return new Me(M)}var Bn=function(){function M(d,f){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=d,this.attributes={},this.children=f||[]}var u=M.prototype;return u.setAttribute=function(f,g){this.attributes[f]=g},u.getAttribute=function(f){return this.attributes[f]},u.toNode=function(){var f=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&f.setAttribute(g,this.attributes[g]);for(var D=0;D<this.children.length;D++)f.appendChild(this.children[D].toNode());return f},u.toMarkup=function(){var f="<"+this.type;for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(f+=" "+g+'="',f+=U.escape(this.attributes[g]),f+='"');f+=">";for(var D=0;D<this.children.length;D++)f+=this.children[D].toMarkup();return f+="</"+this.type+">",f},u.toText=function(){return this.children.map(function(f){return f.toText()}).join("")},M}(),kr=function(){function M(d){this.text=void 0,this.text=d}var u=M.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return U.escape(this.toText())},u.toText=function(){return this.text},M}(),ns=function(){function M(d){this.width=void 0,this.character=void 0,this.width=d,d>=.05555&&d<=.05556?this.character="\u200A":d>=.1666&&d<=.1667?this.character="\u2009":d>=.2222&&d<=.2223?this.character="\u2005":d>=.2777&&d<=.2778?this.character="\u2005\u200A":d>=-.05556&&d<=-.05555?this.character="\u200A\u2063":d>=-.1667&&d<=-.1666?this.character="\u2009\u2063":d>=-.2223&&d<=-.2222?this.character="\u205F\u2063":d>=-.2778&&d<=-.2777?this.character="\u2005\u2063":this.character=null}var u=M.prototype;return u.toNode=function(){if(this.character)return document.createTextNode(this.character);var f=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return f.setAttribute("width",this.width+"em"),f},u.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},u.toText=function(){return this.character?this.character:" "},M}(),Ht={MathNode:Bn,TextNode:kr,SpaceNode:ns,newDocumentFragment:_i},Nn=function(u,d,f){return Lt[d][u]&&Lt[d][u].replace&&u.charCodeAt(0)!==55349&&!(It.hasOwnProperty(u)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(u=Lt[d][u].replace),new Ht.TextNode(u)},Bi=function(u){return u.length===1?u[0]:new Ht.MathNode("mrow",u)},Ni=function(u,d){if(d.fontFamily==="texttt")return"monospace";if(d.fontFamily==="textsf")return d.fontShape==="textit"&&d.fontWeight==="textbf"?"sans-serif-bold-italic":d.fontShape==="textit"?"sans-serif-italic":d.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(d.fontShape==="textit"&&d.fontWeight==="textbf")return"bold-italic";if(d.fontShape==="textit")return"italic";if(d.fontWeight==="textbf")return"bold";var f=d.font;if(!f||f==="mathnormal")return null;var g=u.mode;if(f==="mathit")return"italic";if(f==="boldsymbol")return"bold-italic";if(f==="mathbf")return"bold";if(f==="mathbb")return"double-struck";if(f==="mathfrak")return"fraktur";if(f==="mathscr"||f==="mathcal")return"script";if(f==="mathsf")return"sans-serif";if(f==="mathtt")return"monospace";var D=u.text;if(U.contains(["\\imath","\\jmath"],D))return null;Lt[g][D]&&Lt[g][D].replace&&(D=Lt[g][D].replace);var F=ht.fontMap[f].fontName;return Pt(D,F,g)?ht.fontMap[f].variant:null},zn=function(u,d,f){if(u.length===1){var g=Fr(u[0],d);return f&&g instanceof Bn&&g.type==="mo"&&(g.setAttribute("lspace","0em"),g.setAttribute("rspace","0em")),[g]}for(var D=[],F,se=0;se<u.length;se++){var me=Fr(u[se],d);if(me instanceof Bn&&F instanceof Bn){if(me.type==="mtext"&&F.type==="mtext"&&me.getAttribute("mathvariant")===F.getAttribute("mathvariant")){var Le;(Le=F.children).push.apply(Le,me.children);continue}else if(me.type==="mn"&&F.type==="mn"){var je;(je=F.children).push.apply(je,me.children);continue}else if(me.type==="mi"&&me.children.length===1&&F.type==="mn"){var rt=me.children[0];if(rt instanceof kr&&rt.text==="."){var wt;(wt=F.children).push.apply(wt,me.children);continue}}else if(F.type==="mi"&&F.children.length===1){var Bt=F.children[0];if(Bt instanceof kr&&Bt.text==="\u0338"&&(me.type==="mo"||me.type==="mi"||me.type==="mn")){var Ut=me.children[0];Ut instanceof kr&&Ut.text.length>0&&(Ut.text=Ut.text.slice(0,1)+"\u0338"+Ut.text.slice(1),D.pop())}}}D.push(me),F=me}return D},oi=function(u,d,f){return Bi(zn(u,d,f))},Fr=function(u,d){if(!u)return new Ht.MathNode("mrow");if(xr[u.type]){var f=xr[u.type](u,d);return f}else throw new v("Got group of unknown type: '"+u.type+"'")};function ei(M,u,d,f){var g=zn(M,d),D;g.length===1&&g[0]instanceof Bn&&U.contains(["mrow","mtable"],g[0].type)?D=g[0]:D=new Ht.MathNode("mrow",g);var F=new Ht.MathNode("annotation",[new Ht.TextNode(u)]);F.setAttribute("encoding","application/x-tex");var se=new Ht.MathNode("semantics",[D,F]),me=new Ht.MathNode("math",[se]);me.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Le=f?"katex":"katex-mathml";return ht.makeSpan([Le],[me])}var $i=function(u){return new Zt({style:u.displayMode?S.DISPLAY:S.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},is=function(u,d){if(d.displayMode){var f=["katex-display"];d.leqno&&f.push("leqno"),d.fleqn&&f.push("fleqn"),u=ht.makeSpan(f,[u])}return u},Gn=function(u,d,f){var g=$i(f),D;if(f.output==="mathml")return ei(u,d,g,!0);if(f.output==="html"){var F=vi(u,g);D=ht.makeSpan(["katex"],[F])}else{var se=ei(u,d,g,!1),me=vi(u,g);D=ht.makeSpan(["katex"],[se,me])}return is(D,f)},Ui=function(u,d,f){var g=$i(f),D=vi(u,g),F=ht.makeSpan(["katex"],[D]);return is(F,f)},ss=Gn,Yn={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},di=function(u){var d=new Ht.MathNode("mo",[new Ht.TextNode(Yn[u.substr(1)])]);return d.setAttribute("stretchy","true"),d},li={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},zi=function(u){return u.type==="ordgroup"?u.body.length:1},qi=function(u,d){function f(){var me=4e5,Le=u.label.substr(1);if(U.contains(["widehat","widecheck","widetilde","utilde"],Le)){var je=u,rt=zi(je.base),wt,Bt,Ut;if(rt>5)Le==="widehat"||Le==="widecheck"?(wt=420,me=2364,Ut=.42,Bt=Le+"4"):(wt=312,me=2340,Ut=.34,Bt="tilde4");else{var Qt=[1,1,2,2,3,3][rt];Le==="widehat"||Le==="widecheck"?(me=[0,1062,2364,2364,2364][Qt],wt=[0,239,300,360,420][Qt],Ut=[0,.24,.3,.3,.36,.42][Qt],Bt=Le+Qt):(me=[0,600,1033,2339,2340][Qt],wt=[0,260,286,306,312][Qt],Ut=[0,.26,.286,.3,.306,.34][Qt],Bt="tilde"+Qt)}var yr=new ze(Bt),Er=new Ue([yr],{width:"100%",height:Ut+"em",viewBox:"0 0 "+me+" "+wt,preserveAspectRatio:"none"});return{span:ht.makeSvgSpan([],[Er],d),minWidth:0,height:Ut}}else{var Mr=[],qr=li[Le],An=qr[0],_n=qr[1],Tn=qr[2],Dn=Tn/1e3,En=An.length,Kn,In;if(En===1){var Ve=qr[3];Kn=["hide-tail"],In=[Ve]}else if(En===2)Kn=["halfarrow-left","halfarrow-right"],In=["xMinYMin","xMaxYMin"];else if(En===3)Kn=["brace-left","brace-center","brace-right"],In=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+En+" children.");for(var ri=0;ri<En;ri++){var Ai=new ze(An[ri]),pi=new Ue([Ai],{width:"400em",height:Dn+"em",viewBox:"0 0 "+me+" "+Tn,preserveAspectRatio:In[ri]+" slice"}),On=ht.makeSvgSpan([Kn[ri]],[pi],d);if(En===1)return{span:On,minWidth:_n,height:Dn};On.style.height=Dn+"em",Mr.push(On)}return{span:ht.makeSpan(["stretchy"],Mr,d),minWidth:_n,height:Dn}}}var g=f(),D=g.span,F=g.minWidth,se=g.height;return D.height=se,D.style.height=se+"em",F>0&&(D.style.minWidth=F+"em"),D},Xi=function(u,d,f,g){var D,F=u.height+u.depth+2*f;if(/fbox|color/.test(d)){if(D=ht.makeSpan(["stretchy",d],[],g),d==="fbox"){var se=g.color&&g.getColor();se&&(D.style.borderColor=se)}}else{var me=[];/^[bx]cancel$/.test(d)&&me.push(new qe({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(d)&&me.push(new qe({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Le=new Ue(me,{width:"100%",height:F+"em"});D=ht.makeSvgSpan([],[Le],g)}return D.height=F,D.style.height=F+"em",D},ti={encloseSpan:Xi,mathMLnode:di,svgSpan:qi},lr=function(u,d){var f,g,D=on(u,"supsub"),F;D?(g=Lr(D.base,"accent"),f=g.base,D.base=f,F=Rt(Kr(D,d)),D.base=g):(g=Lr(u,"accent"),f=g.base);var se=Kr(f,d.havingCrampedStyle()),me=g.isShifty&&U.isCharacterBox(f),Le=0;if(me){var je=U.getBaseElem(f),rt=Kr(je,d.havingCrampedStyle());Le=gt(rt).skew}var wt=Math.min(se.height,d.fontMetrics().xHeight),Bt;if(g.isStretchy)Bt=ti.svgSpan(g,d),Bt=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:se},{type:"elem",elem:Bt,wrapperClasses:["svg-align"],wrapperStyle:Le>0?{width:"calc(100% - "+2*Le+"em)",marginLeft:2*Le+"em"}:void 0}]},d);else{var Ut,Qt;g.label==="\\vec"?(Ut=ht.staticSvg("vec",d),Qt=ht.svgData.vec[1]):(Ut=ht.makeOrd({mode:g.mode,text:g.label},d,"textord"),Ut=gt(Ut),Ut.italic=0,Qt=Ut.width),Bt=ht.makeSpan(["accent-body"],[Ut]);var yr=g.label==="\\textcircled";yr&&(Bt.classes.push("accent-full"),wt=se.height);var Er=Le;yr||(Er-=Qt/2),Bt.style.left=Er+"em",g.label==="\\textcircled"&&(Bt.style.top=".2em"),Bt=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:se},{type:"kern",size:-wt},{type:"elem",elem:Bt}]},d)}var Mr=ht.makeSpan(["mord","accent"],[Bt],d);return F?(F.children[0]=Mr,F.height=Math.max(Mr.height,F.height),F.classes[0]="mord",F):Mr},Or=function(u,d){var f=u.isStretchy?ti.mathMLnode(u.label):new Ht.MathNode("mo",[Nn(u.label,u.mode)]),g=new Ht.MathNode("mover",[Fr(u.base,d),f]);return g.setAttribute("accent","true"),g},gn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(M){return"\\"+M}).join("|"));Gt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(u,d){var f=d[0],g=!gn.test(u.funcName),D=!g||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:g,isShifty:D,base:f}},htmlBuilder:lr,mathmlBuilder:Or}),Gt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,d){var f=d[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:f}},htmlBuilder:lr,mathmlBuilder:Or}),Gt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0];return{type:"accentUnder",mode:f.mode,label:g,base:D}},htmlBuilder:function(u,d){var f=Kr(u.base,d),g=ti.svgSpan(u,d),D=u.label==="\\utilde"?.12:0,F=ht.makeVList({positionType:"bottom",positionData:g.height+D,children:[{type:"elem",elem:g,wrapperClasses:["svg-align"]},{type:"kern",size:D},{type:"elem",elem:f}]},d);return ht.makeSpan(["mord","accentunder"],[F],d)},mathmlBuilder:function(u,d){var f=ti.mathMLnode(u.label),g=new Ht.MathNode("munder",[Fr(u.base,d),f]);return g.setAttribute("accentunder","true"),g}});var zr=function(u){var d=new Ht.MathNode("mpadded",u?[u]:[]);return d.setAttribute("width","+0.6em"),d.setAttribute("lspace","0.3em"),d};Gt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,d,f){var g=u.parser,D=u.funcName;return{type:"xArrow",mode:g.mode,label:D,body:d[0],below:f[0]}},htmlBuilder:function(u,d){var f=d.style,g=d.havingStyle(f.sup()),D=ht.wrapFragment(Kr(u.body,g,d),d);D.classes.push("x-arrow-pad");var F;u.below&&(g=d.havingStyle(f.sub()),F=ht.wrapFragment(Kr(u.below,g,d),d),F.classes.push("x-arrow-pad"));var se=ti.svgSpan(u,d),me=-d.fontMetrics().axisHeight+.5*se.height,Le=-d.fontMetrics().axisHeight-.5*se.height-.111;(D.depth>.25||u.label==="\\xleftequilibrium")&&(Le-=D.depth);var je;if(F){var rt=-d.fontMetrics().axisHeight+F.height+.5*se.height+.111;je=ht.makeVList({positionType:"individualShift",children:[{type:"elem",elem:D,shift:Le},{type:"elem",elem:se,shift:me},{type:"elem",elem:F,shift:rt}]},d)}else je=ht.makeVList({positionType:"individualShift",children:[{type:"elem",elem:D,shift:Le},{type:"elem",elem:se,shift:me}]},d);return je.children[0].children[0].children[1].classes.push("svg-align"),ht.makeSpan(["mrel","x-arrow"],[je],d)},mathmlBuilder:function(u,d){var f=ti.mathMLnode(u.label),g;if(u.body){var D=zr(Fr(u.body,d));if(u.below){var F=zr(Fr(u.below,d));g=new Ht.MathNode("munderover",[f,F,D])}else g=new Ht.MathNode("mover",[f,D])}else if(u.below){var se=zr(Fr(u.below,d));g=new Ht.MathNode("munder",[f,se])}else g=zr(),g=new Ht.MathNode("mover",[f,g]);return g}}),Gt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){for(var f=u.parser,g=Lr(d[0],"ordgroup"),D=g.body,F="",se=0;se<D.length;se++){var me=Lr(D[se],"textord");F+=me.text}var Le=parseInt(F);if(isNaN(Le))throw new v("\\@char has non-numeric argument "+F);return{type:"textord",mode:f.mode,text:String.fromCharCode(Le)}}});var Qr=function(u,d){var f=bn(u.body,d.withColor(u.color),!1);return ht.makeFragment(f)},yi=function(u,d){var f=zn(u.body,d.withColor(u.color)),g=new Ht.MathNode("mstyle",f);return g.setAttribute("mathcolor",u.color),g};Gt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,d){var f=u.parser,g=Lr(d[0],"color-token").color,D=d[1];return{type:"color",mode:f.mode,color:g,body:vn(D)}},htmlBuilder:Qr,mathmlBuilder:yi}),Gt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,d){var f=u.parser,g=u.breakOnTokenText,D=Lr(d[0],"color-token").color;f.gullet.macros.set("\\current@color",D);var F=f.parseExpression(!0,g);return{type:"color",mode:f.mode,color:D,body:F}},htmlBuilder:Qr,mathmlBuilder:yi}),Gt({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,d,f){var g=u.parser,D=u.funcName,F=f[0],se=D==="\\cr",me=!1;return se||(g.settings.displayMode&&g.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?me=!1:me=!0),{type:"cr",mode:g.mode,newLine:me,newRow:se,size:F&&Lr(F,"size").value}},htmlBuilder:function(u,d){if(u.newRow)throw new v("\\cr valid only within a tabular/array environment");var f=ht.makeSpan(["mspace"],[],d);return u.newLine&&(f.classes.push("newline"),u.size&&(f.style.marginTop=vr(u.size,d)+"em")),f},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mspace");return u.newLine&&(f.setAttribute("linebreak","newline"),u.size&&f.setAttribute("height",vr(u.size,d)+"em")),f}});var fi=function(u,d,f){var g=Lt.math[u]&&Lt.math[u].replace,D=Pt(g||u,d,f);if(!D)throw new Error("Unsupported symbol "+u+" and font size "+d+".");return D},bi=function(u,d,f,g){var D=f.havingBaseStyle(d),F=ht.makeSpan(g.concat(D.sizingClasses(f)),[u],f),se=D.sizeMultiplier/f.sizeMultiplier;return F.height*=se,F.depth*=se,F.maxFontSize=D.sizeMultiplier,F},Gi=function(u,d,f){var g=d.havingBaseStyle(f),D=(1-d.sizeMultiplier/g.sizeMultiplier)*d.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=D+"em",u.height-=D,u.depth+=D},Eo=function(u,d,f,g,D,F){var se=ht.makeSymbol(u,"Main-Regular",D,g),me=bi(se,d,g,F);return f&&Gi(me,g,d),me},xo=function(u,d,f,g){return ht.makeSymbol(u,"Size"+d+"-Regular",f,g)},Ta=function(u,d,f,g,D,F){var se=xo(u,d,D,g),me=bi(ht.makeSpan(["delimsizing","size"+d],[se],g),S.TEXT,g,F);return f&&Gi(me,g,S.TEXT),me},Ri=function(u,d,f){var g;d==="Size1-Regular"?g="delim-size1":g="delim-size4";var D=ht.makeSpan(["delimsizinginner",g],[ht.makeSpan([],[ht.makeSymbol(u,d,f)])]);return{type:"elem",elem:D}},Ei={type:"kern",size:-.005},Li=function(u,d,f,g,D,F){var se,me,Le,je;se=Le=je=u,me=null;var rt="Size1-Regular";u==="\\uparrow"?Le=je="\u23D0":u==="\\Uparrow"?Le=je="\u2016":u==="\\downarrow"?se=Le="\u23D0":u==="\\Downarrow"?se=Le="\u2016":u==="\\updownarrow"?(se="\\uparrow",Le="\u23D0",je="\\downarrow"):u==="\\Updownarrow"?(se="\\Uparrow",Le="\u2016",je="\\Downarrow"):u==="["||u==="\\lbrack"?(se="\u23A1",Le="\u23A2",je="\u23A3",rt="Size4-Regular"):u==="]"||u==="\\rbrack"?(se="\u23A4",Le="\u23A5",je="\u23A6",rt="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(Le=se="\u23A2",je="\u23A3",rt="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(se="\u23A1",Le=je="\u23A2",rt="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(Le=se="\u23A5",je="\u23A6",rt="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(se="\u23A4",Le=je="\u23A5",rt="Size4-Regular"):u==="("||u==="\\lparen"?(se="\u239B",Le="\u239C",je="\u239D",rt="Size4-Regular"):u===")"||u==="\\rparen"?(se="\u239E",Le="\u239F",je="\u23A0",rt="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(se="\u23A7",me="\u23A8",je="\u23A9",Le="\u23AA",rt="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(se="\u23AB",me="\u23AC",je="\u23AD",Le="\u23AA",rt="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(se="\u23A7",je="\u23A9",Le="\u23AA",rt="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(se="\u23AB",je="\u23AD",Le="\u23AA",rt="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(se="\u23A7",je="\u23AD",Le="\u23AA",rt="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(se="\u23AB",je="\u23A9",Le="\u23AA",rt="Size4-Regular");var wt=fi(se,rt,D),Bt=wt.height+wt.depth,Ut=fi(Le,rt,D),Qt=Ut.height+Ut.depth,yr=fi(je,rt,D),Er=yr.height+yr.depth,Mr=0,qr=1;if(me!==null){var An=fi(me,rt,D);Mr=An.height+An.depth,qr=2}var _n=Bt+Er+Mr,Tn=Math.max(0,Math.ceil((d-_n)/(qr*Qt))),Dn=_n+Tn*qr*Qt,En=g.fontMetrics().axisHeight;f&&(En*=g.sizeMultiplier);var Kn=Dn/2-En,In=(Tn+1)*.005-Qt,Ve=[];if(Ve.push(Ri(je,rt,D)),me===null)for(var ri=0;ri<Tn;ri++)Ve.push(Ei),Ve.push(Ri(Le,rt,D));else{for(var Ai=0;Ai<Tn;Ai++)Ve.push(Ei),Ve.push(Ri(Le,rt,D));Ve.push({type:"kern",size:In}),Ve.push(Ri(Le,rt,D)),Ve.push(Ei),Ve.push(Ri(me,rt,D));for(var pi=0;pi<Tn;pi++)Ve.push(Ei),Ve.push(Ri(Le,rt,D))}Ve.push({type:"kern",size:In}),Ve.push(Ri(Le,rt,D)),Ve.push(Ei),Ve.push(Ri(se,rt,D));var On=g.havingBaseStyle(S.TEXT),Ki=ht.makeVList({positionType:"bottom",positionData:Kn,children:Ve},On);return bi(ht.makeSpan(["delimsizing","mult"],[Ki],On),S.TEXT,g,F)},Zs=80,Is=.08,Ys=function(u,d,f,g,D){var F=tt(u,g,f),se=new ze(u,F),me=new Ue([se],{width:"400em",height:d+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return ht.makeSvgSpan(["hide-tail"],[me],D)},Da=function(u,d){var f=d.havingBaseSizing(),g=Qs("\\surd",u*f.sizeMultiplier,Xs,f),D=f.sizeMultiplier,F=Math.max(0,d.minRuleThickness-d.fontMetrics().sqrtRuleThickness),se,me=0,Le=0,je=0,rt;return g.type==="small"?(je=1e3+1e3*F+Zs,u<1?D=1:u<1.4&&(D=.7),me=(1+F+Is)/D,Le=(1+F)/D,se=Ys("sqrtMain",me,je,F,d),se.style.minWidth="0.853em",rt=.833/D):g.type==="large"?(je=(1e3+Zs)*Ls[g.size],Le=(Ls[g.size]+F)/D,me=(Ls[g.size]+F+Is)/D,se=Ys("sqrtSize"+g.size,me,je,F,d),se.style.minWidth="1.02em",rt=1/D):(me=u+F+Is,Le=u+F,je=Math.floor(1e3*u+F)+Zs,se=Ys("sqrtTall",me,je,F,d),se.style.minWidth="0.742em",rt=1.056),se.height=Le,se.style.height=me+"em",{span:se,advanceWidth:rt,ruleWidth:(d.fontMetrics().sqrtRuleThickness+F)*D}},qs=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],wo=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Rs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Ls=[0,1.2,1.8,2.4,3],xi=function(u,d,f,g,D){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),U.contains(qs,u)||U.contains(Rs,u))return Ta(u,d,!1,f,g,D);if(U.contains(wo,u))return Li(u,Ls[d],!1,f,g,D);throw new v("Illegal delimiter: '"+u+"'")},Ca=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],So=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"stack"}],Xs=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Ia=function(u){if(u.type==="small")return"Main-Regular";if(u.type==="large")return"Size"+u.size+"-Regular";if(u.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+u.type+"' here.")},Qs=function(u,d,f,g){for(var D=Math.min(2,3-g.style.size),F=D;F<f.length&&f[F].type!=="stack";F++){var se=fi(u,Ia(f[F]),"math"),me=se.height+se.depth;if(f[F].type==="small"){var Le=g.havingBaseStyle(f[F].style);me*=Le.sizeMultiplier}if(me>d)return f[F]}return f[f.length-1]},Js=function(u,d,f,g,D,F){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var se;U.contains(Rs,u)?se=Ca:U.contains(qs,u)?se=Xs:se=So;var me=Qs(u,d,se,g);return me.type==="small"?Eo(u,me.style,f,g,D,F):me.type==="large"?Ta(u,me.size,f,g,D,F):Li(u,d,f,g,D,F)},Ao=function(u,d,f,g,D,F){var se=g.fontMetrics().axisHeight*g.sizeMultiplier,me=901,Le=5/g.fontMetrics().ptPerEm,je=Math.max(d-se,f+se),rt=Math.max(je/500*me,2*je-Le);return Js(u,rt,!0,g,D,F)},wi={sqrtImage:Da,sizedDelim:xi,customSizedDelim:Js,leftRightDelim:Ao},ea={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Ra=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function ui(M,u){var d=Sn(M);if(d&&U.contains(Ra,d.text))return d;throw new v("Invalid delimiter: '"+(d?d.text:JSON.stringify(M))+"' after '"+u.funcName+"'",M)}Gt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(u,d){var f=ui(d[0],u);return{type:"delimsizing",mode:u.parser.mode,size:ea[u.funcName].size,mclass:ea[u.funcName].mclass,delim:f.text}},htmlBuilder:function(u,d){return u.delim==="."?ht.makeSpan([u.mclass]):wi.sizedDelim(u.delim,u.size,d,u.mode,[u.mclass])},mathmlBuilder:function(u){var d=[];u.delim!=="."&&d.push(Nn(u.delim,u.mode));var f=new Ht.MathNode("mo",d);return u.mclass==="mopen"||u.mclass==="mclose"?f.setAttribute("fence","true"):f.setAttribute("fence","false"),f}});function ta(M){if(!M.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Gt({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,d){var f=u.parser.gullet.macros.get("\\current@color");if(f&&typeof f!="string")throw new v("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:ui(d[0],u).text,color:f}}}),Gt({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,d){var f=ui(d[0],u),g=u.parser;++g.leftrightDepth;var D=g.parseExpression(!1);--g.leftrightDepth,g.expect("\\right",!1);var F=Lr(g.parseFunction(),"leftright-right");return{type:"leftright",mode:g.mode,body:D,left:f.text,right:F.delim,rightColor:F.color}},htmlBuilder:function(u,d){ta(u);for(var f=bn(u.body,d,!0,["mopen","mclose"]),g=0,D=0,F=!1,se=0;se<f.length;se++)f[se].isMiddle?F=!0:(g=Math.max(f[se].height,g),D=Math.max(f[se].depth,D));g*=d.sizeMultiplier,D*=d.sizeMultiplier;var me;if(u.left==="."?me=Zn(d,["mopen"]):me=wi.leftRightDelim(u.left,g,D,d,u.mode,["mopen"]),f.unshift(me),F)for(var Le=1;Le<f.length;Le++){var je=f[Le],rt=je.isMiddle;rt&&(f[Le]=wi.leftRightDelim(rt.delim,g,D,rt.options,u.mode,[]))}var wt;if(u.right===".")wt=Zn(d,["mclose"]);else{var Bt=u.rightColor?d.withColor(u.rightColor):d;wt=wi.leftRightDelim(u.right,g,D,Bt,u.mode,["mclose"])}return f.push(wt),ht.makeSpan(["minner"],f,d)},mathmlBuilder:function(u,d){ta(u);var f=zn(u.body,d);if(u.left!=="."){var g=new Ht.MathNode("mo",[Nn(u.left,u.mode)]);g.setAttribute("fence","true"),f.unshift(g)}if(u.right!=="."){var D=new Ht.MathNode("mo",[Nn(u.right,u.mode)]);D.setAttribute("fence","true"),u.rightColor&&D.setAttribute("mathcolor",u.rightColor),f.push(D)}return Bi(f)}}),Gt({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,d){var f=ui(d[0],u);if(!u.parser.leftrightDepth)throw new v("\\middle without preceding \\left",f);return{type:"middle",mode:u.parser.mode,delim:f.text}},htmlBuilder:function(u,d){var f;if(u.delim===".")f=Zn(d,[]);else{f=wi.sizedDelim(u.delim,1,d,u.mode,[]);var g={delim:u.delim,options:d};f.isMiddle=g}return f},mathmlBuilder:function(u,d){var f=u.delim==="\\vert"||u.delim==="|"?Nn("|","text"):Nn(u.delim,u.mode),g=new Ht.MathNode("mo",[f]);return g.setAttribute("fence","true"),g.setAttribute("lspace","0.05em"),g.setAttribute("rspace","0.05em"),g}});var gs=function(u,d){var f=ht.wrapFragment(Kr(u.body,d),d),g=u.label.substr(1),D=d.sizeMultiplier,F,se=0,me=U.isCharacterBox(u.body);if(g==="sout")F=ht.makeSpan(["stretchy","sout"]),F.height=d.fontMetrics().defaultRuleThickness/D,se=-.5*d.fontMetrics().xHeight;else{/cancel/.test(g)?me||f.classes.push("cancel-pad"):f.classes.push("boxpad");var Le=0,je=0;/box/.test(g)?(je=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness),Le=d.fontMetrics().fboxsep+(g==="colorbox"?0:je)):Le=me?.2:0,F=ti.encloseSpan(f,g,Le,d),/fbox|boxed|fcolorbox/.test(g)&&(F.style.borderStyle="solid",F.style.borderWidth=je+"em"),se=f.depth+Le,u.backgroundColor&&(F.style.backgroundColor=u.backgroundColor,u.borderColor&&(F.style.borderColor=u.borderColor))}var rt;return u.backgroundColor?rt=ht.makeVList({positionType:"individualShift",children:[{type:"elem",elem:F,shift:se},{type:"elem",elem:f,shift:0}]},d):rt=ht.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:F,shift:se,wrapperClasses:/cancel/.test(g)?["svg-align"]:[]}]},d),/cancel/.test(g)&&(rt.height=f.height,rt.depth=f.depth),/cancel/.test(g)&&!me?ht.makeSpan(["mord","cancel-lap"],[rt],d):ht.makeSpan(["mord"],[rt],d)},ks=function(u,d){var f=0,g=new Ht.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Fr(u.body,d)]);switch(u.label){case"\\cancel":g.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":g.setAttribute("notation","downdiagonalstrike");break;case"\\sout":g.setAttribute("notation","horizontalstrike");break;case"\\fbox":g.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=d.fontMetrics().fboxsep*d.fontMetrics().ptPerEm,g.setAttribute("width","+"+2*f+"pt"),g.setAttribute("height","+"+2*f+"pt"),g.setAttribute("lspace",f+"pt"),g.setAttribute("voffset",f+"pt"),u.label==="\\fcolorbox"){var D=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness);g.setAttribute("style","border: "+D+"em solid "+String(u.borderColor))}break;case"\\xcancel":g.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&g.setAttribute("mathbackground",u.backgroundColor),g};Gt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,d,f){var g=u.parser,D=u.funcName,F=Lr(d[0],"color-token").color,se=d[1];return{type:"enclose",mode:g.mode,label:D,backgroundColor:F,body:se}},htmlBuilder:gs,mathmlBuilder:ks}),Gt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,d,f){var g=u.parser,D=u.funcName,F=Lr(d[0],"color-token").color,se=Lr(d[1],"color-token").color,me=d[2];return{type:"enclose",mode:g.mode,label:D,backgroundColor:se,borderColor:F,body:me}},htmlBuilder:gs,mathmlBuilder:ks}),Gt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"enclose",mode:f.mode,label:"\\fbox",body:d[0]}}}),Gt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,d,f){var g=u.parser,D=u.funcName,F=d[0];return{type:"enclose",mode:g.mode,label:D,body:F}},htmlBuilder:gs,mathmlBuilder:ks});var La={};function ji(M){for(var u=M.type,d=M.names,f=M.props,g=M.handler,D=M.htmlBuilder,F=M.mathmlBuilder,se={type:u,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:g},me=0;me<d.length;++me)La[d[me]]=se;D&&(jr[u]=D),F&&(xr[u]=F)}function ka(M){var u=[];M.consumeSpaces();for(var d=M.fetch().text;d==="\\hline"||d==="\\hdashline";)M.consume(),u.push(d==="\\hdashline"),M.consumeSpaces(),d=M.fetch().text;return u}function Qi(M,u,d){var f=u.hskipBeforeAndAfter,g=u.addJot,D=u.cols,F=u.arraystretch,se=u.colSeparationType;if(M.gullet.beginGroup(),M.gullet.macros.set("\\\\","\\cr"),!F){var me=M.gullet.expandMacroAsText("\\arraystretch");if(me==null)F=1;else if(F=parseFloat(me),!F||F<0)throw new v("Invalid \\arraystretch: "+me)}M.gullet.beginGroup();var Le=[],je=[Le],rt=[],wt=[];for(wt.push(ka(M));;){var Bt=M.parseExpression(!1,"\\cr");M.gullet.endGroup(),M.gullet.beginGroup(),Bt={type:"ordgroup",mode:M.mode,body:Bt},d&&(Bt={type:"styling",mode:M.mode,style:d,body:[Bt]}),Le.push(Bt);var Ut=M.fetch().text;if(Ut==="&")M.consume();else if(Ut==="\\end"){Le.length===1&&Bt.type==="styling"&&Bt.body[0].body.length===0&&je.pop(),wt.length<je.length+1&&wt.push([]);break}else if(Ut==="\\cr"){var Qt=Lr(M.parseFunction(),"cr");rt.push(Qt.size),wt.push(ka(M)),Le=[],je.push(Le)}else throw new v("Expected & or \\\\ or \\cr or \\end",M.nextToken)}return M.gullet.endGroup(),M.gullet.endGroup(),{type:"array",mode:M.mode,addJot:g,arraystretch:F,body:je,cols:D,rowGaps:rt,hskipBeforeAndAfter:f,hLinesBeforeRow:wt,colSeparationType:se}}function Ps(M){return M.substr(0,1)==="d"?"display":"text"}var ki=function(u,d){var f,g,D=u.body.length,F=u.hLinesBeforeRow,se=0,me=new Array(D),Le=[],je=Math.max(d.fontMetrics().arrayRuleWidth,d.minRuleThickness),rt=1/d.fontMetrics().ptPerEm,wt=5*rt;if(u.colSeparationType&&u.colSeparationType==="small"){var Bt=d.havingStyle(S.SCRIPT).sizeMultiplier;wt=.2778*(Bt/d.sizeMultiplier)}var Ut=12*rt,Qt=3*rt,yr=u.arraystretch*Ut,Er=.7*yr,Mr=.3*yr,qr=0;function An(ws){for(var Gs=0;Gs<ws.length;++Gs)Gs>0&&(qr+=.25),Le.push({pos:qr,isDashed:ws[Gs]})}for(An(F[0]),f=0;f<u.body.length;++f){var _n=u.body[f],Tn=Er,Dn=Mr;se<_n.length&&(se=_n.length);var En=new Array(_n.length);for(g=0;g<_n.length;++g){var Kn=Kr(_n[g],d);Dn<Kn.depth&&(Dn=Kn.depth),Tn<Kn.height&&(Tn=Kn.height),En[g]=Kn}var In=u.rowGaps[f],Ve=0;In&&(Ve=vr(In,d),Ve>0&&(Ve+=Mr,Dn<Ve&&(Dn=Ve),Ve=0)),u.addJot&&(Dn+=Qt),En.height=Tn,En.depth=Dn,qr+=Tn,En.pos=qr,qr+=Dn+Ve,me[f]=En,An(F[f+1])}var ri=qr/2+d.fontMetrics().axisHeight,Ai=u.cols||[],pi=[],On,Ki;for(g=0,Ki=0;g<se||Ki<Ai.length;++g,++Ki){for(var Ti=Ai[Ki]||{},no=!0;Ti.type==="separator";){if(no||(On=ht.makeSpan(["arraycolsep"],[]),On.style.width=d.fontMetrics().doubleRuleSep+"em",pi.push(On)),Ti.separator==="|"||Ti.separator===":"){var Bo=Ti.separator==="|"?"solid":"dashed",hs=ht.makeSpan(["vertical-separator"],[],d);hs.style.height=qr+"em",hs.style.borderRightWidth=je+"em",hs.style.borderRightStyle=Bo,hs.style.margin="0 -"+je/2+"em",hs.style.verticalAlign=-(qr-ri)+"em",pi.push(hs)}else throw new v("Invalid separator type: "+Ti.separator);Ki++,Ti=Ai[Ki]||{},no=!1}if(!(g>=se)){var ds=void 0;(g>0||u.hskipBeforeAndAfter)&&(ds=U.deflt(Ti.pregap,wt),ds!==0&&(On=ht.makeSpan(["arraycolsep"],[]),On.style.width=ds+"em",pi.push(On)));var mi=[];for(f=0;f<D;++f){var fs=me[f],xs=fs[g];if(xs){var Us=fs.pos-ri;xs.depth=fs.depth,xs.height=fs.height,mi.push({type:"elem",elem:xs,shift:Us})}}mi=ht.makeVList({positionType:"individualShift",children:mi},d),mi=ht.makeSpan(["col-align-"+(Ti.align||"c")],[mi]),pi.push(mi),(g<se-1||u.hskipBeforeAndAfter)&&(ds=U.deflt(Ti.postgap,wt),ds!==0&&(On=ht.makeSpan(["arraycolsep"],[]),On.style.width=ds+"em",pi.push(On)))}}if(me=ht.makeSpan(["mtable"],pi),Le.length>0){for(var ni=ht.makeLineSpan("hline",d,je),No=ht.makeLineSpan("hdashline",d,je),zs=[{type:"elem",elem:me,shift:0}];Le.length>0;){var ba=Le.pop(),io=ba.pos-ri;ba.isDashed?zs.push({type:"elem",elem:No,shift:io}):zs.push({type:"elem",elem:ni,shift:io})}me=ht.makeVList({positionType:"individualShift",children:zs},d)}return ht.makeSpan(["mord"],[me],d)},ra={c:"center ",l:"left ",r:"right "},Pi=function(u,d){var f=new Ht.MathNode("mtable",u.body.map(function(qr){return new Ht.MathNode("mtr",qr.map(function(An){return new Ht.MathNode("mtd",[Fr(An,d)])}))})),g=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);f.setAttribute("rowspacing",g+"em");var D="",F="";if(u.cols){var se=u.cols,me="",Le=!1,je=0,rt=se.length;se[0].type==="separator"&&(D+="top ",je=1),se[se.length-1].type==="separator"&&(D+="bottom ",rt-=1);for(var wt=je;wt<rt;wt++)se[wt].type==="align"?(F+=ra[se[wt].align],Le&&(me+="none "),Le=!0):se[wt].type==="separator"&&Le&&(me+=se[wt].separator==="|"?"solid ":"dashed ",Le=!1);f.setAttribute("columnalign",F.trim()),/[sd]/.test(me)&&f.setAttribute("columnlines",me.trim())}if(u.colSeparationType==="align"){for(var Bt=u.cols||[],Ut="",Qt=1;Qt<Bt.length;Qt++)Ut+=Qt%2?"0em ":"1em ";f.setAttribute("columnspacing",Ut.trim())}else u.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var yr="",Er=u.hLinesBeforeRow;D+=Er[0].length>0?"left ":"",D+=Er[Er.length-1].length>0?"right ":"";for(var Mr=1;Mr<Er.length-1;Mr++)yr+=Er[Mr].length===0?"none ":Er[Mr][0]?"dashed ":"solid ";return/[sd]/.test(yr)&&f.setAttribute("rowlines",yr.trim()),D!==""&&(f=new Ht.MathNode("menclose",[f]),f.setAttribute("notation",D.trim())),u.arraystretch&&u.arraystretch<1&&(f=new Ht.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},na=function(u,d){var f=[],g=Qi(u.parser,{cols:f,addJot:!0},"display"),D,F=0,se={type:"ordgroup",mode:u.mode,body:[]},me=on(d[0],"ordgroup");if(me){for(var Le="",je=0;je<me.body.length;je++){var rt=Lr(me.body[je],"textord");Le+=rt.text}D=Number(Le),F=D*2}var wt=!F;g.body.forEach(function(yr){for(var Er=1;Er<yr.length;Er+=2){var Mr=Lr(yr[Er],"styling"),qr=Lr(Mr.body[0],"ordgroup");qr.body.unshift(se)}if(wt)F<yr.length&&(F=yr.length);else{var An=yr.length/2;if(D<An)throw new v("Too many math in a row: "+("expected "+D+", but got "+An),yr[0])}});for(var Bt=0;Bt<F;++Bt){var Ut="r",Qt=0;Bt%2===1?Ut="l":Bt>0&&wt&&(Qt=1),f[Bt]={type:"align",align:Ut,pregap:Qt,postgap:0}}return g.colSeparationType=wt?"align":"alignat",g};ji({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,d){var f=Sn(d[0]),g=f?[d[0]]:Lr(d[0],"ordgroup").body,D=g.map(function(se){var me=Ln(se),Le=me.text;if("lcr".indexOf(Le)!==-1)return{type:"align",align:Le};if(Le==="|")return{type:"separator",separator:"|"};if(Le===":")return{type:"separator",separator:":"};throw new v("Unknown column alignment: "+Le,se)}),F={cols:D,hskipBeforeAndAfter:!0};return Qi(u.parser,F,Ps(u.envName))},htmlBuilder:ki,mathmlBuilder:Pi}),ji({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var d={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],f={hskipBeforeAndAfter:!1},g=Qi(u.parser,f,Ps(u.envName));return d?{type:"leftright",mode:u.mode,body:[g],left:d[0],right:d[1],rightColor:void 0}:g},htmlBuilder:ki,mathmlBuilder:Pi}),ji({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var d={arraystretch:.5},f=Qi(u.parser,d,"script");return f.colSeparationType="small",f},htmlBuilder:ki,mathmlBuilder:Pi}),ji({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,d){var f=Sn(d[0]),g=f?[d[0]]:Lr(d[0],"ordgroup").body,D=g.map(function(se){var me=Ln(se),Le=me.text;if("lc".indexOf(Le)!==-1)return{type:"align",align:Le};throw new v("Unknown column alignment: "+Le,se)});if(D.length>1)throw new v("{subarray} can contain only one column");var F={cols:D,hskipBeforeAndAfter:!1,arraystretch:.5};if(F=Qi(u.parser,F,"script"),F.body[0].length>1)throw new v("{subarray} can contain only one column");return F},htmlBuilder:ki,mathmlBuilder:Pi}),ji({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var d={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},f=Qi(u.parser,d,Ps(u.envName));return{type:"leftright",mode:u.mode,body:[f],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:ki,mathmlBuilder:Pi}),ji({type:"array",names:["aligned"],props:{numArgs:0},handler:na,htmlBuilder:ki,mathmlBuilder:Pi}),ji({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var d={cols:[{type:"align",align:"c"}],addJot:!0};return Qi(u.parser,d,"display")},htmlBuilder:ki,mathmlBuilder:Pi}),ji({type:"array",names:["alignedat"],props:{numArgs:1},handler:na,htmlBuilder:ki,mathmlBuilder:Pi}),Gt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,d){throw new v(u.funcName+" valid only within array environment")}});var Pa=La,ia=Pa;Gt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0];if(D.type!=="ordgroup")throw new v("Invalid environment name",D);for(var F="",se=0;se<D.body.length;++se)F+=Lr(D.body[se],"textord").text;if(g==="\\begin"){if(!ia.hasOwnProperty(F))throw new v("No such environment: "+F,D);var me=ia[F],Le=f.parseArguments("\\begin{"+F+"}",me),je=Le.args,rt=Le.optArgs,wt={mode:f.mode,envName:F,parser:f},Bt=me.handler(wt,je,rt);f.expect("\\end",!1);var Ut=f.nextToken,Qt=Lr(f.parseFunction(),"environment");if(Qt.name!==F)throw new v("Mismatch: \\begin{"+F+"} matched by \\end{"+Qt.name+"}",Ut);return Bt}return{type:"environment",mode:f.mode,name:F,nameGroup:D}}});var Oa=ht.makeSpan;function Fa(M,u){var d=bn(M.body,u,!0);return Oa([M.mclass],d,u)}function sa(M,u){var d,f=zn(M.body,u);return M.mclass==="minner"?Ht.newDocumentFragment(f):(M.mclass==="mord"?M.isCharacterBox?(d=f[0],d.type="mi"):d=new Ht.MathNode("mi",f):(M.isCharacterBox?(d=f[0],d.type="mo"):d=new Ht.MathNode("mo",f),M.mclass==="mbin"?(d.attributes.lspace="0.22em",d.attributes.rspace="0.22em"):M.mclass==="mpunct"?(d.attributes.lspace="0em",d.attributes.rspace="0.17em"):(M.mclass==="mopen"||M.mclass==="mclose")&&(d.attributes.lspace="0em",d.attributes.rspace="0em")),d)}Gt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0];return{type:"mclass",mode:f.mode,mclass:"m"+g.substr(5),body:vn(D),isCharacterBox:U.isCharacterBox(D)}},htmlBuilder:Fa,mathmlBuilder:sa});var Ji=function(u){var d=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return d.type==="atom"&&(d.family==="bin"||d.family==="rel")?"m"+d.family:"mord"};Gt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,d){var f=u.parser;return{type:"mclass",mode:f.mode,mclass:Ji(d[0]),body:[d[1]],isCharacterBox:U.isCharacterBox(d[1])}}}),Gt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[1],F=d[0],se;g!=="\\stackrel"?se=Ji(D):se="mrel";var me={type:"op",mode:D.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:g!=="\\stackrel",body:vn(D)},Le={type:"supsub",mode:F.mode,base:me,sup:g==="\\underset"?null:F,sub:g==="\\underset"?F:null};return{type:"mclass",mode:f.mode,mclass:se,body:[Le],isCharacterBox:U.isCharacterBox(Le)}},htmlBuilder:Fa,mathmlBuilder:sa});var Ma=function(u,d){var f=u.font,g=d.withFont(f);return Kr(u.body,g)},aa=function(u,d){var f=u.font,g=d.withFont(f);return Fr(u.body,g)},oa={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Gt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0],F=g;return F in oa&&(F=oa[F]),{type:"font",mode:f.mode,font:F.slice(1),body:D}},htmlBuilder:Ma,mathmlBuilder:aa}),Gt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,d){var f=u.parser,g=d[0],D=U.isCharacterBox(g);return{type:"mclass",mode:f.mode,mclass:Ji(g),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:g}],isCharacterBox:D}}}),Gt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,D=u.breakOnTokenText,F=f.mode,se=f.parseExpression(!0,D),me="math"+g.slice(1);return{type:"font",mode:F,font:me,body:{type:"ordgroup",mode:f.mode,body:se}}},htmlBuilder:Ma,mathmlBuilder:aa});var Ba=function(u,d){var f=d;return u==="display"?f=f.id>=S.SCRIPT.id?f.text():S.DISPLAY:u==="text"&&f.size===S.DISPLAY.size?f=S.TEXT:u==="script"?f=S.SCRIPT:u==="scriptscript"&&(f=S.SCRIPTSCRIPT),f},Os=function(u,d){var f=Ba(u.size,d.style),g=f.fracNum(),D=f.fracDen(),F;F=d.havingStyle(g);var se=Kr(u.numer,F,d);if(u.continued){var me=8.5/d.fontMetrics().ptPerEm,Le=3.5/d.fontMetrics().ptPerEm;se.height=se.height<me?me:se.height,se.depth=se.depth<Le?Le:se.depth}F=d.havingStyle(D);var je=Kr(u.denom,F,d),rt,wt,Bt;u.hasBarLine?(u.barSize?(wt=vr(u.barSize,d),rt=ht.makeLineSpan("frac-line",d,wt)):rt=ht.makeLineSpan("frac-line",d),wt=rt.height,Bt=rt.height):(rt=null,wt=0,Bt=d.fontMetrics().defaultRuleThickness);var Ut,Qt,yr;f.size===S.DISPLAY.size||u.size==="display"?(Ut=d.fontMetrics().num1,wt>0?Qt=3*Bt:Qt=7*Bt,yr=d.fontMetrics().denom1):(wt>0?(Ut=d.fontMetrics().num2,Qt=Bt):(Ut=d.fontMetrics().num3,Qt=3*Bt),yr=d.fontMetrics().denom2);var Er;if(rt){var qr=d.fontMetrics().axisHeight;Ut-se.depth-(qr+.5*wt)<Qt&&(Ut+=Qt-(Ut-se.depth-(qr+.5*wt))),qr-.5*wt-(je.height-yr)<Qt&&(yr+=Qt-(qr-.5*wt-(je.height-yr)));var An=-(qr-.5*wt);Er=ht.makeVList({positionType:"individualShift",children:[{type:"elem",elem:je,shift:yr},{type:"elem",elem:rt,shift:An},{type:"elem",elem:se,shift:-Ut}]},d)}else{var Mr=Ut-se.depth-(je.height-yr);Mr<Qt&&(Ut+=.5*(Qt-Mr),yr+=.5*(Qt-Mr)),Er=ht.makeVList({positionType:"individualShift",children:[{type:"elem",elem:je,shift:yr},{type:"elem",elem:se,shift:-Ut}]},d)}F=d.havingStyle(f),Er.height*=F.sizeMultiplier/d.sizeMultiplier,Er.depth*=F.sizeMultiplier/d.sizeMultiplier;var _n;f.size===S.DISPLAY.size?_n=d.fontMetrics().delim1:_n=d.fontMetrics().delim2;var Tn,Dn;return u.leftDelim==null?Tn=Zn(d,["mopen"]):Tn=wi.customSizedDelim(u.leftDelim,_n,!0,d.havingStyle(f),u.mode,["mopen"]),u.continued?Dn=ht.makeSpan([]):u.rightDelim==null?Dn=Zn(d,["mclose"]):Dn=wi.customSizedDelim(u.rightDelim,_n,!0,d.havingStyle(f),u.mode,["mclose"]),ht.makeSpan(["mord"].concat(F.sizingClasses(d)),[Tn,ht.makeSpan(["mfrac"],[Er]),Dn],d)},as=function(u,d){var f=new Ht.MathNode("mfrac",[Fr(u.numer,d),Fr(u.denom,d)]);if(!u.hasBarLine)f.setAttribute("linethickness","0px");else if(u.barSize){var g=vr(u.barSize,d);f.setAttribute("linethickness",g+"em")}var D=Ba(u.size,d.style);if(D.size!==d.style.size){f=new Ht.MathNode("mstyle",[f]);var F=D.size===S.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",F),f.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var se=[];if(u.leftDelim!=null){var me=new Ht.MathNode("mo",[new Ht.TextNode(u.leftDelim.replace("\\",""))]);me.setAttribute("fence","true"),se.push(me)}if(se.push(f),u.rightDelim!=null){var Le=new Ht.MathNode("mo",[new Ht.TextNode(u.rightDelim.replace("\\",""))]);Le.setAttribute("fence","true"),se.push(Le)}return Bi(se)}return f};Gt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0],F=d[1],se,me=null,Le=null,je="auto";switch(g){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":se=!0;break;case"\\\\atopfrac":se=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":se=!1,me="(",Le=")";break;case"\\\\bracefrac":se=!1,me="\\{",Le="\\}";break;case"\\\\brackfrac":se=!1,me="[",Le="]";break;default:throw new Error("Unrecognized genfrac command")}switch(g){case"\\cfrac":case"\\dfrac":case"\\dbinom":je="display";break;case"\\tfrac":case"\\tbinom":je="text";break}return{type:"genfrac",mode:f.mode,continued:g==="\\cfrac",numer:D,denom:F,hasBarLine:se,leftDelim:me,rightDelim:Le,size:je,barSize:null}},htmlBuilder:Os,mathmlBuilder:as}),Gt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var d=u.parser,f=u.funcName,g=u.token,D;switch(f){case"\\over":D="\\frac";break;case"\\choose":D="\\binom";break;case"\\atop":D="\\\\atopfrac";break;case"\\brace":D="\\\\bracefrac";break;case"\\brack":D="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:d.mode,replaceWith:D,token:g}}});var jn=["display","text","script","scriptscript"],Vn=function(u){var d=null;return u.length>0&&(d=u,d=d==="."?null:d),d};Gt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,d){var f=u.parser,g=d[4],D=d[5],F=on(d[0],"atom");F&&(F=$n(d[0],"open"));var se=F?Vn(F.text):null,me=on(d[1],"atom");me&&(me=$n(d[1],"close"));var Le=me?Vn(me.text):null,je=Lr(d[2],"size"),rt,wt=null;je.isBlank?rt=!0:(wt=je.value,rt=wt.number>0);var Bt="auto",Ut=on(d[3],"ordgroup");if(Ut){if(Ut.body.length>0){var Qt=Lr(Ut.body[0],"textord");Bt=jn[Number(Qt.text)]}}else Ut=Lr(d[3],"textord"),Bt=jn[Number(Ut.text)];return{type:"genfrac",mode:f.mode,numer:g,denom:D,continued:!1,hasBarLine:rt,barSize:wt,leftDelim:se,rightDelim:Le,size:Bt}},htmlBuilder:Os,mathmlBuilder:as}),Gt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,d){var f=u.parser,g=u.funcName,D=u.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:Lr(d[0],"size").value,token:D}}}),Gt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0],F=q(Lr(d[1],"infix").size),se=d[2],me=F.number>0;return{type:"genfrac",mode:f.mode,numer:D,denom:se,continued:!1,hasBarLine:me,barSize:F,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Os,mathmlBuilder:as});var Na=function(u,d){var f=d.style,g,D,F=on(u,"supsub");F?(g=F.sup?Kr(F.sup,d.havingStyle(f.sup()),d):Kr(F.sub,d.havingStyle(f.sub()),d),D=Lr(F.base,"horizBrace")):D=Lr(u,"horizBrace");var se=Kr(D.base,d.havingBaseStyle(S.DISPLAY)),me=ti.svgSpan(D,d),Le;if(D.isOver?(Le=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:se},{type:"kern",size:.1},{type:"elem",elem:me}]},d),Le.children[0].children[0].children[1].classes.push("svg-align")):(Le=ht.makeVList({positionType:"bottom",positionData:se.depth+.1+me.height,children:[{type:"elem",elem:me},{type:"kern",size:.1},{type:"elem",elem:se}]},d),Le.children[0].children[0].children[0].classes.push("svg-align")),g){var je=ht.makeSpan(["mord",D.isOver?"mover":"munder"],[Le],d);D.isOver?Le=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:je},{type:"kern",size:.2},{type:"elem",elem:g}]},d):Le=ht.makeVList({positionType:"bottom",positionData:je.depth+.2+g.height+g.depth,children:[{type:"elem",elem:g},{type:"kern",size:.2},{type:"elem",elem:je}]},d)}return ht.makeSpan(["mord",D.isOver?"mover":"munder"],[Le],d)},kt=function(u,d){var f=ti.mathMLnode(u.label);return new Ht.MathNode(u.isOver?"mover":"munder",[Fr(u.base,d),f])};Gt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName;return{type:"horizBrace",mode:f.mode,label:g,isOver:/^\\over/.test(g),base:d[0]}},htmlBuilder:Na,mathmlBuilder:kt}),Gt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[1],D=Lr(d[0],"url").url;return f.settings.isTrusted({command:"\\href",url:D})?{type:"href",mode:f.mode,href:D,body:vn(g)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,d){var f=bn(u.body,d,!1);return ht.makeAnchor(u.href,[],f,d)},mathmlBuilder:function(u,d){var f=oi(u.body,d);return f instanceof Bn||(f=new Bn("mrow",[f])),f.setAttribute("href",u.href),f}}),Gt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=Lr(d[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:g}))return f.formatUnsupportedCmd("\\url");for(var D=[],F=0;F<g.length;F++){var se=g[F];se==="~"&&(se="\\textasciitilde"),D.push({type:"textord",mode:"text",text:se})}var me={type:"text",mode:f.mode,font:"\\texttt",body:D};return{type:"href",mode:f.mode,href:g,body:vn(me)}}}),Gt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"htmlmathml",mode:f.mode,html:vn(d[0]),mathml:vn(d[1])}},htmlBuilder:function(u,d){var f=bn(u.html,d,!1);return ht.makeFragment(f)},mathmlBuilder:function(u,d){return oi(u.mathml,d)}});var vs=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var d=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!d)throw new v("Invalid size: '"+u+"' in \\includegraphics");var f={number:+(d[1]+d[2]),unit:d[3]};if(!hr(f))throw new v("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};Gt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,d,f){var g=u.parser,D={number:0,unit:"em"},F={number:.9,unit:"em"},se={number:0,unit:"em"},me="";if(f[0])for(var Le=Lr(f[0],"raw").string,je=Le.split(","),rt=0;rt<je.length;rt++){var wt=je[rt].split("=");if(wt.length===2){var Bt=wt[1].trim();switch(wt[0].trim()){case"alt":me=Bt;break;case"width":D=vs(Bt);break;case"height":F=vs(Bt);break;case"totalheight":se=vs(Bt);break;default:throw new v("Invalid key: '"+wt[0]+"' in \\includegraphics.")}}}var Ut=Lr(d[0],"url").url;return me===""&&(me=Ut,me=me.replace(/^.*[\\/]/,""),me=me.substring(0,me.lastIndexOf("."))),g.settings.isTrusted({command:"\\includegraphics",url:Ut})?{type:"includegraphics",mode:g.mode,alt:me,width:D,height:F,totalheight:se,src:Ut}:g.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,d){var f=vr(u.height,d),g=0;u.totalheight.number>0&&(g=vr(u.totalheight,d)-f,g=Number(g.toFixed(2)));var D=0;u.width.number>0&&(D=vr(u.width,d));var F={height:f+g+"em"};D>0&&(F.width=D+"em"),g>0&&(F.verticalAlign=-g+"em");var se=new nt(u.src,u.alt,F);return se.height=f,se.depth=g,se},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mglyph",[]);f.setAttribute("alt",u.alt);var g=vr(u.height,d),D=0;if(u.totalheight.number>0&&(D=vr(u.totalheight,d)-g,D=D.toFixed(2),f.setAttribute("valign","-"+D+"em")),f.setAttribute("height",g+D+"em"),u.width.number>0){var F=vr(u.width,d);f.setAttribute("width",F+"em")}return f.setAttribute("src",u.src),f}}),Gt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,D=Lr(d[0],"size");if(f.settings.strict){var F=g[1]==="m",se=D.value.unit==="mu";F?(se||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" supports only mu units, "+("not "+D.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" works only in math mode")):se&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:D.value}},htmlBuilder:function(u,d){return ht.makeGlue(u.dimension,d)},mathmlBuilder:function(u,d){var f=vr(u.dimension,d);return new Ht.SpaceNode(f)}}),Gt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0];return{type:"lap",mode:f.mode,alignment:g.slice(5),body:D}},htmlBuilder:function(u,d){var f;u.alignment==="clap"?(f=ht.makeSpan([],[Kr(u.body,d)]),f=ht.makeSpan(["inner"],[f],d)):f=ht.makeSpan(["inner"],[Kr(u.body,d)]);var g=ht.makeSpan(["fix"],[]),D=ht.makeSpan([u.alignment],[f,g],d),F=ht.makeSpan(["strut"]);return F.style.height=D.height+D.depth+"em",F.style.verticalAlign=-D.depth+"em",D.children.unshift(F),D=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:D}]},d),ht.makeSpan(["mord"],[D],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mpadded",[Fr(u.body,d)]);if(u.alignment!=="rlap"){var g=u.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",g+"width")}return f.setAttribute("width","0px"),f}}),Gt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,d){var f=u.funcName,g=u.parser,D=g.mode;g.switchMode("math");var F=f==="\\("?"\\)":"$",se=g.parseExpression(!1,F);return g.expect(F),g.switchMode(D),{type:"styling",mode:g.mode,style:"text",body:se}}}),Gt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,d){throw new v("Mismatched "+u.funcName)}});var la=function(u,d){switch(d.style.size){case S.DISPLAY.size:return u.display;case S.TEXT.size:return u.text;case S.SCRIPT.size:return u.script;case S.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};Gt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,d){var f=u.parser;return{type:"mathchoice",mode:f.mode,display:vn(d[0]),text:vn(d[1]),script:vn(d[2]),scriptscript:vn(d[3])}},htmlBuilder:function(u,d){var f=la(u,d),g=bn(f,d,!1);return ht.makeFragment(g)},mathmlBuilder:function(u,d){var f=la(u,d);return oi(f,d)}});var ua=function(u,d,f,g,D,F,se){u=ht.makeSpan([],[u]);var me,Le;if(d){var je=Kr(d,g.havingStyle(D.sup()),g);Le={elem:je,kern:Math.max(g.fontMetrics().bigOpSpacing1,g.fontMetrics().bigOpSpacing3-je.depth)}}if(f){var rt=Kr(f,g.havingStyle(D.sub()),g);me={elem:rt,kern:Math.max(g.fontMetrics().bigOpSpacing2,g.fontMetrics().bigOpSpacing4-rt.height)}}var wt;if(Le&&me){var Bt=g.fontMetrics().bigOpSpacing5+me.elem.height+me.elem.depth+me.kern+u.depth+se;wt=ht.makeVList({positionType:"bottom",positionData:Bt,children:[{type:"kern",size:g.fontMetrics().bigOpSpacing5},{type:"elem",elem:me.elem,marginLeft:-F+"em"},{type:"kern",size:me.kern},{type:"elem",elem:u},{type:"kern",size:Le.kern},{type:"elem",elem:Le.elem,marginLeft:F+"em"},{type:"kern",size:g.fontMetrics().bigOpSpacing5}]},g)}else if(me){var Ut=u.height-se;wt=ht.makeVList({positionType:"top",positionData:Ut,children:[{type:"kern",size:g.fontMetrics().bigOpSpacing5},{type:"elem",elem:me.elem,marginLeft:-F+"em"},{type:"kern",size:me.kern},{type:"elem",elem:u}]},g)}else if(Le){var Qt=u.depth+se;wt=ht.makeVList({positionType:"bottom",positionData:Qt,children:[{type:"elem",elem:u},{type:"kern",size:Le.kern},{type:"elem",elem:Le.elem,marginLeft:F+"em"},{type:"kern",size:g.fontMetrics().bigOpSpacing5}]},g)}else return u;return ht.makeSpan(["mop","op-limits"],[wt],g)},$a=["\\smallint"],Hi=function(u,d){var f,g,D=!1,F,se=on(u,"supsub");se?(f=se.sup,g=se.sub,F=Lr(se.base,"op"),D=!0):F=Lr(u,"op");var me=d.style,Le=!1;me.size===S.DISPLAY.size&&F.symbol&&!U.contains($a,F.name)&&(Le=!0);var je;if(F.symbol){var rt=Le?"Size2-Regular":"Size1-Regular",wt="";if((F.name==="\\oiint"||F.name==="\\oiiint")&&(wt=F.name.substr(1),F.name=wt==="oiint"?"\\iint":"\\iiint"),je=ht.makeSymbol(F.name,rt,"math",d,["mop","op-symbol",Le?"large-op":"small-op"]),wt.length>0){var Bt=je.italic,Ut=ht.staticSvg(wt+"Size"+(Le?"2":"1"),d);je=ht.makeVList({positionType:"individualShift",children:[{type:"elem",elem:je,shift:0},{type:"elem",elem:Ut,shift:Le?.08:0}]},d),F.name="\\"+wt,je.classes.unshift("mop"),je.italic=Bt}}else if(F.body){var Qt=bn(F.body,d,!0);Qt.length===1&&Qt[0]instanceof Ie?(je=Qt[0],je.classes[0]="mop"):je=ht.makeSpan(["mop"],ht.tryCombineChars(Qt),d)}else{for(var yr=[],Er=1;Er<F.name.length;Er++)yr.push(ht.mathsym(F.name[Er],F.mode,d));je=ht.makeSpan(["mop"],yr,d)}var Mr=0,qr=0;return(je instanceof Ie||F.name==="\\oiint"||F.name==="\\oiiint")&&!F.suppressBaseShift&&(Mr=(je.height-je.depth)/2-d.fontMetrics().axisHeight,qr=je.italic),D?ua(je,f,g,d,me,qr,Mr):(Mr&&(je.style.position="relative",je.style.top=Mr+"em"),je)},os=function(u,d){var f;if(u.symbol)f=new Bn("mo",[Nn(u.name,u.mode)]),U.contains($a,u.name)&&f.setAttribute("largeop","false");else if(u.body)f=new Bn("mo",zn(u.body,d));else{f=new Bn("mi",[new kr(u.name.slice(1))]);var g=new Bn("mo",[Nn("\u2061","text")]);u.parentIsSupSub?f=new Bn("mo",[f,g]):f=_i([f,g])}return f},To={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Gt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:function(u,d){var f=u.parser,g=u.funcName,D=g;return D.length===1&&(D=To[D]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:D}},htmlBuilder:Hi,mathmlBuilder:os}),Gt({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=d[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:vn(g)}},htmlBuilder:Hi,mathmlBuilder:os});var Do={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Gt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(u){var d=u.parser,f=u.funcName;return{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:Hi,mathmlBuilder:os}),Gt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var d=u.parser,f=u.funcName;return{type:"op",mode:d.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:Hi,mathmlBuilder:os}),Gt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var d=u.parser,f=u.funcName,g=f;return g.length===1&&(g=Do[g]),{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:g}},htmlBuilder:Hi,mathmlBuilder:os});var Fs=function(u,d){var f,g,D=!1,F,se=on(u,"supsub");se?(f=se.sup,g=se.sub,F=Lr(se.base,"operatorname"),D=!0):F=Lr(u,"operatorname");var me;if(F.body.length>0){for(var Le=F.body.map(function(Bt){var Ut=Bt.text;return typeof Ut=="string"?{type:"textord",mode:Bt.mode,text:Ut}:Bt}),je=bn(Le,d.withFont("mathrm"),!0),rt=0;rt<je.length;rt++){var wt=je[rt];wt instanceof Ie&&(wt.text=wt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}me=ht.makeSpan(["mop"],je,d)}else me=ht.makeSpan(["mop"],[],d);return D?ua(me,f,g,d,d.style,0,0):me},_s=function(u,d){for(var f=zn(u.body,d.withFont("mathrm")),g=!0,D=0;D<f.length;D++){var F=f[D];if(!(F instanceof Ht.SpaceNode))if(F instanceof Ht.MathNode)switch(F.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var se=F.children[0];F.children.length===1&&se instanceof Ht.TextNode?se.text=se.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):g=!1;break}default:g=!1}else g=!1}if(g){var me=f.map(function(rt){return rt.toText()}).join("");f=[new Ht.TextNode(me)]}var Le=new Ht.MathNode("mi",f);Le.setAttribute("mathvariant","normal");var je=new Ht.MathNode("mo",[Nn("\u2061","text")]);return u.parentIsSupSub?new Ht.MathNode("mo",[Le,je]):Ht.newDocumentFragment([Le,je])};Gt({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0];return{type:"operatorname",mode:f.mode,body:vn(D),alwaysHandleSupSub:g==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:Fs,mathmlBuilder:_s}),fn({type:"ordgroup",htmlBuilder:function(u,d){return u.semisimple?ht.makeFragment(bn(u.body,d,!1)):ht.makeSpan(["mord"],bn(u.body,d,!0),d)},mathmlBuilder:function(u,d){return oi(u.body,d,!0)}}),Gt({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=d[0];return{type:"overline",mode:f.mode,body:g}},htmlBuilder:function(u,d){var f=Kr(u.body,d.havingCrampedStyle()),g=ht.makeLineSpan("overline-line",d),D=d.fontMetrics().defaultRuleThickness,F=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*D},{type:"elem",elem:g},{type:"kern",size:D}]},d);return ht.makeSpan(["mord","overline"],[F],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mo",[new Ht.TextNode("\u203E")]);f.setAttribute("stretchy","true");var g=new Ht.MathNode("mover",[Fr(u.body,d),f]);return g.setAttribute("accent","true"),g}}),Gt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[0];return{type:"phantom",mode:f.mode,body:vn(g)}},htmlBuilder:function(u,d){var f=bn(u.body,d.withPhantom(),!1);return ht.makeFragment(f)},mathmlBuilder:function(u,d){var f=zn(u.body,d);return new Ht.MathNode("mphantom",f)}}),Gt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[0];return{type:"hphantom",mode:f.mode,body:g}},htmlBuilder:function(u,d){var f=ht.makeSpan([],[Kr(u.body,d.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var g=0;g<f.children.length;g++)f.children[g].height=0,f.children[g].depth=0;return f=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d),ht.makeSpan(["mord"],[f],d)},mathmlBuilder:function(u,d){var f=zn(vn(u.body),d),g=new Ht.MathNode("mphantom",f),D=new Ht.MathNode("mpadded",[g]);return D.setAttribute("height","0px"),D.setAttribute("depth","0px"),D}}),Gt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[0];return{type:"vphantom",mode:f.mode,body:g}},htmlBuilder:function(u,d){var f=ht.makeSpan(["inner"],[Kr(u.body,d.withPhantom())]),g=ht.makeSpan(["fix"],[]);return ht.makeSpan(["mord","rlap"],[f,g],d)},mathmlBuilder:function(u,d){var f=zn(vn(u.body),d),g=new Ht.MathNode("mphantom",f),D=new Ht.MathNode("mpadded",[g]);return D.setAttribute("width","0px"),D}}),Gt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=Lr(d[0],"size").value,D=d[1];return{type:"raisebox",mode:f.mode,dy:g,body:D}},htmlBuilder:function(u,d){var f=Kr(u.body,d),g=vr(u.dy,d);return ht.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mpadded",[Fr(u.body,d)]),g=u.dy.number+u.dy.unit;return f.setAttribute("voffset",g),f}}),Gt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,d,f){var g=u.parser,D=f[0],F=Lr(d[0],"size"),se=Lr(d[1],"size");return{type:"rule",mode:g.mode,shift:D&&Lr(D,"size").value,width:F.value,height:se.value}},htmlBuilder:function(u,d){var f=ht.makeSpan(["mord","rule"],[],d),g=vr(u.width,d),D=vr(u.height,d),F=u.shift?vr(u.shift,d):0;return f.style.borderRightWidth=g+"em",f.style.borderTopWidth=D+"em",f.style.bottom=F+"em",f.width=g,f.height=D+F,f.depth=-F,f.maxFontSize=D*1.125*d.sizeMultiplier,f},mathmlBuilder:function(u,d){var f=vr(u.width,d),g=vr(u.height,d),D=u.shift?vr(u.shift,d):0,F=d.color&&d.getColor()||"black",se=new Ht.MathNode("mspace");se.setAttribute("mathbackground",F),se.setAttribute("width",f+"em"),se.setAttribute("height",g+"em");var me=new Ht.MathNode("mpadded",[se]);return D>=0?me.setAttribute("height","+"+D+"em"):(me.setAttribute("height",D+"em"),me.setAttribute("depth","+"+-D+"em")),me.setAttribute("voffset",D+"em"),me}});function es(M,u,d){for(var f=bn(M,u,!1),g=u.sizeMultiplier/d.sizeMultiplier,D=0;D<f.length;D++){var F=f[D].classes.indexOf("sizing");F<0?Array.prototype.push.apply(f[D].classes,u.sizingClasses(d)):f[D].classes[F+1]==="reset-size"+u.size&&(f[D].classes[F+1]="reset-size"+d.size),f[D].height*=g,f[D].depth*=g}return ht.makeFragment(f)}var Ua=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Co=function(u,d){var f=d.havingSize(u.size);return es(u.body,f,d)};Gt({type:"sizing",names:Ua,props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.breakOnTokenText,g=u.funcName,D=u.parser,F=D.parseExpression(!1,f);return{type:"sizing",mode:D.mode,size:Ua.indexOf(g)+1,body:F}},htmlBuilder:Co,mathmlBuilder:function(u,d){var f=d.havingSize(u.size),g=zn(u.body,f),D=new Ht.MathNode("mstyle",g);return D.setAttribute("mathsize",f.sizeMultiplier+"em"),D}}),Gt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,d,f){var g=u.parser,D=!1,F=!1,se=f[0]&&Lr(f[0],"ordgroup");if(se)for(var me="",Le=0;Le<se.body.length;++Le){var je=se.body[Le];if(me=je.text,me==="t")D=!0;else if(me==="b")F=!0;else{D=!1,F=!1;break}}else D=!0,F=!0;var rt=d[0];return{type:"smash",mode:g.mode,body:rt,smashHeight:D,smashDepth:F}},htmlBuilder:function(u,d){var f=ht.makeSpan([],[Kr(u.body,d)]);if(!u.smashHeight&&!u.smashDepth)return f;if(u.smashHeight&&(f.height=0,f.children))for(var g=0;g<f.children.length;g++)f.children[g].height=0;if(u.smashDepth&&(f.depth=0,f.children))for(var D=0;D<f.children.length;D++)f.children[D].depth=0;var F=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d);return ht.makeSpan(["mord"],[F],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mpadded",[Fr(u.body,d)]);return u.smashHeight&&f.setAttribute("height","0px"),u.smashDepth&&f.setAttribute("depth","0px"),f}}),Gt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,d,f){var g=u.parser,D=f[0],F=d[0];return{type:"sqrt",mode:g.mode,body:F,index:D}},htmlBuilder:function(u,d){var f=Kr(u.body,d.havingCrampedStyle());f.height===0&&(f.height=d.fontMetrics().xHeight),f=ht.wrapFragment(f,d);var g=d.fontMetrics(),D=g.defaultRuleThickness,F=D;d.style.id<S.TEXT.id&&(F=d.fontMetrics().xHeight);var se=D+F/4,me=f.height+f.depth+se+D,Le=wi.sqrtImage(me,d),je=Le.span,rt=Le.ruleWidth,wt=Le.advanceWidth,Bt=je.height-rt;Bt>f.height+f.depth+se&&(se=(se+Bt-f.height-f.depth)/2);var Ut=je.height-f.height-se-rt;f.style.paddingLeft=wt+"em";var Qt=ht.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+Ut)},{type:"elem",elem:je},{type:"kern",size:rt}]},d);if(u.index){var yr=d.havingStyle(S.SCRIPTSCRIPT),Er=Kr(u.index,yr,d),Mr=.6*(Qt.height-Qt.depth),qr=ht.makeVList({positionType:"shift",positionData:-Mr,children:[{type:"elem",elem:Er}]},d),An=ht.makeSpan(["root"],[qr]);return ht.makeSpan(["mord","sqrt"],[An,Qt],d)}else return ht.makeSpan(["mord","sqrt"],[Qt],d)},mathmlBuilder:function(u,d){var f=u.body,g=u.index;return g?new Ht.MathNode("mroot",[Fr(f,d),Fr(g,d)]):new Ht.MathNode("msqrt",[Fr(f,d)])}});var za={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT};Gt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.breakOnTokenText,g=u.funcName,D=u.parser,F=D.parseExpression(!0,f),se=g.slice(1,g.length-5);return{type:"styling",mode:D.mode,style:se,body:F}},htmlBuilder:function(u,d){var f=za[u.style],g=d.havingStyle(f).withFont("");return es(u.body,g,d)},mathmlBuilder:function(u,d){var f=za[u.style],g=d.havingStyle(f),D=zn(u.body,g),F=new Ht.MathNode("mstyle",D),se={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},me=se[u.style];return F.setAttribute("scriptlevel",me[0]),F.setAttribute("displaystyle",me[1]),F}});var Io=function(u,d){var f=u.base;if(f)if(f.type==="op"){var g=f.limits&&(d.style.size===S.DISPLAY.size||f.alwaysHandleSupSub);return g?Hi:null}else if(f.type==="operatorname"){var D=f.alwaysHandleSupSub&&(d.style.size===S.DISPLAY.size||f.limits);return D?Fs:null}else{if(f.type==="accent")return U.isCharacterBox(f.base)?lr:null;if(f.type==="horizBrace"){var F=!u.sub;return F===f.isOver?Na:null}else return null}else return null};fn({type:"supsub",htmlBuilder:function(u,d){var f=Io(u,d);if(f)return f(u,d);var g=u.base,D=u.sup,F=u.sub,se=Kr(g,d),me,Le,je=d.fontMetrics(),rt=0,wt=0,Bt=g&&U.isCharacterBox(g);if(D){var Ut=d.havingStyle(d.style.sup());me=Kr(D,Ut,d),Bt||(rt=se.height-Ut.fontMetrics().supDrop*Ut.sizeMultiplier/d.sizeMultiplier)}if(F){var Qt=d.havingStyle(d.style.sub());Le=Kr(F,Qt,d),Bt||(wt=se.depth+Qt.fontMetrics().subDrop*Qt.sizeMultiplier/d.sizeMultiplier)}var yr;d.style===S.DISPLAY?yr=je.sup1:d.style.cramped?yr=je.sup3:yr=je.sup2;var Er=d.sizeMultiplier,Mr=.5/je.ptPerEm/Er+"em",qr=null;if(Le){var An=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(se instanceof Ie||An)&&(qr=-se.italic+"em")}var _n;if(me&&Le){rt=Math.max(rt,yr,me.depth+.25*je.xHeight),wt=Math.max(wt,je.sub2);var Tn=je.defaultRuleThickness,Dn=4*Tn;if(rt-me.depth-(Le.height-wt)<Dn){wt=Dn-(rt-me.depth)+Le.height;var En=.8*je.xHeight-(rt-me.depth);En>0&&(rt+=En,wt-=En)}var Kn=[{type:"elem",elem:Le,shift:wt,marginRight:Mr,marginLeft:qr},{type:"elem",elem:me,shift:-rt,marginRight:Mr}];_n=ht.makeVList({positionType:"individualShift",children:Kn},d)}else if(Le){wt=Math.max(wt,je.sub1,Le.height-.8*je.xHeight);var In=[{type:"elem",elem:Le,marginLeft:qr,marginRight:Mr}];_n=ht.makeVList({positionType:"shift",positionData:wt,children:In},d)}else if(me)rt=Math.max(rt,yr,me.depth+.25*je.xHeight),_n=ht.makeVList({positionType:"shift",positionData:-rt,children:[{type:"elem",elem:me,marginRight:Mr}]},d);else throw new Error("supsub must have either sup or sub.");var Ve=Jn(se,"right")||"mord";return ht.makeSpan([Ve],[se,ht.makeSpan(["msupsub"],[_n])],d)},mathmlBuilder:function(u,d){var f=!1,g,D,F=on(u.base,"horizBrace");F&&(D=!!u.sup,D===F.isOver&&(f=!0,g=F.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var se=[Fr(u.base,d)];u.sub&&se.push(Fr(u.sub,d)),u.sup&&se.push(Fr(u.sup,d));var me;if(f)me=g?"mover":"munder";else if(u.sub)if(u.sup){var rt=u.base;rt&&rt.type==="op"&&rt.limits&&d.style===S.DISPLAY||rt&&rt.type==="operatorname"&&rt.alwaysHandleSupSub&&(d.style===S.DISPLAY||rt.limits)?me="munderover":me="msubsup"}else{var je=u.base;je&&je.type==="op"&&je.limits&&(d.style===S.DISPLAY||je.alwaysHandleSupSub)||je&&je.type==="operatorname"&&je.alwaysHandleSupSub&&(je.limits||d.style===S.DISPLAY)?me="munder":me="msub"}else{var Le=u.base;Le&&Le.type==="op"&&Le.limits&&(d.style===S.DISPLAY||Le.alwaysHandleSupSub)||Le&&Le.type==="operatorname"&&Le.alwaysHandleSupSub&&(Le.limits||d.style===S.DISPLAY)?me="mover":me="msup"}var wt=new Ht.MathNode(me,se);return wt}}),fn({type:"atom",htmlBuilder:function(u,d){return ht.mathsym(u.text,u.mode,d,["m"+u.family])},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mo",[Nn(u.text,u.mode)]);if(u.family==="bin"){var g=Ni(u,d);g==="bold-italic"&&f.setAttribute("mathvariant",g)}else u.family==="punct"?f.setAttribute("separator","true"):(u.family==="open"||u.family==="close")&&f.setAttribute("stretchy","false");return f}});var ca={mi:"italic",mn:"normal",mtext:"normal"};fn({type:"mathord",htmlBuilder:function(u,d){return ht.makeOrd(u,d,"mathord")},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mi",[Nn(u.text,u.mode,d)]),g=Ni(u,d)||"italic";return g!==ca[f.type]&&f.setAttribute("mathvariant",g),f}}),fn({type:"textord",htmlBuilder:function(u,d){return ht.makeOrd(u,d,"textord")},mathmlBuilder:function(u,d){var f=Nn(u.text,u.mode,d),g=Ni(u,d)||"normal",D;return u.mode==="text"?D=new Ht.MathNode("mtext",[f]):/[0-9]/.test(u.text)?D=new Ht.MathNode("mn",[f]):u.text==="\\prime"?D=new Ht.MathNode("mo",[f]):D=new Ht.MathNode("mi",[f]),g!==ca[D.type]&&D.setAttribute("mathvariant",g),D}});var ys={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ls={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};fn({type:"spacing",htmlBuilder:function(u,d){if(ls.hasOwnProperty(u.text)){var f=ls[u.text].className||"";if(u.mode==="text"){var g=ht.makeOrd(u,d,"textord");return g.classes.push(f),g}else return ht.makeSpan(["mspace",f],[ht.mathsym(u.text,u.mode,d)],d)}else{if(ys.hasOwnProperty(u.text))return ht.makeSpan(["mspace",ys[u.text]],[],d);throw new v('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,d){var f;if(ls.hasOwnProperty(u.text))f=new Ht.MathNode("mtext",[new Ht.TextNode("\xA0")]);else{if(ys.hasOwnProperty(u.text))return new Ht.MathNode("mspace");throw new v('Unknown type of space "'+u.text+'"')}return f}});var us=function(){var u=new Ht.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};fn({type:"tag",mathmlBuilder:function(u,d){var f=new Ht.MathNode("mtable",[new Ht.MathNode("mtr",[us(),new Ht.MathNode("mtd",[oi(u.body,d)]),us(),new Ht.MathNode("mtd",[oi(u.tag,d)])])]);return f.setAttribute("width","100%"),f}});var Ga={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ha={"\\textbf":"textbf","\\textmd":"textmd"},ja={"\\textit":"textit","\\textup":"textup"},Ms=function(u,d){var f=u.font;return f?Ga[f]?d.withTextFontFamily(Ga[f]):ha[f]?d.withTextFontWeight(ha[f]):d.withTextFontShape(ja[f]):d};Gt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,D=d[0];return{type:"text",mode:f.mode,body:vn(D),font:g}},htmlBuilder:function(u,d){var f=Ms(u,d),g=bn(u.body,f,!0);return ht.makeSpan(["mord","text"],ht.tryCombineChars(g),f)},mathmlBuilder:function(u,d){var f=Ms(u,d);return oi(u.body,f)}}),Gt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"underline",mode:f.mode,body:d[0]}},htmlBuilder:function(u,d){var f=Kr(u.body,d),g=ht.makeLineSpan("underline-line",d),D=d.fontMetrics().defaultRuleThickness,F=ht.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:D},{type:"elem",elem:g},{type:"kern",size:3*D},{type:"elem",elem:f}]},d);return ht.makeSpan(["mord","underline"],[F],d)},mathmlBuilder:function(u,d){var f=new Ht.MathNode("mo",[new Ht.TextNode("\u203E")]);f.setAttribute("stretchy","true");var g=new Ht.MathNode("munder",[Fr(u.body,d),f]);return g.setAttribute("accentunder","true"),g}}),Gt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,d,f){throw new v("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,d){for(var f=Ha(u),g=[],D=d.havingStyle(d.style.text()),F=0;F<f.length;F++){var se=f[F];se==="~"&&(se="\\textasciitilde"),g.push(ht.makeSymbol(se,"Typewriter-Regular",u.mode,D,["mord","texttt"]))}return ht.makeSpan(["mord","text"].concat(D.sizingClasses(d)),ht.tryCombineChars(g),D)},mathmlBuilder:function(u,d){var f=new Ht.TextNode(Ha(u)),g=new Ht.MathNode("mtext",[f]);return g.setAttribute("mathvariant","monospace"),g}});var Ha=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},Bs=dr,bs=Bs,da=`[ \r
]`,fa="\\\\[a-zA-Z@]+",Ka="\\\\[^\uD800-\uDFFF]",Ro=""+fa+da+"*",Va=new RegExp("^("+fa+")"+da+"*$"),pa="[\u0300-\u036F]",Lo=new RegExp(pa+"+$"),ma="("+da+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(pa+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(pa+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Ro)+("|"+Ka+")"),Wa=function(){function M(d,f){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=d,this.settings=f,this.tokenRegex=new RegExp(ma,"g"),this.catcodes={"%":14}}var u=M.prototype;return u.setCatcode=function(f,g){this.catcodes[f]=g},u.lex=function(){var f=this.input,g=this.tokenRegex.lastIndex;if(g===f.length)return new be("EOF",new ie(this,g,g));var D=this.tokenRegex.exec(f);if(D===null||D.index!==g)throw new v("Unexpected character: '"+f[g]+"'",new be(f[g],new ie(this,g,g+1)));var F=D[2]||" ";if(this.catcodes[F]===14){var se=f.indexOf(`
`,this.tokenRegex.lastIndex);return se===-1?(this.tokenRegex.lastIndex=f.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=se+1,this.lex()}var me=F.match(Va);return me&&(F=me[1]),new be(F,new ie(this,g,this.tokenRegex.lastIndex))},M}(),ko=function(){function M(d,f){d===void 0&&(d={}),f===void 0&&(f={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=f,this.builtins=d,this.undefStack=[]}var u=M.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new v("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var g in f)f.hasOwnProperty(g)&&(f[g]===void 0?delete this.current[g]:this.current[g]=f[g])},u.has=function(f){return this.current.hasOwnProperty(f)||this.builtins.hasOwnProperty(f)},u.get=function(f){return this.current.hasOwnProperty(f)?this.current[f]:this.builtins[f]},u.set=function(f,g,D){if(D===void 0&&(D=!1),D){for(var F=0;F<this.undefStack.length;F++)delete this.undefStack[F][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=g)}else{var se=this.undefStack[this.undefStack.length-1];se&&!se.hasOwnProperty(f)&&(se[f]=this.current[f])}this.current[f]=g},M}(),Za={},Po=Za;function we(M,u){Za[M]=u}we("\\@firstoftwo",function(M){var u=M.consumeArgs(2);return{tokens:u[0],numArgs:0}}),we("\\@secondoftwo",function(M){var u=M.consumeArgs(2);return{tokens:u[1],numArgs:0}}),we("\\@ifnextchar",function(M){var u=M.consumeArgs(3),d=M.future();return u[0].length===1&&u[0][0].text===d.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),we("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),we("\\TextOrMath",function(M){var u=M.consumeArgs(2);return M.mode==="text"?{tokens:u[0],numArgs:0}:{tokens:u[1],numArgs:0}});var Ya={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};we("\\char",function(M){var u=M.popToken(),d,f="";if(u.text==="'")d=8,u=M.popToken();else if(u.text==='"')d=16,u=M.popToken();else if(u.text==="`")if(u=M.popToken(),u.text[0]==="\\")f=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new v("\\char` missing argument");f=u.text.charCodeAt(0)}else d=10;if(d){if(f=Ya[u.text],f==null||f>=d)throw new v("Invalid base-"+d+" digit "+u.text);for(var g;(g=Ya[M.future().text])!=null&&g<d;)f*=d,f+=g,M.popToken()}return"\\@char{"+f+"}"});var ga=function(u,d){var f=u.consumeArgs(1)[0];if(f.length!==1)throw new v("\\gdef's first argument must be a macro name");var g=f[0].text,D=0;for(f=u.consumeArgs(1)[0];f.length===1&&f[0].text==="#";){if(f=u.consumeArgs(1)[0],f.length!==1)throw new v('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new v('Invalid argument number "'+f[0].text+'"');if(D++,parseInt(f[0].text)!==D)throw new v('Argument number "'+f[0].text+'" out of order');f=u.consumeArgs(1)[0]}return u.macros.set(g,{tokens:f,numArgs:D},d),""};we("\\gdef",function(M){return ga(M,!0)}),we("\\def",function(M){return ga(M,!1)}),we("\\global",function(M){var u=M.consumeArgs(1)[0];if(u.length!==1)throw new v("Invalid command after \\global");var d=u[0].text;if(d==="\\def")return ga(M,!0);throw new v("Invalid command '"+d+"' after \\global")});var va=function(u,d,f){var g=u.consumeArgs(1)[0];if(g.length!==1)throw new v("\\newcommand's first argument must be a macro name");var D=g[0].text,F=u.isDefined(D);if(F&&!d)throw new v("\\newcommand{"+D+"} attempting to redefine "+(D+"; use \\renewcommand"));if(!F&&!f)throw new v("\\renewcommand{"+D+"} when command "+D+" does not yet exist; use \\newcommand");var se=0;if(g=u.consumeArgs(1)[0],g.length===1&&g[0].text==="["){for(var me="",Le=u.expandNextToken();Le.text!=="]"&&Le.text!=="EOF";)me+=Le.text,Le=u.expandNextToken();if(!me.match(/^\s*[0-9]+\s*$/))throw new v("Invalid number of arguments: "+me);se=parseInt(me),g=u.consumeArgs(1)[0]}return u.macros.set(D,{tokens:g,numArgs:se}),""};we("\\newcommand",function(M){return va(M,!1,!0)}),we("\\renewcommand",function(M){return va(M,!0,!1)}),we("\\providecommand",function(M){return va(M,!0,!0)}),we("\\bgroup","{"),we("\\egroup","}"),we("\\lq","`"),we("\\rq","'"),we("\\aa","\\r a"),we("\\AA","\\r A"),we("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),we("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),we("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),we("\u212C","\\mathscr{B}"),we("\u2130","\\mathscr{E}"),we("\u2131","\\mathscr{F}"),we("\u210B","\\mathscr{H}"),we("\u2110","\\mathscr{I}"),we("\u2112","\\mathscr{L}"),we("\u2133","\\mathscr{M}"),we("\u211B","\\mathscr{R}"),we("\u212D","\\mathfrak{C}"),we("\u210C","\\mathfrak{H}"),we("\u2128","\\mathfrak{Z}"),we("\\Bbbk","\\Bbb{k}"),we("\xB7","\\cdotp"),we("\\llap","\\mathllap{\\textrm{#1}}"),we("\\rlap","\\mathrlap{\\textrm{#1}}"),we("\\clap","\\mathclap{\\textrm{#1}}"),we("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),we("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),we("\\ne","\\neq"),we("\u2260","\\neq"),we("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),we("\u2209","\\notin"),we("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),we("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),we("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),we("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),we("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),we("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),we("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),we("\u27C2","\\perp"),we("\u203C","\\mathclose{!\\mkern-0.8mu!}"),we("\u220C","\\notni"),we("\u231C","\\ulcorner"),we("\u231D","\\urcorner"),we("\u231E","\\llcorner"),we("\u231F","\\lrcorner"),we("\xA9","\\copyright"),we("\xAE","\\textregistered"),we("\uFE0F","\\textregistered"),we("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),we("\u22EE","\\vdots"),we("\\varGamma","\\mathit{\\Gamma}"),we("\\varDelta","\\mathit{\\Delta}"),we("\\varTheta","\\mathit{\\Theta}"),we("\\varLambda","\\mathit{\\Lambda}"),we("\\varXi","\\mathit{\\Xi}"),we("\\varPi","\\mathit{\\Pi}"),we("\\varSigma","\\mathit{\\Sigma}"),we("\\varUpsilon","\\mathit{\\Upsilon}"),we("\\varPhi","\\mathit{\\Phi}"),we("\\varPsi","\\mathit{\\Psi}"),we("\\varOmega","\\mathit{\\Omega}"),we("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),we("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),we("\\boxed","\\fbox{$\\displaystyle{#1}$}"),we("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),we("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),we("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var qa={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};we("\\dots",function(M){var u="\\dotso",d=M.expandAfterFuture().text;return d in qa?u=qa[d]:(d.substr(0,4)==="\\not"||d in Lt.math&&U.contains(["bin","rel"],Lt.math[d].group))&&(u="\\dotsb"),u});var cs={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};we("\\dotso",function(M){var u=M.future().text;return u in cs?"\\ldots\\,":"\\ldots"}),we("\\dotsc",function(M){var u=M.future().text;return u in cs&&u!==","?"\\ldots\\,":"\\ldots"}),we("\\cdots",function(M){var u=M.future().text;return u in cs?"\\@cdots\\,":"\\@cdots"}),we("\\dotsb","\\cdots"),we("\\dotsm","\\cdots"),we("\\dotsi","\\!\\cdots"),we("\\dotsx","\\ldots\\,"),we("\\DOTSI","\\relax"),we("\\DOTSB","\\relax"),we("\\DOTSX","\\relax"),we("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),we("\\,","\\tmspace+{3mu}{.1667em}"),we("\\thinspace","\\,"),we("\\>","\\mskip{4mu}"),we("\\:","\\tmspace+{4mu}{.2222em}"),we("\\medspace","\\:"),we("\\;","\\tmspace+{5mu}{.2777em}"),we("\\thickspace","\\;"),we("\\!","\\tmspace-{3mu}{.1667em}"),we("\\negthinspace","\\!"),we("\\negmedspace","\\tmspace-{4mu}{.2222em}"),we("\\negthickspace","\\tmspace-{5mu}{.277em}"),we("\\enspace","\\kern.5em "),we("\\enskip","\\hskip.5em\\relax"),we("\\quad","\\hskip1em\\relax"),we("\\qquad","\\hskip2em\\relax"),we("\\tag","\\@ifstar\\tag@literal\\tag@paren"),we("\\tag@paren","\\tag@literal{({#1})}"),we("\\tag@literal",function(M){if(M.macros.get("\\df@tag"))throw new v("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),we("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),we("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),we("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),we("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),we("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),we("\\\\","\\newline"),we("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Xa=vt["Main-Regular"][84][1]-.7*vt["Main-Regular"][65][1]+"em";we("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Xa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),we("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Xa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),we("\\hspace","\\@ifstar\\@hspacer\\@hspace"),we("\\@hspace","\\hskip #1\\relax"),we("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),we("\\ordinarycolon",":"),we("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),we("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),we("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),we("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),we("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),we("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),we("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),we("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),we("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),we("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),we("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),we("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),we("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),we("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),we("\u2237","\\dblcolon"),we("\u2239","\\eqcolon"),we("\u2254","\\coloneqq"),we("\u2255","\\eqqcolon"),we("\u2A74","\\Coloneqq"),we("\\ratio","\\vcentcolon"),we("\\coloncolon","\\dblcolon"),we("\\colonequals","\\coloneqq"),we("\\coloncolonequals","\\Coloneqq"),we("\\equalscolon","\\eqqcolon"),we("\\equalscoloncolon","\\Eqqcolon"),we("\\colonminus","\\coloneq"),we("\\coloncolonminus","\\Coloneq"),we("\\minuscolon","\\eqcolon"),we("\\minuscoloncolon","\\Eqcolon"),we("\\coloncolonapprox","\\Colonapprox"),we("\\coloncolonsim","\\Colonsim"),we("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),we("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),we("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),we("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),we("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),we("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),we("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),we("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),we("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),we("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),we("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),we("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),we("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),we("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),we("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),we("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),we("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),we("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),we("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),we("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),we("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),we("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),we("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),we("\u27E6","\\llbracket"),we("\u27E7","\\rrbracket"),we("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),we("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),we("\u2983","\\lBrace"),we("\u2984","\\rBrace"),we("\\darr","\\downarrow"),we("\\dArr","\\Downarrow"),we("\\Darr","\\Downarrow"),we("\\lang","\\langle"),we("\\rang","\\rangle"),we("\\uarr","\\uparrow"),we("\\uArr","\\Uparrow"),we("\\Uarr","\\Uparrow"),we("\\N","\\mathbb{N}"),we("\\R","\\mathbb{R}"),we("\\Z","\\mathbb{Z}"),we("\\alef","\\aleph"),we("\\alefsym","\\aleph"),we("\\Alpha","\\mathrm{A}"),we("\\Beta","\\mathrm{B}"),we("\\bull","\\bullet"),we("\\Chi","\\mathrm{X}"),we("\\clubs","\\clubsuit"),we("\\cnums","\\mathbb{C}"),we("\\Complex","\\mathbb{C}"),we("\\Dagger","\\ddagger"),we("\\diamonds","\\diamondsuit"),we("\\empty","\\emptyset"),we("\\Epsilon","\\mathrm{E}"),we("\\Eta","\\mathrm{H}"),we("\\exist","\\exists"),we("\\harr","\\leftrightarrow"),we("\\hArr","\\Leftrightarrow"),we("\\Harr","\\Leftrightarrow"),we("\\hearts","\\heartsuit"),we("\\image","\\Im"),we("\\infin","\\infty"),we("\\Iota","\\mathrm{I}"),we("\\isin","\\in"),we("\\Kappa","\\mathrm{K}"),we("\\larr","\\leftarrow"),we("\\lArr","\\Leftarrow"),we("\\Larr","\\Leftarrow"),we("\\lrarr","\\leftrightarrow"),we("\\lrArr","\\Leftrightarrow"),we("\\Lrarr","\\Leftrightarrow"),we("\\Mu","\\mathrm{M}"),we("\\natnums","\\mathbb{N}"),we("\\Nu","\\mathrm{N}"),we("\\Omicron","\\mathrm{O}"),we("\\plusmn","\\pm"),we("\\rarr","\\rightarrow"),we("\\rArr","\\Rightarrow"),we("\\Rarr","\\Rightarrow"),we("\\real","\\Re"),we("\\reals","\\mathbb{R}"),we("\\Reals","\\mathbb{R}"),we("\\Rho","\\mathrm{P}"),we("\\sdot","\\cdot"),we("\\sect","\\S"),we("\\spades","\\spadesuit"),we("\\sub","\\subset"),we("\\sube","\\subseteq"),we("\\supe","\\supseteq"),we("\\Tau","\\mathrm{T}"),we("\\thetasym","\\vartheta"),we("\\weierp","\\wp"),we("\\Zeta","\\mathrm{Z}"),we("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),we("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),we("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),we("\\blue","\\textcolor{##6495ed}{#1}"),we("\\orange","\\textcolor{##ffa500}{#1}"),we("\\pink","\\textcolor{##ff00af}{#1}"),we("\\red","\\textcolor{##df0030}{#1}"),we("\\green","\\textcolor{##28ae7b}{#1}"),we("\\gray","\\textcolor{gray}{#1}"),we("\\purple","\\textcolor{##9d38bd}{#1}"),we("\\blueA","\\textcolor{##ccfaff}{#1}"),we("\\blueB","\\textcolor{##80f6ff}{#1}"),we("\\blueC","\\textcolor{##63d9ea}{#1}"),we("\\blueD","\\textcolor{##11accd}{#1}"),we("\\blueE","\\textcolor{##0c7f99}{#1}"),we("\\tealA","\\textcolor{##94fff5}{#1}"),we("\\tealB","\\textcolor{##26edd5}{#1}"),we("\\tealC","\\textcolor{##01d1c1}{#1}"),we("\\tealD","\\textcolor{##01a995}{#1}"),we("\\tealE","\\textcolor{##208170}{#1}"),we("\\greenA","\\textcolor{##b6ffb0}{#1}"),we("\\greenB","\\textcolor{##8af281}{#1}"),we("\\greenC","\\textcolor{##74cf70}{#1}"),we("\\greenD","\\textcolor{##1fab54}{#1}"),we("\\greenE","\\textcolor{##0d923f}{#1}"),we("\\goldA","\\textcolor{##ffd0a9}{#1}"),we("\\goldB","\\textcolor{##ffbb71}{#1}"),we("\\goldC","\\textcolor{##ff9c39}{#1}"),we("\\goldD","\\textcolor{##e07d10}{#1}"),we("\\goldE","\\textcolor{##a75a05}{#1}"),we("\\redA","\\textcolor{##fca9a9}{#1}"),we("\\redB","\\textcolor{##ff8482}{#1}"),we("\\redC","\\textcolor{##f9685d}{#1}"),we("\\redD","\\textcolor{##e84d39}{#1}"),we("\\redE","\\textcolor{##bc2612}{#1}"),we("\\maroonA","\\textcolor{##ffbde0}{#1}"),we("\\maroonB","\\textcolor{##ff92c6}{#1}"),we("\\maroonC","\\textcolor{##ed5fa6}{#1}"),we("\\maroonD","\\textcolor{##ca337c}{#1}"),we("\\maroonE","\\textcolor{##9e034e}{#1}"),we("\\purpleA","\\textcolor{##ddd7ff}{#1}"),we("\\purpleB","\\textcolor{##c6b9fc}{#1}"),we("\\purpleC","\\textcolor{##aa87ff}{#1}"),we("\\purpleD","\\textcolor{##7854ab}{#1}"),we("\\purpleE","\\textcolor{##543b78}{#1}"),we("\\mintA","\\textcolor{##f5f9e8}{#1}"),we("\\mintB","\\textcolor{##edf2df}{#1}"),we("\\mintC","\\textcolor{##e0e5cc}{#1}"),we("\\grayA","\\textcolor{##f6f7f7}{#1}"),we("\\grayB","\\textcolor{##f0f1f2}{#1}"),we("\\grayC","\\textcolor{##e3e5e6}{#1}"),we("\\grayD","\\textcolor{##d6d8da}{#1}"),we("\\grayE","\\textcolor{##babec2}{#1}"),we("\\grayF","\\textcolor{##888d93}{#1}"),we("\\grayG","\\textcolor{##626569}{#1}"),we("\\grayH","\\textcolor{##3b3e40}{#1}"),we("\\grayI","\\textcolor{##21242c}{#1}"),we("\\kaBlue","\\textcolor{##314453}{#1}"),we("\\kaGreen","\\textcolor{##71B307}{#1}");var _a={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Qa=function(){function M(d,f,g){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=f,this.expansionCount=0,this.feed(d),this.macros=new ko(Po,f.macros),this.mode=g,this.stack=[]}var u=M.prototype;return u.feed=function(f){this.lexer=new Wa(f,this.settings)},u.switchMode=function(f){this.mode=f},u.beginGroup=function(){this.macros.beginGroup()},u.endGroup=function(){this.macros.endGroup()},u.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},u.popToken=function(){return this.future(),this.stack.pop()},u.pushToken=function(f){this.stack.push(f)},u.pushTokens=function(f){var g;(g=this.stack).push.apply(g,f)},u.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},u.consumeArgs=function(f){for(var g=[],D=0;D<f;++D){this.consumeSpaces();var F=this.popToken();if(F.text==="{"){for(var se=[],me=1;me!==0;){var Le=this.popToken();if(se.push(Le),Le.text==="{")++me;else if(Le.text==="}")--me;else if(Le.text==="EOF")throw new v("End of input in macro argument",F)}se.pop(),se.reverse(),g[D]=se}else{if(F.text==="EOF")throw new v("End of input expecting macro argument");g[D]=[F]}}return g},u.expandOnce=function(){var f=this.popToken(),g=f.text,D=this._getExpansion(g);if(D==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new v("Too many expansions: infinite loop or need to increase maxExpand setting");var F=D.tokens;if(D.numArgs){var se=this.consumeArgs(D.numArgs);F=F.slice();for(var me=F.length-1;me>=0;--me){var Le=F[me];if(Le.text==="#"){if(me===0)throw new v("Incomplete placeholder at end of macro body",Le);if(Le=F[--me],Le.text==="#")F.splice(me+1,1);else if(/^[1-9]$/.test(Le.text)){var je;(je=F).splice.apply(je,[me,2].concat(se[+Le.text-1]))}else throw new v("Not a valid argument number",Le)}}}return this.pushTokens(F),F},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof be)if(f.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},u.expandMacro=function(f){if(this.macros.get(f)){var g=[],D=this.stack.length;for(this.pushToken(new be(f));this.stack.length>D;){var F=this.expandOnce();F instanceof be&&g.push(this.stack.pop())}return g}},u.expandMacroAsText=function(f){var g=this.expandMacro(f);return g&&g.map(function(D){return D.text}).join("")},u._getExpansion=function(f){var g=this.macros.get(f);if(g==null)return g;var D=typeof g=="function"?g(this):g;if(typeof D=="string"){var F=0;if(D.indexOf("#")!==-1)for(var se=D.replace(/##/g,"");se.indexOf("#"+(F+1))!==-1;)++F;for(var me=new Wa(D,this.settings),Le=[],je=me.lex();je.text!=="EOF";)Le.push(je),je=me.lex();Le.reverse();var rt={tokens:Le,numArgs:F};return rt}return D},u.isDefined=function(f){return this.macros.has(f)||bs.hasOwnProperty(f)||Lt.math.hasOwnProperty(f)||Lt.text.hasOwnProperty(f)||_a.hasOwnProperty(f)},M}(),Ja={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"}},Ns={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u010F:"d\u030C",\u1E0B:"d\u0307",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u013A:"l\u0301",\u013E:"l\u030C",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u010E:"D\u030C",\u1E0A:"D\u0307",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0139:"L\u0301",\u013D:"L\u030C",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u0164:"T\u030C",\u1E6A:"T\u0307",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Hn=function(){function M(d,f){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Qa(d,f,this.mode),this.settings=f,this.leftrightDepth=0}var u=M.prototype;return u.expect=function(f,g){if(g===void 0&&(g=!0),this.fetch().text!==f)throw new v("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());g&&this.consume()},u.consume=function(){this.nextToken=null},u.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},u.switchMode=function(f){this.mode=f,this.gullet.switchMode(f)},u.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var f=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),f},u.parseExpression=function(f,g){for(var D=[];;){this.mode==="math"&&this.consumeSpaces();var F=this.fetch();if(M.endOfExpression.indexOf(F.text)!==-1||g&&F.text===g||f&&bs[F.text]&&bs[F.text].infix)break;var se=this.parseAtom(g);if(!se)break;D.push(se)}return this.mode==="text"&&this.formLigatures(D),this.handleInfixNodes(D)},u.handleInfixNodes=function(f){for(var g=-1,D,F=0;F<f.length;F++){var se=on(f[F],"infix");if(se){if(g!==-1)throw new v("only one infix operator per group",se.token);g=F,D=se.replaceWith}}if(g!==-1&&D){var me,Le,je=f.slice(0,g),rt=f.slice(g+1);je.length===1&&je[0].type==="ordgroup"?me=je[0]:me={type:"ordgroup",mode:this.mode,body:je},rt.length===1&&rt[0].type==="ordgroup"?Le=rt[0]:Le={type:"ordgroup",mode:this.mode,body:rt};var wt;return D==="\\\\abovefrac"?wt=this.callFunction(D,[me,f[g],Le],[]):wt=this.callFunction(D,[me,Le],[]),[wt]}else return f},u.handleSupSubscript=function(f){var g=this.fetch(),D=g.text;this.consume();var F=this.parseGroup(f,!1,M.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!F)throw new v("Expected group after '"+D+"'",g);return F},u.formatUnsupportedCmd=function(f){for(var g=[],D=0;D<f.length;D++)g.push({type:"textord",mode:"text",text:f[D]});var F={type:"text",mode:this.mode,body:g},se={type:"color",mode:this.mode,color:this.settings.errorColor,body:[F]};return se},u.parseAtom=function(f){var g=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return g;for(var D,F;;){this.consumeSpaces();var se=this.fetch();if(se.text==="\\limits"||se.text==="\\nolimits"){var me=on(g,"op");if(me){var Le=se.text==="\\limits";me.limits=Le,me.alwaysHandleSupSub=!0}else if(me=on(g,"operatorname"),me&&me.alwaysHandleSupSub){var je=se.text==="\\limits";me.limits=je}else throw new v("Limit controls must follow a math operator",se);this.consume()}else if(se.text==="^"){if(D)throw new v("Double superscript",se);D=this.handleSupSubscript("superscript")}else if(se.text==="_"){if(F)throw new v("Double subscript",se);F=this.handleSupSubscript("subscript")}else if(se.text==="'"){if(D)throw new v("Double superscript",se);var rt={type:"textord",mode:this.mode,text:"\\prime"},wt=[rt];for(this.consume();this.fetch().text==="'";)wt.push(rt),this.consume();this.fetch().text==="^"&&wt.push(this.handleSupSubscript("superscript")),D={type:"ordgroup",mode:this.mode,body:wt}}else break}return D||F?{type:"supsub",mode:this.mode,base:g,sup:D,sub:F}:g},u.parseFunction=function(f,g,D){var F=this.fetch(),se=F.text,me=bs[se];if(!me)return null;if(this.consume(),D!=null&&me.greediness<=D)throw new v("Got function '"+se+"' with no arguments"+(g?" as "+g:""),F);if(this.mode==="text"&&!me.allowedInText)throw new v("Can't use function '"+se+"' in text mode",F);if(this.mode==="math"&&me.allowedInMath===!1)throw new v("Can't use function '"+se+"' in math mode",F);var Le=this.parseArguments(se,me),je=Le.args,rt=Le.optArgs;return this.callFunction(se,je,rt,F,f)},u.callFunction=function(f,g,D,F,se){var me={funcName:f,parser:this,token:F,breakOnTokenText:se},Le=bs[f];if(Le&&Le.handler)return Le.handler(me,g,D);throw new v("No function handler for "+f)},u.parseArguments=function(f,g){var D=g.numArgs+g.numOptionalArgs;if(D===0)return{args:[],optArgs:[]};for(var F=g.greediness,se=[],me=[],Le=0;Le<D;Le++){var je=g.argTypes&&g.argTypes[Le],rt=Le<g.numOptionalArgs,wt=Le>0&&!rt||Le===0&&!rt&&this.mode==="math",Bt=this.parseGroupOfType("argument to '"+f+"'",je,rt,F,wt);if(!Bt){if(rt){me.push(null);continue}throw new v("Expected group after '"+f+"'",this.fetch())}(rt?me:se).push(Bt)}return{args:se,optArgs:me}},u.parseGroupOfType=function(f,g,D,F,se){switch(g){case"color":return se&&this.consumeSpaces(),this.parseColorGroup(D);case"size":return se&&this.consumeSpaces(),this.parseSizeGroup(D);case"url":return this.parseUrlGroup(D,se);case"math":case"text":return this.parseGroup(f,D,F,void 0,g,se);case"hbox":{var me=this.parseGroup(f,D,F,void 0,"text",se);if(!me)return me;var Le={type:"styling",mode:me.mode,body:[me],style:"text"};return Le}case"raw":{if(se&&this.consumeSpaces(),D&&this.fetch().text==="{")return null;var je=this.parseStringGroup("raw",D,!0);if(je)return{type:"raw",mode:"text",string:je.text};throw new v("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,D,F,void 0,void 0,se);default:throw new v("Unknown group type as "+f,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(f,g,D){var F=g?"[":"{",se=g?"]":"}",me=this.fetch();if(me.text!==F){if(g)return null;if(D&&me.text!=="EOF"&&/[^{}[\]]/.test(me.text))return this.consume(),me}var Le=this.mode;this.mode="text",this.expect(F);for(var je="",rt=this.fetch(),wt=0,Bt=rt,Ut;(Ut=this.fetch()).text!==se||D&&wt>0;){switch(Ut.text){case"EOF":throw new v("Unexpected end of input in "+f,rt.range(Bt,je));case F:wt++;break;case se:wt--;break}Bt=Ut,je+=Bt.text,this.consume()}return this.expect(se),this.mode=Le,rt.range(Bt,je)},u.parseRegexGroup=function(f,g){var D=this.mode;this.mode="text";for(var F=this.fetch(),se=F,me="",Le;(Le=this.fetch()).text!=="EOF"&&f.test(me+Le.text);)se=Le,me+=se.text,this.consume();if(me==="")throw new v("Invalid "+g+": '"+F.text+"'",F);return this.mode=D,F.range(se,me)},u.parseColorGroup=function(f){var g=this.parseStringGroup("color",f);if(!g)return null;var D=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(g.text);if(!D)throw new v("Invalid color: '"+g.text+"'",g);var F=D[0];return/^[0-9a-f]{6}$/i.test(F)&&(F="#"+F),{type:"color-token",mode:this.mode,color:F}},u.parseSizeGroup=function(f){var g,D=!1;if(!f&&this.fetch().text!=="{"?g=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):g=this.parseStringGroup("size",f),!g)return null;!f&&g.text.length===0&&(g.text="0pt",D=!0);var F=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(g.text);if(!F)throw new v("Invalid size: '"+g.text+"'",g);var se={number:+(F[1]+F[2]),unit:F[3]};if(!hr(se))throw new v("Invalid unit: '"+se.unit+"'",g);return{type:"size",mode:this.mode,value:se,isBlank:D}},u.parseUrlGroup=function(f,g){this.gullet.lexer.setCatcode("%",13);var D=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!D)return null;var F=D.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:F}},u.parseGroup=function(f,g,D,F,se,me){var Le=this.mode;se&&this.switchMode(se),me&&this.consumeSpaces();var je=this.fetch(),rt=je.text,wt;if(g?rt==="[":rt==="{"||rt==="\\begingroup"){this.consume();var Bt=M.endOfGroup[rt];this.gullet.beginGroup();var Ut=this.parseExpression(!1,Bt),Qt=this.fetch();this.expect(Bt),this.gullet.endGroup(),wt={type:"ordgroup",mode:this.mode,loc:ie.range(je,Qt),body:Ut,semisimple:rt==="\\begingroup"||void 0}}else if(g)wt=null;else if(wt=this.parseFunction(F,f,D)||this.parseSymbol(),wt==null&&rt[0]==="\\"&&!_a.hasOwnProperty(rt)){if(this.settings.throwOnError)throw new v("Undefined control sequence: "+rt,je);wt=this.formatUnsupportedCmd(rt),this.consume()}return se&&this.switchMode(Le),wt},u.formLigatures=function(f){for(var g=f.length-1,D=0;D<g;++D){var F=f[D],se=F.text;se==="-"&&f[D+1].text==="-"&&(D+1<g&&f[D+2].text==="-"?(f.splice(D,3,{type:"textord",mode:"text",loc:ie.range(F,f[D+2]),text:"---"}),g-=2):(f.splice(D,2,{type:"textord",mode:"text",loc:ie.range(F,f[D+1]),text:"--"}),g-=1)),(se==="'"||se==="`")&&f[D+1].text===se&&(f.splice(D,2,{type:"textord",mode:"text",loc:ie.range(F,f[D+1]),text:se+se}),g-=1)}},u.parseSymbol=function(){var f=this.fetch(),g=f.text;if(/^\\verb[^a-zA-Z]/.test(g)){this.consume();var D=g.slice(5),F=D.charAt(0)==="*";if(F&&(D=D.slice(1)),D.length<2||D.charAt(0)!==D.slice(-1))throw new v(`\\verb assertion failed --
please report what input caused this bug`);return D=D.slice(1,-1),{type:"verb",mode:"text",body:D,star:F}}Ns.hasOwnProperty(g[0])&&!Lt[this.mode][g[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+g[0]+'" used in math mode',f),g=Ns[g[0]]+g.substr(1));var se=Lo.exec(g);se&&(g=g.substring(0,se.index),g==="i"?g="\u0131":g==="j"&&(g="\u0237"));var me;if(Lt[this.mode][g]){this.settings.strict&&this.mode==="math"&&Dr.indexOf(g)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+g[0]+'" used in math mode',f);var Le=Lt[this.mode][g].group,je=ie.range(f),rt;if(Tt.hasOwnProperty(Le)){var wt=Le;rt={type:"atom",mode:this.mode,family:wt,loc:je,text:g}}else rt={type:Le,mode:this.mode,loc:je,text:g};me=rt}else if(g.charCodeAt(0)>=128)this.settings.strict&&(Be(g.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+g[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+g[0]+'"'+(" ("+g.charCodeAt(0)+")"),f)),me={type:"textord",mode:"text",loc:ie.range(f),text:g};else return null;if(this.consume(),se)for(var Bt=0;Bt<se[0].length;Bt++){var Ut=se[0][Bt];if(!Ja[Ut])throw new v("Unknown accent ' "+Ut+"'",f);var Qt=Ja[Ut][this.mode];if(!Qt)throw new v("Accent "+Ut+" unsupported in "+this.mode+" mode",f);me={type:"accent",mode:this.mode,loc:ie.range(f),label:Qt,isStretchy:!1,isShifty:!0,base:me}}return me},M}();Hn.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Hn.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Hn.SUPSUB_GREEDINESS=1;var Si=function(u,d){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new Hn(u,d);delete f.gullet.macros.current["\\df@tag"];var g=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!d.displayMode)throw new v("\\tag works only in display equations");f.gullet.feed("\\df@tag"),g=[{type:"tag",mode:"text",body:g,tag:f.parse()}]}return g},Es=Si,eo=function(u,d,f){d.textContent="";var g=ya(u,f).toNode();d.appendChild(g)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),eo=function(){throw new v("KaTeX doesn't work in quirks mode.")});var $s=function(u,d){var f=ya(u,d).toMarkup();return f},Oo=function(u,d){var f=new A(d);return Es(u,f)},to=function(u,d,f){if(f.throwOnError||!(u instanceof v))throw u;var g=ht.makeSpan(["katex-error"],[new Ie(d)]);return g.setAttribute("title",u.toString()),g.setAttribute("style","color:"+f.errorColor),g},ya=function(u,d){var f=new A(d);try{var g=Es(u,f);return Gn(g,u,f)}catch(D){return to(D,u,f)}},Fo=function(u,d){var f=new A(d);try{var g=Es(u,f);return Ui(g,u,f)}catch(D){return to(D,u,f)}},ro={version:"0.11.1",render:eo,renderToString:$s,ParseError:v,__parse:Oo,__renderToDomTree:ya,__renderToHTMLTree:Fo,__setFontMetrics:Nt,__defineSymbol:_,__defineMacro:we,__domTree:{Span:Ne,Anchor:Ke,SymbolNode:Ie,SvgNode:Ue,PathNode:ze,LineNode:qe}},Mo=k.default=ro}]).default})},32834:function(Vt){(function(it,k){Vt.exports=k()})(this,function(){"use strict";function it(fe,Ae){for(var Pe=0;Pe<Ae.length;Pe++){var j=Ae[Pe];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(fe,j.key,j)}}function k(fe,Ae,Pe){return Ae&&it(fe.prototype,Ae),Pe&&it(fe,Pe),fe}function y(fe,Ae){if(fe){if(typeof fe=="string")return Ee(fe,Ae);var Pe=Object.prototype.toString.call(fe).slice(8,-1);if(Pe==="Object"&&fe.constructor&&(Pe=fe.constructor.name),Pe==="Map"||Pe==="Set")return Array.from(fe);if(Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe))return Ee(fe,Ae)}}function Ee(fe,Ae){(Ae==null||Ae>fe.length)&&(Ae=fe.length);for(var Pe=0,j=new Array(Ae);Pe<Ae;Pe++)j[Pe]=fe[Pe];return j}function ie(fe,Ae){var Pe=typeof Symbol!="undefined"&&fe[Symbol.iterator]||fe["@@iterator"];if(Pe)return(Pe=Pe.call(fe)).next.bind(Pe);if(Array.isArray(fe)||(Pe=y(fe))||Ae&&fe&&typeof fe.length=="number"){Pe&&(fe=Pe);var j=0;return function(){return j>=fe.length?{done:!0}:{done:!1,value:fe[j++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var be={exports:{}};function J(){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 v(fe){be.exports.defaults=fe}be.exports={defaults:J(),getDefaults:J,changeDefaults:v};var de=/[&<>"']/,ce=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,V=/[<>"']|&(?!#?\w+;)/g,B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},E=function(Ae){return B[Ae]};function L(fe,Ae){if(Ae){if(de.test(fe))return fe.replace(ce,E)}else if(l.test(fe))return fe.replace(V,E);return fe}var x=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function P(fe){return fe.replace(x,function(Ae,Pe){return Pe=Pe.toLowerCase(),Pe==="colon"?":":Pe.charAt(0)==="#"?Pe.charAt(1)==="x"?String.fromCharCode(parseInt(Pe.substring(2),16)):String.fromCharCode(+Pe.substring(1)):""})}var q=/(^|[^\[])\^/g;function H(fe,Ae){fe=fe.source||fe,Ae=Ae||"";var Pe={replace:function(X,he){return he=he.source||he,he=he.replace(q,"$1"),fe=fe.replace(X,he),Pe},getRegex:function(){return new RegExp(fe,Ae)}};return Pe}var U=/[^\w:]/g,A=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function z(fe,Ae,Pe){if(fe){var j;try{j=decodeURIComponent(P(Pe)).replace(U,"").toLowerCase()}catch(X){return null}if(j.indexOf("javascript:")===0||j.indexOf("vbscript:")===0||j.indexOf("data:")===0)return null}Ae&&!A.test(Pe)&&(Pe=pe(Ae,Pe));try{Pe=encodeURI(Pe).replace(/%25/g,"%")}catch(X){return null}return Pe}var O={},N=/^[^:]+:\/*[^/]*$/,oe=/^([^:]+:)[\s\S]*$/,ve=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pe(fe,Ae){O[" "+fe]||(N.test(fe)?O[" "+fe]=fe+"/":O[" "+fe]=st(fe,"/",!0)),fe=O[" "+fe];var Pe=fe.indexOf(":")===-1;return Ae.substring(0,2)==="//"?Pe?Ae:fe.replace(oe,"$1")+Ae:Ae.charAt(0)==="/"?Pe?Ae:fe.replace(ve,"$1")+Ae:fe+Ae}var De={exec:function(){}};function Oe(fe){for(var Ae=1,Pe,j;Ae<arguments.length;Ae++){Pe=arguments[Ae];for(j in Pe)Object.prototype.hasOwnProperty.call(Pe,j)&&(fe[j]=Pe[j])}return fe}function Fe(fe,Ae){var Pe=fe.replace(/\|/g,function(he,Se,$){for(var Qe=!1,le=Se;--le>=0&&$[le]==="\\";)Qe=!Qe;return Qe?"|":" |"}),j=Pe.split(/ \|/),X=0;if(j.length>Ae)j.splice(Ae);else for(;j.length<Ae;)j.push("");for(;X<j.length;X++)j[X]=j[X].trim().replace(/\\\|/g,"|");return j}function st(fe,Ae,Pe){var j=fe.length;if(j===0)return"";for(var X=0;X<j;){var he=fe.charAt(j-X-1);if(he===Ae&&!Pe)X++;else if(he!==Ae&&Pe)X++;else break}return fe.substr(0,j-X)}function re(fe,Ae){if(fe.indexOf(Ae[1])===-1)return-1;for(var Pe=fe.length,j=0,X=0;X<Pe;X++)if(fe[X]==="\\")X++;else if(fe[X]===Ae[0])j++;else if(fe[X]===Ae[1]&&(j--,j<0))return X;return-1}function W(fe){fe&&fe.sanitize&&!fe.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 ee(fe,Ae){if(Ae<1)return"";for(var Pe="";Ae>1;)Ae&1&&(Pe+=fe),Ae>>=1,fe+=fe;return Pe+fe}var ue={escape:L,unescape:P,edit:H,cleanUrl:z,resolveUrl:pe,noopTest:De,merge:Oe,splitCells:Fe,rtrim:st,findClosingBracket:re,checkSanitizeDeprecation:W,repeatString:ee},ne=be.exports.defaults,ae=ue.rtrim,S=ue.splitCells,w=ue.escape,K=ue.findClosingBracket;function ye(fe,Ae,Pe){var j=Ae.href,X=Ae.title?w(Ae.title):null,he=fe[1].replace(/\\([\[\]])/g,"$1");return fe[0].charAt(0)!=="!"?{type:"link",raw:Pe,href:j,title:X,text:he}:{type:"image",raw:Pe,href:j,title:X,text:w(he)}}function Be(fe,Ae){var Pe=fe.match(/^(\s+)(?:```)/);if(Pe===null)return Ae;var j=Pe[1];return Ae.split(`
`).map(function(X){var he=X.match(/^\s+/);if(he===null)return X;var Se=he[0];return Se.length>=j.length?X.slice(j.length):X}).join(`
`)}var He=function(){function fe(Pe){this.options=Pe||ne}var Ae=fe.prototype;return Ae.space=function(j){var X=this.rules.block.newline.exec(j);if(X)return X[0].length>1?{type:"space",raw:X[0]}:{raw:`
`}},Ae.code=function(j){var X=this.rules.block.code.exec(j);if(X){var he=X[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:X[0],codeBlockStyle:"indented",text:this.options.pedantic?he:ae(he,`
`)}}},Ae.fences=function(j){var X=this.rules.block.fences.exec(j);if(X){var he=X[0],Se=Be(he,X[3]||"");return{type:"code",raw:he,lang:X[2]?X[2].trim():X[2],text:Se}}},Ae.heading=function(j){var X=this.rules.block.heading.exec(j);if(X){var he=X[2].trim();if(/#$/.test(he)){var Se=ae(he,"#");(this.options.pedantic||!Se||/ $/.test(Se))&&(he=Se.trim())}return{type:"heading",raw:X[0],depth:X[1].length,text:he}}},Ae.nptable=function(j){var X=this.rules.block.nptable.exec(j);if(X){var he={type:"table",header:S(X[1].replace(/^ *| *\| *$/g,"")),align:X[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:X[3]?X[3].replace(/\n$/,"").split(`
`):[],raw:X[0]};if(he.header.length===he.align.length){var Se=he.align.length,$;for($=0;$<Se;$++)/^ *-+: *$/.test(he.align[$])?he.align[$]="right":/^ *:-+: *$/.test(he.align[$])?he.align[$]="center":/^ *:-+ *$/.test(he.align[$])?he.align[$]="left":he.align[$]=null;for(Se=he.cells.length,$=0;$<Se;$++)he.cells[$]=S(he.cells[$],he.header.length);return he}}},Ae.hr=function(j){var X=this.rules.block.hr.exec(j);if(X)return{type:"hr",raw:X[0]}},Ae.blockquote=function(j){var X=this.rules.block.blockquote.exec(j);if(X){var he=X[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:X[0],text:he}}},Ae.list=function(j){var X=this.rules.block.list.exec(j);if(X){var he=X[0],Se=X[2],$=Se.length>1,Qe={type:"list",raw:he,ordered:$,start:$?+Se.slice(0,-1):"",loose:!1,items:[]},le=X[0].match(this.rules.block.item),It=!1,$t,zt,sr,or,Kt,ur,Zr,Tr,fr,Ot=le.length;sr=this.rules.block.listItemStart.exec(le[0]);for(var yt=0;yt<Ot;yt++){if($t=le[yt],he=$t,this.options.pedantic||(fr=$t.match(new RegExp("\\n\\s*\\n {0,"+(sr[0].length-1)+"}\\S")),fr&&(Kt=$t.length-fr.index+le.slice(yt+1).join(`
`).length,Qe.raw=Qe.raw.substring(0,Qe.raw.length-Kt),$t=$t.substring(0,fr.index),he=$t,Ot=yt+1)),yt!==Ot-1){if(or=this.rules.block.listItemStart.exec(le[yt+1]),this.options.pedantic?or[1].length>sr[1].length:or[1].length>=sr[0].length||or[1].length>3){le.splice(yt,2,le[yt]+(!this.options.pedantic&&or[1].length<sr[0].length&&!le[yt].match(/\n$/)?"":`
`)+le[yt+1]),yt--,Ot--;continue}else(!this.options.pedantic||this.options.smartLists?or[2][or[2].length-1]!==Se[Se.length-1]:$===(or[2].length===1))&&(Kt=le.slice(yt+1).join(`
`).length,Qe.raw=Qe.raw.substring(0,Qe.raw.length-Kt),yt=Ot-1);sr=or}zt=$t.length,$t=$t.replace(/^ *([*+-]|\d+[.)]) ?/,""),~$t.indexOf(`
`)&&(zt-=$t.length,$t=this.options.pedantic?$t.replace(/^ {1,4}/gm,""):$t.replace(new RegExp("^ {1,"+zt+"}","gm"),"")),$t=ae($t,`
`),yt!==Ot-1&&(he=he+`
`),ur=It||/\n\n(?!\s*$)/.test(he),yt!==Ot-1&&(It=he.slice(-2)===`
`,ur||(ur=It)),ur&&(Qe.loose=!0),this.options.gfm&&(Zr=/^\[[ xX]\] /.test($t),Tr=void 0,Zr&&(Tr=$t[1]!==" ",$t=$t.replace(/^\[[ xX]\] +/,""))),Qe.items.push({type:"list_item",raw:he,task:Zr,checked:Tr,loose:ur,text:$t})}return Qe}},Ae.html=function(j){var X=this.rules.block.html.exec(j);if(X)return{type:this.options.sanitize?"paragraph":"html",raw:X[0],pre:!this.options.sanitizer&&(X[1]==="pre"||X[1]==="script"||X[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(X[0]):w(X[0]):X[0]}},Ae.def=function(j){var X=this.rules.block.def.exec(j);if(X){X[3]&&(X[3]=X[3].substring(1,X[3].length-1));var he=X[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:he,raw:X[0],href:X[2],title:X[3]}}},Ae.table=function(j){var X=this.rules.block.table.exec(j);if(X){var he={type:"table",header:S(X[1].replace(/^ *| *\| *$/g,"")),align:X[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:X[3]?X[3].replace(/\n$/,"").split(`
`):[]};if(he.header.length===he.align.length){he.raw=X[0];var Se=he.align.length,$;for($=0;$<Se;$++)/^ *-+: *$/.test(he.align[$])?he.align[$]="right":/^ *:-+: *$/.test(he.align[$])?he.align[$]="center":/^ *:-+ *$/.test(he.align[$])?he.align[$]="left":he.align[$]=null;for(Se=he.cells.length,$=0;$<Se;$++)he.cells[$]=S(he.cells[$].replace(/^ *\| *| *\| *$/g,""),he.header.length);return he}}},Ae.lheading=function(j){var X=this.rules.block.lheading.exec(j);if(X)return{type:"heading",raw:X[0],depth:X[2].charAt(0)==="="?1:2,text:X[1]}},Ae.paragraph=function(j){var X=this.rules.block.paragraph.exec(j);if(X)return{type:"paragraph",raw:X[0],text:X[1].charAt(X[1].length-1)===`
`?X[1].slice(0,-1):X[1]}},Ae.text=function(j){var X=this.rules.block.text.exec(j);if(X)return{type:"text",raw:X[0],text:X[0]}},Ae.escape=function(j){var X=this.rules.inline.escape.exec(j);if(X)return{type:"escape",raw:X[0],text:w(X[1])}},Ae.tag=function(j,X,he){var Se=this.rules.inline.tag.exec(j);if(Se)return!X&&/^<a /i.test(Se[0])?X=!0:X&&/^<\/a>/i.test(Se[0])&&(X=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(Se[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Se[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:Se[0],inLink:X,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):w(Se[0]):Se[0]}},Ae.link=function(j){var X=this.rules.inline.link.exec(j);if(X){var he=X[2].trim();if(!this.options.pedantic&&/^</.test(he)){if(!/>$/.test(he))return;var Se=ae(he.slice(0,-1),"\\");if((he.length-Se.length)%2===0)return}else{var $=K(X[2],"()");if($>-1){var Qe=X[0].indexOf("!")===0?5:4,le=Qe+X[1].length+$;X[2]=X[2].substring(0,$),X[0]=X[0].substring(0,le).trim(),X[3]=""}}var It=X[2],$t="";if(this.options.pedantic){var zt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(It);zt&&(It=zt[1],$t=zt[3])}else $t=X[3]?X[3].slice(1,-1):"";return It=It.trim(),/^</.test(It)&&(this.options.pedantic&&!/>$/.test(he)?It=It.slice(1):It=It.slice(1,-1)),ye(X,{href:It&&It.replace(this.rules.inline._escapes,"$1"),title:$t&&$t.replace(this.rules.inline._escapes,"$1")},X[0])}},Ae.reflink=function(j,X){var he;if((he=this.rules.inline.reflink.exec(j))||(he=this.rules.inline.nolink.exec(j))){var Se=(he[2]||he[1]).replace(/\s+/g," ");if(Se=X[Se.toLowerCase()],!Se||!Se.href){var $=he[0].charAt(0);return{type:"text",raw:$,text:$}}return ye(he,Se,he[0])}},Ae.emStrong=function(j,X,he){he===void 0&&(he="");var Se=this.rules.inline.emStrong.lDelim.exec(j);if(Se&&!(Se[3]&&he.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var $=Se[1]||Se[2]||"";if(!$||$&&(he===""||this.rules.inline.punctuation.exec(he))){var Qe=Se[0].length-1,le,It,$t=Qe,zt=0,sr=Se[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(sr.lastIndex=0,X=X.slice(-1*j.length+Qe);(Se=sr.exec(X))!=null;)if(le=Se[1]||Se[2]||Se[3]||Se[4]||Se[5]||Se[6],!!le){if(It=le.length,Se[3]||Se[4]){$t+=It;continue}else if((Se[5]||Se[6])&&Qe%3&&!((Qe+It)%3)){zt+=It;continue}if($t-=It,!($t>0))return It=Math.min(It,It+$t+zt),Math.min(Qe,It)%2?{type:"em",raw:j.slice(0,Qe+Se.index+It+1),text:j.slice(1,Qe+Se.index+It)}:{type:"strong",raw:j.slice(0,Qe+Se.index+It+1),text:j.slice(2,Qe+Se.index+It-1)}}}}},Ae.codespan=function(j){var X=this.rules.inline.code.exec(j);if(X){var he=X[2].replace(/\n/g," "),Se=/[^ ]/.test(he),$=/^ /.test(he)&&/ $/.test(he);return Se&&$&&(he=he.substring(1,he.length-1)),he=w(he,!0),{type:"codespan",raw:X[0],text:he}}},Ae.br=function(j){var X=this.rules.inline.br.exec(j);if(X)return{type:"br",raw:X[0]}},Ae.del=function(j){var X=this.rules.inline.del.exec(j);if(X)return{type:"del",raw:X[0],text:X[2]}},Ae.autolink=function(j,X){var he=this.rules.inline.autolink.exec(j);if(he){var Se,$;return he[2]==="@"?(Se=w(this.options.mangle?X(he[1]):he[1]),$="mailto:"+Se):(Se=w(he[1]),$=Se),{type:"link",raw:he[0],text:Se,href:$,tokens:[{type:"text",raw:Se,text:Se}]}}},Ae.url=function(j,X){var he;if(he=this.rules.inline.url.exec(j)){var Se,$;if(he[2]==="@")Se=w(this.options.mangle?X(he[0]):he[0]),$="mailto:"+Se;else{var Qe;do Qe=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(Qe!==he[0]);Se=w(he[0]),he[1]==="www."?$="http://"+Se:$=Se}return{type:"link",raw:he[0],text:Se,href:$,tokens:[{type:"text",raw:Se,text:Se}]}}},Ae.inlineText=function(j,X,he){var Se=this.rules.inline.text.exec(j);if(Se){var $;return X?$=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Se[0]):w(Se[0]):Se[0]:$=w(this.options.smartypants?he(Se[0]):Se[0]),{type:"text",raw:Se[0],text:$}}},fe}(),ot=ue.noopTest,at=ue.edit,pt=ue.merge,At={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:ot,table:ot,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};At._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,At._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,At.def=at(At.def).replace("label",At._label).replace("title",At._title).getRegex(),At.bullet=/(?:[*+-]|\d{1,9}[.)])/,At.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,At.item=at(At.item,"gm").replace(/bull/g,At.bullet).getRegex(),At.listItemStart=at(/^( *)(bull) */).replace("bull",At.bullet).getRegex(),At.list=at(At.list).replace(/bull/g,At.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+At.def.source+")").getRegex(),At._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",At._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,At.html=at(At.html,"i").replace("comment",At._comment).replace("tag",At._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),At.paragraph=at(At._paragraph).replace("hr",At.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",At._tag).getRegex(),At.blockquote=at(At.blockquote).replace("paragraph",At.paragraph).getRegex(),At.normal=pt({},At),At.gfm=pt({},At.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*|$)"}),At.gfm.nptable=at(At.gfm.nptable).replace("hr",At.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",At._tag).getRegex(),At.gfm.table=at(At.gfm.table).replace("hr",At.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",At._tag).getRegex(),At.pedantic=pt({},At.normal,{html:at(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",At._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:ot,paragraph:at(At.normal._paragraph).replace("hr",At.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",At.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ut={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ot,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:ot,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ut._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ut.punctuation=at(ut.punctuation).replace(/punctuation/g,ut._punctuation).getRegex(),ut.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ut.escapedEmSt=/\\\*|\\_/g,ut._comment=at(At._comment).replace("(?:-->|$)","-->").getRegex(),ut.emStrong.lDelim=at(ut.emStrong.lDelim).replace(/punct/g,ut._punctuation).getRegex(),ut.emStrong.rDelimAst=at(ut.emStrong.rDelimAst,"g").replace(/punct/g,ut._punctuation).getRegex(),ut.emStrong.rDelimUnd=at(ut.emStrong.rDelimUnd,"g").replace(/punct/g,ut._punctuation).getRegex(),ut._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ut._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ut._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])?)+(?![-_])/,ut.autolink=at(ut.autolink).replace("scheme",ut._scheme).replace("email",ut._email).getRegex(),ut._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ut.tag=at(ut.tag).replace("comment",ut._comment).replace("attribute",ut._attribute).getRegex(),ut._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ut._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ut._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ut.link=at(ut.link).replace("label",ut._label).replace("href",ut._href).replace("title",ut._title).getRegex(),ut.reflink=at(ut.reflink).replace("label",ut._label).getRegex(),ut.reflinkSearch=at(ut.reflinkSearch,"g").replace("reflink",ut.reflink).replace("nolink",ut.nolink).getRegex(),ut.normal=pt({},ut),ut.pedantic=pt({},ut.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:at(/^!?\[(label)\]\((.*?)\)/).replace("label",ut._label).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ut._label).getRegex()}),ut.gfm=pt({},ut.normal,{escape:at(ut.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ut.gfm.url=at(ut.gfm.url,"i").replace("email",ut.gfm._extended_email).getRegex(),ut.breaks=pt({},ut.gfm,{br:at(ut.br).replace("{2,}","*").getRegex(),text:at(ut.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var jt={block:At,inline:ut},tt=He,Ft=be.exports.defaults,Me=jt.block,mt=jt.inline,ke=ue.repeatString;function Ce(fe){return fe.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 _e(fe){var Ae="",Pe,j,X=fe.length;for(Pe=0;Pe<X;Pe++)j=fe.charCodeAt(Pe),Math.random()>.5&&(j="x"+j.toString(16)),Ae+="&#"+j+";";return Ae}var Ne=function(){function fe(Pe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Pe||Ft,this.options.tokenizer=this.options.tokenizer||new tt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var j={block:Me.normal,inline:mt.normal};this.options.pedantic?(j.block=Me.pedantic,j.inline=mt.pedantic):this.options.gfm&&(j.block=Me.gfm,this.options.breaks?j.inline=mt.breaks:j.inline=mt.gfm),this.tokenizer.rules=j}fe.lex=function(j,X){var he=new fe(X);return he.lex(j)},fe.lexInline=function(j,X){var he=new fe(X);return he.inlineTokens(j)};var Ae=fe.prototype;return Ae.lex=function(j){return j=j.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(j,this.tokens,!0),this.inline(this.tokens),this.tokens},Ae.blockTokens=function(j,X,he){X===void 0&&(X=[]),he===void 0&&(he=!0),this.options.pedantic&&(j=j.replace(/^ +$/gm,""));for(var Se,$,Qe,le;j;){if(Se=this.tokenizer.space(j)){j=j.substring(Se.raw.length),Se.type&&X.push(Se);continue}if(Se=this.tokenizer.code(j)){j=j.substring(Se.raw.length),le=X[X.length-1],le&&le.type==="paragraph"?(le.raw+=`
`+Se.raw,le.text+=`
`+Se.text):X.push(Se);continue}if(Se=this.tokenizer.fences(j)){j=j.substring(Se.raw.length),X.push(Se);continue}if(Se=this.tokenizer.heading(j)){j=j.substring(Se.raw.length),X.push(Se);continue}if(Se=this.tokenizer.nptable(j)){j=j.substring(Se.raw.length),X.push(Se);continue}if(Se=this.tokenizer.hr(j)){j=j.substring(Se.raw.length),X.push(Se);continue}if(Se=this.tokenizer.blockquote(j)){j=j.substring(Se.raw.length),Se.tokens=this.blockTokens(Se.text,[],he),X.push(Se);continue}if(Se=this.tokenizer.list(j)){for(j=j.substring(Se.raw.length),Qe=Se.items.length,$=0;$<Qe;$++)Se.items[$].tokens=this.blockTokens(Se.items[$].text,[],!1);X.push(Se);continue}if(Se=this.tokenizer.html(j)){j=j.substring(Se.raw.length),X.push(Se);continue}if(he&&(Se=this.tokenizer.def(j))){j=j.substring(Se.raw.length),this.tokens.links[Se.tag]||(this.tokens.links[Se.tag]={href:Se.href,title:Se.title});continue}if(Se=this.tokenizer.table(j)){j=j.substring(Se.raw.length),X.push(Se);continue}if(Se=this.tokenizer.lheading(j)){j=j.substring(Se.raw.length),X.push(Se);continue}if(he&&(Se=this.tokenizer.paragraph(j))){j=j.substring(Se.raw.length),X.push(Se);continue}if(Se=this.tokenizer.text(j)){j=j.substring(Se.raw.length),le=X[X.length-1],le&&le.type==="text"?(le.raw+=`
`+Se.raw,le.text+=`
`+Se.text):X.push(Se);continue}if(j){var It="Infinite loop on byte: "+j.charCodeAt(0);if(this.options.silent){console.error(It);break}else throw new Error(It)}}return X},Ae.inline=function(j){var X,he,Se,$,Qe,le,It=j.length;for(X=0;X<It;X++)switch(le=j[X],le.type){case"paragraph":case"text":case"heading":{le.tokens=[],this.inlineTokens(le.text,le.tokens);break}case"table":{for(le.tokens={header:[],cells:[]},$=le.header.length,he=0;he<$;he++)le.tokens.header[he]=[],this.inlineTokens(le.header[he],le.tokens.header[he]);for($=le.cells.length,he=0;he<$;he++)for(Qe=le.cells[he],le.tokens.cells[he]=[],Se=0;Se<Qe.length;Se++)le.tokens.cells[he][Se]=[],this.inlineTokens(Qe[Se],le.tokens.cells[he][Se]);break}case"blockquote":{this.inline(le.tokens);break}case"list":{for($=le.items.length,he=0;he<$;he++)this.inline(le.items[he].tokens);break}}return j},Ae.inlineTokens=function(j,X,he,Se){X===void 0&&(X=[]),he===void 0&&(he=!1),Se===void 0&&(Se=!1);var $,Qe,le=j,It,$t,zt;if(this.tokens.links){var sr=Object.keys(this.tokens.links);if(sr.length>0)for(;(It=this.tokenizer.rules.inline.reflinkSearch.exec(le))!=null;)sr.includes(It[0].slice(It[0].lastIndexOf("[")+1,-1))&&(le=le.slice(0,It.index)+"["+ke("a",It[0].length-2)+"]"+le.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(It=this.tokenizer.rules.inline.blockSkip.exec(le))!=null;)le=le.slice(0,It.index)+"["+ke("a",It[0].length-2)+"]"+le.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(It=this.tokenizer.rules.inline.escapedEmSt.exec(le))!=null;)le=le.slice(0,It.index)+"++"+le.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;j;){if($t||(zt=""),$t=!1,$=this.tokenizer.escape(j)){j=j.substring($.raw.length),X.push($);continue}if($=this.tokenizer.tag(j,he,Se)){j=j.substring($.raw.length),he=$.inLink,Se=$.inRawBlock;var or=X[X.length-1];or&&$.type==="text"&&or.type==="text"?(or.raw+=$.raw,or.text+=$.text):X.push($);continue}if($=this.tokenizer.link(j)){j=j.substring($.raw.length),$.type==="link"&&($.tokens=this.inlineTokens($.text,[],!0,Se)),X.push($);continue}if($=this.tokenizer.reflink(j,this.tokens.links)){j=j.substring($.raw.length);var Kt=X[X.length-1];$.type==="link"?($.tokens=this.inlineTokens($.text,[],!0,Se),X.push($)):Kt&&$.type==="text"&&Kt.type==="text"?(Kt.raw+=$.raw,Kt.text+=$.text):X.push($);continue}if($=this.tokenizer.emStrong(j,le,zt)){j=j.substring($.raw.length),$.tokens=this.inlineTokens($.text,[],he,Se),X.push($);continue}if($=this.tokenizer.codespan(j)){j=j.substring($.raw.length),X.push($);continue}if($=this.tokenizer.br(j)){j=j.substring($.raw.length),X.push($);continue}if($=this.tokenizer.del(j)){j=j.substring($.raw.length),$.tokens=this.inlineTokens($.text,[],he,Se),X.push($);continue}if($=this.tokenizer.autolink(j,_e)){j=j.substring($.raw.length),X.push($);continue}if(!he&&($=this.tokenizer.url(j,_e))){j=j.substring($.raw.length),X.push($);continue}if($=this.tokenizer.inlineText(j,Se,Ce)){j=j.substring($.raw.length),$.raw.slice(-1)!=="_"&&(zt=$.raw.slice(-1)),$t=!0,Qe=X[X.length-1],Qe&&Qe.type==="text"?(Qe.raw+=$.raw,Qe.text+=$.text):X.push($);continue}if(j){var ur="Infinite loop on byte: "+j.charCodeAt(0);if(this.options.silent){console.error(ur);break}else throw new Error(ur)}}return X},k(fe,null,[{key:"rules",get:function(){return{block:Me,inline:mt}}}]),fe}(),Ke=be.exports.defaults,nt=ue.cleanUrl,te=ue.escape,Ie=function(){function fe(Pe){this.options=Pe||Ke}var Ae=fe.prototype;return Ae.code=function(j,X,he){var Se=(X||"").match(/\S*/)[0];if(this.options.highlight){var $=this.options.highlight(j,Se);$!=null&&$!==j&&(he=!0,j=$)}return j=j.replace(/\n$/,"")+`
`,Se?'<pre><code class="'+this.options.langPrefix+te(Se,!0)+'">'+(he?j:te(j,!0))+`</code></pre>
`:"<pre><code>"+(he?j:te(j,!0))+`</code></pre>
`},Ae.blockquote=function(j){return`<blockquote>
`+j+`</blockquote>
`},Ae.html=function(j){return j},Ae.heading=function(j,X,he,Se){return this.options.headerIds?"<h"+X+' id="'+this.options.headerPrefix+Se.slug(he)+'">'+j+"</h"+X+`>
`:"<h"+X+">"+j+"</h"+X+`>
`},Ae.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Ae.list=function(j,X,he){var Se=X?"ol":"ul",$=X&&he!==1?' start="'+he+'"':"";return"<"+Se+$+`>
`+j+"</"+Se+`>
`},Ae.listitem=function(j){return"<li>"+j+`</li>
`},Ae.checkbox=function(j){return"<input "+(j?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ae.paragraph=function(j){return"<p>"+j+`</p>
`},Ae.table=function(j,X){return X&&(X="<tbody>"+X+"</tbody>"),`<table>
<thead>
`+j+`</thead>
`+X+`</table>
`},Ae.tablerow=function(j){return`<tr>
`+j+`</tr>
`},Ae.tablecell=function(j,X){var he=X.header?"th":"td",Se=X.align?"<"+he+' align="'+X.align+'">':"<"+he+">";return Se+j+"</"+he+`>
`},Ae.strong=function(j){return"<strong>"+j+"</strong>"},Ae.em=function(j){return"<em>"+j+"</em>"},Ae.codespan=function(j){return"<code>"+j+"</code>"},Ae.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ae.del=function(j){return"<del>"+j+"</del>"},Ae.link=function(j,X,he){if(j=nt(this.options.sanitize,this.options.baseUrl,j),j===null)return he;var Se='<a href="'+te(j)+'"';return X&&(Se+=' title="'+X+'"'),Se+=">"+he+"</a>",Se},Ae.image=function(j,X,he){if(j=nt(this.options.sanitize,this.options.baseUrl,j),j===null)return he;var Se='<img src="'+j+'" alt="'+he+'"';return X&&(Se+=' title="'+X+'"'),Se+=this.options.xhtml?"/>":">",Se},Ae.text=function(j){return j},fe}(),Ue=function(){function fe(){}var Ae=fe.prototype;return Ae.strong=function(j){return j},Ae.em=function(j){return j},Ae.codespan=function(j){return j},Ae.del=function(j){return j},Ae.html=function(j){return j},Ae.text=function(j){return j},Ae.link=function(j,X,he){return""+he},Ae.image=function(j,X,he){return""+he},Ae.br=function(){return""},fe}(),ze=function(){function fe(){this.seen={}}var Ae=fe.prototype;return Ae.serialize=function(j){return j.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ae.getNextSafeSlug=function(j,X){var he=j,Se=0;if(this.seen.hasOwnProperty(he)){Se=this.seen[j];do Se++,he=j+"-"+Se;while(this.seen.hasOwnProperty(he))}return X||(this.seen[j]=Se,this.seen[he]=0),he},Ae.slug=function(j,X){X===void 0&&(X={});var he=this.serialize(j);return this.getNextSafeSlug(he,X.dryrun)},fe}(),qe=Ie,gt=Ue,Rt=ze,vt=be.exports.defaults,_t=ue.unescape,St=function(){function fe(Pe){this.options=Pe||vt,this.options.renderer=this.options.renderer||new qe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new gt,this.slugger=new Rt}fe.parse=function(j,X){var he=new fe(X);return he.parse(j)},fe.parseInline=function(j,X){var he=new fe(X);return he.parseInline(j)};var Ae=fe.prototype;return Ae.parse=function(j,X){X===void 0&&(X=!0);var he="",Se,$,Qe,le,It,$t,zt,sr,or,Kt,ur,Zr,Tr,fr,Ot,yt,bt,Jt,Sr=j.length;for(Se=0;Se<Sr;Se++)switch(Kt=j[Se],Kt.type){case"space":continue;case"hr":{he+=this.renderer.hr();continue}case"heading":{he+=this.renderer.heading(this.parseInline(Kt.tokens),Kt.depth,_t(this.parseInline(Kt.tokens,this.textRenderer)),this.slugger);continue}case"code":{he+=this.renderer.code(Kt.text,Kt.lang,Kt.escaped);continue}case"table":{for(sr="",zt="",le=Kt.header.length,$=0;$<le;$++)zt+=this.renderer.tablecell(this.parseInline(Kt.tokens.header[$]),{header:!0,align:Kt.align[$]});for(sr+=this.renderer.tablerow(zt),or="",le=Kt.cells.length,$=0;$<le;$++){for($t=Kt.tokens.cells[$],zt="",It=$t.length,Qe=0;Qe<It;Qe++)zt+=this.renderer.tablecell(this.parseInline($t[Qe]),{header:!1,align:Kt.align[Qe]});or+=this.renderer.tablerow(zt)}he+=this.renderer.table(sr,or);continue}case"blockquote":{or=this.parse(Kt.tokens),he+=this.renderer.blockquote(or);continue}case"list":{for(ur=Kt.ordered,Zr=Kt.start,Tr=Kt.loose,le=Kt.items.length,or="",$=0;$<le;$++)Ot=Kt.items[$],yt=Ot.checked,bt=Ot.task,fr="",Ot.task&&(Jt=this.renderer.checkbox(yt),Tr?Ot.tokens.length>0&&Ot.tokens[0].type==="text"?(Ot.tokens[0].text=Jt+" "+Ot.tokens[0].text,Ot.tokens[0].tokens&&Ot.tokens[0].tokens.length>0&&Ot.tokens[0].tokens[0].type==="text"&&(Ot.tokens[0].tokens[0].text=Jt+" "+Ot.tokens[0].tokens[0].text)):Ot.tokens.unshift({type:"text",text:Jt}):fr+=Jt),fr+=this.parse(Ot.tokens,Tr),or+=this.renderer.listitem(fr,bt,yt);he+=this.renderer.list(or,ur,Zr);continue}case"html":{he+=this.renderer.html(Kt.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(Kt.tokens));continue}case"text":{for(or=Kt.tokens?this.parseInline(Kt.tokens):Kt.text;Se+1<Sr&&j[Se+1].type==="text";)Kt=j[++Se],or+=`
`+(Kt.tokens?this.parseInline(Kt.tokens):Kt.text);he+=X?this.renderer.paragraph(or):or;continue}default:{var Dr='Token with "'+Kt.type+'" type was not found.';if(this.options.silent){console.error(Dr);return}else throw new Error(Dr)}}return he},Ae.parseInline=function(j,X){X=X||this.renderer;var he="",Se,$,Qe=j.length;for(Se=0;Se<Qe;Se++)switch($=j[Se],$.type){case"escape":{he+=X.text($.text);break}case"html":{he+=X.html($.text);break}case"link":{he+=X.link($.href,$.title,this.parseInline($.tokens,X));break}case"image":{he+=X.image($.href,$.title,$.text);break}case"strong":{he+=X.strong(this.parseInline($.tokens,X));break}case"em":{he+=X.em(this.parseInline($.tokens,X));break}case"codespan":{he+=X.codespan($.text);break}case"br":{he+=X.br();break}case"del":{he+=X.del(this.parseInline($.tokens,X));break}case"text":{he+=X.text($.text);break}default:{var le='Token with "'+$.type+'" type was not found.';if(this.options.silent){console.error(le);return}else throw new Error(le)}}return he},fe}(),Nt=Ne,Pt=St,Ct=He,Ge=Ie,Tt=Ue,Et=ze,ct=ue.merge,Lt=ue.checkSanitizeDeprecation,_=ue.escape,T=be.exports.getDefaults,Q=be.exports.changeDefaults,C=be.exports.defaults;function G(fe,Ae,Pe){if(typeof fe=="undefined"||fe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof fe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(fe)+", string expected");if(typeof Ae=="function"&&(Pe=Ae,Ae=null),Ae=ct({},G.defaults,Ae||{}),Lt(Ae),Pe){var j=Ae.highlight,X;try{X=Nt.lex(fe,Ae)}catch(Qe){return Pe(Qe)}var he=function(le){var It;if(!le)try{Ae.walkTokens&&G.walkTokens(X,Ae.walkTokens),It=Pt.parse(X,Ae)}catch($t){le=$t}return Ae.highlight=j,le?Pe(le):Pe(null,It)};if(!j||j.length<3||(delete Ae.highlight,!X.length))return he();var Se=0;G.walkTokens(X,function(Qe){Qe.type==="code"&&(Se++,setTimeout(function(){j(Qe.text,Qe.lang,function(le,It){if(le)return he(le);It!=null&&It!==Qe.text&&(Qe.text=It,Qe.escaped=!0),Se--,Se===0&&he()})},0))}),Se===0&&he();return}try{var $=Nt.lex(fe,Ae);return Ae.walkTokens&&G.walkTokens($,Ae.walkTokens),Pt.parse($,Ae)}catch(Qe){if(Qe.message+=`
Please report this to https://github.com/markedjs/marked.`,Ae.silent)return"<p>An error occurred:</p><pre>"+_(Qe.message+"",!0)+"</pre>";throw Qe}}G.options=G.setOptions=function(fe){return ct(G.defaults,fe),Q(G.defaults),G},G.getDefaults=T,G.defaults=C,G.use=function(fe){var Ae=ct({},fe);if(fe.renderer&&function(){var j=G.defaults.renderer||new Ge,X=function($){var Qe=j[$];j[$]=function(){for(var le=arguments.length,It=new Array(le),$t=0;$t<le;$t++)It[$t]=arguments[$t];var zt=fe.renderer[$].apply(j,It);return zt===!1&&(zt=Qe.apply(j,It)),zt}};for(var he in fe.renderer)X(he);Ae.renderer=j}(),fe.tokenizer&&function(){var j=G.defaults.tokenizer||new Ct,X=function($){var Qe=j[$];j[$]=function(){for(var le=arguments.length,It=new Array(le),$t=0;$t<le;$t++)It[$t]=arguments[$t];var zt=fe.tokenizer[$].apply(j,It);return zt===!1&&(zt=Qe.apply(j,It)),zt}};for(var he in fe.tokenizer)X(he);Ae.tokenizer=j}(),fe.walkTokens){var Pe=G.defaults.walkTokens;Ae.walkTokens=function(j){fe.walkTokens(j),Pe&&Pe(j)}}G.setOptions(Ae)},G.walkTokens=function(fe,Ae){for(var Pe=ie(fe),j;!(j=Pe()).done;){var X=j.value;switch(Ae(X),X.type){case"table":{for(var he=ie(X.tokens.header),Se;!(Se=he()).done;){var $=Se.value;G.walkTokens($,Ae)}for(var Qe=ie(X.tokens.cells),le;!(le=Qe()).done;)for(var It=le.value,$t=ie(It),zt;!(zt=$t()).done;){var sr=zt.value;G.walkTokens(sr,Ae)}break}case"list":{G.walkTokens(X.items,Ae);break}default:X.tokens&&G.walkTokens(X.tokens,Ae)}}},G.parseInline=function(fe,Ae){if(typeof fe=="undefined"||fe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof fe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(fe)+", string expected");Ae=ct({},G.defaults,Ae||{}),Lt(Ae);try{var Pe=Nt.lexInline(fe,Ae);return Ae.walkTokens&&G.walkTokens(Pe,Ae.walkTokens),Pt.parseInline(Pe,Ae)}catch(j){if(j.message+=`
Please report this to https://github.com/markedjs/marked.`,Ae.silent)return"<p>An error occurred:</p><pre>"+_(j.message+"",!0)+"</pre>";throw j}},G.Parser=Pt,G.parser=Pt.parse,G.Renderer=Ge,G.TextRenderer=Tt,G.Lexer=Nt,G.lexer=Nt.lex,G.Tokenizer=Ct,G.Slugger=Et,G.parse=G;var Xe=G;return Xe})},11690:function(Vt){const it=/[&<>"']/,k=/[&<>"']/g,y=/[<>"']|&(?!#?\w+;)/,Ee=/[<>"']|&(?!#?\w+;)/g,ie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},be=pe=>ie[pe];function J(pe,De){if(De){if(it.test(pe))return pe.replace(k,be)}else if(y.test(pe))return pe.replace(Ee,be);return pe}const v=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function de(pe){return pe.replace(v,(De,Oe)=>(Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""))}const ce=/(^|[^\[])\^/g;function l(pe,De){pe=pe.source||pe,De=De||"";const Oe={replace:(Fe,st)=>(st=st.source||st,st=st.replace(ce,"$1"),pe=pe.replace(Fe,st),Oe),getRegex:()=>new RegExp(pe,De)};return Oe}const V=/[^\w:]/g,B=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(pe,De,Oe){if(pe){let Fe;try{Fe=decodeURIComponent(de(Oe)).replace(V,"").toLowerCase()}catch(st){return null}if(Fe.indexOf("javascript:")===0||Fe.indexOf("vbscript:")===0||Fe.indexOf("data:")===0)return null}De&&!B.test(Oe)&&(Oe=H(De,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(Fe){return null}return Oe}const L={},x=/^[^:]+:\/*[^/]*$/,P=/^([^:]+:)[\s\S]*$/,q=/^([^:]+:\/*[^/]*)[\s\S]*$/;function H(pe,De){L[" "+pe]||(x.test(pe)?L[" "+pe]=pe+"/":L[" "+pe]=O(pe,"/",!0)),pe=L[" "+pe];const Oe=pe.indexOf(":")===-1;return De.substring(0,2)==="//"?Oe?De:pe.replace(P,"$1")+De:De.charAt(0)==="/"?Oe?De:pe.replace(q,"$1")+De:pe+De}const U={exec:function(){}};function A(pe){let De=1,Oe,Fe;for(;De<arguments.length;De++){Oe=arguments[De];for(Fe in Oe)Object.prototype.hasOwnProperty.call(Oe,Fe)&&(pe[Fe]=Oe[Fe])}return pe}function z(pe,De){const Oe=pe.replace(/\|/g,(re,W,ee)=>{let ue=!1,ne=W;for(;--ne>=0&&ee[ne]==="\\";)ue=!ue;return ue?"|":" |"}),Fe=Oe.split(/ \|/);let st=0;if(Fe.length>De)Fe.splice(De);else for(;Fe.length<De;)Fe.push("");for(;st<Fe.length;st++)Fe[st]=Fe[st].trim().replace(/\\\|/g,"|");return Fe}function O(pe,De,Oe){const Fe=pe.length;if(Fe===0)return"";let st=0;for(;st<Fe;){const re=pe.charAt(Fe-st-1);if(re===De&&!Oe)st++;else if(re!==De&&Oe)st++;else break}return pe.substr(0,Fe-st)}function N(pe,De){if(pe.indexOf(De[1])===-1)return-1;const Oe=pe.length;let Fe=0,st=0;for(;st<Oe;st++)if(pe[st]==="\\")st++;else if(pe[st]===De[0])Fe++;else if(pe[st]===De[1]&&(Fe--,Fe<0))return st;return-1}function oe(pe){pe&&pe.sanitize&&!pe.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ve(pe,De){if(De<1)return"";let Oe="";for(;De>1;)De&1&&(Oe+=pe),De>>=1,pe+=pe;return Oe+pe}Vt.exports={escape:J,unescape:de,edit:l,cleanUrl:E,resolveUrl:H,noopTest:U,merge:A,splitCells:z,rtrim:O,findClosingBracket:N,checkSanitizeDeprecation:oe,repeatString:ve}},75918:function(Vt,it,k){"use strict";k.d(it,{Wi:function(){return v},Z0:function(){return de},aU:function(){return J},eZ:function(){return l},wY:function(){return ce}});var y=k(4348),Ee=k(69323),ie=k(13268),be=function(V,B,E,L){function x(P){return P instanceof E?P:new E(function(q){q(P)})}return new(E||(E=Promise))(function(P,q){function H(z){try{A(L.next(z))}catch(O){q(O)}}function U(z){try{A(L.throw(z))}catch(O){q(O)}}function A(z){z.done?P(z.value):x(z.value).then(H,U)}A((L=L.apply(V,B||[])).next())})};class J extends Ee.JT{constructor(B,E="",L="",x=!0,P){super(),this._onDidChange=this._register(new y.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=B,this._label=E,this._cssClass=L,this._enabled=x,this._actionCallback=P}get id(){return this._id}get label(){return this._label}set label(B){this._setLabel(B)}_setLabel(B){this._label!==B&&(this._label=B,this._onDidChange.fire({label:B}))}get tooltip(){return this._tooltip||""}set tooltip(B){this._setTooltip(B)}_setTooltip(B){this._tooltip!==B&&(this._tooltip=B,this._onDidChange.fire({tooltip:B}))}get class(){return this._cssClass}set class(B){this._setClass(B)}_setClass(B){this._cssClass!==B&&(this._cssClass=B,this._onDidChange.fire({class:B}))}get enabled(){return this._enabled}set enabled(B){this._setEnabled(B)}_setEnabled(B){this._enabled!==B&&(this._enabled=B,this._onDidChange.fire({enabled:B}))}get checked(){return this._checked}set checked(B){this._setChecked(B)}_setChecked(B){this._checked!==B&&(this._checked=B,this._onDidChange.fire({checked:B}))}run(B,E){return be(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(B))})}}class v extends Ee.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new y.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new y.Q5),this.onDidRun=this._onDidRun.event}run(B,E){return be(this,void 0,void 0,function*(){if(!B.enabled)return;this._onBeforeRun.fire({action:B});let L;try{yield this.runAction(B,E)}catch(x){L=x}this._onDidRun.fire({action:B,error:L})})}runAction(B,E){return be(this,void 0,void 0,function*(){yield B.run(E)})}}class de extends J{constructor(B){super(de.ID,B,B?"separator text":"separator"),this.checked=!1,this.enabled=!1}}de.ID="vs.actions.separator";class ce{constructor(B,E,L,x){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=B,this.label=E,this.class=x,this._actions=L}get actions(){return this._actions}dispose(){}run(){return be(this,void 0,void 0,function*(){})}}class l extends J{constructor(){super(l.ID,ie.N("submenu.empty","(empty)"),void 0,!1)}}l.ID="vs.actions.empty"},76068:function(Vt,it,k){"use strict";k.d(it,{ok:function(){return y}});function y(Ee,ie){if(!Ee)throw new Error(ie?`Assertion failed (${ie})`:"Assertion Failed")}},52615:function(Vt,it,k){"use strict";k.d(it,{CM:function(){return J},JL:function(){return v},dT:function(){return ce},fK:function(){return be},lA:function(){return de}});var y=k(4348);class Ee{constructor(){this._icons=new Map,this._onDidRegister=new y.Q5}add(V){const B=this._icons.get(V.id);B?V.description?B.description=V.description:console.error(`Duplicate registration of codicon ${V.id}`):(this._icons.set(V.id,V),this._onDidRegister.fire(V))}get(V){return this._icons.get(V)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const ie=new Ee,be=ie;function J(l,V){return new de(l,V)}function v(l){return l?l.replace(/\$\((.*?)\)/g,(V,B)=>` ${B} `).trim():""}class de{constructor(V,B,E){this.id=V,this.definition=B,this.description=E,ie.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ce;(function(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9\\-]+",l.iconModifierExpression="~[A-Za-z]+";const V=new RegExp(`^(${l.iconNameExpression})(${l.iconModifierExpression})?$`);function B(x){if(x instanceof de)return["codicon","codicon-"+x.id];const P=V.exec(x.id);if(!P)return B(de.error);let[,q,H]=P;const U=["codicon","codicon-"+q];return H&&U.push("codicon-modifier-"+H.substr(1)),U}l.asClassNameArray=B;function E(x){return B(x).join(" ")}l.asClassName=E;function L(x){return"."+B(x).join(".")}l.asCSSSelector=L})(ce||(ce={})),function(l){l.add=new l("add",{fontCharacter:"\\ea60"}),l.plus=new l("plus",l.add.definition),l.gistNew=new l("gist-new",l.add.definition),l.repoCreate=new l("repo-create",l.add.definition),l.lightbulb=new l("lightbulb",{fontCharacter:"\\ea61"}),l.lightBulb=new l("light-bulb",{fontCharacter:"\\ea61"}),l.repo=new l("repo",{fontCharacter:"\\ea62"}),l.repoDelete=new l("repo-delete",{fontCharacter:"\\ea62"}),l.gistFork=new l("gist-fork",{fontCharacter:"\\ea63"}),l.repoForked=new l("repo-forked",{fontCharacter:"\\ea63"}),l.gitPullRequest=new l("git-pull-request",{fontCharacter:"\\ea64"}),l.gitPullRequestAbandoned=new l("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),l.recordKeys=new l("record-keys",{fontCharacter:"\\ea65"}),l.keyboard=new l("keyboard",{fontCharacter:"\\ea65"}),l.tag=new l("tag",{fontCharacter:"\\ea66"}),l.tagAdd=new l("tag-add",{fontCharacter:"\\ea66"}),l.tagRemove=new l("tag-remove",{fontCharacter:"\\ea66"}),l.person=new l("person",{fontCharacter:"\\ea67"}),l.personFollow=new l("person-follow",{fontCharacter:"\\ea67"}),l.personOutline=new l("person-outline",{fontCharacter:"\\ea67"}),l.personFilled=new l("person-filled",{fontCharacter:"\\ea67"}),l.gitBranch=new l("git-branch",{fontCharacter:"\\ea68"}),l.gitBranchCreate=new l("git-branch-create",{fontCharacter:"\\ea68"}),l.gitBranchDelete=new l("git-branch-delete",{fontCharacter:"\\ea68"}),l.sourceControl=new l("source-control",{fontCharacter:"\\ea68"}),l.mirror=new l("mirror",{fontCharacter:"\\ea69"}),l.mirrorPublic=new l("mirror-public",{fontCharacter:"\\ea69"}),l.star=new l("star",{fontCharacter:"\\ea6a"}),l.starAdd=new l("star-add",{fontCharacter:"\\ea6a"}),l.starDelete=new l("star-delete",{fontCharacter:"\\ea6a"}),l.starEmpty=new l("star-empty",{fontCharacter:"\\ea6a"}),l.comment=new l("comment",{fontCharacter:"\\ea6b"}),l.commentAdd=new l("comment-add",{fontCharacter:"\\ea6b"}),l.alert=new l("alert",{fontCharacter:"\\ea6c"}),l.warning=new l("warning",{fontCharacter:"\\ea6c"}),l.search=new l("search",{fontCharacter:"\\ea6d"}),l.searchSave=new l("search-save",{fontCharacter:"\\ea6d"}),l.logOut=new l("log-out",{fontCharacter:"\\ea6e"}),l.signOut=new l("sign-out",{fontCharacter:"\\ea6e"}),l.logIn=new l("log-in",{fontCharacter:"\\ea6f"}),l.signIn=new l("sign-in",{fontCharacter:"\\ea6f"}),l.eye=new l("eye",{fontCharacter:"\\ea70"}),l.eyeUnwatch=new l("eye-unwatch",{fontCharacter:"\\ea70"}),l.eyeWatch=new l("eye-watch",{fontCharacter:"\\ea70"}),l.circleFilled=new l("circle-filled",{fontCharacter:"\\ea71"}),l.primitiveDot=new l("primitive-dot",{fontCharacter:"\\ea71"}),l.closeDirty=new l("close-dirty",{fontCharacter:"\\ea71"}),l.debugBreakpoint=new l("debug-breakpoint",{fontCharacter:"\\ea71"}),l.debugBreakpointDisabled=new l("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),l.debugHint=new l("debug-hint",{fontCharacter:"\\ea71"}),l.primitiveSquare=new l("primitive-square",{fontCharacter:"\\ea72"}),l.edit=new l("edit",{fontCharacter:"\\ea73"}),l.pencil=new l("pencil",{fontCharacter:"\\ea73"}),l.info=new l("info",{fontCharacter:"\\ea74"}),l.issueOpened=new l("issue-opened",{fontCharacter:"\\ea74"}),l.gistPrivate=new l("gist-private",{fontCharacter:"\\ea75"}),l.gitForkPrivate=new l("git-fork-private",{fontCharacter:"\\ea75"}),l.lock=new l("lock",{fontCharacter:"\\ea75"}),l.mirrorPrivate=new l("mirror-private",{fontCharacter:"\\ea75"}),l.close=new l("close",{fontCharacter:"\\ea76"}),l.removeClose=new l("remove-close",{fontCharacter:"\\ea76"}),l.x=new l("x",{fontCharacter:"\\ea76"}),l.repoSync=new l("repo-sync",{fontCharacter:"\\ea77"}),l.sync=new l("sync",{fontCharacter:"\\ea77"}),l.clone=new l("clone",{fontCharacter:"\\ea78"}),l.desktopDownload=new l("desktop-download",{fontCharacter:"\\ea78"}),l.beaker=new l("beaker",{fontCharacter:"\\ea79"}),l.microscope=new l("microscope",{fontCharacter:"\\ea79"}),l.vm=new l("vm",{fontCharacter:"\\ea7a"}),l.deviceDesktop=new l("device-desktop",{fontCharacter:"\\ea7a"}),l.file=new l("file",{fontCharacter:"\\ea7b"}),l.fileText=new l("file-text",{fontCharacter:"\\ea7b"}),l.more=new l("more",{fontCharacter:"\\ea7c"}),l.ellipsis=new l("ellipsis",{fontCharacter:"\\ea7c"}),l.kebabHorizontal=new l("kebab-horizontal",{fontCharacter:"\\ea7c"}),l.mailReply=new l("mail-reply",{fontCharacter:"\\ea7d"}),l.reply=new l("reply",{fontCharacter:"\\ea7d"}),l.organization=new l("organization",{fontCharacter:"\\ea7e"}),l.organizationFilled=new l("organization-filled",{fontCharacter:"\\ea7e"}),l.organizationOutline=new l("organization-outline",{fontCharacter:"\\ea7e"}),l.newFile=new l("new-file",{fontCharacter:"\\ea7f"}),l.fileAdd=new l("file-add",{fontCharacter:"\\ea7f"}),l.newFolder=new l("new-folder",{fontCharacter:"\\ea80"}),l.fileDirectoryCreate=new l("file-directory-create",{fontCharacter:"\\ea80"}),l.trash=new l("trash",{fontCharacter:"\\ea81"}),l.trashcan=new l("trashcan",{fontCharacter:"\\ea81"}),l.history=new l("history",{fontCharacter:"\\ea82"}),l.clock=new l("clock",{fontCharacter:"\\ea82"}),l.folder=new l("folder",{fontCharacter:"\\ea83"}),l.fileDirectory=new l("file-directory",{fontCharacter:"\\ea83"}),l.symbolFolder=new l("symbol-folder",{fontCharacter:"\\ea83"}),l.logoGithub=new l("logo-github",{fontCharacter:"\\ea84"}),l.markGithub=new l("mark-github",{fontCharacter:"\\ea84"}),l.github=new l("github",{fontCharacter:"\\ea84"}),l.terminal=new l("terminal",{fontCharacter:"\\ea85"}),l.console=new l("console",{fontCharacter:"\\ea85"}),l.repl=new l("repl",{fontCharacter:"\\ea85"}),l.zap=new l("zap",{fontCharacter:"\\ea86"}),l.symbolEvent=new l("symbol-event",{fontCharacter:"\\ea86"}),l.error=new l("error",{fontCharacter:"\\ea87"}),l.stop=new l("stop",{fontCharacter:"\\ea87"}),l.variable=new l("variable",{fontCharacter:"\\ea88"}),l.symbolVariable=new l("symbol-variable",{fontCharacter:"\\ea88"}),l.array=new l("array",{fontCharacter:"\\ea8a"}),l.symbolArray=new l("symbol-array",{fontCharacter:"\\ea8a"}),l.symbolModule=new l("symbol-module",{fontCharacter:"\\ea8b"}),l.symbolPackage=new l("symbol-package",{fontCharacter:"\\ea8b"}),l.symbolNamespace=new l("symbol-namespace",{fontCharacter:"\\ea8b"}),l.symbolObject=new l("symbol-object",{fontCharacter:"\\ea8b"}),l.symbolMethod=new l("symbol-method",{fontCharacter:"\\ea8c"}),l.symbolFunction=new l("symbol-function",{fontCharacter:"\\ea8c"}),l.symbolConstructor=new l("symbol-constructor",{fontCharacter:"\\ea8c"}),l.symbolBoolean=new l("symbol-boolean",{fontCharacter:"\\ea8f"}),l.symbolNull=new l("symbol-null",{fontCharacter:"\\ea8f"}),l.symbolNumeric=new l("symbol-numeric",{fontCharacter:"\\ea90"}),l.symbolNumber=new l("symbol-number",{fontCharacter:"\\ea90"}),l.symbolStructure=new l("symbol-structure",{fontCharacter:"\\ea91"}),l.symbolStruct=new l("symbol-struct",{fontCharacter:"\\ea91"}),l.symbolParameter=new l("symbol-parameter",{fontCharacter:"\\ea92"}),l.symbolTypeParameter=new l("symbol-type-parameter",{fontCharacter:"\\ea92"}),l.symbolKey=new l("symbol-key",{fontCharacter:"\\ea93"}),l.symbolText=new l("symbol-text",{fontCharacter:"\\ea93"}),l.symbolReference=new l("symbol-reference",{fontCharacter:"\\ea94"}),l.goToFile=new l("go-to-file",{fontCharacter:"\\ea94"}),l.symbolEnum=new l("symbol-enum",{fontCharacter:"\\ea95"}),l.symbolValue=new l("symbol-value",{fontCharacter:"\\ea95"}),l.symbolRuler=new l("symbol-ruler",{fontCharacter:"\\ea96"}),l.symbolUnit=new l("symbol-unit",{fontCharacter:"\\ea96"}),l.activateBreakpoints=new l("activate-breakpoints",{fontCharacter:"\\ea97"}),l.archive=new l("archive",{fontCharacter:"\\ea98"}),l.arrowBoth=new l("arrow-both",{fontCharacter:"\\ea99"}),l.arrowDown=new l("arrow-down",{fontCharacter:"\\ea9a"}),l.arrowLeft=new l("arrow-left",{fontCharacter:"\\ea9b"}),l.arrowRight=new l("arrow-right",{fontCharacter:"\\ea9c"}),l.arrowSmallDown=new l("arrow-small-down",{fontCharacter:"\\ea9d"}),l.arrowSmallLeft=new l("arrow-small-left",{fontCharacter:"\\ea9e"}),l.arrowSmallRight=new l("arrow-small-right",{fontCharacter:"\\ea9f"}),l.arrowSmallUp=new l("arrow-small-up",{fontCharacter:"\\eaa0"}),l.arrowUp=new l("arrow-up",{fontCharacter:"\\eaa1"}),l.bell=new l("bell",{fontCharacter:"\\eaa2"}),l.bold=new l("bold",{fontCharacter:"\\eaa3"}),l.book=new l("book",{fontCharacter:"\\eaa4"}),l.bookmark=new l("bookmark",{fontCharacter:"\\eaa5"}),l.debugBreakpointConditionalUnverified=new l("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),l.debugBreakpointConditional=new l("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),l.debugBreakpointConditionalDisabled=new l("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),l.debugBreakpointDataUnverified=new l("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),l.debugBreakpointData=new l("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),l.debugBreakpointDataDisabled=new l("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),l.debugBreakpointLogUnverified=new l("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),l.debugBreakpointLog=new l("debug-breakpoint-log",{fontCharacter:"\\eaab"}),l.debugBreakpointLogDisabled=new l("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),l.briefcase=new l("briefcase",{fontCharacter:"\\eaac"}),l.broadcast=new l("broadcast",{fontCharacter:"\\eaad"}),l.browser=new l("browser",{fontCharacter:"\\eaae"}),l.bug=new l("bug",{fontCharacter:"\\eaaf"}),l.calendar=new l("calendar",{fontCharacter:"\\eab0"}),l.caseSensitive=new l("case-sensitive",{fontCharacter:"\\eab1"}),l.check=new l("check",{fontCharacter:"\\eab2"}),l.checklist=new l("checklist",{fontCharacter:"\\eab3"}),l.chevronDown=new l("chevron-down",{fontCharacter:"\\eab4"}),l.dropDownButton=new l("drop-down-button",l.chevronDown.definition),l.chevronLeft=new l("chevron-left",{fontCharacter:"\\eab5"}),l.chevronRight=new l("chevron-right",{fontCharacter:"\\eab6"}),l.chevronUp=new l("chevron-up",{fontCharacter:"\\eab7"}),l.chromeClose=new l("chrome-close",{fontCharacter:"\\eab8"}),l.chromeMaximize=new l("chrome-maximize",{fontCharacter:"\\eab9"}),l.chromeMinimize=new l("chrome-minimize",{fontCharacter:"\\eaba"}),l.chromeRestore=new l("chrome-restore",{fontCharacter:"\\eabb"}),l.circleOutline=new l("circle-outline",{fontCharacter:"\\eabc"}),l.debugBreakpointUnverified=new l("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),l.circleSlash=new l("circle-slash",{fontCharacter:"\\eabd"}),l.circuitBoard=new l("circuit-board",{fontCharacter:"\\eabe"}),l.clearAll=new l("clear-all",{fontCharacter:"\\eabf"}),l.clippy=new l("clippy",{fontCharacter:"\\eac0"}),l.closeAll=new l("close-all",{fontCharacter:"\\eac1"}),l.cloudDownload=new l("cloud-download",{fontCharacter:"\\eac2"}),l.cloudUpload=new l("cloud-upload",{fontCharacter:"\\eac3"}),l.code=new l("code",{fontCharacter:"\\eac4"}),l.collapseAll=new l("collapse-all",{fontCharacter:"\\eac5"}),l.colorMode=new l("color-mode",{fontCharacter:"\\eac6"}),l.commentDiscussion=new l("comment-discussion",{fontCharacter:"\\eac7"}),l.compareChanges=new l("compare-changes",{fontCharacter:"\\eafd"}),l.creditCard=new l("credit-card",{fontCharacter:"\\eac9"}),l.dash=new l("dash",{fontCharacter:"\\eacc"}),l.dashboard=new l("dashboard",{fontCharacter:"\\eacd"}),l.database=new l("database",{fontCharacter:"\\eace"}),l.debugContinue=new l("debug-continue",{fontCharacter:"\\eacf"}),l.debugDisconnect=new l("debug-disconnect",{fontCharacter:"\\ead0"}),l.debugPause=new l("debug-pause",{fontCharacter:"\\ead1"}),l.debugRestart=new l("debug-restart",{fontCharacter:"\\ead2"}),l.debugStart=new l("debug-start",{fontCharacter:"\\ead3"}),l.debugStepInto=new l("debug-step-into",{fontCharacter:"\\ead4"}),l.debugStepOut=new l("debug-step-out",{fontCharacter:"\\ead5"}),l.debugStepOver=new l("debug-step-over",{fontCharacter:"\\ead6"}),l.debugStop=new l("debug-stop",{fontCharacter:"\\ead7"}),l.debug=new l("debug",{fontCharacter:"\\ead8"}),l.deviceCameraVideo=new l("device-camera-video",{fontCharacter:"\\ead9"}),l.deviceCamera=new l("device-camera",{fontCharacter:"\\eada"}),l.deviceMobile=new l("device-mobile",{fontCharacter:"\\eadb"}),l.diffAdded=new l("diff-added",{fontCharacter:"\\eadc"}),l.diffIgnored=new l("diff-ignored",{fontCharacter:"\\eadd"}),l.diffModified=new l("diff-modified",{fontCharacter:"\\eade"}),l.diffRemoved=new l("diff-removed",{fontCharacter:"\\eadf"}),l.diffRenamed=new l("diff-renamed",{fontCharacter:"\\eae0"}),l.diff=new l("diff",{fontCharacter:"\\eae1"}),l.discard=new l("discard",{fontCharacter:"\\eae2"}),l.editorLayout=new l("editor-layout",{fontCharacter:"\\eae3"}),l.emptyWindow=new l("empty-window",{fontCharacter:"\\eae4"}),l.exclude=new l("exclude",{fontCharacter:"\\eae5"}),l.extensions=new l("extensions",{fontCharacter:"\\eae6"}),l.eyeClosed=new l("eye-closed",{fontCharacter:"\\eae7"}),l.fileBinary=new l("file-binary",{fontCharacter:"\\eae8"}),l.fileCode=new l("file-code",{fontCharacter:"\\eae9"}),l.fileMedia=new l("file-media",{fontCharacter:"\\eaea"}),l.filePdf=new l("file-pdf",{fontCharacter:"\\eaeb"}),l.fileSubmodule=new l("file-submodule",{fontCharacter:"\\eaec"}),l.fileSymlinkDirectory=new l("file-symlink-directory",{fontCharacter:"\\eaed"}),l.fileSymlinkFile=new l("file-symlink-file",{fontCharacter:"\\eaee"}),l.fileZip=new l("file-zip",{fontCharacter:"\\eaef"}),l.files=new l("files",{fontCharacter:"\\eaf0"}),l.filter=new l("filter",{fontCharacter:"\\eaf1"}),l.flame=new l("flame",{fontCharacter:"\\eaf2"}),l.foldDown=new l("fold-down",{fontCharacter:"\\eaf3"}),l.foldUp=new l("fold-up",{fontCharacter:"\\eaf4"}),l.fold=new l("fold",{fontCharacter:"\\eaf5"}),l.folderActive=new l("folder-active",{fontCharacter:"\\eaf6"}),l.folderOpened=new l("folder-opened",{fontCharacter:"\\eaf7"}),l.gear=new l("gear",{fontCharacter:"\\eaf8"}),l.gift=new l("gift",{fontCharacter:"\\eaf9"}),l.gistSecret=new l("gist-secret",{fontCharacter:"\\eafa"}),l.gist=new l("gist",{fontCharacter:"\\eafb"}),l.gitCommit=new l("git-commit",{fontCharacter:"\\eafc"}),l.gitCompare=new l("git-compare",{fontCharacter:"\\eafd"}),l.gitMerge=new l("git-merge",{fontCharacter:"\\eafe"}),l.githubAction=new l("github-action",{fontCharacter:"\\eaff"}),l.githubAlt=new l("github-alt",{fontCharacter:"\\eb00"}),l.globe=new l("globe",{fontCharacter:"\\eb01"}),l.grabber=new l("grabber",{fontCharacter:"\\eb02"}),l.graph=new l("graph",{fontCharacter:"\\eb03"}),l.gripper=new l("gripper",{fontCharacter:"\\eb04"}),l.heart=new l("heart",{fontCharacter:"\\eb05"}),l.home=new l("home",{fontCharacter:"\\eb06"}),l.horizontalRule=new l("horizontal-rule",{fontCharacter:"\\eb07"}),l.hubot=new l("hubot",{fontCharacter:"\\eb08"}),l.inbox=new l("inbox",{fontCharacter:"\\eb09"}),l.issueClosed=new l("issue-closed",{fontCharacter:"\\eba4"}),l.issueReopened=new l("issue-reopened",{fontCharacter:"\\eb0b"}),l.issues=new l("issues",{fontCharacter:"\\eb0c"}),l.italic=new l("italic",{fontCharacter:"\\eb0d"}),l.jersey=new l("jersey",{fontCharacter:"\\eb0e"}),l.json=new l("json",{fontCharacter:"\\eb0f"}),l.kebabVertical=new l("kebab-vertical",{fontCharacter:"\\eb10"}),l.key=new l("key",{fontCharacter:"\\eb11"}),l.law=new l("law",{fontCharacter:"\\eb12"}),l.lightbulbAutofix=new l("lightbulb-autofix",{fontCharacter:"\\eb13"}),l.linkExternal=new l("link-external",{fontCharacter:"\\eb14"}),l.link=new l("link",{fontCharacter:"\\eb15"}),l.listOrdered=new l("list-ordered",{fontCharacter:"\\eb16"}),l.listUnordered=new l("list-unordered",{fontCharacter:"\\eb17"}),l.liveShare=new l("live-share",{fontCharacter:"\\eb18"}),l.loading=new l("loading",{fontCharacter:"\\eb19"}),l.location=new l("location",{fontCharacter:"\\eb1a"}),l.mailRead=new l("mail-read",{fontCharacter:"\\eb1b"}),l.mail=new l("mail",{fontCharacter:"\\eb1c"}),l.markdown=new l("markdown",{fontCharacter:"\\eb1d"}),l.megaphone=new l("megaphone",{fontCharacter:"\\eb1e"}),l.mention=new l("mention",{fontCharacter:"\\eb1f"}),l.milestone=new l("milestone",{fontCharacter:"\\eb20"}),l.mortarBoard=new l("mortar-board",{fontCharacter:"\\eb21"}),l.move=new l("move",{fontCharacter:"\\eb22"}),l.multipleWindows=new l("multiple-windows",{fontCharacter:"\\eb23"}),l.mute=new l("mute",{fontCharacter:"\\eb24"}),l.noNewline=new l("no-newline",{fontCharacter:"\\eb25"}),l.note=new l("note",{fontCharacter:"\\eb26"}),l.octoface=new l("octoface",{fontCharacter:"\\eb27"}),l.openPreview=new l("open-preview",{fontCharacter:"\\eb28"}),l.package_=new l("package",{fontCharacter:"\\eb29"}),l.paintcan=new l("paintcan",{fontCharacter:"\\eb2a"}),l.pin=new l("pin",{fontCharacter:"\\eb2b"}),l.play=new l("play",{fontCharacter:"\\eb2c"}),l.run=new l("run",{fontCharacter:"\\eb2c"}),l.plug=new l("plug",{fontCharacter:"\\eb2d"}),l.preserveCase=new l("preserve-case",{fontCharacter:"\\eb2e"}),l.preview=new l("preview",{fontCharacter:"\\eb2f"}),l.project=new l("project",{fontCharacter:"\\eb30"}),l.pulse=new l("pulse",{fontCharacter:"\\eb31"}),l.question=new l("question",{fontCharacter:"\\eb32"}),l.quote=new l("quote",{fontCharacter:"\\eb33"}),l.radioTower=new l("radio-tower",{fontCharacter:"\\eb34"}),l.reactions=new l("reactions",{fontCharacter:"\\eb35"}),l.references=new l("references",{fontCharacter:"\\eb36"}),l.refresh=new l("refresh",{fontCharacter:"\\eb37"}),l.regex=new l("regex",{fontCharacter:"\\eb38"}),l.remoteExplorer=new l("remote-explorer",{fontCharacter:"\\eb39"}),l.remote=new l("remote",{fontCharacter:"\\eb3a"}),l.remove=new l("remove",{fontCharacter:"\\eb3b"}),l.replaceAll=new l("replace-all",{fontCharacter:"\\eb3c"}),l.replace=new l("replace",{fontCharacter:"\\eb3d"}),l.repoClone=new l("repo-clone",{fontCharacter:"\\eb3e"}),l.repoForcePush=new l("repo-force-push",{fontCharacter:"\\eb3f"}),l.repoPull=new l("repo-pull",{fontCharacter:"\\eb40"}),l.repoPush=new l("repo-push",{fontCharacter:"\\eb41"}),l.report=new l("report",{fontCharacter:"\\eb42"}),l.requestChanges=new l("request-changes",{fontCharacter:"\\eb43"}),l.rocket=new l("rocket",{fontCharacter:"\\eb44"}),l.rootFolderOpened=new l("root-folder-opened",{fontCharacter:"\\eb45"}),l.rootFolder=new l("root-folder",{fontCharacter:"\\eb46"}),l.rss=new l("rss",{fontCharacter:"\\eb47"}),l.ruby=new l("ruby",{fontCharacter:"\\eb48"}),l.saveAll=new l("save-all",{fontCharacter:"\\eb49"}),l.saveAs=new l("save-as",{fontCharacter:"\\eb4a"}),l.save=new l("save",{fontCharacter:"\\eb4b"}),l.screenFull=new l("screen-full",{fontCharacter:"\\eb4c"}),l.screenNormal=new l("screen-normal",{fontCharacter:"\\eb4d"}),l.searchStop=new l("search-stop",{fontCharacter:"\\eb4e"}),l.server=new l("server",{fontCharacter:"\\eb50"}),l.settingsGear=new l("settings-gear",{fontCharacter:"\\eb51"}),l.settings=new l("settings",{fontCharacter:"\\eb52"}),l.shield=new l("shield",{fontCharacter:"\\eb53"}),l.smiley=new l("smiley",{fontCharacter:"\\eb54"}),l.sortPrecedence=new l("sort-precedence",{fontCharacter:"\\eb55"}),l.splitHorizontal=new l("split-horizontal",{fontCharacter:"\\eb56"}),l.splitVertical=new l("split-vertical",{fontCharacter:"\\eb57"}),l.squirrel=new l("squirrel",{fontCharacter:"\\eb58"}),l.starFull=new l("star-full",{fontCharacter:"\\eb59"}),l.starHalf=new l("star-half",{fontCharacter:"\\eb5a"}),l.symbolClass=new l("symbol-class",{fontCharacter:"\\eb5b"}),l.symbolColor=new l("symbol-color",{fontCharacter:"\\eb5c"}),l.symbolConstant=new l("symbol-constant",{fontCharacter:"\\eb5d"}),l.symbolEnumMember=new l("symbol-enum-member",{fontCharacter:"\\eb5e"}),l.symbolField=new l("symbol-field",{fontCharacter:"\\eb5f"}),l.symbolFile=new l("symbol-file",{fontCharacter:"\\eb60"}),l.symbolInterface=new l("symbol-interface",{fontCharacter:"\\eb61"}),l.symbolKeyword=new l("symbol-keyword",{fontCharacter:"\\eb62"}),l.symbolMisc=new l("symbol-misc",{fontCharacter:"\\eb63"}),l.symbolOperator=new l("symbol-operator",{fontCharacter:"\\eb64"}),l.symbolProperty=new l("symbol-property",{fontCharacter:"\\eb65"}),l.wrench=new l("wrench",{fontCharacter:"\\eb65"}),l.wrenchSubaction=new l("wrench-subaction",{fontCharacter:"\\eb65"}),l.symbolSnippet=new l("symbol-snippet",{fontCharacter:"\\eb66"}),l.tasklist=new l("tasklist",{fontCharacter:"\\eb67"}),l.telescope=new l("telescope",{fontCharacter:"\\eb68"}),l.textSize=new l("text-size",{fontCharacter:"\\eb69"}),l.threeBars=new l("three-bars",{fontCharacter:"\\eb6a"}),l.thumbsdown=new l("thumbsdown",{fontCharacter:"\\eb6b"}),l.thumbsup=new l("thumbsup",{fontCharacter:"\\eb6c"}),l.tools=new l("tools",{fontCharacter:"\\eb6d"}),l.triangleDown=new l("triangle-down",{fontCharacter:"\\eb6e"}),l.triangleLeft=new l("triangle-left",{fontCharacter:"\\eb6f"}),l.triangleRight=new l("triangle-right",{fontCharacter:"\\eb70"}),l.triangleUp=new l("triangle-up",{fontCharacter:"\\eb71"}),l.twitter=new l("twitter",{fontCharacter:"\\eb72"}),l.unfold=new l("unfold",{fontCharacter:"\\eb73"}),l.unlock=new l("unlock",{fontCharacter:"\\eb74"}),l.unmute=new l("unmute",{fontCharacter:"\\eb75"}),l.unverified=new l("unverified",{fontCharacter:"\\eb76"}),l.verified=new l("verified",{fontCharacter:"\\eb77"}),l.versions=new l("versions",{fontCharacter:"\\eb78"}),l.vmActive=new l("vm-active",{fontCharacter:"\\eb79"}),l.vmOutline=new l("vm-outline",{fontCharacter:"\\eb7a"}),l.vmRunning=new l("vm-running",{fontCharacter:"\\eb7b"}),l.watch=new l("watch",{fontCharacter:"\\eb7c"}),l.whitespace=new l("whitespace",{fontCharacter:"\\eb7d"}),l.wholeWord=new l("whole-word",{fontCharacter:"\\eb7e"}),l.window=new l("window",{fontCharacter:"\\eb7f"}),l.wordWrap=new l("word-wrap",{fontCharacter:"\\eb80"}),l.zoomIn=new l("zoom-in",{fontCharacter:"\\eb81"}),l.zoomOut=new l("zoom-out",{fontCharacter:"\\eb82"}),l.listFilter=new l("list-filter",{fontCharacter:"\\eb83"}),l.listFlat=new l("list-flat",{fontCharacter:"\\eb84"}),l.listSelection=new l("list-selection",{fontCharacter:"\\eb85"}),l.selection=new l("selection",{fontCharacter:"\\eb85"}),l.listTree=new l("list-tree",{fontCharacter:"\\eb86"}),l.debugBreakpointFunctionUnverified=new l("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),l.debugBreakpointFunction=new l("debug-breakpoint-function",{fontCharacter:"\\eb88"}),l.debugBreakpointFunctionDisabled=new l("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),l.debugStackframeActive=new l("debug-stackframe-active",{fontCharacter:"\\eb89"}),l.debugStackframeDot=new l("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),l.debugStackframe=new l("debug-stackframe",{fontCharacter:"\\eb8b"}),l.debugStackframeFocused=new l("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),l.debugBreakpointUnsupported=new l("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),l.symbolString=new l("symbol-string",{fontCharacter:"\\eb8d"}),l.debugReverseContinue=new l("debug-reverse-continue",{fontCharacter:"\\eb8e"}),l.debugStepBack=new l("debug-step-back",{fontCharacter:"\\eb8f"}),l.debugRestartFrame=new l("debug-restart-frame",{fontCharacter:"\\eb90"}),l.callIncoming=new l("call-incoming",{fontCharacter:"\\eb92"}),l.callOutgoing=new l("call-outgoing",{fontCharacter:"\\eb93"}),l.menu=new l("menu",{fontCharacter:"\\eb94"}),l.expandAll=new l("expand-all",{fontCharacter:"\\eb95"}),l.feedback=new l("feedback",{fontCharacter:"\\eb96"}),l.groupByRefType=new l("group-by-ref-type",{fontCharacter:"\\eb97"}),l.ungroupByRefType=new l("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),l.account=new l("account",{fontCharacter:"\\eb99"}),l.bellDot=new l("bell-dot",{fontCharacter:"\\eb9a"}),l.debugConsole=new l("debug-console",{fontCharacter:"\\eb9b"}),l.library=new l("library",{fontCharacter:"\\eb9c"}),l.output=new l("output",{fontCharacter:"\\eb9d"}),l.runAll=new l("run-all",{fontCharacter:"\\eb9e"}),l.syncIgnored=new l("sync-ignored",{fontCharacter:"\\eb9f"}),l.pinned=new l("pinned",{fontCharacter:"\\eba0"}),l.githubInverted=new l("github-inverted",{fontCharacter:"\\eba1"}),l.debugAlt=new l("debug-alt",{fontCharacter:"\\eb91"}),l.serverProcess=new l("server-process",{fontCharacter:"\\eba2"}),l.serverEnvironment=new l("server-environment",{fontCharacter:"\\eba3"}),l.pass=new l("pass",{fontCharacter:"\\eba4"}),l.stopCircle=new l("stop-circle",{fontCharacter:"\\eba5"}),l.playCircle=new l("play-circle",{fontCharacter:"\\eba6"}),l.record=new l("record",{fontCharacter:"\\eba7"}),l.debugAltSmall=new l("debug-alt-small",{fontCharacter:"\\eba8"}),l.vmConnect=new l("vm-connect",{fontCharacter:"\\eba9"}),l.cloud=new l("cloud",{fontCharacter:"\\ebaa"}),l.merge=new l("merge",{fontCharacter:"\\ebab"}),l.exportIcon=new l("export",{fontCharacter:"\\ebac"}),l.graphLeft=new l("graph-left",{fontCharacter:"\\ebad"}),l.magnet=new l("magnet",{fontCharacter:"\\ebae"}),l.notebook=new l("notebook",{fontCharacter:"\\ebaf"}),l.redo=new l("redo",{fontCharacter:"\\ebb0"}),l.checkAll=new l("check-all",{fontCharacter:"\\ebb1"}),l.pinnedDirty=new l("pinned-dirty",{fontCharacter:"\\ebb2"}),l.passFilled=new l("pass-filled",{fontCharacter:"\\ebb3"}),l.circleLargeFilled=new l("circle-large-filled",{fontCharacter:"\\ebb4"}),l.circleLargeOutline=new l("circle-large-outline",{fontCharacter:"\\ebb5"}),l.combine=new l("combine",{fontCharacter:"\\ebb6"}),l.gather=new l("gather",{fontCharacter:"\\ebb6"}),l.table=new l("table",{fontCharacter:"\\ebb7"}),l.variableGroup=new l("variable-group",{fontCharacter:"\\ebb8"}),l.typeHierarchy=new l("type-hierarchy",{fontCharacter:"\\ebb9"}),l.typeHierarchySub=new l("type-hierarchy-sub",{fontCharacter:"\\ebba"}),l.typeHierarchySuper=new l("type-hierarchy-super",{fontCharacter:"\\ebbb"}),l.gitPullRequestCreate=new l("git-pull-request-create",{fontCharacter:"\\ebbc"}),l.runAbove=new l("run-above",{fontCharacter:"\\ebbd"}),l.runBelow=new l("run-below",{fontCharacter:"\\ebbe"}),l.notebookTemplate=new l("notebook-template",{fontCharacter:"\\ebbf"}),l.debugRerun=new l("debug-rerun",{fontCharacter:"\\ebc0"}),l.workspaceTrusted=new l("workspace-trusted",{fontCharacter:"\\ebc1"}),l.workspaceUntrusted=new l("workspace-untrusted",{fontCharacter:"\\ebc2"}),l.workspaceUnspecified=new l("workspace-unspecified",{fontCharacter:"\\ebc3"}),l.terminalCmd=new l("terminal-cmd",{fontCharacter:"\\ebc4"}),l.terminalDebian=new l("terminal-debian",{fontCharacter:"\\ebc5"}),l.terminalLinux=new l("terminal-linux",{fontCharacter:"\\ebc6"}),l.terminalPowershell=new l("terminal-powershell",{fontCharacter:"\\ebc7"}),l.terminalTmux=new l("terminal-tmux",{fontCharacter:"\\ebc8"}),l.terminalUbuntu=new l("terminal-ubuntu",{fontCharacter:"\\ebc9"}),l.terminalBash=new l("terminal-bash",{fontCharacter:"\\ebca"}),l.arrowSwap=new l("arrow-swap",{fontCharacter:"\\ebcb"}),l.copy=new l("copy",{fontCharacter:"\\ebcc"}),l.personAdd=new l("person-add",{fontCharacter:"\\ebcd"}),l.filterFilled=new l("filter-filled",{fontCharacter:"\\ebce"}),l.wand=new l("wand",{fontCharacter:"\\ebcf"}),l.debugLineByLine=new l("debug-line-by-line",{fontCharacter:"\\ebd0"}),l.inspect=new l("inspect",{fontCharacter:"\\ebd1"}),l.layers=new l("layers",{fontCharacter:"\\ebd2"}),l.layersDot=new l("layers-dot",{fontCharacter:"\\ebd3"}),l.layersActive=new l("layers-active",{fontCharacter:"\\ebd4"}),l.compass=new l("compass",{fontCharacter:"\\ebd5"}),l.compassDot=new l("compass-dot",{fontCharacter:"\\ebd6"}),l.compassActive=new l("compass-active",{fontCharacter:"\\ebd7"}),l.azure=new l("azure",{fontCharacter:"\\ebd8"}),l.issueDraft=new l("issue-draft",{fontCharacter:"\\ebd9"}),l.gitPullRequestClosed=new l("git-pull-request-closed",{fontCharacter:"\\ebda"}),l.gitPullRequestDraft=new l("git-pull-request-draft",{fontCharacter:"\\ebdb"}),l.debugAll=new l("debug-all",{fontCharacter:"\\ebdc"}),l.debugCoverage=new l("debug-coverage",{fontCharacter:"\\ebdd"}),l.runErrors=new l("run-errors",{fontCharacter:"\\ebde"}),l.folderLibrary=new l("folder-library",{fontCharacter:"\\ebdf"}),l.debugContinueSmall=new l("debug-continue-small",{fontCharacter:"\\ebe0"}),l.beakerStop=new l("beaker-stop",{fontCharacter:"\\ebe1"}),l.graphLine=new l("graph-line",{fontCharacter:"\\ebe2"}),l.graphScatter=new l("graph-scatter",{fontCharacter:"\\ebe3"}),l.pieChart=new l("pie-chart",{fontCharacter:"\\ebe4"}),l.bracket=new l("bracket",l.json.definition),l.bracketDot=new l("bracket-dot",{fontCharacter:"\\ebe5"}),l.bracketError=new l("bracket-error",{fontCharacter:"\\ebe6"}),l.lockSmall=new l("lock-small",{fontCharacter:"\\ebe7"}),l.azureDevops=new l("azure-devops",{fontCharacter:"\\ebe8"}),l.verifiedFilled=new l("verified-filled",{fontCharacter:"\\ebe9"})}(de||(de={}))},79881:function(Vt,it,k){"use strict";k.d(it,{B8:function(){return B},Cp:function(){return be},F0:function(){return ce},L6:function(){return V},VV:function(){return de},b1:function(){return l},dL:function(){return ie},ri:function(){return J}});class y{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(L){setTimeout(()=>{throw L.stack?new Error(L.message+`
`+L.stack):L},0)}}emit(L){this.listeners.forEach(x=>{x(L)})}onUnexpectedError(L){this.unexpectedErrorHandler(L),this.emit(L)}onUnexpectedExternalError(L){this.unexpectedErrorHandler(L)}}const Ee=new y;function ie(E){de(E)||Ee.onUnexpectedError(E)}function be(E){de(E)||Ee.onUnexpectedExternalError(E)}function J(E){if(E instanceof Error){let{name:L,message:x}=E;const P=E.stacktrace||E.stack;return{$isError:!0,name:L,message:x,stack:P}}return E}const v="Canceled";function de(E){return E instanceof Error&&E.name===v&&E.message===v}function ce(){const E=new Error(v);return E.name=E.message,E}function l(E){return E?new Error(`Illegal argument: ${E}`):new Error("Illegal argument")}function V(E){return E?new Error(`Illegal state: ${E}`):new Error("Illegal state")}class B extends Error{constructor(L){super("NotSupported"),L&&(this.message=L)}}},4348:function(Vt,it,k){"use strict";k.d(it,{D0:function(){return B},E7:function(){return E},K3:function(){return V},Q5:function(){return l},ZD:function(){return L},ju:function(){return J}});var y=k(79881),Ee=k(69323),ie=k(34502),be=k(95830),J;(function(x){x.None=()=>Ee.JT.None;function P(ee){return(ue,ne=null,ae)=>{let S=!1,w;return w=ee(K=>{if(!S)return w?w.dispose():S=!0,ue.call(ne,K)},null,ae),S&&w.dispose(),w}}x.once=P;function q(ee,ue){return N((ne,ae=null,S)=>ee(w=>ne.call(ae,ue(w)),null,S))}x.map=q;function H(ee,ue){return N((ne,ae=null,S)=>ee(w=>{ue(w),ne.call(ae,w)},null,S))}x.forEach=H;function U(ee,ue){return N((ne,ae=null,S)=>ee(w=>ue(w)&&ne.call(ae,w),null,S))}x.filter=U;function A(ee){return ee}x.signal=A;function z(...ee){return(ue,ne=null,ae)=>(0,Ee.F8)(...ee.map(S=>S(w=>ue.call(ne,w),null,ae)))}x.any=z;function O(ee,ue,ne){let ae=ne;return q(ee,S=>(ae=ue(ae,S),ae))}x.reduce=O;function N(ee){let ue;const ne=new l({onFirstListenerAdd(){ue=ee(ne.fire,ne)},onLastListenerRemove(){ue.dispose()}});return ne.event}function oe(ee,ue,ne=100,ae=!1,S){let w,K,ye,Be=0;const He=new l({leakWarningThreshold:S,onFirstListenerAdd(){w=ee(ot=>{Be++,K=ue(K,ot),ae&&!ye&&(He.fire(K),K=void 0),clearTimeout(ye),ye=setTimeout(()=>{const at=K;K=void 0,ye=void 0,(!ae||Be>1)&&He.fire(at),Be=0},ne)})},onLastListenerRemove(){w.dispose()}});return He.event}x.debounce=oe;function ve(ee,ue=(ne,ae)=>ne===ae){let ne=!0,ae;return U(ee,S=>{const w=ne||!ue(S,ae);return ne=!1,ae=S,w})}x.latch=ve;function pe(ee,ue){return[x.filter(ee,ue),x.filter(ee,ne=>!ue(ne))]}x.split=pe;function De(ee,ue=!1,ne=[]){let ae=ne.slice(),S=ee(ye=>{ae?ae.push(ye):K.fire(ye)});const w=()=>{ae&&ae.forEach(ye=>K.fire(ye)),ae=null},K=new l({onFirstListenerAdd(){S||(S=ee(ye=>K.fire(ye)))},onFirstListenerDidAdd(){ae&&(ue?setTimeout(w):w())},onLastListenerRemove(){S&&S.dispose(),S=null}});return K.event}x.buffer=De;class Oe{constructor(ue){this.event=ue}map(ue){return new Oe(q(this.event,ue))}forEach(ue){return new Oe(H(this.event,ue))}filter(ue){return new Oe(U(this.event,ue))}reduce(ue,ne){return new Oe(O(this.event,ue,ne))}latch(){return new Oe(ve(this.event))}debounce(ue,ne=100,ae=!1,S){return new Oe(oe(this.event,ue,ne,ae,S))}on(ue,ne,ae){return this.event(ue,ne,ae)}once(ue,ne,ae){return P(this.event)(ue,ne,ae)}}function Fe(ee){return new Oe(ee)}x.chain=Fe;function st(ee,ue,ne=ae=>ae){const ae=(...ye)=>K.fire(ne(...ye)),S=()=>ee.on(ue,ae),w=()=>ee.removeListener(ue,ae),K=new l({onFirstListenerAdd:S,onLastListenerRemove:w});return K.event}x.fromNodeEventEmitter=st;function re(ee,ue,ne=ae=>ae){const ae=(...ye)=>K.fire(ne(...ye)),S=()=>ee.addEventListener(ue,ae),w=()=>ee.removeEventListener(ue,ae),K=new l({onFirstListenerAdd:S,onLastListenerRemove:w});return K.event}x.fromDOMEventEmitter=re;function W(ee){return new Promise(ue=>P(ee)(ue))}x.toPromise=W})(J||(J={}));class v{constructor(P){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${P}_${v._idPool++}`}start(P){this._stopWatch=new be.G(!0),this._listenerCount=P}stop(){if(this._stopWatch){const P=this._stopWatch.elapsed();this._elapsedOverall+=P,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${P.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}v._idPool=0;let de=-1;class ce{constructor(P,q=Math.random().toString(18).slice(2,5)){this.customThreshold=P,this.name=q,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(P){let q=de;if(typeof this.customThreshold=="number"&&(q=this.customThreshold),q<=0||P<q)return;this._stacks||(this._stacks=new Map);const H=new Error().stack.split(`
`).slice(3).join(`
`),U=this._stacks.get(H)||0;if(this._stacks.set(H,U+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=q*.5;let A,z=0;for(const[O,N]of this._stacks)(!A||z<N)&&(A=O,z=N);console.warn(`[${this.name}] potential listener LEAK detected, having ${P} listeners already. MOST frequent listener (${z}):`),console.warn(A)}return()=>{const A=this._stacks.get(H)||0;this._stacks.set(H,A-1)}}}class l{constructor(P){var q;this._disposed=!1,this._options=P,this._leakageMon=de>0?new ce(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((q=this._options)===null||q===void 0)&&q._profName?new v(this._options._profName):void 0}get event(){return this._event||(this._event=(P,q,H)=>{var U;this._listeners||(this._listeners=new ie.S);const A=this._listeners.isEmpty();A&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const z=this._listeners.push(q?[P,q]:P);A&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,P,q);const O=(U=this._leakageMon)===null||U===void 0?void 0:U.check(this._listeners.size),N=(0,Ee.OF)(()=>{O&&O(),this._disposed||(z(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return H instanceof Ee.SL?H.add(N):Array.isArray(H)&&H.push(N),N}),this._event}fire(P){var q,H;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ie.S);for(let U of this._listeners)this._deliveryQueue.push([U,P]);for((q=this._perfMon)===null||q===void 0||q.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[U,A]=this._deliveryQueue.shift();try{typeof U=="function"?U.call(void 0,A):U[0].call(U[1],A)}catch(z){(0,y.dL)(z)}}(H=this._perfMon)===null||H===void 0||H.stop()}}dispose(){var P,q,H,U,A;this._disposed||(this._disposed=!0,(P=this._listeners)===null||P===void 0||P.clear(),(q=this._deliveryQueue)===null||q===void 0||q.clear(),(U=(H=this._options)===null||H===void 0?void 0:H.onLastListenerRemove)===null||U===void 0||U.call(H),(A=this._leakageMon)===null||A===void 0||A.dispose())}}class V extends l{constructor(P){super(P),this._isPaused=0,this._eventQueue=new ie.S,this._mergeFn=P==null?void 0:P.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const P=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(P))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(P){this._listeners&&(this._isPaused!==0?this._eventQueue.push(P):super.fire(P))}}class B extends V{constructor(P){var q;super(P),this._delay=(q=P.delay)!==null&&q!==void 0?q:100}fire(P){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(P)}}class E{constructor(){this.buffers=[]}wrapEvent(P){return(q,H,U)=>P(A=>{const z=this.buffers[this.buffers.length-1];z?z.push(()=>q.call(H,A)):q.call(H,A)},void 0,U)}bufferEvents(P){const q=[];this.buffers.push(q);const H=P();return this.buffers.pop(),q.forEach(U=>U()),H}}class L{constructor(){this.listening=!1,this.inputEvent=J.None,this.inputEventListener=Ee.JT.None,this.emitter=new l({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(P){this.inputEvent=P,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=P(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Vt,it,k){"use strict";k.d(it,{I:function(){return y}});function y(Ee){const ie=this;let be=!1,J;return function(){return be||(be=!0,J=Ee.apply(ie,arguments)),J}}},88226:function(Vt,it,k){"use strict";k.d(it,{$:function(){return y}});var y;(function(Ee){function ie(z){return z&&typeof z=="object"&&typeof z[Symbol.iterator]=="function"}Ee.is=ie;const be=Object.freeze([]);function J(){return be}Ee.empty=J;function*v(z){yield z}Ee.single=v;function de(z){return z||be}Ee.from=de;function ce(z){return!z||z[Symbol.iterator]().next().done===!0}Ee.isEmpty=ce;function l(z){return z[Symbol.iterator]().next().value}Ee.first=l;function V(z,O){for(const N of z)if(O(N))return!0;return!1}Ee.some=V;function B(z,O){for(const N of z)if(O(N))return N}Ee.find=B;function*E(z,O){for(const N of z)O(N)&&(yield N)}Ee.filter=E;function*L(z,O){let N=0;for(const oe of z)yield O(oe,N++)}Ee.map=L;function*x(...z){for(const O of z)for(const N of O)yield N}Ee.concat=x;function*P(z){for(const O of z)for(const N of O)yield N}Ee.concatNested=P;function q(z,O,N){let oe=N;for(const ve of z)oe=O(oe,ve);return oe}Ee.reduce=q;function*H(z,O,N=z.length){for(O<0&&(O+=z.length),N<0?N+=z.length:N>z.length&&(N=z.length);O<N;O++)yield z[O]}Ee.slice=H;function U(z,O=Number.POSITIVE_INFINITY){const N=[];if(O===0)return[N,z];const oe=z[Symbol.iterator]();for(let ve=0;ve<O;ve++){const pe=oe.next();if(pe.done)return[N,Ee.empty()];N.push(pe.value)}return[N,{[Symbol.iterator](){return oe}}]}Ee.consume=U;function A(z,O,N=(oe,ve)=>oe===ve){const oe=z[Symbol.iterator](),ve=O[Symbol.iterator]();for(;;){const pe=oe.next(),De=ve.next();if(pe.done!==De.done)return!1;if(pe.done)return!0;if(!N(pe.value,De.value))return!1}}Ee.equals=A})(y||(y={}))},69323:function(Vt,it,k){"use strict";k.d(it,{B9:function(){return L},F8:function(){return x},JT:function(){return H},Jz:function(){return A},OF:function(){return P},SL:function(){return q},Wf:function(){return E},XK:function(){return U},dk:function(){return V}});var y=k(17845),Ee=k(88226);const ie=!1;let be=null;function J(z){be=z}if(ie){const z="__is_disposable_tracked__";J(new class{trackDisposable(O){const N=new Error("Potentially leaked disposable").stack;setTimeout(()=>{O[z]||console.log(N)},3e3)}setParent(O,N){if(O&&O!==H.None)try{O[z]=!0}catch(oe){}}markAsDisposed(O){if(O&&O!==H.None)try{O[z]=!0}catch(N){}}markAsSingleton(O){}})}function v(z){return be==null||be.trackDisposable(z),z}function de(z){be==null||be.markAsDisposed(z)}function ce(z,O){be==null||be.setParent(z,O)}function l(z,O){if(be)for(const N of z)be.setParent(N,O)}function V(z){return be==null||be.markAsSingleton(z),z}class B extends Error{constructor(O){super(`Encountered errors while disposing of store. Errors: [${O.join(", ")}]`),this.errors=O}}function E(z){return typeof z.dispose=="function"&&z.dispose.length===0}function L(z){if(Ee.$.is(z)){let O=[];for(const N of z)if(N)try{N.dispose()}catch(oe){O.push(oe)}if(O.length===1)throw O[0];if(O.length>1)throw new B(O);return Array.isArray(z)?[]:z}else if(z)return z.dispose(),z}function x(...z){const O=P(()=>L(z));return l(z,O),O}function P(z){const O=v({dispose:(0,y.I)(()=>{de(O),z()})});return O}class q{constructor(){this._toDispose=new Set,this._isDisposed=!1,v(this)}dispose(){this._isDisposed||(de(this),this._isDisposed=!0,this.clear())}clear(){try{L(this._toDispose.values())}finally{this._toDispose.clear()}}add(O){if(!O)return O;if(O===this)throw new Error("Cannot register a disposable on itself!");return ce(O,this),this._isDisposed?q.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(O),O}}q.DISABLE_DISPOSED_WARNING=!1;class H{constructor(){this._store=new q,v(this),ce(this._store,this)}dispose(){de(this),this._store.dispose()}_register(O){if(O===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(O)}}H.None=Object.freeze({dispose(){}});class U{constructor(){this._isDisposed=!1,v(this)}get value(){return this._isDisposed?void 0:this._value}set value(O){var N;this._isDisposed||O===this._value||((N=this._value)===null||N===void 0||N.dispose(),O&&ce(O,this),this._value=O)}clear(){this.value=void 0}dispose(){var O;this._isDisposed=!0,de(this),(O=this._value)===null||O===void 0||O.dispose(),this._value=void 0}clearAndLeak(){const O=this._value;return this._value=void 0,O&&ce(O,null),O}}class A{constructor(O){this.object=O}dispose(){}}},34502:function(Vt,it,k){"use strict";k.d(it,{S:function(){return Ee}});class y{constructor(be){this.element=be,this.next=y.Undefined,this.prev=y.Undefined}}y.Undefined=new y(void 0);class Ee{constructor(){this._first=y.Undefined,this._last=y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===y.Undefined}clear(){let be=this._first;for(;be!==y.Undefined;){const J=be.next;be.prev=y.Undefined,be.next=y.Undefined,be=J}this._first=y.Undefined,this._last=y.Undefined,this._size=0}unshift(be){return this._insert(be,!1)}push(be){return this._insert(be,!0)}_insert(be,J){const v=new y(be);if(this._first===y.Undefined)this._first=v,this._last=v;else if(J){const ce=this._last;this._last=v,v.prev=ce,ce.next=v}else{const ce=this._first;this._first=v,v.next=ce,ce.prev=v}this._size+=1;let de=!1;return()=>{de||(de=!0,this._remove(v))}}shift(){if(this._first!==y.Undefined){const be=this._first.element;return this._remove(this._first),be}}pop(){if(this._last!==y.Undefined){const be=this._last.element;return this._remove(this._last),be}}_remove(be){if(be.prev!==y.Undefined&&be.next!==y.Undefined){const J=be.prev;J.next=be.next,be.next.prev=J}else be.prev===y.Undefined&&be.next===y.Undefined?(this._first=y.Undefined,this._last=y.Undefined):be.next===y.Undefined?(this._last=this._last.prev,this._last.next=y.Undefined):be.prev===y.Undefined&&(this._first=this._first.next,this._first.prev=y.Undefined);this._size-=1}*[Symbol.iterator](){let be=this._first;for(;be!==y.Undefined;)yield be.element,be=be.next}}},23345:function(Vt,it,k){"use strict";k.d(it,{$L:function(){return oe},ED:function(){return A},IJ:function(){return O},OS:function(){return Oe},WE:function(){return pe},dz:function(){return z},gn:function(){return ve},li:function(){return P},r:function(){return re},tY:function(){return N},xS:function(){return De}});var y=k(97671),Ee;const ie="en";let be=!1,J=!1,v=!1,de=!1,ce=!1,l=!1,V=!1,B,E=null,L=null,x;const P=typeof self=="object"?self:typeof k.g=="object"?k.g:{};let q;typeof P.vscode!="undefined"&&typeof P.vscode.process!="undefined"?q=P.vscode.process:typeof y!="undefined"&&(q=y);const H=typeof((Ee=q==null?void 0:q.versions)===null||Ee===void 0?void 0:Ee.electron)=="string"&&q.type==="renderer";if(typeof navigator=="object"&&!H)x=navigator.userAgent,be=x.indexOf("Windows")>=0,J=x.indexOf("Macintosh")>=0,V=(x.indexOf("Macintosh")>=0||x.indexOf("iPad")>=0||x.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,v=x.indexOf("Linux")>=0,l=!0,B=navigator.language,E=B;else if(typeof q=="object"){be=q.platform==="win32",J=q.platform==="darwin",v=q.platform==="linux",de=v&&!!q.env.SNAP&&!!q.env.SNAP_REVISION,B=ie,E=ie;const W=q.env.VSCODE_NLS_CONFIG;if(W)try{const ee=JSON.parse(W),ue=ee.availableLanguages["*"];B=ee.locale,E=ue||ie,L=ee._translationsConfigFile}catch(ee){}ce=!0}else console.error("Unable to resolve platform.");let U=0;J?U=1:be?U=3:v&&(U=2);const A=be,z=J,O=v,N=ce,oe=l,ve=V,pe=x,De=function(){if(P.setImmediate)return P.setImmediate.bind(P);if(typeof P.postMessage=="function"&&!P.importScripts){let ue=[];P.addEventListener("message",ae=>{if(ae.data&&ae.data.vscodeSetImmediateId)for(let S=0,w=ue.length;S<w;S++){const K=ue[S];if(K.id===ae.data.vscodeSetImmediateId){ue.splice(S,1),K.callback();return}}});let ne=0;return ae=>{const S=++ne;ue.push({id:S,callback:ae}),P.postMessage({vscodeSetImmediateId:S},"*")}}if(typeof(q==null?void 0:q.nextTick)=="function")return q.nextTick.bind(q);const ee=Promise.resolve();return ue=>ee.then(ue)}(),Oe=J||V?2:be?1:3;let Fe=!0,st=!1;function re(){if(!st){st=!0;const W=new Uint8Array(2);W[0]=1,W[1]=2,Fe=new Uint16Array(W.buffer)[0]===513}return Fe}},95830:function(Vt,it,k){"use strict";k.d(it,{G:function(){return ie}});var y=k(23345);const Ee=y.li.performance&&typeof y.li.performance.now=="function";class ie{constructor(J){this._highResolution=Ee&&J,this._startTime=this._now(),this._stopTime=-1}static create(J=!0){return new ie(J)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?y.li.performance.now():Date.now()}}},82983:function(Vt,it,k){"use strict";k.d(it,{$i:function(){return Be},C8:function(){return At},GF:function(){return B},HO:function(){return ne},IO:function(){return E},K7:function(){return pt},Kw:function(){return tt},LC:function(){return P},Mh:function(){return De},P1:function(){return Oe},PJ:function(){return Ft},Qe:function(){return He},R1:function(){return V},RP:function(){return K},S6:function(){return Me},TT:function(){return A},Ut:function(){return S},V8:function(){return q},WU:function(){return ie},YK:function(){return st},YU:function(){return be},ZG:function(){return Fe},ZH:function(){return W},ab:function(){return ot},c1:function(){return ut},df:function(){return oe},ec:function(){return J},fi:function(){return mt},fy:function(){return v},j3:function(){return de},j_:function(){return O},m5:function(){return y},mK:function(){return N},mr:function(){return L},oH:function(){return _e},oL:function(){return ce},ok:function(){return pe},ow:function(){return H},qq:function(){return ve},qu:function(){return U},rL:function(){return re},uS:function(){return jt},un:function(){return l},uq:function(){return x},vH:function(){return ue},xe:function(){return at},zY:function(){return z}});function y(te){return!te||typeof te!="string"?!0:te.trim().length===0}const Ee=/{(\d+)}/g;function ie(te,...Ie){return Ie.length===0?te:te.replace(Ee,function(Ue,ze){const qe=parseInt(ze,10);return isNaN(qe)||qe<0||qe>=Ie.length?Ue:Ie[qe]})}function be(te){return te.replace(/[<>&]/g,function(Ie){switch(Ie){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return Ie}})}function J(te){return te.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function v(te,Ie=" "){const Ue=de(te,Ie);return ce(Ue,Ie)}function de(te,Ie){if(!te||!Ie)return te;const Ue=Ie.length;if(Ue===0||te.length===0)return te;let ze=0;for(;te.indexOf(Ie,ze)===ze;)ze=ze+Ue;return te.substring(ze)}function ce(te,Ie){if(!te||!Ie)return te;const Ue=Ie.length,ze=te.length;if(Ue===0||ze===0)return te;let qe=ze,gt=-1;for(;gt=te.lastIndexOf(Ie,qe-1),!(gt===-1||gt+Ue!==qe);){if(gt===0)return"";qe=gt}return te.substring(0,qe)}function l(te){return te.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function V(te){return te.replace(/\*/g,"")}function B(te,Ie,Ue={}){if(!te)throw new Error("Cannot create regex from empty string");Ie||(te=J(te)),Ue.wholeWord&&(/\B/.test(te.charAt(0))||(te="\\b"+te),/\B/.test(te.charAt(te.length-1))||(te=te+"\\b"));let ze="";return Ue.global&&(ze+="g"),Ue.matchCase||(ze+="i"),Ue.multiline&&(ze+="m"),Ue.unicode&&(ze+="u"),new RegExp(te,ze)}function E(te){return te.source==="^"||te.source==="^$"||te.source==="$"||te.source==="^\\s*$"?!1:!!(te.exec("")&&te.lastIndex===0)}function L(te){return(te.global?"g":"")+(te.ignoreCase?"i":"")+(te.multiline?"m":"")+(te.unicode?"u":"")}function x(te){return te.split(/\r\n|\r|\n/)}function P(te){for(let Ie=0,Ue=te.length;Ie<Ue;Ie++){const ze=te.charCodeAt(Ie);if(ze!==32&&ze!==9)return Ie}return-1}function q(te,Ie=0,Ue=te.length){for(let ze=Ie;ze<Ue;ze++){const qe=te.charCodeAt(ze);if(qe!==32&&qe!==9)return te.substring(Ie,ze)}return te.substring(Ie,Ue)}function H(te,Ie=te.length-1){for(let Ue=Ie;Ue>=0;Ue--){const ze=te.charCodeAt(Ue);if(ze!==32&&ze!==9)return Ue}return-1}function U(te,Ie){return te<Ie?-1:te>Ie?1:0}function A(te,Ie,Ue=0,ze=te.length,qe=0,gt=Ie.length){for(;Ue<ze&&qe<gt;Ue++,qe++){let _t=te.charCodeAt(Ue),St=Ie.charCodeAt(qe);if(_t<St)return-1;if(_t>St)return 1}const Rt=ze-Ue,vt=gt-qe;return Rt<vt?-1:Rt>vt?1:0}function z(te,Ie){return O(te,Ie,0,te.length,0,Ie.length)}function O(te,Ie,Ue=0,ze=te.length,qe=0,gt=Ie.length){for(;Ue<ze&&qe<gt;Ue++,qe++){let _t=te.charCodeAt(Ue),St=Ie.charCodeAt(qe);if(_t===St)continue;if(_t>=128||St>=128)return A(te.toLowerCase(),Ie.toLowerCase(),Ue,ze,qe,gt);N(_t)&&(_t-=32),N(St)&&(St-=32);const Nt=_t-St;if(Nt!==0)return Nt}const Rt=ze-Ue,vt=gt-qe;return Rt<vt?-1:Rt>vt?1:0}function N(te){return te>=97&&te<=122}function oe(te){return te>=65&&te<=90}function ve(te,Ie){return te.length===Ie.length&&O(te,Ie)===0}function pe(te,Ie){const Ue=Ie.length;return Ie.length>te.length?!1:O(te,Ie,0,Ue)===0}function De(te,Ie){let Ue,ze=Math.min(te.length,Ie.length);for(Ue=0;Ue<ze;Ue++)if(te.charCodeAt(Ue)!==Ie.charCodeAt(Ue))return Ue;return ze}function Oe(te,Ie){let Ue,ze=Math.min(te.length,Ie.length);const qe=te.length-1,gt=Ie.length-1;for(Ue=0;Ue<ze;Ue++)if(te.charCodeAt(qe-Ue)!==Ie.charCodeAt(gt-Ue))return Ue;return ze}function Fe(te){return 55296<=te&&te<=56319}function st(te){return 56320<=te&&te<=57343}function re(te,Ie){return(te-55296<<10)+(Ie-56320)+65536}function W(te,Ie,Ue){const ze=te.charCodeAt(Ue);if(Fe(ze)&&Ue+1<Ie){const qe=te.charCodeAt(Ue+1);if(st(qe))return re(ze,qe)}return ze}function ee(te,Ie){const Ue=te.charCodeAt(Ie-1);if(st(Ue)&&Ie>1){const ze=te.charCodeAt(Ie-2);if(Fe(ze))return re(ze,Ue)}return Ue}function ue(te,Ie){const Ue=ke.getInstance(),ze=Ie,qe=te.length,gt=W(te,qe,Ie);Ie+=gt>=65536?2:1;let Rt=Ue.getGraphemeBreakType(gt);for(;Ie<qe;){const vt=W(te,qe,Ie),_t=Ue.getGraphemeBreakType(vt);if(mt(Rt,_t))break;Ie+=vt>=65536?2:1,Rt=_t}return Ie-ze}function ne(te,Ie){const Ue=ke.getInstance(),ze=Ie,qe=ee(te,Ie);Ie-=qe>=65536?2:1;let gt=Ue.getGraphemeBreakType(qe);for(;Ie>0;){const Rt=ee(te,Ie),vt=Ue.getGraphemeBreakType(Rt);if(mt(vt,gt))break;Ie-=Rt>=65536?2:1,gt=vt}return ze-Ie}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 S(te){return ae.test(te)}const w=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function K(te){return w.test(te)}const ye=/^[\t\n\r\x20-\x7E]*$/;function Be(te){return ye.test(te)}const He=/[\u2028\u2029]/;function ot(te){return He.test(te)}function at(te){for(let Ie=0,Ue=te.length;Ie<Ue;Ie++)if(pt(te.charCodeAt(Ie)))return!0;return!1}function pt(te){return te=+te,te>=11904&&te<=55215||te>=63744&&te<=64255||te>=65281&&te<=65374}function At(te){return te>=127462&&te<=127487||te===8986||te===8987||te===9200||te===9203||te>=9728&&te<=10175||te===11088||te===11093||te>=127744&&te<=128591||te>=128640&&te<=128764||te>=128992&&te<=129003||te>=129280&&te<=129535||te>=129648&&te<=129750}const ut="\uFEFF";function jt(te){return!!(te&&te.length>0&&te.charCodeAt(0)===65279)}function tt(te,Ie=!1){return te?(Ie&&(te=te.replace(/\\./g,"")),te.toLowerCase()!==te):!1}function Ft(te){return te=te%(2*26),te<26?String.fromCharCode(97+te):String.fromCharCode(65+te-26)}function Me(te){return ke.getInstance().getGraphemeBreakType(te)}function mt(te,Ie){return te===0?Ie!==5&&Ie!==7:te===2&&Ie===3?!1:te===4||te===2||te===3||Ie===4||Ie===2||Ie===3?!0:!(te===8&&(Ie===8||Ie===9||Ie===11||Ie===12)||(te===11||te===9)&&(Ie===9||Ie===10)||(te===12||te===10)&&Ie===10||Ie===5||Ie===13||Ie===7||te===1||te===13&&Ie===14||te===6&&Ie===6)}class ke{constructor(){this._data=Ce()}static getInstance(){return ke._INSTANCE||(ke._INSTANCE=new ke),ke._INSTANCE}getGraphemeBreakType(Ie){if(Ie<32)return Ie===10?3:Ie===13?2:4;if(Ie<127)return 0;const Ue=this._data,ze=Ue.length/3;let qe=1;for(;qe<=ze;)if(Ie<Ue[3*qe])qe=2*qe;else if(Ie>Ue[3*qe+1])qe=2*qe+1;else return Ue[3*qe+2];return 0}}ke._INSTANCE=null;function Ce(){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 _e(te,Ie){if(te===0)return 0;const Ue=Ne(te,Ie);if(Ue!==void 0)return Ue;const ze=ee(Ie,te);return te-=Ke(ze),te}function Ne(te,Ie){let Ue=ee(Ie,te);for(te-=Ke(Ue);nt(Ue)||Ue===65039||Ue===8419;){if(te===0)return;Ue=ee(Ie,te),te-=Ke(Ue)}if(At(Ue)){if(te>=0){const ze=ee(Ie,te);ze===8205&&(te-=Ke(ze))}return te}}function Ke(te){return te>=65536?2:1}function nt(te){return 127995<=te&&te<=127999}},72999:function(Vt,it,k){"use strict";k.d(it,{$E:function(){return P},$K:function(){return de},D8:function(){return E},HD:function(){return Ee},IU:function(){return q},Jp:function(){return ce},Kn:function(){return ie},cW:function(){return V},f6:function(){return H},hj:function(){return be},jn:function(){return J},kJ:function(){return y},mf:function(){return B},o8:function(){return v},p_:function(){return l},vE:function(){return U}});function y(A){return Array.isArray(A)}function Ee(A){return typeof A=="string"}function ie(A){return typeof A=="object"&&A!==null&&!Array.isArray(A)&&!(A instanceof RegExp)&&!(A instanceof Date)}function be(A){return typeof A=="number"&&!isNaN(A)}function J(A){return A===!0||A===!1}function v(A){return typeof A=="undefined"}function de(A){return!ce(A)}function ce(A){return v(A)||A===null}function l(A,z){if(!A)throw new Error(z?`Unexpected type, expected '${z}'`:"Unexpected type")}function V(A){if(ce(A))throw new Error("Assertion Failed: argument is undefined or null");return A}function B(A){return typeof A=="function"}function E(A,z){const O=Math.min(A.length,z.length);for(let N=0;N<O;N++)L(A[N],z[N])}function L(A,z){if(Ee(z)){if(typeof A!==z)throw new Error(`argument does not match constraint: typeof ${z}`)}else if(B(z)){try{if(A instanceof z)return}catch(O){}if(!ce(A)&&A.constructor===z||z.length===1&&z.call(void 0,A)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function x(A){let z=[],O=Object.getPrototypeOf(A);for(;Object.prototype!==O;)z=z.concat(Object.getOwnPropertyNames(O)),O=Object.getPrototypeOf(O);return z}function P(A){const z=[];for(const O of x(A))typeof A[O]=="function"&&z.push(O);return z}function q(A,z){const O=oe=>function(){const ve=Array.prototype.slice.call(arguments,0);return z(oe,ve)};let N={};for(const oe of A)N[oe]=O(oe);return N}function H(A){return A===null?void 0:A}function U(A,z="Unreachable"){throw new Error(z)}},13268:function(Vt,it,k){"use strict";k.d(it,{N:function(){return Ee}});function y(ie,be){let J;return be.length===0?J=ie:J=ie.replace(/\{(\d+)\}/g,function(v,de){const ce=de[0];return typeof be[ce]!="undefined"?be[ce]:v}),J}function Ee(ie,be,...J){return y(be,J)}},96236:function(Vt,it,k){"use strict";k.d(it,{BH:function(){return q},NZ:function(){return H},U8:function(){return U},co:function(){return P},eH:function(){return x},vr:function(){return L}});var y=k(75918),Ee=k(52615),ie=k(4348),be=k(88226),J=k(69323),v=k(34502),de=k(35884),ce=k(90689),l=k(16925),V=k(49055),B=function(A,z,O,N){var oe=arguments.length,ve=oe<3?z:N===null?N=Object.getOwnPropertyDescriptor(z,O):N,pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(A,z,O,N);else for(var De=A.length-1;De>=0;De--)(pe=A[De])&&(ve=(oe<3?pe(ve):oe>3?pe(z,O,ve):pe(z,O))||ve);return oe>3&&ve&&Object.defineProperty(z,O,ve),ve},E=function(A,z){return function(O,N){z(O,N,A)}};function L(A){return A.command!==void 0}class x{constructor(z){this.id=x._idPool++,this._debugName=z}}x._idPool=0,x.CommandPalette=new x("CommandPalette"),x.EditorContext=new x("EditorContext"),x.SimpleEditorContext=new x("SimpleEditorContext"),x.EditorContextCopy=new x("EditorContextCopy"),x.EditorContextPeek=new x("EditorContextPeek"),x.MenubarEditMenu=new x("MenubarEditMenu"),x.MenubarCopy=new x("MenubarCopy"),x.MenubarGoMenu=new x("MenubarGoMenu"),x.MenubarSelectionMenu=new x("MenubarSelectionMenu"),x.InlineCompletionsActions=new x("InlineCompletionsActions");const P=(0,l.yh)("menuService"),q=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new ie.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:A=>A===x.CommandPalette}}addCommand(A){return this.addCommands(be.$.single(A))}addCommands(A){for(const z of A)this._commands.set(z.id,z);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,J.OF)(()=>{let z=!1;for(const O of A)z=this._commands.delete(O.id)||z;z&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(A){return this._commands.get(A)}getCommands(){const A=new Map;return this._commands.forEach((z,O)=>A.set(O,z)),A}appendMenuItem(A,z){return this.appendMenuItems(be.$.single({id:A,item:z}))}appendMenuItems(A){const z=new Set,O=new v.S;for(const{id:N,item:oe}of A){let ve=this._menuItems.get(N);ve||(ve=new v.S,this._menuItems.set(N,ve)),O.push(ve.push(oe)),z.add(N)}return this._onDidChangeMenu.fire(z),(0,J.OF)(()=>{if(O.size>0){for(let N of O)N();this._onDidChangeMenu.fire(z),O.clear()}})}getMenuItems(A){let z;return this._menuItems.has(A)?z=[...this._menuItems.get(A)]:z=[],A===x.CommandPalette&&this._appendImplicitItems(z),z}_appendImplicitItems(A){const z=new Set;for(const O of A)L(O)&&(z.add(O.command.id),O.alt&&z.add(O.alt.id));this._commands.forEach((O,N)=>{z.has(N)||A.push({command:O})})}};class H extends y.wY{constructor(z,O,N,oe){super(`submenuitem.${z.submenu.id}`,typeof z.title=="string"?z.title:z.title.value,[],"submenu"),this.item=z,this._menuService=O,this._contextKeyService=N,this._options=oe}get actions(){const z=[],O=this._menuService.createMenu(this.item.submenu,this._contextKeyService),N=O.getActions(this._options);O.dispose();for(const[,oe]of N)oe.length>0&&(z.push(...oe),z.push(new y.Z0));return z.length&&z.pop(),z}}let U=class xu{constructor(z,O,N,oe,ve){var pe,De;if(this._commandService=ve,this.id=z.id,this.label=N!=null&&N.renderShortTitle&&z.shortTitle?typeof z.shortTitle=="string"?z.shortTitle:z.shortTitle.value:typeof z.title=="string"?z.title:z.title.value,this.tooltip=(De=typeof z.tooltip=="string"?z.tooltip:(pe=z.tooltip)===null||pe===void 0?void 0:pe.value)!==null&&De!==void 0?De:"",this.enabled=!z.precondition||oe.contextMatchesRules(z.precondition),this.checked=void 0,z.toggled){const Oe=z.toggled.condition?z.toggled:{condition:z.toggled};this.checked=oe.contextMatchesRules(Oe.condition),this.checked&&Oe.tooltip&&(this.tooltip=typeof Oe.tooltip=="string"?Oe.tooltip:Oe.tooltip.value),Oe.title&&(this.label=typeof Oe.title=="string"?Oe.title:Oe.title.value)}this.item=z,this.alt=O?new xu(O,void 0,N,oe,ve):void 0,this._options=N,V.kS.isThemeIcon(z.icon)&&(this.class=Ee.dT.asClassName(z.icon))}dispose(){}run(...z){var O,N;let oe=[];return!((O=this._options)===null||O===void 0)&&O.arg&&(oe=[...oe,this._options.arg]),!((N=this._options)===null||N===void 0)&&N.shouldForwardArgs&&(oe=[...oe,...z]),this._commandService.executeCommand(this.id,...oe)}};U=B([E(3,ce.i6),E(4,de.H)],U)},35884:function(Vt,it,k){"use strict";k.d(it,{H:function(){return de},P:function(){return ce}});var y=k(4348),Ee=k(88226),ie=k(69323),be=k(34502),J=k(72999),v=k(16925);const de=(0,v.yh)("commandService"),ce=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new y.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(l,V){if(!l)throw new Error("invalid command");if(typeof l=="string"){if(!V)throw new Error("invalid command");return this.registerCommand({id:l,handler:V})}if(l.description){const P=[];for(let H of l.description.args)P.push(H.constraint);const q=l.handler;l.handler=function(H,...U){return(0,J.D8)(U,P),q(H,...U)}}const{id:B}=l;let E=this._commands.get(B);E||(E=new be.S,this._commands.set(B,E));let L=E.unshift(l),x=(0,ie.OF)(()=>{L();const P=this._commands.get(B);P!=null&&P.isEmpty()&&this._commands.delete(B)});return this._onDidRegisterCommand.fire(B),x}registerCommandAlias(l,V){return ce.registerCommand(l,(B,...E)=>B.get(de).executeCommand(V,...E))}getCommand(l){const V=this._commands.get(l);if(!(!V||V.isEmpty()))return Ee.$.first(V)}getCommands(){const l=new Map;for(const V of this._commands.keys()){const B=this.getCommand(V);B&&l.set(V,B)}return l}};ce.registerCommand("noop",()=>{})},90689:function(Vt,it,k){"use strict";k.d(it,{Ao:function(){return de},Eq:function(){return re},Fb:function(){return ce},K8:function(){return ue},i6:function(){return st},uy:function(){return Fe}});var y=k(23345),Ee=k(82983),ie=k(16925);let be=y.WE||"";const J=new Map;J.set("false",!1),J.set("true",!0),J.set("isMac",y.dz),J.set("isLinux",y.IJ),J.set("isWindows",y.ED),J.set("isWeb",y.$L),J.set("isMacNative",y.dz&&!y.$L),J.set("isEdge",be.indexOf("Edg/")>=0),J.set("isFirefox",be.indexOf("Firefox")>=0),J.set("isChrome",be.indexOf("Chrome")>=0),J.set("isSafari",be.indexOf("Safari")>=0);const v=Object.prototype.hasOwnProperty;class de{static has(S){return E.create(S)}static equals(S,w){return L.create(S,w)}static regex(S,w){return oe.create(S,w)}static not(S){return H.create(S)}static and(...S){return De.create(S,null)}static or(...S){return Oe.create(S,null,!0)}static deserialize(S,w=!1){if(S)return this._deserializeOrExpression(S,w)}static _deserializeOrExpression(S,w){let K=S.split("||");return Oe.create(K.map(ye=>this._deserializeAndExpression(ye,w)),null,!0)}static _deserializeAndExpression(S,w){let K=S.split("&&");return De.create(K.map(ye=>this._deserializeOne(ye,w)),null)}static _deserializeOne(S,w){if(S=S.trim(),S.indexOf("!=")>=0){let K=S.split("!=");return q.create(K[0].trim(),this._deserializeValue(K[1],w))}if(S.indexOf("==")>=0){let K=S.split("==");return L.create(K[0].trim(),this._deserializeValue(K[1],w))}if(S.indexOf("=~")>=0){let K=S.split("=~");return oe.create(K[0].trim(),this._deserializeRegexValue(K[1],w))}if(S.indexOf(" in ")>=0){let K=S.split(" in ");return x.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(S)){const K=S.split(">=");return z.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(S)){const K=S.split(">");return A.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(S)){const K=S.split("<=");return N.create(K[0].trim(),K[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(S)){const K=S.split("<");return O.create(K[0].trim(),K[1].trim())}return/^\!\s*/.test(S)?H.create(S.substr(1).trim()):E.create(S)}static _deserializeValue(S,w){if(S=S.trim(),S==="true")return!0;if(S==="false")return!1;let K=/^'([^']*)'$/.exec(S);return K?K[1].trim():S}static _deserializeRegexValue(S,w){if((0,Ee.m5)(S)){if(w)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let K=S.indexOf("/"),ye=S.lastIndexOf("/");if(K===ye||K<0){if(w)throw new Error(`bad regexp-value '${S}', missing /-enclosure`);return console.warn(`bad regexp-value '${S}', missing /-enclosure`),null}let Be=S.slice(K+1,ye),He=S[ye+1]==="i"?"i":"";try{return new RegExp(Be,He)}catch(ot){if(w)throw new Error(`bad regexp-value '${S}', parse error: ${ot}`);return console.warn(`bad regexp-value '${S}', parse error: ${ot}`),null}}}function ce(ae,S){const w=ae?ae.substituteConstants():void 0,K=S?S.substituteConstants():void 0;return!w&&!K?!0:!w||!K?!1:w.equals(K)}function l(ae,S){return ae.cmp(S)}class V{constructor(){this.type=0}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!1}serialize(){return"false"}keys(){return[]}negate(){return B.INSTANCE}}V.INSTANCE=new V;class B{constructor(){this.type=1}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!0}serialize(){return"true"}keys(){return[]}negate(){return V.INSTANCE}}B.INSTANCE=new B;class E{constructor(S,w){this.key=S,this.negated=w,this.type=2}static create(S,w=null){const K=J.get(S);return typeof K=="boolean"?K?B.INSTANCE:V.INSTANCE:new E(S,w)}cmp(S){return S.type!==this.type?this.type-S.type:W(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=J.get(this.key);return typeof S=="boolean"?S?B.INSTANCE:V.INSTANCE:this}evaluate(S){return!!S.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this.key,this)),this.negated}}class L{constructor(S,w,K){this.key=S,this.value=w,this.negated=K,this.type=4}static create(S,w,K=null){if(typeof w=="boolean")return w?E.create(S,K):H.create(S,K);const ye=J.get(S);return typeof ye=="boolean"?w===(ye?"true":"false")?B.INSTANCE:V.INSTANCE:new L(S,w,K)}cmp(S){return S.type!==this.type?this.type-S.type:ee(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=J.get(this.key);if(typeof S=="boolean"){const w=S?"true":"false";return this.value===w?B.INSTANCE:V.INSTANCE}return this}evaluate(S){return S.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=q.create(this.key,this.value,this)),this.negated}}class x{constructor(S,w){this.key=S,this.valueKey=w,this.type=10,this.negated=null}static create(S,w){return new x(S,w)}cmp(S){return S.type!==this.type?this.type-S.type:ee(this.key,this.valueKey,S.key,S.valueKey)}equals(S){return S.type===this.type?this.key===S.key&&this.valueKey===S.valueKey:!1}substituteConstants(){return this}evaluate(S){const w=S.getValue(this.valueKey),K=S.getValue(this.key);return Array.isArray(w)?w.indexOf(K)>=0:typeof K=="string"&&typeof w=="object"&&w!==null?v.call(w,K):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=P.create(this)),this.negated}}class P{constructor(S){this._actual=S,this.type=11}static create(S){return new P(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class q{constructor(S,w,K){this.key=S,this.value=w,this.negated=K,this.type=5}static create(S,w,K=null){if(typeof w=="boolean")return w?H.create(S,K):E.create(S,K);const ye=J.get(S);return typeof ye=="boolean"?w===(ye?"true":"false")?V.INSTANCE:B.INSTANCE:new q(S,w,K)}cmp(S){return S.type!==this.type?this.type-S.type:ee(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=J.get(this.key);if(typeof S=="boolean"){const w=S?"true":"false";return this.value===w?V.INSTANCE:B.INSTANCE}return this}evaluate(S){return S.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this.key,this.value,this)),this.negated}}class H{constructor(S,w){this.key=S,this.negated=w,this.type=3}static create(S,w=null){const K=J.get(S);return typeof K=="boolean"?K?V.INSTANCE:B.INSTANCE:new H(S,w)}cmp(S){return S.type!==this.type?this.type-S.type:W(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=J.get(this.key);return typeof S=="boolean"?S?V.INSTANCE:B.INSTANCE:this}evaluate(S){return!S.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this)),this.negated}}function U(ae,S){if(typeof ae=="string"){const w=parseFloat(ae);isNaN(w)||(ae=w)}return typeof ae=="string"||typeof ae=="number"?S(ae):V.INSTANCE}class A{constructor(S,w,K){this.key=S,this.value=w,this.negated=K,this.type=12}static create(S,w,K=null){return U(w,ye=>new A(S,ye,K))}cmp(S){return S.type!==this.type?this.type-S.type:ee(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}class z{constructor(S,w,K){this.key=S,this.value=w,this.negated=K,this.type=13}static create(S,w,K=null){return U(w,ye=>new z(S,ye,K))}cmp(S){return S.type!==this.type?this.type-S.type:ee(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class O{constructor(S,w,K){this.key=S,this.value=w,this.negated=K,this.type=14}static create(S,w,K=null){return U(w,ye=>new O(S,ye,K))}cmp(S){return S.type!==this.type?this.type-S.type:ee(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class N{constructor(S,w,K){this.key=S,this.value=w,this.negated=K,this.type=15}static create(S,w,K=null){return U(w,ye=>new N(S,ye,K))}cmp(S){return S.type!==this.type?this.type-S.type:ee(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class oe{constructor(S,w){this.key=S,this.regexp=w,this.type=7,this.negated=null}static create(S,w){return new oe(S,w)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.key<S.key)return-1;if(this.key>S.key)return 1;const w=this.regexp?this.regexp.source:"",K=S.regexp?S.regexp.source:"";return w<K?-1:w>K?1:0}equals(S){if(S.type===this.type){const w=this.regexp?this.regexp.source:"",K=S.regexp?S.regexp.source:"";return this.key===S.key&&w===K}return!1}substituteConstants(){return this}evaluate(S){let w=S.getValue(this.key);return this.regexp?this.regexp.test(w):!1}serialize(){const S=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${S}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ve.create(this)),this.negated}}class ve{constructor(S){this._actual=S,this.type=8}static create(S){return new ve(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function pe(ae){let S=null;for(let w=0,K=ae.length;w<K;w++){const ye=ae[w].substituteConstants();if(ae[w]!==ye&&S===null){S=[];for(let Be=0;Be<w;Be++)S[Be]=ae[Be]}S!==null&&(S[w]=ye)}return S===null?ae:S}class De{constructor(S,w){this.expr=S,this.negated=w,this.type=6}static create(S,w){return De._normalizeArr(S,w)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let w=0,K=this.expr.length;w<K;w++){const ye=l(this.expr[w],S.expr[w]);if(ye!==0)return ye}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let w=0,K=this.expr.length;w<K;w++)if(!this.expr[w].equals(S.expr[w]))return!1;return!0}return!1}substituteConstants(){const S=pe(this.expr);return S===this.expr?this:De.create(S,this.negated)}evaluate(S){for(let w=0,K=this.expr.length;w<K;w++)if(!this.expr[w].evaluate(S))return!1;return!0}static _normalizeArr(S,w){const K=[];let ye=!1;for(const Be of S)if(Be){if(Be.type===1){ye=!0;continue}if(Be.type===0)return V.INSTANCE;if(Be.type===6){K.push(...Be.expr);continue}K.push(Be)}if(K.length===0&&ye)return B.INSTANCE;if(K.length!==0){if(K.length===1)return K[0];K.sort(l);for(let Be=1;Be<K.length;Be++)K[Be-1].equals(K[Be])&&(K.splice(Be,1),Be--);if(K.length===1)return K[0];for(;K.length>1;){const Be=K[K.length-1];if(Be.type!==9)break;K.pop();const He=K.pop(),ot=K.length===0,at=Oe.create(Be.expr.map(pt=>De.create([pt,He],null)),null,ot);at&&(K.push(at),K.sort(l))}return K.length===1?K[0]:new De(K,w)}}serialize(){return this.expr.map(S=>S.serialize()).join(" && ")}keys(){const S=[];for(let w of this.expr)S.push(...w.keys());return S}negate(){if(!this.negated){const S=[];for(let w of this.expr)S.push(w.negate());this.negated=Oe.create(S,this,!0)}return this.negated}}class Oe{constructor(S,w){this.expr=S,this.negated=w,this.type=9}static create(S,w,K){return Oe._normalizeArr(S,w,K)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let w=0,K=this.expr.length;w<K;w++){const ye=l(this.expr[w],S.expr[w]);if(ye!==0)return ye}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let w=0,K=this.expr.length;w<K;w++)if(!this.expr[w].equals(S.expr[w]))return!1;return!0}return!1}substituteConstants(){const S=pe(this.expr);return S===this.expr?this:Oe.create(S,this.negated,!1)}evaluate(S){for(let w=0,K=this.expr.length;w<K;w++)if(this.expr[w].evaluate(S))return!0;return!1}static _normalizeArr(S,w,K){let ye=[],Be=!1;if(S){for(let He=0,ot=S.length;He<ot;He++){const at=S[He];if(at){if(at.type===0){Be=!0;continue}if(at.type===1)return B.INSTANCE;if(at.type===9){ye=ye.concat(at.expr);continue}ye.push(at)}}if(ye.length===0&&Be)return V.INSTANCE;ye.sort(l)}if(ye.length!==0){if(ye.length===1)return ye[0];for(let He=1;He<ye.length;He++)ye[He-1].equals(ye[He])&&(ye.splice(He,1),He--);if(ye.length===1)return ye[0];if(K){for(let He=0;He<ye.length;He++)for(let ot=He+1;ot<ye.length;ot++)ue(ye[He],ye[ot])&&(ye.splice(ot,1),ot--);if(ye.length===1)return ye[0]}return new Oe(ye,w)}}serialize(){return this.expr.map(S=>S.serialize()).join(" || ")}keys(){const S=[];for(let w of this.expr)S.push(...w.keys());return S}negate(){if(!this.negated){let S=[];for(let w of this.expr)S.push(w.negate());for(;S.length>1;){const w=S.shift(),K=S.shift(),ye=[];for(const He of ne(w))for(const ot of ne(K))ye.push(De.create([He,ot],null));const Be=S.length===0;S.unshift(Oe.create(ye,null,Be))}this.negated=S[0]}return this.negated}}class Fe extends E{constructor(S,w,K){super(S,null),this._defaultValue=w,typeof K=="object"?Fe._info.push(Object.assign(Object.assign({},K),{key:S})):K!==!0&&Fe._info.push({key:S,description:K,type:w!=null?typeof w:void 0})}static all(){return Fe._info.values()}bindTo(S){return S.createKey(this.key,this._defaultValue)}getValue(S){return S.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(S){return L.create(this.key,S)}}Fe._info=[];const st=(0,ie.yh)("contextKeyService"),re="setContext";function W(ae,S){return ae<S?-1:ae>S?1:0}function ee(ae,S,w,K){return ae<w?-1:ae>w?1:S<K?-1:S>K?1:0}function ue(ae,S){if(S.type===6&&ae.type!==9&&ae.type!==6){for(const ye of S.expr)if(ae.equals(ye))return!0}const w=ae.negate(),K=ne(w).concat(ne(S));K.sort(l);for(let ye=0;ye<K.length;ye++){const He=K[ye].negate();for(let ot=ye+1;ot<K.length;ot++){const at=K[ot];if(He.equals(at))return!0}}return!1}function ne(ae){return ae.type===9?ae.expr:[ae]}},16925:function(Vt,it,k){"use strict";k.d(it,{I8:function(){return y},TG:function(){return Ee},jt:function(){return J},yh:function(){return be}});var y;(function(v){v.serviceIds=new Map,v.DI_TARGET="$di$target",v.DI_DEPENDENCIES="$di$dependencies";function de(ce){return ce[v.DI_DEPENDENCIES]||[]}v.getServiceDependencies=de})(y||(y={}));const Ee=be("instantiationService");function ie(v,de,ce,l){de[y.DI_TARGET]===de?de[y.DI_DEPENDENCIES].push({id:v,index:ce,optional:l}):(de[y.DI_DEPENDENCIES]=[{id:v,index:ce,optional:l}],de[y.DI_TARGET]=de)}function be(v){if(y.serviceIds.has(v))return y.serviceIds.get(v);const de=function(ce,l,V){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ie(de,ce,V,!1)};return de.toString=()=>v,y.serviceIds.set(v,de),de}function J(v){return function(de,ce,l){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");ie(v,de,l,!0)}}},44650:function(Vt,it,k){"use strict";k.d(it,{B:function(){return be}});var y=k(76068),Ee=k(72999);class ie{constructor(){this.data=new Map}add(v,de){y.ok(Ee.HD(v)),y.ok(Ee.Kn(de)),y.ok(!this.data.has(v),"There is already an extension with this id"),this.data.set(v,de)}as(v){return this.data.get(v)||null}}const be=new ie},66213:function(Vt,it,k){"use strict";k.d(it,{e:function(){return y}});var y;(function(Ee){Ee.DARK="dark",Ee.LIGHT="light",Ee.HIGH_CONTRAST="hc"})(y||(y={}))},49055:function(Vt,it,k){"use strict";k.d(it,{EN:function(){return l},IP:function(){return E},Ic:function(){return P},XE:function(){return de},bB:function(){return q},kS:function(){return V},m6:function(){return B}});var y=k(52615),Ee=k(4348),ie=k(69323),be=k(16925),J=k(44650),v=k(66213);const de=(0,be.yh)("themeService");var ce;(function(H){function U(A){return A&&typeof A=="object"&&typeof A.id=="string"}H.isThemeColor=U})(ce||(ce={}));function l(H){return{id:H}}var V;(function(H){function U(ve){return ve&&typeof ve=="object"&&typeof ve.id=="string"&&(typeof ve.color=="undefined"||ce.isThemeColor(ve.color))}H.isThemeIcon=U;const A=new RegExp(`^\\$\\((${y.dT.iconNameExpression}(?:${y.dT.iconModifierExpression})?)\\)$`);function z(ve){const pe=A.exec(ve);if(!pe)return;let[,De]=pe;return{id:De}}H.fromString=z;function O(ve,pe){let De=ve.id;const Oe=De.lastIndexOf("~");return Oe!==-1&&(De=De.substring(0,Oe)),pe&&(De=`${De}~${pe}`),{id:De}}H.modify=O;function N(ve,pe){var De,Oe;return ve.id===pe.id&&((De=ve.color)===null||De===void 0?void 0:De.id)===((Oe=pe.color)===null||Oe===void 0?void 0:Oe.id)}H.isEqual=N;function oe(ve,pe){return{id:ve.id,color:pe?l(pe):void 0}}H.asThemeIcon=oe,H.asClassNameArray=y.dT.asClassNameArray,H.asClassName=y.dT.asClassName,H.asCSSSelector=y.dT.asCSSSelector})(V||(V={}));function B(H){switch(H){case v.e.DARK:return"vs-dark";case v.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const E={ThemingContribution:"base.contributions.theming"};class L{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Ee.Q5}onColorThemeChange(U){return this.themingParticipants.push(U),this.onThemingParticipantAddedEmitter.fire(U),(0,ie.OF)(()=>{const A=this.themingParticipants.indexOf(U);this.themingParticipants.splice(A,1)})}getThemingParticipants(){return this.themingParticipants}}let x=new L;J.B.add(E.ThemingContribution,x);function P(H){return x.onColorThemeChange(H)}class q extends ie.JT{constructor(U){super(),this.themeService=U,this.theme=U.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(A=>this.onThemeChange(A)))}onThemeChange(U){this.theme=U,this.updateStyles()}updateStyles(){}}},66003:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return de}});var y=k(42244),Ee=k(85899),ie=k(43749),be=k(59301),J=["show"];function v(ce,l){if(!l.max)return!0;var V=l.strategy(ce);return V<=l.max}function de(ce,l){return be.useMemo(function(){var V={};l&&(V.show=(0,ie.Z)(l)==="object"&&l.formatter?l.formatter:!!l),V=(0,Ee.Z)((0,Ee.Z)({},V),ce);var B=V,E=B.show,L=(0,y.Z)(B,J);return(0,Ee.Z)((0,Ee.Z)({},L),{},{show:!!E,showFormatter:typeof E=="function"?E:void 0,strategy:L.strategy||function(x){return x.length}})},[ce,l])}},36901:function(Vt,it,k){"use strict";k.r(it),k.d(it,{BaseInput:function(){return V},default:function(){return z}});var y=k(85899),Ee=k(60499),ie=k(18642),be=k(43749),J=k(92310),v=k.n(J),de=k(59301),ce=k(30292),l=de.forwardRef(function(O,N){var oe,ve,pe,De=O.inputElement,Oe=O.children,Fe=O.prefixCls,st=O.prefix,re=O.suffix,W=O.addonBefore,ee=O.addonAfter,ue=O.className,ne=O.style,ae=O.disabled,S=O.readOnly,w=O.focused,K=O.triggerFocus,ye=O.allowClear,Be=O.value,He=O.handleReset,ot=O.hidden,at=O.classes,pt=O.classNames,At=O.dataAttrs,ut=O.styles,jt=O.components,tt=O.onClear,Ft=Oe!=null?Oe:De,Me=(jt==null?void 0:jt.affixWrapper)||"span",mt=(jt==null?void 0:jt.groupWrapper)||"span",ke=(jt==null?void 0:jt.wrapper)||"span",Ce=(jt==null?void 0:jt.groupAddon)||"span",_e=(0,de.useRef)(null),Ne=function(Tt){var Et;(Et=_e.current)!==null&&Et!==void 0&&Et.contains(Tt.target)&&(K==null||K())},Ke=(0,ce.X3)(O),nt=(0,de.cloneElement)(Ft,{value:Be,className:v()((oe=Ft.props)===null||oe===void 0?void 0:oe.className,!Ke&&(pt==null?void 0:pt.variant))||null}),te=(0,de.useRef)(null);if(de.useImperativeHandle(N,function(){return{nativeElement:te.current||_e.current}}),Ke){var Ie=null;if(ye){var Ue=!ae&&!S&&Be,ze="".concat(Fe,"-clear-icon"),qe=(0,be.Z)(ye)==="object"&&ye!==null&&ye!==void 0&&ye.clearIcon?ye.clearIcon:"\u2716";Ie=de.createElement("button",{type:"button",tabIndex:-1,onClick:function(Tt){He==null||He(Tt),tt==null||tt()},onMouseDown:function(Tt){return Tt.preventDefault()},className:v()(ze,(0,ie.Z)((0,ie.Z)({},"".concat(ze,"-hidden"),!Ue),"".concat(ze,"-has-suffix"),!!re))},qe)}var gt="".concat(Fe,"-affix-wrapper"),Rt=v()(gt,(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(Fe,"-disabled"),ae),"".concat(gt,"-disabled"),ae),"".concat(gt,"-focused"),w),"".concat(gt,"-readonly"),S),"".concat(gt,"-input-with-clear-btn"),re&&ye&&Be),at==null?void 0:at.affixWrapper,pt==null?void 0:pt.affixWrapper,pt==null?void 0:pt.variant),vt=(re||ye)&&de.createElement("span",{className:v()("".concat(Fe,"-suffix"),pt==null?void 0:pt.suffix),style:ut==null?void 0:ut.suffix},Ie,re);nt=de.createElement(Me,(0,Ee.Z)({className:Rt,style:ut==null?void 0:ut.affixWrapper,onClick:Ne},At==null?void 0:At.affixWrapper,{ref:_e}),st&&de.createElement("span",{className:v()("".concat(Fe,"-prefix"),pt==null?void 0:pt.prefix),style:ut==null?void 0:ut.prefix},st),nt,vt)}if((0,ce.He)(O)){var _t="".concat(Fe,"-group"),St="".concat(_t,"-addon"),Nt="".concat(_t,"-wrapper"),Pt=v()("".concat(Fe,"-wrapper"),_t,at==null?void 0:at.wrapper,pt==null?void 0:pt.wrapper),Ct=v()(Nt,(0,ie.Z)({},"".concat(Nt,"-disabled"),ae),at==null?void 0:at.group,pt==null?void 0:pt.groupWrapper);nt=de.createElement(mt,{className:Ct,ref:te},de.createElement(ke,{className:Pt},W&&de.createElement(Ce,{className:St},W),nt,ee&&de.createElement(Ce,{className:St},ee)))}return de.cloneElement(nt,{className:v()((ve=nt.props)===null||ve===void 0?void 0:ve.className,ue)||null,style:(0,y.Z)((0,y.Z)({},(pe=nt.props)===null||pe===void 0?void 0:pe.style),ne),hidden:ot})}),V=l,B=k(77654),E=k(72190),L=k(42244),x=k(18929),P=k(2738),q=k(66003),H=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],U=(0,de.forwardRef)(function(O,N){var oe=O.autoComplete,ve=O.onChange,pe=O.onFocus,De=O.onBlur,Oe=O.onPressEnter,Fe=O.onKeyDown,st=O.onKeyUp,re=O.prefixCls,W=re===void 0?"rc-input":re,ee=O.disabled,ue=O.htmlSize,ne=O.className,ae=O.maxLength,S=O.suffix,w=O.showCount,K=O.count,ye=O.type,Be=ye===void 0?"text":ye,He=O.classes,ot=O.classNames,at=O.styles,pt=O.onCompositionStart,At=O.onCompositionEnd,ut=(0,L.Z)(O,H),jt=(0,de.useState)(!1),tt=(0,E.Z)(jt,2),Ft=tt[0],Me=tt[1],mt=(0,de.useRef)(!1),ke=(0,de.useRef)(!1),Ce=(0,de.useRef)(null),_e=(0,de.useRef)(null),Ne=function(Xe){Ce.current&&(0,ce.nH)(Ce.current,Xe)},Ke=(0,x.Z)(O.defaultValue,{value:O.value}),nt=(0,E.Z)(Ke,2),te=nt[0],Ie=nt[1],Ue=te==null?"":String(te),ze=(0,de.useState)(null),qe=(0,E.Z)(ze,2),gt=qe[0],Rt=qe[1],vt=(0,q.Z)(K,w),_t=vt.max||ae,St=vt.strategy(Ue),Nt=!!_t&&St>_t;(0,de.useImperativeHandle)(N,function(){var G;return{focus:Ne,blur:function(){var fe;(fe=Ce.current)===null||fe===void 0||fe.blur()},setSelectionRange:function(fe,Ae,Pe){var j;(j=Ce.current)===null||j===void 0||j.setSelectionRange(fe,Ae,Pe)},select:function(){var fe;(fe=Ce.current)===null||fe===void 0||fe.select()},input:Ce.current,nativeElement:((G=_e.current)===null||G===void 0?void 0:G.nativeElement)||Ce.current}}),(0,de.useEffect)(function(){ke.current&&(ke.current=!1),Me(function(G){return G&&ee?!1:G})},[ee]);var Pt=function(Xe,fe,Ae){var Pe=fe;if(!mt.current&&vt.exceedFormatter&&vt.max&&vt.strategy(fe)>vt.max){if(Pe=vt.exceedFormatter(fe,{max:vt.max}),fe!==Pe){var j,X;Rt([((j=Ce.current)===null||j===void 0?void 0:j.selectionStart)||0,((X=Ce.current)===null||X===void 0?void 0:X.selectionEnd)||0])}}else if(Ae.source==="compositionEnd")return;Ie(Pe),Ce.current&&(0,ce.rJ)(Ce.current,Xe,ve,Pe)};(0,de.useEffect)(function(){if(gt){var G;(G=Ce.current)===null||G===void 0||G.setSelectionRange.apply(G,(0,B.Z)(gt))}},[gt]);var Ct=function(Xe){Pt(Xe,Xe.target.value,{source:"change"})},Ge=function(Xe){mt.current=!1,Pt(Xe,Xe.currentTarget.value,{source:"compositionEnd"}),At==null||At(Xe)},Tt=function(Xe){Oe&&Xe.key==="Enter"&&!ke.current&&(ke.current=!0,Oe(Xe)),Fe==null||Fe(Xe)},Et=function(Xe){Xe.key==="Enter"&&(ke.current=!1),st==null||st(Xe)},ct=function(Xe){Me(!0),pe==null||pe(Xe)},Lt=function(Xe){ke.current&&(ke.current=!1),Me(!1),De==null||De(Xe)},_=function(Xe){Ie(""),Ne(),Ce.current&&(0,ce.rJ)(Ce.current,Xe,ve)},T=Nt&&"".concat(W,"-out-of-range"),Q=function(){var Xe=(0,P.Z)(O,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return de.createElement("input",(0,Ee.Z)({autoComplete:oe},Xe,{onChange:Ct,onFocus:ct,onBlur:Lt,onKeyDown:Tt,onKeyUp:Et,className:v()(W,(0,ie.Z)({},"".concat(W,"-disabled"),ee),ot==null?void 0:ot.input),style:at==null?void 0:at.input,ref:Ce,size:ue,type:Be,onCompositionStart:function(Ae){mt.current=!0,pt==null||pt(Ae)},onCompositionEnd:Ge}))},C=function(){var Xe=Number(_t)>0;if(S||vt.show){var fe=vt.showFormatter?vt.showFormatter({value:Ue,count:St,maxLength:_t}):"".concat(St).concat(Xe?" / ".concat(_t):"");return de.createElement(de.Fragment,null,vt.show&&de.createElement("span",{className:v()("".concat(W,"-show-count-suffix"),(0,ie.Z)({},"".concat(W,"-show-count-has-suffix"),!!S),ot==null?void 0:ot.count),style:(0,y.Z)({},at==null?void 0:at.count)},fe),S)}return null};return de.createElement(V,(0,Ee.Z)({},ut,{prefixCls:W,className:v()(ne,T),handleReset:_,value:Ue,focused:Ft,triggerFocus:Ne,suffix:C(),disabled:ee,classes:He,classNames:ot,styles:at}),Q())}),A=U,z=A},30292:function(Vt,it,k){"use strict";k.d(it,{He:function(){return y},X3:function(){return Ee},nH:function(){return J},rJ:function(){return be}});function y(v){return!!(v.addonBefore||v.addonAfter)}function Ee(v){return!!(v.prefix||v.suffix||v.allowClear)}function ie(v,de,ce){var l=de.cloneNode(!0),V=Object.create(v,{target:{value:l},currentTarget:{value:l}});return l.value=ce,typeof de.selectionStart=="number"&&typeof de.selectionEnd=="number"&&(l.selectionStart=de.selectionStart,l.selectionEnd=de.selectionEnd),l.setSelectionRange=function(){de.setSelectionRange.apply(de,arguments)},V}function be(v,de,ce,l){if(ce){var V=de;if(de.type==="click"){V=ie(de,v,""),ce(V);return}if(v.type!=="file"&&l!==void 0){V=ie(de,v,l),ce(V);return}ce(V)}}function J(v,de){if(v){v.focus(de);var ce=de||{},l=ce.cursor;if(l){var V=v.value.length;switch(l){case"start":v.setSelectionRange(0,0);break;case"end":v.setSelectionRange(V,V);break;default:v.setSelectionRange(0,V)}}}}},29301:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return re}});var y=k(60499),Ee=k(59301),ie=k(11592),be=k(48736),J=k(85899),v=k(43749),de=k(76846),ce=k(8654),l=Ee.createContext(null);function V(W){var ee=W.children,ue=W.onBatchResize,ne=Ee.useRef(0),ae=Ee.useRef([]),S=Ee.useContext(l),w=Ee.useCallback(function(K,ye,Be){ne.current+=1;var He=ne.current;ae.current.push({size:K,element:ye,data:Be}),Promise.resolve().then(function(){He===ne.current&&(ue==null||ue(ae.current),ae.current=[])}),S==null||S(K,ye,Be)},[ue,S]);return Ee.createElement(l.Provider,{value:w},ee)}var B=k(76374),E=new Map;function L(W){W.forEach(function(ee){var ue,ne=ee.target;(ue=E.get(ne))===null||ue===void 0||ue.forEach(function(ae){return ae(ne)})})}var x=new B.Z(L),P=null,q=null;function H(W,ee){E.has(W)||(E.set(W,new Set),x.observe(W)),E.get(W).add(ee)}function U(W,ee){E.has(W)&&(E.get(W).delete(ee),E.get(W).size||(x.unobserve(W),E.delete(W)))}var A=k(38705),z=k(17212),O=k(39153),N=k(55401),oe=function(W){(0,O.Z)(ue,W);var ee=(0,N.Z)(ue);function ue(){return(0,A.Z)(this,ue),ee.apply(this,arguments)}return(0,z.Z)(ue,[{key:"render",value:function(){return this.props.children}}]),ue}(Ee.Component);function ve(W,ee){var ue=W.children,ne=W.disabled,ae=Ee.useRef(null),S=Ee.useRef(null),w=Ee.useContext(l),K=typeof ue=="function",ye=K?ue(ae):ue,Be=Ee.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),He=!K&&Ee.isValidElement(ye)&&(0,ce.Yr)(ye),ot=He?(0,ce.C4)(ye):null,at=(0,ce.x1)(ot,ae),pt=function(){var tt;return(0,de.ZP)(ae.current)||(ae.current&&(0,v.Z)(ae.current)==="object"?(0,de.ZP)((tt=ae.current)===null||tt===void 0?void 0:tt.nativeElement):null)||(0,de.ZP)(S.current)};Ee.useImperativeHandle(ee,function(){return pt()});var At=Ee.useRef(W);At.current=W;var ut=Ee.useCallback(function(jt){var tt=At.current,Ft=tt.onResize,Me=tt.data,mt=jt.getBoundingClientRect(),ke=mt.width,Ce=mt.height,_e=jt.offsetWidth,Ne=jt.offsetHeight,Ke=Math.floor(ke),nt=Math.floor(Ce);if(Be.current.width!==Ke||Be.current.height!==nt||Be.current.offsetWidth!==_e||Be.current.offsetHeight!==Ne){var te={width:Ke,height:nt,offsetWidth:_e,offsetHeight:Ne};Be.current=te;var Ie=_e===Math.round(ke)?ke:_e,Ue=Ne===Math.round(Ce)?Ce:Ne,ze=(0,J.Z)((0,J.Z)({},te),{},{offsetWidth:Ie,offsetHeight:Ue});w==null||w(ze,jt,Me),Ft&&Promise.resolve().then(function(){Ft(ze,jt)})}},[]);return Ee.useEffect(function(){var jt=pt();return jt&&!ne&&H(jt,ut),function(){return U(jt,ut)}},[ae.current,ne]),Ee.createElement(oe,{ref:S},He?Ee.cloneElement(ye,{ref:at}):ye)}var pe=Ee.forwardRef(ve),De=pe,Oe="rc-observer-key";function Fe(W,ee){var ue=W.children,ne=typeof ue=="function"?[ue]:(0,ie.Z)(ue);return ne.map(function(ae,S){var w=(ae==null?void 0:ae.key)||"".concat(Oe,"-").concat(S);return Ee.createElement(De,(0,y.Z)({},W,{key:w,ref:S===0?ee:void 0}),ae)})}var st=Ee.forwardRef(Fe);st.Collection=V;var re=st},22711:function(Vt,it,k){"use strict";k.r(it),k.d(it,{ResizableTextArea:function(){return st},default:function(){return ue}});var y=k(60499),Ee=k(18642),ie=k(85899),be=k(77654),J=k(72190),v=k(42244),de=k(92310),ce=k.n(de),l=k(36901),V=k(66003),B=k(30292),E=k(18929),L=k(59301),x=k(43749),P=k(29301),q=k(34280),H=k(16089),U=`
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;
`,A=["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"],z={},O;function N(ne){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=ne.getAttribute("id")||ne.getAttribute("data-reactid")||ne.getAttribute("name");if(ae&&z[S])return z[S];var w=window.getComputedStyle(ne),K=w.getPropertyValue("box-sizing")||w.getPropertyValue("-moz-box-sizing")||w.getPropertyValue("-webkit-box-sizing"),ye=parseFloat(w.getPropertyValue("padding-bottom"))+parseFloat(w.getPropertyValue("padding-top")),Be=parseFloat(w.getPropertyValue("border-bottom-width"))+parseFloat(w.getPropertyValue("border-top-width")),He=A.map(function(at){return"".concat(at,":").concat(w.getPropertyValue(at))}).join(";"),ot={sizingStyle:He,paddingSize:ye,borderSize:Be,boxSizing:K};return ae&&S&&(z[S]=ot),ot}function oe(ne){var ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;O||(O=document.createElement("textarea"),O.setAttribute("tab-index","-1"),O.setAttribute("aria-hidden","true"),O.setAttribute("name","hiddenTextarea"),document.body.appendChild(O)),ne.getAttribute("wrap")?O.setAttribute("wrap",ne.getAttribute("wrap")):O.removeAttribute("wrap");var K=N(ne,ae),ye=K.paddingSize,Be=K.borderSize,He=K.boxSizing,ot=K.sizingStyle;O.setAttribute("style","".concat(ot,";").concat(U)),O.value=ne.value||ne.placeholder||"";var at=void 0,pt=void 0,At,ut=O.scrollHeight;if(He==="border-box"?ut+=Be:He==="content-box"&&(ut-=ye),S!==null||w!==null){O.value=" ";var jt=O.scrollHeight-ye;S!==null&&(at=jt*S,He==="border-box"&&(at=at+ye+Be),ut=Math.max(at,ut)),w!==null&&(pt=jt*w,He==="border-box"&&(pt=pt+ye+Be),At=ut>pt?"":"hidden",ut=Math.min(pt,ut))}var tt={height:ut,overflowY:At,resize:"none"};return at&&(tt.minHeight=at),pt&&(tt.maxHeight=pt),tt}var ve=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],pe=0,De=1,Oe=2,Fe=L.forwardRef(function(ne,ae){var S=ne,w=S.prefixCls,K=S.defaultValue,ye=S.value,Be=S.autoSize,He=S.onResize,ot=S.className,at=S.style,pt=S.disabled,At=S.onChange,ut=S.onInternalAutoSize,jt=(0,v.Z)(S,ve),tt=(0,E.Z)(K,{value:ye,postState:function(Lt){return Lt!=null?Lt:""}}),Ft=(0,J.Z)(tt,2),Me=Ft[0],mt=Ft[1],ke=function(Lt){mt(Lt.target.value),At==null||At(Lt)},Ce=L.useRef();L.useImperativeHandle(ae,function(){return{textArea:Ce.current}});var _e=L.useMemo(function(){return Be&&(0,x.Z)(Be)==="object"?[Be.minRows,Be.maxRows]:[]},[Be]),Ne=(0,J.Z)(_e,2),Ke=Ne[0],nt=Ne[1],te=!!Be,Ie=function(){try{if(document.activeElement===Ce.current){var Lt=Ce.current,_=Lt.selectionStart,T=Lt.selectionEnd,Q=Lt.scrollTop;Ce.current.setSelectionRange(_,T),Ce.current.scrollTop=Q}}catch(C){}},Ue=L.useState(Oe),ze=(0,J.Z)(Ue,2),qe=ze[0],gt=ze[1],Rt=L.useState(),vt=(0,J.Z)(Rt,2),_t=vt[0],St=vt[1],Nt=function(){gt(pe)};(0,q.Z)(function(){te&&Nt()},[ye,Ke,nt,te]),(0,q.Z)(function(){if(qe===pe)gt(De);else if(qe===De){var ct=oe(Ce.current,!1,Ke,nt);gt(Oe),St(ct)}else Ie()},[qe]);var Pt=L.useRef(),Ct=function(){H.Z.cancel(Pt.current)},Ge=function(Lt){qe===Oe&&(He==null||He(Lt),Be&&(Ct(),Pt.current=(0,H.Z)(function(){Nt()})))};L.useEffect(function(){return Ct},[]);var Tt=te?_t:null,Et=(0,ie.Z)((0,ie.Z)({},at),Tt);return(qe===pe||qe===De)&&(Et.overflowY="hidden",Et.overflowX="hidden"),L.createElement(P.Z,{onResize:Ge,disabled:!(Be||He)},L.createElement("textarea",(0,y.Z)({},jt,{ref:Ce,style:Et,className:ce()(w,ot,(0,Ee.Z)({},"".concat(w,"-disabled"),pt)),disabled:pt,value:Me,onChange:ke})))}),st=Fe,re=["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"],W=L.forwardRef(function(ne,ae){var S,w=ne.defaultValue,K=ne.value,ye=ne.onFocus,Be=ne.onBlur,He=ne.onChange,ot=ne.allowClear,at=ne.maxLength,pt=ne.onCompositionStart,At=ne.onCompositionEnd,ut=ne.suffix,jt=ne.prefixCls,tt=jt===void 0?"rc-textarea":jt,Ft=ne.showCount,Me=ne.count,mt=ne.className,ke=ne.style,Ce=ne.disabled,_e=ne.hidden,Ne=ne.classNames,Ke=ne.styles,nt=ne.onResize,te=ne.onClear,Ie=ne.onPressEnter,Ue=ne.readOnly,ze=ne.autoSize,qe=ne.onKeyDown,gt=(0,v.Z)(ne,re),Rt=(0,E.Z)(w,{value:K,defaultValue:w}),vt=(0,J.Z)(Rt,2),_t=vt[0],St=vt[1],Nt=_t==null?"":String(_t),Pt=L.useState(!1),Ct=(0,J.Z)(Pt,2),Ge=Ct[0],Tt=Ct[1],Et=L.useRef(!1),ct=L.useState(null),Lt=(0,J.Z)(ct,2),_=Lt[0],T=Lt[1],Q=(0,L.useRef)(null),C=(0,L.useRef)(null),G=function(){var bt;return(bt=C.current)===null||bt===void 0?void 0:bt.textArea},Xe=function(){G().focus()};(0,L.useImperativeHandle)(ae,function(){var yt;return{resizableTextArea:C.current,focus:Xe,blur:function(){G().blur()},nativeElement:((yt=Q.current)===null||yt===void 0?void 0:yt.nativeElement)||G()}}),(0,L.useEffect)(function(){Tt(function(yt){return!Ce&&yt})},[Ce]);var fe=L.useState(null),Ae=(0,J.Z)(fe,2),Pe=Ae[0],j=Ae[1];L.useEffect(function(){if(Pe){var yt;(yt=G()).setSelectionRange.apply(yt,(0,be.Z)(Pe))}},[Pe]);var X=(0,V.Z)(Me,Ft),he=(S=X.max)!==null&&S!==void 0?S:at,Se=Number(he)>0,$=X.strategy(Nt),Qe=!!he&&$>he,le=function(bt,Jt){var Sr=Jt;!Et.current&&X.exceedFormatter&&X.max&&X.strategy(Jt)>X.max&&(Sr=X.exceedFormatter(Jt,{max:X.max}),Jt!==Sr&&j([G().selectionStart||0,G().selectionEnd||0])),St(Sr),(0,B.rJ)(bt.currentTarget,bt,He,Sr)},It=function(bt){Et.current=!0,pt==null||pt(bt)},$t=function(bt){Et.current=!1,le(bt,bt.currentTarget.value),At==null||At(bt)},zt=function(bt){le(bt,bt.target.value)},sr=function(bt){bt.key==="Enter"&&Ie&&Ie(bt),qe==null||qe(bt)},or=function(bt){Tt(!0),ye==null||ye(bt)},Kt=function(bt){Tt(!1),Be==null||Be(bt)},ur=function(bt){St(""),Xe(),(0,B.rJ)(G(),bt,He)},Zr=ut,Tr;X.show&&(X.showFormatter?Tr=X.showFormatter({value:Nt,count:$,maxLength:he}):Tr="".concat($).concat(Se?" / ".concat(he):""),Zr=L.createElement(L.Fragment,null,Zr,L.createElement("span",{className:ce()("".concat(tt,"-data-count"),Ne==null?void 0:Ne.count),style:Ke==null?void 0:Ke.count},Tr)));var fr=function(bt){var Jt;nt==null||nt(bt),(Jt=G())!==null&&Jt!==void 0&&Jt.style.height&&T(!0)},Ot=!ze&&!Ft&&!ot;return L.createElement(l.BaseInput,{ref:Q,value:Nt,allowClear:ot,handleReset:ur,suffix:Zr,prefixCls:tt,classNames:(0,ie.Z)((0,ie.Z)({},Ne),{},{affixWrapper:ce()(Ne==null?void 0:Ne.affixWrapper,(0,Ee.Z)((0,Ee.Z)({},"".concat(tt,"-show-count"),Ft),"".concat(tt,"-textarea-allow-clear"),ot))}),disabled:Ce,focused:Ge,className:ce()(mt,Qe&&"".concat(tt,"-out-of-range")),style:(0,ie.Z)((0,ie.Z)({},ke),_&&!Ot?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Tr=="string"?Tr:void 0}},hidden:_e,readOnly:Ue,onClear:te},L.createElement(st,(0,y.Z)({},gt,{autoSize:ze,maxLength:at,onKeyDown:sr,onChange:zt,onFocus:or,onBlur:Kt,onCompositionStart:It,onCompositionEnd:$t,className:ce()(Ne==null?void 0:Ne.textarea),style:(0,ie.Z)((0,ie.Z)({},Ke==null?void 0:Ke.textarea),{},{resize:ke==null?void 0:ke.resize}),disabled:Ce,prefixCls:tt,onResize:fr,ref:C,readOnly:Ue})))}),ee=W,ue=ee},29125:function(Vt,it,k){"use strict";k.d(it,{G:function(){return be},Z:function(){return U}});var y=k(92310),Ee=k.n(y),ie=k(59301);function be(A){var z=A.children,O=A.prefixCls,N=A.id,oe=A.overlayInnerStyle,ve=A.bodyClassName,pe=A.className,De=A.style;return ie.createElement("div",{className:Ee()("".concat(O,"-content"),pe),style:De},ie.createElement("div",{className:Ee()("".concat(O,"-inner"),ve),id:N,role:"tooltip",style:oe},typeof z=="function"?z():z))}var J=k(60499),v=k(85899),de=k(42244),ce=k(68196),l={shiftX:64,adjustY:1},V={adjustX:1,shiftY:!0},B=[0,0],E={left:{points:["cr","cl"],overflow:V,offset:[-4,0],targetOffset:B},right:{points:["cl","cr"],overflow:V,offset:[4,0],targetOffset:B},top:{points:["bc","tc"],overflow:l,offset:[0,-4],targetOffset:B},bottom:{points:["tc","bc"],overflow:l,offset:[0,4],targetOffset:B},topLeft:{points:["bl","tl"],overflow:l,offset:[0,-4],targetOffset:B},leftTop:{points:["tr","tl"],overflow:V,offset:[-4,0],targetOffset:B},topRight:{points:["br","tr"],overflow:l,offset:[0,-4],targetOffset:B},rightTop:{points:["tl","tr"],overflow:V,offset:[4,0],targetOffset:B},bottomRight:{points:["tr","br"],overflow:l,offset:[0,4],targetOffset:B},rightBottom:{points:["bl","br"],overflow:V,offset:[4,0],targetOffset:B},bottomLeft:{points:["tl","bl"],overflow:l,offset:[0,4],targetOffset:B},leftBottom:{points:["br","bl"],overflow:V,offset:[-4,0],targetOffset:B}},L=null,x=k(80402),P=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],q=function(z,O){var N=z.overlayClassName,oe=z.trigger,ve=oe===void 0?["hover"]:oe,pe=z.mouseEnterDelay,De=pe===void 0?0:pe,Oe=z.mouseLeaveDelay,Fe=Oe===void 0?.1:Oe,st=z.overlayStyle,re=z.prefixCls,W=re===void 0?"rc-tooltip":re,ee=z.children,ue=z.onVisibleChange,ne=z.afterVisibleChange,ae=z.transitionName,S=z.animation,w=z.motion,K=z.placement,ye=K===void 0?"right":K,Be=z.align,He=Be===void 0?{}:Be,ot=z.destroyTooltipOnHide,at=ot===void 0?!1:ot,pt=z.defaultVisible,At=z.getTooltipContainer,ut=z.overlayInnerStyle,jt=z.arrowContent,tt=z.overlay,Ft=z.id,Me=z.showArrow,mt=Me===void 0?!0:Me,ke=z.classNames,Ce=z.styles,_e=(0,de.Z)(z,P),Ne=(0,x.Z)(Ft),Ke=(0,ie.useRef)(null);(0,ie.useImperativeHandle)(O,function(){return Ke.current});var nt=(0,v.Z)({},_e);"visible"in z&&(nt.popupVisible=z.visible);var te=function(){return ie.createElement(be,{key:"content",prefixCls:W,id:Ne,bodyClassName:ke==null?void 0:ke.body,overlayInnerStyle:(0,v.Z)((0,v.Z)({},ut),Ce==null?void 0:Ce.body)},tt)},Ie=function(){var ze=ie.Children.only(ee),qe=(ze==null?void 0:ze.props)||{},gt=(0,v.Z)((0,v.Z)({},qe),{},{"aria-describedby":tt?Ne:null});return ie.cloneElement(ee,gt)};return ie.createElement(ce.Z,(0,J.Z)({popupClassName:Ee()(N,ke==null?void 0:ke.root),prefixCls:W,popup:te,action:ve,builtinPlacements:E,popupPlacement:ye,ref:Ke,popupAlign:He,getPopupContainer:At,onPopupVisibleChange:ue,afterPopupVisibleChange:ne,popupTransitionName:ae,popupAnimation:S,popupMotion:w,defaultPopupVisible:pt,autoDestroy:at,mouseLeaveDelay:Fe,popupStyle:(0,v.Z)((0,v.Z)({},st),Ce==null?void 0:Ce.root),mouseEnterDelay:De,arrow:mt},nt),Ie())},H=(0,ie.forwardRef)(q),U=H},49658:function(Vt,it){"use strict";it.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var k=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(k)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(k==null?void 0:k.substr(0,4))}},83145:function(Vt,it,k){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.CopyToClipboard=void 0;var y=ie(k(59301)),Ee=ie(k(25769));function ie(A){return A&&A.__esModule?A:{default:A}}function be(A){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?be=function(O){return typeof O}:be=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},be(A)}function J(A,z){var O=Object.keys(A);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(A);z&&(N=N.filter(function(oe){return Object.getOwnPropertyDescriptor(A,oe).enumerable})),O.push.apply(O,N)}return O}function v(A){for(var z=1;z<arguments.length;z++){var O=arguments[z]!=null?arguments[z]:{};z%2?J(O,!0).forEach(function(N){H(A,N,O[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(O)):J(O).forEach(function(N){Object.defineProperty(A,N,Object.getOwnPropertyDescriptor(O,N))})}return A}function de(A,z){if(A==null)return{};var O=ce(A,z),N,oe;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(A);for(oe=0;oe<ve.length;oe++)N=ve[oe],!(z.indexOf(N)>=0)&&Object.prototype.propertyIsEnumerable.call(A,N)&&(O[N]=A[N])}return O}function ce(A,z){if(A==null)return{};var O={},N=Object.keys(A),oe,ve;for(ve=0;ve<N.length;ve++)oe=N[ve],!(z.indexOf(oe)>=0)&&(O[oe]=A[oe]);return O}function l(A,z){if(!(A instanceof z))throw new TypeError("Cannot call a class as a function")}function V(A,z){for(var O=0;O<z.length;O++){var N=z[O];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(A,N.key,N)}}function B(A,z,O){return z&&V(A.prototype,z),O&&V(A,O),A}function E(A,z){return z&&(be(z)==="object"||typeof z=="function")?z:x(A)}function L(A){return L=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},L(A)}function x(A){if(A===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}function P(A,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(z&&z.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),z&&q(A,z)}function q(A,z){return q=Object.setPrototypeOf||function(N,oe){return N.__proto__=oe,N},q(A,z)}function H(A,z,O){return z in A?Object.defineProperty(A,z,{value:O,enumerable:!0,configurable:!0,writable:!0}):A[z]=O,A}var U=function(A){P(z,A);function z(){var O,N;l(this,z);for(var oe=arguments.length,ve=new Array(oe),pe=0;pe<oe;pe++)ve[pe]=arguments[pe];return N=E(this,(O=L(z)).call.apply(O,[this].concat(ve))),H(x(N),"onClick",function(De){var Oe=N.props,Fe=Oe.text,st=Oe.onCopy,re=Oe.children,W=Oe.options,ee=y.default.Children.only(re),ue=(0,Ee.default)(Fe,W);st&&st(Fe,ue),ee&&ee.props&&typeof ee.props.onClick=="function"&&ee.props.onClick(De)}),N}return B(z,[{key:"render",value:function(){var N=this.props,oe=N.text,ve=N.onCopy,pe=N.options,De=N.children,Oe=de(N,["text","onCopy","options","children"]),Fe=y.default.Children.only(De);return y.default.cloneElement(Fe,v({},Oe,{onClick:this.onClick}))}}]),z}(y.default.PureComponent);it.CopyToClipboard=U,H(U,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Vt,it,k){"use strict";var y=k(83145),Ee=y.CopyToClipboard;Ee.CopyToClipboard=Ee,Vt.exports=Ee},76374:function(Vt,it,k){"use strict";var y=function(){if(typeof Map!="undefined")return Map;function re(W,ee){var ue=-1;return W.some(function(ne,ae){return ne[0]===ee?(ue=ae,!0):!1}),ue}return function(){function W(){this.__entries__=[]}return Object.defineProperty(W.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),W.prototype.get=function(ee){var ue=re(this.__entries__,ee),ne=this.__entries__[ue];return ne&&ne[1]},W.prototype.set=function(ee,ue){var ne=re(this.__entries__,ee);~ne?this.__entries__[ne][1]=ue:this.__entries__.push([ee,ue])},W.prototype.delete=function(ee){var ue=this.__entries__,ne=re(ue,ee);~ne&&ue.splice(ne,1)},W.prototype.has=function(ee){return!!~re(this.__entries__,ee)},W.prototype.clear=function(){this.__entries__.splice(0)},W.prototype.forEach=function(ee,ue){ue===void 0&&(ue=null);for(var ne=0,ae=this.__entries__;ne<ae.length;ne++){var S=ae[ne];ee.call(ue,S[1],S[0])}},W}()}(),Ee=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,ie=function(){return typeof k.g!="undefined"&&k.g.Math===Math?k.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),be=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ie):function(re){return setTimeout(function(){return re(Date.now())},1e3/60)}}(),J=2;function v(re,W){var ee=!1,ue=!1,ne=0;function ae(){ee&&(ee=!1,re()),ue&&w()}function S(){be(ae)}function w(){var K=Date.now();if(ee){if(K-ne<J)return;ue=!0}else ee=!0,ue=!1,setTimeout(S,W);ne=K}return w}var de=20,ce=["top","right","bottom","left","width","height","size","weight"],l=typeof MutationObserver!="undefined",V=function(){function re(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=v(this.refresh.bind(this),de)}return re.prototype.addObserver=function(W){~this.observers_.indexOf(W)||this.observers_.push(W),this.connected_||this.connect_()},re.prototype.removeObserver=function(W){var ee=this.observers_,ue=ee.indexOf(W);~ue&&ee.splice(ue,1),!ee.length&&this.connected_&&this.disconnect_()},re.prototype.refresh=function(){var W=this.updateObservers_();W&&this.refresh()},re.prototype.updateObservers_=function(){var W=this.observers_.filter(function(ee){return ee.gatherActive(),ee.hasActive()});return W.forEach(function(ee){return ee.broadcastActive()}),W.length>0},re.prototype.connect_=function(){!Ee||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(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)},re.prototype.disconnect_=function(){!Ee||!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)},re.prototype.onTransitionEnd_=function(W){var ee=W.propertyName,ue=ee===void 0?"":ee,ne=ce.some(function(ae){return!!~ue.indexOf(ae)});ne&&this.refresh()},re.getInstance=function(){return this.instance_||(this.instance_=new re),this.instance_},re.instance_=null,re}(),B=function(re,W){for(var ee=0,ue=Object.keys(W);ee<ue.length;ee++){var ne=ue[ee];Object.defineProperty(re,ne,{value:W[ne],enumerable:!1,writable:!1,configurable:!0})}return re},E=function(re){var W=re&&re.ownerDocument&&re.ownerDocument.defaultView;return W||ie},L=oe(0,0,0,0);function x(re){return parseFloat(re)||0}function P(re){for(var W=[],ee=1;ee<arguments.length;ee++)W[ee-1]=arguments[ee];return W.reduce(function(ue,ne){var ae=re["border-"+ne+"-width"];return ue+x(ae)},0)}function q(re){for(var W=["top","right","bottom","left"],ee={},ue=0,ne=W;ue<ne.length;ue++){var ae=ne[ue],S=re["padding-"+ae];ee[ae]=x(S)}return ee}function H(re){var W=re.getBBox();return oe(0,0,W.width,W.height)}function U(re){var W=re.clientWidth,ee=re.clientHeight;if(!W&&!ee)return L;var ue=E(re).getComputedStyle(re),ne=q(ue),ae=ne.left+ne.right,S=ne.top+ne.bottom,w=x(ue.width),K=x(ue.height);if(ue.boxSizing==="border-box"&&(Math.round(w+ae)!==W&&(w-=P(ue,"left","right")+ae),Math.round(K+S)!==ee&&(K-=P(ue,"top","bottom")+S)),!z(re)){var ye=Math.round(w+ae)-W,Be=Math.round(K+S)-ee;Math.abs(ye)!==1&&(w-=ye),Math.abs(Be)!==1&&(K-=Be)}return oe(ne.left,ne.top,w,K)}var A=function(){return typeof SVGGraphicsElement!="undefined"?function(re){return re instanceof E(re).SVGGraphicsElement}:function(re){return re instanceof E(re).SVGElement&&typeof re.getBBox=="function"}}();function z(re){return re===E(re).document.documentElement}function O(re){return Ee?A(re)?H(re):U(re):L}function N(re){var W=re.x,ee=re.y,ue=re.width,ne=re.height,ae=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,S=Object.create(ae.prototype);return B(S,{x:W,y:ee,width:ue,height:ne,top:ee,right:W+ue,bottom:ne+ee,left:W}),S}function oe(re,W,ee,ue){return{x:re,y:W,width:ee,height:ue}}var ve=function(){function re(W){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=oe(0,0,0,0),this.target=W}return re.prototype.isActive=function(){var W=O(this.target);return this.contentRect_=W,W.width!==this.broadcastWidth||W.height!==this.broadcastHeight},re.prototype.broadcastRect=function(){var W=this.contentRect_;return this.broadcastWidth=W.width,this.broadcastHeight=W.height,W},re}(),pe=function(){function re(W,ee){var ue=N(ee);B(this,{target:W,contentRect:ue})}return re}(),De=function(){function re(W,ee,ue){if(this.activeObservations_=[],this.observations_=new y,typeof W!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=W,this.controller_=ee,this.callbackCtx_=ue}return re.prototype.observe=function(W){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(W instanceof E(W).Element))throw new TypeError('parameter 1 is not of type "Element".');var ee=this.observations_;ee.has(W)||(ee.set(W,new ve(W)),this.controller_.addObserver(this),this.controller_.refresh())}},re.prototype.unobserve=function(W){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(W instanceof E(W).Element))throw new TypeError('parameter 1 is not of type "Element".');var ee=this.observations_;ee.has(W)&&(ee.delete(W),ee.size||this.controller_.removeObserver(this))}},re.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},re.prototype.gatherActive=function(){var W=this;this.clearActive(),this.observations_.forEach(function(ee){ee.isActive()&&W.activeObservations_.push(ee)})},re.prototype.broadcastActive=function(){if(this.hasActive()){var W=this.callbackCtx_,ee=this.activeObservations_.map(function(ue){return new pe(ue.target,ue.broadcastRect())});this.callback_.call(W,ee,W),this.clearActive()}},re.prototype.clearActive=function(){this.activeObservations_.splice(0)},re.prototype.hasActive=function(){return this.activeObservations_.length>0},re}(),Oe=typeof WeakMap!="undefined"?new WeakMap:new y,Fe=function(){function re(W){if(!(this instanceof re))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var ee=V.getInstance(),ue=new De(W,ee,this);Oe.set(this,ue)}return re}();["observe","unobserve","disconnect"].forEach(function(re){Fe.prototype[re]=function(){var W;return(W=Oe.get(this))[re].apply(W,arguments)}});var st=function(){return typeof ie.ResizeObserver!="undefined"?ie.ResizeObserver:Fe}();it.Z=st},98040:function(Vt){Vt.exports=function(){var it=document.getSelection();if(!it.rangeCount)return function(){};for(var k=document.activeElement,y=[],Ee=0;Ee<it.rangeCount;Ee++)y.push(it.getRangeAt(Ee));switch(k.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":k.blur();break;default:k=null;break}return it.removeAllRanges(),function(){it.type==="Caret"&&it.removeAllRanges(),it.rangeCount||y.forEach(function(ie){it.addRange(ie)}),k&&k.focus()}}},4977:function(Vt){"use strict";Vt.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=="},16471:function(Vt,it,k){"use strict";k.d(it,{ZP:function(){return ms}});const y=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},Ee=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=ie},ie=Number.MAX_SAFE_INTEGER||9007199254740991;let be=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),J=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),v=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var de={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ce={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class l{constructor(e,t=0,r=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=r}sample(e,t){const r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class V{constructor(e,t,r,n=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new l(e),this.fast_=new l(t),this.defaultTTFB_=n,this.ttfb_=new l(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:i}=this;r.halfLife!==e&&(this.slow_=new l(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new l(t,n.getEstimate(),n.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new l(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,i=r/n;this.fast_.sample(n,i),this.slow_.sample(n,i)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function B(a,e,t){return(e=q(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function E(){return E=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},E.apply(null,arguments)}function L(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,r)}return t}function x(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?L(Object(t),!0).forEach(function(r){B(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function P(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function q(a){var e=P(a,"string");return typeof e=="symbol"?e:e+""}class H{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const r=`[${e}]:`;this.trace=U,this.debug=t.debug.bind(null,r),this.log=t.log.bind(null,r),this.warn=t.warn.bind(null,r),this.info=t.info.bind(null,r),this.error=t.error.bind(null,r)}}const U=function(){},A={trace:U,debug:U,log:U,warn:U,info:U,error:U};function z(){return E({},A)}function O(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):U}function N(a,e,t){return e[a]?e[a].bind(e):O(a,t)}const oe=z();function ve(a,e,t){const r=z();if(typeof console=="object"&&a===!0||typeof a=="object"){const n=["debug","log","info","warn","error"];n.forEach(i=>{r[i]=N(i,a,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return z()}n.forEach(i=>{oe[i]=N(i,a)})}else E(oe,r);return r}const pe=oe;function De(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Oe(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Fe(a,e){const t=Object.keys(a),r=Object.keys(e),n=t.length,i=r.length;return!n||!i||n===i&&!t.some(s=>r.indexOf(s)===-1)}function st(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const p=c.indexOf("\0");return p!==-1?c.substring(0,p):c}return c.replace(/\0/g,"")}const t=a.length;let r,n,i,s="",o=0;for(;o<t;){if(r=a[o++],r===0&&e)return s;if(r===0||r===3)continue;switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(r);break;case 12:case 13:n=a[o++],s+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=a[o++],i=a[o++],s+=String.fromCharCode((r&15)<<12|(n&63)<<6|(i&63)<<0);break}}return s}function re(a){let e="";for(let t=0;t<a.length;t++){let r=a[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}function W(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function ee(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ue={exports:{}},ne;function ae(){return ne||(ne=1,function(a,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(h,c,p){if(p=p||{},h=h.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return h;var m=o.parseURL(h);if(!m)throw new Error("Error trying to parse base URL.");return m.path=o.normalizePath(m.path),o.buildURLFromParts(m)}var b=o.parseURL(c);if(!b)throw new Error("Error trying to parse relative URL.");if(b.scheme)return p.alwaysNormalize?(b.path=o.normalizePath(b.path),o.buildURLFromParts(b)):c;var I=o.parseURL(h);if(!I)throw new Error("Error trying to parse base URL.");if(!I.netLoc&&I.path&&I.path[0]!=="/"){var R=n.exec(I.path);I.netLoc=R[1],I.path=R[2]}I.netLoc&&!I.path&&(I.path="/");var Y={scheme:I.scheme,netLoc:b.netLoc,path:null,params:b.params,query:b.query,fragment:b.fragment};if(!b.netLoc&&(Y.netLoc=I.netLoc,b.path[0]!=="/"))if(!b.path)Y.path=I.path,b.params||(Y.params=I.params,b.query||(Y.query=I.query));else{var Z=I.path,ge=Z.substring(0,Z.lastIndexOf("/")+1)+b.path;Y.path=o.normalizePath(ge)}return Y.path===null&&(Y.path=p.alwaysNormalize?o.normalizePath(b.path):b.path),o.buildURLFromParts(Y)},parseURL:function(h){var c=r.exec(h);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(i,"");h.length!==(h=h.replace(s,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};a.exports=o})()}(ue)),ue.exports}var S=ae();class w{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 K={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ye{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,pt(this,"stats")}setByteRange(e,t){const r=e.split("@",2);let n;r.length===1?n=(t==null?void 0:t.byteRangeEndOffset)||0:n=parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[K.AUDIO]:null,[K.VIDEO]:null,[K.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 w),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=S.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[K.AUDIO]=null,e[K.VIDEO]=null,e[K.AUDIOVIDEO]=null}}function Be(a){return a.sn!=="initSegment"}class He extends ye{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],t=this.byteRange[1];if(y(e)&&y(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(){var e;const{levelkeys:t}=this;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(!((e=this._decryptdata)!=null&&e.keyId)){const r=Object.keys(t);if(r.length===1){const n=this._decryptdata=t[r[0]]||null;n&&(this._decryptdata=n.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=y(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var t;const r=Object.keys(this.levelkeys),n=r.length;if(n>1||n===1&&(t=this.levelkeys[r[0]])!=null&&t.encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!y(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Be(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){const t=this.levelkeys;if(t){var r;const n=t[e];n&&!((r=this._decryptdata)!=null&&r.keyId)&&(this._decryptdata=n.getDecryptData(this.sn,t))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,r,n,i,s=!1){const{elementaryStreams:o}=this,h=o[e];if(!h){o[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:i,partial:s};return}h.startPTS=Math.min(h.startPTS,t),h.endPTS=Math.max(h.endPTS,r),h.startDTS=Math.min(h.startDTS,n),h.endDTS=Math.max(h.endDTS,i)}}class ot extends ye{constructor(e,t,r,n,i){super(r),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=n;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function at(a,e){const t=Object.getPrototypeOf(a);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||at(t,e)}}function pt(a,e){const t=at(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const At=Math.pow(2,32)-1,ut=[].push,jt={video:1,audio:2,id3:3,text:4};function tt(a){return String.fromCharCode.apply(null,a)}function Ft(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Me(a,e){const t=ke(a,e);return t<0?4294967296+t:t}function mt(a,e){let t=Me(a,e);return t*=Math.pow(2,32),t+=Me(a,e+4),t}function ke(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Ce(a){const e=a.byteLength;for(let t=0;t<e;){const r=Me(a,t);if(r>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=r>1?t+r:e}return!1}function _e(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=Me(a,n),s=tt(a.subarray(n+4,n+8)),o=i>1?n+i:r;if(s===e[0])if(e.length===1)t.push(a.subarray(n+8,o));else{const h=_e(a.subarray(n+8,o),e.slice(1));h.length&&ut.apply(t,h)}n=o}return t}function Ne(a){const e=[],t=a[0];let r=8;const n=Me(a,r);r+=4;let i=0,s=0;t===0?(i=Me(a,r),s=Me(a,r+4),r+=8):(i=mt(a,r),s=mt(a,r+8),r+=16),r+=2;let o=a.length+s;const h=Ft(a,r);r+=2;for(let c=0;c<h;c++){let p=r;const m=Me(a,p);p+=4;const b=m&2147483647;if((m&2147483648)>>>31===1)return pe.warn("SIDX has hierarchical references (not supported)"),null;const R=Me(a,p);p+=4,e.push({referenceSize:b,subsegmentDuration:R,info:{duration:R/n,start:o,end:o+b-1}}),o+=b,p+=4,r=p}return{earliestPresentationTime:i,timescale:n,version:t,referencesCount:h,references:e}}function Ke(a){const e=[],t=_e(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=_e(i,["tkhd"])[0];if(s){let o=s[0];const h=Me(s,o===0?12:20),c=_e(i,["mdia","mdhd"])[0];if(c){o=c[0];const p=Me(c,o===0?12:20),m=_e(i,["mdia","hdlr"])[0];if(m){const b=tt(m.subarray(8,12)),I={soun:K.AUDIO,vide:K.VIDEO}[b],R=_e(i,["mdia","minf","stbl","stsd"])[0],Y=nt(R);I?(e[h]={timescale:p,type:I,stsd:Y},e[I]=x({timescale:p,id:h},Y)):e[h]={timescale:p,type:b,stsd:Y}}}}}return _e(a,["moov","mvex","trex"]).forEach(n=>{const i=Me(n,4),s=e[i];s&&(s.default={duration:Me(n,12),flags:Me(n,20)})}),e}function nt(a){const e=a.subarray(8),t=e.subarray(86),r=tt(e.subarray(4,8));let n=r,i;const s=r==="enca"||r==="encv";if(s){const c=_e(e,[r])[0].subarray(r==="enca"?28:78);_e(c,["sinf"]).forEach(m=>{const b=_e(m,["schm"])[0];if(b){const I=tt(b.subarray(4,8));if(I==="cbcs"||I==="cenc"){const R=_e(m,["frma"])[0];R&&(n=tt(R))}}})}const o=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const h=_e(t,["avcC"])[0];h&&h.length>3&&(n+="."+ze(h[1])+ze(h[2])+ze(h[3]),i=te(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const h=_e(e,[r])[0],c=_e(h.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=Ue(c,p),p+=2;const m=c[p++];if(m&128&&(p+=2),m&64&&(p+=c[p++]),c[p++]!==4)break;p=Ue(c,p);const b=c[p++];if(b===64)n+="."+ze(b);else break;if(p+=12,c[p++]!==5)break;p=Ue(c,p);const I=c[p++];let R=(I&248)>>3;R===31&&(R+=1+((I&7)<<3)+((c[p]&224)>>5)),n+="."+R}break}case"hvc1":case"hev1":{const h=_e(t,["hvcC"])[0];if(h&&h.length>12){const c=h[1],p=["","A","B","C"][c>>6],m=c&31,b=Me(h,2),I=(c&32)>>5?"H":"L",R=h[12],Y=h.subarray(6,12);n+="."+p+m,n+="."+Ie(b).toString(16).toUpperCase(),n+="."+I+R;let Z="";for(let ge=Y.length;ge--;){const xe=Y[ge];(xe||Z)&&(Z="."+xe.toString(16).toUpperCase()+Z)}n+=Z}i=te(o=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=te(n,t)||n;break}case"vp09":{const h=_e(t,["vpcC"])[0];if(h&&h.length>6){const c=h[4],p=h[5],m=h[6]>>4&15;n+="."+qe(c)+"."+qe(p)+"."+qe(m)}break}case"av01":{const h=_e(t,["av1C"])[0];if(h&&h.length>2){const c=h[1]>>>5,p=h[1]&31,m=h[2]>>>7?"H":"M",b=(h[2]&64)>>6,I=(h[2]&32)>>5,R=c===2&&b?I?12:10:b?10:8,Y=(h[2]&16)>>4,Z=(h[2]&8)>>3,ge=(h[2]&4)>>2,xe=h[2]&3;n+="."+c+"."+qe(p)+m+"."+qe(R)+"."+Y+"."+Z+ge+xe+"."+qe(1)+"."+qe(1)+"."+qe(1)+"."+0,i=te("dav1",t)}break}}return{codec:n,encrypted:s,supplemental:i}}function te(a,e){const t=_e(e,["dvvC"]),r=t.length?t[0]:_e(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,i=r[2]<<5&32|r[3]>>3&31;return a+"."+qe(n)+"."+qe(i)}}function Ie(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function Ue(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function ze(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function qe(a){return(a<10?"0":"")+a}function gt(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&vt(a,(r,n)=>{const i=r.subarray(8,24);i.some(s=>s!==0)||(pe.log(`[eme] Patching keyId in 'enc${n?"a":"v"}>sinf>>tenc' box: ${re(i)} -> ${re(t)}`),r.set(t,8))})}function Rt(a){const e=[];return vt(a,t=>e.push(t.subarray(8,24))),e}function vt(a,e){_e(a,["moov","trak"]).forEach(r=>{const n=_e(r,["mdia","minf","stbl","stsd"])[0];if(!n)return;const i=n.subarray(8);let s=_e(i,["enca"]);const o=s.length>0;o||(s=_e(i,["encv"])),s.forEach(h=>{const c=o?h.subarray(28):h.subarray(78);_e(c,["sinf"]).forEach(m=>{const b=_t(m);b&&e(b,o)})})})}function _t(a){const e=_e(a,["schm"])[0];if(e){const t=tt(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const r=_e(a,["schi","tenc"])[0];if(r)return r}}}function St(a,e,t){const r={},n=_e(a,["moof","traf"]);for(let i=0;i<n.length;i++){const s=n[i],o=_e(s,["tfhd"])[0],h=Me(o,4),c=e[h];if(!c)continue;r[h]||(r[h]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const p=r[h],m=_e(s,["tfdt"])[0];if(m){const Te=m[0];let $e=Me(m,4);Te===1&&($e===At?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):($e*=At+1,$e+=Me(m,8))),y($e)&&(!y(p.start)||$e<p.start)&&(p.start=$e)}const b=c.default,I=Me(o,0)|(b==null?void 0:b.flags);let R=(b==null?void 0:b.duration)||0;I&8&&(I&2?R=Me(o,12):R=Me(o,8));const Y=_e(s,["trun"]);let Z=p.start||0,ge=0,xe=R;for(let Te=0;Te<Y.length;Te++){const $e=Y[Te],We=Me($e,4),xt=p.sampleCount;p.sampleCount+=We;const Ye=$e[3]&1,ft=$e[3]&4,dt=$e[2]&1,et=$e[2]&2,Mt=$e[2]&4,rr=$e[2]&8;let pr=8,Cr=We;for(Ye&&(pr+=4),ft&&We&&(!($e[pr+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=xt),pr+=4,dt?(xe=Me($e,pr),pr+=4):xe=R,et&&(pr+=4),rr&&(pr+=4),Z+=xe,ge+=xe,Cr--);Cr--;)dt?(xe=Me($e,pr),pr+=4):xe=R,et&&(pr+=4),Mt&&($e[pr+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(Cr+1),p.keyFrameStart=Z),pr+=4),rr&&(pr+=4),Z+=xe,ge+=xe;!ge&&R&&(ge+=R*We)}p.duration+=ge}if(!Object.keys(r).some(i=>r[i].duration)){let i=1/0,s=0;const o=_e(a,["sidx"]);for(let h=0;h<o.length;h++){const c=Ne(o[h]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((m,b)=>m+b.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&y(s)&&Object.keys(r).forEach(h=>{r[h].duration||(r[h].duration=s*r[h].timescale-r[h].start)})}return r}function Nt(a){const e={valid:null,remainder:null},t=_e(a,["moof"]);if(t.length<2)return e.remainder=a,e;const r=t[t.length-1];return e.valid=a.slice(0,r.byteOffset-8),e.remainder=a.slice(r.byteOffset-8),e}function Pt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Ct(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return _e(r,["moof"]).map(h=>{const c=h.byteOffset-8;_e(h,["traf"]).map(m=>{const b=_e(m,["tfdt"]).map(I=>{const R=I[0];let Y=Me(I,4);return R===1&&(Y*=Math.pow(2,32),Y+=Me(I,8)),Y/n})[0];return b!==void 0&&(a=b),_e(m,["tfhd"]).map(I=>{const R=Me(I,4),Y=Me(I,0)&16777215,Z=(Y&1)!==0,ge=(Y&2)!==0,xe=(Y&8)!==0;let Te=0;const $e=(Y&16)!==0;let We=0;const xt=(Y&32)!==0;let Ye=8;R===i&&(Z&&(Ye+=8),ge&&(Ye+=4),xe&&(Te=Me(I,Ye),Ye+=4),$e&&(We=Me(I,Ye),Ye+=4),xt&&(Ye+=4),e.type==="video"&&(s=Ge(e.codec)),_e(m,["trun"]).map(ft=>{const dt=ft[0],et=Me(ft,0)&16777215,Mt=(et&1)!==0;let rr=0;const pr=(et&4)!==0,Cr=(et&256)!==0;let mr=0;const Yt=(et&512)!==0;let br=0;const ar=(et&1024)!==0,wr=(et&2048)!==0;let Ur=0;const er=Me(ft,4);let tr=8;Mt&&(rr=Me(ft,tr),tr+=4),pr&&(tr+=4);let en=rr+c;for(let yn=0;yn<er;yn++){if(Cr?(mr=Me(ft,tr),tr+=4):mr=Te,Yt?(br=Me(ft,tr),tr+=4):br=We,ar&&(tr+=4),wr&&(dt===0?Ur=Me(ft,tr):Ur=ke(ft,tr),tr+=4),e.type===K.VIDEO){let sn=0;for(;sn<br;){const cn=Me(r,en);if(en+=4,Tt(s,r[en])){const qn=r.subarray(en,en+cn);Et(qn,s?2:1,a+Ur/n,t)}en+=cn,sn+=cn+4}}a+=mr/n}}))})})}),t}function Ge(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Tt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Et(a,e,t,r){const n=ct(a);let i=0;i+=e;let s=0,o=0,h=0;for(;i<n.length;){s=0;do{if(i>=n.length)break;h=n[i++],s+=h}while(h===255);o=0;do{if(i>=n.length)break;h=n[i++],o+=h}while(h===255);const c=n.length-i;let p=i;if(o<c)i+=o;else if(o>c){pe.error(`Malformed SEI payload. ${o} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(n[p++]===181){const b=Ft(n,p);if(p+=2,b===49){const I=Me(n,p);if(p+=4,I===1195456820){const R=n[p++];if(R===3){const Y=n[p++],Z=31&Y,ge=64&Y,xe=ge?2+Z*3:0,Te=new Uint8Array(xe);if(ge){Te[0]=Y;for(let $e=1;$e<xe;$e++)Te[$e]=n[p++]}r.push({type:R,payloadType:s,pts:t,bytes:Te})}}}}}else if(s===5&&o>16){const m=[];for(let R=0;R<16;R++){const Y=n[p++].toString(16);m.push(Y.length==1?"0"+Y:Y),(R===3||R===5||R===7||R===9)&&m.push("-")}const b=o-16,I=new Uint8Array(b);for(let R=0;R<b;R++)I[R]=n[p++];r.push({payloadType:s,pts:t,uuid:m.join(""),userData:st(I),userDataBytes:I})}}}function ct(a){const e=a.byteLength,t=[];let r=1;for(;r<e-2;)a[r]===0&&a[r+1]===0&&a[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return a;const n=e-t.length,i=new Uint8Array(n);let s=0;for(r=0;r<n;s++,r++)s===t[0]&&(s++,t.shift()),i[r]=a[s];return i}function Lt(a){const e=a[0];let t="",r="",n=0,i=0,s=0,o=0,h=0,c=0;if(e===0){for(;tt(a.subarray(c,c+1))!=="\0";)t+=tt(a.subarray(c,c+1)),c+=1;for(t+=tt(a.subarray(c,c+1)),c+=1;tt(a.subarray(c,c+1))!=="\0";)r+=tt(a.subarray(c,c+1)),c+=1;r+=tt(a.subarray(c,c+1)),c+=1,n=Me(a,12),i=Me(a,16),o=Me(a,20),h=Me(a,24),c=28}else if(e===1){c+=4,n=Me(a,c),c+=4;const m=Me(a,c);c+=4;const b=Me(a,c);for(c+=4,s=bu(2,32)*m+b,Ee(s)||(s=Number.MAX_SAFE_INTEGER,pe.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=Me(a,c),c+=4,h=Me(a,c),c+=4;tt(a.subarray(c,c+1))!=="\0";)t+=tt(a.subarray(c,c+1)),c+=1;for(t+=tt(a.subarray(c,c+1)),c+=1;tt(a.subarray(c,c+1))!=="\0";)r+=tt(a.subarray(c,c+1)),c+=1;r+=tt(a.subarray(c,c+1)),c+=1}const p=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:s,presentationTimeDelta:i,eventDuration:o,id:h,payload:p}}function _(a,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const i=new Uint8Array(r);for(i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(a,4),n=0,r=8;n<t;n++)i.set(e[n],r),r+=e[n].byteLength;return i}function T(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let r,n;r=0,n=new Uint8Array;let i;r>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),_([112,115,115,104],new Uint8Array([r,0,0,0]),a,i,n,s,t)}function Q(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let r=0;for(;r+32<t;){const n=new DataView(a,r),i=C(n);e.push(i),r+=i.size}}return e}function C(a){const e=a.getUint32(0),t=a.byteOffset,r=a.byteLength;if(r<e)return{offset:t,size:r};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,o=re(new Uint8Array(s,t+12,16));let h=null,c=null,p=0;if(i===0)p=28;else{const b=a.getUint32(28);if(!b||r<32+b*16)return{offset:t,size:e};h=[];for(let I=0;I<b;I++)h.push(new Uint8Array(s,t+32+I*16,16));p=32+b*16}if(!p)return{offset:t,size:e};const m=a.getUint32(p);return e-32<m?{offset:t,size:e}:(c=new Uint8Array(s,t+p+4,m),{version:i,systemId:o,kids:h,data:c,offset:t,size:e})}const G=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Xe={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 fe(a,e){const t=Xe[e];return!!t&&!!t[a.slice(0,4)]}function Ae(a,e,t=!0){return!a.split(",").some(r=>!Pe(r,e,t))}function Pe(a,e,t=!0){var r;const n=De(t);return(r=n==null?void 0:n.isTypeSupported(j(a,e)))!=null?r:!1}function j(a,e){return`${e}/mp4;codecs=${a}`}function X(a){if(a){const e=a.substring(0,4);return Xe.video[e]}return 2}function he(a){const e=G();return a.split(",").reduce((t,r)=>{const i=e&&Ge(r)?9:Xe.video[r];return i?(i*2+t)/(t?3:2):(Xe.audio[r]+t)/(t?2:1)},0)}const Se={};function $(a,e=!0){if(Se[a])return Se[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let n=0;n<t.length;n++){var r;if(Pe(t[n],"audio",e))return Se[a]=t[n],t[n];if(t[n]==="mp3"&&(r=De(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return a}const Qe=/flac|opus|mp4a\.40\.34/i;function le(a,e=!0){return a.replace(Qe,t=>$(t.toLowerCase(),e))}function It(a,e){const t=[];if(a){const r=a.split(",");for(let n=0;n<r.length;n++)fe(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function $t(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(zt(a,"audio")||zt(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let r=t.length;r--;)if(t[r].substring(0,4)===a.substring(0,4))return t[r]}return t[0]}}return e||a}function zt(a,e){return fe(a,e)&&Pe(a,e)}function sr(a){const e=a.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");r.length>2&&r[0]==="avc1"&&(e[t]=`avc1.${parseInt(r[1]).toString(16)}${("000"+parseInt(r[2]).toString(16)).slice(-4)}`)}return e.join(",")}function or(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let r=e.length;r>4&&r<10;r++)e[r]=t[r-4];return e.join(".")}return a}function Kt(a){const e=De(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function ur(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const Zr={supported:!0,powerEfficient:!0,smooth:!0},Tr={supported:!1,smooth:!1,powerEfficient:!1},fr={supported:!0,configurations:[],decodingInfoResults:[Zr]};function Ot(a,e){return{supported:!1,configurations:e,decodingInfoResults:[Tr],error:a}}function yt(a,e,t,r,n,i){const s=a.videoCodec,o=a.audioCodec?a.audioGroups:null,h=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,p=c?parseInt(c):h?1/0:2;let m=null;if(o!=null&&o.length)try{o.length===1&&o[0]?m=e.groups[o[0]].channels:m=o.reduce((b,I)=>{if(I){const R=e.groups[I];if(!R)throw new Error(`Audio track group ${I} not found`);Object.keys(R.channels).forEach(Y=>{b[Y]=(b[Y]||0)+R.channels[Y]})}return b},{2:0})}catch(b){return!0}return s!==void 0&&(s.split(",").some(b=>Ge(b))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(r,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(n,8e6))||!!m&&y(p)&&Object.keys(m).some(b=>parseInt(b)>p)}function bt(a,e,t,r={}){const n=a.videoCodec;if(!n&&!a.audioCodec||!t)return Promise.resolve(fr);const i=[],s=Jt(a),o=s.length,h=Sr(a,e,o>0),c=h.length;for(let p=o||1*c||1;p--;){const m={type:"media-source"};if(o&&(m.video=s[p%o]),c){m.audio=h[p%c];const b=m.audio.bitrate;m.video&&b&&(m.video.bitrate-=b)}i.push(m)}if(n){const p=navigator.userAgent;if(n.split(",").some(m=>Ge(m))&&G())return Promise.resolve(Ot(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const m=Re(p);return r[m]||(r[m]=t.decodingInfo(p))})).then(p=>({supported:!p.some(m=>!m.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function Jt(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),r=hn(a),n=a.width||640,i=a.height||480,s=a.frameRate||30,o=a.videoRange.toLowerCase();return t?t.map(h=>{const c={contentType:j(or(h),"video"),width:n,height:i,bitrate:r,framerate:s};return o!=="sdr"&&(c.transferFunction=o),c}):[]}function Sr(a,e,t){var r;const n=(r=a.audioCodec)==null?void 0:r.split(","),i=hn(a);return n&&a.audioGroups?a.audioGroups.reduce((s,o)=>{var h;const c=o?(h=e.groups[o])==null?void 0:h.tracks:null;return c?c.reduce((p,m)=>{if(m.groupId===o){const b=parseFloat(m.channels||"");n.forEach(I=>{const R={contentType:j(I,"audio"),bitrate:t?Dr(I,i):i};b&&(R.channels=""+b),p.push(R)})}return p},s):s},[]):[]}function Dr(a,e){if(e<=1)return 1;let t=128e3;return a==="ec-3"?t=768e3:a==="ac-3"&&(t=64e4),Math.min(e/2,t)}function hn(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Re(a){let e="";const{audio:t,video:r}=a;if(r){const n=ur(r.contentType);e+=`${n}_r${r.height}x${r.width}f${Math.ceil(r.framerate)}${r.transferFunction||"sd"}_${Math.ceil(r.bitrate/1e5)}`}if(t){const n=ur(t.contentType);e+=`${r?"_":""}${n}_c${t.channels}`}return e}const Je=["NONE","TYPE-0","TYPE-1",null];function lt(a){return Je.indexOf(a)>-1}const Ze=["SDR","PQ","HLG"];function Dt(a){return!!a&&Ze.indexOf(a)>-1}var Wt={No:"",Yes:"YES",v2:"v2"};function cr(a){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=a,n=r<e/2;return e&&n?t?Wt.v2:Wt.Yes:Wt.No}class Ir{constructor(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Zt{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>!!r).map(r=>r.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const r=(t=e.supplemental)==null?void 0:t.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=`,${r.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return qt(this._audioGroups,e)}hasSubtitleGroup(e){return qt(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(t)===-1&&r.push(t)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(t)===-1&&r.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function qt(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function gr(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function hr(a,e){let t=!1,r=[];if(a&&(t=a!=="SDR",r=[a]),e){r=e.allowedVideoRanges||Ze.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&gr(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const vr=a=>{const e=new WeakSet;return(t,r)=>{if(a&&(r=a(t,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},nr=(a,e)=>JSON.stringify(a,vr(e));function Ar(a,e,t,r,n){const i=Object.keys(a),s=r==null?void 0:r.channels,o=r==null?void 0:r.audioCodec,h=n==null?void 0:n.videoCodec,c=s&&parseInt(s)===2;let p=!1,m=!1,b=1/0,I=1/0,R=1/0,Y=1/0,Z=0,ge=[];const{preferHDR:xe,allowedVideoRanges:Te}=hr(e,n);for(let ft=i.length;ft--;){const dt=a[i[ft]];p||(p=dt.channels[2]>0),b=Math.min(b,dt.minHeight),I=Math.min(I,dt.minFramerate),R=Math.min(R,dt.minBitrate),Te.filter(Mt=>dt.videoRanges[Mt]>0).length>0&&(m=!0)}b=y(b)?b:0,I=y(I)?I:0;const $e=Math.max(1080,b),We=Math.max(30,I);R=y(R)?R:t,t=Math.max(R,t),m||(e=void 0);const xt=i.length>1;return{codecSet:i.reduce((ft,dt)=>{const et=a[dt];if(dt===ft)return ft;if(ge=m?Te.filter(Mt=>et.videoRanges[Mt]>0):[],xt){if(et.minBitrate>t)return Pr(dt,`min bitrate of ${et.minBitrate} > current estimate of ${t}`),ft;if(!et.hasDefaultAudio)return Pr(dt,"no renditions with default or auto-select sound found"),ft;if(o&&dt.indexOf(o.substring(0,4))%5!==0)return Pr(dt,`audio codec preference "${o}" not found`),ft;if(s&&!c){if(!et.channels[s])return Pr(dt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(et.channels)})`),ft}else if((!o||c)&&p&&et.channels[2]===0)return Pr(dt,"no renditions with stereo sound found"),ft;if(et.minHeight>$e)return Pr(dt,`min resolution of ${et.minHeight} > maximum of ${$e}`),ft;if(et.minFramerate>We)return Pr(dt,`min framerate of ${et.minFramerate} > maximum of ${We}`),ft;if(!ge.some(Mt=>et.videoRanges[Mt]>0))return Pr(dt,`no variants with VIDEO-RANGE of ${nr(ge)} found`),ft;if(h&&dt.indexOf(h.substring(0,4))%5!==0)return Pr(dt,`video codec preference "${h}" not found`),ft;if(et.maxScore<Z)return Pr(dt,`max score of ${et.maxScore} < selected max of ${Z}`),ft}return ft&&(he(dt)>=he(ft)||et.fragmentError>a[ft].fragmentError)?ft:(Y=et.minIndex,Z=et.maxScore,dt)},void 0),videoRanges:ge,preferHDR:xe,minFramerate:I,minBitrate:R,minIndex:Y}}function Pr(a,e){pe.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Xr(a){return a.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const n=t.channels||"2";return r.channels[n]=(r.channels[n]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function tn(a,e,t,r){return a.slice(t,r+1).reduce((n,i,s)=>{if(!i.codecSet)return n;const o=i.audioGroups;let h=n[i.codecSet];h||(n[i.codecSet]=h={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!o,fragmentError:0}),h.minBitrate=Math.min(h.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return h.minHeight=Math.min(h.minHeight,c),h.minFramerate=Math.min(h.minFramerate,i.frameRate),h.minIndex=Math.min(h.minIndex,s),h.maxScore=Math.max(h.maxScore,i.score),h.fragmentError+=i.fragmentError,h.videoRanges[i.videoRange]=(h.videoRanges[i.videoRange]||0)+1,o&&o.forEach(p=>{if(!p)return;const m=e.groups[p];m&&(h.hasDefaultAudio=h.hasDefaultAudio||e.hasDefaultAudio?m.hasDefault:m.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(m.channels).forEach(b=>{h.channels[b]=(h.channels[b]||0)+m.channels[b]}))}),n},{})}function xn(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:i}}function _r(a,e,t){if("attrs"in a){const r=e.indexOf(a);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(Gr(a,n,t))return r}return-1}function Gr(a,e,t){const{groupId:r,name:n,lang:i,assocLang:s,default:o}=a,h=a.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(i===void 0||Yr(i,e.lang))&&(i===void 0||e.assocLang===s)&&(o===void 0||e.default===o)&&(h===void 0||e.forced===h)&&(!("characteristics"in a)||un(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Yr(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function un(a,e=""){const t=a.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function Vr(a,e){const{audioCodec:t,channels:r}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function Rr(a,e,t,r,n){const i=e[r],o=e.reduce((b,I,R)=>{const Y=I.uri;return(b[Y]||(b[Y]=[])).push(R),b},{})[i.uri];o.length>1&&(r=Math.max.apply(Math,o));const h=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),m=Br(e,r,b=>{if(b.videoRange!==h||b.frameRate!==c||b.codecSet.substring(0,4)!==p)return!1;const I=b.audioGroups,R=t.filter(Y=>!I||I.indexOf(Y.groupId)!==-1);return _r(a,R,n)>-1});return m>-1?m:Br(e,r,b=>{const I=b.audioGroups,R=t.filter(Y=>!I||I.indexOf(Y.groupId)!==-1);return _r(a,R,n)>-1})}function Br(a,e,t){for(let r=e;r>-1;r--)if(t(a[r]))return r;for(let r=e+1;r<a.length;r++)if(t(a[r]))return r;return-1}function rn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class nn extends H{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var r;const{fragCurrent:n,partCurrent:i,hls:s}=this,{autoLevelEnabled:o,media:h}=s;if(!n||!h)return;const c=performance.now(),p=i?i.stats:n.stats,m=i?i.duration:n.duration,b=c-p.loading.start,I=s.minAutoLevel,R=n.level,Y=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||R<=I){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const Z=Y>-1&&Y!==R,ge=!!t||Z;if(!ge&&(h.paused||!h.playbackRate||!h.readyState))return;const xe=s.mainForwardBufferInfo;if(!ge&&xe===null)return;const Te=this.bwEstimator.getEstimateTTFB(),$e=Math.abs(h.playbackRate);if(b<=Math.max(Te,1e3*(m/($e*2))))return;const We=xe?xe.len/$e:0,xt=p.loading.first?p.loading.first-p.loading.start:-1,Ye=p.loaded&&xt>-1,ft=this.getBwEstimate(),dt=s.levels,et=dt[R],Mt=Math.max(p.loaded,Math.round(m*(n.bitrate||et.averageBitrate)/8));let rr=Ye?b-xt:b;rr<1&&Ye&&(rr=Math.min(b,p.loaded*8/ft));const pr=Ye?p.loaded*1e3/rr:0,Cr=Te/1e3,mr=pr?(Mt-p.loaded)/pr:Mt*8/ft+Cr;if(mr<=We)return;const Yt=pr?pr*8:ft,br=((r=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,ar=this.hls.config.abrBandWidthUpFactor;let wr=Number.POSITIVE_INFINITY,Ur;for(Ur=R-1;Ur>I;Ur--){const yn=dt[Ur].maxBitrate,sn=!dt[Ur].details||br;if(wr=this.getTimeToLoadFrag(Cr,Yt,m*yn,sn),wr<Math.min(We,m+Cr))break}if(wr>=mr||wr>m*10)return;Ye?this.bwEstimator.sample(b-Math.min(Te,xt),p.loaded):this.bwEstimator.sampleTTFB(b);const er=dt[Ur].maxBitrate;this.getBwEstimate()*ar>er&&this.resetEstimator(er);const tr=this.findBestLevel(er,I,Ur,0,We,1,1);tr>-1&&(Ur=tr),this.warn(`Fragment ${n.sn}${i?" part "+i.index:""} of level ${R} is loading too slowly;
Fragment duration: ${n.duration.toFixed(3)}
Time to underbuffer: ${We.toFixed(3)} s
Estimated load time for current fragment: ${mr.toFixed(3)} s
Estimated load time for down switch fragment: ${wr.toFixed(3)} s
TTFB estimate: ${xt|0} ms
Current BW estimate: ${y(ft)?ft|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${Ur} @ ${er|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Ur,this.clearTimer();const en=()=>{if(this.clearTimer(),this.fragCurrent===n&&this.hls.loadLevel===Ur&&Ur>0){const yn=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Ur>0?"and switching down":""}
Fragment duration: ${n.duration.toFixed(3)} s
Time to underbuffer: ${yn.toFixed(3)} s`),n.abortRequests(),this.fragCurrent=this.partCurrent=null,Ur>I){let sn=this.findBestLevel(this.hls.levels[I].bitrate,I,Ur,0,yn,1,1);sn===-1&&(sn=I),this.hls.nextLoadLevel=this.hls.nextAutoLevel=sn,this.resetEstimator(this.hls.levels[sn].bitrate)}}};Z||mr>wr*2?en():this.timer=self.setInterval(en,wr*1e3),s.trigger(v.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:i,stats:p})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new V(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(v.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const r=t.frag;if(!this.ignoreFragment(r)){if(!r.bitrateTest){var n;this.fragCurrent=r,this.partCurrent=(n=t.part)!=null?n:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case J.BUFFER_ADD_CODEC_ERROR:case J.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case J.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:n,partCurrent:i}=this;if(r&&n&&r.sn===n.sn&&r.level===n.level){const s=performance.now(),o=i?i.stats:r.stats,h=s-o.loading.start,c=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&c>-1){const m=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(h-Math.min(m,c),o.loaded)}else this.bwEstimator.sampleTTFB(h)}break}}}getTimeToLoadFrag(e,t,r,n){const i=e+r/t,s=n?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const r=this.hls.config,{loading:n}=t.stats,i=n.end-n.first;y(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:r}){const n=r?r.stats:t.stats;if(t.type===ce.MAIN&&this.bwEstimator.sampleTTFB(n.loading.first-n.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=r?r.duration:t.duration,s=this.hls.levels[t.level],o=(s.loaded?s.loaded.bytes:0)+n.loaded,h=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:o,duration:h},s.realBitrate=Math.round(8*o/h)}if(t.bitrateTest){const i={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(v.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:r,part:n}=t,i=n!=null&&n.stats.loaded?n.stats:r.stats;if(i.aborted||this.ignoreFragment(r))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ce.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,r=this.getBwEstimate(),n=this.hls.config.maxStarvationDelay,i=this.findBestLevel(r,t,e,0,n,1,1);if(i>-1)return i;const s=this.hls.firstLevel,o=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,r=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(e!==-1&&(!r||!n||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=r&&n?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:r}=this;if(r.levels.length<=1)return r.loadLevel;const{maxAutoLevel:n,config:i,minAutoLevel:s}=r,o=t?t.duration:e?e.duration:0,h=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,m=i.abrBandWidthUpFactor;if(c){const Z=this.findBestLevel(h,s,n,c,0,p,m);if(Z>=0)return this.rebufferNotice=-1,Z}let b=o?Math.min(o,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const Z=this.bitrateTestDelay;Z&&(b=(o?Math.min(o,i.maxLoadingDelay):i.maxLoadingDelay)-Z,this.info(`bitrate test took ${Math.round(1e3*Z)}ms, set first fragment max fetchDuration to ${Math.round(1e3*b)} ms`),p=m=1)}const I=this.findBestLevel(h,s,n,c,b,p,m);if(this.rebufferNotice!==I&&(this.rebufferNotice=I,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${I}`)),I>-1)return I;const R=r.levels[s],Y=r.loadLevelObj;return Y&&(R==null?void 0:R.bitrate)<Y.bitrate?s:r.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const r=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,n=e.mainForwardBufferInfo;return(n?n.len:0)/r}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,r,n,i,s,o){var h;const c=n+i,p=this.lastLoadedFragLevel,m=p===-1?this.hls.firstLevel:p,{fragCurrent:b,partCurrent:I}=this,{levels:R,allAudioTracks:Y,loadLevel:Z,config:ge}=this.hls;if(R.length===1)return 0;const xe=R[m],Te=!!((h=this.hls.latestLevelDetails)!=null&&h.live),$e=Z===-1||p===-1;let We,xt="SDR",Ye=(xe==null?void 0:xe.frameRate)||0;const{audioPreference:ft,videoPreference:dt}=ge,et=this.audioTracksByGroup||(this.audioTracksByGroup=Xr(Y));let Mt=-1;if($e){if(this.firstSelection!==-1)return this.firstSelection;const Yt=this.codecTiers||(this.codecTiers=tn(R,et,t,r)),br=Ar(Yt,xt,e,ft,dt),{codecSet:ar,videoRanges:wr,minFramerate:Ur,minBitrate:er,minIndex:tr,preferHDR:en}=br;Mt=tr,We=ar,xt=en?wr[wr.length-1]:wr[0],Ye=Ur,e=Math.max(e,er),this.log(`picked start tier ${nr(br)}`)}else We=xe==null?void 0:xe.codecSet,xt=xe==null?void 0:xe.videoRange;const rr=I?I.duration:b?b.duration:0,pr=this.bwEstimator.getEstimateTTFB()/1e3,Cr=[];for(let Yt=r;Yt>=t;Yt--){var mr;const br=R[Yt],ar=Yt>m;if(!br)continue;if(ge.useMediaCapabilities&&!br.supportedResult&&!br.supportedPromise){const sn=navigator.mediaCapabilities;typeof(sn==null?void 0:sn.decodingInfo)=="function"&&yt(br,et,xt,Ye,e,ft)?(br.supportedPromise=bt(br,et,sn,this.supportedCache),br.supportedPromise.then(cn=>{if(!this.hls)return;br.supportedResult=cn;const qn=this.hls.levels,Wn=qn.indexOf(br);cn.error?this.warn(`MediaCapabilities decodingInfo error: "${cn.error}" for level ${Wn} ${nr(cn)}`):cn.supported?cn.decodingInfoResults.some(Di=>Di.smooth===!1||Di.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Wn} not smooth or powerEfficient: ${nr(cn)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Wn} ${nr(cn)}`),Wn>-1&&qn.length>1&&(this.log(`Removing unsupported level ${Wn}`),this.hls.removeLevel(Wn),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(cn=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${cn}`)})):br.supportedResult=fr}if((We&&br.codecSet!==We||xt&&br.videoRange!==xt||ar&&Ye>br.frameRate||!ar&&Ye>0&&Ye<br.frameRate||(mr=br.supportedResult)!=null&&(mr=mr.decodingInfoResults)!=null&&mr.some(sn=>sn.smooth===!1))&&(!$e||Yt!==Mt)){Cr.push(Yt);continue}const wr=br.details,Ur=(I?wr==null?void 0:wr.partTarget:wr==null?void 0:wr.averagetargetduration)||rr;let er;ar?er=o*e:er=s*e;const tr=rr&&n>=rr*2&&i===0?br.averageBitrate:br.maxBitrate,en=this.getTimeToLoadFrag(pr,er,tr*Ur,wr===void 0);if(er>=tr&&(Yt===p||br.loadError===0&&br.fragmentError===0)&&(en<=pr||!y(en)||Te&&!this.bitrateTestDelay||en<c)){const sn=this.forcedAutoLevel;return Yt!==Z&&(sn===-1||sn!==Z)&&(Cr.length&&this.trace(`Skipped level(s) ${Cr.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${R[Cr[0]].codecs}" ${R[Cr[0]].videoRange}; not compatible with "${We}" ${xt}`),this.info(`switch candidate:${m}->${Yt} adjustedbw(${Math.round(er)})-bitrate=${Math.round(er-tr)} ttfb:${pr.toFixed(1)} avgDuration:${Ur.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${en.toFixed(1)} firstSelection:${$e} codecSet:${br.codecSet} videoRange:${br.videoRange} hls.loadLevel:${Z}`)),$e&&(this.firstSelection=Yt),Yt}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:r}=this.hls;return Math.min(Math.max(e,r),t)}}const Nr={search:function(a,e){let t=0,r=a.length-1,n=null,i=null;for(;t<=r;){n=(t+r)/2|0,i=a[n];const s=e(i);if(s>0)t=n+1;else if(s<0)r=n-1;else return i}return null}};function Jr(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!y(e))return null;const r=a[0].programDateTime;if(e<(r||0))return null;const n=a[a.length-1].endProgramDateTime;if(e>=(n||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(dn(e,t,s))return s}return null}function an(a,e,t=0,r=0,n=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const o=a.endDTS-t;o>0&&o<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&mn(t,r,i)===0||wn(i,a,Math.min(n,r))))return i;const s=Nr.search(e,mn.bind(null,t,r));return s&&(s!==a||!i)?s:i}function wn(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((n,i)=>(i[0]==="INF"&&(n+=parseFloat(i[1])),n),t);return a.start<=r}return!1}function mn(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=a?1:t.start-r>a&&t.start?-1:0}function dn(a,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>a}function Rn(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let r=a.fragments;const{fragmentHint:n}=a;n&&(r=r.concat(n));let i;return Nr.search(r,s=>s.cc<e?1:s.cc>e?-1:(i=s,s.end<=t?1:s.start>t?-1:0)),i||null}return null}function Wr(a){switch(a.details){case J.FRAG_LOAD_TIMEOUT:case J.KEY_LOAD_TIMEOUT:case J.LEVEL_LOAD_TIMEOUT:case J.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Cn(a){return a.details.startsWith("key")}function ht(a){return Cn(a)&&!!a.frag&&!a.frag.decryptdata}function Lr(a,e){const t=Wr(e);return a.default[`${t?"timeout":"error"}Retry`]}function on(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function $n(a){return x(x({},a),{errorRetry:null,timeoutRetry:null})}function Pn(a,e,t,r){if(!a)return!1;const n=r==null?void 0:r.code,i=e<a.maxNumRetry&&(Ln(n)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,r,i):i}function Ln(a){return Sn(a)||!!a&&(a<400||a>499)}function Sn(a){return a===0&&navigator.onLine===!1}var ir={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},$r={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class ln extends H{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(v.ERROR,this.onError,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(v.ERROR,this.onError,this),e.off(v.ERROR,this.onErrorOut,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===ce.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,r=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||r===-1?t.loadLevel:r}variantHasKey(e,t){if(e){var r;if((r=e.details)!=null&&r.hasKey(t))return!0;const n=e.audioGroups;if(n)return this.hls.allAudioTracks.filter(s=>n.indexOf(s.groupId)>=0).some(s=>{var o;return(o=s.details)==null?void 0:o.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var r;if(t.fatal)return;const n=this.hls,i=t.context;switch(t.details){case J.FRAG_LOAD_ERROR:case J.FRAG_LOAD_TIMEOUT:case J.KEY_LOAD_ERROR:case J.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case J.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction=Hr();return}case J.FRAG_GAP:case J.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=ir.SendAlternateToPenaltyBox;return}case J.LEVEL_EMPTY_ERROR:case J.LEVEL_PARSING_ERROR:{var s;const h=t.parent===ce.MAIN?t.level:n.loadLevel;t.details===J.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,h):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,h))}return;case J.LEVEL_LOAD_ERROR:case J.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case J.AUDIO_TRACK_LOAD_ERROR:case J.AUDIO_TRACK_LOAD_TIMEOUT:case J.SUBTITLE_LOAD_ERROR:case J.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const h=n.loadLevelObj;if(h&&(i.type===de.AUDIO_TRACK&&h.hasAudioGroup(i.groupId)||i.type===de.SUBTITLE_TRACK&&h.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=ir.SendAlternateToPenaltyBox,t.errorAction.flags=$r.MoveAllAlternatesMatchingHost;return}}return;case J.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:ir.SendAlternateToPenaltyBox,flags:$r.MoveAllAlternatesMatchingHDCP};return;case J.KEY_SYSTEM_SESSION_UPDATE_FAILED:case J.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case J.KEY_SYSTEM_NO_SESSION:t.errorAction={action:ir.SendAlternateToPenaltyBox,flags:$r.MoveAllAlternatesMatchingKey};return;case J.BUFFER_ADD_CODEC_ERROR:case J.REMUX_ALLOC_ERROR:case J.BUFFER_APPEND_ERROR:if(!t.errorAction){var o;t.errorAction=this.getLevelSwitchAction(t,(o=t.level)!=null?o:n.loadLevel)}return;case J.INTERNAL_EXCEPTION:case J.BUFFER_APPENDING_ERROR:case J.BUFFER_FULL_ERROR:case J.LEVEL_SWITCH_ERROR:case J.BUFFER_STALLED_ERROR:case J.BUFFER_SEEK_OVER_HOLE:case J.BUFFER_NUDGE_ON_STALL:t.errorAction=Hr();return}t.type===be.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=Hr())}getPlaylistRetryOrSwitchAction(e,t){const r=this.hls,n=Lr(r.config.playlistLoadPolicy,e),i=this.playlistError++;if(Pn(n,i,Wr(e),e.response))return{action:ir.RetryRequest,flags:$r.None,retryConfig:n,retryCount:i};const o=this.getLevelSwitchAction(e,t);return n&&(o.retryConfig=n,o.retryCount=i),o}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,o=Lr(Cn(e)?s:i,e),h=t.levels.reduce((p,m)=>p+m.fragmentError,0);if(n&&(e.details!==J.FRAG_GAP&&n.fragmentError++,!ht(e)&&Pn(o,h,Wr(e),e.response)))return{action:ir.RetryRequest,flags:$r.None,retryConfig:o,retryCount:h};const c=this.getLevelSwitchAction(e,r);return o&&(c.retryConfig=o,c.retryCount=h),c}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const n=this.hls.levels[t];if(n){var i,s;const c=e.details;n.loadError++,c===J.BUFFER_APPEND_ERROR&&n.fragmentError++;let p=-1;const{levels:m,loadLevel:b,minAutoLevel:I,maxAutoLevel:R}=r;!r.autoLevelEnabled&&!r.config.preserveManualLevelOnError&&(r.loadLevel=-1);const Y=(i=e.frag)==null?void 0:i.type,ge=(Y===ce.AUDIO&&c===J.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===J.BUFFER_ADD_CODEC_ERROR||c===J.BUFFER_APPEND_ERROR))&&m.some(({audioCodec:xt})=>n.audioCodec!==xt),Te=e.sourceBufferName==="video"&&(c===J.BUFFER_ADD_CODEC_ERROR||c===J.BUFFER_APPEND_ERROR)&&m.some(({codecSet:xt,audioCodec:Ye})=>n.codecSet!==xt&&n.audioCodec===Ye),{type:$e,groupId:We}=(s=e.context)!=null?s:{};for(let xt=m.length;xt--;){const Ye=(xt+b)%m.length;if(Ye!==b&&Ye>=I&&Ye<=R&&m[Ye].loadError===0){var o,h;const ft=m[Ye];if(c===J.FRAG_GAP&&Y===ce.MAIN&&e.frag){const dt=m[Ye].details;if(dt){const et=an(e.frag,dt.fragments,e.frag.start);if(et!=null&&et.gap)continue}}else{if($e===de.AUDIO_TRACK&&ft.hasAudioGroup(We)||$e===de.SUBTITLE_TRACK&&ft.hasSubtitleGroup(We))continue;if(Y===ce.AUDIO&&(o=n.audioGroups)!=null&&o.some(dt=>ft.hasAudioGroup(dt))||Y===ce.SUBTITLE&&(h=n.subtitleGroups)!=null&&h.some(dt=>ft.hasSubtitleGroup(dt))||ge&&n.audioCodec===ft.audioCodec||Te&&n.codecSet===ft.codecSet||!ge&&n.codecSet!==ft.codecSet)continue}p=Ye;break}}if(p>-1&&r.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:ir.SendAlternateToPenaltyBox,flags:$r.None,nextAutoLevel:p}}return{action:ir.SendAlternateToPenaltyBox,flags:$r.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case ir.DoNothing:break;case ir.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==J.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 ir.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,r=e.errorAction;if(!r)return;const{flags:n}=r,i=r.nextAutoLevel;switch(n){case $r.None:this.switchLevel(e,i);break;case $r.MoveAllAlternatesMatchingHDCP:{const h=this.getVariantLevelIndex(e.frag),c=t.levels[h],p=c==null?void 0:c.attrs["HDCP-LEVEL"];if(r.hdcpLevel=p,p==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(p){t.maxHdcpLevel=Je[Je.indexOf(p)-1],r.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case $r.MoveAllAlternatesMatchingKey:{const h=e.decryptdata;if(h){const c=this.hls.levels,p=c.length;for(let b=p;b--;)if(this.variantHasKey(c[b],h)){var s,o;this.log(`Banned key found in level ${b} (${c[b].bitrate}bps) or audio group "${(s=c[b].audioGroups)==null?void 0:s.join(",")}" (${(o=e.frag)==null?void 0:o.type} fragment) ${re(h.keyId||[])}`),c[b].fragmentError++,c[b].loadError++,this.log(`Removing level ${b} with key error (${e.error})`),this.hls.removeLevel(b)}const m=e.frag;if(this.hls.levels.length<p)r.resolved=!0;else if(m&&m.type!==ce.MAIN){const b=m.decryptdata;b&&!h.matches(b)&&(r.resolved=!0)}}break}}r.resolved||this.switchLevel(e,i)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===J.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const r=ur(e.mimeType),n=this.hls.levels;for(let i=n.length;i--;)n[i][`${e.sourceBufferName}Codec`]===r&&(this.log(`Removing level ${i} for ${e.details} ("${r}" not supported)`),this.hls.removeLevel(i))}}}function Hr(a){const e={action:ir.DoNothing,flags:$r.None};return a&&(e.resolved=!0),e}var Xt={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class dr{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e&&(e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.BUFFER_APPENDED,this.onBufferAppended,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.BUFFER_APPENDED,this.onBufferAppended,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const r=this.activePartLists[t];if(r)for(let n=r.length;n--;){const i=r[n];if(!i)break;if(i.start<=e&&e<=i.end&&i.loaded)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,r){const{fragments:n}=this,i=Object.keys(n);for(let s=i.length;s--;){const o=n[i[s]];if((o==null?void 0:o.body.type)===t&&(!r||o.buffered)){const h=o.body;if(h.start<=e&&e<=h.end)return h}}return null}detectEvictedFragments(e,t,r,n,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(n==null?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach(o=>{const h=this.fragments[o];if(!h||s>=h.body.sn)return;if(!h.buffered&&(!h.loaded||i)){h.body.type===r&&this.removeFragment(h.body);return}const c=h.range[e];if(c){if(c.time.length===0){this.removeFragment(h.body);return}c.time.some(p=>{const m=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return m&&this.removeFragment(h.body),m})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const r=e.frag,n=xr(r),i=this.fragments[n];if(!i||i.buffered&&r.gap)return;const s=!r.relurl;Object.keys(t).forEach(o=>{const h=r.elementaryStreams[o];if(!h)return;const c=t[o],p=s||h.partial===!0;i.range[o]=this.getBufferedTimes(r,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,r),jr(i)||this.removeParts(r.sn-1,r.type)):this.removeFragment(i.body)}bufferedEnd(e,t){e.buffered=!0,(e.body.endList=t.endList||e.body.endList)&&(this.endListFragments[e.body.type]=e)}removeParts(e,t){const r=this.activePartLists[t];r&&(this.activePartLists[t]=Gt(r,n=>n.fragment.sn>=e))}fragBuffered(e,t){const r=xr(e);let n=this.fragments[r];!n&&t&&(n=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),n&&(n.loaded=null,this.bufferedEnd(n,e))}getBufferedTimes(e,t,r,n){const i={time:[],partial:r},s=e.start,o=e.end,h=e.minEndPTS||o,c=e.maxStartPTS||s;for(let p=0;p<n.length;p++){const m=n.start(p)-this.bufferPadding,b=n.end(p)+this.bufferPadding;if(c>=m&&h<=b){i.time.push({startPTS:Math.max(s,n.start(p)),endPTS:Math.min(o,n.end(p))});break}else if(s<b&&o>m){const I=Math.max(s,n.start(p)),R=Math.min(o,n.end(p));R>I&&(i.partial=!0,i.time.push({startPTS:I,endPTS:R}))}else if(o<=m)break}return i}getPartialFragment(e){let t=null,r,n,i,s=0;const{bufferPadding:o,fragments:h}=this;return Object.keys(h).forEach(c=>{const p=h[c];p&&jr(p)&&(n=p.body.start-o,i=p.body.end+o,e>=n&&e<=i&&(r=Math.min(e-n,i-e),s<=r&&(t=p.body,s=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||jr(t))}getState(e){const t=xr(e),r=this.fragments[t];return r?r.buffered?jr(r)?Xt.PARTIAL:Xt.OK:Xt.APPENDING:Xt.NOT_LOADED}isTimeBuffered(e,t,r){let n,i;for(let s=0;s<r.length;s++){if(n=r.start(s)-this.bufferPadding,i=r.end(s)+this.bufferPadding,e>=n&&t<=i)return!0;if(t<=n)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const r=t.frag,n=t.part?null:t,i=xr(r);this.fragments[i]={body:r,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:n,timeRanges:i,type:s}=t;if(r.sn==="initSegment")return;const o=r.type;if(n){let c=this.activePartLists[o];c||(this.activePartLists[o]=c=[]),c.push(n)}this.timeRanges=i;const h=i[s];this.detectEvictedFragments(s,h,o,n)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=xr(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,r=Object.keys(t);if(!e)return r.length>0;for(let n=r.length;n--;){const i=t[r[n]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,n,i){n&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const o=this.fragments[s];if(!o)return;const h=o.body;h.type!==r||n&&!h.gap||h.start<t&&h.end>e&&(o.buffered||i)&&this.removeFragment(h)})}removeFragment(e){const t=xr(e);e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const n=e.sn;this.activePartLists[e.type]=Gt(r,i=>i.fragment.sn!==n)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;t&&t.forEach(r=>r.clearElementaryStreamInfo())}}function jr(a){var e,t,r;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(r=a.range.audiovideo)!=null&&r.partial)}function xr(a){return`${a.type}_${a.level}_${a.sn}`}function Gt(a,e){return a.filter(t=>{const r=e(t);return r||t.clearElementaryStreamInfo(),r})}var fn={cbc:0,ctr:1};class vn{constructor(e,t,r){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=r}decrypt(e,t){switch(this.aesMode){case fn.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case fn.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 kn(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class ii{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),r=new Uint32Array(4);for(let n=0;n<4;n++)r[n]=t.getUint32(n*4);return r}initTable(){const e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],i=r[1],s=r[2],o=r[3],h=this.invSubMix,c=h[0],p=h[1],m=h[2],b=h[3],I=new Uint32Array(256);let R=0,Y=0,Z=0;for(Z=0;Z<256;Z++)Z<128?I[Z]=Z<<1:I[Z]=Z<<1^283;for(Z=0;Z<256;Z++){let ge=Y^Y<<1^Y<<2^Y<<3^Y<<4;ge=ge>>>8^ge&255^99,e[R]=ge,t[ge]=R;const xe=I[R],Te=I[xe],$e=I[Te];let We=I[ge]*257^ge*16843008;n[R]=We<<24|We>>>8,i[R]=We<<16|We>>>16,s[R]=We<<8|We>>>24,o[R]=We,We=$e*16843009^Te*65537^xe*257^R*16843008,c[ge]=We<<24|We>>>8,p[ge]=We<<16|We>>>16,m[ge]=We<<8|We>>>24,b[ge]=We,R?(R=xe^I[I[I[$e^xe]]],Y^=I[I[Y]]):R=Y=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let r=!0,n=0;for(;n<t.length&&r;)r=t[n]===this.key[n],n++;if(r)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let o,h;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),m=this.sBox,b=this.rcon,I=this.invSubMix,R=I[0],Y=I[1],Z=I[2],ge=I[3];let xe,Te;for(o=0;o<s;o++){if(o<i){xe=c[o]=t[o];continue}Te=xe,o%i===0?(Te=Te<<8|Te>>>24,Te=m[Te>>>24]<<24|m[Te>>>16&255]<<16|m[Te>>>8&255]<<8|m[Te&255],Te^=b[o/i|0]<<24):i>6&&o%i===4&&(Te=m[Te>>>24]<<24|m[Te>>>16&255]<<16|m[Te>>>8&255]<<8|m[Te&255]),c[o]=xe=(c[o-i]^Te)>>>0}for(h=0;h<s;h++)o=s-h,h&3?Te=c[o]:Te=c[o-4],h<4||o<=4?p[h]=Te:p[h]=R[m[Te>>>24]]^Y[m[Te>>>16&255]]^Z[m[Te>>>8&255]]^ge[m[Te&255]],p[h]=p[h]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,r){const n=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,o=this.invSubMix,h=o[0],c=o[1],p=o[2],m=o[3],b=this.uint8ArrayToUint32Array_(r);let I=b[0],R=b[1],Y=b[2],Z=b[3];const ge=new Int32Array(e),xe=new Int32Array(ge.length);let Te,$e,We,xt,Ye,ft,dt,et,Mt,rr,pr,Cr,mr,Yt;const br=this.networkToHostOrderSwap;for(;t<ge.length;){for(Mt=br(ge[t]),rr=br(ge[t+1]),pr=br(ge[t+2]),Cr=br(ge[t+3]),Ye=Mt^i[0],ft=Cr^i[1],dt=pr^i[2],et=rr^i[3],mr=4,Yt=1;Yt<n;Yt++)Te=h[Ye>>>24]^c[ft>>16&255]^p[dt>>8&255]^m[et&255]^i[mr],$e=h[ft>>>24]^c[dt>>16&255]^p[et>>8&255]^m[Ye&255]^i[mr+1],We=h[dt>>>24]^c[et>>16&255]^p[Ye>>8&255]^m[ft&255]^i[mr+2],xt=h[et>>>24]^c[Ye>>16&255]^p[ft>>8&255]^m[dt&255]^i[mr+3],Ye=Te,ft=$e,dt=We,et=xt,mr=mr+4;Te=s[Ye>>>24]<<24^s[ft>>16&255]<<16^s[dt>>8&255]<<8^s[et&255]^i[mr],$e=s[ft>>>24]<<24^s[dt>>16&255]<<16^s[et>>8&255]<<8^s[Ye&255]^i[mr+1],We=s[dt>>>24]<<24^s[et>>16&255]<<16^s[Ye>>8&255]<<8^s[ft&255]^i[mr+2],xt=s[et>>>24]<<24^s[Ye>>16&255]<<16^s[ft>>8&255]<<8^s[dt&255]^i[mr+3],xe[t]=br(Te^I),xe[t+1]=br(xt^R),xe[t+2]=br(We^Y),xe[t+3]=br($e^Z),I=Mt,R=rr,Y=pr,Z=Cr,t=t+4}return xe.buffer}}class si{constructor(e,t,r){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=r}expandKey(){const e=hi(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function hi(a){switch(a){case fn.cbc:return"AES-CBC";case fn.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const ai=16;class bn{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(r){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const r=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?kn(r):r}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,r,n){return this.useSoftware?new Promise((i,s)=>{const o=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(o,t,r,n);const h=this.flush();h?i(h.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r,n)}softwareDecrypt(e,t,r,n){const{currentIV:i,currentResult:s,remainderData:o}=this;if(n!==fn.cbc||t.byteLength!==16)return pe.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=Pt(o,e),this.remainderData=null);const h=this.getValidChunk(e);if(!h.length)return null;i&&(r=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new ii),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(h.buffer,0,r),this.currentIV=h.slice(-16).buffer,p||null}webCryptoDecrypt(e,t,r,n){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,r,n));this.key=t,this.fastAesKey=new si(this.subtle,t,n)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new vn(this.subtle,new Uint8Array(r),n).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(pe.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,r,n)))}onWebCryptoError(e,t,r,n){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r,n);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%ai;return r!==e.length&&(t=e.slice(0,r),this.remainderData=e.slice(r)),t}logOnce(e){this.logEnabled&&(pe.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Qn=Math.pow(2,17);class Mn{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const r=e.url;if(!r)return Promise.reject(new Kr({type:be.NETWORK_ERROR,details:J.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((o,h)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(R=>R[0]==="GAP")){h(Jn(e));return}else e.gap=!1;const c=this.loader=i?new i(n):new s(n),p=Un(e);e.loader=c;const m=$n(n.fragLoadPolicy.default),b={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Qn};e.stats=c.stats;const I={onSuccess:(R,Y,Z,ge)=>{this.resetLoader(e,c);let xe=R.data;Z.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(xe.slice(0,16)),xe=xe.slice(16)),o({frag:e,part:null,payload:xe,networkDetails:ge})},onError:(R,Y,Z,ge)=>{this.resetLoader(e,c),h(new Kr({type:be.NETWORK_ERROR,details:J.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:x({url:r,data:void 0},R),error:new Error(`HTTP Error ${R.code} ${R.text}`),networkDetails:Z,stats:ge}))},onAbort:(R,Y,Z)=>{this.resetLoader(e,c),h(new Kr({type:be.NETWORK_ERROR,details:J.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:Z,stats:R}))},onTimeout:(R,Y,Z)=>{this.resetLoader(e,c),h(new Kr({type:be.NETWORK_ERROR,details:J.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${b.timeout}ms`),networkDetails:Z,stats:R}))}};t&&(I.onProgress=(R,Y,Z,ge)=>t({frag:e,part:null,payload:Z,networkDetails:ge})),c.load(p,b,I)})}loadPart(e,t,r){this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((o,h)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){h(Jn(e,t));return}const c=this.loader=i?new i(n):new s(n),p=Un(e,t);e.loader=c;const m=$n(n.fragLoadPolicy.default),b={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Qn};t.stats=c.stats,c.load(p,b,{onSuccess:(I,R,Y,Z)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const ge={frag:e,part:t,payload:I.data,networkDetails:Z};r(ge),o(ge)},onError:(I,R,Y,Z)=>{this.resetLoader(e,c),h(new Kr({type:be.NETWORK_ERROR,details:J.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:x({url:p.url,data:void 0},I),error:new Error(`HTTP Error ${I.code} ${I.text}`),networkDetails:Y,stats:Z}))},onAbort:(I,R,Y)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),h(new Kr({type:be.NETWORK_ERROR,details:J.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:Y,stats:I}))},onTimeout:(I,R,Y)=>{this.resetLoader(e,c),h(new Kr({type:be.NETWORK_ERROR,details:J.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${b.timeout}ms`),networkDetails:Y,stats:I}))}})})}updateStatsFromPart(e,t){const r=e.stats,n=t.stats,i=n.total;if(r.loaded+=n.loaded,i){const h=Math.round(e.duration/t.duration),c=Math.min(Math.round(r.loaded/i),h),m=(h-c)*Math.round(r.loaded/c);r.total=r.loaded+m}else r.total=Math.max(r.loaded,r.total);const s=r.loading,o=n.loading;s.start?s.first+=o.first-o.start:(s.start=o.start,s.first=o.first),s.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Un(a,e=null){const t=e||a,r={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},n=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(y(n)&&y(i)){var s;let o=n,h=i;if(a.sn==="initSegment"&&Zn((s=a.decryptdata)==null?void 0:s.method)){const c=i-n;c%16&&(h=i+(16-c%16)),n!==0&&(r.resetIV=!0,o=n-16)}r.rangeStart=o,r.rangeEnd=h}return r}function Jn(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),r={type:be.MEDIA_ERROR,details:J.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(r.part=e),(e||a).stats.aborted=!0,new Kr(r)}function Zn(a){return a==="AES-128"||a==="AES-256"}class Kr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Ii extends H{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 vi{constructor(e,t,r,n=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=_i(),this.buffering={audio:_i(),video:_i(),audiovideo:_i()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=i,this.partial=s}}function _i(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Bn={length:0,start:()=>0,end:()=>0};class kr{static isBuffered(e,t){if(e){const r=kr.getBuffered(e);for(let n=r.length;n--;)if(t>=r.start(n)&&t<=r.end(n))return!0}return!1}static bufferedRanges(e){if(e){const t=kr.getBuffered(e);return kr.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}static bufferInfo(e,t,r){if(e){const n=kr.bufferedRanges(e);if(n.length)return kr.bufferedInfo(n,t,r)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,r){t=Math.max(0,t),e.length>1&&e.sort((p,m)=>p.start-m.start||m.end-p.end);let n=-1,i=[];if(r)for(let p=0;p<e.length;p++){t>=e[p].start&&t<=e[p].end&&(n=p);const m=i.length;if(m){const b=i[m-1].end;e[p].start-b<r?e[p].end>b&&(i[m-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,o,h=t,c=t;for(let p=0;p<i.length;p++){const m=i[p].start,b=i[p].end;if(n===-1&&t>=m&&t<=b&&(n=p),t+r>=m&&t<b)h=m,c=b,s=c-t;else if(t+r<m){o=m;break}}return{len:s,start:h||0,end:c||0,nextStart:o,buffered:e,bufferedIndex:n}}static getBuffered(e){try{return e.buffered||Bn}catch(t){return pe.log("failed to get media.buffered",t),Bn}}}const ns=/\{\$([a-zA-Z0-9-_]+)\}/g;function Ht(a){return ns.test(a)}function Nn(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(ns,r=>{const n=r.substring(2,r.length-1),i=t==null?void 0:t[n];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${n}"`)),r):i})}return e}function Bi(a,e,t){let r=a.variableList;r||(a.variableList=r={});let n,i;if("QUERYPARAM"in e){n=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(n))i=s.get(n);else throw new Error(`"${n}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else n=e.NAME,i=e.VALUE;n in r?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${n}"`)):r[n]=i||""}function Ni(a,e,t){const r=e.IMPORT;if(t&&r in t){let n=a.variableList;n||(a.variableList=n={}),n[r]=t[r]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}const zn=/^(\d+)x(\d+)$/,oi=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Fr{constructor(e,t){typeof e=="string"&&(e=Fr.parseAttrList(e,t)),E(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const r=new Uint8Array(t.length/2);for(let n=0;n<t.length/2;n++)r[n]=parseInt(t.slice(n*2,n*2+2),16);return r}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const r=this[e];return r?parseFloat(r):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const r=this[e];return(r?r.split(/[ ,]+/):[]).reduce((n,i)=>(n[i.toLowerCase()]=!0,n),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=zn.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let r;const n={},i='"';for(oi.lastIndex=0;(r=oi.exec(e))!==null;){const s=r[1].trim();let o=r[2];const h=o.indexOf(i)===0&&o.lastIndexOf(i)===o.length-1;let c=!1;if(h)o=o.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(h||c))o=Nn(t,o);else if(!c&&!h)switch(s){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":pe.warn(`${e}: attribute ${s} is missing quotes`)}n[s]=o}return n}}const ei="com.apple.hls.interstitial";function $i(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function is(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Gn{constructor(e,t,r=0){var n;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(n=t==null?void 0:t.tagOrder)!=null?n:r,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){pe.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=E(new Fr({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);y(i.getTime())&&(this._endDate=i)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(pe.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(y(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===ei}get isValid(){return!!this.id&&!this._badValueForSameId&&y(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 Ui=10;class ss{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&r>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(t=>{let r=t.decryptdata;return r||(t.setKeyFormat(e.keyFormat),r=t.decryptdata),!!r&&e.matches(r)})}get hasProgramDateTime(){return this.fragments.length?y(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Ui}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let r=e.length;r--;)if(e[r].index>t)return e[r].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function Yn(a,e){return a.length===e.length?!a.some((t,r)=>t!==e[r]):!1}function di(a,e){return!a&&!e?!0:!a||!e?!1:Yn(a,e)}function li(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function zi(a){switch(a){case"AES-128":case"AES-256":return fn.cbc;case"AES-256-CTR":return fn.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function qi(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Xi(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function ti(a){const e=Xi(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function lr(a){const e=function(r,n,i){const s=r[n];r[n]=r[i],r[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function Or(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const r=e[1].split(";"),n=r[r.length-1].split(",");if(n.length===2){const i=n[0]==="base64",s=n[1];i?(r.splice(-1,1),t=qi(s)):t=ti(s)}}return t}const gn=typeof self!="undefined"?self:void 0;var zr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Qr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function yi(a){switch(a){case Qr.FAIRPLAY:return zr.FAIRPLAY;case Qr.PLAYREADY:return zr.PLAYREADY;case Qr.WIDEVINE:return zr.WIDEVINE;case Qr.CLEARKEY:return zr.CLEARKEY}}function fi(a){switch(a){case zr.FAIRPLAY:return Qr.FAIRPLAY;case zr.PLAYREADY:return Qr.PLAYREADY;case zr.WIDEVINE:return Qr.WIDEVINE;case zr.CLEARKEY:return Qr.CLEARKEY}}function bi(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[zr.FAIRPLAY,zr.WIDEVINE,zr.PLAYREADY,zr.CLEARKEY].filter(n=>!!e[n]):[];return!r[zr.WIDEVINE]&&t&&r.push(zr.WIDEVINE),r}const Gi=function(a){return gn!=null&&(a=gn.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Eo(a,e,t,r){let n;switch(a){case zr.FAIRPLAY:n=["cenc","sinf"];break;case zr.WIDEVINE:case zr.PLAYREADY:n=["cenc"];break;case zr.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return xo(n,e,t,r)}function xo(a,e,t,r){return[{initDataTypes:a,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function Ta(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Ri(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),r=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(s){const o=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(o){const h=qi(o).subarray(0,16);return lr(h),h}}return null}let Ei={};class Li{static clearKeyUriToKeyIdMap(){Ei={}}static setKeyIdForUri(e,t){Ei[e]=t}static addKeyIdForUri(e){const t=Object.keys(Ei).length%Number.MAX_SAFE_INTEGER,r=new Uint8Array(16);return new DataView(r.buffer,12,4).setUint32(0,t),Ei[e]=r,r}constructor(e,t,r,n=[1],i=null,s){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=r,this.keyFormatVersions=n,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!li(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(W(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&Yn(e.keyFormatVersions,this.keyFormatVersions)&&di(e.iv,this.iv)&&di(e.keyId,this.keyId)}isSupported(){if(this.method){if(li(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Qr.FAIRPLAY:case Qr.WIDEVINE:case Qr.PLAYREADY:case Qr.CLEARKEY:return["SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e,t){if(!this.encrypted||!this.uri)return null;if(li(this.method)){let i=this.iv;return i||(typeof e!="number"&&(pe.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=Ys(e)),new Li(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=Ei[this.uri];if(i&&!Yn(this.keyId,i)&&Li.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const r=Or(this.uri);if(r)switch(this.keyFormat){case Qr.WIDEVINE:if(this.pssh=r,!this.keyId){const i=Q(r.buffer);if(i.length){var n;const s=i[0];this.keyId=(n=s.kids)!=null&&n.length?s.kids[0]:null}}this.keyId||(this.keyId=Is(t));break;case Qr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=T(i,null,r),this.keyId=Ri(r);break}default:{let i=r.subarray(0,16);if(i.length!==16){const s=new Uint8Array(16);s.set(i,16-i.length),i=s}this.keyId=i;break}}if(!this.keyId||this.keyId.byteLength!==16){let i;i=Zs(t),i||(i=Is(t),i||(i=Ei[this.uri])),i&&(this.keyId=i,Li.setKeyIdForUri(this.uri,i))}return this}}function Zs(a){const e=a==null?void 0:a[Qr.WIDEVINE];return e?e.keyId:null}function Is(a){const e=a==null?void 0:a[Qr.PLAYREADY];if(e){const t=Or(e.uri);if(t)return Ri(t)}return null}function Ys(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Da=/#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,qs=/#EXT-X-MEDIA:(.*)/g,wo=/^#EXT(?:INF|-X-TARGETDURATION):/m,Rs=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Ls=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 xi{static findGroup(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(n.id===t)return n}}static resolve(e,t){return S.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return wo.test(e)}static parseMasterPlaylist(e,t){const r=Ht(e),n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},i=[];if(Da.lastIndex=0,!e.startsWith("#EXTM3U"))return n.playlistParsingError=new Error("no EXTM3U delimiter"),n;let s;for(;(s=Da.exec(e))!=null;)if(s[1]){var o;const c=new Fr(s[1],n),p=Nn(n,s[2]),m={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:xi.resolve(p,t)},b=c.decimalResolution("RESOLUTION");b&&(m.width=b.width,m.height=b.height),Qs(c.CODECS,m);const I=c["SUPPLEMENTAL-CODECS"];I&&(m.supplemental={},Qs(I,m.supplemental)),(o=m.unknownCodecs)!=null&&o.length||i.push(m),n.levels.push(m)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const m=new Fr(p,n),b=m["DATA-ID"];b&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[b]=m);break}case"SESSION-KEY":{const m=Xs(p,t,n);m.encrypted&&m.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(m)):pe.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const m=new Fr(p,n);Bi(n,m,t)}break}case"CONTENT-STEERING":{const m=new Fr(p,n);n.contentSteering={uri:xi.resolve(m["SERVER-URI"],t),pathwayId:m["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=Ia(p);break}}}const h=i.length>0&&i.length<n.levels.length;return n.levels=h?i:n.levels,n.levels.length===0&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,r){let n;const i={},s=r.levels,o={AUDIO:s.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:s.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let h=0;for(qs.lastIndex=0;(n=qs.exec(e))!==null;){const c=new Fr(n[1],r),p=c.TYPE;if(p){const m=o[p],b=i[p]||[];i[p]=b;const I=c.LANGUAGE,R=c["ASSOC-LANGUAGE"],Y=c.CHANNELS,Z=c.CHARACTERISTICS,ge=c["INSTREAM-ID"],xe={attrs:c,bitrate:0,id:h++,groupId:c["GROUP-ID"]||"",name:c.NAME||I||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:I,url:c.URI?xi.resolve(c.URI,t):""};if(R&&(xe.assocLang=R),Y&&(xe.channels=Y),Z&&(xe.characteristics=Z),ge&&(xe.instreamId=ge),m!=null&&m.length){const Te=xi.findGroup(m,xe.groupId)||m[0];Js(xe,Te,"audioCodec"),Js(xe,Te,"textCodec")}b.push(xe)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){var o;const h={url:t},c=new ss(t),p=c.fragments,m=[];let b=null,I=0,R=0,Y=0,Z=0,ge=0,xe=null,Te=new He(n,h),$e,We,xt,Ye=-1,ft=!1,dt=null,et;if(Rs.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Ht(e),((o=Rs.exec(e))==null?void 0:o[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;($e=Rs.exec(e))!==null;){ft&&(ft=!1,Te=new He(n,h),Te.playlistOffset=Y,Te.setStart(Y),Te.sn=I,Te.cc=Z,ge&&(Te.bitrate=ge),Te.level=r,b&&(Te.initSegment=b,b.rawProgramDateTime&&(Te.rawProgramDateTime=b.rawProgramDateTime,b.rawProgramDateTime=null),dt&&(Te.setByteRange(dt),dt=null)));const Cr=$e[1];if(Cr){Te.duration=parseFloat(Cr);const mr=(" "+$e[2]).slice(1);Te.title=mr||null,Te.tagList.push(mr?["INF",Cr,mr]:["INF",Cr])}else if($e[3]){if(y(Te.duration)){Te.playlistOffset=Y,Te.setStart(Y),xt&&Ra(Te,xt,c),Te.sn=I,Te.level=r,Te.cc=Z,p.push(Te);const mr=(" "+$e[3]).slice(1);Te.relurl=Nn(c,mr),wi(Te,xe,m),xe=Te,Y+=Te.duration,I++,R=0,ft=!0}}else{if($e=$e[0].match(Ls),!$e){pe.warn("No matches on slow regex match for level playlist!");continue}for(We=1;We<$e.length&&$e[We]===void 0;We++);const mr=(" "+$e[We]).slice(1),Yt=(" "+$e[We+1]).slice(1),br=$e[We+2]?(" "+$e[We+2]).slice(1):null;switch(mr){case"BYTERANGE":xe?Te.setByteRange(Yt,xe):Te.setByteRange(Yt);break;case"PROGRAM-DATE-TIME":Te.rawProgramDateTime=Yt,Te.tagList.push(["PROGRAM-DATE-TIME",Yt]),Ye===-1&&(Ye=p.length);break;case"PLAYLIST-TYPE":c.type&&ui(c,mr,$e),c.type=Yt.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?ui(c,mr,$e):p.length>0&&ta(c,mr,$e),I=c.startSN=parseInt(Yt);break;case"SKIP":{c.skippedSegments&&ui(c,mr,$e);const ar=new Fr(Yt,c),wr=ar.decimalInteger("SKIPPED-SEGMENTS");if(y(wr)){c.skippedSegments+=wr;for(let er=wr;er--;)p.push(null);I+=wr}const Ur=ar.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ur&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(Ur.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&ui(c,mr,$e),c.targetduration=Math.max(parseInt(Yt),1);break;case"VERSION":c.version!==null&&ui(c,mr,$e),c.version=parseInt(Yt);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||ui(c,mr,$e),c.live=!1;break;case"#":(Yt||br)&&Te.tagList.push(br?[Yt,br]:[Yt]);break;case"DISCONTINUITY":Z++,Te.tagList.push(["DIS"]);break;case"GAP":Te.gap=!0,Te.tagList.push([mr]);break;case"BITRATE":Te.tagList.push([mr,Yt]),ge=parseInt(Yt)*1e3,y(ge)?Te.bitrate=ge:ge=0;break;case"DATERANGE":{const ar=new Fr(Yt,c),wr=new Gn(ar,c.dateRanges[ar.ID],c.dateRangeTagCount);c.dateRangeTagCount++,wr.isValid||c.skippedSegments?c.dateRanges[wr.id]=wr:pe.warn(`Ignoring invalid DATERANGE tag: "${Yt}"`),Te.tagList.push(["EXT-X-DATERANGE",Yt]);break}case"DEFINE":{{const ar=new Fr(Yt,c);"IMPORT"in ar?Ni(c,ar,s):Bi(c,ar,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?ui(c,mr,$e):p.length>0&&ta(c,mr,$e),c.startCC=Z=parseInt(Yt);break;case"KEY":{const ar=Xs(Yt,t,c);if(ar.isSupported()){if(ar.method==="NONE"){xt=void 0;break}xt||(xt={});const wr=xt[ar.keyFormat];wr!=null&&wr.matches(ar)||(wr&&(xt=E({},xt)),xt[ar.keyFormat]=ar)}else pe.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${Yt}"`);break}case"START":c.startTimeOffset=Ia(Yt);break;case"MAP":{const ar=new Fr(Yt,c);if(Te.duration){const wr=new He(n,h);ea(wr,ar,r,xt),b=wr,Te.initSegment=b,b.rawProgramDateTime&&!Te.rawProgramDateTime&&(Te.rawProgramDateTime=b.rawProgramDateTime)}else{const wr=Te.byteRangeEndOffset;if(wr){const Ur=Te.byteRangeStartOffset;dt=`${wr-Ur}@${Ur}`}else dt=null;ea(Te,ar,r,xt),b=Te,ft=!0}b.cc=Z;break}case"SERVER-CONTROL":{et&&ui(c,mr,$e),et=new Fr(Yt),c.canBlockReload=et.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=et.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&et.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=et.optionalFloat("PART-HOLD-BACK",0),c.holdBack=et.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&ui(c,mr,$e);const ar=new Fr(Yt);c.partTarget=ar.decimalFloatingPoint("PART-TARGET");break}case"PART":{let ar=c.partList;ar||(ar=c.partList=[]);const wr=R>0?ar[ar.length-1]:void 0,Ur=R++,er=new Fr(Yt,c),tr=new ot(er,Te,h,Ur,wr);ar.push(tr),Te.duration+=tr.duration;break}case"PRELOAD-HINT":{const ar=new Fr(Yt,c);c.preloadHint=ar;break}case"RENDITION-REPORT":{const ar=new Fr(Yt,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(ar);break}default:pe.warn(`line parsed but not handled: ${$e}`);break}}}xe&&!xe.relurl?(p.pop(),Y-=xe.duration,c.partList&&(c.fragmentHint=xe)):c.partList&&(wi(Te,xe,m),Te.cc=Z,c.fragmentHint=Te,xt&&Ra(Te,xt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const Mt=p.length,rr=p[0],pr=p[Mt-1];if(Y+=c.skippedSegments*c.targetduration,Y>0&&Mt&&pr){c.averagetargetduration=Y/Mt;const Cr=pr.sn;c.endSN=Cr!=="initSegment"?Cr:0,c.live||(pr.endList=!0),Ye>0&&(Ao(p,Ye),rr&&m.unshift(rr))}return c.fragmentHint&&(Y+=c.fragmentHint.duration),c.totalduration=Y,m.length&&c.dateRangeTagCount&&rr&&Ca(m,c),c.endCC=Z,c}}function Ca(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const o=e.fragments[e.fragments.length-1];a.push(o),t++}else return;const r=a[t-1],n=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let o=i.length;o--;){const h=e.dateRanges[i[o]],c=h.startDate.getTime();h.tagAnchor=r.ref;for(let p=t;p--;){var s;if(((s=a[p])==null?void 0:s.sn)<e.startSN)break;const m=So(e,c,a,p,n);if(m!==-1){h.tagAnchor=e.fragments[m].ref;break}}}}function So(a,e,t,r,n){const i=t[r];if(i){const o=i.programDateTime;if(e>=o||r===0){var s;const h=(((s=t[r+1])==null?void 0:s.start)||n)-i.start;if(e<=o+h*1e3){const c=t[r].sn-a.startSN;if(c<0)return-1;const p=a.fragments;if(p.length>t.length){const b=(t[r+1]||p[p.length-1]).sn-a.startSN;for(let I=b;I>c;I--){const R=p[I].programDateTime;if(e>=R&&e<R+p[I].duration*1e3)return I}}return c}}}return-1}function Xs(a,e,t){var r,n;const i=new Fr(a,t),s=(r=i.METHOD)!=null?r:"",o=i.URI,h=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(n=i.KEYFORMAT)!=null?n:"identity";o&&i.IV&&!h&&pe.error(`Invalid IV: ${i.IV}`);const m=o?xi.resolve(o,e):"",b=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Li(s,m,p,b,h,i.KEYID)}function Ia(a){const t=new Fr(a).decimalFloatingPoint("TIME-OFFSET");return y(t)?t:null}function Qs(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>fe(i,r));n.length&&(e[`${r}Codec`]=n.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>n.indexOf(i)===-1))}),e.unknownCodecs=t}function Js(a,e,t){const r=e[t];r&&(a[t]=r)}function Ao(a,e){let t=a[e];for(let r=e;r--;){const n=a[r];if(!n)return;n.programDateTime=t.programDateTime-n.duration*1e3,t=n}}function wi(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function ea(a,e,t,r){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",r&&(a.levelkeys=r),a.initSegment=null}function Ra(a,e,t){a.levelkeys=e;const{encryptedFragments:r}=t;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(n=>e[n].isCommonEncryption)&&r.push(a)}function ui(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function ta(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function gs(a,e){const t=e.startPTS;if(y(t)){let r=0,n;e.sn>a.sn?(r=t-a.start,n=a):(r=a.start-t,n=e),n.duration!==r&&n.setDuration(r)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function ks(a,e,t,r,n,i,s){r-t<=0&&(s.warn("Fragment should have a positive duration",e),r=t+e.duration,i=n+e.duration);let h=t,c=r;const p=e.startPTS,m=e.endPTS;if(y(p)){const ge=Math.abs(p-t);a&&ge>a.totalduration?s.warn(`media timestamps and playlist times differ by ${ge}s for level ${e.level} ${a.url}`):y(e.deltaPTS)?e.deltaPTS=Math.max(ge,e.deltaPTS):e.deltaPTS=ge,h=Math.max(t,p),t=Math.min(t,p),n=e.startDTS!==void 0?Math.min(n,e.startDTS):n,c=Math.min(r,m),r=Math.max(r,m),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const b=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(r-e.start),e.startPTS=t,e.maxStartPTS=h,e.startDTS=n,e.endPTS=r,e.minEndPTS=c,e.endDTS=i;const I=e.sn;if(!a||I<a.startSN||I>a.endSN)return 0;let R;const Y=I-a.startSN,Z=a.fragments;for(Z[Y]=e,R=Y;R>0;R--)gs(Z[R],Z[R-1]);for(R=Y;R<Z.length-1;R++)gs(Z[R],Z[R+1]);return a.fragmentHint&&gs(Z[Z.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,b}function La(a,e,t){if(a===e)return;let r=null;const n=a.fragments;for(let p=n.length-1;p>=0;p--){const m=n[p].initSegment;if(m){r=m;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;Qi(a,e,(p,m,b,I)=>{if((!e.startCC||e.skippedSegments)&&m.cc!==p.cc){const R=p.cc-m.cc;for(let Y=b;Y<I.length;Y++)I[Y].cc+=R;e.endCC=I[I.length-1].cc}y(p.startPTS)&&y(p.endPTS)&&(m.setStart(m.startPTS=p.startPTS),m.startDTS=p.startDTS,m.maxStartPTS=p.maxStartPTS,m.endPTS=p.endPTS,m.endDTS=p.endDTS,m.minEndPTS=p.minEndPTS,m.setDuration(p.endPTS-p.startPTS),m.duration&&(i=m),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(m.elementaryStreams=p.elementaryStreams),m.loader=p.loader,p.hasStats&&(m.stats=p.stats),p.initSegment&&(m.initSegment=p.initSegment,r=p.initSegment)});const s=e.fragments,o=e.fragmentHint?s.concat(e.fragmentHint):s;if(r&&o.forEach(p=>{var m;p&&(!p.initSegment||p.initSegment.relurl===((m=r)==null?void 0:m.relurl))&&(p.initSegment=r)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(p=>!p),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let p=e.skippedSegments;p--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=ji(a.dateRanges,e,t));const p=a.fragments.filter(m=>m.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let m=1;m<o.length;m++)o[m].programDateTime===null&&wi(o[m],o[m-1],p);Ca(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var h;const p=na(a,e.startSN-1);e.startCC=(h=p==null?void 0:p.cc)!=null?h:s[0].cc}ka(a.partList,e.partList,(p,m)=>{m.elementaryStreams=p.elementaryStreams,m.stats=p.stats}),i?ks(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):ki(a,e),s.length&&(e.totalduration=e.edge-s[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const c=e.advancedDateTime;if(e.advanced&&c){const p=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=p),e.driftEndTime=c,e.driftEnd=p}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function ji(a,e,t){const{dateRanges:r,recentlyRemovedDateranges:n}=e,i=E({},a);n&&n.forEach(h=>{delete i[h]});const o=Object.keys(i).length;return o?(Object.keys(r).forEach(h=>{const c=i[h],p=new Gn(r[h].attr,c);p.isValid?(i[h]=p,c||(p.tagOrder+=o)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${nr(r[h].attr)}"`)}),i):r}function ka(a,e,t){if(a&&e){let r=0;for(let n=0,i=a.length;n<=i;n++){const s=a[n],o=e[n+r];s&&o&&s.index===o.index&&s.fragment.sn===o.fragment.sn?t(s,o):r--}}}function Qi(a,e,t){const r=e.skippedSegments,n=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(r?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,h=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=n;c<=i;c++){const p=h[s+c];let m=o[c];if(r&&!m&&p&&(m=e.fragments[c]=p),p&&m){t(p,m,c,o);const b=p.relurl,I=m.relurl;if(b&&Fa(b,I)){e.playlistParsingError=Ps(`media sequence mismatch ${m.sn}:`,a,e,p,m);return}else if(p.cc!==m.cc){e.playlistParsingError=Ps(`discontinuity sequence mismatch (${p.cc}!=${m.cc})`,a,e,p,m);return}}}}function Ps(a,e,t,r,n){return new Error(`${a} ${n.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function ki(a,e,t=!0){const r=e.startSN+e.skippedSegments-a.startSN,n=a.fragments,i=r>=0;let s=0;if(i&&r<n.length)s=n[r].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+r*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;ra(e,s)}function ra(a,e){if(e){const t=a.fragments;for(let r=a.skippedSegments;r<t.length;r++)t[r].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function Pi(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const r=a.fragments;if(r.length&&t*4>e){const i=r[r.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function na(a,e,t){if(!a)return null;let r=a.fragments[e-a.startSN];return r||(r=a.fragmentHint,r&&r.sn===e)?r:e<a.startSN&&t&&t.sn===e?t:null}function Pa(a,e,t){return a?ia(a.partList,e,t):null}function ia(a,e,t){if(a)for(let r=a.length;r--;){const n=a[r];if(n.index===t&&n.fragment.sn===e)return n}return null}function Oa(a){a.forEach((e,t)=>{var r;(r=e.details)==null||r.fragments.forEach(n=>{n.level=t,n.initSegment&&(n.initSegment.level=t)})})}function Fa(a,e){return a!==e&&e?sa(a)!==sa(e):!1}function sa(a){return a.replace(/\?[^?]*$/,"")}function Ji(a,e){for(let r=0,n=a.length;r<n;r++){var t;if(((t=a[r])==null?void 0:t.cc)===e)return a[r]}return null}function Ma(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function aa(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function oa(a,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)aa(t[r],a);e.fragmentHint&&aa(e.fragmentHint,a),e.alignedSliding=!0}function Ba(a,e){a&&(Os(e,a),e.alignedSliding||as(e,a),!e.alignedSliding&&!e.skippedSegments&&ki(a,e,!1))}function Os(a,e){if(!Ma(e,a))return;const t=Math.min(e.endCC,a.endCC),r=Ji(e.fragments,t),n=Ji(a.fragments,t);if(!r||!n)return;pe.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=r.start-n.start;oa(i,a)}function as(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,r=e.fragments;if(!t.length||!r.length)return;let n,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(n=Ji(r,s),i=Ji(t,s)),(!n||!i)&&(n=r[Math.floor(r.length/2)],i=Ji(t,n.cc)||t[Math.floor(t.length/2)]);const o=n.programDateTime,h=i.programDateTime;if(!o||!h)return;const c=(h-o)/1e3-(i.start-n.start);oa(c,a)}function jn(a,e,t){Vn(a,e,t),a.addEventListener(e,t)}function Vn(a,e,t){a.removeEventListener(e,t)}const Na={toString:function(a){let e="";const t=a.length;for(let r=0;r<t;r++)e+=`[${a.start(r).toFixed(3)}-${a.end(r).toFixed(3)}]`;return e}},kt={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 vs extends Ii{constructor(e,t,r,n,i){super(n,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=kt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:o,media:h,mediaBuffer:c,state:p}=this,m=h?h.currentTime:0,b=kr.bufferInfo(c||h,m,s.maxBufferHole),I=!b.len;if(this.log(`Media seeking to ${y(m)?m.toFixed(3):m}, state: ${p}, ${I?"out of":"in"} buffer`),this.state===kt.ENDED)this.resetLoadingState();else if(o){const R=s.maxFragLookUpTolerance,Y=o.start-R,Z=o.start+o.duration+R;if(I||Z<b.start||Y>b.end){const ge=m>Z;(m<Y||ge)&&(ge&&o.loader&&(this.log(`Cancelling fragment load for seek (sn: ${o.sn})`),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(h){this.fragmentTracker.removeFragmentsInRange(m,1/0,this.playlistType,!0);const R=this.lastCurrentTime;if(m>R&&(this.lastCurrentTime=m),!this.loadingParts){const Y=Math.max(b.end,m),Z=this.shouldLoadParts(this.getLevelDetails(),Y);Z&&(this.log(`LL-Part loading ON after seeking to ${m.toFixed(2)} with buffer @${Y.toFixed(2)}`),this.loadingParts=Z)}}this.hls.hasEnoughToStart||(this.log(`Setting ${I?"startPosition":"nextLoadPosition"} to ${m} for seek without enough to start`),this.nextLoadPosition=m,I&&(this.startPosition=m)),I&&this.state===kt.IDLE&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new Mn(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new bn(e.config)}registerListeners(){const{hls:e}=this;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===kt.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=kt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const r=e.end||0,n=this.config.timelineOffset||0;if(r<=n)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=kr.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>n&&s<t.edge||this.media.currentTime<e.start)return!1;const h=t.partList;if(h!=null&&h.length){const p=h[h.length-1];return kr.isBuffered(this.media,p.start+p.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const r=this.media=this.mediaBuffer=t.media;jn(r,"seeking",this.onMediaSeeking),jn(r,"ended",this.onMediaEnded);const n=this.config;this.levels&&n.autoStartLoad&&this.state===kt.STOPPED&&this.startLoad(n.startPosition)}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(n!==null){if(n.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),Vn(n,"seeking",this.onMediaSeeking),Vn(n,"ended",this.onMediaEnded),this.keyLoader&&!r&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,r){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=kt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,r){this.startFragRequested=!0,this._loadFragForPlayback(e,t,r)}_loadFragForPlayback(e,t,r){const n=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,r,n).then(i=>{if(!i)return;const s=this.state,o=i.frag;if(this.fragContextChanged(o)){(s===kt.FRAG_LOADING||!this.fragCurrent&&s===kt.PARSING)&&(this.fragmentTracker.removeFragment(o),this.state=kt.IDLE);return}"payload"in i&&(this.log(`Loaded ${o.type} sn: ${o.sn} of ${this.playlistLabel()} ${o.level}`),this.hls.trigger(v.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===kt.STOPPED||this.state===kt.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:r}=this;if(r.getState(e)===Xt.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),o=Math.max(e.duration,s?s.len:this.config.maxBufferLength),h=this.backtrackFragment;((h?e.sn-h.sn:0)===1||this.reduceMaxBufferLength(o,e.duration))&&r.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?r.removeAllFragments():r.hasParts(e.type)&&(r.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),r.getState(e)===Xt.PARTIAL&&r.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,r=null){if(!(e-t))return;const n={startOffset:e,endOffset:t,type:r};this.hls.trigger(v.BUFFER_FLUSHING,n)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(r=>{const n=r==null?void 0:r.frag;if(!n||this.fragContextChanged(n)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:n}=this,{frag:i,payload:s}=r,o=i.decryptdata;if(s&&s.byteLength>0&&o!=null&&o.key&&o.iv&&li(o.method)){const h=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),o.key.buffer,o.iv.buffer,zi(o.method)).catch(c=>{throw n.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return n.trigger(v.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:h,tdecrypt:p}}),r.payload=c,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===kt.STOPPED||this.state===kt.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const r=e.frag.stats;this.state!==kt.STOPPED&&(this.state=kt.IDLE),e.frag.data=new Uint8Array(e.payload),r.parsing.start=r.buffering.start=self.performance.now(),r.parsing.end=r.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var r,n;const i=e.tracks;if(i&&!t.encrypted&&((r=i.audio)!=null&&r.encrypted||(n=i.video)!=null&&n.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const s=this.media,o=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(o.message),!s||s.mediaKeys?!1:(this.hls.trigger(v.ERROR,{type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_NO_KEYS,fatal:!1,error:o,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const r=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${r?Na.toString(kr.getBuffered(r)):"(detached)"})`),Be(e)){var n;if(e.type!==ce.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(o=>!!s[o])){this.state=kt.IDLE;return}}const i=(n=this.levels)==null?void 0:n[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=kt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:n,partsLoaded:i}=e,s=!i||i.length===0||i.some(h=>!h),o=new vi(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!s);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,n){var i;this.fragCurrent=e;const s=t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let o=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=kt.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(b=>{if(!this.fragContextChanged(b.frag))return this.hls.trigger(v.KEY_LOADED,b),this.state===kt.KEY_LOADING&&(this.state=kt.IDLE),b}),this.hls.trigger(v.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(o=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),o&&this.log("[eme] blocking frag load until media-keys acquired"));const h=this.fragPrevious;if(Be(e)&&(!h||e.sn!==h.sn)){const b=this.shouldLoadParts(t.details,e.end);b!==this.loadingParts&&(this.log(`LL-Part loading ${b?"ON":"OFF"} loading sn ${h==null?void 0:h.sn}->${e.sn}`),this.loadingParts=b)}if(r=Math.max(e.start,r||0),this.loadingParts&&Be(e)){const b=s.partList;if(b&&n){r>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const I=this.getNextPart(b,e,r);if(I>-1){const R=b[I];e=this.fragCurrent=R.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${R.index} (${I}/${b.length-1}) of ${this.fragInfo(e,!1,R)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=R.start+R.duration,this.state=kt.FRAG_LOADING;let Y;return o?Y=o.then(Z=>!Z||this.fragContextChanged(Z.frag)?null:this.doFragPartsLoad(e,R,t,n)).catch(Z=>this.handleFragLoadError(Z)):Y=this.doFragPartsLoad(e,R,t,n).catch(Z=>this.handleFragLoadError(Z)),this.hls.trigger(v.FRAG_LOADING,{frag:e,part:R,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):Y}else if(!e.url||this.loadedEndOfParts(b,r))return Promise.resolve(null)}}if(Be(e)&&this.loadingParts){var c;this.log(`LL-Part loading OFF after next part miss @${r.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(c=s.partList)==null?void 0:c.filter(b=>b.loaded).map(b=>`[${b.start}-${b.end}]`)}`),this.loadingParts=!1}else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${"["+s.startSN+"-"+s.endSN+"]"}, target: ${parseFloat(r.toFixed(3))}`),y(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=kt.FRAG_LOADING;const p=this.config.progressive&&e.type!==ce.SUBTITLE;let m;return p&&o?m=o.then(b=>!b||this.fragContextChanged(b.frag)?null:this.fragmentLoader.load(e,n)).catch(b=>this.handleFragLoadError(b)):m=Promise.all([this.fragmentLoader.load(e,p?n:void 0),o]).then(([b])=>(!p&&n&&n(b),b)).catch(b=>this.handleFragLoadError(b)),this.hls.trigger(v.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):m}doFragPartsLoad(e,t,r,n){return new Promise((i,s)=>{var o;const h=[],c=(o=r.details)==null?void 0:o.partList,p=m=>{this.fragmentLoader.loadPart(e,m,n).then(b=>{h[m.index]=b;const I=b.part;this.hls.trigger(v.FRAG_LOADED,b);const R=Pa(r.details,e.sn,m.index+1)||ia(c,e.sn,m.index+1);if(R)p(R);else return i({frag:e,part:I,partsLoaded:h})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===J.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===be.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(v.ERROR,t)}else this.hls.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==kt.PARSING){!this.fragCurrent&&this.state!==kt.STOPPED&&this.state!==kt.ERROR&&(this.state=kt.IDLE);return}const{frag:r,part:n,level:i}=t,s=self.performance.now();r.stats.parsing.end=s,n&&(n.stats.parsing.end=s);const o=this.getLevelDetails(),c=o&&r.sn>o.endSN||this.shouldLoadParts(o,r.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${r.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(r,n,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var r;const i=e.partList[0];if(i.fragment.type===ce.SUBTITLE)return!1;const s=i.end+(((r=e.fragmentHint)==null?void 0:r.duration)||0);if(t>=s){var n;if((this.hls.hasEnoughToStart?((n=this.media)==null?void 0:n.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:r}=this,{level:n,sn:i,part:s}=e;if(!(t!=null&&t[n]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${n}. The current chunk will not be buffered.`),null;const o=t[n],h=o.details,c=s>-1?Pa(h,i,s):null,p=c?c.fragment:na(h,i,r);return p?(r&&r!==p&&(p.stats=r.stats),{frag:p,part:c,level:o}):null}bufferFragmentData(e,t,r,n,i){if(this.state!==kt.PARSING)return;const{data1:s,data2:o}=e;let h=s;if(o&&(h=Pt(s,o)),!h.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,m={type:e.type,frag:t,part:r,chunkMeta:n,offset:p,parent:t.type,data:h};if(this.hls.trigger(v.BUFFER_APPENDING,m),e.dropped&&e.independent&&!r){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!kr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=kr.bufferInfo(t,r,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),o=Math.max(Math.min(e.start-s,n.end-s),r+s);e.start-o>s&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){var r;const n=this.getLoadPosition();if(!y(n))return null;const s=this.lastCurrentTime>n||(r=this.media)!=null&&r.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,n,t,s)}getFwdBufferInfoAtPos(e,t,r,n){const i=kr.bufferInfo(e,t,n);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,r);if(s&&(i.nextStart<=s.end||s.gap)){const o=Math.max(Math.min(i.nextStart,s.end)-t,n);return kr.bufferInfo(e,t,o)}}return i}getMaxBufferLength(e){const{config:t}=this;let r;return e?r=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):r=t.maxBufferLength,Math.min(r,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const r=this.config,n=Math.max(Math.min(e-t,r.maxBufferLength),t),i=Math.max(e-t*3,r.maxMaxBufferLength/2,n);return i>=n?(r.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=ce.MAIN){const r=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const r=t.fragments,n=r.length;if(!n)return null;const{config:i}=this,s=r[0].start,o=i.lowLatencyMode&&!!t.partList;let h=null;if(t.live){const m=i.initialLiveManifestSize;if(n<m)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${m})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var c;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),h=this.getInitialLiveFragment(t);const b=this.hls.startPosition,I=this.hls.liveSyncPosition,R=h?(b!==-1&&b>=s?b:I)||h.start:e;this.log(`Setting startPosition to ${R} to match start frag at live edge. mainStart: ${b} liveSyncPosition: ${I} frag.start: ${(c=h)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=R}}else e<=s&&(h=r[0]);if(!h){const m=this.loadingParts?t.partEnd:t.fragmentEnd;h=this.getFragmentAtPosition(e,m,t)}let p=this.filterReplacedPrimary(h,t);if(!p&&h){const m=h.sn-t.startSN;p=this.filterReplacedPrimary(r[m+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===Xt.OK||r===Xt.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,n,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&r.nextStart)){const o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n,0);if(o!==null&&r.len+o.len>=i){const h=s.sn;return this.loopSn!==h&&(this.log(`buffer full after gaps in "${n}" playlist starting at sn: ${h}`),this.loopSn=h),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(la(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(la(this.config)&&e.type!==ce.SUBTITLE){const r=this.hls.interstitialsManager,n=r==null?void 0:r.bufferingItem;if(n){const s=n.event;if(s){if(s.appendInPlace||Math.abs(e.start-n.start)>1||n.start===0)return null}else if(e.end<=n.start&&(t==null?void 0:t.live)===!1||e.start>n.end&&n.nextEvent&&(n.nextEvent.appendInPlace||e.start-n.end>1))return null}const i=r==null?void 0:r.playerQueue;if(i)for(let s=i.length;s--;){const o=i[s].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,r){let n=-1,i=!1,s=!0;for(let o=0,h=e.length;o<h;o++){const c=e[o];if(s=s&&!c.independent,n>-1&&r<c.start)break;const p=c.loaded;p?n=-1:(i||(c.independent||s)&&c.fragment===t)&&(c.fragment!==t&&this.warn(`Need buffer at ${r} but next unloaded part starts at ${c.start}`),n=o),i=p}return n}loadedEndOfParts(e,t){let r;for(let n=e.length;n--;){if(r=e[n],!r.loaded)return!1;if(t>r.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,r=this.fragPrevious;let n=null;if(r){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`),n=Jr(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){const i=r.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];r.cc===s.cc&&(n=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${n.sn}`))}n||(n=Rn(e,r.cc,r.end),n&&this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(n=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n}getFragmentAtPosition(e,t,r){const{config:n}=this;let{fragPrevious:i}=this,{fragments:s,endSN:o}=r;const{fragmentHint:h}=r,{maxFragLookUpTolerance:c}=n,p=r.partList,m=!!(this.loadingParts&&p!=null&&p.length&&h);m&&!this.bitrateTest&&p[p.length-1].fragment.sn===h.sn&&(s=s.concat(h),o=h.sn);let b;if(e<t){var I;const Y=e<this.lastCurrentTime||e>t-c||(I=this.media)!=null&&I.paused||!this.startFragRequested?0:c;b=an(i,s,e,Y)}else b=s[s.length-1];if(b){const R=b.sn-r.startSN,Y=this.fragmentTracker.getState(b);if((Y===Xt.OK||Y===Xt.PARTIAL&&b.gap)&&(i=b),i&&b.sn===i.sn&&(!m||p[0].fragment.sn>b.sn||!r.live)&&b.level===i.level){const ge=s[R+1];b.sn<o&&this.fragmentTracker.getState(ge)!==Xt.OK?b=ge:b=null}}return b}alignPlaylists(e,t,r){const n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,o=e.alignedSliding&&y(i);if(s||!o&&!i){Ba(r,e);const h=e.fragmentStart;return this.log(`Live playlist sliding: ${h.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${n}`),h}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let r=this.startPosition;r<t&&(r=-1);const n=this.timelineOffset;if(r===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&y(s)?(r=t+s,s<0&&(r+=e.edge),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Setting startPosition to ${r} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=r):e.live?(r=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${r}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=r=0),this.lastCurrentTime=r+n}this.nextLoadPosition=r+n}getLoadPosition(){var e;const{media:t}=this;let r=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?r=t.currentTime:this.nextLoadPosition>=0&&(r=this.nextLoadPosition),r}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&Be(e)&&e.stats.aborted&&(this.log(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==kt.FRAG_LOADING_WAITING_RETRY)&&(this.state=kt.IDLE)}onFragmentOrKeyLoadError(e,t){var r;if(t.chunkMeta&&!t.frag){const ge=this.getCurrentContext(t.chunkMeta);ge&&(t.frag=ge.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===J.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(n,!0);const o=t.errorAction;if(!o){this.state=kt.ERROR;return}const{action:h,flags:c,retryCount:p=0,retryConfig:m}=o,b=!!m,I=b&&h===ir.RetryRequest,R=b&&!o.resolved&&c===$r.MoveAllAlternatesMatchingHost,Y=(r=this.hls.latestLevelDetails)==null?void 0:r.live;if(!I&&R&&Be(n)&&!n.endList&&Y&&!ht(t))this.resetFragmentErrors(e),this.treatAsGap(n),o.resolved=!0;else if((I||R)&&p<m.maxNumRetry){var Z;const ge=Sn((Z=t.response)==null?void 0:Z.code),xe=on(m,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+xe,this.state=kt.FRAG_LOADING_WAITING_RETRY,o.resolved=!0,ge){this.log("Waiting for connection (offline)"),this.retryDate=1/0,t.reason="offline";return}this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${p+1}/${m.maxNumRetry} in ${xe}ms`)}else if(m)if(this.resetFragmentErrors(e),p<m.maxNumRetry)!s&&h!==ir.RemoveAlternatePermanently&&(o.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else h===ir.SendAlternateToPenaltyBox?this.state=kt.WAITING_LEVEL:this.state=kt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,r=t===1/0;(!t||e>=t||r&&!Sn(0))&&(r&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=kt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===kt.PARSING||this.state===kt.PARSED){const t=e.frag,r=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,r),i=n&&n.len>.5;i&&this.reduceMaxBufferLength(n.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${r} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===ce.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==kt.STOPPED&&(this.state=kt.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=kr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===kt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==kt.STOPPED&&(this.state=kt.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,r,n){const i=r.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((h,c)=>{const p=e.elementaryStreams[c];if(p){const m=p.endPTS-p.startPTS;if(m<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${m})`),h||!1;const b=n?0:ks(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(v.LEVEL_PTS_UPDATED,{details:i,level:r,drift:b,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return h},!1)){var o;const h=((o=this.transmuxer)==null?void 0:o.error)===null;if((r.fragmentError===0||h&&(r.fragmentError<2||e.endList))&&this.treatAsGap(e,r),h){const c=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(c.message),this.hls.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=kt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(v.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ce.MAIN?"level":"track"}fragInfo(e,t=!0,r){var n,i;return`${this.playlistLabel()} ${e.level} (${r?"part":"frag"}:[${((n=t&&!r?e.startPTS:(r||e).start)!=null?n:NaN).toFixed(3)}-${((i=t&&!r?e.endPTS:(r||e).end)!=null?i:NaN).toFixed(3)}]${r&&e.type==="main"?"INDEPENDENT="+(r.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function la(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class ua{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let r;if(e.length)e.length===1?r=e[0]:r=$a(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function $a(a,e){const t=new Uint8Array(e);let r=0;for(let n=0;n<a.length;n++){const i=a[n];t.set(i,r),r+=i.length}return t}var Hi={exports:{}},os;function To(){return os||(os=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(h,c,p){this.fn=h,this.context=c,this.once=p||!1}function i(h,c,p,m,b){if(typeof p!="function")throw new TypeError("The listener must be a function");var I=new n(p,m||h,b),R=t?t+c:c;return h._events[R]?h._events[R].fn?h._events[R]=[h._events[R],I]:h._events[R].push(I):(h._events[R]=I,h._eventsCount++),h}function s(h,c){--h._eventsCount===0?h._events=new r:delete h._events[c]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],p,m;if(this._eventsCount===0)return c;for(m in p=this._events)e.call(p,m)&&c.push(t?m.slice(1):m);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},o.prototype.listeners=function(c){var p=t?t+c:c,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var b=0,I=m.length,R=new Array(I);b<I;b++)R[b]=m[b].fn;return R},o.prototype.listenerCount=function(c){var p=t?t+c:c,m=this._events[p];return m?m.fn?1:m.length:0},o.prototype.emit=function(c,p,m,b,I,R){var Y=t?t+c:c;if(!this._events[Y])return!1;var Z=this._events[Y],ge=arguments.length,xe,Te;if(Z.fn){switch(Z.once&&this.removeListener(c,Z.fn,void 0,!0),ge){case 1:return Z.fn.call(Z.context),!0;case 2:return Z.fn.call(Z.context,p),!0;case 3:return Z.fn.call(Z.context,p,m),!0;case 4:return Z.fn.call(Z.context,p,m,b),!0;case 5:return Z.fn.call(Z.context,p,m,b,I),!0;case 6:return Z.fn.call(Z.context,p,m,b,I,R),!0}for(Te=1,xe=new Array(ge-1);Te<ge;Te++)xe[Te-1]=arguments[Te];Z.fn.apply(Z.context,xe)}else{var $e=Z.length,We;for(Te=0;Te<$e;Te++)switch(Z[Te].once&&this.removeListener(c,Z[Te].fn,void 0,!0),ge){case 1:Z[Te].fn.call(Z[Te].context);break;case 2:Z[Te].fn.call(Z[Te].context,p);break;case 3:Z[Te].fn.call(Z[Te].context,p,m);break;case 4:Z[Te].fn.call(Z[Te].context,p,m,b);break;default:if(!xe)for(We=1,xe=new Array(ge-1);We<ge;We++)xe[We-1]=arguments[We];Z[Te].fn.apply(Z[Te].context,xe)}}return!0},o.prototype.on=function(c,p,m){return i(this,c,p,m,!1)},o.prototype.once=function(c,p,m){return i(this,c,p,m,!0)},o.prototype.removeListener=function(c,p,m,b){var I=t?t+c:c;if(!this._events[I])return this;if(!p)return s(this,I),this;var R=this._events[I];if(R.fn)R.fn===p&&(!b||R.once)&&(!m||R.context===m)&&s(this,I);else{for(var Y=0,Z=[],ge=R.length;Y<ge;Y++)(R[Y].fn!==p||b&&!R[Y].once||m&&R[Y].context!==m)&&Z.push(R[Y]);Z.length?this._events[I]=Z.length===1?Z[0]:Z:s(this,I)}return this},o.prototype.removeAllListeners=function(c){var p;return c?(p=t?t+c:c,this._events[p]&&s(this,p)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,a.exports=o}(Hi)),Hi.exports}var Do=To(),Fs=ee(Do);const _s="1.6.15",es={};function Ua(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Co(){const a=es[_s];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),n={worker:new self.Worker(t),objectURL:t,clientCount:1};return es[_s]=n,n}function za(a){const e=es[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,n={worker:new self.Worker(t),scriptURL:t,clientCount:1};return es[a]=n,n}function Io(a){const e=es[a||_s];if(e&&e.clientCount--===1){const{worker:r,objectURL:n}=e;delete es[a||_s],n&&self.URL.revokeObjectURL(n),r.terminate()}}function ca(a,e){return e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function ys(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function ls(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function us(a,e){const t=e;let r=0;for(;ys(a,e);){r+=10;const n=ls(a,e+6);r+=n,ca(a,e+10)&&(r+=10),e+=r}if(r>0)return a.subarray(t,t+r)}function Ga(a,e,t,r){const n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const I=new Error(`invalid ADTS sampling index:${s}`);a.emit(v.ERROR,v.ERROR,{type:be.MEDIA_ERROR,details:J.FRAG_PARSING_ERROR,fatal:!0,error:I,reason:I.message});return}const o=(i>>6&3)+1,h=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+o,p=n[s];let m=s;(o===5||o===29)&&(m-=3);const b=[o<<3|(m&14)>>1,(m&1)<<7|h<<3];return pe.log(`manifest codec:${r}, parsed codec:${c}, channels:${h}, rate:${p} (ADTS object type:${o} sampling index:${s})`),{config:b,samplerate:p,channelCount:h,codec:c,parsedCodec:c,manifestCodec:r}}function ha(a,e){return a[e]===255&&(a[e+1]&246)===240}function ja(a,e){return a[e+1]&1?7:9}function Ms(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Ha(a,e){return e+5<a.length}function Bs(a,e){return e+1<a.length&&ha(a,e)}function bs(a,e){return Ha(a,e)&&ha(a,e)&&Ms(a,e)<=a.length-e}function da(a,e){if(Bs(a,e)){const t=ja(a,e);if(e+t>=a.length)return!1;const r=Ms(a,e);if(r<=t)return!1;const n=e+r;return n===a.length||Bs(a,n)}return!1}function fa(a,e,t,r,n){if(!a.samplerate){const i=Ga(e,t,r,n);if(!i)return;E(a,i)}}function Ka(a){return 1024*9e4/a}function Ro(a,e){const t=ja(a,e);if(e+t<=a.length){const r=Ms(a,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function Va(a,e,t,r,n){const i=Ka(a.samplerate),s=r+n*i,o=Ro(e,t);let h;if(o){const{frameLength:m,headerLength:b}=o,I=b+m,R=Math.max(0,t+I-e.length);R?(h=new Uint8Array(I-b),h.set(e.subarray(t+b,e.length),0)):h=e.subarray(t+b,t+I);const Y={unit:h,pts:s};return R||a.samples.push(Y),{sample:Y,length:I,missing:R}}const c=e.length-t;return h=new Uint8Array(c),h.set(e.subarray(t,e.length),0),{sample:{unit:h,pts:s},length:c,missing:-1}}function pa(a,e){return ys(a,e)&&ls(a,e+6)+10<=a.length-e}function Lo(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function ma(a,e=0,t=1/0){return Wa(a,e,t,Uint8Array)}function Wa(a,e,t,r){const n=ko(a);let i=1;"BYTES_PER_ELEMENT"in r&&(i=r.BYTES_PER_ELEMENT);const s=Za(a)?a.byteOffset:0,o=(s+a.byteLength)/i,h=(s+e)/i,c=Math.floor(Math.max(0,Math.min(h,o))),p=Math.floor(Math.min(c+Math.max(t,0),o));return new r(n,c,p-c)}function ko(a){return a instanceof ArrayBuffer?a:a.buffer}function Za(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function Po(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const r=a.data.subarray(1).indexOf(0);if(r===-1)return;const n=st(ma(a.data,1,r)),i=a.data[2+r],s=a.data.subarray(3+r).indexOf(0);if(s===-1)return;const o=st(ma(a.data,3+r,s));let h;return n==="-->"?h=st(ma(a.data,4+r+s)):h=Lo(a.data.subarray(4+r+s)),e.mimeType=n,e.pictureType=i,e.description=o,e.data=h,e}function we(a){if(a.size<2)return;const e=st(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function Ya(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const r=st(a.data.subarray(t),!0);t+=r.length+1;const n=st(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=st(a.data.subarray(1));return{key:a.type,info:"",data:e}}function ga(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const r=st(a.data.subarray(t),!0);t+=r.length+1;const n=st(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=st(a.data);return{key:a.type,info:"",data:e}}function va(a){return a.type==="PRIV"?we(a):a.type[0]==="W"?ga(a):a.type==="APIC"?Po(a):Ya(a)}function qa(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=ls(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}}const cs=10,Xa=10;function _a(a){let e=0;const t=[];for(;ys(a,e);){const r=ls(a,e+6);a[e+5]>>6&1&&(e+=cs),e+=cs;const n=e+r;for(;e+Xa<n;){const i=qa(a.subarray(e)),s=va(i);s&&t.push(s),e+=i.size+cs}ca(a,e)&&(e+=cs)}return t}function Qa(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function Ja(a){if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,t&&(r+=4772185884e-2),Math.round(r)}}function Ns(a){const e=_a(a);for(let t=0;t<e.length;t++){const r=e[t];if(Qa(r))return Ja(r)}}let Hn=function(a){return a.audioId3="org.id3",a.dateRange="com.apple.quicktime.HLS",a.emsg="https://aomedia.org/emsg/ID3",a.misbklv="urn:misb:KLV:bin:1910.1",a}({});function Si(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class Es{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,r,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,r){}demux(e,t){this.cachedData&&(e=Pt(this.cachedData,e),this.cachedData=null);let r=us(e,0),n=r?r.length:0,i;const s=this._audioTrack,o=this._id3Track,h=r?Ns(r):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&y(h))&&(this.basePTS=eo(h,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Hn.audioId3,duration:Number.POSITIVE_INFINITY});n<c;){if(this.canParse(e,n)){const p=this.appendFrame(s,e,n);p?(this.frameIndex++,this.lastPTS=p.sample.pts,n+=p.length,i=n):n=c}else pa(e,n)?(r=us(e,n),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Hn.audioId3,duration:Number.POSITIVE_INFINITY}),n+=r.length,i=n):n++;if(n===c&&i!==c){const p=e.slice(i);this.cachedData?this.cachedData=Pt(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Si(),id3Track:o,textTrack:Si()}}demuxSampleAes(e,t,r){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Si(),id3Track:this._id3Track,textTrack:Si()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const eo=(a,e,t)=>{if(y(a))return a*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};let $s=null;const Oo=[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],to=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],ya=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Fo=[0,1,1,4];function ro(a,e,t,r,n){if(t+24>e.length)return;const i=Mo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,o=r+n*s,h={unit:e.subarray(t,t+i.frameLength),pts:o,dts:o};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(h),{sample:h,length:i.frameLength,missing:0}}}function Mo(a,e){const t=a[e+1]>>3&3,r=a[e+1]>>1&3,n=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&n!==0&&n!==15&&i!==3){const s=a[e+2]>>1&1,o=a[e+3]>>6,h=t===3?3-r:r===3?3:4,c=Oo[h*14+n-1]*1e3,m=to[(t===3?0:t===2?1:2)*3+i],b=o===3?1:2,I=ya[t][r],R=Fo[r],Y=I*8*R,Z=Math.floor(I*c/m+s)*R;if($s===null){const Te=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);$s=Te?parseInt(Te[1]):0}return!!$s&&$s<=87&&r===2&&c>=224e3&&o===0&&(a[e+3]=a[e+3]|128),{sampleRate:m,channelCount:b,frameLength:Z,samplesPerFrame:Y}}}function M(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function u(a,e){return e+1<a.length&&M(a,e)}function d(a,e){return M(a,e)&&4<=a.length-e}function f(a,e){if(e+1<a.length&&M(a,e)){const r=Mo(a,e);let n=4;r!=null&&r.frameLength&&(n=r.frameLength);const i=e+n;return i===a.length||u(a,i)}return!1}class g extends Es{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const r=us(e,0);let n=(r==null?void 0:r.length)||0;if(f(e,n))return!1;for(let i=e.length;n<i;n++)if(da(e,n))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return bs(e,t)}appendFrame(e,t,r){fa(e,this.observer,t,r,e.manifestCodec);const n=Va(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const D=(a,e)=>{let t=0,r=5;e+=r;const n=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;r>0;){s[0]=a[e];const o=Math.min(r,8),h=8-o;i[0]=4278190080>>>24+h<<h,n[0]=(s[0]&i[0])>>h,t=t?t<<o|n[0]:n[0],e+=1,r-=o}return t};class F extends Es{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,r){const n=se(e,t,r,this.basePTS,this.frameIndex);if(n!==-1)return{sample:e.samples[e.samples.length-1],length:n,missing:0}}static probe(e){if(!e)return!1;const t=us(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&Ns(t)!==void 0&&D(e,r)<16}}function se(a,e,t,r,n){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const o=[48e3,44100,32e3][i],h=e[t+4]&63,p=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][h*3+i]*2;if(t+p>e.length)return-1;const m=e[t+6]>>5;let b=0;m===2?b+=2:(m&1&&m!==1&&(b+=2),m&4&&(b+=2));const I=(e[t+6]<<8|e[t+7])>>12-b&1,Y=[2,1,2,3,3,4,4,5][m]+I,Z=e[t+5]>>3,ge=e[t+5]&7,xe=new Uint8Array([i<<6|Z<<1|ge>>2,(ge&3)<<6|m<<3|I<<2|h>>4,h<<4&224]),Te=1536/o*9e4,$e=r+n*Te,We=e.subarray(t,t+p);return a.config=xe,a.channelCount=Y,a.samplerate=o,a.samples.push({unit:We,pts:$e}),p}class me extends Es{resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=us(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&Ns(t)!==void 0&&D(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(f(e,r))return pe.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return d(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return ro(e,t,r,this.basePTS,this.frameIndex)}}const Le=/\/emsg[-/]ID3/i;class je{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,r,n){const i=this.videoTrack=Si("video",1),s=this.audioTrack=Si("audio",1),o=this.txtTrack=Si("text",1);if(this.id3Track=Si("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const h=Ke(e);if(h.video){const{id:c,timescale:p,codec:m,supplemental:b}=h.video;i.id=c,i.timescale=o.timescale=p,i.codec=m,i.supplemental=b}if(h.audio){const{id:c,timescale:p,codec:m}=h.audio;s.id=c,s.timescale=p,s.codec=m}o.id=jt.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return Ce(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Pt(this.remainderData,e));const o=Nt(r);this.remainderData=o.remainder,n.samples=o.valid||new Uint8Array}else n.samples=r;const s=this.extractID3Track(n,t);return i.samples=Ct(t,n),{videoTrack:n,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const n=this.extractID3Track(t,this.timeOffset);return r.samples=Ct(e,t),{videoTrack:t,audioTrack:Si(),id3Track:n,textTrack:Si()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=_e(e.samples,["emsg"]);n&&n.forEach(i=>{const s=Lt(i);if(Le.test(s.schemeIdUri)){const o=rt(s,t);let h=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;h<=.001&&(h=Number.POSITIVE_INFINITY);const c=s.payload;r.samples.push({data:c,len:c.byteLength,dts:o,pts:o,type:Hn.emsg,duration:h})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const o=rt(s,t);r.samples.push({data:s.payload,len:s.payload.byteLength,dts:o,pts:o,type:Hn.misbklv,duration:Number.POSITIVE_INFINITY})}})}return r}demuxSampleAes(e,t,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function rt(a,e){return y(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class wt{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new bn(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,fn.cbc)}decryptAacSample(e,t,r){const n=e[t].unit;if(n.length<=16)return;const i=n.subarray(16,n.length-n.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(o=>{const h=new Uint8Array(o);n.set(h,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,r)}).catch(r)}decryptAacSamples(e,t,r){for(;;t++){if(t>=e.length){r();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,r),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,r=new Int8Array(t);let n=0;for(let i=32;i<e.length-16;i+=160,n+=16)r.set(e.subarray(i,i+16),n);return r}getAvcDecryptedUnit(e,t){const r=new Uint8Array(t);let n=0;for(let i=32;i<e.length-16;i+=160,n+=16)e.set(r.subarray(n,n+16),i);return e}decryptAvcSample(e,t,r,n,i){const s=ct(i.data),o=this.getAvcEncryptedData(s);this.decryptBuffer(o.buffer).then(h=>{i.data=this.getAvcDecryptedUnit(s,h),this.decrypter.isSync()||this.decryptAvcSamples(e,t,r+1,n)}).catch(n)}decryptAvcSamples(e,t,r,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length){n();return}const i=e[t].units;for(;!(r>=i.length);r++){const s=i[r];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,r,n,s),!this.decrypter.isSync()))return}}}}class Bt{constructor(){this.VideoSample=null}createVideoSample(e,t,r){return{key:e,frame:!1,pts:t,dts:r,units:[],length:0}}getLastNalUnit(e){var t;let r=this.VideoSample,n;if((!r||r.units.length===0)&&(r=e[e.length-1]),(t=r)!=null&&t.units){const i=r.units;n=i[i.length-1]}return n}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const r=t.samples,n=r.length;if(n){const i=r[n-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,r){const n=t.byteLength;let i=e.naluState||0;const s=i,o=[];let h=0,c,p,m,b=-1,I=0;for(i===-1&&(b=0,I=this.getNALuType(t,0),i=0,h=1);h<n;){if(c=t[h++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=h-i-1,b>=0){const R={data:t.subarray(b,p),type:I};o.push(R)}else{const R=this.getLastNalUnit(e.samples);R&&(s&&h<=4-s&&R.state&&(R.data=R.data.subarray(0,R.data.byteLength-s)),p>0&&(R.data=Pt(R.data,t.subarray(0,p)),R.state=0))}h<n?(m=this.getNALuType(t,h),b=h,I=m,i=0):i=-1}else i=0}if(b>=0&&i>=0){const R={data:t.subarray(b,n),type:I,state:i};o.push(R)}if(o.length===0){const R=this.getLastNalUnit(e.samples);R&&(R.data=Pt(R.data,t))}return e.naluState=i,o}}class Ut{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,r=e.byteLength-t,n=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");n.set(e.subarray(r,r+i)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const r=this.word>>>32-t;if(e>32&&pe.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?r<<t|this.readBits(t):r}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class Qt extends Bt{parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,o,h=!1;r.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),i.forEach(c=>{var p,m;switch(c.type){case 1:{let Y=!1;o=!0;const Z=c.data;if(h&&Z.length>4){const ge=this.readSliceType(Z);(ge===2||ge===4||ge===7||ge===9)&&(Y=!0)}if(Y){var b;(b=s)!=null&&b.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.frame=!0,s.key=Y;break}case 5:o=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 6:{o=!0,Et(c.data,1,r.pts,t.samples);break}case 7:{var I,R;o=!0,h=!0;const Y=c.data,Z=this.readSPS(Y);if(!e.sps||e.width!==Z.width||e.height!==Z.height||((I=e.pixelRatio)==null?void 0:I[0])!==Z.pixelRatio[0]||((R=e.pixelRatio)==null?void 0:R[1])!==Z.pixelRatio[1]){e.width=Z.width,e.height=Z.height,e.pixelRatio=Z.pixelRatio,e.sps=[Y];const ge=Y.subarray(1,4);let xe="avc1.";for(let Te=0;Te<3;Te++){let $e=ge[Te].toString(16);$e.length<2&&($e="0"+$e),xe+=$e}e.codec=xe}break}case 8:o=!0,e.pps=[c.data];break;case 9:o=!0,e.audFound=!0,(m=s)!=null&&m.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;case 12:o=!0;break;default:o=!1;break}s&&o&&s.units.push(c)}),n&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Ut(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let r=8,n=8,i;for(let s=0;s<e;s++)n!==0&&(i=t.readEG(),n=(r+i+256)%256),r=n===0?r:n}readSPS(e){const t=new Ut(e);let r=0,n=0,i=0,s=0,o,h,c;const p=t.readUByte.bind(t),m=t.readBits.bind(t),b=t.readUEG.bind(t),I=t.readBoolean.bind(t),R=t.skipBits.bind(t),Y=t.skipEG.bind(t),Z=t.skipUEG.bind(t),ge=this.skipScalingList.bind(this);p();const xe=p();if(m(5),R(3),p(),Z(),xe===100||xe===110||xe===122||xe===244||xe===44||xe===83||xe===86||xe===118||xe===128){const ft=b();if(ft===3&&R(1),Z(),Z(),R(1),I())for(h=ft!==3?8:12,c=0;c<h;c++)I()&&(c<6?ge(16,t):ge(64,t))}Z();const Te=b();if(Te===0)b();else if(Te===1)for(R(1),Y(),Y(),o=b(),c=0;c<o;c++)Y();Z(),R(1);const $e=b(),We=b(),xt=m(1);xt===0&&R(1),R(1),I()&&(r=b(),n=b(),i=b(),s=b());let Ye=[1,1];if(I()&&I())switch(p()){case 1:Ye=[1,1];break;case 2:Ye=[12,11];break;case 3:Ye=[10,11];break;case 4:Ye=[16,11];break;case 5:Ye=[40,33];break;case 6:Ye=[24,11];break;case 7:Ye=[20,11];break;case 8:Ye=[32,11];break;case 9:Ye=[80,33];break;case 10:Ye=[18,11];break;case 11:Ye=[15,11];break;case 12:Ye=[64,33];break;case 13:Ye=[160,99];break;case 14:Ye=[4,3];break;case 15:Ye=[3,2];break;case 16:Ye=[2,1];break;case 255:{Ye=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil(($e+1)*16-r*2-n*2),height:(2-xt)*(We+1)*16-(xt?2:4)*(i+s),pixelRatio:Ye}}}class yr extends Bt{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,o,h=!1;r.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),i.forEach(c=>{var p,m;switch(c.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.frame=!0,o=!0;break;case 16:case 17:case 18:case 21:if(o=!0,h){var b;(b=s)!=null&&b.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:o=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 39:o=!0,Et(c.data,2,r.pts,t.samples);break;case 32:o=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=E(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(o=!0,h=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],c.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const I=this.readSPS(c.data);e.width=I.width,e.height=I.height,e.pixelRatio=I.pixelRatio,e.codec=I.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const R in I.params)e.params[R]=I.params[R]}this.pushParameterSet(e.sps,c.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0;break;case 34:if(o=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const I=this.readPPS(c.data);for(const R in I)e.params[R]=I[R]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:o=!0,e.audFound=!0,(m=s)!=null&&m.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;default:o=!1;break}s&&o&&s.units.push(c)}),n&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,r){(r&&r[0]===this.initVPS||!r&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let r=0;for(let n=0;n<e.byteLength;n++)n>=2&&e[n]===3&&e[n-1]===0&&e[n-2]===0||(t[r]=e[n],r++);return new Uint8Array(t.buffer,0,r)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Ut(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const r=t.readBits(3),n=t.readBoolean();return{numTemporalLayers:r+1,temporalIdNested:n}}readSPS(e){const t=new Ut(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const r=t.readBits(3);t.readBoolean();const n=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),o=t.readUByte(),h=t.readUByte(),c=t.readUByte(),p=t.readUByte(),m=t.readUByte(),b=t.readUByte(),I=t.readUByte(),R=t.readUByte(),Y=t.readUByte(),Z=t.readUByte(),ge=t.readUByte(),xe=[],Te=[];for(let pn=0;pn<r;pn++)xe.push(t.readBoolean()),Te.push(t.readBoolean());if(r>0)for(let pn=r;pn<8;pn++)t.readBits(2);for(let pn=0;pn<r;pn++)xe[pn]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Te[pn]&&t.readUByte();t.readUEG();const $e=t.readUEG();$e==3&&t.skipBits(1);const We=t.readUEG(),xt=t.readUEG(),Ye=t.readBoolean();let ft=0,dt=0,et=0,Mt=0;Ye&&(ft+=t.readUEG(),dt+=t.readUEG(),et+=t.readUEG(),Mt+=t.readUEG());const rr=t.readUEG(),pr=t.readUEG(),Cr=t.readUEG(),mr=t.readBoolean();for(let pn=mr?0:r;pn<=r;pn++)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 Xn=0;Xn<4;Xn++)for(let Ci=0;Ci<(Xn===3?2:6);Ci++)if(!t.readBoolean())t.readUEG();else{const Mi=Math.min(64,1<<4+(Xn<<1));Xn>1&&t.readEG();for(let Ws=0;Ws<Mi;Ws++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const ar=t.readUEG();let wr=0;for(let pn=0;pn<ar;pn++){let Xn=!1;if(pn!==0&&(Xn=t.readBoolean()),Xn){pn===ar&&t.readUEG(),t.readBoolean(),t.readUEG();let Ci=0;for(let Ds=0;Ds<=wr;Ds++){const Mi=t.readBoolean();let Ws=!1;Mi||(Ws=t.readBoolean()),(Mi||Ws)&&Ci++}wr=Ci}else{const Ci=t.readUEG(),Ds=t.readUEG();wr=Ci+Ds;for(let Mi=0;Mi<Ci;Mi++)t.readUEG(),t.readBoolean();for(let Mi=0;Mi<Ds;Mi++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const pn=t.readUEG();for(let Xn=0;Xn<pn;Xn++){for(let Ci=0;Ci<Cr+4;Ci++)t.readBits(1);t.readBits(1)}}let er=0,tr=1,en=1,yn=!0,sn=1,cn=0;t.readBoolean(),t.readBoolean();let qn=!1;if(t.readBoolean()){if(t.readBoolean()){const Cs=t.readUByte(),mu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],bo=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Cs>0&&Cs<16?(tr=mu[Cs-1],en=bo[Cs-1]):Cs===255&&(tr=t.readBits(16),en=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(),qn=t.readBoolean(),qn&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(sn=t.readBits(32),cn=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const bo=t.readBoolean(),gu=t.readBoolean();let Sa=!1;(bo||gu)&&(Sa=t.readBoolean(),Sa&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Sa&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let vu=0;vu<=r;vu++){yn=t.readBoolean();const Hc=yn||t.readBoolean();let _u=!1;Hc?t.readEG():_u=t.readBoolean();const yu=_u?1:t.readUEG()+1;if(bo)for(let Aa=0;Aa<yu;Aa++)t.readUEG(),t.readUEG(),Sa&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(gu)for(let Aa=0;Aa<yu;Aa++)t.readUEG(),t.readUEG(),Sa&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),er=t.readUEG())}let Di=We,Yi=xt;if(Ye){let pn=1,Xn=1;$e===1?pn=Xn=2:$e==2&&(pn=2),Di=We-pn*dt-pn*ft,Yi=xt-Xn*Mt-Xn*et}const Ts=n?["A","B","C"][n]:"",jc=o<<24|h<<16|c<<8|p;let dl=0;for(let pn=0;pn<32;pn++)dl=(dl|(jc>>pn&1)<<31-pn)>>>0;let fl=dl.toString(16);return s===1&&fl==="2"&&(fl="6"),{codecString:`hvc1.${Ts}${s}.${fl}.${i?"H":"L"}${ge}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:n,general_profile_compatibility_flags:[o,h,c,p],general_constraint_indicator_flags:[m,b,I,R,Y,Z],general_level_idc:ge,bit_depth:rr+8,bit_depth_luma_minus8:rr,bit_depth_chroma_minus8:pr,min_spatial_segmentation_idc:er,chroma_format_idc:$e,frame_rate:{fixed:yn,fps:cn/sn}},width:Di,height:Yi,pixelRatio:[tr,en]}}readPPS(e){const t=new Ut(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const n=t.readBoolean(),i=t.readBoolean();let s=1;return i&&n?s=0:i?s=3:n&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const Er=188;class Mr{constructor(e,t,r,n){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=n,this.videoParser=null}static probe(e,t){const r=Mr.syncOffset(e);return r>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),r!==-1}static syncOffset(e){const t=e.length;let r=Math.min(Er*5,t-Er)+1,n=0;for(;n<r;){let i=!1,s=-1,o=0;for(let h=n;h<t;h+=Er)if(e[h]===71&&(t-h===Er||e[h+Er]===71)){if(o++,s===-1&&(s=h,s!==0&&(r=Math.min(s+Er*99,e.length-Er)+1)),i||(i=qr(e,h)===0),i&&o>1&&(s===0&&o>2||h+Er>r))return s}else{if(o)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:jt[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,r,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Mr.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=Mr.createTrack("audio",n),this._id3Track=Mr.createTrack("id3"),this._txtTrack=Mr.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=r}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:r}=this;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,r=!1,n=!1){r||(this.sampleAes=null);let i;const s=this._videoTrack,o=this._audioTrack,h=this._id3Track,c=this._txtTrack;let p=s.pid,m=s.pesData,b=o.pid,I=h.pid,R=o.pesData,Y=h.pesData,Z=null,ge=this.pmtParsed,xe=this._pmtId,Te=e.length;if(this.remainderData&&(e=Pt(this.remainderData,e),Te=e.length,this.remainderData=null),Te<Er&&!n)return this.remainderData=e,{audioTrack:o,videoTrack:s,id3Track:h,textTrack:c};const $e=Math.max(0,Mr.syncOffset(e));Te-=(Te-$e)%Er,Te<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,Te,e.buffer.byteLength-Te));let We=0;for(let Ye=$e;Ye<Te;Ye+=Er)if(e[Ye]===71){const ft=!!(e[Ye+1]&64),dt=qr(e,Ye),et=(e[Ye+3]&48)>>4;let Mt;if(et>1){if(Mt=Ye+5+e[Ye+4],Mt===Ye+Er)continue}else Mt=Ye+4;switch(dt){case p:ft&&(m&&(i=En(m,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),m={data:[],size:0}),m&&(m.data.push(e.subarray(Mt,Ye+Er)),m.size+=Ye+Er-Mt);break;case b:if(ft){if(R&&(i=En(R,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,i);break;case"mp3":this.parseMPEGPES(o,i);break;case"ac3":this.parseAC3PES(o,i);break}R={data:[],size:0}}R&&(R.data.push(e.subarray(Mt,Ye+Er)),R.size+=Ye+Er-Mt);break;case I:ft&&(Y&&(i=En(Y,this.logger))&&this.parseID3PES(h,i),Y={data:[],size:0}),Y&&(Y.data.push(e.subarray(Mt,Ye+Er)),Y.size+=Ye+Er-Mt);break;case 0:ft&&(Mt+=e[Mt]+1),xe=this._pmtId=An(e,Mt);break;case xe:{ft&&(Mt+=e[Mt]+1);const rr=_n(e,Mt,this.typeSupported,r,this.observer,this.logger);p=rr.videoPid,p>0&&(s.pid=p,s.segmentCodec=rr.segmentVideoCodec),b=rr.audioPid,b>0&&(o.pid=b,o.segmentCodec=rr.segmentAudioCodec),I=rr.id3Pid,I>0&&(h.pid=I),Z!==null&&!ge&&(this.logger.warn(`MPEG-TS PMT found at ${Ye} after unknown PID '${Z}'. Backtracking to sync byte @${$e} to parse all TS packets.`),Z=null,Ye=$e-188),ge=this.pmtParsed=!0;break}case 17:case 8191:break;default:Z=dt;break}}else We++;We>0&&Tn(this.observer,new Error(`Found ${We} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=m,o.pesData=R,h.pesData=Y;const xt={audioTrack:o,videoTrack:s,id3Track:h,textTrack:c};return n&&this.extractRemainingSamples(xt),xt}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:r,id3Track:n,textTrack:i}=e,s=r.pesData,o=t.pesData,h=n.pesData;let c;if(s&&(c=En(s,this.logger))?(this.readyVideoParser(r.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(r,i,c,!0),r.pesData=null)):r.pesData=s,o&&(c=En(o,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);break}t.pesData=null}else o!=null&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;h&&(c=En(h,this.logger))?(this.parseID3PES(n,c),n.pesData=null):n.pesData=h}demuxSampleAes(e,t,r){const n=this.demux(e,r,!0,!this.config.progressive),i=this.sampleAes=new wt(this.observer,this.config,t);return this.decrypt(n,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Qt:e==="hevc"&&(this.videoParser=new yr))}decrypt(e,t){return new Promise(r=>{const{audioTrack:n,videoTrack:i}=e;n.samples&&n.segmentCodec==="aac"?t.decryptAacSamples(n.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{r(e)}):r(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{r(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let r=0;const n=this.aacOverFlow;let i=t.data;if(n){this.aacOverFlow=null;const m=n.missing,b=n.sample.unit.byteLength;if(m===-1)i=Pt(n.sample.unit,i);else{const I=b-m;n.sample.unit.set(i.subarray(0,m),I),e.samples.push(n.sample),r=n.missing}}let s,o;for(s=r,o=i.length;s<o-1&&!Bs(i,s);s++);if(s!==r){let m;const b=s<o-1;if(b?m=`AAC PES did not start with ADTS header,offset:${s}`:m="No ADTS header found in AAC PES",Tn(this.observer,new Error(m),b,this.logger),!b)return}fa(e,this.observer,i,s,this.audioCodec);let h;if(t.pts!==void 0)h=t.pts;else if(n){const m=Ka(e.samplerate);h=n.sample.pts+m}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<o;)if(p=Va(e,i,s,h,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<o-1&&!Bs(i,s);s++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let i=0,s=0;const o=t.pts;if(o===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<n;)if(u(r,s)){const h=ro(e,r,s,o,i);if(h)s+=h.length,i++;else break}else s++}parseAC3PES(e,t){{const r=t.data,n=t.pts;if(n===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=r.length;let s=0,o=0,h;for(;o<i&&(h=se(e,r,o,n,s++))>0;)o+=h}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=E({},t,{type:this._videoTrack?Hn.emsg:Hn.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function qr(a,e){return((a[e+1]&31)<<8)+a[e+2]}function An(a,e){return(a[e+10]&31)<<8|a[e+11]}function _n(a,e,t,r,n,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(a[e+1]&15)<<8|a[e+2],h=e+3+o-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<h;){const p=qr(a,e),m=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!r){Dn("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=p);break;case 21:s.id3Pid===-1&&(s.id3Pid=p);break;case 219:if(!r){Dn("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=p);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="mp3");break;case 193:if(!r){Dn("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&m>0){let b=e+5,I=m;for(;I>2;){switch(a[b]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=p,s.segmentAudioCodec="ac3");break}const Y=a[b+1]+2;b+=Y,I-=Y}}break;case 194:case 135:return Tn(n,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=p,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=m+5}return s}function Tn(a,e,t,r){r.warn(`parsing error: ${e.message}`),a.emit(v.ERROR,v.ERROR,{type:be.MEDIA_ERROR,details:J.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Dn(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function En(a,e){let t=0,r,n,i,s,o;const h=a.data;if(!a||a.size===0)return null;for(;h[0].length<19&&h.length>1;)h[0]=Pt(h[0],h[1]),h.splice(1,1);if(r=h[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(n=(r[4]<<8)+r[5],n&&n>a.size-6)return null;const p=r[7];p&192&&(s=(r[9]&14)*536870912+(r[10]&255)*4194304+(r[11]&254)*16384+(r[12]&255)*128+(r[13]&254)/2,p&64?(o=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,s-o>60*9e4&&(e.warn(`${Math.round((s-o)/9e4)}s delta between PTS and DTS, align them`),s=o)):o=s),i=r[8];let m=i+9;if(a.size<=m)return null;a.size-=m;const b=new Uint8Array(a.size);for(let I=0,R=h.length;I<R;I++){r=h[I];let Y=r.byteLength;if(m)if(m>Y){m-=Y;continue}else r=r.subarray(m),Y-=m,m=0;b.set(r,t),t+=Y}return n&&(n-=i+3),{data:b,pts:s,dts:o,len:n}}return null}class Kn{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 In=Math.pow(2,32)-1;class Ve{static init(){Ve.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in Ve.types)Ve.types.hasOwnProperty(e)&&(Ve.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Ve.HDLR_TYPES={video:t,audio:r};const n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);Ve.STTS=Ve.STSC=Ve.STCO=i,Ve.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ve.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ve.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ve.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);Ve.FTYP=Ve.box(Ve.types.ftyp,s,h,s,o),Ve.DINF=Ve.box(Ve.types.dinf,Ve.box(Ve.types.dref,n))}static box(e,...t){let r=8,n=t.length;const i=n;for(;n--;)r+=t[n].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(e,4),n=0,r=8;n<i;n++)s.set(t[n],r),r+=t[n].byteLength;return s}static hdlr(e){return Ve.box(Ve.types.hdlr,Ve.HDLR_TYPES[e])}static mdat(e){return Ve.box(Ve.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(In+1)),n=Math.floor(t%(In+1));return Ve.box(Ve.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))}static mdia(e){return Ve.box(Ve.types.mdia,Ve.mdhd(e.timescale||0,e.duration||0),Ve.hdlr(e.type),Ve.minf(e))}static mfhd(e){return Ve.box(Ve.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?Ve.box(Ve.types.minf,Ve.box(Ve.types.smhd,Ve.SMHD),Ve.DINF,Ve.stbl(e)):Ve.box(Ve.types.minf,Ve.box(Ve.types.vmhd,Ve.VMHD),Ve.DINF,Ve.stbl(e))}static moof(e,t,r){return Ve.box(Ve.types.moof,Ve.mfhd(e),Ve.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=Ve.trak(e[t]);return Ve.box.apply(null,[Ve.types.moov,Ve.mvhd(e[0].timescale||0,e[0].duration||0)].concat(r).concat(Ve.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=Ve.trex(e[t]);return Ve.box.apply(null,[Ve.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(In+1)),n=Math.floor(t%(In+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Ve.box(Ve.types.mvhd,i)}static sdtp(e){const t=e.samples||[],r=new Uint8Array(4+t.length);let n,i;for(n=0;n<t.length;n++)i=t[n].flags,r[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return Ve.box(Ve.types.sdtp,r)}static stbl(e){return Ve.box(Ve.types.stbl,Ve.stsd(e),Ve.box(Ve.types.stts,Ve.STTS),Ve.box(Ve.types.stsc,Ve.STSC),Ve.box(Ve.types.stsz,Ve.STSZ),Ve.box(Ve.types.stco,Ve.STCO))}static avc1(e){let t=[],r=[],n,i,s;for(n=0;n<e.sps.length;n++)i=e.sps[n],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(n=0;n<e.pps.length;n++)i=e.pps[n],s=i.byteLength,r.push(s>>>8&255),r.push(s&255),r=r.concat(Array.prototype.slice.call(i));const o=Ve.box(Ve.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),h=e.width,c=e.height,p=e.pixelRatio[0],m=e.pixelRatio[1];return Ve.box(Ve.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,h>>8&255,h&255,c>>8&255,c&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,Ve.box(Ve.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ve.box(Ve.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,m>>24,m>>16&255,m>>8&255,m&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return Ve.box(Ve.types.mp4a,Ve.audioStsd(e),Ve.box(Ve.types.esds,Ve.esds(e)))}static mp3(e){return Ve.box(Ve.types[".mp3"],Ve.audioStsd(e))}static ac3(e){return Ve.box(Ve.types["ac-3"],Ve.audioStsd(e),Ve.box(Ve.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return Ve.box(Ve.types.stsd,Ve.STSD,Ve.mp4a(e));if(t==="ac3"&&e.config)return Ve.box(Ve.types.stsd,Ve.STSD,Ve.ac3(e));if(t==="mp3"&&e.codec==="mp3")return Ve.box(Ve.types.stsd,Ve.STSD,Ve.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return Ve.box(Ve.types.stsd,Ve.STSD,Ve.avc1(e));if(t==="hevc"&&e.vps)return Ve.box(Ve.types.stsd,Ve.STSD,Ve.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,r=(e.duration||0)*(e.timescale||0),n=e.width||0,i=e.height||0,s=Math.floor(r/(In+1)),o=Math.floor(r%(In+1));return Ve.box(Ve.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&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,n>>8&255,n&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const r=Ve.sdtp(e),n=e.id,i=Math.floor(t/(In+1)),s=Math.floor(t%(In+1));return Ve.box(Ve.types.traf,Ve.box(Ve.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),Ve.box(Ve.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255])),Ve.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,Ve.box(Ve.types.trak,Ve.tkhd(e),Ve.mdia(e))}static trex(e){const t=e.id;return Ve.box(Ve.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const r=e.samples||[],n=r.length,i=12+16*n,s=new Uint8Array(i);let o,h,c,p,m,b;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),o=0;o<n;o++)h=r[o],c=h.duration,p=h.size,m=h.flags,b=h.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255,m.isLeading<<2|m.dependsOn,m.isDependedOn<<6|m.hasRedundancy<<4|m.paddingValue<<1|m.isNonSync,m.degradPrio&61440,m.degradPrio&15,b>>>24&255,b>>>16&255,b>>>8&255,b&255],12+16*o);return Ve.box(Ve.types.trun,s)}static initSegment(e){Ve.types||Ve.init();const t=Ve.moov(e);return Pt(Ve.FTYP,t)}static hvc1(e){const t=e.params,r=[e.vps,e.sps,e.pps],n=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),n-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),r.length]);let s=i.length;for(let R=0;R<r.length;R+=1){s+=3;for(let Y=0;Y<r[R].length;Y+=1)s+=2+r[R][Y].length}const o=new Uint8Array(s);o.set(i,0),s=i.length;const h=r.length-1;for(let R=0;R<r.length;R+=1){o.set(new Uint8Array([32+R|(R===h?128:0),0,r[R].length]),s),s+=3;for(let Y=0;Y<r[R].length;Y+=1)o.set(new Uint8Array([r[R][Y].length>>8,r[R][Y].length&255]),s),s+=2,o.set(r[R][Y],s),s+=r[R][Y].length}const c=Ve.box(Ve.types.hvcC,o),p=e.width,m=e.height,b=e.pixelRatio[0],I=e.pixelRatio[1];return Ve.box(Ve.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,p>>8&255,p&255,m>>8&255,m&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,Ve.box(Ve.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Ve.box(Ve.types.pasp,new Uint8Array([b>>24,b>>16&255,b>>8&255,b&255,I>>24,I>>16&255,I>>8&255,I&255])))}}Ve.types=void 0,Ve.HDLR_TYPES=void 0,Ve.STTS=void 0,Ve.STSC=void 0,Ve.STCO=void 0,Ve.STSZ=void 0,Ve.VMHD=void 0,Ve.SMHD=void 0,Ve.STSD=void 0,Ve.FTYP=void 0,Ve.DINF=void 0;const ri=9e4;function Ai(a,e,t=1,r=!1){const n=a*e*t;return r?Math.round(n):n}function pi(a,e,t=1,r=!1){return Ai(a,e,1/t,r)}function On(a,e=!1){return Ai(a,1e3,1/ri,e)}function Ki(a,e=1){return Ai(a,ri,1/e)}function Ti(a){const{baseTime:e,timescale:t,trackId:r}=a;return`${e/t} (${e}/${t}) trackId: ${r}`}const no=10*1e3,Bo=1024,hs=1152,ds=1536;let mi=null,fs=null;function xs(a,e,t,r){return{duration:e,size:t,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class Us extends H{constructor(e,t,r,n){if(super("mp4-remuxer",n),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.ISGenerated=!1,mi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);mi=s?parseInt(s[1]):0}if(fs===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);fs=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){const t=this._initPTS;(!t||!e||e.trackId!==t.trackId||e.baseTime!==t.baseTime||e.timescale!==t.timescale)&&this.log(`Reset initPTS: ${t&&Ti(t)} > ${e&&Ti(e)}`),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.log("reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.log("ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,n=e.reduce((i,s)=>{let o=s.pts,h=o-i;return h<-4294967296&&(t=!0,o=ni(o,r),h=o-i),h>0?i:o},r);return t&&this.debug("PTS rollover detected"),n}remux(e,t,r,n,i,s,o,h){let c,p,m,b,I,R,Y=i,Z=i;const ge=e.pid>-1,xe=t.pid>-1,Te=t.samples.length,$e=e.samples.length>0,We=o&&Te>0||Te>1;if((!ge||$e)&&(!xe||We)||this.ISGenerated||o){if(this.ISGenerated){var Ye,ft,dt,et;const Cr=this.videoTrackConfig;(Cr&&(t.width!==Cr.width||t.height!==Cr.height||((Ye=t.pixelRatio)==null?void 0:Ye[0])!==((ft=Cr.pixelRatio)==null?void 0:ft[0])||((dt=t.pixelRatio)==null?void 0:dt[1])!==((et=Cr.pixelRatio)==null?void 0:et[1]))||!Cr&&We||this.nextAudioTs===null&&$e)&&this.resetInitSegment()}this.ISGenerated||(m=this.generateIS(e,t,i,s));const Mt=this.isVideoContiguous;let rr=-1,pr;if(We&&(rr=No(t.samples),!Mt&&this.config.forceKeyFrameOnDiscontinuity))if(R=!0,rr>0){this.warn(`Dropped ${rr} out of ${Te} video samples due to a missing keyframe`);const Cr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(rr),t.dropped+=rr,Z+=(t.samples[0].pts-Cr)/t.inputTimeScale,pr=Z}else rr===-1&&(this.warn(`No keyframe found out of ${Te} video samples`),R=!1);if(this.ISGenerated){if($e&&We){const Cr=this.getVideoStartPts(t.samples),Yt=(ni(e.samples[0].pts,Cr)-Cr)/t.inputTimeScale;Y+=Math.max(0,Yt),Z+=Math.max(0,-Yt)}if($e){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),m=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,Y,this.isAudioContiguous,s,xe||We||h===ce.AUDIO?Z:void 0),We){const Cr=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),m=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,Z,Mt,Cr)}}else We&&(c=this.remuxVideo(t,Z,Mt,0));c&&(c.firstKeyFrame=rr,c.independent=rr!==-1,c.firstKeyFramePTS=pr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(I=zs(r,i,this._initPTS,this._initDTS)),n.samples.length&&(b=ba(n,i,this._initPTS))),{audio:p,video:c,initSegment:m,independent:R,text:b,id3:I}}computeInitPts(e,t,r,n){const i=Math.round(r*t);let s=ni(e,i);if(s<i+t)for(this.log(`Adjusting PTS for rollover in timeline near ${(i-s)/t} ${n}`);s<i+t;)s+=8589934592;return s-i}generateIS(e,t,r,n){const i=e.samples,s=t.samples,o=this.typeSupported,h={},c=this._initPTS;let p=!c||n,m="audio/mp4",b,I,R,Y=-1;if(p&&(b=I=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(m="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}h.audio={id:"audio",container:m,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):Ve.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(Y=e.id,R=e.inputTimeScale,!c||R!==c.timescale?b=I=this.computeInitPts(i[0].pts,R,r,"audio"):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Ve.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(Y=t.id,R=t.inputTimeScale,!c||R!==c.timescale){const Z=this.getVideoStartPts(s),ge=ni(s[0].dts,Z),xe=this.computeInitPts(ge,R,r,"video"),Te=this.computeInitPts(Z,R,r,"video");I=Math.min(I,xe),b=Math.min(b,Te)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(h).length)return this.ISGenerated=!0,p?(c&&this.warn(`Timestamps at playlist time: ${n?"":"~"}${r} ${b/R} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${r} offset: ${b/R} (${b}/${R}) trackId: ${Y}`),this._initPTS={baseTime:b,timescale:R,trackId:Y},this._initDTS={baseTime:I,timescale:R,trackId:Y}):b=R=void 0,{tracks:h,initPTS:b,timescale:R,trackId:Y}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,o=[],h=s.length,c=this._initPTS,p=c.baseTime*i/c.timescale;let m=this.nextVideoTs,b=8,I=this.videoSampleDuration,R,Y,Z=Number.POSITIVE_INFINITY,ge=Number.NEGATIVE_INFINITY,xe=!1;if(!r||m===null){const er=p+t*i,tr=s[0].pts-ni(s[0].dts,s[0].pts);mi&&m!==null&&Math.abs(er-tr-(m+p))<15e3?r=!0:m=er-tr-p}const Te=m+p;for(let er=0;er<h;er++){const tr=s[er];tr.pts=ni(tr.pts,Te),tr.dts=ni(tr.dts,Te),tr.dts<s[er>0?er-1:er].dts&&(xe=!0)}xe&&s.sort(function(er,tr){const en=er.dts-tr.dts,yn=er.pts-tr.pts;return en||yn}),R=s[0].dts,Y=s[s.length-1].dts;const $e=Y-R,We=$e?Math.round($e/(h-1)):I||e.inputTimeScale/30;if(r){const er=R-Te,tr=er>We,en=er<-1;if((tr||en)&&(tr?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${On(er,!0)} ms (${er}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${On(-er,!0)} ms (${er}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!en||Te>=s[0].pts||mi)){R=Te;const yn=s[0].pts-er;if(tr)s[0].dts=R,s[0].pts=yn;else{let sn=!0;for(let cn=0;cn<s.length&&!(s[cn].dts>yn&&sn);cn++){const qn=s[cn].pts;if(s[cn].dts-=er,s[cn].pts-=er,cn<s.length-1){const Wn=s[cn+1].pts,Di=s[cn].pts,Yi=Wn<=Di,Ts=Wn<=qn;sn=Yi==Ts}}}this.log(`Video: Initial PTS/DTS adjusted: ${On(yn,!0)}/${On(R,!0)}, delta: ${On(er,!0)} ms`)}}R=Math.max(0,R);let xt=0,Ye=0,ft=R;for(let er=0;er<h;er++){const tr=s[er],en=tr.units,yn=en.length;let sn=0;for(let cn=0;cn<yn;cn++)sn+=en[cn].data.length;Ye+=sn,xt+=yn,tr.length=sn,tr.dts<ft?(tr.dts=ft,ft+=We/4|0||1):ft=tr.dts,Z=Math.min(tr.pts,Z),ge=Math.max(tr.pts,ge)}Y=s[h-1].dts;const dt=Ye+4*xt+8;let et;try{et=new Uint8Array(dt)}catch(er){this.observer.emit(v.ERROR,v.ERROR,{type:be.MUX_ERROR,details:J.REMUX_ALLOC_ERROR,fatal:!1,error:er,bytes:dt,reason:`fail allocating video mdat ${dt}`});return}const Mt=new DataView(et.buffer);Mt.setUint32(0,dt),et.set(Ve.types.mdat,4);let rr=!1,pr=Number.POSITIVE_INFINITY,Cr=Number.POSITIVE_INFINITY,mr=Number.NEGATIVE_INFINITY,Yt=Number.NEGATIVE_INFINITY;for(let er=0;er<h;er++){const tr=s[er],en=tr.units;let yn=0;for(let qn=0,Wn=en.length;qn<Wn;qn++){const Di=en[qn],Yi=Di.data,Ts=Di.data.byteLength;Mt.setUint32(b,Ts),b+=4,et.set(Yi,b),b+=Ts,yn+=4+Ts}let sn;if(er<h-1)I=s[er+1].dts-tr.dts,sn=s[er+1].pts-tr.pts;else{const qn=this.config,Wn=er>0?tr.dts-s[er-1].dts:We;if(sn=er>0?tr.pts-s[er-1].pts:We,qn.stretchShortVideoTrack&&this.nextAudioTs!==null){const Di=Math.floor(qn.maxBufferHole*i),Yi=(n?Z+n*i:this.nextAudioTs+p)-tr.pts;Yi>Di?(I=Yi-Wn,I<0?I=Wn:rr=!0,this.log(`It is approximately ${Yi/90} ms to the next segment; using duration ${I/90} ms for the last video frame.`)):I=Wn}else I=Wn}const cn=Math.round(tr.pts-tr.dts);pr=Math.min(pr,I),mr=Math.max(mr,I),Cr=Math.min(Cr,sn),Yt=Math.max(Yt,sn),o.push(xs(tr.key,I,yn,cn))}if(o.length){if(mi){if(mi<70){const er=o[0].flags;er.dependsOn=2,er.isNonSync=0}}else if(fs&&Yt-Cr<mr-pr&&We/mr<.025&&o[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let er=R;for(let tr=0,en=o.length;tr<en;tr++){const yn=er+o[tr].duration,sn=er+o[tr].cts;if(tr<en-1){const cn=yn+o[tr+1].cts;o[tr].duration=cn-sn}else o[tr].duration=tr?o[tr-1].duration:We;o[tr].cts=0,er=yn}}}I=rr||!I?We:I;const br=Y+I;this.nextVideoTs=m=br-p,this.videoSampleDuration=I,this.isVideoContiguous=!0;const Ur={data1:Ve.moof(e.sequenceNumber++,R,E(e,{samples:o})),data2:et,startPTS:(Z-p)/i,endPTS:(ge+I-p)/i,startDTS:(R-p)/i,endDTS:m/i,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Ur}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return hs;case"ac3":return ds;default:return Bo}}remuxAudio(e,t,r,n,i){const s=e.inputTimeScale,o=e.samplerate?e.samplerate:s,h=s/o,c=this.getSamplesPerFrame(e),p=c*h,m=this._initPTS,b=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,I=[],R=i!==void 0;let Y=e.samples,Z=b?0:8,ge=this.nextAudioTs||-1;const xe=m.baseTime*s/m.timescale,Te=xe+t*s;if(this.isAudioContiguous=r=r||Y.length&&ge>0&&(n&&Math.abs(Te-(ge+xe))<9e3||Math.abs(ni(Y[0].pts,Te)-(ge+xe))<20*p),Y.forEach(function(Yt){Yt.pts=ni(Yt.pts,Te)}),!r||ge<0){const Yt=Y.length;if(Y=Y.filter(br=>br.pts>=0),Yt!==Y.length&&this.warn(`Removed ${Y.length-Yt} of ${Yt} samples (initPTS ${xe} / ${s})`),!Y.length)return;i===0?ge=0:n&&!R?ge=Math.max(0,Te-xe):ge=Y[0].pts-xe}if(e.segmentCodec==="aac"){const Yt=this.config.maxAudioFramesDrift;for(let br=0,ar=ge+xe;br<Y.length;br++){const wr=Y[br],Ur=wr.pts,er=Ur-ar,tr=Math.abs(1e3*er/s);if(er<=-Yt*p&&R)br===0&&(this.warn(`Audio frame @ ${(Ur/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*er/s)} ms.`),this.nextAudioTs=ge=Ur-xe,ar=Ur);else if(er>=Yt*p&&tr<no&&R){let en=Math.round(er/p);for(ar=Ur-en*p;ar<0&&en&&p;)en--,ar+=p;br===0&&(this.nextAudioTs=ge=ar-xe),this.warn(`Injecting ${en} audio frames @ ${((ar-xe)/s).toFixed(3)}s due to ${Math.round(1e3*er/s)} ms gap.`);for(let yn=0;yn<en;yn++){let sn=Kn.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);sn||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),sn=wr.unit.subarray()),Y.splice(br,0,{unit:sn,pts:ar}),ar+=p,br++}}wr.pts=ar,ar+=p}}let $e=null,We=null,xt,Ye=0,ft=Y.length;for(;ft--;)Ye+=Y[ft].unit.byteLength;for(let Yt=0,br=Y.length;Yt<br;Yt++){const ar=Y[Yt],wr=ar.unit;let Ur=ar.pts;if(We!==null){const tr=I[Yt-1];tr.duration=Math.round((Ur-We)/h)}else if(r&&e.segmentCodec==="aac"&&(Ur=ge+xe),$e=Ur,Ye>0){Ye+=Z;try{xt=new Uint8Array(Ye)}catch(tr){this.observer.emit(v.ERROR,v.ERROR,{type:be.MUX_ERROR,details:J.REMUX_ALLOC_ERROR,fatal:!1,error:tr,bytes:Ye,reason:`fail allocating audio mdat ${Ye}`});return}b||(new DataView(xt.buffer).setUint32(0,Ye),xt.set(Ve.types.mdat,4))}else return;xt.set(wr,Z);const er=wr.byteLength;Z+=er,I.push(xs(!0,c,er,0)),We=Ur}const dt=I.length;if(!dt)return;const et=I[I.length-1];ge=We-xe,this.nextAudioTs=ge+h*et.duration;const Mt=b?new Uint8Array(0):Ve.moof(e.sequenceNumber++,$e/h,E({},e,{samples:I}));e.samples=[];const rr=($e-xe)/s,pr=this.nextAudioTs/s,mr={data1:Mt,data2:xt,startPTS:rr,endPTS:pr,startDTS:rr,endDTS:pr,type:"audio",hasAudio:!0,hasVideo:!1,nb:dt};return this.isAudioContiguous=!0,mr}}function ni(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function No(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function zs(a,e,t,r){const n=a.samples.length;if(!n)return;const i=a.inputTimeScale;for(let o=0;o<n;o++){const h=a.samples[o];h.pts=ni(h.pts-t.baseTime*i/t.timescale,e*i)/i,h.dts=ni(h.dts-r.baseTime*i/r.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function ba(a,e,t){const r=a.samples.length;if(!r)return;const n=a.inputTimeScale;for(let s=0;s<r;s++){const o=a.samples[s];o.pts=ni(o.pts-t.baseTime*n/t.timescale,e*n)/n}a.samples.sort((s,o)=>s.pts-o.pts);const i=a.samples;return a.samples=[],{samples:i}}class io extends H{constructor(e,t,r,n){super("passthrough-remuxer",n),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,r,n){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(e,n),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:r,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=Ke(e);if(t)gt(e,t);else{const h=i||s;h!=null&&h.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${h.codec}")!`)}i&&(r=pl(i,K.AUDIO,this)),s&&(n=pl(s,K.VIDEO,this));const o={};i&&s?o.audiovideo={container:"video/mp4",codec:r+","+n,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?o.audio={container:"audio/mp4",codec:r,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?o.video={container:"video/mp4",codec:n,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=o}remux(e,t,r,n,i,s){var o,h;let{initPTS:c,lastEndTime:p}=this;const m={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};y(p)||(p=this.lastEndTime=i||0);const b=t.samples;if(!b.length)return m;const I={initPTS:void 0,timescale:void 0,trackId:void 0};let R=this.initData;if((o=R)!=null&&o.length||(this.generateInitSegment(b),R=this.initData),!((h=R)!=null&&h.length))return this.warn("Failed to generate initSegment."),m;this.emitInitSegment&&(I.tracks=this.initTracks,this.emitInitSegment=!1);const Y=St(b,R,this),Z=R.audio?Y[R.audio.id]:null,ge=R.video?Y[R.video.id]:null,xe=ws(ge,1/0),Te=ws(Z,1/0),$e=ws(ge,0,!0),We=ws(Z,0,!0);let xt=i,Ye=0;const ft=Z&&(!ge||!c&&Te<xe||c&&c.trackId===R.audio.id),dt=ft?Z:ge;if(dt){const ar=dt.timescale,wr=dt.start-i*ar,Ur=ft?R.audio.id:R.video.id;xt=dt.start/ar,Ye=ft?We-Te:$e-xe,(s||!c)&&(Gs(c,xt,i,Ye)||ar!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${wr/ar} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${xt-i} (${wr}/${ar}) trackId: ${Ur}`),c=null,I.initPTS=wr,I.timescale=ar,I.trackId=Ur)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(I.initPTS=c.baseTime,I.timescale=c.timescale,I.trackId=c.trackId):((!I.timescale||I.trackId===void 0||I.initPTS===void 0)&&(this.warn("Could not set initPTS"),I.initPTS=xt,I.timescale=1,I.trackId=-1),this.initPTS=c={baseTime:I.initPTS,timescale:I.timescale,trackId:I.trackId});const et=xt-c.baseTime/c.timescale,Mt=et+Ye;Ye>0?this.lastEndTime=Mt:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const rr=!!R.audio,pr=!!R.video;let Cr="";rr&&(Cr+="audio"),pr&&(Cr+="video");const mr=(R.audio?R.audio.encrypted:!1)||(R.video?R.video.encrypted:!1),Yt={data1:b,startPTS:et,startDTS:et,endPTS:Mt,endDTS:Mt,type:Cr,hasAudio:rr,hasVideo:pr,nb:1,dropped:0,encrypted:mr};m.audio=rr&&!pr?Yt:void 0,m.video=pr?Yt:void 0;const br=ge==null?void 0:ge.sampleCount;if(br){const ar=ge.keyFrameIndex,wr=ar!==-1;Yt.nb=br,Yt.dropped=ar===0||this.isVideoContiguous?0:wr?ar:br,Yt.independent=wr,Yt.firstKeyFrame=ar,wr&&ge.keyFrameStart&&(Yt.firstKeyFramePTS=(ge.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(m.independent=wr),this.isVideoContiguous||(this.isVideoContiguous=wr),Yt.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${ar}/${br} dropped: ${Yt.dropped} start: ${Yt.firstKeyFramePTS||"NA"}`)}return m.initSegment=I,m.id3=zs(r,i,c,c),n.samples.length&&(m.text=ba(n,i,c)),m}}function ws(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function Gs(a,e,t,r){if(a===null)return!0;const n=Math.max(r,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>n}function pl(a,e,t){const r=a.codec;return r&&r.length>4?r:e===K.AUDIO?r==="ec-3"||r==="ac-3"||r==="alac"?r:r==="fLaC"||r==="Opus"?le(r,!1):(t.warn(`Unhandled audio codec "${r}" in mp4 MAP`),r||"mp4a"):(t.warn(`Unhandled video codec "${r}" in mp4 MAP`),r||"avc1")}let ts;try{ts=self.performance.now.bind(self.performance)}catch(a){ts=Date.now}const so=[{demux:je,remux:io},{demux:Mr,remux:Us},{demux:g,remux:Us},{demux:me,remux:Us}];so.splice(2,0,{demux:F,remux:Us});class ml{constructor(e,t,r,n,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=r,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,n){const i=r.transmuxing;i.executeStart=ts();let s=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:h}=this;n&&(this.currentTransmuxState=n);const{contiguous:c,discontinuity:p,trackSwitch:m,accurateTimeOffset:b,timeOffset:I,initSegmentChange:R}=n||o,{audioCodec:Y,videoCodec:Z,defaultInitPts:ge,duration:xe,initSegmentData:Te}=h,$e=wu(s,t);if($e&&li($e.method)){const ft=this.getDecrypter(),dt=zi($e.method);if(ft.isSync()){let et=ft.softwareDecrypt(s,$e.key.buffer,$e.iv.buffer,dt);if(r.part>-1){const rr=ft.flush();et=rr&&rr.buffer}if(!et)return i.executeEnd=ts(),$o(r);s=new Uint8Array(et)}else return this.asyncResult=!0,this.decryptionPromise=ft.webCryptoDecrypt(s,$e.key.buffer,$e.iv.buffer,dt).then(et=>{const Mt=this.push(et,null,r);return this.decryptionPromise=null,Mt}),this.decryptionPromise}const We=this.needsProbing(p,m);if(We){const ft=this.configureTransmuxer(s);if(ft)return this.logger.warn(`[transmuxer] ${ft.message}`),this.observer.emit(v.ERROR,v.ERROR,{type:be.MEDIA_ERROR,details:J.FRAG_PARSING_ERROR,fatal:!1,error:ft,reason:ft.message}),i.executeEnd=ts(),$o(r)}(p||m||R||We)&&this.resetInitSegment(Te,Y,Z,xe,t),(p||R||We)&&this.resetInitialTimestamp(ge),c||this.resetContiguity();const xt=this.transmux(s,$e,I,b,r);this.asyncResult=Ea(xt);const Ye=this.currentTransmuxState;return Ye.contiguous=!0,Ye.discontinuity=!1,Ye.trackSwitch=!1,i.executeEnd=ts(),xt}flush(e){const t=e.transmuxing;t.executeStart=ts();const{decrypter:r,currentTransmuxState:n,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:o}=n;if(r){const m=r.flush();m&&s.push(this.push(m.buffer,null,e))}const{demuxer:h,remuxer:c}=this;if(!h||!c){t.executeEnd=ts();const m=[$o(e)];return this.asyncResult?Promise.resolve(m):m}const p=h.flush(o);return Ea(p)?(this.asyncResult=!0,p.then(m=>(this.flushRemux(s,m,e),s))):(this.flushRemux(s,p,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:i,id3Track:s,textTrack:o}=t,{accurateTimeOffset:h,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${r.sn}${r.part>-1?" part: "+r.part:""} of ${this.id===ce.MAIN?"level":"track"} ${r.level}`);const p=this.remuxer.remux(n,i,s,o,c,h,!0,this.id);e.push({remuxResult:p,chunkMeta:r}),r.transmuxing.executeEnd=ts()}resetInitialTimestamp(e){const{demuxer:t,remuxer:r}=this;!t||!r||(t.resetTimeStamp(e),r.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,r,n,i){const{demuxer:s,remuxer:o}=this;!s||!o||(s.resetInitSegment(e,t,r,n),o.resetInitSegment(e,t,r,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,r,n,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,r,n,i):s=this.transmuxUnencrypted(e,r,n,i),s}transmuxUnencrypted(e,t,r,n){const{audioTrack:i,videoTrack:s,id3Track:o,textTrack:h}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,o,h,t,r,!1,this.id),chunkMeta:n}}transmuxSampleAes(e,t,r,n,i){return this.demuxer.demuxSampleAes(e,t,r).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,r,n,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:r,typeSupported:n}=this;let i;for(let m=0,b=so.length;m<b;m++){var s;if((s=so[m].demux)!=null&&s.probe(e,this.logger)){i=so[m];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,h=this.remuxer,c=i.remux,p=i.demux;(!h||!(h instanceof c))&&(this.remuxer=new c(r,t,n,this.logger)),(!o||!(o instanceof p))&&(this.demuxer=new p(r,t,n,this.logger),this.probe=p.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new bn(this.config)),e}}function wu(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const $o=a=>({remuxResult:{},chunkMeta:a});function Ea(a){return"then"in a&&a.then instanceof Function}class Su{constructor(e,t,r,n,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=r,this.duration=n,this.defaultInitPts=i||null}}class Au{constructor(e,t,r,n,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=r,this.trackSwitch=n,this.timeOffset=i,this.initSegmentChange=s}}let gl=0;class vl{constructor(e,t,r,n){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=gl++,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=h=>{const c=h.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var m;const b=(m=this.workerContext)==null?void 0:m.objectURL;b&&self.URL.revokeObjectURL(b);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{p.logger[c.data.logType]&&p.logger[c.data.logType](c.data.message);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.part=this.part,c.data.id=this.id,p.trigger(c.event,c.data);break}}},this.onWorkerError=h=>{if(!this.hls)return;const c=new Error(`${h.message} (${h.filename}:${h.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=r,this.onFlush=n;const s=(h,c)=>{c=c||{},c.frag=this.frag||void 0,h===v.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(h,c)};this.observer=new Fs,this.observer.on(v.FRAG_DECRYPTED,s),this.observer.on(v.ERROR,s);const o=Kt(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const h=this.hls.logger;if(i.workerPath||Ua()){try{i.workerPath?(h.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=za(i.workerPath)):(h.log(`injecting Web Worker for "${t}"`),this.workerContext=Co());const{worker:p}=this.workerContext;p.addEventListener("message",this.onWorkerMessage),p.addEventListener("error",this.onWorkerError),p.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:o,id:t,config:nr(i)})}catch(p){h.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new ml(this.observer,o,i,"",t,e.logger)}return}}this.transmuxer=new ml(this.observer,o,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=gl++;const t=this.hls.config,r=Kt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,config:nr(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Io(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,r,n,i,s,o,h,c,p){var m,b;c.transmuxing.start=self.performance.now();const{instanceNo:I,transmuxer:R}=this,Y=s?s.start:i.start,Z=i.decryptdata,ge=this.frag,xe=!(ge&&i.cc===ge.cc),Te=!(ge&&c.level===ge.level),$e=ge?c.sn-ge.sn:-1,We=this.part?c.part-this.part.index:-1,xt=$e===0&&c.id>1&&c.id===(ge==null?void 0:ge.stats.chunkCount),Ye=!Te&&($e===1||$e===0&&(We===1||xt&&We<=0)),ft=self.performance.now();(Te||$e||i.stats.parsing.start===0)&&(i.stats.parsing.start=ft),s&&(We||!Ye)&&(s.stats.parsing.start=ft);const dt=!(ge&&((m=i.initSegment)==null?void 0:m.url)===((b=ge.initSegment)==null?void 0:b.url)),et=new Au(xe,Ye,h,Te,Y,dt);if(!Ye||xe||dt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===ce.MAIN?"level":"track"}: ${c.level} id: ${c.id}
discontinuity: ${xe}
trackSwitch: ${Te}
contiguous: ${Ye}
accurateTimeOffset: ${h}
timeOffset: ${Y}
initSegmentChange: ${dt}`);const Mt=new Su(r,n,t,o,p);this.configureTransmuxer(Mt)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:I,cmd:"demux",data:e,decryptdata:Z,chunkMeta:c,state:et},e instanceof ArrayBuffer?[e]:[]);else if(R){const Mt=R.push(e,Z,c,et);Ea(Mt)?Mt.then(rr=>{this.handleTransmuxComplete(rr)}).catch(rr=>{this.transmuxerError(rr,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(Mt)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:r}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(r){const n=r.flush(e);Ea(n)?n.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(n,e)}}transmuxerError(e,t,r){this.hls&&(this.error=e,this.hls.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,t){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:r}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):r&&r.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const _l=100;class Tu extends vs{constructor(e,t,r){super(e,t,r,"audio-stream-controller",ce.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(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(v.BUFFER_RESET,this.onBufferReset,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(v.BUFFER_RESET,this.onBufferReset,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i,trackId:s}){if(r===ce.MAIN){const o=t.cc,h=this.fragCurrent;if(this.initPTS[o]={baseTime:n,timescale:i,trackId:s},this.log(`InitPTS for cc: ${o} found from main: ${n/i} (${n}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===kt.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==o)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&h&&h.cc!==o?(h.abortRequests(),this.syncWithAnchor(t,h)):this.state===kt.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var r;const n=((r=this.mainFragLoading)==null?void 0:r.frag)||null;if(t&&(n==null?void 0:n.cc)===t.cc)return;const i=(n||e).cc,s=this.getLevelDetails(),o=this.getLoadPosition(),h=Rn(s,i,o);h&&(this.log(`Syncing with main frag at ${h.start} cc ${h.cc}`),this.startFragRequested=!1,this.nextLoadPosition=h.start,this.resetLoadingState(),this.state===kt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=kt.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval(_l),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=kt.IDLE):this.state=kt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case kt.IDLE:this.doTickIdle();break;case kt.WAITING_TRACK:{const{levels:e,trackId:t}=this,r=e==null?void 0:e[t],n=r==null?void 0:r.details;if(n&&!this.waitForLive(r)){if(this.waitForCdnTuneIn(n))break;this.state=kt.WAITING_INIT_PTS}break}case kt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case kt.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:r,cache:n,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=kt.FRAG_LOADING;const o=n.flush().buffer,h={frag:t,part:r,payload:o,networkDetails:null};this._handleFragmentLoadProgress(h),i&&super._handleFragmentLoadComplete(h)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=kt.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:r,media:n,trackId:i}=this,s=t.config;if(!this.buffering||!n&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(r!=null&&r[i]))return;const o=r[i],h=o.details;if(!h||this.waitForLive(o)||this.waitForCdnTuneIn(h)){this.state=kt.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,K.AUDIO,ce.AUDIO));const p=this.getFwdBufferInfo(c,ce.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,h)){t.trigger(v.BUFFER_EOS,{type:"audio"}),this.state=kt.ENDED;return}const m=p.len,b=t.maxBufferLength,I=h.fragments,R=I[0].start,Y=this.getLoadPosition(),Z=this.flushing?Y:p.end;if(this.switchingTrack&&n){const Te=Y;h.PTSKnown&&Te<R&&(p.end>R||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=R+.05)}if(m>=b&&!this.switchingTrack&&Z<I[I.length-1].start)return;let ge=this.getNextFragment(Z,h);if(ge&&this.isLoopLoading(ge,Z)&&(ge=this.getNextFragmentLoopLoading(ge,h,p,ce.MAIN,b)),!ge){this.bufferFlushed=!0;return}let xe=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&xe&&Be(ge)&&!ge.endList&&(!h.live||!this.loadingParts&&Z<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(xe)===Xt.OK&&(this.mainFragLoading=xe=null),xe&&Be(xe))){if(ge.start>xe.end){const $e=this.fragmentTracker.getFragAtPos(Z,ce.MAIN);$e&&$e.end>xe.end&&(xe=$e,this.mainFragLoading={frag:$e,targetBufferTime:null})}if(ge.start>xe.end)return}this.loadFragment(ge,o,Z)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new Zt(r))}onAudioTrackSwitching(e,t){const r=!!t.url;this.trackId=t.id;const{fragCurrent:n}=this;n&&(n.abortRequests(),this.removeUnbufferedFrags(n.start)),this.resetLoadingState(),r?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==kt.STOPPED&&(this.setInterval(_l),this.state=kt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const r=this.cachedTrackLoadedData;r&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(v.AUDIO_TRACK_LOADED,r))}onAudioTrackLoaded(e,t){var r;const{levels:n}=this,{details:i,id:s,groupId:o,track:h}=t;if(!n){this.warn(`Audio tracks reset while loading track ${s} "${h.name}" of "${o}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==kt.STOPPED&&(this.state=kt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${h.name}" of "${o}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=n[s];let m=0;if(i.live||(r=p.details)!=null&&r.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var b;m=this.alignPlaylists(i,p.details,(b=this.levelLastLoaded)==null?void 0:b.details)}i.alignedSliding||(Os(i,c),i.alignedSliding||as(i,c),m=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,m),this.hls.trigger(v.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===kt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=kt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:i}=e,{config:s,trackId:o,levels:h}=this;if(!h){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const c=h[o];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const p=c.details;if(!p){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const m=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let b=this.transmuxer;b||(b=this.transmuxer=new vl(this.hls,ce.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const I=this.initPTS[r.cc],R=(t=r.initSegment)==null?void 0:t.data;if(I!==void 0){const Z=n?n.index:-1,ge=Z!==-1,xe=new vi(r.level,r.sn,r.stats.chunkCount,i.byteLength,Z,ge);b.push(i,R,m,"",r,n,p.totalduration,!1,xe,I)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${p.startSN} ,${p.endSN}],track ${o}`);const{cache:Y}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new ua,complete:!1};Y.push(new Uint8Array(i)),this.state!==kt.STOPPED&&(this.state=kt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===ce.MAIN&&Be(t.frag)&&(this.mainFragLoading=t,this.state===kt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r.type!==ce.AUDIO){!this.audioOnly&&r.type===ce.MAIN&&!r.elementaryStreams.video&&!r.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(Be(r)){this.fragPrevious=r;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(v.AUDIO_TRACK_SWITCHED,x({},i)))}this.fragBufferedComplete(r,n),this.media&&this.tick()}onError(e,t){var r;if(t.fatal){this.state=kt.ERROR;return}switch(t.details){case J.FRAG_GAP:case J.FRAG_PARSING_ERROR:case J.FRAG_DECRYPT_ERROR:case J.FRAG_LOAD_ERROR:case J.FRAG_LOAD_TIMEOUT:case J.KEY_LOAD_ERROR:case J.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ce.AUDIO,t);break;case J.AUDIO_TRACK_LOAD_ERROR:case J.AUDIO_TRACK_LOAD_TIMEOUT:case J.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===kt.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===de.AUDIO_TRACK&&(this.state=kt.IDLE);break;case J.BUFFER_ADD_CODEC_ERROR:case J.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case J.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case J.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==K.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==K.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===kt.ENDED&&(this.state=kt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,ce.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,o=this.getCurrentContext(s);if(!o){this.resetWhenMissingContext(s);return}const{frag:h,part:c,level:p}=o,{details:m}=p,{audio:b,text:I,id3:R,initSegment:Y}=i;if(this.fragContextChanged(h)||!m){this.fragmentTracker.removeFragment(h);return}if(this.state=kt.PARSING,this.switchingTrack&&b&&this.completeAudioSwitch(this.switchingTrack),Y!=null&&Y.tracks){const Z=h.initSegment||h;if(this.unhandledEncryptionError(Y,h))return;this._bufferInitSegment(p,Y.tracks,Z,s),n.trigger(v.FRAG_PARSING_INIT_SEGMENT,{frag:Z,id:r,tracks:Y.tracks})}if(b){const{startPTS:Z,endPTS:ge,startDTS:xe,endDTS:Te}=b;c&&(c.elementaryStreams[K.AUDIO]={startPTS:Z,endPTS:ge,startDTS:xe,endDTS:Te}),h.setElementaryStreamInfo(K.AUDIO,Z,ge,xe,Te),this.bufferFragmentData(b,h,c,s)}if(R!=null&&(t=R.samples)!=null&&t.length){const Z=E({id:r,frag:h,details:m},R);n.trigger(v.FRAG_PARSING_METADATA,Z)}if(I){const Z=E({id:r,frag:h,details:m},I);n.trigger(v.FRAG_PARSING_USERDATA,Z)}}_bufferInitSegment(e,t,r,n){if(this.state!==kt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=ce.AUDIO;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(v.BUFFER_CODECS,t);const o=i.initSegment;if(o!=null&&o.byteLength){const h={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:o};this.hls.trigger(v.BUFFER_APPENDING,h)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.switchingTrack||n===Xt.NOT_LOADED||n===Xt.PARTIAL){var i;if(!Be(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=kt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&as(t.details,s)}else super.loadFragment(e,t,r)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:o}=this.bufferedTrack;Gr({name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:o},e,Vr)||(rn(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(v.AUDIO_TRACK_SWITCHED,x({},e))}}class Uo extends H{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,r){const n=t==null?void 0:t.renditionReports;if(n){let i=-1;for(let s=0;s<n.length;s++){const o=n[s];let h;try{h=new self.URL(o.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),h=o.URI||""}if(h===e){i=s;break}else h===e.substring(0,h.length)&&(i=s)}if(i!==-1){const s=n[i],o=parseInt(s["LAST-MSN"])||t.lastPartSn;let h=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const p=Math.min(t.age-t.partTarget,t.targetduration);h>=0&&p>t.partTarget&&(h+=1)}const c=r&&cr(r);return new Ir(o,h>=0?h:void 0,c)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(r){this.warn(`Could not construct new URL with HLS Delivery Directives: ${r}`)}return e}playlistLoaded(e,t,r){const{details:n,stats:i}=t,s=self.performance.now(),o=i.loading.first?Math.max(0,s-i.loading.first):0;n.advancedDateTime=Date.now()-o;const h=this.hls.config.timelineOffset;if(h!==n.appliedTimelineOffset){const p=Math.max(h||0,0);n.appliedTimelineOffset=p,n.fragments.forEach(m=>{m.setStart(m.playlistOffset+p)})}if(n.live||r!=null&&r.live){const p="levelInfo"in t?t.levelInfo:t.track;if(n.reloaded(r),r&&n.fragments.length>0){La(r,n,this);const xe=n.playlistParsingError;if(xe){this.warn(xe);const Te=this.hls;if(!Te.config.ignorePlaylistParsingErrors){var c;const{networkDetails:$e}=t;Te.trigger(v.ERROR,{type:be.NETWORK_ERROR,details:J.LEVEL_PARSING_ERROR,fatal:!1,url:n.url,error:xe,reason:xe.message,level:t.level||void 0,parent:(c=n.fragments[0])==null?void 0:c.type,networkDetails:$e,stats:i});return}n.playlistParsingError=null}}n.requestScheduled===-1&&(n.requestScheduled=i.loading.start);const m=this.hls.mainForwardBufferInfo,b=m?m.end-m.len:0,I=(n.edge-b)*1e3,R=Pi(n,I);if(n.requestScheduled+R<s?n.requestScheduled=s:n.requestScheduled+=R,this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),!this.canLoad||!n.live)return;let Y,Z,ge;if(n.canBlockReload&&n.endSN&&n.advanced){const xe=this.hls.config.lowLatencyMode,Te=n.lastPartSn,$e=n.endSN,We=n.lastPartIndex,xt=We!==-1,Ye=Te===$e;xt?Ye?(Z=$e+1,ge=xe?0:We):(Z=Te,ge=xe?We+1:n.maxPartIndex):Z=$e+1;const ft=n.age,dt=ft+n.ageHeader;let et=Math.min(dt-n.partTarget,n.targetduration*1.5);if(et>0){if(dt>n.targetduration*3)this.log(`Playlist last advanced ${ft.toFixed(2)}s ago. Omitting segment and part directives.`),Z=void 0,ge=void 0;else if(r!=null&&r.tuneInGoal&&dt-n.partTarget>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${et} with playlist age: ${n.age}`),et=0;else{const Mt=Math.floor(et/n.targetduration);if(Z+=Mt,ge!==void 0){const rr=Math.round(et%n.targetduration/n.partTarget);ge+=rr}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${ft.toFixed(2)}s goal: ${et} skip sn ${Mt} to part ${ge}`)}n.tuneInGoal=et}if(Y=this.getDeliveryDirectives(n,t.deliveryDirectives,Z,ge),xe||!Ye){n.requestScheduled=s,this.loadingPlaylist(p,Y);return}}else(n.canBlockReload||n.canSkipUntil)&&(Y=this.getDeliveryDirectives(n,t.deliveryDirectives,Z,ge));Y&&Z!==void 0&&n.canBlockReload&&(n.requestScheduled=i.loading.first+Math.max(R-o*2,R/2)),this.scheduleLoading(p,Y,n)}else this.clearTimer()}scheduleLoading(e,t,r){const n=r||e.details;if(!n){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=n.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const o=s-i;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,r,n){let i=cr(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,i=Wt.No),new Ir(r,n,i)}checkRetry(e){const t=e.details,r=Wr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:o}=n||{},h=!!n&&!!o&&(i===ir.RetryRequest||!n.resolved&&i===ir.SendAlternateToPenaltyBox);if(h){var c;if(s>=o.maxNumRetry)return!1;if(r&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const p=on(o,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),p),this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" in ${p}ms`)}e.levelRetry=!0,n.resolved=!0}return h}}function yl(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!xa(a[t].attrs,e[t].attrs))return!1;return!0}function xa(a,e,t){const r=a["STABLE-RENDITION-ID"];return r&&!t?r===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(n=>a[n]!==e[n])}function zo(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Du extends Uo{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(v.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:r,groupId:n,details:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Audio track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const o=s.details;s.details=t.details,this.log(`Audio track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,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 r=t.audioGroups||null,n=this.groupIds;let i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(o=>(n==null?void 0:n.indexOf(o))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(b=>!r||r.indexOf(b.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(b=>b.default)&&(this.selectDefaultTrack=!1),o.forEach((b,I)=>{b.id=I});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const h=this.hls.config.audioPreference;if(!i&&h){const b=_r(h,o,Vr);if(b>-1)i=o[b];else{const I=_r(h,this.tracks);i=this.tracks[I]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const p={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(v.AUDIO_TRACKS_UPDATED,p);const m=this.trackId;if(c!==-1&&m===-1)this.setAudioTrack(c);else if(o.length&&m===-1){var s;const b=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${o.length}`);this.warn(b.message),this.hls.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:b})}}}onError(e,t){t.fatal||!t.context||t.context.type===de.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){const n=this.currentTrack;if(n&&Gr(e,n,Vr))return n;const i=_r(e,this.tracksInGroup,Vr);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(n){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const o=Rr(e,t.levels,r,s,Vr);if(o===-1)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){const s=_r(e,r);if(s>-1)return r[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e],i=n.details&&!n.details.live;if(e===this.trackId&&n===r&&i||(this.log(`Switching to audio-track ${e} "${n.name}" lang:${n.lang} group:${n.groupId} channels:${n.channels}`),this.trackId=e,this.currentTrack=n,this.hls.trigger(v.AUDIO_TRACK_SWITCHING,x({},n)),i))return;const s=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(!(this.selectDefaultTrack&&!n.default)&&(!e||Gr(e,n,Vr)))return r}if(e){const{name:r,lang:n,assocLang:i,characteristics:s,audioCodec:o,channels:h}=e;for(let c=0;c<t.length;c++){const p=t[c];if(Gr({name:r,lang:n,assocLang:i,characteristics:s,audioCodec:o,channels:h},p,Vr))return c}for(let c=0;c<t.length;c++){const p=t[c];if(xa(e.attrs,p.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const p=t[c];if(xa(e.attrs,p.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&rn(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,o=s==null?void 0:s.age;this.log(`Loading audio-track ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(v.AUDIO_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:t||null,track:e})}}class Cu{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,r){if(this.queues===null||this.tracks===null)return;const n=this.queues[t];n.push(e),n.length===1&&!r&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const r={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(r,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const r={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(r)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const r=(t=e[0])==null?void 0:t.label;(r==="async-blocker"||r==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const n=t[0];try{n.execute()}catch(i){var r;if(n.onError(i),this.queues===null||this.tracks===null)return;const s=(r=this.tracks[e])==null?void 0:r.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
${this.list("video")}
${this.list("audio")}
${this.list("audiovideo")}}`}list(e){var t,r;return(t=this.queues)!=null&&t[e]||(r=this.tracks)!=null&&r[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const r=(t=this.tracks)==null?void 0:t[e],n=r==null?void 0:r.buffer;return n?`SourceBuffer${n.updating?" updating":""}${r.ended?" ended":""}${r.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(r=>r.label).join(", "))||""}}const bl=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,El="HlsJsTrackRemovedError";class Iu extends Error{constructor(e){super(e),this.name=El}}class Ru extends H{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=r=>{var n;this.hls&&((n=this.mediaSource)==null?void 0:n.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=r=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=r=>{const{media:n,mediaSource:i}=this;r&&this.log("Media source opened"),!(!n||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(v.MEDIA_ATTACHED,{media:n,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:r,_objectUrl:n}=this;r!==n&&this.error(`Media element src was set while attaching MediaSource (${n} > ${r})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=Oe(De(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(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.BUFFER_RESET,this.onBufferReset,this),e.on(v.BUFFER_APPENDING,this.onBufferAppending,this),e.on(v.BUFFER_CODECS,this.onBufferCodecs,this),e.on(v.BUFFER_EOS,this.onBufferEos,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.FRAG_PARSED,this.onFragParsed,this),e.on(v.FRAG_CHANGED,this.onFragChanged,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.BUFFER_RESET,this.onBufferReset,this),e.off(v.BUFFER_APPENDING,this.onBufferAppending,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.BUFFER_EOS,this.onBufferEos,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.FRAG_PARSED,this.onFragParsed,this),e.off(v.FRAG_CHANGED,this.onFragChanged,this),e.off(v.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const r={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const n=this.transferData;return!this.sourceBufferCount&&n&&n.mediaSource===t?E(r,n.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(r[s]=E({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:r}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var r;let n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsTotal=n,this.log(`${n} bufferCodec event(s) expected.`),(r=this.transferData)!=null&&r.mediaSource&&this.sourceBufferCount&&n&&this.bufferCreated()}onMediaAttaching(e,t){const r=this.media=t.media;this.transferData=this.overrides=void 0;const n=De(this.appendSource);if(n){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new n;if(this.assignMediaSource(s),i)this._objectUrl=r.src,this.attachTransferred();else{const o=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{r.removeAttribute("src");const h=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||h&&s instanceof h,xl(r),Lu(r,o),r.load()}catch(h){r.src=o}else r.src=o}r.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,r;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(r=e.constructor)==null?void 0:r.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const r=this.tracks,n=t.tracks,i=n?Object.keys(n):null,s=i?i.length:0,o=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(n&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
required tracks: ${nr(r,(h,c)=>h==="initSegment"?void 0:c)};
transfer tracks: ${nr(n,(h,c)=>h==="initSegment"?void 0:c)}}`),!Fe(n,r)){t.mediaSource=null,t.tracks=void 0;const h=e.currentTime,c=this.details,p=Math.max(h,(c==null?void 0:c.fragments[0].start)||0);if(p-h>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${h} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(n)}"->"${Object.keys(r)}") start time: ${p} currentTime: ${h}`),this.onMediaDetaching(v.MEDIA_DETACHING,{}),this.onMediaAttaching(v.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(h=>{const c=h,p=n[c];if(p){const m=p.buffer;if(m){const b=this.fragmentTracker,I=p.id;if(b.hasFragments(I)||b.hasParts(I)){const Z=kr.getBuffered(m);b.detectEvictedFragments(c,Z,I,null,!0)}const R=Go(c),Y=[c,m];this.sourceBuffers[R]=Y,m.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,p)}}}),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 r=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:n,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${r?"transferring":"detaching"}`),r)this.sourceBuffers.forEach(([o])=>{o&&this.removeBuffer(o)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const o=i.readyState==="open";try{const h=i.sourceBuffers;for(let c=h.length;c--;)o&&h[c].abort(),i.removeSourceBuffer(h[c]);o&&i.endOfStream()}catch(h){this.warn(`onMediaDetaching: ${h.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}n&&(n.removeEventListener("emptied",this._onMediaEmptied),r||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(n.removeAttribute("src"),this.appendSource&&xl(n),n.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(v.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const r=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),r)try{var n;(n=this.mediaSource)!=null&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(r)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Go(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Cu(this.tracks)}onBufferCodecs(e,t){var r;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),o=!s&&this.sourceBufferCount&&this.media&&i.some(h=>!n[h]);if(s||o){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${i}" SourceBuffers`);return}i.forEach(h=>{var c,p;const m=t[h],{id:b,codec:I,levelCodec:R,container:Y,metadata:Z,supplemental:ge}=m;let xe=n[h];const Te=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[h],$e=Te!=null&&Te.buffer?Te:xe,We=($e==null?void 0:$e.pendingCodec)||($e==null?void 0:$e.codec),xt=$e==null?void 0:$e.levelCodec;xe||(xe=n[h]={buffer:void 0,listeners:[],codec:I,supplemental:ge,container:Y,levelCodec:R,metadata:Z,id:b});const Ye=$t(We,xt),ft=Ye==null?void 0:Ye.replace(bl,"$1");let dt=$t(I,R);const et=(p=dt)==null?void 0:p.replace(bl,"$1");dt&&Ye&&ft!==et&&(h.slice(0,5)==="audio"&&(dt=le(dt,this.appendSource)),this.log(`switching codec ${We} to ${dt}`),dt!==(xe.pendingCodec||xe.codec)&&(xe.pendingCodec=dt),xe.container=Y,this.appendChangeType(h,Y,dt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&((r=t.audio)==null?void 0:r.id)==="main"&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks())}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const r=this.tracks[t];return e[t]={id:r.id,container:r.container,codec:r.codec,levelCodec:r.levelCodec},e},{})}appendChangeType(e,t,r){const n=`${t};codecs=${r}`,i={label:`change-type=${n}`,execute:()=>{const s=this.tracks[e];if(s){const o=s.buffer;o!=null&&o.changeType&&(this.log(`changing ${e} sourceBuffer type to ${n}`),o.changeType(n),s.codec=r,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const r=e.start,n=r+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(r,ce.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var o;const h=this.tracks.video;(this.lastVideoAppendEnd>n||h!=null&&h.buffer&&kr.isBuffered(h.buffer,n)||((o=this.fragmentTracker.getAppendedFrag(n,ce.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:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:r}=this,{data:n,type:i,parent:s,frag:o,part:h,chunkMeta:c,offset:p}=t,m=c.buffering[i],{sn:b,cc:I}=o,R=self.performance.now();m.start=R;const Y=o.stats.buffering,Z=h?h.stats.buffering:null;Y.start===0&&(Y.start=R),Z&&Z.start===0&&(Z.start=R);const ge=r.audio;let xe=!1;i==="audio"&&(ge==null?void 0:ge.container)==="audio/mpeg"&&(xe=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const Te=r.video,$e=Te==null?void 0:Te.buffer;if($e&&b!=="initSegment"){const Ye=h||o,ft=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(Te.ending||Te.ended)){const et=Ye.start+Ye.duration*.05,Mt=$e.buffered,rr=this.currentOp("video");!Mt.length&&!rr?this.blockAudio(Ye):!rr&&!kr.isBuffered($e,et)&&this.lastVideoAppendEnd<et&&this.blockAudio(Ye)}else if(i==="video"){const dt=Ye.end;if(ft){const et=ft.frag.start;(dt>et||dt<this.lastVideoAppendEnd||kr.isBuffered($e,et))&&this.unblockAudio()}this.lastVideoAppendEnd=dt}}const We=(h||o).start,xt={label:`append-${i}`,execute:()=>{var Ye;m.executeStart=self.performance.now();const ft=(Ye=this.tracks[i])==null?void 0:Ye.buffer;ft&&(xe?this.updateTimestampOffset(ft,We,.1,i,b,I):p!==void 0&&y(p)&&this.updateTimestampOffset(ft,p,1e-6,i,b,I)),this.appendExecutor(n,i)},onStart:()=>{},onComplete:()=>{const Ye=self.performance.now();m.executeEnd=m.end=Ye,Y.first===0&&(Y.first=Ye),Z&&Z.first===0&&(Z.first=Ye);const ft={};this.sourceBuffers.forEach(([dt,et])=>{dt&&(ft[dt]=kr.getBuffered(et))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(v.BUFFER_APPENDED,{type:i,frag:o,part:h,chunkMeta:c,parent:o.type,timeRanges:ft})},onError:Ye=>{var ft;const dt={type:be.MEDIA_ERROR,parent:o.type,details:J.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:o,part:h,chunkMeta:c,error:Ye,err:Ye,fatal:!1},et=(ft=this.media)==null?void 0:ft.error;if(Ye.code===DOMException.QUOTA_EXCEEDED_ERR||Ye.name=="QuotaExceededError"||"quota"in Ye)dt.details=J.BUFFER_FULL_ERROR;else if(Ye.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!et)dt.errorAction=Hr(!0);else if(Ye.name===El&&this.sourceBufferCount===0)dt.errorAction=Hr(!0);else{const Mt=++this.appendErrors[i];this.warn(`Failed ${Mt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${et||"no media error"})`),(Mt>=this.hls.config.appendErrorMaxRetry||et)&&(dt.fatal=!0)}this.hls.trigger(v.ERROR,dt)}};this.log(`queuing "${i}" append sn: ${b}${h?" p: "+h.index:""} of ${o.type===ce.MAIN?"level":"track"} ${o.level} cc: ${I}`),this.append(xt,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,r){return this.log(`queuing "${e}" remove ${t}-${r}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,r)},onStart:()=>{},onComplete:()=>{this.hls.trigger(v.BUFFER_FLUSHED,{type:e})},onError:n=>{this.warn(`Failed to remove ${t}-${r} from "${e}" SourceBuffer`,n)}}}onBufferFlushing(e,t){const{type:r,startOffset:n,endOffset:i}=t;r?this.append(this.getFlushOp(r,n,i),r):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,n,i),s)})}onFragParsed(e,t){const{frag:r,part:n}=t,i=[],s=n?n.elementaryStreams:r.elementaryStreams;s[K.AUDIOVIDEO]?i.push("audiovideo"):(s[K.AUDIO]&&i.push("audio"),s[K.VIDEO]&&i.push("video"));const o=()=>{const h=self.performance.now();r.stats.buffering.end=h,n&&(n.stats.buffering.end=h);const c=n?n.stats:r.stats;this.hls.trigger(v.FRAG_BUFFERED,{frag:r,part:n,stats:c,id:r.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(o,i).catch(h=>{this.warn(`Fragment buffered callback ${h}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var r;this.sourceBuffers.forEach(([s])=>{if(s){const o=this.tracks[s];(!t.type||t.type===s)&&(o.ending=!0,o.ended||(o.ended=!0,this.log(`${s} buffer reached EOS`)))}});const n=((r=this.overrides)==null?void 0:r.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var o;return s&&!((o=this.tracks[s])!=null&&o.ended)})?n?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(v.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(v.BUFFERED_TO_END,void 0)):t.type==="video"&&this.unblockAudio()}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===J.BUFFER_APPEND_ERROR&&t.frag){var r;const n=(r=t.errorAction)==null?void 0:r.nextAutoLevel;y(n)&&n!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:r}=this;if(!r||t===null||!this.sourceBufferCount)return;const n=e.config,i=r.currentTime,s=t.levelTargetDuration,o=t.live&&n.liveBackBufferLength!==null?n.liveBackBufferLength:n.backBufferLength;if(y(o)&&o>=0){const c=Math.max(o,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const h=n.frontBufferFlushThreshold;if(y(h)&&h>0){const c=Math.max(n.maxBufferLength,h),p=Math.max(c,s),m=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,m)}}flushBackBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const o=kr.getBuffered(i);if(o.length>0&&r>o.start(0)){var s;this.hls.trigger(v.BACK_BUFFER_REACHED,{bufferEnd:r});const h=this.tracks[n];if((s=this.details)!=null&&s.live)this.hls.trigger(v.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(h!=null&&h.ended){this.log(`Cannot flush ${n} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(v.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n})}}})}flushFrontBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const s=kr.getBuffered(i),o=s.length;if(o<2)return;const h=s.start(o-1),c=s.end(o-1);if(r>h||e>=h&&e<=c)return;this.hls.trigger(v.BUFFER_FLUSHING,{startOffset:h,endOffset:1/0,type:n})}})}getDurationAndRange(){var e;const{details:t,mediaSource:r}=this;if(!t||!this.media||(r==null?void 0:r.readyState)!=="open")return null;const n=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&r.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),p=Math.max(c,n);return{duration:1/0,start:c,end:p}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return y(i)?{duration:i}:null;const s=this.media.duration,o=y(r.duration)?r.duration:0;return n>o&&n>s||!y(s)?{duration:n}:null}updateMediaSource({duration:e,start:t,end:r}){const n=this.mediaSource;!this.media||!n||n.readyState!=="open"||(n.duration!==e&&(y(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),n.duration=e),t!==void 0&&r!==void 0&&(this.log(`MediaSource duration is set to ${n.duration}. Setting seekable range to ${t}-${r}.`),n.setLiveSeekableRange(t,r)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:r}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${nr(r)}`),this.tracksReady){var n;const i=(n=this.transferData)==null?void 0:n.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,r])=>{if(t){const n=this.tracks[t];e[t]={buffer:r,container:n.container,codec:n.codec,supplemental:n.supplemental,levelCodec:n.levelCodec,id:n.id,metadata:n.metadata}}}),this.hls.trigger(v.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(v.ERROR,{type:be.MEDIA_ERROR,details:J.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:r}=this;if(!r)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,o=e[s];if(this.isPending(o)){const h=this.getTrackCodec(o,s),c=`${o.container};codecs=${h}`;o.codec=h,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${nr(o)}`);try{const p=r.addSourceBuffer(c),m=Go(s),b=[s,p];t[m]=b,o.buffer=p}catch(p){var n;this.error(`error while trying to add sourceBuffer: ${p.message}`),this.shiftAndExecuteNext(s),(n=this.operationQueue)==null||n.removeBlockers(),delete this.tracks[s],this.hls.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,sourceBufferName:s,mimeType:c,parent:o.id});return}this.trackSourceBuffer(s,o)}}this.bufferCreated()}getTrackCodec(e,t){const r=e.supplemental;let n=e.codec;r&&(t==="video"||t==="audiovideo")&&Ae(r,"video")&&(n=It(n,r));const i=$t(n,e.levelCodec);return i?t.slice(0,5)==="audio"?le(i,this.appendSource):i:""}trackSourceBuffer(e,t){const r=t.buffer;if(!r)return;const n=this.getTrackCodec(t,e);this.tracks[e]={buffer:r,codec:n,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const o=s.removedRanges;o!=null&&o.length&&this.hls.trigger(v.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const r=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return r==null?void 0:r.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const r=this.currentOp(e);r&&(r.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var r;const n=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${n}`,t),this.hls.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const i=this.currentOp(e);i&&i.onError(n)}updateTimestampOffset(e,t,r,n,i,s){const o=t-e.timestampOffset;Math.abs(o)>=r&&(this.log(`Updating ${n} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,r){const{media:n,mediaSource:i}=this,s=this.tracks[e],o=s==null?void 0:s.buffer;if(!n||!i||!o){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const h=y(n.duration)?n.duration:1/0,c=y(i.duration)?i.duration:1/0,p=Math.max(0,t),m=Math.min(r,h,c);m>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${m}] from the ${e} SourceBuffer`),o.remove(p,m)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.tracks[t],n=r==null?void 0:r.buffer;if(!n)throw new Iu(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);r.ending=!1,r.ended=!1,n.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:r}=this,n=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(n).then(s=>{r===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var r;const n=(r=this.tracks[t])==null?void 0:r.buffer;!n||n.updating||this.shiftAndExecuteNext(t)})}append(e,t,r){this.operationQueue&&this.operationQueue.append(e,t,r)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,r){const n=this.tracks[e];if(!n)return;const i=n.buffer;if(!i)return;const s=r.bind(this,e);n.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const r=t.buffer;r&&(t.listeners.forEach(n=>{r.removeEventListener(n.event,n.listener)}),t.listeners.length=0)}}function xl(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function Lu(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Go(a){return a==="audio"?1:0}class jo{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(v.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.BUFFER_CODECS,this.onBufferCodecs,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(v.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const r=this.hls.levels[t.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&y(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=r,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const r=t.filter((n,i)=>this.isLevelAllowed(n)&&i<=e);return this.clientRect=null,jo.getMaxLevelByMediaSize(r,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,!t.width&&!t.height&&(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(r=>e.bitrate===r.bitrate&&e.width===r.width&&e.height===r.height)}static getMaxLevelByMediaSize(e,t,r){if(!(e!=null&&e.length))return-1;const n=(o,h)=>h?o.width!==h.width||o.height!==h.height:!0;let i=e.length-1;const s=Math.max(t,r);for(let o=0;o<e.length;o+=1){const h=e[o];if((h.width>=s||h.height>=s)&&n(h,e[o+1])){i=o;break}}return i}}const ci={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},ku={HLS:"h"};class Vi{constructor(e,t){Array.isArray(e)&&(e=e.map(r=>r instanceof Vi?r:new Vi(r))),this.value=e,this.params=t}}const Pu="Dict";function Ou(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function Fu(a,e,t,r){return new Error(`failed to ${a} "${Ou(e)}" as ${t}`,{cause:r})}function Wi(a,e,t){return Fu("serialize",a,e,t)}class wl{constructor(e){this.description=e}}const Sl="Bare Item",Mu="Boolean";function Bu(a){if(typeof a!="boolean")throw Wi(a,Mu);return a?"?1":"?0"}function Nu(a){return btoa(String.fromCharCode(...a))}const $u="Byte Sequence";function Uu(a){if(ArrayBuffer.isView(a)===!1)throw Wi(a,$u);return`:${Nu(a)}:`}const zu="Integer";function Gu(a){return a<-999999999999999||999999999999999<a}function Al(a){if(Gu(a))throw Wi(a,zu);return a.toString()}function ju(a){return`@${Al(a.getTime()/1e3)}`}function Tl(a,e){if(a<0)return-Tl(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const n=Math.floor(a*t);return(n%2===0?n:n+1)/t}else return Math.round(a*t)/t}const Hu="Decimal";function Ku(a){const e=Tl(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Wi(a,Hu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Vu="String",Wu=/[\x00-\x1f\x7f]+/;function Zu(a){if(Wu.test(a))throw Wi(a,Vu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yu(a){return a.description||a.toString().slice(7,-1)}const qu="Token";function Dl(a){const e=Yu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Wi(e,qu);return e}function Ho(a){switch(typeof a){case"number":if(!y(a))throw Wi(a,Sl);return Number.isInteger(a)?Al(a):Ku(a);case"string":return Zu(a);case"symbol":return Dl(a);case"boolean":return Bu(a);case"object":if(a instanceof Date)return ju(a);if(a instanceof Uint8Array)return Uu(a);if(a instanceof wl)return Dl(a);default:throw Wi(a,Sl)}}const Xu="Key";function Ko(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Wi(a,Xu);return a}function Vo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Ko(e)}`:`;${Ko(e)}=${Ho(t)}`).join("")}function Cl(a){return a instanceof Vi?`${Ho(a.value)}${Vo(a.params)}`:Ho(a)}function Qu(a){return`(${a.value.map(Cl).join(" ")})${Vo(a.params)}`}function Ju(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw Wi(a,Pu);const t=a instanceof Map?a.entries():Object.entries(a),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,i])=>{i instanceof Vi||(i=new Vi(i));let s=Ko(n);return i.value===!0?s+=Vo(i.params):(s+="=",Array.isArray(i.value)?s+=Qu(i):s+=Cl(i)),s}).join(`,${r}`)}function Il(a,e){return Ju(a,e)}const Zi="CMCD-Object",Fn="CMCD-Request",Ss="CMCD-Session",ps="CMCD-Status",e0={br:Zi,ab:Zi,d:Zi,ot:Zi,tb:Zi,tpb:Zi,lb:Zi,tab:Zi,lab:Zi,url:Zi,pb:Fn,bl:Fn,tbl:Fn,dl:Fn,ltc:Fn,mtp:Fn,nor:Fn,nrr:Fn,rc:Fn,sn:Fn,sta:Fn,su:Fn,ttfb:Fn,ttfbb:Fn,ttlb:Fn,cmsdd:Fn,cmsds:Fn,smrt:Fn,df:Fn,cs:Fn,ts:Fn,cid:Ss,pr:Ss,sf:Ss,sid:Ss,st:Ss,v:Ss,msd:Ss,bs:ps,bsd:ps,cdn:ps,rtp:ps,bg:ps,pt:ps,ec:ps,e:ps},t0={REQUEST:Fn};function r0(a){return Object.keys(a).reduce((e,t)=>{var r;return(r=a[t])===null||r===void 0||r.forEach(n=>e[n]=t),e},{})}function n0(a,e){const t={};if(!a)return t;const r=Object.keys(a),n=e?r0(e):{};return r.reduce((i,s)=>{var o;const h=e0[s]||n[s]||t0.REQUEST,c=(o=i[h])!==null&&o!==void 0?o:i[h]={};return c[s]=a[s],i},t)}function i0(a){return["ot","sf","st","e","sta"].includes(a)}function s0(a){return typeof a=="number"?y(a):a!=null&&a!==""&&a!==!1}const Rl="event";function a0(a,e){const t=new URL(a),r=new URL(e);if(t.origin!==r.origin)return a;const n=t.pathname.split("/").slice(1),i=r.pathname.split("/").slice(1,-1);for(;n[0]===i[0];)n.shift(),i.shift();for(;i.length;)i.shift(),n.unshift("..");return n.join("/")+t.search+t.hash}const ao=a=>Math.round(a),Wo=(a,e)=>Array.isArray(a)?a.map(t=>Wo(t,e)):a instanceof Vi&&typeof a.value=="string"?new Vi(Wo(a.value,e),a.params):(e.baseUrl&&(a=a0(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),oo=a=>ao(a/100)*100,o0={br:ao,d:ao,bl:oo,dl:oo,mtp:oo,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof Vi&&typeof a.value=="string"?t=new Vi([a]):typeof a=="string"&&(t=[a])),Wo(t,e)},rtp:oo,tb:ao},Ll="request",kl="response",Zo=["ab","bg","bl","br","bs","bsd","cdn","cid","cs","df","ec","lab","lb","ltc","msd","mtp","pb","pr","pt","sf","sid","sn","st","sta","tab","tb","tbl","tpb","ts","v"],l0=["e"],u0=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function lo(a){return u0.test(a)}function c0(a){return Zo.includes(a)||l0.includes(a)||lo(a)}const Pl=["d","dl","nor","ot","rtp","su"];function h0(a){return Zo.includes(a)||Pl.includes(a)||lo(a)}const d0=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function f0(a){return Zo.includes(a)||Pl.includes(a)||d0.includes(a)||lo(a)}const p0=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function m0(a){return p0.includes(a)||lo(a)}const g0={[kl]:f0,[Rl]:c0,[Ll]:h0};function Ol(a,e={}){const t={};if(a==null||typeof a!="object")return t;const r=e.version||a.v||1,n=e.reportingMode||Ll,i=r===1?m0:g0[n];let s=Object.keys(a).filter(i);const o=e.filter;typeof o=="function"&&(s=s.filter(o));const h=n===kl||n===Rl;h&&!s.includes("ts")&&s.push("ts"),r>1&&!s.includes("v")&&s.push("v");const c=E({},o0,e.formatters),p={version:r,reportingMode:n,baseUrl:e.baseUrl};return s.sort().forEach(m=>{let b=a[m];const I=c[m];if(typeof I=="function"&&(b=I(b,p)),m==="v"){if(r===1)return;b=r}m=="pr"&&b===1||(h&&m==="ts"&&!y(b)&&(b=Date.now()),s0(b)&&(i0(m)&&typeof b=="string"&&(b=new wl(b)),t[m]=b))}),t}function v0(a,e={}){const t={};if(!a)return t;const r=Ol(a,e),n=n0(r,e==null?void 0:e.customHeaderMap);return Object.entries(n).reduce((i,[s,o])=>{const h=Il(o,{whitespace:!1});return h&&(i[s]=h),i},t)}function _0(a,e,t){return E(a,v0(e,t))}const y0="CMCD";function b0(a,e={}){return a?Il(Ol(a,e),{whitespace:!1}):""}function E0(a,e={}){if(!a)return"";const t=b0(a,e);return encodeURIComponent(t)}function x0(a,e={}){if(!a)return"";const t=E0(a,e);return`${y0}=${t}`}const Fl=/CMCD=[^&#]+/;function w0(a,e,t){const r=x0(e,t);if(!r)return a;if(Fl.test(a))return a.replace(Fl,r);const n=a.includes("?")?"&":"?";return`${a}${n}${r}`}class S0{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=n=>{try{this.apply(n,{ot:ci.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=n=>{try{const{frag:i,part:s}=n,o=this.hls.levels[i.level],h=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:h};(h===ci.VIDEO||h===ci.AUDIO||h==ci.MUXED)&&(c.br=o.bitrate/1e3,c.tb=this.getTopBandwidth(h)/1e3,c.bl=this.getBufferLength(h));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(n,c)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:r}=t;r!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||e.sessionId,this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHED,this.onMediaDetached,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHED,this.onMediaDetached,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var r,n;this.audioBuffer=(r=t.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(n=t.tracks.video)==null?void 0:n.buffer}createData(){var e;return{v:1,sf:ku.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){E(t,this.createData());const r=t.ot===ci.INIT||t.ot===ci.VIDEO||t.ot===ci.MUXED;this.starved&&r&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:n}=this;n&&(t=Object.keys(t).reduce((s,o)=>(n.includes(o)&&(s[o]=t[o]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),_0(e.headers,t,i)):e.url=w0(e.url,t,i)}getNextFrag(e){var t;const r=(t=this.hls.levels[e.level])==null?void 0:t.details;if(r){const n=e.sn-r.startSN;return r.fragments[n+1]}}getNextPart(e){var t;const{index:r,fragment:n}=e,i=(t=this.hls.levels[n.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=n;for(let o=i.length-1;o>=0;o--){const h=i[o];if(h.index===r&&h.fragment.sn===s)return i[o+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return ci.TIMED_TEXT;if(e.sn==="initSegment")return ci.INIT;if(t==="audio")return ci.AUDIO;if(t==="main")return this.hls.audioTracks.length?ci.VIDEO:ci.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===ci.AUDIO)r=n.audioTracks;else{const i=n.maxAutoLevel,s=i>-1?i+1:n.levels.length;r=n.levels.slice(0,s)}return r.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,r=e===ci.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:kr.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,r=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,o){t(i),this.loader.load(i,s,o)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,r=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,o){t(i),this.loader.load(i,s,o)}}}}const A0=3e5;class T0 extends H{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(r=>r!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:r}=t;r!==null&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:r}=t;if((r==null?void 0:r.action)===ir.SendAlternateToPenaltyBox&&r.flags===$r.MoveAllAlternatesMatchingHost){const n=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:o,pathwayId:h,type:c}=t.context;o&&n?s=this.getPathwayForGroupId(o,c,s):h&&(s=h)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&n&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),r.resolved=this.pathwayId!==s),t.details===J.BUFFER_APPEND_ERROR&&!t.fatal?r.resolved=!0:r.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${n&&n.length} priorities: ${nr(i)} penalized: ${nr(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const r=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${r}"`),t=this.getLevelsForPathway(r),this.pathwayId=r}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const r=this.penalizedPathways,n=performance.now();Object.keys(r).forEach(i=>{n-r[i]>A0&&delete r[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in r)continue;if(s===this.pathwayId)return;const o=this.hls.nextLoadLevel,h=this.hls.levels[o];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Oa(t),this.hls.trigger(v.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[o];h&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==h.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==h.bitrate&&this.log(`Unstable Pathways change from bitrate ${h.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=o);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let i=0;i<n.length;i++)if(t===de.AUDIO_TRACK&&n[i].hasAudioGroup(e)||t===de.SUBTITLE_TRACK&&n[i].hasSubtitleGroup(e))return n[i].pathwayId;return r}clonePathways(e){const t=this.levels;if(!t)return;const r={},n={};e.forEach(i=>{const{ID:s,"BASE-ID":o,"URI-REPLACEMENT":h}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(o).map(p=>{const m=new Fr(p.attrs);m["PATHWAY-ID"]=s;const b=m.AUDIO&&`${m.AUDIO}_clone_${s}`,I=m.SUBTITLES&&`${m.SUBTITLES}_clone_${s}`;b&&(r[m.AUDIO]=b,m.AUDIO=b),I&&(n[m.SUBTITLES]=I,m.SUBTITLES=I);const R=Bl(p.uri,m["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",h),Y=new Zt({attrs:m,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:R,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let Z=1;Z<p.audioGroups.length;Z++)Y.addGroupId("audio",`${p.audioGroups[Z]}_clone_${s}`);if(p.subtitleGroups)for(let Z=1;Z<p.subtitleGroups.length;Z++)Y.addGroupId("text",`${p.subtitleGroups[Z]}_clone_${s}`);return Y});t.push(...c),Ml(this.audioTracks,r,h,s),Ml(this.subtitleTracks,n,h,s)})}loadSteeringManifest(e){const t=this.hls.config,r=t.loader;this.loader&&this.loader.destroy(),this.loader=new r(t);let n;try{n=new self.URL(e)}catch(p){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const p=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+p)}const i={responseType:"json",url:n.href},s=t.steeringManifestLoadPolicy.default,o=s.errorRetry||s.timeoutRetry||{},h={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},c={onSuccess:(p,m,b,I)=>{this.log(`Loaded steering manifest: "${n}"`);const R=p.data;if((R==null?void 0:R.VERSION)!==1){this.log(`Steering VERSION ${R.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=R.TTL;const{"RELOAD-URI":Y,"PATHWAY-CLONES":Z,"PATHWAY-PRIORITY":ge}=R;if(Y)try{this.uri=new self.URL(Y,n).href}catch(Te){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${Y}`);return}this.scheduleRefresh(this.uri||b.url),Z&&this.clonePathways(Z);const xe={steeringManifest:R,url:n.toString()};this.hls.trigger(v.STEERING_MANIFEST_LOADED,xe),ge&&this.updatePathwayPriority(ge)},onError:(p,m,b,I)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${m.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${m.url} no longer available`);return}let R=this.timeToLoad*1e3;if(p.code===429){const Y=this.loader;if(typeof(Y==null?void 0:Y.getResponseHeader)=="function"){const Z=Y.getResponseHeader("Retry-After");Z&&(R=parseFloat(Z)*1e3)}this.log(`Steering manifest ${m.url} rate limited`);return}this.scheduleRefresh(this.uri||m.url,R)},onTimeout:(p,m,b)=>{this.log(`Timeout loading steering manifest (${m.url})`),this.scheduleRefresh(this.uri||m.url)}};this.log(`Requesting steering manifest: ${n}`),this.loader.load(i,h,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var r;const n=(r=this.hls)==null?void 0:r.media;if(n&&!n.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Ml(a,e,t,r){a&&Object.keys(e).forEach(n=>{const i=a.filter(s=>s.groupId===n).map(s=>{const o=E({},s);return o.details=void 0,o.attrs=new Fr(o.attrs),o.url=o.attrs.URI=Bl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[n],o.attrs["PATHWAY-ID"]=r,o});a.push(...i)})}function Bl(a,e,t,r){const{HOST:n,PARAMS:i,[t]:s}=r;let o;e&&(o=s==null?void 0:s[e],o&&(a=o));const h=new self.URL(a);return n&&!o&&(h.host=n),i&&Object.keys(i).sort().forEach(c=>{c&&h.searchParams.set(c,i[c])}),h.href}class js extends H{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.mediaResolved=void 0,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.mediaKeys=null,this.setMediaKeysQueue=js.CDMCleanupPromise?[js.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType:r,initData:n}=t,i=`"${t.type}" event: init data type: "${r}"`;if(this.debug(i),n!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=bi(this.config));const o=s.map(fi).filter(h=>!!h);this.keyFormatPromise=this.getKeyFormatPromise(o)}this.keyFormatPromise.then(s=>{const o=yi(s);if(r!=="sinf"||o!==zr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${r}" for selected key-system ${o}`);return}let h;try{const I=tt(new Uint8Array(n)),R=qi(JSON.parse(I).sinf),Y=_t(R);if(!Y)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");h=new Uint8Array(Y.subarray(8,24))}catch(I){this.warn(`${i} Failed to parse sinf: ${I}`);return}const c=re(h),{keyIdToKeySessionPromise:p,mediaKeySessions:m}=this;let b=p[c];for(let I=0;I<m.length;I++){const R=m[I],Y=R.decryptdata;if(!Y.keyId)continue;const Z=re(Y.keyId);if(Yn(h,Y.keyId)||Y.uri.replace(/-/g,"").indexOf(c)!==-1){if(b=p[Z],!b)continue;if(Y.pssh)break;delete p[Z],Y.pssh=new Uint8Array(n),Y.keyId=h,b=p[c]=b.then(()=>this.generateRequestWithPreferredKeySession(R,r,n,"encrypted-event-key-match")),b.catch(ge=>this.handleError(ge));break}}b||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${m.length}.`))}).catch(s=>this.handleError(s))}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(v.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(v.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(v.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(v.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t==null?void 0:t[e];if(n)return n.licenseUrl;if(e===zr.WIDEVINE&&r)return r}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,r=t==null?void 0:t[e];if(r)return r.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,r=(s,o,h)=>!!s&&h.indexOf(s)===o,n=t.map(s=>s.audioCodec).filter(r),i=t.map(s=>s.videoCodec).filter(r);return n.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,o)=>{const h=c=>{const p=c.shift();this.getMediaKeysPromise(p,n,i).then(m=>s({keySystem:p,mediaKeys:m})).catch(m=>{c.length?h(c):m instanceof gi?o(m):o(new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_NO_ACCESS,error:m,fatal:!0},m.message))})};h(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let n=`Configured requestMediaKeySystemAccess is not a function ${r}`;return Gi===null&&self.location.protocol==="http:"&&(n=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(n))}return r(e,t)}getMediaKeysPromise(e,t,r){var n;const i=Eo(e,t,r,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],o=(n=s)==null?void 0:n.keySystemAccess;if(!o){this.log(`Requesting encrypted media "${e}" key-system access with config: ${nr(i)}`),o=this.requestMediaKeySystemAccess(e,i);const h=s=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),o.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const p=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const m=h.mediaKeys=c.createMediaKeys().then(b=>(this.log(`Media-keys created for "${e}"`),h.hasMediaKeys=!0,p.then(I=>I?this.setMediaKeysServerCertificate(b,e,I):b)));return m.catch(b=>{this.error(`Failed to create media-keys for "${e}"}: ${b}`)}),m})}return o.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${re(e.keyId||[])} keyUri: ${e.uri}`);const n=r.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:r,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const r=this.createMediaKeySessionContext(e),n=uo(t),i="cenc";this.keyIdToKeySessionPromise[n]=this.generateRequestWithPreferredKeySession(r,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,t){const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyId ${re(e.decryptdata.keyId||[])}
} (data length: ${t.byteLength})`),r.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>fi(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:r})=>this.attemptSetMediaKeys(t,r))}selectKeySystem(e){return new Promise((t,r)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:n})=>{const i=fi(n);i?t(i):r(new Error(`Unable to find format for key-system "${n}"`))}).catch(r)})}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=bi(this.config),r=e.map(yi).filter(n=>!!n&&t.indexOf(n)!==-1);return this.selectKeySystem(r)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let r=0;r<t.length;r++){const n=D0(e,t[r]);if(n)return n}}loadKey(e){const t=e.keyInfo.decryptdata,r=uo(t),n=this.bannedKeyIds[r];if(n||this.getKeyStatus(t)==="internal-error"){const o=Nl(n||"internal-error",t);return this.handleError(o,e.frag),Promise.reject(o)}const i=`(keyId: ${r} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[r];if(!s){const o=this.getKeySystemForKeyPromise(t).then(({keySystem:h,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(h,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:h,mediaKeys:c,decryptdata:t}))))).then(h=>{const c="cenc",p=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(h,c,p,"playlist-key")});return o.catch(h=>this.handleError(h,e.frag)),this.keyIdToKeySessionPromise[r]=o,o}return s.catch(o=>{if(o instanceof gi){const h=x({},o.data);this.getKeyStatus(t)==="internal-error"&&(h.decryptdata=t);const c=new gi(h,o.message);this.handleError(c,e.frag)}}),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof gi){t&&(e.data.frag=t);const r=e.data.decryptdata;this.error(`${e.message}${r?` (${re(r.keyId||[])})`:""}`),this.hls.trigger(v.ERROR,e.data)}else this.error(e.message),this.hls.trigger(v.ERROR,{type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=uo(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=yi(e.keyFormat),i=n?[n]:bi(this.config);return this.attemptKeySystemAccess(i)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=bi(this.config)),e.length===0)throw new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${nr({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const n=Promise.all(r).then(()=>this.media?this.media.setMediaKeys(t):new Promise((i,s)=>{this.mediaResolved=()=>{if(this.mediaResolved=void 0,!this.media)return s(new Error("Attempted to set mediaKeys without media element attached"));this.mediaKeys=t,this.media.setMediaKeys(t).then(i).catch(s)}}));return this.mediaKeys=t,this.setMediaKeysQueue.push(n),n.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(n),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>r.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,r,n){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const R=s.call(this.hls,t,r,e);if(!R)throw new Error("Invalid response from configured generateRequest filter");t=R.initDataType,r=R.initData?R.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(R){if(this.warn(R.message),this.hls&&this.hls.config.debug)throw R}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const o=uo(e.decryptdata),h=e.decryptdata.uri;this.log(`Generating key-session request for "${n}" keyId: ${o} URI: ${h} (init data type: ${t} length: ${r.byteLength})`);const c=new Fs,p=e._onmessage=R=>{const Y=e.mediaKeysSession;if(!Y){c.emit("error",new Error("invalid state"));return}const{messageType:Z,message:ge}=R;this.log(`"${Z}" message event for session "${Y.sessionId}" message size: ${ge.byteLength}`),Z==="license-request"||Z==="license-renewal"?this.renewLicense(e,ge).catch(xe=>{c.eventNames().length?c.emit("error",xe):this.handleError(xe)}):Z==="license-release"?e.keySystem===zr.FAIRPLAY&&this.updateKeySession(e,Xi("acknowledged")).then(()=>this.removeSession(e)).catch(xe=>this.handleError(xe)):this.warn(`unhandled media key message type "${Z}"`)},m=(R,Y)=>{Y.keyStatus=R;let Z;R.startsWith("usable")?c.emit("resolved"):R==="internal-error"||R==="output-restricted"||R==="output-downscaled"?Z=Nl(R,Y.decryptdata):R==="expired"?Z=new Error(`key expired (keyId: ${o})`):R==="released"?Z=new Error("key released"):R==="status-pending"||this.warn(`unhandled key status change "${R}" (keyId: ${o})`),Z&&(c.eventNames().length?c.emit("error",Z):this.handleError(Z))},b=e._onkeystatuseschange=R=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const Z=this.getKeyStatuses(e);if(!Object.keys(Z).some($e=>Z[$e]!=="status-pending"))return;if(Z[o]==="expired"){this.log(`Expired key ${nr(Z)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let xe=Z[o];if(xe)m(xe,e);else{var Te;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(Te=e.keyStatusTimeouts)[o]||(Te[o]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const We=this.getKeyStatus(e.decryptdata);if(We&&We!=="status-pending")return this.log(`No status for keyId ${o} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${We} from other session.`),m(We,e);this.log(`key status for ${o} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),xe="internal-error",m(xe,e)},1e3)),this.log(`No status for keyId ${o} (${nr(Z)}).`)}};jn(e.mediaKeysSession,"message",p),jn(e.mediaKeysSession,"keystatuseschange",b);const I=new Promise((R,Y)=>{c.on("error",Y),c.on("resolved",R)});return e.mediaKeysSession.generateRequest(t,r).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${o} URI: ${h}`)}).catch(R=>{throw new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_NO_SESSION,error:R,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${R}`)}).then(()=>I).catch(R=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw R}))).then(()=>(c.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((r,n)=>{if(typeof n=="string"&&typeof r=="object"){const o=n;n=r,r=o}const i="buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n);if(e.keySystem===zr.PLAYREADY&&i.length===16){const o=re(i);t[o]=r,lr(i)}const s=re(i);r==="internal-error"&&(this.bannedKeyIds[s]=r),this.log(`key status change "${r}" for keyStatuses keyId: ${s} key-session "${e.mediaKeysSession.sessionId}"`),t[s]=r}),t}fetchServerCertificate(e){const t=this.config,r=t.loader,n=new r(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,o)=>{const h={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(b,I,R,Y)=>{s(b.data)},onError:(b,I,R,Y)=>{o(new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:R,response:x({url:h.url,data:void 0},b)},`"${e}" certificate request failed (${i}). Status: ${b.code} (${b.text})`))},onTimeout:(b,I,R)=>{o(new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:R,response:{url:h.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(b,I,R)=>{o(new Error("aborted"))}};n.load(h,p,m)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,r){return new Promise((n,i)=>{e.setServerCertificate(r).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${r.byteLength}) on "${t}"`),n(e)}).catch(s=>{i(new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(n=>{throw new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:n,fatal:!1},n.message)}))}unpackPlayReadyKeyMessage(e,t){const r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const n=new DOMParser().parseFromString(r,"application/xml"),i=n.querySelectorAll("HttpHeader");if(i.length>0){let p;for(let m=0,b=i.length;m<b;m++){var s,o;p=i[m];const I=(s=p.querySelector("name"))==null?void 0:s.textContent,R=(o=p.querySelector("value"))==null?void 0:o.textContent;I&&R&&e.setRequestHeader(I,R)}}const h=n.querySelector("Challenge"),c=h==null?void 0:h.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Xi(atob(c))}setupLicenseXHR(e,t,r,n){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,r,n)}).catch(s=>{if(!r.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,r,n)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||n})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:n}))}requestLicense(e,t){const r=this.config.keyLoadPolicy.default;return new Promise((n,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let h=o.response;this.log(`License received ${h instanceof ArrayBuffer?h.byteLength:h}`);const c=this.config.licenseResponseCallback;if(c)try{h=c.call(this.hls,o,s,e)}catch(p){this.error(p)}n(h)}else{const h=r.errorRetry,c=h?h.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||o.status>=400&&o.status<500)i(new gi({type:be.KEY_SYSTEM_ERROR,details:J.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:o,response:{url:s,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${s}). Status: ${o.status} (${o.statusText})`));else{const p=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${p} attempts left`),this.requestLicense(e,t).then(n,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,s,e,t).then(({xhr:h,licenseChallenge:c})=>{e.keySystem==zr.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(h,c)),h.send(c)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const r=t.media;this.media=r,jn(r,"encrypted",this.onMediaEncrypted),jn(r,"waitingforkey",this.onWaitingForKey);const n=this.mediaResolved;n?n():this.mediaKeys=r.mediaKeys}onMediaDetached(){const e=this.media;e&&(Vn(e,"encrypted",this.onMediaEncrypted),Vn(e,"waitingforkey",this.onWaitingForKey),this.media=null,this.mediaKeys=null)}_clear(){var e;this._requestLicenseFailureCount=0,this.keyIdToKeySessionPromise={},this.bannedKeyIds={};const t=this.mediaResolved;if(t&&t(),!this.mediaKeys&&!this.mediaKeySessions.length)return;const r=this.media,n=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,Li.clearKeyUriToKeyIdMap();const i=n.length;js.CDMCleanupPromise=Promise.all(n.map(s=>this.removeSession(s)).concat((r==null||(e=r.setMediaKeys(null))==null?void 0:e.catch(s=>{this.log(`Could not clear media keys: ${s}`),this.hls&&this.hls.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))||Promise.resolve())).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}`),this.hls&&this.hls.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{i&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this._clear()}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=t.reduce((n,i)=>(n.indexOf(i.keyFormat)===-1&&n.push(i.keyFormat),n),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:r,decryptdata:n}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${re((n==null?void 0:n.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{keyStatusTimeouts:s}=e;s&&Object.keys(s).forEach(c=>self.clearTimeout(s[c]));const{drmSystemOptions:o}=this.config;return(Ta(o)?new Promise((c,p)=>{self.setTimeout(()=>p(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(c).catch(p)}):Promise.resolve()).catch(c=>{this.log(`Could not remove session: ${c}`),this.hls&&this.hls.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${c}`)})}).then(()=>t.close()).catch(c=>{this.log(`Could not close session: ${c}`),this.hls&&this.hls.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}js.CDMCleanupPromise=void 0;function uo(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return re(a.keyId)}function D0(a,e){if(a.keyId&&e.mediaKeysSession.keyStatuses.has(a.keyId))return e.mediaKeysSession.keyStatuses.get(a.keyId);if(a.matches(e.decryptdata))return e.keyStatus}class gi extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}function Nl(a,e){const t=a==="output-restricted",r=t?J.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:J.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new gi({type:be.KEY_SYSTEM_ERROR,details:r,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class C0{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(v.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(v.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(v.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const r=this.hls.config;if(r.capLevelOnFPSDrop){const n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&typeof n.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,r){const n=performance.now();if(t){if(this.lastTime){const i=n-this.lastTime,s=r-this.lastDroppedFrames,o=t-this.lastDecodedFrames,h=1e3*s/i,c=this.hls;if(c.trigger(v.FPS_DROP,{currentDropped:s,currentDecoded:o,totalDroppedFrames:r}),h>0&&s>c.config.fpsDroppedMonitoringThreshold*o){let p=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=p)&&(p=p-1,c.trigger(v.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,this.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=r,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function $l(a,e){let t;try{t=new Event("addtrack")}catch(r){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function Ul(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(r){pe.debug(`[texttrack-utils]: ${r}`);try{const n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,a.addCue(n)}catch(n){pe.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${n}`)}}t==="disabled"&&(a.mode=t)}function Hs(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let r=a.cues.length;r--;)e&&a.cues[r].removeEventListener("enter",e),a.removeCue(a.cues[r]);t==="disabled"&&(a.mode=t)}function Yo(a,e,t,r){const n=a.mode;if(n==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=R0(a.cues,e,t);for(let s=0;s<i.length;s++)(!r||r(i[s]))&&a.removeCue(i[s])}n==="disabled"&&(a.mode=n)}function I0(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let r=0,n=t,i;for(;r<=n;)if(i=Math.floor((n+r)/2),e<a[i].startTime)n=i-1;else if(e>a[i].startTime&&r<t)r=i+1;else return i;return a[r].startTime-e<e-a[n].startTime?r:n}function R0(a,e,t){const r=[],n=I0(a,e);if(n>-1)for(let i=n,s=a.length;i<s;i++){const o=a[i];if(o.startTime>=e&&o.endTime<=t)r.push(o);else if(o.startTime>t)return r}return r}function co(a){const e=[];for(let t=0;t<a.length;t++){const r=a[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(a[t])}return e}class L0 extends Uo{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const r=co(this.media.textTracks);for(let i=0;i<r.length;i++)if(r[i].mode==="hidden")t=r[i];else if(r[i].mode==="showing"){t=r[i];break}const n=this.findTrackForTextTrack(t);this.subtitleTrack!==n&&this.setSubtitleTrack(n)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(v.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const r=this.media;if(!r)return;const n=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||r.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,n)return;co(r.textTracks).forEach(s=>{Hs(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:r,groupId:n,details:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Subtitle track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const o=s.details;s.details=t.details,this.log(`Subtitle track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,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 r=t.subtitleGroups||null,n=this.groupIds;let i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(s=>(n==null?void 0:n.indexOf(s))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(p=>!r||r.indexOf(p.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(p=>p.default)&&(this.selectDefaultTrack=!1),s.forEach((p,m)=>{p.id=m});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const o=this.hls.config.subtitlePreference;if(!i&&o){this.selectDefaultTrack=!1;const p=_r(o,s);if(p>-1)i=s[p];else{const m=_r(o,this.tracks);i=this.tracks[m]}}let h=this.findTrackId(i);h===-1&&i&&(h=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(v.SUBTITLE_TRACKS_UPDATED,c),h!==-1&&this.trackId===-1&&this.setSubtitleTrack(h)}}findTrackId(e){const t=this.tracksInGroup,r=this.selectDefaultTrack;for(let n=0;n<t.length;n++){const i=t[n];if(!(r&&!i.default||!r&&!e)&&(!e||Gr(i,e)))return n}if(e){for(let n=0;n<t.length;n++){const i=t[n];if(xa(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(xa(e.attrs,i.attrs,["LANGUAGE"]))return n}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(zo(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===de.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const r=this.currentTrack;if(r&&Gr(e,r))return r;const n=_r(e,this.tracksInGroup);if(n>-1){const i=this.tracksInGroup[n];return this.setSubtitleTrack(n),i}else{if(r)return null;{const i=_r(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,o=s==null?void 0:s.age;this.log(`Loading subtitle ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(v.SUBTITLE_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=co(e.textTracks),r=this.currentTrack;let n;if(r&&(n=t.filter(i=>zo(r,i))[0],n||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==n&&(i.mode="disabled")}),n){const i=this.subtitleDisplay?"showing":"hidden";n.mode!==i&&(n.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!y(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),!n){this.hls.trigger(v.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!n.details&&!n.details.live;if(e===this.trackId&&n===r&&i)return;this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:""));const{id:s,groupId:o="",name:h,type:c,url:p}=n;this.hls.trigger(v.SUBTITLE_TRACK_SWITCH,{id:s,groupId:o,name:h,type:c,url:p});const m=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(m)}}function k0(){try{return crypto.randomUUID()}catch(a){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(n=="x"?i:i&3|8).toString(16)})}}}function wa(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const Ks=.025;let ho=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function P0(a,e,t){return`${a.identifier}-${t+1}-${wa(e)}`}class O0{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const r=this.playoutLimit;return e<=0||isNaN(r)?!1:r===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>r}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 qo(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,r=qo(t,e);return t-r<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=y(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 qo(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)<Ks))}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"?ho.Range:ho.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 F0(this)}}function qo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<Ks)?e.start:e.start+e.duration}function zl(a,e,t){const r=new self.URL(a,t);return r.protocol!=="data:"&&r.searchParams.set("_HLS_primary_id",e),r}function Xo(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function F0(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function Vs(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class M0{constructor(e,t,r,n){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(v.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=r,this.assetItem=n;const s=()=>{this.hasDetails=!0};i.once(v.LEVEL_LOADED,s),i.once(v.AUDIO_TRACK_LOADED,s),i.once(v.SUBTITLE_TRACK_LOADED,s),i.on(v.MEDIA_ATTACHING,(o,{media:h})=>{this.removeMediaListeners(),this.mediaAttached=h,this.interstitial.playoutLimit&&(h.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(v.BUFFER_APPENDED,()=>{const p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,i.trigger(v.BUFFERED_TO_END,void 0))}))})}get appendInPlace(){return this.interstitial.appendInPlace}loadSource(){const e=this.hls;if(e)if(e.url)e.levels.length&&!e.started&&e.startLoad(-1,!0);else{let t=this.assetItem.uri;try{t=zl(t,e.config.primarySessionId||"").href}catch(r){}e.loadSource(t)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e)return!1;const r=Math.min(this._bufferedEosTime||1/0,this.duration),n=this.timelineOffset,i=kr.bufferInfo(e,n,0);return this.getAssetTime(i.end)>=r-.02}reachedPlayout(e){const r=this.interstitial.playoutLimit;return this.startOffset+e>=r}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=kr.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const r=t-this.startOffset;if(r>0&&r<e)return r}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const r=e-t;if(Math.abs(r)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,r=this.duration;return Math.min(Math.max(0,e-t),r)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),(t=this.hls)==null||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const t=r=>delete r.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,r){var n;(n=this.hls)==null||n.on(e,t)}once(e,t,r){var n;(n=this.hls)==null||n.once(e,t)}off(e,t,r){var n;(n=this.hls)==null||n.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${Vs(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const Gl=.033;class B0 extends H{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((r,n)=>e<=n.startOffset&&t>n.startOffset?(delete n.error,r+1):r,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let r=-1;e.nextEvent?r=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(r=this.findEventIndex(e.previousEvent.identifier)+1);const n=this.items;if(n)for(n[r]||(t===void 0&&(t=e.start),r=this.findItemIndexAtTime(t));r>=0&&(i=n[r])!=null&&i.event;){var i;r--}return r}findItemIndexAtTime(e,t){const r=this.items;if(r)for(let n=0;n<r.length;n++){let i=r[n];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return n}return-1}findJumpRestrictedIndex(e,t){const r=this.items;if(r)for(let n=e;n<=t&&r[n];n++){const i=r[n].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return n}return-1}findEventIndex(e){const t=this.items;if(t)for(let n=t.length;n--;){var r;if(((r=t[n].event)==null?void 0:r.identifier)===e)return n}return-1}findAssetIndex(e,t){const r=e.assetList,n=r.length;if(n>1)for(let i=0;i<n;i++){const s=r[i];if(!s.error){const o=s.timelineStart;if(t===o||t>o&&(t<o+(s.duration||0)||i===n-1))return i}}return 0}get assetIdAtEnd(){var e;const t=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(t){const r=t.assetList,n=r[r.length-1];if(n)return n.identifier}return null}parseInterstitialDateRanges(e,t){const r=e.main.details,{dateRanges:n}=r,i=this.events,s=this.parseDateRanges(n,{url:r.url},t),o=Object.keys(n),h=i?i.filter(c=>!o.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const m=c.cue.pre,b=c.cue.post,I=p.cue.pre,R=p.cue.post;if(m&&!I)return-1;if(I&&!m||b&&!R)return 1;if(R&&!b)return-1;if(!m&&!I&&!b&&!R){const Y=c.startTime,Z=p.startTime;if(Y!==Z)return Y-Z}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,h.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,h)}updateSchedule(e,t=[],r=!1){const n=this.events||[];if(n.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(n,e);(r||t.length||(i==null?void 0:i.length)!==s.length||s.some((h,c)=>Math.abs(h.playout.start-i[c].playout.start)>.005||Math.abs(h.playout.end-i[c].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,r){const n=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const o=i[s],h=e[o];if(h.isInterstitial){let c=this.eventMap[o];c?c.setDateRange(h):(c=new O0(h,t),this.eventMap[o]=c,r===!1&&(c.appendInPlace=r)),n.push(c)}}return n}parseSchedule(e,t){const r=[],n=t.main.details,i=n.live?1/0:n.edge;let s=0;if(e=e.filter(h=>!h.error&&!(h.cue.once&&h.hasPlayed)),e.length){this.resolveOffsets(e,t);let h=0,c=0;if(e.forEach((p,m)=>{const b=p.cue.pre,I=p.cue.post,R=e[m-1]||null,Y=p.appendInPlace,Z=I?i:p.startOffset,ge=p.duration,xe=p.timelineOccupancy===ho.Range?ge:0,Te=p.resumptionOffset,$e=(R==null?void 0:R.startTime)===Z,We=Z+p.cumulativeDuration;let xt=Y?We+ge:Z+Te;if(b||!I&&Z<=0){const ft=c;c+=xe,p.timelineStart=We;const dt=s;s+=ge,r.push({event:p,start:We,end:xt,playout:{start:dt,end:s},integrated:{start:ft,end:c}})}else if(Z<=i){if(!$e){const et=Z-h;if(et>Gl){const Mt=h,rr=c;c+=et;const pr=s;s+=et;const Cr={previousEvent:e[m-1]||null,nextEvent:p,start:Mt,end:Mt+et,playout:{start:pr,end:s},integrated:{start:rr,end:c}};r.push(Cr)}else et>0&&R&&(R.cumulativeDuration+=et,r[r.length-1].end=Z)}I&&(xt=We),p.timelineStart=We;const ft=c;c+=xe;const dt=s;s+=ge,r.push({event:p,start:We,end:xt,playout:{start:dt,end:s},integrated:{start:ft,end:c}})}else return;const Ye=p.resumeTime;I||Ye>i?h=i:h=Ye}),h<i){var o;const p=h,m=c,b=i-h;c+=b;const I=s;s+=b,r.push({previousEvent:((o=r[r.length-1])==null?void 0:o.event)||null,nextEvent:null,start:h,end:p+b,playout:{start:I,end:s},integrated:{start:m,end:c}})}this.setDurations(i,s,c)}else r.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return r}setDurations(e,t,r){this.durations={primary:e,playout:t,integrated:r}}resolveOffsets(e,t){const r=t.main.details,n=r.live?1/0:r.edge;let i=0,s=-1;e.forEach((o,h)=>{const c=o.cue.pre,p=o.cue.post,m=c?0:p?n:o.startTime;this.updateAssetDurations(o),s===m?o.cumulativeDuration=i:(i=0,s=m),!p&&o.snapOptions.in&&(o.resumeAnchor=an(null,r.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.appendInPlace&&h+1<e.length&&e[h+1].startTime-e[h].resumeTime<Gl&&(e[h+1].appendInPlace=!1,e[h+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${o}`));const I=y(o.resumeOffset)?o.resumeOffset:o.duration;i+=I})}primaryCanResumeInPlaceAt(e,t){const r=e.resumeTime,n=e.startTime+e.resumptionOffset;return Math.abs(r-n)>Ks?(this.log(`"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${n}`),!1):!Object.keys(t).some(s=>{const o=t[s].details,h=o.edge;if(r>=h)return this.log(`"${e.identifier}" resumption ${r} past ${s} playlist end ${h}`),!1;const c=an(null,o.fragments,r);if(!c)return this.log(`"${e.identifier}" resumption ${r} does not align with any fragments in ${s} playlist (${o.fragStart}-${o.fragmentEnd})`),!0;const p=s==="audio"?.175:0;return Math.abs(c.start-r)<Ks+p||Math.abs(c.end-r)<Ks+p?!1:(this.log(`"${e.identifier}" resumption ${r} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let r=0,n=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const o=e.assetList[s],h=t+r;o.startOffset=r,o.timelineStart=h,n||(n=o.duration===null),i||(i=!!o.error);const c=o.error?0:o.duration||0;r+=c}n&&!i?e.duration=Math.max(r,e.duration):e.duration=r}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function Oi(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class N0{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const r=e.assetListUrl;let n;try{n=zl(r,this.hls.sessionId,e.baseUrl)}catch(b){const I=this.assignAssetListError(e,J.ASSET_LIST_LOAD_ERROR,b,r);this.hls.trigger(v.ERROR,I);return}t&&n.protocol!=="data:"&&n.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,o=new s(i),h={responseType:"json",url:n.href},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(b,I,R,Y)=>{const Z=b.data,ge=Z==null?void 0:Z.ASSETS;if(!Array.isArray(ge)){const xe=this.assignAssetListError(e,J.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),R.url,I,Y);this.hls.trigger(v.ERROR,xe);return}e.assetListResponse=Z,this.hls.trigger(v.ASSET_LIST_LOADED,{event:e,assetListResponse:Z,networkDetails:Y})},onError:(b,I,R,Y)=>{const Z=this.assignAssetListError(e,J.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${b.code} ${b.text} (${I.url})`),I.url,Y,R);this.hls.trigger(v.ERROR,Z)},onTimeout:(b,I,R)=>{const Y=this.assignAssetListError(e,J.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${I.url})`),I.url,b,R);this.hls.trigger(v.ERROR,Y)}};return o.load(h,p,m),this.hls.trigger(v.ASSET_LIST_LOADING,{event:e}),o}assignAssetListError(e,t,r,n,i,s){return e.error=r,{type:be.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:n,error:r,networkDetails:s,stats:i}}}function jl(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function fo(a,e){return`[${a}] Advancing timeline position to ${e}`}class $0 extends H{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled||!this.schedule)return;const n=r-this.timelinePos;if(Math.abs(n)<1/7056e5)return;const s=n<=-.01;this.timelinePos=r,this.bufferedPos=r;const o=this.playingItem;if(!o){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(r,r-n)&&this.updateSchedule(!0),this.checkBuffer(),s&&r<o.start||r>=o.end){var h;const I=this.findItemIndex(o);let R=this.schedule.findItemIndexAtTime(r);if(R===-1&&(R=I+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${r} (resolving from ${I} to ${R})`)),!this.isInterstitial(o)&&(h=this.media)!=null&&h.paused&&(this.shouldPlay=!1),!s&&R>I){const Y=this.schedule.findJumpRestrictedIndex(I+1,R);if(Y>I){this.setSchedulePosition(Y);return}}this.setSchedulePosition(R);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(o)){const I=o.event.assetList[0];I&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(r,I))}return}const p=c.timelineStart,m=c.duration||0;if(s&&r<p||r>=p+m){var b;(b=o.event)!=null&&b.appendInPlace&&(this.clearAssetPlayers(o.event,o),this.flushFrontBuffer(r)),this.setScheduleToAssetAtTime(r,c)}},this.onTimeupdate=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled)return;if(r>this.timelinePos)this.timelinePos=r,r>this.bufferedPos&&this.checkBuffer();else return;const n=this.playingItem;if(!n||this.playingLastItem)return;if(r>=n.end){this.timelinePos=n.end;const o=this.findItemIndex(n);this.setSchedulePosition(o+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);r>=s&&this.setScheduleToAssetAtTime(r,i)},this.onScheduleUpdate=(r,n)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,o=i.events||[],h=i.items||[],c=i.durations,p=r.map(Y=>Y.identifier),m=!!(o.length||p.length);(m||n)&&this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
Schedule: ${h.map(Y=>Oi(Y))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let b=null,I=null;s&&(b=this.updateItem(s,this.timelinePos),this.itemsMatch(s,b)?this.playingItem=b:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const R=this.bufferingItem;if(R&&(I=this.updateItem(R,this.bufferedPos),this.itemsMatch(R,I)?this.bufferingItem=I:R.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(R.event,null))),r.forEach(Y=>{Y.assetList.forEach(Z=>{this.clearAssetPlayer(Z.identifier,null)})}),this.playerQueue.forEach(Y=>{if(Y.interstitial.appendInPlace){const Z=Y.assetItem.timelineStart,ge=Y.timelineOffset-Z;if(ge)try{Y.timelineOffset=Z}catch(xe){Math.abs(ge)>Ks&&this.warn(`${xe} ("${Y.assetId}" ${Y.timelineOffset}->${Z})`)}}}),m||n){if(this.hls.trigger(v.INTERSTITIALS_UPDATED,{events:o.slice(0),schedule:h.slice(0),durations:c,removedIds:p}),this.isInterstitial(s)&&p.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(b,s),R&&I!==b&&this.trimInPlace(I,R),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new N0(e),this.schedule=new B0(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(v.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(v.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(v.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(v.BUFFER_APPENDED,this.onBufferAppended,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(v.MEDIA_ENDED,this.onMediaEnded,this),e.on(v.ERROR,this.onError,this),e.on(v.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(v.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(v.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(v.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.BUFFER_APPENDED,this.onBufferAppended,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(v.MEDIA_ENDED,this.onMediaEnded,this),e.off(v.ERROR,this.onError,this),e.off(v.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.schedule=this.manager=null,this.hls=this.HlsPlayerClass=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){Vn(e,"play",this.onPlay),Vn(e,"pause",this.onPause),Vn(e,"seeking",this.onSeeking),Vn(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const r=this.media=t.media;jn(r,"seeking",this.onSeeking),jn(r,"timeupdate",this.onTimeupdate),jn(r,"play",this.onPlay),jn(r,"pause",this.onPause)}onMediaAttached(e,t){const r=this.effectivePlayingItem,n=this.detachedData;if(this.detachedData=null,r===null)this.checkStart();else if(!n){this.clearScheduleState();const i=this.findItemIndex(r);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(this.media=null,!r&&(n&&this.removeMediaListeners(n),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,r=m=>m&&e.getAssetPlayer(m.identifier),n=(m,b,I,R,Y)=>{if(m){let Z=m[b].start;const ge=m.event;if(ge){if(b==="playout"||ge.timelineOccupancy!==ho.Point){const xe=r(I);(xe==null?void 0:xe.interstitial)===ge&&(Z+=xe.assetItem.startOffset+xe[Y])}}else{const xe=R==="bufferedPos"?s():e[R];Z+=xe-m.start}return Z}return 0},i=(m,b)=>{var I;if(m!==0&&b!=="primary"&&(I=e.schedule)!=null&&I.length){var R;const Y=e.schedule.findItemIndexAtTime(m),Z=(R=e.schedule.items)==null?void 0:R[Y];if(Z){const ge=Z[b].start-Z.start;return m+ge}}return m},s=()=>{const m=e.bufferedPos;return m===Number.MAX_VALUE?o("primary"):Math.max(m,0)},o=m=>{var b,I;return(b=e.primaryDetails)!=null&&b.live?e.primaryDetails.edge:((I=e.schedule)==null?void 0:I.durations[m])||0},h=(m,b)=>{var I,R;const Y=e.effectivePlayingItem;if(Y!=null&&(I=Y.event)!=null&&I.restrictions.skip||!e.schedule)return;e.log(`seek to ${m} "${b}"`);const Z=e.effectivePlayingItem,ge=e.schedule.findItemIndexAtTime(m,b),xe=(R=e.schedule.items)==null?void 0:R[ge],Te=e.getBufferingPlayer(),$e=Te==null?void 0:Te.interstitial,We=$e==null?void 0:$e.appendInPlace,xt=Z&&e.itemsMatch(Z,xe);if(Z&&(We||xt)){const Ye=r(e.playingAsset),ft=(Ye==null?void 0:Ye.media)||e.primaryMedia;if(ft){const dt=b==="primary"?ft.currentTime:n(Z,b,e.playingAsset,"timelinePos","currentTime"),et=m-dt,Mt=(We?dt:ft.currentTime)+et;if(Mt>=0&&(!Ye||We||Mt<=Ye.duration)){ft.currentTime=Mt;return}}}if(xe){let Ye=m;if(b!=="primary"){const dt=xe[b].start,et=m-dt;Ye=xe.start+et}const ft=!e.isInterstitial(xe);if((!e.isInterstitial(Z)||Z.event.appendInPlace)&&(ft||xe.event.appendInPlace)){const dt=e.media||(We?Te==null?void 0:Te.media:null);dt&&(dt.currentTime=Ye)}else if(Z){const dt=e.findItemIndex(Z);if(ge>dt){const Mt=e.schedule.findJumpRestrictedIndex(dt+1,ge);if(Mt>dt){e.setSchedulePosition(Mt);return}}let et=0;if(ft)e.timelinePos=Ye,e.checkBuffer();else{const Mt=xe.event.assetList,rr=m-(xe[b]||xe).start;for(let pr=Mt.length;pr--;){const Cr=Mt[pr];if(Cr.duration&&rr>=Cr.startOffset&&rr<Cr.startOffset+Cr.duration){et=pr;break}}}e.setSchedulePosition(ge,et)}}},c=()=>{const m=e.effectivePlayingItem;if(e.isInterstitial(m))return m;const b=t();return e.isInterstitial(b)?b:null},p={get bufferedEnd(){const m=t(),b=e.bufferingItem;if(b&&b===m){var I;return n(b,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-b.playout.start||((I=e.bufferingAsset)==null?void 0:I.startOffset)||0}return 0},get currentTime(){const m=c(),b=e.effectivePlayingItem;return b&&b===m?n(b,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-b.playout.start:0},set currentTime(m){const b=c(),I=e.effectivePlayingItem;I&&I===b&&h(m+I.playout.start,"playout")},get duration(){const m=c();return m?m.playout.end-m.playout.start:0},get assetPlayers(){var m;const b=(m=c())==null?void 0:m.event.assetList;return b?b.map(I=>e.getAssetPlayer(I.identifier)):[]},get playingIndex(){var m;const b=(m=c())==null?void 0:m.event;return b&&e.effectivePlayingAsset?b.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var m;return((m=e.schedule)==null||(m=m.events)==null?void 0:m.slice(0))||[]},get schedule(){var m;return((m=e.schedule)==null||(m=m.items)==null?void 0:m.slice(0))||[]},get interstitialPlayer(){return c()?p:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const m=t();return e.findItemIndex(m)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const m=e.effectivePlayingItem;return e.findItemIndex(m)},primary:{get bufferedEnd(){return s()},get currentTime(){const m=e.timelinePos;return m>0?m:0},set currentTime(m){h(m,"primary")},get duration(){return o("primary")},get seekableStart(){var m;return((m=e.primaryDetails)==null?void 0:m.fragmentStart)||0}},integrated:{get bufferedEnd(){return n(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return n(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(m){h(m,"integrated")},get duration(){return o("integrated")},get seekableStart(){var m;return i(((m=e.primaryDetails)==null?void 0:m.fragmentStart)||0,"integrated")}},skip:()=>{const m=e.effectivePlayingItem,b=m==null?void 0:m.event;if(b&&!b.restrictions.skip){const I=e.findItemIndex(m);if(b.appendInPlace){const R=m.playout.start+m.event.duration;h(R+.001,"playout")}else e.advanceAfterAssetEnded(b,I,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,r=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!r?!1:this.findItemIndex(t)===r.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const r=this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&!r.event.appendInPlace)return;let n=this.media;!n&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(n=this.primaryMedia);const i=(t=n)==null?void 0:t.currentTime;if(!(i===void 0||!y(i)))return i}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const r=this.getAssetPlayer(e);r&&this.transferMediaFromPlayer(r,t)}transferMediaFromPlayer(e,t){const r=e.interstitial.appendInPlace,n=e.media;if(r&&n===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&n){this.detachedData={media:n};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${nr(i)}`),this.detachedData=i}else t&&n&&(this.shouldPlay||(this.shouldPlay=!n.paused))}transferMediaTo(e,t){var r,n;if(e.media===t)return;let i=null;const s=this.hls,o=e!==s,h=o&&e.interstitial.appendInPlace,c=(r=this.detachedData)==null?void 0:r.mediaSource;let p;if(s.media)h&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const R=this.getBufferingPlayer();R?(i=R.transferMedia(),p=`${R}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${nr(i)}`);else if(!this.detachedData||s.media===t){const R=this.playerQueue;R.length>1&&R.forEach(Y=>{if(o&&Y.interstitial.appendInPlace!==h){const Z=Y.interstitial;this.clearInterstitial(Y.interstitial,null),Z.appendInPlace=!1,Z.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${Z}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const m=i&&"mediaSource"in i&&((n=i.mediaSource)==null?void 0:n.readyState)!=="closed",b=m&&i?i:t;this.log(`${m?"transfering MediaSource":"attaching media"} to ${o?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const I=this.schedule;if(b===i&&I){const R=o&&e.assetId===I.assetIdAtEnd;b.overrides={duration:I.duration,endOfStream:!o||R,cueRemoval:!o}}e.attachMedia(b)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e==null?void 0:e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const r=this.timelinePos,n=this.effectivePlayingItem;if(r===-1){const i=this.hls.startPosition;if(this.log(fo("checkStart",i)),this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,o=e.findItemIndexAtTime(s);this.setSchedulePosition(o)}}else if(n&&!this.playingItem){const i=e.findItemIndex(n);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const r=e.event,n=r.findAssetIndex(t),i=Xo(r,n);if(!r.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const o=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];o&&this.bufferedToItem(o)}}advanceAfterAssetEnded(e,t,r){const n=Xo(e,r);if(e.isAssetPastPlayoutLimit(n)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,o=i.length;if(s>=o){this.setSchedulePosition(-1);return}const h=e.resumeTime;this.timelinePos<h&&(this.log(fo("advanceAfterAssetEnded",h)),this.timelinePos=h,e.appendInPlace&&this.advanceInPlace(h),this.checkBuffer(this.bufferedPos<h)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[n];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,n)}}setScheduleToAssetAtTime(e,t){const r=this.schedule;if(!r)return;const n=t.parentIdentifier,i=r.getEvent(n);if(i){const s=r.findEventIndex(n),o=r.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,o-1)}}setSchedulePosition(e,t){var r;const n=(r=this.schedule)==null?void 0:r.items;if(!n||this.playbackDisabled)return;const i=e>=0?n[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${i&&Oi(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,o=this.playingLastItem;if(this.isInterstitial(s)){const p=s.event,m=this.playingAsset,b=m==null?void 0:m.identifier,I=b?this.getAssetPlayer(b):null;if(I&&b&&(!this.eventItemsMatch(s,i)||t!==void 0&&b!==p.assetList[t].identifier)){var h;const R=p.findAssetIndex(m);if(this.log(`INTERSTITIAL_ASSET_ENDED ${R+1}/${p.assetList.length} ${Vs(m)}`),this.endedAsset=m,this.playingAsset=null,this.hls.trigger(v.INTERSTITIAL_ASSET_ENDED,{asset:m,assetListIndex:R,event:p,schedule:n.slice(0),scheduleIndex:e,player:I}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),R);return}this.retreiveMediaSource(b,i),I.media&&!((h=this.detachedData)!=null&&h.mediaSource)&&I.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${p} ${Oi(s)}`),p.hasPlayed=!0,this.hls.trigger(v.INTERSTITIAL_ENDED,{event:p,schedule:n.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const R=(c=this.schedule)==null?void 0:c.items;if(i&&R){const Y=this.findItemIndex(i);this.advanceSchedule(Y,R,t,s,o)}return}}this.advanceSchedule(e,n,t,s,o)}advanceSchedule(e,t,r,n,i){const s=this.schedule;if(!s)return;const o=t[e]||null,h=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(p=>{const m=p.interstitial,b=s.findEventIndex(m.identifier);(b<e||b>e+1)&&this.clearInterstitial(m,o)}),this.isInterstitial(o)){this.timelinePos=Math.min(Math.max(this.timelinePos,o.start),o.end);const p=o.event;if(r===void 0){r=s.findAssetIndex(p,this.timelinePos);const R=Xo(p,r-1);if(p.isAssetPastPlayoutLimit(R)||p.appendInPlace&&this.timelinePos===o.end){this.advanceAfterAssetEnded(p,e,r);return}r=R}const m=this.waitingItem;this.assetsBuffered(o,h)||this.setBufferingItem(o);let b=this.preloadAssets(p,r);if(this.eventItemsMatch(o,m||n)||(this.waitingItem=o,this.log(`INTERSTITIAL_STARTED ${Oi(o)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(v.INTERSTITIAL_STARTED,{event:p,schedule:t.slice(0),scheduleIndex:e})),!p.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${p}`);return}if(p.assetListLoader&&(p.assetListLoader.destroy(),p.assetListLoader=void 0),!h){this.log(`Waiting for attachMedia to start Interstitial ${p}`);return}this.waitingItem=this.endedItem=null,this.playingItem=o;const I=p.assetList[r];if(!I){this.advanceAfterAssetEnded(p,e,r||0);return}if(b||(b=this.getAssetPlayer(I.identifier)),b===null||b.destroyed){const R=p.assetList.length;this.warn(`asset ${r+1}/${R} player destroyed ${p}`),b=this.createAssetPlayer(p,I,r),b.loadSource()}if(!this.eventItemsMatch(o,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(I))return;this.startAssetPlayer(b,r,t,e,h),this.shouldPlay&&jl(b.media)}else o?(this.resumePrimary(o,e,n),this.shouldPlay&&jl(this.hls.media)):i&&this.isInterstitial(n)&&(this.endedItem=null,this.playingItem=n,n.event.appendInPlace||this.attachPrimary(s.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,r){var n,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${Oi(e)}`),!((n=this.detachedData)!=null&&n.mediaSource)){let o=this.timelinePos;(o<e.start||o>=e.end)&&(o=this.getPrimaryResumption(e,t),this.log(fo("resumePrimary",o)),this.timelinePos=o),this.attachPrimary(o,e)}if(!r)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${Oi(e)}`),this.hls.trigger(v.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const r=e.start;if(this.primaryLive){const n=this.primaryDetails;if(t===0)return this.hls.startPosition;if(n&&(r<n.fragmentStart||r>n.edge))return this.hls.liveSyncPosition||-1}return r}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:kr.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,r){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const n=this.primaryMedia;if(!n)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,n),r&&this.startLoadingPrimaryAt(e,r)),r||(this.log(fo("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,r))}startLoadingPrimaryAt(e,t){var r;const n=this.hls;!n.loadingEnabled||!n.media||Math.abs((((r=n.mainForwardBufferInfo)==null?void 0:r.start)||n.media.currentTime)-e)>.5?n.startLoad(e,t):n.bufferingEnabled||n.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),(e=this.schedule)==null||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(v.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(v.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const r=this.hls.levels[t.level];if(!r.details)return;const n=x(x({},this.mediaSelection||this.altSelection),{},{main:r});this.mediaSelection=n,this.schedule.parseInterstitialDateRanges(n,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const r=this.hls.audioTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=x(x({},this.altSelection),{},{audio:r});return}const i=x(x({},n),{},{audio:r});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const r=this.hls.subtitleTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=x(x({},this.altSelection),{},{subtitles:r});return}const i=x(x({},n),{},{subtitles:r});this.mediaSelection=i}onAudioTrackSwitching(e,t){const r=xn(t);this.playerQueue.forEach(({hls:n})=>n&&(n.setAudioOption(t)||n.setAudioOption(r)))}onSubtitleTrackSwitch(e,t){const r=xn(t);this.playerQueue.forEach(({hls:n})=>n&&(n.setSubtitleOption(t)||t.id!==-1&&n.setSubtitleOption(r)))}onBufferCodecs(e,t){const r=t.tracks;r&&(this.requiredTracks=r)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const r=this.playingItem;if(r&&!this.itemsMatch(r,this.bufferingItem)&&!this.isInterstitial(r)){const n=this.timelinePos;this.bufferedPos=n,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let n=0;n<t.length;n++){const i=t[n];if(i.cue.post){var r;const s=this.schedule.findEventIndex(i.identifier),o=(r=this.schedule.items)==null?void 0:r[s];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 r=this.findItemIndex(t);this.setSchedulePosition(r+1)}else this.shouldPlay=!1}updateItem(e,t){var r;const n=(r=this.schedule)==null?void 0:r.items;if(e&&n){const i=this.findItemIndex(e,t);return n[i]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((i,s)=>{e.event.isAssetPastPlayoutLimit(s)&&this.clearAssetPlayer(i.identifier,null)});const r=e.end+.25,n=kr.bufferInfo(this.primaryMedia,r,0);(n.end>r||(n.nextStart||0)>r)&&(this.log(`trim buffered interstitial ${Oi(e)} (was ${Oi(t)})`),this.attachPrimary(r,null,!0),this.flushFrontBuffer(r))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var r;return!!t&&(e===t||e.event.identifier===((r=t.event)==null?void 0:r.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const r=this.mediaSelection;r&&((t=this.schedule)==null||t.updateSchedule(r,[],e))}checkBuffer(e){var t;const r=(t=this.schedule)==null?void 0:t.items;if(!r)return;const n=kr.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,r,e)}updateBufferedPos(e,t,r){const n=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!n)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,o=this.findItemIndex(s);let h=n.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const p=this.findItemIndex(i),m=Math.min(p+1,t.length-1),b=t[m];if((h===-1&&i&&e>=i.end||(c=b.event)!=null&&c.appendInPlace&&e+.01>=b.start)&&(h=m),this.isInterstitial(i)){const I=i.event;if(m-o>1&&I.appendInPlace===!1||I.assetList.length===0&&I.assetListLoader)return}if(this.bufferedPos=e,h>p&&h>o)this.bufferedToItem(b);else{const I=this.primaryDetails;this.primaryLive&&I&&e>I.edge-I.targetduration&&b.start<I.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(b)&&this.preloadAssets(b.event,0)}}else r&&s&&!this.itemsMatch(s,i)&&(h===o?this.bufferedToItem(s):h===o+1&&this.bufferedToItem(t[h]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(n=>{const i=this.getAssetPlayer(n.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,r=this.schedule;if(!this.itemsMatch(e,t)&&r){const{items:n,events:i}=r;if(!n||!i)return t;const s=this.isInterstitial(e),o=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const h=o?o.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${Oi(e)}`+(t?` (${h.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=r.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,m)=>{const b=this.getAssetPlayer(p.identifier);b&&(m===c&&b.loadSource(),b.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(v.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:n.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return t}bufferedToItem(e,t=0){const r=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(r!==null){this.bufferingAsset=null;const n=this.detachedData;n?n.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),r=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(r)}bufferedToEvent(e,t){const r=e.event,n=r.assetList.length===0&&!r.assetListLoader,i=r.cue.once;if(n||!i){const s=this.preloadAssets(r,t);if(s!=null&&s.interstitial.appendInPlace){const o=this.primaryMedia;o&&this.bufferAssetPlayer(s,o)}}}preloadAssets(e,t){const r=e.assetUrl,n=e.assetList.length,i=n===0&&!e.assetListLoader,s=e.cue.once;if(i){const h=e.timelineStart;if(e.appendInPlace){var o;const b=this.playingItem;!this.isInterstitial(b)&&(b==null||(o=b.nextEvent)==null?void 0:o.identifier)===e.identifier&&this.flushFrontBuffer(h+.25)}let c,p=0;if(!this.playingItem&&this.primaryLive&&(p=this.hls.startPosition,p===-1&&(p=this.hls.liveSyncPosition||0)),p&&!(e.cue.pre||e.cue.post)){const b=p-h;b>0&&(c=Math.round(b*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${r?1:n} ${e}${c?` live-start: ${p} start-offset: ${c}`:""}`),r)return this.createAsset(e,0,0,h,e.duration,r);const m=this.assetListLoader.loadAssetList(e,c);m&&(e.assetListLoader=m)}else if(!s&&n){for(let c=t;c<n;c++){const p=e.assetList[c],m=this.getAssetPlayerQueueIndex(p.identifier);(m===-1||this.playerQueue[m].destroyed)&&!p.error&&this.createAssetPlayer(e,p,c)}const h=e.assetList[t];if(h){const c=this.getAssetPlayer(h.identifier);return c&&c.loadSource(),c}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(n=>{this.hls.trigger(v.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:n})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let r=0;r<t.length;r++)if(e===t[r].assetId)return r;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let r=0;r<e.length;r++)if(e[r].media===t)return e[r]}return null}createAsset(e,t,r,n,i,s){const o={parentIdentifier:e.identifier,identifier:P0(e,s,t),duration:i,startOffset:r,timelineStart:n,uri:s};return this.createAssetPlayer(e,o,t)}createAssetPlayer(e,t,r){const n=this.hls,i=n.userConfig;let s=i.videoPreference;const o=n.loadLevelObj||n.levels[n.currentLevel];(s||o)&&(s=E({},s),o.videoCodec&&(s.videoCodec=o.videoCodec),o.videoRange&&(s.allowedVideoRanges=[o.videoRange]));const h=n.audioTracks[n.audioTrack],c=n.subtitleTracks[n.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const $e=this.timelinePos-t.timelineStart;if($e>1){const We=t.duration;We&&$e<We&&(p=$e)}}const m=t.identifier,b=x(x({},i),{},{maxMaxBufferLength:Math.min(180,n.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:n.sessionId,assetPlayerId:m,abrEwmaDefaultEstimate:n.bandwidthEstimate,interstitialsController:void 0,startPosition:p,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:h||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(b.timelineOffset=t.timelineStart));const I=b.cmcd;I!=null&&I.sessionId&&I.contentId&&(b.cmcd=E({},I,{contentId:wa(t.uri)})),this.getAssetPlayer(m)&&this.warn(`Duplicate date range identifier ${e} and asset ${m}`);const R=new M0(this.HlsPlayerClass,b,e,t);this.playerQueue.push(R),e.assetList[r]=t;let Y=!0;const Z=$e=>{if($e.live){var We;const ft=new Error(`Interstitials MUST be VOD assets ${e}`),dt={fatal:!0,type:be.OTHER_ERROR,details:J.INTERSTITIAL_ASSET_ITEM_ERROR,error:ft},et=((We=this.schedule)==null?void 0:We.findEventIndex(e.identifier))||-1;this.handleAssetItemError(dt,e,et,r,ft.message);return}const xt=$e.edge-$e.fragmentStart,Ye=t.duration;(Y||Ye===null||xt>Ye)&&(Y=!1,this.log(`Interstitial asset "${m}" duration change ${Ye} > ${xt}`),t.duration=xt,this.updateSchedule())};R.on(v.LEVEL_UPDATED,($e,{details:We})=>Z(We)),R.on(v.LEVEL_PTS_UPDATED,($e,{details:We})=>Z(We)),R.on(v.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const ge=($e,We)=>{const xt=this.getAssetPlayer(m);if(xt&&We.tracks){xt.off(v.BUFFER_CODECS,ge),xt.tracks=We.tracks;const Ye=this.primaryMedia;this.bufferingAsset===xt.assetItem&&Ye&&!xt.media&&this.bufferAssetPlayer(xt,Ye)}};R.on(v.BUFFER_CODECS,ge);const xe=()=>{var $e;const We=this.getAssetPlayer(m);if(this.log(`buffered to end of asset ${We}`),!We||!this.schedule)return;const xt=this.schedule.findEventIndex(e.identifier),Ye=($e=this.schedule.items)==null?void 0:$e[xt];this.isInterstitial(Ye)&&this.advanceAssetBuffering(Ye,t)};R.on(v.BUFFERED_TO_END,xe);const Te=$e=>()=>{if(!this.getAssetPlayer(m)||!this.schedule)return;this.shouldPlay=!0;const xt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,xt,$e)};return R.once(v.MEDIA_ENDED,Te(r)),R.once(v.PLAYOUT_LIMIT_REACHED,Te(1/0)),R.on(v.ERROR,($e,We)=>{if(!this.schedule)return;const xt=this.getAssetPlayer(m);if(We.details===J.BUFFER_STALLED_ERROR){if(xt!=null&&xt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(We,e,this.schedule.findEventIndex(e.identifier),r,`Asset player error ${We.error} ${e}`)}),R.on(v.DESTROYING,()=>{if(!this.getAssetPlayer(m)||!this.schedule)return;const We=new Error(`Asset player destroyed unexpectedly ${m}`),xt={fatal:!0,type:be.OTHER_ERROR,details:J.INTERSTITIAL_ASSET_ITEM_ERROR,error:We};this.handleAssetItemError(xt,e,this.schedule.findEventIndex(e.identifier),r,We.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${Vs(t)}`),this.hls.trigger(v.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:r,event:e,player:R}),R}clearInterstitial(e,t){this.clearAssetPlayers(e,t),e.reset()}clearAssetPlayers(e,t){e.assetList.forEach(r=>{this.clearAssetPlayer(r.identifier,t)})}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const r=this.playerQueue[t];this.transferMediaFromPlayer(r,null),r.resetDetails()}}clearAssetPlayer(e,t){const r=this.getAssetPlayerQueueIndex(e);if(r!==-1){const n=this.playerQueue[r];this.log(`clear ${n} toSegment: ${t&&Oi(t)}`),this.transferMediaFromPlayer(n,t),this.playerQueue.splice(r,1),n.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,r,n,i){const{interstitial:s,assetItem:o,assetId:h}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!p||p.identifier!==h)&&(p&&(this.clearAssetPlayer(p.identifier,r[n]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${Vs(o)}`),this.hls.trigger(v.INTERSTITIAL_ASSET_STARTED,{asset:o,assetListIndex:t,event:s,schedule:r.slice(0),scheduleIndex:n,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var r,n;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,o=this.schedule.findEventIndex(i.identifier),h=(r=this.schedule.items)==null?void 0:r[o];if(!h)return;e.loadSource(),this.setBufferingItem(h),this.bufferingAsset=s;const c=this.getBufferingPlayer();if(c===e)return;const p=i.appendInPlace;if(p&&(c==null?void 0:c.interstitial.appendInPlace)===!1)return;const m=(c==null?void 0:c.tracks)||((n=this.detachedData)==null?void 0:n.tracks)||this.requiredTracks;if(p&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(m&&!Fe(m,e.tracks)){const b=new Error(`Asset ${Vs(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(m)}')`),I={fatal:!0,type:be.OTHER_ERROR,details:J.INTERSTITIAL_ASSET_ITEM_ERROR,error:b},R=i.findAssetIndex(s);this.handleAssetItemError(I,i,o,R,b.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,r=this.primaryMedia;if(!t||!r)return;const n=r.currentTime,i=t.findAssetIndex(e,n),s=e.assetList[i];if(s){const o=this.getAssetPlayer(s.identifier);if(o){const h=o.currentTime||n-s.timelineStart,c=o.duration-h;if(this.warn(`Stalled at ${h} of ${h+c} in ${o} ${e} (media.currentTime: ${n})`),h&&(c/r.playbackRate<.5||o.bufferedInPlaceToEnd(r))&&o.hls){const p=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,p,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,r,n,i){if(e.details===J.BUFFER_STALLED_ERROR)return;const s=t.assetList[n]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&Vs(s)} ${e.error}`),!this.schedule)return;const o=(s==null?void 0:s.identifier)||"",h=this.getAssetPlayerQueueIndex(o),c=this.playerQueue[h]||null,p=this.schedule.items,m=E({},e,{fatal:!1,errorAction:Hr(!0),asset:s,assetListIndex:n,event:t,schedule:p,scheduleIndex:r,player:c});if(this.hls.trigger(v.INTERSTITIAL_ASSET_ERROR,m),!e.fatal)return;const b=this.playingAsset,I=this.bufferingAsset,R=new Error(i);if(s&&(this.clearAssetPlayer(o,null),s.error=R),!t.assetList.some(Y=>!Y.error))t.error=R;else for(let Y=n;Y<t.assetList.length;Y++)this.resetAssetPlayer(t.assetList[Y].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):b&&b.identifier===o?this.advanceAfterAssetEnded(t,r,n):I&&I.identifier===o&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,I)}primaryFallback(e){const t=e.timelineStart,r=this.effectivePlayingItem;let n=this.timelinePos;if(r){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${n} playing: ${Oi(r)} error: ${e.error}`),n===-1&&(n=this.hls.startPosition);const s=this.updateItem(r,n);this.itemsMatch(r,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}else if(n===-1){this.checkStart();return}if(!this.schedule)return;const i=this.schedule.findItemIndexAtTime(n);this.setSchedulePosition(i)}onAssetListLoaded(e,t){var r,n;const i=t.event,s=i.identifier,o=t.assetListResponse.ASSETS;if(!((r=this.schedule)!=null&&r.hasEvent(s)))return;const h=i.timelineStart,c=i.duration;let p=0;o.forEach((Y,Z)=>{const ge=parseFloat(Y.DURATION);this.createAsset(i,Z,p,h+p,ge,Y.URI),p+=ge}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const m=this.waitingItem,b=(m==null?void 0:m.event.identifier)===s;this.updateSchedule();const I=(n=this.bufferingItem)==null?void 0:n.event;if(b){var R;const Y=this.schedule.findEventIndex(s),Z=(R=this.schedule.items)==null?void 0:R[Y];if(Z){if(!this.playingItem&&this.timelinePos>Z.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==Y){i.error=new Error(`Interstitial ${o.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${i}`),this.log(i.error.message),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(Z)}this.setSchedulePosition(Y)}else if((I==null?void 0:I.identifier)===s){const Y=i.assetList[0];if(Y){const Z=this.getAssetPlayer(Y.identifier);if(I.appendInPlace){const ge=this.primaryMedia;Z&&ge&&this.bufferAssetPlayer(Z,ge)}else Z&&Z.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case J.ASSET_LIST_PARSING_ERROR:case J.ASSET_LIST_LOAD_ERROR:case J.ASSET_LIST_LOAD_TIMEOUT:{const r=t.interstitial;r&&(this.updateSchedule(!0),this.primaryFallback(r));break}case J.BUFFER_STALLED_ERROR:{const r=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&r.event.appendInPlace){this.handleInPlaceStall(r.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Hl=500;class U0 extends vs{constructor(e,t,r){super(e,t,r,"subtitle-stream-controller",ce.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(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(v.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(v.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=kt.IDLE,this.setInterval(Hl),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:r,success:n}=t;if(this.fragContextChanged(r)||(Be(r)&&(this.fragPrevious=r),this.state=kt.IDLE),!n)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const o=r.start;for(let c=0;c<i.length;c++)if(o>=i[c].start&&o<=i[c].end){s=i[c];break}const h=r.start+r.duration;s?s.end=h:(s={start:o,end:h},i.push(s)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:r,endOffset:n}=t;if(r===0&&n!==Number.POSITIVE_INFINITY){const i=n-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let o=0;o<s.length;){if(s[o].end<=i){s.shift();continue}else if(s[o].start<i)s[o].start=i;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(r,i,ce.SUBTITLE)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===ce.SUBTITLE&&(t.details===J.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==kt.STOPPED&&(this.state=kt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&yl(this.levels,t)){this.levels=t.map(r=>new Zt(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new Zt(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ce.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var r;if(this.currentTrackId=t.id,!((r=this.levels)!=null&&r.length)||this.currentTrackId===-1){this.clearInterval();return}const n=this.levels[this.currentTrackId];n!=null&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.state!==kt.STOPPED&&this.setInterval(Hl)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:i}=this,{details:s,id:o}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const h=i[o];if(o>=i.length||!h)return;this.log(`Subtitle track ${o} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(r=h.details)!=null&&r.live){if(s.deltaUpdateFailed)return;const m=this.mainDetails;if(!m){this.startFragRequested=!1;return}const b=m.fragments[0];if(!h.details)s.hasProgramDateTime&&m.hasProgramDateTime?(as(s,m),c=s.fragmentStart):b&&(c=b.start,ra(s,c));else{var p;c=this.alignPlaylists(s,h.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&b&&(c=b.start,ra(s,c))}m&&!this.startFragRequested&&this.setStartPosition(m,c)}h.details=s,this.levelLastLoaded=h,o===n&&(this.hls.trigger(v.SUBTITLE_TRACK_UPDATED,{details:s,id:o,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===kt.IDLE&&(an(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:r}=e,n=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&n!=null&&n.key&&n.iv&&li(n.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer,zi(n.method)).catch(o=>{throw i.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const h=performance.now();i.trigger(v.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:s,tdecrypt:h}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=kt.IDLE})}}doTick(){if(!this.media){this.state=kt.IDLE;return}if(this.state===kt.IDLE){const{currentTrackId:e,levels:t}=this,r=t==null?void 0:t[e];if(!r||!t.length||!r.details||this.waitForLive(r))return;const{config:n}=this,i=this.getLoadPosition(),s=kr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,n.maxBufferHole),{end:o,len:h}=s,c=r.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(h>p)return;const m=c.fragments,b=m.length,I=c.edge;let R=null;const Y=this.fragPrevious;if(o<I){const xe=n.maxFragLookUpTolerance,Te=o>I-xe?0:xe;R=an(Y,m,Math.max(m[0].start,o),Te),!R&&Y&&Y.start<m[0].start&&(R=m[0])}else R=m[b-1];if(R=this.filterReplacedPrimary(R,r.details),!R)return;const Z=R.sn-c.startSN,ge=m[Z-1];if(ge&&ge.cc===R.cc&&this.fragmentTracker.getState(ge)===Xt.NOT_LOADED&&(R=ge),this.fragmentTracker.getState(R)===Xt.NOT_LOADED){const xe=this.mapToInitFragWhenRequired(R);xe&&this.loadFragment(xe,r,o)}}}loadFragment(e,t,r){Be(e)?super.loadFragment(e,t,r):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new z0(this.tracksBuffered[this.currentTrackId]||[])}}class z0{constructor(e){this.buffered=void 0;const t=(r,n,i)=>{if(n=n>>>0,n>i-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${i})`);return e[n][r]};this.buffered={get length(){return e.length},end(r){return t("end",r,e.length)},start(r){return t("start",r,e.length)}}}}const G0={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},Kl=a=>String.fromCharCode(G0[a]||a),Fi=15,rs=100,j0={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},H0={17:2,18:4,21:6,22:8,23:10,19:13,20:15},K0={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},V0={25:2,26:4,29:6,30:8,31:10,27:13,28:15},W0=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Z0{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;pe.log(`${this.time} [${e}] ${r}`)}}}const As=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class Vl{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let r=0;r<t.length;r++){const n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Y0{constructor(){this.uchar=" ",this.penState=new Vl}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 q0{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Vl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<rs;t++)this.chars.push(new Y0);this.logger=e}equals(e){for(let t=0;t<rs;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<rs;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<rs;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>rs&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=rs)}moveCursor(e){const t=this.pos+e;if(e>1)for(let r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Kl(e);if(this.pos>=rs){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<rs;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let r=0;r<rs;r++){const n=this.chars[r].uchar;n!==" "&&(t=!1),e.push(n)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Qo{constructor(e){this.rows=[],this.currRow=Fi-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Fi;t++)this.rows.push(new q0(e));this.logger=e}reset(){for(let e=0;e<Fi;e++)this.rows[e].clear();this.currRow=Fi-1}equals(e){let t=!0;for(let r=0;r<Fi;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<Fi;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Fi;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 = "+nr(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<Fi;o++)this.rows[o].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const o=s.rows[i].cueStartTime,h=this.logger.time;if(o!==null&&h!==null&&o<h)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}this.currRow=t;const r=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);r.setCursor(e.indent),e.color=r.chars[s].penState.foreground}const n={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(n)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+nr(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let r="",n=-1;for(let i=0;i<Fi;i++){const s=this.rows[i].getTextString();s&&(n=i+1,e?t.push("Row "+n+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?r="["+t.join(" | ")+"]":r=t.join(`
`)),r}getTextAndFormat(){return this.rows}}class Wl{constructor(e,t,r){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Qo(r),this.nonDisplayedMemory=new Qo(r),this.lastOutputScreen=new Qo(r),this.currRollUpRow=this.displayedMemory.rows[Fi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Fi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const r=Math.floor(e/2)-16,n=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=n[r]}this.logger.log(2,"MIDROW: "+nr(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 Zl{constructor(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Q0(),this.logger=void 0;const n=this.logger=new Z0;this.channels=[null,new Wl(e,t,n),new Wl(e+1,r,n)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let r=0;r<t.length;r+=2){const n=t[r]&127,i=t[r+1]&127;let s=!1,o=null;if(n===0&&i===0)continue;this.logger.log(3,()=>"["+As([t[r],t[r+1]])+"] -> ("+As([n,i])+")");const h=this.cmdHistory;if(n>=16&&n<=31){if(X0(n,i,h)){po(null,null,h),this.logger.log(3,()=>"Repeated command ("+As([n,i])+") is dropped");continue}po(n,i,this.cmdHistory),s=this.parseCmd(n,i),s||(s=this.parseMidrow(n,i)),s||(s=this.parsePAC(n,i)),s||(s=this.parseBackgroundAttributes(n,i))}else po(null,null,h);if(!s&&(o=this.parseChars(n,i),o)){const p=this.currentChannel;p&&p>0?this.channels[p].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+As([n,i])+" orig: "+As([t[r],t[r+1]]))}}parseCmd(e,t){const r=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=33&&t<=35;if(!(r||n))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let r=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const n=this.channels[r];return n?(n.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+As([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let r;const n=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(n||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?r=s===1?j0[e]:K0[e]:r=s===1?H0[e]:V0[e];const o=this.channels[s];return o?(o.setPAC(this.interpretPAC(r,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let r;const n={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?r=t-96:r=t-64,n.underline=(r&1)===1,r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=Math.floor((r-16)/2)*4,n}parseChars(e,t){let r,n=null,i=null;if(e>=25?(r=2,i=e-8):(r=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+Kl(s)+"' in channel "+r),n=[s]}else e>=32&&e<=127&&(n=t===0?[e]:[e,t]);return n&&this.logger.log(3,()=>"Char codes = "+As(n).join(",")),n}parseBackgroundAttributes(e,t){const r=(e===16||e===24)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=45&&t<=47;if(!(r||n))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=W0[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}po(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const r=this.channels[t];r&&r.cueSplitAtTime(e)}}}function po(a,e,t){t.a=a,t.b=e}function X0(a,e,t){return t.a===a&&t.b===e}function Q0(){return{a:null,b:null}}var Jo=function(){if(gn!=null&&gn.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,h){if(typeof h!="string"||!Array.isArray(o))return!1;const c=h.toLowerCase();return~o.indexOf(c)?c:!1}function r(o){return t(a,o)}function n(o){return t(e,o)}function i(o,...h){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const m in p)o[m]=p[m]}return o}function s(o,h,c){const p=this,m={enumerable:!0};p.hasBeenReset=!1;let b="",I=!1,R=o,Y=h,Z=c,ge=null,xe="",Te=!0,$e="auto",We="start",xt=50,Ye="middle",ft=50,dt="middle";Object.defineProperty(p,"id",i({},m,{get:function(){return b},set:function(et){b=""+et}})),Object.defineProperty(p,"pauseOnExit",i({},m,{get:function(){return I},set:function(et){I=!!et}})),Object.defineProperty(p,"startTime",i({},m,{get:function(){return R},set:function(et){if(typeof et!="number")throw new TypeError("Start time must be set to a number.");R=et,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},m,{get:function(){return Y},set:function(et){if(typeof et!="number")throw new TypeError("End time must be set to a number.");Y=et,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},m,{get:function(){return Z},set:function(et){Z=""+et,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},m,{get:function(){return ge},set:function(et){ge=et,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},m,{get:function(){return xe},set:function(et){const Mt=r(et);if(Mt===!1)throw new SyntaxError("An invalid or illegal string was specified.");xe=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},m,{get:function(){return Te},set:function(et){Te=!!et,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},m,{get:function(){return $e},set:function(et){if(typeof et!="number"&&et!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");$e=et,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},m,{get:function(){return We},set:function(et){const Mt=n(et);if(!Mt)throw new SyntaxError("An invalid or illegal string was specified.");We=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},m,{get:function(){return xt},set:function(et){if(et<0||et>100)throw new Error("Position must be between 0 and 100.");xt=et,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},m,{get:function(){return Ye},set:function(et){const Mt=n(et);if(!Mt)throw new SyntaxError("An invalid or illegal string was specified.");Ye=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},m,{get:function(){return ft},set:function(et){if(et<0||et>100)throw new Error("Size must be between 0 and 100.");ft=et,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},m,{get:function(){return dt},set:function(et){const Mt=n(et);if(!Mt)throw new SyntaxError("An invalid or illegal string was specified.");dt=Mt,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class J0{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Yl(a){function e(r,n,i,s){return(r|0)*3600+(n|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class ec{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,r){for(let n=0;n<r.length;++n)if(t===r[n]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1}}function ql(a,e,t,r){const n=r?a.split(r):[a];for(const i in n){if(typeof n[i]!="string")continue;const s=n[i].split(t);if(s.length!==2)continue;const o=s[0],h=s[1];e(o,h)}}const el=new Jo(0,0,""),mo=el.align==="middle"?"middle":"center";function tc(a,e,t){const r=a;function n(){const o=Yl(a);if(o===null)throw new Error("Malformed timestamp: "+r);return a=a.replace(/^[^\sa-zA-Z-]+/,""),o}function i(o,h){const c=new ec;ql(o,function(b,I){let R;switch(b){case"region":for(let Y=t.length-1;Y>=0;Y--)if(t[Y].id===I){c.set(b,t[Y].region);break}break;case"vertical":c.alt(b,I,["rl","lr"]);break;case"line":R=I.split(","),c.integer(b,R[0]),c.percent(b,R[0])&&c.set("snapToLines",!1),c.alt(b,R[0],["auto"]),R.length===2&&c.alt("lineAlign",R[1],["start",mo,"end"]);break;case"position":R=I.split(","),c.percent(b,R[0]),R.length===2&&c.alt("positionAlign",R[1],["start",mo,"end","line-left","line-right","auto"]);break;case"size":c.percent(b,I);break;case"align":c.alt(b,I,["start",mo,"end","left","right"]);break}},/:/,/\s/),h.region=c.get("region",null),h.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&el.line===-1&&(p=-1),h.line=p,h.lineAlign=c.get("lineAlign","start"),h.snapToLines=c.get("snapToLines",!0),h.size=c.get("size",100),h.align=c.get("align",mo);let m=c.get("position","auto");m==="auto"&&el.position===50&&(m=h.align==="start"||h.align==="left"?0:h.align==="end"||h.align==="right"?100:50),h.position=m}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=n(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);a=a.slice(3),s(),e.endTime=n(),s(),i(a,e)}function Xl(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class rc{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new J0,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function r(){let i=t.buffer,s=0;for(i=Xl(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
`;)++s;const o=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
`&&++s,t.buffer=i.slice(s),o}function n(i){ql(i,function(s,o){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=r();const o=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=r(),t.state){case"HEADER":/:/.test(i)?n(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new Jo(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{tc(i,t.cue,t.regionList)}catch(o){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=i.indexOf("-->")!==-1;if(!i||o&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const nc=/\r\n|\n\r|\n|\r/g,tl=function(e,t,r=0){return e.slice(r,r+t.length)===t},ic=function(e){let t=parseInt(e.slice(-3));const r=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!y(t)||!y(r)||!y(n)||!y(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*n,t+=60*60*1e3*i,t};function rl(a,e,t){return wa(a.toString())+wa(e.toString())+wa(t)}const sc=function(e,t,r){let n=e[t],i=e[n.prevCC];if(!i||!i.new&&n.new){e.ccOffset=e.presentationOffset=n.start,n.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=n.start-i.start,n.new=!1,n=i,i=e[n.prevCC]}e.presentationOffset=r};function ac(a,e,t,r,n,i,s){const o=new rc,h=st(new Uint8Array(a)).trim().replace(nc,`
`).split(`
`),c=[],p=e?Ki(e.baseTime,e.timescale):0;let m="00:00.000",b=0,I=0,R,Y=!0;o.oncue=function(Z){const ge=t[r];let xe=t.ccOffset;const Te=(b-p)/9e4;if(ge!=null&&ge.new&&(I!==void 0?xe=t.ccOffset=ge.start:sc(t,r,Te)),Te){if(!e){R=new Error("Missing initPTS for VTT MPEGTS");return}xe=Te-t.presentationOffset}const $e=Z.endTime-Z.startTime,We=ni((Z.startTime+xe-I)*9e4,n*9e4)/9e4;Z.startTime=Math.max(We,0),Z.endTime=Math.max(We+$e,0);const xt=Z.text.trim();Z.text=decodeURIComponent(encodeURIComponent(xt)),Z.id||(Z.id=rl(Z.startTime,Z.endTime,xt)),Z.endTime>0&&c.push(Z)},o.onparsingerror=function(Z){R=Z},o.onflush=function(){if(R){s(R);return}i(c)},h.forEach(Z=>{if(Y)if(tl(Z,"X-TIMESTAMP-MAP=")){Y=!1,Z.slice(16).split(",").forEach(ge=>{tl(ge,"LOCAL:")?m=ge.slice(6):tl(ge,"MPEGTS:")&&(b=parseInt(ge.slice(7)))});try{I=ic(m)/1e3}catch(ge){R=ge}return}else Z===""&&(Y=!1);o.parse(Z+`
`)}),o.flush()}const nl="stpp.ttml.im1t",Ql=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Jl=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,oc={left:"start",center:"center",right:"end",start:"start",end:"end"};function eu(a,e,t,r){const n=_e(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(o=>st(o)),s=pi(e.baseTime,1,e.timescale);try{i.forEach(o=>t(lc(o,s)))}catch(o){r(o)}}function lc(a,e){const n=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((m,b)=>(m[b]=n.getAttribute(`ttp:${b}`)||i[b],m),{}),o=n.getAttribute("xml:space")!=="preserve",h=tu(il(n,"styling","style")),c=tu(il(n,"layout","region")),p=il(n,"body","[begin]");return[].map.call(p,m=>{const b=ru(m,o);if(!b||!m.hasAttribute("begin"))return null;const I=al(m.getAttribute("begin"),s),R=al(m.getAttribute("dur"),s);let Y=al(m.getAttribute("end"),s);if(I===null)throw nu(m);if(Y===null){if(R===null)throw nu(m);Y=I+R}const Z=new Jo(I-e,Y-e,b);Z.id=rl(Z.startTime,Z.endTime,Z.text);const ge=c[m.getAttribute("region")],xe=h[m.getAttribute("style")],Te=uc(ge,xe,h),{textAlign:$e}=Te;if($e){const We=oc[$e];We&&(Z.lineAlign=We),Z.align=$e}return E(Z,Te),Z}).filter(m=>m!==null)}function il(a,e,t){const r=a.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function tu(a){return a.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function ru(a,e){return[].slice.call(a.childNodes).reduce((t,r,n)=>{var i;return r.nodeName==="br"&&n?t+`
`:(i=r.childNodes)!=null&&i.length?ru(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function uc(a,e,t){const r="http://www.w3.org/ns/ttml#styling";let n=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(n=t[s]),i.reduce((o,h)=>{const c=sl(e,r,h)||sl(a,r,h)||sl(n,r,h);return c&&(o[h]=c),o},{})}function sl(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function nu(a){return new Error(`Could not parse ttml timestamp ${a}`)}function al(a,e){if(!a)return null;let t=Yl(a);return t===null&&(Ql.test(a)?t=cc(a,e):Jl.test(a)&&(t=hc(a,e))),t}function cc(a,e){const t=Ql.exec(a),r=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+r/e.frameRate}function hc(a,e){const t=Jl.exec(a),r=Number(t[1]);switch(t[2]){case"h":return r*3600;case"m":return r*60;case"ms":return r*1e3;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}class go{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,r){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class dc{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=au(),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(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this),e.on(v.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(v.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(v.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this),e.off(v.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(v.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(v.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new go(this,"textTrack1"),t=new go(this,"textTrack2"),r=new go(this,"textTrack3"),n=new go(this,"textTrack4");this.cea608Parser1=new Zl(1,e,t),this.cea608Parser2=new Zl(3,r,n)}addCues(e,t,r,n,i){let s=!1;for(let o=i.length;o--;){const h=i[o],c=fc(h[0],h[1],t,r);if(c>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],r),s=!0,c/(r-t)>.5))return}if(s||i.push([t,r]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,t,r,n)}else{const o=this.Cues.newCue(null,t,r,n);this.hls.trigger(v.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i,trackId:s}){const{unparsedVttFrags:o}=this;r===ce.MAIN&&(this.initPTS[t.cc]={baseTime:n,timescale:i,trackId:s}),o.length&&(this.unparsedVttFrags=[],o.forEach(h=>{this.initPTS[h.frag.cc]?this.onFragLoaded(v.FRAG_LOADED,h):this.hls.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:h.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const i=r.textTracks[n];if(su(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:r,media:n}=this,{label:i,languageCode:s}=t[e],o=this.getExistingTrack(i,s);if(o)r[e]=o,Hs(r[e]),$l(r[e],n);else{const h=this.createTextTrack("captions",i,s);h&&(h[e]=!0,r[e]=h)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const r=t.label,n={_id:e,label:r,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(v.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,r){const n=this.media;if(n)return n.addTextTrack(e,t,r)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const r=!!t.transferMedia;if(this.media=null,r)return;const{captionsTracks:n}=this;Object.keys(n).forEach(i=>{Hs(n[i]),delete n[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=au(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let r=0;r<t.length;r++)Hs(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],n=r.some(i=>i.textCodec===nl);if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(yl(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const s=this.media,o=s?co(s.textTracks):null;if(this.tracks.forEach((h,c)=>{let p;if(o){let m=null;for(let b=0;b<o.length;b++)if(o[b]&&su(o[b],h)){m=o[b],o[b]=null;break}m&&(p=m)}if(p)Hs(p);else{const m=iu(h);p=this.createTextTrack(m,h.name,h.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),o!=null&&o.length){const h=o.filter(c=>c!==null).map(c=>c.label);h.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${h.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(v.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(r=>{const n=/(?:CC|SERVICE)([1-4])/.exec(r.instreamId);if(!n)return;const i=`textTrack${n[1]}`,s=this.captionsProperties[i];s&&(s.label=r.name,r.lang&&(s.languageCode=r.lang),s.media=r)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===ce.MAIN){var r,n;const{cea608Parser1:i,cea608Parser2:s,lastSn:o}=this,{cc:h,sn:c}=t.frag,p=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;i&&s&&(c!==o+1||c===o&&p!==this.lastPartIndex+1||h!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=h,this.lastSn=c,this.lastPartIndex=p}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===ce.SUBTITLE)if(n.byteLength){const i=r.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const o=this.tracks[r.level],h=this.vttCCs;h[r.cc]||(h[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),o&&o.textCodec===nl?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;eu(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{r.logger.log(`Failed to parse IMSC1: ${n}`),r.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:i,unparsedVttFrags:s}=this,o=i.length-1;if(!i[r.cc]&&o===-1){s.push(e);return}const h=this.hls,c=(t=r.initSegment)!=null&&t.data?Pt(r.initSegment.data,new Uint8Array(n)).buffer:n;ac(c,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,p=>{this._appendCues(p,r.level),h.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},p=>{const m=p.message==="Missing initPTS for VTT MPEGTS";m?s.push(e):this._fallbackToIMSC1(r,n),h.logger.log(`Failed to parse VTT cue: ${p}`),!(m&&o>r.cc)&&h.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:p})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||eu(t,this.initPTS[e.cc],()=>{r.textCodec=nl,this._parseIMSC1(e,t)},()=>{r.textCodec="wvtt"})}_appendCues(e,t){const r=this.hls;if(this.config.renderTextTracksNatively){const n=this.textTracks[t];if(!n||n.mode==="disabled")return;e.forEach(i=>Ul(n,i))}else{const n=this.tracks[t];if(!n)return;const i=n.default?"default":"subtitles"+t;r.trigger(v.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===ce.SUBTITLE&&this.onFragLoaded(v.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:r,samples:n}=t;if(!(r.type===ce.MAIN&&this.closedCaptionsForLevel(r)==="NONE"))for(let i=0;i<n.length;i++){const s=n[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const o=this.extractCea608Data(s);this.cea608Parser1.addData(n[i].pts,o[0]),this.cea608Parser2.addData(n[i].pts,o[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:r,endOffsetSubtitles:n,type:i}){const{media:s}=this;if(!(!s||s.currentTime<r)){if(!i||i==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(h=>Yo(o[h],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(h=>Yo(o[h],t,n))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let n=2;for(let i=0;i<r;i++){const s=e[n++],o=127&e[n++],h=127&e[n++];if(o===0&&h===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(o),t[p].push(h))}}return t}}function iu(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function su(a,e){return!!a&&a.kind===iu(e)&&zo(e,a)}function fc(a,e,t,r){return Math.min(e,r)-Math.max(a,t)}function au(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const pc=/\s/,mc={newCue(a,e,t,r){const n=[];let i,s,o,h,c;const p=self.VTTCue||self.TextTrackCue;for(let b=0;b<r.rows.length;b++)if(i=r.rows[b],o=!0,h=0,c="",!i.isEmpty()){var m;for(let Y=0;Y<i.chars.length;Y++)pc.test(i.chars[Y].uchar)&&o?h++:(c+=i.chars[Y].uchar,o=!1);i.cueStartTime=e,e===t&&(t+=1e-4),h>=16?h--:h++;const I=Xl(c.trim()),R=rl(e,t,I);a!=null&&(m=a.cues)!=null&&m.getCueById(R)||(s=new p(e,t,I),s.id=R,s.line=b+1,s.align="left",s.position=10+Math.min(80,Math.floor(h*8/32)*10),n.push(s))}return a&&n.length&&(n.sort((b,I)=>b.line==="auto"||I.line==="auto"?0:b.line>8&&I.line>8?I.line-b.line:b.line-I.line),n.forEach(b=>Ul(a,b))),n}};function gc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const vc=/(\d+)-(\d+)\/(\d+)/;class ou{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||Ec,this.controller=new self.AbortController,this.stats=new w}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,r){const n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();const i=_c(e,this.controller.signal),s=e.responseType==="arraybuffer",o=s?"byteLength":"length",{maxTimeToFirstByteMs:h,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=h&&y(h)?h:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},t.timeout),(Ea(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(m=>{var b;this.response=this.loader=m;const I=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},c-(I-n.loading.start)),!m.ok){const{status:Y,statusText:Z}=m;throw new xc(Z||"fetch, bad network response",Y,m)}n.loading.first=I,n.total=bc(m.headers)||n.total;const R=(b=this.callbacks)==null?void 0:b.onProgress;return R&&y(t.highWaterMark)?this.loadProgressively(m,n,e,t.highWaterMark,R):s?m.arrayBuffer():e.responseType==="json"?m.json():m.text()}).then(m=>{var b,I;const R=this.response;if(!R)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const Y=m[o];Y&&(n.loaded=n.total=Y);const Z={url:R.url,data:m,code:R.status},ge=(b=this.callbacks)==null?void 0:b.onProgress;ge&&!y(t.highWaterMark)&&ge(n,e,m,R),(I=this.callbacks)==null||I.onSuccess(Z,n,e,R)}).catch(m=>{var b;if(self.clearTimeout(this.requestTimeout),n.aborted)return;const I=m&&m.code||0,R=m?m.message:null;(b=this.callbacks)==null||b.onError({code:I,text:R},e,m?m.details:null,n)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,r,n=0,i){const s=new ua,o=e.body.getReader(),h=()=>o.read().then(c=>{if(c.done)return s.dataLength&&i(t,r,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const p=c.value,m=p.length;return t.loaded+=m,m<n||s.dataLength?(s.push(p),s.dataLength>=n&&i(t,r,s.flush().buffer,e)):i(t,r,p.buffer,e),h()}).catch(()=>Promise.reject());return h()}}function _c(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(E({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function yc(a){const e=vc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function bc(a){const e=a.get("Content-Range");if(e){const r=yc(e);if(y(r))return r}const t=a.get("Content-Length");if(t)return parseInt(t)}function Ec(a,e){return new self.Request(a.url,e)}class xc extends Error{constructor(e,t,r){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=r}}const wc=/^age:\s*[\d.]+\s*$/im;class lu{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 w,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=r,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const r=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0,n.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return i(r,t.url)}).catch(s=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",t.url,!0),i(r,t.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,t,e)}).catch(s=>{var o;(o=this.callbacks)==null||o.onError({code:r.status,text:s.message},t,r,n)}):this.openAndSendXhr(r,t,e)}openAndSendXhr(e,t,r){e.readyState||e.open("GET",t.url,!0);const n=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=r.loadPolicy;if(n)for(const o in n)e.setRequestHeader(o,n[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),r.timeout=i&&y(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:r}=this;if(!e||!t)return;const n=t.readyState,i=this.config;if(!r.aborted&&n>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),n===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const c=t.status,p=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const R=p!=null?p:t.response;if(R!=null){var s,o;r.loading.end=Math.max(self.performance.now(),r.loading.first);const Y=t.responseType==="arraybuffer"?R.byteLength:R.length;r.loaded=r.total=Y,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first);const Z=(s=this.callbacks)==null?void 0:s.onProgress;Z&&Z(r,e,R,t);const ge={url:t.responseURL,data:R,code:c};(o=this.callbacks)==null||o.onSuccess(ge,r,e,t);return}}const m=i.loadPolicy.errorRetry,b=r.retry,I={url:e.url,data:void 0,code:c};if(Pn(m,b,!1,I))this.retry(m);else{var h;pe.error(`${c} while loading ${e.url}`),(h=this.callbacks)==null||h.onError({code:c,text:t.statusText},e,t,r)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Pn(e,t,!0))this.retry(e);else{var r;pe.warn(`timeout while loading ${(r=this.context)==null?void 0:r.url}`);const n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:r}=this;this.retryDelay=on(e,r.retry),r.retry++,pe.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${r.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&wc.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 Sc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Ac=x(x({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,startOnSegmentBoundary:!1,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncMode:"edge",liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:lu,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:nn,bufferController:Ru,capLevelController:jo,errorController:ln,fpsController:C0,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:Gi,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:Sc},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},Tc()),{},{subtitleStreamController:U0,subtitleTrackController:L0,timelineController:dc,audioStreamController:Tu,audioTrackController:Du,emeController:js,cmcdController:S0,contentSteeringController:T0,interstitialsController:$0});function Tc(){return{cueHandler:mc,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 Dc(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const r=ol(a),n=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(s=>{const o=`${s==="level"?"playlist":s}LoadPolicy`,h=e[o]===void 0,c=[];i.forEach(p=>{const m=`${s}Loading${p}`,b=e[m];if(b!==void 0&&h){c.push(m);const I=r[o].default;switch(e[o]={default:I},p){case"TimeOut":I.maxLoadTimeMs=b,I.maxTimeToFirstByteMs=b;break;case"MaxRetry":I.errorRetry.maxNumRetry=b,I.timeoutRetry.maxNumRetry=b;break;case"RetryDelay":I.errorRetry.retryDelayMs=b,I.timeoutRetry.retryDelayMs=b;break;case"MaxRetryTimeout":I.errorRetry.maxRetryDelayMs=b,I.timeoutRetry.maxRetryDelayMs=b;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${o}": ${nr(e[o])}`)}),x(x({},r),e)}function ol(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(ol):Object.keys(a).reduce((e,t)=>(e[t]=ol(a[t]),e),{}):a}function Cc(a,e){const t=a.loader;t!==ou&&t!==lu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):gc()&&(a.loader=ou,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const vo=2,Ic=.1,Rc=.05,Lc=100;class kc extends Ii{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var r;(r=this.media)!=null&&r.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var r;this.ended=((r=this.media)==null?void 0:r.currentTime)||1,this.hls.trigger(v.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.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(Lc),this.mediaSource=t.mediaSource;const r=this.media=t.media;jn(r,"playing",this.onMediaPlaying),jn(r,"waiting",this.onMediaWaiting),jn(r,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:r}=this;r&&(Vn(r,"playing",this.onMediaPlaying),Vn(r,"waiting",this.onMediaWaiting),Vn(r,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var r,n;const i=(r=this.hls)==null?void 0:r.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:o}=s,h=this.seeking&&!o,c=!this.seeking&&o,p=s.paused&&!o||s.ended||s.playbackRate===0;if(this.seeking=o,e!==t){t&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!p&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||h){h&&this.stallResolved(e);return}if(p){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(v.MEDIA_ENDED,{stalled:!1}));return}if(!kr.getBuffered(s).length){this.nudgeRetry=0;return}const m=kr.bufferInfo(s,e,0),b=m.nextStart||0,I=this.fragmentTracker;if(o&&I&&this.hls){const xt=uu(this.hls.inFlightFragments,e),Ye=m.len>vo,ft=!b||xt||b-e>vo&&!I.getPartialFragment(e);if(Ye||ft)return;this.moved=!1}const R=(n=this.hls)==null?void 0:n.latestLevelDetails;if(!this.moved&&this.stalled!==null&&I){if(!(m.len>0)&&!b)return;const Ye=Math.max(b,m.start||0)-e,dt=!!(R!=null&&R.live)?R.targetduration*2:vo,et=_o(e,I);if(Ye>0&&(Ye<=dt||et)){s.paused||this._trySkipBufferHole(et);return}}const Y=i.detectStallWithCurrentTimeMs,Z=self.performance.now(),ge=this.waiting;let xe=this.stalled;if(xe===null)if(ge>0&&Z-ge<Y)xe=this.stalled=ge;else{this.stalled=Z;return}const Te=Z-xe;if(!o&&(Te>=Y||ge)&&this.hls){var $e;if((($e=this.mediaSource)==null?void 0:$e.readyState)==="ended"&&!(R!=null&&R.live)&&Math.abs(e-((R==null?void 0:R.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(v.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(m),!this.media||!this.hls)return}const We=kr.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(We,Te,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const r=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(r)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(v.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var r;const n=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(r=this.buffered.audio)!=null&&r.length&&n&&n.length>1&&e>n.end(0)){const i=kr.bufferedInfo(kr.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=kr.timeRangesToArray(n),o=kr.bufferedInfo(s,t,0).bufferedIndex;if(o>-1&&o<s.length-1){const h=kr.bufferedInfo(s,e,0).bufferedIndex,c=s[o].end,p=s[o+1].start;if((h===-1||h>o)&&p-c<1&&e-c<2){const m=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${h}`);this.warn(m.message),this.media.currentTime+=1e-6;let b=_o(e,this.fragmentTracker);b&&"fragment"in b?b=b.fragment:b||(b=void 0);const I=kr.bufferInfo(this.media,e,0);this.hls.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:m,reason:m.message,frag:b,buffer:I.len,bufferInfo:I})}}}}}_tryFixBufferStall(e,t,r){var n,i;const{fragmentTracker:s,media:o}=this,h=(n=this.hls)==null?void 0:n.config;if(!o||!s||!h)return;const c=(i=this.hls)==null?void 0:i.latestLevelDetails,p=_o(r,s);if((p||c!=null&&c.live&&r<c.fragmentStart)&&(this._trySkipBufferHole(p)||!this.media))return;const m=e.buffered,b=this.adjacentTraversal(e,r);(m&&m.length>1&&e.len>h.maxBufferHole||e.nextStart&&(e.nextStart-r<h.maxBufferHole||b))&&(t>h.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const r=this.fragmentTracker,n=e.nextStart;if(r&&n){const i=r.getFragAtPos(t,ce.MAIN),s=r.getFragAtPos(n,ce.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:r,stallReported:n,stalled:i}=this;if(!n&&i!==null&&r&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${nr(e)})`);this.warn(s.message),t.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:r,media:n}=this,i=(t=this.hls)==null?void 0:t.config;if(!n||!r||!i)return 0;const s=n.currentTime,o=kr.bufferInfo(n,s,0),h=s<o.start?o.start:o.nextStart;if(h&&this.hls){const p=o.len<=i.maxBufferHole,m=o.len>0&&o.len<1&&n.readyState<3,b=h-s;if(b>0&&(p||m)){if(b>i.maxBufferHole){let R=!1;if(s===0){const Y=r.getAppendedFrag(0,ce.MAIN);Y&&h<Y.end&&(R=!0)}if(!R&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,h))return 0;let Z=!1,ge=e.end;for(;ge<h;){const xe=_o(ge,r);if(xe)ge+=xe.duration;else{Z=!0;break}}if(Z)return 0}}const I=Math.max(h+Rc,s+Ic);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${I}`),this.moved=!0,n.currentTime=I,!(e!=null&&e.gap)){const R=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${I}`),Y={type:be.MEDIA_ERROR,details:J.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:R,reason:R.message,buffer:o.len,bufferInfo:o};e&&("fragment"in e?Y.part=e:Y.frag=e),this.hls.trigger(v.ERROR,Y)}return I}}return 0}_tryNudgeBuffer(e){const{hls:t,media:r,nudgeRetry:n}=this,i=t==null?void 0:t.config;if(!r||!i)return 0;const s=r.currentTime;if(this.nudgeRetry++,n<i.nudgeMaxRetry){const o=s+(n+1)*i.nudgeOffset,h=new Error(`Nudging 'currentTime' from ${s} to ${o}`);this.warn(h.message),r.currentTime=o,t.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.BUFFER_NUDGE_ON_STALL,error:h,fatal:!1,buffer:e.len,bufferInfo:e})}else{const o=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(o.message),t.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.BUFFER_STALLED_ERROR,error:o,fatal:!0,buffer:e.len,bufferInfo:e})}}}function uu(a,e){const t=cu(a.main);if(t&&t.start<=e)return t;const r=cu(a.audio);return r&&r.start<=e?r:null}function cu(a){if(!a)return null;switch(a.state){case kt.IDLE:case kt.STOPPED:case kt.ENDED:case kt.ERROR:return null}return a.frag}function _o(a,e){return e.getAppendedFrag(a,ce.MAIN)||e.getPartialFragment(a)}const Pc=.25;function ll(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function ul(a,e,t,r,n){let i=new a(e,t,"");try{i.value=r,n&&(i.type=n)}catch(s){i=new a(e,t,nr(n?x({type:n},r):r))}return i}const yo=(()=>{const a=ll();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class Oc{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.assetCue=void 0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(v.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var r;this.media=t.media,((r=t.overrides)==null?void 0:r.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){var e;const t=(e=this.hls)==null?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&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 r=e[t];if(r.kind==="metadata"&&r.label==="id3")return $l(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:r,enableID3MetadataCues:n}=this.hls.config;if(!r&&!n)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=ll();if(s)for(let o=0;o<i.length;o++){const h=i[o].type;if(h===Hn.emsg&&!r||!n)continue;const c=_a(i[o].data),p=i[o].pts;let m=p+i[o].duration;m>yo&&(m=yo),m-p<=0&&(m=p+Pc);for(let I=0;I<c.length;I++){const R=c[I];if(!Qa(R)){this.updateId3CueEnds(p,h);const Y=ul(s,p,m,R,h);Y&&this.id3Track.addCue(Y)}}}}updateId3CueEnds(e,t){var r;const n=(r=this.id3Track)==null?void 0:r.cues;if(n)for(let i=n.length;i--;){const s=n[i];s.type===t&&s.startTime<e&&s.endTime===yo&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:n}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:h}}=s;if(i&&(o||h)){let c;n==="audio"?c=p=>p.type===Hn.audioId3&&h:n==="video"?c=p=>p.type===Hn.emsg&&o:c=p=>p.type===Hn.audioId3&&h||p.type===Hn.emsg&&o,Yo(i,t,r,c)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.hls||!this.media)return;const{assetPlayerId:r,timelineOffset:n,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const o=ll();if(r&&n&&!s){const{fragmentStart:Y,fragmentEnd:Z}=e;let ge=this.assetCue;ge?(ge.startTime=Y,ge.endTime=Z):o&&(ge=this.assetCue=ul(o,Y,Z,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),ge&&(ge.id=r,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(ge),ge.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:h}=this,{dateRanges:c}=e,p=Object.keys(c);let m=this.dateRangeCuesAppended;if(h&&t){var b;if((b=h.cues)!=null&&b.length){const Y=Object.keys(m).filter(Z=>!p.includes(Z));for(let Z=Y.length;Z--;){var I;const ge=Y[Z],xe=(I=m[ge])==null?void 0:I.cues;delete m[ge],xe&&Object.keys(xe).forEach(Te=>{const $e=xe[Te];if($e){$e.removeEventListener("enter",this.onEventCueEnter);try{h.removeCue($e)}catch(We){}}})}}else m=this.dateRangeCuesAppended={}}const R=e.fragments[e.fragments.length-1];if(!(p.length===0||!y(R==null?void 0:R.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let Y=0;Y<p.length;Y++){const Z=p[Y],ge=c[Z],xe=ge.startTime,Te=m[Z],$e=(Te==null?void 0:Te.cues)||{};let We=(Te==null?void 0:Te.durationKnown)||!1,xt=yo;const{duration:Ye,endDate:ft}=ge;if(ft&&Ye!==null)xt=xe+Ye,We=!0;else if(ge.endOnNext&&!We){const et=p.reduce((Mt,rr)=>{if(rr!==ge.id){const pr=c[rr];if(pr.class===ge.class&&pr.startDate>ge.startDate&&(!Mt||ge.startDate<Mt.startDate))return pr}return Mt},null);et&&(xt=et.startTime,We=!0)}const dt=Object.keys(ge.attr);for(let et=0;et<dt.length;et++){const Mt=dt[et];if(!$i(Mt))continue;const rr=$e[Mt];if(rr)We&&!(Te!=null&&Te.durationKnown)?rr.endTime=xt:Math.abs(rr.startTime-xe)>.01&&(rr.startTime=xe,rr.endTime=xt);else if(o){let pr=ge.attr[Mt];is(Mt)&&(pr=W(pr));const mr=ul(o,xe,xt,{key:Mt,data:pr},Hn.dateRange);mr&&(mr.id=Z,this.id3Track.addCue(mr),$e[Mt]=mr,s&&(Mt==="X-ASSET-LIST"||Mt==="X-ASSET-URL")&&mr.addEventListener("enter",this.onEventCueEnter))}}m[Z]={cues:$e,dateRange:ge,durationKnown:We}}}}}class Fc{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,r=this.levelDetails;if(!t||!r)return;this.currentTime=t.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!r.live)return;const o=this.targetLatency;if(o===null)return;const h=n-o,c=Math.min(this.maxLatency,o+r.targetduration);if(h<c&&h>.05&&this.forwardBufferLength>1){const m=Math.min(2,Math.max(1,s)),b=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20,I=Math.min(m,Math.max(1,b));this.changeMediaPlaybackRate(t,I)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:r,targetduration:n}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:o}=this.config,h=this.hls.userConfig;let c=o&&r||t;(this._targetLatencyUpdated||h.liveSyncDuration||h.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*n);const p=n;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,p)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const r=this.levelDetails;if(r===null)return null;const n=r.edge,i=e-t-this.edgeStalled,s=n-r.totalduration,o=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,i),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 r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var r;t.details===J.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(r=this.levelDetails)!=null&&r.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var r,n;e.playbackRate!==t&&((r=this.hls)==null||r.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(n=this.targetLatency)==null?void 0:n.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class Mc extends Uo{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const r=this.hls.config.preferManagedMediaSource,n=[],i={},s={};let o=!1,h=!1,c=!1;t.levels.forEach(p=>{const m=p.attrs;let{audioCodec:b,videoCodec:I}=p;b&&(p.audioCodec=b=le(b,r)||void 0),I&&(I=p.videoCodec=sr(I));const{width:R,height:Y,unknownCodecs:Z}=p,ge=(Z==null?void 0:Z.length)||0;if(o||(o=!!(R&&Y)),h||(h=!!I),c||(c=!!b),ge||b&&!this.isAudioSupported(b)||I&&!this.isVideoSupported(I)){this.log(`Some or all CODECS not supported "${m.CODECS}"`);return}const{CODECS:xe,"FRAME-RATE":Te,"HDCP-LEVEL":$e,"PATHWAY-ID":We,RESOLUTION:xt,"VIDEO-RANGE":Ye}=m,dt=`${`${We||"."}-`}${p.bitrate}-${xt}-${Te}-${xe}-${Ye}-${$e}`;if(i[dt])if(i[dt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const et=s[dt]+=1;p.attrs["PATHWAY-ID"]=new Array(et+1).join(".");const Mt=this.createLevel(p);i[dt]=Mt,n.push(Mt)}else i[dt].addGroupId("audio",m.AUDIO),i[dt].addGroupId("text",m.SUBTITLES);else{const et=this.createLevel(p);i[dt]=et,s[dt]=1,n.push(et)}}),this.filterAndSortMediaOptions(n,t,o,h,c)}createLevel(e){const t=new Zt(e),r=e.supplemental;if(r!=null&&r.videoCodec&&!this.isVideoSupported(r.videoCodec)){const n=new Error(`SUPPLEMENTAL-CODECS not supported "${r.videoCodec}"`);this.log(n.message),t.supportedResult=Ot(n,[])}return t}isAudioSupported(e){return Ae(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ae(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,r,n,i){var s;let o=[],h=[],c=e;const p=((s=t.stats)==null?void 0:s.parsing)||{};if((r||n)&&i&&(c=c.filter(({videoCodec:xe,videoRange:Te,width:$e,height:We})=>(!!xe||!!($e&&We))&&Dt(Te))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let xe="no level with compatible codecs found in manifest",Te=xe;t.levels.length&&(Te=`one or more CODECS in variant not supported: ${nr(t.levels.map(We=>We.attrs.CODECS).filter((We,xt,Ye)=>Ye.indexOf(We)===xt))}`,this.warn(Te),xe+=` (${Te})`);const $e=new Error(xe);this.hls.trigger(v.ERROR,{type:be.MEDIA_ERROR,details:J.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:$e,reason:Te})}}),p.end=performance.now();return}t.audioTracks&&(o=t.audioTracks.filter(xe=>!xe.audioCodec||this.isAudioSupported(xe.audioCodec)),hu(o)),t.subtitles&&(h=t.subtitles,hu(h));const m=c.slice(0);c.sort((xe,Te)=>{if(xe.attrs["HDCP-LEVEL"]!==Te.attrs["HDCP-LEVEL"])return(xe.attrs["HDCP-LEVEL"]||"")>(Te.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&xe.height!==Te.height)return xe.height-Te.height;if(xe.frameRate!==Te.frameRate)return xe.frameRate-Te.frameRate;if(xe.videoRange!==Te.videoRange)return Ze.indexOf(xe.videoRange)-Ze.indexOf(Te.videoRange);if(xe.videoCodec!==Te.videoCodec){const $e=X(xe.videoCodec),We=X(Te.videoCodec);if($e!==We)return We-$e}if(xe.uri===Te.uri&&xe.codecSet!==Te.codecSet){const $e=he(xe.codecSet),We=he(Te.codecSet);if($e!==We)return We-$e}return xe.averageBitrate!==Te.averageBitrate?xe.averageBitrate-Te.averageBitrate:0});let b=m[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==m.length)){for(let xe=0;xe<m.length;xe++)if(m[xe].pathwayId===c[0].pathwayId){b=m[xe];break}}this._levels=c;for(let xe=0;xe<c.length;xe++)if(c[xe]===b){var I;this._firstLevel=xe;const Te=b.bitrate,$e=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${Te}`),((I=this.hls.userConfig)==null?void 0:I.abrEwmaDefaultEstimate)===void 0){const We=Math.min(Te,this.hls.config.abrEwmaDefaultEstimateMax);We>$e&&$e===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=We)}break}const R=i&&!n,Y=this.hls.config,Z=!!(Y.audioStreamController&&Y.audioTrackController),ge={levels:c,audioTracks:o,subtitleTracks:h,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:n,altAudio:Z&&!R&&o.some(xe=>!!xe.url)};p.end=performance.now(),this.hls.trigger(v.MANIFEST_PARSED,ge)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const p=new Error("invalid level idx"),m=e<0;if(this.hls.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.LEVEL_SWITCH_ERROR,level:e,fatal:m,error:p,reason:p.message}),m)return;e=Math.min(e,t.length-1)}const r=this.currentLevelIndex,n=this.currentLevel,i=n?n.attrs["PATHWAY-ID"]:void 0,s=t[e],o=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,r===e&&n&&i===o)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${o?" with Pathway "+o:""} from level ${r}${i?" with Pathway "+i:""}`);const h={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(v.LEVEL_SWITCHING,h);const c=s.details;if(!c||c.live){const p=this.switchParams(s.uri,n==null?void 0:n.details,c);this.loadPlaylist(p)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),r=e.filter(n=>t.indexOf(n)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=r}}onError(e,t){t.fatal||!t.context||t.context.type===de.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ce.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(i=>!!r[i]))return;const n=this._levels[t.level];n!=null&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var r;const{level:n,details:i}=t,s=t.levelInfo;if(!s){var o;this.warn(`Invalid level index ${n}`),(o=t.deliveryDirectives)!=null&&o.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let h=s.details;h===t.details&&h.advanced&&(h=void 0),this.playlistLoaded(n,t,h)}else(r=t.deliveryDirectives)!=null&&r.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=this.getUrlWithDirectives(e.uri,t),n=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,o=s==null?void 0:s.age;this.log(`Loading level index ${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${r}`),this.hls.trigger(v.LEVEL_LOADING,{url:r,level:n,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const r=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(o=>o.level=-1)),!1));Oa(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const n=r.length-1;this._firstLevel=Math.min(this._firstLevel,n),this._startLevel&&(this._startLevel=Math.min(this._startLevel,n)),this.hls.trigger(v.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(v.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function hu(a){const e={};a.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}function du(){return self.SourceBuffer||self.WebKitSourceBuffer}function fu(){if(!De())return!1;const e=du();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Bc(){if(!fu())return!1;const a=De();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(j(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(j(e,"audio"))))}function Nc(){var a;const e=du();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const $c=100;class Uc extends vs{constructor(e,t,r){super(e,t,r,"stream-controller",ce.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const n=this.media,i=n?n.currentTime:null;if(i===null||!y(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(n,i,ce.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:r,hls:n}=this;if(this.stopLoad(),this.setInterval($c),this.level=-1,!this.startFragRequested){let i=n.startLevel;i===-1&&(n.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=n.firstAutoLevel),n.nextLoadLevel=i,this.level=n.loadLevel,this._hasEnoughToStart=!!t}r>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r),this.state=kt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=kt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case kt.WAITING_LEVEL:{const{levels:e,level:t}=this,r=e==null?void 0:e[t],n=r==null?void 0:r.details;if(n&&(!n.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(n))break;this.state=kt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=kt.IDLE;break}break}case kt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===kt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:r,media:n}=this;if(t===null||!n&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[i]))return;const s=r[i],o=this.getMainFwdBufferInfo();if(o===null)return;const h=this.getLevelDetails();if(h&&this._streamEnded(o,h)){const Y={};this.altAudio===2&&(Y.type="video"),this.hls.trigger(v.BUFFER_EOS,Y),this.state=kt.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const c=s.details;if(!c||this.state===kt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=kt.WAITING_LEVEL,this.startFragRequested=!1;return}const p=o.len,m=this.getMaxBufferLength(s.maxBitrate);if(p>=m)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const b=this.backtrackFragment?this.backtrackFragment.start:o.end;let I=this.getNextFragment(b,c);if(this.couldBacktrack&&!this.fragPrevious&&I&&Be(I)&&this.fragmentTracker.getState(I)!==Xt.OK){var R;const Z=((R=this.backtrackFragment)!=null?R:I).sn-c.startSN,ge=c.fragments[Z-1];ge&&I.cc===ge.cc&&(I=ge,this.fragmentTracker.removeFragment(ge))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(I&&this.isLoopLoading(I,b)){if(!I.gap){const Z=this.audioOnly&&!this.altAudio?K.AUDIO:K.VIDEO,ge=(Z===K.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;ge&&this.afterBufferFlushed(ge,Z,ce.MAIN)}I=this.getNextFragmentLoopLoading(I,c,o,ce.MAIN,m)}I&&(I.initSegment&&!I.initSegment.data&&!this.bitrateTest&&(I=I.initSegment),this.loadFragment(I,s,b))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);n===Xt.NOT_LOADED||n===Xt.PARTIAL?Be(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,r):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,ce.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let r;const n=this.getAppendedFrag(t.currentTime);n&&n.start>1&&this.flushMainBuffer(0,n.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<i.targetduration*2)return}if(!t.paused&&e){const o=this.hls.nextLoadLevel,h=e[o],c=this.fragLastKbps;c&&this.fragCurrent?r=this.fragCurrent.duration*h.maxBitrate/(1e3*c)+1:r=0}else r=0;const s=this.getBufferedFrag(t.currentTime+r);if(s){const o=this.followingBufferedFrag(s);if(o){this.abortCurrentFrag();const h=o.maxStartPTS?o.maxStartPTS:o.start,c=o.duration,p=Math.max(s.end,h+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(p,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case kt.KEY_LOADING:case kt.FRAG_LOADING:case kt.FRAG_LOADING_WAITING_RETRY:case kt.PARSING:case kt.PARSED:this.state=kt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const r=t.media;jn(r,"playing",this.onMediaPlaying),jn(r,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:r}=this;r&&(Vn(r,"playing",this.onMediaPlaying),Vn(r,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(v.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let r=!1,n=!1;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(r=r||s.indexOf("mp4a.40.2")!==-1,n=n||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=r&&n&&!Nc(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:r}=this;if(!r||this.state!==kt.IDLE)return;const n=t.levelInfo;(!n.details||n.details.live&&(this.levelLastLoaded!==n||n.details.expired)||this.waitForCdnTuneIn(n.details))&&(this.state=kt.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n,startFragRequested:i}=this,s=t.level,o=t.details,h=o.totalduration;if(!n){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${h}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===kt.FRAG_LOADING||this.state===kt.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let m=0;if(o.live||(r=c.details)!=null&&r.live){var b;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;m=this.alignPlaylists(o,c.details,(b=this.levelLastLoaded)==null?void 0:b.details)}if(c.details=o,this.levelLastLoaded=c,i||this.setStartPosition(o,m),this.hls.trigger(v.LEVEL_UPDATED,{details:o,level:s}),this.state===kt.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=kt.IDLE}i&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,o=e.edge,h=i>=s-t.maxFragLookUpTolerance&&i<=o;if(n!==null&&r.duration>n&&(i<n||!h)){const p=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!h&&r.readyState<4||i<o-p)&&(this._hasEnoughToStart||(this.nextLoadPosition=n),r.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${n.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const m=kr.bufferInfo(r,n,0);if(!((c=m.buffered)!=null&&c.length)){r.currentTime=n;return}if(m.start<=i){r.currentTime=n;return}const{nextStart:I}=kr.bufferedInfo(m.buffered,i,0);I&&(r.currentTime=I)}else r.currentTime=n}}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const o=s[r.level];if(!o){this.warn(`Level ${r.level} not found on progress`);return}const h=o.details;if(!h){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const c=o.videoCodec,p=h.PTSKnown||!h.live,m=(t=r.initSegment)==null?void 0:t.data,b=this._getAudioCodec(o),I=this.transmuxer=this.transmuxer||new vl(this.hls,ce.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),R=n?n.index:-1,Y=R!==-1,Z=new vi(r.level,r.sn,r.stats.chunkCount,i.byteLength,R,Y),ge=this.initPTS[r.cc];I.push(i,m,b,c,r,n,h.totalduration,p,Z,ge)}onAudioTrackSwitching(e,t){const r=this.hls,n=this.altAudio!==0;if(rn(t.url,r))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(n){this.altAudio=0,this.fragmentTracker.removeAllFragments(),r.once(v.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(v.AUDIO_TRACK_SWITCHED,t)}),r.trigger(v.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}r.trigger(v.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=rn(t.url,this.hls);if(r){const n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r?2:0,this.tick()}onBufferCreated(e,t){const r=t.tracks;let n,i,s=!1;for(const o in r){const h=r[o];if(h.id==="main"){if(i=o,n=h,o==="video"){const c=r[o];c&&(this.videoBuffer=c.buffer)}}else s=!0}s&&n?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:r,part:n}=t,i=r.type===ce.MAIN;if(i){if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}`),this.state===kt.PARSED&&(this.state=kt.IDLE);return}const o=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),Be(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}const s=this.media;s&&(!this._hasEnoughToStart&&kr.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var r;if(t.fatal){this.state=kt.ERROR;return}switch(t.details){case J.FRAG_GAP:case J.FRAG_PARSING_ERROR:case J.FRAG_DECRYPT_ERROR:case J.FRAG_LOAD_ERROR:case J.FRAG_LOAD_TIMEOUT:case J.KEY_LOAD_ERROR:case J.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ce.MAIN,t);break;case J.LEVEL_LOAD_ERROR:case J.LEVEL_LOAD_TIMEOUT:case J.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===kt.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===de.LEVEL&&(this.state=kt.IDLE);break;case J.BUFFER_ADD_CODEC_ERROR:case J.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case J.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case J.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=kt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==K.AUDIO||!this.altAudio){const r=(t===K.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;r&&(this.afterBufferFlushed(r,t,ce.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let r=this.startPosition;if(r>=0&&t<r){if(e.seeking){this.log(`could not seek to ${r}, already seeking at ${t}`);return}const n=this.timelineOffset;n&&r&&(r+=n);const i=this.getLevelDetails(),s=kr.getBuffered(e),o=s.length?s.start(0):0,h=o-r,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||h>0&&(h<c||this.loadingParts&&h<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${h} to match buffer start`),r+=h,this.startPosition=r),t<r&&(this.log(`seek to target start position ${r} from current time ${t} buffer start ${o}`),e.currentTime=r)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(r=>{const{hls:n}=this,i=r==null?void 0:r.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=kt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),n.trigger(v.FRAG_LOADED,r),i.bitrateTest=!1}).catch(r=>{this.state===kt.STOPPED||this.state===kt.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:r}=this,{remuxResult:n,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:o,part:h,level:c}=s,{video:p,text:m,id3:b,initSegment:I}=n,{details:R}=c,Y=this.altAudio?void 0:n.audio;if(this.fragContextChanged(o)){this.fragmentTracker.removeFragment(o);return}if(this.state=kt.PARSING,I){const Z=I.tracks;if(Z){const $e=o.initSegment||o;if(this.unhandledEncryptionError(I,o))return;this._bufferInitSegment(c,Z,$e,i),r.trigger(v.FRAG_PARSING_INIT_SEGMENT,{frag:$e,id:t,tracks:Z})}const ge=I.initPTS,xe=I.timescale,Te=this.initPTS[o.cc];if(y(ge)&&(!Te||Te.baseTime!==ge||Te.timescale!==xe)){const $e=I.trackId;this.initPTS[o.cc]={baseTime:ge,timescale:xe,trackId:$e},r.trigger(v.INIT_PTS_FOUND,{frag:o,id:t,initPTS:ge,timescale:xe,trackId:$e})}}if(p&&R){Y&&p.type==="audiovideo"&&this.logMuxedErr(o);const Z=R.fragments[o.sn-1-R.startSN],ge=o.sn===R.startSN,xe=!Z||o.cc>Z.cc;if(n.independent!==!1){const{startPTS:Te,endPTS:$e,startDTS:We,endDTS:xt}=p;if(h)h.elementaryStreams[p.type]={startPTS:Te,endPTS:$e,startDTS:We,endDTS:xt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!xe&&(this.couldBacktrack=!0),p.dropped&&p.independent){const Ye=this.getMainFwdBufferInfo(),ft=(Ye?Ye.end:this.getLoadPosition())+this.config.maxBufferHole,dt=p.firstKeyFramePTS?p.firstKeyFramePTS:Te;if(!ge&&ft<dt-this.config.maxBufferHole&&!xe){this.backtrack(o);return}else xe&&(o.gap=!0);o.setElementaryStreamInfo(p.type,o.start,$e,o.start,xt,!0)}else ge&&Te-(R.appliedTimelineOffset||0)>vo&&(o.gap=!0);o.setElementaryStreamInfo(p.type,Te,$e,We,xt),this.backtrackFragment&&(this.backtrackFragment=o),this.bufferFragmentData(p,o,h,i,ge||xe)}else if(ge||xe)o.gap=!0;else{this.backtrack(o);return}}if(Y){const{startPTS:Z,endPTS:ge,startDTS:xe,endDTS:Te}=Y;h&&(h.elementaryStreams[K.AUDIO]={startPTS:Z,endPTS:ge,startDTS:xe,endDTS:Te}),o.setElementaryStreamInfo(K.AUDIO,Z,ge,xe,Te),this.bufferFragmentData(Y,o,h,i)}if(R&&b!=null&&b.samples.length){const Z={id:t,frag:o,details:R,samples:b.samples};r.trigger(v.FRAG_PARSING_METADATA,Z)}if(R&&m){const Z={id:t,frag:o,details:R,samples:m.samples};r.trigger(v.FRAG_PARSING_USERDATA,Z)}}logMuxedErr(e){this.warn(`${Be(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,r,n){if(this.state!==kt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(r));const{audio:i,video:s,audiovideo:o}=t;if(i){const c=e.audioCodec;let p=$t(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const m=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){p&&(p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5");const b=i.metadata;b&&"channelCount"in b&&(b.channelCount||1)!==1&&m.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&m.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(p="mp4a.40.2",this.log(`Android: force audio codec to ${p}`)),c&&c!==p&&this.log(`Swapping manifest audio codec "${c}" for "${p}"`),i.levelCodec=p,i.id=ce.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${p||""}/${c||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=ce.MAIN;const c=s.codec;if((c==null?void 0:c.length)===4)switch(c){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${c}]${s.codec!==c?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}o&&(this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),delete t.video,delete t.audio);const h=Object.keys(t);if(h.length){if(this.hls.trigger(v.BUFFER_CODECS,t),!this.hls)return;h.forEach(c=>{const m=t[c].initSegment;m!=null&&m.byteLength&&this.hls.trigger(v.BUFFER_APPENDING,{type:c,data:m,frag:r,part:null,chunkMeta:n,parent:r.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,ce.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,r=e==null?void 0:e[t];return r?this.getMaxBufferLength(r.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=kt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(kr.isBuffered(e,r)?t=this.getAppendedFrag(r):kr.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;const n=this.fragPlaying,i=t.level;(!n||t.sn!==n.sn||n.level!==i)&&(this.fragPlaying=t,this.hls.trigger(v.FRAG_CHANGED,{frag:t}),(!n||n.level!==i)&&this.hls.trigger(v.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return y(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(y(t)){const r=this.getLevelDetails(),n=this.currentFrag||(r?an(null,r.fragments,t):null);if(n){const i=n.programDateTime;if(i!==null){const s=i+(t-n.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class zc extends H{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyIdToKeyInfo){const n=this.keyIdToKeyInfo[r].loader;if(n){var t;if(e&&e!==((t=n.context)==null?void 0:t.frag.type))return;n.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=J.KEY_LOAD_ERROR,r,n,i){return new Kr({type:be.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:r,networkDetails:n})}loadClear(e,t,r){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let n=0,i=t.length;n<i;n++){const s=t[n];if(e.cc<=s.cc&&(!Be(e)||!Be(s)||e.sn<s.sn)||!r&&n==i-1)return this.emeController.selectKeySystemFormat(s).then(o=>{if(!this.emeController)return;s.setKeyFormat(o);const h=yi(o);if(h)return this.emeController.getKeySystemAccess([h])})}if(this.config.requireKeySystemAccessOnStart){const n=bi(this.config);if(n.length)return this.emeController.getKeySystemAccess(n)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var r,n;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:`Missing decryption data on fragment in onKeyLoading (emeEnabled with controller: ${this.emeController&&this.config.emeEnabled})`);return Promise.reject(this.createKeyLoadError(e,J.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,J.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const o=cl(i);let h=this.keyIdToKeyInfo[o];if((r=h)!=null&&r.decryptdata.key)return i.key=h.decryptdata.key,Promise.resolve({frag:e,keyInfo:h});if(this.emeController&&(n=h)!=null&&n.keyLoadPromise)switch(this.emeController.getKeyStatus(h.decryptdata)){case"usable":case"usable-in-future":return h.keyLoadPromise.then(p=>{const{keyInfo:m}=p;return i.key=m.decryptdata.key,{frag:e,keyInfo:m}})}switch(this.log(`${this.keyIdToKeyInfo[o]?"Rel":"L"}oading${i.keyId?" keyId: "+re(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),h=this.keyIdToKeyInfo[o]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(h,e):this.loadKeyEME(h,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(h,e);default:return Promise.reject(this.createKeyLoadError(e,J.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var n;if(!e.decryptdata.keyId&&(n=t.initSegment)!=null&&n.data){const s=Rt(t.initSegment.data);if(s.length){let o=s[0];o.some(h=>h!==0)?(this.log(`Using keyId found in init segment ${re(o)}`),Li.setKeyIdForUri(e.decryptdata.uri,o)):(o=Li.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${re(o)}`)),e.decryptdata.keyId=o}}if(!e.decryptdata.keyId&&!Be(t))return Promise.resolve(r);const i=this.emeController.loadKey(r);return(e.keyLoadPromise=i.then(s=>(e.mediaKeySessionContext=s,r))).catch(s=>{throw e.keyLoadPromise=null,"data"in s&&(s.data.frag=t),s})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,n=r.loader,i=new n(r);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,o)=>{const h={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=r.keyLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(b,I,R,Y)=>{const{frag:Z,keyInfo:ge}=R,xe=cl(ge.decryptdata);if(!Z.decryptdata||ge!==this.keyIdToKeyInfo[xe])return o(this.createKeyLoadError(Z,J.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),Y));ge.decryptdata.key=Z.decryptdata.key=new Uint8Array(b.data),Z.keyLoader=null,ge.loader=null,s({frag:Z,keyInfo:ge})},onError:(b,I,R,Y)=>{this.resetLoader(I),o(this.createKeyLoadError(t,J.KEY_LOAD_ERROR,new Error(`HTTP Error ${b.code} loading key ${b.text}`),R,x({url:h.url,data:void 0},b)))},onTimeout:(b,I,R)=>{this.resetLoader(I),o(this.createKeyLoadError(t,J.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),R))},onAbort:(b,I,R)=>{this.resetLoader(I),o(this.createKeyLoadError(t,J.INTERNAL_ABORTED,new Error("key loading aborted"),R))}};i.load(h,p,m)})}resetLoader(e){const{frag:t,keyInfo:r,url:n}=e,i=r.loader;t.keyLoader===i&&(t.keyLoader=null,r.loader=null);const s=cl(r.decryptdata)||n;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function cl(a){if(a.keyFormat!==Qr.FAIRPLAY){const e=a.keyId;if(e)return re(e)}return a.uri}function pu(a){const{type:e}=a;switch(e){case de.AUDIO_TRACK:return ce.AUDIO;case de.SUBTITLE_TRACK:return ce.SUBTITLE;default:return ce.MAIN}}function hl(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Gc{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(v.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(v.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,n=t.loader,i=r||n,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:r}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:de.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:i,url:s,deliveryDirectives:o,levelInfo:h}=t;this.load({id:r,level:n,pathwayId:i,responseType:"text",type:de.LEVEL,url:s,deliveryDirectives:o,levelOrTrack:h})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:o}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:de.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:o})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:o}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:de.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:o})}onLevelsUpdated(e,t){const r=this.loaders[de.LEVEL];if(r){const n=r.context;n&&!t.levels.some(i=>i===n.levelOrTrack)&&(r.abort(),delete this.loaders[de.LEVEL])}}load(e){var t;const r=this.hls.config;let n=this.getInternalLoader(e);if(n){const c=this.hls.logger,p=n.context;if(p&&p.levelOrTrack===e.levelOrTrack&&(p.url===e.url||p.deliveryDirectives&&!e.deliveryDirectives)){p.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${p.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let i;if(e.type===de.MANIFEST?i=r.manifestLoadPolicy.default:i=E({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),y((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===de.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===de.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===de.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,m=c.targetduration;if(p&&m){const b=Math.max(p*3,m*.8)*1e3;i=E({},i,{maxTimeToFirstByteMs:Math.min(b,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(b,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},o={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},h={onSuccess:(c,p,m,b)=>{const I=this.getInternalLoader(m);this.resetInternalLoader(m.type);const R=c.data;p.parsing.start=performance.now(),xi.isMediaPlaylist(R)||m.type!==de.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,m,b||null,I):this.handleMasterPlaylist(c,p,m,b)},onError:(c,p,m,b)=>{this.handleNetworkError(p,m,!1,c,b)},onTimeout:(c,p,m)=>{this.handleNetworkError(p,m,!0,void 0,c)}};n.load(e,o,h)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:r}=this.hls;(e||r)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,r,n){const i=this.hls,s=e.data,o=hl(e,r),h=xi.parseMasterPlaylist(s,o);if(h.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,r,h.playlistParsingError,n,t);return}const{contentSteering:c,levels:p,sessionData:m,sessionKeys:b,startTimeOffset:I,variableList:R}=h;this.variableList=R,p.forEach(xe=>{const{unknownCodecs:Te}=xe;if(Te){const{preferManagedMediaSource:$e}=this.hls.config;let{audioCodec:We,videoCodec:xt}=xe;for(let Ye=Te.length;Ye--;){const ft=Te[Ye];Ae(ft,"audio",$e)?(xe.audioCodec=We=We?`${We},${ft}`:ft,Xe.audio[We.substring(0,4)]=2,Te.splice(Ye,1)):Ae(ft,"video",$e)&&(xe.videoCodec=xt=xt?`${xt},${ft}`:ft,Xe.video[xt.substring(0,4)]=2,Te.splice(Ye,1))}}});const{AUDIO:Y=[],SUBTITLES:Z,"CLOSED-CAPTIONS":ge}=xi.parseMasterPlaylistMedia(s,o,h);Y.length&&!Y.some(Te=>!Te.url)&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),Y.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Fr({}),bitrate:0,url:""})),i.trigger(v.MANIFEST_LOADED,{levels:p,audioTracks:Y,subtitles:Z,captions:ge,contentSteering:c,url:o,stats:t,networkDetails:n,sessionData:m,sessionKeys:b,startTimeOffset:I,variableList:R})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:o,level:h,type:c}=r,p=hl(e,r),m=y(h)?h:y(o)?o:0,b=pu(r),I=xi.parseLevelPlaylist(e.data,p,m,b,0,this.variableList);if(c===de.MANIFEST){const R={attrs:new Fr({}),bitrate:0,details:I,name:"",url:p};I.requestScheduled=t.loading.start+Pi(I,0),s.trigger(v.MANIFEST_LOADED,{levels:[R],audioTracks:[],url:p,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=I,this.handlePlaylistLoaded(I,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(v.ERROR,{type:be.NETWORK_ERROR,details:J.MANIFEST_PARSING_ERROR,fatal:t.type===de.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:n,stats:i})}handleNetworkError(e,t,r=!1,n,i){let s=`A network ${r?"timeout":"error"+(n?" (status "+n.code+")":"")} occurred while loading ${e.type}`;e.type===de.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===de.AUDIO_TRACK||e.type===de.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let h=J.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case de.MANIFEST:h=r?J.MANIFEST_LOAD_TIMEOUT:J.MANIFEST_LOAD_ERROR,c=!0;break;case de.LEVEL:h=r?J.LEVEL_LOAD_TIMEOUT:J.LEVEL_LOAD_ERROR,c=!1;break;case de.AUDIO_TRACK:h=r?J.AUDIO_TRACK_LOAD_TIMEOUT:J.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case de.SUBTITLE_TRACK:h=r?J.SUBTITLE_TRACK_LOAD_TIMEOUT:J.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const m={type:be.NETWORK_ERROR,details:h,fatal:c,url:e.url,loader:p,context:e,error:o,networkDetails:t,stats:i};if(n){const b=(t==null?void 0:t.url)||e.url;m.response=x({url:b,data:void 0},n)}this.hls.trigger(v.ERROR,m)}handlePlaylistLoaded(e,t,r,n,i,s){const o=this.hls,{type:h,level:c,levelOrTrack:p,id:m,groupId:b,deliveryDirectives:I}=n,R=hl(t,n),Y=pu(n);let Z=typeof n.level=="number"&&Y===ce.MAIN?c:void 0;const ge=e.playlistParsingError;if(ge){if(this.hls.logger.warn(`${ge} ${e.url}`),!o.config.ignorePlaylistParsingErrors){o.trigger(v.ERROR,{type:be.NETWORK_ERROR,details:J.LEVEL_PARSING_ERROR,fatal:!1,url:R,error:ge,reason:ge.message,response:t,context:n,level:Z,parent:Y,networkDetails:i,stats:r});return}e.playlistParsingError=null}if(!e.fragments.length){const xe=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(v.ERROR,{type:be.NETWORK_ERROR,details:J.LEVEL_EMPTY_ERROR,fatal:!1,url:R,error:xe,reason:xe.message,response:t,context:n,level:Z,parent:Y,networkDetails:i,stats:r});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),h){case de.MANIFEST:case de.LEVEL:if(Z){if(!p)Z=0;else if(p!==o.levels[Z]){const xe=o.levels.indexOf(p);xe>-1&&(Z=xe)}}o.trigger(v.LEVEL_LOADED,{details:e,levelInfo:p||o.levels[0],level:Z||0,id:m||0,stats:r,networkDetails:i,deliveryDirectives:I,withoutMultiVariant:h===de.MANIFEST});break;case de.AUDIO_TRACK:o.trigger(v.AUDIO_TRACK_LOADED,{details:e,track:p,id:m||0,groupId:b||"",stats:r,networkDetails:i,deliveryDirectives:I});break;case de.SUBTITLE_TRACK:o.trigger(v.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:m||0,groupId:b||"",stats:r,networkDetails:i,deliveryDirectives:I});break}}}class ms{static get version(){return _s}static isMSESupported(){return fu()}static isSupported(){return Bc()}static getMediaSource(){return De()}static get Events(){return v}static get MetadataSchema(){return Hn}static get ErrorTypes(){return be}static get ErrorDetails(){return J}static get DefaultConfig(){return ms.defaultConfig?ms.defaultConfig:Ac}static set DefaultConfig(e){ms.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 Fs,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=ve(e.debug||!1,"Hls instance",e.assetPlayerId),r=this.config=Dc(ms.DefaultConfig,e,t);this.userConfig=e,r.progressive&&Cc(r,t);const{abrController:n,bufferController:i,capLevelController:s,errorController:o,fpsController:h}=r,c=new o(this),p=this.abrController=new n(this),m=new dr(this),b=r.interstitialsController,I=b?this.interstitialsController=new b(this,ms):null,R=this.bufferController=new i(this,m),Y=this.capLevelController=new s(this),Z=new h(this),ge=new Gc(this),xe=r.contentSteeringController,Te=xe?new xe(this):null,$e=this.levelController=new Mc(this,Te),We=new Oc(this),xt=new zc(this.config,this.logger),Ye=this.streamController=new Uc(this,m,xt),ft=this.gapController=new kc(this,m);Y.setStreamController(Ye),Z.setStreamController(Ye);const dt=[ge,$e,Ye];I&&dt.splice(1,0,I),Te&&dt.splice(1,0,Te),this.networkControllers=dt;const et=[p,R,ft,Y,Z,We,m];this.audioTrackController=this.createController(r.audioTrackController,dt);const Mt=r.audioStreamController;Mt&&dt.push(this.audioStreamController=new Mt(this,m,xt)),this.subtitleTrackController=this.createController(r.subtitleTrackController,dt);const rr=r.subtitleStreamController;rr&&dt.push(this.subtititleStreamController=new rr(this,m,xt)),this.createController(r.timelineController,et),xt.emeController=this.emeController=this.createController(r.emeController,et),this.cmcdController=this.createController(r.cmcdController,et),this.latencyController=this.createController(Fc,et),this.coreComponents=et,dt.push(c);const pr=c.onErrorOut;typeof pr=="function"&&this.on(v.ERROR,pr,c),this.on(v.MANIFEST_LOADED,ge.onManifestLoaded,ge)}createController(e,t){if(e){const r=new e(this);return t&&t.push(r),r}return null}on(e,t,r=this){this._emitter.on(e,t,r)}once(e,t,r=this){this._emitter.once(e,t,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,r=this,n){this._emitter.off(e,t,r,n)}listeners(e){return this._emitter.listeners(e)}emit(e,t,r){return this._emitter.emit(e,t,r)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(r){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const n=e===v.ERROR;this.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(v.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(v.ERROR,{type:be.OTHER_ERROR,details:J.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,r=t?e.media:e,n=t?e:{media:r};this._media=r,this.trigger(v.MEDIA_ATTACHING,n)}detachMedia(){this.logger.log("detachMedia"),this.trigger(v.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(v.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,r=this._url,n=this._url=S.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${n}`),t&&r&&(r!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(v.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(e,t),!(!this.started||!this.networkControllers));r++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[ce.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ce.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ce.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=k0()),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){lt(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const r=e.length;for(let n=0;n<r;n++)if(e[n].maxBitrate>=t)return n;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:r}=this;let n;if(t===-1&&e!=null&&e.length?n=e.length-1:n=t,r)for(let i=n;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=r)return i}return n}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const r=Xr(t);return bt(e,r,navigator.mediaCapabilities)}}ms.defaultConfig=void 0},16722:function(Vt,it,k){"use strict";k.d(it,{Z:function(){return ce}});const y=l=>typeof l=="object"&&l!=null&&l.nodeType===1,Ee=(l,V)=>(!V||l!=="hidden")&&l!=="visible"&&l!=="clip",ie=(l,V)=>{if(l.clientHeight<l.scrollHeight||l.clientWidth<l.scrollWidth){const B=getComputedStyle(l,null);return Ee(B.overflowY,V)||Ee(B.overflowX,V)||(E=>{const L=(x=>{if(!x.ownerDocument||!x.ownerDocument.defaultView)return null;try{return x.ownerDocument.defaultView.frameElement}catch(P){return null}})(E);return!!L&&(L.clientHeight<E.scrollHeight||L.clientWidth<E.scrollWidth)})(l)}return!1},be=(l,V,B,E,L,x,P,q)=>x<l&&P>V||x>l&&P<V?0:x<=l&&q<=B||P>=V&&q>=B?x-l-E:P>V&&q<B||x<l&&q>B?P-V+L:0,J=l=>{const V=l.parentElement;return V==null?l.getRootNode().host||null:V},v=(l,V)=>{var B,E,L,x;if(typeof document=="undefined")return[];const{scrollMode:P,block:q,inline:H,boundary:U,skipOverflowHiddenElements:A}=V,z=typeof U=="function"?U:He=>He!==U;if(!y(l))throw new TypeError("Invalid target");const O=document.scrollingElement||document.documentElement,N=[];let oe=l;for(;y(oe)&&z(oe);){if(oe=J(oe),oe===O){N.push(oe);break}oe!=null&&oe===document.body&&ie(oe)&&!ie(document.documentElement)||oe!=null&&ie(oe,A)&&N.push(oe)}const ve=(E=(B=window.visualViewport)==null?void 0:B.width)!=null?E:innerWidth,pe=(x=(L=window.visualViewport)==null?void 0:L.height)!=null?x:innerHeight,{scrollX:De,scrollY:Oe}=window,{height:Fe,width:st,top:re,right:W,bottom:ee,left:ue}=l.getBoundingClientRect(),{top:ne,right:ae,bottom:S,left:w}=(He=>{const ot=window.getComputedStyle(He);return{top:parseFloat(ot.scrollMarginTop)||0,right:parseFloat(ot.scrollMarginRight)||0,bottom:parseFloat(ot.scrollMarginBottom)||0,left:parseFloat(ot.scrollMarginLeft)||0}})(l);let K=q==="start"||q==="nearest"?re-ne:q==="end"?ee+S:re+Fe/2-ne+S,ye=H==="center"?ue+st/2-w+ae:H==="end"?W+ae:ue-w;const Be=[];for(let He=0;He<N.length;He++){const ot=N[He],{height:at,width:pt,top:At,right:ut,bottom:jt,left:tt}=ot.getBoundingClientRect();if(P==="if-needed"&&re>=0&&ue>=0&&ee<=pe&&W<=ve&&(ot===O&&!ie(ot)||re>=At&&ee<=jt&&ue>=tt&&W<=ut))return Be;const Ft=getComputedStyle(ot),Me=parseInt(Ft.borderLeftWidth,10),mt=parseInt(Ft.borderTopWidth,10),ke=parseInt(Ft.borderRightWidth,10),Ce=parseInt(Ft.borderBottomWidth,10);let _e=0,Ne=0;const Ke="offsetWidth"in ot?ot.offsetWidth-ot.clientWidth-Me-ke:0,nt="offsetHeight"in ot?ot.offsetHeight-ot.clientHeight-mt-Ce:0,te="offsetWidth"in ot?ot.offsetWidth===0?0:pt/ot.offsetWidth:0,Ie="offsetHeight"in ot?ot.offsetHeight===0?0:at/ot.offsetHeight:0;if(O===ot)_e=q==="start"?K:q==="end"?K-pe:q==="nearest"?be(Oe,Oe+pe,pe,mt,Ce,Oe+K,Oe+K+Fe,Fe):K-pe/2,Ne=H==="start"?ye:H==="center"?ye-ve/2:H==="end"?ye-ve:be(De,De+ve,ve,Me,ke,De+ye,De+ye+st,st),_e=Math.max(0,_e+Oe),Ne=Math.max(0,Ne+De);else{_e=q==="start"?K-At-mt:q==="end"?K-jt+Ce+nt:q==="nearest"?be(At,jt,at,mt,Ce+nt,K,K+Fe,Fe):K-(At+at/2)+nt/2,Ne=H==="start"?ye-tt-Me:H==="center"?ye-(tt+pt/2)+Ke/2:H==="end"?ye-ut+ke+Ke:be(tt,ut,pt,Me,ke+Ke,ye,ye+st,st);const{scrollLeft:Ue,scrollTop:ze}=ot;_e=Ie===0?0:Math.max(0,Math.min(ze+_e/Ie,ot.scrollHeight-at/Ie+nt)),Ne=te===0?0:Math.max(0,Math.min(Ue+Ne/te,ot.scrollWidth-pt/te+Ke)),K+=ze-_e,ye+=Ue-Ne}Be.push({el:ot,top:_e,left:Ne})}return Be},de=l=>l===!1?{block:"end",inline:"nearest"}:(V=>V===Object(V)&&Object.keys(V).length!==0)(l)?l:{block:"start",inline:"nearest"};function ce(l,V){if(!l.isConnected||!(L=>{let x=L;for(;x&&x.parentNode;){if(x.parentNode===document)return!0;x=x.parentNode instanceof ShadowRoot?x.parentNode.host:x.parentNode}return!1})(l))return;const B=(L=>{const x=window.getComputedStyle(L);return{top:parseFloat(x.scrollMarginTop)||0,right:parseFloat(x.scrollMarginRight)||0,bottom:parseFloat(x.scrollMarginBottom)||0,left:parseFloat(x.scrollMarginLeft)||0}})(l);if((L=>typeof L=="object"&&typeof L.behavior=="function")(V))return V.behavior(v(l,V));const E=typeof V=="boolean"||V==null?void 0:V.behavior;for(const{el:L,top:x,left:P}of v(l,de(V))){const q=x-B.top+B.bottom,H=P-B.left+B.right;L.scroll({top:q,left:H,behavior:E})}}}}]);
}());