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

1329 lines
1.4 MiB

!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5992],{70557:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={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"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},27812:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},84105:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={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"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},18785:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},73331:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={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"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},15277:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={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"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},33853:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},47472:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={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"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},87395:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});var _=b(60499),fe=b(59301),be={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"},pe=be,z=b(7657),m=function(Y,N){return fe.createElement(z.Z,(0,_.Z)({},Y,{ref:N,icon:pe}))},ce=fe.forwardRef(m),ie=ce},68196:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return pt}});var _=b(85899),fe=b(72190),be=b(42244),pe=b(43403),z=b(92310),m=b.n(z),ce=b(29301),ie=b(76846),o=b(96452),Y=b(6089),N=b(80402),w=b(34280),S=b(49658),C=b(59301),L=b(60499),Q=b(77900),q=b(8654);function H(Pe){var Ae=Pe.prefixCls,he=Pe.align,je=Pe.arrow,Ie=Pe.arrowPos,we=je||{},M=we.className,de=we.content,_e=Ie.x,Me=_e===void 0?0:_e,Fe=Ie.y,Ze=Fe===void 0?0:Fe,Qe=C.useRef();if(!he||!he.points)return null;var tt={position:"absolute"};if(he.autoArrow!==!1){var ut=he.points[0],dt=he.points[1],St=ut[0],gt=ut[1],_t=dt[0],Xe=dt[1];St===_t||!["t","b"].includes(St)?tt.top=Ze:St==="t"?tt.top=0:tt.bottom=0,gt===Xe||!["l","r"].includes(gt)?tt.left=Me:gt==="l"?tt.left=0:tt.right=0}return C.createElement("div",{ref:Qe,className:m()("".concat(Ae,"-arrow"),M),style:tt},de)}function T(Pe){var Ae=Pe.prefixCls,he=Pe.open,je=Pe.zIndex,Ie=Pe.mask,we=Pe.motion;return Ie?C.createElement(Q.default,(0,L.Z)({},we,{motionAppear:!0,visible:he,removeOnLeave:!0}),function(M){var de=M.className;return C.createElement("div",{style:{zIndex:je},className:m()("".concat(Ae,"-mask"),de)})}):null}var V=C.memo(function(Pe){var Ae=Pe.children;return Ae},function(Pe,Ae){return Ae.cache}),P=V,F=C.forwardRef(function(Pe,Ae){var he=Pe.popup,je=Pe.className,Ie=Pe.prefixCls,we=Pe.style,M=Pe.target,de=Pe.onVisibleChanged,_e=Pe.open,Me=Pe.keepDom,Fe=Pe.fresh,Ze=Pe.onClick,Qe=Pe.mask,tt=Pe.arrow,ut=Pe.arrowPos,dt=Pe.align,St=Pe.motion,gt=Pe.maskMotion,_t=Pe.forceRender,Xe=Pe.getPopupContainer,qe=Pe.autoDestroy,st=Pe.portal,ot=Pe.zIndex,Ct=Pe.onMouseEnter,x=Pe.onMouseLeave,D=Pe.onPointerEnter,se=Pe.onPointerDownCapture,I=Pe.ready,U=Pe.offsetX,it=Pe.offsetY,xe=Pe.offsetR,Re=Pe.offsetB,He=Pe.onAlign,G=Pe.onPrepare,J=Pe.stretch,ve=Pe.targetWidth,Ce=Pe.targetHeight,X=typeof he=="function"?he():he,ct=_e||Me,ge=(Xe==null?void 0:Xe.length)>0,wt=C.useState(!Xe||!ge),Ft=(0,fe.Z)(wt,2),Kt=Ft[0],on=Ft[1];if((0,w.Z)(function(){!Kt&&ge&&M&&on(!0)},[Kt,ge,M]),!Kt)return null;var rn="auto",Zt={left:"-1000vw",top:"-1000vh",right:rn,bottom:rn};if(I||!_e){var ln,er=dt.points,Sn=dt.dynamicInset||((ln=dt._experimental)===null||ln===void 0?void 0:ln.dynamicInset),pn=Sn&&er[0][1]==="r",Ut=Sn&&er[0][0]==="b";pn?(Zt.right=xe,Zt.left=rn):(Zt.left=U,Zt.right=rn),Ut?(Zt.bottom=Re,Zt.top=rn):(Zt.top=it,Zt.bottom=rn)}var Rt={};return J&&(J.includes("height")&&Ce?Rt.height=Ce:J.includes("minHeight")&&Ce&&(Rt.minHeight=Ce),J.includes("width")&&ve?Rt.width=ve:J.includes("minWidth")&&ve&&(Rt.minWidth=ve)),_e||(Rt.pointerEvents="none"),C.createElement(st,{open:_t||ct,getContainer:Xe&&function(){return Xe(M)},autoDestroy:qe},C.createElement(T,{prefixCls:Ie,open:_e,zIndex:ot,mask:Qe,motion:gt}),C.createElement(ce.Z,{onResize:He,disabled:!_e},function(Ot){return C.createElement(Q.default,(0,L.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:_t,leavedClassName:"".concat(Ie,"-hidden")},St,{onAppearPrepare:G,onEnterPrepare:G,visible:_e,onVisibleChanged:function(un){var In;St==null||(In=St.onVisibleChanged)===null||In===void 0||In.call(St,un),de(un)}}),function(Xt,un){var In=Xt.className,ar=Xt.style,yr=m()(Ie,In,je);return C.createElement("div",{ref:(0,q.sQ)(Ot,Ae,un),className:yr,style:(0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)({"--arrow-x":"".concat(ut.x||0,"px"),"--arrow-y":"".concat(ut.y||0,"px")},Zt),Rt),ar),{},{boxSizing:"border-box",zIndex:ot},we),onMouseEnter:Ct,onMouseLeave:x,onPointerEnter:D,onClick:Ze,onPointerDownCapture:se},tt&&C.createElement(H,{prefixCls:Ie,arrow:tt,arrowPos:ut,align:dt}),C.createElement(P,{cache:!_e&&!Fe},X))})}))}),oe=F,ye=C.forwardRef(function(Pe,Ae){var he=Pe.children,je=Pe.getTriggerDOMNode,Ie=(0,q.Yr)(he),we=C.useCallback(function(de){(0,q.mH)(Ae,je?je(de):de)},[je]),M=(0,q.x1)(we,(0,q.C4)(he));return Ie?C.cloneElement(he,{ref:M}):he}),le=ye,De=C.createContext(null),Ue=De;function Be(Pe){return Pe?Array.isArray(Pe)?Pe:[Pe]:[]}function rt(Pe,Ae,he,je){return C.useMemo(function(){var Ie=Be(he!=null?he:Ae),we=Be(je!=null?je:Ae),M=new Set(Ie),de=new Set(we);return Pe&&(M.has("hover")&&(M.delete("hover"),M.add("click")),de.has("hover")&&(de.delete("hover"),de.add("click"))),[M,de]},[Pe,Ae,he,je])}var ae=b(29194);function $(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],he=arguments.length>2?arguments[2]:void 0;return he?Pe[0]===Ae[0]:Pe[0]===Ae[0]&&Pe[1]===Ae[1]}function Z(Pe,Ae,he,je){for(var Ie=he.points,we=Object.keys(Pe),M=0;M<we.length;M+=1){var de,_e=we[M];if($((de=Pe[_e])===null||de===void 0?void 0:de.points,Ie,je))return"".concat(Ae,"-placement-").concat(_e)}return""}function ne(Pe,Ae,he,je){return Ae||(he?{motionName:"".concat(Pe,"-").concat(he)}:je?{motionName:je}:null)}function re(Pe){return Pe.ownerDocument.defaultView}function W(Pe){for(var Ae=[],he=Pe==null?void 0:Pe.parentElement,je=["hidden","scroll","clip","auto"];he;){var Ie=re(he).getComputedStyle(he),we=Ie.overflowX,M=Ie.overflowY,de=Ie.overflow;[we,M,de].some(function(_e){return je.includes(_e)})&&Ae.push(he),he=he.parentElement}return Ae}function y(Pe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Pe)?Ae:Pe}function E(Pe){return y(parseFloat(Pe),0)}function B(Pe,Ae){var he=(0,_.Z)({},Pe);return(Ae||[]).forEach(function(je){if(!(je instanceof HTMLBodyElement||je instanceof HTMLHtmlElement)){var Ie=re(je).getComputedStyle(je),we=Ie.overflow,M=Ie.overflowClipMargin,de=Ie.borderTopWidth,_e=Ie.borderBottomWidth,Me=Ie.borderLeftWidth,Fe=Ie.borderRightWidth,Ze=je.getBoundingClientRect(),Qe=je.offsetHeight,tt=je.clientHeight,ut=je.offsetWidth,dt=je.clientWidth,St=E(de),gt=E(_e),_t=E(Me),Xe=E(Fe),qe=y(Math.round(Ze.width/ut*1e3)/1e3),st=y(Math.round(Ze.height/Qe*1e3)/1e3),ot=(ut-dt-_t-Xe)*qe,Ct=(Qe-tt-St-gt)*st,x=St*st,D=gt*st,se=_t*qe,I=Xe*qe,U=0,it=0;if(we==="clip"){var xe=E(M);U=xe*qe,it=xe*st}var Re=Ze.x+se-U,He=Ze.y+x-it,G=Re+Ze.width+2*U-se-I-ot,J=He+Ze.height+2*it-x-D-Ct;he.left=Math.max(he.left,Re),he.top=Math.max(he.top,He),he.right=Math.min(he.right,G),he.bottom=Math.min(he.bottom,J)}}),he}function ue(Pe){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,he="".concat(Ae),je=he.match(/^(.*)\%$/);return je?Pe*(parseFloat(je[1])/100):parseFloat(he)}function Ne(Pe,Ae){var he=Ae||[],je=(0,fe.Z)(he,2),Ie=je[0],we=je[1];return[ue(Pe.width,Ie),ue(Pe.height,we)]}function We(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Pe[0],Pe[1]]}function Te(Pe,Ae){var he=Ae[0],je=Ae[1],Ie,we;return he==="t"?we=Pe.y:he==="b"?we=Pe.y+Pe.height:we=Pe.y+Pe.height/2,je==="l"?Ie=Pe.x:je==="r"?Ie=Pe.x+Pe.width:Ie=Pe.x+Pe.width/2,{x:Ie,y:we}}function ze(Pe,Ae){var he={t:"b",b:"t",l:"r",r:"l"};return Pe.map(function(je,Ie){return Ie===Ae?he[je]||"c":je}).join("")}function Ye(Pe,Ae,he,je,Ie,we,M){var de=C.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ie[je]||{}}),_e=(0,fe.Z)(de,2),Me=_e[0],Fe=_e[1],Ze=C.useRef(0),Qe=C.useMemo(function(){return Ae?W(Ae):[]},[Ae]),tt=C.useRef({}),ut=function(){tt.current={}};Pe||ut();var dt=(0,Y.Z)(function(){if(Ae&&he&&Pe){let $r=function(qr,Jr){var Si=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cr,pi=ct.x+qr,Gi=ct.y+Jr,Xi=pi+Ut,Mi=Gi+pn,mi=Math.max(pi,Si.left),sn=Math.max(Gi,Si.top),Dn=Math.min(Xi,Si.right),pr=Math.min(Mi,Si.bottom);return Math.max(0,(Dn-mi)*(pr-sn))},Lr=function(){Tr=ct.y+kn,Er=Tr+pn,xn=ct.x+bn,Vn=xn+Ut};var _t,Xe,qe,st,ot=Ae,Ct=ot.ownerDocument,x=re(ot),D=x.getComputedStyle(ot),se=D.position,I=ot.style.left,U=ot.style.top,it=ot.style.right,xe=ot.style.bottom,Re=ot.style.overflow,He=(0,_.Z)((0,_.Z)({},Ie[je]),we),G=Ct.createElement("div");(_t=ot.parentElement)===null||_t===void 0||_t.appendChild(G),G.style.left="".concat(ot.offsetLeft,"px"),G.style.top="".concat(ot.offsetTop,"px"),G.style.position=se,G.style.height="".concat(ot.offsetHeight,"px"),G.style.width="".concat(ot.offsetWidth,"px"),ot.style.left="0",ot.style.top="0",ot.style.right="auto",ot.style.bottom="auto",ot.style.overflow="hidden";var J;if(Array.isArray(he))J={x:he[0],y:he[1],width:0,height:0};else{var ve,Ce,X=he.getBoundingClientRect();X.x=(ve=X.x)!==null&&ve!==void 0?ve:X.left,X.y=(Ce=X.y)!==null&&Ce!==void 0?Ce:X.top,J={x:X.x,y:X.y,width:X.width,height:X.height}}var ct=ot.getBoundingClientRect(),ge=x.getComputedStyle(ot),wt=ge.height,Ft=ge.width;ct.x=(Xe=ct.x)!==null&&Xe!==void 0?Xe:ct.left,ct.y=(qe=ct.y)!==null&&qe!==void 0?qe:ct.top;var Kt=Ct.documentElement,on=Kt.clientWidth,rn=Kt.clientHeight,Zt=Kt.scrollWidth,ln=Kt.scrollHeight,er=Kt.scrollTop,Sn=Kt.scrollLeft,pn=ct.height,Ut=ct.width,Rt=J.height,Ot=J.width,Xt={left:0,top:0,right:on,bottom:rn},un={left:-Sn,top:-er,right:Zt-Sn,bottom:ln-er},In=He.htmlRegion,ar="visible",yr="visibleFirst";In!=="scroll"&&In!==yr&&(In=ar);var br=In===yr,_r=B(un,Qe),On=B(Xt,Qe),cr=In===ar?On:_r,nr=br?On:cr;ot.style.left="auto",ot.style.top="auto",ot.style.right="0",ot.style.bottom="0";var Mr=ot.getBoundingClientRect();ot.style.left=I,ot.style.top=U,ot.style.right=it,ot.style.bottom=xe,ot.style.overflow=Re,(st=ot.parentElement)===null||st===void 0||st.removeChild(G);var dr=y(Math.round(Ut/parseFloat(Ft)*1e3)/1e3),Mn=y(Math.round(pn/parseFloat(wt)*1e3)/1e3);if(dr===0||Mn===0||(0,ie.Sh)(he)&&!(0,ae.Z)(he))return;var Bn=He.offset,Nn=He.targetOffset,ir=Ne(ct,Bn),at=(0,fe.Z)(ir,2),yt=at[0],kt=at[1],At=Ne(J,Nn),Lt=(0,fe.Z)(At,2),Bt=Lt[0],jt=Lt[1];J.x-=Bt,J.y-=jt;var Vt=He.points||[],Rn=(0,fe.Z)(Vt,2),Ln=Rn[0],hr=Rn[1],dn=We(hr),cn=We(Ln),Pn=Te(J,dn),Gn=Te(ct,cn),Hn=(0,_.Z)({},He),bn=Pn.x-Gn.x+yt,kn=Pn.y-Gn.y+kt,qn=$r(bn,kn),Wn=$r(bn,kn,On),zn=Te(J,["t","l"]),or=Te(ct,["t","l"]),Zn=Te(J,["b","r"]),Qn=Te(ct,["b","r"]),xr=He.overflow||{},bt=xr.adjustX,mn=xr.adjustY,Yn=xr.shiftX,wr=xr.shiftY,Br=function(Jr){return typeof Jr=="boolean"?Jr:Jr>=0},Tr,Er,xn,Vn;Lr();var Ar=Br(mn),lr=cn[0]===dn[0];if(Ar&&cn[0]==="t"&&(Er>nr.bottom||tt.current.bt)){var Qt=kn;lr?Qt-=pn-Rt:Qt=zn.y-Qn.y-kt;var gn=$r(bn,Qt),Fn=$r(bn,Qt,On);gn>qn||gn===qn&&(!br||Fn>=Wn)?(tt.current.bt=!0,kn=Qt,kt=-kt,Hn.points=[ze(cn,0),ze(dn,0)]):tt.current.bt=!1}if(Ar&&cn[0]==="b"&&(Tr<nr.top||tt.current.tb)){var yn=kn;lr?yn+=pn-Rt:yn=Zn.y-or.y-kt;var Yt=$r(bn,yn),tr=$r(bn,yn,On);Yt>qn||Yt===qn&&(!br||tr>=Wn)?(tt.current.tb=!0,kn=yn,kt=-kt,Hn.points=[ze(cn,0),ze(dn,0)]):tt.current.tb=!1}var rr=Br(bt),Hr=cn[1]===dn[1];if(rr&&cn[1]==="l"&&(Vn>nr.right||tt.current.rl)){var ei=bn;Hr?ei-=Ut-Ot:ei=zn.x-Qn.x-yt;var ti=$r(ei,kn),Nr=$r(ei,kn,On);ti>qn||ti===qn&&(!br||Nr>=Wn)?(tt.current.rl=!0,bn=ei,yt=-yt,Hn.points=[ze(cn,1),ze(dn,1)]):tt.current.rl=!1}if(rr&&cn[1]==="r"&&(xn<nr.left||tt.current.lr)){var Wr=bn;Hr?Wr+=Ut-Ot:Wr=Zn.x-or.x-yt;var fr=$r(Wr,kn),di=$r(Wr,kn,On);fr>qn||fr===qn&&(!br||di>=Wn)?(tt.current.lr=!0,bn=Wr,yt=-yt,Hn.points=[ze(cn,1),ze(dn,1)]):tt.current.lr=!1}Lr();var jr=Yn===!0?0:Yn;typeof jr=="number"&&(xn<On.left&&(bn-=xn-On.left-yt,J.x+Ot<On.left+jr&&(bn+=J.x-On.left+Ot-jr)),Vn>On.right&&(bn-=Vn-On.right-yt,J.x>On.right-jr&&(bn+=J.x-On.right+jr)));var Xr=wr===!0?0:wr;typeof Xr=="number"&&(Tr<On.top&&(kn-=Tr-On.top-kt,J.y+Rt<On.top+Xr&&(kn+=J.y-On.top+Rt-Xr)),Er>On.bottom&&(kn-=Er-On.bottom-kt,J.y>On.bottom-Xr&&(kn+=J.y-On.bottom+Xr)));var ni=ct.x+bn,ri=ni+Ut,jn=ct.y+kn,hi=jn+pn,fi=J.x,si=fi+Ot,Ur=J.y,An=Ur+Rt,Ii=Math.max(ni,fi),Ht=Math.min(ri,si),zr=(Ii+Ht)/2,Ri=zr-ni,Ei=Math.max(jn,Ur),Gr=Math.min(hi,An),Qr=(Ei+Gr)/2,Cn=Qr-jn;M==null||M(Ae,Hn);var Kr=Mr.right-ct.x-(bn+ct.width),ai=Mr.bottom-ct.y-(kn+ct.height);dr===1&&(bn=Math.floor(bn),Kr=Math.floor(Kr)),Mn===1&&(kn=Math.floor(kn),ai=Math.floor(ai));var Li={ready:!0,offsetX:bn/dr,offsetY:kn/Mn,offsetR:Kr/dr,offsetB:ai/Mn,arrowX:Ri/dr,arrowY:Cn/Mn,scaleX:dr,scaleY:Mn,align:Hn};Fe(Li)}}),St=function(){Ze.current+=1;var Xe=Ze.current;Promise.resolve().then(function(){Ze.current===Xe&&dt()})},gt=function(){Fe(function(Xe){return(0,_.Z)((0,_.Z)({},Xe),{},{ready:!1})})};return(0,w.Z)(gt,[je]),(0,w.Z)(function(){Pe||gt()},[Pe]),[Me.ready,Me.offsetX,Me.offsetY,Me.offsetR,Me.offsetB,Me.arrowX,Me.arrowY,Me.scaleX,Me.scaleY,Me.align,St]}var Je=b(77654);function Ve(Pe,Ae,he,je,Ie){(0,w.Z)(function(){if(Pe&&Ae&&he){let Ze=function(){je(),Ie()};var we=Ae,M=he,de=W(we),_e=W(M),Me=re(M),Fe=new Set([Me].concat((0,Je.Z)(de),(0,Je.Z)(_e)));return Fe.forEach(function(Qe){Qe.addEventListener("scroll",Ze,{passive:!0})}),Me.addEventListener("resize",Ze,{passive:!0}),je(),function(){Fe.forEach(function(Qe){Qe.removeEventListener("scroll",Ze),Me.removeEventListener("resize",Ze)})}}},[Pe,Ae,he])}var Tt=b(48736);function Ke(Pe,Ae,he,je,Ie,we,M,de){var _e=C.useRef(Pe);_e.current=Pe;var Me=C.useRef(!1);C.useEffect(function(){if(Ae&&je&&(!Ie||we)){var Ze=function(){Me.current=!1},Qe=function(qe){var st;_e.current&&!M(((st=qe.composedPath)===null||st===void 0||(st=st.call(qe))===null||st===void 0?void 0:st[0])||qe.target)&&!Me.current&&de(!1)},tt=re(je);tt.addEventListener("pointerdown",Ze,!0),tt.addEventListener("mousedown",Qe,!0),tt.addEventListener("contextmenu",Qe,!0);var ut=(0,o.A)(he);if(ut&&(ut.addEventListener("mousedown",Qe,!0),ut.addEventListener("contextmenu",Qe,!0)),0)var dt,St,gt,_t;return function(){tt.removeEventListener("pointerdown",Ze,!0),tt.removeEventListener("mousedown",Qe,!0),tt.removeEventListener("contextmenu",Qe,!0),ut&&(ut.removeEventListener("mousedown",Qe,!0),ut.removeEventListener("contextmenu",Qe,!0))}}},[Ae,he,je,Ie,we]);function Fe(){Me.current=!0}return Fe}var Et=["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 Le(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe.Z,Ae=C.forwardRef(function(he,je){var Ie=he.prefixCls,we=Ie===void 0?"rc-trigger-popup":Ie,M=he.children,de=he.action,_e=de===void 0?"hover":de,Me=he.showAction,Fe=he.hideAction,Ze=he.popupVisible,Qe=he.defaultPopupVisible,tt=he.onPopupVisibleChange,ut=he.afterPopupVisibleChange,dt=he.mouseEnterDelay,St=he.mouseLeaveDelay,gt=St===void 0?.1:St,_t=he.focusDelay,Xe=he.blurDelay,qe=he.mask,st=he.maskClosable,ot=st===void 0?!0:st,Ct=he.getPopupContainer,x=he.forceRender,D=he.autoDestroy,se=he.destroyPopupOnHide,I=he.popup,U=he.popupClassName,it=he.popupStyle,xe=he.popupPlacement,Re=he.builtinPlacements,He=Re===void 0?{}:Re,G=he.popupAlign,J=he.zIndex,ve=he.stretch,Ce=he.getPopupClassNameFromAlign,X=he.fresh,ct=he.alignPoint,ge=he.onPopupClick,wt=he.onPopupAlign,Ft=he.arrow,Kt=he.popupMotion,on=he.maskMotion,rn=he.popupTransitionName,Zt=he.popupAnimation,ln=he.maskTransitionName,er=he.maskAnimation,Sn=he.className,pn=he.getTriggerDOMNode,Ut=(0,be.Z)(he,Et),Rt=D||se||!1,Ot=C.useState(!1),Xt=(0,fe.Z)(Ot,2),un=Xt[0],In=Xt[1];(0,w.Z)(function(){In((0,S.Z)())},[]);var ar=C.useRef({}),yr=C.useContext(Ue),br=C.useMemo(function(){return{registerSubPopup:function(Dn,pr){ar.current[Dn]=pr,yr==null||yr.registerSubPopup(Dn,pr)}}},[yr]),_r=(0,N.Z)(),On=C.useState(null),cr=(0,fe.Z)(On,2),nr=cr[0],Mr=cr[1],dr=C.useRef(null),Mn=(0,Y.Z)(function(sn){dr.current=sn,(0,ie.Sh)(sn)&&nr!==sn&&Mr(sn),yr==null||yr.registerSubPopup(_r,sn)}),Bn=C.useState(null),Nn=(0,fe.Z)(Bn,2),ir=Nn[0],at=Nn[1],yt=C.useRef(null),kt=(0,Y.Z)(function(sn){(0,ie.Sh)(sn)&&ir!==sn&&(at(sn),yt.current=sn)}),At=C.Children.only(M),Lt=(At==null?void 0:At.props)||{},Bt={},jt=(0,Y.Z)(function(sn){var Dn,pr,$n=ir;return($n==null?void 0:$n.contains(sn))||((Dn=(0,o.A)($n))===null||Dn===void 0?void 0:Dn.host)===sn||sn===$n||(nr==null?void 0:nr.contains(sn))||((pr=(0,o.A)(nr))===null||pr===void 0?void 0:pr.host)===sn||sn===nr||Object.values(ar.current).some(function(Xn){return(Xn==null?void 0:Xn.contains(sn))||sn===Xn})}),Vt=ne(we,Kt,Zt,rn),Rn=ne(we,on,er,ln),Ln=C.useState(Qe||!1),hr=(0,fe.Z)(Ln,2),dn=hr[0],cn=hr[1],Pn=Ze!=null?Ze:dn,Gn=(0,Y.Z)(function(sn){Ze===void 0&&cn(sn)});(0,w.Z)(function(){cn(Ze||!1)},[Ze]);var Hn=C.useRef(Pn);Hn.current=Pn;var bn=C.useRef([]);bn.current=[];var kn=(0,Y.Z)(function(sn){var Dn;Gn(sn),((Dn=bn.current[bn.current.length-1])!==null&&Dn!==void 0?Dn:Pn)!==sn&&(bn.current.push(sn),tt==null||tt(sn))}),qn=C.useRef(),Wn=function(){clearTimeout(qn.current)},zn=function(Dn){var pr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Wn(),pr===0?kn(Dn):qn.current=setTimeout(function(){kn(Dn)},pr*1e3)};C.useEffect(function(){return Wn},[]);var or=C.useState(!1),Zn=(0,fe.Z)(or,2),Qn=Zn[0],xr=Zn[1];(0,w.Z)(function(sn){(!sn||Pn)&&xr(!0)},[Pn]);var bt=C.useState(null),mn=(0,fe.Z)(bt,2),Yn=mn[0],wr=mn[1],Br=C.useState(null),Tr=(0,fe.Z)(Br,2),Er=Tr[0],xn=Tr[1],Vn=function(Dn){xn([Dn.clientX,Dn.clientY])},Ar=Ye(Pn,nr,ct&&Er!==null?Er:ir,xe,He,G,wt),lr=(0,fe.Z)(Ar,11),Qt=lr[0],gn=lr[1],Fn=lr[2],yn=lr[3],Yt=lr[4],tr=lr[5],rr=lr[6],Hr=lr[7],ei=lr[8],ti=lr[9],Nr=lr[10],Wr=rt(un,_e,Me,Fe),fr=(0,fe.Z)(Wr,2),di=fr[0],jr=fr[1],Xr=di.has("click"),ni=jr.has("click")||jr.has("contextMenu"),ri=(0,Y.Z)(function(){Qn||Nr()}),jn=function(){Hn.current&&ct&&ni&&zn(!1)};Ve(Pn,ir,nr,ri,jn),(0,w.Z)(function(){ri()},[Er,xe]),(0,w.Z)(function(){Pn&&!(He!=null&&He[xe])&&ri()},[JSON.stringify(G)]);var hi=C.useMemo(function(){var sn=Z(He,we,ti,ct);return m()(sn,Ce==null?void 0:Ce(ti))},[ti,Ce,He,we,ct]);C.useImperativeHandle(je,function(){return{nativeElement:yt.current,popupElement:dr.current,forceAlign:ri}});var fi=C.useState(0),si=(0,fe.Z)(fi,2),Ur=si[0],An=si[1],Ii=C.useState(0),Ht=(0,fe.Z)(Ii,2),zr=Ht[0],Ri=Ht[1],Ei=function(){if(ve&&ir){var Dn=ir.getBoundingClientRect();An(Dn.width),Ri(Dn.height)}},Gr=function(){Ei(),ri()},Qr=function(Dn){xr(!1),Nr(),ut==null||ut(Dn)},Cn=function(){return new Promise(function(Dn){Ei(),wr(function(){return Dn})})};(0,w.Z)(function(){Yn&&(Nr(),Yn(),wr(null))},[Yn]);function Kr(sn,Dn,pr,$n){Bt[sn]=function(Xn){var wi;$n==null||$n(Xn),zn(Dn,pr);for(var Vr=arguments.length,ki=new Array(Vr>1?Vr-1:0),Ki=1;Ki<Vr;Ki++)ki[Ki-1]=arguments[Ki];(wi=Lt[sn])===null||wi===void 0||wi.call.apply(wi,[Lt,Xn].concat(ki))}}(Xr||ni)&&(Bt.onClick=function(sn){var Dn;Hn.current&&ni?zn(!1):!Hn.current&&Xr&&(Vn(sn),zn(!0));for(var pr=arguments.length,$n=new Array(pr>1?pr-1:0),Xn=1;Xn<pr;Xn++)$n[Xn-1]=arguments[Xn];(Dn=Lt.onClick)===null||Dn===void 0||Dn.call.apply(Dn,[Lt,sn].concat($n))});var ai=Ke(Pn,ni,ir,nr,qe,ot,jt,zn),Li=di.has("hover"),$r=jr.has("hover"),Lr,qr;Li&&(Kr("onMouseEnter",!0,dt,function(sn){Vn(sn)}),Kr("onPointerEnter",!0,dt,function(sn){Vn(sn)}),Lr=function(Dn){(Pn||Qn)&&nr!==null&&nr!==void 0&&nr.contains(Dn.target)&&zn(!0,dt)},ct&&(Bt.onMouseMove=function(sn){var Dn;(Dn=Lt.onMouseMove)===null||Dn===void 0||Dn.call(Lt,sn)})),$r&&(Kr("onMouseLeave",!1,gt),Kr("onPointerLeave",!1,gt),qr=function(){zn(!1,gt)}),di.has("focus")&&Kr("onFocus",!0,_t),jr.has("focus")&&Kr("onBlur",!1,Xe),di.has("contextMenu")&&(Bt.onContextMenu=function(sn){var Dn;Hn.current&&jr.has("contextMenu")?zn(!1):(Vn(sn),zn(!0)),sn.preventDefault();for(var pr=arguments.length,$n=new Array(pr>1?pr-1:0),Xn=1;Xn<pr;Xn++)$n[Xn-1]=arguments[Xn];(Dn=Lt.onContextMenu)===null||Dn===void 0||Dn.call.apply(Dn,[Lt,sn].concat($n))}),Sn&&(Bt.className=m()(Lt.className,Sn));var Jr=C.useRef(!1);Jr.current||(Jr.current=x||Pn||Qn);var Si=(0,_.Z)((0,_.Z)({},Lt),Bt),pi={},Gi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Gi.forEach(function(sn){Ut[sn]&&(pi[sn]=function(){for(var Dn,pr=arguments.length,$n=new Array(pr),Xn=0;Xn<pr;Xn++)$n[Xn]=arguments[Xn];(Dn=Si[sn])===null||Dn===void 0||Dn.call.apply(Dn,[Si].concat($n)),Ut[sn].apply(Ut,$n)})});var Xi=C.cloneElement(At,(0,_.Z)((0,_.Z)({},Si),pi)),Mi={x:tr,y:rr},mi=Ft?(0,_.Z)({},Ft!==!0?Ft:{}):null;return C.createElement(C.Fragment,null,C.createElement(ce.Z,{disabled:!Pn,ref:kt,onResize:Gr},C.createElement(le,{getTriggerDOMNode:pn},Xi)),Jr.current&&C.createElement(Ue.Provider,{value:br},C.createElement(oe,{portal:Pe,ref:Mn,prefixCls:we,popup:I,className:m()(U,hi),style:it,target:ir,onMouseEnter:Lr,onMouseLeave:qr,onPointerEnter:Lr,zIndex:J,open:Pn,keepDom:Qn,fresh:X,onClick:ge,onPointerDownCapture:ai,mask:qe,motion:Vt,maskMotion:Rn,onVisibleChanged:Qr,onPrepare:Cn,forceRender:x,autoDestroy:Rt,getPopupContainer:Ct,align:ti,arrow:mi,arrowPos:Mi,ready:Qt,offsetX:gn,offsetY:Fn,offsetR:yn,offsetB:Yt,onAlign:ri,stretch:ve,targetWidth:Ur/Hr,targetHeight:zr/ei})))});return Ae}var pt=Le(pe.Z)},46214:function(){"use strict"},90736:function(Gt,nt,b){"use strict";var _=b(59301),fe=b(4977),be=b(7939),pe=Object.defineProperty,z=Object.defineProperties,m=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,Y=(C,L,Q)=>L in C?pe(C,L,{enumerable:!0,configurable:!0,writable:!0,value:Q}):C[L]=Q,N=(C,L)=>{for(var Q in L||(L={}))ie.call(L,Q)&&Y(C,Q,L[Q]);if(ce)for(var Q of ce(L))o.call(L,Q)&&Y(C,Q,L[Q]);return C},w=(C,L)=>z(C,m(L));const S=({img:C,buttonProps:L={},styles:Q={},customText:q,ButtonText:H,ButtonClick:T,Buttonclass:V,ButtonTwo:P,imgStyles:F,loading:oe=!1,className:ye=""})=>_.createElement("section",{className:`tc animated fadeIn ${ye}`,style:N({color:"#999",margin:"100px auto",visibility:oe?"hidden":"visible"},Q)},_.createElement("img",{src:C||fe,style:w(N({},F),{pointerEvents:"none",userSelect:"none"})}),_.createElement("p",{className:"mt20 font14"},q||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),H&&_.createElement(be.ZP,N({className:V,onClick:T},L),H),P&&P);nt.Z=S},86974:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return V}});var _=b(59301),fe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},be=b(7939),pe=b(70557),z=b(34728),m=b(25399),ce=b(76406),ie=b(84849),o=b(90736),Y=b(14185),N=b(52078),w=b(59301),S=Object.defineProperty,C=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,q=(P,F,oe)=>F in P?S(P,F,{enumerable:!0,configurable:!0,writable:!0,value:oe}):P[F]=oe,H=(P,F)=>{for(var oe in F||(F={}))L.call(F,oe)&&q(P,oe,F[oe]);if(C)for(var oe of C(F))Q.call(F,oe)&&q(P,oe,F[oe]);return P},T=(P,F,oe)=>new Promise((ye,le)=>{var De=rt=>{try{Be(oe.next(rt))}catch(ae){le(ae)}},Ue=rt=>{try{Be(oe.throw(rt))}catch(ae){le(ae)}},Be=rt=>rt.done?ye(rt.value):Promise.resolve(rt.value).then(De,Ue);Be((oe=oe.apply(P,F)).next())}),V=({editOffice:P="view",data:F,issaver:oe,onSaver:ye,theme:le,type:De,filename:Ue,monacoEditor:Be,className:rt,style:ae,close:$,onClose:Z,hasMask:ne,disabledDownload:re,onImgDimensions:W,showNodata:y,recordInfo:E})=>{const[B,ue]=(0,_.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ne,We]=(0,_.useState)(""),[Te,ze]=(0,_.useState)(),Ye=window.ENV==="build"?"/react/build":"",Je=location.host.startsWith("localhost")?Y.Z.PROXY_SERVER:Y.Z.API_SERVER,Tt=10*(1024*1024),Ke=(0,_.useRef)();F!=null&&F.startsWith("/api")&&De!=="txt"&&(F=Y.Z.API_SERVER+F);const Et=je=>je.substring(je.lastIndexOf("/")+1).split(".").pop();Ue&&Be&&(Be.filename=Ue),(0,_.useEffect)(()=>{var je,Ie;const we=(Ie=(je=document.cookie)==null?void 0:je.replace(/\s/g,""))==null?void 0:Ie.split(";");we==null||we.map(M=>{let de=M.split("=");de[0]==="_educoder_session"&&We(de[1])})},[]),(0,_.useEffect)(()=>{De==="office"&&(F.indexOf("bigfilescdn.")>-1||F.indexOf("bigfiles1")>-1?ze({url:F,fileType:Et(F),model:F.indexOf("model=edit")?"edit":"view"}):F.indexOf("coze")>-1?ze({url:F,fileType:"doc",model:"view"}):pt())},[De,F]);function Le(je){return T(this,null,function*(){je.data.type==="pdfdata"&&(ye(je.data.data),window.removeEventListener("message",Le,!1)),console.log("mess---:",je.data)})}const pt=()=>T(void 0,null,function*(){console.log("data:",F);let je=F;F.startsWith("http")||(je=location.origin+je);let Ie=new URL(je).pathname.split("/").pop();const we=yield(0,ie.gJ)({attachment_id:Ie});we.url=Je+we.url,ze(we)}),Pe=()=>{if(F.startsWith("http")||F.startsWith("blob:")){Ae();return}(0,ce.Sv)(Ue||"educoder",F,Ue)},Ae=()=>{E&&(0,N.fc)({id:E==null?void 0:E.id,watch_type:1,course_id:E==null?void 0:E.course_id}),(0,ce.Nd)(Ue||"educoder",decodeURIComponent(F))};(0,_.useEffect)(()=>(window.addEventListener("message",he),()=>{window.removeEventListener("message",he)}),[]);const he=je=>{var Ie;((Ie=je==null?void 0:je.data)==null?void 0:Ie.type)==="closePop"&&Z()};return w.createElement("div",{style:H({},ae||{}),className:`${ne&&fe.bgBlack} ${De?fe.wrp:"hide"}`},!!De&&$&&w.createElement("div",{id:"closePop",className:fe.close,ref:Ke},!!W&&w.createElement(m.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ke.current},w.createElement("span",{onClick:()=>{Z(),W()}},w.createElement("i",{className:"icon-yulanpizhu"}))),!re&&window.parent===window&&w.createElement(m.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ke.current},w.createElement("span",{onClick:Ae},w.createElement("i",{className:"icon-quxiaozhiding"}))),oe&&w.createElement(m.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ke.current},w.createElement("span",{className:"",onClick:()=>{const je=document.getElementById("pdfiframe");window.addEventListener("message",Le,!1),setTimeout(()=>{je.contentWindow.postMessage("getData","*")},300)}},w.createElement("i",{className:"icon-baocun"}))),w.createElement(m.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ke.current},w.createElement("span",{className:"",onClick:()=>{Z()}},w.createElement("i",{className:"icon-guanbi1"})))),w.createElement("div",{className:`${fe[rt]} ${rt} ${fe.monaco} ${De==="txt"?"show":"hide"}`},De==="txt"&&w.createElement(w.Fragment,null,w.createElement(z.ZP,H({},Be)))),De==="audio"&&w.createElement("audio",{controls:!0,src:`${(F==null?void 0:F.indexOf("http://"))>-1||(F==null?void 0:F.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${F}`,autoPlay:!0}),De==="video"&&w.createElement(w.Fragment,null,(F==null?void 0:F.indexOf("http"))>-1?w.createElement("video",{controls:!0,src:`${F}`,autoPlay:!0}):w.createElement("video",{controls:!0,src:`data:video/mp4;base64,${F}`,autoPlay:!0})),De==="office"&&Te&&w.createElement("iframe",{src:`${Ye}/office.html?key=${Te.key}&url=${btoa(Te.url)}&callbackUrl=${Je+(Te.callbackUrl||"")}&fileType=${Te.fileType}&title=${Te.title||""}&model=${P}&officeServer=${Y.Z.ONLYOFFICE}&disabledDownload=${!!re}`}),De==="html"&&w.createElement("iframe",{src:F+"&disposition=inline"}),De==="pdf"&&w.createElement("iframe",{id:"pdfiframe",src:`${Ye}/js/pdf/index.html?filename=${Ue||"educoder.pdf"}&url=${encodeURIComponent(F)}&disabledDownload=${!!re}&model=${P}`}),De==="image"&&w.createElement("img",{src:`${(F==null?void 0:F.indexOf("http://"))>-1||(F==null?void 0:F.indexOf("https://"))>-1?"":"data:image/png;base64,"}${F}`}),(De==="other"||De==="download")&&w.createElement(w.Fragment,null,y?w.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:w.createElement(be.ZP,{icon:w.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Pe,disabled:re},"\u4E0B\u8F7D")}):w.createElement(be.ZP,{type:"primary",size:"middle",onClick:Pe,disabled:re},w.createElement(pe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),De==="flowChart"&&w.createElement("div",{className:"embed"},w.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${F||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(Gt,nt,b){"use strict";b.d(nt,{z:function(){return Be},Z:function(){return rt}});var _=b(59301),fe=b(46214),be=b(20047),pe=b(64018),z=b(16471),m=b(14185),ce=b(76406),ie=b(15342),o=b(44104),Y=b(7939),N=b(1012),w=b(86974),S=b(59301),L=({html:ae})=>{const $=(0,_.useRef)(null),Z=(0,_.useRef)(null),ne=`.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,_.useEffect)(()=>{const re=$.current.attachShadow({mode:"open"});Z.current=document.createElement("div"),Z.current.className="markdown-body",Z.current.innerHTML=ae,re.appendChild(Z.current);const W=document.createElement("style");return W.textContent=ne,re.appendChild(W),()=>{re.innerHTML=""}},[]),(0,_.useEffect)(()=>{Z.current&&(Z.current.innerHTML=ae)},[ae]),S.createElement("div",{ref:$})};function Q(ae){const $=["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"],Z=new RegExp(`\\b(${$.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),ne=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return ae.replace(Z,"").replace(ne,"").trim()}var q={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},H=Object.defineProperty,T=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,F=(ae,$,Z)=>$ in ae?H(ae,$,{enumerable:!0,configurable:!0,writable:!0,value:Z}):ae[$]=Z,oe=(ae,$)=>{for(var Z in $||($={}))V.call($,Z)&&F(ae,Z,$[Z]);if(T)for(var Z of T($))P.call($,Z)&&F(ae,Z,$[Z]);return ae};const ye="@\u2581\u2581@",le="@\u2581@",De=/<pre[^>]*>/g;function Ue(ae){let $=document.createElement("div");return $.innerHTML=ae,$.childNodes.length===0?"":$.childNodes[0].nodeValue}const Be=(ae,$)=>{ae=ae||"";const Z=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ne=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,re=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,W=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return $?ae.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Z,(y,E,B,ue,Ne,We,Te)=>{const ze=E||ue||We,Ye=B||Ne||Te||"?";return m.Z.API_SERVER+"/api/attachments/"+ze+Ye+"&t="+(0,ce.Jn)(ze,Date.now())+(y.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ae=ae.replace(W,(y,E,B,ue,Ne,We,Te)=>{const ze=E||ue||We,Ye=B||Ne||Te||"?";return m.Z.API_SERVER+"/attachments/download/"+ze+Ye+"&t="+(0,ce.Jn)(ze,Date.now())+(y.indexOf(")")>-1?")":"&")}).replace(Z,(y,E,B,ue,Ne,We,Te)=>{const ze=E||ue||We,Ye=B||Ne||Te||"?";return m.Z.API_SERVER+"/api/attachments/"+ze+Ye+"&t="+(0,ce.Jn)(ze,Date.now())+(y.indexOf(")")>-1?")":"&")}).replace(ne,(y,E,B,ue,Ne)=>{const We=E||ue,Te=B||Ne||"";return'"'+m.Z.API_SERVER+"/api/attachments/"+We+Te+We+Te+"&t="+(0,ce.Jn)(We,Date.now())}).replace(re,(y,E,B,ue,Ne)=>{const We=E||ue,Te=B||Ne||"";return"("+m.Z.API_SERVER+"/files/uploads/"+We+Te+We+Te+"&t="+(0,ce.Jn)(We,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,`
`),ae)};var rt=({value:ae="",edit:$=!1,className:Z,showTextOnly:ne,showLines:re,style:W={},stylesPrev:y={},highlightKeywords:E,showProgramFill:B,isProgramFill:ue,disabledFill:Ne=!1,programFillValue:We,openEditor:Te=()=>{},onFillChange:ze=Ve=>{},onFillBlur:Ye=()=>{},onFillFocus:Je=()=>{}})=>{let Ve=Q(String(ae||""));const Tt=(0,_.useRef)(),Ke=(0,_.useRef)(),[Et,Le]=(0,_.useState)(""),[pt,Pe]=(0,_.useState)("office"),[Ae,he]=(0,_.useState)([]),je=(0,_.useRef)("a"+(0,N.Z)()),Ie={},we=Xe=>/<style[\s\S]*?>/i.test(Xe||""),M=(Xe,qe,st)=>{const ot=document.createElement(Xe===le?"input":"textarea");ot.style.width="100%",ot.style.height=Xe===le?"40px":"151px",ot.rows=5,ot.spellcheck=!1,ot.name="edu-program-fill",ot.placeholder="\u8BF7\u8F93\u5165",ot.dataset.id=qe;const Ct=Object.keys(Ie).length;return Ie[Ct]=ot,`<span class="edu-program-fill-wrap ${Xe===le?"":"show"}" style="width:${Xe===le?"600px":"100%"}" title=${st||""}><span>${ot.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function de(Xe){return Xe=Xe.replace(/!\[.*?\]\(.*?\)/g,""),Xe=Xe.replace(/\[.*?\]\(.*?\)/g,""),Xe=Xe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Xe=Xe.replace(/<embed.*?>/g,""),Xe=Xe.replace(/<img.*?>/g,""),Xe=Xe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Xe=Xe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Xe=Xe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Xe=Xe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Xe}const _e=Xe=>!ne&&we(Ve)?Xe:Xe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(qe,st){let ot=st.replace(/(\n|\r)/g,"").split("}"),Ct=[];return ot.map(x=>{x!=""&&Ct.push(`.${je.current} ${x}`)}),`<style>${Ct.join("}")}</style>`}),Me=(0,_.useMemo)(()=>{(0,be.Iy)();try{const ot=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ct=/\"\/api\/attachments\/|\"\/attachments\/download\//g,x=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,D=/\(\/attachments\/download\//g;Ve=Ve.replace(D,"("+m.Z.API_SERVER+"/attachments/download/").replace(ot,"("+m.Z.API_SERVER+"/api/attachments/").replace(Ct,'"'+m.Z.API_SERVER+"/api/attachments/").replace(x,'"'+m.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,`
`),Tt.current.style.display="none"}catch(ot){}if(B){let ot=-1;return Ve=Ve.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Ct,x,D){var se;return++ot,M(Ct,ot,(se=We==null?void 0:We[ot])==null?void 0:se.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${_e(Ve||"")}</pre>`}let Xe=_e(Ve);Xe=(0,be.ZP)(Xe);const qe=(0,be.ez)();Ve.match(/\[TOC\]/)&&(Xe=Xe.replace("<p>[TOC]</p>",(0,be.Qv)()),(0,be.Iy)()),Xe=Xe.replace(/(__special_katext_id_\d+__)/g,(ot,Ct)=>{const{type:x,expression:D}=qe[Ct];return(0,ie.renderToString)(Ue(D)||"",{displayMode:x==="block",throwOnError:!1,output:"html"})}),Xe=Xe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,be.AL)();const st=document.createElement("div");if(st.innerHTML=Xe,ne)return st.innerText;if(E){const ot=E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return tt(st,ot),st.innerHTML}return setTimeout(()=>St(),500),st.innerHTML},[Ve,E]);(0,_.useEffect)(()=>{ut.current&&ut.current.querySelectorAll(["input","textarea"]).forEach(qe=>{qe.oninput=Fe,qe.onblur=Ze,qe.onfocus=Qe})},[Ae]),(0,_.useEffect)(()=>{var Xe,qe,st,ot,Ct;if(We!=null&&We.length)try{const x=ut.current.querySelectorAll(".edu-program-fill-score"),D=ut.current.querySelectorAll('[name="edu-program-fill"]');for(const[se,I]of D.entries())I.value=((Xe=We==null?void 0:We[se])==null?void 0:Xe.value)||"",((qe=We==null?void 0:We[se])==null?void 0:qe.type)==="warning"?I.className="program-fill-warning":((st=We==null?void 0:We[se])==null?void 0:st.type)==="success"?I.className="program-fill-success":I.className="";for(const[se,I]of x.entries())I.innerHTML=(ot=We==null?void 0:We[se])!=null&&ot.score?`${(Ct=We==null?void 0:We[se])==null?void 0:Ct.score}\u5206`:"";he(We)}catch(x){console.log(x,"error")}},[We]);const Fe=Xe=>{Ae[Xe.target.dataset.id]=Ae[Xe.target.dataset.id]||{},Ae[Xe.target.dataset.id].value=Xe.target.value,he([...Ae]),ze(Ae,Xe.target.dataset.id)},Ze=Xe=>{Ae[Xe.target.dataset.id]=Ae[Xe.target.dataset.id]||{},Ae[Xe.target.dataset.id].value=Xe.target.value,he([...Ae]),Ye(Ae,Xe.target.dataset.id)},Qe=Xe=>{Ae[Xe.target.dataset.id]=Ae[Xe.target.dataset.id]||{},Ae[Xe.target.dataset.id].value=Xe.target.value,he([...Ae]),Je(Ae,Xe.target.dataset.id)};function tt(Xe,qe){return Xe.childNodes.forEach(st=>{var ot;if(st.childNodes.length>0)tt(st,qe);else if(st.nodeName!=="IMG")if(st.innerHTML)st.innerHTML=(ot=st.innerHTML)==null?void 0:ot.replace(new RegExp(qe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ct=document.createElement("span");Ct.innerHTML=st.textContent.replace(new RegExp(qe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),st.replaceWith(Ct)}})}const ut=(0,_.useRef)();be.jb.WebkitLineClamp=re,re&&(W=oe(oe({},W),be.jb));function dt(Xe){let qe=Xe.target;if(qe.tagName.toUpperCase()==="A"){let st=qe.getAttribute("href");if(st.indexOf("office")>-1)Xe.preventDefault(),Le(st),Pe("office");else if(st.indexOf("application/pdf")>-1)Xe.preventDefault(),Le(st),Pe("pdf");else if(st.indexOf("text/html")>-1)Xe.preventDefault(),Le(st),Pe("html");else if(st.startsWith("#")){Xe.preventDefault();let ot=document.getElementById(st.replace("#",""));ot&&ot.scrollIntoView(!0)}}}const St=()=>{var Xe;const qe=(Xe=ut.current)==null?void 0:Xe.querySelectorAll("video");qe==null||qe.forEach(st=>{if(st.oncontextmenu=()=>!1,st.src.indexOf(".m3u8")>-1&&!st.canPlayType("application/vnd.apple.mpegurl")){if(z.ZP.isSupported()){var ot=new z.ZP;ot.loadSource(st.src),ot.attachMedia(st)}}})};(0,_.useEffect)(()=>{if(ut.current&&Me&&Me.match(De)&&window.PR.prettyPrint(),ut.current)return ut.current.addEventListener("click",dt),()=>{var Xe;(Xe=ut.current)==null||Xe.removeEventListener("click",dt),(0,be.AL)(),(0,be.Iy)()}},[Me,ut.current,dt]);const gt=Xe=>{Xe.target.nodeName==="IMG"&&Xe.target.className.indexOf("draw-flowchart")>-1?(Tt.current.style.zIndex=1,Tt.current.style.display="flex",Tt.current.style.width=Xe.target.clientWidth+"px",Tt.current.style.height=Xe.target.clientHeight+"px",Tt.current.style.top=Xe.target.offsetTop+"px",Tt.current.style.left=Xe.target.offsetLeft+"px",Xe.target.id&&(Ke.current=Xe.target.id)):Tt.current.style.display="none"},_t=()=>{Tt.current.style.display="none"};return(0,_.useEffect)(()=>{var Xe;const qe=st=>{st.preventDefault(),st.clipboardData.setData("text",window.getSelection().toString())};return(Xe=ut.current)==null||Xe.addEventListener("copy",qe),()=>{var st;(st=ut.current)==null||st.removeEventListener("copy",qe)}},[ut.current]),_.createElement("div",{style:{position:"relative"},onMouseLeave:_t},ne&&_.createElement("div",{ref:ut,className:`${q.mdBody} `},Me),!ne&&!we(Me)&&_.createElement("div",{ref:ut,style:oe({},W),onMouseOver:gt,className:`${Z||""} ${Ne?"disabled-fill":""} markdown-body ${q.mdBody} ${je.current}`,dangerouslySetInnerHTML:{__html:Me}}),!ne&&we(Me)&&_.createElement(L,{html:Me}),_.createElement("div",{ref:Tt,className:`${q.button} ${$?"":q.previewFlowChart}`},_.createElement(o.Z,null,_.createElement(Y.ZP,{onClick:()=>{$?Te(Ke.current):(Le(Ke.current),Pe("flowChart"))}},$?"\u7F16\u8F91":"\u9884\u89C8"))),_.createElement(w.Z,{close:!0,data:Et,type:Et!=null&&Et.length?pt:"",style:oe({},y),onClose:()=>Le("")}))}},34728:function(Gt,nt,b){"use strict";b.d(nt,{SV:function(){return Tt},ZP:function(){return Ve}});var _=b(59301),fe=b(76374);const be={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},pe={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"]},z={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(`
`)}]},m={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(`
`)}]},ce={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 ie=b(53184),o=b.n(ie),Y=(Ke,Et,Le)=>new Promise((pt,Pe)=>{var Ae=Ie=>{try{je(Le.next(Ie))}catch(we){Pe(we)}},he=Ie=>{try{je(Le.throw(Ie))}catch(we){Pe(we)}},je=Ie=>Ie.done?pt(Ie.value):Promise.resolve(Ie.value).then(Ae,he);je((Le=Le.apply(Ke,Et)).next())});const N={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"]}},w=(Ke,Et,Le,pt)=>{const Pe=Et.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Le.lineNumber,endColumn:Le.column});return Array.from(new Set(Pe.match(/\b\w{2,}\b/g)||[])).map(he=>({label:he,kind:Ke.languages.CompletionItemKind.Text,insertText:he,range:pt}))},S=(Ke,Et,Le,pt)=>{Ke.languages.registerCompletionItemProvider(Et,{provideCompletionItems(Pe,Ae){const he=Pe.getWordUntilPosition(Ae),je={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Ie=Pe.getLineContent(Ae.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[...w(Ke,Pe,Ae,je),...Le.map(M=>({label:M,kind:Ke.languages.CompletionItemKind.Keyword,documentation:M,insertText:M,insertTextRules:Ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:je})),...pt.map(M=>({label:M.label,kind:Ke.languages.CompletionItemKind.Snippet,documentation:M.content,insertText:Ie.startsWith("#")?M.content.replace(/#/,""):M.content,insertTextRules:Ke.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:je}))]}}})};var C=Ke=>{N.languages.forEach(Et=>{Ke.languages.registerDocumentFormattingEditProvider(Et,{provideDocumentFormattingEdits(Le){return Y(this,null,function*(){const pt=o()(Le.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:Le.getFullModelRange(),text:pt}]})}})}),S(Ke,"java",pe.keywords,pe.quickKey),S(Ke,"cpp",z.keywords,z.quickKey),S(Ke,"c",be.keywords,[]),S(Ke,"python",m.keywords,m.quickKey),S(Ke,"scala",ce.keywords,ce.quickKey)};const L="\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,q=(Ke,Et,Le)=>Et in Ke?Q(Ke,Et,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ke[Et]=Le,H=(Ke,Et,Le)=>q(Ke,typeof Et!="symbol"?Et+"":Et,Le);const T=class xu{constructor(Et,Le,pt){this.placeholder=Et,this.editor=Le,this.monaco=pt,Le.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return xu.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)}};H(T,"ID","editor.widget.placeholderHint");var P=T,F=b(96236),oe=b(6767),ye=b(25399),le=b(78267),De=b(33156),Ue=b(56102),Be=Object.defineProperty,rt=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,re=(Ke,Et,Le)=>Et in Ke?Be(Ke,Et,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ke[Et]=Le,W=(Ke,Et)=>{for(var Le in Et||(Et={}))Z.call(Et,Le)&&re(Ke,Le,Et[Le]);if($)for(var Le of $(Et))ne.call(Et,Le)&&re(Ke,Le,Et[Le]);return Ke},y=(Ke,Et)=>rt(Ke,ae(Et)),E=(Ke,Et)=>{var Le={};for(var pt in Ke)Z.call(Ke,pt)&&Et.indexOf(pt)<0&&(Le[pt]=Ke[pt]);if(Ke!=null&&$)for(var pt of $(Ke))Et.indexOf(pt)<0&&ne.call(Ke,pt)&&(Le[pt]=Ke[pt]);return Le},B=(Ke,Et,Le)=>new Promise((pt,Pe)=>{var Ae=Ie=>{try{je(Le.next(Ie))}catch(we){Pe(we)}},he=Ie=>{try{je(Le.throw(Ie))}catch(we){Pe(we)}},je=Ie=>Ie.done?pt(Ie.value):Promise.resolve(Ie.value).then(Ae,he);je((Le=Le.apply(Ke,Et)).next())});function ue(Ke){return/^\d+$/.test(Ke)?`${Ke}px`:Ke}function Ne(){}let We=!1;const Te={"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 ze(Ke=[]){let Et=Ke;if(Array.isArray(Ke)){for(let Le=0;Le<Ke.length;Le++){let pt=Te[Ke[Le]];if(pt)return pt}return Et[0]}return Te[Et]||Et}let Ye=null;const Je=()=>B(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Ke){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Ke)}});var Ve=Ke=>{var Et=Ke,{width:Le="100%",height:pt="100%",value:Pe,language:Ae="javascript",style:he={},options:je={},overrideServices:Ie={},theme:we="vs-dark",onEditBlur:M,isCopy:de=!1,onSave:_e,autoHeight:Me=!1,forbidCopy:Fe=!1,forbidCopyTips:Ze,onChange:Qe=Ne,editorDidMount:tt=Ne,onFocus:ut=Ne,onBreakPoint:dt=Ne,breakPointValue:St=[],filename:gt="educoder.txt",errorLine:_t,errorContent:Xe="",highlightLine:qe,openBreakPoint:st=!1,placeholder:ot="",showMiniMap:Ct=!0}=Et,x=E(Et,["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 D=(0,_.useRef)(),se=(0,_.useRef)({}),I=(0,_.useRef)(),U=(0,_.useRef)(),it=(0,_.useRef)([]),xe=(0,_.useRef)(!1),Re=(0,_.useRef)(),He=(0,_.useRef)(),G=(0,_.useRef)(!1),[J,ve]=(0,_.useState)(!1);function Ce(){let Rt;return D.current&&(Rt=new fe.Z(Ot=>{for(let Xt of Ot)(Xt.target.offsetHeight>0||Xt.target.offsetWidth>0)&&se.current.instance.layout()}),Rt.observe(D.current)),Rt}function X(){oe.ZP.warning({content:decodeURIComponent(Ze||L),key:"monaco-editor-tip"})}const ct=()=>{let Rt=se.current.instance;if(Pe!=null&&Rt&&J){const Ot=Rt.getModel();Ot&&Pe!==Ot.getValue()&&(We=!0,Ot.setValue(Pe),Rt.layout(),We=!1)}};(0,_.useEffect)(()=>{const Rt=De.Z.subscribe("formatDocument",Ot=>{var Xt;let un=se.current.instance;(Xt=un==null?void 0:un.getAction)==null||Xt.call(un,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ot=>{Qe(Ot)},Rt},[]),(0,_.useEffect)(()=>{var Rt;let Ot=se.current.instance;U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{ct()},500),Pe&&(Pe!=null&&Pe.length)&&((Rt=Ot==null?void 0:Ot.updateOptions)==null||Rt.call(Ot,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Pe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Pe,J,se.current]),(0,_.useEffect)(()=>{if(_t&&se.current&&se.current.instance){let Ot=se.current.instance;Ot.changeViewZones(function(Xt){var un=document.createElement("div");un.style.padding="10px 20px",un.style.width="calc(100% - 20px)",un.className="my-error-line-wrp",un.innerHTML=Xe,Xt.addZone({afterLineNumber:_t||11,heightInLines:3,domNode:un})});var Rt={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}};Ot.addOverlayWidget(Rt),Ot.revealPositionInCenter({lineNumber:20,column:1})}},[_t,se.current,J]);const ge=(Rt="",Ot)=>{if(!Rt||Rt.trim()==="")return!0;const un=se.current.instance.getModel().getLineTokens(Ot);let In=!1;for(let ar=0;ar<2;ar++)un.getStandardTokenType(ar)===1&&(In=!0);return In};(0,_.useEffect)(()=>{var Rt;const Ot=(Rt=se.current)==null?void 0:Rt.instance;if(Ot&&J&&Fe){const Xt=Ot.onDidBlurEditorWidget(()=>{G.current=!1}),un=Ot.onDidFocusEditorText(()=>{G.current=!0});return()=>{Xt.dispose(),un.dispose()}}},[se.current,J,Fe]),(0,_.useEffect)(()=>{var Rt;if((Rt=se.current)!=null&&Rt.instance&&J&&st){let Ot=se.current.instance,Xt=Ot.getModel();if(!Xt)return;(()=>{var Mn;let Bn=[],Nn=[];const ir=Xt.getAllDecorations();for(let yt of ir)yt.options.className==="highlighted-line"&&(Bn.push((Mn=yt==null?void 0:yt.range)==null?void 0:Mn.startLineNumber),Nn.push(yt==null?void 0:yt.id));if(qe===Bn[0])return;Xt.deltaDecorations(Nn,[]);const at=Xt.getLineCount();qe&&qe<=at&&(Ot.deltaDecorations([],[{range:new Ye.Range(qe,1,qe,Xt.getLineMaxColumn(qe)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ot.revealLineInCenter(qe))})();const In=(Mn=!1)=>{var Bn;let Nn=[],ir=[];const at=Xt.getAllDecorations();for(let yt of at)yt.options.linesDecorationsClassName==="breakpoints-select"&&(Nn.push((Bn=yt==null?void 0:yt.range)==null?void 0:Bn.startLineNumber),ir.push(yt==null?void 0:yt.id));if(Mn)return{lines:Nn,ids:ir};dt(Nn)},ar=Mn=>B(void 0,null,function*(){let Bn={range:new Ye.Range(Mn,1,Mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Xt.deltaDecorations([],[Bn]),In()}),yr=Mn=>B(void 0,null,function*(){let Bn=[];const Nn=Ot.getLineDecorations(Mn);for(let ir of Nn)ir.options.linesDecorationsClassName==="breakpoints-select"&&Bn.push(ir.id);yield Xt.deltaDecorations(Bn,[]),In()}),br=Mn=>{let Bn=Ot.getLineDecorations(Mn);for(let Nn of Bn)if(Nn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,le.isEqual)(St,In(!0).lines)){Xt.deltaDecorations(In(!0).ids,[]);const Mn=St.map(Bn=>({range:new Ye.Range(Bn,1,Bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Xt.deltaDecorations([],Mn)}const _r=Ot.onDidChangeModelContent(Mn=>{let Bn=Ot.getPosition();if(Bn){let Nn=Bn.lineNumber;clearTimeout(He.current),He.current=setTimeout(()=>{ge(Xt.getLineContent(Nn),Nn)?yr(Nn):br(Nn)?(yr(Nn),ar(Nn)):In()},100)}}),On=Ot.onMouseDown(Mn=>{var Bn,Nn,ir;if(Mn.target.detail&&((ir=(Nn=(Bn=Mn.target)==null?void 0:Bn.element)==null?void 0:Nn.className)!=null&&ir.includes("line-numbers"))){let at=Mn.target.position.lineNumber;if(ge(Xt.getLineContent(at),at))return;br(at)?yr(at):ar(at)}}),cr=Mn=>{let Bn={range:new Ye.Range(Mn,1,Mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};it.current=Ot.deltaDecorations(it.current,[Bn])},nr=()=>{it.current=Ot.deltaDecorations(it.current,[])},Mr=Ot.onMouseMove(Mn=>{var Bn,Nn,ir;if(nr(),Mn.target.detail&&((ir=(Nn=(Bn=Mn.target)==null?void 0:Bn.element)==null?void 0:Nn.className)!=null&&ir.includes("line-numbers"))){let at=Mn.target.position.lineNumber;if(ge(Xt.getLineContent(at),at))return;cr(at)}}),dr=Ot.onMouseLeave(()=>{nr()});return()=>{_r.dispose(),On.dispose(),Mr.dispose(),dr.dispose()}}},[se.current,J,St,qe,st,Ae]),(0,_.useEffect)(()=>{var Rt;(Rt=se.current)!=null&&Rt.instance&&st&&se.current.instance.setPosition({lineNumber:0,column:0})},[qe]);function wt(){let Rt=se.current.instance;if(Rt){const Ot=Rt.getSelection(),Xt=se.current.pastePos||{},un=new Ye.Range(Xt.startLineNumber||Ot.endLineNumber,Xt.startColumn||Ot.endColumn,Xt.endLineNumber||Ot.endLineNumber,Xt.endColumn||Ot.endColumn);setTimeout(()=>{Rt.executeEdits("",[{range:un,text:""}])},300)}}function Ft(Rt){(window.navigator.platform.match("Mac")?Rt.metaKey:Rt.ctrlKey)&&Rt.keyCode==83&&(Rt.preventDefault(),_e())}const Kt=()=>{if(Me&&se.current.instance){const Rt=se.current.instance.getContentHeight();pn(Rt<pt?pt:Rt)}else pn(pt)};function on(Rt){var Ot=document.createEvent("MouseEvents");Ot.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Rt.dispatchEvent(Ot)}const rn=Rt=>{if(!G.current)return;const{keyCode:Ot,ctrlKey:Xt,metaKey:un,target:In,type:ar}=Rt;return(ar==="paste"||(Ot===67||Ot===86)&&(un||Xt))&&In.nodeName==="TEXTAREA"&&(X(),Rt.preventDefault()),!1};function Zt(Rt,Ot){var Xt=window.URL||window.webkitURL||window,un=new Blob([Ot]),In=document.createElementNS("http://www.w3.org/1999/xhtml","a");In.href=Xt.createObjectURL(un),In.download=Rt,on(In)}(0,_.useEffect)(()=>{Kt()},[Kt]),(0,_.useEffect)(()=>{D.current&&!J&&Promise.all([b.e(8909),b.e(5977)]).then(b.bind(b,71448)).then(Rt=>{try{Ye=Rt,se.current.instance=Ye.editor.create(D.current,{value:Pe,language:ze(Ae),theme:we,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ct||!1}},Ie);const Ot=se.current.instance;let In=[...F.BH._menuItems].find(_r=>_r[0]._debugName=="EditorContext")[1],ar=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],yr=(_r,On)=>{var cr,nr;let Mr=_r._first;do On.includes((nr=(cr=Mr.element)==null?void 0:cr.command)==null?void 0:nr.id)&&_r._remove(Mr);while(Mr=Mr.next)};if(tt(Ot,Ye),setTimeout(()=>{Kt(),se.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Zt(gt||"educoder.txt",Ot.getValue())}})},500),se.current.subscription=Ot.onDidChangeModelContent(_r=>{xe.current?clearTimeout(Re.current):(Kt(),Qe(Ot.getValue(),_r)),Re.current=setTimeout(()=>{xe.current=!1},500)}),window.Monaco||C(Ye,ze(Ae)),Fe&&(yr(In,ar),D.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",rn),window.removeEventListener("paste",rn),window.addEventListener("keydown",rn),window.addEventListener("paste",rn)),window.Monaco=Ye,M&&Ot.onDidBlurEditorWidget(()=>{M(Ot.getValue())}),ut&&Ot.onDidFocusEditorText(()=>{Fe&&Je(),ut(Ot.getValue())}),Fe){Je();try{Ot.onDidPaste(_r=>{const On=Ot.getSelection(),cr=se.current.pastePos||{},nr=new Ye.Range(cr.startLineNumber||On.endLineNumber,cr.startColumn||On.endColumn,cr.endLineNumber||On.endLineNumber,cr.endColumn||On.endColumn);Ot.executeEdits("",[{range:_r.range,text:""}])})}catch(_r){}}let br=Ce();return ot&&typeof ot=="string"&&new P(ot,Ot,Ye),ve(!0),()=>{const _r=se.current.instance;_r.dispose();const On=_r.getModel();On&&On.dispose(),se.current.subscription&&se.current.subscription.dispose(),br.unobserve(D.current)}}catch(Ot){}})},[]),(0,_.useEffect)(()=>{if(se.current.instance&&J)return document.addEventListener("keydown",Ft,!1),()=>{document.removeEventListener("keydown",Ft)}},[_e,J]),(0,_.useEffect)(()=>{let Rt=se.current.instance;if(Rt&&J){let Ot=ze(Ae);Ye.editor.setModelLanguage(Rt.getModel(),Ot)}},[Ae,J]),(0,_.useEffect)(()=>{se.current.instance&&J&&Ye.editor.setTheme(we)},[we,J]),(0,_.useEffect)(()=>{let Rt=se.current.instance;I.current=je,Rt&&J&&(Rt.updateOptions(W({},je)),setTimeout(()=>{Rt.getModel().updateOptions(W({},je))},200))},[JSON.stringify(je),J]),(0,_.useEffect)(()=>{let Rt=se.current.instance;Rt&&J&&Rt.layout()},[Le,pt,J]);const[ln,er]=(0,_.useState)(ue(Le)),[Sn,pn]=(0,_.useState)(ue(pt)),Ut=y(W({},he),{width:ln,height:Sn,position:"relative"});return _.createElement("div",{className:"my-monaco-editor",ref:D,style:Ut,onFocus:()=>{Fe&&Je()}},de&&_.createElement(Ue.CopyToClipboard,{text:Pe,onCopy:()=>oe.ZP.success("\u590D\u5236\u6210\u529F")},_.createElement(ye.Z,{title:"\u590D\u5236\u4EE3\u7801"},_.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},_.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Tt({width:Ke="100%",height:Et="100%",original:Le,modified:pt,language:Pe,options:Ae={}}){const he=(0,_.useRef)(),[je,Ie]=(0,_.useState)(null);function we(Me){let Fe;return he.current&&(Fe=new fe.Z(Ze=>{for(let Qe of Ze)(Qe.target.offsetHeight>0||Qe.target.offsetWidth>0)&&Me.layout()}),Fe.observe(he.current)),Fe}(0,_.useEffect)(()=>(he.current&&Promise.all([b.e(8909),b.e(9404)]).then(b.bind(b,2550)).then(Me=>{Ye=Me;const Fe=Ye.editor.createDiffEditor(he.current,y(W({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},Ae),{wordWrap:!0}));Ie(Fe);let Ze=we(Fe);return()=>{Fe.dispose();const Qe=Fe.getModel();Qe&&Qe.dispose(),Ze.unobserve(he.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,_.useEffect)(()=>{je&&je.setModel({original:Ye.editor.createModel(Le,Pe),modified:Ye.editor.createModel(pt,Pe)})},[Le,pt,Pe,je]);const M=ue(Ke),de=ue(Et),_e={width:M,height:de};return _.createElement("div",{className:"my-diff-editor",ref:he,style:_e})}},61802:function(Gt,nt,b){"use strict";b.r(nt),b.d(nt,{default:function(){return ae}});var _=b(59301),fe=b(44283),be=b(6767),pe=b(4875),z=b(7939),m=b(91882),ce=b(77019),ie=b(5269),o=b(37285),Y=b(45685),N=b(47889),w=b(37568),S=b(27812),C=b(84849),L=b(35883);const Q=({data:$})=>{const[Z,ne]=(0,_.useState)(!1),re=()=>{var W;switch($.question_type){case 3:return _.createElement("aside",null,_.createElement("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:()=>{ne(!Z)}},Z?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),Z&&_.createElement("div",null,(W=$==null?void 0:$.standard_answer)==null?void 0:W.map(function(y,E){var B;return _.createElement(ce.Z,{className:"mt10"},_.createElement(ie.Z,{flex:"50px"},_.createElement("span",{className:"mt10"},"\u586B\u7A7A",y.choice_id)),_.createElement(ie.Z,{flex:1},(B=y==null?void 0:y.answer_text)==null?void 0:B.map(function(ue,Ne){return _.createElement("div",{style:{border:"1px solid #eee",padding:"15px 10px 0 10px"}},ue)})))})));case 4:return _.createElement("aside",null,_.createElement("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:()=>{ne(!Z)}},Z?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),Z&&_.createElement("div",null,_.createElement(L.Z,{value:$.standard_answer.join(" ")})))}};return _.createElement("section",null,re())};var q={flex_box_center:"flex_box_center___rZhUX",flex_space_between:"flex_space_between___WSWPP",flex_box_vertical_center:"flex_box_vertical_center___Fl2CQ",flex_box_center_end:"flex_box_center_end___zIA_L",flex_box_column:"flex_box_column___wpPM2",bg:"bg___PTvAX",title:"title___NRpL_",questionIcons:"questionIcons___qftEo",green:"green___DII_f",orange:"orange___nqaHJ",greenTip:"greenTip___NQ5fc",redTip:"redTip___BYmiY",orangeTip:"orangeTip___wlzcb",cuttOff:"cuttOff___Y19D3"},H=b(76406),T=b(59301),V=Object.defineProperty,P=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ye=($,Z,ne)=>Z in $?V($,Z,{enumerable:!0,configurable:!0,writable:!0,value:ne}):$[Z]=ne,le=($,Z)=>{for(var ne in Z||(Z={}))F.call(Z,ne)&&ye($,ne,Z[ne]);if(P)for(var ne of P(Z))oe.call(Z,ne)&&ye($,ne,Z[ne]);return $},De=($,Z)=>{var ne={};for(var re in $)F.call($,re)&&Z.indexOf(re)<0&&(ne[re]=$[re]);if($!=null&&P)for(var re of P($))Z.indexOf(re)<0&&oe.call($,re)&&(ne[re]=$[re]);return ne},Ue=($,Z,ne)=>new Promise((re,W)=>{var y=ue=>{try{B(ne.next(ue))}catch(Ne){W(Ne)}},E=ue=>{try{B(ne.throw(ue))}catch(Ne){W(Ne)}},B=ue=>ue.done?re(ue.value):Promise.resolve(ue.value).then(y,E);B((ne=ne.apply($,Z)).next())});const Be=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898"],rt=$=>{var Z=$,{exercise:ne,globalSetting:re,loading:W,user:y,dispatch:E}=Z,B=De(Z,["exercise","globalSetting","loading","user","dispatch"]),ue,Ne,We,Te,ze,Ye,Je,Ve,Tt,Ke,Et,Le,pt,Pe,Ae,he,je,Ie,we,M,de;const _e=(0,fe.useParams)(),{userInfo:Me}=y,{reviewGroupExercise:Fe}=ne,[Ze,Qe]=(0,_.useState)({}),[tt,ut]=(0,_.useState)(!1),dt=(0,_.useRef)();console.log(Ze);const St=()=>{var qe,st;console.log(_e,222);let ot=localStorage[`${(qe=y==null?void 0:y.userInfo)==null?void 0:qe.login}-${_e.coursesId}-${_e.exerciseId}-filter`];if(ot?ot=JSON.parse(ot):ot={},Object.prototype.toString.call(ot)!=="[object Object]")return{};let Ct=((st=ot==null?void 0:ot.commit_status)==null?void 0:st.filter(x=>x===2||x===3))||[2,3];return ot.commit_status=(Ct==null?void 0:Ct.length)>0?Ct:[2,3],ot};(0,_.useEffect)(()=>{var qe;(qe=y==null?void 0:y.userInfo)!=null&&qe.login&&gt()},[(ue=y==null?void 0:y.userInfo)==null?void 0:ue.login]);const gt=()=>{const qe=St();E({type:"exercise/getReviewGroupExercise",payload:le({exerciseId:_e.exerciseId},qe)})},_t=qe=>Ue(void 0,null,function*(){const st=St();E({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u8C03\u5206\u4E2D\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,C.LP)(le({cover_all:!0,id:qe.question_id,max_score:Ze[qe.q_position].max,min_score:Ze[qe.q_position].min,comment:Ze.comment},st))).status===0&&(delete Ze[qe.q_position],gt(),be.ZP.success("\u6279\u91CF\u8C03\u5206\u6210\u529F")),E({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:"\u8C03\u5206\u4E2D\uFF0C\u8BF7\u7A0D\u540E..."}})}),Xe=qe=>{var st,ot,Ct;if(qe.question_type>1)return Ze[qe.q_position]?T.createElement("div",{className:"mr10 ml10 inline-block"},"\u5728\u4EE5\u4E0B\u533A\u95F4\u4E2D\u4E3A\u5B66\u751F\u968F\u673A\u8D4B\u5206\uFF1A",T.createElement(pe.Z,{placeholder:"\u6700\u4F4E",defaultValue:qe.user_score,max:qe.question_score,min:0,onChange:x=>{Ze[qe.q_position].min=String(x),Qe(le({},Ze))}}),T.createElement("div",{className:q.cuttOff}),T.createElement(pe.Z,{placeholder:"\u6700\u9AD8",defaultValue:qe.user_score,max:qe.question_score,min:((st=Ze[qe.q_position])==null?void 0:st.min)||0,onChange:x=>{Ze[qe.q_position].max=String(x),Qe(le({},Ze))}}),"\u5206",T.createElement(z.ZP,{className:"ml5",type:"primary",disabled:!((ot=Ze[qe.q_position])!=null&&ot.min)||!((Ct=Ze[qe.q_position])!=null&&Ct.max),onClick:()=>_t(qe)},"\u786E\u8BA4")):T.createElement("span",{style:{cursor:"pointer"},onClick:()=>{Ze[qe.q_position]={},Qe(le({},Ze))},className:"c-blue mr10 ml10"},"\u8C03\u5206")};return T.createElement("section",{className:"edu-container",ref:dt},T.createElement("section",{className:"animated fadeIn"},T.createElement("aside",{className:"mt10"},Me&&T.createElement(m.Z,{separator:">"},T.createElement(m.Z.Item,null,T.createElement(fe.Link,{to:`${Me.first_category_url}`},(Ne=Me==null?void 0:Me.course)==null?void 0:Ne.course_name)),T.createElement(m.Z.Item,null,T.createElement(fe.Link,{to:`/classrooms/${_e.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")),T.createElement(m.Z.Item,null,T.createElement(fe.Link,{to:`/classrooms/${_e.coursesId}/exercise/${_e.exerciseId}/detail`},"\u8BD5\u5377\u8BE6\u60C5")),T.createElement(m.Z.Item,null,(We=Fe==null?void 0:Fe.exercise_answer_user)==null?void 0:We.user_name))),T.createElement("aside",{className:[q.title,"mt20"].join(" ")},T.createElement(ce.Z,{style:{width:"100%"}},T.createElement(ie.Z,{flex:"1"},T.createElement(fe.Link,{to:`/classrooms/${_e.coursesId}/exercise/${_e.exerciseId}/detail`},T.createElement(S.Z,{className:"font16 c-black"})),T.createElement("strong",{className:"font20 ml5"},(Te=Fe==null?void 0:Fe.exercise)==null?void 0:Te.exercise_name),T.createElement(H.VV,{status:[H.ju[(ze=Fe.exercise)==null?void 0:ze.exercise_status]]})),T.createElement(ie.Z,null)))),T.createElement("section",{className:[q.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},T.createElement(ce.Z,{gutter:[30,0]},T.createElement(ie.Z,{className:"bold c-black"},T.createElement("aside",null,T.createElement("span",null,"\u8003\u8BD5\u65F6\u957F ",((Ye=Fe.exercise)==null?void 0:Ye.time)===-1?"\u672A\u9650\u65F6":(Je=Fe.exercise)==null?void 0:Je.time),T.createElement("span",{className:"ml20"},"\u6EE1\u5206 ",(Tt=(Ve=Fe.exercise_scores)==null?void 0:Ve.exercise_types)==null?void 0:Tt.q_scores,"\u5206")))),T.createElement(o.Z,null),T.createElement(ce.Z,{gutter:[30,0]},T.createElement(ie.Z,{flex:"1"},T.createElement("span",{className:"c-light-black"},"\u60A8\u6B63\u5728\u5BF9\u4EE5\u4E0B\u5B66\u751F\u8FDB\u884C\u6279\u91CF\u8BC4\u9605\uFF1A"),T.createElement("span",null,(Ke=Fe.exercise_answer_user)==null?void 0:Ke.user_name))),T.createElement(ce.Z,{gutter:[30,0]},T.createElement(ie.Z,{span:24,className:"mt10"},(Et=Fe==null?void 0:Fe.exercise_users)==null?void 0:Et.map(function(qe,st){if(st<100)return T.createElement("strong",{className:"mr10",key:st},qe.user_name)})),T.createElement(ie.Z,{span:24,className:"tr"},((Le=Fe==null?void 0:Fe.exercise_users)==null?void 0:Le.length)>100&&T.createElement("span",null,"......\u7B49",(pt=Fe==null?void 0:Fe.exercise_users)==null?void 0:pt.length,"\u4EBA"))),T.createElement(o.Z,null),((Pe=Fe==null?void 0:Fe.exercise_questions)==null?void 0:Pe.some(qe=>qe.question_type!==4))&&T.createElement("aside",null,T.createElement(ce.Z,{gutter:[10,10]},T.createElement(ie.Z,{flex:"1"},T.createElement("aside",null,T.createElement("strong",{className:"font14"},"\u5BA2\u89C2\u9898"),T.createElement("span",{className:q.greenTip},"\u6B63\u786E"),T.createElement("span",{className:q.redTip},"\u9519\u8BEF"),T.createElement("span",{className:q.redTip},"\u90E8\u5206\u5F97\u5206")),T.createElement("aside",{className:[q.questionIcons,"mt10"].join(" ")},T.createElement(Y.default,{affix:!1,onChange:()=>ut(!0)},(Ae=Fe==null?void 0:Fe.exercise_questions)==null?void 0:Ae.map(function(qe,st){if(qe.question_type!==4)return T.createElement(Y.default.Link,{href:`#questionID-${qe.q_position}`,title:qe.q_position})})))),T.createElement(ie.Z,null,"\u603B\u5206 ",T.createElement("span",{className:"c-red bold"},(je=(he=Fe.exercise_scores)==null?void 0:he.exercise_types)==null?void 0:je.q_scores)," \u5206")),T.createElement("p",{className:"c-blue tr",onClick:()=>ut(!tt)},tt?"\u6536\u8D77\u7B54\u9898\u8BE6\u60C5":"\u5C55\u5F00\u67E5\u770B\u7B54\u9898\u8BE6\u60C5",T.createElement("span",{className:"iconfont icon-play-square-fill3x ml5"})),T.createElement(o.Z,null)),T.createElement(ce.Z,{gutter:[10,10]},T.createElement(ie.Z,{flex:"1"},T.createElement("aside",null,T.createElement("strong",{className:"font14"},"\u4E3B\u89C2\u9898"),T.createElement("span",{className:q.greenTip},"\u5DF2\u8BC4"),T.createElement("span",{className:q.redTip},"\u672A\u8BC4")),T.createElement("aside",{className:[q.questionIcons,"mt10"].join(" ")},T.createElement(Y.default,{affix:!1},(Ie=Fe==null?void 0:Fe.exercise_questions)==null?void 0:Ie.map(function(qe,st){if(qe.question_type===4)return T.createElement(Y.default.Link,{href:`#questionID-${qe.q_position}`,title:qe.q_position}," ")})))),T.createElement(ie.Z,null,"\u603B\u5206 ",T.createElement("span",{className:"c-red bold"},(M=(we=Fe.exercise_scores)==null?void 0:we.exercise_types)==null?void 0:M.q_mains_scores)," \u5206")),(de=Fe.exercise_questions)==null?void 0:de.map(function(qe,st){var ot;return T.createElement("aside",{id:`questionID-${qe.q_position}`,className:`${tt||qe.question_type===4?"":"hide"}`},T.createElement(ce.Z,null,T.createElement(ie.Z,{flex:"1"},T.createElement("span",{className:"c-blue font14"},qe.q_position,". ",Be[qe.question_type]),T.createElement("span",{className:"c-light-black ml5"},"(",qe.question_score,")")),T.createElement(ie.Z,null,qe.standard_answer_show&&T.createElement("span",null,"\u6B63\u786E\u7B54\u6848\uFF1A",qe.standard_answer_show),Xe(qe),qe.user_score&&T.createElement("span",null,"\u5F97\u5206",T.createElement("span",{className:"c-red"},qe.user_score),"\u5206"),!qe.user_score&&T.createElement("span",{className:"c-red"},"\u672A\u8BC4"))),T.createElement("div",null,T.createElement(L.Z,{value:qe.question_title})),T.createElement("div",null,(ot=qe.question_choices)==null?void 0:ot.map(function(Ct,x){return T.createElement("div",null,T.createElement(N.ZP,{checked:qe.user_answer.includes(Ct.choice_id)},Ct.choice_text))})),T.createElement(Q,{data:qe}),Ze[qe.q_position]?T.createElement(w.default.TextArea,{onChange:Ct=>{Ze.comment=String(Ct.target.value),Qe(le({},Ze))},placeholder:"\u8BF7\u8F93\u5165\u8BC4\u8BED\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26",maxLength:100}):null,T.createElement(o.Z,null))})))};var ae=(0,fe.connect)(({exercise:$,loading:Z,user:ne,globalSetting:re})=>({exercise:$,globalSetting:re,user:ne,loading:Z.effects}))(rt)},20047:function(Gt,nt,b){"use strict";b.d(nt,{AL:function(){return P},Iy:function(){return N},Qv:function(){return C},ez:function(){return V},jb:function(){return w}});var _=b(32834),fe=b.n(_),be=b(11690),pe=b.n(be);let z=1;function m(De,Ue){const Be=De.match(/^(\s+)(?:```)/);if(Be===null)return Ue;const rt=Be[1];return Ue.split(`
`).map(ae=>{const $=ae.match(/^\s+/);if($===null)return ae;const[Z]=$;return Z.length>=rt.length?ae.slice(rt.length):ae}).join(`
`)}let ce=[],ie=["<ul>"];const o=new(fe()).Renderer,Y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function N(){ce.length=0,ie=["<ul>"]}const w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(De,Ue,Be,rt){if(Ue>=De.length||De[Ue].level<=Be)return Ue;var ae=De[Ue];rt.push("<li><a href='#"+z+ae.anchor+"'>"+ae.text+"</a>"),Ue++;var $=[];return Ue=S(De,Ue,ae.level,$),$.length>0&&(rt.push("<ul>"),$.forEach(function(Z){rt.push(Z)}),rt.push("</ul>")),rt.push("</li>"),Ue=S(De,Ue,Be,rt),Ue}function C(){return S(ce,0,0,ie),ie.push("</ul>"),ie.join("")}const L={heading(De){const Ue=Y.exec(De);if(z+=1,Ue)return{type:"heading",raw:Ue[0],depth:Ue[1].length,text:Ue[2]}},fences(De){const Ue=this.rules.block.fences.exec(De);if(Ue){const Be=Ue[0];let rt=m(Be,Ue[3]||"");const ae=Ue[2]?Ue[2].trim():Ue[2];if(["latex","katex","math"].indexOf(ae)>=0){const $=H(),Z=rt;rt=$,T[$]={type:"block",expression:Z}}return{type:"code",raw:Be,lang:ae,text:rt}}}},Q=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let q=0;const H=()=>`__special_katext_id_${q++}__`;let T={};function V(){return T}function P(){q=0,T={}}function F(De){return De=De.replace(Q,(Ue,Be)=>{const rt=H();return T[rt]={type:"inline",expression:Be},rt}),De}const oe=o.listitem;o.listitem=function(De){return oe(F(De))};const ye=o.paragraph;o.paragraph=function(De){return ye(F(De))};const le=o.tablecell;o.tablecell=function(De,Ue){return le(F(De),Ue)},o.code=function(De,Ue,Be){const rt=(Ue||"").match(/\S*/)[0];return rt?["latex","katex","math"].indexOf(rt)>=0?`<p class='editormd-tex'>${De}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ue}">${Be?De:(0,be.escape)(De,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Be?De:(0,be.escape)(De,!0))+"</code></pre>"},o.heading=function(De,Ue,Be){let rt=this.options.headerPrefix+Be.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ce.push({anchor:rt,level:Ue,text:De}),"<h"+Ue+' id="'+z+rt+'">'+De+"</h"+Ue+">"},fe().setOptions({silent:!0,gfm:!0,pedantic:!1}),fe().use({tokenizer:L,renderer:o}),nt.ZP=fe()},29509:function(Gt,nt,b){"use strict";b.d(nt,{o2:function(){return z},yT:function(){return m}});var _=b(77654),fe=b(34998);const be=fe.i.map(ce=>`${ce}-inverse`),pe=["success","processing","error","default","warning"];function z(ce){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,_.Z)(be),(0,_.Z)(fe.i)).includes(ce):fe.i.includes(ce)}function m(ce){return pe.includes(ce)}},99402:function(Gt,nt,b){"use strict";b.d(nt,{T:function(){return fe},n:function(){return _}});function _(be){return["small","middle","large"].includes(be)}function fe(be){return be?typeof be=="number"&&!Number.isNaN(be):!1}},86013:function(Gt,nt,b){"use strict";var _=b(59301),fe=b(19248);const be=pe=>{let z;return typeof pe=="object"&&(pe!=null&&pe.clearIcon)?z=pe:pe&&(z={clearIcon:_.createElement(fe.Z,null)}),z};nt.Z=be},97224:function(Gt,nt,b){"use strict";b.d(nt,{F:function(){return _}});function _(be){return be!=null&&be===be.window}const fe=be=>{var pe,z;if(typeof window=="undefined")return 0;let m=0;return _(be)?m=be.pageYOffset:be instanceof Document?m=be.documentElement.scrollTop:(be instanceof HTMLElement||be)&&(m=be.scrollTop),be&&!_(be)&&typeof m!="number"&&(m=(z=((pe=be.ownerDocument)!==null&&pe!==void 0?pe:be).documentElement)===null||z===void 0?void 0:z.scrollTop),m};nt.Z=fe},52838:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return m}});var _=b(37645);function fe(ce,ie,o,Y){if(Y===!1)return{adjustX:!1,adjustY:!1};const N=Y&&typeof Y=="object"?Y:{},w={};switch(ce){case"top":case"bottom":w.shiftX=ie.arrowOffsetHorizontal*2+o,w.shiftY=!0,w.adjustY=!0;break;case"left":case"right":w.shiftY=ie.arrowOffsetVertical*2+o,w.shiftX=!0,w.adjustX=!0;break}const S=Object.assign(Object.assign({},w),N);return S.shiftX||(S.adjustX=!0),S.shiftY||(S.adjustY=!0),S}const be={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"]}},pe={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"]}},z=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function m(ce){const{arrowWidth:ie,autoAdjustOverflow:o,arrowPointAtCenter:Y,offset:N,borderRadius:w,visibleFirst:S}=ce,C=ie/2,L={};return Object.keys(be).forEach(Q=>{const q=Y&&pe[Q]||be[Q],H=Object.assign(Object.assign({},q),{offset:[0,0],dynamicInset:!0});switch(L[Q]=H,z.has(Q)&&(H.autoArrow=!1),Q){case"top":case"topLeft":case"topRight":H.offset[1]=-C-N;break;case"bottom":case"bottomLeft":case"bottomRight":H.offset[1]=C+N;break;case"left":case"leftTop":case"leftBottom":H.offset[0]=-C-N;break;case"right":case"rightTop":case"rightBottom":H.offset[0]=C+N;break}const T=(0,_.wZ)({contentRadius:w,limitVerticalRadius:!0});if(Y)switch(Q){case"topLeft":case"bottomLeft":H.offset[0]=-T.arrowOffsetHorizontal-C;break;case"topRight":case"bottomRight":H.offset[0]=T.arrowOffsetHorizontal+C;break;case"leftTop":case"rightTop":H.offset[1]=-T.arrowOffsetHorizontal*2+C;break;case"leftBottom":case"rightBottom":H.offset[1]=T.arrowOffsetHorizontal*2-C;break}H.overflow=fe(Q,T,ie,o),S&&(H.htmlRegion="visibleFirst")}),L}},83010:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return pe}});var _=b(16089);function fe(z,m,ce,ie){const o=ce-m;return z/=ie/2,z<1?o/2*z*z*z+m:o/2*((z-=2)*z*z+2)+m}var be=b(97224);function pe(z){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:ce=()=>window,callback:ie,duration:o=450}=m,Y=ce(),N=(0,be.Z)(Y),w=Date.now(),S=()=>{const L=Date.now()-w,Q=fe(L>o?o:L,N,z,o);(0,be.F)(Y)?Y.scrollTo(window.pageXOffset,Q):Y instanceof Document||Y.constructor.name==="HTMLDocument"?Y.documentElement.scrollTop=Q:Y.scrollTop=Q,L<o?(0,_.Z)(S):typeof ie=="function"&&ie()};(0,_.Z)(S)}},82855:function(Gt,nt,b){"use strict";b.d(nt,{F:function(){return z},Z:function(){return pe}});var _=b(92310),fe=b.n(_);const be=null;function pe(m,ce,ie){return fe()({[`${m}-status-success`]:ce==="success",[`${m}-status-warning`]:ce==="warning",[`${m}-status-error`]:ce==="error",[`${m}-status-validating`]:ce==="validating",[`${m}-has-feedback`]:ie})}const z=(m,ce)=>ce||m},41780:function(Gt,nt,b){"use strict";var _=b(77654),fe=b(16089);function be(pe){let z;const m=ie=>()=>{z=null,pe.apply(void 0,(0,_.Z)(ie))},ce=function(){if(z==null){for(var ie=arguments.length,o=new Array(ie),Y=0;Y<ie;Y++)o[Y]=arguments[Y];z=(0,fe.Z)(m(o))}};return ce.cancel=()=>{fe.Z.cancel(z),z=null},ce}nt.Z=be},48608:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return V}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(29301),z=b(41780),m=b(48755),ce=b(16931);const ie=P=>{const{componentCls:F}=P;return{[F]:{position:"fixed",zIndex:P.zIndexPopup}}},o=P=>({zIndexPopup:P.zIndexBase+10});var Y=(0,ce.I$)("Affix",ie,o);function N(P){return P!==window?P.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function w(P,F,oe){if(oe!==void 0&&Math.round(F.top)>Math.round(P.top)-oe)return oe+F.top}function S(P,F,oe){if(oe!==void 0&&Math.round(F.bottom)<Math.round(P.bottom)+oe){const ye=window.innerHeight-F.bottom;return oe+ye}}var C=function(P,F){var oe={};for(var ye in P)Object.prototype.hasOwnProperty.call(P,ye)&&F.indexOf(ye)<0&&(oe[ye]=P[ye]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var le=0,ye=Object.getOwnPropertySymbols(P);le<ye.length;le++)F.indexOf(ye[le])<0&&Object.prototype.propertyIsEnumerable.call(P,ye[le])&&(oe[ye[le]]=P[ye[le]]);return oe};const L=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function Q(){return typeof window!="undefined"?window:null}const q=0,H=1;var V=_.forwardRef((P,F)=>{var oe;const{style:ye,offsetTop:le,offsetBottom:De,prefixCls:Ue,className:Be,rootClassName:rt,children:ae,target:$,onChange:Z,onTestUpdatePosition:ne}=P,re=C(P,["style","offsetTop","offsetBottom","prefixCls","className","rootClassName","children","target","onChange","onTestUpdatePosition"]),{getPrefixCls:W,getTargetContainer:y}=_.useContext(m.E_),E=W("affix",Ue),[B,ue]=_.useState(!1),[Ne,We]=_.useState(),[Te,ze]=_.useState(),Ye=_.useRef(q),Je=_.useRef(null),Ve=_.useRef(null),Tt=_.useRef(null),Ke=_.useRef(null),Et=_.useRef(null),Le=(oe=$!=null?$:y)!==null&&oe!==void 0?oe:Q,pt=De===void 0&&le===void 0?0:le,Pe=()=>{if(Ye.current!==H||!Ke.current||!Tt.current||!Le)return;const Ze=Le();if(Ze){const Qe={status:q},tt=N(Tt.current);if(tt.top===0&&tt.left===0&&tt.width===0&&tt.height===0)return;const ut=N(Ze),dt=w(tt,ut,pt),St=S(tt,ut,De);dt!==void 0?(Qe.affixStyle={position:"fixed",top:dt,width:tt.width,height:tt.height},Qe.placeholderStyle={width:tt.width,height:tt.height}):St!==void 0&&(Qe.affixStyle={position:"fixed",bottom:St,width:tt.width,height:tt.height},Qe.placeholderStyle={width:tt.width,height:tt.height}),Qe.lastAffix=!!Qe.affixStyle,B!==Qe.lastAffix&&(Z==null||Z(Qe.lastAffix)),Ye.current=Qe.status,We(Qe.affixStyle),ze(Qe.placeholderStyle),ue(Qe.lastAffix)}},Ae=()=>{Ye.current=H,Pe()},he=(0,z.Z)(()=>{Ae()}),je=(0,z.Z)(()=>{if(Le&&Ne){const Ze=Le();if(Ze&&Tt.current){const Qe=N(Ze),tt=N(Tt.current),ut=w(tt,Qe,pt),dt=S(tt,Qe,De);if(ut!==void 0&&Ne.top===ut||dt!==void 0&&Ne.bottom===dt)return}}Ae()}),Ie=()=>{const Ze=Le==null?void 0:Le();Ze&&(L.forEach(Qe=>{var tt;Ve.current&&((tt=Je.current)===null||tt===void 0||tt.removeEventListener(Qe,Ve.current)),Ze==null||Ze.addEventListener(Qe,je)}),Je.current=Ze,Ve.current=je)},we=()=>{Et.current&&(clearTimeout(Et.current),Et.current=null);const Ze=Le==null?void 0:Le();L.forEach(Qe=>{var tt;Ze==null||Ze.removeEventListener(Qe,je),Ve.current&&((tt=Je.current)===null||tt===void 0||tt.removeEventListener(Qe,Ve.current))}),he.cancel(),je.cancel()};_.useImperativeHandle(F,()=>({updatePosition:he})),_.useEffect(()=>(Et.current=setTimeout(Ie),()=>we()),[]),_.useEffect(()=>{Ie()},[$,Ne,B]),_.useEffect(()=>{he()},[$,le,De]);const[M,de,_e]=Y(E),Me=be()(rt,de,E,_e),Fe=be()({[Me]:Ne});return M(_.createElement(pe.Z,{onResize:he},_.createElement("div",Object.assign({style:ye,className:Be,ref:Tt},re),Ne&&_.createElement("div",{style:Te,"aria-hidden":"true"}),_.createElement("div",{className:Fe,ref:Ke,style:Ne},_.createElement(pe.Z,{onResize:he},ae)))))})},45685:function(Gt,nt,b){"use strict";b.d(nt,{default:function(){return ae}});var _=b(77654),fe=b(59301),be=b(92310),pe=b.n(be),z=b(6089),m=b(16722),ce=b(97224),ie=b(83010),o=b(48608),Y=b(48755),N=b(83397),S=fe.createContext(void 0),L=$=>{const{href:Z,title:ne,prefixCls:re,children:W,className:y,target:E,replace:B}=$,ue=fe.useContext(S),{registerLink:Ne,unregisterLink:We,scrollTo:Te,onClick:ze,activeLink:Ye,direction:Je}=ue||{};fe.useEffect(()=>(Ne==null||Ne(Z),()=>{We==null||We(Z)}),[Z]);const Ve=Pe=>{ze==null||ze(Pe,{title:ne,href:Z}),Te==null||Te(Z),B&&(Pe.preventDefault(),window.location.replace(Z))},{getPrefixCls:Tt}=fe.useContext(Y.E_),Ke=Tt("anchor",re),Et=Ye===Z,Le=pe()(`${Ke}-link`,y,{[`${Ke}-link-active`]:Et}),pt=pe()(`${Ke}-link-title`,{[`${Ke}-link-title-active`]:Et});return fe.createElement("div",{className:Le},fe.createElement("a",{className:pt,href:Z,title:typeof ne=="string"?ne:"",target:E,onClick:Ve},ne),Je!=="horizontal"?W:null)},Q=b(36237),q=b(63356),H=b(16931),T=b(51636);const V=$=>{const{componentCls:Z,holderOffsetBlock:ne,motionDurationSlow:re,lineWidthBold:W,colorPrimary:y,lineType:E,colorSplit:B,calc:ue}=$;return{[`${Z}-wrapper`]:{marginBlockStart:ue(ne).mul(-1).equal(),paddingBlockStart:ne,[Z]:Object.assign(Object.assign({},(0,q.Wf)($)),{position:"relative",paddingInlineStart:W,[`${Z}-link`]:{paddingBlock:$.linkPaddingBlock,paddingInline:`${(0,Q.unit)($.linkPaddingInlineStart)} 0`,"&-title":Object.assign(Object.assign({},q.vS),{position:"relative",display:"block",marginBlockEnd:$.anchorTitleBlock,color:$.colorText,transition:`all ${$.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${Z}-link-title`]:{color:$.colorPrimary},[`${Z}-link`]:{paddingBlock:$.anchorPaddingBlockSecondary}}}),[`&:not(${Z}-wrapper-horizontal)`]:{[Z]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${(0,Q.unit)(W)} ${E} ${B}`,content:'" "'},[`${Z}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${re} ease-in-out`,width:W,backgroundColor:y,[`&${Z}-ink-visible`]:{display:"inline-block"}}}},[`${Z}-fixed ${Z}-ink ${Z}-ink`]:{display:"none"}}}},P=$=>{const{componentCls:Z,motionDurationSlow:ne,lineWidthBold:re,colorPrimary:W}=$;return{[`${Z}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`${(0,Q.unit)($.lineWidth)} ${$.lineType} ${$.colorSplit}`,content:'" "'},[Z]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${Z}-link:first-of-type`]:{paddingInline:0},[`${Z}-ink`]:{position:"absolute",bottom:0,transition:`left ${ne} ease-in-out, width ${ne} ease-in-out`,height:re,backgroundColor:W}}}}},F=$=>({linkPaddingBlock:$.paddingXXS,linkPaddingInlineStart:$.padding});var oe=(0,H.I$)("Anchor",$=>{const{fontSize:Z,fontSizeLG:ne,paddingXXS:re,calc:W}=$,y=(0,T.mergeToken)($,{holderOffsetBlock:re,anchorPaddingBlockSecondary:W(re).div(2).equal(),anchorTitleBlock:W(Z).div(14).mul(3).equal(),anchorBallSize:W(ne).div(2).equal()});return[V(y),P(y)]},F);function ye(){return window}function le($,Z){if(!$.getClientRects().length)return 0;const ne=$.getBoundingClientRect();return ne.width||ne.height?Z===window?ne.top-$.ownerDocument.documentElement.clientTop:ne.top-Z.getBoundingClientRect().top:ne.top}const De=/#([\S ]+)$/;var Be=$=>{var Z;const{rootClassName:ne,prefixCls:re,className:W,style:y,offsetTop:E,affix:B=!0,showInkInFixed:ue=!1,children:Ne,items:We,direction:Te="vertical",bounds:ze,targetOffset:Ye,onClick:Je,onChange:Ve,getContainer:Tt,getCurrentAnchor:Ke,replace:Et}=$,[Le,pt]=fe.useState([]),[Pe,Ae]=fe.useState(null),he=fe.useRef(Pe),je=fe.useRef(null),Ie=fe.useRef(null),we=fe.useRef(!1),{direction:M,getPrefixCls:de,className:_e,style:Me}=(0,Y.dj)("anchor"),{getTargetContainer:Fe}=fe.useContext(Y.E_),Ze=de("anchor",re),Qe=(0,N.Z)(Ze),[tt,ut,dt]=oe(Ze,Qe),St=(Z=Tt!=null?Tt:Fe)!==null&&Z!==void 0?Z:ye,gt=JSON.stringify(Le),_t=(0,z.Z)(G=>{Le.includes(G)||pt(J=>[].concat((0,_.Z)(J),[G]))}),Xe=(0,z.Z)(G=>{Le.includes(G)&&pt(J=>J.filter(ve=>ve!==G))}),qe=()=>{var G;const J=(G=je.current)===null||G===void 0?void 0:G.querySelector(`.${Ze}-link-title-active`);if(J&&Ie.current){const{style:ve}=Ie.current,Ce=Te==="horizontal";ve.top=Ce?"":`${J.offsetTop+J.clientHeight/2}px`,ve.height=Ce?"":`${J.clientHeight}px`,ve.left=Ce?`${J.offsetLeft}px`:"",ve.width=Ce?`${J.clientWidth}px`:"",Ce&&(0,m.Z)(J,{scrollMode:"if-needed",block:"nearest"})}},st=function(G){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5;const Ce=[],X=St();return G.forEach(ct=>{const ge=De.exec(ct==null?void 0:ct.toString());if(!ge)return;const wt=document.getElementById(ge[1]);if(wt){const Ft=le(wt,X);Ft<=J+ve&&Ce.push({link:ct,top:Ft})}}),Ce.length?Ce.reduce((ge,wt)=>wt.top>ge.top?wt:ge).link:""},ot=(0,z.Z)(G=>{if(he.current===G)return;const J=typeof Ke=="function"?Ke(G):G;Ae(J),he.current=J,Ve==null||Ve(G)}),Ct=fe.useCallback(()=>{if(we.current)return;const G=st(Le,Ye!==void 0?Ye:E||0,ze);ot(G)},[gt,Ye,E]),x=fe.useCallback(G=>{ot(G);const J=De.exec(G);if(!J)return;const ve=document.getElementById(J[1]);if(!ve)return;const Ce=St(),X=(0,ce.Z)(Ce),ct=le(ve,Ce);let ge=X+ct;ge-=Ye!==void 0?Ye:E||0,we.current=!0,(0,ie.Z)(ge,{getContainer:St,callback(){we.current=!1}})},[Ye,E]),D=pe()(ut,dt,Qe,ne,`${Ze}-wrapper`,{[`${Ze}-wrapper-horizontal`]:Te==="horizontal",[`${Ze}-rtl`]:M==="rtl"},W,_e),se=pe()(Ze,{[`${Ze}-fixed`]:!B&&!ue}),I=pe()(`${Ze}-ink`,{[`${Ze}-ink-visible`]:Pe}),U=Object.assign(Object.assign({maxHeight:E?`calc(100vh - ${E}px)`:"100vh"},Me),y),it=G=>Array.isArray(G)?G.map(J=>fe.createElement(L,Object.assign({replace:Et},J,{key:J.key}),Te==="vertical"&&it(J.children))):null,xe=fe.createElement("div",{ref:je,className:D,style:U},fe.createElement("div",{className:se},fe.createElement("span",{className:I,ref:Ie}),"items"in $?it(We):Ne));fe.useEffect(()=>{const G=St();return Ct(),G==null||G.addEventListener("scroll",Ct),()=>{G==null||G.removeEventListener("scroll",Ct)}},[gt]),fe.useEffect(()=>{typeof Ke=="function"&&ot(Ke(he.current||""))},[Ke]),fe.useEffect(()=>{qe()},[Te,Ke,gt,Pe]);const Re=fe.useMemo(()=>({registerLink:_t,unregisterLink:Xe,scrollTo:x,activeLink:Pe,onClick:Je,direction:Te}),[Pe,Je,x,Te]),He=B&&typeof B=="object"?B:void 0;return tt(fe.createElement(S.Provider,{value:Re},B?fe.createElement(o.Z,Object.assign({offsetTop:E,target:St},He),xe):xe))};const rt=Be;rt.Link=L;var ae=rt},91882:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return re}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(11592),z=b(26112),m=b(22703),ce=b(48755),ie=b(84105),o=b(19563);const Y=W=>{let{children:y}=W;const{getPrefixCls:E}=_.useContext(ce.E_),B=E("breadcrumb");return _.createElement("li",{className:`${B}-separator`,"aria-hidden":"true"},y===""?y:y||"/")};Y.__ANT_BREADCRUMB_SEPARATOR=!0;var N=Y,w=function(W,y){var E={};for(var B in W)Object.prototype.hasOwnProperty.call(W,B)&&y.indexOf(B)<0&&(E[B]=W[B]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,B=Object.getOwnPropertySymbols(W);ue<B.length;ue++)y.indexOf(B[ue])<0&&Object.prototype.propertyIsEnumerable.call(W,B[ue])&&(E[B[ue]]=W[B[ue]]);return E};function S(W,y){if(W.title===void 0||W.title===null)return null;const E=Object.keys(y).join("|");return typeof W.title=="object"?W.title:String(W.title).replace(new RegExp(`:(${E})`,"g"),(B,ue)=>y[ue]||B)}function C(W,y,E,B){if(E==null)return null;const{className:ue,onClick:Ne}=y,We=w(y,["className","onClick"]),Te=Object.assign(Object.assign({},(0,z.Z)(We,{data:!0,aria:!0})),{onClick:Ne});return B!==void 0?_.createElement("a",Object.assign({},Te,{className:be()(`${W}-link`,ue),href:B}),E):_.createElement("span",Object.assign({},Te,{className:be()(`${W}-link`,ue)}),E)}function L(W,y){return(B,ue,Ne,We,Te)=>{if(y)return y(B,ue,Ne,We);const ze=S(B,ue);return C(W,B,ze,Te)}}var Q=function(W,y){var E={};for(var B in W)Object.prototype.hasOwnProperty.call(W,B)&&y.indexOf(B)<0&&(E[B]=W[B]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,B=Object.getOwnPropertySymbols(W);ue<B.length;ue++)y.indexOf(B[ue])<0&&Object.prototype.propertyIsEnumerable.call(W,B[ue])&&(E[B[ue]]=W[B[ue]]);return E};const q=W=>{const{prefixCls:y,separator:E="/",children:B,menu:ue,overlay:Ne,dropdownProps:We,href:Te}=W,Ye=(Je=>{if(ue||Ne){const Ve=Object.assign({},We);if(ue){const Tt=ue||{},{items:Ke}=Tt,Et=Q(Tt,["items"]);Ve.menu=Object.assign(Object.assign({},Et),{items:Ke==null?void 0:Ke.map((Le,pt)=>{var{key:Pe,title:Ae,label:he,path:je}=Le,Ie=Q(Le,["key","title","label","path"]);let we=he!=null?he:Ae;return je&&(we=_.createElement("a",{href:`${Te}${je}`},we)),Object.assign(Object.assign({},Ie),{key:Pe!=null?Pe:pt,label:we})})})}else Ne&&(Ve.overlay=Ne);return _.createElement(o.Z,Object.assign({placement:"bottom"},Ve),_.createElement("span",{className:`${y}-overlay-link`},Je,_.createElement(ie.Z,null)))}return Je})(B);return Ye!=null?_.createElement(_.Fragment,null,_.createElement("li",null,Ye),E&&_.createElement(N,null,E)):null},H=W=>{const{prefixCls:y,children:E,href:B}=W,ue=Q(W,["prefixCls","children","href"]),{getPrefixCls:Ne}=_.useContext(ce.E_),We=Ne("breadcrumb",y);return _.createElement(q,Object.assign({},ue,{prefixCls:We}),C(We,ue,E,B))};H.__ANT_BREADCRUMB_ITEM=!0;var T=H,V=b(36237),P=b(63356),F=b(16931),oe=b(51636);const ye=W=>{const{componentCls:y,iconCls:E,calc:B}=W;return{[y]:Object.assign(Object.assign({},(0,P.Wf)(W)),{color:W.itemColor,fontSize:W.fontSize,[E]:{fontSize:W.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:W.linkColor,transition:`color ${W.motionDurationMid}`,padding:`0 ${(0,V.unit)(W.paddingXXS)}`,borderRadius:W.borderRadiusSM,height:W.fontHeight,display:"inline-block",marginInline:B(W.marginXXS).mul(-1).equal(),"&:hover":{color:W.linkHoverColor,backgroundColor:W.colorBgTextHover}},(0,P.Qy)(W)),"li:last-child":{color:W.lastItemColor},[`${y}-separator`]:{marginInline:W.separatorMargin,color:W.separatorColor},[`${y}-link`]:{[`
> ${E} + span,
> ${E} + a
`]:{marginInlineStart:W.marginXXS}},[`${y}-overlay-link`]:{borderRadius:W.borderRadiusSM,height:W.fontHeight,display:"inline-block",padding:`0 ${(0,V.unit)(W.paddingXXS)}`,marginInline:B(W.marginXXS).mul(-1).equal(),[`> ${E}`]:{marginInlineStart:W.marginXXS,fontSize:W.fontSizeIcon},"&:hover":{color:W.linkHoverColor,backgroundColor:W.colorBgTextHover,a:{color:W.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${W.componentCls}-rtl`]:{direction:"rtl"}})}},le=W=>({itemColor:W.colorTextDescription,lastItemColor:W.colorText,iconFontSize:W.fontSize,linkColor:W.colorTextDescription,linkHoverColor:W.colorText,separatorColor:W.colorTextDescription,separatorMargin:W.marginXS});var De=(0,F.I$)("Breadcrumb",W=>{const y=(0,oe.mergeToken)(W,{});return ye(y)},le),Ue=function(W,y){var E={};for(var B in W)Object.prototype.hasOwnProperty.call(W,B)&&y.indexOf(B)<0&&(E[B]=W[B]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,B=Object.getOwnPropertySymbols(W);ue<B.length;ue++)y.indexOf(B[ue])<0&&Object.prototype.propertyIsEnumerable.call(W,B[ue])&&(E[B[ue]]=W[B[ue]]);return E};function Be(W){const{breadcrumbName:y,children:E}=W,B=Ue(W,["breadcrumbName","children"]),ue=Object.assign({title:y},B);return E&&(ue.menu={items:E.map(Ne=>{var{breadcrumbName:We}=Ne,Te=Ue(Ne,["breadcrumbName"]);return Object.assign(Object.assign({},Te),{title:We})})}),ue}function rt(W,y){return(0,_.useMemo)(()=>W||(y?y.map(Be):null),[W,y])}var ae=function(W,y){var E={};for(var B in W)Object.prototype.hasOwnProperty.call(W,B)&&y.indexOf(B)<0&&(E[B]=W[B]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ue=0,B=Object.getOwnPropertySymbols(W);ue<B.length;ue++)y.indexOf(B[ue])<0&&Object.prototype.propertyIsEnumerable.call(W,B[ue])&&(E[B[ue]]=W[B[ue]]);return E};const $=(W,y)=>{if(y===void 0)return y;let E=(y||"").replace(/^\//,"");return Object.keys(W).forEach(B=>{E=E.replace(`:${B}`,W[B])}),E},Z=W=>{const{prefixCls:y,separator:E="/",style:B,className:ue,rootClassName:Ne,routes:We,items:Te,children:ze,itemRender:Ye,params:Je={}}=W,Ve=ae(W,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Tt,direction:Ke,breadcrumb:Et}=_.useContext(ce.E_);let Le;const pt=Tt("breadcrumb",y),[Pe,Ae,he]=De(pt),je=rt(Te,We),Ie=L(pt,Ye);if(je&&je.length>0){const de=[],_e=Te||We;Le=je.map((Me,Fe)=>{const{path:Ze,key:Qe,type:tt,menu:ut,overlay:dt,onClick:St,className:gt,separator:_t,dropdownProps:Xe}=Me,qe=$(Je,Ze);qe!==void 0&&de.push(qe);const st=Qe!=null?Qe:Fe;if(tt==="separator")return _.createElement(N,{key:st},_t);const ot={},Ct=Fe===je.length-1;ut?ot.menu=ut:dt&&(ot.overlay=dt);let{href:x}=Me;return de.length&&qe!==void 0&&(x=`#/${de.join("/")}`),_.createElement(q,Object.assign({key:st},ot,(0,z.Z)(Me,{data:!0,aria:!0}),{className:gt,dropdownProps:Xe,href:x,separator:Ct?"":E,onClick:St,prefixCls:pt}),Ie(Me,Je,_e,de,x))})}else if(ze){const de=(0,pe.Z)(ze).length;Le=(0,pe.Z)(ze).map((_e,Me)=>{if(!_e)return _e;const Fe=Me===de-1;return(0,m.Tm)(_e,{separator:Fe?"":E,key:Me})})}const we=be()(pt,Et==null?void 0:Et.className,{[`${pt}-rtl`]:Ke==="rtl"},ue,Ne,Ae,he),M=Object.assign(Object.assign({},Et==null?void 0:Et.style),B);return Pe(_.createElement("nav",Object.assign({className:we,style:M},Ve),_.createElement("ol",null,Le)))};Z.Item=T,Z.Separator=N;var ne=Z,re=ne},74632:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return be}});var _=b(59301),fe=b(16089);function be(pe){const z=_.useRef(null),m=()=>{fe.Z.cancel(z.current),z.current=null};return[()=>{m(),z.current=(0,fe.Z)(()=>{z.current=null})},o=>{z.current&&(o.stopPropagation(),m()),pe==null||pe(o)}]}},37285:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return C}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(48755),z=b(36237),m=b(63356),ce=b(16931),ie=b(51636);const o=L=>{const{componentCls:Q,sizePaddingEdgeHorizontal:q,colorSplit:H,lineWidth:T,textPaddingInline:V,orientationMargin:P,verticalMarginInline:F}=L;return{[Q]:Object.assign(Object.assign({},(0,m.Wf)(L)),{borderBlockStart:`${(0,z.unit)(T)} solid ${H}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:F,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,z.unit)(T)} solid ${H}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,z.unit)(L.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${Q}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,z.unit)(L.dividerHorizontalWithTextGutterMargin)} 0`,color:L.colorTextHeading,fontWeight:500,fontSize:L.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${H}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,z.unit)(T)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Q}-with-text-start`]:{"&::before":{width:`calc(${P} * 100%)`},"&::after":{width:`calc(100% - ${P} * 100%)`}},[`&-horizontal${Q}-with-text-end`]:{"&::before":{width:`calc(100% - ${P} * 100%)`},"&::after":{width:`calc(${P} * 100%)`}},[`${Q}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:V},"&-dashed":{background:"none",borderColor:H,borderStyle:"dashed",borderWidth:`${(0,z.unit)(T)} 0 0`},[`&-horizontal${Q}-with-text${Q}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Q}-dashed`]:{borderInlineStartWidth:T,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:H,borderStyle:"dotted",borderWidth:`${(0,z.unit)(T)} 0 0`},[`&-horizontal${Q}-with-text${Q}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${Q}-dotted`]:{borderInlineStartWidth:T,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Q}-with-text`]:{color:L.colorText,fontWeight:"normal",fontSize:L.fontSize},[`&-horizontal${Q}-with-text-start${Q}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Q}-inner-text`]:{paddingInlineStart:q}},[`&-horizontal${Q}-with-text-end${Q}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Q}-inner-text`]:{paddingInlineEnd:q}}})}},Y=L=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:L.marginXS});var N=(0,ce.I$)("Divider",L=>{const Q=(0,ie.mergeToken)(L,{dividerHorizontalWithTextGutterMargin:L.margin,dividerHorizontalGutterMargin:L.marginLG,sizePaddingEdgeHorizontal:0});return[o(Q)]},Y,{unitless:{orientationMargin:!0}}),w=function(L,Q){var q={};for(var H in L)Object.prototype.hasOwnProperty.call(L,H)&&Q.indexOf(H)<0&&(q[H]=L[H]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function")for(var T=0,H=Object.getOwnPropertySymbols(L);T<H.length;T++)Q.indexOf(H[T])<0&&Object.prototype.propertyIsEnumerable.call(L,H[T])&&(q[H[T]]=L[H[T]]);return q},C=L=>{const{getPrefixCls:Q,direction:q,className:H,style:T}=(0,pe.dj)("divider"),{prefixCls:V,type:P="horizontal",orientation:F="center",orientationMargin:oe,className:ye,rootClassName:le,children:De,dashed:Ue,variant:Be="solid",plain:rt,style:ae}=L,$=w(L,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),Z=Q("divider",V),[ne,re,W]=N(Z),y=!!De,E=_.useMemo(()=>F==="left"?q==="rtl"?"end":"start":F==="right"?q==="rtl"?"start":"end":F,[q,F]),B=E==="start"&&oe!=null,ue=E==="end"&&oe!=null,Ne=be()(Z,H,re,W,`${Z}-${P}`,{[`${Z}-with-text`]:y,[`${Z}-with-text-${E}`]:y,[`${Z}-dashed`]:!!Ue,[`${Z}-${Be}`]:Be!=="solid",[`${Z}-plain`]:!!rt,[`${Z}-rtl`]:q==="rtl",[`${Z}-no-default-orientation-margin-start`]:B,[`${Z}-no-default-orientation-margin-end`]:ue},ye,le),We=_.useMemo(()=>typeof oe=="number"?oe:/^\d+$/.test(oe)?Number(oe):oe,[oe]),Te={marginInlineStart:B?We:void 0,marginInlineEnd:ue?We:void 0};return ne(_.createElement("div",Object.assign({className:Ne,style:Object.assign(Object.assign({},T),ae)},$,{role:"separator"}),De&&P!=="vertical"&&_.createElement("span",{className:`${Z}-inner-text`,style:Te},De)))}},19563:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return We}});var _=b(59301),fe=b(33853),be=b(38819),pe=b(92310),z=b.n(pe),m=b(96478),ce=b(6089),ie=b(18929),o=b(2738),Y=b(75030),w=Te=>typeof Te!="object"&&typeof Te!="function"||Te===null,S=b(52838),C=b(45915),L=b(22703),Q=b(32383),q=b(55743),H=b(48755),T=b(83397),V=b(93041),P=b(78857),F=b(57700),oe=b(36237),ye=b(63356),le=b(46e3),De=b(93873),Ue=b(34925),Be=b(37645),rt=b(36305),ae=b(16931),$=b(51636),ne=Te=>{const{componentCls:ze,menuCls:Ye,colorError:Je,colorTextLightSolid:Ve}=Te,Tt=`${Ye}-item`;return{[`${ze}, ${ze}-menu-submenu`]:{[`${Ye} ${Tt}`]:{[`&${Tt}-danger:not(${Tt}-disabled)`]:{color:Je,"&:hover":{color:Ve,backgroundColor:Je}}}}}};const re=Te=>{const{componentCls:ze,menuCls:Ye,zIndexPopup:Je,dropdownArrowDistance:Ve,sizePopupArrow:Tt,antCls:Ke,iconCls:Et,motionDurationMid:Le,paddingBlock:pt,fontSize:Pe,dropdownEdgeChildPadding:Ae,colorTextDisabled:he,fontSizeIcon:je,controlPaddingHorizontal:Ie,colorBgElevated:we}=Te;return[{[ze]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:Je,display:"block","&::before":{position:"absolute",insetBlock:Te.calc(Tt).div(2).sub(Ve).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${Ke}-btn`]:{[`& > ${Et}-down, & > ${Ke}-btn-icon > ${Et}-down`]:{fontSize:je}},[`${ze}-wrap`]:{position:"relative",[`${Ke}-btn > ${Et}-down`]:{fontSize:je},[`${Et}-down::before`]:{transition:`transform ${Le}`}},[`${ze}-wrap-open`]:{[`${Et}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${Ke}-slide-down-enter${Ke}-slide-down-enter-active${ze}-placement-bottomLeft,
&${Ke}-slide-down-appear${Ke}-slide-down-appear-active${ze}-placement-bottomLeft,
&${Ke}-slide-down-enter${Ke}-slide-down-enter-active${ze}-placement-bottom,
&${Ke}-slide-down-appear${Ke}-slide-down-appear-active${ze}-placement-bottom,
&${Ke}-slide-down-enter${Ke}-slide-down-enter-active${ze}-placement-bottomRight,
&${Ke}-slide-down-appear${Ke}-slide-down-appear-active${ze}-placement-bottomRight`]:{animationName:le.fJ},[`&${Ke}-slide-up-enter${Ke}-slide-up-enter-active${ze}-placement-topLeft,
&${Ke}-slide-up-appear${Ke}-slide-up-appear-active${ze}-placement-topLeft,
&${Ke}-slide-up-enter${Ke}-slide-up-enter-active${ze}-placement-top,
&${Ke}-slide-up-appear${Ke}-slide-up-appear-active${ze}-placement-top,
&${Ke}-slide-up-enter${Ke}-slide-up-enter-active${ze}-placement-topRight,
&${Ke}-slide-up-appear${Ke}-slide-up-appear-active${ze}-placement-topRight`]:{animationName:le.Qt},[`&${Ke}-slide-down-leave${Ke}-slide-down-leave-active${ze}-placement-bottomLeft,
&${Ke}-slide-down-leave${Ke}-slide-down-leave-active${ze}-placement-bottom,
&${Ke}-slide-down-leave${Ke}-slide-down-leave-active${ze}-placement-bottomRight`]:{animationName:le.Uw},[`&${Ke}-slide-up-leave${Ke}-slide-up-leave-active${ze}-placement-topLeft,
&${Ke}-slide-up-leave${Ke}-slide-up-leave-active${ze}-placement-top,
&${Ke}-slide-up-leave${Ke}-slide-up-leave-active${ze}-placement-topRight`]:{animationName:le.ly}}},(0,Be.ZP)(Te,we,{arrowPlacement:{top:!0,bottom:!0}}),{[`${ze} ${Ye}`]:{position:"relative",margin:0},[`${Ye}-submenu-popup`]:{position:"absolute",zIndex:Je,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${ze}, ${ze}-menu-submenu`]:Object.assign(Object.assign({},(0,ye.Wf)(Te)),{[Ye]:Object.assign(Object.assign({padding:Ae,listStyleType:"none",backgroundColor:we,backgroundClip:"padding-box",borderRadius:Te.borderRadiusLG,outline:"none",boxShadow:Te.boxShadowSecondary},(0,ye.Qy)(Te)),{"&:empty":{padding:0,boxShadow:"none"},[`${Ye}-item-group-title`]:{padding:`${(0,oe.unit)(pt)} ${(0,oe.unit)(Ie)}`,color:Te.colorTextDescription,transition:`all ${Le}`},[`${Ye}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ye}-item-icon`]:{minWidth:Pe,marginInlineEnd:Te.marginXS,fontSize:Te.fontSizeSM},[`${Ye}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${Le}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${Ye}-item-extra`]:{paddingInlineStart:Te.padding,marginInlineStart:"auto",fontSize:Te.fontSizeSM,color:Te.colorTextDescription}},[`${Ye}-item, ${Ye}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,oe.unit)(pt)} ${(0,oe.unit)(Ie)}`,color:Te.colorText,fontWeight:"normal",fontSize:Pe,lineHeight:Te.lineHeight,cursor:"pointer",transition:`all ${Le}`,borderRadius:Te.borderRadiusSM,"&:hover, &-active":{backgroundColor:Te.controlItemBgHover}},(0,ye.Qy)(Te)),{"&-selected":{color:Te.colorPrimary,backgroundColor:Te.controlItemBgActive,"&:hover, &-active":{backgroundColor:Te.controlItemBgActiveHover}},"&-disabled":{color:he,cursor:"not-allowed","&:hover":{color:he,backgroundColor:we,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,oe.unit)(Te.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:Te.colorSplit},[`${ze}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:Te.paddingXS,[`${ze}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:Te.colorTextDescription,fontSize:je,fontStyle:"normal"}}}),[`${Ye}-item-group-list`]:{margin:`0 ${(0,oe.unit)(Te.marginXS)}`,padding:0,listStyle:"none"},[`${Ye}-submenu-title`]:{paddingInlineEnd:Te.calc(Ie).add(Te.fontSizeSM).equal()},[`${Ye}-submenu-vertical`]:{position:"relative"},[`${Ye}-submenu${Ye}-submenu-disabled ${ze}-menu-submenu-title`]:{[`&, ${ze}-menu-submenu-arrow-icon`]:{color:he,backgroundColor:we,cursor:"not-allowed"}},[`${Ye}-submenu-selected ${ze}-menu-submenu-title`]:{color:Te.colorPrimary}})})},[(0,le.oN)(Te,"slide-up"),(0,le.oN)(Te,"slide-down"),(0,De.Fm)(Te,"move-up"),(0,De.Fm)(Te,"move-down"),(0,Ue._y)(Te,"zoom-big")]]},W=Te=>Object.assign(Object.assign({zIndexPopup:Te.zIndexPopupBase+50,paddingBlock:(Te.controlHeight-Te.fontSize*Te.lineHeight)/2},(0,Be.wZ)({contentRadius:Te.borderRadiusLG,limitVerticalRadius:!0})),(0,rt.w)(Te));var y=(0,ae.I$)("Dropdown",Te=>{const{marginXXS:ze,sizePopupArrow:Ye,paddingXXS:Je,componentCls:Ve}=Te,Tt=(0,$.mergeToken)(Te,{menuCls:`${Ve}-menu`,dropdownArrowDistance:Te.calc(Ye).div(2).add(ze).equal(),dropdownEdgeChildPadding:Je});return[re(Tt),ne(Tt)]},W,{resetStyle:!1});const E=null,B=Te=>{var ze;const{menu:Ye,arrow:Je,prefixCls:Ve,children:Tt,trigger:Ke,disabled:Et,dropdownRender:Le,getPopupContainer:pt,overlayClassName:Pe,rootClassName:Ae,overlayStyle:he,open:je,onOpenChange:Ie,visible:we,onVisibleChange:M,mouseEnterDelay:de=.15,mouseLeaveDelay:_e=.1,autoAdjustOverflow:Me=!0,placement:Fe="",overlay:Ze,transitionName:Qe}=Te,{getPopupContainer:tt,getPrefixCls:ut,direction:dt,dropdown:St}=_.useContext(H.E_),gt=(0,Q.ln)("Dropdown"),_t=_.useMemo(()=>{const wt=ut();return Qe!==void 0?Qe:Fe.includes("top")?`${wt}-slide-down`:`${wt}-slide-up`},[ut,Fe,Qe]),Xe=_.useMemo(()=>Fe?Fe.includes("Center")?Fe.slice(0,Fe.indexOf("Center")):Fe:dt==="rtl"?"bottomRight":"bottomLeft",[Fe,dt]),qe=ut("dropdown",Ve),st=(0,T.Z)(qe),[ot,Ct,x]=y(qe,st),[,D]=(0,F.ZP)(),se=_.Children.only(w(Tt)?_.createElement("span",null,Tt):Tt),I=(0,L.Tm)(se,{className:z()(`${qe}-trigger`,{[`${qe}-rtl`]:dt==="rtl"},se.props.className),disabled:(ze=se.props.disabled)!==null&&ze!==void 0?ze:Et}),U=Et?[]:Ke,it=!!(U!=null&&U.includes("contextMenu")),[xe,Re]=(0,ie.Z)(!1,{value:je!=null?je:we}),He=(0,ce.Z)(wt=>{Ie==null||Ie(wt,{source:"trigger"}),M==null||M(wt),Re(wt)}),G=z()(Pe,Ae,Ct,x,st,St==null?void 0:St.className,{[`${qe}-rtl`]:dt==="rtl"}),J=(0,S.Z)({arrowPointAtCenter:typeof Je=="object"&&Je.pointAtCenter,autoAdjustOverflow:Me,offset:D.marginXXS,arrowWidth:Je?D.sizePopupArrow:0,borderRadius:D.borderRadius}),ve=_.useCallback(()=>{Ye!=null&&Ye.selectable&&(Ye!=null&&Ye.multiple)||(Ie==null||Ie(!1,{source:"menu"}),Re(!1))},[Ye==null?void 0:Ye.selectable,Ye==null?void 0:Ye.multiple]),Ce=()=>{let wt;return Ye!=null&&Ye.items?wt=_.createElement(V.default,Object.assign({},Ye)):typeof Ze=="function"?wt=Ze():wt=Ze,Le&&(wt=Le(wt)),wt=_.Children.only(typeof wt=="string"?_.createElement("span",null,wt):wt),_.createElement(P.J,{prefixCls:`${qe}-menu`,rootClassName:z()(x,st),expandIcon:_.createElement("span",{className:`${qe}-menu-submenu-arrow`},dt==="rtl"?_.createElement(fe.Z,{className:`${qe}-menu-submenu-arrow-icon`}):_.createElement(be.Z,{className:`${qe}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ve,validator:Ft=>{let{mode:Kt}=Ft}},wt)},[X,ct]=(0,Y.Cn)("Dropdown",he==null?void 0:he.zIndex);let ge=_.createElement(m.Z,Object.assign({alignPoint:it},(0,o.Z)(Te,["rootClassName"]),{mouseEnterDelay:de,mouseLeaveDelay:_e,visible:xe,builtinPlacements:J,arrow:!!Je,overlayClassName:G,prefixCls:qe,getPopupContainer:pt||tt,transitionName:_t,trigger:U,overlay:Ce,placement:Xe,onVisibleChange:He,overlayStyle:Object.assign(Object.assign(Object.assign({},St==null?void 0:St.style),he),{zIndex:X})}),I);return X&&(ge=_.createElement(q.Z.Provider,{value:ct},ge)),ot(ge)},ue=(0,C.Z)(B,"align",void 0,"dropdown",Te=>Te),Ne=Te=>_.createElement(ue,Object.assign({},Te),_.createElement("span",null));B._InternalPanelDoNotUseOrYouWillBeFired=Ne;var We=B},24971:function(Gt,nt,b){"use strict";var _=b(59301),fe=b(56553),be=b(48755);const pe=function(z,m){let ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var ie,o;const{variant:Y,[z]:N}=_.useContext(be.E_),w=_.useContext(fe.pg),S=N==null?void 0:N.variant;let C;typeof m!="undefined"?C=m:ce===!1?C="borderless":C=(o=(ie=w!=null?w:S)!==null&&ie!==void 0?ie:Y)!==null&&o!==void 0?o:"outlined";const L=be.tr.includes(C);return[C,L]};nt.Z=pe},4875:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return D}});var _=b(59301),fe=b(84105),be=b(87395),pe=b(92310),z=b.n(pe),m=b(60499),ce=b(18642),ie=b(43749),o=b(72190),Y=b(42244),N=b(38705),w=b(17212);function S(){return typeof BigInt=="function"}function C(se){return!se&&se!==0&&!Number.isNaN(se)||!String(se).trim()}function L(se){var I=se.trim(),U=I.startsWith("-");U&&(I=I.slice(1)),I=I.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),I.startsWith(".")&&(I="0".concat(I));var it=I||"0",xe=it.split("."),Re=xe[0]||"0",He=xe[1]||"0";Re==="0"&&He==="0"&&(U=!1);var G=U?"-":"";return{negative:U,negativeStr:G,trimStr:it,integerStr:Re,decimalStr:He,fullStr:"".concat(G).concat(it)}}function Q(se){var I=String(se);return!Number.isNaN(Number(I))&&I.includes("e")}function q(se){var I=String(se);if(Q(se)){var U=Number(I.slice(I.indexOf("e-")+2)),it=I.match(/\.(\d+)/);return it!=null&&it[1]&&(U+=it[1].length),U}return I.includes(".")&&T(I)?I.length-I.indexOf(".")-1:0}function H(se){var I=String(se);if(Q(se)){if(se>Number.MAX_SAFE_INTEGER)return String(S()?BigInt(se).toString():Number.MAX_SAFE_INTEGER);if(se<Number.MIN_SAFE_INTEGER)return String(S()?BigInt(se).toString():Number.MIN_SAFE_INTEGER);I=se.toFixed(q(I))}return L(I).fullStr}function T(se){return typeof se=="number"?!Number.isNaN(se):se?/^\s*-?\d+(\.\d+)?\s*$/.test(se)||/^\s*-?\d+\.\s*$/.test(se)||/^\s*-?\.\d+\s*$/.test(se):!1}var V=function(){function se(I){if((0,N.Z)(this,se),(0,ce.Z)(this,"origin",""),(0,ce.Z)(this,"negative",void 0),(0,ce.Z)(this,"integer",void 0),(0,ce.Z)(this,"decimal",void 0),(0,ce.Z)(this,"decimalLen",void 0),(0,ce.Z)(this,"empty",void 0),(0,ce.Z)(this,"nan",void 0),C(I)){this.empty=!0;return}if(this.origin=String(I),I==="-"||Number.isNaN(I)){this.nan=!0;return}var U=I;if(Q(U)&&(U=Number(U)),U=typeof U=="string"?U:H(U),T(U)){var it=L(U);this.negative=it.negative;var xe=it.trimStr.split(".");this.integer=BigInt(xe[0]);var Re=xe[1]||"0";this.decimal=BigInt(Re),this.decimalLen=Re.length}else this.nan=!0}return(0,w.Z)(se,[{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(U){var it="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(U,"0"));return BigInt(it)}},{key:"negate",value:function(){var U=new se(this.toString());return U.negative=!U.negative,U}},{key:"cal",value:function(U,it,xe){var Re=Math.max(this.getDecimalStr().length,U.getDecimalStr().length),He=this.alignDecimal(Re),G=U.alignDecimal(Re),J=it(He,G).toString(),ve=xe(Re),Ce=L(J),X=Ce.negativeStr,ct=Ce.trimStr,ge="".concat(X).concat(ct.padStart(ve+1,"0"));return new se("".concat(ge.slice(0,-ve),".").concat(ge.slice(-ve)))}},{key:"add",value:function(U){if(this.isInvalidate())return new se(U);var it=new se(U);return it.isInvalidate()?this:this.cal(it,function(xe,Re){return xe+Re},function(xe){return xe})}},{key:"multi",value:function(U){var it=new se(U);return this.isInvalidate()||it.isInvalidate()?new se(NaN):this.cal(it,function(xe,Re){return xe*Re},function(xe){return xe*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(U){return this.toString()===(U==null?void 0:U.toString())}},{key:"lessEquals",value:function(U){return this.add(U.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return U?this.isInvalidate()?"":L("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),se}(),P=function(){function se(I){if((0,N.Z)(this,se),(0,ce.Z)(this,"origin",""),(0,ce.Z)(this,"number",void 0),(0,ce.Z)(this,"empty",void 0),C(I)){this.empty=!0;return}this.origin=String(I),this.number=Number(I)}return(0,w.Z)(se,[{key:"negate",value:function(){return new se(-this.toNumber())}},{key:"add",value:function(U){if(this.isInvalidate())return new se(U);var it=Number(U);if(Number.isNaN(it))return this;var xe=this.number+it;if(xe>Number.MAX_SAFE_INTEGER)return new se(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new se(Number.MIN_SAFE_INTEGER);var Re=Math.max(q(this.number),q(it));return new se(xe.toFixed(Re))}},{key:"multi",value:function(U){var it=Number(U);if(this.isInvalidate()||Number.isNaN(it))return new se(NaN);var xe=this.number*it;if(xe>Number.MAX_SAFE_INTEGER)return new se(Number.MAX_SAFE_INTEGER);if(xe<Number.MIN_SAFE_INTEGER)return new se(Number.MIN_SAFE_INTEGER);var Re=Math.max(q(this.number),q(it));return new se(xe.toFixed(Re))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(U){return this.toNumber()===(U==null?void 0:U.toNumber())}},{key:"lessEquals",value:function(U){return this.add(U.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return U?this.isInvalidate()?"":H(this.number):this.origin}}]),se}();function F(se){return S()?new V(se):new P(se)}function oe(se,I,U){var it=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(se==="")return"";var xe=L(se),Re=xe.negativeStr,He=xe.integerStr,G=xe.decimalStr,J="".concat(I).concat(G),ve="".concat(Re).concat(He);if(U>=0){var Ce=Number(G[U]);if(Ce>=5&&!it){var X=F(se).add("".concat(Re,"0.").concat("0".repeat(U)).concat(10-Ce));return oe(X.toString(),I,U,it)}return U===0?ve:"".concat(ve).concat(I).concat(G.padEnd(U,"0").slice(0,U))}return J===".0"?ve:"".concat(ve).concat(J)}var ye=F,le=b(36901),De=b(34280);function Ue(se,I){return typeof Proxy!="undefined"&&se?new Proxy(se,{get:function(it,xe){if(I[xe])return I[xe];var Re=it[xe];return typeof Re=="function"?Re.bind(it):Re}}):se}var Be=b(8654),rt=b(48736);function ae(se,I){var U=(0,_.useRef)(null);function it(){try{var Re=se.selectionStart,He=se.selectionEnd,G=se.value,J=G.substring(0,Re),ve=G.substring(He);U.current={start:Re,end:He,value:G,beforeTxt:J,afterTxt:ve}}catch(Ce){}}function xe(){if(se&&U.current&&I)try{var Re=se.value,He=U.current,G=He.beforeTxt,J=He.afterTxt,ve=He.start,Ce=Re.length;if(Re.startsWith(G))Ce=G.length;else if(Re.endsWith(J))Ce=Re.length-U.current.afterTxt.length;else{var X=G[ve-1],ct=Re.indexOf(X,ve-1);ct!==-1&&(Ce=ct+1)}se.setSelectionRange(Ce,Ce)}catch(ge){(0,rt.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(ge.message))}}return[it,xe]}var $=b(49658),Z=function(){var I=(0,_.useState)(!1),U=(0,o.Z)(I,2),it=U[0],xe=U[1];return(0,De.Z)(function(){xe((0,$.Z)())},[]),it},ne=Z,re=b(16089),W=200,y=600;function E(se){var I=se.prefixCls,U=se.upNode,it=se.downNode,xe=se.upDisabled,Re=se.downDisabled,He=se.onStep,G=_.useRef(),J=_.useRef([]),ve=_.useRef();ve.current=He;var Ce=function(){clearTimeout(G.current)},X=function(Zt,ln){Zt.preventDefault(),Ce(),ve.current(ln);function er(){ve.current(ln),G.current=setTimeout(er,W)}G.current=setTimeout(er,y)};_.useEffect(function(){return function(){Ce(),J.current.forEach(function(rn){return re.Z.cancel(rn)})}},[]);var ct=ne();if(ct)return null;var ge="".concat(I,"-handler"),wt=z()(ge,"".concat(ge,"-up"),(0,ce.Z)({},"".concat(ge,"-up-disabled"),xe)),Ft=z()(ge,"".concat(ge,"-down"),(0,ce.Z)({},"".concat(ge,"-down-disabled"),Re)),Kt=function(){return J.current.push((0,re.Z)(Ce))},on={unselectable:"on",role:"button",onMouseUp:Kt,onMouseLeave:Kt};return _.createElement("div",{className:"".concat(ge,"-wrap")},_.createElement("span",(0,m.Z)({},on,{onMouseDown:function(Zt){X(Zt,!0)},"aria-label":"Increase Value","aria-disabled":xe,className:wt}),U||_.createElement("span",{unselectable:"on",className:"".concat(I,"-handler-up-inner")})),_.createElement("span",(0,m.Z)({},on,{onMouseDown:function(Zt){X(Zt,!1)},"aria-label":"Decrease Value","aria-disabled":Re,className:Ft}),it||_.createElement("span",{unselectable:"on",className:"".concat(I,"-handler-down-inner")})))}function B(se){var I=typeof se=="number"?H(se):L(se).fullStr,U=I.includes(".");return U?L(I.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:se+"0"}var ue=b(30292),Ne=function(){var se=(0,_.useRef)(0),I=function(){re.Z.cancel(se.current)};return(0,_.useEffect)(function(){return I},[]),function(U){I(),se.current=(0,re.Z)(function(){U()})}},We=["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"],Te=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],ze=function(I,U){return I||U.isEmpty()?U.toString():U.toNumber()},Ye=function(I){var U=ye(I);return U.isInvalidate()?null:U},Je=_.forwardRef(function(se,I){var U=se.prefixCls,it=se.className,xe=se.style,Re=se.min,He=se.max,G=se.step,J=G===void 0?1:G,ve=se.defaultValue,Ce=se.value,X=se.disabled,ct=se.readOnly,ge=se.upHandler,wt=se.downHandler,Ft=se.keyboard,Kt=se.changeOnWheel,on=Kt===void 0?!1:Kt,rn=se.controls,Zt=rn===void 0?!0:rn,ln=se.classNames,er=se.stringMode,Sn=se.parser,pn=se.formatter,Ut=se.precision,Rt=se.decimalSeparator,Ot=se.onChange,Xt=se.onInput,un=se.onPressEnter,In=se.onStep,ar=se.changeOnBlur,yr=ar===void 0?!0:ar,br=se.domRef,_r=(0,Y.Z)(se,We),On="".concat(U,"-input"),cr=_.useRef(null),nr=_.useState(!1),Mr=(0,o.Z)(nr,2),dr=Mr[0],Mn=Mr[1],Bn=_.useRef(!1),Nn=_.useRef(!1),ir=_.useRef(!1),at=_.useState(function(){return ye(Ce!=null?Ce:ve)}),yt=(0,o.Z)(at,2),kt=yt[0],At=yt[1];function Lt(Qt){Ce===void 0&&At(Qt)}var Bt=_.useCallback(function(Qt,gn){if(!gn)return Ut>=0?Ut:Math.max(q(Qt),q(J))},[Ut,J]),jt=_.useCallback(function(Qt){var gn=String(Qt);if(Sn)return Sn(gn);var Fn=gn;return Rt&&(Fn=Fn.replace(Rt,".")),Fn.replace(/[^\w.-]+/g,"")},[Sn,Rt]),Vt=_.useRef(""),Rn=_.useCallback(function(Qt,gn){if(pn)return pn(Qt,{userTyping:gn,input:String(Vt.current)});var Fn=typeof Qt=="number"?H(Qt):Qt;if(!gn){var yn=Bt(Fn,gn);if(T(Fn)&&(Rt||yn>=0)){var Yt=Rt||".";Fn=oe(Fn,Yt,yn)}}return Fn},[pn,Bt,Rt]),Ln=_.useState(function(){var Qt=ve!=null?ve:Ce;return kt.isInvalidate()&&["string","number"].includes((0,ie.Z)(Qt))?Number.isNaN(Qt)?"":Qt:Rn(kt.toString(),!1)}),hr=(0,o.Z)(Ln,2),dn=hr[0],cn=hr[1];Vt.current=dn;function Pn(Qt,gn){cn(Rn(Qt.isInvalidate()?Qt.toString(!1):Qt.toString(!gn),gn))}var Gn=_.useMemo(function(){return Ye(He)},[He,Ut]),Hn=_.useMemo(function(){return Ye(Re)},[Re,Ut]),bn=_.useMemo(function(){return!Gn||!kt||kt.isInvalidate()?!1:Gn.lessEquals(kt)},[Gn,kt]),kn=_.useMemo(function(){return!Hn||!kt||kt.isInvalidate()?!1:kt.lessEquals(Hn)},[Hn,kt]),qn=ae(cr.current,dr),Wn=(0,o.Z)(qn,2),zn=Wn[0],or=Wn[1],Zn=function(gn){return Gn&&!gn.lessEquals(Gn)?Gn:Hn&&!Hn.lessEquals(gn)?Hn:null},Qn=function(gn){return!Zn(gn)},xr=function(gn,Fn){var yn=gn,Yt=Qn(yn)||yn.isEmpty();if(!yn.isEmpty()&&!Fn&&(yn=Zn(yn)||yn,Yt=!0),!ct&&!X&&Yt){var tr=yn.toString(),rr=Bt(tr,Fn);return rr>=0&&(yn=ye(oe(tr,".",rr)),Qn(yn)||(yn=ye(oe(tr,".",rr,!0)))),yn.equals(kt)||(Lt(yn),Ot==null||Ot(yn.isEmpty()?null:ze(er,yn)),Ce===void 0&&Pn(yn,Fn)),yn}return kt},bt=Ne(),mn=function Qt(gn){if(zn(),Vt.current=gn,cn(gn),!Nn.current){var Fn=jt(gn),yn=ye(Fn);yn.isNaN()||xr(yn,!0)}Xt==null||Xt(gn),bt(function(){var Yt=gn;Sn||(Yt=gn.replace(/。/g,".")),Yt!==gn&&Qt(Yt)})},Yn=function(){Nn.current=!0},wr=function(){Nn.current=!1,mn(cr.current.value)},Br=function(gn){mn(gn.target.value)},Tr=function(gn){var Fn;if(!(gn&&bn||!gn&&kn)){Bn.current=!1;var yn=ye(ir.current?B(J):J);gn||(yn=yn.negate());var Yt=(kt||ye(0)).add(yn.toString()),tr=xr(Yt,!1);In==null||In(ze(er,tr),{offset:ir.current?B(J):J,type:gn?"up":"down"}),(Fn=cr.current)===null||Fn===void 0||Fn.focus()}},Er=function(gn){var Fn=ye(jt(dn)),yn;Fn.isNaN()?yn=xr(kt,gn):yn=xr(Fn,gn),Ce!==void 0?Pn(kt,!1):yn.isNaN()||Pn(yn,!1)},xn=function(){Bn.current=!0},Vn=function(gn){var Fn=gn.key,yn=gn.shiftKey;Bn.current=!0,ir.current=yn,Fn==="Enter"&&(Nn.current||(Bn.current=!1),Er(!1),un==null||un(gn)),Ft!==!1&&!Nn.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Fn)&&(Tr(Fn==="Up"||Fn==="ArrowUp"),gn.preventDefault())},Ar=function(){Bn.current=!1,ir.current=!1};_.useEffect(function(){if(on&&dr){var Qt=function(yn){Tr(yn.deltaY<0),yn.preventDefault()},gn=cr.current;if(gn)return gn.addEventListener("wheel",Qt,{passive:!1}),function(){return gn.removeEventListener("wheel",Qt)}}});var lr=function(){yr&&Er(!1),Mn(!1),Bn.current=!1};return(0,De.o)(function(){kt.isInvalidate()||Pn(kt,!1)},[Ut,pn]),(0,De.o)(function(){var Qt=ye(Ce);At(Qt);var gn=ye(jt(dn));(!Qt.equals(gn)||!Bn.current||pn)&&Pn(Qt,Bn.current)},[Ce]),(0,De.o)(function(){pn&&or()},[dn]),_.createElement("div",{ref:br,className:z()(U,it,(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(U,"-focused"),dr),"".concat(U,"-disabled"),X),"".concat(U,"-readonly"),ct),"".concat(U,"-not-a-number"),kt.isNaN()),"".concat(U,"-out-of-range"),!kt.isInvalidate()&&!Qn(kt))),style:xe,onFocus:function(){Mn(!0)},onBlur:lr,onKeyDown:Vn,onKeyUp:Ar,onCompositionStart:Yn,onCompositionEnd:wr,onBeforeInput:xn},Zt&&_.createElement(E,{prefixCls:U,upNode:ge,downNode:wt,upDisabled:bn,downDisabled:kn,onStep:Tr}),_.createElement("div",{className:"".concat(On,"-wrap")},_.createElement("input",(0,m.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":Re,"aria-valuemax":He,"aria-valuenow":kt.isInvalidate()?null:kt.toString(),step:J},_r,{ref:(0,Be.sQ)(cr,I),className:On,value:dn,onChange:Br,disabled:X,readOnly:ct}))))}),Ve=_.forwardRef(function(se,I){var U=se.disabled,it=se.style,xe=se.prefixCls,Re=xe===void 0?"rc-input-number":xe,He=se.value,G=se.prefix,J=se.suffix,ve=se.addonBefore,Ce=se.addonAfter,X=se.className,ct=se.classNames,ge=(0,Y.Z)(se,Te),wt=_.useRef(null),Ft=_.useRef(null),Kt=_.useRef(null),on=function(Zt){Kt.current&&(0,ue.nH)(Kt.current,Zt)};return _.useImperativeHandle(I,function(){return Ue(Kt.current,{focus:on,nativeElement:wt.current.nativeElement||Ft.current})}),_.createElement(le.BaseInput,{className:X,triggerFocus:on,prefixCls:Re,value:He,disabled:U,style:it,prefix:G,suffix:J,addonAfter:Ce,addonBefore:ve,classNames:ct,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:wt},_.createElement(Je,(0,m.Z)({prefixCls:Re,disabled:U,ref:Kt,domRef:Ft,className:ct==null?void 0:ct.input},ge)))}),Tt=Ve,Ke=Tt,Et=b(62487),Le=b(82855),pt=b(48755),Pe=b(60840),Ae=b(2171),he=b(83397),je=b(31756),Ie=b(56553),we=b(24971),M=b(70045),de=b(36237),_e=b(53075),Me=b(64910),Fe=b(39082),Ze=b(63356),Qe=b(56119),tt=b(16931),ut=b(51636),dt=b(17835);const St=se=>{var I;const U=(I=se.handleVisible)!==null&&I!==void 0?I:"auto",it=se.controlHeightSM-se.lineWidth*2;return Object.assign(Object.assign({},(0,Me.T)(se)),{controlWidth:90,handleWidth:it,handleFontSize:se.fontSize/2,handleVisible:U,handleActiveBg:se.colorFillAlter,handleBg:se.colorBgContainer,filledHandleBg:new dt.FastColor(se.colorFillSecondary).onBackground(se.colorBgContainer).toHexString(),handleHoverColor:se.colorPrimary,handleBorderColor:se.colorBorder,handleOpacity:U===!0?1:0,handleVisibleWidth:U===!0?it:0})},gt=(se,I)=>{let{componentCls:U,borderRadiusSM:it,borderRadiusLG:xe}=se;const Re=I==="lg"?xe:it;return{[`&-${I}`]:{[`${U}-handler-wrap`]:{borderStartEndRadius:Re,borderEndEndRadius:Re},[`${U}-handler-up`]:{borderStartEndRadius:Re},[`${U}-handler-down`]:{borderEndEndRadius:Re}}}},_t=se=>{const{componentCls:I,lineWidth:U,lineType:it,borderRadius:xe,inputFontSizeSM:Re,inputFontSizeLG:He,controlHeightLG:G,controlHeightSM:J,colorError:ve,paddingInlineSM:Ce,paddingBlockSM:X,paddingBlockLG:ct,paddingInlineLG:ge,colorTextDescription:wt,motionDurationMid:Ft,handleHoverColor:Kt,handleOpacity:on,paddingInline:rn,paddingBlock:Zt,handleBg:ln,handleActiveBg:er,colorTextDisabled:Sn,borderRadiusSM:pn,borderRadiusLG:Ut,controlWidth:Rt,handleBorderColor:Ot,filledHandleBg:Xt,lineHeightLG:un,calc:In}=se;return[{[I]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ze.Wf)(se)),(0,_e.ik)(se)),{display:"inline-block",width:Rt,margin:0,padding:0,borderRadius:xe}),(0,Fe.qG)(se,{[`${I}-handler-wrap`]:{background:ln,[`${I}-handler-down`]:{borderBlockStart:`${(0,de.unit)(U)} ${it} ${Ot}`}}})),(0,Fe.H8)(se,{[`${I}-handler-wrap`]:{background:Xt,[`${I}-handler-down`]:{borderBlockStart:`${(0,de.unit)(U)} ${it} ${Ot}`}},"&:focus-within":{[`${I}-handler-wrap`]:{background:ln}}})),(0,Fe.vc)(se,{[`${I}-handler-wrap`]:{background:ln,[`${I}-handler-down`]:{borderBlockStart:`${(0,de.unit)(U)} ${it} ${Ot}`}}})),(0,Fe.Mu)(se)),{"&-rtl":{direction:"rtl",[`${I}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:He,lineHeight:un,borderRadius:Ut,[`input${I}-input`]:{height:In(G).sub(In(U).mul(2)).equal(),padding:`${(0,de.unit)(ct)} ${(0,de.unit)(ge)}`}},"&-sm":{padding:0,fontSize:Re,borderRadius:pn,[`input${I}-input`]:{height:In(J).sub(In(U).mul(2)).equal(),padding:`${(0,de.unit)(X)} ${(0,de.unit)(Ce)}`}},"&-out-of-range":{[`${I}-input-wrap`]:{input:{color:ve}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Ze.Wf)(se)),(0,_e.s7)(se)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${I}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${I}-group-addon`]:{borderRadius:Ut,fontSize:se.fontSizeLG}},"&-sm":{[`${I}-group-addon`]:{borderRadius:pn}}},(0,Fe.ir)(se)),(0,Fe.S5)(se)),{[`&:not(${I}-compact-first-item):not(${I}-compact-last-item)${I}-compact-item`]:{[`${I}, ${I}-group-addon`]:{borderRadius:0}},[`&:not(${I}-compact-last-item)${I}-compact-first-item`]:{[`${I}, ${I}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${I}-compact-first-item)${I}-compact-last-item`]:{[`${I}, ${I}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${I}-input`]:{cursor:"not-allowed"},[I]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ze.Wf)(se)),{width:"100%",padding:`${(0,de.unit)(Zt)} ${(0,de.unit)(rn)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:xe,outline:0,transition:`all ${Ft} linear`,appearance:"textfield",fontSize:"inherit"}),(0,_e.nz)(se.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${I}-handler-wrap, &-focused ${I}-handler-wrap`]:{width:se.handleWidth,opacity:1}})},{[I]:Object.assign(Object.assign(Object.assign({[`${I}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:se.handleVisibleWidth,opacity:on,height:"100%",borderStartStartRadius:0,borderStartEndRadius:xe,borderEndEndRadius:xe,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${Ft}`,overflow:"hidden",[`${I}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
${I}-handler-up-inner,
${I}-handler-down-inner
`]:{marginInlineEnd:0,fontSize:se.handleFontSize}}},[`${I}-handler`]:{height:"50%",overflow:"hidden",color:wt,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${(0,de.unit)(U)} ${it} ${Ot}`,transition:`all ${Ft} linear`,"&:active":{background:er},"&:hover":{height:"60%",[`
${I}-handler-up-inner,
${I}-handler-down-inner
`]:{color:Kt}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Ze.Ro)()),{color:wt,transition:`all ${Ft} linear`,userSelect:"none"})},[`${I}-handler-up`]:{borderStartEndRadius:xe},[`${I}-handler-down`]:{borderEndEndRadius:xe}},gt(se,"lg")),gt(se,"sm")),{"&-disabled, &-readonly":{[`${I}-handler-wrap`]:{display:"none"},[`${I}-input`]:{color:"inherit"}},[`
${I}-handler-up-disabled,
${I}-handler-down-disabled
`]:{cursor:"not-allowed"},[`
${I}-handler-up-disabled:hover &-handler-up-inner,
${I}-handler-down-disabled:hover &-handler-down-inner
`]:{color:Sn}})}]},Xe=se=>{const{componentCls:I,paddingBlock:U,paddingInline:it,inputAffixPadding:xe,controlWidth:Re,borderRadiusLG:He,borderRadiusSM:G,paddingInlineLG:J,paddingInlineSM:ve,paddingBlockLG:Ce,paddingBlockSM:X,motionDurationMid:ct}=se;return{[`${I}-affix-wrapper`]:Object.assign(Object.assign({[`input${I}-input`]:{padding:`${(0,de.unit)(U)} 0`}},(0,_e.ik)(se)),{position:"relative",display:"inline-flex",alignItems:"center",width:Re,padding:0,paddingInlineStart:it,"&-lg":{borderRadius:He,paddingInlineStart:J,[`input${I}-input`]:{padding:`${(0,de.unit)(Ce)} 0`}},"&-sm":{borderRadius:G,paddingInlineStart:ve,[`input${I}-input`]:{padding:`${(0,de.unit)(X)} 0`}},[`&:not(${I}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${I}-disabled`]:{background:"transparent"},[`> div${I}`]:{width:"100%",border:"none",outline:"none",[`&${I}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${I}-handler-wrap`]:{zIndex:2},[I]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:xe},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:it,marginInlineStart:xe,transition:`margin ${ct}`}},[`&:hover ${I}-handler-wrap, &-focused ${I}-handler-wrap`]:{width:se.handleWidth,opacity:1},[`&:not(${I}-affix-wrapper-without-controls):hover ${I}-suffix`]:{marginInlineEnd:se.calc(se.handleWidth).add(it).equal()}})}};var qe=(0,tt.I$)("InputNumber",se=>{const I=(0,ut.mergeToken)(se,(0,Me.e)(se));return[_t(I),Xe(I),(0,Qe.c)(I)]},St,{unitless:{handleOpacity:!0}}),st=function(se,I){var U={};for(var it in se)Object.prototype.hasOwnProperty.call(se,it)&&I.indexOf(it)<0&&(U[it]=se[it]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,it=Object.getOwnPropertySymbols(se);xe<it.length;xe++)I.indexOf(it[xe])<0&&Object.prototype.propertyIsEnumerable.call(se,it[xe])&&(U[it[xe]]=se[it[xe]]);return U};const ot=_.forwardRef((se,I)=>{const{getPrefixCls:U,direction:it}=_.useContext(pt.E_),xe=_.useRef(null);_.useImperativeHandle(I,()=>xe.current);const{className:Re,rootClassName:He,size:G,disabled:J,prefixCls:ve,addonBefore:Ce,addonAfter:X,prefix:ct,suffix:ge,bordered:wt,readOnly:Ft,status:Kt,controls:on,variant:rn}=se,Zt=st(se,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),ln=U("input-number",ve),er=(0,he.Z)(ln),[Sn,pn,Ut]=qe(ln,er),{compactSize:Rt,compactItemClassnames:Ot}=(0,M.ri)(ln,it);let Xt=_.createElement(be.Z,{className:`${ln}-handler-up-inner`}),un=_.createElement(fe.Z,{className:`${ln}-handler-down-inner`});const In=typeof on=="boolean"?on:void 0;typeof on=="object"&&(Xt=typeof on.upIcon=="undefined"?Xt:_.createElement("span",{className:`${ln}-handler-up-inner`},on.upIcon),un=typeof on.downIcon=="undefined"?un:_.createElement("span",{className:`${ln}-handler-down-inner`},on.downIcon));const{hasFeedback:ar,status:yr,isFormItemInput:br,feedbackIcon:_r}=_.useContext(Ie.aM),On=(0,Le.F)(yr,Kt),cr=(0,je.Z)(yt=>{var kt;return(kt=G!=null?G:Rt)!==null&&kt!==void 0?kt:yt}),nr=_.useContext(Ae.Z),Mr=J!=null?J:nr,[dr,Mn]=(0,we.Z)("inputNumber",rn,wt),Bn=ar&&_.createElement(_.Fragment,null,_r),Nn=z()({[`${ln}-lg`]:cr==="large",[`${ln}-sm`]:cr==="small",[`${ln}-rtl`]:it==="rtl",[`${ln}-in-form-item`]:br},pn),ir=`${ln}-group`,at=_.createElement(Ke,Object.assign({ref:xe,disabled:Mr,className:z()(Ut,er,Re,He,Ot),upHandler:Xt,downHandler:un,prefixCls:ln,readOnly:Ft,controls:In,prefix:ct,suffix:Bn||ge,addonBefore:Ce&&_.createElement(Et.Z,{form:!0,space:!0},Ce),addonAfter:X&&_.createElement(Et.Z,{form:!0,space:!0},X),classNames:{input:Nn,variant:z()({[`${ln}-${dr}`]:Mn},(0,Le.Z)(ln,On,ar)),affixWrapper:z()({[`${ln}-affix-wrapper-sm`]:cr==="small",[`${ln}-affix-wrapper-lg`]:cr==="large",[`${ln}-affix-wrapper-rtl`]:it==="rtl",[`${ln}-affix-wrapper-without-controls`]:on===!1||Mr},pn),wrapper:z()({[`${ir}-rtl`]:it==="rtl"},pn),groupWrapper:z()({[`${ln}-group-wrapper-sm`]:cr==="small",[`${ln}-group-wrapper-lg`]:cr==="large",[`${ln}-group-wrapper-rtl`]:it==="rtl",[`${ln}-group-wrapper-${dr}`]:Mn},(0,Le.Z)(`${ln}-group-wrapper`,On,ar),pn)}},Zt));return Sn(at)}),Ct=ot,x=se=>_.createElement(Pe.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},_.createElement(ot,Object.assign({},se)));Ct._InternalPanelDoNotUseOrYouWillBeFired=x;var D=Ct},49397:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return P}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(36901),z=b(8654),m=b(62487),ce=b(86013),ie=b(82855),o=b(48755),Y=b(2171),N=b(83397),w=b(31756),S=b(56553),C=b(24971),L=b(70045),Q=b(23826),q=b(53075);function H(F){return!!(F.prefix||F.suffix||F.allowClear||F.showCount)}var T=function(F,oe){var ye={};for(var le in F)Object.prototype.hasOwnProperty.call(F,le)&&oe.indexOf(le)<0&&(ye[le]=F[le]);if(F!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,le=Object.getOwnPropertySymbols(F);De<le.length;De++)oe.indexOf(le[De])<0&&Object.prototype.propertyIsEnumerable.call(F,le[De])&&(ye[le[De]]=F[le[De]]);return ye},P=(0,_.forwardRef)((F,oe)=>{const{prefixCls:ye,bordered:le=!0,status:De,size:Ue,disabled:Be,onBlur:rt,onFocus:ae,suffix:$,allowClear:Z,addonAfter:ne,addonBefore:re,className:W,style:y,styles:E,rootClassName:B,onChange:ue,classNames:Ne,variant:We}=F,Te=T(F,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:ze,direction:Ye,allowClear:Je,autoComplete:Ve,className:Tt,style:Ke,classNames:Et,styles:Le}=(0,o.dj)("input"),pt=ze("input",ye),Pe=(0,_.useRef)(null),Ae=(0,N.Z)(pt),[he,je,Ie]=(0,q.TI)(pt,B),[we]=(0,q.ZP)(pt,Ae),{compactSize:M,compactItemClassnames:de}=(0,L.ri)(pt,Ye),_e=(0,w.Z)(D=>{var se;return(se=Ue!=null?Ue:M)!==null&&se!==void 0?se:D}),Me=_.useContext(Y.Z),Fe=Be!=null?Be:Me,{status:Ze,hasFeedback:Qe,feedbackIcon:tt}=(0,_.useContext)(S.aM),ut=(0,ie.F)(Ze,De),dt=H(F)||!!Qe,St=(0,_.useRef)(dt),gt=(0,Q.Z)(Pe,!0),_t=D=>{gt(),rt==null||rt(D)},Xe=D=>{gt(),ae==null||ae(D)},qe=D=>{gt(),ue==null||ue(D)},st=(Qe||$)&&_.createElement(_.Fragment,null,$,Qe&&tt),ot=(0,ce.Z)(Z!=null?Z:Je),[Ct,x]=(0,C.Z)("input",We,le);return he(we(_.createElement(pe.default,Object.assign({ref:(0,z.sQ)(oe,Pe),prefixCls:pt,autoComplete:Ve},Te,{disabled:Fe,onBlur:_t,onFocus:Xe,style:Object.assign(Object.assign({},Ke),y),styles:Object.assign(Object.assign({},Le),E),suffix:st,allowClear:ot,className:be()(W,B,Ie,Ae,de,Tt),onChange:qe,addonBefore:re&&_.createElement(m.Z,{form:!0,space:!0},re),addonAfter:ne&&_.createElement(m.Z,{form:!0,space:!0},ne),classNames:Object.assign(Object.assign(Object.assign({},Ne),Et),{input:be()({[`${pt}-sm`]:_e==="small",[`${pt}-lg`]:_e==="large",[`${pt}-rtl`]:Ye==="rtl"},Ne==null?void 0:Ne.input,Et.input,je),variant:be()({[`${pt}-${Ct}`]:x},(0,ie.Z)(pt,ut)),affixWrapper:be()({[`${pt}-affix-wrapper-sm`]:_e==="small",[`${pt}-affix-wrapper-lg`]:_e==="large",[`${pt}-affix-wrapper-rtl`]:Ye==="rtl"},je),wrapper:be()({[`${pt}-group-rtl`]:Ye==="rtl"},je),groupWrapper:be()({[`${pt}-group-wrapper-sm`]:_e==="small",[`${pt}-group-wrapper-lg`]:_e==="large",[`${pt}-group-wrapper-rtl`]:Ye==="rtl",[`${pt}-group-wrapper-${Ct}`]:x},(0,ie.Z)(`${pt}-group-wrapper`,ut,Qe),je)})}))))})},79809:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return oe}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(22711),z=b(86013),m=b(82855),ce=b(48755),ie=b(2171),o=b(83397),Y=b(31756),N=b(56553),w=b(24971),S=b(70045),C=b(30292),L=b(53075),Q=b(16931),q=b(51636),H=b(64910);const T=ye=>{const{componentCls:le,paddingLG:De}=ye,Ue=`${le}-textarea`;return{[`textarea${le}`]:{maxWidth:"100%",height:"auto",minHeight:ye.controlHeight,lineHeight:ye.lineHeight,verticalAlign:"bottom",transition:`all ${ye.motionDurationSlow}`,resize:"vertical",[`&${le}-mouse-active`]:{transition:`all ${ye.motionDurationSlow}, height 0s, width 0s`}},[`${le}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Ue]:{position:"relative","&-show-count":{[`> ${le}`]:{height:"100%"},[`${le}-data-count`]:{position:"absolute",bottom:ye.calc(ye.fontSize).mul(ye.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:ye.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${le},
&-affix-wrapper${Ue}-has-feedback ${le}
`]:{paddingInlineEnd:De},[`&-affix-wrapper${le}-affix-wrapper`]:{padding:0,[`> textarea${le}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:ye.calc(ye.controlHeight).sub(ye.calc(ye.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${le}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${le}-clear-icon`]:{position:"absolute",insetInlineEnd:ye.paddingInline,insetBlockStart:ye.paddingXS},[`${Ue}-suffix`]:{position:"absolute",top:0,insetInlineEnd:ye.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${le}-affix-wrapper-sm`]:{[`${le}-suffix`]:{[`${le}-clear-icon`]:{insetInlineEnd:ye.paddingInlineSM}}}}}};var V=(0,Q.I$)(["Input","TextArea"],ye=>{const le=(0,q.mergeToken)(ye,(0,H.e)(ye));return[T(le)]},H.T,{resetFont:!1}),P=function(ye,le){var De={};for(var Ue in ye)Object.prototype.hasOwnProperty.call(ye,Ue)&&le.indexOf(Ue)<0&&(De[Ue]=ye[Ue]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Ue=Object.getOwnPropertySymbols(ye);Be<Ue.length;Be++)le.indexOf(Ue[Be])<0&&Object.prototype.propertyIsEnumerable.call(ye,Ue[Be])&&(De[Ue[Be]]=ye[Ue[Be]]);return De},oe=(0,_.forwardRef)((ye,le)=>{var De;const{prefixCls:Ue,bordered:Be=!0,size:rt,disabled:ae,status:$,allowClear:Z,classNames:ne,rootClassName:re,className:W,style:y,styles:E,variant:B,showCount:ue,onMouseDown:Ne,onResize:We}=ye,Te=P(ye,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:ze,direction:Ye,allowClear:Je,autoComplete:Ve,className:Tt,style:Ke,classNames:Et,styles:Le}=(0,ce.dj)("textArea"),pt=_.useContext(ie.Z),Pe=ae!=null?ae:pt,{status:Ae,hasFeedback:he,feedbackIcon:je}=_.useContext(N.aM),Ie=(0,m.F)(Ae,$),we=_.useRef(null);_.useImperativeHandle(le,()=>{var x;return{resizableTextArea:(x=we.current)===null||x===void 0?void 0:x.resizableTextArea,focus:D=>{var se,I;(0,C.nH)((I=(se=we.current)===null||se===void 0?void 0:se.resizableTextArea)===null||I===void 0?void 0:I.textArea,D)},blur:()=>{var D;return(D=we.current)===null||D===void 0?void 0:D.blur()}}});const M=ze("input",Ue),de=(0,o.Z)(M),[_e,Me,Fe]=(0,L.TI)(M,re),[Ze]=V(M,de),{compactSize:Qe,compactItemClassnames:tt}=(0,S.ri)(M,Ye),ut=(0,Y.Z)(x=>{var D;return(D=rt!=null?rt:Qe)!==null&&D!==void 0?D:x}),[dt,St]=(0,w.Z)("textArea",B,Be),gt=(0,z.Z)(Z!=null?Z:Je),[_t,Xe]=_.useState(!1),[qe,st]=_.useState(!1),ot=x=>{Xe(!0),Ne==null||Ne(x);const D=()=>{Xe(!1),document.removeEventListener("mouseup",D)};document.addEventListener("mouseup",D)},Ct=x=>{var D,se;if(We==null||We(x),_t&&typeof getComputedStyle=="function"){const I=(se=(D=we.current)===null||D===void 0?void 0:D.nativeElement)===null||se===void 0?void 0:se.querySelector("textarea");I&&getComputedStyle(I).resize==="both"&&st(!0)}};return _e(Ze(_.createElement(pe.default,Object.assign({autoComplete:Ve},Te,{style:Object.assign(Object.assign({},Ke),y),styles:Object.assign(Object.assign({},Le),E),disabled:Pe,allowClear:gt,className:be()(Fe,de,W,re,tt,Tt,qe&&`${M}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},ne),Et),{textarea:be()({[`${M}-sm`]:ut==="small",[`${M}-lg`]:ut==="large"},Me,ne==null?void 0:ne.textarea,Et.textarea,_t&&`${M}-mouse-active`),variant:be()({[`${M}-${dt}`]:St},(0,m.Z)(M,Ie)),affixWrapper:be()(`${M}-textarea-affix-wrapper`,{[`${M}-affix-wrapper-rtl`]:Ye==="rtl",[`${M}-affix-wrapper-sm`]:ut==="small",[`${M}-affix-wrapper-lg`]:ut==="large",[`${M}-textarea-show-count`]:ue||((De=ye.count)===null||De===void 0?void 0:De.show)},Me)}),prefixCls:M,suffix:he&&_.createElement("span",{className:`${M}-textarea-suffix`},je),showCount:ue,ref:we,onResize:Ct,onMouseDown:ot}))))})},23826:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return fe}});var _=b(59301);function fe(be,pe){const z=(0,_.useRef)([]),m=()=>{z.current.push(setTimeout(()=>{var ce,ie,o,Y;!((ce=be.current)===null||ce===void 0)&&ce.input&&((ie=be.current)===null||ie===void 0?void 0:ie.input.getAttribute("type"))==="password"&&(!((o=be.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((Y=be.current)===null||Y===void 0||Y.input.removeAttribute("value"))}))};return(0,_.useEffect)(()=>(pe&&m(),()=>z.current.forEach(ce=>{ce&&clearTimeout(ce)})),[]),m}},37568:function(Gt,nt,b){"use strict";b.d(nt,{default:function(){return Et}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(48755),z=b(56553),m=b(53075),ie=Le=>{const{getPrefixCls:pt,direction:Pe}=(0,_.useContext)(pe.E_),{prefixCls:Ae,className:he}=Le,je=pt("input-group",Ae),Ie=pt("input"),[we,M,de]=(0,m.ZP)(Ie),_e=be()(je,de,{[`${je}-lg`]:Le.size==="large",[`${je}-sm`]:Le.size==="small",[`${je}-compact`]:Le.compact,[`${je}-rtl`]:Pe==="rtl"},M,he),Me=(0,_.useContext)(z.aM),Fe=(0,_.useMemo)(()=>Object.assign(Object.assign({},Me),{isFormItemInput:!1}),[Me]);return we(_.createElement("span",{className:_e,style:Le.style,onMouseEnter:Le.onMouseEnter,onMouseLeave:Le.onMouseLeave,onFocus:Le.onFocus,onBlur:Le.onBlur},_.createElement(z.aM.Provider,{value:Fe},Le.children)))},o=b(49397),Y=b(77654),N=b(6089),w=b(26112),S=b(82855),C=b(31756),L=b(16931),Q=b(51636),q=b(64910);const H=Le=>{const{componentCls:pt,paddingXS:Pe}=Le;return{[pt]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Pe,"&-rtl":{direction:"rtl"},[`${pt}-input`]:{textAlign:"center",paddingInline:Le.paddingXXS},[`&${pt}-sm ${pt}-input`]:{paddingInline:Le.calc(Le.paddingXXS).div(2).equal()},[`&${pt}-lg ${pt}-input`]:{paddingInline:Le.paddingXS}}}};var T=(0,L.I$)(["Input","OTP"],Le=>{const pt=(0,Q.mergeToken)(Le,(0,q.e)(Le));return[H(pt)]},q.T),V=b(16089),P=function(Le,pt){var Pe={};for(var Ae in Le)Object.prototype.hasOwnProperty.call(Le,Ae)&&pt.indexOf(Ae)<0&&(Pe[Ae]=Le[Ae]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ae=Object.getOwnPropertySymbols(Le);he<Ae.length;he++)pt.indexOf(Ae[he])<0&&Object.prototype.propertyIsEnumerable.call(Le,Ae[he])&&(Pe[Ae[he]]=Le[Ae[he]]);return Pe},oe=_.forwardRef((Le,pt)=>{const{value:Pe,onChange:Ae,onActiveChange:he,index:je,mask:Ie}=Le,we=P(Le,["value","onChange","onActiveChange","index","mask"]),M=Pe&&typeof Ie=="string"?Ie:Pe,de=Qe=>{Ae(je,Qe.target.value)},_e=_.useRef(null);_.useImperativeHandle(pt,()=>_e.current);const Me=()=>{(0,V.Z)(()=>{var Qe;const tt=(Qe=_e.current)===null||Qe===void 0?void 0:Qe.input;document.activeElement===tt&&tt&&tt.select()})},Fe=Qe=>{const{key:tt,ctrlKey:ut,metaKey:dt}=Qe;tt==="ArrowLeft"?he(je-1):tt==="ArrowRight"?he(je+1):tt==="z"&&(ut||dt)&&Qe.preventDefault(),Me()},Ze=Qe=>{Qe.key==="Backspace"&&!Pe&&he(je-1),Me()};return _.createElement(o.Z,Object.assign({type:Ie===!0?"password":"text"},we,{ref:_e,value:M,onInput:de,onFocus:Me,onKeyDown:Fe,onKeyUp:Ze,onMouseDown:Me,onMouseUp:Me}))}),ye=function(Le,pt){var Pe={};for(var Ae in Le)Object.prototype.hasOwnProperty.call(Le,Ae)&&pt.indexOf(Ae)<0&&(Pe[Ae]=Le[Ae]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ae=Object.getOwnPropertySymbols(Le);he<Ae.length;he++)pt.indexOf(Ae[he])<0&&Object.prototype.propertyIsEnumerable.call(Le,Ae[he])&&(Pe[Ae[he]]=Le[Ae[he]]);return Pe};function le(Le){return(Le||"").split("")}const De=Le=>{const{index:pt,prefixCls:Pe,separator:Ae}=Le,he=typeof Ae=="function"?Ae(pt):Ae;return he?_.createElement("span",{className:`${Pe}-separator`},he):null};var Be=_.forwardRef((Le,pt)=>{const{prefixCls:Pe,length:Ae=6,size:he,defaultValue:je,value:Ie,onChange:we,formatter:M,separator:de,variant:_e,disabled:Me,status:Fe,autoFocus:Ze,mask:Qe,type:tt,onInput:ut,inputMode:dt}=Le,St=ye(Le,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:gt,direction:_t}=_.useContext(pe.E_),Xe=gt("otp",Pe),qe=(0,w.Z)(St,{aria:!0,data:!0,attr:!0}),[st,ot,Ct]=T(Xe),x=(0,C.Z)(ct=>he!=null?he:ct),D=_.useContext(z.aM),se=(0,S.F)(D.status,Fe),I=_.useMemo(()=>Object.assign(Object.assign({},D),{status:se,hasFeedback:!1,feedbackIcon:null}),[D,se]),U=_.useRef(null),it=_.useRef({});_.useImperativeHandle(pt,()=>({focus:()=>{var ct;(ct=it.current[0])===null||ct===void 0||ct.focus()},blur:()=>{var ct;for(let ge=0;ge<Ae;ge+=1)(ct=it.current[ge])===null||ct===void 0||ct.blur()},nativeElement:U.current}));const xe=ct=>M?M(ct):ct,[Re,He]=_.useState(()=>le(xe(je||"")));_.useEffect(()=>{Ie!==void 0&&He(le(Ie))},[Ie]);const G=(0,N.Z)(ct=>{He(ct),ut&&ut(ct),we&&ct.length===Ae&&ct.every(ge=>ge)&&ct.some((ge,wt)=>Re[wt]!==ge)&&we(ct.join(""))}),J=(0,N.Z)((ct,ge)=>{let wt=(0,Y.Z)(Re);for(let Kt=0;Kt<ct;Kt+=1)wt[Kt]||(wt[Kt]="");ge.length<=1?wt[ct]=ge:wt=wt.slice(0,ct).concat(le(ge)),wt=wt.slice(0,Ae);for(let Kt=wt.length-1;Kt>=0&&!wt[Kt];Kt-=1)wt.pop();const Ft=xe(wt.map(Kt=>Kt||" ").join(""));return wt=le(Ft).map((Kt,on)=>Kt===" "&&!wt[on]?wt[on]:Kt),wt}),ve=(ct,ge)=>{var wt;const Ft=J(ct,ge),Kt=Math.min(ct+ge.length,Ae-1);Kt!==ct&&Ft[ct]!==void 0&&((wt=it.current[Kt])===null||wt===void 0||wt.focus()),G(Ft)},Ce=ct=>{var ge;(ge=it.current[ct])===null||ge===void 0||ge.focus()},X={variant:_e,disabled:Me,status:se,mask:Qe,type:tt,inputMode:dt};return st(_.createElement("div",Object.assign({},qe,{ref:U,className:be()(Xe,{[`${Xe}-sm`]:x==="small",[`${Xe}-lg`]:x==="large",[`${Xe}-rtl`]:_t==="rtl"},Ct,ot)}),_.createElement(z.aM.Provider,{value:I},Array.from({length:Ae}).map((ct,ge)=>{const wt=`otp-${ge}`,Ft=Re[ge]||"";return _.createElement(_.Fragment,{key:wt},_.createElement(oe,Object.assign({ref:Kt=>{it.current[ge]=Kt},index:ge,size:x,htmlSize:1,className:`${Xe}-input`,onChange:ve,value:Ft,onActiveChange:Ce,autoFocus:ge===0&&Ze},X)),ge<Ae-1&&_.createElement(De,{separator:de,index:ge,prefixCls:Xe}))}))))}),rt=b(73331),ae=b(15277),$=b(2738),Z=b(8654),ne=b(2171),re=b(23826),W=function(Le,pt){var Pe={};for(var Ae in Le)Object.prototype.hasOwnProperty.call(Le,Ae)&&pt.indexOf(Ae)<0&&(Pe[Ae]=Le[Ae]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ae=Object.getOwnPropertySymbols(Le);he<Ae.length;he++)pt.indexOf(Ae[he])<0&&Object.prototype.propertyIsEnumerable.call(Le,Ae[he])&&(Pe[Ae[he]]=Le[Ae[he]]);return Pe};const y=Le=>Le?_.createElement(ae.Z,null):_.createElement(rt.Z,null),E={click:"onClick",hover:"onMouseOver"};var ue=_.forwardRef((Le,pt)=>{const{disabled:Pe,action:Ae="click",visibilityToggle:he=!0,iconRender:je=y}=Le,Ie=_.useContext(ne.Z),we=Pe!=null?Pe:Ie,M=typeof he=="object"&&he.visible!==void 0,[de,_e]=(0,_.useState)(()=>M?he.visible:!1),Me=(0,_.useRef)(null);_.useEffect(()=>{M&&_e(he.visible)},[M,he]);const Fe=(0,re.Z)(Me),Ze=()=>{var x;if(we)return;de&&Fe();const D=!de;_e(D),typeof he=="object"&&((x=he.onVisibleChange)===null||x===void 0||x.call(he,D))},Qe=x=>{const D=E[Ae]||"",se=je(de),I={[D]:Ze,className:`${x}-icon`,key:"passwordIcon",onMouseDown:U=>{U.preventDefault()},onMouseUp:U=>{U.preventDefault()}};return _.cloneElement(_.isValidElement(se)?se:_.createElement("span",null,se),I)},{className:tt,prefixCls:ut,inputPrefixCls:dt,size:St}=Le,gt=W(Le,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:_t}=_.useContext(pe.E_),Xe=_t("input",dt),qe=_t("input-password",ut),st=he&&Qe(qe),ot=be()(qe,tt,{[`${qe}-${St}`]:!!St}),Ct=Object.assign(Object.assign({},(0,$.Z)(gt,["suffix","iconRender","visibilityToggle"])),{type:de?"text":"password",className:ot,prefixCls:Xe,suffix:st});return St&&(Ct.size=St),_.createElement(o.Z,Object.assign({ref:(0,Z.sQ)(pt,Me)},Ct))}),Ne=b(47472),We=b(22703),Te=b(7939),ze=b(70045),Ye=function(Le,pt){var Pe={};for(var Ae in Le)Object.prototype.hasOwnProperty.call(Le,Ae)&&pt.indexOf(Ae)<0&&(Pe[Ae]=Le[Ae]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ae=Object.getOwnPropertySymbols(Le);he<Ae.length;he++)pt.indexOf(Ae[he])<0&&Object.prototype.propertyIsEnumerable.call(Le,Ae[he])&&(Pe[Ae[he]]=Le[Ae[he]]);return Pe},Ve=_.forwardRef((Le,pt)=>{const{prefixCls:Pe,inputPrefixCls:Ae,className:he,size:je,suffix:Ie,enterButton:we=!1,addonAfter:M,loading:de,disabled:_e,onSearch:Me,onChange:Fe,onCompositionStart:Ze,onCompositionEnd:Qe}=Le,tt=Ye(Le,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:ut,direction:dt}=_.useContext(pe.E_),St=_.useRef(!1),gt=ut("input-search",Pe),_t=ut("input",Ae),{compactSize:Xe}=(0,ze.ri)(gt,dt),qe=(0,C.Z)(ve=>{var Ce;return(Ce=je!=null?je:Xe)!==null&&Ce!==void 0?Ce:ve}),st=_.useRef(null),ot=ve=>{ve!=null&&ve.target&&ve.type==="click"&&Me&&Me(ve.target.value,ve,{source:"clear"}),Fe==null||Fe(ve)},Ct=ve=>{var Ce;document.activeElement===((Ce=st.current)===null||Ce===void 0?void 0:Ce.input)&&ve.preventDefault()},x=ve=>{var Ce,X;Me&&Me((X=(Ce=st.current)===null||Ce===void 0?void 0:Ce.input)===null||X===void 0?void 0:X.value,ve,{source:"input"})},D=ve=>{St.current||de||x(ve)},se=typeof we=="boolean"?_.createElement(Ne.Z,null):null,I=`${gt}-button`;let U;const it=we||{},xe=it.type&&it.type.__ANT_BUTTON===!0;xe||it.type==="button"?U=(0,We.Tm)(it,Object.assign({onMouseDown:Ct,onClick:ve=>{var Ce,X;(X=(Ce=it==null?void 0:it.props)===null||Ce===void 0?void 0:Ce.onClick)===null||X===void 0||X.call(Ce,ve),x(ve)},key:"enterButton"},xe?{className:I,size:qe}:{})):U=_.createElement(Te.ZP,{className:I,type:we?"primary":void 0,size:qe,disabled:_e,key:"enterButton",onMouseDown:Ct,onClick:x,loading:de,icon:se},we),M&&(U=[U,(0,We.Tm)(M,{key:"addonAfter"})]);const Re=be()(gt,{[`${gt}-rtl`]:dt==="rtl",[`${gt}-${qe}`]:!!qe,[`${gt}-with-button`]:!!we},he),He=Object.assign(Object.assign({},tt),{className:Re,prefixCls:_t,type:"search"}),G=ve=>{St.current=!0,Ze==null||Ze(ve)},J=ve=>{St.current=!1,Qe==null||Qe(ve)};return _.createElement(o.Z,Object.assign({ref:(0,Z.sQ)(st,pt),onPressEnter:D},He,{size:qe,onCompositionStart:G,onCompositionEnd:J,addonAfter:U,suffix:Ie,onChange:ot,disabled:_e}))}),Tt=b(79809);const Ke=o.Z;Ke.Group=ie,Ke.Search=Ve,Ke.TextArea=Tt.Z,Ke.Password=ue,Ke.OTP=Be;var Et=Ke},53075:function(Gt,nt,b){"use strict";b.d(nt,{TI:function(){return V},ik:function(){return w},nz:function(){return ie},s7:function(){return S},x0:function(){return N}});var _=b(36237),fe=b(63356),be=b(56119),pe=b(16931),z=b(51636),m=b(64910),ce=b(39082);const ie=P=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:P,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),o=P=>({borderColor:P.activeBorderColor,boxShadow:P.activeShadow,outline:0,backgroundColor:P.activeBg}),Y=P=>{const{paddingBlockLG:F,lineHeightLG:oe,borderRadiusLG:ye,paddingInlineLG:le}=P;return{padding:`${(0,_.unit)(F)} ${(0,_.unit)(le)}`,fontSize:P.inputFontSizeLG,lineHeight:oe,borderRadius:ye}},N=P=>({padding:`${(0,_.unit)(P.paddingBlockSM)} ${(0,_.unit)(P.paddingInlineSM)}`,fontSize:P.inputFontSizeSM,borderRadius:P.borderRadiusSM}),w=P=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,_.unit)(P.paddingBlock)} ${(0,_.unit)(P.paddingInline)}`,color:P.colorText,fontSize:P.inputFontSize,lineHeight:P.lineHeight,borderRadius:P.borderRadius,transition:`all ${P.motionDurationMid}`},ie(P.colorTextPlaceholder)),{"&-lg":Object.assign({},Y(P)),"&-sm":Object.assign({},N(P)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),S=P=>{const{componentCls:F,antCls:oe}=P;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:P.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${F}, &-lg > ${F}-group-addon`]:Object.assign({},Y(P)),[`&-sm ${F}, &-sm > ${F}-group-addon`]:Object.assign({},N(P)),[`&-lg ${oe}-select-single ${oe}-select-selector`]:{height:P.controlHeightLG},[`&-sm ${oe}-select-single ${oe}-select-selector`]:{height:P.controlHeightSM},[`> ${F}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${F}-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,_.unit)(P.paddingInline)}`,color:P.colorText,fontWeight:"normal",fontSize:P.inputFontSize,textAlign:"center",borderRadius:P.borderRadius,transition:`all ${P.motionDurationSlow}`,lineHeight:1,[`${oe}-select`]:{margin:`${(0,_.unit)(P.calc(P.paddingBlock).add(1).mul(-1).equal())} ${(0,_.unit)(P.calc(P.paddingInline).mul(-1).equal())}`,[`&${oe}-select-single:not(${oe}-select-customize-input):not(${oe}-pagination-size-changer)`]:{[`${oe}-select-selector`]:{backgroundColor:"inherit",border:`${(0,_.unit)(P.lineWidth)} ${P.lineType} transparent`,boxShadow:"none"}}},[`${oe}-cascader-picker`]:{margin:`-9px ${(0,_.unit)(P.calc(P.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${oe}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[F]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${F}-search-with-button &`]:{zIndex:0}}},[`> ${F}:first-child, ${F}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${oe}-select ${oe}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${F}-affix-wrapper`]:{[`&:not(:first-child) ${F}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${F}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${F}:last-child, ${F}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${oe}-select ${oe}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${F}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${F}-search &`]:{borderStartStartRadius:P.borderRadius,borderEndStartRadius:P.borderRadius}},[`&:not(:first-child), ${F}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${F}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,fe.dF)()),{[`${F}-group-addon, ${F}-group-wrap, > ${F}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:P.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${F}-affix-wrapper,
& > ${F}-number-affix-wrapper,
& > ${oe}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:P.calc(P.lineWidth).mul(-1).equal(),borderInlineEndWidth:P.lineWidth},[F]:{float:"none"},[`& > ${oe}-select > ${oe}-select-selector,
& > ${oe}-select-auto-complete ${F},
& > ${oe}-cascader-picker ${F},
& > ${F}-group-wrapper ${F}`]:{borderInlineEndWidth:P.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 ${F},
& > ${oe}-cascader-picker:first-child ${F}`]:{borderStartStartRadius:P.borderRadius,borderEndStartRadius:P.borderRadius},[`& > *:last-child,
& > ${oe}-select:last-child > ${oe}-select-selector,
& > ${oe}-cascader-picker:last-child ${F},
& > ${oe}-cascader-picker-focused:last-child ${F}`]:{borderInlineEndWidth:P.lineWidth,borderStartEndRadius:P.borderRadius,borderEndEndRadius:P.borderRadius},[`& > ${oe}-select-auto-complete ${F}`]:{verticalAlign:"top"},[`${F}-group-wrapper + ${F}-group-wrapper`]:{marginInlineStart:P.calc(P.lineWidth).mul(-1).equal(),[`${F}-affix-wrapper`]:{borderRadius:0}},[`${F}-group-wrapper:not(:last-child)`]:{[`&${F}-search > ${F}-group`]:{[`& > ${F}-group-addon > ${F}-search-button`]:{borderRadius:0},[`& > ${F}`]:{borderStartStartRadius:P.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:P.borderRadius}}}})}},C=P=>{const{componentCls:F,controlHeightSM:oe,lineWidth:ye,calc:le}=P,Ue=le(oe).sub(le(ye).mul(2)).sub(16).div(2).equal();return{[F]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(P)),w(P)),(0,ce.qG)(P)),(0,ce.H8)(P)),(0,ce.Mu)(P)),(0,ce.vc)(P)),{'&[type="color"]':{height:P.controlHeight,[`&${F}-lg`]:{height:P.controlHeightLG},[`&${F}-sm`]:{height:oe,paddingTop:Ue,paddingBottom:Ue}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},L=P=>{const{componentCls:F}=P;return{[`${F}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:P.colorTextQuaternary,fontSize:P.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${P.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:P.colorTextTertiary},"&:active":{color:P.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,_.unit)(P.inputAffixPadding)}`}}}},Q=P=>{const{componentCls:F,inputAffixPadding:oe,colorTextDescription:ye,motionDurationSlow:le,colorIcon:De,colorIconHover:Ue,iconCls:Be}=P,rt=`${F}-affix-wrapper`,ae=`${F}-affix-wrapper-disabled`;return{[rt]:Object.assign(Object.assign(Object.assign(Object.assign({},w(P)),{display:"inline-flex",[`&:not(${F}-disabled):hover`]:{zIndex:1,[`${F}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${F}`]:{padding:0},[`> input${F}, > textarea${F}`]:{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"'},[F]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:P.paddingXS}},"&-show-count-suffix":{color:ye},"&-show-count-has-suffix":{marginInlineEnd:P.paddingXXS},"&-prefix":{marginInlineEnd:oe},"&-suffix":{marginInlineStart:oe}}}),L(P)),{[`${Be}${F}-password-icon`]:{color:De,cursor:"pointer",transition:`all ${le}`,"&:hover":{color:Ue}}}),[`${F}-underlined`]:{borderRadius:0},[ae]:{[`${Be}${F}-password-icon`]:{color:De,cursor:"not-allowed","&:hover":{color:De}}}}},q=P=>{const{componentCls:F,borderRadiusLG:oe,borderRadiusSM:ye}=P;return{[`${F}-group`]:Object.assign(Object.assign(Object.assign({},(0,fe.Wf)(P)),S(P)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${F}-group-addon`]:{borderRadius:oe,fontSize:P.inputFontSizeLG}},"&-sm":{[`${F}-group-addon`]:{borderRadius:ye}}},(0,ce.ir)(P)),(0,ce.S5)(P)),{[`&:not(${F}-compact-first-item):not(${F}-compact-last-item)${F}-compact-item`]:{[`${F}, ${F}-group-addon`]:{borderRadius:0}},[`&:not(${F}-compact-last-item)${F}-compact-first-item`]:{[`${F}, ${F}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${F}-compact-first-item)${F}-compact-last-item`]:{[`${F}, ${F}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${F}-compact-last-item)${F}-compact-item`]:{[`${F}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${F}-compact-first-item)${F}-compact-item`]:{[`${F}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},H=P=>{const{componentCls:F,antCls:oe}=P,ye=`${F}-search`;return{[ye]:{[F]:{"&:hover, &:focus":{[`+ ${F}-group-addon ${ye}-button:not(${oe}-btn-primary)`]:{borderInlineStartColor:P.colorPrimaryHover}}},[`${F}-affix-wrapper`]:{height:P.controlHeight,borderRadius:0},[`${F}-lg`]:{lineHeight:P.calc(P.lineHeightLG).sub(2e-4).equal()},[`> ${F}-group`]:{[`> ${F}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${ye}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${ye}-button:not(${oe}-btn-primary)`]:{color:P.colorTextDescription,"&:hover":{color:P.colorPrimaryHover},"&:active":{color:P.colorPrimaryActive},[`&${oe}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${ye}-button`]:{height:P.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${F}-affix-wrapper, ${ye}-button`]:{height:P.controlHeightLG}},"&-small":{[`${F}-affix-wrapper, ${ye}-button`]:{height:P.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${F}-compact-item`]:{[`&:not(${F}-compact-last-item)`]:{[`${F}-group-addon`]:{[`${F}-search-button`]:{marginInlineEnd:P.calc(P.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${F}-compact-first-item)`]:{[`${F},${F}-affix-wrapper`]:{borderRadius:0}},[`> ${F}-group-addon ${F}-search-button,
> ${F},
${F}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${F}-affix-wrapper-focused`]:{zIndex:2}}}}},T=P=>{const{componentCls:F}=P;return{[`${F}-out-of-range`]:{[`&, & input, & textarea, ${F}-show-count-suffix, ${F}-data-count`]:{color:P.colorError}}}},V=(0,pe.I$)(["Input","Shared"],P=>{const F=(0,z.mergeToken)(P,(0,m.e)(P));return[C(F),Q(F)]},m.T,{resetFont:!1});nt.ZP=(0,pe.I$)(["Input","Component"],P=>{const F=(0,z.mergeToken)(P,(0,m.e)(P));return[q(F),H(F),T(F),(0,be.c)(F)]},m.T,{resetFont:!1})},64910:function(Gt,nt,b){"use strict";b.d(nt,{T:function(){return be},e:function(){return fe}});var _=b(51636);function fe(pe){return(0,_.mergeToken)(pe,{inputAffixPadding:pe.paddingXXS})}const be=pe=>{const{controlHeight:z,fontSize:m,lineHeight:ce,lineWidth:ie,controlHeightSM:o,controlHeightLG:Y,fontSizeLG:N,lineHeightLG:w,paddingSM:S,controlPaddingHorizontalSM:C,controlPaddingHorizontal:L,colorFillAlter:Q,colorPrimaryHover:q,colorPrimary:H,controlOutlineWidth:T,controlOutline:V,colorErrorOutline:P,colorWarningOutline:F,colorBgContainer:oe,inputFontSize:ye,inputFontSizeLG:le,inputFontSizeSM:De}=pe,Ue=ye||m,Be=De||Ue,rt=le||N,ae=Math.round((z-Ue*ce)/2*10)/10-ie,$=Math.round((o-Be*ce)/2*10)/10-ie,Z=Math.ceil((Y-rt*w)/2*10)/10-ie;return{paddingBlock:Math.max(ae,0),paddingBlockSM:Math.max($,0),paddingBlockLG:Math.max(Z,0),paddingInline:S-ie,paddingInlineSM:C-ie,paddingInlineLG:L-ie,addonBg:Q,activeBorderColor:H,hoverBorderColor:q,activeShadow:`0 0 0 ${T}px ${V}`,errorActiveShadow:`0 0 0 ${T}px ${P}`,warningActiveShadow:`0 0 0 ${T}px ${F}`,hoverBg:oe,activeBg:oe,inputFontSize:Ue,inputFontSizeLG:rt,inputFontSizeSM:Be}}},39082:function(Gt,nt,b){"use strict";b.d(nt,{$U:function(){return z},H8:function(){return S},Mu:function(){return Y},S5:function(){return L},Xy:function(){return pe},ir:function(){return o},qG:function(){return ce},vc:function(){return H}});var _=b(36237),fe=b(51636);const be=T=>({borderColor:T.hoverBorderColor,backgroundColor:T.hoverBg}),pe=T=>({color:T.colorTextDisabled,backgroundColor:T.colorBgContainerDisabled,borderColor:T.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},be((0,fe.mergeToken)(T,{hoverBorderColor:T.colorBorder,hoverBg:T.colorBgContainerDisabled})))}),z=(T,V)=>({background:T.colorBgContainer,borderWidth:T.lineWidth,borderStyle:T.lineType,borderColor:V.borderColor,"&:hover":{borderColor:V.hoverBorderColor,backgroundColor:T.hoverBg},"&:focus, &:focus-within":{borderColor:V.activeBorderColor,boxShadow:V.activeShadow,outline:0,backgroundColor:T.activeBg}}),m=(T,V)=>({[`&${T.componentCls}-status-${V.status}:not(${T.componentCls}-disabled)`]:Object.assign(Object.assign({},z(T,V)),{[`${T.componentCls}-prefix, ${T.componentCls}-suffix`]:{color:V.affixColor}}),[`&${T.componentCls}-status-${V.status}${T.componentCls}-disabled`]:{borderColor:V.borderColor}}),ce=(T,V)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z(T,{borderColor:T.colorBorder,hoverBorderColor:T.hoverBorderColor,activeBorderColor:T.activeBorderColor,activeShadow:T.activeShadow})),{[`&${T.componentCls}-disabled, &[disabled]`]:Object.assign({},pe(T))}),m(T,{status:"error",borderColor:T.colorError,hoverBorderColor:T.colorErrorBorderHover,activeBorderColor:T.colorError,activeShadow:T.errorActiveShadow,affixColor:T.colorError})),m(T,{status:"warning",borderColor:T.colorWarning,hoverBorderColor:T.colorWarningBorderHover,activeBorderColor:T.colorWarning,activeShadow:T.warningActiveShadow,affixColor:T.colorWarning})),V)}),ie=(T,V)=>({[`&${T.componentCls}-group-wrapper-status-${V.status}`]:{[`${T.componentCls}-group-addon`]:{borderColor:V.addonBorderColor,color:V.addonColor}}}),o=T=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${T.componentCls}-group`]:{"&-addon":{background:T.addonBg,border:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},ie(T,{status:"error",addonBorderColor:T.colorError,addonColor:T.colorErrorText})),ie(T,{status:"warning",addonBorderColor:T.colorWarning,addonColor:T.colorWarningText})),{[`&${T.componentCls}-group-wrapper-disabled`]:{[`${T.componentCls}-group-addon`]:Object.assign({},pe(T))}})}),Y=(T,V)=>{const{componentCls:P}=T;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${P}-disabled, &[disabled]`]:{color:T.colorTextDisabled,cursor:"not-allowed"},[`&${P}-status-error`]:{"&, & input, & textarea":{color:T.colorError}},[`&${P}-status-warning`]:{"&, & input, & textarea":{color:T.colorWarning}}},V)}},N=(T,V)=>{var P;return{background:V.bg,borderWidth:T.lineWidth,borderStyle:T.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(P=V==null?void 0:V.inputColor)!==null&&P!==void 0?P:"unset"},"&:hover":{background:V.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:V.activeBorderColor,backgroundColor:T.activeBg}}},w=(T,V)=>({[`&${T.componentCls}-status-${V.status}:not(${T.componentCls}-disabled)`]:Object.assign(Object.assign({},N(T,V)),{[`${T.componentCls}-prefix, ${T.componentCls}-suffix`]:{color:V.affixColor}})}),S=(T,V)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},N(T,{bg:T.colorFillTertiary,hoverBg:T.colorFillSecondary,activeBorderColor:T.activeBorderColor})),{[`&${T.componentCls}-disabled, &[disabled]`]:Object.assign({},pe(T))}),w(T,{status:"error",bg:T.colorErrorBg,hoverBg:T.colorErrorBgHover,activeBorderColor:T.colorError,inputColor:T.colorErrorText,affixColor:T.colorError})),w(T,{status:"warning",bg:T.colorWarningBg,hoverBg:T.colorWarningBgHover,activeBorderColor:T.colorWarning,inputColor:T.colorWarningText,affixColor:T.colorWarning})),V)}),C=(T,V)=>({[`&${T.componentCls}-group-wrapper-status-${V.status}`]:{[`${T.componentCls}-group-addon`]:{background:V.addonBg,color:V.addonColor}}}),L=T=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${T.componentCls}-group`]:{"&-addon":{background:T.colorFillTertiary},[`${T.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorSplit}`}}}},C(T,{status:"error",addonBg:T.colorErrorBg,addonColor:T.colorErrorText})),C(T,{status:"warning",addonBg:T.colorWarningBg,addonColor:T.colorWarningText})),{[`&${T.componentCls}-group-wrapper-disabled`]:{[`${T.componentCls}-group`]:{"&-addon":{background:T.colorFillTertiary,color:T.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorBorder}`,borderTop:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorBorder}`,borderBottom:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorBorder}`,borderTop:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorBorder}`,borderBottom:`${(0,_.unit)(T.lineWidth)} ${T.lineType} ${T.colorBorder}`}}}})}),Q=(T,V)=>({background:T.colorBgContainer,borderWidth:`${(0,_.unit)(T.lineWidth)} 0`,borderStyle:`${T.lineType} none`,borderColor:`transparent transparent ${V.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${V.borderColor} transparent`,backgroundColor:T.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${V.borderColor} transparent`,outline:0,backgroundColor:T.activeBg}}),q=(T,V)=>({[`&${T.componentCls}-status-${V.status}:not(${T.componentCls}-disabled)`]:Object.assign(Object.assign({},Q(T,V)),{[`${T.componentCls}-prefix, ${T.componentCls}-suffix`]:{color:V.affixColor}}),[`&${T.componentCls}-status-${V.status}${T.componentCls}-disabled`]:{borderColor:`transparent transparent ${V.borderColor} transparent`}}),H=(T,V)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Q(T,{borderColor:T.colorBorder,hoverBorderColor:T.hoverBorderColor,activeBorderColor:T.activeBorderColor,activeShadow:T.activeShadow})),{[`&${T.componentCls}-disabled, &[disabled]`]:{color:T.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${T.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),q(T,{status:"error",borderColor:T.colorError,hoverBorderColor:T.colorErrorBorderHover,activeBorderColor:T.colorError,activeShadow:T.errorActiveShadow,affixColor:T.colorError})),q(T,{status:"warning",borderColor:T.colorWarning,hoverBorderColor:T.colorWarningBorderHover,activeBorderColor:T.colorWarning,activeShadow:T.warningActiveShadow,affixColor:T.colorWarning})),V)})},24303:function(Gt,nt,b){"use strict";b.d(nt,{D:function(){return ye},Z:function(){return Ue}});var _=b(59301),fe=b(60499),be={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},pe=be,z=b(7657),m=function(rt,ae){return _.createElement(z.Z,(0,fe.Z)({},rt,{ref:ae,icon:pe}))},ce=_.forwardRef(m),ie=ce,o=b(33853),Y=b(38819),N=b(92310),w=b.n(N),S=b(2738),C=b(48755),L=b(6989),Q=b(36237),q=b(48923),H=b(16931);const T=Be=>{const{componentCls:rt,siderBg:ae,motionDurationMid:$,motionDurationSlow:Z,antCls:ne,triggerHeight:re,triggerColor:W,triggerBg:y,headerHeight:E,zeroTriggerWidth:B,zeroTriggerHeight:ue,borderRadiusLG:Ne,lightSiderBg:We,lightTriggerColor:Te,lightTriggerBg:ze,bodyBg:Ye}=Be;return{[rt]:{position:"relative",minWidth:0,background:ae,transition:`all ${$}, background 0s`,"&-has-trigger":{paddingBottom:re},"&-right":{order:1},[`${rt}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${ne}-menu${ne}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${rt}-children`]:{overflow:"hidden"},[`${rt}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:re,color:W,lineHeight:(0,Q.unit)(re),textAlign:"center",background:y,cursor:"pointer",transition:`all ${$}`},[`${rt}-zero-width-trigger`]:{position:"absolute",top:E,insetInlineEnd:Be.calc(B).mul(-1).equal(),zIndex:1,width:B,height:ue,color:W,fontSize:Be.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:ae,borderRadius:`0 ${(0,Q.unit)(Ne)} ${(0,Q.unit)(Ne)} 0`,cursor:"pointer",transition:`background ${Z} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${Z}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:Be.calc(B).mul(-1).equal(),borderRadius:`${(0,Q.unit)(Ne)} 0 0 ${(0,Q.unit)(Ne)}`}},"&-light":{background:We,[`${rt}-trigger`]:{color:Te,background:ze},[`${rt}-zero-width-trigger`]:{color:Te,background:ze,border:`1px solid ${Ye}`,borderInlineStart:0}}}}};var V=(0,H.I$)(["Layout","Sider"],Be=>[T(Be)],q.eh,{deprecatedTokens:q.jn}),P=function(Be,rt){var ae={};for(var $ in Be)Object.prototype.hasOwnProperty.call(Be,$)&&rt.indexOf($)<0&&(ae[$]=Be[$]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,$=Object.getOwnPropertySymbols(Be);Z<$.length;Z++)rt.indexOf($[Z])<0&&Object.prototype.propertyIsEnumerable.call(Be,$[Z])&&(ae[$[Z]]=Be[$[Z]]);return ae};const F={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},oe=Be=>!Number.isNaN(Number.parseFloat(Be))&&isFinite(Be),ye=_.createContext({}),le=(()=>{let Be=0;return function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Be+=1,`${rt}${Be}`}})();var Ue=_.forwardRef((Be,rt)=>{const{prefixCls:ae,className:$,trigger:Z,children:ne,defaultCollapsed:re=!1,theme:W="dark",style:y={},collapsible:E=!1,reverseArrow:B=!1,width:ue=200,collapsedWidth:Ne=80,zeroWidthTriggerStyle:We,breakpoint:Te,onCollapse:ze,onBreakpoint:Ye}=Be,Je=P(Be,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ve}=(0,_.useContext)(L.V),[Tt,Ke]=(0,_.useState)("collapsed"in Be?Be.collapsed:re),[Et,Le]=(0,_.useState)(!1);(0,_.useEffect)(()=>{"collapsed"in Be&&Ke(Be.collapsed)},[Be.collapsed]);const pt=(qe,st)=>{"collapsed"in Be||Ke(qe),ze==null||ze(qe,st)},{getPrefixCls:Pe,direction:Ae}=(0,_.useContext)(C.E_),he=Pe("layout-sider",ae),[je,Ie,we]=V(he),M=(0,_.useRef)(null);M.current=qe=>{Le(qe.matches),Ye==null||Ye(qe.matches),Tt!==qe.matches&&pt(qe.matches,"responsive")},(0,_.useEffect)(()=>{function qe(ot){return M.current(ot)}let st;if(typeof window!="undefined"){const{matchMedia:ot}=window;if(ot&&Te&&Te in F){st=ot(`screen and (max-width: ${F[Te]})`);try{st.addEventListener("change",qe)}catch(Ct){st.addListener(qe)}qe(st)}}return()=>{try{st==null||st.removeEventListener("change",qe)}catch(ot){st==null||st.removeListener(qe)}}},[Te]),(0,_.useEffect)(()=>{const qe=le("ant-sider-");return Ve.addSider(qe),()=>Ve.removeSider(qe)},[]);const de=()=>{pt(!Tt,"clickTrigger")},_e=(0,S.Z)(Je,["collapsed"]),Me=Tt?Ne:ue,Fe=oe(Me)?`${Me}px`:String(Me),Ze=parseFloat(String(Ne||0))===0?_.createElement("span",{onClick:de,className:w()(`${he}-zero-width-trigger`,`${he}-zero-width-trigger-${B?"right":"left"}`),style:We},Z||_.createElement(ie,null)):null,Qe=Ae==="rtl"==!B,dt={expanded:Qe?_.createElement(Y.Z,null):_.createElement(o.Z,null),collapsed:Qe?_.createElement(o.Z,null):_.createElement(Y.Z,null)}[Tt?"collapsed":"expanded"],St=Z!==null?Ze||_.createElement("div",{className:`${he}-trigger`,onClick:de,style:{width:Fe}},Z||dt):null,gt=Object.assign(Object.assign({},y),{flex:`0 0 ${Fe}`,maxWidth:Fe,minWidth:Fe,width:Fe}),_t=w()(he,`${he}-${W}`,{[`${he}-collapsed`]:!!Tt,[`${he}-has-trigger`]:E&&Z!==null&&!Ze,[`${he}-below`]:!!Et,[`${he}-zero-width`]:parseFloat(Fe)===0},$,Ie,we),Xe=_.useMemo(()=>({siderCollapsed:Tt}),[Tt]);return je(_.createElement(ye.Provider,{value:Xe},_.createElement("aside",Object.assign({className:_t},_e,{style:gt,ref:rt}),_.createElement("div",{className:`${he}-children`},ne),E||Et&&Ze?St:null)))})},6989:function(Gt,nt,b){"use strict";b.d(nt,{V:function(){return fe}});var _=b(59301);const fe=_.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},48923:function(Gt,nt,b){"use strict";b.d(nt,{eh:function(){return pe},jn:function(){return z}});var _=b(36237),fe=b(16931);const be=m=>{const{antCls:ce,componentCls:ie,colorText:o,footerBg:Y,headerHeight:N,headerPadding:w,headerColor:S,footerPadding:C,fontSize:L,bodyBg:Q,headerBg:q}=m;return{[ie]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Q,"&, *":{boxSizing:"border-box"},[`&${ie}-has-sider`]:{flexDirection:"row",[`> ${ie}, > ${ie}-content`]:{width:0}},[`${ie}-header, &${ie}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${ie}-header`]:{height:N,padding:w,color:S,lineHeight:(0,_.unit)(N),background:q,[`${ce}-menu`]:{lineHeight:"inherit"}},[`${ie}-footer`]:{padding:C,color:o,fontSize:L,background:Y},[`${ie}-content`]:{flex:"auto",color:o,minHeight:0}}},pe=m=>{const{colorBgLayout:ce,controlHeight:ie,controlHeightLG:o,colorText:Y,controlHeightSM:N,marginXXS:w,colorTextLightSolid:S,colorBgContainer:C}=m,L=o*1.25;return{colorBgHeader:"#001529",colorBgBody:ce,colorBgTrigger:"#002140",bodyBg:ce,headerBg:"#001529",headerHeight:ie*2,headerPadding:`0 ${L}px`,headerColor:Y,footerPadding:`${N}px ${L}px`,footerBg:ce,siderBg:"#001529",triggerHeight:o+w*2,triggerBg:"#002140",triggerColor:S,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:C,lightTriggerBg:C,lightTriggerColor:Y}},z=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];nt.ZP=(0,fe.I$)("Layout",m=>[be(m)],pe,{deprecatedTokens:z})},78857:function(Gt,nt,b){"use strict";b.d(nt,{J:function(){return m}});var _=b(59301),fe=b(8654),be=b(62487),pe=function(ce,ie){var o={};for(var Y in ce)Object.prototype.hasOwnProperty.call(ce,Y)&&ie.indexOf(Y)<0&&(o[Y]=ce[Y]);if(ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,Y=Object.getOwnPropertySymbols(ce);N<Y.length;N++)ie.indexOf(Y[N])<0&&Object.prototype.propertyIsEnumerable.call(ce,Y[N])&&(o[Y[N]]=ce[Y[N]]);return o};const z=_.createContext(null),m=_.forwardRef((ce,ie)=>{const{children:o}=ce,Y=pe(ce,["children"]),N=_.useContext(z),w=_.useMemo(()=>Object.assign(Object.assign({},N),Y),[N,Y.prefixCls,Y.mode,Y.selectable,Y.rootClassName]),S=(0,fe.t4)(o),C=(0,fe.x1)(ie,S?(0,fe.C4)(o):null);return _.createElement(z.Provider,{value:w},_.createElement(be.Z,{space:!0},S?_.cloneElement(o,{ref:C}):o))});nt.Z=z},93041:function(Gt,nt,b){"use strict";b.d(nt,{default:function(){return je}});var _=b(59301),fe=b(28321),be=b(24303),pe=b(18785),z=b(92310),m=b.n(z),ce=b(6089),ie=b(2738),o=b(86641),Y=b(22703),N=b(48755),w=b(83397),C=(0,_.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),L=function(Ie,we){var M={};for(var de in Ie)Object.prototype.hasOwnProperty.call(Ie,de)&&we.indexOf(de)<0&&(M[de]=Ie[de]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,de=Object.getOwnPropertySymbols(Ie);_e<de.length;_e++)we.indexOf(de[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ie,de[_e])&&(M[de[_e]]=Ie[de[_e]]);return M},q=Ie=>{const{prefixCls:we,className:M,dashed:de}=Ie,_e=L(Ie,["prefixCls","className","dashed"]),{getPrefixCls:Me}=_.useContext(N.E_),Fe=Me("menu",we),Ze=m()({[`${Fe}-item-divider-dashed`]:!!de},M);return _.createElement(fe.iz,Object.assign({className:Ze},_e))},H=b(11592),T=b(25399),P=Ie=>{var we;const{className:M,children:de,icon:_e,title:Me,danger:Fe,extra:Ze}=Ie,{prefixCls:Qe,firstLevel:tt,direction:ut,disableMenuItemTitleTooltip:dt,inlineCollapsed:St}=_.useContext(C),gt=Ct=>{const x=de==null?void 0:de[0],D=_.createElement("span",{className:m()(`${Qe}-title-content`,{[`${Qe}-title-content-with-extra`]:!!Ze||Ze===0})},de);return(!_e||_.isValidElement(de)&&de.type==="span")&&de&&Ct&&tt&&typeof x=="string"?_.createElement("div",{className:`${Qe}-inline-collapsed-noicon`},x.charAt(0)):D},{siderCollapsed:_t}=_.useContext(be.D);let Xe=Me;typeof Me=="undefined"?Xe=tt?de:"":Me===!1&&(Xe="");const qe={title:Xe};!_t&&!St&&(qe.title=null,qe.open=!1);const st=(0,H.Z)(de).length;let ot=_.createElement(fe.ck,Object.assign({},(0,ie.Z)(Ie,["title","icon","danger"]),{className:m()({[`${Qe}-item-danger`]:Fe,[`${Qe}-item-only-child`]:(_e?st+1:st)===1},M),title:typeof Me=="string"?Me:void 0}),(0,Y.Tm)(_e,{className:m()(_.isValidElement(_e)?(we=_e.props)===null||we===void 0?void 0:we.className:"",`${Qe}-item-icon`)}),gt(St));return dt||(ot=_.createElement(T.Z,Object.assign({},qe,{placement:ut==="rtl"?"left":"right",classNames:{root:`${Qe}-inline-collapsed-tooltip`}}),ot)),ot},F=b(78857),oe=b(36237),ye=b(17835),le=b(63356),De=b(34961),Ue=b(46e3),Be=b(34925),rt=b(16931),ae=b(51636),Z=Ie=>{const{componentCls:we,motionDurationSlow:M,horizontalLineHeight:de,colorSplit:_e,lineWidth:Me,lineType:Fe,itemPaddingInline:Ze}=Ie;return{[`${we}-horizontal`]:{lineHeight:de,border:0,borderBottom:`${(0,oe.unit)(Me)} ${Fe} ${_e}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${we}-item, ${we}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:Ze},[`> ${we}-item:hover,
> ${we}-item-active,
> ${we}-submenu ${we}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${we}-item, ${we}-submenu-title`]:{transition:[`border-color ${M}`,`background ${M}`].join(",")},[`${we}-submenu-arrow`]:{display:"none"}}}},re=Ie=>{let{componentCls:we,menuArrowOffset:M,calc:de}=Ie;return{[`${we}-rtl`]:{direction:"rtl"},[`${we}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${we}-rtl${we}-vertical,
${we}-submenu-rtl ${we}-vertical`]:{[`${we}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,oe.unit)(de(M).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,oe.unit)(M)})`}}}}};const W=Ie=>Object.assign({},(0,le.oN)(Ie));var E=(Ie,we)=>{const{componentCls:M,itemColor:de,itemSelectedColor:_e,subMenuItemSelectedColor:Me,groupTitleColor:Fe,itemBg:Ze,subMenuItemBg:Qe,itemSelectedBg:tt,activeBarHeight:ut,activeBarWidth:dt,activeBarBorderWidth:St,motionDurationSlow:gt,motionEaseInOut:_t,motionEaseOut:Xe,itemPaddingInline:qe,motionDurationMid:st,itemHoverColor:ot,lineType:Ct,colorSplit:x,itemDisabledColor:D,dangerItemColor:se,dangerItemHoverColor:I,dangerItemSelectedColor:U,dangerItemActiveBg:it,dangerItemSelectedBg:xe,popupBg:Re,itemHoverBg:He,itemActiveBg:G,menuSubMenuBg:J,horizontalItemSelectedColor:ve,horizontalItemSelectedBg:Ce,horizontalItemBorderRadius:X,horizontalItemHoverBg:ct}=Ie;return{[`${M}-${we}, ${M}-${we} > ${M}`]:{color:de,background:Ze,[`&${M}-root:focus-visible`]:Object.assign({},W(Ie)),[`${M}-item`]:{"&-group-title, &-extra":{color:Fe}},[`${M}-submenu-selected > ${M}-submenu-title`]:{color:Me},[`${M}-item, ${M}-submenu-title`]:{color:de,[`&:not(${M}-item-disabled):focus-visible`]:Object.assign({},W(Ie))},[`${M}-item-disabled, ${M}-submenu-disabled`]:{color:`${D} !important`},[`${M}-item:not(${M}-item-selected):not(${M}-submenu-selected)`]:{[`&:hover, > ${M}-submenu-title:hover`]:{color:ot}},[`&:not(${M}-horizontal)`]:{[`${M}-item:not(${M}-item-selected)`]:{"&:hover":{backgroundColor:He},"&:active":{backgroundColor:G}},[`${M}-submenu-title`]:{"&:hover":{backgroundColor:He},"&:active":{backgroundColor:G}}},[`${M}-item-danger`]:{color:se,[`&${M}-item:hover`]:{[`&:not(${M}-item-selected):not(${M}-submenu-selected)`]:{color:I}},[`&${M}-item:active`]:{background:it}},[`${M}-item a`]:{"&, &:hover":{color:"inherit"}},[`${M}-item-selected`]:{color:_e,[`&${M}-item-danger`]:{color:U},"a, a:hover":{color:"inherit"}},[`& ${M}-item-selected`]:{backgroundColor:tt,[`&${M}-item-danger`]:{backgroundColor:xe}},[`&${M}-submenu > ${M}`]:{backgroundColor:J},[`&${M}-popup > ${M}`]:{backgroundColor:Re},[`&${M}-submenu-popup > ${M}`]:{backgroundColor:Re},[`&${M}-horizontal`]:Object.assign(Object.assign({},we==="dark"?{borderBottom:0}:{}),{[`> ${M}-item, > ${M}-submenu`]:{top:St,marginTop:Ie.calc(St).mul(-1).equal(),marginBottom:0,borderRadius:X,"&::after":{position:"absolute",insetInline:qe,bottom:0,borderBottom:`${(0,oe.unit)(ut)} solid transparent`,transition:`border-color ${gt} ${_t}`,content:'""'},"&:hover, &-active, &-open":{background:ct,"&::after":{borderBottomWidth:ut,borderBottomColor:ve}},"&-selected":{color:ve,backgroundColor:Ce,"&:hover":{backgroundColor:Ce},"&::after":{borderBottomWidth:ut,borderBottomColor:ve}}}}),[`&${M}-root`]:{[`&${M}-inline, &${M}-vertical`]:{borderInlineEnd:`${(0,oe.unit)(St)} ${Ct} ${x}`}},[`&${M}-inline`]:{[`${M}-sub${M}-inline`]:{background:Qe},[`${M}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,oe.unit)(dt)} solid ${_e}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${st} ${Xe}`,`opacity ${st} ${Xe}`].join(","),content:'""'},[`&${M}-item-danger`]:{"&::after":{borderInlineEndColor:U}}},[`${M}-selected, ${M}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${st} ${_t}`,`opacity ${st} ${_t}`].join(",")}}}}}};const B=Ie=>{const{componentCls:we,itemHeight:M,itemMarginInline:de,padding:_e,menuArrowSize:Me,marginXS:Fe,itemMarginBlock:Ze,itemWidth:Qe,itemPaddingInline:tt}=Ie,ut=Ie.calc(Me).add(_e).add(Fe).equal();return{[`${we}-item`]:{position:"relative",overflow:"hidden"},[`${we}-item, ${we}-submenu-title`]:{height:M,lineHeight:(0,oe.unit)(M),paddingInline:tt,overflow:"hidden",textOverflow:"ellipsis",marginInline:de,marginBlock:Ze,width:Qe},[`> ${we}-item,
> ${we}-submenu > ${we}-submenu-title`]:{height:M,lineHeight:(0,oe.unit)(M)},[`${we}-item-group-list ${we}-submenu-title,
${we}-submenu-title`]:{paddingInlineEnd:ut}}};var Ne=Ie=>{const{componentCls:we,iconCls:M,itemHeight:de,colorTextLightSolid:_e,dropdownWidth:Me,controlHeightLG:Fe,motionEaseOut:Ze,paddingXL:Qe,itemMarginInline:tt,fontSizeLG:ut,motionDurationFast:dt,motionDurationSlow:St,paddingXS:gt,boxShadowSecondary:_t,collapsedWidth:Xe,collapsedIconSize:qe}=Ie,st={height:de,lineHeight:(0,oe.unit)(de),listStylePosition:"inside",listStyleType:"disc"};return[{[we]:{"&-inline, &-vertical":Object.assign({[`&${we}-root`]:{boxShadow:"none"}},B(Ie))},[`${we}-submenu-popup`]:{[`${we}-vertical`]:Object.assign(Object.assign({},B(Ie)),{boxShadow:_t})}},{[`${we}-submenu-popup ${we}-vertical${we}-sub`]:{minWidth:Me,maxHeight:`calc(100vh - ${(0,oe.unit)(Ie.calc(Fe).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${we}-inline`]:{width:"100%",[`&${we}-root`]:{[`${we}-item, ${we}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${St}`,`background ${St}`,`padding ${dt} ${Ze}`].join(","),[`> ${we}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${we}-sub${we}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${we}-submenu > ${we}-submenu-title`]:st,[`& ${we}-item-group-title`]:{paddingInlineStart:Qe}},[`${we}-item`]:st}},{[`${we}-inline-collapsed`]:{width:Xe,[`&${we}-root`]:{[`${we}-item, ${we}-submenu ${we}-submenu-title`]:{[`> ${we}-inline-collapsed-noicon`]:{fontSize:ut,textAlign:"center"}}},[`> ${we}-item,
> ${we}-item-group > ${we}-item-group-list > ${we}-item,
> ${we}-item-group > ${we}-item-group-list > ${we}-submenu > ${we}-submenu-title,
> ${we}-submenu > ${we}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,oe.unit)(Ie.calc(qe).div(2).equal())} - ${(0,oe.unit)(tt)})`,textOverflow:"clip",[`
${we}-submenu-arrow,
${we}-submenu-expand-icon
`]:{opacity:0},[`${we}-item-icon, ${M}`]:{margin:0,fontSize:qe,lineHeight:(0,oe.unit)(de),"+ span":{display:"inline-block",opacity:0}}},[`${we}-item-icon, ${M}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${we}-item-icon, ${M}`]:{display:"none"},"a, a:hover":{color:_e}},[`${we}-item-group-title`]:Object.assign(Object.assign({},le.vS),{paddingInline:gt})}}]};const We=Ie=>{const{componentCls:we,motionDurationSlow:M,motionDurationMid:de,motionEaseInOut:_e,motionEaseOut:Me,iconCls:Fe,iconSize:Ze,iconMarginInlineEnd:Qe}=Ie;return{[`${we}-item, ${we}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${M}`,`background ${M}`,`padding calc(${M} + 0.1s) ${_e}`].join(","),[`${we}-item-icon, ${Fe}`]:{minWidth:Ze,fontSize:Ze,transition:[`font-size ${de} ${Me}`,`margin ${M} ${_e}`,`color ${M}`].join(","),"+ span":{marginInlineStart:Qe,opacity:1,transition:[`opacity ${M} ${_e}`,`margin ${M}`,`color ${M}`].join(",")}},[`${we}-item-icon`]:Object.assign({},(0,le.Ro)()),[`&${we}-item-only-child`]:{[`> ${Fe}, > ${we}-item-icon`]:{marginInlineEnd:0}}},[`${we}-item-disabled, ${we}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${we}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Te=Ie=>{const{componentCls:we,motionDurationSlow:M,motionEaseInOut:de,borderRadius:_e,menuArrowSize:Me,menuArrowOffset:Fe}=Ie;return{[`${we}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Ie.margin,width:Me,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${M} ${de}, opacity ${M}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ie.calc(Me).mul(.6).equal(),height:Ie.calc(Me).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:_e,transition:[`background ${M} ${de}`,`transform ${M} ${de}`,`top ${M} ${de}`,`color ${M} ${de}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,oe.unit)(Ie.calc(Fe).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,oe.unit)(Fe)})`}}}}},ze=Ie=>{const{antCls:we,componentCls:M,fontSize:de,motionDurationSlow:_e,motionDurationMid:Me,motionEaseInOut:Fe,paddingXS:Ze,padding:Qe,colorSplit:tt,lineWidth:ut,zIndexPopup:dt,borderRadiusLG:St,subMenuItemBorderRadius:gt,menuArrowSize:_t,menuArrowOffset:Xe,lineType:qe,groupTitleLineHeight:st,groupTitleFontSize:ot}=Ie;return[{"":{[M]:Object.assign(Object.assign({},(0,le.dF)()),{"&-hidden":{display:"none"}})},[`${M}-submenu-hidden`]:{display:"none"}},{[M]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,le.Wf)(Ie)),(0,le.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:de,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${_e} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${M}-item`]:{flex:"none"}},[`${M}-item, ${M}-submenu, ${M}-submenu-title`]:{borderRadius:Ie.itemBorderRadius},[`${M}-item-group-title`]:{padding:`${(0,oe.unit)(Ze)} ${(0,oe.unit)(Qe)}`,fontSize:ot,lineHeight:st,transition:`all ${_e}`},[`&-horizontal ${M}-submenu`]:{transition:[`border-color ${_e} ${Fe}`,`background ${_e} ${Fe}`].join(",")},[`${M}-submenu, ${M}-submenu-inline`]:{transition:[`border-color ${_e} ${Fe}`,`background ${_e} ${Fe}`,`padding ${Me} ${Fe}`].join(",")},[`${M}-submenu ${M}-sub`]:{cursor:"initial",transition:[`background ${_e} ${Fe}`,`padding ${_e} ${Fe}`].join(",")},[`${M}-title-content`]:{transition:`color ${_e}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${we}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${M}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:Ie.padding}},[`${M}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${M}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:tt,borderStyle:qe,borderWidth:0,borderTopWidth:ut,marginBlock:ut,padding:0,"&-dashed":{borderStyle:"dashed"}}}),We(Ie)),{[`${M}-item-group`]:{[`${M}-item-group-list`]:{margin:0,padding:0,[`${M}-item, ${M}-submenu-title`]:{paddingInline:`${(0,oe.unit)(Ie.calc(de).mul(2).equal())} ${(0,oe.unit)(Qe)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:dt,borderRadius:St,boxShadow:"none",transformOrigin:"0 0",[`&${M}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${M}`]:Object.assign(Object.assign(Object.assign({borderRadius:St},We(Ie)),Te(Ie)),{[`${M}-item, ${M}-submenu > ${M}-submenu-title`]:{borderRadius:gt},[`${M}-submenu-title::after`]:{transition:`transform ${_e} ${Fe}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:Ie.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Ie.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Ie.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Ie.paddingXS}}}),Te(Ie)),{[`&-inline-collapsed ${M}-submenu-arrow,
&-inline ${M}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,oe.unit)(Xe)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,oe.unit)(Ie.calc(Xe).mul(-1).equal())})`}},[`${M}-submenu-open${M}-submenu-inline > ${M}-submenu-title > ${M}-submenu-arrow`]:{transform:`translateY(${(0,oe.unit)(Ie.calc(_t).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,oe.unit)(Ie.calc(Xe).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,oe.unit)(Xe)})`}}})},{[`${we}-layout-header`]:{[M]:{lineHeight:"inherit"}}}]},Ye=Ie=>{var we,M,de;const{colorPrimary:_e,colorError:Me,colorTextDisabled:Fe,colorErrorBg:Ze,colorText:Qe,colorTextDescription:tt,colorBgContainer:ut,colorFillAlter:dt,colorFillContent:St,lineWidth:gt,lineWidthBold:_t,controlItemBgActive:Xe,colorBgTextHover:qe,controlHeightLG:st,lineHeight:ot,colorBgElevated:Ct,marginXXS:x,padding:D,fontSize:se,controlHeightSM:I,fontSizeLG:U,colorTextLightSolid:it,colorErrorHover:xe}=Ie,Re=(we=Ie.activeBarWidth)!==null&&we!==void 0?we:0,He=(M=Ie.activeBarBorderWidth)!==null&&M!==void 0?M:gt,G=(de=Ie.itemMarginInline)!==null&&de!==void 0?de:Ie.marginXXS,J=new ye.FastColor(it).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ie.zIndexPopupBase+50,radiusItem:Ie.borderRadiusLG,itemBorderRadius:Ie.borderRadiusLG,radiusSubMenuItem:Ie.borderRadiusSM,subMenuItemBorderRadius:Ie.borderRadiusSM,colorItemText:Qe,itemColor:Qe,colorItemTextHover:Qe,itemHoverColor:Qe,colorItemTextHoverHorizontal:_e,horizontalItemHoverColor:_e,colorGroupTitle:tt,groupTitleColor:tt,colorItemTextSelected:_e,itemSelectedColor:_e,subMenuItemSelectedColor:_e,colorItemTextSelectedHorizontal:_e,horizontalItemSelectedColor:_e,colorItemBg:ut,itemBg:ut,colorItemBgHover:qe,itemHoverBg:qe,colorItemBgActive:St,itemActiveBg:Xe,colorSubItemBg:dt,subMenuItemBg:dt,colorItemBgSelected:Xe,itemSelectedBg:Xe,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:Re,colorActiveBarHeight:_t,activeBarHeight:_t,colorActiveBarBorderSize:gt,activeBarBorderWidth:He,colorItemTextDisabled:Fe,itemDisabledColor:Fe,colorDangerItemText:Me,dangerItemColor:Me,colorDangerItemTextHover:Me,dangerItemHoverColor:Me,colorDangerItemTextSelected:Me,dangerItemSelectedColor:Me,colorDangerItemBgActive:Ze,dangerItemActiveBg:Ze,colorDangerItemBgSelected:Ze,dangerItemSelectedBg:Ze,itemMarginInline:G,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:st,groupTitleLineHeight:ot,collapsedWidth:st*2,popupBg:Ct,itemMarginBlock:x,itemPaddingInline:D,horizontalLineHeight:`${st*1.15}px`,iconSize:se,iconMarginInlineEnd:I-se,collapsedIconSize:U,groupTitleFontSize:se,darkItemDisabledColor:new ye.FastColor(it).setA(.25).toRgbString(),darkItemColor:J,darkDangerItemColor:Me,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:it,darkItemSelectedBg:_e,darkDangerItemSelectedBg:Me,darkItemHoverBg:"transparent",darkGroupTitleColor:J,darkItemHoverColor:it,darkDangerItemHoverColor:xe,darkDangerItemSelectedColor:it,darkDangerItemActiveBg:Me,itemWidth:Re?`calc(100% + ${He}px)`:`calc(100% - ${G*2}px)`}};var Je=function(Ie){let we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ie,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,rt.I$)("Menu",_e=>{const{colorBgElevated:Me,controlHeightLG:Fe,fontSize:Ze,darkItemColor:Qe,darkDangerItemColor:tt,darkItemBg:ut,darkSubMenuItemBg:dt,darkItemSelectedColor:St,darkItemSelectedBg:gt,darkDangerItemSelectedBg:_t,darkItemHoverBg:Xe,darkGroupTitleColor:qe,darkItemHoverColor:st,darkItemDisabledColor:ot,darkDangerItemHoverColor:Ct,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:D,popupBg:se,darkPopupBg:I}=_e,U=_e.calc(Ze).div(7).mul(5).equal(),it=(0,ae.mergeToken)(_e,{menuArrowSize:U,menuHorizontalHeight:_e.calc(Fe).mul(1.15).equal(),menuArrowOffset:_e.calc(U).mul(.25).equal(),menuSubMenuBg:Me,calc:_e.calc,popupBg:se}),xe=(0,ae.mergeToken)(it,{itemColor:Qe,itemHoverColor:st,groupTitleColor:qe,itemSelectedColor:St,subMenuItemSelectedColor:St,itemBg:ut,popupBg:I,subMenuItemBg:dt,itemActiveBg:"transparent",itemSelectedBg:gt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Xe,itemDisabledColor:ot,dangerItemColor:tt,dangerItemHoverColor:Ct,dangerItemSelectedColor:x,dangerItemActiveBg:D,dangerItemSelectedBg:_t,menuSubMenuBg:dt,horizontalItemSelectedColor:St,horizontalItemSelectedBg:gt});return[ze(it),Z(it),Ne(it),E(it,"light"),E(xe,"dark"),re(it),(0,De.Z)(it),(0,Ue.oN)(it,"slide-up"),(0,Ue.oN)(it,"slide-down"),(0,Be._y)(it,"zoom-big")]},Ye,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:M,unitless:{groupTitleLineHeight:!0}})(Ie,we)},Ve=b(75030),Ke=Ie=>{var we;const{popupClassName:M,icon:de,title:_e,theme:Me}=Ie,Fe=_.useContext(C),{prefixCls:Ze,inlineCollapsed:Qe,theme:tt}=Fe,ut=(0,fe.Xl)();let dt;if(!de)dt=Qe&&!ut.length&&_e&&typeof _e=="string"?_.createElement("div",{className:`${Ze}-inline-collapsed-noicon`},_e.charAt(0)):_.createElement("span",{className:`${Ze}-title-content`},_e);else{const _t=_.isValidElement(_e)&&_e.type==="span";dt=_.createElement(_.Fragment,null,(0,Y.Tm)(de,{className:m()(_.isValidElement(de)?(we=de.props)===null||we===void 0?void 0:we.className:"",`${Ze}-item-icon`)}),_t?_e:_.createElement("span",{className:`${Ze}-title-content`},_e))}const St=_.useMemo(()=>Object.assign(Object.assign({},Fe),{firstLevel:!1}),[Fe]),[gt]=(0,Ve.Cn)("Menu");return _.createElement(C.Provider,{value:St},_.createElement(fe.Wd,Object.assign({},(0,ie.Z)(Ie,["icon"]),{title:dt,popupClassName:m()(Ze,M,`${Ze}-${Me||tt}`),popupStyle:Object.assign({zIndex:gt},Ie.popupStyle)})))},Et=function(Ie,we){var M={};for(var de in Ie)Object.prototype.hasOwnProperty.call(Ie,de)&&we.indexOf(de)<0&&(M[de]=Ie[de]);if(Ie!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,de=Object.getOwnPropertySymbols(Ie);_e<de.length;_e++)we.indexOf(de[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ie,de[_e])&&(M[de[_e]]=Ie[de[_e]]);return M};function Le(Ie){return Ie===null||Ie===!1}const pt={item:P,submenu:Ke,divider:q};var Ae=(0,_.forwardRef)((Ie,we)=>{var M;const de=_.useContext(F.Z),_e=de||{},{getPrefixCls:Me,getPopupContainer:Fe,direction:Ze,menu:Qe}=_.useContext(N.E_),tt=Me(),{prefixCls:ut,className:dt,style:St,theme:gt="light",expandIcon:_t,_internalDisableMenuItemTitleTooltip:Xe,inlineCollapsed:qe,siderCollapsed:st,rootClassName:ot,mode:Ct,selectable:x,onClick:D,overflowedIndicatorPopupClassName:se}=Ie,I=Et(Ie,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),U=(0,ie.Z)(I,["collapsedWidth"]);(M=_e.validator)===null||M===void 0||M.call(_e,{mode:Ct});const it=(0,ce.Z)(function(){var Kt;D==null||D.apply(void 0,arguments),(Kt=_e.onClick)===null||Kt===void 0||Kt.call(_e)}),xe=_e.mode||Ct,Re=x!=null?x:_e.selectable,He=qe!=null?qe:st,G={horizontal:{motionName:`${tt}-slide-up`},inline:(0,o.Z)(tt),other:{motionName:`${tt}-zoom-big`}},J=Me("menu",ut||_e.prefixCls),ve=(0,w.Z)(J),[Ce,X,ct]=Je(J,ve,!de),ge=m()(`${J}-${gt}`,Qe==null?void 0:Qe.className,dt),wt=_.useMemo(()=>{var Kt,on;if(typeof _t=="function"||Le(_t))return _t||null;if(typeof _e.expandIcon=="function"||Le(_e.expandIcon))return _e.expandIcon||null;if(typeof(Qe==null?void 0:Qe.expandIcon)=="function"||Le(Qe==null?void 0:Qe.expandIcon))return(Qe==null?void 0:Qe.expandIcon)||null;const rn=(Kt=_t!=null?_t:_e==null?void 0:_e.expandIcon)!==null&&Kt!==void 0?Kt:Qe==null?void 0:Qe.expandIcon;return(0,Y.Tm)(rn,{className:m()(`${J}-submenu-expand-icon`,_.isValidElement(rn)?(on=rn.props)===null||on===void 0?void 0:on.className:void 0)})},[_t,_e==null?void 0:_e.expandIcon,Qe==null?void 0:Qe.expandIcon,J]),Ft=_.useMemo(()=>({prefixCls:J,inlineCollapsed:He||!1,direction:Ze,firstLevel:!0,theme:gt,mode:xe,disableMenuItemTitleTooltip:Xe}),[J,He,Ze,Xe,gt]);return Ce(_.createElement(F.Z.Provider,{value:null},_.createElement(C.Provider,{value:Ft},_.createElement(fe.ZP,Object.assign({getPopupContainer:Fe,overflowedIndicator:_.createElement(pe.Z,null),overflowedIndicatorPopupClassName:m()(J,`${J}-${gt}`,se),mode:xe,selectable:Re,onClick:it},U,{inlineCollapsed:He,style:Object.assign(Object.assign({},Qe==null?void 0:Qe.style),St),className:ge,prefixCls:J,direction:Ze,defaultMotions:G,expandIcon:wt,ref:we,rootClassName:m()(ot,X,_e.rootClassName,ct,ve),_internalComponents:pt})))))});const he=(0,_.forwardRef)((Ie,we)=>{const M=(0,_.useRef)(null),de=_.useContext(be.D);return(0,_.useImperativeHandle)(we,()=>({menu:M.current,focus:_e=>{var Me;(Me=M.current)===null||Me===void 0||Me.focus(_e)}})),_.createElement(Ae,Object.assign({ref:M},Ie,de))});he.Item=P,he.SubMenu=Ke,he.Divider=q,he.ItemGroup=fe.BW;var je=he},47889:function(Gt,nt,b){"use strict";b.d(nt,{ZP:function(){return We}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(18929),z=b(26112),m=b(48755),ce=b(83397),ie=b(31756);const o=_.createContext(null),Y=o.Provider;var N=o;const w=_.createContext(null),S=w.Provider;var C=b(16632),L=b(8654),Q=b(12919),q=b(63872),H=b(74632),T=b(2171),V=b(56553),P=b(36237),F=b(63356),oe=b(16931),ye=b(51636);const le=Te=>{const{componentCls:ze,antCls:Ye}=Te,Je=`${ze}-group`;return{[Je]:Object.assign(Object.assign({},(0,F.Wf)(Te)),{display:"inline-block",fontSize:0,[`&${Je}-rtl`]:{direction:"rtl"},[`&${Je}-block`]:{display:"flex"},[`${Ye}-badge ${Ye}-badge-count`]:{zIndex:1},[`> ${Ye}-badge:not(:first-child) > ${Ye}-button-wrapper`]:{borderInlineStart:"none"}})}},De=Te=>{const{componentCls:ze,wrapperMarginInlineEnd:Ye,colorPrimary:Je,radioSize:Ve,motionDurationSlow:Tt,motionDurationMid:Ke,motionEaseInOutCirc:Et,colorBgContainer:Le,colorBorder:pt,lineWidth:Pe,colorBgContainerDisabled:Ae,colorTextDisabled:he,paddingXS:je,dotColorDisabled:Ie,lineType:we,radioColor:M,radioBgColor:de,calc:_e}=Te,Me=`${ze}-inner`,Ze=_e(Ve).sub(_e(4).mul(2)),Qe=_e(1).mul(Ve).equal({unit:!0});return{[`${ze}-wrapper`]:Object.assign(Object.assign({},(0,F.Wf)(Te)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Ye,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${ze}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Te.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${ze}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${(0,P.unit)(Pe)} ${we} ${Je}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[ze]:Object.assign(Object.assign({},(0,F.Wf)(Te)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${ze}-wrapper:hover &,
&:hover ${Me}`]:{borderColor:Je},[`${ze}-input:focus-visible + ${Me}`]:Object.assign({},(0,F.oN)(Te)),[`${ze}:hover::after, ${ze}-wrapper:hover &::after`]:{visibility:"visible"},[`${ze}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Qe,height:Qe,marginBlockStart:_e(1).mul(Ve).div(-2).equal({unit:!0}),marginInlineStart:_e(1).mul(Ve).div(-2).equal({unit:!0}),backgroundColor:M,borderBlockStart:0,borderInlineStart:0,borderRadius:Qe,transform:"scale(0)",opacity:0,transition:`all ${Tt} ${Et}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Qe,height:Qe,backgroundColor:Le,borderColor:pt,borderStyle:"solid",borderWidth:Pe,borderRadius:"50%",transition:`all ${Ke}`},[`${ze}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${ze}-checked`]:{[Me]:{borderColor:Je,backgroundColor:de,"&::after":{transform:`scale(${Te.calc(Te.dotSize).div(Ve).equal()})`,opacity:1,transition:`all ${Tt} ${Et}`}}},[`${ze}-disabled`]:{cursor:"not-allowed",[Me]:{backgroundColor:Ae,borderColor:pt,cursor:"not-allowed","&::after":{backgroundColor:Ie}},[`${ze}-input`]:{cursor:"not-allowed"},[`${ze}-disabled + span`]:{color:he,cursor:"not-allowed"},[`&${ze}-checked`]:{[Me]:{"&::after":{transform:`scale(${_e(Ze).div(Ve).equal()})`}}}},[`span${ze} + *`]:{paddingInlineStart:je,paddingInlineEnd:je}})}},Ue=Te=>{const{buttonColor:ze,controlHeight:Ye,componentCls:Je,lineWidth:Ve,lineType:Tt,colorBorder:Ke,motionDurationSlow:Et,motionDurationMid:Le,buttonPaddingInline:pt,fontSize:Pe,buttonBg:Ae,fontSizeLG:he,controlHeightLG:je,controlHeightSM:Ie,paddingXS:we,borderRadius:M,borderRadiusSM:de,borderRadiusLG:_e,buttonCheckedBg:Me,buttonSolidCheckedColor:Fe,colorTextDisabled:Ze,colorBgContainerDisabled:Qe,buttonCheckedBgDisabled:tt,buttonCheckedColorDisabled:ut,colorPrimary:dt,colorPrimaryHover:St,colorPrimaryActive:gt,buttonSolidCheckedBg:_t,buttonSolidCheckedHoverBg:Xe,buttonSolidCheckedActiveBg:qe,calc:st}=Te;return{[`${Je}-button-wrapper`]:{position:"relative",display:"inline-block",height:Ye,margin:0,paddingInline:pt,paddingBlock:0,color:ze,fontSize:Pe,lineHeight:(0,P.unit)(st(Ye).sub(st(Ve).mul(2)).equal()),background:Ae,border:`${(0,P.unit)(Ve)} ${Tt} ${Ke}`,borderBlockStartWidth:st(Ve).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:Ve,cursor:"pointer",transition:[`color ${Le}`,`background ${Le}`,`box-shadow ${Le}`].join(","),a:{color:ze},[`> ${Je}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:st(Ve).mul(-1).equal(),insetInlineStart:st(Ve).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ve,paddingInline:0,backgroundColor:Ke,transition:`background-color ${Et}`,content:'""'}},"&:first-child":{borderInlineStart:`${(0,P.unit)(Ve)} ${Tt} ${Ke}`,borderStartStartRadius:M,borderEndStartRadius:M},"&:last-child":{borderStartEndRadius:M,borderEndEndRadius:M},"&:first-child:last-child":{borderRadius:M},[`${Je}-group-large &`]:{height:je,fontSize:he,lineHeight:(0,P.unit)(st(je).sub(st(Ve).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_e,borderEndStartRadius:_e},"&:last-child":{borderStartEndRadius:_e,borderEndEndRadius:_e}},[`${Je}-group-small &`]:{height:Ie,paddingInline:st(we).sub(Ve).equal(),paddingBlock:0,lineHeight:(0,P.unit)(st(Ie).sub(st(Ve).mul(2)).equal()),"&:first-child":{borderStartStartRadius:de,borderEndStartRadius:de},"&:last-child":{borderStartEndRadius:de,borderEndEndRadius:de}},"&:hover":{position:"relative",color:dt},"&:has(:focus-visible)":Object.assign({},(0,F.oN)(Te)),[`${Je}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Je}-button-wrapper-disabled)`]:{zIndex:1,color:dt,background:Me,borderColor:dt,"&::before":{backgroundColor:dt},"&:first-child":{borderColor:dt},"&:hover":{color:St,borderColor:St,"&::before":{backgroundColor:St}},"&:active":{color:gt,borderColor:gt,"&::before":{backgroundColor:gt}}},[`${Je}-group-solid &-checked:not(${Je}-button-wrapper-disabled)`]:{color:Fe,background:_t,borderColor:_t,"&:hover":{color:Fe,background:Xe,borderColor:Xe},"&:active":{color:Fe,background:qe,borderColor:qe}},"&-disabled":{color:Ze,backgroundColor:Qe,borderColor:Ke,cursor:"not-allowed","&:first-child, &:hover":{color:Ze,backgroundColor:Qe,borderColor:Ke}},[`&-disabled${Je}-button-wrapper-checked`]:{color:ut,backgroundColor:tt,borderColor:Ke,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},Be=Te=>{const{wireframe:ze,padding:Ye,marginXS:Je,lineWidth:Ve,fontSizeLG:Tt,colorText:Ke,colorBgContainer:Et,colorTextDisabled:Le,controlItemBgActiveDisabled:pt,colorTextLightSolid:Pe,colorPrimary:Ae,colorPrimaryHover:he,colorPrimaryActive:je,colorWhite:Ie}=Te,we=4,M=Tt,de=ze?M-we*2:M-(we+Ve)*2;return{radioSize:M,dotSize:de,dotColorDisabled:Le,buttonSolidCheckedColor:Pe,buttonSolidCheckedBg:Ae,buttonSolidCheckedHoverBg:he,buttonSolidCheckedActiveBg:je,buttonBg:Et,buttonCheckedBg:Et,buttonColor:Ke,buttonCheckedBgDisabled:pt,buttonCheckedColorDisabled:Le,buttonPaddingInline:Ye-Ve,wrapperMarginInlineEnd:Je,radioColor:ze?Ae:Ie,radioBgColor:ze?Et:Ae}};var rt=(0,oe.I$)("Radio",Te=>{const{controlOutline:ze,controlOutlineWidth:Ye}=Te,Je=`0 0 0 ${(0,P.unit)(Ye)} ${ze}`,Ve=Je,Tt=(0,ye.mergeToken)(Te,{radioFocusShadow:Je,radioButtonFocusShadow:Ve});return[le(Tt),De(Tt),Ue(Tt)]},Be,{unitless:{radioSize:!0,dotSize:!0}}),ae=function(Te,ze){var Ye={};for(var Je in Te)Object.prototype.hasOwnProperty.call(Te,Je)&&ze.indexOf(Je)<0&&(Ye[Je]=Te[Je]);if(Te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Je=Object.getOwnPropertySymbols(Te);Ve<Je.length;Ve++)ze.indexOf(Je[Ve])<0&&Object.prototype.propertyIsEnumerable.call(Te,Je[Ve])&&(Ye[Je[Ve]]=Te[Je[Ve]]);return Ye};const $=(Te,ze)=>{var Ye,Je;const Ve=_.useContext(N),Tt=_.useContext(w),{getPrefixCls:Ke,direction:Et,radio:Le}=_.useContext(m.E_),pt=_.useRef(null),Pe=(0,L.sQ)(ze,pt),{isFormItemInput:Ae}=_.useContext(V.aM),he=ot=>{var Ct,x;(Ct=Te.onChange)===null||Ct===void 0||Ct.call(Te,ot),(x=Ve==null?void 0:Ve.onChange)===null||x===void 0||x.call(Ve,ot)},{prefixCls:je,className:Ie,rootClassName:we,children:M,style:de,title:_e}=Te,Me=ae(Te,["prefixCls","className","rootClassName","children","style","title"]),Fe=Ke("radio",je),Ze=((Ve==null?void 0:Ve.optionType)||Tt)==="button",Qe=Ze?`${Fe}-button`:Fe,tt=(0,ce.Z)(Fe),[ut,dt,St]=rt(Fe,tt),gt=Object.assign({},Me),_t=_.useContext(T.Z);Ve&&(gt.name=Ve.name,gt.onChange=he,gt.checked=Te.value===Ve.value,gt.disabled=(Ye=gt.disabled)!==null&&Ye!==void 0?Ye:Ve.disabled),gt.disabled=(Je=gt.disabled)!==null&&Je!==void 0?Je:_t;const Xe=be()(`${Qe}-wrapper`,{[`${Qe}-wrapper-checked`]:gt.checked,[`${Qe}-wrapper-disabled`]:gt.disabled,[`${Qe}-wrapper-rtl`]:Et==="rtl",[`${Qe}-wrapper-in-form-item`]:Ae,[`${Qe}-wrapper-block`]:!!(Ve!=null&&Ve.block)},Le==null?void 0:Le.className,Ie,we,dt,St,tt),[qe,st]=(0,H.Z)(gt.onClick);return ut(_.createElement(Q.Z,{component:"Radio",disabled:gt.disabled},_.createElement("label",{className:Xe,style:Object.assign(Object.assign({},Le==null?void 0:Le.style),de),onMouseEnter:Te.onMouseEnter,onMouseLeave:Te.onMouseLeave,title:_e,onClick:qe},_.createElement(C.Z,Object.assign({},gt,{className:be()(gt.className,{[q.A]:!Ze}),type:"radio",prefixCls:Qe,ref:Pe,onClick:st})),M!==void 0?_.createElement("span",{className:`${Qe}-label`},M):null)))};var ne=_.forwardRef($),re=b(80402);const W=_.forwardRef((Te,ze)=>{const{getPrefixCls:Ye,direction:Je}=_.useContext(m.E_),Ve=(0,re.Z)(),{prefixCls:Tt,className:Ke,rootClassName:Et,options:Le,buttonStyle:pt="outline",disabled:Pe,children:Ae,size:he,style:je,id:Ie,optionType:we,name:M=Ve,defaultValue:de,value:_e,block:Me=!1,onChange:Fe,onMouseEnter:Ze,onMouseLeave:Qe,onFocus:tt,onBlur:ut}=Te,[dt,St]=(0,pe.Z)(de,{value:_e}),gt=_.useCallback(U=>{const it=dt,xe=U.target.value;"value"in Te||St(xe),xe!==it&&(Fe==null||Fe(U))},[dt,St,Fe]),_t=Ye("radio",Tt),Xe=`${_t}-group`,qe=(0,ce.Z)(_t),[st,ot,Ct]=rt(_t,qe);let x=Ae;Le&&Le.length>0&&(x=Le.map(U=>typeof U=="string"||typeof U=="number"?_.createElement(ne,{key:U.toString(),prefixCls:_t,disabled:Pe,value:U,checked:dt===U},U):_.createElement(ne,{key:`radio-group-value-options-${U.value}`,prefixCls:_t,disabled:U.disabled||Pe,value:U.value,checked:dt===U.value,title:U.title,style:U.style,id:U.id,required:U.required},U.label)));const D=(0,ie.Z)(he),se=be()(Xe,`${Xe}-${pt}`,{[`${Xe}-${D}`]:D,[`${Xe}-rtl`]:Je==="rtl",[`${Xe}-block`]:Me},Ke,Et,ot,Ct,qe),I=_.useMemo(()=>({onChange:gt,value:dt,disabled:Pe,name:M,optionType:we,block:Me}),[gt,dt,Pe,M,we,Me]);return st(_.createElement("div",Object.assign({},(0,z.Z)(Te,{aria:!0,data:!0}),{className:se,style:je,onMouseEnter:Ze,onMouseLeave:Qe,onFocus:tt,onBlur:ut,id:Ie,ref:ze}),_.createElement(Y,{value:I},x)))});var y=_.memo(W),E=function(Te,ze){var Ye={};for(var Je in Te)Object.prototype.hasOwnProperty.call(Te,Je)&&ze.indexOf(Je)<0&&(Ye[Je]=Te[Je]);if(Te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ve=0,Je=Object.getOwnPropertySymbols(Te);Ve<Je.length;Ve++)ze.indexOf(Je[Ve])<0&&Object.prototype.propertyIsEnumerable.call(Te,Je[Ve])&&(Ye[Je[Ve]]=Te[Je[Ve]]);return Ye};const B=(Te,ze)=>{const{getPrefixCls:Ye}=_.useContext(m.E_),{prefixCls:Je}=Te,Ve=E(Te,["prefixCls"]),Tt=Ye("radio",Je);return _.createElement(S,{value:"button"},_.createElement(ne,Object.assign({prefixCls:Tt},Ve,{type:"radio",ref:ze})))};var ue=_.forwardRef(B);const Ne=ne;Ne.Button=ue,Ne.Group=y,Ne.__ANT_RADIO=!0;var We=Ne},44104:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return Q}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(11592),z=b(99402),m=b(48755),ce=b(70045);const ie=_.createContext({latestIndex:0}),o=ie.Provider;var N=q=>{let{className:H,index:T,children:V,split:P,style:F}=q;const{latestIndex:oe}=_.useContext(ie);return V==null?null:_.createElement(_.Fragment,null,_.createElement("div",{className:H,style:F},V),T<oe&&P&&_.createElement("span",{className:`${H}-split`},P))},w=b(31547),S=function(q,H){var T={};for(var V in q)Object.prototype.hasOwnProperty.call(q,V)&&H.indexOf(V)<0&&(T[V]=q[V]);if(q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var P=0,V=Object.getOwnPropertySymbols(q);P<V.length;P++)H.indexOf(V[P])<0&&Object.prototype.propertyIsEnumerable.call(q,V[P])&&(T[V[P]]=q[V[P]]);return T};const L=_.forwardRef((q,H)=>{var T;const{getPrefixCls:V,direction:P,size:F,className:oe,style:ye,classNames:le,styles:De}=(0,m.dj)("space"),{size:Ue=F!=null?F:"small",align:Be,className:rt,rootClassName:ae,children:$,direction:Z="horizontal",prefixCls:ne,split:re,style:W,wrap:y=!1,classNames:E,styles:B}=q,ue=S(q,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ne,We]=Array.isArray(Ue)?Ue:[Ue,Ue],Te=(0,z.n)(We),ze=(0,z.n)(Ne),Ye=(0,z.T)(We),Je=(0,z.T)(Ne),Ve=(0,pe.Z)($,{keepEmpty:!0}),Tt=Be===void 0&&Z==="horizontal"?"center":Be,Ke=V("space",ne),[Et,Le,pt]=(0,w.Z)(Ke),Pe=be()(Ke,oe,Le,`${Ke}-${Z}`,{[`${Ke}-rtl`]:P==="rtl",[`${Ke}-align-${Tt}`]:Tt,[`${Ke}-gap-row-${We}`]:Te,[`${Ke}-gap-col-${Ne}`]:ze},rt,ae,pt),Ae=be()(`${Ke}-item`,(T=E==null?void 0:E.item)!==null&&T!==void 0?T:le.item);let he=0;const je=Ve.map((M,de)=>{var _e;M!=null&&(he=de);const Me=(M==null?void 0:M.key)||`${Ae}-${de}`;return _.createElement(N,{className:Ae,key:Me,index:de,split:re,style:(_e=B==null?void 0:B.item)!==null&&_e!==void 0?_e:De.item},M)}),Ie=_.useMemo(()=>({latestIndex:he}),[he]);if(Ve.length===0)return null;const we={};return y&&(we.flexWrap="wrap"),!ze&&Je&&(we.columnGap=Ne),!Te&&Ye&&(we.rowGap=We),Et(_.createElement("div",Object.assign({ref:H,className:Pe,style:Object.assign(Object.assign(Object.assign({},we),ye),W)},ue),_.createElement(o,{value:Ie},je)))});L.Compact=ce.ZP;var Q=L},93873:function(Gt,nt,b){"use strict";b.d(nt,{Fm:function(){return w}});var _=b(36237),fe=b(48746);const be=new _.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),pe=new _.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),z=new _.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),m=new _.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ce=new _.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ie=new _.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),o=new _.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Y=new _.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),N={"move-up":{inKeyframes:o,outKeyframes:Y},"move-down":{inKeyframes:be,outKeyframes:pe},"move-left":{inKeyframes:z,outKeyframes:m},"move-right":{inKeyframes:ce,outKeyframes:ie}},w=(S,C)=>{const{antCls:L}=S,Q=`${L}-${C}`,{inKeyframes:q,outKeyframes:H}=N[C];return[(0,fe.R)(Q,q,H,S.motionDurationMid),{[`
${Q}-enter,
${Q}-appear
`]:{opacity:0,animationTimingFunction:S.motionEaseOutCirc},[`${Q}-leave`]:{animationTimingFunction:S.motionEaseInOutCirc}}]}},46e3:function(Gt,nt,b){"use strict";b.d(nt,{Qt:function(){return z},Uw:function(){return pe},fJ:function(){return be},ly:function(){return m},oN:function(){return w}});var _=b(36237),fe=b(48746);const be=new _.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),pe=new _.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),z=new _.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),m=new _.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ce=new _.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ie=new _.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new _.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Y=new _.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),N={"slide-up":{inKeyframes:be,outKeyframes:pe},"slide-down":{inKeyframes:z,outKeyframes:m},"slide-left":{inKeyframes:ce,outKeyframes:ie},"slide-right":{inKeyframes:o,outKeyframes:Y}},w=(S,C)=>{const{antCls:L}=S,Q=`${L}-${C}`,{inKeyframes:q,outKeyframes:H}=N[C];return[(0,fe.R)(Q,q,H,S.motionDurationMid),{[`
${Q}-enter,
${Q}-appear
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:S.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Q}-leave`]:{animationTimingFunction:S.motionEaseInQuint}}]}},37645:function(Gt,nt,b){"use strict";b.d(nt,{ZP:function(){return m},qN:function(){return be},wZ:function(){return pe}});var _=b(36237),fe=b(36305);const be=8;function pe(ce){const{contentRadius:ie,limitVerticalRadius:o}=ce,Y=ie>12?ie+2:12;return{arrowOffsetHorizontal:Y,arrowOffsetVertical:o?be:Y}}function z(ce,ie){return ce?ie:{}}function m(ce,ie,o){const{componentCls:Y,boxShadowPopoverArrow:N,arrowOffsetVertical:w,arrowOffsetHorizontal:S}=ce,{arrowDistance:C=0,arrowPlacement:L={left:!0,right:!0,top:!0,bottom:!0}}=o||{};return{[Y]:Object.assign(Object.assign(Object.assign(Object.assign({[`${Y}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,fe.W)(ce,ie,N)),{"&:before":{background:ie}})]},z(!!L.top,{[[`&-placement-top > ${Y}-arrow`,`&-placement-topLeft > ${Y}-arrow`,`&-placement-topRight > ${Y}-arrow`].join(",")]:{bottom:C,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${Y}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":S,[`> ${Y}-arrow`]:{left:{_skip_check_:!0,value:S}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,_.unit)(S)})`,[`> ${Y}-arrow`]:{right:{_skip_check_:!0,value:S}}}})),z(!!L.bottom,{[[`&-placement-bottom > ${Y}-arrow`,`&-placement-bottomLeft > ${Y}-arrow`,`&-placement-bottomRight > ${Y}-arrow`].join(",")]:{top:C,transform:"translateY(-100%)"},[`&-placement-bottom > ${Y}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":S,[`> ${Y}-arrow`]:{left:{_skip_check_:!0,value:S}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,_.unit)(S)})`,[`> ${Y}-arrow`]:{right:{_skip_check_:!0,value:S}}}})),z(!!L.left,{[[`&-placement-left > ${Y}-arrow`,`&-placement-leftTop > ${Y}-arrow`,`&-placement-leftBottom > ${Y}-arrow`].join(",")]:{right:{_skip_check_:!0,value:C},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${Y}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${Y}-arrow`]:{top:w},[`&-placement-leftBottom > ${Y}-arrow`]:{bottom:w}})),z(!!L.right,{[[`&-placement-right > ${Y}-arrow`,`&-placement-rightTop > ${Y}-arrow`,`&-placement-rightBottom > ${Y}-arrow`].join(",")]:{left:{_skip_check_:!0,value:C},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${Y}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${Y}-arrow`]:{top:w},[`&-placement-rightBottom > ${Y}-arrow`]:{bottom:w}}))}}},36305:function(Gt,nt,b){"use strict";b.d(nt,{W:function(){return be},w:function(){return fe}});var _=b(36237);function fe(pe){const{sizePopupArrow:z,borderRadiusXS:m,borderRadiusOuter:ce}=pe,ie=z/2,o=0,Y=ie,N=ce*1/Math.sqrt(2),w=ie-ce*(1-1/Math.sqrt(2)),S=ie-m*(1/Math.sqrt(2)),C=ce*(Math.sqrt(2)-1)+m*(1/Math.sqrt(2)),L=2*ie-S,Q=C,q=2*ie-N,H=w,T=2*ie-o,V=Y,P=ie*Math.sqrt(2)+ce*(Math.sqrt(2)-2),F=ce*(Math.sqrt(2)-1),oe=`polygon(${F}px 100%, 50% ${F}px, ${2*ie-F}px 100%, ${F}px 100%)`,ye=`path('M ${o} ${Y} A ${ce} ${ce} 0 0 0 ${N} ${w} L ${S} ${C} A ${m} ${m} 0 0 1 ${L} ${Q} L ${q} ${H} A ${ce} ${ce} 0 0 0 ${T} ${V} Z')`;return{arrowShadowWidth:P,arrowPath:ye,arrowPolygon:oe}}const be=(pe,z,m)=>{const{sizePopupArrow:ce,arrowPolygon:ie,arrowPath:o,arrowShadowWidth:Y,borderRadiusXS:N,calc:w}=pe;return{pointerEvents:"none",width:ce,height:ce,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:ce,height:w(ce).div(2).equal(),background:z,clipPath:{_multi_value_:!0,value:[ie,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:Y,height:Y,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,_.unit)(N)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:m,zIndex:0,background:"transparent"}}}},93427:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return fe}});var _=b(34998);function fe(be,pe){return _.i.reduce((z,m)=>{const ce=be[`${m}1`],ie=be[`${m}3`],o=be[`${m}6`],Y=be[`${m}7`];return Object.assign(Object.assign({},z),pe(m,{lightColor:ce,lightBorderColor:ie,darkColor:o,textColor:Y}))},{})}},25399:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ne}});var _=b(59301),fe=b(92310),be=b.n(fe),pe=b(29125),z=b(18929),m=b(62487),ce=b(75030),ie=b(86641),o=b(52838),Y=b(22703),N=b(32383),w=b(55743),S=b(57700),C=b(48755),L=b(36237),Q=b(63356),q=b(34925),H=b(37645),T=b(36305),V=b(93427),P=b(51636),F=b(16931);const oe=re=>{const{calc:W,componentCls:y,tooltipMaxWidth:E,tooltipColor:B,tooltipBg:ue,tooltipBorderRadius:Ne,zIndexPopup:We,controlHeight:Te,boxShadowSecondary:ze,paddingSM:Ye,paddingXS:Je,arrowOffsetHorizontal:Ve,sizePopupArrow:Tt}=re,Ke=W(Ne).add(Tt).add(Ve).equal(),Et=W(Ne).mul(2).add(Tt).equal();return[{[y]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Q.Wf)(re)),{position:"absolute",zIndex:We,display:"block",width:"max-content",maxWidth:E,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":ue,[`${y}-inner`]:{minWidth:Et,minHeight:Te,padding:`${(0,L.unit)(re.calc(Ye).div(2).equal())} ${(0,L.unit)(Je)}`,color:B,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ue,borderRadius:Ne,boxShadow:ze,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:Ke},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${y}-inner`]:{borderRadius:re.min(Ne,H.qN)}},[`${y}-content`]:{position:"relative"}}),(0,V.Z)(re,(Le,pt)=>{let{darkColor:Pe}=pt;return{[`&${y}-${Le}`]:{[`${y}-inner`]:{backgroundColor:Pe},[`${y}-arrow`]:{"--antd-arrow-background-color":Pe}}}})),{"&-rtl":{direction:"rtl"}})},(0,H.ZP)(re,"var(--antd-arrow-background-color)"),{[`${y}-pure`]:{position:"relative",maxWidth:"none",margin:re.sizePopupArrow}}]},ye=re=>Object.assign(Object.assign({zIndexPopup:re.zIndexPopupBase+70},(0,H.wZ)({contentRadius:re.borderRadius,limitVerticalRadius:!0})),(0,T.w)((0,P.mergeToken)(re,{borderRadiusOuter:Math.min(re.borderRadiusOuter,4)})));var le=function(re){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,F.I$)("Tooltip",E=>{const{borderRadius:B,colorTextLightSolid:ue,colorBgSpotlight:Ne}=E,We=(0,P.mergeToken)(E,{tooltipMaxWidth:250,tooltipColor:ue,tooltipBorderRadius:B,tooltipBg:Ne});return[oe(We),(0,q._y)(E,"zoom-big-fast")]},ye,{resetStyle:!1,injectStyle:W})(re)},De=b(29509);function Ue(re,W){const y=(0,De.o2)(W),E=be()({[`${re}-${W}`]:W&&y}),B={},ue={};return W&&!y&&(B.background=W,ue["--antd-arrow-background-color"]=W),{className:E,overlayStyle:B,arrowStyle:ue}}var rt=re=>{const{prefixCls:W,className:y,placement:E="top",title:B,color:ue,overlayInnerStyle:Ne}=re,{getPrefixCls:We}=_.useContext(C.E_),Te=We("tooltip",W),[ze,Ye,Je]=le(Te),Ve=Ue(Te,ue),Tt=Ve.arrowStyle,Ke=Object.assign(Object.assign({},Ne),Ve.overlayStyle),Et=be()(Ye,Je,Te,`${Te}-pure`,`${Te}-placement-${E}`,y,Ve.className);return ze(_.createElement("div",{className:Et,style:Tt},_.createElement("div",{className:`${Te}-arrow`}),_.createElement(pe.G,Object.assign({},re,{className:Ye,prefixCls:Te,overlayInnerStyle:Ke}),B)))},ae=function(re,W){var y={};for(var E in re)Object.prototype.hasOwnProperty.call(re,E)&&W.indexOf(E)<0&&(y[E]=re[E]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,E=Object.getOwnPropertySymbols(re);B<E.length;B++)W.indexOf(E[B])<0&&Object.prototype.propertyIsEnumerable.call(re,E[B])&&(y[E[B]]=re[E[B]]);return y};const Z=_.forwardRef((re,W)=>{var y,E;const{prefixCls:B,openClassName:ue,getTooltipContainer:Ne,color:We,overlayInnerStyle:Te,children:ze,afterOpenChange:Ye,afterVisibleChange:Je,destroyTooltipOnHide:Ve,arrow:Tt=!0,title:Ke,overlay:Et,builtinPlacements:Le,arrowPointAtCenter:pt=!1,autoAdjustOverflow:Pe=!0,motion:Ae,getPopupContainer:he,placement:je="top",mouseEnterDelay:Ie=.1,mouseLeaveDelay:we=.1,overlayStyle:M,rootClassName:de,overlayClassName:_e,styles:Me,classNames:Fe}=re,Ze=ae(re,["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"]),Qe=!!Tt,[,tt]=(0,S.ZP)(),{getPopupContainer:ut,getPrefixCls:dt,direction:St,className:gt,style:_t,classNames:Xe,styles:qe}=(0,C.dj)("tooltip"),st=(0,N.ln)("Tooltip"),ot=_.useRef(null),Ct=()=>{var Sn;(Sn=ot.current)===null||Sn===void 0||Sn.forceAlign()};_.useImperativeHandle(W,()=>{var Sn,pn;return{forceAlign:Ct,forcePopupAlign:()=>{st.deprecated(!1,"forcePopupAlign","forceAlign"),Ct()},nativeElement:(Sn=ot.current)===null||Sn===void 0?void 0:Sn.nativeElement,popupElement:(pn=ot.current)===null||pn===void 0?void 0:pn.popupElement}});const[x,D]=(0,z.Z)(!1,{value:(y=re.open)!==null&&y!==void 0?y:re.visible,defaultValue:(E=re.defaultOpen)!==null&&E!==void 0?E:re.defaultVisible}),se=!Ke&&!Et&&Ke!==0,I=Sn=>{var pn,Ut;D(se?!1:Sn),se||((pn=re.onOpenChange)===null||pn===void 0||pn.call(re,Sn),(Ut=re.onVisibleChange)===null||Ut===void 0||Ut.call(re,Sn))},U=_.useMemo(()=>{var Sn,pn;let Ut=pt;return typeof Tt=="object"&&(Ut=(pn=(Sn=Tt.pointAtCenter)!==null&&Sn!==void 0?Sn:Tt.arrowPointAtCenter)!==null&&pn!==void 0?pn:pt),Le||(0,o.Z)({arrowPointAtCenter:Ut,autoAdjustOverflow:Pe,arrowWidth:Qe?tt.sizePopupArrow:0,borderRadius:tt.borderRadius,offset:tt.marginXXS,visibleFirst:!0})},[pt,Tt,Le,tt]),it=_.useMemo(()=>Ke===0?Ke:Et||Ke||"",[Et,Ke]),xe=_.createElement(m.Z,{space:!0},typeof it=="function"?it():it),Re=dt("tooltip",B),He=dt(),G=re["data-popover-inject"];let J=x;!("open"in re)&&!("visible"in re)&&se&&(J=!1);const ve=_.isValidElement(ze)&&!(0,Y.M2)(ze)?ze:_.createElement("span",null,ze),Ce=ve.props,X=!Ce.className||typeof Ce.className=="string"?be()(Ce.className,ue||`${Re}-open`):Ce.className,[ct,ge,wt]=le(Re,!G),Ft=Ue(Re,We),Kt=Ft.arrowStyle,on=be()(_e,{[`${Re}-rtl`]:St==="rtl"},Ft.className,de,ge,wt,gt,Xe.root,Fe==null?void 0:Fe.root),rn=be()(Xe.body,Fe==null?void 0:Fe.body),[Zt,ln]=(0,ce.Cn)("Tooltip",Ze.zIndex),er=_.createElement(pe.Z,Object.assign({},Ze,{zIndex:Zt,showArrow:Qe,placement:je,mouseEnterDelay:Ie,mouseLeaveDelay:we,prefixCls:Re,classNames:{root:on,body:rn},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kt),qe.root),_t),M),Me==null?void 0:Me.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},qe.body),Te),Me==null?void 0:Me.body),Ft.overlayStyle)},getTooltipContainer:he||Ne||ut,ref:ot,builtinPlacements:U,overlay:xe,visible:J,onVisibleChange:I,afterVisibleChange:Ye!=null?Ye:Je,arrowContent:_.createElement("span",{className:`${Re}-arrow-content`}),motion:{motionName:(0,ie.m)(He,"zoom-big-fast",re.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ve}),J?(0,Y.Tm)(ve,{className:X}):ve);return ct(_.createElement(w.Z.Provider,{value:ln},er))});Z._InternalPanelDoNotUseOrYouWillBeFired=rt;var ne=Z},64018:function(){var Gt,nt,b,_=!1,fe,be;window.PR_SHOULD_USE_CONTINUATION=!0;var pe,z;(function(){var m=window,ce=["break,continue,do,else,for,if,return,while"],ie=[ce,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[ie,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],Y=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],w=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],S="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",C=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],L="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",Q=[ce,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],q=[ce,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],H=[ce,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],T=[Y,w,N,C,L,Q,q,H],V=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,P="str",F="kwd",oe="com",ye="typ",le="lit",De="pun",Ue="pln",Be="tag",rt="dec",ae="src",$="atn",Z="atv",ne="nocode",re="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function W(Ae){for(var he=0,je=!1,Ie=!1,we=0,M=Ae.length;we<M;++we){var de=Ae[we];if(de.ignoreCase)Ie=!0;else if(/[a-z]/i.test(de.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){je=!0,Ie=!1;break}}var _e={b:8,t:9,n:10,v:11,f:12,r:13};function Me(ut){var dt=ut.charCodeAt(0);if(dt!==92)return dt;var St=ut.charAt(1);return dt=_e[St],dt||("0"<=St&&St<="7"?parseInt(ut.substring(1),8):St==="u"||St==="x"?parseInt(ut.substring(2),16):ut.charCodeAt(1))}function Fe(ut){if(ut<32)return(ut<16?"\\x0":"\\x")+ut.toString(16);var dt=String.fromCharCode(ut);return dt==="\\"||dt==="-"||dt==="]"||dt==="^"?"\\"+dt:dt}function Ze(ut){var dt=ut.substring(1,ut.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),St=[],gt=dt[0]==="^",_t=["["];gt&&_t.push("^");for(var Xe=gt?1:0,qe=dt.length;Xe<qe;++Xe){var st=dt[Xe];if(/\\[bdsw]/i.test(st))_t.push(st);else{var ot=Me(st),Ct;Xe+2<qe&&dt[Xe+1]==="-"?(Ct=Me(dt[Xe+2]),Xe+=2):Ct=ot,St.push([ot,Ct]),Ct<65||ot>122||(Ct<65||ot>90||St.push([Math.max(65,ot)|32,Math.min(Ct,90)|32]),Ct<97||ot>122||St.push([Math.max(97,ot)&-33,Math.min(Ct,122)&-33]))}}St.sort(function(I,U){return I[0]-U[0]||U[1]-I[1]});for(var x=[],D=[],Xe=0;Xe<St.length;++Xe){var se=St[Xe];se[0]<=D[1]+1?D[1]=Math.max(D[1],se[1]):x.push(D=se)}for(var Xe=0;Xe<x.length;++Xe){var se=x[Xe];_t.push(Fe(se[0])),se[1]>se[0]&&(se[1]+1>se[0]&&_t.push("-"),_t.push(Fe(se[1])))}return _t.push("]"),_t.join("")}function Qe(ut){for(var dt=ut.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),St=dt.length,gt=[],_t=0,Xe=0;_t<St;++_t){var qe=dt[_t];if(qe==="(")++Xe;else if(qe.charAt(0)==="\\"){var st=+qe.substring(1);st&&(st<=Xe?gt[st]=-1:dt[_t]=Fe(st))}}for(var _t=1;_t<gt.length;++_t)gt[_t]===-1&&(gt[_t]=++he);for(var _t=0,Xe=0;_t<St;++_t){var qe=dt[_t];if(qe==="(")++Xe,gt[Xe]||(dt[_t]="(?:");else if(qe.charAt(0)==="\\"){var st=+qe.substring(1);st&&st<=Xe&&(dt[_t]="\\"+gt[st])}}for(var _t=0;_t<St;++_t)dt[_t]==="^"&&dt[_t+1]!=="^"&&(dt[_t]="");if(ut.ignoreCase&&je)for(var _t=0;_t<St;++_t){var qe=dt[_t],ot=qe.charAt(0);qe.length>=2&&ot==="["?dt[_t]=Ze(qe):ot!=="\\"&&(dt[_t]=qe.replace(/[a-zA-Z]/g,function(D){var se=D.charCodeAt(0);return"["+String.fromCharCode(se&-33,se|32)+"]"}))}return dt.join("")}for(var tt=[],we=0,M=Ae.length;we<M;++we){var de=Ae[we];if(de.global||de.multiline)throw new Error(""+de);tt.push("(?:"+Qe(de)+")")}return new RegExp(tt.join("|"),Ie?"gi":"g")}function y(Ae,he){var je=/(?:^|\s)nocode(?:\s|$)/,Ie=[],we=0,M=[],de=0;function _e(Me){var Fe=Me.nodeType;if(Fe==1){if(je.test(Me.className))return;for(var Ze=Me.firstChild;Ze;Ze=Ze.nextSibling)_e(Ze);var Qe=Me.nodeName.toLowerCase();(Qe==="br"||Qe==="li")&&(Ie[de]=`
`,M[de<<1]=we++,M[de++<<1|1]=Me)}else if(Fe==3||Fe==4){var tt=Me.nodeValue;tt.length&&(he?tt=tt.replace(/\r\n?/g,`
`):tt=tt.replace(/[ \t\r\n]+/g," "),Ie[de]=tt,M[de<<1]=we,we+=tt.length,M[de++<<1|1]=Me)}}return _e(Ae),{sourceCode:Ie.join("").replace(/\n$/,""),spans:M}}function E(Ae,he,je,Ie,we){if(je){var M={sourceNode:Ae,pre:1,langExtension:null,numberLines:null,sourceCode:je,spans:null,basePos:he,decorations:null};Ie(M),we.push.apply(we,M.decorations)}}var B=/\S/;function ue(Ae){for(var he=void 0,je=Ae.firstChild;je;je=je.nextSibling){var Ie=je.nodeType;he=Ie===1?he?Ae:je:Ie===3&&B.test(je.nodeValue)?Ae:he}return he===Ae?void 0:he}function Ne(Ae,he){var je={},Ie;(function(){for(var de=Ae.concat(he),_e=[],Me={},Fe=0,Ze=de.length;Fe<Ze;++Fe){var Qe=de[Fe],tt=Qe[3];if(tt)for(var ut=tt.length;--ut>=0;)je[tt.charAt(ut)]=Qe;var dt=Qe[1],St=""+dt;Me.hasOwnProperty(St)||(_e.push(dt),Me[St]=null)}_e.push(/[\0-\uffff]/),Ie=W(_e)})();var we=he.length,M=function(de){for(var _e=de.sourceCode,Me=de.basePos,Fe=de.sourceNode,Ze=[Me,Ue],Qe=0,tt=_e.match(Ie)||[],ut={},dt=0,St=tt.length;dt<St;++dt){var gt=tt[dt],_t=ut[gt],Xe=void 0,qe;if(typeof _t=="string")qe=!1;else{var st=je[gt.charAt(0)];if(st)Xe=gt.match(st[1]),_t=st[0];else{for(var ot=0;ot<we;++ot)if(st=he[ot],Xe=gt.match(st[1]),Xe){_t=st[0];break}Xe||(_t=Ue)}qe=_t.length>=5&&_t.substring(0,5)==="lang-",qe&&!(Xe&&typeof Xe[1]=="string")&&(qe=!1,_t=ae),qe||(ut[gt]=_t)}var Ct=Qe;if(Qe+=gt.length,!qe)Ze.push(Me+Ct,_t);else{var x=Xe[1],D=gt.indexOf(x),se=D+x.length;Xe[2]&&(se=gt.length-Xe[2].length,D=se-x.length);var I=_t.substring(5);E(Fe,Me+Ct,gt.substring(0,D),M,Ze),E(Fe,Me+Ct+D,x,Tt(I,x),Ze),E(Fe,Me+Ct+se,gt.substring(se),M,Ze)}}de.decorations=Ze};return M}function We(Ae){var he=[],je=[];Ae.tripleQuotedStrings?he.push([P,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ae.multiLineStrings?he.push([P,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):he.push([P,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ae.verbatimStrings&&je.push([P,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ie=Ae.hashComments;Ie&&(Ae.cStyleComments?(Ie>1?he.push([oe,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):he.push([oe,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),je.push([P,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):he.push([oe,/^#[^\r\n]*/,null,"#"])),Ae.cStyleComments&&(je.push([oe,/^\/\/[^\r\n]*/,null]),je.push([oe,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var we=Ae.regexLiterals;if(we){var M=we>1?"":`
\r`,de=M?".":"[\\S\\s]",_e="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+de+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+de+")*(?:\\x5D|$))+/";je.push(["lang-regex",RegExp("^"+re+"("+_e+")")])}var Me=Ae.types;Me&&je.push([ye,Me]);var Fe=(""+Ae.keywords).replace(/^ | $/g,"");Fe.length&&je.push([F,new RegExp("^(?:"+Fe.replace(/[\s,]+/g,"|")+")\\b"),null]),he.push([Ue,/^\s+/,null,` \r
\xA0`]);var Ze="^.[^\\s\\w.$@'\"`/\\\\]*";return Ae.regexLiterals&&(Ze+="(?!s*/)"),je.push([le,/^@[a-z_$][a-z_$@0-9]*/i,null],[ye,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Ue,/^[a-z_$][a-z_$@0-9]*/i,null],[le,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Ue,/^\\[\s\S]?/,null],[De,new RegExp(Ze),null]),Ne(he,je)}var Te=We({keywords:T,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ze(Ae,he,je){for(var Ie=/(?:^|\s)nocode(?:\s|$)/,we=/\r\n?|\n/,M=Ae.ownerDocument,de=M.createElement("li");Ae.firstChild;)de.appendChild(Ae.firstChild);var _e=[de];function Me(dt){var St=dt.nodeType;if(St==1&&!Ie.test(dt.className))if(dt.nodeName==="br")Fe(dt),dt.parentNode&&dt.parentNode.removeChild(dt);else for(var gt=dt.firstChild;gt;gt=gt.nextSibling)Me(gt);else if((St==3||St==4)&&je){var _t=dt.nodeValue,Xe=_t.match(we);if(Xe){var qe=_t.substring(0,Xe.index);dt.nodeValue=qe;var st=_t.substring(Xe.index+Xe[0].length);if(st){var ot=dt.parentNode;ot.insertBefore(M.createTextNode(st),dt.nextSibling)}Fe(dt),qe||dt.parentNode.removeChild(dt)}}}function Fe(dt){for(;!dt.nextSibling;)if(dt=dt.parentNode,!dt)return;function St(Xe,qe){var st=qe?Xe.cloneNode(!1):Xe,ot=Xe.parentNode;if(ot){var Ct=St(ot,1),x=Xe.nextSibling;Ct.appendChild(st);for(var D=x;D;D=x)x=D.nextSibling,Ct.appendChild(D)}return st}for(var gt=St(dt.nextSibling,0),_t;(_t=gt.parentNode)&&_t.nodeType===1;)gt=_t;_e.push(gt)}for(var Ze=0;Ze<_e.length;++Ze)Me(_e[Ze]);he===(he|0)&&_e[0].setAttribute("value",he);var Qe=M.createElement("ol");Qe.className="linenums";for(var tt=Math.max(0,he-1|0)||0,Ze=0,ut=_e.length;Ze<ut;++Ze)de=_e[Ze],de.className="L"+(Ze+tt)%10,de.firstChild||de.appendChild(M.createTextNode("\xA0")),Qe.appendChild(de);Ae.appendChild(Qe)}function Ye(Ae){var he=/\bMSIE\s(\d+)/.exec(navigator.userAgent);he=he&&+he[1]<=8;var je=/\n/g,Ie=Ae.sourceCode,we=Ie.length,M=0,de=Ae.spans,_e=de.length,Me=0,Fe=Ae.decorations,Ze=Fe.length,Qe=0;Fe[Ze]=we;var tt,ut;for(ut=tt=0;ut<Ze;)Fe[ut]!==Fe[ut+2]?(Fe[tt++]=Fe[ut++],Fe[tt++]=Fe[ut++]):ut+=2;for(Ze=tt,ut=tt=0;ut<Ze;){for(var dt=Fe[ut],St=Fe[ut+1],gt=ut+2;gt+2<=Ze&&Fe[gt+1]===St;)gt+=2;Fe[tt++]=dt,Fe[tt++]=St,ut=gt}Ze=Fe.length=tt;var _t=Ae.sourceNode,Xe="";_t&&(Xe=_t.style.display,_t.style.display="none");try{for(var qe=null;Me<_e;){var st=de[Me],ot=de[Me+2]||we,Ct=Fe[Qe+2]||we,gt=Math.min(ot,Ct),x=de[Me+1],D;if(x.nodeType!==1&&(D=Ie.substring(M,gt))){he&&(D=D.replace(je,"\r")),x.nodeValue=D;var se=x.ownerDocument,I=se.createElement("span");I.className=Fe[Qe+1];var U=x.parentNode;U.replaceChild(I,x),I.appendChild(x),M<ot&&(de[Me+1]=x=se.createTextNode(Ie.substring(gt,ot)),U.insertBefore(x,I.nextSibling))}M=gt,M>=ot&&(Me+=2),M>=Ct&&(Qe+=2)}}finally{_t&&(_t.style.display=Xe)}}var Je={};function Ve(Ae,he){for(var je=he.length;--je>=0;){var Ie=he[je];Je.hasOwnProperty(Ie)?m.console&&console.warn("cannot override language handler %s",Ie):Je[Ie]=Ae}}function Tt(Ae,he){return Ae&&Je.hasOwnProperty(Ae)||(Ae=/^\s*</.test(he)?"default-markup":"default-code"),Je[Ae]}Ve(Te,["default-code"]),Ve(Ne([],[[Ue,/^[^<?]+/],[rt,/^<!\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"]),Ve(Ne([[Ue,/^[\s]+/,null,` \r
`],[Z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Be,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[$,/^(?!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"]),Ve(Ne([],[[Z,/^[\s\S]+/]]),["uq.val"]),Ve(We({keywords:Y,hashComments:!0,cStyleComments:!0,types:V}),["c","cc","cpp","cxx","cyc","m"]),Ve(We({keywords:"null,true,false"}),["json"]),Ve(We({keywords:w,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:V}),["cs"]),Ve(We({keywords:N,cStyleComments:!0}),["java"]),Ve(We({keywords:H,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Ve(We({keywords:Q,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Ve(We({keywords:L,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Ve(We({keywords:q,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Ve(We({keywords:C,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Ve(We({keywords:S,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Ve(Ne([],[[P,/^[\s\S]+/]]),["regex"]);function Ke(Ae){var he=Ae.langExtension;try{var je=y(Ae.sourceNode,Ae.pre),Ie=je.sourceCode;Ae.sourceCode=Ie,Ae.spans=je.spans,Ae.basePos=0,Tt(he,Ie)(Ae),Ye(Ae)}catch(we){m.console&&console.log(we&&we.stack||we)}}function Et(Ae,he,je){var Ie=je||!1,we=he||null,M=document.createElement("div");M.innerHTML="<pre>"+Ae+"</pre>",M=M.firstChild,Ie&&ze(M,Ie,!0);var de={langExtension:we,numberLines:Ie,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Ke(de),M.innerHTML}function Le(Ae,he){var je=he||document.body,Ie=je.ownerDocument||document;function we(st){return je.getElementsByTagName(st)}for(var M=[we("pre"),we("code"),we("xmp")],de=[],_e=0;_e<M.length;++_e)for(var Me=0,Fe=M[_e].length;Me<Fe;++Me)de.push(M[_e][Me]);M=null;var Ze=Date;Ze.now||(Ze={now:function(){return+new Date}});var Qe=0,tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,ut=/\bprettyprint\b/,dt=/\bprettyprinted\b/,St=/pre|xmp/i,gt=/^code$/i,_t=/^(?:pre|code|xmp)$/i,Xe={};function qe(){for(var st=m.PR_SHOULD_USE_CONTINUATION?Ze.now()+250:1/0;Qe<de.length&&Ze.now()<st;Qe++){for(var ot=de[Qe],Ct=Xe,x=ot;x=x.previousSibling;){var D=x.nodeType,se=(D===7||D===8)&&x.nodeValue;if(se?!/^\??prettify\b/.test(se):D!==3||/\S/.test(x.nodeValue))break;if(se){Ct={},se.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ge,wt,Ft){Ct[wt]=Ft});break}}var I=ot.className;if((Ct!==Xe||ut.test(I))&&!dt.test(I)){for(var U=!1,it=ot.parentNode;it;it=it.parentNode){var xe=it.tagName;if(_t.test(xe)&&it.className&&ut.test(it.className)){U=!0;break}}if(!U){ot.className+=" prettyprinted";var Re=Ct.lang;if(!Re){Re=I.match(tt);var He;!Re&&(He=ue(ot))&&gt.test(He.tagName)&&(Re=He.className.match(tt)),Re&&(Re=Re[1])}var G;if(St.test(ot.tagName))G=1;else{var J=ot.currentStyle,ve=Ie.defaultView,Ce=J?J.whiteSpace:ve&&ve.getComputedStyle?ve.getComputedStyle(ot,null).getPropertyValue("white-space"):0;G=Ce&&Ce.substring(0,3)==="pre"}var X=Ct.linenums;(X=X==="true"||+X)||(X=I.match(/\blinenums\b(?::(\d+))?/),X=X?X[1]&&X[1].length?+X[1]:!0:!1),X&&ze(ot,X,G);var ct={langExtension:Re,sourceNode:ot,numberLines:X,pre:G,sourceCode:null,basePos:null,spans:null,decorations:null};Ke(ct)}}}Qe<de.length?m.setTimeout(qe,250):typeof Ae=="function"&&Ae()}qe()}var pt=m.PR={createSimpleLexer:Ne,registerLangHandler:Ve,sourceDecorator:We,PR_ATTRIB_NAME:$,PR_ATTRIB_VALUE:Z,PR_COMMENT:oe,PR_DECLARATION:rt,PR_KEYWORD:F,PR_LITERAL:le,PR_NOCODE:ne,PR_PLAIN:Ue,PR_PUNCTUATION:De,PR_SOURCE:ae,PR_STRING:P,PR_TAG:Be,PR_TYPE:ye,prettyPrintOne:_?m.prettyPrintOne=Et:pe=Et,prettyPrint:z=_?m.prettyPrint=Le:z=Le},Pe=m.define;typeof Pe=="function"&&Pe.amd&&Pe("google-code-prettify",[],function(){return pt})})()},25769:function(Gt,nt,b){"use strict";var _=b(98040),fe={"text/plain":"Text","text/html":"Url",default:"Text"},be="Copy to clipboard: #{key}, Enter";function pe(m){var ce=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return m.replace(/#{\s*key\s*}/g,ce)}function z(m,ce){var ie,o,Y,N,w,S,C=!1;ce||(ce={}),ie=ce.debug||!1;try{Y=_(),N=document.createRange(),w=document.getSelection(),S=document.createElement("span"),S.textContent=m,S.ariaHidden="true",S.style.all="unset",S.style.position="fixed",S.style.top=0,S.style.clip="rect(0, 0, 0, 0)",S.style.whiteSpace="pre",S.style.webkitUserSelect="text",S.style.MozUserSelect="text",S.style.msUserSelect="text",S.style.userSelect="text",S.addEventListener("copy",function(Q){if(Q.stopPropagation(),ce.format)if(Q.preventDefault(),typeof Q.clipboardData=="undefined"){ie&&console.warn("unable to use e.clipboardData"),ie&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var q=fe[ce.format]||fe.default;window.clipboardData.setData(q,m)}else Q.clipboardData.clearData(),Q.clipboardData.setData(ce.format,m);ce.onCopy&&(Q.preventDefault(),ce.onCopy(Q.clipboardData))}),document.body.appendChild(S),N.selectNodeContents(S),w.addRange(N);var L=document.execCommand("copy");if(!L)throw new Error("copy command was unsuccessful");C=!0}catch(Q){ie&&console.error("unable to copy using execCommand: ",Q),ie&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ce.format||"text",m),ce.onCopy&&ce.onCopy(window.clipboardData),C=!0}catch(q){ie&&console.error("unable to copy using clipboardData: ",q),ie&&console.error("falling back to prompt"),o=pe("message"in ce?ce.message:be),window.prompt(o,m)}}finally{w&&(typeof w.removeRange=="function"?w.removeRange(N):w.removeAllRanges()),S&&document.body.removeChild(S),Y()}return C}Gt.exports=z},53184:function(Gt,nt,b){"use strict";var _,fe;function be(pe,z,m){var ce=function(ie,o){return pe.js_beautify(ie,o)};return ce.js=pe.js_beautify,ce.css=z.css_beautify,ce.html=m.html_beautify,ce.js_beautify=pe.js_beautify,ce.css_beautify=z.css_beautify,ce.html_beautify=m.html_beautify,ce}_=[b(58553),b(87804),b(40998)],fe=function(pe,z,m){return be(pe,z,m)}.apply(nt,_),fe!==void 0&&(Gt.exports=fe)},87804:function(Gt,nt){var b,_;(function(){var fe;(function(){"use strict";var pe=[,,function(ie){function o(w){this.__parent=w,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var w=new o(this.__parent);return w.set_indent(this.__indent_count,this.__alignment_count),w},o.prototype.item=function(w){return w<0?this.__items[this.__items.length+w]:this.__items[w]},o.prototype.has_match=function(w){for(var S=this.__items.length-1;S>=0;S--)if(this.__items[S].match(w))return!0;return!1},o.prototype.set_indent=function(w,S){this.is_empty()&&(this.__indent_count=w||0,this.__alignment_count=S||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var w=this.__parent.current_line;return w.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),w.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),w.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,w.__items[0]===" "&&(w.__items.splice(0,1),w.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(w){this.__items.push(w);var S=w.lastIndexOf(`
`);S!==-1?this.__character_count=w.length-S:this.__character_count+=w.length},o.prototype.pop=function(){var w=null;return this.is_empty()||(w=this.__items.pop(),this.__character_count-=w.length),w},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var w="";return this.is_empty()?this.__parent.indent_empty_lines&&(w=this.__parent.get_indent_string(this.__indent_count)):(w=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),w+=this.__items.join("")),w};function Y(w,S){this.__cache=[""],this.__indent_size=w.indent_size,this.__indent_string=w.indent_char,w.indent_with_tabs||(this.__indent_string=new Array(w.indent_size+1).join(w.indent_char)),S=S||"",w.indent_level>0&&(S=new Array(w.indent_level+1).join(this.__indent_string)),this.__base_string=S,this.__base_string_length=S.length}Y.prototype.get_indent_size=function(w,S){var C=this.__base_string_length;return S=S||0,w<0&&(C=0),C+=w*this.__indent_size,C+=S,C},Y.prototype.get_indent_string=function(w,S){var C=this.__base_string;return S=S||0,w<0&&(w=0,C=""),S+=w*this.__indent_size,this.__ensure_cache(S),C+=this.__cache[S],C},Y.prototype.__ensure_cache=function(w){for(;w>=this.__cache.length;)this.__add_column()},Y.prototype.__add_column=function(){var w=this.__cache.length,S=0,C="";this.__indent_size&&w>=this.__indent_size&&(S=Math.floor(w/this.__indent_size),w-=S*this.__indent_size,C=new Array(S+1).join(this.__indent_string)),w&&(C+=new Array(w+1).join(" ")),this.__cache.push(C)};function N(w,S){this.__indent_cache=new Y(w,S),this.raw=!1,this._end_with_newline=w.end_with_newline,this.indent_size=w.indent_size,this.wrap_line_length=w.wrap_line_length,this.indent_empty_lines=w.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(w,S){return this.__indent_cache.get_indent_string(w,S)},N.prototype.get_indent_size=function(w,S){return this.__indent_cache.get_indent_size(w,S)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(w){return this.is_empty()||!w&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(w){this.trim(!0);var S=this.current_line.pop();S&&(S[S.length-1]===`
`&&(S=S.replace(/\n+$/g,"")),this.current_line.push(S)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
`);return w!==`
`&&(C=C.replace(/[\n]/g,w)),C},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(w,S){return w=w||0,S=S||0,this.next_line.set_indent(w,S),this.__lines.length>1?(this.current_line.set_indent(w,S),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(w){for(var S=0;S<w.newlines;S++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(w.whitespace_before),this.current_line.push(w.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(w){this.__add_space_before_token(),this.current_line.push(w),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.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(" "))},N.prototype.remove_indent=function(w){for(var S=this.__lines.length;w<S;)this.__lines[w]._remove_indent(),w++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(w){for(w=w===void 0?!1:w,this.current_line.trim();w&&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},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(w,S){for(var C=this.__lines.length-2;C>=0;){var L=this.__lines[C];if(L.is_empty())break;if(L.item(0).indexOf(w)!==0&&L.item(-1)!==S){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},ie.exports.Output=N},,,,function(ie){function o(w,S){this.raw_options=Y(w,S),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(w,S){var C=this.raw_options[w],L=S||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(L=C.concat()):typeof C=="string"&&(L=C.split(/[^a-zA-Z0-9_\/\-]+/)),L},o.prototype._get_boolean=function(w,S){var C=this.raw_options[w],L=C===void 0?!!S:!!C;return L},o.prototype._get_characters=function(w,S){var C=this.raw_options[w],L=S||"";return typeof C=="string"&&(L=C.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),L},o.prototype._get_number=function(w,S){var C=this.raw_options[w];S=parseInt(S,10),isNaN(S)&&(S=0);var L=parseInt(C,10);return isNaN(L)&&(L=S),L},o.prototype._get_selection=function(w,S,C){var L=this._get_selection_list(w,S,C);if(L.length!==1)throw new Error("Invalid Option Value: The option '"+w+`' can only be one of the following values:
`+S+`
You passed in: '`+this.raw_options[w]+"'");return L[0]},o.prototype._get_selection_list=function(w,S,C){if(!S||S.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[S[0]],!this._is_valid_selection(C,S))throw new Error("Invalid Default Value!");var L=this._get_array(w,C);if(!this._is_valid_selection(L,S))throw new Error("Invalid Option Value: The option '"+w+`' can contain only the following values:
`+S+`
You passed in: '`+this.raw_options[w]+"'");return L},o.prototype._is_valid_selection=function(w,S){return w.length&&S.length&&!w.some(function(C){return S.indexOf(C)===-1})};function Y(w,S){var C={};w=N(w);var L;for(L in w)L!==S&&(C[L]=w[L]);if(S&&w[S])for(L in w[S])C[L]=w[S][L];return C}function N(w){var S={},C;for(C in w){var L=C.replace(/-/g,"_");S[L]=w[C]}return S}ie.exports.Options=o,ie.exports.normalizeOpts=N,ie.exports.mergeOpts=Y},,function(ie){var o=RegExp.prototype.hasOwnProperty("sticky");function Y(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}Y.prototype.restart=function(){this.__position=0},Y.prototype.back=function(){this.__position>0&&(this.__position-=1)},Y.prototype.hasNext=function(){return this.__position<this.__input_length},Y.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},Y.prototype.peek=function(N){var w=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(w=this.__input.charAt(N)),w},Y.prototype.__match=function(N,w){N.lastIndex=w;var S=N.exec(this.__input);return S&&!(o&&N.sticky)&&S.index!==w&&(S=null),S},Y.prototype.test=function(N,w){return w=w||0,w+=this.__position,w>=0&&w<this.__input_length?!!this.__match(N,w):!1},Y.prototype.testChar=function(N,w){var S=this.peek(w);return N.lastIndex=0,S!==null&&N.test(S)},Y.prototype.match=function(N){var w=this.__match(N,this.__position);return w?this.__position+=w[0].length:w=null,w},Y.prototype.read=function(N,w,S){var C="",L;return N&&(L=this.match(N),L&&(C+=L[0])),w&&(L||!N)&&(C+=this.readUntil(w,S)),C},Y.prototype.readUntil=function(N,w){var S="",C=this.__position;N.lastIndex=this.__position;var L=N.exec(this.__input);return L?(C=L.index,w&&(C+=L[0].length)):C=this.__input_length,S=this.__input.substring(this.__position,C),this.__position=C,S},Y.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},Y.prototype.get_regexp=function(N,w){var S=null,C="g";return w&&o&&(C="y"),typeof N=="string"&&N!==""?S=new RegExp(N,C):N&&(S=new RegExp(N.source,C)),S},Y.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},Y.prototype.peekUntilAfter=function(N){var w=this.__position,S=this.readUntilAfter(N);return this.__position=w,S},Y.prototype.lookBack=function(N){var w=this.__position-1;return w>=N.length&&this.__input.substring(w-N.length,w).toLowerCase()===N},ie.exports.InputScanner=Y},,,,,function(ie){function o(Y,N){Y=typeof Y=="string"?Y:Y.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(Y+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(Y+/\sbeautify\signore:end\s/.source+N,"g")}o.prototype.get_directives=function(Y){if(!Y.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var w=this.__directive_pattern.exec(Y);w;)N[w[1]]=w[2],w=this.__directive_pattern.exec(Y);return N},o.prototype.readIgnored=function(Y){return Y.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=o},,function(ie,o,Y){var N=Y(16).Beautifier,w=Y(17).Options;function S(C,L){var Q=new N(C,L);return Q.beautify()}ie.exports=S,ie.exports.defaultOptions=function(){return new w}},function(ie,o,Y){var N=Y(17).Options,w=Y(2).Output,S=Y(8).InputScanner,C=Y(13).Directives,L=new C(/\/\*/,/\*\//),Q=/\r\n|[\r\n]/,q=/\r\n|[\r\n]/g,H=/\s/,T=/(?:\s|\n)+/g,V=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,P=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function F(oe,ye){this._source_text=oe||"",this._options=new N(ye),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"]}F.prototype.eatString=function(oe){var ye="";for(this._ch=this._input.next();this._ch;){if(ye+=this._ch,this._ch==="\\")ye+=this._input.next();else if(oe.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return ye},F.prototype.eatWhitespace=function(oe){for(var ye=H.test(this._input.peek()),le=0;H.test(this._input.peek());)this._ch=this._input.next(),oe&&this._ch===`
`&&(le===0||le<this._options.max_preserve_newlines)&&(le++,this._output.add_new_line(!0));return ye},F.prototype.foundNestedPseudoClass=function(){for(var oe=0,ye=1,le=this._input.peek(ye);le;){if(le==="{")return!0;if(le==="(")oe+=1;else if(le===")"){if(oe===0)return!1;oe-=1}else if(le===";"||le==="}")return!1;ye++,le=this._input.peek(ye)}return!1},F.prototype.print_string=function(oe){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(oe)},F.prototype.preserveSingleSpace=function(oe){oe&&(this._output.space_before_token=!0)},F.prototype.indent=function(){this._indentLevel++},F.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},F.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var oe=this._source_text,ye=this._options.eol;ye==="auto"&&(ye=`
`,oe&&Q.test(oe||"")&&(ye=oe.match(Q)[0])),oe=oe.replace(q,`
`);var le=oe.match(/^[\t ]*/)[0];this._output=new w(this._options,le),this._input=new S(oe),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var De=0,Ue=!1,Be=!1,rt=!1,ae=!1,$=!1,Z=this._ch,ne=!1,re,W,y;re=this._input.read(T),W=re!=="",y=Z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),Z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var E=this._input.read(V),B=L.get_directives(E);B&&B.ignore==="start"&&(E+=L.readIgnored(this._input)),this.print_string(E),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(P)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(W),this.print_string(this._ch);var ue=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ue.match(/[ :]$/)&&(ue=this.eatString(": ").replace(/\s+$/,""),this.print_string(ue),this._output.space_before_token=!0),De===0&&ue.indexOf(":")!==-1&&(Be=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(W),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Ne=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ne.match(/[ :]$/)&&(Ne=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ne),this._output.space_before_token=!0),De===0&&Ne.indexOf(":")!==-1?(Be=!0,this.indent()):Ne in this.NESTED_AT_RULE?(this._nestedLevel+=1,Ne in this.CONDITIONAL_GROUP_RULE&&(rt=!0)):De===0&&!Be&&(ae=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(W),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Be&&(Be=!1,this.outdent()),ae=!1,rt?(rt=!1,Ue=this._indentLevel>=this._nestedLevel):Ue=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Ue&&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)):(y==="("?this._output.space_before_token=!1:y!==","&&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(),y==="{"&&this._output.trim(!0),Be&&(this.outdent(),Be=!1),this.print_string(this._ch),Ue=!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 We=0;We<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;We++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[We])){ne=!0;break}(Ue||rt)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ae&&De===0?(this.print_string(":"),Be||(Be=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Te=y==='"'||y==="'";this.preserveSingleSpace(Te||W),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")ne=!1,De===0?(Be&&(this.outdent(),Be=!1),ae=!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 ze=!1;this._input.lookBack("with")&&(ze=!0),this.preserveSingleSpace(W||ze),this.print_string(this._ch),Be&&y==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),$=!0):(this.eatWhitespace(),De++,this.indent())}else if(this._ch===")")De&&(De--,this.outdent()),$&&this._input.peek()===";"&&this._options.selector_separator_newline&&($=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!Be||$)&&De===0&&!ae?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Be&&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&&H.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(W),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),H.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Ye=y==='"'||y==="'";this.preserveSingleSpace(Ye||W),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&ne&&this._output.add_new_line()}var Je=this._output.get_code(ye);return Je},ie.exports.Beautifier=F},function(ie,o,Y){var N=Y(6).Options;function w(S){N.call(this,S,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var C=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||C;var L=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var Q=0;Q<L.length;Q++)L[Q]!=="expand"?this.brace_style="collapse":this.brace_style=L[Q]}w.prototype=new N,ie.exports.Options=w}],z={};function m(ie){var o=z[ie];if(o!==void 0)return o.exports;var Y=z[ie]={exports:{}};return pe[ie](Y,Y.exports,m),Y.exports}var ce=m(15);fe=ce})();var be=fe;b=[],_=function(){return{css_beautify:be}}.apply(nt,b),_!==void 0&&(Gt.exports=_)})()},40998:function(Gt,nt,b){var _,fe;(function(){var be;(function(){"use strict";var ce=[,,function(N){function w(L){this.__parent=L,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}w.prototype.clone_empty=function(){var L=new w(this.__parent);return L.set_indent(this.__indent_count,this.__alignment_count),L},w.prototype.item=function(L){return L<0?this.__items[this.__items.length+L]:this.__items[L]},w.prototype.has_match=function(L){for(var Q=this.__items.length-1;Q>=0;Q--)if(this.__items[Q].match(L))return!0;return!1},w.prototype.set_indent=function(L,Q){this.is_empty()&&(this.__indent_count=L||0,this.__alignment_count=Q||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},w.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)},w.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},w.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var L=this.__parent.current_line;return L.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),L.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),L.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,L.__items[0]===" "&&(L.__items.splice(0,1),L.__character_count-=1),!0}return!1},w.prototype.is_empty=function(){return this.__items.length===0},w.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},w.prototype.push=function(L){this.__items.push(L);var Q=L.lastIndexOf(`
`);Q!==-1?this.__character_count=L.length-Q:this.__character_count+=L.length},w.prototype.pop=function(){var L=null;return this.is_empty()||(L=this.__items.pop(),this.__character_count-=L.length),L},w.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},w.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},w.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},w.prototype.toString=function(){var L="";return this.is_empty()?this.__parent.indent_empty_lines&&(L=this.__parent.get_indent_string(this.__indent_count)):(L=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),L+=this.__items.join("")),L};function S(L,Q){this.__cache=[""],this.__indent_size=L.indent_size,this.__indent_string=L.indent_char,L.indent_with_tabs||(this.__indent_string=new Array(L.indent_size+1).join(L.indent_char)),Q=Q||"",L.indent_level>0&&(Q=new Array(L.indent_level+1).join(this.__indent_string)),this.__base_string=Q,this.__base_string_length=Q.length}S.prototype.get_indent_size=function(L,Q){var q=this.__base_string_length;return Q=Q||0,L<0&&(q=0),q+=L*this.__indent_size,q+=Q,q},S.prototype.get_indent_string=function(L,Q){var q=this.__base_string;return Q=Q||0,L<0&&(L=0,q=""),Q+=L*this.__indent_size,this.__ensure_cache(Q),q+=this.__cache[Q],q},S.prototype.__ensure_cache=function(L){for(;L>=this.__cache.length;)this.__add_column()},S.prototype.__add_column=function(){var L=this.__cache.length,Q=0,q="";this.__indent_size&&L>=this.__indent_size&&(Q=Math.floor(L/this.__indent_size),L-=Q*this.__indent_size,q=new Array(Q+1).join(this.__indent_string)),L&&(q+=new Array(L+1).join(" ")),this.__cache.push(q)};function C(L,Q){this.__indent_cache=new S(L,Q),this.raw=!1,this._end_with_newline=L.end_with_newline,this.indent_size=L.indent_size,this.wrap_line_length=L.wrap_line_length,this.indent_empty_lines=L.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new w(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}C.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},C.prototype.get_line_number=function(){return this.__lines.length},C.prototype.get_indent_string=function(L,Q){return this.__indent_cache.get_indent_string(L,Q)},C.prototype.get_indent_size=function(L,Q){return this.__indent_cache.get_indent_size(L,Q)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(L){return this.is_empty()||!L&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(L){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 q=this.__lines.join(`
`);return L!==`
`&&(q=q.replace(/[\n]/g,L)),q},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(L,Q){return L=L||0,Q=Q||0,this.next_line.set_indent(L,Q),this.__lines.length>1?(this.current_line.set_indent(L,Q),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(L){for(var Q=0;Q<L.newlines;Q++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(L.whitespace_before),this.current_line.push(L.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(L){this.__add_space_before_token(),this.current_line.push(L),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},C.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(" "))},C.prototype.remove_indent=function(L){for(var Q=this.__lines.length;L<Q;)this.__lines[L]._remove_indent(),L++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(L){for(L=L===void 0?!1:L,this.current_line.trim();L&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},C.prototype.just_added_newline=function(){return this.current_line.is_empty()},C.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},C.prototype.ensure_empty_line_above=function(L,Q){for(var q=this.__lines.length-2;q>=0;){var H=this.__lines[q];if(H.is_empty())break;if(H.item(0).indexOf(L)!==0&&H.item(-1)!==Q){this.__lines.splice(q+1,0,new w(this)),this.previous_line=this.__lines[this.__lines.length-2];break}q--}},N.exports.Output=C},function(N){function w(S,C,L,Q){this.type=S,this.text=C,this.comments_before=null,this.newlines=L||0,this.whitespace_before=Q||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}N.exports.Token=w},,,function(N){function w(L,Q){this.raw_options=S(L,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"])}w.prototype._get_array=function(L,Q){var q=this.raw_options[L],H=Q||[];return typeof q=="object"?q!==null&&typeof q.concat=="function"&&(H=q.concat()):typeof q=="string"&&(H=q.split(/[^a-zA-Z0-9_\/\-]+/)),H},w.prototype._get_boolean=function(L,Q){var q=this.raw_options[L],H=q===void 0?!!Q:!!q;return H},w.prototype._get_characters=function(L,Q){var q=this.raw_options[L],H=Q||"";return typeof q=="string"&&(H=q.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),H},w.prototype._get_number=function(L,Q){var q=this.raw_options[L];Q=parseInt(Q,10),isNaN(Q)&&(Q=0);var H=parseInt(q,10);return isNaN(H)&&(H=Q),H},w.prototype._get_selection=function(L,Q,q){var H=this._get_selection_list(L,Q,q);if(H.length!==1)throw new Error("Invalid Option Value: The option '"+L+`' can only be one of the following values:
`+Q+`
You passed in: '`+this.raw_options[L]+"'");return H[0]},w.prototype._get_selection_list=function(L,Q,q){if(!Q||Q.length===0)throw new Error("Selection list cannot be empty.");if(q=q||[Q[0]],!this._is_valid_selection(q,Q))throw new Error("Invalid Default Value!");var H=this._get_array(L,q);if(!this._is_valid_selection(H,Q))throw new Error("Invalid Option Value: The option '"+L+`' can contain only the following values:
`+Q+`
You passed in: '`+this.raw_options[L]+"'");return H},w.prototype._is_valid_selection=function(L,Q){return L.length&&Q.length&&!L.some(function(q){return Q.indexOf(q)===-1})};function S(L,Q){var q={};L=C(L);var H;for(H in L)H!==Q&&(q[H]=L[H]);if(Q&&L[Q])for(H in L[Q])q[H]=L[Q][H];return q}function C(L){var Q={},q;for(q in L){var H=q.replace(/-/g,"_");Q[H]=L[q]}return Q}N.exports.Options=w,N.exports.normalizeOpts=C,N.exports.mergeOpts=S},,function(N){var w=RegExp.prototype.hasOwnProperty("sticky");function S(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}S.prototype.restart=function(){this.__position=0},S.prototype.back=function(){this.__position>0&&(this.__position-=1)},S.prototype.hasNext=function(){return this.__position<this.__input_length},S.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},S.prototype.peek=function(C){var L=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(L=this.__input.charAt(C)),L},S.prototype.__match=function(C,L){C.lastIndex=L;var Q=C.exec(this.__input);return Q&&!(w&&C.sticky)&&Q.index!==L&&(Q=null),Q},S.prototype.test=function(C,L){return L=L||0,L+=this.__position,L>=0&&L<this.__input_length?!!this.__match(C,L):!1},S.prototype.testChar=function(C,L){var Q=this.peek(L);return C.lastIndex=0,Q!==null&&C.test(Q)},S.prototype.match=function(C){var L=this.__match(C,this.__position);return L?this.__position+=L[0].length:L=null,L},S.prototype.read=function(C,L,Q){var q="",H;return C&&(H=this.match(C),H&&(q+=H[0])),L&&(H||!C)&&(q+=this.readUntil(L,Q)),q},S.prototype.readUntil=function(C,L){var Q="",q=this.__position;C.lastIndex=this.__position;var H=C.exec(this.__input);return H?(q=H.index,L&&(q+=H[0].length)):q=this.__input_length,Q=this.__input.substring(this.__position,q),this.__position=q,Q},S.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},S.prototype.get_regexp=function(C,L){var Q=null,q="g";return L&&w&&(q="y"),typeof C=="string"&&C!==""?Q=new RegExp(C,q):C&&(Q=new RegExp(C.source,q)),Q},S.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},S.prototype.peekUntilAfter=function(C){var L=this.__position,Q=this.readUntilAfter(C);return this.__position=L,Q},S.prototype.lookBack=function(C){var L=this.__position-1;return L>=C.length&&this.__input.substring(L-C.length,L).toLowerCase()===C},N.exports.InputScanner=S},function(N,w,S){var C=S(8).InputScanner,L=S(3).Token,Q=S(10).TokenStream,q=S(11).WhitespacePattern,H={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},T=function(V,P){this._input=new C(V),this._options=P||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new q(this._input)};T.prototype.tokenize=function(){this._input.restart(),this.__tokens=new Q,this._reset();for(var V,P=new L(H.START,""),F=null,oe=[],ye=new Q;P.type!==H.EOF;){for(V=this._get_next_token(P,F);this._is_comment(V);)ye.add(V),V=this._get_next_token(P,F);ye.isEmpty()||(V.comments_before=ye,ye=new Q),V.parent=F,this._is_opening(V)?(oe.push(F),F=V):F&&this._is_closing(V,F)&&(V.opened=F,F.closed=V,F=oe.pop(),V.parent=F),V.previous=P,P.next=V,this.__tokens.add(V),P=V}return this.__tokens},T.prototype._is_first_token=function(){return this.__tokens.isEmpty()},T.prototype._reset=function(){},T.prototype._get_next_token=function(V,P){this._readWhitespace();var F=this._input.read(/.+/g);return F?this._create_token(H.RAW,F):this._create_token(H.EOF,"")},T.prototype._is_comment=function(V){return!1},T.prototype._is_opening=function(V){return!1},T.prototype._is_closing=function(V,P){return!1},T.prototype._create_token=function(V,P){var F=new L(V,P,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return F},T.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},N.exports.Tokenizer=T,N.exports.TOKEN=H},function(N){function w(S){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=S}w.prototype.restart=function(){this.__position=0},w.prototype.isEmpty=function(){return this.__tokens_length===0},w.prototype.hasNext=function(){return this.__position<this.__tokens_length},w.prototype.next=function(){var S=null;return this.hasNext()&&(S=this.__tokens[this.__position],this.__position+=1),S},w.prototype.peek=function(S){var C=null;return S=S||0,S+=this.__position,S>=0&&S<this.__tokens_length&&(C=this.__tokens[S]),C},w.prototype.add=function(S){this.__parent_token&&(S.parent=this.__parent_token),this.__tokens.push(S),this.__tokens_length+=1},N.exports.TokenStream=w},function(N,w,S){var C=S(12).Pattern;function L(Q,q){C.call(this,Q,q),q?this._line_regexp=this._input.get_regexp(q._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}L.prototype=new C,L.prototype.__set_whitespace_patterns=function(Q,q){Q+="\\t ",q+="\\n\\r",this._match_pattern=this._input.get_regexp("["+Q+q+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+q+"]")},L.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 q=this.__split(this._newline_regexp,Q);this.newline_count=q.length-1,this.whitespace_before_token=q[this.newline_count]}return Q},L.prototype.matching=function(Q,q){var H=this._create();return H.__set_whitespace_patterns(Q,q),H._update(),H},L.prototype._create=function(){return new L(this._input,this)},L.prototype.__split=function(Q,q){Q.lastIndex=0;for(var H=0,T=[],V=Q.exec(q);V;)T.push(q.substring(H,V.index)),H=V.index+V[0].length,V=Q.exec(q);return H<q.length?T.push(q.substring(H,q.length)):T.push(""),T},N.exports.WhitespacePattern=L},function(N){function w(S,C){this._input=S,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,C&&(this._starting_pattern=this._input.get_regexp(C._starting_pattern,!0),this._match_pattern=this._input.get_regexp(C._match_pattern,!0),this._until_pattern=this._input.get_regexp(C._until_pattern),this._until_after=C._until_after)}w.prototype.read=function(){var S=this._input.read(this._starting_pattern);return(!this._starting_pattern||S)&&(S+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),S},w.prototype.read_match=function(){return this._input.match(this._match_pattern)},w.prototype.until_after=function(S){var C=this._create();return C._until_after=!0,C._until_pattern=this._input.get_regexp(S),C._update(),C},w.prototype.until=function(S){var C=this._create();return C._until_after=!1,C._until_pattern=this._input.get_regexp(S),C._update(),C},w.prototype.starting_with=function(S){var C=this._create();return C._starting_pattern=this._input.get_regexp(S,!0),C._update(),C},w.prototype.matching=function(S){var C=this._create();return C._match_pattern=this._input.get_regexp(S,!0),C._update(),C},w.prototype._create=function(){return new w(this._input,this)},w.prototype._update=function(){},N.exports.Pattern=w},function(N){function w(S,C){S=typeof S=="string"?S:S.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(S+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(S+/\sbeautify\signore:end\s/.source+C,"g")}w.prototype.get_directives=function(S){if(!S.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var L=this.__directive_pattern.exec(S);L;)C[L[1]]=L[2],L=this.__directive_pattern.exec(S);return C},w.prototype.readIgnored=function(S){return S.readUntilAfter(this.__directives_end_ignore_pattern)},N.exports.Directives=w},function(N,w,S){var C=S(12).Pattern,L={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function Q(q,H){C.call(this,q,H),this.__template_pattern=null,this._disabled=Object.assign({},L),this._excluded=Object.assign({},L),H&&(this.__template_pattern=this._input.get_regexp(H.__template_pattern),this._excluded=Object.assign(this._excluded,H._excluded),this._disabled=Object.assign(this._disabled,H._disabled));var T=new C(q);this.__patterns={handlebars_comment:T.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:T.starting_with(/{{{/).until_after(/}}}/),handlebars:T.starting_with(/{{/).until_after(/}}/),php:T.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:T.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:T.starting_with(/{%/).until_after(/%}/),django_value:T.starting_with(/{{/).until_after(/}}/),django_comment:T.starting_with(/{#/).until_after(/#}/),smarty:T.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:T.starting_with(/{\*/).until_after(/\*}/),smarty_literal:T.starting_with(/{literal}/).until_after(/{\/literal}/)}}Q.prototype=new C,Q.prototype._create=function(){return new Q(this._input,this)},Q.prototype._update=function(){this.__set_templated_pattern()},Q.prototype.disable=function(q){var H=this._create();return H._disabled[q]=!0,H._update(),H},Q.prototype.read_options=function(q){var H=this._create();for(var T in L)H._disabled[T]=q.templating.indexOf(T)===-1;return H._update(),H},Q.prototype.exclude=function(q){var H=this._create();return H._excluded[q]=!0,H._update(),H},Q.prototype.read=function(){var q="";this._match_pattern?q=this._input.read(this._starting_pattern):q=this._input.read(this._starting_pattern,this.__template_pattern);for(var H=this._read_template();H;)this._match_pattern?H+=this._input.read(this._match_pattern):H+=this._input.readUntil(this.__template_pattern),q+=H,H=this._read_template();return this._until_after&&(q+=this._input.readUntilAfter(this._until_pattern)),q},Q.prototype.__set_templated_pattern=function(){var q=[];this._disabled.php||q.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||q.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||q.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||q.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(q.push(this.__patterns.django._starting_pattern.source),q.push(this.__patterns.django_value._starting_pattern.source),q.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||q.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&q.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+q.join("|")+")")},Q.prototype._read_template=function(){var q="",H=this._input.peek();if(H==="<"){var T=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&T==="?"&&(q=q||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&T==="%"&&(q=q||this.__patterns.erb.read())}else H==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(q=q||this.__patterns.handlebars_comment.read(),q=q||this.__patterns.handlebars_unescaped.read(),q=q||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(q=q||this.__patterns.django_value.read()),this._excluded.django||(q=q||this.__patterns.django_comment.read(),q=q||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(q=q||this.__patterns.smarty_comment.read(),q=q||this.__patterns.smarty_literal.read(),q=q||this.__patterns.smarty.read()));return q},N.exports.TemplatablePattern=Q},,,,function(N,w,S){var C=S(19).Beautifier,L=S(20).Options;function Q(q,H,T,V){var P=new C(q,H,T,V);return P.beautify()}N.exports=Q,N.exports.defaultOptions=function(){return new L}},function(N,w,S){var C=S(20).Options,L=S(2).Output,Q=S(21).Tokenizer,q=S(21).TOKEN,H=/\r\n|[\r\n]/,T=/\r\n|[\r\n]/g,V=function(ae,$){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=ae.max_preserve_newlines,this.preserve_newlines=ae.preserve_newlines,this._output=new L(ae,$)};V.prototype.current_line_has_match=function(ae){return this._output.current_line.has_match(ae)},V.prototype.set_space_before_token=function(ae,$){this._output.space_before_token=ae,this._output.non_breaking_space=$},V.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},V.prototype.add_raw_token=function(ae){this._output.add_raw_token(ae)},V.prototype.print_preserved_newlines=function(ae){var $=0;ae.type!==q.TEXT&&ae.previous.type!==q.TEXT&&($=ae.newlines?1:0),this.preserve_newlines&&($=ae.newlines<this.max_preserve_newlines+1?ae.newlines:this.max_preserve_newlines+1);for(var Z=0;Z<$;Z++)this.print_newline(Z>0);return $!==0},V.prototype.traverse_whitespace=function(ae){return ae.whitespace_before||ae.newlines?(this.print_preserved_newlines(ae)||(this._output.space_before_token=!0),!0):!1},V.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},V.prototype.print_newline=function(ae){this._output.add_new_line(ae)},V.prototype.print_token=function(ae){ae.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(ae.text))},V.prototype.indent=function(){this.indent_level++},V.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},V.prototype.get_full_indent=function(ae){return ae=this.indent_level+(ae||0),ae<1?"":this._output.get_indent_string(ae)};var P=function(ae){for(var $=null,Z=ae.next;Z.type!==q.EOF&&ae.closed!==Z;){if(Z.type===q.ATTRIBUTE&&Z.text==="type"){Z.next&&Z.next.type===q.EQUALS&&Z.next.next&&Z.next.next.type===q.VALUE&&($=Z.next.next.text);break}Z=Z.next}return $},F=function(ae,$){var Z=null,ne=null;return $.closed?(ae==="script"?Z="text/javascript":ae==="style"&&(Z="text/css"),Z=P($)||Z,Z.search("text/css")>-1?ne="css":Z.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?ne="javascript":Z.search(/(text|application|dojo)\/(x-)?(html)/)>-1?ne="html":Z.search(/test\/null/)>-1&&(ne="null"),ne):null};function oe(ae,$){return $.indexOf(ae)!==-1}function ye(ae,$,Z){this.parent=ae||null,this.tag=$?$.tag_name:"",this.indent_level=Z||0,this.parser_token=$||null}function le(ae){this._printer=ae,this._current_frame=null}le.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},le.prototype.record_tag=function(ae){var $=new ye(this._current_frame,ae,this._printer.indent_level);this._current_frame=$},le.prototype._try_pop_frame=function(ae){var $=null;return ae&&($=ae.parser_token,this._printer.indent_level=ae.indent_level,this._current_frame=ae.parent),$},le.prototype._get_frame=function(ae,$){for(var Z=this._current_frame;Z&&ae.indexOf(Z.tag)===-1;){if($&&$.indexOf(Z.tag)!==-1){Z=null;break}Z=Z.parent}return Z},le.prototype.try_pop=function(ae,$){var Z=this._get_frame([ae],$);return this._try_pop_frame(Z)},le.prototype.indent_to_tag=function(ae){var $=this._get_frame(ae);$&&(this._printer.indent_level=$.indent_level)};function De(ae,$,Z,ne){this._source_text=ae||"",$=$||{},this._js_beautify=Z,this._css_beautify=ne,this._tag_stack=null;var re=new C($,"html");this._options=re,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 ae=this._source_text,$=this._options.eol;this._options.eol==="auto"&&($=`
`,ae&&H.test(ae)&&($=ae.match(H)[0])),ae=ae.replace(T,`
`);var Z=ae.match(/^[\t ]*/)[0],ne={text:"",type:""},re=new Ue(this._options),W=new V(this._options,Z),y=new Q(ae,this._options).tokenize();this._tag_stack=new le(W);for(var E=null,B=y.next();B.type!==q.EOF;)B.type===q.TAG_OPEN||B.type===q.COMMENT?(E=this._handle_tag_open(W,B,re,ne,y),re=E):B.type===q.ATTRIBUTE||B.type===q.EQUALS||B.type===q.VALUE||B.type===q.TEXT&&!re.tag_complete?E=this._handle_inside_tag(W,B,re,ne):B.type===q.TAG_CLOSE?E=this._handle_tag_close(W,B,re):B.type===q.TEXT?E=this._handle_text(W,B,re):B.type===q.CONTROL_FLOW_OPEN?E=this._handle_control_flow_open(W,B):B.type===q.CONTROL_FLOW_CLOSE?E=this._handle_control_flow_close(W,B):W.add_raw_token(B),ne=E,B=y.next();var ue=W._output.get_code($);return ue},De.prototype._handle_control_flow_open=function(ae,$){var Z={text:$.text,type:$.type};return ae.set_space_before_token($.newlines||$.whitespace_before!=="",!0),$.newlines?ae.print_preserved_newlines($):ae.set_space_before_token($.newlines||$.whitespace_before!=="",!0),ae.print_token($),ae.indent(),Z},De.prototype._handle_control_flow_close=function(ae,$){var Z={text:$.text,type:$.type};return ae.deindent(),$.newlines?ae.print_preserved_newlines($):ae.set_space_before_token($.newlines||$.whitespace_before!=="",!0),ae.print_token($),Z},De.prototype._handle_tag_close=function(ae,$,Z){var ne={text:$.text,type:$.type};return ae.alignment_size=0,Z.tag_complete=!0,ae.set_space_before_token($.newlines||$.whitespace_before!=="",!0),Z.is_unformatted?ae.add_raw_token($):(Z.tag_start_char==="<"&&(ae.set_space_before_token($.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&Z.has_wrapped_attrs&&ae.print_newline(!1)),ae.print_token($)),Z.indent_content&&!(Z.is_unformatted||Z.is_content_unformatted)&&(ae.indent(),Z.indent_content=!1),!Z.is_inline_element&&!(Z.is_unformatted||Z.is_content_unformatted)&&ae.set_wrap_point(),ne},De.prototype._handle_inside_tag=function(ae,$,Z,ne){var re=Z.has_wrapped_attrs,W={text:$.text,type:$.type};return ae.set_space_before_token($.newlines||$.whitespace_before!=="",!0),Z.is_unformatted?ae.add_raw_token($):Z.tag_start_char==="{"&&$.type===q.TEXT?ae.print_preserved_newlines($)?($.newlines=0,ae.add_raw_token($)):ae.print_token($):($.type===q.ATTRIBUTE?ae.set_space_before_token(!0):($.type===q.EQUALS||$.type===q.VALUE&&$.previous.type===q.EQUALS)&&ae.set_space_before_token(!1),$.type===q.ATTRIBUTE&&Z.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(ae.traverse_whitespace($),re=re||$.newlines!==0),this._is_wrap_attributes_force&&Z.attr_count>=this._options.wrap_attributes_min_attrs&&(ne.type!==q.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(ae.print_newline(!1),re=!0)),ae.print_token($),re=re||ae.previous_token_wrapped(),Z.has_wrapped_attrs=re),W},De.prototype._handle_text=function(ae,$,Z){var ne={text:$.text,type:"TK_CONTENT"};return Z.custom_beautifier_name?this._print_custom_beatifier_text(ae,$,Z):Z.is_unformatted||Z.is_content_unformatted?ae.add_raw_token($):(ae.traverse_whitespace($),ae.print_token($)),ne},De.prototype._print_custom_beatifier_text=function(ae,$,Z){var ne=this;if($.text!==""){var re=$.text,W,y=1,E="",B="";Z.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?W=this._js_beautify:Z.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?W=this._css_beautify:Z.custom_beautifier_name==="html"&&(W=function(Ye,Je){var Ve=new De(Ye,Je,ne._js_beautify,ne._css_beautify);return Ve.beautify()}),this._options.indent_scripts==="keep"?y=0:this._options.indent_scripts==="separate"&&(y=-ae.indent_level);var ue=ae.get_full_indent(y);if(re=re.replace(/\n[ \t]*$/,""),Z.custom_beautifier_name!=="html"&&re[0]==="<"&&re.match(/^(<!--|<!\[CDATA\[)/)){var Ne=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(re);if(!Ne){ae.add_raw_token($);return}E=ue+Ne[1]+`
`,re=Ne[4],Ne[5]&&(B=ue+Ne[5]),re=re.replace(/\n[ \t]*$/,""),(Ne[2]||Ne[3].indexOf(`
`)!==-1)&&(Ne=Ne[3].match(/[ \t]+$/),Ne&&($.whitespace_before=Ne[0]))}if(re)if(W){var We=function(){this.eol=`
`};We.prototype=this._options.raw_options;var Te=new We;re=W(ue+re,Te)}else{var ze=$.whitespace_before;ze&&(re=re.replace(new RegExp(`
(`+ze+")?","g"),`
`)),re=ue+re.replace(/\n/g,`
`+ue)}E&&(re?re=E+re+`
`+B:re=E+B),ae.print_newline(!1),re&&($.text=re,$.whitespace_before="",$.newlines=0,ae.add_raw_token($),ae.print_newline(!0))}},De.prototype._handle_tag_open=function(ae,$,Z,ne,re){var W=this._get_tag_open_token($);if((Z.is_unformatted||Z.is_content_unformatted)&&!Z.is_empty_element&&$.type===q.TAG_OPEN&&!W.is_start_tag?(ae.add_raw_token($),W.start_tag_token=this._tag_stack.try_pop(W.tag_name)):(ae.traverse_whitespace($),this._set_tag_position(ae,$,W,Z,ne),W.is_inline_element||ae.set_wrap_point(),ae.print_token($)),W.is_start_tag&&this._is_wrap_attributes_force){var y=0,E;do E=re.peek(y),E.type===q.ATTRIBUTE&&(W.attr_count+=1),y+=1;while(E.type!==q.EOF&&E.type!==q.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(W.alignment_size=$.text.length+1),!W.tag_complete&&!W.is_unformatted&&(ae.alignment_size=W.alignment_size),W};var Ue=function(ae,$,Z){if(this.parent=$||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="",!Z)this.tag_complete=!0;else{var ne;this.tag_start_char=Z.text[0],this.text=Z.text,this.tag_start_char==="<"?(ne=Z.text.match(/^<([^\s>]*)/),this.tag_check=ne?ne[1]:""):(ne=Z.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=ne?ne[1]:"",(Z.text.startsWith("{{#>")||Z.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&Z.next!==null?this.tag_check=Z.next.text.split(" ")[0]:this.tag_check=Z.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),Z.type===q.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||Z.closed&&Z.closed.text==="/>";var re=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(re=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!ae.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(re)))}};De.prototype._get_tag_open_token=function(ae){var $=new Ue(this._options,this._tag_stack.get_parser_token(),ae);return $.alignment_size=this._options.wrap_attributes_indent_size,$.is_end_tag=$.is_end_tag||oe($.tag_check,this._options.void_elements),$.is_empty_element=$.tag_complete||$.is_start_tag&&$.is_end_tag,$.is_unformatted=!$.tag_complete&&oe($.tag_check,this._options.unformatted),$.is_content_unformatted=!$.is_empty_element&&oe($.tag_check,this._options.content_unformatted),$.is_inline_element=oe($.tag_name,this._options.inline)||this._options.inline_custom_elements&&$.tag_name.includes("-")||$.tag_start_char==="{",$},De.prototype._set_tag_position=function(ae,$,Z,ne,re){if(Z.is_empty_element||(Z.is_end_tag?Z.start_tag_token=this._tag_stack.try_pop(Z.tag_name):(this._do_optional_end_element(Z)&&(Z.is_inline_element||ae.print_newline(!1)),this._tag_stack.record_tag(Z),(Z.tag_name==="script"||Z.tag_name==="style")&&!(Z.is_unformatted||Z.is_content_unformatted)&&(Z.custom_beautifier_name=F(Z.tag_check,$)))),oe(Z.tag_check,this._options.extra_liners)&&(ae.print_newline(!1),ae._output.just_added_blankline()||ae.print_newline(!0)),Z.is_empty_element){if(Z.tag_start_char==="{"&&Z.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),Z.indent_content=!0;var W=ae.current_line_has_match(/{{#if/);W||ae.print_newline(!1)}Z.tag_name==="!--"&&re.type===q.TAG_CLOSE&&ne.is_end_tag&&Z.text.indexOf(`
`)===-1||(Z.is_inline_element||Z.is_unformatted||ae.print_newline(!1),this._calcluate_parent_multiline(ae,Z))}else if(Z.is_end_tag){var y=!1;y=Z.start_tag_token&&Z.start_tag_token.multiline_content,y=y||!Z.is_inline_element&&!(ne.is_inline_element||ne.is_unformatted)&&!(re.type===q.TAG_CLOSE&&Z.start_tag_token===ne)&&re.type!=="TK_CONTENT",(Z.is_content_unformatted||Z.is_unformatted)&&(y=!1),y&&ae.print_newline(!1)}else Z.indent_content=!Z.custom_beautifier_name,Z.tag_start_char==="<"&&(Z.tag_name==="html"?Z.indent_content=this._options.indent_inner_html:Z.tag_name==="head"?Z.indent_content=this._options.indent_head_inner_html:Z.tag_name==="body"&&(Z.indent_content=this._options.indent_body_inner_html)),!(Z.is_inline_element||Z.is_unformatted)&&(re.type!=="TK_CONTENT"||Z.is_content_unformatted)&&ae.print_newline(!1),this._calcluate_parent_multiline(ae,Z)},De.prototype._calcluate_parent_multiline=function(ae,$){$.parent&&ae._output.just_added_newline()&&!(($.is_inline_element||$.is_unformatted)&&$.parent.is_inline_element)&&($.parent.multiline_content=!0)};var Be=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],rt=["a","audio","del","ins","map","noscript","video"];De.prototype._do_optional_end_element=function(ae){var $=null;if(!(ae.is_empty_element||!ae.is_start_tag||!ae.parent)){if(ae.tag_name==="body")$=$||this._tag_stack.try_pop("head");else if(ae.tag_name==="li")$=$||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(ae.tag_name==="dd"||ae.tag_name==="dt")$=$||this._tag_stack.try_pop("dt",["dl"]),$=$||this._tag_stack.try_pop("dd",["dl"]);else if(ae.parent.tag_name==="p"&&Be.indexOf(ae.tag_name)!==-1){var Z=ae.parent.parent;(!Z||rt.indexOf(Z.tag_name)===-1)&&($=$||this._tag_stack.try_pop("p"))}else ae.tag_name==="rp"||ae.tag_name==="rt"?($=$||this._tag_stack.try_pop("rt",["ruby","rtc"]),$=$||this._tag_stack.try_pop("rp",["ruby","rtc"])):ae.tag_name==="optgroup"?$=$||this._tag_stack.try_pop("optgroup",["select"]):ae.tag_name==="option"?$=$||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):ae.tag_name==="colgroup"?$=$||this._tag_stack.try_pop("caption",["table"]):ae.tag_name==="thead"?($=$||this._tag_stack.try_pop("caption",["table"]),$=$||this._tag_stack.try_pop("colgroup",["table"])):ae.tag_name==="tbody"||ae.tag_name==="tfoot"?($=$||this._tag_stack.try_pop("caption",["table"]),$=$||this._tag_stack.try_pop("colgroup",["table"]),$=$||this._tag_stack.try_pop("thead",["table"]),$=$||this._tag_stack.try_pop("tbody",["table"])):ae.tag_name==="tr"?($=$||this._tag_stack.try_pop("caption",["table"]),$=$||this._tag_stack.try_pop("colgroup",["table"]),$=$||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(ae.tag_name==="th"||ae.tag_name==="td")&&($=$||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),$=$||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return ae.parent=this._tag_stack.get_parser_token(),$}},N.exports.Beautifier=De},function(N,w,S){var C=S(6).Options;function L(Q){C.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"])}L.prototype=new C,N.exports.Options=L},function(N,w,S){var C=S(9).Tokenizer,L=S(9).TOKEN,Q=S(13).Directives,q=S(14).TemplatablePattern,H=S(12).Pattern,T={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:L.START,RAW:L.RAW,EOF:L.EOF},V=new Q(/<\!--/,/-->/),P=function(F,oe){C.call(this,F,oe),this._current_tag_name="";var ye=new q(this._input).read_options(this._options),le=new H(this._input);if(this.__patterns={word:ye.until(/[\n\r\t <]/),word_control_flow_close_excluded:ye.until(/[\n\r\t <}]/),single_quote:ye.until_after(/'/),double_quote:ye.until_after(/"/),attribute:ye.until(/[\n\r\t =>]|\/>/),element_name:ye.until(/[\n\r\t >\/]/),angular_control_flow_start:le.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:le.starting_with(/{{!--/).until_after(/--}}/),handlebars:le.starting_with(/{{/).until_after(/}}/),handlebars_open:le.until(/[\n\r\t }]/),handlebars_raw_close:le.until(/}}/),comment:le.starting_with(/<!--/).until_after(/-->/),cdata:le.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:le.starting_with(/<!\[/).until_after(/]>/),processing:le.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=le.matching(De).until_after(De)}};P.prototype=new C,P.prototype._is_comment=function(F){return!1},P.prototype._is_opening=function(F){return F.type===T.TAG_OPEN||F.type===T.CONTROL_FLOW_OPEN},P.prototype._is_closing=function(F,oe){return F.type===T.TAG_CLOSE&&oe&&((F.text===">"||F.text==="/>")&&oe.text[0]==="<"||F.text==="}}"&&oe.text[0]==="{"&&oe.text[1]==="{")||F.type===T.CONTROL_FLOW_CLOSE&&F.text==="}"&&oe.text.endsWith("{")},P.prototype._reset=function(){this._current_tag_name=""},P.prototype._get_next_token=function(F,oe){var ye=null;this._readWhitespace();var le=this._input.peek();return le===null?this._create_token(T.EOF,""):(ye=ye||this._read_open_handlebars(le,oe),ye=ye||this._read_attribute(le,F,oe),ye=ye||this._read_close(le,oe),ye=ye||this._read_script_and_style(le,F),ye=ye||this._read_control_flows(le,oe),ye=ye||this._read_raw_content(le,F,oe),ye=ye||this._read_content_word(le,oe),ye=ye||this._read_comment_or_cdata(le),ye=ye||this._read_processing(le),ye=ye||this._read_open(le,oe),ye=ye||this._create_token(T.UNKNOWN,this._input.next()),ye)},P.prototype._read_comment_or_cdata=function(F){var oe=null,ye=null,le=null;if(F==="<"){var De=this._input.peek(1);De==="!"&&(ye=this.__patterns.comment.read(),ye?(le=V.get_directives(ye),le&&le.ignore==="start"&&(ye+=V.readIgnored(this._input))):ye=this.__patterns.cdata.read()),ye&&(oe=this._create_token(T.COMMENT,ye),oe.directives=le)}return oe},P.prototype._read_processing=function(F){var oe=null,ye=null,le=null;if(F==="<"){var De=this._input.peek(1);(De==="!"||De==="?")&&(ye=this.__patterns.conditional_comment.read(),ye=ye||this.__patterns.processing.read()),ye&&(oe=this._create_token(T.COMMENT,ye),oe.directives=le)}return oe},P.prototype._read_open=function(F,oe){var ye=null,le=null;return(!oe||oe.type===T.CONTROL_FLOW_OPEN)&&F==="<"&&(ye=this._input.next(),this._input.peek()==="/"&&(ye+=this._input.next()),ye+=this.__patterns.element_name.read(),le=this._create_token(T.TAG_OPEN,ye)),le},P.prototype._read_open_handlebars=function(F,oe){var ye=null,le=null;return(!oe||oe.type===T.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&F==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ye=this.__patterns.handlebars_comment.read(),ye=ye||this.__patterns.handlebars.read(),le=this._create_token(T.COMMENT,ye)):(ye=this.__patterns.handlebars_open.read(),le=this._create_token(T.TAG_OPEN,ye))),le},P.prototype._read_control_flows=function(F,oe){var ye="",le=null;if(!this._options.templating.includes("angular"))return le;if(F==="@"){if(ye=this.__patterns.angular_control_flow_start.read(),ye==="")return le;for(var De=ye.endsWith("(")?1:0,Ue=0;!(ye.endsWith("{")&&De===Ue);){var Be=this._input.next();if(Be===null)break;Be==="("?De++:Be===")"&&Ue++,ye+=Be}le=this._create_token(T.CONTROL_FLOW_OPEN,ye)}else F==="}"&&oe&&oe.type===T.CONTROL_FLOW_OPEN&&(ye=this._input.next(),le=this._create_token(T.CONTROL_FLOW_CLOSE,ye));return le},P.prototype._read_close=function(F,oe){var ye=null,le=null;return oe&&oe.type===T.TAG_OPEN&&(oe.text[0]==="<"&&(F===">"||F==="/"&&this._input.peek(1)===">")?(ye=this._input.next(),F==="/"&&(ye+=this._input.next()),le=this._create_token(T.TAG_CLOSE,ye)):oe.text[0]==="{"&&F==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),le=this._create_token(T.TAG_CLOSE,"}}"))),le},P.prototype._read_attribute=function(F,oe,ye){var le=null,De="";if(ye&&ye.text[0]==="<")if(F==="=")le=this._create_token(T.EQUALS,this._input.next());else if(F==='"'||F==="'"){var Ue=this._input.next();F==='"'?Ue+=this.__patterns.double_quote.read():Ue+=this.__patterns.single_quote.read(),le=this._create_token(T.VALUE,Ue)}else De=this.__patterns.attribute.read(),De&&(oe.type===T.EQUALS?le=this._create_token(T.VALUE,De):le=this._create_token(T.ATTRIBUTE,De));return le},P.prototype._is_content_unformatted=function(F){return this._options.void_elements.indexOf(F)===-1&&(this._options.content_unformatted.indexOf(F)!==-1||this._options.unformatted.indexOf(F)!==-1)},P.prototype._read_raw_content=function(F,oe,ye){var le="";if(ye&&ye.text[0]==="{")le=this.__patterns.handlebars_raw_close.read();else if(oe.type===T.TAG_CLOSE&&oe.opened.text[0]==="<"&&oe.text[0]!=="/"){var De=oe.opened.text.substr(1).toLowerCase();this._is_content_unformatted(De)&&(le=this._input.readUntil(new RegExp("</"+De+"[\\n\\r\\t ]*?>","ig")))}return le?this._create_token(T.TEXT,le):null},P.prototype._read_script_and_style=function(F,oe){if(oe.type===T.TAG_CLOSE&&oe.opened.text[0]==="<"&&oe.text[0]!=="/"){var ye=oe.opened.text.substr(1).toLowerCase();if(ye==="script"||ye==="style"){var le=this._read_comment_or_cdata(F);if(le)return le.type=T.TEXT,le;var De=this._input.readUntil(new RegExp("</"+ye+"[\\n\\r\\t ]*?>","ig"));if(De)return this._create_token(T.TEXT,De)}}return null},P.prototype._read_content_word=function(F,oe){var ye="";return this._options.unformatted_content_delimiter&&F===this._options.unformatted_content_delimiter[0]&&(ye=this.__patterns.unformatted_content_delimiter.read()),ye||(ye=oe&&oe.type===T.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ye?this._create_token(T.TEXT,ye):null},N.exports.Tokenizer=P,N.exports.TOKEN=T}],ie={};function o(N){var w=ie[N];if(w!==void 0)return w.exports;var S=ie[N]={exports:{}};return ce[N](S,S.exports,o),S.exports}var Y=o(18);be=Y})();var pe=be;if(1)_=[b,b(58553),b(87804)],fe=function(ce){var ie=b(58553),o=b(87804);return{html_beautify:function(Y,N){return pe(Y,N,ie.js_beautify,o.css_beautify)}}}.apply(nt,_),fe!==void 0&&(Gt.exports=fe);else var z,m})()},58553:function(Gt,nt){var b,_;(function(){var fe;(function(){"use strict";var pe=[function(ie,o,Y){var N=Y(1).Beautifier,w=Y(5).Options;function S(C,L){var Q=new N(C,L);return Q.beautify()}ie.exports=S,ie.exports.defaultOptions=function(){return new w}},function(ie,o,Y){var N=Y(2).Output,w=Y(3).Token,S=Y(4),C=Y(5).Options,L=Y(7).Tokenizer,Q=Y(7).line_starters,q=Y(7).positionable_operators,H=Y(7).TOKEN;function T(E,B){return B.indexOf(E)!==-1}function V(E){return E.replace(/^\s+/g,"")}function P(E){for(var B={},ue=0;ue<E.length;ue++)B[E[ue].replace(/-/g,"_")]=E[ue];return B}function F(E,B){return E&&E.type===H.RESERVED&&E.text===B}function oe(E,B){return E&&E.type===H.RESERVED&&T(E.text,B)}var ye=["case","return","do","if","throw","else","await","break","continue","async"],le=["before-newline","after-newline","preserve-newline"],De=P(le),Ue=[De.before_newline,De.preserve_newline],Be={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function rt(E,B){B.multiline_frame||B.mode===Be.ForInitializer||B.mode===Be.Conditional||E.remove_indent(B.start_line_index)}function ae(E){E=E.replace(S.allLineBreaks,`
`);for(var B=[],ue=E.indexOf(`
`);ue!==-1;)B.push(E.substring(0,ue)),E=E.substring(ue+1),ue=E.indexOf(`
`);return E.length&&B.push(E),B}function $(E){return E===Be.ArrayLiteral}function Z(E){return T(E,[Be.Expression,Be.ForInitializer,Be.Conditional])}function ne(E,B){for(var ue=0;ue<E.length;ue++){var Ne=E[ue].trim();if(Ne.charAt(0)!==B)return!1}return!0}function re(E,B){for(var ue=0,Ne=E.length,We;ue<Ne;ue++)if(We=E[ue],We&&We.indexOf(B)!==0)return!1;return!0}function W(E,B){B=B||{},this._source_text=E||"",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 C(B)}W.prototype.create_flags=function(E,B){var ue=0;E&&(ue=E.indentation_level,!this._output.just_added_newline()&&E.line_indent_level>ue&&(ue=E.line_indent_level));var Ne={mode:B,parent:E,last_token:E?E.last_token:new w(H.START_BLOCK,""),last_word:E?E.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ue,alignment:0,line_indent_level:E?E.line_indent_level:ue,start_line_index:this._output.get_line_number(),ternary_depth:0};return Ne},W.prototype._reset=function(E){var B=E.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new N(this._options,B),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Be.BlockStatement);var ue=new L(E,this._options);return this._tokens=ue.tokenize(),E},W.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E,B=this._reset(this._source_text),ue=this._options.eol;this._options.eol==="auto"&&(ue=`
`,B&&S.lineBreak.test(B||"")&&(ue=B.match(S.lineBreak)[0]));for(var Ne=this._tokens.next();Ne;)this.handle_token(Ne),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Ne,Ne=this._tokens.next();return E=this._output.get_code(ue),E},W.prototype.handle_token=function(E,B){E.type===H.START_EXPR?this.handle_start_expr(E):E.type===H.END_EXPR?this.handle_end_expr(E):E.type===H.START_BLOCK?this.handle_start_block(E):E.type===H.END_BLOCK?this.handle_end_block(E):E.type===H.WORD?this.handle_word(E):E.type===H.RESERVED?this.handle_word(E):E.type===H.SEMICOLON?this.handle_semicolon(E):E.type===H.STRING?this.handle_string(E):E.type===H.EQUALS?this.handle_equals(E):E.type===H.OPERATOR?this.handle_operator(E):E.type===H.COMMA?this.handle_comma(E):E.type===H.BLOCK_COMMENT?this.handle_block_comment(E,B):E.type===H.COMMENT?this.handle_comment(E,B):E.type===H.DOT?this.handle_dot(E):E.type===H.EOF?this.handle_eof(E):E.type===H.UNKNOWN?this.handle_unknown(E,B):this.handle_unknown(E,B)},W.prototype.handle_whitespace_and_comments=function(E,B){var ue=E.newlines,Ne=this._options.keep_array_indentation&&$(this._flags.mode);if(E.comments_before)for(var We=E.comments_before.next();We;)this.handle_whitespace_and_comments(We,B),this.handle_token(We,B),We=E.comments_before.next();if(Ne)for(var Te=0;Te<ue;Te+=1)this.print_newline(Te>0,B);else if(this._options.max_preserve_newlines&&ue>this._options.max_preserve_newlines&&(ue=this._options.max_preserve_newlines),this._options.preserve_newlines&&ue>1){this.print_newline(!1,B);for(var ze=1;ze<ue;ze+=1)this.print_newline(!0,B)}};var y=["async","break","continue","return","throw","yield"];W.prototype.allow_wrap_or_preserved_newline=function(E,B){if(B=B===void 0?!1:B,!this._output.just_added_newline()){var ue=this._options.preserve_newlines&&E.newlines||B,Ne=T(this._flags.last_token.text,q)||T(E.text,q);if(Ne){var We=T(this._flags.last_token.text,q)&&T(this._options.operator_position,Ue)||T(E.text,q);ue=ue&&We}if(ue)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(oe(this._flags.last_token,y))return;this._output.set_wrap_point()}}},W.prototype.print_newline=function(E,B){if(!B&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ue=this._tokens.peek();this._flags.mode===Be.Statement&&!(this._flags.if_block&&F(ue,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(E)&&(this._flags.multiline_frame=!0)},W.prototype.print_token_line_indentation=function(E){this._output.just_added_newline()&&(this._options.keep_array_indentation&&E.newlines&&(E.text==="["||$(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(E.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))},W.prototype.print_token=function(E){if(this._output.raw){this._output.add_raw_token(E);return}if(this._options.comma_first&&E.previous&&E.previous.type===H.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var B=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(B),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(E),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(E),this._output.non_breaking_space=!0,this._output.add_token(E.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},W.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},W.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))},W.prototype.set_mode=function(E){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,E),this._flags=this.create_flags(this._previous_flags,E),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},W.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Be.Statement&&rt(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},W.prototype.start_of_object_property=function(){return this._flags.parent.mode===Be.ObjectLiteral&&this._flags.mode===Be.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oe(this._flags.last_token,["get","set"]))},W.prototype.start_of_statement=function(E){var B=!1;return B=B||oe(this._flags.last_token,["var","let","const"])&&E.type===H.WORD,B=B||F(this._flags.last_token,"do"),B=B||!(this._flags.parent.mode===Be.ObjectLiteral&&this._flags.mode===Be.Statement)&&oe(this._flags.last_token,y)&&!E.newlines,B=B||F(this._flags.last_token,"else")&&!(F(E,"if")&&!E.comments_before),B=B||this._flags.last_token.type===H.END_EXPR&&(this._previous_flags.mode===Be.ForInitializer||this._previous_flags.mode===Be.Conditional),B=B||this._flags.last_token.type===H.WORD&&this._flags.mode===Be.BlockStatement&&!this._flags.in_case&&!(E.text==="--"||E.text==="++")&&this._last_last_text!=="function"&&E.type!==H.WORD&&E.type!==H.RESERVED,B=B||this._flags.mode===Be.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||oe(this._flags.last_token,["get","set"])),B?(this.set_mode(Be.Statement),this.indent(),this.handle_whitespace_and_comments(E,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E,oe(E,["do","for","if","while"])),!0):!1},W.prototype.handle_start_expr=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E);var B=Be.Expression;if(E.text==="["){if(this._flags.last_token.type===H.WORD||this._flags.last_token.text===")"){oe(this._flags.last_token,Q)&&(this._output.space_before_token=!0),this.print_token(E),this.set_mode(B),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}B=Be.ArrayLiteral,$(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()),T(this._flags.last_token.type,[H.START_EXPR,H.END_EXPR,H.WORD,H.OPERATOR,H.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===H.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,B=Be.ForInitializer):T(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,B=Be.Conditional):T(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&E.whitespace_before===""?this._output.space_before_token=!1:(T(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===H.EQUALS||this._flags.last_token.type===H.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E);else if(this._flags.last_token.type===H.WORD){this._output.space_before_token=!1;var ue=this._tokens.peek(-3);if(this._options.space_after_named_function&&ue){var Ne=this._tokens.peek(-4);oe(ue,["async","function"])||ue.text==="*"&&oe(Ne,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Be.ObjectLiteral?(ue.text==="{"||ue.text===","||ue.text==="*"&&(Ne.text==="{"||Ne.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(E);(this._flags.last_token.type===H.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(T(this._last_last_text,["function","yield"])||this._flags.mode===Be.ObjectLiteral&&T(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===H.START_BLOCK?this.print_newline():(this._flags.last_token.type===H.END_EXPR||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===H.COMMA)&&this.allow_wrap_or_preserved_newline(E,E.newlines),this.print_token(E),this.set_mode(B),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},W.prototype.handle_end_expr=function(E){for(;this._flags.mode===Be.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(E,E.text==="]"&&$(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===H.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(E),this.restore_mode(),rt(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Be.Conditional&&(this._previous_flags.mode=Be.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},W.prototype.handle_start_block=function(E){this.handle_whitespace_and_comments(E);var B=this._tokens.peek(),ue=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===H.END_EXPR?(this.set_mode(Be.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Be.BlockStatement):ue&&(T(ue.text,[":",","])&&T(B.type,[H.STRING,H.WORD,H.RESERVED])||T(B.text,["get","set","..."])&&T(ue.type,[H.WORD,H.RESERVED]))?T(this._last_last_text,["class","interface"])&&!T(ue.text,[":",","])?this.set_mode(Be.BlockStatement):this.set_mode(Be.ObjectLiteral):this._flags.last_token.type===H.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Be.BlockStatement):T(this._flags.last_token.type,[H.EQUALS,H.START_EXPR,H.COMMA,H.OPERATOR])||oe(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Be.ObjectLiteral):this.set_mode(Be.BlockStatement),this._flags.last_token&&oe(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Ne=!B.comments_before&&B.text==="}",We=Ne&&this._flags.last_word==="function"&&this._flags.last_token.type===H.END_EXPR;if(this._options.brace_preserve_inline){var Te=0,ze=null;this._flags.inline_frame=!0;do if(Te+=1,ze=this._tokens.peek(Te-1),ze.newlines){this._flags.inline_frame=!1;break}while(ze.type!==H.EOF&&!(ze.type===H.END_BLOCK&&ze.opened===E))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==H.OPERATOR&&(We||this._flags.last_token.type===H.EQUALS||oe(this._flags.last_token,ye)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):($(this._previous_flags.mode)&&(this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.COMMA)&&((this._flags.last_token.type===H.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(E),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==H.OPERATOR&&this._flags.last_token.type!==H.START_EXPR&&(T(this._flags.last_token.type,[H.START_BLOCK,H.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(E),this.indent(),!Ne&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},W.prototype.handle_end_block=function(E){for(this.handle_whitespace_and_comments(E);this._flags.mode===Be.Statement;)this.restore_mode();var B=this._flags.last_token.type===H.START_BLOCK;this._flags.inline_frame&&!B?this._output.space_before_token=!0:this._options.brace_style==="expand"?B||this.print_newline():B||($(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(E)},W.prototype.handle_word=function(E){if(E.type===H.RESERVED){if(T(E.text,["set","get"])&&this._flags.mode!==Be.ObjectLiteral)E.type=H.WORD;else if(E.text==="import"&&T(this._tokens.peek().text,["(","."]))E.type=H.WORD;else if(T(E.text,["as","from"])&&!this._flags.import_block)E.type=H.WORD;else if(this._flags.mode===Be.ObjectLiteral){var B=this._tokens.peek();B.text===":"&&(E.type=H.WORD)}}if(this.start_of_statement(E)?oe(this._flags.last_token,["var","let","const"])&&E.type===H.WORD&&(this._flags.declaration_statement=!0):E.newlines&&!Z(this._flags.mode)&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==H.EQUALS&&(this._options.preserve_newlines||!oe(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(E),this.print_newline()):this.handle_whitespace_and_comments(E),this._flags.do_block&&!this._flags.do_while)if(F(E,"while")){this._output.space_before_token=!0,this.print_token(E),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&&F(E,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Be.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&oe(E,["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(E),this._flags.in_case=!0;return}if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR)&&!this.start_of_object_property()&&!(T(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Be.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(E),F(E,"function")){(T(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(T(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===H.OPERATOR))&&!this._output.just_added_blankline()&&!E.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD?oe(this._flags.last_token,["get","set","new","export"])||oe(this._flags.last_token,y)?this._output.space_before_token=!0:F(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===H.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Z(this._flags.mode)||$(this._flags.mode))||this.print_newline(),this.print_token(E),this._flags.last_word=E.text;return}var ue="NONE";if(this._flags.last_token.type===H.END_BLOCK?this._previous_flags.inline_frame?ue="SPACE":oe(E,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines?ue="NEWLINE":(ue="SPACE",this._output.space_before_token=!0):ue="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&this._flags.mode===Be.BlockStatement?ue="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&Z(this._flags.mode)?ue="SPACE":this._flags.last_token.type===H.STRING?ue="NEWLINE":this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.last_token.text==="*"&&(T(this._last_last_text,["function","yield"])||this._flags.mode===Be.ObjectLiteral&&T(this._last_last_text,["{",","]))?ue="SPACE":this._flags.last_token.type===H.START_BLOCK?this._flags.inline_frame?ue="SPACE":ue="NEWLINE":this._flags.last_token.type===H.END_EXPR&&(this._output.space_before_token=!0,ue="NEWLINE"),oe(E,Q)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ue="SPACE":ue="NEWLINE"),oe(E,["else","catch","finally"]))if((!(this._flags.last_token.type===H.END_BLOCK&&this._previous_flags.mode===Be.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&E.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Ne=this._output.current_line;Ne.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ue==="NEWLINE"?oe(this._flags.last_token,ye)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&oe(E,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==H.END_EXPR?(this._flags.last_token.type!==H.START_EXPR||!oe(E,["var","let","const"]))&&this._flags.last_token.text!==":"&&(F(E,"if")&&F(E.previous,"else")?this._output.space_before_token=!0:this.print_newline()):oe(E,Q)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&$(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ue==="SPACE"&&(this._output.space_before_token=!0);E.previous&&(E.previous.type===H.WORD||E.previous.type===H.RESERVED)&&(this._output.space_before_token=!0),this.print_token(E),this._flags.last_word=E.text,E.type===H.RESERVED&&(E.text==="do"?this._flags.do_block=!0:E.text==="if"?this._flags.if_block=!0:E.text==="import"?this._flags.import_block=!0:this._flags.import_block&&F(E,"from")&&(this._flags.import_block=!1))},W.prototype.handle_semicolon=function(E){this.start_of_statement(E)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(E);for(var B=this._tokens.peek();this._flags.mode===Be.Statement&&!(this._flags.if_block&&F(B,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(E)},W.prototype.handle_string=function(E){E.text.startsWith("`")&&E.newlines===0&&E.whitespace_before===""&&(E.previous.text===")"||this._flags.last_token.type===H.WORD)||(this.start_of_statement(E)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(E),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(E):E.text.startsWith("`")&&this._flags.last_token.type===H.END_EXPR&&(E.previous.text==="]"||E.previous.text===")")&&E.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(E)},W.prototype.handle_equals=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0},W.prototype.handle_comma=function(E){this.handle_whitespace_and_comments(E,!0),this.print_token(E),this._output.space_before_token=!0,this._flags.declaration_statement?(Z(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(E)):this._flags.mode===Be.ObjectLiteral||this._flags.mode===Be.Statement&&this._flags.parent.mode===Be.ObjectLiteral?(this._flags.mode===Be.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(E)},W.prototype.handle_operator=function(E){var B=E.text==="*"&&(oe(this._flags.last_token,["function","yield"])||T(this._flags.last_token.type,[H.START_BLOCK,H.COMMA,H.END_BLOCK,H.SEMICOLON])),ue=T(E.text,["-","+"])&&(T(this._flags.last_token.type,[H.START_BLOCK,H.START_EXPR,H.EQUALS,H.OPERATOR])||T(this._flags.last_token.text,Q)||this._flags.last_token.text===",");if(!this.start_of_statement(E)){var Ne=!B;this.handle_whitespace_and_comments(E,Ne)}if(E.text==="*"&&this._flags.last_token.type===H.DOT){this.print_token(E);return}if(E.text==="::"){this.print_token(E);return}if(T(E.text,["-","+"])&&this.start_of_object_property()){this.print_token(E);return}if(this._flags.last_token.type===H.OPERATOR&&T(this._options.operator_position,Ue)&&this.allow_wrap_or_preserved_newline(E),E.text===":"&&this._flags.in_case){this.print_token(E),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==H.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var We=!0,Te=!0,ze=!1;if(E.text===":"?this._flags.ternary_depth===0?We=!1:(this._flags.ternary_depth-=1,ze=!0):E.text==="?"&&(this._flags.ternary_depth+=1),!ue&&!B&&this._options.preserve_newlines&&T(E.text,q)){var Ye=E.text===":",Je=Ye&&ze,Ve=Ye&&!ze;switch(this._options.operator_position){case De.before_newline:this._output.space_before_token=!Ve,this.print_token(E),(!Ye||Je)&&this.allow_wrap_or_preserved_newline(E),this._output.space_before_token=!0;return;case De.after_newline:this._output.space_before_token=!0,!Ye||Je?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(E):this._output.space_before_token=!1,this.print_token(E),this._output.space_before_token=!0;return;case De.preserve_newline:Ve||this.allow_wrap_or_preserved_newline(E),We=!(this._output.just_added_newline()||Ve),this._output.space_before_token=We,this.print_token(E),this._output.space_before_token=!0;return}}if(B){this.allow_wrap_or_preserved_newline(E),We=!1;var Tt=this._tokens.peek();Te=Tt&&T(Tt.type,[H.WORD,H.RESERVED])}else if(E.text==="...")this.allow_wrap_or_preserved_newline(E),We=this._flags.last_token.type===H.START_BLOCK,Te=!1;else if(T(E.text,["--","++","!","~"])||ue){if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR)&&this.allow_wrap_or_preserved_newline(E),We=!1,Te=!1,E.newlines&&(E.text==="--"||E.text==="++"||E.text==="~")){var Ke=oe(this._flags.last_token,ye)&&E.newlines;Ke&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Ke,!0)}this._flags.last_token.text===";"&&Z(this._flags.mode)&&(We=!0),this._flags.last_token.type===H.RESERVED?We=!0:this._flags.last_token.type===H.END_EXPR?We=!(this._flags.last_token.text==="]"&&(E.text==="--"||E.text==="++")):this._flags.last_token.type===H.OPERATOR&&(We=T(E.text,["--","-","++","+"])&&T(this._flags.last_token.text,["--","-","++","+"]),T(E.text,["+","-"])&&T(this._flags.last_token.text,["--","++"])&&(Te=!0)),(this._flags.mode===Be.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Be.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||We,this.print_token(E),this._output.space_before_token=Te},W.prototype.handle_block_comment=function(E,B){if(this._output.raw){this._output.add_raw_token(E),E.directives&&E.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(E.directives){this.print_newline(!1,B),this.print_token(E),E.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!S.newline.test(E.text)&&!E.newlines){this._output.space_before_token=!0,this.print_token(E),this._output.space_before_token=!0;return}else this.print_block_commment(E,B)},W.prototype.print_block_commment=function(E,B){var ue=ae(E.text),Ne,We=!1,Te=!1,ze=E.whitespace_before,Ye=ze.length;if(this.print_newline(!1,B),this.print_token_line_indentation(E),this._output.add_token(ue[0]),this.print_newline(!1,B),ue.length>1){for(ue=ue.slice(1),We=ne(ue,"*"),Te=re(ue,ze),We&&(this._flags.alignment=1),Ne=0;Ne<ue.length;Ne++)We?(this.print_token_line_indentation(E),this._output.add_token(V(ue[Ne]))):Te&&ue[Ne]?(this.print_token_line_indentation(E),this._output.add_token(ue[Ne].substring(Ye))):(this._output.current_line.set_indent(-1),this._output.add_token(ue[Ne])),this.print_newline(!1,B);this._flags.alignment=0}},W.prototype.handle_comment=function(E,B){E.newlines?this.print_newline(!1,B):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(E),this.print_newline(!1,B)},W.prototype.handle_dot=function(E){this.start_of_statement(E)||this.handle_whitespace_and_comments(E,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),oe(this._flags.last_token,ye)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(E,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(E)},W.prototype.handle_unknown=function(E,B){this.print_token(E),E.text[E.text.length-1]===`
`&&this.print_newline(!1,B)},W.prototype.handle_eof=function(E){for(;this._flags.mode===Be.Statement;)this.restore_mode();this.handle_whitespace_and_comments(E)},ie.exports.Beautifier=W},function(ie){function o(w){this.__parent=w,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var w=new o(this.__parent);return w.set_indent(this.__indent_count,this.__alignment_count),w},o.prototype.item=function(w){return w<0?this.__items[this.__items.length+w]:this.__items[w]},o.prototype.has_match=function(w){for(var S=this.__items.length-1;S>=0;S--)if(this.__items[S].match(w))return!0;return!1},o.prototype.set_indent=function(w,S){this.is_empty()&&(this.__indent_count=w||0,this.__alignment_count=S||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var w=this.__parent.current_line;return w.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),w.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),w.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,w.__items[0]===" "&&(w.__items.splice(0,1),w.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(w){this.__items.push(w);var S=w.lastIndexOf(`
`);S!==-1?this.__character_count=w.length-S:this.__character_count+=w.length},o.prototype.pop=function(){var w=null;return this.is_empty()||(w=this.__items.pop(),this.__character_count-=w.length),w},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var w="";return this.is_empty()?this.__parent.indent_empty_lines&&(w=this.__parent.get_indent_string(this.__indent_count)):(w=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),w+=this.__items.join("")),w};function Y(w,S){this.__cache=[""],this.__indent_size=w.indent_size,this.__indent_string=w.indent_char,w.indent_with_tabs||(this.__indent_string=new Array(w.indent_size+1).join(w.indent_char)),S=S||"",w.indent_level>0&&(S=new Array(w.indent_level+1).join(this.__indent_string)),this.__base_string=S,this.__base_string_length=S.length}Y.prototype.get_indent_size=function(w,S){var C=this.__base_string_length;return S=S||0,w<0&&(C=0),C+=w*this.__indent_size,C+=S,C},Y.prototype.get_indent_string=function(w,S){var C=this.__base_string;return S=S||0,w<0&&(w=0,C=""),S+=w*this.__indent_size,this.__ensure_cache(S),C+=this.__cache[S],C},Y.prototype.__ensure_cache=function(w){for(;w>=this.__cache.length;)this.__add_column()},Y.prototype.__add_column=function(){var w=this.__cache.length,S=0,C="";this.__indent_size&&w>=this.__indent_size&&(S=Math.floor(w/this.__indent_size),w-=S*this.__indent_size,C=new Array(S+1).join(this.__indent_string)),w&&(C+=new Array(w+1).join(" ")),this.__cache.push(C)};function N(w,S){this.__indent_cache=new Y(w,S),this.raw=!1,this._end_with_newline=w.end_with_newline,this.indent_size=w.indent_size,this.wrap_line_length=w.wrap_line_length,this.indent_empty_lines=w.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(w,S){return this.__indent_cache.get_indent_string(w,S)},N.prototype.get_indent_size=function(w,S){return this.__indent_cache.get_indent_size(w,S)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(w){return this.is_empty()||!w&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(w){this.trim(!0);var S=this.current_line.pop();S&&(S[S.length-1]===`
`&&(S=S.replace(/\n+$/g,"")),this.current_line.push(S)),this._end_with_newline&&this.__add_outputline();var C=this.__lines.join(`
`);return w!==`
`&&(C=C.replace(/[\n]/g,w)),C},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(w,S){return w=w||0,S=S||0,this.next_line.set_indent(w,S),this.__lines.length>1?(this.current_line.set_indent(w,S),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(w){for(var S=0;S<w.newlines;S++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(w.whitespace_before),this.current_line.push(w.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(w){this.__add_space_before_token(),this.current_line.push(w),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.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(" "))},N.prototype.remove_indent=function(w){for(var S=this.__lines.length;w<S;)this.__lines[w]._remove_indent(),w++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(w){for(w=w===void 0?!1:w,this.current_line.trim();w&&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},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(w,S){for(var C=this.__lines.length-2;C>=0;){var L=this.__lines[C];if(L.is_empty())break;if(L.item(0).indexOf(w)!==0&&L.item(-1)!==S){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},ie.exports.Output=N},function(ie){function o(Y,N,w,S){this.type=Y,this.text=N,this.comments_before=null,this.newlines=w||0,this.whitespace_before=S||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ie.exports.Token=o},function(ie,o){var Y="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",N="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",w="\\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",S="\\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",C="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",L="(?:"+C+"|["+Y+w+"])",Q="(?:"+C+"|["+N+w+S+"])*";o.identifier=new RegExp(L+Q,"g"),o.identifierStart=new RegExp(L),o.identifierMatch=new RegExp("(?:"+C+"|["+N+w+S+"])+");var q=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(ie,o,Y){var N=Y(6).Options,w=["before-newline","after-newline","preserve-newline"];function S(C){N.call(this,C,"js");var L=this.raw_options.brace_style||null;L==="expand-strict"?this.raw_options.brace_style="expand":L==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var 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 q=0;q<Q.length;q++)Q[q]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=Q[q];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",w),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}S.prototype=new N,ie.exports.Options=S},function(ie){function o(w,S){this.raw_options=Y(w,S),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(w,S){var C=this.raw_options[w],L=S||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(L=C.concat()):typeof C=="string"&&(L=C.split(/[^a-zA-Z0-9_\/\-]+/)),L},o.prototype._get_boolean=function(w,S){var C=this.raw_options[w],L=C===void 0?!!S:!!C;return L},o.prototype._get_characters=function(w,S){var C=this.raw_options[w],L=S||"";return typeof C=="string"&&(L=C.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),L},o.prototype._get_number=function(w,S){var C=this.raw_options[w];S=parseInt(S,10),isNaN(S)&&(S=0);var L=parseInt(C,10);return isNaN(L)&&(L=S),L},o.prototype._get_selection=function(w,S,C){var L=this._get_selection_list(w,S,C);if(L.length!==1)throw new Error("Invalid Option Value: The option '"+w+`' can only be one of the following values:
`+S+`
You passed in: '`+this.raw_options[w]+"'");return L[0]},o.prototype._get_selection_list=function(w,S,C){if(!S||S.length===0)throw new Error("Selection list cannot be empty.");if(C=C||[S[0]],!this._is_valid_selection(C,S))throw new Error("Invalid Default Value!");var L=this._get_array(w,C);if(!this._is_valid_selection(L,S))throw new Error("Invalid Option Value: The option '"+w+`' can contain only the following values:
`+S+`
You passed in: '`+this.raw_options[w]+"'");return L},o.prototype._is_valid_selection=function(w,S){return w.length&&S.length&&!w.some(function(C){return S.indexOf(C)===-1})};function Y(w,S){var C={};w=N(w);var L;for(L in w)L!==S&&(C[L]=w[L]);if(S&&w[S])for(L in w[S])C[L]=w[S][L];return C}function N(w){var S={},C;for(C in w){var L=C.replace(/-/g,"_");S[L]=w[C]}return S}ie.exports.Options=o,ie.exports.normalizeOpts=N,ie.exports.mergeOpts=Y},function(ie,o,Y){var N=Y(8).InputScanner,w=Y(9).Tokenizer,S=Y(9).TOKEN,C=Y(13).Directives,L=Y(4),Q=Y(12).Pattern,q=Y(14).TemplatablePattern;function H(ne,re){return re.indexOf(ne)!==-1}var T={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:S.START,RAW:S.RAW,EOF:S.EOF},V=new C(/\/\*/,/\*\//),P=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,F=/[0-9]/,oe=/[^\d\.]/,ye=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),le=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";le=le.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),le="\\?\\.(?!\\d) "+le,le=le.replace(/ /g,"|");var De=new RegExp(le),Ue="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Be=Ue.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),rt=new RegExp("^(?:"+Be.join("|")+")$"),ae,$=function(ne,re){w.call(this,ne,re),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var W=new Q(this._input),y=new q(this._input).read_options(this._options);this.__patterns={template:y,identifier:y.starting_with(L.identifier).matching(L.identifierMatch),number:W.matching(P),punct:W.matching(De),comment:W.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:W.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:W.matching(/<!--/),html_comment_end:W.matching(/-->/),include:W.starting_with(/#include/).until_after(L.lineBreak),shebang:W.starting_with(/#!/).until_after(L.lineBreak),xml:W.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:y.until(/['\\\n\r\u2028\u2029]/),double_quote:y.until(/["\\\n\r\u2028\u2029]/),template_text:y.until(/[`\\$]/),template_expression:y.until(/[`}\\]/)}};$.prototype=new w,$.prototype._is_comment=function(ne){return ne.type===T.COMMENT||ne.type===T.BLOCK_COMMENT||ne.type===T.UNKNOWN},$.prototype._is_opening=function(ne){return ne.type===T.START_BLOCK||ne.type===T.START_EXPR},$.prototype._is_closing=function(ne,re){return(ne.type===T.END_BLOCK||ne.type===T.END_EXPR)&&re&&(ne.text==="]"&&re.text==="["||ne.text===")"&&re.text==="("||ne.text==="}"&&re.text==="{")},$.prototype._reset=function(){ae=!1},$.prototype._get_next_token=function(ne,re){var W=null;this._readWhitespace();var y=this._input.peek();return y===null?this._create_token(T.EOF,""):(W=W||this._read_non_javascript(y),W=W||this._read_string(y),W=W||this._read_pair(y,this._input.peek(1)),W=W||this._read_word(ne),W=W||this._read_singles(y),W=W||this._read_comment(y),W=W||this._read_regexp(y,ne),W=W||this._read_xml(y,ne),W=W||this._read_punctuation(),W=W||this._create_token(T.UNKNOWN,this._input.next()),W)},$.prototype._read_word=function(ne){var re;if(re=this.__patterns.identifier.read(),re!=="")return re=re.replace(L.allLineBreaks,`
`),!(ne.type===T.DOT||ne.type===T.RESERVED&&(ne.text==="set"||ne.text==="get"))&&rt.test(re)?(re==="in"||re==="of")&&(ne.type===T.WORD||ne.type===T.STRING)?this._create_token(T.OPERATOR,re):this._create_token(T.RESERVED,re):this._create_token(T.WORD,re);if(re=this.__patterns.number.read(),re!=="")return this._create_token(T.WORD,re)},$.prototype._read_singles=function(ne){var re=null;return ne==="("||ne==="["?re=this._create_token(T.START_EXPR,ne):ne===")"||ne==="]"?re=this._create_token(T.END_EXPR,ne):ne==="{"?re=this._create_token(T.START_BLOCK,ne):ne==="}"?re=this._create_token(T.END_BLOCK,ne):ne===";"?re=this._create_token(T.SEMICOLON,ne):ne==="."&&oe.test(this._input.peek(1))?re=this._create_token(T.DOT,ne):ne===","&&(re=this._create_token(T.COMMA,ne)),re&&this._input.next(),re},$.prototype._read_pair=function(ne,re){var W=null;return ne==="#"&&re==="{"&&(W=this._create_token(T.START_BLOCK,ne+re)),W&&(this._input.next(),this._input.next()),W},$.prototype._read_punctuation=function(){var ne=this.__patterns.punct.read();if(ne!=="")return ne==="="?this._create_token(T.EQUALS,ne):ne==="?."?this._create_token(T.DOT,ne):this._create_token(T.OPERATOR,ne)},$.prototype._read_non_javascript=function(ne){var re="";if(ne==="#"){if(this._is_first_token()&&(re=this.__patterns.shebang.read(),re))return this._create_token(T.UNKNOWN,re.trim()+`
`);if(re=this.__patterns.include.read(),re)return this._create_token(T.UNKNOWN,re.trim()+`
`);ne=this._input.next();var W="#";if(this._input.hasNext()&&this._input.testChar(F)){do ne=this._input.next(),W+=ne;while(this._input.hasNext()&&ne!=="#"&&ne!=="=");return ne==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(W+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(W+="{}",this._input.next(),this._input.next())),this._create_token(T.WORD,W)}this._input.back()}else if(ne==="<"&&this._is_first_token()){if(re=this.__patterns.html_comment_start.read(),re){for(;this._input.hasNext()&&!this._input.testChar(L.newline);)re+=this._input.next();return ae=!0,this._create_token(T.COMMENT,re)}}else if(ae&&ne==="-"&&(re=this.__patterns.html_comment_end.read(),re))return ae=!1,this._create_token(T.COMMENT,re);return null},$.prototype._read_comment=function(ne){var re=null;if(ne==="/"){var W="";if(this._input.peek(1)==="*"){W=this.__patterns.block_comment.read();var y=V.get_directives(W);y&&y.ignore==="start"&&(W+=V.readIgnored(this._input)),W=W.replace(L.allLineBreaks,`
`),re=this._create_token(T.BLOCK_COMMENT,W),re.directives=y}else this._input.peek(1)==="/"&&(W=this.__patterns.comment.read(),re=this._create_token(T.COMMENT,W))}return re},$.prototype._read_string=function(ne){if(ne==="`"||ne==="'"||ne==='"'){var re=this._input.next();return this.has_char_escapes=!1,ne==="`"?re+=this._read_string_recursive("`",!0,"${"):re+=this._read_string_recursive(ne),this.has_char_escapes&&this._options.unescape_strings&&(re=Z(re)),this._input.peek()===ne&&(re+=this._input.next()),re=re.replace(L.allLineBreaks,`
`),this._create_token(T.STRING,re)}return null},$.prototype._allow_regexp_or_xml=function(ne){return ne.type===T.RESERVED&&H(ne.text,["return","case","throw","else","do","typeof","yield"])||ne.type===T.END_EXPR&&ne.text===")"&&ne.opened.previous.type===T.RESERVED&&H(ne.opened.previous.text,["if","while","for"])||H(ne.type,[T.COMMENT,T.START_EXPR,T.START_BLOCK,T.START,T.END_BLOCK,T.OPERATOR,T.EQUALS,T.EOF,T.SEMICOLON,T.COMMA])},$.prototype._read_regexp=function(ne,re){if(ne==="/"&&this._allow_regexp_or_xml(re)){for(var W=this._input.next(),y=!1,E=!1;this._input.hasNext()&&(y||E||this._input.peek()!==ne)&&!this._input.testChar(L.newline);)W+=this._input.peek(),y?y=!1:(y=this._input.peek()==="\\",this._input.peek()==="["?E=!0:this._input.peek()==="]"&&(E=!1)),this._input.next();return this._input.peek()===ne&&(W+=this._input.next(),W+=this._input.read(L.identifier)),this._create_token(T.STRING,W)}return null},$.prototype._read_xml=function(ne,re){if(this._options.e4x&&ne==="<"&&this._allow_regexp_or_xml(re)){var W="",y=this.__patterns.xml.read_match();if(y){for(var E=y[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),B=E.indexOf("{")===0,ue=0;y;){var Ne=!!y[1],We=y[2],Te=!!y[y.length-1]||We.slice(0,8)==="![CDATA[";if(!Te&&(We===E||B&&We.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Ne?--ue:++ue),W+=y[0],ue<=0)break;y=this.__patterns.xml.read_match()}return y||(W+=this._input.match(/[\s\S]*/g)[0]),W=W.replace(L.allLineBreaks,`
`),this._create_token(T.STRING,W)}}return null};function Z(ne){for(var re="",W=0,y=new N(ne),E=null;y.hasNext();)if(E=y.match(/([\s]|[^\\]|\\\\)+/g),E&&(re+=E[0]),y.peek()==="\\"){if(y.next(),y.peek()==="x")E=y.match(/x([0-9A-Fa-f]{2})/g);else if(y.peek()==="u")E=y.match(/u([0-9A-Fa-f]{4})/g),E||(E=y.match(/u\{([0-9A-Fa-f]+)\}/g));else{re+="\\",y.hasNext()&&(re+=y.next());continue}if(!E||(W=parseInt(E[1],16),W>126&&W<=255&&E[0].indexOf("x")===0))return ne;W>=0&&W<32||W>1114111?re+="\\"+E[0]:W===34||W===39||W===92?re+="\\"+String.fromCharCode(W):re+=String.fromCharCode(W)}return re}$.prototype._read_string_recursive=function(ne,re,W){var y,E;ne==="'"?E=this.__patterns.single_quote:ne==='"'?E=this.__patterns.double_quote:ne==="`"?E=this.__patterns.template_text:ne==="}"&&(E=this.__patterns.template_expression);for(var B=E.read(),ue="";this._input.hasNext();){if(ue=this._input.next(),ue===ne||!re&&L.newline.test(ue)){this._input.back();break}else ue==="\\"&&this._input.hasNext()?(y=this._input.peek(),y==="x"||y==="u"?this.has_char_escapes=!0:y==="\r"&&this._input.peek(1)===`
`&&this._input.next(),ue+=this._input.next()):W&&(W==="${"&&ue==="$"&&this._input.peek()==="{"&&(ue+=this._input.next()),W===ue&&(ne==="`"?ue+=this._read_string_recursive("}",re,"`"):ue+=this._read_string_recursive("`",re,"${"),this._input.hasNext()&&(ue+=this._input.next())));ue+=E.read(),B+=ue}return B},ie.exports.Tokenizer=$,ie.exports.TOKEN=T,ie.exports.positionable_operators=ye.slice(),ie.exports.line_starters=Ue.slice()},function(ie){var o=RegExp.prototype.hasOwnProperty("sticky");function Y(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}Y.prototype.restart=function(){this.__position=0},Y.prototype.back=function(){this.__position>0&&(this.__position-=1)},Y.prototype.hasNext=function(){return this.__position<this.__input_length},Y.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},Y.prototype.peek=function(N){var w=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(w=this.__input.charAt(N)),w},Y.prototype.__match=function(N,w){N.lastIndex=w;var S=N.exec(this.__input);return S&&!(o&&N.sticky)&&S.index!==w&&(S=null),S},Y.prototype.test=function(N,w){return w=w||0,w+=this.__position,w>=0&&w<this.__input_length?!!this.__match(N,w):!1},Y.prototype.testChar=function(N,w){var S=this.peek(w);return N.lastIndex=0,S!==null&&N.test(S)},Y.prototype.match=function(N){var w=this.__match(N,this.__position);return w?this.__position+=w[0].length:w=null,w},Y.prototype.read=function(N,w,S){var C="",L;return N&&(L=this.match(N),L&&(C+=L[0])),w&&(L||!N)&&(C+=this.readUntil(w,S)),C},Y.prototype.readUntil=function(N,w){var S="",C=this.__position;N.lastIndex=this.__position;var L=N.exec(this.__input);return L?(C=L.index,w&&(C+=L[0].length)):C=this.__input_length,S=this.__input.substring(this.__position,C),this.__position=C,S},Y.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},Y.prototype.get_regexp=function(N,w){var S=null,C="g";return w&&o&&(C="y"),typeof N=="string"&&N!==""?S=new RegExp(N,C):N&&(S=new RegExp(N.source,C)),S},Y.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},Y.prototype.peekUntilAfter=function(N){var w=this.__position,S=this.readUntilAfter(N);return this.__position=w,S},Y.prototype.lookBack=function(N){var w=this.__position-1;return w>=N.length&&this.__input.substring(w-N.length,w).toLowerCase()===N},ie.exports.InputScanner=Y},function(ie,o,Y){var N=Y(8).InputScanner,w=Y(3).Token,S=Y(10).TokenStream,C=Y(11).WhitespacePattern,L={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},Q=function(q,H){this._input=new N(q),this._options=H||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new C(this._input)};Q.prototype.tokenize=function(){this._input.restart(),this.__tokens=new S,this._reset();for(var q,H=new w(L.START,""),T=null,V=[],P=new S;H.type!==L.EOF;){for(q=this._get_next_token(H,T);this._is_comment(q);)P.add(q),q=this._get_next_token(H,T);P.isEmpty()||(q.comments_before=P,P=new S),q.parent=T,this._is_opening(q)?(V.push(T),T=q):T&&this._is_closing(q,T)&&(q.opened=T,T.closed=q,T=V.pop(),q.parent=T),q.previous=H,H.next=q,this.__tokens.add(q),H=q}return this.__tokens},Q.prototype._is_first_token=function(){return this.__tokens.isEmpty()},Q.prototype._reset=function(){},Q.prototype._get_next_token=function(q,H){this._readWhitespace();var T=this._input.read(/.+/g);return T?this._create_token(L.RAW,T):this._create_token(L.EOF,"")},Q.prototype._is_comment=function(q){return!1},Q.prototype._is_opening=function(q){return!1},Q.prototype._is_closing=function(q,H){return!1},Q.prototype._create_token=function(q,H){var T=new w(q,H,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return T},Q.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ie.exports.Tokenizer=Q,ie.exports.TOKEN=L},function(ie){function o(Y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=Y}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var Y=null;return this.hasNext()&&(Y=this.__tokens[this.__position],this.__position+=1),Y},o.prototype.peek=function(Y){var N=null;return Y=Y||0,Y+=this.__position,Y>=0&&Y<this.__tokens_length&&(N=this.__tokens[Y]),N},o.prototype.add=function(Y){this.__parent_token&&(Y.parent=this.__parent_token),this.__tokens.push(Y),this.__tokens_length+=1},ie.exports.TokenStream=o},function(ie,o,Y){var N=Y(12).Pattern;function w(S,C){N.call(this,S,C),C?this._line_regexp=this._input.get_regexp(C._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}w.prototype=new N,w.prototype.__set_whitespace_patterns=function(S,C){S+="\\t ",C+="\\n\\r",this._match_pattern=this._input.get_regexp("["+S+C+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+C+"]")},w.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var S=this._input.read(this._match_pattern);if(S===" ")this.whitespace_before_token=" ";else if(S){var C=this.__split(this._newline_regexp,S);this.newline_count=C.length-1,this.whitespace_before_token=C[this.newline_count]}return S},w.prototype.matching=function(S,C){var L=this._create();return L.__set_whitespace_patterns(S,C),L._update(),L},w.prototype._create=function(){return new w(this._input,this)},w.prototype.__split=function(S,C){S.lastIndex=0;for(var L=0,Q=[],q=S.exec(C);q;)Q.push(C.substring(L,q.index)),L=q.index+q[0].length,q=S.exec(C);return L<C.length?Q.push(C.substring(L,C.length)):Q.push(""),Q},ie.exports.WhitespacePattern=w},function(ie){function o(Y,N){this._input=Y,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,N&&(this._starting_pattern=this._input.get_regexp(N._starting_pattern,!0),this._match_pattern=this._input.get_regexp(N._match_pattern,!0),this._until_pattern=this._input.get_regexp(N._until_pattern),this._until_after=N._until_after)}o.prototype.read=function(){var Y=this._input.read(this._starting_pattern);return(!this._starting_pattern||Y)&&(Y+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),Y},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(Y){var N=this._create();return N._until_after=!0,N._until_pattern=this._input.get_regexp(Y),N._update(),N},o.prototype.until=function(Y){var N=this._create();return N._until_after=!1,N._until_pattern=this._input.get_regexp(Y),N._update(),N},o.prototype.starting_with=function(Y){var N=this._create();return N._starting_pattern=this._input.get_regexp(Y,!0),N._update(),N},o.prototype.matching=function(Y){var N=this._create();return N._match_pattern=this._input.get_regexp(Y,!0),N._update(),N},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},ie.exports.Pattern=o},function(ie){function o(Y,N){Y=typeof Y=="string"?Y:Y.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(Y+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(Y+/\sbeautify\signore:end\s/.source+N,"g")}o.prototype.get_directives=function(Y){if(!Y.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var w=this.__directive_pattern.exec(Y);w;)N[w[1]]=w[2],w=this.__directive_pattern.exec(Y);return N},o.prototype.readIgnored=function(Y){return Y.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=o},function(ie,o,Y){var N=Y(12).Pattern,w={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function S(C,L){N.call(this,C,L),this.__template_pattern=null,this._disabled=Object.assign({},w),this._excluded=Object.assign({},w),L&&(this.__template_pattern=this._input.get_regexp(L.__template_pattern),this._excluded=Object.assign(this._excluded,L._excluded),this._disabled=Object.assign(this._disabled,L._disabled));var Q=new N(C);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}/)}}S.prototype=new N,S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){this.__set_templated_pattern()},S.prototype.disable=function(C){var L=this._create();return L._disabled[C]=!0,L._update(),L},S.prototype.read_options=function(C){var L=this._create();for(var Q in w)L._disabled[Q]=C.templating.indexOf(Q)===-1;return L._update(),L},S.prototype.exclude=function(C){var L=this._create();return L._excluded[C]=!0,L._update(),L},S.prototype.read=function(){var C="";this._match_pattern?C=this._input.read(this._starting_pattern):C=this._input.read(this._starting_pattern,this.__template_pattern);for(var L=this._read_template();L;)this._match_pattern?L+=this._input.read(this._match_pattern):L+=this._input.readUntil(this.__template_pattern),C+=L,L=this._read_template();return this._until_after&&(C+=this._input.readUntilAfter(this._until_pattern)),C},S.prototype.__set_templated_pattern=function(){var C=[];this._disabled.php||C.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||C.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||C.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||C.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(C.push(this.__patterns.django._starting_pattern.source),C.push(this.__patterns.django_value._starting_pattern.source),C.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||C.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&C.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+C.join("|")+")")},S.prototype._read_template=function(){var C="",L=this._input.peek();if(L==="<"){var Q=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&Q==="?"&&(C=C||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&Q==="%"&&(C=C||this.__patterns.erb.read())}else L==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(C=C||this.__patterns.handlebars_comment.read(),C=C||this.__patterns.handlebars_unescaped.read(),C=C||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(C=C||this.__patterns.django_value.read()),this._excluded.django||(C=C||this.__patterns.django_comment.read(),C=C||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(C=C||this.__patterns.smarty_comment.read(),C=C||this.__patterns.smarty_literal.read(),C=C||this.__patterns.smarty.read()));return C},ie.exports.TemplatablePattern=S}],z={};function m(ie){var o=z[ie];if(o!==void 0)return o.exports;var Y=z[ie]={exports:{}};return pe[ie](Y,Y.exports,m),Y.exports}var ce=m(0);fe=ce})();var be=fe;b=[],_=function(){return{js_beautify:be}}.apply(nt,b),_!==void 0&&(Gt.exports=_)})()},15342:function(Gt){(function(b,_){Gt.exports=_()})(typeof self!="undefined"?self:this,function(){return function(nt){var b={};function _(fe){if(b[fe])return b[fe].exports;var be=b[fe]={i:fe,l:!1,exports:{}};return nt[fe].call(be.exports,be,be.exports,_),be.l=!0,be.exports}return _.m=nt,_.c=b,_.d=function(fe,be,pe){_.o(fe,be)||Object.defineProperty(fe,be,{enumerable:!0,get:pe})},_.r=function(fe){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(fe,"__esModule",{value:!0})},_.t=function(fe,be){if(be&1&&(fe=_(fe)),be&8||be&4&&typeof fe=="object"&&fe&&fe.__esModule)return fe;var pe=Object.create(null);if(_.r(pe),Object.defineProperty(pe,"default",{enumerable:!0,value:fe}),be&2&&typeof fe!="string")for(var z in fe)_.d(pe,z,function(m){return fe[m]}.bind(null,z));return pe},_.n=function(fe){var be=fe&&fe.__esModule?function(){return fe.default}:function(){return fe};return _.d(be,"a",be),be},_.o=function(fe,be){return Object.prototype.hasOwnProperty.call(fe,be)},_.p="",_(_.s=1)}([function(nt,b,_){},function(nt,b,_){"use strict";_.r(b);var fe=_(0),be=function(){function K(u,h,f){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=h,this.end=f}return K.range=function(h,f){return f?!h||!h.loc||!f.loc||h.loc.lexer!==f.loc.lexer?null:new K(h.loc.lexer,h.loc.start,f.loc.end):h&&h.loc},K}(),pe=function(){function K(h,f){this.text=void 0,this.loc=void 0,this.text=h,this.loc=f}var u=K.prototype;return u.range=function(f,v){return new K(v,be.range(this,f))},K}(),z=function K(u,h){this.position=void 0;var f="KaTeX parse error: "+u,v,R=h&&h.loc;if(R&&R.start<=R.end){var j=R.lexer.input;v=R.start;var me=R.end;v===j.length?f+=" at end of input: ":f+=" at position "+(v+1)+": ";var Ee=j.slice(v,me).replace(/[^]/g,"$&\u0332"),Ge;v>15?Ge="\u2026"+j.slice(v-15,v):Ge=j.slice(0,v);var lt;me+15<j.length?lt=j.slice(me,me+15)+"\u2026":lt=j.slice(me),f+=Ge+Ee+lt}var xt=new Error(f);return xt.name="ParseError",xt.__proto__=K.prototype,xt.position=v,xt};z.prototype.__proto__=Error.prototype;var m=z,ce=function(u,h){return u.indexOf(h)!==-1},ie=function(u,h){return u===void 0?h:u},o=/([A-Z])/g,Y=function(u){return u.replace(o,"-$1").toLowerCase()},N={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},w=/[&><"']/g;function S(K){return String(K).replace(w,function(u){return N[u]})}var C=function K(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?K(u.body[0]):u:u.type==="font"?K(u.body):u},L=function(u){var h=C(u);return h.type==="mathord"||h.type==="textord"||h.type==="atom"},Q=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},q=function(u){var h=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(u);return h!=null?h[1]:"_relative"},H={contains:ce,deflt:ie,escape:S,hyphenate:Y,getBaseElem:C,isCharacterBox:L,protocolFromUrl:q},T=function(){function K(h){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,h=h||{},this.displayMode=H.deflt(h.displayMode,!1),this.output=H.deflt(h.output,"htmlAndMathml"),this.leqno=H.deflt(h.leqno,!1),this.fleqn=H.deflt(h.fleqn,!1),this.throwOnError=H.deflt(h.throwOnError,!0),this.errorColor=H.deflt(h.errorColor,"#cc0000"),this.macros=h.macros||{},this.minRuleThickness=Math.max(0,H.deflt(h.minRuleThickness,0)),this.colorIsTextColor=H.deflt(h.colorIsTextColor,!1),this.strict=H.deflt(h.strict,"warn"),this.trust=H.deflt(h.trust,!1),this.maxSize=Math.max(0,H.deflt(h.maxSize,1/0)),this.maxExpand=Math.max(0,H.deflt(h.maxExpand,1e3))}var u=K.prototype;return u.reportNonstrict=function(f,v,R){var j=this.strict;if(typeof j=="function"&&(j=j(f,v,R)),!(!j||j==="ignore")){if(j===!0||j==="error")throw new m("LaTeX-incompatible input and strict mode is set to 'error': "+(v+" ["+f+"]"),R);j==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(v+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+j+"': "+v+" ["+f+"]"))}},u.useStrictBehavior=function(f,v,R){var j=this.strict;if(typeof j=="function")try{j=j(f,v,R)}catch(me){j="error"}return!j||j==="ignore"?!1:j===!0||j==="error"?!0:j==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(v+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+j+"': "+v+" ["+f+"]")),!1)},u.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=H.protocolFromUrl(f.url));var v=typeof this.trust=="function"?this.trust(f):this.trust;return!!v},K}(),V=function(){function K(h,f,v){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=f,this.cramped=v}var u=K.prototype;return u.sup=function(){return rt[ae[this.id]]},u.sub=function(){return rt[$[this.id]]},u.fracNum=function(){return rt[Z[this.id]]},u.fracDen=function(){return rt[ne[this.id]]},u.cramp=function(){return rt[re[this.id]]},u.text=function(){return rt[W[this.id]]},u.isTight=function(){return this.size>=2},K}(),P=0,F=1,oe=2,ye=3,le=4,De=5,Ue=6,Be=7,rt=[new V(P,0,!1),new V(F,0,!0),new V(oe,1,!1),new V(ye,1,!0),new V(le,2,!1),new V(De,2,!0),new V(Ue,3,!1),new V(Be,3,!0)],ae=[le,De,le,De,Ue,Be,Ue,Be],$=[De,De,De,De,Be,Be,Be,Be],Z=[oe,ye,le,De,Ue,Be,Ue,Be],ne=[ye,ye,De,De,Be,Be,Be,Be],re=[F,F,ye,ye,De,De,Be,Be],W=[P,F,oe,ye,oe,ye,oe,ye],y={DISPLAY:rt[P],TEXT:rt[oe],SCRIPT:rt[le],SCRIPTSCRIPT:rt[Ue]},E=[{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 B(K){for(var u=0;u<E.length;u++)for(var h=E[u],f=0;f<h.blocks.length;f++){var v=h.blocks[f];if(K>=v[0]&&K<=v[1])return h.name}return null}var ue=[];E.forEach(function(K){return K.blocks.forEach(function(u){return ue.push.apply(ue,u)})});function Ne(K){for(var u=0;u<ue.length;u+=2)if(K>=ue[u]&&K<=ue[u+1])return!0;return!1}var We=80,Te=function(u,h){return"M95,"+(622+u+h)+`
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)+" "+h+"h400000v"+(40+u)+"h-400000z"},ze=function(u,h){return"M263,"+(601+u+h)+`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)+" "+h+"h400000v"+(40+u)+"h-400000z"},Ye=function(u,h){return"M983 "+(10+u+h)+`
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)+" "+h+"h400000v"+(40+u)+"h-400000z"},Je=function(u,h){return"M424,"+(2398+u+h)+`
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)+" "+h+`
h400000v`+(40+u)+"h-400000z"},Ve=function(u,h){return"M473,"+(2713+u+h)+`
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)+" "+h+"h400000v"+(40+u)+"H1017.7z"},Tt=function(u,h,f){var v=f-54-h-u;return"M702 "+(u+h)+"H400000"+(40+u)+`
H742v`+v+`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 `+h+"H400000v"+(40+u)+"H742z"},Ke=function(u,h,f){h=1e3*h;var v="";switch(u){case"sqrtMain":v=Te(h,We);break;case"sqrtSize1":v=ze(h,We);break;case"sqrtSize2":v=Ye(h,We);break;case"sqrtSize3":v=Je(h,We);break;case"sqrtSize4":v=Ve(h,We);break;case"sqrtTall":v=Tt(h,We,f)}return v},Et={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`},Le=function(){function K(h){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=h,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=K.prototype;return u.hasClass=function(f){return H.contains(this.classes,f)},u.toNode=function(){for(var f=document.createDocumentFragment(),v=0;v<this.children.length;v++)f.appendChild(this.children[v].toNode());return f},u.toMarkup=function(){for(var f="",v=0;v<this.children.length;v++)f+=this.children[v].toMarkup();return f},u.toText=function(){var f=function(R){return R.toText()};return this.children.map(f).join("")},K}(),pt=function(u){return u.filter(function(h){return h}).join(" ")},Pe=function(u,h,f){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=f||{},h){h.style.isTight()&&this.classes.push("mtight");var v=h.getColor();v&&(this.style.color=v)}},Ae=function(u){var h=document.createElement(u);h.className=pt(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(h.style[f]=this.style[f]);for(var v in this.attributes)this.attributes.hasOwnProperty(v)&&h.setAttribute(v,this.attributes[v]);for(var R=0;R<this.children.length;R++)h.appendChild(this.children[R].toNode());return h},he=function(u){var h="<"+u;this.classes.length&&(h+=' class="'+H.escape(pt(this.classes))+'"');var f="";for(var v in this.style)this.style.hasOwnProperty(v)&&(f+=H.hyphenate(v)+":"+this.style[v]+";");f&&(h+=' style="'+H.escape(f)+'"');for(var R in this.attributes)this.attributes.hasOwnProperty(R)&&(h+=" "+R+'="'+H.escape(this.attributes[R])+'"');h+=">";for(var j=0;j<this.children.length;j++)h+=this.children[j].toMarkup();return h+="</"+u+">",h},je=function(){function K(h,f,v,R){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,Pe.call(this,h,v,R),this.children=f||[]}var u=K.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.hasClass=function(f){return H.contains(this.classes,f)},u.toNode=function(){return Ae.call(this,"span")},u.toMarkup=function(){return he.call(this,"span")},K}(),Ie=function(){function K(h,f,v,R){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,Pe.call(this,f,R),this.children=v||[],this.setAttribute("href",h)}var u=K.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.hasClass=function(f){return H.contains(this.classes,f)},u.toNode=function(){return Ae.call(this,"a")},u.toMarkup=function(){return he.call(this,"a")},K}(),we=function(){function K(h,f,v){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=h,this.classes=["mord"],this.style=v}var u=K.prototype;return u.hasClass=function(f){return H.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 v in this.style)this.style.hasOwnProperty(v)&&(f.style[v]=this.style[v]);return f},u.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",v="";for(var R in this.style)this.style.hasOwnProperty(R)&&(v+=H.hyphenate(R)+":"+this.style[R]+";");return v&&(f+=' style="'+H.escape(v)+'"'),f+="'/>",f},K}(),M={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},de=function(){function K(h,f,v,R,j,me,Ee,Ge){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=h,this.height=f||0,this.depth=v||0,this.italic=R||0,this.skew=j||0,this.width=me||0,this.classes=Ee||[],this.style=Ge||{},this.maxFontSize=0;var lt=B(this.text.charCodeAt(0));lt&&this.classes.push(lt+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=M[this.text])}var u=K.prototype;return u.hasClass=function(f){return H.contains(this.classes,f)},u.toNode=function(){var f=document.createTextNode(this.text),v=null;this.italic>0&&(v=document.createElement("span"),v.style.marginRight=this.italic+"em"),this.classes.length>0&&(v=v||document.createElement("span"),v.className=pt(this.classes));for(var R in this.style)this.style.hasOwnProperty(R)&&(v=v||document.createElement("span"),v.style[R]=this.style[R]);return v?(v.appendChild(f),v):f},u.toMarkup=function(){var f=!1,v="<span";this.classes.length&&(f=!0,v+=' class="',v+=H.escape(pt(this.classes)),v+='"');var R="";this.italic>0&&(R+="margin-right:"+this.italic+"em;");for(var j in this.style)this.style.hasOwnProperty(j)&&(R+=H.hyphenate(j)+":"+this.style[j]+";");R&&(f=!0,v+=' style="'+H.escape(R)+'"');var me=H.escape(this.text);return f?(v+=">",v+=me,v+="</span>",v):me},K}(),_e=function(){function K(h,f){this.children=void 0,this.attributes=void 0,this.children=h||[],this.attributes=f||{}}var u=K.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"svg");for(var R in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,R)&&v.setAttribute(R,this.attributes[R]);for(var j=0;j<this.children.length;j++)v.appendChild(this.children[j].toNode());return v},u.toMarkup=function(){var f="<svg";for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+"='"+this.attributes[v]+"'");f+=">";for(var R=0;R<this.children.length;R++)f+=this.children[R].toMarkup();return f+="</svg>",f},K}(),Me=function(){function K(h,f){this.pathName=void 0,this.alternate=void 0,this.pathName=h,this.alternate=f}var u=K.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"path");return this.alternate?v.setAttribute("d",this.alternate):v.setAttribute("d",Et[this.pathName]),v},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Et[this.pathName]+"'/>"},K}(),Fe=function(){function K(h){this.attributes=void 0,this.attributes=h||{}}var u=K.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"line");for(var R in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,R)&&v.setAttribute(R,this.attributes[R]);return v},u.toMarkup=function(){var f="<line";for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+"='"+this.attributes[v]+"'");return f+="/>",f},K}();function Ze(K){if(K instanceof de)return K;throw new Error("Expected symbolNode but got "+String(K)+".")}function Qe(K){if(K instanceof je)return K;throw new Error("Expected span<HtmlDomNode> but got "+String(K)+".")}var tt={"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]}},ut={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]},dt={\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 St(K,u){tt[K]=u}function gt(K,u,h){if(!tt[u])throw new Error("Font metrics not found for font: "+u+".");var f=K.charCodeAt(0),v=tt[u][f];if(!v&&K[0]in dt&&(f=dt[K[0]].charCodeAt(0),v=tt[u][f]),!v&&h==="text"&&Ne(f)&&(v=tt[u][77]),v)return{depth:v[0],height:v[1],italic:v[2],skew:v[3],width:v[4]}}var _t={};function Xe(K){var u;if(K>=5?u=0:K>=3?u=1:u=2,!_t[u]){var h=_t[u]={cssEmPerMu:ut.quad[u]/18};for(var f in ut)ut.hasOwnProperty(f)&&(h[f]=ut[f][u])}return _t[u]}var qe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},st={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ot={math:{},text:{}},Ct=ot;function x(K,u,h,f,v,R){ot[K][v]={font:u,group:h,replace:f},R&&f&&(ot[K][f]=ot[K][v])}var D="math",se="text",I="main",U="ams",it="accent-token",xe="bin",Re="close",He="inner",G="mathord",J="op-token",ve="open",Ce="punct",X="rel",ct="spacing",ge="textord";x(D,I,X,"\u2261","\\equiv",!0),x(D,I,X,"\u227A","\\prec",!0),x(D,I,X,"\u227B","\\succ",!0),x(D,I,X,"\u223C","\\sim",!0),x(D,I,X,"\u22A5","\\perp"),x(D,I,X,"\u2AAF","\\preceq",!0),x(D,I,X,"\u2AB0","\\succeq",!0),x(D,I,X,"\u2243","\\simeq",!0),x(D,I,X,"\u2223","\\mid",!0),x(D,I,X,"\u226A","\\ll",!0),x(D,I,X,"\u226B","\\gg",!0),x(D,I,X,"\u224D","\\asymp",!0),x(D,I,X,"\u2225","\\parallel"),x(D,I,X,"\u22C8","\\bowtie",!0),x(D,I,X,"\u2323","\\smile",!0),x(D,I,X,"\u2291","\\sqsubseteq",!0),x(D,I,X,"\u2292","\\sqsupseteq",!0),x(D,I,X,"\u2250","\\doteq",!0),x(D,I,X,"\u2322","\\frown",!0),x(D,I,X,"\u220B","\\ni",!0),x(D,I,X,"\u221D","\\propto",!0),x(D,I,X,"\u22A2","\\vdash",!0),x(D,I,X,"\u22A3","\\dashv",!0),x(D,I,X,"\u220B","\\owns"),x(D,I,Ce,".","\\ldotp"),x(D,I,Ce,"\u22C5","\\cdotp"),x(D,I,ge,"#","\\#"),x(se,I,ge,"#","\\#"),x(D,I,ge,"&","\\&"),x(se,I,ge,"&","\\&"),x(D,I,ge,"\u2135","\\aleph",!0),x(D,I,ge,"\u2200","\\forall",!0),x(D,I,ge,"\u210F","\\hbar",!0),x(D,I,ge,"\u2203","\\exists",!0),x(D,I,ge,"\u2207","\\nabla",!0),x(D,I,ge,"\u266D","\\flat",!0),x(D,I,ge,"\u2113","\\ell",!0),x(D,I,ge,"\u266E","\\natural",!0),x(D,I,ge,"\u2663","\\clubsuit",!0),x(D,I,ge,"\u2118","\\wp",!0),x(D,I,ge,"\u266F","\\sharp",!0),x(D,I,ge,"\u2662","\\diamondsuit",!0),x(D,I,ge,"\u211C","\\Re",!0),x(D,I,ge,"\u2661","\\heartsuit",!0),x(D,I,ge,"\u2111","\\Im",!0),x(D,I,ge,"\u2660","\\spadesuit",!0),x(se,I,ge,"\xA7","\\S",!0),x(se,I,ge,"\xB6","\\P",!0),x(D,I,ge,"\u2020","\\dag"),x(se,I,ge,"\u2020","\\dag"),x(se,I,ge,"\u2020","\\textdagger"),x(D,I,ge,"\u2021","\\ddag"),x(se,I,ge,"\u2021","\\ddag"),x(se,I,ge,"\u2021","\\textdaggerdbl"),x(D,I,Re,"\u23B1","\\rmoustache",!0),x(D,I,ve,"\u23B0","\\lmoustache",!0),x(D,I,Re,"\u27EF","\\rgroup",!0),x(D,I,ve,"\u27EE","\\lgroup",!0),x(D,I,xe,"\u2213","\\mp",!0),x(D,I,xe,"\u2296","\\ominus",!0),x(D,I,xe,"\u228E","\\uplus",!0),x(D,I,xe,"\u2293","\\sqcap",!0),x(D,I,xe,"\u2217","\\ast"),x(D,I,xe,"\u2294","\\sqcup",!0),x(D,I,xe,"\u25EF","\\bigcirc"),x(D,I,xe,"\u2219","\\bullet"),x(D,I,xe,"\u2021","\\ddagger"),x(D,I,xe,"\u2240","\\wr",!0),x(D,I,xe,"\u2A3F","\\amalg"),x(D,I,xe,"&","\\And"),x(D,I,X,"\u27F5","\\longleftarrow",!0),x(D,I,X,"\u21D0","\\Leftarrow",!0),x(D,I,X,"\u27F8","\\Longleftarrow",!0),x(D,I,X,"\u27F6","\\longrightarrow",!0),x(D,I,X,"\u21D2","\\Rightarrow",!0),x(D,I,X,"\u27F9","\\Longrightarrow",!0),x(D,I,X,"\u2194","\\leftrightarrow",!0),x(D,I,X,"\u27F7","\\longleftrightarrow",!0),x(D,I,X,"\u21D4","\\Leftrightarrow",!0),x(D,I,X,"\u27FA","\\Longleftrightarrow",!0),x(D,I,X,"\u21A6","\\mapsto",!0),x(D,I,X,"\u27FC","\\longmapsto",!0),x(D,I,X,"\u2197","\\nearrow",!0),x(D,I,X,"\u21A9","\\hookleftarrow",!0),x(D,I,X,"\u21AA","\\hookrightarrow",!0),x(D,I,X,"\u2198","\\searrow",!0),x(D,I,X,"\u21BC","\\leftharpoonup",!0),x(D,I,X,"\u21C0","\\rightharpoonup",!0),x(D,I,X,"\u2199","\\swarrow",!0),x(D,I,X,"\u21BD","\\leftharpoondown",!0),x(D,I,X,"\u21C1","\\rightharpoondown",!0),x(D,I,X,"\u2196","\\nwarrow",!0),x(D,I,X,"\u21CC","\\rightleftharpoons",!0),x(D,U,X,"\u226E","\\nless",!0),x(D,U,X,"\uE010","\\@nleqslant"),x(D,U,X,"\uE011","\\@nleqq"),x(D,U,X,"\u2A87","\\lneq",!0),x(D,U,X,"\u2268","\\lneqq",!0),x(D,U,X,"\uE00C","\\@lvertneqq"),x(D,U,X,"\u22E6","\\lnsim",!0),x(D,U,X,"\u2A89","\\lnapprox",!0),x(D,U,X,"\u2280","\\nprec",!0),x(D,U,X,"\u22E0","\\npreceq",!0),x(D,U,X,"\u22E8","\\precnsim",!0),x(D,U,X,"\u2AB9","\\precnapprox",!0),x(D,U,X,"\u2241","\\nsim",!0),x(D,U,X,"\uE006","\\@nshortmid"),x(D,U,X,"\u2224","\\nmid",!0),x(D,U,X,"\u22AC","\\nvdash",!0),x(D,U,X,"\u22AD","\\nvDash",!0),x(D,U,X,"\u22EA","\\ntriangleleft"),x(D,U,X,"\u22EC","\\ntrianglelefteq",!0),x(D,U,X,"\u228A","\\subsetneq",!0),x(D,U,X,"\uE01A","\\@varsubsetneq"),x(D,U,X,"\u2ACB","\\subsetneqq",!0),x(D,U,X,"\uE017","\\@varsubsetneqq"),x(D,U,X,"\u226F","\\ngtr",!0),x(D,U,X,"\uE00F","\\@ngeqslant"),x(D,U,X,"\uE00E","\\@ngeqq"),x(D,U,X,"\u2A88","\\gneq",!0),x(D,U,X,"\u2269","\\gneqq",!0),x(D,U,X,"\uE00D","\\@gvertneqq"),x(D,U,X,"\u22E7","\\gnsim",!0),x(D,U,X,"\u2A8A","\\gnapprox",!0),x(D,U,X,"\u2281","\\nsucc",!0),x(D,U,X,"\u22E1","\\nsucceq",!0),x(D,U,X,"\u22E9","\\succnsim",!0),x(D,U,X,"\u2ABA","\\succnapprox",!0),x(D,U,X,"\u2246","\\ncong",!0),x(D,U,X,"\uE007","\\@nshortparallel"),x(D,U,X,"\u2226","\\nparallel",!0),x(D,U,X,"\u22AF","\\nVDash",!0),x(D,U,X,"\u22EB","\\ntriangleright"),x(D,U,X,"\u22ED","\\ntrianglerighteq",!0),x(D,U,X,"\uE018","\\@nsupseteqq"),x(D,U,X,"\u228B","\\supsetneq",!0),x(D,U,X,"\uE01B","\\@varsupsetneq"),x(D,U,X,"\u2ACC","\\supsetneqq",!0),x(D,U,X,"\uE019","\\@varsupsetneqq"),x(D,U,X,"\u22AE","\\nVdash",!0),x(D,U,X,"\u2AB5","\\precneqq",!0),x(D,U,X,"\u2AB6","\\succneqq",!0),x(D,U,X,"\uE016","\\@nsubseteqq"),x(D,U,xe,"\u22B4","\\unlhd"),x(D,U,xe,"\u22B5","\\unrhd"),x(D,U,X,"\u219A","\\nleftarrow",!0),x(D,U,X,"\u219B","\\nrightarrow",!0),x(D,U,X,"\u21CD","\\nLeftarrow",!0),x(D,U,X,"\u21CF","\\nRightarrow",!0),x(D,U,X,"\u21AE","\\nleftrightarrow",!0),x(D,U,X,"\u21CE","\\nLeftrightarrow",!0),x(D,U,X,"\u25B3","\\vartriangle"),x(D,U,ge,"\u210F","\\hslash"),x(D,U,ge,"\u25BD","\\triangledown"),x(D,U,ge,"\u25CA","\\lozenge"),x(D,U,ge,"\u24C8","\\circledS"),x(D,U,ge,"\xAE","\\circledR"),x(se,U,ge,"\xAE","\\circledR"),x(D,U,ge,"\u2221","\\measuredangle",!0),x(D,U,ge,"\u2204","\\nexists"),x(D,U,ge,"\u2127","\\mho"),x(D,U,ge,"\u2132","\\Finv",!0),x(D,U,ge,"\u2141","\\Game",!0),x(D,U,ge,"\u2035","\\backprime"),x(D,U,ge,"\u25B2","\\blacktriangle"),x(D,U,ge,"\u25BC","\\blacktriangledown"),x(D,U,ge,"\u25A0","\\blacksquare"),x(D,U,ge,"\u29EB","\\blacklozenge"),x(D,U,ge,"\u2605","\\bigstar"),x(D,U,ge,"\u2222","\\sphericalangle",!0),x(D,U,ge,"\u2201","\\complement",!0),x(D,U,ge,"\xF0","\\eth",!0),x(D,U,ge,"\u2571","\\diagup"),x(D,U,ge,"\u2572","\\diagdown"),x(D,U,ge,"\u25A1","\\square"),x(D,U,ge,"\u25A1","\\Box"),x(D,U,ge,"\u25CA","\\Diamond"),x(D,U,ge,"\xA5","\\yen",!0),x(se,U,ge,"\xA5","\\yen",!0),x(D,U,ge,"\u2713","\\checkmark",!0),x(se,U,ge,"\u2713","\\checkmark"),x(D,U,ge,"\u2136","\\beth",!0),x(D,U,ge,"\u2138","\\daleth",!0),x(D,U,ge,"\u2137","\\gimel",!0),x(D,U,ge,"\u03DD","\\digamma",!0),x(D,U,ge,"\u03F0","\\varkappa"),x(D,U,ve,"\u250C","\\ulcorner",!0),x(D,U,Re,"\u2510","\\urcorner",!0),x(D,U,ve,"\u2514","\\llcorner",!0),x(D,U,Re,"\u2518","\\lrcorner",!0),x(D,U,X,"\u2266","\\leqq",!0),x(D,U,X,"\u2A7D","\\leqslant",!0),x(D,U,X,"\u2A95","\\eqslantless",!0),x(D,U,X,"\u2272","\\lesssim",!0),x(D,U,X,"\u2A85","\\lessapprox",!0),x(D,U,X,"\u224A","\\approxeq",!0),x(D,U,xe,"\u22D6","\\lessdot"),x(D,U,X,"\u22D8","\\lll",!0),x(D,U,X,"\u2276","\\lessgtr",!0),x(D,U,X,"\u22DA","\\lesseqgtr",!0),x(D,U,X,"\u2A8B","\\lesseqqgtr",!0),x(D,U,X,"\u2251","\\doteqdot"),x(D,U,X,"\u2253","\\risingdotseq",!0),x(D,U,X,"\u2252","\\fallingdotseq",!0),x(D,U,X,"\u223D","\\backsim",!0),x(D,U,X,"\u22CD","\\backsimeq",!0),x(D,U,X,"\u2AC5","\\subseteqq",!0),x(D,U,X,"\u22D0","\\Subset",!0),x(D,U,X,"\u228F","\\sqsubset",!0),x(D,U,X,"\u227C","\\preccurlyeq",!0),x(D,U,X,"\u22DE","\\curlyeqprec",!0),x(D,U,X,"\u227E","\\precsim",!0),x(D,U,X,"\u2AB7","\\precapprox",!0),x(D,U,X,"\u22B2","\\vartriangleleft"),x(D,U,X,"\u22B4","\\trianglelefteq"),x(D,U,X,"\u22A8","\\vDash",!0),x(D,U,X,"\u22AA","\\Vvdash",!0),x(D,U,X,"\u2323","\\smallsmile"),x(D,U,X,"\u2322","\\smallfrown"),x(D,U,X,"\u224F","\\bumpeq",!0),x(D,U,X,"\u224E","\\Bumpeq",!0),x(D,U,X,"\u2267","\\geqq",!0),x(D,U,X,"\u2A7E","\\geqslant",!0),x(D,U,X,"\u2A96","\\eqslantgtr",!0),x(D,U,X,"\u2273","\\gtrsim",!0),x(D,U,X,"\u2A86","\\gtrapprox",!0),x(D,U,xe,"\u22D7","\\gtrdot"),x(D,U,X,"\u22D9","\\ggg",!0),x(D,U,X,"\u2277","\\gtrless",!0),x(D,U,X,"\u22DB","\\gtreqless",!0),x(D,U,X,"\u2A8C","\\gtreqqless",!0),x(D,U,X,"\u2256","\\eqcirc",!0),x(D,U,X,"\u2257","\\circeq",!0),x(D,U,X,"\u225C","\\triangleq",!0),x(D,U,X,"\u223C","\\thicksim"),x(D,U,X,"\u2248","\\thickapprox"),x(D,U,X,"\u2AC6","\\supseteqq",!0),x(D,U,X,"\u22D1","\\Supset",!0),x(D,U,X,"\u2290","\\sqsupset",!0),x(D,U,X,"\u227D","\\succcurlyeq",!0),x(D,U,X,"\u22DF","\\curlyeqsucc",!0),x(D,U,X,"\u227F","\\succsim",!0),x(D,U,X,"\u2AB8","\\succapprox",!0),x(D,U,X,"\u22B3","\\vartriangleright"),x(D,U,X,"\u22B5","\\trianglerighteq"),x(D,U,X,"\u22A9","\\Vdash",!0),x(D,U,X,"\u2223","\\shortmid"),x(D,U,X,"\u2225","\\shortparallel"),x(D,U,X,"\u226C","\\between",!0),x(D,U,X,"\u22D4","\\pitchfork",!0),x(D,U,X,"\u221D","\\varpropto"),x(D,U,X,"\u25C0","\\blacktriangleleft"),x(D,U,X,"\u2234","\\therefore",!0),x(D,U,X,"\u220D","\\backepsilon"),x(D,U,X,"\u25B6","\\blacktriangleright"),x(D,U,X,"\u2235","\\because",!0),x(D,U,X,"\u22D8","\\llless"),x(D,U,X,"\u22D9","\\gggtr"),x(D,U,xe,"\u22B2","\\lhd"),x(D,U,xe,"\u22B3","\\rhd"),x(D,U,X,"\u2242","\\eqsim",!0),x(D,I,X,"\u22C8","\\Join"),x(D,U,X,"\u2251","\\Doteq",!0),x(D,U,xe,"\u2214","\\dotplus",!0),x(D,U,xe,"\u2216","\\smallsetminus"),x(D,U,xe,"\u22D2","\\Cap",!0),x(D,U,xe,"\u22D3","\\Cup",!0),x(D,U,xe,"\u2A5E","\\doublebarwedge",!0),x(D,U,xe,"\u229F","\\boxminus",!0),x(D,U,xe,"\u229E","\\boxplus",!0),x(D,U,xe,"\u22C7","\\divideontimes",!0),x(D,U,xe,"\u22C9","\\ltimes",!0),x(D,U,xe,"\u22CA","\\rtimes",!0),x(D,U,xe,"\u22CB","\\leftthreetimes",!0),x(D,U,xe,"\u22CC","\\rightthreetimes",!0),x(D,U,xe,"\u22CF","\\curlywedge",!0),x(D,U,xe,"\u22CE","\\curlyvee",!0),x(D,U,xe,"\u229D","\\circleddash",!0),x(D,U,xe,"\u229B","\\circledast",!0),x(D,U,xe,"\u22C5","\\centerdot"),x(D,U,xe,"\u22BA","\\intercal",!0),x(D,U,xe,"\u22D2","\\doublecap"),x(D,U,xe,"\u22D3","\\doublecup"),x(D,U,xe,"\u22A0","\\boxtimes",!0),x(D,U,X,"\u21E2","\\dashrightarrow",!0),x(D,U,X,"\u21E0","\\dashleftarrow",!0),x(D,U,X,"\u21C7","\\leftleftarrows",!0),x(D,U,X,"\u21C6","\\leftrightarrows",!0),x(D,U,X,"\u21DA","\\Lleftarrow",!0),x(D,U,X,"\u219E","\\twoheadleftarrow",!0),x(D,U,X,"\u21A2","\\leftarrowtail",!0),x(D,U,X,"\u21AB","\\looparrowleft",!0),x(D,U,X,"\u21CB","\\leftrightharpoons",!0),x(D,U,X,"\u21B6","\\curvearrowleft",!0),x(D,U,X,"\u21BA","\\circlearrowleft",!0),x(D,U,X,"\u21B0","\\Lsh",!0),x(D,U,X,"\u21C8","\\upuparrows",!0),x(D,U,X,"\u21BF","\\upharpoonleft",!0),x(D,U,X,"\u21C3","\\downharpoonleft",!0),x(D,U,X,"\u22B8","\\multimap",!0),x(D,U,X,"\u21AD","\\leftrightsquigarrow",!0),x(D,U,X,"\u21C9","\\rightrightarrows",!0),x(D,U,X,"\u21C4","\\rightleftarrows",!0),x(D,U,X,"\u21A0","\\twoheadrightarrow",!0),x(D,U,X,"\u21A3","\\rightarrowtail",!0),x(D,U,X,"\u21AC","\\looparrowright",!0),x(D,U,X,"\u21B7","\\curvearrowright",!0),x(D,U,X,"\u21BB","\\circlearrowright",!0),x(D,U,X,"\u21B1","\\Rsh",!0),x(D,U,X,"\u21CA","\\downdownarrows",!0),x(D,U,X,"\u21BE","\\upharpoonright",!0),x(D,U,X,"\u21C2","\\downharpoonright",!0),x(D,U,X,"\u21DD","\\rightsquigarrow",!0),x(D,U,X,"\u21DD","\\leadsto"),x(D,U,X,"\u21DB","\\Rrightarrow",!0),x(D,U,X,"\u21BE","\\restriction"),x(D,I,ge,"\u2018","`"),x(D,I,ge,"$","\\$"),x(se,I,ge,"$","\\$"),x(se,I,ge,"$","\\textdollar"),x(D,I,ge,"%","\\%"),x(se,I,ge,"%","\\%"),x(D,I,ge,"_","\\_"),x(se,I,ge,"_","\\_"),x(se,I,ge,"_","\\textunderscore"),x(D,I,ge,"\u2220","\\angle",!0),x(D,I,ge,"\u221E","\\infty",!0),x(D,I,ge,"\u2032","\\prime"),x(D,I,ge,"\u25B3","\\triangle"),x(D,I,ge,"\u0393","\\Gamma",!0),x(D,I,ge,"\u0394","\\Delta",!0),x(D,I,ge,"\u0398","\\Theta",!0),x(D,I,ge,"\u039B","\\Lambda",!0),x(D,I,ge,"\u039E","\\Xi",!0),x(D,I,ge,"\u03A0","\\Pi",!0),x(D,I,ge,"\u03A3","\\Sigma",!0),x(D,I,ge,"\u03A5","\\Upsilon",!0),x(D,I,ge,"\u03A6","\\Phi",!0),x(D,I,ge,"\u03A8","\\Psi",!0),x(D,I,ge,"\u03A9","\\Omega",!0),x(D,I,ge,"A","\u0391"),x(D,I,ge,"B","\u0392"),x(D,I,ge,"E","\u0395"),x(D,I,ge,"Z","\u0396"),x(D,I,ge,"H","\u0397"),x(D,I,ge,"I","\u0399"),x(D,I,ge,"K","\u039A"),x(D,I,ge,"M","\u039C"),x(D,I,ge,"N","\u039D"),x(D,I,ge,"O","\u039F"),x(D,I,ge,"P","\u03A1"),x(D,I,ge,"T","\u03A4"),x(D,I,ge,"X","\u03A7"),x(D,I,ge,"\xAC","\\neg",!0),x(D,I,ge,"\xAC","\\lnot"),x(D,I,ge,"\u22A4","\\top"),x(D,I,ge,"\u22A5","\\bot"),x(D,I,ge,"\u2205","\\emptyset"),x(D,U,ge,"\u2205","\\varnothing"),x(D,I,G,"\u03B1","\\alpha",!0),x(D,I,G,"\u03B2","\\beta",!0),x(D,I,G,"\u03B3","\\gamma",!0),x(D,I,G,"\u03B4","\\delta",!0),x(D,I,G,"\u03F5","\\epsilon",!0),x(D,I,G,"\u03B6","\\zeta",!0),x(D,I,G,"\u03B7","\\eta",!0),x(D,I,G,"\u03B8","\\theta",!0),x(D,I,G,"\u03B9","\\iota",!0),x(D,I,G,"\u03BA","\\kappa",!0),x(D,I,G,"\u03BB","\\lambda",!0),x(D,I,G,"\u03BC","\\mu",!0),x(D,I,G,"\u03BD","\\nu",!0),x(D,I,G,"\u03BE","\\xi",!0),x(D,I,G,"\u03BF","\\omicron",!0),x(D,I,G,"\u03C0","\\pi",!0),x(D,I,G,"\u03C1","\\rho",!0),x(D,I,G,"\u03C3","\\sigma",!0),x(D,I,G,"\u03C4","\\tau",!0),x(D,I,G,"\u03C5","\\upsilon",!0),x(D,I,G,"\u03D5","\\phi",!0),x(D,I,G,"\u03C7","\\chi",!0),x(D,I,G,"\u03C8","\\psi",!0),x(D,I,G,"\u03C9","\\omega",!0),x(D,I,G,"\u03B5","\\varepsilon",!0),x(D,I,G,"\u03D1","\\vartheta",!0),x(D,I,G,"\u03D6","\\varpi",!0),x(D,I,G,"\u03F1","\\varrho",!0),x(D,I,G,"\u03C2","\\varsigma",!0),x(D,I,G,"\u03C6","\\varphi",!0),x(D,I,xe,"\u2217","*"),x(D,I,xe,"+","+"),x(D,I,xe,"\u2212","-"),x(D,I,xe,"\u22C5","\\cdot",!0),x(D,I,xe,"\u2218","\\circ"),x(D,I,xe,"\xF7","\\div",!0),x(D,I,xe,"\xB1","\\pm",!0),x(D,I,xe,"\xD7","\\times",!0),x(D,I,xe,"\u2229","\\cap",!0),x(D,I,xe,"\u222A","\\cup",!0),x(D,I,xe,"\u2216","\\setminus"),x(D,I,xe,"\u2227","\\land"),x(D,I,xe,"\u2228","\\lor"),x(D,I,xe,"\u2227","\\wedge",!0),x(D,I,xe,"\u2228","\\vee",!0),x(D,I,ge,"\u221A","\\surd"),x(D,I,ve,"(","("),x(D,I,ve,"[","["),x(D,I,ve,"\u27E8","\\langle",!0),x(D,I,ve,"\u2223","\\lvert"),x(D,I,ve,"\u2225","\\lVert"),x(D,I,Re,")",")"),x(D,I,Re,"]","]"),x(D,I,Re,"?","?"),x(D,I,Re,"!","!"),x(D,I,Re,"\u27E9","\\rangle",!0),x(D,I,Re,"\u2223","\\rvert"),x(D,I,Re,"\u2225","\\rVert"),x(D,I,X,"=","="),x(D,I,X,"<","<"),x(D,I,X,">",">"),x(D,I,X,":",":"),x(D,I,X,"\u2248","\\approx",!0),x(D,I,X,"\u2245","\\cong",!0),x(D,I,X,"\u2265","\\ge"),x(D,I,X,"\u2265","\\geq",!0),x(D,I,X,"\u2190","\\gets"),x(D,I,X,">","\\gt"),x(D,I,X,"\u2208","\\in",!0),x(D,I,X,"\uE020","\\@not"),x(D,I,X,"\u2282","\\subset",!0),x(D,I,X,"\u2283","\\supset",!0),x(D,I,X,"\u2286","\\subseteq",!0),x(D,I,X,"\u2287","\\supseteq",!0),x(D,U,X,"\u2288","\\nsubseteq",!0),x(D,U,X,"\u2289","\\nsupseteq",!0),x(D,I,X,"\u22A8","\\models"),x(D,I,X,"\u2190","\\leftarrow",!0),x(D,I,X,"\u2264","\\le"),x(D,I,X,"\u2264","\\leq",!0),x(D,I,X,"<","\\lt"),x(D,I,X,"\u2192","\\rightarrow",!0),x(D,I,X,"\u2192","\\to"),x(D,U,X,"\u2271","\\ngeq",!0),x(D,U,X,"\u2270","\\nleq",!0),x(D,I,ct,"\xA0","\\ "),x(D,I,ct,"\xA0","~"),x(D,I,ct,"\xA0","\\space"),x(D,I,ct,"\xA0","\\nobreakspace"),x(se,I,ct,"\xA0","\\ "),x(se,I,ct,"\xA0","~"),x(se,I,ct,"\xA0","\\space"),x(se,I,ct,"\xA0","\\nobreakspace"),x(D,I,ct,null,"\\nobreak"),x(D,I,ct,null,"\\allowbreak"),x(D,I,Ce,",",","),x(D,I,Ce,";",";"),x(D,U,xe,"\u22BC","\\barwedge",!0),x(D,U,xe,"\u22BB","\\veebar",!0),x(D,I,xe,"\u2299","\\odot",!0),x(D,I,xe,"\u2295","\\oplus",!0),x(D,I,xe,"\u2297","\\otimes",!0),x(D,I,ge,"\u2202","\\partial",!0),x(D,I,xe,"\u2298","\\oslash",!0),x(D,U,xe,"\u229A","\\circledcirc",!0),x(D,U,xe,"\u22A1","\\boxdot",!0),x(D,I,xe,"\u25B3","\\bigtriangleup"),x(D,I,xe,"\u25BD","\\bigtriangledown"),x(D,I,xe,"\u2020","\\dagger"),x(D,I,xe,"\u22C4","\\diamond"),x(D,I,xe,"\u22C6","\\star"),x(D,I,xe,"\u25C3","\\triangleleft"),x(D,I,xe,"\u25B9","\\triangleright"),x(D,I,ve,"{","\\{"),x(se,I,ge,"{","\\{"),x(se,I,ge,"{","\\textbraceleft"),x(D,I,Re,"}","\\}"),x(se,I,ge,"}","\\}"),x(se,I,ge,"}","\\textbraceright"),x(D,I,ve,"{","\\lbrace"),x(D,I,Re,"}","\\rbrace"),x(D,I,ve,"[","\\lbrack"),x(se,I,ge,"[","\\lbrack"),x(D,I,Re,"]","\\rbrack"),x(se,I,ge,"]","\\rbrack"),x(D,I,ve,"(","\\lparen"),x(D,I,Re,")","\\rparen"),x(se,I,ge,"<","\\textless"),x(se,I,ge,">","\\textgreater"),x(D,I,ve,"\u230A","\\lfloor",!0),x(D,I,Re,"\u230B","\\rfloor",!0),x(D,I,ve,"\u2308","\\lceil",!0),x(D,I,Re,"\u2309","\\rceil",!0),x(D,I,ge,"\\","\\backslash"),x(D,I,ge,"\u2223","|"),x(D,I,ge,"\u2223","\\vert"),x(se,I,ge,"|","\\textbar"),x(D,I,ge,"\u2225","\\|"),x(D,I,ge,"\u2225","\\Vert"),x(se,I,ge,"\u2225","\\textbardbl"),x(se,I,ge,"~","\\textasciitilde"),x(se,I,ge,"\\","\\textbackslash"),x(se,I,ge,"^","\\textasciicircum"),x(D,I,X,"\u2191","\\uparrow",!0),x(D,I,X,"\u21D1","\\Uparrow",!0),x(D,I,X,"\u2193","\\downarrow",!0),x(D,I,X,"\u21D3","\\Downarrow",!0),x(D,I,X,"\u2195","\\updownarrow",!0),x(D,I,X,"\u21D5","\\Updownarrow",!0),x(D,I,J,"\u2210","\\coprod"),x(D,I,J,"\u22C1","\\bigvee"),x(D,I,J,"\u22C0","\\bigwedge"),x(D,I,J,"\u2A04","\\biguplus"),x(D,I,J,"\u22C2","\\bigcap"),x(D,I,J,"\u22C3","\\bigcup"),x(D,I,J,"\u222B","\\int"),x(D,I,J,"\u222B","\\intop"),x(D,I,J,"\u222C","\\iint"),x(D,I,J,"\u222D","\\iiint"),x(D,I,J,"\u220F","\\prod"),x(D,I,J,"\u2211","\\sum"),x(D,I,J,"\u2A02","\\bigotimes"),x(D,I,J,"\u2A01","\\bigoplus"),x(D,I,J,"\u2A00","\\bigodot"),x(D,I,J,"\u222E","\\oint"),x(D,I,J,"\u222F","\\oiint"),x(D,I,J,"\u2230","\\oiiint"),x(D,I,J,"\u2A06","\\bigsqcup"),x(D,I,J,"\u222B","\\smallint"),x(se,I,He,"\u2026","\\textellipsis"),x(D,I,He,"\u2026","\\mathellipsis"),x(se,I,He,"\u2026","\\ldots",!0),x(D,I,He,"\u2026","\\ldots",!0),x(D,I,He,"\u22EF","\\@cdots",!0),x(D,I,He,"\u22F1","\\ddots",!0),x(D,I,ge,"\u22EE","\\varvdots"),x(D,I,it,"\u02CA","\\acute"),x(D,I,it,"\u02CB","\\grave"),x(D,I,it,"\xA8","\\ddot"),x(D,I,it,"~","\\tilde"),x(D,I,it,"\u02C9","\\bar"),x(D,I,it,"\u02D8","\\breve"),x(D,I,it,"\u02C7","\\check"),x(D,I,it,"^","\\hat"),x(D,I,it,"\u20D7","\\vec"),x(D,I,it,"\u02D9","\\dot"),x(D,I,it,"\u02DA","\\mathring"),x(D,I,G,"\u0131","\\imath",!0),x(D,I,G,"\u0237","\\jmath",!0),x(se,I,ge,"\u0131","\\i",!0),x(se,I,ge,"\u0237","\\j",!0),x(se,I,ge,"\xDF","\\ss",!0),x(se,I,ge,"\xE6","\\ae",!0),x(se,I,ge,"\xE6","\\ae",!0),x(se,I,ge,"\u0153","\\oe",!0),x(se,I,ge,"\xF8","\\o",!0),x(se,I,ge,"\xC6","\\AE",!0),x(se,I,ge,"\u0152","\\OE",!0),x(se,I,ge,"\xD8","\\O",!0),x(se,I,it,"\u02CA","\\'"),x(se,I,it,"\u02CB","\\`"),x(se,I,it,"\u02C6","\\^"),x(se,I,it,"\u02DC","\\~"),x(se,I,it,"\u02C9","\\="),x(se,I,it,"\u02D8","\\u"),x(se,I,it,"\u02D9","\\."),x(se,I,it,"\u02DA","\\r"),x(se,I,it,"\u02C7","\\v"),x(se,I,it,"\xA8",'\\"'),x(se,I,it,"\u02DD","\\H"),x(se,I,it,"\u25EF","\\textcircled");var wt={"--":!0,"---":!0,"``":!0,"''":!0};x(se,I,ge,"\u2013","--"),x(se,I,ge,"\u2013","\\textendash"),x(se,I,ge,"\u2014","---"),x(se,I,ge,"\u2014","\\textemdash"),x(se,I,ge,"\u2018","`"),x(se,I,ge,"\u2018","\\textquoteleft"),x(se,I,ge,"\u2019","'"),x(se,I,ge,"\u2019","\\textquoteright"),x(se,I,ge,"\u201C","``"),x(se,I,ge,"\u201C","\\textquotedblleft"),x(se,I,ge,"\u201D","''"),x(se,I,ge,"\u201D","\\textquotedblright"),x(D,I,ge,"\xB0","\\degree",!0),x(se,I,ge,"\xB0","\\degree"),x(se,I,ge,"\xB0","\\textdegree",!0),x(D,I,G,"\xA3","\\pounds"),x(D,I,G,"\xA3","\\mathsterling",!0),x(se,I,G,"\xA3","\\pounds"),x(se,I,G,"\xA3","\\textsterling",!0),x(D,U,ge,"\u2720","\\maltese"),x(se,U,ge,"\u2720","\\maltese"),x(se,I,ct,"\xA0","\\ "),x(se,I,ct,"\xA0"," "),x(se,I,ct,"\xA0","~");for(var Ft='0123456789/@."',Kt=0;Kt<Ft.length;Kt++){var on=Ft.charAt(Kt);x(D,I,ge,on,on)}for(var rn='0123456789!@*()-=+[]<>|";:?/.,',Zt=0;Zt<rn.length;Zt++){var ln=rn.charAt(Zt);x(se,I,ge,ln,ln)}for(var er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Sn=0;Sn<er.length;Sn++){var pn=er.charAt(Sn);x(D,I,G,pn,pn),x(se,I,ge,pn,pn)}x(D,U,ge,"C","\u2102"),x(se,U,ge,"C","\u2102"),x(D,U,ge,"H","\u210D"),x(se,U,ge,"H","\u210D"),x(D,U,ge,"N","\u2115"),x(se,U,ge,"N","\u2115"),x(D,U,ge,"P","\u2119"),x(se,U,ge,"P","\u2119"),x(D,U,ge,"Q","\u211A"),x(se,U,ge,"Q","\u211A"),x(D,U,ge,"R","\u211D"),x(se,U,ge,"R","\u211D"),x(D,U,ge,"Z","\u2124"),x(se,U,ge,"Z","\u2124"),x(D,I,G,"h","\u210E"),x(se,I,G,"h","\u210E");for(var Ut="",Rt=0;Rt<er.length;Rt++){var Ot=er.charAt(Rt);Ut=String.fromCharCode(55349,56320+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56372+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56424+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56580+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56736+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56788+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56840+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56944+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Rt<26&&(Ut=String.fromCharCode(55349,56632+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut),Ut=String.fromCharCode(55349,56476+Rt),x(D,I,G,Ot,Ut),x(se,I,ge,Ot,Ut))}Ut="\u{1D55C}",x(D,I,G,"k",Ut),x(se,I,ge,"k",Ut);for(var Xt=0;Xt<10;Xt++){var un=Xt.toString();Ut=String.fromCharCode(55349,57294+Xt),x(D,I,G,un,Ut),x(se,I,ge,un,Ut),Ut=String.fromCharCode(55349,57314+Xt),x(D,I,G,un,Ut),x(se,I,ge,un,Ut),Ut=String.fromCharCode(55349,57324+Xt),x(D,I,G,un,Ut),x(se,I,ge,un,Ut),Ut=String.fromCharCode(55349,57334+Xt),x(D,I,G,un,Ut),x(se,I,ge,un,Ut)}for(var In="\xC7\xD0\xDE\xE7\xFE",ar=0;ar<In.length;ar++){var yr=In.charAt(ar);x(D,I,G,yr,yr),x(se,I,ge,yr,yr)}x(se,I,ge,"\xF0","\xF0"),x(se,I,ge,"\u2013","\u2013"),x(se,I,ge,"\u2014","\u2014"),x(se,I,ge,"\u2018","\u2018"),x(se,I,ge,"\u2019","\u2019"),x(se,I,ge,"\u201C","\u201C"),x(se,I,ge,"\u201D","\u201D");var br=[["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"]],_r=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],On=function(u,h){var f=u.charCodeAt(0),v=u.charCodeAt(1),R=(f-55296)*1024+(v-56320)+65536,j=h==="math"?0:1;if(119808<=R&&R<120484){var me=Math.floor((R-119808)/26);return[br[me][2],br[me][j]]}else if(120782<=R&&R<=120831){var Ee=Math.floor((R-120782)/10);return[_r[Ee][2],_r[Ee][j]]}else{if(R===120485||R===120486)return[br[0][2],br[0][j]];if(120486<R&&R<120782)return["",""];throw new m("Unsupported character: "+u)}},cr=[[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]],nr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Mr=function(u,h){return h.size<2?u:cr[u-1][h.size-1]},dr=function(){function K(h){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=h.style,this.color=h.color,this.size=h.size||K.BASESIZE,this.textSize=h.textSize||this.size,this.phantom=!!h.phantom,this.font=h.font||"",this.fontFamily=h.fontFamily||"",this.fontWeight=h.fontWeight||"",this.fontShape=h.fontShape||"",this.sizeMultiplier=nr[this.size-1],this.maxSize=h.maxSize,this.minRuleThickness=h.minRuleThickness,this._fontMetrics=void 0}var u=K.prototype;return u.extend=function(f){var v={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 R in f)f.hasOwnProperty(R)&&(v[R]=f[R]);return new K(v)},u.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:Mr(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:nr[f-1]})},u.havingBaseStyle=function(f){f=f||this.style.text();var v=Mr(K.BASESIZE,f);return this.size===v&&this.textSize===K.BASESIZE&&this.style===f?this:this.extend({style:f,size:v})},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!==K.BASESIZE?["sizing","reset-size"+this.size,"size"+K.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Xe(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},K}();dr.BASESIZE=6;var Mn=dr,Bn={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},Nn={ex:!0,em:!0,mu:!0},ir=function(u){return typeof u!="string"&&(u=u.unit),u in Bn||u in Nn||u==="ex"},at=function(u,h){var f;if(u.unit in Bn)f=Bn[u.unit]/h.fontMetrics().ptPerEm/h.sizeMultiplier;else if(u.unit==="mu")f=h.fontMetrics().cssEmPerMu;else{var v;if(h.style.isTight()?v=h.havingStyle(h.style.text()):v=h,u.unit==="ex")f=v.fontMetrics().xHeight;else if(u.unit==="em")f=v.fontMetrics().quad;else throw new m("Invalid unit: '"+u.unit+"'");v!==h&&(f*=v.sizeMultiplier/h.sizeMultiplier)}return Math.min(u.number*f,h.maxSize)},yt=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],kt=function(u,h,f){return Ct[f][u]&&Ct[f][u].replace&&(u=Ct[f][u].replace),{value:u,metrics:gt(u,h,f)}},At=function(u,h,f,v,R){var j=kt(u,h,f),me=j.metrics;u=j.value;var Ee;if(me){var Ge=me.italic;(f==="text"||v&&v.font==="mathit")&&(Ge=0),Ee=new de(u,me.height,me.depth,Ge,me.skew,me.width,R)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+h+"' and mode '"+f+"'")),Ee=new de(u,0,0,0,0,0,R);if(v){Ee.maxFontSize=v.sizeMultiplier,v.style.isTight()&&Ee.classes.push("mtight");var lt=v.getColor();lt&&(Ee.style.color=lt)}return Ee},Lt=function(u,h,f,v){return v===void 0&&(v=[]),f.font==="boldsymbol"&&kt(u,"Main-Bold",h).metrics?At(u,"Main-Bold",h,f,v.concat(["mathbf"])):u==="\\"||Ct[h][u].font==="main"?At(u,"Main-Regular",h,f,v):At(u,"AMS-Regular",h,f,v.concat(["amsrm"]))},Bt=function(u,h,f,v){return/[0-9]/.test(u.charAt(0))||H.contains(yt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},jt=function(u,h,f,v){return H.contains(yt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Vt=function(u,h,f,v){return kt(u,"Math-BoldItalic",h).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Rn=function(u,h,f){var v=u.mode,R=u.text,j=["mord"],me=v==="math"||v==="text"&&h.font,Ee=me?h.font:h.fontFamily;if(R.charCodeAt(0)===55349){var Ge=On(R,v),lt=Ge[0],xt=Ge[1];return At(R,lt,v,h,j.concat(xt))}else if(Ee){var Mt,zt;if(Ee==="boldsymbol"||Ee==="mathnormal"){var Wt=Ee==="boldsymbol"?Vt(R,v,h,j):jt(R,v,h,j);Mt=Wt.fontName,zt=[Wt.fontClass]}else H.contains(yt,R)?(Mt="Main-Italic",zt=["mathit"]):me?(Mt=Zn[Ee].fontName,zt=[Ee]):(Mt=or(Ee,h.fontWeight,h.fontShape),zt=[Ee,h.fontWeight,h.fontShape]);if(kt(R,Mt,v).metrics)return At(R,Mt,v,h,j.concat(zt));if(wt.hasOwnProperty(R)&&Mt.substr(0,10)==="Typewriter"){for(var Jt=[],vn=0;vn<R.length;vn++)Jt.push(At(R[vn],Mt,v,h,j.concat(zt)));return bn(Jt)}}if(f==="mathord"){var En=Bt(R,v,h,j);return At(R,En.fontName,v,h,j.concat([En.fontClass]))}else if(f==="textord"){var Un=Ct[v][R]&&Ct[v][R].font;if(Un==="ams"){var Jn=or("amsrm",h.fontWeight,h.fontShape);return At(R,Jn,v,h,j.concat("amsrm",h.fontWeight,h.fontShape))}else if(Un==="main"||!Un){var kr=or("textrm",h.fontWeight,h.fontShape);return At(R,kr,v,h,j.concat(h.fontWeight,h.fontShape))}else{var Cr=or(Un,h.fontWeight,h.fontShape);return At(R,Cr,v,h,j.concat(Cr,h.fontWeight,h.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},Ln=function(u,h){if(pt(u.classes)!==pt(h.classes)||u.skew!==h.skew||u.maxFontSize!==h.maxFontSize)return!1;for(var f in u.style)if(u.style.hasOwnProperty(f)&&u.style[f]!==h.style[f])return!1;for(var v in h.style)if(h.style.hasOwnProperty(v)&&u.style[v]!==h.style[v])return!1;return!0},hr=function(u){for(var h=0;h<u.length-1;h++){var f=u[h],v=u[h+1];f instanceof de&&v instanceof de&&Ln(f,v)&&(f.text+=v.text,f.height=Math.max(f.height,v.height),f.depth=Math.max(f.depth,v.depth),f.italic=v.italic,u.splice(h+1,1),h--)}return u},dn=function(u){for(var h=0,f=0,v=0,R=0;R<u.children.length;R++){var j=u.children[R];j.height>h&&(h=j.height),j.depth>f&&(f=j.depth),j.maxFontSize>v&&(v=j.maxFontSize)}u.height=h,u.depth=f,u.maxFontSize=v},cn=function(u,h,f,v){var R=new je(u,h,f,v);return dn(R),R},Pn=function(u,h,f,v){return new je(u,h,f,v)},Gn=function(u,h,f){var v=cn([u],[],h);return v.height=Math.max(f||h.fontMetrics().defaultRuleThickness,h.minRuleThickness),v.style.borderBottomWidth=v.height+"em",v.maxFontSize=1,v},Hn=function(u,h,f,v){var R=new Ie(u,h,f,v);return dn(R),R},bn=function(u){var h=new Le(u);return dn(h),h},kn=function(u,h){return u instanceof Le?cn([],[u],h):u},qn=function(u){if(u.positionType==="individualShift"){for(var h=u.children,f=[h[0]],v=-h[0].shift-h[0].elem.depth,R=v,j=1;j<h.length;j++){var me=-h[j].shift-R-h[j].elem.depth,Ee=me-(h[j-1].elem.height+h[j-1].elem.depth);R=R+me,f.push({type:"kern",size:Ee}),f.push(h[j])}return{children:f,depth:v}}var Ge;if(u.positionType==="top"){for(var lt=u.positionData,xt=0;xt<u.children.length;xt++){var Mt=u.children[xt];lt-=Mt.type==="kern"?Mt.size:Mt.elem.height+Mt.elem.depth}Ge=lt}else if(u.positionType==="bottom")Ge=-u.positionData;else{var zt=u.children[0];if(zt.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")Ge=-zt.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")Ge=-zt.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:Ge}},Wn=function(u,h){for(var f=qn(u),v=f.children,R=f.depth,j=0,me=0;me<v.length;me++){var Ee=v[me];if(Ee.type==="elem"){var Ge=Ee.elem;j=Math.max(j,Ge.maxFontSize,Ge.height)}}j+=2;var lt=cn(["pstrut"],[]);lt.style.height=j+"em";for(var xt=[],Mt=R,zt=R,Wt=R,Jt=0;Jt<v.length;Jt++){var vn=v[Jt];if(vn.type==="kern")Wt+=vn.size;else{var En=vn.elem,Un=vn.wrapperClasses||[],Jn=vn.wrapperStyle||{},kr=cn(Un,[lt,En],void 0,Jn);kr.style.top=-j-Wt-En.depth+"em",vn.marginLeft&&(kr.style.marginLeft=vn.marginLeft),vn.marginRight&&(kr.style.marginRight=vn.marginRight),xt.push(kr),Wt+=En.height+En.depth}Mt=Math.min(Mt,Wt),zt=Math.max(zt,Wt)}var Cr=cn(["vlist"],xt);Cr.style.height=zt+"em";var Or;if(Mt<0){var Pr=cn([],[]),Rr=cn(["vlist"],[Pr]);Rr.style.height=-Mt+"em";var ci=cn(["vlist-s"],[new de("\u200B")]);Or=[cn(["vlist-r"],[Cr,ci]),cn(["vlist-r"],[Rr])]}else Or=[cn(["vlist-r"],[Cr])];var Fr=cn(["vlist-t"],Or);return Or.length===2&&Fr.classes.push("vlist-t2"),Fr.height=zt,Fr.depth=-Mt,Fr},zn=function(u,h){var f=cn(["mspace"],[],h),v=at(u,h);return f.style.marginRight=v+"em",f},or=function(u,h,f){var v="";switch(u){case"amsrm":v="AMS";break;case"textrm":v="Main";break;case"textsf":v="SansSerif";break;case"texttt":v="Typewriter";break;default:v=u}var R;return h==="textbf"&&f==="textit"?R="BoldItalic":h==="textbf"?R="Bold":h==="textit"?R="Italic":R="Regular",v+"-"+R},Zn={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"}},Qn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},xr=function(u,h){var f=Qn[u],v=f[0],R=f[1],j=f[2],me=new Me(v),Ee=new _e([me],{width:R+"em",height:j+"em",style:"width:"+R+"em",viewBox:"0 0 "+1e3*R+" "+1e3*j,preserveAspectRatio:"xMinYMin"}),Ge=Pn(["overlay"],[Ee],h);return Ge.height=j,Ge.style.height=j+"em",Ge.style.width=R+"em",Ge},bt={fontMap:Zn,makeSymbol:At,mathsym:Lt,makeSpan:cn,makeSvgSpan:Pn,makeLineSpan:Gn,makeAnchor:Hn,makeFragment:bn,wrapFragment:kn,makeVList:Wn,makeOrd:Rn,makeGlue:zn,staticSvg:xr,svgData:Qn,tryCombineChars:hr};function mn(K,u){var h=Yn(K,u);if(!h)throw new Error("Expected node of type "+u+", but got "+(K?"node of type "+K.type:String(K)));return h}function Yn(K,u){return K&&K.type===u?K:null}function wr(K,u){var h=Br(K,u);if(!h)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(K?K.type==="atom"?"atom of family "+K.family:"node of type "+K.type:String(K)));return h}function Br(K,u){return K&&K.type==="atom"&&K.family===u?K:null}function Tr(K){var u=Er(K);if(!u)throw new Error("Expected node of symbol group type, but got "+(K?"node of type "+K.type:String(K)));return u}function Er(K){return K&&(K.type==="atom"||st.hasOwnProperty(K.type))?K:null}var xn={number:3,unit:"mu"},Vn={number:4,unit:"mu"},Ar={number:5,unit:"mu"},lr={mord:{mop:xn,mbin:Vn,mrel:Ar,minner:xn},mop:{mord:xn,mop:xn,mrel:Ar,minner:xn},mbin:{mord:Vn,mop:Vn,mopen:Vn,minner:Vn},mrel:{mord:Ar,mop:Ar,mopen:Ar,minner:Ar},mopen:{},mclose:{mop:xn,mbin:Vn,mrel:Ar,minner:xn},mpunct:{mord:xn,mop:xn,mrel:Ar,mopen:xn,mclose:xn,mpunct:xn,minner:xn},minner:{mord:xn,mop:xn,mbin:Vn,mrel:Ar,mopen:xn,mpunct:xn,minner:xn}},Qt={mord:{mop:xn},mop:{mord:xn,mop:xn},mbin:{},mrel:{},mopen:{},mclose:{mop:xn},mpunct:{},minner:{mop:xn}},gn={},Fn={},yn={};function Yt(K){for(var u=K.type,h=K.names,f=K.props,v=K.handler,R=K.htmlBuilder,j=K.mathmlBuilder,me={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:v},Ee=0;Ee<h.length;++Ee)gn[h[Ee]]=me;u&&(R&&(Fn[u]=R),j&&(yn[u]=j))}function tr(K){var u=K.type,h=K.htmlBuilder,f=K.mathmlBuilder;Yt({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:h,mathmlBuilder:f})}var rr=function(u){var h=Yn(u,"ordgroup");return h?h.body:[u]},Hr=bt.makeSpan,ei=["leftmost","mbin","mopen","mrel","mop","mpunct"],ti=["rightmost","mrel","mclose","mpunct"],Nr={display:y.DISPLAY,text:y.TEXT,script:y.SCRIPT,scriptscript:y.SCRIPTSCRIPT},Wr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},fr=function(u,h,f,v){v===void 0&&(v=[null,null]);for(var R=[],j=0;j<u.length;j++){var me=jn(u[j],h);if(me instanceof Le){var Ee=me.children;R.push.apply(R,Ee)}else R.push(me)}if(!f)return R;var Ge=h;if(u.length===1){var lt=Yn(u[0],"sizing")||Yn(u[0],"styling");lt&&(lt.type==="sizing"?Ge=h.havingSize(lt.size):lt.type==="styling"&&(Ge=h.havingStyle(Nr[lt.style])))}var xt=Hr([v[0]||"leftmost"],[],h),Mt=Hr([v[1]||"rightmost"],[],h);return di(R,function(zt,Wt){var Jt=Wt.classes[0],vn=zt.classes[0];Jt==="mbin"&&H.contains(ti,vn)?Wt.classes[0]="mord":vn==="mbin"&&H.contains(ei,Jt)&&(zt.classes[0]="mord")},{node:xt},Mt),di(R,function(zt,Wt){var Jt=ni(Wt),vn=ni(zt),En=Jt&&vn?zt.hasClass("mtight")?Qt[Jt][vn]:lr[Jt][vn]:null;if(En)return bt.makeGlue(En,Ge)},{node:xt},Mt),R},di=function K(u,h,f,v){v&&u.push(v);for(var R=0;R<u.length;R++){var j=u[R],me=jr(j);if(me){K(me.children,h,f);continue}if(j.classes[0]!=="mspace"){var Ee=h(j,f.node);Ee&&(f.insertAfter?f.insertAfter(Ee):(u.unshift(Ee),R++)),f.node=j,f.insertAfter=function(Ge){return function(lt){u.splice(Ge+1,0,lt),R++}}(R)}}v&&u.pop()},jr=function(u){return u instanceof Le||u instanceof Ie?u:null},Xr=function K(u,h){var f=jr(u);if(f){var v=f.children;if(v.length){if(h==="right")return K(v[v.length-1],"right");if(h==="left")return K(v[0],"left")}}return u},ni=function(u,h){return u?(h&&(u=Xr(u,h)),Wr[u.classes[0]]||null):null},ri=function(u,h){var f=["nulldelimiter"].concat(u.baseSizingClasses());return Hr(h.concat(f))},jn=function(u,h,f){if(!u)return Hr();if(Fn[u.type]){var v=Fn[u.type](u,h);if(f&&h.size!==f.size){v=Hr(h.sizingClasses(f),[v],h);var R=h.sizeMultiplier/f.sizeMultiplier;v.height*=R,v.depth*=R}return v}else throw new m("Got group of unknown type: '"+u.type+"'")};function hi(K,u){var h=Hr(["base"],K,u),f=Hr(["strut"]);return f.style.height=h.height+h.depth+"em",f.style.verticalAlign=-h.depth+"em",h.children.unshift(f),h}function fi(K,u){var h=null;K.length===1&&K[0].type==="tag"&&(h=K[0].tag,K=K[0].body);for(var f=fr(K,u,!0),v=[],R=[],j=0;j<f.length;j++)if(R.push(f[j]),f[j].hasClass("mbin")||f[j].hasClass("mrel")||f[j].hasClass("allowbreak")){for(var me=!1;j<f.length-1&&f[j+1].hasClass("mspace")&&!f[j+1].hasClass("newline");)j++,R.push(f[j]),f[j].hasClass("nobreak")&&(me=!0);me||(v.push(hi(R,u)),R=[])}else f[j].hasClass("newline")&&(R.pop(),R.length>0&&(v.push(hi(R,u)),R=[]),v.push(f[j]));R.length>0&&v.push(hi(R,u));var Ee;h&&(Ee=hi(fr(h,u,!0)),Ee.classes=["tag"],v.push(Ee));var Ge=Hr(["katex-html"],v);if(Ge.setAttribute("aria-hidden","true"),Ee){var lt=Ee.children[0];lt.style.height=Ge.height+Ge.depth+"em",lt.style.verticalAlign=-Ge.depth+"em"}return Ge}function si(K){return new Le(K)}var Ur=function(){function K(h,f){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=h,this.attributes={},this.children=f||[]}var u=K.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},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 v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&f.setAttribute(v,this.attributes[v]);for(var R=0;R<this.children.length;R++)f.appendChild(this.children[R].toNode());return f},u.toMarkup=function(){var f="<"+this.type;for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+'="',f+=H.escape(this.attributes[v]),f+='"');f+=">";for(var R=0;R<this.children.length;R++)f+=this.children[R].toMarkup();return f+="</"+this.type+">",f},u.toText=function(){return this.children.map(function(f){return f.toText()}).join("")},K}(),An=function(){function K(h){this.text=void 0,this.text=h}var u=K.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return H.escape(this.toText())},u.toText=function(){return this.text},K}(),Ii=function(){function K(h){this.width=void 0,this.character=void 0,this.width=h,h>=.05555&&h<=.05556?this.character="\u200A":h>=.1666&&h<=.1667?this.character="\u2009":h>=.2222&&h<=.2223?this.character="\u2005":h>=.2777&&h<=.2778?this.character="\u2005\u200A":h>=-.05556&&h<=-.05555?this.character="\u200A\u2063":h>=-.1667&&h<=-.1666?this.character="\u2009\u2063":h>=-.2223&&h<=-.2222?this.character="\u205F\u2063":h>=-.2778&&h<=-.2777?this.character="\u2005\u2063":this.character=null}var u=K.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:" "},K}(),Ht={MathNode:Ur,TextNode:An,SpaceNode:Ii,newDocumentFragment:si},zr=function(u,h,f){return Ct[h][u]&&Ct[h][u].replace&&u.charCodeAt(0)!==55349&&!(wt.hasOwnProperty(u)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(u=Ct[h][u].replace),new Ht.TextNode(u)},Ri=function(u){return u.length===1?u[0]:new Ht.MathNode("mrow",u)},Ei=function(u,h){if(h.fontFamily==="texttt")return"monospace";if(h.fontFamily==="textsf")return h.fontShape==="textit"&&h.fontWeight==="textbf"?"sans-serif-bold-italic":h.fontShape==="textit"?"sans-serif-italic":h.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(h.fontShape==="textit"&&h.fontWeight==="textbf")return"bold-italic";if(h.fontShape==="textit")return"italic";if(h.fontWeight==="textbf")return"bold";var f=h.font;if(!f||f==="mathnormal")return null;var v=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 R=u.text;if(H.contains(["\\imath","\\jmath"],R))return null;Ct[v][R]&&Ct[v][R].replace&&(R=Ct[v][R].replace);var j=bt.fontMap[f].fontName;return gt(R,j,v)?bt.fontMap[f].variant:null},Gr=function(u,h,f){if(u.length===1){var v=Cn(u[0],h);return f&&v instanceof Ur&&v.type==="mo"&&(v.setAttribute("lspace","0em"),v.setAttribute("rspace","0em")),[v]}for(var R=[],j,me=0;me<u.length;me++){var Ee=Cn(u[me],h);if(Ee instanceof Ur&&j instanceof Ur){if(Ee.type==="mtext"&&j.type==="mtext"&&Ee.getAttribute("mathvariant")===j.getAttribute("mathvariant")){var Ge;(Ge=j.children).push.apply(Ge,Ee.children);continue}else if(Ee.type==="mn"&&j.type==="mn"){var lt;(lt=j.children).push.apply(lt,Ee.children);continue}else if(Ee.type==="mi"&&Ee.children.length===1&&j.type==="mn"){var xt=Ee.children[0];if(xt instanceof An&&xt.text==="."){var Mt;(Mt=j.children).push.apply(Mt,Ee.children);continue}}else if(j.type==="mi"&&j.children.length===1){var zt=j.children[0];if(zt instanceof An&&zt.text==="\u0338"&&(Ee.type==="mo"||Ee.type==="mi"||Ee.type==="mn")){var Wt=Ee.children[0];Wt instanceof An&&Wt.text.length>0&&(Wt.text=Wt.text.slice(0,1)+"\u0338"+Wt.text.slice(1),R.pop())}}}R.push(Ee),j=Ee}return R},Qr=function(u,h,f){return Ri(Gr(u,h,f))},Cn=function(u,h){if(!u)return new Ht.MathNode("mrow");if(yn[u.type]){var f=yn[u.type](u,h);return f}else throw new m("Got group of unknown type: '"+u.type+"'")};function Kr(K,u,h,f){var v=Gr(K,h),R;v.length===1&&v[0]instanceof Ur&&H.contains(["mrow","mtable"],v[0].type)?R=v[0]:R=new Ht.MathNode("mrow",v);var j=new Ht.MathNode("annotation",[new Ht.TextNode(u)]);j.setAttribute("encoding","application/x-tex");var me=new Ht.MathNode("semantics",[R,j]),Ee=new Ht.MathNode("math",[me]);Ee.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Ge=f?"katex":"katex-mathml";return bt.makeSpan([Ge],[Ee])}var ai=function(u){return new Mn({style:u.displayMode?y.DISPLAY:y.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},Li=function(u,h){if(h.displayMode){var f=["katex-display"];h.leqno&&f.push("leqno"),h.fleqn&&f.push("fleqn"),u=bt.makeSpan(f,[u])}return u},$r=function(u,h,f){var v=ai(f),R;if(f.output==="mathml")return Kr(u,h,v,!0);if(f.output==="html"){var j=fi(u,v);R=bt.makeSpan(["katex"],[j])}else{var me=Kr(u,h,v,!1),Ee=fi(u,v);R=bt.makeSpan(["katex"],[me,Ee])}return Li(R,f)},Lr=function(u,h,f){var v=ai(f),R=fi(u,v),j=bt.makeSpan(["katex"],[R]);return Li(j,f)},qr=$r,Jr={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"},Si=function(u){var h=new Ht.MathNode("mo",[new Ht.TextNode(Jr[u.substr(1)])]);return h.setAttribute("stretchy","true"),h},pi={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]},Gi=function(u){return u.type==="ordgroup"?u.body.length:1},Xi=function(u,h){function f(){var Ee=4e5,Ge=u.label.substr(1);if(H.contains(["widehat","widecheck","widetilde","utilde"],Ge)){var lt=u,xt=Gi(lt.base),Mt,zt,Wt;if(xt>5)Ge==="widehat"||Ge==="widecheck"?(Mt=420,Ee=2364,Wt=.42,zt=Ge+"4"):(Mt=312,Ee=2340,Wt=.34,zt="tilde4");else{var Jt=[1,1,2,2,3,3][xt];Ge==="widehat"||Ge==="widecheck"?(Ee=[0,1062,2364,2364,2364][Jt],Mt=[0,239,300,360,420][Jt],Wt=[0,.24,.3,.3,.36,.42][Jt],zt=Ge+Jt):(Ee=[0,600,1033,2339,2340][Jt],Mt=[0,260,286,306,312][Jt],Wt=[0,.26,.286,.3,.306,.34][Jt],zt="tilde"+Jt)}var vn=new Me(zt),En=new _e([vn],{width:"100%",height:Wt+"em",viewBox:"0 0 "+Ee+" "+Mt,preserveAspectRatio:"none"});return{span:bt.makeSvgSpan([],[En],h),minWidth:0,height:Wt}}else{var Un=[],Jn=pi[Ge],kr=Jn[0],Cr=Jn[1],Or=Jn[2],Pr=Or/1e3,Rr=kr.length,ci,Fr;if(Rr===1){var ht=Jn[3];ci=["hide-tail"],Fr=[ht]}else if(Rr===2)ci=["halfarrow-left","halfarrow-right"],Fr=["xMinYMin","xMaxYMin"];else if(Rr===3)ci=["brace-left","brace-center","brace-right"],Fr=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+Rr+" children.");for(var Ci=0;Ci<Rr;Ci++){var Wi=new Me(kr[Ci]),Ui=new _e([Wi],{width:"400em",height:Pr+"em",viewBox:"0 0 "+Ee+" "+Or,preserveAspectRatio:Fr[Ci]+" slice"}),Zr=bt.makeSvgSpan([ci[Ci]],[Ui],h);if(Rr===1)return{span:Zr,minWidth:Cr,height:Pr};Zr.style.height=Pr+"em",Un.push(Zr)}return{span:bt.makeSpan(["stretchy"],Un,h),minWidth:Cr,height:Pr}}}var v=f(),R=v.span,j=v.minWidth,me=v.height;return R.height=me,R.style.height=me+"em",j>0&&(R.style.minWidth=j+"em"),R},Mi=function(u,h,f,v){var R,j=u.height+u.depth+2*f;if(/fbox|color/.test(h)){if(R=bt.makeSpan(["stretchy",h],[],v),h==="fbox"){var me=v.color&&v.getColor();me&&(R.style.borderColor=me)}}else{var Ee=[];/^[bx]cancel$/.test(h)&&Ee.push(new Fe({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(h)&&Ee.push(new Fe({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Ge=new _e(Ee,{width:"100%",height:j+"em"});R=bt.makeSvgSpan([],[Ge],v)}return R.height=j,R.style.height=j+"em",R},mi={encloseSpan:Mi,mathMLnode:Si,svgSpan:Xi},sn=function(u,h){var f,v,R=Yn(u,"supsub"),j;R?(v=mn(R.base,"accent"),f=v.base,R.base=f,j=Qe(jn(R,h)),R.base=v):(v=mn(u,"accent"),f=v.base);var me=jn(f,h.havingCrampedStyle()),Ee=v.isShifty&&H.isCharacterBox(f),Ge=0;if(Ee){var lt=H.getBaseElem(f),xt=jn(lt,h.havingCrampedStyle());Ge=Ze(xt).skew}var Mt=Math.min(me.height,h.fontMetrics().xHeight),zt;if(v.isStretchy)zt=mi.svgSpan(v,h),zt=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:me},{type:"elem",elem:zt,wrapperClasses:["svg-align"],wrapperStyle:Ge>0?{width:"calc(100% - "+2*Ge+"em)",marginLeft:2*Ge+"em"}:void 0}]},h);else{var Wt,Jt;v.label==="\\vec"?(Wt=bt.staticSvg("vec",h),Jt=bt.svgData.vec[1]):(Wt=bt.makeOrd({mode:v.mode,text:v.label},h,"textord"),Wt=Ze(Wt),Wt.italic=0,Jt=Wt.width),zt=bt.makeSpan(["accent-body"],[Wt]);var vn=v.label==="\\textcircled";vn&&(zt.classes.push("accent-full"),Mt=me.height);var En=Ge;vn||(En-=Jt/2),zt.style.left=En+"em",v.label==="\\textcircled"&&(zt.style.top=".2em"),zt=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:me},{type:"kern",size:-Mt},{type:"elem",elem:zt}]},h)}var Un=bt.makeSpan(["mord","accent"],[zt],h);return j?(j.children[0]=Un,j.height=Math.max(Un.height,j.height),j.classes[0]="mord",j):Un},Dn=function(u,h){var f=u.isStretchy?mi.mathMLnode(u.label):new Ht.MathNode("mo",[zr(u.label,u.mode)]),v=new Ht.MathNode("mover",[Cn(u.base,h),f]);return v.setAttribute("accent","true"),v},pr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(K){return"\\"+K}).join("|"));Yt({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,h){var f=h[0],v=!pr.test(u.funcName),R=!v||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:v,isShifty:R,base:f}},htmlBuilder:sn,mathmlBuilder:Dn}),Yt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,h){var f=h[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:f}},htmlBuilder:sn,mathmlBuilder:Dn}),Yt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0];return{type:"accentUnder",mode:f.mode,label:v,base:R}},htmlBuilder:function(u,h){var f=jn(u.base,h),v=mi.svgSpan(u,h),R=u.label==="\\utilde"?.12:0,j=bt.makeVList({positionType:"bottom",positionData:v.height+R,children:[{type:"elem",elem:v,wrapperClasses:["svg-align"]},{type:"kern",size:R},{type:"elem",elem:f}]},h);return bt.makeSpan(["mord","accentunder"],[j],h)},mathmlBuilder:function(u,h){var f=mi.mathMLnode(u.label),v=new Ht.MathNode("munder",[Cn(u.base,h),f]);return v.setAttribute("accentunder","true"),v}});var $n=function(u){var h=new Ht.MathNode("mpadded",u?[u]:[]);return h.setAttribute("width","+0.6em"),h.setAttribute("lspace","0.3em"),h};Yt({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,h,f){var v=u.parser,R=u.funcName;return{type:"xArrow",mode:v.mode,label:R,body:h[0],below:f[0]}},htmlBuilder:function(u,h){var f=h.style,v=h.havingStyle(f.sup()),R=bt.wrapFragment(jn(u.body,v,h),h);R.classes.push("x-arrow-pad");var j;u.below&&(v=h.havingStyle(f.sub()),j=bt.wrapFragment(jn(u.below,v,h),h),j.classes.push("x-arrow-pad"));var me=mi.svgSpan(u,h),Ee=-h.fontMetrics().axisHeight+.5*me.height,Ge=-h.fontMetrics().axisHeight-.5*me.height-.111;(R.depth>.25||u.label==="\\xleftequilibrium")&&(Ge-=R.depth);var lt;if(j){var xt=-h.fontMetrics().axisHeight+j.height+.5*me.height+.111;lt=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:R,shift:Ge},{type:"elem",elem:me,shift:Ee},{type:"elem",elem:j,shift:xt}]},h)}else lt=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:R,shift:Ge},{type:"elem",elem:me,shift:Ee}]},h);return lt.children[0].children[0].children[1].classes.push("svg-align"),bt.makeSpan(["mrel","x-arrow"],[lt],h)},mathmlBuilder:function(u,h){var f=mi.mathMLnode(u.label),v;if(u.body){var R=$n(Cn(u.body,h));if(u.below){var j=$n(Cn(u.below,h));v=new Ht.MathNode("munderover",[f,j,R])}else v=new Ht.MathNode("mover",[f,R])}else if(u.below){var me=$n(Cn(u.below,h));v=new Ht.MathNode("munder",[f,me])}else v=$n(),v=new Ht.MathNode("mover",[f,v]);return v}}),Yt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){for(var f=u.parser,v=mn(h[0],"ordgroup"),R=v.body,j="",me=0;me<R.length;me++){var Ee=mn(R[me],"textord");j+=Ee.text}var Ge=parseInt(j);if(isNaN(Ge))throw new m("\\@char has non-numeric argument "+j);return{type:"textord",mode:f.mode,text:String.fromCharCode(Ge)}}});var Xn=function(u,h){var f=fr(u.body,h.withColor(u.color),!1);return bt.makeFragment(f)},wi=function(u,h){var f=Gr(u.body,h.withColor(u.color)),v=new Ht.MathNode("mstyle",f);return v.setAttribute("mathcolor",u.color),v};Yt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,h){var f=u.parser,v=mn(h[0],"color-token").color,R=h[1];return{type:"color",mode:f.mode,color:v,body:rr(R)}},htmlBuilder:Xn,mathmlBuilder:wi}),Yt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,h){var f=u.parser,v=u.breakOnTokenText,R=mn(h[0],"color-token").color;f.gullet.macros.set("\\current@color",R);var j=f.parseExpression(!0,v);return{type:"color",mode:f.mode,color:R,body:j}},htmlBuilder:Xn,mathmlBuilder:wi}),Yt({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h,f){var v=u.parser,R=u.funcName,j=f[0],me=R==="\\cr",Ee=!1;return me||(v.settings.displayMode&&v.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Ee=!1:Ee=!0),{type:"cr",mode:v.mode,newLine:Ee,newRow:me,size:j&&mn(j,"size").value}},htmlBuilder:function(u,h){if(u.newRow)throw new m("\\cr valid only within a tabular/array environment");var f=bt.makeSpan(["mspace"],[],h);return u.newLine&&(f.classes.push("newline"),u.size&&(f.style.marginTop=at(u.size,h)+"em")),f},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mspace");return u.newLine&&(f.setAttribute("linebreak","newline"),u.size&&f.setAttribute("height",at(u.size,h)+"em")),f}});var Vr=function(u,h,f){var v=Ct.math[u]&&Ct.math[u].replace,R=gt(v||u,h,f);if(!R)throw new Error("Unsupported symbol "+u+" and font size "+h+".");return R},ki=function(u,h,f,v){var R=f.havingBaseStyle(h),j=bt.makeSpan(v.concat(R.sizingClasses(f)),[u],f),me=R.sizeMultiplier/f.sizeMultiplier;return j.height*=me,j.depth*=me,j.maxFontSize=R.sizeMultiplier,j},Ki=function(u,h,f){var v=h.havingBaseStyle(f),R=(1-h.sizeMultiplier/v.sizeMultiplier)*h.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=R+"em",u.height-=R,u.depth+=R},na=function(u,h,f,v,R,j){var me=bt.makeSymbol(u,"Main-Regular",R,v),Ee=ki(me,h,v,j);return f&&Ki(Ee,v,h),Ee},Ea=function(u,h,f,v){return bt.makeSymbol(u,"Size"+h+"-Regular",f,v)},ra=function(u,h,f,v,R,j){var me=Ea(u,h,R,v),Ee=ki(bt.makeSpan(["delimsizing","size"+h],[me],v),y.TEXT,v,j);return f&&Ki(Ee,v,y.TEXT),Ee},Bi=function(u,h,f){var v;h==="Size1-Regular"?v="delim-size1":v="delim-size4";var R=bt.makeSpan(["delimsizinginner",v],[bt.makeSpan([],[bt.makeSymbol(u,h,f)])]);return{type:"elem",elem:R}},Ti={type:"kern",size:-.005},_i=function(u,h,f,v,R,j){var me,Ee,Ge,lt;me=Ge=lt=u,Ee=null;var xt="Size1-Regular";u==="\\uparrow"?Ge=lt="\u23D0":u==="\\Uparrow"?Ge=lt="\u2016":u==="\\downarrow"?me=Ge="\u23D0":u==="\\Downarrow"?me=Ge="\u2016":u==="\\updownarrow"?(me="\\uparrow",Ge="\u23D0",lt="\\downarrow"):u==="\\Updownarrow"?(me="\\Uparrow",Ge="\u2016",lt="\\Downarrow"):u==="["||u==="\\lbrack"?(me="\u23A1",Ge="\u23A2",lt="\u23A3",xt="Size4-Regular"):u==="]"||u==="\\rbrack"?(me="\u23A4",Ge="\u23A5",lt="\u23A6",xt="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(Ge=me="\u23A2",lt="\u23A3",xt="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(me="\u23A1",Ge=lt="\u23A2",xt="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(Ge=me="\u23A5",lt="\u23A6",xt="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(me="\u23A4",Ge=lt="\u23A5",xt="Size4-Regular"):u==="("||u==="\\lparen"?(me="\u239B",Ge="\u239C",lt="\u239D",xt="Size4-Regular"):u===")"||u==="\\rparen"?(me="\u239E",Ge="\u239F",lt="\u23A0",xt="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(me="\u23A7",Ee="\u23A8",lt="\u23A9",Ge="\u23AA",xt="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(me="\u23AB",Ee="\u23AC",lt="\u23AD",Ge="\u23AA",xt="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(me="\u23A7",lt="\u23A9",Ge="\u23AA",xt="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(me="\u23AB",lt="\u23AD",Ge="\u23AA",xt="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(me="\u23A7",lt="\u23AD",Ge="\u23AA",xt="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(me="\u23AB",lt="\u23A9",Ge="\u23AA",xt="Size4-Regular");var Mt=Vr(me,xt,R),zt=Mt.height+Mt.depth,Wt=Vr(Ge,xt,R),Jt=Wt.height+Wt.depth,vn=Vr(lt,xt,R),En=vn.height+vn.depth,Un=0,Jn=1;if(Ee!==null){var kr=Vr(Ee,xt,R);Un=kr.height+kr.depth,Jn=2}var Cr=zt+En+Un,Or=Math.max(0,Math.ceil((h-Cr)/(Jn*Jt))),Pr=Cr+Or*Jn*Jt,Rr=v.fontMetrics().axisHeight;f&&(Rr*=v.sizeMultiplier);var ci=Pr/2-Rr,Fr=(Or+1)*.005-Jt,ht=[];if(ht.push(Bi(lt,xt,R)),Ee===null)for(var Ci=0;Ci<Or;Ci++)ht.push(Ti),ht.push(Bi(Ge,xt,R));else{for(var Wi=0;Wi<Or;Wi++)ht.push(Ti),ht.push(Bi(Ge,xt,R));ht.push({type:"kern",size:Fr}),ht.push(Bi(Ge,xt,R)),ht.push(Ti),ht.push(Bi(Ee,xt,R));for(var Ui=0;Ui<Or;Ui++)ht.push(Ti),ht.push(Bi(Ge,xt,R))}ht.push({type:"kern",size:Fr}),ht.push(Bi(Ge,xt,R)),ht.push(Ti),ht.push(Bi(me,xt,R));var Zr=v.havingBaseStyle(y.TEXT),os=bt.makeVList({positionType:"bottom",positionData:ci,children:ht},Zr);return ki(bt.makeSpan(["delimsizing","mult"],[os],Zr),y.TEXT,v,j)},Ns=80,is=.08,Ni=function(u,h,f,v,R){var j=Ke(u,v,f),me=new Me(u,j),Ee=new _e([me],{width:"400em",height:h+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return bt.makeSvgSpan(["hide-tail"],[Ee],R)},Fs=function(u,h){var f=h.havingBaseSizing(),v=xs("\\surd",u*f.sizeMultiplier,$s,f),R=f.sizeMultiplier,j=Math.max(0,h.minRuleThickness-h.fontMetrics().sqrtRuleThickness),me,Ee=0,Ge=0,lt=0,xt;return v.type==="small"?(lt=1e3+1e3*j+Ns,u<1?R=1:u<1.4&&(R=.7),Ee=(1+j+is)/R,Ge=(1+j)/R,me=Ni("sqrtMain",Ee,lt,j,h),me.style.minWidth="0.853em",xt=.833/R):v.type==="large"?(lt=(1e3+Ns)*bs[v.size],Ge=(bs[v.size]+j)/R,Ee=(bs[v.size]+j+is)/R,me=Ni("sqrtSize"+v.size,Ee,lt,j,h),me.style.minWidth="1.02em",xt=1/R):(Ee=u+j+is,Ge=u+j,lt=Math.floor(1e3*u+j)+Ns,me=Ni("sqrtTall",Ee,lt,j,h),me.style.minWidth="0.742em",xt=1.056),me.height=Ge,me.style.height=Ee+"em",{span:me,advanceWidth:xt,ruleWidth:(h.fontMetrics().sqrtRuleThickness+j)*R}},_s=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Sa=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],hs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],bs=[0,1.2,1.8,2.4,3],Ai=function(u,h,f,v,R){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),H.contains(_s,u)||H.contains(hs,u))return ra(u,h,!1,f,v,R);if(H.contains(Sa,u))return _i(u,bs[h],!1,f,v,R);throw new m("Illegal delimiter: '"+u+"'")},ia=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wa=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"stack"}],$s=[{type:"small",style:y.SCRIPTSCRIPT},{type:"small",style:y.SCRIPT},{type:"small",style:y.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],sa=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.")},xs=function(u,h,f,v){for(var R=Math.min(2,3-v.style.size),j=R;j<f.length&&f[j].type!=="stack";j++){var me=Vr(u,sa(f[j]),"math"),Ee=me.height+me.depth;if(f[j].type==="small"){var Ge=v.havingBaseStyle(f[j].style);Ee*=Ge.sizeMultiplier}if(Ee>h)return f[j]}return f[f.length-1]},qi=function(u,h,f,v,R,j){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var me;H.contains(hs,u)?me=ia:H.contains(_s,u)?me=$s:me=wa;var Ee=xs(u,h,me,v);return Ee.type==="small"?na(u,Ee.style,f,v,R,j):Ee.type==="large"?ra(u,Ee.size,f,v,R,j):_i(u,h,f,v,R,j)},Us=function(u,h,f,v,R,j){var me=v.fontMetrics().axisHeight*v.sizeMultiplier,Ee=901,Ge=5/v.fontMetrics().ptPerEm,lt=Math.max(h-me,f+me),xt=Math.max(lt/500*Ee,2*lt-Ge);return qi(u,xt,!0,v,R,j)},Oi={sqrtImage:Fs,sizedDelim:Ai,customSizedDelim:qi,leftRightDelim:Us},zs={"\\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}},aa=["(","\\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 gi(K,u){var h=Er(K);if(h&&H.contains(aa,h.text))return h;throw new m("Invalid delimiter: '"+(h?h.text:JSON.stringify(K))+"' after '"+u.funcName+"'",K)}Yt({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,h){var f=gi(h[0],u);return{type:"delimsizing",mode:u.parser.mode,size:zs[u.funcName].size,mclass:zs[u.funcName].mclass,delim:f.text}},htmlBuilder:function(u,h){return u.delim==="."?bt.makeSpan([u.mclass]):Oi.sizedDelim(u.delim,u.size,h,u.mode,[u.mclass])},mathmlBuilder:function(u){var h=[];u.delim!=="."&&h.push(zr(u.delim,u.mode));var f=new Ht.MathNode("mo",h);return u.mclass==="mopen"||u.mclass==="mclose"?f.setAttribute("fence","true"):f.setAttribute("fence","false"),f}});function ss(K){if(!K.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Yt({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,h){var f=u.parser.gullet.macros.get("\\current@color");if(f&&typeof f!="string")throw new m("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:gi(h[0],u).text,color:f}}}),Yt({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,h){var f=gi(h[0],u),v=u.parser;++v.leftrightDepth;var R=v.parseExpression(!1);--v.leftrightDepth,v.expect("\\right",!1);var j=mn(v.parseFunction(),"leftright-right");return{type:"leftright",mode:v.mode,body:R,left:f.text,right:j.delim,rightColor:j.color}},htmlBuilder:function(u,h){ss(u);for(var f=fr(u.body,h,!0,["mopen","mclose"]),v=0,R=0,j=!1,me=0;me<f.length;me++)f[me].isMiddle?j=!0:(v=Math.max(f[me].height,v),R=Math.max(f[me].depth,R));v*=h.sizeMultiplier,R*=h.sizeMultiplier;var Ee;if(u.left==="."?Ee=ri(h,["mopen"]):Ee=Oi.leftRightDelim(u.left,v,R,h,u.mode,["mopen"]),f.unshift(Ee),j)for(var Ge=1;Ge<f.length;Ge++){var lt=f[Ge],xt=lt.isMiddle;xt&&(f[Ge]=Oi.leftRightDelim(xt.delim,v,R,xt.options,u.mode,[]))}var Mt;if(u.right===".")Mt=ri(h,["mclose"]);else{var zt=u.rightColor?h.withColor(u.rightColor):h;Mt=Oi.leftRightDelim(u.right,v,R,zt,u.mode,["mclose"])}return f.push(Mt),bt.makeSpan(["minner"],f,h)},mathmlBuilder:function(u,h){ss(u);var f=Gr(u.body,h);if(u.left!=="."){var v=new Ht.MathNode("mo",[zr(u.left,u.mode)]);v.setAttribute("fence","true"),f.unshift(v)}if(u.right!=="."){var R=new Ht.MathNode("mo",[zr(u.right,u.mode)]);R.setAttribute("fence","true"),u.rightColor&&R.setAttribute("mathcolor",u.rightColor),f.push(R)}return Ri(f)}}),Yt({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,h){var f=gi(h[0],u);if(!u.parser.leftrightDepth)throw new m("\\middle without preceding \\left",f);return{type:"middle",mode:u.parser.mode,delim:f.text}},htmlBuilder:function(u,h){var f;if(u.delim===".")f=ri(h,[]);else{f=Oi.sizedDelim(u.delim,1,h,u.mode,[]);var v={delim:u.delim,options:h};f.isMiddle=v}return f},mathmlBuilder:function(u,h){var f=u.delim==="\\vert"||u.delim==="|"?zr("|","text"):zr(u.delim,u.mode),v=new Ht.MathNode("mo",[f]);return v.setAttribute("fence","true"),v.setAttribute("lspace","0.05em"),v.setAttribute("rspace","0.05em"),v}});var fs=function(u,h){var f=bt.wrapFragment(jn(u.body,h),h),v=u.label.substr(1),R=h.sizeMultiplier,j,me=0,Ee=H.isCharacterBox(u.body);if(v==="sout")j=bt.makeSpan(["stretchy","sout"]),j.height=h.fontMetrics().defaultRuleThickness/R,me=-.5*h.fontMetrics().xHeight;else{/cancel/.test(v)?Ee||f.classes.push("cancel-pad"):f.classes.push("boxpad");var Ge=0,lt=0;/box/.test(v)?(lt=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness),Ge=h.fontMetrics().fboxsep+(v==="colorbox"?0:lt)):Ge=Ee?.2:0,j=mi.encloseSpan(f,v,Ge,h),/fbox|boxed|fcolorbox/.test(v)&&(j.style.borderStyle="solid",j.style.borderWidth=lt+"em"),me=f.depth+Ge,u.backgroundColor&&(j.style.backgroundColor=u.backgroundColor,u.borderColor&&(j.style.borderColor=u.borderColor))}var xt;return u.backgroundColor?xt=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:j,shift:me},{type:"elem",elem:f,shift:0}]},h):xt=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:j,shift:me,wrapperClasses:/cancel/.test(v)?["svg-align"]:[]}]},h),/cancel/.test(v)&&(xt.height=f.height,xt.depth=f.depth),/cancel/.test(v)&&!Ee?bt.makeSpan(["mord","cancel-lap"],[xt],h):bt.makeSpan(["mord"],[xt],h)},Es=function(u,h){var f=0,v=new Ht.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Cn(u.body,h)]);switch(u.label){case"\\cancel":v.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":v.setAttribute("notation","downdiagonalstrike");break;case"\\sout":v.setAttribute("notation","horizontalstrike");break;case"\\fbox":v.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=h.fontMetrics().fboxsep*h.fontMetrics().ptPerEm,v.setAttribute("width","+"+2*f+"pt"),v.setAttribute("height","+"+2*f+"pt"),v.setAttribute("lspace",f+"pt"),v.setAttribute("voffset",f+"pt"),u.label==="\\fcolorbox"){var R=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness);v.setAttribute("style","border: "+R+"em solid "+String(u.borderColor))}break;case"\\xcancel":v.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&v.setAttribute("mathbackground",u.backgroundColor),v};Yt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,h,f){var v=u.parser,R=u.funcName,j=mn(h[0],"color-token").color,me=h[1];return{type:"enclose",mode:v.mode,label:R,backgroundColor:j,body:me}},htmlBuilder:fs,mathmlBuilder:Es}),Yt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,h,f){var v=u.parser,R=u.funcName,j=mn(h[0],"color-token").color,me=mn(h[1],"color-token").color,Ee=h[2];return{type:"enclose",mode:v.mode,label:R,backgroundColor:me,borderColor:j,body:Ee}},htmlBuilder:fs,mathmlBuilder:Es}),Yt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,h){var f=u.parser;return{type:"enclose",mode:f.mode,label:"\\fbox",body:h[0]}}}),Yt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,h,f){var v=u.parser,R=u.funcName,j=h[0];return{type:"enclose",mode:v.mode,label:R,body:j}},htmlBuilder:fs,mathmlBuilder:Es});var oa={};function Fi(K){for(var u=K.type,h=K.names,f=K.props,v=K.handler,R=K.htmlBuilder,j=K.mathmlBuilder,me={type:u,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:v},Ee=0;Ee<h.length;++Ee)oa[h[Ee]]=me;R&&(Fn[u]=R),j&&(yn[u]=j)}function la(K){var u=[];K.consumeSpaces();for(var h=K.fetch().text;h==="\\hline"||h==="\\hdashline";)K.consume(),u.push(h==="\\hdashline"),K.consumeSpaces(),h=K.fetch().text;return u}function Qi(K,u,h){var f=u.hskipBeforeAndAfter,v=u.addJot,R=u.cols,j=u.arraystretch,me=u.colSeparationType;if(K.gullet.beginGroup(),K.gullet.macros.set("\\\\","\\cr"),!j){var Ee=K.gullet.expandMacroAsText("\\arraystretch");if(Ee==null)j=1;else if(j=parseFloat(Ee),!j||j<0)throw new m("Invalid \\arraystretch: "+Ee)}K.gullet.beginGroup();var Ge=[],lt=[Ge],xt=[],Mt=[];for(Mt.push(la(K));;){var zt=K.parseExpression(!1,"\\cr");K.gullet.endGroup(),K.gullet.beginGroup(),zt={type:"ordgroup",mode:K.mode,body:zt},h&&(zt={type:"styling",mode:K.mode,style:h,body:[zt]}),Ge.push(zt);var Wt=K.fetch().text;if(Wt==="&")K.consume();else if(Wt==="\\end"){Ge.length===1&&zt.type==="styling"&&zt.body[0].body.length===0&&lt.pop(),Mt.length<lt.length+1&&Mt.push([]);break}else if(Wt==="\\cr"){var Jt=mn(K.parseFunction(),"cr");xt.push(Jt.size),Mt.push(la(K)),Ge=[],lt.push(Ge)}else throw new m("Expected & or \\\\ or \\cr or \\end",K.nextToken)}return K.gullet.endGroup(),K.gullet.endGroup(),{type:"array",mode:K.mode,addJot:v,arraystretch:j,body:lt,cols:R,rowGaps:xt,hskipBeforeAndAfter:f,hLinesBeforeRow:Mt,colSeparationType:me}}function Ss(K){return K.substr(0,1)==="d"?"display":"text"}var $i=function(u,h){var f,v,R=u.body.length,j=u.hLinesBeforeRow,me=0,Ee=new Array(R),Ge=[],lt=Math.max(h.fontMetrics().arrayRuleWidth,h.minRuleThickness),xt=1/h.fontMetrics().ptPerEm,Mt=5*xt;if(u.colSeparationType&&u.colSeparationType==="small"){var zt=h.havingStyle(y.SCRIPT).sizeMultiplier;Mt=.2778*(zt/h.sizeMultiplier)}var Wt=12*xt,Jt=3*xt,vn=u.arraystretch*Wt,En=.7*vn,Un=.3*vn,Jn=0;function kr(Xs){for(var ga=0;ga<Xs.length;++ga)ga>0&&(Jn+=.25),Ge.push({pos:Jn,isDashed:Xs[ga]})}for(kr(j[0]),f=0;f<u.body.length;++f){var Cr=u.body[f],Or=En,Pr=Un;me<Cr.length&&(me=Cr.length);var Rr=new Array(Cr.length);for(v=0;v<Cr.length;++v){var ci=jn(Cr[v],h);Pr<ci.depth&&(Pr=ci.depth),Or<ci.height&&(Or=ci.height),Rr[v]=ci}var Fr=u.rowGaps[f],ht=0;Fr&&(ht=at(Fr,h),ht>0&&(ht+=Un,Pr<ht&&(Pr=ht),ht=0)),u.addJot&&(Pr+=Jt),Rr.height=Or,Rr.depth=Pr,Jn+=Or,Rr.pos=Jn,Jn+=Pr+ht,Ee[f]=Rr,kr(j[f+1])}var Ci=Jn/2+h.fontMetrics().axisHeight,Wi=u.cols||[],Ui=[],Zr,os;for(v=0,os=0;v<me||os<Wi.length;++v,++os){for(var Vi=Wi[os]||{},lo=!0;Vi.type==="separator";){if(lo||(Zr=bt.makeSpan(["arraycolsep"],[]),Zr.style.width=h.fontMetrics().doubleRuleSep+"em",Ui.push(Zr)),Vi.separator==="|"||Vi.separator===":"){var No=Vi.separator==="|"?"solid":"dashed",ks=bt.makeSpan(["vertical-separator"],[],h);ks.style.height=Jn+"em",ks.style.borderRightWidth=lt+"em",ks.style.borderRightStyle=No,ks.style.margin="0 -"+lt/2+"em",ks.style.verticalAlign=-(Jn-Ci)+"em",Ui.push(ks)}else throw new m("Invalid separator type: "+Vi.separator);os++,Vi=Wi[os]||{},lo=!1}if(!(v>=me)){var Os=void 0;(v>0||u.hskipBeforeAndAfter)&&(Os=H.deflt(Vi.pregap,Mt),Os!==0&&(Zr=bt.makeSpan(["arraycolsep"],[]),Zr.style.width=Os+"em",Ui.push(Zr)));var zi=[];for(f=0;f<R;++f){var Ps=Ee[f],Ys=Ps[v];if(Ys){var pa=Ps.pos-Ci;Ys.depth=Ps.depth,Ys.height=Ps.height,zi.push({type:"elem",elem:Ys,shift:pa})}}zi=bt.makeVList({positionType:"individualShift",children:zi},h),zi=bt.makeSpan(["col-align-"+(Vi.align||"c")],[zi]),Ui.push(zi),(v<me-1||u.hskipBeforeAndAfter)&&(Os=H.deflt(Vi.postgap,Mt),Os!==0&&(Zr=bt.makeSpan(["arraycolsep"],[]),Zr.style.width=Os+"em",Ui.push(Zr)))}}if(Ee=bt.makeSpan(["mtable"],Ui),Ge.length>0){for(var Di=bt.makeLineSpan("hline",h,lt),Fo=bt.makeLineSpan("hdashline",h,lt),ma=[{type:"elem",elem:Ee,shift:0}];Ge.length>0;){var Na=Ge.pop(),uo=Na.pos-Ci;Na.isDashed?ma.push({type:"elem",elem:Fo,shift:uo}):ma.push({type:"elem",elem:Di,shift:uo})}Ee=bt.makeVList({positionType:"individualShift",children:ma},h)}return bt.makeSpan(["mord"],[Ee],h)},js={c:"center ",l:"left ",r:"right "},gr=function(u,h){var f=new Ht.MathNode("mtable",u.body.map(function(Jn){return new Ht.MathNode("mtr",Jn.map(function(kr){return new Ht.MathNode("mtd",[Cn(kr,h)])}))})),v=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);f.setAttribute("rowspacing",v+"em");var R="",j="";if(u.cols){var me=u.cols,Ee="",Ge=!1,lt=0,xt=me.length;me[0].type==="separator"&&(R+="top ",lt=1),me[me.length-1].type==="separator"&&(R+="bottom ",xt-=1);for(var Mt=lt;Mt<xt;Mt++)me[Mt].type==="align"?(j+=js[me[Mt].align],Ge&&(Ee+="none "),Ge=!0):me[Mt].type==="separator"&&Ge&&(Ee+=me[Mt].separator==="|"?"solid ":"dashed ",Ge=!1);f.setAttribute("columnalign",j.trim()),/[sd]/.test(Ee)&&f.setAttribute("columnlines",Ee.trim())}if(u.colSeparationType==="align"){for(var zt=u.cols||[],Wt="",Jt=1;Jt<zt.length;Jt++)Wt+=Jt%2?"0em ":"1em ";f.setAttribute("columnspacing",Wt.trim())}else u.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var vn="",En=u.hLinesBeforeRow;R+=En[0].length>0?"left ":"",R+=En[En.length-1].length>0?"right ":"";for(var Un=1;Un<En.length-1;Un++)vn+=En[Un].length===0?"none ":En[Un][0]?"dashed ":"solid ";return/[sd]/.test(vn)&&f.setAttribute("rowlines",vn.trim()),R!==""&&(f=new Ht.MathNode("menclose",[f]),f.setAttribute("notation",R.trim())),u.arraystretch&&u.arraystretch<1&&(f=new Ht.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},vr=function(u,h){var f=[],v=Qi(u.parser,{cols:f,addJot:!0},"display"),R,j=0,me={type:"ordgroup",mode:u.mode,body:[]},Ee=Yn(h[0],"ordgroup");if(Ee){for(var Ge="",lt=0;lt<Ee.body.length;lt++){var xt=mn(Ee.body[lt],"textord");Ge+=xt.text}R=Number(Ge),j=R*2}var Mt=!j;v.body.forEach(function(vn){for(var En=1;En<vn.length;En+=2){var Un=mn(vn[En],"styling"),Jn=mn(Un.body[0],"ordgroup");Jn.body.unshift(me)}if(Mt)j<vn.length&&(j=vn.length);else{var kr=vn.length/2;if(R<kr)throw new m("Too many math in a row: "+("expected "+R+", but got "+kr),vn[0])}});for(var zt=0;zt<j;++zt){var Wt="r",Jt=0;zt%2===1?Wt="l":zt>0&&Mt&&(Jt=1),f[zt]={type:"align",align:Wt,pregap:Jt,postgap:0}}return v.colSeparationType=Mt?"align":"alignat",v};Fi({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,h){var f=Er(h[0]),v=f?[h[0]]:mn(h[0],"ordgroup").body,R=v.map(function(me){var Ee=Tr(me),Ge=Ee.text;if("lcr".indexOf(Ge)!==-1)return{type:"align",align:Ge};if(Ge==="|")return{type:"separator",separator:"|"};if(Ge===":")return{type:"separator",separator:":"};throw new m("Unknown column alignment: "+Ge,me)}),j={cols:R,hskipBeforeAndAfter:!0};return Qi(u.parser,j,Ss(u.envName))},htmlBuilder:$i,mathmlBuilder:gr}),Fi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var h={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],f={hskipBeforeAndAfter:!1},v=Qi(u.parser,f,Ss(u.envName));return h?{type:"leftright",mode:u.mode,body:[v],left:h[0],right:h[1],rightColor:void 0}:v},htmlBuilder:$i,mathmlBuilder:gr}),Fi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var h={arraystretch:.5},f=Qi(u.parser,h,"script");return f.colSeparationType="small",f},htmlBuilder:$i,mathmlBuilder:gr}),Fi({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,h){var f=Er(h[0]),v=f?[h[0]]:mn(h[0],"ordgroup").body,R=v.map(function(me){var Ee=Tr(me),Ge=Ee.text;if("lc".indexOf(Ge)!==-1)return{type:"align",align:Ge};throw new m("Unknown column alignment: "+Ge,me)});if(R.length>1)throw new m("{subarray} can contain only one column");var j={cols:R,hskipBeforeAndAfter:!1,arraystretch:.5};if(j=Qi(u.parser,j,"script"),j.body[0].length>1)throw new m("{subarray} can contain only one column");return j},htmlBuilder:$i,mathmlBuilder:gr}),Fi({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var h={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},f=Qi(u.parser,h,Ss(u.envName));return{type:"leftright",mode:u.mode,body:[f],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:$i,mathmlBuilder:gr}),Fi({type:"array",names:["aligned"],props:{numArgs:0},handler:vr,htmlBuilder:$i,mathmlBuilder:gr}),Fi({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var h={cols:[{type:"align",align:"c"}],addJot:!0};return Qi(u.parser,h,"display")},htmlBuilder:$i,mathmlBuilder:gr}),Fi({type:"array",names:["alignedat"],props:{numArgs:1},handler:vr,htmlBuilder:$i,mathmlBuilder:gr}),Yt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,h){throw new m(u.funcName+" valid only within array environment")}});var Ir=oa,ii=Ir;Yt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0];if(R.type!=="ordgroup")throw new m("Invalid environment name",R);for(var j="",me=0;me<R.body.length;++me)j+=mn(R.body[me],"textord").text;if(v==="\\begin"){if(!ii.hasOwnProperty(j))throw new m("No such environment: "+j,R);var Ee=ii[j],Ge=f.parseArguments("\\begin{"+j+"}",Ee),lt=Ge.args,xt=Ge.optArgs,Mt={mode:f.mode,envName:j,parser:f},zt=Ee.handler(Mt,lt,xt);f.expect("\\end",!1);var Wt=f.nextToken,Jt=mn(f.parseFunction(),"environment");if(Jt.name!==j)throw new m("Mismatch: \\begin{"+j+"} matched by \\end{"+Jt.name+"}",Wt);return zt}return{type:"environment",mode:f.mode,name:j,nameGroup:R}}});var oi=bt.makeSpan;function ps(K,u){var h=fr(K.body,u,!0);return oi([K.mclass],h,u)}function ms(K,u){var h,f=Gr(K.body,u);return K.mclass==="minner"?Ht.newDocumentFragment(f):(K.mclass==="mord"?K.isCharacterBox?(h=f[0],h.type="mi"):h=new Ht.MathNode("mi",f):(K.isCharacterBox?(h=f[0],h.type="mo"):h=new Ht.MathNode("mo",f),K.mclass==="mbin"?(h.attributes.lspace="0.22em",h.attributes.rspace="0.22em"):K.mclass==="mpunct"?(h.attributes.lspace="0em",h.attributes.rspace="0.17em"):(K.mclass==="mopen"||K.mclass==="mclose")&&(h.attributes.lspace="0em",h.attributes.rspace="0em")),h)}Yt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0];return{type:"mclass",mode:f.mode,mclass:"m"+v.substr(5),body:rr(R),isCharacterBox:H.isCharacterBox(R)}},htmlBuilder:ps,mathmlBuilder:ms});var Ji=function(u){var h=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return h.type==="atom"&&(h.family==="bin"||h.family==="rel")?"m"+h.family:"mord"};Yt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,h){var f=u.parser;return{type:"mclass",mode:f.mode,mclass:Ji(h[0]),body:[h[1]],isCharacterBox:H.isCharacterBox(h[1])}}}),Yt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[1],j=h[0],me;v!=="\\stackrel"?me=Ji(R):me="mrel";var Ee={type:"op",mode:R.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:v!=="\\stackrel",body:rr(R)},Ge={type:"supsub",mode:j.mode,base:Ee,sup:v==="\\underset"?null:j,sub:v==="\\underset"?j:null};return{type:"mclass",mode:f.mode,mclass:me,body:[Ge],isCharacterBox:H.isCharacterBox(Ge)}},htmlBuilder:ps,mathmlBuilder:ms});var Gs=function(u,h){var f=u.font,v=h.withFont(f);return jn(u.body,v)},ws=function(u,h){var f=u.font,v=h.withFont(f);return Cn(u.body,v)},es={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Yt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0],j=v;return j in es&&(j=es[j]),{type:"font",mode:f.mode,font:j.slice(1),body:R}},htmlBuilder:Gs,mathmlBuilder:ws}),Yt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,h){var f=u.parser,v=h[0],R=H.isCharacterBox(v);return{type:"mclass",mode:f.mode,mclass:Ji(v),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:v}],isCharacterBox:R}}}),Yt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,R=u.breakOnTokenText,j=f.mode,me=f.parseExpression(!0,R),Ee="math"+v.slice(1);return{type:"font",mode:j,font:Ee,body:{type:"ordgroup",mode:f.mode,body:me}}},htmlBuilder:Gs,mathmlBuilder:ws});var Ts=function(u,h){var f=h;return u==="display"?f=f.id>=y.SCRIPT.id?f.text():y.DISPLAY:u==="text"&&f.size===y.DISPLAY.size?f=y.TEXT:u==="script"?f=y.SCRIPT:u==="scriptscript"&&(f=y.SCRIPTSCRIPT),f},As=function(u,h){var f=Ts(u.size,h.style),v=f.fracNum(),R=f.fracDen(),j;j=h.havingStyle(v);var me=jn(u.numer,j,h);if(u.continued){var Ee=8.5/h.fontMetrics().ptPerEm,Ge=3.5/h.fontMetrics().ptPerEm;me.height=me.height<Ee?Ee:me.height,me.depth=me.depth<Ge?Ge:me.depth}j=h.havingStyle(R);var lt=jn(u.denom,j,h),xt,Mt,zt;u.hasBarLine?(u.barSize?(Mt=at(u.barSize,h),xt=bt.makeLineSpan("frac-line",h,Mt)):xt=bt.makeLineSpan("frac-line",h),Mt=xt.height,zt=xt.height):(xt=null,Mt=0,zt=h.fontMetrics().defaultRuleThickness);var Wt,Jt,vn;f.size===y.DISPLAY.size||u.size==="display"?(Wt=h.fontMetrics().num1,Mt>0?Jt=3*zt:Jt=7*zt,vn=h.fontMetrics().denom1):(Mt>0?(Wt=h.fontMetrics().num2,Jt=zt):(Wt=h.fontMetrics().num3,Jt=3*zt),vn=h.fontMetrics().denom2);var En;if(xt){var Jn=h.fontMetrics().axisHeight;Wt-me.depth-(Jn+.5*Mt)<Jt&&(Wt+=Jt-(Wt-me.depth-(Jn+.5*Mt))),Jn-.5*Mt-(lt.height-vn)<Jt&&(vn+=Jt-(Jn-.5*Mt-(lt.height-vn)));var kr=-(Jn-.5*Mt);En=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:lt,shift:vn},{type:"elem",elem:xt,shift:kr},{type:"elem",elem:me,shift:-Wt}]},h)}else{var Un=Wt-me.depth-(lt.height-vn);Un<Jt&&(Wt+=.5*(Jt-Un),vn+=.5*(Jt-Un)),En=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:lt,shift:vn},{type:"elem",elem:me,shift:-Wt}]},h)}j=h.havingStyle(f),En.height*=j.sizeMultiplier/h.sizeMultiplier,En.depth*=j.sizeMultiplier/h.sizeMultiplier;var Cr;f.size===y.DISPLAY.size?Cr=h.fontMetrics().delim1:Cr=h.fontMetrics().delim2;var Or,Pr;return u.leftDelim==null?Or=ri(h,["mopen"]):Or=Oi.customSizedDelim(u.leftDelim,Cr,!0,h.havingStyle(f),u.mode,["mopen"]),u.continued?Pr=bt.makeSpan([]):u.rightDelim==null?Pr=ri(h,["mclose"]):Pr=Oi.customSizedDelim(u.rightDelim,Cr,!0,h.havingStyle(f),u.mode,["mclose"]),bt.makeSpan(["mord"].concat(j.sizingClasses(h)),[Or,bt.makeSpan(["mfrac"],[En]),Pr],h)},Cs=function(u,h){var f=new Ht.MathNode("mfrac",[Cn(u.numer,h),Cn(u.denom,h)]);if(!u.hasBarLine)f.setAttribute("linethickness","0px");else if(u.barSize){var v=at(u.barSize,h);f.setAttribute("linethickness",v+"em")}var R=Ts(u.size,h.style);if(R.size!==h.style.size){f=new Ht.MathNode("mstyle",[f]);var j=R.size===y.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",j),f.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var me=[];if(u.leftDelim!=null){var Ee=new Ht.MathNode("mo",[new Ht.TextNode(u.leftDelim.replace("\\",""))]);Ee.setAttribute("fence","true"),me.push(Ee)}if(me.push(f),u.rightDelim!=null){var Ge=new Ht.MathNode("mo",[new Ht.TextNode(u.rightDelim.replace("\\",""))]);Ge.setAttribute("fence","true"),me.push(Ge)}return Ri(me)}return f};Yt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0],j=h[1],me,Ee=null,Ge=null,lt="auto";switch(v){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":me=!0;break;case"\\\\atopfrac":me=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":me=!1,Ee="(",Ge=")";break;case"\\\\bracefrac":me=!1,Ee="\\{",Ge="\\}";break;case"\\\\brackfrac":me=!1,Ee="[",Ge="]";break;default:throw new Error("Unrecognized genfrac command")}switch(v){case"\\cfrac":case"\\dfrac":case"\\dbinom":lt="display";break;case"\\tfrac":case"\\tbinom":lt="text";break}return{type:"genfrac",mode:f.mode,continued:v==="\\cfrac",numer:R,denom:j,hasBarLine:me,leftDelim:Ee,rightDelim:Ge,size:lt,barSize:null}},htmlBuilder:As,mathmlBuilder:Cs}),Yt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var h=u.parser,f=u.funcName,v=u.token,R;switch(f){case"\\over":R="\\frac";break;case"\\choose":R="\\binom";break;case"\\atop":R="\\\\atopfrac";break;case"\\brace":R="\\\\bracefrac";break;case"\\brack":R="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:h.mode,replaceWith:R,token:v}}});var li=["display","text","script","scriptscript"],vi=function(u){var h=null;return u.length>0&&(h=u,h=h==="."?null:h),h};Yt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,h){var f=u.parser,v=h[4],R=h[5],j=Yn(h[0],"atom");j&&(j=wr(h[0],"open"));var me=j?vi(j.text):null,Ee=Yn(h[1],"atom");Ee&&(Ee=wr(h[1],"close"));var Ge=Ee?vi(Ee.text):null,lt=mn(h[2],"size"),xt,Mt=null;lt.isBlank?xt=!0:(Mt=lt.value,xt=Mt.number>0);var zt="auto",Wt=Yn(h[3],"ordgroup");if(Wt){if(Wt.body.length>0){var Jt=mn(Wt.body[0],"textord");zt=li[Number(Jt.text)]}}else Wt=mn(h[3],"textord"),zt=li[Number(Wt.text)];return{type:"genfrac",mode:f.mode,numer:v,denom:R,continued:!1,hasBarLine:xt,barSize:Mt,leftDelim:me,rightDelim:Ge,size:zt}},htmlBuilder:As,mathmlBuilder:Cs}),Yt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,h){var f=u.parser,v=u.funcName,R=u.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:mn(h[0],"size").value,token:R}}}),Yt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0],j=Q(mn(h[1],"infix").size),me=h[2],Ee=j.number>0;return{type:"genfrac",mode:f.mode,numer:R,denom:me,continued:!1,hasBarLine:Ee,barSize:j,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:As,mathmlBuilder:Cs});var Ga=function(u,h){var f=h.style,v,R,j=Yn(u,"supsub");j?(v=j.sup?jn(j.sup,h.havingStyle(f.sup()),h):jn(j.sub,h.havingStyle(f.sub()),h),R=mn(j.base,"horizBrace")):R=mn(u,"horizBrace");var me=jn(R.base,h.havingBaseStyle(y.DISPLAY)),Ee=mi.svgSpan(R,h),Ge;if(R.isOver?(Ge=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:me},{type:"kern",size:.1},{type:"elem",elem:Ee}]},h),Ge.children[0].children[0].children[1].classes.push("svg-align")):(Ge=bt.makeVList({positionType:"bottom",positionData:me.depth+.1+Ee.height,children:[{type:"elem",elem:Ee},{type:"kern",size:.1},{type:"elem",elem:me}]},h),Ge.children[0].children[0].children[0].classes.push("svg-align")),v){var lt=bt.makeSpan(["mord",R.isOver?"mover":"munder"],[Ge],h);R.isOver?Ge=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:lt},{type:"kern",size:.2},{type:"elem",elem:v}]},h):Ge=bt.makeVList({positionType:"bottom",positionData:lt.depth+.2+v.height+v.depth,children:[{type:"elem",elem:v},{type:"kern",size:.2},{type:"elem",elem:lt}]},h)}return bt.makeSpan(["mord",R.isOver?"mover":"munder"],[Ge],h)},Nt=function(u,h){var f=mi.mathMLnode(u.label);return new Ht.MathNode(u.isOver?"mover":"munder",[Cn(u.base,h),f])};Yt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName;return{type:"horizBrace",mode:f.mode,label:v,isOver:/^\\over/.test(v),base:h[0]}},htmlBuilder:Ga,mathmlBuilder:Nt}),Yt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[1],R=mn(h[0],"url").url;return f.settings.isTrusted({command:"\\href",url:R})?{type:"href",mode:f.mode,href:R,body:rr(v)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,h){var f=fr(u.body,h,!1);return bt.makeAnchor(u.href,[],f,h)},mathmlBuilder:function(u,h){var f=Qr(u.body,h);return f instanceof Ur||(f=new Ur("mrow",[f])),f.setAttribute("href",u.href),f}}),Yt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=mn(h[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:v}))return f.formatUnsupportedCmd("\\url");for(var R=[],j=0;j<v.length;j++){var me=v[j];me==="~"&&(me="\\textasciitilde"),R.push({type:"textord",mode:"text",text:me})}var Ee={type:"text",mode:f.mode,font:"\\texttt",body:R};return{type:"href",mode:f.mode,href:v,body:rr(Ee)}}}),Yt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,h){var f=u.parser;return{type:"htmlmathml",mode:f.mode,html:rr(h[0]),mathml:rr(h[1])}},htmlBuilder:function(u,h){var f=fr(u.html,h,!1);return bt.makeFragment(f)},mathmlBuilder:function(u,h){return Qr(u.mathml,h)}});var Ks=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var h=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!h)throw new m("Invalid size: '"+u+"' in \\includegraphics");var f={number:+(h[1]+h[2]),unit:h[3]};if(!ir(f))throw new m("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};Yt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,h,f){var v=u.parser,R={number:0,unit:"em"},j={number:.9,unit:"em"},me={number:0,unit:"em"},Ee="";if(f[0])for(var Ge=mn(f[0],"raw").string,lt=Ge.split(","),xt=0;xt<lt.length;xt++){var Mt=lt[xt].split("=");if(Mt.length===2){var zt=Mt[1].trim();switch(Mt[0].trim()){case"alt":Ee=zt;break;case"width":R=Ks(zt);break;case"height":j=Ks(zt);break;case"totalheight":me=Ks(zt);break;default:throw new m("Invalid key: '"+Mt[0]+"' in \\includegraphics.")}}}var Wt=mn(h[0],"url").url;return Ee===""&&(Ee=Wt,Ee=Ee.replace(/^.*[\\/]/,""),Ee=Ee.substring(0,Ee.lastIndexOf("."))),v.settings.isTrusted({command:"\\includegraphics",url:Wt})?{type:"includegraphics",mode:v.mode,alt:Ee,width:R,height:j,totalheight:me,src:Wt}:v.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,h){var f=at(u.height,h),v=0;u.totalheight.number>0&&(v=at(u.totalheight,h)-f,v=Number(v.toFixed(2)));var R=0;u.width.number>0&&(R=at(u.width,h));var j={height:f+v+"em"};R>0&&(j.width=R+"em"),v>0&&(j.verticalAlign=-v+"em");var me=new we(u.src,u.alt,j);return me.height=f,me.depth=v,me},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mglyph",[]);f.setAttribute("alt",u.alt);var v=at(u.height,h),R=0;if(u.totalheight.number>0&&(R=at(u.totalheight,h)-v,R=R.toFixed(2),f.setAttribute("valign","-"+R+"em")),f.setAttribute("height",v+R+"em"),u.width.number>0){var j=at(u.width,h);f.setAttribute("width",j+"em")}return f.setAttribute("src",u.src),f}}),Yt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,R=mn(h[0],"size");if(f.settings.strict){var j=v[1]==="m",me=R.value.unit==="mu";j?(me||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" supports only mu units, "+("not "+R.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" works only in math mode")):me&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:R.value}},htmlBuilder:function(u,h){return bt.makeGlue(u.dimension,h)},mathmlBuilder:function(u,h){var f=at(u.dimension,h);return new Ht.SpaceNode(f)}}),Yt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0];return{type:"lap",mode:f.mode,alignment:v.slice(5),body:R}},htmlBuilder:function(u,h){var f;u.alignment==="clap"?(f=bt.makeSpan([],[jn(u.body,h)]),f=bt.makeSpan(["inner"],[f],h)):f=bt.makeSpan(["inner"],[jn(u.body,h)]);var v=bt.makeSpan(["fix"],[]),R=bt.makeSpan([u.alignment],[f,v],h),j=bt.makeSpan(["strut"]);return j.style.height=R.height+R.depth+"em",j.style.verticalAlign=-R.depth+"em",R.children.unshift(j),R=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:R}]},h),bt.makeSpan(["mord"],[R],h)},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mpadded",[Cn(u.body,h)]);if(u.alignment!=="rlap"){var v=u.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",v+"width")}return f.setAttribute("width","0px"),f}}),Yt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){var f=u.funcName,v=u.parser,R=v.mode;v.switchMode("math");var j=f==="\\("?"\\)":"$",me=v.parseExpression(!1,j);return v.expect(j),v.switchMode(R),{type:"styling",mode:v.mode,style:"text",body:me}}}),Yt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){throw new m("Mismatched "+u.funcName)}});var Ta=function(u,h){switch(h.style.size){case y.DISPLAY.size:return u.display;case y.TEXT.size:return u.text;case y.SCRIPT.size:return u.script;case y.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};Yt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,h){var f=u.parser;return{type:"mathchoice",mode:f.mode,display:rr(h[0]),text:rr(h[1]),script:rr(h[2]),scriptscript:rr(h[3])}},htmlBuilder:function(u,h){var f=Ta(u,h),v=fr(f,h,!1);return bt.makeFragment(v)},mathmlBuilder:function(u,h){var f=Ta(u,h);return Qr(f,h)}});var Aa=function(u,h,f,v,R,j,me){u=bt.makeSpan([],[u]);var Ee,Ge;if(h){var lt=jn(h,v.havingStyle(R.sup()),v);Ge={elem:lt,kern:Math.max(v.fontMetrics().bigOpSpacing1,v.fontMetrics().bigOpSpacing3-lt.depth)}}if(f){var xt=jn(f,v.havingStyle(R.sub()),v);Ee={elem:xt,kern:Math.max(v.fontMetrics().bigOpSpacing2,v.fontMetrics().bigOpSpacing4-xt.height)}}var Mt;if(Ge&&Ee){var zt=v.fontMetrics().bigOpSpacing5+Ee.elem.height+Ee.elem.depth+Ee.kern+u.depth+me;Mt=bt.makeVList({positionType:"bottom",positionData:zt,children:[{type:"kern",size:v.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ee.elem,marginLeft:-j+"em"},{type:"kern",size:Ee.kern},{type:"elem",elem:u},{type:"kern",size:Ge.kern},{type:"elem",elem:Ge.elem,marginLeft:j+"em"},{type:"kern",size:v.fontMetrics().bigOpSpacing5}]},v)}else if(Ee){var Wt=u.height-me;Mt=bt.makeVList({positionType:"top",positionData:Wt,children:[{type:"kern",size:v.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ee.elem,marginLeft:-j+"em"},{type:"kern",size:Ee.kern},{type:"elem",elem:u}]},v)}else if(Ge){var Jt=u.depth+me;Mt=bt.makeVList({positionType:"bottom",positionData:Jt,children:[{type:"elem",elem:u},{type:"kern",size:Ge.kern},{type:"elem",elem:Ge.elem,marginLeft:j+"em"},{type:"kern",size:v.fontMetrics().bigOpSpacing5}]},v)}else return u;return bt.makeSpan(["mop","op-limits"],[Mt],v)},Ka=["\\smallint"],as=function(u,h){var f,v,R=!1,j,me=Yn(u,"supsub");me?(f=me.sup,v=me.sub,j=mn(me.base,"op"),R=!0):j=mn(u,"op");var Ee=h.style,Ge=!1;Ee.size===y.DISPLAY.size&&j.symbol&&!H.contains(Ka,j.name)&&(Ge=!0);var lt;if(j.symbol){var xt=Ge?"Size2-Regular":"Size1-Regular",Mt="";if((j.name==="\\oiint"||j.name==="\\oiiint")&&(Mt=j.name.substr(1),j.name=Mt==="oiint"?"\\iint":"\\iiint"),lt=bt.makeSymbol(j.name,xt,"math",h,["mop","op-symbol",Ge?"large-op":"small-op"]),Mt.length>0){var zt=lt.italic,Wt=bt.staticSvg(Mt+"Size"+(Ge?"2":"1"),h);lt=bt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:lt,shift:0},{type:"elem",elem:Wt,shift:Ge?.08:0}]},h),j.name="\\"+Mt,lt.classes.unshift("mop"),lt.italic=zt}}else if(j.body){var Jt=fr(j.body,h,!0);Jt.length===1&&Jt[0]instanceof de?(lt=Jt[0],lt.classes[0]="mop"):lt=bt.makeSpan(["mop"],bt.tryCombineChars(Jt),h)}else{for(var vn=[],En=1;En<j.name.length;En++)vn.push(bt.mathsym(j.name[En],j.mode,h));lt=bt.makeSpan(["mop"],vn,h)}var Un=0,Jn=0;return(lt instanceof de||j.name==="\\oiint"||j.name==="\\oiiint")&&!j.suppressBaseShift&&(Un=(lt.height-lt.depth)/2-h.fontMetrics().axisHeight,Jn=lt.italic),R?Aa(lt,f,v,h,Ee,Jn,Un):(Un&&(lt.style.position="relative",lt.style.top=Un+"em"),lt)},Ds=function(u,h){var f;if(u.symbol)f=new Ur("mo",[zr(u.name,u.mode)]),H.contains(Ka,u.name)&&f.setAttribute("largeop","false");else if(u.body)f=new Ur("mo",Gr(u.body,h));else{f=new Ur("mi",[new An(u.name.slice(1))]);var v=new Ur("mo",[zr("\u2061","text")]);u.parentIsSupSub?f=new Ur("mo",[f,v]):f=si([f,v])}return f},Ao={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Yt({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,h){var f=u.parser,v=u.funcName,R=v;return R.length===1&&(R=Ao[R]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:R}},htmlBuilder:as,mathmlBuilder:Ds}),Yt({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=h[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:rr(v)}},htmlBuilder:as,mathmlBuilder:Ds});var Co={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Yt({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 h=u.parser,f=u.funcName;return{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:as,mathmlBuilder:Ds}),Yt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var h=u.parser,f=u.funcName;return{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:as,mathmlBuilder:Ds}),Yt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var h=u.parser,f=u.funcName,v=f;return v.length===1&&(v=Co[v]),{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:v}},htmlBuilder:as,mathmlBuilder:Ds});var ua=function(u,h){var f,v,R=!1,j,me=Yn(u,"supsub");me?(f=me.sup,v=me.sub,j=mn(me.base,"operatorname"),R=!0):j=mn(u,"operatorname");var Ee;if(j.body.length>0){for(var Ge=j.body.map(function(zt){var Wt=zt.text;return typeof Wt=="string"?{type:"textord",mode:zt.mode,text:Wt}:zt}),lt=fr(Ge,h.withFont("mathrm"),!0),xt=0;xt<lt.length;xt++){var Mt=lt[xt];Mt instanceof de&&(Mt.text=Mt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Ee=bt.makeSpan(["mop"],lt,h)}else Ee=bt.makeSpan(["mop"],[],h);return R?Aa(Ee,f,v,h,h.style,0,0):Ee},Hs=function(u,h){for(var f=Gr(u.body,h.withFont("mathrm")),v=!0,R=0;R<f.length;R++){var j=f[R];if(!(j instanceof Ht.SpaceNode))if(j instanceof Ht.MathNode)switch(j.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var me=j.children[0];j.children.length===1&&me instanceof Ht.TextNode?me.text=me.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):v=!1;break}default:v=!1}else v=!1}if(v){var Ee=f.map(function(xt){return xt.toText()}).join("");f=[new Ht.TextNode(Ee)]}var Ge=new Ht.MathNode("mi",f);Ge.setAttribute("mathvariant","normal");var lt=new Ht.MathNode("mo",[zr("\u2061","text")]);return u.parentIsSupSub?new Ht.MathNode("mo",[Ge,lt]):Ht.newDocumentFragment([Ge,lt])};Yt({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0];return{type:"operatorname",mode:f.mode,body:rr(R),alwaysHandleSupSub:v==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:ua,mathmlBuilder:Hs}),tr({type:"ordgroup",htmlBuilder:function(u,h){return u.semisimple?bt.makeFragment(fr(u.body,h,!1)):bt.makeSpan(["mord"],fr(u.body,h,!0),h)},mathmlBuilder:function(u,h){return Qr(u.body,h,!0)}}),Yt({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=h[0];return{type:"overline",mode:f.mode,body:v}},htmlBuilder:function(u,h){var f=jn(u.body,h.havingCrampedStyle()),v=bt.makeLineSpan("overline-line",h),R=h.fontMetrics().defaultRuleThickness,j=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*R},{type:"elem",elem:v},{type:"kern",size:R}]},h);return bt.makeSpan(["mord","overline"],[j],h)},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mo",[new Ht.TextNode("\u203E")]);f.setAttribute("stretchy","true");var v=new Ht.MathNode("mover",[Cn(u.body,h),f]);return v.setAttribute("accent","true"),v}}),Yt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[0];return{type:"phantom",mode:f.mode,body:rr(v)}},htmlBuilder:function(u,h){var f=fr(u.body,h.withPhantom(),!1);return bt.makeFragment(f)},mathmlBuilder:function(u,h){var f=Gr(u.body,h);return new Ht.MathNode("mphantom",f)}}),Yt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[0];return{type:"hphantom",mode:f.mode,body:v}},htmlBuilder:function(u,h){var f=bt.makeSpan([],[jn(u.body,h.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var v=0;v<f.children.length;v++)f.children[v].height=0,f.children[v].depth=0;return f=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h),bt.makeSpan(["mord"],[f],h)},mathmlBuilder:function(u,h){var f=Gr(rr(u.body),h),v=new Ht.MathNode("mphantom",f),R=new Ht.MathNode("mpadded",[v]);return R.setAttribute("height","0px"),R.setAttribute("depth","0px"),R}}),Yt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[0];return{type:"vphantom",mode:f.mode,body:v}},htmlBuilder:function(u,h){var f=bt.makeSpan(["inner"],[jn(u.body,h.withPhantom())]),v=bt.makeSpan(["fix"],[]);return bt.makeSpan(["mord","rlap"],[f,v],h)},mathmlBuilder:function(u,h){var f=Gr(rr(u.body),h),v=new Ht.MathNode("mphantom",f),R=new Ht.MathNode("mpadded",[v]);return R.setAttribute("width","0px"),R}}),Yt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=mn(h[0],"size").value,R=h[1];return{type:"raisebox",mode:f.mode,dy:v,body:R}},htmlBuilder:function(u,h){var f=jn(u.body,h),v=at(u.dy,h);return bt.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:f}]},h)},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mpadded",[Cn(u.body,h)]),v=u.dy.number+u.dy.unit;return f.setAttribute("voffset",v),f}}),Yt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,h,f){var v=u.parser,R=f[0],j=mn(h[0],"size"),me=mn(h[1],"size");return{type:"rule",mode:v.mode,shift:R&&mn(R,"size").value,width:j.value,height:me.value}},htmlBuilder:function(u,h){var f=bt.makeSpan(["mord","rule"],[],h),v=at(u.width,h),R=at(u.height,h),j=u.shift?at(u.shift,h):0;return f.style.borderRightWidth=v+"em",f.style.borderTopWidth=R+"em",f.style.bottom=j+"em",f.width=v,f.height=R+j,f.depth=-j,f.maxFontSize=R*1.125*h.sizeMultiplier,f},mathmlBuilder:function(u,h){var f=at(u.width,h),v=at(u.height,h),R=u.shift?at(u.shift,h):0,j=h.color&&h.getColor()||"black",me=new Ht.MathNode("mspace");me.setAttribute("mathbackground",j),me.setAttribute("width",f+"em"),me.setAttribute("height",v+"em");var Ee=new Ht.MathNode("mpadded",[me]);return R>=0?Ee.setAttribute("height","+"+R+"em"):(Ee.setAttribute("height",R+"em"),Ee.setAttribute("depth","+"+-R+"em")),Ee.setAttribute("voffset",R+"em"),Ee}});function gs(K,u,h){for(var f=fr(K,u,!1),v=u.sizeMultiplier/h.sizeMultiplier,R=0;R<f.length;R++){var j=f[R].classes.indexOf("sizing");j<0?Array.prototype.push.apply(f[R].classes,u.sizingClasses(h)):f[R].classes[j+1]==="reset-size"+u.size&&(f[R].classes[j+1]="reset-size"+h.size),f[R].height*=v,f[R].depth*=v}return bt.makeFragment(f)}var Ha=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Do=function(u,h){var f=h.havingSize(u.size);return gs(u.body,f,h)};Yt({type:"sizing",names:Ha,props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,v=u.funcName,R=u.parser,j=R.parseExpression(!1,f);return{type:"sizing",mode:R.mode,size:Ha.indexOf(v)+1,body:j}},htmlBuilder:Do,mathmlBuilder:function(u,h){var f=h.havingSize(u.size),v=Gr(u.body,f),R=new Ht.MathNode("mstyle",v);return R.setAttribute("mathsize",f.sizeMultiplier+"em"),R}}),Yt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,h,f){var v=u.parser,R=!1,j=!1,me=f[0]&&mn(f[0],"ordgroup");if(me)for(var Ee="",Ge=0;Ge<me.body.length;++Ge){var lt=me.body[Ge];if(Ee=lt.text,Ee==="t")R=!0;else if(Ee==="b")j=!0;else{R=!1,j=!1;break}}else R=!0,j=!0;var xt=h[0];return{type:"smash",mode:v.mode,body:xt,smashHeight:R,smashDepth:j}},htmlBuilder:function(u,h){var f=bt.makeSpan([],[jn(u.body,h)]);if(!u.smashHeight&&!u.smashDepth)return f;if(u.smashHeight&&(f.height=0,f.children))for(var v=0;v<f.children.length;v++)f.children[v].height=0;if(u.smashDepth&&(f.depth=0,f.children))for(var R=0;R<f.children.length;R++)f.children[R].depth=0;var j=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h);return bt.makeSpan(["mord"],[j],h)},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mpadded",[Cn(u.body,h)]);return u.smashHeight&&f.setAttribute("height","0px"),u.smashDepth&&f.setAttribute("depth","0px"),f}}),Yt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,h,f){var v=u.parser,R=f[0],j=h[0];return{type:"sqrt",mode:v.mode,body:j,index:R}},htmlBuilder:function(u,h){var f=jn(u.body,h.havingCrampedStyle());f.height===0&&(f.height=h.fontMetrics().xHeight),f=bt.wrapFragment(f,h);var v=h.fontMetrics(),R=v.defaultRuleThickness,j=R;h.style.id<y.TEXT.id&&(j=h.fontMetrics().xHeight);var me=R+j/4,Ee=f.height+f.depth+me+R,Ge=Oi.sqrtImage(Ee,h),lt=Ge.span,xt=Ge.ruleWidth,Mt=Ge.advanceWidth,zt=lt.height-xt;zt>f.height+f.depth+me&&(me=(me+zt-f.height-f.depth)/2);var Wt=lt.height-f.height-me-xt;f.style.paddingLeft=Mt+"em";var Jt=bt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+Wt)},{type:"elem",elem:lt},{type:"kern",size:xt}]},h);if(u.index){var vn=h.havingStyle(y.SCRIPTSCRIPT),En=jn(u.index,vn,h),Un=.6*(Jt.height-Jt.depth),Jn=bt.makeVList({positionType:"shift",positionData:-Un,children:[{type:"elem",elem:En}]},h),kr=bt.makeSpan(["root"],[Jn]);return bt.makeSpan(["mord","sqrt"],[kr,Jt],h)}else return bt.makeSpan(["mord","sqrt"],[Jt],h)},mathmlBuilder:function(u,h){var f=u.body,v=u.index;return v?new Ht.MathNode("mroot",[Cn(f,h),Cn(v,h)]):new Ht.MathNode("msqrt",[Cn(f,h)])}});var Wa={display:y.DISPLAY,text:y.TEXT,script:y.SCRIPT,scriptscript:y.SCRIPTSCRIPT};Yt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,v=u.funcName,R=u.parser,j=R.parseExpression(!0,f),me=v.slice(1,v.length-5);return{type:"styling",mode:R.mode,style:me,body:j}},htmlBuilder:function(u,h){var f=Wa[u.style],v=h.havingStyle(f).withFont("");return gs(u.body,v,h)},mathmlBuilder:function(u,h){var f=Wa[u.style],v=h.havingStyle(f),R=Gr(u.body,v),j=new Ht.MathNode("mstyle",R),me={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Ee=me[u.style];return j.setAttribute("scriptlevel",Ee[0]),j.setAttribute("displaystyle",Ee[1]),j}});var Io=function(u,h){var f=u.base;if(f)if(f.type==="op"){var v=f.limits&&(h.style.size===y.DISPLAY.size||f.alwaysHandleSupSub);return v?as:null}else if(f.type==="operatorname"){var R=f.alwaysHandleSupSub&&(h.style.size===y.DISPLAY.size||f.limits);return R?ua:null}else{if(f.type==="accent")return H.isCharacterBox(f.base)?sn:null;if(f.type==="horizBrace"){var j=!u.sub;return j===f.isOver?Ga:null}else return null}else return null};tr({type:"supsub",htmlBuilder:function(u,h){var f=Io(u,h);if(f)return f(u,h);var v=u.base,R=u.sup,j=u.sub,me=jn(v,h),Ee,Ge,lt=h.fontMetrics(),xt=0,Mt=0,zt=v&&H.isCharacterBox(v);if(R){var Wt=h.havingStyle(h.style.sup());Ee=jn(R,Wt,h),zt||(xt=me.height-Wt.fontMetrics().supDrop*Wt.sizeMultiplier/h.sizeMultiplier)}if(j){var Jt=h.havingStyle(h.style.sub());Ge=jn(j,Jt,h),zt||(Mt=me.depth+Jt.fontMetrics().subDrop*Jt.sizeMultiplier/h.sizeMultiplier)}var vn;h.style===y.DISPLAY?vn=lt.sup1:h.style.cramped?vn=lt.sup3:vn=lt.sup2;var En=h.sizeMultiplier,Un=.5/lt.ptPerEm/En+"em",Jn=null;if(Ge){var kr=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(me instanceof de||kr)&&(Jn=-me.italic+"em")}var Cr;if(Ee&&Ge){xt=Math.max(xt,vn,Ee.depth+.25*lt.xHeight),Mt=Math.max(Mt,lt.sub2);var Or=lt.defaultRuleThickness,Pr=4*Or;if(xt-Ee.depth-(Ge.height-Mt)<Pr){Mt=Pr-(xt-Ee.depth)+Ge.height;var Rr=.8*lt.xHeight-(xt-Ee.depth);Rr>0&&(xt+=Rr,Mt-=Rr)}var ci=[{type:"elem",elem:Ge,shift:Mt,marginRight:Un,marginLeft:Jn},{type:"elem",elem:Ee,shift:-xt,marginRight:Un}];Cr=bt.makeVList({positionType:"individualShift",children:ci},h)}else if(Ge){Mt=Math.max(Mt,lt.sub1,Ge.height-.8*lt.xHeight);var Fr=[{type:"elem",elem:Ge,marginLeft:Jn,marginRight:Un}];Cr=bt.makeVList({positionType:"shift",positionData:Mt,children:Fr},h)}else if(Ee)xt=Math.max(xt,vn,Ee.depth+.25*lt.xHeight),Cr=bt.makeVList({positionType:"shift",positionData:-xt,children:[{type:"elem",elem:Ee,marginRight:Un}]},h);else throw new Error("supsub must have either sup or sub.");var ht=ni(me,"right")||"mord";return bt.makeSpan([ht],[me,bt.makeSpan(["msupsub"],[Cr])],h)},mathmlBuilder:function(u,h){var f=!1,v,R,j=Yn(u.base,"horizBrace");j&&(R=!!u.sup,R===j.isOver&&(f=!0,v=j.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var me=[Cn(u.base,h)];u.sub&&me.push(Cn(u.sub,h)),u.sup&&me.push(Cn(u.sup,h));var Ee;if(f)Ee=v?"mover":"munder";else if(u.sub)if(u.sup){var xt=u.base;xt&&xt.type==="op"&&xt.limits&&h.style===y.DISPLAY||xt&&xt.type==="operatorname"&&xt.alwaysHandleSupSub&&(h.style===y.DISPLAY||xt.limits)?Ee="munderover":Ee="msubsup"}else{var lt=u.base;lt&&lt.type==="op"&&lt.limits&&(h.style===y.DISPLAY||lt.alwaysHandleSupSub)||lt&&lt.type==="operatorname"&&lt.alwaysHandleSupSub&&(lt.limits||h.style===y.DISPLAY)?Ee="munder":Ee="msub"}else{var Ge=u.base;Ge&&Ge.type==="op"&&Ge.limits&&(h.style===y.DISPLAY||Ge.alwaysHandleSupSub)||Ge&&Ge.type==="operatorname"&&Ge.alwaysHandleSupSub&&(Ge.limits||h.style===y.DISPLAY)?Ee="mover":Ee="msup"}var Mt=new Ht.MathNode(Ee,me);return Mt}}),tr({type:"atom",htmlBuilder:function(u,h){return bt.mathsym(u.text,u.mode,h,["m"+u.family])},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mo",[zr(u.text,u.mode)]);if(u.family==="bin"){var v=Ei(u,h);v==="bold-italic"&&f.setAttribute("mathvariant",v)}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"};tr({type:"mathord",htmlBuilder:function(u,h){return bt.makeOrd(u,h,"mathord")},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mi",[zr(u.text,u.mode,h)]),v=Ei(u,h)||"italic";return v!==Ca[f.type]&&f.setAttribute("mathvariant",v),f}}),tr({type:"textord",htmlBuilder:function(u,h){return bt.makeOrd(u,h,"textord")},mathmlBuilder:function(u,h){var f=zr(u.text,u.mode,h),v=Ei(u,h)||"normal",R;return u.mode==="text"?R=new Ht.MathNode("mtext",[f]):/[0-9]/.test(u.text)?R=new Ht.MathNode("mn",[f]):u.text==="\\prime"?R=new Ht.MathNode("mo",[f]):R=new Ht.MathNode("mi",[f]),v!==Ca[R.type]&&R.setAttribute("mathvariant",v),R}});var Ws={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Is={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};tr({type:"spacing",htmlBuilder:function(u,h){if(Is.hasOwnProperty(u.text)){var f=Is[u.text].className||"";if(u.mode==="text"){var v=bt.makeOrd(u,h,"textord");return v.classes.push(f),v}else return bt.makeSpan(["mspace",f],[bt.mathsym(u.text,u.mode,h)],h)}else{if(Ws.hasOwnProperty(u.text))return bt.makeSpan(["mspace",Ws[u.text]],[],h);throw new m('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,h){var f;if(Is.hasOwnProperty(u.text))f=new Ht.MathNode("mtext",[new Ht.TextNode("\xA0")]);else{if(Ws.hasOwnProperty(u.text))return new Ht.MathNode("mspace");throw new m('Unknown type of space "'+u.text+'"')}return f}});var Rs=function(){var u=new Ht.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};tr({type:"tag",mathmlBuilder:function(u,h){var f=new Ht.MathNode("mtable",[new Ht.MathNode("mtr",[Rs(),new Ht.MathNode("mtd",[Qr(u.body,h)]),Rs(),new Ht.MathNode("mtd",[Qr(u.tag,h)])])]);return f.setAttribute("width","100%"),f}});var Va={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Da={"\\textbf":"textbf","\\textmd":"textmd"},Za={"\\textit":"textit","\\textup":"textup"},ca=function(u,h){var f=u.font;return f?Va[f]?h.withTextFontFamily(Va[f]):Da[f]?h.withTextFontWeight(Da[f]):h.withTextFontShape(Za[f]):h};Yt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,R=h[0];return{type:"text",mode:f.mode,body:rr(R),font:v}},htmlBuilder:function(u,h){var f=ca(u,h),v=fr(u.body,f,!0);return bt.makeSpan(["mord","text"],bt.tryCombineChars(v),f)},mathmlBuilder:function(u,h){var f=ca(u,h);return Qr(u.body,f)}}),Yt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser;return{type:"underline",mode:f.mode,body:h[0]}},htmlBuilder:function(u,h){var f=jn(u.body,h),v=bt.makeLineSpan("underline-line",h),R=h.fontMetrics().defaultRuleThickness,j=bt.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:R},{type:"elem",elem:v},{type:"kern",size:3*R},{type:"elem",elem:f}]},h);return bt.makeSpan(["mord","underline"],[j],h)},mathmlBuilder:function(u,h){var f=new Ht.MathNode("mo",[new Ht.TextNode("\u203E")]);f.setAttribute("stretchy","true");var v=new Ht.MathNode("munder",[Cn(u.body,h),f]);return v.setAttribute("accentunder","true"),v}}),Yt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,h,f){throw new m("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,h){for(var f=Ya(u),v=[],R=h.havingStyle(h.style.text()),j=0;j<f.length;j++){var me=f[j];me==="~"&&(me="\\textasciitilde"),v.push(bt.makeSymbol(me,"Typewriter-Regular",u.mode,R,["mord","texttt"]))}return bt.makeSpan(["mord","text"].concat(R.sizingClasses(h)),bt.tryCombineChars(v),R)},mathmlBuilder:function(u,h){var f=new Ht.TextNode(Ya(u)),v=new Ht.MathNode("mtext",[f]);return v.setAttribute("mathvariant","monospace"),v}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},da=gn,Vs=da,Ia=`[ \r
]`,Ra="\\\\[a-zA-Z@]+",Xa="\\\\[^\uD800-\uDFFF]",Ro=""+Ra+Ia+"*",qa=new RegExp("^("+Ra+")"+Ia+"*$"),La="[\u0300-\u036F]",Lo=new RegExp(La+"+$"),ka="("+Ia+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(La+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(La+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Ro)+("|"+Xa+")"),Qa=function(){function K(h,f){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=h,this.settings=f,this.tokenRegex=new RegExp(ka,"g"),this.catcodes={"%":14}}var u=K.prototype;return u.setCatcode=function(f,v){this.catcodes[f]=v},u.lex=function(){var f=this.input,v=this.tokenRegex.lastIndex;if(v===f.length)return new pe("EOF",new be(this,v,v));var R=this.tokenRegex.exec(f);if(R===null||R.index!==v)throw new m("Unexpected character: '"+f[v]+"'",new pe(f[v],new be(this,v,v+1)));var j=R[2]||" ";if(this.catcodes[j]===14){var me=f.indexOf(`
`,this.tokenRegex.lastIndex);return me===-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=me+1,this.lex()}var Ee=j.match(qa);return Ee&&(j=Ee[1]),new pe(j,new be(this,v,this.tokenRegex.lastIndex))},K}(),ko=function(){function K(h,f){h===void 0&&(h={}),f===void 0&&(f={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=f,this.builtins=h,this.undefStack=[]}var u=K.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new m("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var v in f)f.hasOwnProperty(v)&&(f[v]===void 0?delete this.current[v]:this.current[v]=f[v])},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,v,R){if(R===void 0&&(R=!1),R){for(var j=0;j<this.undefStack.length;j++)delete this.undefStack[j][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=v)}else{var me=this.undefStack[this.undefStack.length-1];me&&!me.hasOwnProperty(f)&&(me[f]=this.current[f])}this.current[f]=v},K}(),Ja={},Oo=Ja;function Oe(K,u){Ja[K]=u}Oe("\\@firstoftwo",function(K){var u=K.consumeArgs(2);return{tokens:u[0],numArgs:0}}),Oe("\\@secondoftwo",function(K){var u=K.consumeArgs(2);return{tokens:u[1],numArgs:0}}),Oe("\\@ifnextchar",function(K){var u=K.consumeArgs(3),h=K.future();return u[0].length===1&&u[0][0].text===h.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),Oe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Oe("\\TextOrMath",function(K){var u=K.consumeArgs(2);return K.mode==="text"?{tokens:u[0],numArgs:0}:{tokens:u[1],numArgs:0}});var eo={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};Oe("\\char",function(K){var u=K.popToken(),h,f="";if(u.text==="'")h=8,u=K.popToken();else if(u.text==='"')h=16,u=K.popToken();else if(u.text==="`")if(u=K.popToken(),u.text[0]==="\\")f=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new m("\\char` missing argument");f=u.text.charCodeAt(0)}else h=10;if(h){if(f=eo[u.text],f==null||f>=h)throw new m("Invalid base-"+h+" digit "+u.text);for(var v;(v=eo[K.future().text])!=null&&v<h;)f*=h,f+=v,K.popToken()}return"\\@char{"+f+"}"});var Oa=function(u,h){var f=u.consumeArgs(1)[0];if(f.length!==1)throw new m("\\gdef's first argument must be a macro name");var v=f[0].text,R=0;for(f=u.consumeArgs(1)[0];f.length===1&&f[0].text==="#";){if(f=u.consumeArgs(1)[0],f.length!==1)throw new m('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new m('Invalid argument number "'+f[0].text+'"');if(R++,parseInt(f[0].text)!==R)throw new m('Argument number "'+f[0].text+'" out of order');f=u.consumeArgs(1)[0]}return u.macros.set(v,{tokens:f,numArgs:R},h),""};Oe("\\gdef",function(K){return Oa(K,!0)}),Oe("\\def",function(K){return Oa(K,!1)}),Oe("\\global",function(K){var u=K.consumeArgs(1)[0];if(u.length!==1)throw new m("Invalid command after \\global");var h=u[0].text;if(h==="\\def")return Oa(K,!0);throw new m("Invalid command '"+h+"' after \\global")});var Pa=function(u,h,f){var v=u.consumeArgs(1)[0];if(v.length!==1)throw new m("\\newcommand's first argument must be a macro name");var R=v[0].text,j=u.isDefined(R);if(j&&!h)throw new m("\\newcommand{"+R+"} attempting to redefine "+(R+"; use \\renewcommand"));if(!j&&!f)throw new m("\\renewcommand{"+R+"} when command "+R+" does not yet exist; use \\newcommand");var me=0;if(v=u.consumeArgs(1)[0],v.length===1&&v[0].text==="["){for(var Ee="",Ge=u.expandNextToken();Ge.text!=="]"&&Ge.text!=="EOF";)Ee+=Ge.text,Ge=u.expandNextToken();if(!Ee.match(/^\s*[0-9]+\s*$/))throw new m("Invalid number of arguments: "+Ee);me=parseInt(Ee),v=u.consumeArgs(1)[0]}return u.macros.set(R,{tokens:v,numArgs:me}),""};Oe("\\newcommand",function(K){return Pa(K,!1,!0)}),Oe("\\renewcommand",function(K){return Pa(K,!0,!1)}),Oe("\\providecommand",function(K){return Pa(K,!0,!0)}),Oe("\\bgroup","{"),Oe("\\egroup","}"),Oe("\\lq","`"),Oe("\\rq","'"),Oe("\\aa","\\r a"),Oe("\\AA","\\r A"),Oe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Oe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Oe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Oe("\u212C","\\mathscr{B}"),Oe("\u2130","\\mathscr{E}"),Oe("\u2131","\\mathscr{F}"),Oe("\u210B","\\mathscr{H}"),Oe("\u2110","\\mathscr{I}"),Oe("\u2112","\\mathscr{L}"),Oe("\u2133","\\mathscr{M}"),Oe("\u211B","\\mathscr{R}"),Oe("\u212D","\\mathfrak{C}"),Oe("\u210C","\\mathfrak{H}"),Oe("\u2128","\\mathfrak{Z}"),Oe("\\Bbbk","\\Bbb{k}"),Oe("\xB7","\\cdotp"),Oe("\\llap","\\mathllap{\\textrm{#1}}"),Oe("\\rlap","\\mathrlap{\\textrm{#1}}"),Oe("\\clap","\\mathclap{\\textrm{#1}}"),Oe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Oe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Oe("\\ne","\\neq"),Oe("\u2260","\\neq"),Oe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Oe("\u2209","\\notin"),Oe("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Oe("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Oe("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Oe("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Oe("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Oe("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Oe("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Oe("\u27C2","\\perp"),Oe("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Oe("\u220C","\\notni"),Oe("\u231C","\\ulcorner"),Oe("\u231D","\\urcorner"),Oe("\u231E","\\llcorner"),Oe("\u231F","\\lrcorner"),Oe("\xA9","\\copyright"),Oe("\xAE","\\textregistered"),Oe("\uFE0F","\\textregistered"),Oe("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Oe("\u22EE","\\vdots"),Oe("\\varGamma","\\mathit{\\Gamma}"),Oe("\\varDelta","\\mathit{\\Delta}"),Oe("\\varTheta","\\mathit{\\Theta}"),Oe("\\varLambda","\\mathit{\\Lambda}"),Oe("\\varXi","\\mathit{\\Xi}"),Oe("\\varPi","\\mathit{\\Pi}"),Oe("\\varSigma","\\mathit{\\Sigma}"),Oe("\\varUpsilon","\\mathit{\\Upsilon}"),Oe("\\varPhi","\\mathit{\\Phi}"),Oe("\\varPsi","\\mathit{\\Psi}"),Oe("\\varOmega","\\mathit{\\Omega}"),Oe("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Oe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),Oe("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Oe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Oe("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Oe("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var to={",":"\\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"};Oe("\\dots",function(K){var u="\\dotso",h=K.expandAfterFuture().text;return h in to?u=to[h]:(h.substr(0,4)==="\\not"||h in Ct.math&&H.contains(["bin","rel"],Ct.math[h].group))&&(u="\\dotsb"),u});var Ls={")":!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};Oe("\\dotso",function(K){var u=K.future().text;return u in Ls?"\\ldots\\,":"\\ldots"}),Oe("\\dotsc",function(K){var u=K.future().text;return u in Ls&&u!==","?"\\ldots\\,":"\\ldots"}),Oe("\\cdots",function(K){var u=K.future().text;return u in Ls?"\\@cdots\\,":"\\@cdots"}),Oe("\\dotsb","\\cdots"),Oe("\\dotsm","\\cdots"),Oe("\\dotsi","\\!\\cdots"),Oe("\\dotsx","\\ldots\\,"),Oe("\\DOTSI","\\relax"),Oe("\\DOTSB","\\relax"),Oe("\\DOTSX","\\relax"),Oe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Oe("\\,","\\tmspace+{3mu}{.1667em}"),Oe("\\thinspace","\\,"),Oe("\\>","\\mskip{4mu}"),Oe("\\:","\\tmspace+{4mu}{.2222em}"),Oe("\\medspace","\\:"),Oe("\\;","\\tmspace+{5mu}{.2777em}"),Oe("\\thickspace","\\;"),Oe("\\!","\\tmspace-{3mu}{.1667em}"),Oe("\\negthinspace","\\!"),Oe("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Oe("\\negthickspace","\\tmspace-{5mu}{.277em}"),Oe("\\enspace","\\kern.5em "),Oe("\\enskip","\\hskip.5em\\relax"),Oe("\\quad","\\hskip1em\\relax"),Oe("\\qquad","\\hskip2em\\relax"),Oe("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Oe("\\tag@paren","\\tag@literal{({#1})}"),Oe("\\tag@literal",function(K){if(K.macros.get("\\df@tag"))throw new m("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Oe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Oe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Oe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Oe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Oe("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Oe("\\\\","\\newline"),Oe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var no=tt["Main-Regular"][84][1]-.7*tt["Main-Regular"][65][1]+"em";Oe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Oe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Oe("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Oe("\\@hspace","\\hskip #1\\relax"),Oe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Oe("\\ordinarycolon",":"),Oe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Oe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Oe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Oe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Oe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Oe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Oe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Oe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Oe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Oe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Oe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Oe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Oe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Oe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Oe("\u2237","\\dblcolon"),Oe("\u2239","\\eqcolon"),Oe("\u2254","\\coloneqq"),Oe("\u2255","\\eqqcolon"),Oe("\u2A74","\\Coloneqq"),Oe("\\ratio","\\vcentcolon"),Oe("\\coloncolon","\\dblcolon"),Oe("\\colonequals","\\coloneqq"),Oe("\\coloncolonequals","\\Coloneqq"),Oe("\\equalscolon","\\eqqcolon"),Oe("\\equalscoloncolon","\\Eqqcolon"),Oe("\\colonminus","\\coloneq"),Oe("\\coloncolonminus","\\Coloneq"),Oe("\\minuscolon","\\eqcolon"),Oe("\\minuscoloncolon","\\Eqcolon"),Oe("\\coloncolonapprox","\\Colonapprox"),Oe("\\coloncolonsim","\\Colonsim"),Oe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Oe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Oe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Oe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Oe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Oe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Oe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Oe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Oe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Oe("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Oe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Oe("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Oe("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Oe("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Oe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Oe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Oe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Oe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Oe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Oe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Oe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Oe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Oe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Oe("\u27E6","\\llbracket"),Oe("\u27E7","\\rrbracket"),Oe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Oe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Oe("\u2983","\\lBrace"),Oe("\u2984","\\rBrace"),Oe("\\darr","\\downarrow"),Oe("\\dArr","\\Downarrow"),Oe("\\Darr","\\Downarrow"),Oe("\\lang","\\langle"),Oe("\\rang","\\rangle"),Oe("\\uarr","\\uparrow"),Oe("\\uArr","\\Uparrow"),Oe("\\Uarr","\\Uparrow"),Oe("\\N","\\mathbb{N}"),Oe("\\R","\\mathbb{R}"),Oe("\\Z","\\mathbb{Z}"),Oe("\\alef","\\aleph"),Oe("\\alefsym","\\aleph"),Oe("\\Alpha","\\mathrm{A}"),Oe("\\Beta","\\mathrm{B}"),Oe("\\bull","\\bullet"),Oe("\\Chi","\\mathrm{X}"),Oe("\\clubs","\\clubsuit"),Oe("\\cnums","\\mathbb{C}"),Oe("\\Complex","\\mathbb{C}"),Oe("\\Dagger","\\ddagger"),Oe("\\diamonds","\\diamondsuit"),Oe("\\empty","\\emptyset"),Oe("\\Epsilon","\\mathrm{E}"),Oe("\\Eta","\\mathrm{H}"),Oe("\\exist","\\exists"),Oe("\\harr","\\leftrightarrow"),Oe("\\hArr","\\Leftrightarrow"),Oe("\\Harr","\\Leftrightarrow"),Oe("\\hearts","\\heartsuit"),Oe("\\image","\\Im"),Oe("\\infin","\\infty"),Oe("\\Iota","\\mathrm{I}"),Oe("\\isin","\\in"),Oe("\\Kappa","\\mathrm{K}"),Oe("\\larr","\\leftarrow"),Oe("\\lArr","\\Leftarrow"),Oe("\\Larr","\\Leftarrow"),Oe("\\lrarr","\\leftrightarrow"),Oe("\\lrArr","\\Leftrightarrow"),Oe("\\Lrarr","\\Leftrightarrow"),Oe("\\Mu","\\mathrm{M}"),Oe("\\natnums","\\mathbb{N}"),Oe("\\Nu","\\mathrm{N}"),Oe("\\Omicron","\\mathrm{O}"),Oe("\\plusmn","\\pm"),Oe("\\rarr","\\rightarrow"),Oe("\\rArr","\\Rightarrow"),Oe("\\Rarr","\\Rightarrow"),Oe("\\real","\\Re"),Oe("\\reals","\\mathbb{R}"),Oe("\\Reals","\\mathbb{R}"),Oe("\\Rho","\\mathrm{P}"),Oe("\\sdot","\\cdot"),Oe("\\sect","\\S"),Oe("\\spades","\\spadesuit"),Oe("\\sub","\\subset"),Oe("\\sube","\\subseteq"),Oe("\\supe","\\supseteq"),Oe("\\Tau","\\mathrm{T}"),Oe("\\thetasym","\\vartheta"),Oe("\\weierp","\\wp"),Oe("\\Zeta","\\mathrm{Z}"),Oe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Oe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Oe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Oe("\\blue","\\textcolor{##6495ed}{#1}"),Oe("\\orange","\\textcolor{##ffa500}{#1}"),Oe("\\pink","\\textcolor{##ff00af}{#1}"),Oe("\\red","\\textcolor{##df0030}{#1}"),Oe("\\green","\\textcolor{##28ae7b}{#1}"),Oe("\\gray","\\textcolor{gray}{#1}"),Oe("\\purple","\\textcolor{##9d38bd}{#1}"),Oe("\\blueA","\\textcolor{##ccfaff}{#1}"),Oe("\\blueB","\\textcolor{##80f6ff}{#1}"),Oe("\\blueC","\\textcolor{##63d9ea}{#1}"),Oe("\\blueD","\\textcolor{##11accd}{#1}"),Oe("\\blueE","\\textcolor{##0c7f99}{#1}"),Oe("\\tealA","\\textcolor{##94fff5}{#1}"),Oe("\\tealB","\\textcolor{##26edd5}{#1}"),Oe("\\tealC","\\textcolor{##01d1c1}{#1}"),Oe("\\tealD","\\textcolor{##01a995}{#1}"),Oe("\\tealE","\\textcolor{##208170}{#1}"),Oe("\\greenA","\\textcolor{##b6ffb0}{#1}"),Oe("\\greenB","\\textcolor{##8af281}{#1}"),Oe("\\greenC","\\textcolor{##74cf70}{#1}"),Oe("\\greenD","\\textcolor{##1fab54}{#1}"),Oe("\\greenE","\\textcolor{##0d923f}{#1}"),Oe("\\goldA","\\textcolor{##ffd0a9}{#1}"),Oe("\\goldB","\\textcolor{##ffbb71}{#1}"),Oe("\\goldC","\\textcolor{##ff9c39}{#1}"),Oe("\\goldD","\\textcolor{##e07d10}{#1}"),Oe("\\goldE","\\textcolor{##a75a05}{#1}"),Oe("\\redA","\\textcolor{##fca9a9}{#1}"),Oe("\\redB","\\textcolor{##ff8482}{#1}"),Oe("\\redC","\\textcolor{##f9685d}{#1}"),Oe("\\redD","\\textcolor{##e84d39}{#1}"),Oe("\\redE","\\textcolor{##bc2612}{#1}"),Oe("\\maroonA","\\textcolor{##ffbde0}{#1}"),Oe("\\maroonB","\\textcolor{##ff92c6}{#1}"),Oe("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Oe("\\maroonD","\\textcolor{##ca337c}{#1}"),Oe("\\maroonE","\\textcolor{##9e034e}{#1}"),Oe("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Oe("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Oe("\\purpleC","\\textcolor{##aa87ff}{#1}"),Oe("\\purpleD","\\textcolor{##7854ab}{#1}"),Oe("\\purpleE","\\textcolor{##543b78}{#1}"),Oe("\\mintA","\\textcolor{##f5f9e8}{#1}"),Oe("\\mintB","\\textcolor{##edf2df}{#1}"),Oe("\\mintC","\\textcolor{##e0e5cc}{#1}"),Oe("\\grayA","\\textcolor{##f6f7f7}{#1}"),Oe("\\grayB","\\textcolor{##f0f1f2}{#1}"),Oe("\\grayC","\\textcolor{##e3e5e6}{#1}"),Oe("\\grayD","\\textcolor{##d6d8da}{#1}"),Oe("\\grayE","\\textcolor{##babec2}{#1}"),Oe("\\grayF","\\textcolor{##888d93}{#1}"),Oe("\\grayG","\\textcolor{##626569}{#1}"),Oe("\\grayH","\\textcolor{##3b3e40}{#1}"),Oe("\\grayI","\\textcolor{##21242c}{#1}"),Oe("\\kaBlue","\\textcolor{##314453}{#1}"),Oe("\\kaGreen","\\textcolor{##71B307}{#1}");var Ma={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ro=function(){function K(h,f,v){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(h),this.macros=new ko(Oo,f.macros),this.mode=v,this.stack=[]}var u=K.prototype;return u.feed=function(f){this.lexer=new Qa(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 v;(v=this.stack).push.apply(v,f)},u.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},u.consumeArgs=function(f){for(var v=[],R=0;R<f;++R){this.consumeSpaces();var j=this.popToken();if(j.text==="{"){for(var me=[],Ee=1;Ee!==0;){var Ge=this.popToken();if(me.push(Ge),Ge.text==="{")++Ee;else if(Ge.text==="}")--Ee;else if(Ge.text==="EOF")throw new m("End of input in macro argument",j)}me.pop(),me.reverse(),v[R]=me}else{if(j.text==="EOF")throw new m("End of input expecting macro argument");v[R]=[j]}}return v},u.expandOnce=function(){var f=this.popToken(),v=f.text,R=this._getExpansion(v);if(R==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new m("Too many expansions: infinite loop or need to increase maxExpand setting");var j=R.tokens;if(R.numArgs){var me=this.consumeArgs(R.numArgs);j=j.slice();for(var Ee=j.length-1;Ee>=0;--Ee){var Ge=j[Ee];if(Ge.text==="#"){if(Ee===0)throw new m("Incomplete placeholder at end of macro body",Ge);if(Ge=j[--Ee],Ge.text==="#")j.splice(Ee+1,1);else if(/^[1-9]$/.test(Ge.text)){var lt;(lt=j).splice.apply(lt,[Ee,2].concat(me[+Ge.text-1]))}else throw new m("Not a valid argument number",Ge)}}}return this.pushTokens(j),j},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof pe)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 v=[],R=this.stack.length;for(this.pushToken(new pe(f));this.stack.length>R;){var j=this.expandOnce();j instanceof pe&&v.push(this.stack.pop())}return v}},u.expandMacroAsText=function(f){var v=this.expandMacro(f);return v&&v.map(function(R){return R.text}).join("")},u._getExpansion=function(f){var v=this.macros.get(f);if(v==null)return v;var R=typeof v=="function"?v(this):v;if(typeof R=="string"){var j=0;if(R.indexOf("#")!==-1)for(var me=R.replace(/##/g,"");me.indexOf("#"+(j+1))!==-1;)++j;for(var Ee=new Qa(R,this.settings),Ge=[],lt=Ee.lex();lt.text!=="EOF";)Ge.push(lt),lt=Ee.lex();Ge.reverse();var xt={tokens:Ge,numArgs:j};return xt}return R},u.isDefined=function(f){return this.macros.has(f)||Vs.hasOwnProperty(f)||Ct.math.hasOwnProperty(f)||Ct.text.hasOwnProperty(f)||Ma.hasOwnProperty(f)},K}(),io={"\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"}},ha={\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"},ui=function(){function K(h,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 ro(h,f,this.mode),this.settings=f,this.leftrightDepth=0}var u=K.prototype;return u.expect=function(f,v){if(v===void 0&&(v=!0),this.fetch().text!==f)throw new m("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());v&&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,v){for(var R=[];;){this.mode==="math"&&this.consumeSpaces();var j=this.fetch();if(K.endOfExpression.indexOf(j.text)!==-1||v&&j.text===v||f&&Vs[j.text]&&Vs[j.text].infix)break;var me=this.parseAtom(v);if(!me)break;R.push(me)}return this.mode==="text"&&this.formLigatures(R),this.handleInfixNodes(R)},u.handleInfixNodes=function(f){for(var v=-1,R,j=0;j<f.length;j++){var me=Yn(f[j],"infix");if(me){if(v!==-1)throw new m("only one infix operator per group",me.token);v=j,R=me.replaceWith}}if(v!==-1&&R){var Ee,Ge,lt=f.slice(0,v),xt=f.slice(v+1);lt.length===1&&lt[0].type==="ordgroup"?Ee=lt[0]:Ee={type:"ordgroup",mode:this.mode,body:lt},xt.length===1&&xt[0].type==="ordgroup"?Ge=xt[0]:Ge={type:"ordgroup",mode:this.mode,body:xt};var Mt;return R==="\\\\abovefrac"?Mt=this.callFunction(R,[Ee,f[v],Ge],[]):Mt=this.callFunction(R,[Ee,Ge],[]),[Mt]}else return f},u.handleSupSubscript=function(f){var v=this.fetch(),R=v.text;this.consume();var j=this.parseGroup(f,!1,K.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!j)throw new m("Expected group after '"+R+"'",v);return j},u.formatUnsupportedCmd=function(f){for(var v=[],R=0;R<f.length;R++)v.push({type:"textord",mode:"text",text:f[R]});var j={type:"text",mode:this.mode,body:v},me={type:"color",mode:this.mode,color:this.settings.errorColor,body:[j]};return me},u.parseAtom=function(f){var v=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return v;for(var R,j;;){this.consumeSpaces();var me=this.fetch();if(me.text==="\\limits"||me.text==="\\nolimits"){var Ee=Yn(v,"op");if(Ee){var Ge=me.text==="\\limits";Ee.limits=Ge,Ee.alwaysHandleSupSub=!0}else if(Ee=Yn(v,"operatorname"),Ee&&Ee.alwaysHandleSupSub){var lt=me.text==="\\limits";Ee.limits=lt}else throw new m("Limit controls must follow a math operator",me);this.consume()}else if(me.text==="^"){if(R)throw new m("Double superscript",me);R=this.handleSupSubscript("superscript")}else if(me.text==="_"){if(j)throw new m("Double subscript",me);j=this.handleSupSubscript("subscript")}else if(me.text==="'"){if(R)throw new m("Double superscript",me);var xt={type:"textord",mode:this.mode,text:"\\prime"},Mt=[xt];for(this.consume();this.fetch().text==="'";)Mt.push(xt),this.consume();this.fetch().text==="^"&&Mt.push(this.handleSupSubscript("superscript")),R={type:"ordgroup",mode:this.mode,body:Mt}}else break}return R||j?{type:"supsub",mode:this.mode,base:v,sup:R,sub:j}:v},u.parseFunction=function(f,v,R){var j=this.fetch(),me=j.text,Ee=Vs[me];if(!Ee)return null;if(this.consume(),R!=null&&Ee.greediness<=R)throw new m("Got function '"+me+"' with no arguments"+(v?" as "+v:""),j);if(this.mode==="text"&&!Ee.allowedInText)throw new m("Can't use function '"+me+"' in text mode",j);if(this.mode==="math"&&Ee.allowedInMath===!1)throw new m("Can't use function '"+me+"' in math mode",j);var Ge=this.parseArguments(me,Ee),lt=Ge.args,xt=Ge.optArgs;return this.callFunction(me,lt,xt,j,f)},u.callFunction=function(f,v,R,j,me){var Ee={funcName:f,parser:this,token:j,breakOnTokenText:me},Ge=Vs[f];if(Ge&&Ge.handler)return Ge.handler(Ee,v,R);throw new m("No function handler for "+f)},u.parseArguments=function(f,v){var R=v.numArgs+v.numOptionalArgs;if(R===0)return{args:[],optArgs:[]};for(var j=v.greediness,me=[],Ee=[],Ge=0;Ge<R;Ge++){var lt=v.argTypes&&v.argTypes[Ge],xt=Ge<v.numOptionalArgs,Mt=Ge>0&&!xt||Ge===0&&!xt&&this.mode==="math",zt=this.parseGroupOfType("argument to '"+f+"'",lt,xt,j,Mt);if(!zt){if(xt){Ee.push(null);continue}throw new m("Expected group after '"+f+"'",this.fetch())}(xt?Ee:me).push(zt)}return{args:me,optArgs:Ee}},u.parseGroupOfType=function(f,v,R,j,me){switch(v){case"color":return me&&this.consumeSpaces(),this.parseColorGroup(R);case"size":return me&&this.consumeSpaces(),this.parseSizeGroup(R);case"url":return this.parseUrlGroup(R,me);case"math":case"text":return this.parseGroup(f,R,j,void 0,v,me);case"hbox":{var Ee=this.parseGroup(f,R,j,void 0,"text",me);if(!Ee)return Ee;var Ge={type:"styling",mode:Ee.mode,body:[Ee],style:"text"};return Ge}case"raw":{if(me&&this.consumeSpaces(),R&&this.fetch().text==="{")return null;var lt=this.parseStringGroup("raw",R,!0);if(lt)return{type:"raw",mode:"text",string:lt.text};throw new m("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,R,j,void 0,void 0,me);default:throw new m("Unknown group type as "+f,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(f,v,R){var j=v?"[":"{",me=v?"]":"}",Ee=this.fetch();if(Ee.text!==j){if(v)return null;if(R&&Ee.text!=="EOF"&&/[^{}[\]]/.test(Ee.text))return this.consume(),Ee}var Ge=this.mode;this.mode="text",this.expect(j);for(var lt="",xt=this.fetch(),Mt=0,zt=xt,Wt;(Wt=this.fetch()).text!==me||R&&Mt>0;){switch(Wt.text){case"EOF":throw new m("Unexpected end of input in "+f,xt.range(zt,lt));case j:Mt++;break;case me:Mt--;break}zt=Wt,lt+=zt.text,this.consume()}return this.expect(me),this.mode=Ge,xt.range(zt,lt)},u.parseRegexGroup=function(f,v){var R=this.mode;this.mode="text";for(var j=this.fetch(),me=j,Ee="",Ge;(Ge=this.fetch()).text!=="EOF"&&f.test(Ee+Ge.text);)me=Ge,Ee+=me.text,this.consume();if(Ee==="")throw new m("Invalid "+v+": '"+j.text+"'",j);return this.mode=R,j.range(me,Ee)},u.parseColorGroup=function(f){var v=this.parseStringGroup("color",f);if(!v)return null;var R=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(v.text);if(!R)throw new m("Invalid color: '"+v.text+"'",v);var j=R[0];return/^[0-9a-f]{6}$/i.test(j)&&(j="#"+j),{type:"color-token",mode:this.mode,color:j}},u.parseSizeGroup=function(f){var v,R=!1;if(!f&&this.fetch().text!=="{"?v=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):v=this.parseStringGroup("size",f),!v)return null;!f&&v.text.length===0&&(v.text="0pt",R=!0);var j=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(v.text);if(!j)throw new m("Invalid size: '"+v.text+"'",v);var me={number:+(j[1]+j[2]),unit:j[3]};if(!ir(me))throw new m("Invalid unit: '"+me.unit+"'",v);return{type:"size",mode:this.mode,value:me,isBlank:R}},u.parseUrlGroup=function(f,v){this.gullet.lexer.setCatcode("%",13);var R=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!R)return null;var j=R.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:j}},u.parseGroup=function(f,v,R,j,me,Ee){var Ge=this.mode;me&&this.switchMode(me),Ee&&this.consumeSpaces();var lt=this.fetch(),xt=lt.text,Mt;if(v?xt==="[":xt==="{"||xt==="\\begingroup"){this.consume();var zt=K.endOfGroup[xt];this.gullet.beginGroup();var Wt=this.parseExpression(!1,zt),Jt=this.fetch();this.expect(zt),this.gullet.endGroup(),Mt={type:"ordgroup",mode:this.mode,loc:be.range(lt,Jt),body:Wt,semisimple:xt==="\\begingroup"||void 0}}else if(v)Mt=null;else if(Mt=this.parseFunction(j,f,R)||this.parseSymbol(),Mt==null&&xt[0]==="\\"&&!Ma.hasOwnProperty(xt)){if(this.settings.throwOnError)throw new m("Undefined control sequence: "+xt,lt);Mt=this.formatUnsupportedCmd(xt),this.consume()}return me&&this.switchMode(Ge),Mt},u.formLigatures=function(f){for(var v=f.length-1,R=0;R<v;++R){var j=f[R],me=j.text;me==="-"&&f[R+1].text==="-"&&(R+1<v&&f[R+2].text==="-"?(f.splice(R,3,{type:"textord",mode:"text",loc:be.range(j,f[R+2]),text:"---"}),v-=2):(f.splice(R,2,{type:"textord",mode:"text",loc:be.range(j,f[R+1]),text:"--"}),v-=1)),(me==="'"||me==="`")&&f[R+1].text===me&&(f.splice(R,2,{type:"textord",mode:"text",loc:be.range(j,f[R+1]),text:me+me}),v-=1)}},u.parseSymbol=function(){var f=this.fetch(),v=f.text;if(/^\\verb[^a-zA-Z]/.test(v)){this.consume();var R=v.slice(5),j=R.charAt(0)==="*";if(j&&(R=R.slice(1)),R.length<2||R.charAt(0)!==R.slice(-1))throw new m(`\\verb assertion failed --
please report what input caused this bug`);return R=R.slice(1,-1),{type:"verb",mode:"text",body:R,star:j}}ha.hasOwnProperty(v[0])&&!Ct[this.mode][v[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+v[0]+'" used in math mode',f),v=ha[v[0]]+v.substr(1));var me=Lo.exec(v);me&&(v=v.substring(0,me.index),v==="i"?v="\u0131":v==="j"&&(v="\u0237"));var Ee;if(Ct[this.mode][v]){this.settings.strict&&this.mode==="math"&&In.indexOf(v)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+v[0]+'" used in math mode',f);var Ge=Ct[this.mode][v].group,lt=be.range(f),xt;if(qe.hasOwnProperty(Ge)){var Mt=Ge;xt={type:"atom",mode:this.mode,family:Mt,loc:lt,text:v}}else xt={type:Ge,mode:this.mode,loc:lt,text:v};Ee=xt}else if(v.charCodeAt(0)>=128)this.settings.strict&&(Ne(v.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+v[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+v[0]+'"'+(" ("+v.charCodeAt(0)+")"),f)),Ee={type:"textord",mode:"text",loc:be.range(f),text:v};else return null;if(this.consume(),me)for(var zt=0;zt<me[0].length;zt++){var Wt=me[0][zt];if(!io[Wt])throw new m("Unknown accent ' "+Wt+"'",f);var Jt=io[Wt][this.mode];if(!Jt)throw new m("Accent "+Wt+" unsupported in "+this.mode+" mode",f);Ee={type:"accent",mode:this.mode,loc:be.range(f),label:Jt,isStretchy:!1,isShifty:!0,base:Ee}}return Ee},K}();ui.endOfExpression=["}","\\endgroup","\\end","\\right","&"],ui.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},ui.SUPSUB_GREEDINESS=1;var Hi=function(u,h){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new ui(u,h);delete f.gullet.macros.current["\\df@tag"];var v=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!h.displayMode)throw new m("\\tag works only in display equations");f.gullet.feed("\\df@tag"),v=[{type:"tag",mode:"text",body:v,tag:f.parse()}]}return v},Zs=Hi,so=function(u,h,f){h.textContent="";var v=Ba(u,f).toNode();h.appendChild(v)};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."),so=function(){throw new m("KaTeX doesn't work in quirks mode.")});var fa=function(u,h){var f=Ba(u,h).toMarkup();return f},Po=function(u,h){var f=new T(h);return Zs(u,f)},ao=function(u,h,f){if(f.throwOnError||!(u instanceof m))throw u;var v=bt.makeSpan(["katex-error"],[new de(h)]);return v.setAttribute("title",u.toString()),v.setAttribute("style","color:"+f.errorColor),v},Ba=function(u,h){var f=new T(h);try{var v=Zs(u,f);return $r(v,u,f)}catch(R){return ao(R,u,f)}},Mo=function(u,h){var f=new T(h);try{var v=Zs(u,f);return Lr(v,u,f)}catch(R){return ao(R,u,f)}},oo={version:"0.11.1",render:so,renderToString:fa,ParseError:m,__parse:Po,__renderToDomTree:Ba,__renderToHTMLTree:Mo,__setFontMetrics:St,__defineSymbol:x,__defineMacro:Oe,__domTree:{Span:je,Anchor:Ie,SymbolNode:de,SvgNode:_e,PathNode:Me,LineNode:Fe}},Bo=b.default=oo}]).default})},32834:function(Gt){(function(nt,b){Gt.exports=b()})(this,function(){"use strict";function nt(xe,Re){for(var He=0;He<Re.length;He++){var G=Re[He];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(xe,G.key,G)}}function b(xe,Re,He){return Re&&nt(xe.prototype,Re),He&&nt(xe,He),xe}function _(xe,Re){if(xe){if(typeof xe=="string")return fe(xe,Re);var He=Object.prototype.toString.call(xe).slice(8,-1);if(He==="Object"&&xe.constructor&&(He=xe.constructor.name),He==="Map"||He==="Set")return Array.from(xe);if(He==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(He))return fe(xe,Re)}}function fe(xe,Re){(Re==null||Re>xe.length)&&(Re=xe.length);for(var He=0,G=new Array(Re);He<Re;He++)G[He]=xe[He];return G}function be(xe,Re){var He=typeof Symbol!="undefined"&&xe[Symbol.iterator]||xe["@@iterator"];if(He)return(He=He.call(xe)).next.bind(He);if(Array.isArray(xe)||(He=_(xe))||Re&&xe&&typeof xe.length=="number"){He&&(xe=He);var G=0;return function(){return G>=xe.length?{done:!0}:{done:!1,value:xe[G++]}}}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 pe={exports:{}};function z(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function m(xe){pe.exports.defaults=xe}pe.exports={defaults:z(),getDefaults:z,changeDefaults:m};var ce=/[&<>"']/,ie=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,Y=/[<>"']|&(?!#?\w+;)/g,N={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},w=function(Re){return N[Re]};function S(xe,Re){if(Re){if(ce.test(xe))return xe.replace(ie,w)}else if(o.test(xe))return xe.replace(Y,w);return xe}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function L(xe){return xe.replace(C,function(Re,He){return He=He.toLowerCase(),He==="colon"?":":He.charAt(0)==="#"?He.charAt(1)==="x"?String.fromCharCode(parseInt(He.substring(2),16)):String.fromCharCode(+He.substring(1)):""})}var Q=/(^|[^\[])\^/g;function q(xe,Re){xe=xe.source||xe,Re=Re||"";var He={replace:function(J,ve){return ve=ve.source||ve,ve=ve.replace(Q,"$1"),xe=xe.replace(J,ve),He},getRegex:function(){return new RegExp(xe,Re)}};return He}var H=/[^\w:]/g,T=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function V(xe,Re,He){if(xe){var G;try{G=decodeURIComponent(L(He)).replace(H,"").toLowerCase()}catch(J){return null}if(G.indexOf("javascript:")===0||G.indexOf("vbscript:")===0||G.indexOf("data:")===0)return null}Re&&!T.test(He)&&(He=le(Re,He));try{He=encodeURI(He).replace(/%25/g,"%")}catch(J){return null}return He}var P={},F=/^[^:]+:\/*[^/]*$/,oe=/^([^:]+:)[\s\S]*$/,ye=/^([^:]+:\/*[^/]*)[\s\S]*$/;function le(xe,Re){P[" "+xe]||(F.test(xe)?P[" "+xe]=xe+"/":P[" "+xe]=rt(xe,"/",!0)),xe=P[" "+xe];var He=xe.indexOf(":")===-1;return Re.substring(0,2)==="//"?He?Re:xe.replace(oe,"$1")+Re:Re.charAt(0)==="/"?He?Re:xe.replace(ye,"$1")+Re:xe+Re}var De={exec:function(){}};function Ue(xe){for(var Re=1,He,G;Re<arguments.length;Re++){He=arguments[Re];for(G in He)Object.prototype.hasOwnProperty.call(He,G)&&(xe[G]=He[G])}return xe}function Be(xe,Re){var He=xe.replace(/\|/g,function(ve,Ce,X){for(var ct=!1,ge=Ce;--ge>=0&&X[ge]==="\\";)ct=!ct;return ct?"|":" |"}),G=He.split(/ \|/),J=0;if(G.length>Re)G.splice(Re);else for(;G.length<Re;)G.push("");for(;J<G.length;J++)G[J]=G[J].trim().replace(/\\\|/g,"|");return G}function rt(xe,Re,He){var G=xe.length;if(G===0)return"";for(var J=0;J<G;){var ve=xe.charAt(G-J-1);if(ve===Re&&!He)J++;else if(ve!==Re&&He)J++;else break}return xe.substr(0,G-J)}function ae(xe,Re){if(xe.indexOf(Re[1])===-1)return-1;for(var He=xe.length,G=0,J=0;J<He;J++)if(xe[J]==="\\")J++;else if(xe[J]===Re[0])G++;else if(xe[J]===Re[1]&&(G--,G<0))return J;return-1}function $(xe){xe&&xe.sanitize&&!xe.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 Z(xe,Re){if(Re<1)return"";for(var He="";Re>1;)Re&1&&(He+=xe),Re>>=1,xe+=xe;return He+xe}var ne={escape:S,unescape:L,edit:q,cleanUrl:V,resolveUrl:le,noopTest:De,merge:Ue,splitCells:Be,rtrim:rt,findClosingBracket:ae,checkSanitizeDeprecation:$,repeatString:Z},re=pe.exports.defaults,W=ne.rtrim,y=ne.splitCells,E=ne.escape,B=ne.findClosingBracket;function ue(xe,Re,He){var G=Re.href,J=Re.title?E(Re.title):null,ve=xe[1].replace(/\\([\[\]])/g,"$1");return xe[0].charAt(0)!=="!"?{type:"link",raw:He,href:G,title:J,text:ve}:{type:"image",raw:He,href:G,title:J,text:E(ve)}}function Ne(xe,Re){var He=xe.match(/^(\s+)(?:```)/);if(He===null)return Re;var G=He[1];return Re.split(`
`).map(function(J){var ve=J.match(/^\s+/);if(ve===null)return J;var Ce=ve[0];return Ce.length>=G.length?J.slice(G.length):J}).join(`
`)}var We=function(){function xe(He){this.options=He||re}var Re=xe.prototype;return Re.space=function(G){var J=this.rules.block.newline.exec(G);if(J)return J[0].length>1?{type:"space",raw:J[0]}:{raw:`
`}},Re.code=function(G){var J=this.rules.block.code.exec(G);if(J){var ve=J[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:J[0],codeBlockStyle:"indented",text:this.options.pedantic?ve:W(ve,`
`)}}},Re.fences=function(G){var J=this.rules.block.fences.exec(G);if(J){var ve=J[0],Ce=Ne(ve,J[3]||"");return{type:"code",raw:ve,lang:J[2]?J[2].trim():J[2],text:Ce}}},Re.heading=function(G){var J=this.rules.block.heading.exec(G);if(J){var ve=J[2].trim();if(/#$/.test(ve)){var Ce=W(ve,"#");(this.options.pedantic||!Ce||/ $/.test(Ce))&&(ve=Ce.trim())}return{type:"heading",raw:J[0],depth:J[1].length,text:ve}}},Re.nptable=function(G){var J=this.rules.block.nptable.exec(G);if(J){var ve={type:"table",header:y(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
`):[],raw:J[0]};if(ve.header.length===ve.align.length){var Ce=ve.align.length,X;for(X=0;X<Ce;X++)/^ *-+: *$/.test(ve.align[X])?ve.align[X]="right":/^ *:-+: *$/.test(ve.align[X])?ve.align[X]="center":/^ *:-+ *$/.test(ve.align[X])?ve.align[X]="left":ve.align[X]=null;for(Ce=ve.cells.length,X=0;X<Ce;X++)ve.cells[X]=y(ve.cells[X],ve.header.length);return ve}}},Re.hr=function(G){var J=this.rules.block.hr.exec(G);if(J)return{type:"hr",raw:J[0]}},Re.blockquote=function(G){var J=this.rules.block.blockquote.exec(G);if(J){var ve=J[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:J[0],text:ve}}},Re.list=function(G){var J=this.rules.block.list.exec(G);if(J){var ve=J[0],Ce=J[2],X=Ce.length>1,ct={type:"list",raw:ve,ordered:X,start:X?+Ce.slice(0,-1):"",loose:!1,items:[]},ge=J[0].match(this.rules.block.item),wt=!1,Ft,Kt,on,rn,Zt,ln,er,Sn,pn,Ut=ge.length;on=this.rules.block.listItemStart.exec(ge[0]);for(var Rt=0;Rt<Ut;Rt++){if(Ft=ge[Rt],ve=Ft,this.options.pedantic||(pn=Ft.match(new RegExp("\\n\\s*\\n {0,"+(on[0].length-1)+"}\\S")),pn&&(Zt=Ft.length-pn.index+ge.slice(Rt+1).join(`
`).length,ct.raw=ct.raw.substring(0,ct.raw.length-Zt),Ft=Ft.substring(0,pn.index),ve=Ft,Ut=Rt+1)),Rt!==Ut-1){if(rn=this.rules.block.listItemStart.exec(ge[Rt+1]),this.options.pedantic?rn[1].length>on[1].length:rn[1].length>=on[0].length||rn[1].length>3){ge.splice(Rt,2,ge[Rt]+(!this.options.pedantic&&rn[1].length<on[0].length&&!ge[Rt].match(/\n$/)?"":`
`)+ge[Rt+1]),Rt--,Ut--;continue}else(!this.options.pedantic||this.options.smartLists?rn[2][rn[2].length-1]!==Ce[Ce.length-1]:X===(rn[2].length===1))&&(Zt=ge.slice(Rt+1).join(`
`).length,ct.raw=ct.raw.substring(0,ct.raw.length-Zt),Rt=Ut-1);on=rn}Kt=Ft.length,Ft=Ft.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Ft.indexOf(`
`)&&(Kt-=Ft.length,Ft=this.options.pedantic?Ft.replace(/^ {1,4}/gm,""):Ft.replace(new RegExp("^ {1,"+Kt+"}","gm"),"")),Ft=W(Ft,`
`),Rt!==Ut-1&&(ve=ve+`
`),ln=wt||/\n\n(?!\s*$)/.test(ve),Rt!==Ut-1&&(wt=ve.slice(-2)===`
`,ln||(ln=wt)),ln&&(ct.loose=!0),this.options.gfm&&(er=/^\[[ xX]\] /.test(Ft),Sn=void 0,er&&(Sn=Ft[1]!==" ",Ft=Ft.replace(/^\[[ xX]\] +/,""))),ct.items.push({type:"list_item",raw:ve,task:er,checked:Sn,loose:ln,text:Ft})}return ct}},Re.html=function(G){var J=this.rules.block.html.exec(G);if(J)return{type:this.options.sanitize?"paragraph":"html",raw:J[0],pre:!this.options.sanitizer&&(J[1]==="pre"||J[1]==="script"||J[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(J[0]):E(J[0]):J[0]}},Re.def=function(G){var J=this.rules.block.def.exec(G);if(J){J[3]&&(J[3]=J[3].substring(1,J[3].length-1));var ve=J[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ve,raw:J[0],href:J[2],title:J[3]}}},Re.table=function(G){var J=this.rules.block.table.exec(G);if(J){var ve={type:"table",header:y(J[1].replace(/^ *| *\| *$/g,"")),align:J[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:J[3]?J[3].replace(/\n$/,"").split(`
`):[]};if(ve.header.length===ve.align.length){ve.raw=J[0];var Ce=ve.align.length,X;for(X=0;X<Ce;X++)/^ *-+: *$/.test(ve.align[X])?ve.align[X]="right":/^ *:-+: *$/.test(ve.align[X])?ve.align[X]="center":/^ *:-+ *$/.test(ve.align[X])?ve.align[X]="left":ve.align[X]=null;for(Ce=ve.cells.length,X=0;X<Ce;X++)ve.cells[X]=y(ve.cells[X].replace(/^ *\| *| *\| *$/g,""),ve.header.length);return ve}}},Re.lheading=function(G){var J=this.rules.block.lheading.exec(G);if(J)return{type:"heading",raw:J[0],depth:J[2].charAt(0)==="="?1:2,text:J[1]}},Re.paragraph=function(G){var J=this.rules.block.paragraph.exec(G);if(J)return{type:"paragraph",raw:J[0],text:J[1].charAt(J[1].length-1)===`
`?J[1].slice(0,-1):J[1]}},Re.text=function(G){var J=this.rules.block.text.exec(G);if(J)return{type:"text",raw:J[0],text:J[0]}},Re.escape=function(G){var J=this.rules.inline.escape.exec(G);if(J)return{type:"escape",raw:J[0],text:E(J[1])}},Re.tag=function(G,J,ve){var Ce=this.rules.inline.tag.exec(G);if(Ce)return!J&&/^<a /i.test(Ce[0])?J=!0:J&&/^<\/a>/i.test(Ce[0])&&(J=!1),!ve&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ce[0])?ve=!0:ve&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ce[0])&&(ve=!1),{type:this.options.sanitize?"text":"html",raw:Ce[0],inLink:J,inRawBlock:ve,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):E(Ce[0]):Ce[0]}},Re.link=function(G){var J=this.rules.inline.link.exec(G);if(J){var ve=J[2].trim();if(!this.options.pedantic&&/^</.test(ve)){if(!/>$/.test(ve))return;var Ce=W(ve.slice(0,-1),"\\");if((ve.length-Ce.length)%2===0)return}else{var X=B(J[2],"()");if(X>-1){var ct=J[0].indexOf("!")===0?5:4,ge=ct+J[1].length+X;J[2]=J[2].substring(0,X),J[0]=J[0].substring(0,ge).trim(),J[3]=""}}var wt=J[2],Ft="";if(this.options.pedantic){var Kt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(wt);Kt&&(wt=Kt[1],Ft=Kt[3])}else Ft=J[3]?J[3].slice(1,-1):"";return wt=wt.trim(),/^</.test(wt)&&(this.options.pedantic&&!/>$/.test(ve)?wt=wt.slice(1):wt=wt.slice(1,-1)),ue(J,{href:wt&&wt.replace(this.rules.inline._escapes,"$1"),title:Ft&&Ft.replace(this.rules.inline._escapes,"$1")},J[0])}},Re.reflink=function(G,J){var ve;if((ve=this.rules.inline.reflink.exec(G))||(ve=this.rules.inline.nolink.exec(G))){var Ce=(ve[2]||ve[1]).replace(/\s+/g," ");if(Ce=J[Ce.toLowerCase()],!Ce||!Ce.href){var X=ve[0].charAt(0);return{type:"text",raw:X,text:X}}return ue(ve,Ce,ve[0])}},Re.emStrong=function(G,J,ve){ve===void 0&&(ve="");var Ce=this.rules.inline.emStrong.lDelim.exec(G);if(Ce&&!(Ce[3]&&ve.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var X=Ce[1]||Ce[2]||"";if(!X||X&&(ve===""||this.rules.inline.punctuation.exec(ve))){var ct=Ce[0].length-1,ge,wt,Ft=ct,Kt=0,on=Ce[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(on.lastIndex=0,J=J.slice(-1*G.length+ct);(Ce=on.exec(J))!=null;)if(ge=Ce[1]||Ce[2]||Ce[3]||Ce[4]||Ce[5]||Ce[6],!!ge){if(wt=ge.length,Ce[3]||Ce[4]){Ft+=wt;continue}else if((Ce[5]||Ce[6])&&ct%3&&!((ct+wt)%3)){Kt+=wt;continue}if(Ft-=wt,!(Ft>0))return wt=Math.min(wt,wt+Ft+Kt),Math.min(ct,wt)%2?{type:"em",raw:G.slice(0,ct+Ce.index+wt+1),text:G.slice(1,ct+Ce.index+wt)}:{type:"strong",raw:G.slice(0,ct+Ce.index+wt+1),text:G.slice(2,ct+Ce.index+wt-1)}}}}},Re.codespan=function(G){var J=this.rules.inline.code.exec(G);if(J){var ve=J[2].replace(/\n/g," "),Ce=/[^ ]/.test(ve),X=/^ /.test(ve)&&/ $/.test(ve);return Ce&&X&&(ve=ve.substring(1,ve.length-1)),ve=E(ve,!0),{type:"codespan",raw:J[0],text:ve}}},Re.br=function(G){var J=this.rules.inline.br.exec(G);if(J)return{type:"br",raw:J[0]}},Re.del=function(G){var J=this.rules.inline.del.exec(G);if(J)return{type:"del",raw:J[0],text:J[2]}},Re.autolink=function(G,J){var ve=this.rules.inline.autolink.exec(G);if(ve){var Ce,X;return ve[2]==="@"?(Ce=E(this.options.mangle?J(ve[1]):ve[1]),X="mailto:"+Ce):(Ce=E(ve[1]),X=Ce),{type:"link",raw:ve[0],text:Ce,href:X,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Re.url=function(G,J){var ve;if(ve=this.rules.inline.url.exec(G)){var Ce,X;if(ve[2]==="@")Ce=E(this.options.mangle?J(ve[0]):ve[0]),X="mailto:"+Ce;else{var ct;do ct=ve[0],ve[0]=this.rules.inline._backpedal.exec(ve[0])[0];while(ct!==ve[0]);Ce=E(ve[0]),ve[1]==="www."?X="http://"+Ce:X=Ce}return{type:"link",raw:ve[0],text:Ce,href:X,tokens:[{type:"text",raw:Ce,text:Ce}]}}},Re.inlineText=function(G,J,ve){var Ce=this.rules.inline.text.exec(G);if(Ce){var X;return J?X=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):E(Ce[0]):Ce[0]:X=E(this.options.smartypants?ve(Ce[0]):Ce[0]),{type:"text",raw:Ce[0],text:X}}},xe}(),Te=ne.noopTest,ze=ne.edit,Ye=ne.merge,Je={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:Te,table:Te,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Je._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Je._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Je.def=ze(Je.def).replace("label",Je._label).replace("title",Je._title).getRegex(),Je.bullet=/(?:[*+-]|\d{1,9}[.)])/,Je.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Je.item=ze(Je.item,"gm").replace(/bull/g,Je.bullet).getRegex(),Je.listItemStart=ze(/^( *)(bull) */).replace("bull",Je.bullet).getRegex(),Je.list=ze(Je.list).replace(/bull/g,Je.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Je.def.source+")").getRegex(),Je._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",Je._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Je.html=ze(Je.html,"i").replace("comment",Je._comment).replace("tag",Je._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Je.paragraph=ze(Je._paragraph).replace("hr",Je.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",Je._tag).getRegex(),Je.blockquote=ze(Je.blockquote).replace("paragraph",Je.paragraph).getRegex(),Je.normal=Ye({},Je),Je.gfm=Ye({},Je.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*|$)"}),Je.gfm.nptable=ze(Je.gfm.nptable).replace("hr",Je.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",Je._tag).getRegex(),Je.gfm.table=ze(Je.gfm.table).replace("hr",Je.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",Je._tag).getRegex(),Je.pedantic=Ye({},Je.normal,{html:ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Je._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:Te,paragraph:ze(Je.normal._paragraph).replace("hr",Je.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",Je.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Te,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:Te,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Ve._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ve.punctuation=ze(Ve.punctuation).replace(/punctuation/g,Ve._punctuation).getRegex(),Ve.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ve.escapedEmSt=/\\\*|\\_/g,Ve._comment=ze(Je._comment).replace("(?:-->|$)","-->").getRegex(),Ve.emStrong.lDelim=ze(Ve.emStrong.lDelim).replace(/punct/g,Ve._punctuation).getRegex(),Ve.emStrong.rDelimAst=ze(Ve.emStrong.rDelimAst,"g").replace(/punct/g,Ve._punctuation).getRegex(),Ve.emStrong.rDelimUnd=ze(Ve.emStrong.rDelimUnd,"g").replace(/punct/g,Ve._punctuation).getRegex(),Ve._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ve._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ve._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])?)+(?![-_])/,Ve.autolink=ze(Ve.autolink).replace("scheme",Ve._scheme).replace("email",Ve._email).getRegex(),Ve._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ve.tag=ze(Ve.tag).replace("comment",Ve._comment).replace("attribute",Ve._attribute).getRegex(),Ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ve._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ve.link=ze(Ve.link).replace("label",Ve._label).replace("href",Ve._href).replace("title",Ve._title).getRegex(),Ve.reflink=ze(Ve.reflink).replace("label",Ve._label).getRegex(),Ve.reflinkSearch=ze(Ve.reflinkSearch,"g").replace("reflink",Ve.reflink).replace("nolink",Ve.nolink).getRegex(),Ve.normal=Ye({},Ve),Ve.pedantic=Ye({},Ve.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:ze(/^!?\[(label)\]\((.*?)\)/).replace("label",Ve._label).getRegex(),reflink:ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ve._label).getRegex()}),Ve.gfm=Ye({},Ve.normal,{escape:ze(Ve.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Ve.gfm.url=ze(Ve.gfm.url,"i").replace("email",Ve.gfm._extended_email).getRegex(),Ve.breaks=Ye({},Ve.gfm,{br:ze(Ve.br).replace("{2,}","*").getRegex(),text:ze(Ve.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Tt={block:Je,inline:Ve},Ke=We,Et=pe.exports.defaults,Le=Tt.block,pt=Tt.inline,Pe=ne.repeatString;function Ae(xe){return xe.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 he(xe){var Re="",He,G,J=xe.length;for(He=0;He<J;He++)G=xe.charCodeAt(He),Math.random()>.5&&(G="x"+G.toString(16)),Re+="&#"+G+";";return Re}var je=function(){function xe(He){this.tokens=[],this.tokens.links=Object.create(null),this.options=He||Et,this.options.tokenizer=this.options.tokenizer||new Ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var G={block:Le.normal,inline:pt.normal};this.options.pedantic?(G.block=Le.pedantic,G.inline=pt.pedantic):this.options.gfm&&(G.block=Le.gfm,this.options.breaks?G.inline=pt.breaks:G.inline=pt.gfm),this.tokenizer.rules=G}xe.lex=function(G,J){var ve=new xe(J);return ve.lex(G)},xe.lexInline=function(G,J){var ve=new xe(J);return ve.inlineTokens(G)};var Re=xe.prototype;return Re.lex=function(G){return G=G.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(G,this.tokens,!0),this.inline(this.tokens),this.tokens},Re.blockTokens=function(G,J,ve){J===void 0&&(J=[]),ve===void 0&&(ve=!0),this.options.pedantic&&(G=G.replace(/^ +$/gm,""));for(var Ce,X,ct,ge;G;){if(Ce=this.tokenizer.space(G)){G=G.substring(Ce.raw.length),Ce.type&&J.push(Ce);continue}if(Ce=this.tokenizer.code(G)){G=G.substring(Ce.raw.length),ge=J[J.length-1],ge&&ge.type==="paragraph"?(ge.raw+=`
`+Ce.raw,ge.text+=`
`+Ce.text):J.push(Ce);continue}if(Ce=this.tokenizer.fences(G)){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.heading(G)){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.nptable(G)){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.hr(G)){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.blockquote(G)){G=G.substring(Ce.raw.length),Ce.tokens=this.blockTokens(Ce.text,[],ve),J.push(Ce);continue}if(Ce=this.tokenizer.list(G)){for(G=G.substring(Ce.raw.length),ct=Ce.items.length,X=0;X<ct;X++)Ce.items[X].tokens=this.blockTokens(Ce.items[X].text,[],!1);J.push(Ce);continue}if(Ce=this.tokenizer.html(G)){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(ve&&(Ce=this.tokenizer.def(G))){G=G.substring(Ce.raw.length),this.tokens.links[Ce.tag]||(this.tokens.links[Ce.tag]={href:Ce.href,title:Ce.title});continue}if(Ce=this.tokenizer.table(G)){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.lheading(G)){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(ve&&(Ce=this.tokenizer.paragraph(G))){G=G.substring(Ce.raw.length),J.push(Ce);continue}if(Ce=this.tokenizer.text(G)){G=G.substring(Ce.raw.length),ge=J[J.length-1],ge&&ge.type==="text"?(ge.raw+=`
`+Ce.raw,ge.text+=`
`+Ce.text):J.push(Ce);continue}if(G){var wt="Infinite loop on byte: "+G.charCodeAt(0);if(this.options.silent){console.error(wt);break}else throw new Error(wt)}}return J},Re.inline=function(G){var J,ve,Ce,X,ct,ge,wt=G.length;for(J=0;J<wt;J++)switch(ge=G[J],ge.type){case"paragraph":case"text":case"heading":{ge.tokens=[],this.inlineTokens(ge.text,ge.tokens);break}case"table":{for(ge.tokens={header:[],cells:[]},X=ge.header.length,ve=0;ve<X;ve++)ge.tokens.header[ve]=[],this.inlineTokens(ge.header[ve],ge.tokens.header[ve]);for(X=ge.cells.length,ve=0;ve<X;ve++)for(ct=ge.cells[ve],ge.tokens.cells[ve]=[],Ce=0;Ce<ct.length;Ce++)ge.tokens.cells[ve][Ce]=[],this.inlineTokens(ct[Ce],ge.tokens.cells[ve][Ce]);break}case"blockquote":{this.inline(ge.tokens);break}case"list":{for(X=ge.items.length,ve=0;ve<X;ve++)this.inline(ge.items[ve].tokens);break}}return G},Re.inlineTokens=function(G,J,ve,Ce){J===void 0&&(J=[]),ve===void 0&&(ve=!1),Ce===void 0&&(Ce=!1);var X,ct,ge=G,wt,Ft,Kt;if(this.tokens.links){var on=Object.keys(this.tokens.links);if(on.length>0)for(;(wt=this.tokenizer.rules.inline.reflinkSearch.exec(ge))!=null;)on.includes(wt[0].slice(wt[0].lastIndexOf("[")+1,-1))&&(ge=ge.slice(0,wt.index)+"["+Pe("a",wt[0].length-2)+"]"+ge.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(wt=this.tokenizer.rules.inline.blockSkip.exec(ge))!=null;)ge=ge.slice(0,wt.index)+"["+Pe("a",wt[0].length-2)+"]"+ge.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(wt=this.tokenizer.rules.inline.escapedEmSt.exec(ge))!=null;)ge=ge.slice(0,wt.index)+"++"+ge.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;G;){if(Ft||(Kt=""),Ft=!1,X=this.tokenizer.escape(G)){G=G.substring(X.raw.length),J.push(X);continue}if(X=this.tokenizer.tag(G,ve,Ce)){G=G.substring(X.raw.length),ve=X.inLink,Ce=X.inRawBlock;var rn=J[J.length-1];rn&&X.type==="text"&&rn.type==="text"?(rn.raw+=X.raw,rn.text+=X.text):J.push(X);continue}if(X=this.tokenizer.link(G)){G=G.substring(X.raw.length),X.type==="link"&&(X.tokens=this.inlineTokens(X.text,[],!0,Ce)),J.push(X);continue}if(X=this.tokenizer.reflink(G,this.tokens.links)){G=G.substring(X.raw.length);var Zt=J[J.length-1];X.type==="link"?(X.tokens=this.inlineTokens(X.text,[],!0,Ce),J.push(X)):Zt&&X.type==="text"&&Zt.type==="text"?(Zt.raw+=X.raw,Zt.text+=X.text):J.push(X);continue}if(X=this.tokenizer.emStrong(G,ge,Kt)){G=G.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],ve,Ce),J.push(X);continue}if(X=this.tokenizer.codespan(G)){G=G.substring(X.raw.length),J.push(X);continue}if(X=this.tokenizer.br(G)){G=G.substring(X.raw.length),J.push(X);continue}if(X=this.tokenizer.del(G)){G=G.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],ve,Ce),J.push(X);continue}if(X=this.tokenizer.autolink(G,he)){G=G.substring(X.raw.length),J.push(X);continue}if(!ve&&(X=this.tokenizer.url(G,he))){G=G.substring(X.raw.length),J.push(X);continue}if(X=this.tokenizer.inlineText(G,Ce,Ae)){G=G.substring(X.raw.length),X.raw.slice(-1)!=="_"&&(Kt=X.raw.slice(-1)),Ft=!0,ct=J[J.length-1],ct&&ct.type==="text"?(ct.raw+=X.raw,ct.text+=X.text):J.push(X);continue}if(G){var ln="Infinite loop on byte: "+G.charCodeAt(0);if(this.options.silent){console.error(ln);break}else throw new Error(ln)}}return J},b(xe,null,[{key:"rules",get:function(){return{block:Le,inline:pt}}}]),xe}(),Ie=pe.exports.defaults,we=ne.cleanUrl,M=ne.escape,de=function(){function xe(He){this.options=He||Ie}var Re=xe.prototype;return Re.code=function(G,J,ve){var Ce=(J||"").match(/\S*/)[0];if(this.options.highlight){var X=this.options.highlight(G,Ce);X!=null&&X!==G&&(ve=!0,G=X)}return G=G.replace(/\n$/,"")+`
`,Ce?'<pre><code class="'+this.options.langPrefix+M(Ce,!0)+'">'+(ve?G:M(G,!0))+`</code></pre>
`:"<pre><code>"+(ve?G:M(G,!0))+`</code></pre>
`},Re.blockquote=function(G){return`<blockquote>
`+G+`</blockquote>
`},Re.html=function(G){return G},Re.heading=function(G,J,ve,Ce){return this.options.headerIds?"<h"+J+' id="'+this.options.headerPrefix+Ce.slug(ve)+'">'+G+"</h"+J+`>
`:"<h"+J+">"+G+"</h"+J+`>
`},Re.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Re.list=function(G,J,ve){var Ce=J?"ol":"ul",X=J&&ve!==1?' start="'+ve+'"':"";return"<"+Ce+X+`>
`+G+"</"+Ce+`>
`},Re.listitem=function(G){return"<li>"+G+`</li>
`},Re.checkbox=function(G){return"<input "+(G?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Re.paragraph=function(G){return"<p>"+G+`</p>
`},Re.table=function(G,J){return J&&(J="<tbody>"+J+"</tbody>"),`<table>
<thead>
`+G+`</thead>
`+J+`</table>
`},Re.tablerow=function(G){return`<tr>
`+G+`</tr>
`},Re.tablecell=function(G,J){var ve=J.header?"th":"td",Ce=J.align?"<"+ve+' align="'+J.align+'">':"<"+ve+">";return Ce+G+"</"+ve+`>
`},Re.strong=function(G){return"<strong>"+G+"</strong>"},Re.em=function(G){return"<em>"+G+"</em>"},Re.codespan=function(G){return"<code>"+G+"</code>"},Re.br=function(){return this.options.xhtml?"<br/>":"<br>"},Re.del=function(G){return"<del>"+G+"</del>"},Re.link=function(G,J,ve){if(G=we(this.options.sanitize,this.options.baseUrl,G),G===null)return ve;var Ce='<a href="'+M(G)+'"';return J&&(Ce+=' title="'+J+'"'),Ce+=">"+ve+"</a>",Ce},Re.image=function(G,J,ve){if(G=we(this.options.sanitize,this.options.baseUrl,G),G===null)return ve;var Ce='<img src="'+G+'" alt="'+ve+'"';return J&&(Ce+=' title="'+J+'"'),Ce+=this.options.xhtml?"/>":">",Ce},Re.text=function(G){return G},xe}(),_e=function(){function xe(){}var Re=xe.prototype;return Re.strong=function(G){return G},Re.em=function(G){return G},Re.codespan=function(G){return G},Re.del=function(G){return G},Re.html=function(G){return G},Re.text=function(G){return G},Re.link=function(G,J,ve){return""+ve},Re.image=function(G,J,ve){return""+ve},Re.br=function(){return""},xe}(),Me=function(){function xe(){this.seen={}}var Re=xe.prototype;return Re.serialize=function(G){return G.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Re.getNextSafeSlug=function(G,J){var ve=G,Ce=0;if(this.seen.hasOwnProperty(ve)){Ce=this.seen[G];do Ce++,ve=G+"-"+Ce;while(this.seen.hasOwnProperty(ve))}return J||(this.seen[G]=Ce,this.seen[ve]=0),ve},Re.slug=function(G,J){J===void 0&&(J={});var ve=this.serialize(G);return this.getNextSafeSlug(ve,J.dryrun)},xe}(),Fe=de,Ze=_e,Qe=Me,tt=pe.exports.defaults,ut=ne.unescape,dt=function(){function xe(He){this.options=He||tt,this.options.renderer=this.options.renderer||new Fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ze,this.slugger=new Qe}xe.parse=function(G,J){var ve=new xe(J);return ve.parse(G)},xe.parseInline=function(G,J){var ve=new xe(J);return ve.parseInline(G)};var Re=xe.prototype;return Re.parse=function(G,J){J===void 0&&(J=!0);var ve="",Ce,X,ct,ge,wt,Ft,Kt,on,rn,Zt,ln,er,Sn,pn,Ut,Rt,Ot,Xt,un=G.length;for(Ce=0;Ce<un;Ce++)switch(Zt=G[Ce],Zt.type){case"space":continue;case"hr":{ve+=this.renderer.hr();continue}case"heading":{ve+=this.renderer.heading(this.parseInline(Zt.tokens),Zt.depth,ut(this.parseInline(Zt.tokens,this.textRenderer)),this.slugger);continue}case"code":{ve+=this.renderer.code(Zt.text,Zt.lang,Zt.escaped);continue}case"table":{for(on="",Kt="",ge=Zt.header.length,X=0;X<ge;X++)Kt+=this.renderer.tablecell(this.parseInline(Zt.tokens.header[X]),{header:!0,align:Zt.align[X]});for(on+=this.renderer.tablerow(Kt),rn="",ge=Zt.cells.length,X=0;X<ge;X++){for(Ft=Zt.tokens.cells[X],Kt="",wt=Ft.length,ct=0;ct<wt;ct++)Kt+=this.renderer.tablecell(this.parseInline(Ft[ct]),{header:!1,align:Zt.align[ct]});rn+=this.renderer.tablerow(Kt)}ve+=this.renderer.table(on,rn);continue}case"blockquote":{rn=this.parse(Zt.tokens),ve+=this.renderer.blockquote(rn);continue}case"list":{for(ln=Zt.ordered,er=Zt.start,Sn=Zt.loose,ge=Zt.items.length,rn="",X=0;X<ge;X++)Ut=Zt.items[X],Rt=Ut.checked,Ot=Ut.task,pn="",Ut.task&&(Xt=this.renderer.checkbox(Rt),Sn?Ut.tokens.length>0&&Ut.tokens[0].type==="text"?(Ut.tokens[0].text=Xt+" "+Ut.tokens[0].text,Ut.tokens[0].tokens&&Ut.tokens[0].tokens.length>0&&Ut.tokens[0].tokens[0].type==="text"&&(Ut.tokens[0].tokens[0].text=Xt+" "+Ut.tokens[0].tokens[0].text)):Ut.tokens.unshift({type:"text",text:Xt}):pn+=Xt),pn+=this.parse(Ut.tokens,Sn),rn+=this.renderer.listitem(pn,Ot,Rt);ve+=this.renderer.list(rn,ln,er);continue}case"html":{ve+=this.renderer.html(Zt.text);continue}case"paragraph":{ve+=this.renderer.paragraph(this.parseInline(Zt.tokens));continue}case"text":{for(rn=Zt.tokens?this.parseInline(Zt.tokens):Zt.text;Ce+1<un&&G[Ce+1].type==="text";)Zt=G[++Ce],rn+=`
`+(Zt.tokens?this.parseInline(Zt.tokens):Zt.text);ve+=J?this.renderer.paragraph(rn):rn;continue}default:{var In='Token with "'+Zt.type+'" type was not found.';if(this.options.silent){console.error(In);return}else throw new Error(In)}}return ve},Re.parseInline=function(G,J){J=J||this.renderer;var ve="",Ce,X,ct=G.length;for(Ce=0;Ce<ct;Ce++)switch(X=G[Ce],X.type){case"escape":{ve+=J.text(X.text);break}case"html":{ve+=J.html(X.text);break}case"link":{ve+=J.link(X.href,X.title,this.parseInline(X.tokens,J));break}case"image":{ve+=J.image(X.href,X.title,X.text);break}case"strong":{ve+=J.strong(this.parseInline(X.tokens,J));break}case"em":{ve+=J.em(this.parseInline(X.tokens,J));break}case"codespan":{ve+=J.codespan(X.text);break}case"br":{ve+=J.br();break}case"del":{ve+=J.del(this.parseInline(X.tokens,J));break}case"text":{ve+=J.text(X.text);break}default:{var ge='Token with "'+X.type+'" type was not found.';if(this.options.silent){console.error(ge);return}else throw new Error(ge)}}return ve},xe}(),St=je,gt=dt,_t=We,Xe=de,qe=_e,st=Me,ot=ne.merge,Ct=ne.checkSanitizeDeprecation,x=ne.escape,D=pe.exports.getDefaults,se=pe.exports.changeDefaults,I=pe.exports.defaults;function U(xe,Re,He){if(typeof xe=="undefined"||xe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof xe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(xe)+", string expected");if(typeof Re=="function"&&(He=Re,Re=null),Re=ot({},U.defaults,Re||{}),Ct(Re),He){var G=Re.highlight,J;try{J=St.lex(xe,Re)}catch(ct){return He(ct)}var ve=function(ge){var wt;if(!ge)try{Re.walkTokens&&U.walkTokens(J,Re.walkTokens),wt=gt.parse(J,Re)}catch(Ft){ge=Ft}return Re.highlight=G,ge?He(ge):He(null,wt)};if(!G||G.length<3||(delete Re.highlight,!J.length))return ve();var Ce=0;U.walkTokens(J,function(ct){ct.type==="code"&&(Ce++,setTimeout(function(){G(ct.text,ct.lang,function(ge,wt){if(ge)return ve(ge);wt!=null&&wt!==ct.text&&(ct.text=wt,ct.escaped=!0),Ce--,Ce===0&&ve()})},0))}),Ce===0&&ve();return}try{var X=St.lex(xe,Re);return Re.walkTokens&&U.walkTokens(X,Re.walkTokens),gt.parse(X,Re)}catch(ct){if(ct.message+=`
Please report this to https://github.com/markedjs/marked.`,Re.silent)return"<p>An error occurred:</p><pre>"+x(ct.message+"",!0)+"</pre>";throw ct}}U.options=U.setOptions=function(xe){return ot(U.defaults,xe),se(U.defaults),U},U.getDefaults=D,U.defaults=I,U.use=function(xe){var Re=ot({},xe);if(xe.renderer&&function(){var G=U.defaults.renderer||new Xe,J=function(X){var ct=G[X];G[X]=function(){for(var ge=arguments.length,wt=new Array(ge),Ft=0;Ft<ge;Ft++)wt[Ft]=arguments[Ft];var Kt=xe.renderer[X].apply(G,wt);return Kt===!1&&(Kt=ct.apply(G,wt)),Kt}};for(var ve in xe.renderer)J(ve);Re.renderer=G}(),xe.tokenizer&&function(){var G=U.defaults.tokenizer||new _t,J=function(X){var ct=G[X];G[X]=function(){for(var ge=arguments.length,wt=new Array(ge),Ft=0;Ft<ge;Ft++)wt[Ft]=arguments[Ft];var Kt=xe.tokenizer[X].apply(G,wt);return Kt===!1&&(Kt=ct.apply(G,wt)),Kt}};for(var ve in xe.tokenizer)J(ve);Re.tokenizer=G}(),xe.walkTokens){var He=U.defaults.walkTokens;Re.walkTokens=function(G){xe.walkTokens(G),He&&He(G)}}U.setOptions(Re)},U.walkTokens=function(xe,Re){for(var He=be(xe),G;!(G=He()).done;){var J=G.value;switch(Re(J),J.type){case"table":{for(var ve=be(J.tokens.header),Ce;!(Ce=ve()).done;){var X=Ce.value;U.walkTokens(X,Re)}for(var ct=be(J.tokens.cells),ge;!(ge=ct()).done;)for(var wt=ge.value,Ft=be(wt),Kt;!(Kt=Ft()).done;){var on=Kt.value;U.walkTokens(on,Re)}break}case"list":{U.walkTokens(J.items,Re);break}default:J.tokens&&U.walkTokens(J.tokens,Re)}}},U.parseInline=function(xe,Re){if(typeof xe=="undefined"||xe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof xe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(xe)+", string expected");Re=ot({},U.defaults,Re||{}),Ct(Re);try{var He=St.lexInline(xe,Re);return Re.walkTokens&&U.walkTokens(He,Re.walkTokens),gt.parseInline(He,Re)}catch(G){if(G.message+=`
Please report this to https://github.com/markedjs/marked.`,Re.silent)return"<p>An error occurred:</p><pre>"+x(G.message+"",!0)+"</pre>";throw G}},U.Parser=gt,U.parser=gt.parse,U.Renderer=Xe,U.TextRenderer=qe,U.Lexer=St,U.lexer=St.lex,U.Tokenizer=_t,U.Slugger=st,U.parse=U;var it=U;return it})},11690:function(Gt){const nt=/[&<>"']/,b=/[&<>"']/g,_=/[<>"']|&(?!#?\w+;)/,fe=/[<>"']|&(?!#?\w+;)/g,be={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pe=le=>be[le];function z(le,De){if(De){if(nt.test(le))return le.replace(b,pe)}else if(_.test(le))return le.replace(fe,pe);return le}const m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ce(le){return le.replace(m,(De,Ue)=>(Ue=Ue.toLowerCase(),Ue==="colon"?":":Ue.charAt(0)==="#"?Ue.charAt(1)==="x"?String.fromCharCode(parseInt(Ue.substring(2),16)):String.fromCharCode(+Ue.substring(1)):""))}const ie=/(^|[^\[])\^/g;function o(le,De){le=le.source||le,De=De||"";const Ue={replace:(Be,rt)=>(rt=rt.source||rt,rt=rt.replace(ie,"$1"),le=le.replace(Be,rt),Ue),getRegex:()=>new RegExp(le,De)};return Ue}const Y=/[^\w:]/g,N=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(le,De,Ue){if(le){let Be;try{Be=decodeURIComponent(ce(Ue)).replace(Y,"").toLowerCase()}catch(rt){return null}if(Be.indexOf("javascript:")===0||Be.indexOf("vbscript:")===0||Be.indexOf("data:")===0)return null}De&&!N.test(Ue)&&(Ue=q(De,Ue));try{Ue=encodeURI(Ue).replace(/%25/g,"%")}catch(Be){return null}return Ue}const S={},C=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,Q=/^([^:]+:\/*[^/]*)[\s\S]*$/;function q(le,De){S[" "+le]||(C.test(le)?S[" "+le]=le+"/":S[" "+le]=P(le,"/",!0)),le=S[" "+le];const Ue=le.indexOf(":")===-1;return De.substring(0,2)==="//"?Ue?De:le.replace(L,"$1")+De:De.charAt(0)==="/"?Ue?De:le.replace(Q,"$1")+De:le+De}const H={exec:function(){}};function T(le){let De=1,Ue,Be;for(;De<arguments.length;De++){Ue=arguments[De];for(Be in Ue)Object.prototype.hasOwnProperty.call(Ue,Be)&&(le[Be]=Ue[Be])}return le}function V(le,De){const Ue=le.replace(/\|/g,(ae,$,Z)=>{let ne=!1,re=$;for(;--re>=0&&Z[re]==="\\";)ne=!ne;return ne?"|":" |"}),Be=Ue.split(/ \|/);let rt=0;if(Be.length>De)Be.splice(De);else for(;Be.length<De;)Be.push("");for(;rt<Be.length;rt++)Be[rt]=Be[rt].trim().replace(/\\\|/g,"|");return Be}function P(le,De,Ue){const Be=le.length;if(Be===0)return"";let rt=0;for(;rt<Be;){const ae=le.charAt(Be-rt-1);if(ae===De&&!Ue)rt++;else if(ae!==De&&Ue)rt++;else break}return le.substr(0,Be-rt)}function F(le,De){if(le.indexOf(De[1])===-1)return-1;const Ue=le.length;let Be=0,rt=0;for(;rt<Ue;rt++)if(le[rt]==="\\")rt++;else if(le[rt]===De[0])Be++;else if(le[rt]===De[1]&&(Be--,Be<0))return rt;return-1}function oe(le){le&&le.sanitize&&!le.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 ye(le,De){if(De<1)return"";let Ue="";for(;De>1;)De&1&&(Ue+=le),De>>=1,le+=le;return Ue+le}Gt.exports={escape:z,unescape:ce,edit:o,cleanUrl:w,resolveUrl:q,noopTest:H,merge:T,splitCells:V,rtrim:P,findClosingBracket:F,checkSanitizeDeprecation:oe,repeatString:ye}},75918:function(Gt,nt,b){"use strict";b.d(nt,{Wi:function(){return m},Z0:function(){return ce},aU:function(){return z},eZ:function(){return o},wY:function(){return ie}});var _=b(4348),fe=b(69323),be=b(13268),pe=function(Y,N,w,S){function C(L){return L instanceof w?L:new w(function(Q){Q(L)})}return new(w||(w=Promise))(function(L,Q){function q(V){try{T(S.next(V))}catch(P){Q(P)}}function H(V){try{T(S.throw(V))}catch(P){Q(P)}}function T(V){V.done?L(V.value):C(V.value).then(q,H)}T((S=S.apply(Y,N||[])).next())})};class z extends fe.JT{constructor(N,w="",S="",C=!0,L){super(),this._onDidChange=this._register(new _.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=N,this._label=w,this._cssClass=S,this._enabled=C,this._actionCallback=L}get id(){return this._id}get label(){return this._label}set label(N){this._setLabel(N)}_setLabel(N){this._label!==N&&(this._label=N,this._onDidChange.fire({label:N}))}get tooltip(){return this._tooltip||""}set tooltip(N){this._setTooltip(N)}_setTooltip(N){this._tooltip!==N&&(this._tooltip=N,this._onDidChange.fire({tooltip:N}))}get class(){return this._cssClass}set class(N){this._setClass(N)}_setClass(N){this._cssClass!==N&&(this._cssClass=N,this._onDidChange.fire({class:N}))}get enabled(){return this._enabled}set enabled(N){this._setEnabled(N)}_setEnabled(N){this._enabled!==N&&(this._enabled=N,this._onDidChange.fire({enabled:N}))}get checked(){return this._checked}set checked(N){this._setChecked(N)}_setChecked(N){this._checked!==N&&(this._checked=N,this._onDidChange.fire({checked:N}))}run(N,w){return pe(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(N))})}}class m extends fe.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new _.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new _.Q5),this.onDidRun=this._onDidRun.event}run(N,w){return pe(this,void 0,void 0,function*(){if(!N.enabled)return;this._onBeforeRun.fire({action:N});let S;try{yield this.runAction(N,w)}catch(C){S=C}this._onDidRun.fire({action:N,error:S})})}runAction(N,w){return pe(this,void 0,void 0,function*(){yield N.run(w)})}}class ce extends z{constructor(N){super(ce.ID,N,N?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ce.ID="vs.actions.separator";class ie{constructor(N,w,S,C){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=N,this.label=w,this.class=C,this._actions=S}get actions(){return this._actions}dispose(){}run(){return pe(this,void 0,void 0,function*(){})}}class o extends z{constructor(){super(o.ID,be.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(Gt,nt,b){"use strict";b.d(nt,{ok:function(){return _}});function _(fe,be){if(!fe)throw new Error(be?`Assertion failed (${be})`:"Assertion Failed")}},52615:function(Gt,nt,b){"use strict";b.d(nt,{CM:function(){return z},JL:function(){return m},dT:function(){return ie},fK:function(){return pe},lA:function(){return ce}});var _=b(4348);class fe{constructor(){this._icons=new Map,this._onDidRegister=new _.Q5}add(Y){const N=this._icons.get(Y.id);N?Y.description?N.description=Y.description:console.error(`Duplicate registration of codicon ${Y.id}`):(this._icons.set(Y.id,Y),this._onDidRegister.fire(Y))}get(Y){return this._icons.get(Y)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const be=new fe,pe=be;function z(o,Y){return new ce(o,Y)}function m(o){return o?o.replace(/\$\((.*?)\)/g,(Y,N)=>` ${N} `).trim():""}class ce{constructor(Y,N,w){this.id=Y,this.definition=N,this.description=w,be.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ie;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const Y=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function N(C){if(C instanceof ce)return["codicon","codicon-"+C.id];const L=Y.exec(C.id);if(!L)return N(ce.error);let[,Q,q]=L;const H=["codicon","codicon-"+Q];return q&&H.push("codicon-modifier-"+q.substr(1)),H}o.asClassNameArray=N;function w(C){return N(C).join(" ")}o.asClassName=w;function S(C){return"."+N(C).join(".")}o.asCSSSelector=S})(ie||(ie={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(ce||(ce={}))},79881:function(Gt,nt,b){"use strict";b.d(nt,{B8:function(){return N},Cp:function(){return pe},F0:function(){return ie},L6:function(){return Y},VV:function(){return ce},b1:function(){return o},dL:function(){return be},ri:function(){return z}});class _{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(S){setTimeout(()=>{throw S.stack?new Error(S.message+`
`+S.stack):S},0)}}emit(S){this.listeners.forEach(C=>{C(S)})}onUnexpectedError(S){this.unexpectedErrorHandler(S),this.emit(S)}onUnexpectedExternalError(S){this.unexpectedErrorHandler(S)}}const fe=new _;function be(w){ce(w)||fe.onUnexpectedError(w)}function pe(w){ce(w)||fe.onUnexpectedExternalError(w)}function z(w){if(w instanceof Error){let{name:S,message:C}=w;const L=w.stacktrace||w.stack;return{$isError:!0,name:S,message:C,stack:L}}return w}const m="Canceled";function ce(w){return w instanceof Error&&w.name===m&&w.message===m}function ie(){const w=new Error(m);return w.name=w.message,w}function o(w){return w?new Error(`Illegal argument: ${w}`):new Error("Illegal argument")}function Y(w){return w?new Error(`Illegal state: ${w}`):new Error("Illegal state")}class N extends Error{constructor(S){super("NotSupported"),S&&(this.message=S)}}},4348:function(Gt,nt,b){"use strict";b.d(nt,{D0:function(){return N},E7:function(){return w},K3:function(){return Y},Q5:function(){return o},ZD:function(){return S},ju:function(){return z}});var _=b(79881),fe=b(69323),be=b(34502),pe=b(95830),z;(function(C){C.None=()=>fe.JT.None;function L(Z){return(ne,re=null,W)=>{let y=!1,E;return E=Z(B=>{if(!y)return E?E.dispose():y=!0,ne.call(re,B)},null,W),y&&E.dispose(),E}}C.once=L;function Q(Z,ne){return F((re,W=null,y)=>Z(E=>re.call(W,ne(E)),null,y))}C.map=Q;function q(Z,ne){return F((re,W=null,y)=>Z(E=>{ne(E),re.call(W,E)},null,y))}C.forEach=q;function H(Z,ne){return F((re,W=null,y)=>Z(E=>ne(E)&&re.call(W,E),null,y))}C.filter=H;function T(Z){return Z}C.signal=T;function V(...Z){return(ne,re=null,W)=>(0,fe.F8)(...Z.map(y=>y(E=>ne.call(re,E),null,W)))}C.any=V;function P(Z,ne,re){let W=re;return Q(Z,y=>(W=ne(W,y),W))}C.reduce=P;function F(Z){let ne;const re=new o({onFirstListenerAdd(){ne=Z(re.fire,re)},onLastListenerRemove(){ne.dispose()}});return re.event}function oe(Z,ne,re=100,W=!1,y){let E,B,ue,Ne=0;const We=new o({leakWarningThreshold:y,onFirstListenerAdd(){E=Z(Te=>{Ne++,B=ne(B,Te),W&&!ue&&(We.fire(B),B=void 0),clearTimeout(ue),ue=setTimeout(()=>{const ze=B;B=void 0,ue=void 0,(!W||Ne>1)&&We.fire(ze),Ne=0},re)})},onLastListenerRemove(){E.dispose()}});return We.event}C.debounce=oe;function ye(Z,ne=(re,W)=>re===W){let re=!0,W;return H(Z,y=>{const E=re||!ne(y,W);return re=!1,W=y,E})}C.latch=ye;function le(Z,ne){return[C.filter(Z,ne),C.filter(Z,re=>!ne(re))]}C.split=le;function De(Z,ne=!1,re=[]){let W=re.slice(),y=Z(ue=>{W?W.push(ue):B.fire(ue)});const E=()=>{W&&W.forEach(ue=>B.fire(ue)),W=null},B=new o({onFirstListenerAdd(){y||(y=Z(ue=>B.fire(ue)))},onFirstListenerDidAdd(){W&&(ne?setTimeout(E):E())},onLastListenerRemove(){y&&y.dispose(),y=null}});return B.event}C.buffer=De;class Ue{constructor(ne){this.event=ne}map(ne){return new Ue(Q(this.event,ne))}forEach(ne){return new Ue(q(this.event,ne))}filter(ne){return new Ue(H(this.event,ne))}reduce(ne,re){return new Ue(P(this.event,ne,re))}latch(){return new Ue(ye(this.event))}debounce(ne,re=100,W=!1,y){return new Ue(oe(this.event,ne,re,W,y))}on(ne,re,W){return this.event(ne,re,W)}once(ne,re,W){return L(this.event)(ne,re,W)}}function Be(Z){return new Ue(Z)}C.chain=Be;function rt(Z,ne,re=W=>W){const W=(...ue)=>B.fire(re(...ue)),y=()=>Z.on(ne,W),E=()=>Z.removeListener(ne,W),B=new o({onFirstListenerAdd:y,onLastListenerRemove:E});return B.event}C.fromNodeEventEmitter=rt;function ae(Z,ne,re=W=>W){const W=(...ue)=>B.fire(re(...ue)),y=()=>Z.addEventListener(ne,W),E=()=>Z.removeEventListener(ne,W),B=new o({onFirstListenerAdd:y,onLastListenerRemove:E});return B.event}C.fromDOMEventEmitter=ae;function $(Z){return new Promise(ne=>L(Z)(ne))}C.toPromise=$})(z||(z={}));class m{constructor(L){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${L}_${m._idPool++}`}start(L){this._stopWatch=new pe.G(!0),this._listenerCount=L}stop(){if(this._stopWatch){const L=this._stopWatch.elapsed();this._elapsedOverall+=L,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${L.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let ce=-1;class ie{constructor(L,Q=Math.random().toString(18).slice(2,5)){this.customThreshold=L,this.name=Q,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(L){let Q=ce;if(typeof this.customThreshold=="number"&&(Q=this.customThreshold),Q<=0||L<Q)return;this._stacks||(this._stacks=new Map);const q=new Error().stack.split(`
`).slice(3).join(`
`),H=this._stacks.get(q)||0;if(this._stacks.set(q,H+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=Q*.5;let T,V=0;for(const[P,F]of this._stacks)(!T||V<F)&&(T=P,V=F);console.warn(`[${this.name}] potential listener LEAK detected, having ${L} listeners already. MOST frequent listener (${V}):`),console.warn(T)}return()=>{const T=this._stacks.get(q)||0;this._stacks.set(q,T-1)}}}class o{constructor(L){var Q;this._disposed=!1,this._options=L,this._leakageMon=ce>0?new ie(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((Q=this._options)===null||Q===void 0)&&Q._profName?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(L,Q,q)=>{var H;this._listeners||(this._listeners=new be.S);const T=this._listeners.isEmpty();T&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const V=this._listeners.push(Q?[L,Q]:L);T&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,L,Q);const P=(H=this._leakageMon)===null||H===void 0?void 0:H.check(this._listeners.size),F=(0,fe.OF)(()=>{P&&P(),this._disposed||(V(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return q instanceof fe.SL?q.add(F):Array.isArray(q)&&q.push(F),F}),this._event}fire(L){var Q,q;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new be.S);for(let H of this._listeners)this._deliveryQueue.push([H,L]);for((Q=this._perfMon)===null||Q===void 0||Q.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[H,T]=this._deliveryQueue.shift();try{typeof H=="function"?H.call(void 0,T):H[0].call(H[1],T)}catch(V){(0,_.dL)(V)}}(q=this._perfMon)===null||q===void 0||q.stop()}}dispose(){var L,Q,q,H,T;this._disposed||(this._disposed=!0,(L=this._listeners)===null||L===void 0||L.clear(),(Q=this._deliveryQueue)===null||Q===void 0||Q.clear(),(H=(q=this._options)===null||q===void 0?void 0:q.onLastListenerRemove)===null||H===void 0||H.call(q),(T=this._leakageMon)===null||T===void 0||T.dispose())}}class Y extends o{constructor(L){super(L),this._isPaused=0,this._eventQueue=new be.S,this._mergeFn=L==null?void 0:L.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const L=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(L))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(L){this._listeners&&(this._isPaused!==0?this._eventQueue.push(L):super.fire(L))}}class N extends Y{constructor(L){var Q;super(L),this._delay=(Q=L.delay)!==null&&Q!==void 0?Q:100}fire(L){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(L)}}class w{constructor(){this.buffers=[]}wrapEvent(L){return(Q,q,H)=>L(T=>{const V=this.buffers[this.buffers.length-1];V?V.push(()=>Q.call(q,T)):Q.call(q,T)},void 0,H)}bufferEvents(L){const Q=[];this.buffers.push(Q);const q=L();return this.buffers.pop(),Q.forEach(H=>H()),q}}class S{constructor(){this.listening=!1,this.inputEvent=z.None,this.inputEventListener=fe.JT.None,this.emitter=new o({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(L){this.inputEvent=L,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=L(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Gt,nt,b){"use strict";b.d(nt,{I:function(){return _}});function _(fe){const be=this;let pe=!1,z;return function(){return pe||(pe=!0,z=fe.apply(be,arguments)),z}}},88226:function(Gt,nt,b){"use strict";b.d(nt,{$:function(){return _}});var _;(function(fe){function be(V){return V&&typeof V=="object"&&typeof V[Symbol.iterator]=="function"}fe.is=be;const pe=Object.freeze([]);function z(){return pe}fe.empty=z;function*m(V){yield V}fe.single=m;function ce(V){return V||pe}fe.from=ce;function ie(V){return!V||V[Symbol.iterator]().next().done===!0}fe.isEmpty=ie;function o(V){return V[Symbol.iterator]().next().value}fe.first=o;function Y(V,P){for(const F of V)if(P(F))return!0;return!1}fe.some=Y;function N(V,P){for(const F of V)if(P(F))return F}fe.find=N;function*w(V,P){for(const F of V)P(F)&&(yield F)}fe.filter=w;function*S(V,P){let F=0;for(const oe of V)yield P(oe,F++)}fe.map=S;function*C(...V){for(const P of V)for(const F of P)yield F}fe.concat=C;function*L(V){for(const P of V)for(const F of P)yield F}fe.concatNested=L;function Q(V,P,F){let oe=F;for(const ye of V)oe=P(oe,ye);return oe}fe.reduce=Q;function*q(V,P,F=V.length){for(P<0&&(P+=V.length),F<0?F+=V.length:F>V.length&&(F=V.length);P<F;P++)yield V[P]}fe.slice=q;function H(V,P=Number.POSITIVE_INFINITY){const F=[];if(P===0)return[F,V];const oe=V[Symbol.iterator]();for(let ye=0;ye<P;ye++){const le=oe.next();if(le.done)return[F,fe.empty()];F.push(le.value)}return[F,{[Symbol.iterator](){return oe}}]}fe.consume=H;function T(V,P,F=(oe,ye)=>oe===ye){const oe=V[Symbol.iterator](),ye=P[Symbol.iterator]();for(;;){const le=oe.next(),De=ye.next();if(le.done!==De.done)return!1;if(le.done)return!0;if(!F(le.value,De.value))return!1}}fe.equals=T})(_||(_={}))},69323:function(Gt,nt,b){"use strict";b.d(nt,{B9:function(){return S},F8:function(){return C},JT:function(){return q},Jz:function(){return T},OF:function(){return L},SL:function(){return Q},Wf:function(){return w},XK:function(){return H},dk:function(){return Y}});var _=b(17845),fe=b(88226);const be=!1;let pe=null;function z(V){pe=V}if(be){const V="__is_disposable_tracked__";z(new class{trackDisposable(P){const F=new Error("Potentially leaked disposable").stack;setTimeout(()=>{P[V]||console.log(F)},3e3)}setParent(P,F){if(P&&P!==q.None)try{P[V]=!0}catch(oe){}}markAsDisposed(P){if(P&&P!==q.None)try{P[V]=!0}catch(F){}}markAsSingleton(P){}})}function m(V){return pe==null||pe.trackDisposable(V),V}function ce(V){pe==null||pe.markAsDisposed(V)}function ie(V,P){pe==null||pe.setParent(V,P)}function o(V,P){if(pe)for(const F of V)pe.setParent(F,P)}function Y(V){return pe==null||pe.markAsSingleton(V),V}class N extends Error{constructor(P){super(`Encountered errors while disposing of store. Errors: [${P.join(", ")}]`),this.errors=P}}function w(V){return typeof V.dispose=="function"&&V.dispose.length===0}function S(V){if(fe.$.is(V)){let P=[];for(const F of V)if(F)try{F.dispose()}catch(oe){P.push(oe)}if(P.length===1)throw P[0];if(P.length>1)throw new N(P);return Array.isArray(V)?[]:V}else if(V)return V.dispose(),V}function C(...V){const P=L(()=>S(V));return o(V,P),P}function L(V){const P=m({dispose:(0,_.I)(()=>{ce(P),V()})});return P}class Q{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){this._isDisposed||(ce(this),this._isDisposed=!0,this.clear())}clear(){try{S(this._toDispose.values())}finally{this._toDispose.clear()}}add(P){if(!P)return P;if(P===this)throw new Error("Cannot register a disposable on itself!");return ie(P,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(P),P}}Q.DISABLE_DISPOSED_WARNING=!1;class q{constructor(){this._store=new Q,m(this),ie(this._store,this)}dispose(){ce(this),this._store.dispose()}_register(P){if(P===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(P)}}q.None=Object.freeze({dispose(){}});class H{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(P){var F;this._isDisposed||P===this._value||((F=this._value)===null||F===void 0||F.dispose(),P&&ie(P,this),this._value=P)}clear(){this.value=void 0}dispose(){var P;this._isDisposed=!0,ce(this),(P=this._value)===null||P===void 0||P.dispose(),this._value=void 0}clearAndLeak(){const P=this._value;return this._value=void 0,P&&ie(P,null),P}}class T{constructor(P){this.object=P}dispose(){}}},34502:function(Gt,nt,b){"use strict";b.d(nt,{S:function(){return fe}});class _{constructor(pe){this.element=pe,this.next=_.Undefined,this.prev=_.Undefined}}_.Undefined=new _(void 0);class fe{constructor(){this._first=_.Undefined,this._last=_.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===_.Undefined}clear(){let pe=this._first;for(;pe!==_.Undefined;){const z=pe.next;pe.prev=_.Undefined,pe.next=_.Undefined,pe=z}this._first=_.Undefined,this._last=_.Undefined,this._size=0}unshift(pe){return this._insert(pe,!1)}push(pe){return this._insert(pe,!0)}_insert(pe,z){const m=new _(pe);if(this._first===_.Undefined)this._first=m,this._last=m;else if(z){const ie=this._last;this._last=m,m.prev=ie,ie.next=m}else{const ie=this._first;this._first=m,m.next=ie,ie.prev=m}this._size+=1;let ce=!1;return()=>{ce||(ce=!0,this._remove(m))}}shift(){if(this._first!==_.Undefined){const pe=this._first.element;return this._remove(this._first),pe}}pop(){if(this._last!==_.Undefined){const pe=this._last.element;return this._remove(this._last),pe}}_remove(pe){if(pe.prev!==_.Undefined&&pe.next!==_.Undefined){const z=pe.prev;z.next=pe.next,pe.next.prev=z}else pe.prev===_.Undefined&&pe.next===_.Undefined?(this._first=_.Undefined,this._last=_.Undefined):pe.next===_.Undefined?(this._last=this._last.prev,this._last.next=_.Undefined):pe.prev===_.Undefined&&(this._first=this._first.next,this._first.prev=_.Undefined);this._size-=1}*[Symbol.iterator](){let pe=this._first;for(;pe!==_.Undefined;)yield pe.element,pe=pe.next}}},23345:function(Gt,nt,b){"use strict";b.d(nt,{$L:function(){return oe},ED:function(){return T},IJ:function(){return P},OS:function(){return Ue},WE:function(){return le},dz:function(){return V},gn:function(){return ye},li:function(){return L},r:function(){return ae},tY:function(){return F},xS:function(){return De}});var _=b(97671),fe;const be="en";let pe=!1,z=!1,m=!1,ce=!1,ie=!1,o=!1,Y=!1,N,w=null,S=null,C;const L=typeof self=="object"?self:typeof b.g=="object"?b.g:{};let Q;typeof L.vscode!="undefined"&&typeof L.vscode.process!="undefined"?Q=L.vscode.process:typeof _!="undefined"&&(Q=_);const q=typeof((fe=Q==null?void 0:Q.versions)===null||fe===void 0?void 0:fe.electron)=="string"&&Q.type==="renderer";if(typeof navigator=="object"&&!q)C=navigator.userAgent,pe=C.indexOf("Windows")>=0,z=C.indexOf("Macintosh")>=0,Y=(C.indexOf("Macintosh")>=0||C.indexOf("iPad")>=0||C.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,m=C.indexOf("Linux")>=0,o=!0,N=navigator.language,w=N;else if(typeof Q=="object"){pe=Q.platform==="win32",z=Q.platform==="darwin",m=Q.platform==="linux",ce=m&&!!Q.env.SNAP&&!!Q.env.SNAP_REVISION,N=be,w=be;const $=Q.env.VSCODE_NLS_CONFIG;if($)try{const Z=JSON.parse($),ne=Z.availableLanguages["*"];N=Z.locale,w=ne||be,S=Z._translationsConfigFile}catch(Z){}ie=!0}else console.error("Unable to resolve platform.");let H=0;z?H=1:pe?H=3:m&&(H=2);const T=pe,V=z,P=m,F=ie,oe=o,ye=Y,le=C,De=function(){if(L.setImmediate)return L.setImmediate.bind(L);if(typeof L.postMessage=="function"&&!L.importScripts){let ne=[];L.addEventListener("message",W=>{if(W.data&&W.data.vscodeSetImmediateId)for(let y=0,E=ne.length;y<E;y++){const B=ne[y];if(B.id===W.data.vscodeSetImmediateId){ne.splice(y,1),B.callback();return}}});let re=0;return W=>{const y=++re;ne.push({id:y,callback:W}),L.postMessage({vscodeSetImmediateId:y},"*")}}if(typeof(Q==null?void 0:Q.nextTick)=="function")return Q.nextTick.bind(Q);const Z=Promise.resolve();return ne=>Z.then(ne)}(),Ue=z||Y?2:pe?1:3;let Be=!0,rt=!1;function ae(){if(!rt){rt=!0;const $=new Uint8Array(2);$[0]=1,$[1]=2,Be=new Uint16Array($.buffer)[0]===513}return Be}},95830:function(Gt,nt,b){"use strict";b.d(nt,{G:function(){return be}});var _=b(23345);const fe=_.li.performance&&typeof _.li.performance.now=="function";class be{constructor(z){this._highResolution=fe&&z,this._startTime=this._now(),this._stopTime=-1}static create(z=!0){return new be(z)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?_.li.performance.now():Date.now()}}},82983:function(Gt,nt,b){"use strict";b.d(nt,{$i:function(){return Ne},C8:function(){return Je},GF:function(){return N},HO:function(){return re},IO:function(){return w},K7:function(){return Ye},Kw:function(){return Ke},LC:function(){return L},Mh:function(){return De},P1:function(){return Ue},PJ:function(){return Et},Qe:function(){return We},R1:function(){return Y},RP:function(){return B},S6:function(){return Le},TT:function(){return T},Ut:function(){return y},V8:function(){return Q},WU:function(){return be},YK:function(){return rt},YU:function(){return pe},ZG:function(){return Be},ZH:function(){return $},ab:function(){return Te},c1:function(){return Ve},df:function(){return oe},ec:function(){return z},fi:function(){return pt},fy:function(){return m},j3:function(){return ce},j_:function(){return P},m5:function(){return _},mK:function(){return F},mr:function(){return S},oH:function(){return he},oL:function(){return ie},ok:function(){return le},ow:function(){return q},qq:function(){return ye},qu:function(){return H},rL:function(){return ae},uS:function(){return Tt},un:function(){return o},uq:function(){return C},vH:function(){return ne},xe:function(){return ze},zY:function(){return V}});function _(M){return!M||typeof M!="string"?!0:M.trim().length===0}const fe=/{(\d+)}/g;function be(M,...de){return de.length===0?M:M.replace(fe,function(_e,Me){const Fe=parseInt(Me,10);return isNaN(Fe)||Fe<0||Fe>=de.length?_e:de[Fe]})}function pe(M){return M.replace(/[<>&]/g,function(de){switch(de){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return de}})}function z(M){return M.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(M,de=" "){const _e=ce(M,de);return ie(_e,de)}function ce(M,de){if(!M||!de)return M;const _e=de.length;if(_e===0||M.length===0)return M;let Me=0;for(;M.indexOf(de,Me)===Me;)Me=Me+_e;return M.substring(Me)}function ie(M,de){if(!M||!de)return M;const _e=de.length,Me=M.length;if(_e===0||Me===0)return M;let Fe=Me,Ze=-1;for(;Ze=M.lastIndexOf(de,Fe-1),!(Ze===-1||Ze+_e!==Fe);){if(Ze===0)return"";Fe=Ze}return M.substring(0,Fe)}function o(M){return M.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Y(M){return M.replace(/\*/g,"")}function N(M,de,_e={}){if(!M)throw new Error("Cannot create regex from empty string");de||(M=z(M)),_e.wholeWord&&(/\B/.test(M.charAt(0))||(M="\\b"+M),/\B/.test(M.charAt(M.length-1))||(M=M+"\\b"));let Me="";return _e.global&&(Me+="g"),_e.matchCase||(Me+="i"),_e.multiline&&(Me+="m"),_e.unicode&&(Me+="u"),new RegExp(M,Me)}function w(M){return M.source==="^"||M.source==="^$"||M.source==="$"||M.source==="^\\s*$"?!1:!!(M.exec("")&&M.lastIndex===0)}function S(M){return(M.global?"g":"")+(M.ignoreCase?"i":"")+(M.multiline?"m":"")+(M.unicode?"u":"")}function C(M){return M.split(/\r\n|\r|\n/)}function L(M){for(let de=0,_e=M.length;de<_e;de++){const Me=M.charCodeAt(de);if(Me!==32&&Me!==9)return de}return-1}function Q(M,de=0,_e=M.length){for(let Me=de;Me<_e;Me++){const Fe=M.charCodeAt(Me);if(Fe!==32&&Fe!==9)return M.substring(de,Me)}return M.substring(de,_e)}function q(M,de=M.length-1){for(let _e=de;_e>=0;_e--){const Me=M.charCodeAt(_e);if(Me!==32&&Me!==9)return _e}return-1}function H(M,de){return M<de?-1:M>de?1:0}function T(M,de,_e=0,Me=M.length,Fe=0,Ze=de.length){for(;_e<Me&&Fe<Ze;_e++,Fe++){let ut=M.charCodeAt(_e),dt=de.charCodeAt(Fe);if(ut<dt)return-1;if(ut>dt)return 1}const Qe=Me-_e,tt=Ze-Fe;return Qe<tt?-1:Qe>tt?1:0}function V(M,de){return P(M,de,0,M.length,0,de.length)}function P(M,de,_e=0,Me=M.length,Fe=0,Ze=de.length){for(;_e<Me&&Fe<Ze;_e++,Fe++){let ut=M.charCodeAt(_e),dt=de.charCodeAt(Fe);if(ut===dt)continue;if(ut>=128||dt>=128)return T(M.toLowerCase(),de.toLowerCase(),_e,Me,Fe,Ze);F(ut)&&(ut-=32),F(dt)&&(dt-=32);const St=ut-dt;if(St!==0)return St}const Qe=Me-_e,tt=Ze-Fe;return Qe<tt?-1:Qe>tt?1:0}function F(M){return M>=97&&M<=122}function oe(M){return M>=65&&M<=90}function ye(M,de){return M.length===de.length&&P(M,de)===0}function le(M,de){const _e=de.length;return de.length>M.length?!1:P(M,de,0,_e)===0}function De(M,de){let _e,Me=Math.min(M.length,de.length);for(_e=0;_e<Me;_e++)if(M.charCodeAt(_e)!==de.charCodeAt(_e))return _e;return Me}function Ue(M,de){let _e,Me=Math.min(M.length,de.length);const Fe=M.length-1,Ze=de.length-1;for(_e=0;_e<Me;_e++)if(M.charCodeAt(Fe-_e)!==de.charCodeAt(Ze-_e))return _e;return Me}function Be(M){return 55296<=M&&M<=56319}function rt(M){return 56320<=M&&M<=57343}function ae(M,de){return(M-55296<<10)+(de-56320)+65536}function $(M,de,_e){const Me=M.charCodeAt(_e);if(Be(Me)&&_e+1<de){const Fe=M.charCodeAt(_e+1);if(rt(Fe))return ae(Me,Fe)}return Me}function Z(M,de){const _e=M.charCodeAt(de-1);if(rt(_e)&&de>1){const Me=M.charCodeAt(de-2);if(Be(Me))return ae(Me,_e)}return _e}function ne(M,de){const _e=Pe.getInstance(),Me=de,Fe=M.length,Ze=$(M,Fe,de);de+=Ze>=65536?2:1;let Qe=_e.getGraphemeBreakType(Ze);for(;de<Fe;){const tt=$(M,Fe,de),ut=_e.getGraphemeBreakType(tt);if(pt(Qe,ut))break;de+=tt>=65536?2:1,Qe=ut}return de-Me}function re(M,de){const _e=Pe.getInstance(),Me=de,Fe=Z(M,de);de-=Fe>=65536?2:1;let Ze=_e.getGraphemeBreakType(Fe);for(;de>0;){const Qe=Z(M,de),tt=_e.getGraphemeBreakType(Qe);if(pt(tt,Ze))break;de-=Qe>=65536?2:1,Ze=tt}return Me-de}const W=/(?:[\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 y(M){return W.test(M)}const E=/(?:[\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 B(M){return E.test(M)}const ue=/^[\t\n\r\x20-\x7E]*$/;function Ne(M){return ue.test(M)}const We=/[\u2028\u2029]/;function Te(M){return We.test(M)}function ze(M){for(let de=0,_e=M.length;de<_e;de++)if(Ye(M.charCodeAt(de)))return!0;return!1}function Ye(M){return M=+M,M>=11904&&M<=55215||M>=63744&&M<=64255||M>=65281&&M<=65374}function Je(M){return M>=127462&&M<=127487||M===8986||M===8987||M===9200||M===9203||M>=9728&&M<=10175||M===11088||M===11093||M>=127744&&M<=128591||M>=128640&&M<=128764||M>=128992&&M<=129003||M>=129280&&M<=129535||M>=129648&&M<=129750}const Ve="\uFEFF";function Tt(M){return!!(M&&M.length>0&&M.charCodeAt(0)===65279)}function Ke(M,de=!1){return M?(de&&(M=M.replace(/\\./g,"")),M.toLowerCase()!==M):!1}function Et(M){return M=M%(2*26),M<26?String.fromCharCode(97+M):String.fromCharCode(65+M-26)}function Le(M){return Pe.getInstance().getGraphemeBreakType(M)}function pt(M,de){return M===0?de!==5&&de!==7:M===2&&de===3?!1:M===4||M===2||M===3||de===4||de===2||de===3?!0:!(M===8&&(de===8||de===9||de===11||de===12)||(M===11||M===9)&&(de===9||de===10)||(M===12||M===10)&&de===10||de===5||de===13||de===7||M===1||M===13&&de===14||M===6&&de===6)}class Pe{constructor(){this._data=Ae()}static getInstance(){return Pe._INSTANCE||(Pe._INSTANCE=new Pe),Pe._INSTANCE}getGraphemeBreakType(de){if(de<32)return de===10?3:de===13?2:4;if(de<127)return 0;const _e=this._data,Me=_e.length/3;let Fe=1;for(;Fe<=Me;)if(de<_e[3*Fe])Fe=2*Fe;else if(de>_e[3*Fe+1])Fe=2*Fe+1;else return _e[3*Fe+2];return 0}}Pe._INSTANCE=null;function Ae(){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 he(M,de){if(M===0)return 0;const _e=je(M,de);if(_e!==void 0)return _e;const Me=Z(de,M);return M-=Ie(Me),M}function je(M,de){let _e=Z(de,M);for(M-=Ie(_e);we(_e)||_e===65039||_e===8419;){if(M===0)return;_e=Z(de,M),M-=Ie(_e)}if(Je(_e)){if(M>=0){const Me=Z(de,M);Me===8205&&(M-=Ie(Me))}return M}}function Ie(M){return M>=65536?2:1}function we(M){return 127995<=M&&M<=127999}},72999:function(Gt,nt,b){"use strict";b.d(nt,{$E:function(){return L},$K:function(){return ce},D8:function(){return w},HD:function(){return fe},IU:function(){return Q},Jp:function(){return ie},Kn:function(){return be},cW:function(){return Y},f6:function(){return q},hj:function(){return pe},jn:function(){return z},kJ:function(){return _},mf:function(){return N},o8:function(){return m},p_:function(){return o},vE:function(){return H}});function _(T){return Array.isArray(T)}function fe(T){return typeof T=="string"}function be(T){return typeof T=="object"&&T!==null&&!Array.isArray(T)&&!(T instanceof RegExp)&&!(T instanceof Date)}function pe(T){return typeof T=="number"&&!isNaN(T)}function z(T){return T===!0||T===!1}function m(T){return typeof T=="undefined"}function ce(T){return!ie(T)}function ie(T){return m(T)||T===null}function o(T,V){if(!T)throw new Error(V?`Unexpected type, expected '${V}'`:"Unexpected type")}function Y(T){if(ie(T))throw new Error("Assertion Failed: argument is undefined or null");return T}function N(T){return typeof T=="function"}function w(T,V){const P=Math.min(T.length,V.length);for(let F=0;F<P;F++)S(T[F],V[F])}function S(T,V){if(fe(V)){if(typeof T!==V)throw new Error(`argument does not match constraint: typeof ${V}`)}else if(N(V)){try{if(T instanceof V)return}catch(P){}if(!ie(T)&&T.constructor===V||V.length===1&&V.call(void 0,T)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function C(T){let V=[],P=Object.getPrototypeOf(T);for(;Object.prototype!==P;)V=V.concat(Object.getOwnPropertyNames(P)),P=Object.getPrototypeOf(P);return V}function L(T){const V=[];for(const P of C(T))typeof T[P]=="function"&&V.push(P);return V}function Q(T,V){const P=oe=>function(){const ye=Array.prototype.slice.call(arguments,0);return V(oe,ye)};let F={};for(const oe of T)F[oe]=P(oe);return F}function q(T){return T===null?void 0:T}function H(T,V="Unreachable"){throw new Error(V)}},13268:function(Gt,nt,b){"use strict";b.d(nt,{N:function(){return fe}});function _(be,pe){let z;return pe.length===0?z=be:z=be.replace(/\{(\d+)\}/g,function(m,ce){const ie=ce[0];return typeof pe[ie]!="undefined"?pe[ie]:m}),z}function fe(be,pe,...z){return _(pe,z)}},96236:function(Gt,nt,b){"use strict";b.d(nt,{BH:function(){return Q},NZ:function(){return q},U8:function(){return H},co:function(){return L},eH:function(){return C},vr:function(){return S}});var _=b(75918),fe=b(52615),be=b(4348),pe=b(88226),z=b(69323),m=b(34502),ce=b(35884),ie=b(90689),o=b(16925),Y=b(49055),N=function(T,V,P,F){var oe=arguments.length,ye=oe<3?V:F===null?F=Object.getOwnPropertyDescriptor(V,P):F,le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(T,V,P,F);else for(var De=T.length-1;De>=0;De--)(le=T[De])&&(ye=(oe<3?le(ye):oe>3?le(V,P,ye):le(V,P))||ye);return oe>3&&ye&&Object.defineProperty(V,P,ye),ye},w=function(T,V){return function(P,F){V(P,F,T)}};function S(T){return T.command!==void 0}class C{constructor(V){this.id=C._idPool++,this._debugName=V}}C._idPool=0,C.CommandPalette=new C("CommandPalette"),C.EditorContext=new C("EditorContext"),C.SimpleEditorContext=new C("SimpleEditorContext"),C.EditorContextCopy=new C("EditorContextCopy"),C.EditorContextPeek=new C("EditorContextPeek"),C.MenubarEditMenu=new C("MenubarEditMenu"),C.MenubarCopy=new C("MenubarCopy"),C.MenubarGoMenu=new C("MenubarGoMenu"),C.MenubarSelectionMenu=new C("MenubarSelectionMenu"),C.InlineCompletionsActions=new C("InlineCompletionsActions");const L=(0,o.yh)("menuService"),Q=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new be.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:T=>T===C.CommandPalette}}addCommand(T){return this.addCommands(pe.$.single(T))}addCommands(T){for(const V of T)this._commands.set(V.id,V);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,z.OF)(()=>{let V=!1;for(const P of T)V=this._commands.delete(P.id)||V;V&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(T){return this._commands.get(T)}getCommands(){const T=new Map;return this._commands.forEach((V,P)=>T.set(P,V)),T}appendMenuItem(T,V){return this.appendMenuItems(pe.$.single({id:T,item:V}))}appendMenuItems(T){const V=new Set,P=new m.S;for(const{id:F,item:oe}of T){let ye=this._menuItems.get(F);ye||(ye=new m.S,this._menuItems.set(F,ye)),P.push(ye.push(oe)),V.add(F)}return this._onDidChangeMenu.fire(V),(0,z.OF)(()=>{if(P.size>0){for(let F of P)F();this._onDidChangeMenu.fire(V),P.clear()}})}getMenuItems(T){let V;return this._menuItems.has(T)?V=[...this._menuItems.get(T)]:V=[],T===C.CommandPalette&&this._appendImplicitItems(V),V}_appendImplicitItems(T){const V=new Set;for(const P of T)S(P)&&(V.add(P.command.id),P.alt&&V.add(P.alt.id));this._commands.forEach((P,F)=>{V.has(F)||T.push({command:P})})}};class q extends _.wY{constructor(V,P,F,oe){super(`submenuitem.${V.submenu.id}`,typeof V.title=="string"?V.title:V.title.value,[],"submenu"),this.item=V,this._menuService=P,this._contextKeyService=F,this._options=oe}get actions(){const V=[],P=this._menuService.createMenu(this.item.submenu,this._contextKeyService),F=P.getActions(this._options);P.dispose();for(const[,oe]of F)oe.length>0&&(V.push(...oe),V.push(new _.Z0));return V.length&&V.pop(),V}}let H=class Eu{constructor(V,P,F,oe,ye){var le,De;if(this._commandService=ye,this.id=V.id,this.label=F!=null&&F.renderShortTitle&&V.shortTitle?typeof V.shortTitle=="string"?V.shortTitle:V.shortTitle.value:typeof V.title=="string"?V.title:V.title.value,this.tooltip=(De=typeof V.tooltip=="string"?V.tooltip:(le=V.tooltip)===null||le===void 0?void 0:le.value)!==null&&De!==void 0?De:"",this.enabled=!V.precondition||oe.contextMatchesRules(V.precondition),this.checked=void 0,V.toggled){const Ue=V.toggled.condition?V.toggled:{condition:V.toggled};this.checked=oe.contextMatchesRules(Ue.condition),this.checked&&Ue.tooltip&&(this.tooltip=typeof Ue.tooltip=="string"?Ue.tooltip:Ue.tooltip.value),Ue.title&&(this.label=typeof Ue.title=="string"?Ue.title:Ue.title.value)}this.item=V,this.alt=P?new Eu(P,void 0,F,oe,ye):void 0,this._options=F,Y.kS.isThemeIcon(V.icon)&&(this.class=fe.dT.asClassName(V.icon))}dispose(){}run(...V){var P,F;let oe=[];return!((P=this._options)===null||P===void 0)&&P.arg&&(oe=[...oe,this._options.arg]),!((F=this._options)===null||F===void 0)&&F.shouldForwardArgs&&(oe=[...oe,...V]),this._commandService.executeCommand(this.id,...oe)}};H=N([w(3,ie.i6),w(4,ce.H)],H)},35884:function(Gt,nt,b){"use strict";b.d(nt,{H:function(){return ce},P:function(){return ie}});var _=b(4348),fe=b(88226),be=b(69323),pe=b(34502),z=b(72999),m=b(16925);const ce=(0,m.yh)("commandService"),ie=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new _.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,Y){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!Y)throw new Error("invalid command");return this.registerCommand({id:o,handler:Y})}if(o.description){const L=[];for(let q of o.description.args)L.push(q.constraint);const Q=o.handler;o.handler=function(q,...H){return(0,z.D8)(H,L),Q(q,...H)}}const{id:N}=o;let w=this._commands.get(N);w||(w=new pe.S,this._commands.set(N,w));let S=w.unshift(o),C=(0,be.OF)(()=>{S();const L=this._commands.get(N);L!=null&&L.isEmpty()&&this._commands.delete(N)});return this._onDidRegisterCommand.fire(N),C}registerCommandAlias(o,Y){return ie.registerCommand(o,(N,...w)=>N.get(ce).executeCommand(Y,...w))}getCommand(o){const Y=this._commands.get(o);if(!(!Y||Y.isEmpty()))return fe.$.first(Y)}getCommands(){const o=new Map;for(const Y of this._commands.keys()){const N=this.getCommand(Y);N&&o.set(Y,N)}return o}};ie.registerCommand("noop",()=>{})},90689:function(Gt,nt,b){"use strict";b.d(nt,{Ao:function(){return ce},Eq:function(){return ae},Fb:function(){return ie},K8:function(){return ne},i6:function(){return rt},uy:function(){return Be}});var _=b(23345),fe=b(82983),be=b(16925);let pe=_.WE||"";const z=new Map;z.set("false",!1),z.set("true",!0),z.set("isMac",_.dz),z.set("isLinux",_.IJ),z.set("isWindows",_.ED),z.set("isWeb",_.$L),z.set("isMacNative",_.dz&&!_.$L),z.set("isEdge",pe.indexOf("Edg/")>=0),z.set("isFirefox",pe.indexOf("Firefox")>=0),z.set("isChrome",pe.indexOf("Chrome")>=0),z.set("isSafari",pe.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class ce{static has(y){return w.create(y)}static equals(y,E){return S.create(y,E)}static regex(y,E){return oe.create(y,E)}static not(y){return q.create(y)}static and(...y){return De.create(y,null)}static or(...y){return Ue.create(y,null,!0)}static deserialize(y,E=!1){if(y)return this._deserializeOrExpression(y,E)}static _deserializeOrExpression(y,E){let B=y.split("||");return Ue.create(B.map(ue=>this._deserializeAndExpression(ue,E)),null,!0)}static _deserializeAndExpression(y,E){let B=y.split("&&");return De.create(B.map(ue=>this._deserializeOne(ue,E)),null)}static _deserializeOne(y,E){if(y=y.trim(),y.indexOf("!=")>=0){let B=y.split("!=");return Q.create(B[0].trim(),this._deserializeValue(B[1],E))}if(y.indexOf("==")>=0){let B=y.split("==");return S.create(B[0].trim(),this._deserializeValue(B[1],E))}if(y.indexOf("=~")>=0){let B=y.split("=~");return oe.create(B[0].trim(),this._deserializeRegexValue(B[1],E))}if(y.indexOf(" in ")>=0){let B=y.split(" in ");return C.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(y)){const B=y.split(">=");return V.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(y)){const B=y.split(">");return T.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(y)){const B=y.split("<=");return F.create(B[0].trim(),B[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(y)){const B=y.split("<");return P.create(B[0].trim(),B[1].trim())}return/^\!\s*/.test(y)?q.create(y.substr(1).trim()):w.create(y)}static _deserializeValue(y,E){if(y=y.trim(),y==="true")return!0;if(y==="false")return!1;let B=/^'([^']*)'$/.exec(y);return B?B[1].trim():y}static _deserializeRegexValue(y,E){if((0,fe.m5)(y)){if(E)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let B=y.indexOf("/"),ue=y.lastIndexOf("/");if(B===ue||B<0){if(E)throw new Error(`bad regexp-value '${y}', missing /-enclosure`);return console.warn(`bad regexp-value '${y}', missing /-enclosure`),null}let Ne=y.slice(B+1,ue),We=y[ue+1]==="i"?"i":"";try{return new RegExp(Ne,We)}catch(Te){if(E)throw new Error(`bad regexp-value '${y}', parse error: ${Te}`);return console.warn(`bad regexp-value '${y}', parse error: ${Te}`),null}}}function ie(W,y){const E=W?W.substituteConstants():void 0,B=y?y.substituteConstants():void 0;return!E&&!B?!0:!E||!B?!1:E.equals(B)}function o(W,y){return W.cmp(y)}class Y{constructor(){this.type=0}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!1}serialize(){return"false"}keys(){return[]}negate(){return N.INSTANCE}}Y.INSTANCE=new Y;class N{constructor(){this.type=1}cmp(y){return this.type-y.type}equals(y){return y.type===this.type}substituteConstants(){return this}evaluate(y){return!0}serialize(){return"true"}keys(){return[]}negate(){return Y.INSTANCE}}N.INSTANCE=new N;class w{constructor(y,E){this.key=y,this.negated=E,this.type=2}static create(y,E=null){const B=z.get(y);return typeof B=="boolean"?B?N.INSTANCE:Y.INSTANCE:new w(y,E)}cmp(y){return y.type!==this.type?this.type-y.type:$(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=z.get(this.key);return typeof y=="boolean"?y?N.INSTANCE:Y.INSTANCE:this}evaluate(y){return!!y.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=q.create(this.key,this)),this.negated}}class S{constructor(y,E,B){this.key=y,this.value=E,this.negated=B,this.type=4}static create(y,E,B=null){if(typeof E=="boolean")return E?w.create(y,B):q.create(y,B);const ue=z.get(y);return typeof ue=="boolean"?E===(ue?"true":"false")?N.INSTANCE:Y.INSTANCE:new S(y,E,B)}cmp(y){return y.type!==this.type?this.type-y.type:Z(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=z.get(this.key);if(typeof y=="boolean"){const E=y?"true":"false";return this.value===E?N.INSTANCE:Y.INSTANCE}return this}evaluate(y){return y.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 C{constructor(y,E){this.key=y,this.valueKey=E,this.type=10,this.negated=null}static create(y,E){return new C(y,E)}cmp(y){return y.type!==this.type?this.type-y.type:Z(this.key,this.valueKey,y.key,y.valueKey)}equals(y){return y.type===this.type?this.key===y.key&&this.valueKey===y.valueKey:!1}substituteConstants(){return this}evaluate(y){const E=y.getValue(this.valueKey),B=y.getValue(this.key);return Array.isArray(E)?E.indexOf(B)>=0:typeof B=="string"&&typeof E=="object"&&E!==null?m.call(E,B):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=L.create(this)),this.negated}}class L{constructor(y){this._actual=y,this.type=11}static create(y){return new L(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class Q{constructor(y,E,B){this.key=y,this.value=E,this.negated=B,this.type=5}static create(y,E,B=null){if(typeof E=="boolean")return E?q.create(y,B):w.create(y,B);const ue=z.get(y);return typeof ue=="boolean"?E===(ue?"true":"false")?Y.INSTANCE:N.INSTANCE:new Q(y,E,B)}cmp(y){return y.type!==this.type?this.type-y.type:Z(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){const y=z.get(this.key);if(typeof y=="boolean"){const E=y?"true":"false";return this.value===E?Y.INSTANCE:N.INSTANCE}return this}evaluate(y){return y.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this.value,this)),this.negated}}class q{constructor(y,E){this.key=y,this.negated=E,this.type=3}static create(y,E=null){const B=z.get(y);return typeof B=="boolean"?B?Y.INSTANCE:N.INSTANCE:new q(y,E)}cmp(y){return y.type!==this.type?this.type-y.type:$(this.key,y.key)}equals(y){return y.type===this.type?this.key===y.key:!1}substituteConstants(){const y=z.get(this.key);return typeof y=="boolean"?y?Y.INSTANCE:N.INSTANCE:this}evaluate(y){return!y.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=w.create(this.key,this)),this.negated}}function H(W,y){if(typeof W=="string"){const E=parseFloat(W);isNaN(E)||(W=E)}return typeof W=="string"||typeof W=="number"?y(W):Y.INSTANCE}class T{constructor(y,E,B){this.key=y,this.value=E,this.negated=B,this.type=12}static create(y,E,B=null){return H(E,ue=>new T(y,ue,B))}cmp(y){return y.type!==this.type?this.type-y.type:Z(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=F.create(this.key,this.value,this)),this.negated}}class V{constructor(y,E,B){this.key=y,this.value=E,this.negated=B,this.type=13}static create(y,E,B=null){return H(E,ue=>new V(y,ue,B))}cmp(y){return y.type!==this.type?this.type-y.type:Z(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{constructor(y,E,B){this.key=y,this.value=E,this.negated=B,this.type=14}static create(y,E,B=null){return H(E,ue=>new P(y,ue,B))}cmp(y){return y.type!==this.type?this.type-y.type:Z(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this.key,this.value,this)),this.negated}}class F{constructor(y,E,B){this.key=y,this.value=E,this.negated=B,this.type=15}static create(y,E,B=null){return H(E,ue=>new F(y,ue,B))}cmp(y){return y.type!==this.type?this.type-y.type:Z(this.key,this.value,y.key,y.value)}equals(y){return y.type===this.type?this.key===y.key&&this.value===y.value:!1}substituteConstants(){return this}evaluate(y){return typeof this.value=="string"?!1:parseFloat(y.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class oe{constructor(y,E){this.key=y,this.regexp=E,this.type=7,this.negated=null}static create(y,E){return new oe(y,E)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.key<y.key)return-1;if(this.key>y.key)return 1;const E=this.regexp?this.regexp.source:"",B=y.regexp?y.regexp.source:"";return E<B?-1:E>B?1:0}equals(y){if(y.type===this.type){const E=this.regexp?this.regexp.source:"",B=y.regexp?y.regexp.source:"";return this.key===y.key&&E===B}return!1}substituteConstants(){return this}evaluate(y){let E=y.getValue(this.key);return this.regexp?this.regexp.test(E):!1}serialize(){const y=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${y}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ye.create(this)),this.negated}}class ye{constructor(y){this._actual=y,this.type=8}static create(y){return new ye(y)}cmp(y){return y.type!==this.type?this.type-y.type:this._actual.cmp(y._actual)}equals(y){return y.type===this.type?this._actual.equals(y._actual):!1}substituteConstants(){return this}evaluate(y){return!this._actual.evaluate(y)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function le(W){let y=null;for(let E=0,B=W.length;E<B;E++){const ue=W[E].substituteConstants();if(W[E]!==ue&&y===null){y=[];for(let Ne=0;Ne<E;Ne++)y[Ne]=W[Ne]}y!==null&&(y[E]=ue)}return y===null?W:y}class De{constructor(y,E){this.expr=y,this.negated=E,this.type=6}static create(y,E){return De._normalizeArr(y,E)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let E=0,B=this.expr.length;E<B;E++){const ue=o(this.expr[E],y.expr[E]);if(ue!==0)return ue}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let E=0,B=this.expr.length;E<B;E++)if(!this.expr[E].equals(y.expr[E]))return!1;return!0}return!1}substituteConstants(){const y=le(this.expr);return y===this.expr?this:De.create(y,this.negated)}evaluate(y){for(let E=0,B=this.expr.length;E<B;E++)if(!this.expr[E].evaluate(y))return!1;return!0}static _normalizeArr(y,E){const B=[];let ue=!1;for(const Ne of y)if(Ne){if(Ne.type===1){ue=!0;continue}if(Ne.type===0)return Y.INSTANCE;if(Ne.type===6){B.push(...Ne.expr);continue}B.push(Ne)}if(B.length===0&&ue)return N.INSTANCE;if(B.length!==0){if(B.length===1)return B[0];B.sort(o);for(let Ne=1;Ne<B.length;Ne++)B[Ne-1].equals(B[Ne])&&(B.splice(Ne,1),Ne--);if(B.length===1)return B[0];for(;B.length>1;){const Ne=B[B.length-1];if(Ne.type!==9)break;B.pop();const We=B.pop(),Te=B.length===0,ze=Ue.create(Ne.expr.map(Ye=>De.create([Ye,We],null)),null,Te);ze&&(B.push(ze),B.sort(o))}return B.length===1?B[0]:new De(B,E)}}serialize(){return this.expr.map(y=>y.serialize()).join(" && ")}keys(){const y=[];for(let E of this.expr)y.push(...E.keys());return y}negate(){if(!this.negated){const y=[];for(let E of this.expr)y.push(E.negate());this.negated=Ue.create(y,this,!0)}return this.negated}}class Ue{constructor(y,E){this.expr=y,this.negated=E,this.type=9}static create(y,E,B){return Ue._normalizeArr(y,E,B)}cmp(y){if(y.type!==this.type)return this.type-y.type;if(this.expr.length<y.expr.length)return-1;if(this.expr.length>y.expr.length)return 1;for(let E=0,B=this.expr.length;E<B;E++){const ue=o(this.expr[E],y.expr[E]);if(ue!==0)return ue}return 0}equals(y){if(y.type===this.type){if(this.expr.length!==y.expr.length)return!1;for(let E=0,B=this.expr.length;E<B;E++)if(!this.expr[E].equals(y.expr[E]))return!1;return!0}return!1}substituteConstants(){const y=le(this.expr);return y===this.expr?this:Ue.create(y,this.negated,!1)}evaluate(y){for(let E=0,B=this.expr.length;E<B;E++)if(this.expr[E].evaluate(y))return!0;return!1}static _normalizeArr(y,E,B){let ue=[],Ne=!1;if(y){for(let We=0,Te=y.length;We<Te;We++){const ze=y[We];if(ze){if(ze.type===0){Ne=!0;continue}if(ze.type===1)return N.INSTANCE;if(ze.type===9){ue=ue.concat(ze.expr);continue}ue.push(ze)}}if(ue.length===0&&Ne)return Y.INSTANCE;ue.sort(o)}if(ue.length!==0){if(ue.length===1)return ue[0];for(let We=1;We<ue.length;We++)ue[We-1].equals(ue[We])&&(ue.splice(We,1),We--);if(ue.length===1)return ue[0];if(B){for(let We=0;We<ue.length;We++)for(let Te=We+1;Te<ue.length;Te++)ne(ue[We],ue[Te])&&(ue.splice(Te,1),Te--);if(ue.length===1)return ue[0]}return new Ue(ue,E)}}serialize(){return this.expr.map(y=>y.serialize()).join(" || ")}keys(){const y=[];for(let E of this.expr)y.push(...E.keys());return y}negate(){if(!this.negated){let y=[];for(let E of this.expr)y.push(E.negate());for(;y.length>1;){const E=y.shift(),B=y.shift(),ue=[];for(const We of re(E))for(const Te of re(B))ue.push(De.create([We,Te],null));const Ne=y.length===0;y.unshift(Ue.create(ue,null,Ne))}this.negated=y[0]}return this.negated}}class Be extends w{constructor(y,E,B){super(y,null),this._defaultValue=E,typeof B=="object"?Be._info.push(Object.assign(Object.assign({},B),{key:y})):B!==!0&&Be._info.push({key:y,description:B,type:E!=null?typeof E:void 0})}static all(){return Be._info.values()}bindTo(y){return y.createKey(this.key,this._defaultValue)}getValue(y){return y.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(y){return S.create(this.key,y)}}Be._info=[];const rt=(0,be.yh)("contextKeyService"),ae="setContext";function $(W,y){return W<y?-1:W>y?1:0}function Z(W,y,E,B){return W<E?-1:W>E?1:y<B?-1:y>B?1:0}function ne(W,y){if(y.type===6&&W.type!==9&&W.type!==6){for(const ue of y.expr)if(W.equals(ue))return!0}const E=W.negate(),B=re(E).concat(re(y));B.sort(o);for(let ue=0;ue<B.length;ue++){const We=B[ue].negate();for(let Te=ue+1;Te<B.length;Te++){const ze=B[Te];if(We.equals(ze))return!0}}return!1}function re(W){return W.type===9?W.expr:[W]}},16925:function(Gt,nt,b){"use strict";b.d(nt,{I8:function(){return _},TG:function(){return fe},jt:function(){return z},yh:function(){return pe}});var _;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function ce(ie){return ie[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=ce})(_||(_={}));const fe=pe("instantiationService");function be(m,ce,ie,o){ce[_.DI_TARGET]===ce?ce[_.DI_DEPENDENCIES].push({id:m,index:ie,optional:o}):(ce[_.DI_DEPENDENCIES]=[{id:m,index:ie,optional:o}],ce[_.DI_TARGET]=ce)}function pe(m){if(_.serviceIds.has(m))return _.serviceIds.get(m);const ce=function(ie,o,Y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");be(ce,ie,Y,!1)};return ce.toString=()=>m,_.serviceIds.set(m,ce),ce}function z(m){return function(ce,ie,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");be(m,ce,o,!0)}}},44650:function(Gt,nt,b){"use strict";b.d(nt,{B:function(){return pe}});var _=b(76068),fe=b(72999);class be{constructor(){this.data=new Map}add(m,ce){_.ok(fe.HD(m)),_.ok(fe.Kn(ce)),_.ok(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,ce)}as(m){return this.data.get(m)||null}}const pe=new be},66213:function(Gt,nt,b){"use strict";b.d(nt,{e:function(){return _}});var _;(function(fe){fe.DARK="dark",fe.LIGHT="light",fe.HIGH_CONTRAST="hc"})(_||(_={}))},49055:function(Gt,nt,b){"use strict";b.d(nt,{EN:function(){return o},IP:function(){return w},Ic:function(){return L},XE:function(){return ce},bB:function(){return Q},kS:function(){return Y},m6:function(){return N}});var _=b(52615),fe=b(4348),be=b(69323),pe=b(16925),z=b(44650),m=b(66213);const ce=(0,pe.yh)("themeService");var ie;(function(q){function H(T){return T&&typeof T=="object"&&typeof T.id=="string"}q.isThemeColor=H})(ie||(ie={}));function o(q){return{id:q}}var Y;(function(q){function H(ye){return ye&&typeof ye=="object"&&typeof ye.id=="string"&&(typeof ye.color=="undefined"||ie.isThemeColor(ye.color))}q.isThemeIcon=H;const T=new RegExp(`^\\$\\((${_.dT.iconNameExpression}(?:${_.dT.iconModifierExpression})?)\\)$`);function V(ye){const le=T.exec(ye);if(!le)return;let[,De]=le;return{id:De}}q.fromString=V;function P(ye,le){let De=ye.id;const Ue=De.lastIndexOf("~");return Ue!==-1&&(De=De.substring(0,Ue)),le&&(De=`${De}~${le}`),{id:De}}q.modify=P;function F(ye,le){var De,Ue;return ye.id===le.id&&((De=ye.color)===null||De===void 0?void 0:De.id)===((Ue=le.color)===null||Ue===void 0?void 0:Ue.id)}q.isEqual=F;function oe(ye,le){return{id:ye.id,color:le?o(le):void 0}}q.asThemeIcon=oe,q.asClassNameArray=_.dT.asClassNameArray,q.asClassName=_.dT.asClassName,q.asCSSSelector=_.dT.asCSSSelector})(Y||(Y={}));function N(q){switch(q){case m.e.DARK:return"vs-dark";case m.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const w={ThemingContribution:"base.contributions.theming"};class S{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new fe.Q5}onColorThemeChange(H){return this.themingParticipants.push(H),this.onThemingParticipantAddedEmitter.fire(H),(0,be.OF)(()=>{const T=this.themingParticipants.indexOf(H);this.themingParticipants.splice(T,1)})}getThemingParticipants(){return this.themingParticipants}}let C=new S;z.B.add(w.ThemingContribution,C);function L(q){return C.onColorThemeChange(q)}class Q extends be.JT{constructor(H){super(),this.themeService=H,this.theme=H.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(T=>this.onThemeChange(T)))}onThemeChange(H){this.theme=H,this.updateStyles()}updateStyles(){}}},16632:function(Gt,nt,b){"use strict";var _=b(60499),fe=b(85899),be=b(18642),pe=b(72190),z=b(42244),m=b(92310),ce=b.n(m),ie=b(18929),o=b(59301),Y=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],N=(0,o.forwardRef)(function(w,S){var C=w.prefixCls,L=C===void 0?"rc-checkbox":C,Q=w.className,q=w.style,H=w.checked,T=w.disabled,V=w.defaultChecked,P=V===void 0?!1:V,F=w.type,oe=F===void 0?"checkbox":F,ye=w.title,le=w.onChange,De=(0,z.Z)(w,Y),Ue=(0,o.useRef)(null),Be=(0,o.useRef)(null),rt=(0,ie.Z)(P,{value:H}),ae=(0,pe.Z)(rt,2),$=ae[0],Z=ae[1];(0,o.useImperativeHandle)(S,function(){return{focus:function(y){var E;(E=Ue.current)===null||E===void 0||E.focus(y)},blur:function(){var y;(y=Ue.current)===null||y===void 0||y.blur()},input:Ue.current,nativeElement:Be.current}});var ne=ce()(L,Q,(0,be.Z)((0,be.Z)({},"".concat(L,"-checked"),$),"".concat(L,"-disabled"),T)),re=function(y){T||("checked"in w||Z(y.target.checked),le==null||le({target:(0,fe.Z)((0,fe.Z)({},w),{},{type:oe,checked:y.target.checked}),stopPropagation:function(){y.stopPropagation()},preventDefault:function(){y.preventDefault()},nativeEvent:y.nativeEvent}))};return o.createElement("span",{className:ne,title:ye,style:q,ref:Be},o.createElement("input",(0,_.Z)({},De,{className:"".concat(L,"-input"),ref:Ue,onChange:re,disabled:T,checked:!!$,type:oe})),o.createElement("span",{className:"".concat(L,"-inner")}))});nt.Z=N},96478:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ye}});var _=b(60499),fe=b(18642),be=b(72190),pe=b(42244),z=b(68196),m=b(92310),ce=b.n(m),ie=b(8654),o=b(59301),Y=b(10228),N=b(16089),w=Y.Z.ESC,S=Y.Z.TAB;function C(le){var De=le.visible,Ue=le.triggerRef,Be=le.onVisibleChange,rt=le.autoFocus,ae=le.overlayRef,$=o.useRef(!1),Z=function(){if(De){var y,E;(y=Ue.current)===null||y===void 0||(E=y.focus)===null||E===void 0||E.call(y),Be==null||Be(!1)}},ne=function(){var y;return(y=ae.current)!==null&&y!==void 0&&y.focus?(ae.current.focus(),$.current=!0,!0):!1},re=function(y){switch(y.keyCode){case w:Z();break;case S:{var E=!1;$.current||(E=ne()),E?y.preventDefault():Z();break}}};o.useEffect(function(){return De?(window.addEventListener("keydown",re),rt&&(0,N.Z)(ne,3),function(){window.removeEventListener("keydown",re),$.current=!1}):function(){$.current=!1}},[De])}var L=(0,o.forwardRef)(function(le,De){var Ue=le.overlay,Be=le.arrow,rt=le.prefixCls,ae=(0,o.useMemo)(function(){var Z;return typeof Ue=="function"?Z=Ue():Z=Ue,Z},[Ue]),$=(0,ie.sQ)(De,(0,ie.C4)(ae));return o.createElement(o.Fragment,null,Be&&o.createElement("div",{className:"".concat(rt,"-arrow")}),o.cloneElement(ae,{ref:(0,ie.Yr)(ae)?$:void 0}))}),Q=L,q={adjustX:1,adjustY:1},H=[0,0],T={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-4],targetOffset:H},top:{points:["bc","tc"],overflow:q,offset:[0,-4],targetOffset:H},topRight:{points:["br","tr"],overflow:q,offset:[0,-4],targetOffset:H},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,4],targetOffset:H},bottom:{points:["tc","bc"],overflow:q,offset:[0,4],targetOffset:H},bottomRight:{points:["tr","br"],overflow:q,offset:[0,4],targetOffset:H}},V=T,P=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function F(le,De){var Ue,Be=le.arrow,rt=Be===void 0?!1:Be,ae=le.prefixCls,$=ae===void 0?"rc-dropdown":ae,Z=le.transitionName,ne=le.animation,re=le.align,W=le.placement,y=W===void 0?"bottomLeft":W,E=le.placements,B=E===void 0?V:E,ue=le.getPopupContainer,Ne=le.showAction,We=le.hideAction,Te=le.overlayClassName,ze=le.overlayStyle,Ye=le.visible,Je=le.trigger,Ve=Je===void 0?["hover"]:Je,Tt=le.autoFocus,Ke=le.overlay,Et=le.children,Le=le.onVisibleChange,pt=(0,pe.Z)(le,P),Pe=o.useState(),Ae=(0,be.Z)(Pe,2),he=Ae[0],je=Ae[1],Ie="visible"in le?Ye:he,we=o.useRef(null),M=o.useRef(null),de=o.useRef(null);o.useImperativeHandle(De,function(){return we.current});var _e=function(gt){je(gt),Le==null||Le(gt)};C({visible:Ie,triggerRef:de,onVisibleChange:_e,autoFocus:Tt,overlayRef:M});var Me=function(gt){var _t=le.onOverlayClick;je(!1),_t&&_t(gt)},Fe=function(){return o.createElement(Q,{ref:M,overlay:Ke,prefixCls:$,arrow:rt})},Ze=function(){return typeof Ke=="function"?Fe:Fe()},Qe=function(){var gt=le.minOverlayWidthMatchTrigger,_t=le.alignPoint;return"minOverlayWidthMatchTrigger"in le?gt:!_t},tt=function(){var gt=le.openClassName;return gt!==void 0?gt:"".concat($,"-open")},ut=o.cloneElement(Et,{className:ce()((Ue=Et.props)===null||Ue===void 0?void 0:Ue.className,Ie&&tt()),ref:(0,ie.Yr)(Et)?(0,ie.sQ)(de,(0,ie.C4)(Et)):void 0}),dt=We;return!dt&&Ve.indexOf("contextMenu")!==-1&&(dt=["click"]),o.createElement(z.Z,(0,_.Z)({builtinPlacements:B},pt,{prefixCls:$,ref:we,popupClassName:ce()(Te,(0,fe.Z)({},"".concat($,"-show-arrow"),rt)),popupStyle:ze,action:Ve,showAction:Ne,hideAction:dt,popupPlacement:y,popupAlign:re,popupTransitionName:Z,popupAnimation:ne,popupVisible:Ie,stretch:Qe()?"minWidth":"",popup:Ze(),onPopupVisibleChange:_e,onPopupClick:Me,getPopupContainer:ue}),ut)}var oe=o.forwardRef(F),ye=oe},66003:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ce}});var _=b(42244),fe=b(85899),be=b(43749),pe=b(59301),z=["show"];function m(ie,o){if(!o.max)return!0;var Y=o.strategy(ie);return Y<=o.max}function ce(ie,o){return pe.useMemo(function(){var Y={};o&&(Y.show=(0,be.Z)(o)==="object"&&o.formatter?o.formatter:!!o),Y=(0,fe.Z)((0,fe.Z)({},Y),ie);var N=Y,w=N.show,S=(0,_.Z)(N,z);return(0,fe.Z)((0,fe.Z)({},S),{},{show:!!w,showFormatter:typeof w=="function"?w:void 0,strategy:S.strategy||function(C){return C.length}})},[ie,o])}},36901:function(Gt,nt,b){"use strict";b.r(nt),b.d(nt,{BaseInput:function(){return Y},default:function(){return V}});var _=b(85899),fe=b(60499),be=b(18642),pe=b(43749),z=b(92310),m=b.n(z),ce=b(59301),ie=b(30292),o=ce.forwardRef(function(P,F){var oe,ye,le,De=P.inputElement,Ue=P.children,Be=P.prefixCls,rt=P.prefix,ae=P.suffix,$=P.addonBefore,Z=P.addonAfter,ne=P.className,re=P.style,W=P.disabled,y=P.readOnly,E=P.focused,B=P.triggerFocus,ue=P.allowClear,Ne=P.value,We=P.handleReset,Te=P.hidden,ze=P.classes,Ye=P.classNames,Je=P.dataAttrs,Ve=P.styles,Tt=P.components,Ke=P.onClear,Et=Ue!=null?Ue:De,Le=(Tt==null?void 0:Tt.affixWrapper)||"span",pt=(Tt==null?void 0:Tt.groupWrapper)||"span",Pe=(Tt==null?void 0:Tt.wrapper)||"span",Ae=(Tt==null?void 0:Tt.groupAddon)||"span",he=(0,ce.useRef)(null),je=function(qe){var st;(st=he.current)!==null&&st!==void 0&&st.contains(qe.target)&&(B==null||B())},Ie=(0,ie.X3)(P),we=(0,ce.cloneElement)(Et,{value:Ne,className:m()((oe=Et.props)===null||oe===void 0?void 0:oe.className,!Ie&&(Ye==null?void 0:Ye.variant))||null}),M=(0,ce.useRef)(null);if(ce.useImperativeHandle(F,function(){return{nativeElement:M.current||he.current}}),Ie){var de=null;if(ue){var _e=!W&&!y&&Ne,Me="".concat(Be,"-clear-icon"),Fe=(0,pe.Z)(ue)==="object"&&ue!==null&&ue!==void 0&&ue.clearIcon?ue.clearIcon:"\u2716";de=ce.createElement("button",{type:"button",tabIndex:-1,onClick:function(qe){We==null||We(qe),Ke==null||Ke()},onMouseDown:function(qe){return qe.preventDefault()},className:m()(Me,(0,be.Z)((0,be.Z)({},"".concat(Me,"-hidden"),!_e),"".concat(Me,"-has-suffix"),!!ae))},Fe)}var Ze="".concat(Be,"-affix-wrapper"),Qe=m()(Ze,(0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)((0,be.Z)({},"".concat(Be,"-disabled"),W),"".concat(Ze,"-disabled"),W),"".concat(Ze,"-focused"),E),"".concat(Ze,"-readonly"),y),"".concat(Ze,"-input-with-clear-btn"),ae&&ue&&Ne),ze==null?void 0:ze.affixWrapper,Ye==null?void 0:Ye.affixWrapper,Ye==null?void 0:Ye.variant),tt=(ae||ue)&&ce.createElement("span",{className:m()("".concat(Be,"-suffix"),Ye==null?void 0:Ye.suffix),style:Ve==null?void 0:Ve.suffix},de,ae);we=ce.createElement(Le,(0,fe.Z)({className:Qe,style:Ve==null?void 0:Ve.affixWrapper,onClick:je},Je==null?void 0:Je.affixWrapper,{ref:he}),rt&&ce.createElement("span",{className:m()("".concat(Be,"-prefix"),Ye==null?void 0:Ye.prefix),style:Ve==null?void 0:Ve.prefix},rt),we,tt)}if((0,ie.He)(P)){var ut="".concat(Be,"-group"),dt="".concat(ut,"-addon"),St="".concat(ut,"-wrapper"),gt=m()("".concat(Be,"-wrapper"),ut,ze==null?void 0:ze.wrapper,Ye==null?void 0:Ye.wrapper),_t=m()(St,(0,be.Z)({},"".concat(St,"-disabled"),W),ze==null?void 0:ze.group,Ye==null?void 0:Ye.groupWrapper);we=ce.createElement(pt,{className:_t,ref:M},ce.createElement(Pe,{className:gt},$&&ce.createElement(Ae,{className:dt},$),we,Z&&ce.createElement(Ae,{className:dt},Z)))}return ce.cloneElement(we,{className:m()((ye=we.props)===null||ye===void 0?void 0:ye.className,ne)||null,style:(0,_.Z)((0,_.Z)({},(le=we.props)===null||le===void 0?void 0:le.style),re),hidden:Te})}),Y=o,N=b(77654),w=b(72190),S=b(42244),C=b(18929),L=b(2738),Q=b(66003),q=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],H=(0,ce.forwardRef)(function(P,F){var oe=P.autoComplete,ye=P.onChange,le=P.onFocus,De=P.onBlur,Ue=P.onPressEnter,Be=P.onKeyDown,rt=P.onKeyUp,ae=P.prefixCls,$=ae===void 0?"rc-input":ae,Z=P.disabled,ne=P.htmlSize,re=P.className,W=P.maxLength,y=P.suffix,E=P.showCount,B=P.count,ue=P.type,Ne=ue===void 0?"text":ue,We=P.classes,Te=P.classNames,ze=P.styles,Ye=P.onCompositionStart,Je=P.onCompositionEnd,Ve=(0,S.Z)(P,q),Tt=(0,ce.useState)(!1),Ke=(0,w.Z)(Tt,2),Et=Ke[0],Le=Ke[1],pt=(0,ce.useRef)(!1),Pe=(0,ce.useRef)(!1),Ae=(0,ce.useRef)(null),he=(0,ce.useRef)(null),je=function(it){Ae.current&&(0,ie.nH)(Ae.current,it)},Ie=(0,C.Z)(P.defaultValue,{value:P.value}),we=(0,w.Z)(Ie,2),M=we[0],de=we[1],_e=M==null?"":String(M),Me=(0,ce.useState)(null),Fe=(0,w.Z)(Me,2),Ze=Fe[0],Qe=Fe[1],tt=(0,Q.Z)(B,E),ut=tt.max||W,dt=tt.strategy(_e),St=!!ut&&dt>ut;(0,ce.useImperativeHandle)(F,function(){var U;return{focus:je,blur:function(){var xe;(xe=Ae.current)===null||xe===void 0||xe.blur()},setSelectionRange:function(xe,Re,He){var G;(G=Ae.current)===null||G===void 0||G.setSelectionRange(xe,Re,He)},select:function(){var xe;(xe=Ae.current)===null||xe===void 0||xe.select()},input:Ae.current,nativeElement:((U=he.current)===null||U===void 0?void 0:U.nativeElement)||Ae.current}}),(0,ce.useEffect)(function(){Pe.current&&(Pe.current=!1),Le(function(U){return U&&Z?!1:U})},[Z]);var gt=function(it,xe,Re){var He=xe;if(!pt.current&&tt.exceedFormatter&&tt.max&&tt.strategy(xe)>tt.max){if(He=tt.exceedFormatter(xe,{max:tt.max}),xe!==He){var G,J;Qe([((G=Ae.current)===null||G===void 0?void 0:G.selectionStart)||0,((J=Ae.current)===null||J===void 0?void 0:J.selectionEnd)||0])}}else if(Re.source==="compositionEnd")return;de(He),Ae.current&&(0,ie.rJ)(Ae.current,it,ye,He)};(0,ce.useEffect)(function(){if(Ze){var U;(U=Ae.current)===null||U===void 0||U.setSelectionRange.apply(U,(0,N.Z)(Ze))}},[Ze]);var _t=function(it){gt(it,it.target.value,{source:"change"})},Xe=function(it){pt.current=!1,gt(it,it.currentTarget.value,{source:"compositionEnd"}),Je==null||Je(it)},qe=function(it){Ue&&it.key==="Enter"&&!Pe.current&&(Pe.current=!0,Ue(it)),Be==null||Be(it)},st=function(it){it.key==="Enter"&&(Pe.current=!1),rt==null||rt(it)},ot=function(it){Le(!0),le==null||le(it)},Ct=function(it){Pe.current&&(Pe.current=!1),Le(!1),De==null||De(it)},x=function(it){de(""),je(),Ae.current&&(0,ie.rJ)(Ae.current,it,ye)},D=St&&"".concat($,"-out-of-range"),se=function(){var it=(0,L.Z)(P,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ce.createElement("input",(0,fe.Z)({autoComplete:oe},it,{onChange:_t,onFocus:ot,onBlur:Ct,onKeyDown:qe,onKeyUp:st,className:m()($,(0,be.Z)({},"".concat($,"-disabled"),Z),Te==null?void 0:Te.input),style:ze==null?void 0:ze.input,ref:Ae,size:ne,type:Ne,onCompositionStart:function(Re){pt.current=!0,Ye==null||Ye(Re)},onCompositionEnd:Xe}))},I=function(){var it=Number(ut)>0;if(y||tt.show){var xe=tt.showFormatter?tt.showFormatter({value:_e,count:dt,maxLength:ut}):"".concat(dt).concat(it?" / ".concat(ut):"");return ce.createElement(ce.Fragment,null,tt.show&&ce.createElement("span",{className:m()("".concat($,"-show-count-suffix"),(0,be.Z)({},"".concat($,"-show-count-has-suffix"),!!y),Te==null?void 0:Te.count),style:(0,_.Z)({},ze==null?void 0:ze.count)},xe),y)}return null};return ce.createElement(Y,(0,fe.Z)({},Ve,{prefixCls:$,className:m()(re,D),handleReset:x,value:_e,focused:Et,triggerFocus:je,suffix:I(),disabled:Z,classes:We,classNames:Te,styles:ze}),se())}),T=H,V=T},30292:function(Gt,nt,b){"use strict";b.d(nt,{He:function(){return _},X3:function(){return fe},nH:function(){return z},rJ:function(){return pe}});function _(m){return!!(m.addonBefore||m.addonAfter)}function fe(m){return!!(m.prefix||m.suffix||m.allowClear)}function be(m,ce,ie){var o=ce.cloneNode(!0),Y=Object.create(m,{target:{value:o},currentTarget:{value:o}});return o.value=ie,typeof ce.selectionStart=="number"&&typeof ce.selectionEnd=="number"&&(o.selectionStart=ce.selectionStart,o.selectionEnd=ce.selectionEnd),o.setSelectionRange=function(){ce.setSelectionRange.apply(ce,arguments)},Y}function pe(m,ce,ie,o){if(ie){var Y=ce;if(ce.type==="click"){Y=be(ce,m,""),ie(Y);return}if(m.type!=="file"&&o!==void 0){Y=be(ce,m,o),ie(Y);return}ie(Y)}}function z(m,ce){if(m){m.focus(ce);var ie=ce||{},o=ie.cursor;if(o){var Y=m.value.length;switch(o){case"start":m.setSelectionRange(0,0);break;case"end":m.setSelectionRange(Y,Y);break;default:m.setSelectionRange(0,Y)}}}}},28321:function(Gt,nt,b){"use strict";b.d(nt,{iz:function(){return In},ck:function(){return He},BW:function(){return _r},sN:function(){return He},Wd:function(){return Xt},ZP:function(){return ir},Xl:function(){return Ue}});var _=b(60499),fe=b(18642),be=b(85899),pe=b(77654),z=b(72190),m=b(42244),ce=b(92310),ie=b.n(ce),o=b(83836),Y=b(18929),N=b(13697),w=b(48736),S=b(59301),C=b(4676),L=S.createContext(null);function Q(at,yt){return at===void 0?null:"".concat(at,"-").concat(yt)}function q(at){var yt=S.useContext(L);return Q(yt,at)}var H=b(80547),T=["children","locked"],V=S.createContext(null);function P(at,yt){var kt=(0,be.Z)({},at);return Object.keys(yt).forEach(function(At){var Lt=yt[At];Lt!==void 0&&(kt[At]=Lt)}),kt}function F(at){var yt=at.children,kt=at.locked,At=(0,m.Z)(at,T),Lt=S.useContext(V),Bt=(0,H.Z)(function(){return P(Lt,At)},[Lt,At],function(jt,Vt){return!kt&&(jt[0]!==Vt[0]||!(0,N.Z)(jt[1],Vt[1],!0))});return S.createElement(V.Provider,{value:Bt},yt)}var oe=[],ye=S.createContext(null);function le(){return S.useContext(ye)}var De=S.createContext(oe);function Ue(at){var yt=S.useContext(De);return S.useMemo(function(){return at!==void 0?[].concat((0,pe.Z)(yt),[at]):yt},[yt,at])}var Be=S.createContext(null),rt=S.createContext({}),ae=rt,$=b(29194);function Z(at){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,$.Z)(at)){var kt=at.nodeName.toLowerCase(),At=["input","select","textarea","button"].includes(kt)||at.isContentEditable||kt==="a"&&!!at.getAttribute("href"),Lt=at.getAttribute("tabindex"),Bt=Number(Lt),jt=null;return Lt&&!Number.isNaN(Bt)?jt=Bt:At&&jt===null&&(jt=0),At&&at.disabled&&(jt=null),jt!==null&&(jt>=0||yt&&jt<0)}return!1}function ne(at){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,kt=(0,pe.Z)(at.querySelectorAll("*")).filter(function(At){return Z(At,yt)});return Z(at,yt)&&kt.unshift(at),kt}var re=null;function W(){re=document.activeElement}function y(){re=null}function E(){if(re)try{re.focus()}catch(at){}}function B(at,yt){if(yt.keyCode===9){var kt=ne(at),At=kt[yt.shiftKey?0:kt.length-1],Lt=At===document.activeElement||at===document.activeElement;if(Lt){var Bt=kt[yt.shiftKey?kt.length-1:0];Bt.focus(),yt.preventDefault()}}}var ue=b(10228),Ne=b(16089),We=ue.Z.LEFT,Te=ue.Z.RIGHT,ze=ue.Z.UP,Ye=ue.Z.DOWN,Je=ue.Z.ENTER,Ve=ue.Z.ESC,Tt=ue.Z.HOME,Ke=ue.Z.END,Et=[ze,Ye,We,Te];function Le(at,yt,kt,At){var Lt,Bt="prev",jt="next",Vt="children",Rn="parent";if(at==="inline"&&At===Je)return{inlineTrigger:!0};var Ln=(0,fe.Z)((0,fe.Z)({},ze,Bt),Ye,jt),hr=(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},We,kt?jt:Bt),Te,kt?Bt:jt),Ye,Vt),Je,Vt),dn=(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},ze,Bt),Ye,jt),Je,Vt),Ve,Rn),We,kt?Vt:Rn),Te,kt?Rn:Vt),cn={inline:Ln,horizontal:hr,vertical:dn,inlineSub:Ln,horizontalSub:dn,verticalSub:dn},Pn=(Lt=cn["".concat(at).concat(yt?"":"Sub")])===null||Lt===void 0?void 0:Lt[At];switch(Pn){case Bt:return{offset:-1,sibling:!0};case jt:return{offset:1,sibling:!0};case Rn:return{offset:-1,sibling:!1};case Vt:return{offset:1,sibling:!1};default:return null}}function pt(at){for(var yt=at;yt;){if(yt.getAttribute("data-menu-list"))return yt;yt=yt.parentElement}return null}function Pe(at,yt){for(var kt=at||document.activeElement;kt;){if(yt.has(kt))return kt;kt=kt.parentElement}return null}function Ae(at,yt){var kt=ne(at,!0);return kt.filter(function(At){return yt.has(At)})}function he(at,yt,kt){var At=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!at)return null;var Lt=Ae(at,yt),Bt=Lt.length,jt=Lt.findIndex(function(Vt){return kt===Vt});return At<0?jt===-1?jt=Bt-1:jt-=1:At>0&&(jt+=1),jt=(jt+Bt)%Bt,Lt[jt]}var je=function(yt,kt){var At=new Set,Lt=new Map,Bt=new Map;return yt.forEach(function(jt){var Vt=document.querySelector("[data-menu-id='".concat(Q(kt,jt),"']"));Vt&&(At.add(Vt),Bt.set(Vt,jt),Lt.set(jt,Vt))}),{elements:At,key2element:Lt,element2key:Bt}};function Ie(at,yt,kt,At,Lt,Bt,jt,Vt,Rn,Ln){var hr=S.useRef(),dn=S.useRef();dn.current=yt;var cn=function(){Ne.Z.cancel(hr.current)};return S.useEffect(function(){return function(){cn()}},[]),function(Pn){var Gn=Pn.which;if([].concat(Et,[Je,Ve,Tt,Ke]).includes(Gn)){var Hn=Bt(),bn=je(Hn,At),kn=bn,qn=kn.elements,Wn=kn.key2element,zn=kn.element2key,or=Wn.get(yt),Zn=Pe(or,qn),Qn=zn.get(Zn),xr=Le(at,jt(Qn,!0).length===1,kt,Gn);if(!xr&&Gn!==Tt&&Gn!==Ke)return;(Et.includes(Gn)||[Tt,Ke].includes(Gn))&&Pn.preventDefault();var bt=function(Vn){if(Vn){var Ar=Vn,lr=Vn.querySelector("a");lr!=null&&lr.getAttribute("href")&&(Ar=lr);var Qt=zn.get(Vn);Vt(Qt),cn(),hr.current=(0,Ne.Z)(function(){dn.current===Qt&&Ar.focus()})}};if([Tt,Ke].includes(Gn)||xr.sibling||!Zn){var mn;!Zn||at==="inline"?mn=Lt.current:mn=pt(Zn);var Yn,wr=Ae(mn,qn);Gn===Tt?Yn=wr[0]:Gn===Ke?Yn=wr[wr.length-1]:Yn=he(mn,qn,Zn,xr.offset),bt(Yn)}else if(xr.inlineTrigger)Rn(Qn);else if(xr.offset>0)Rn(Qn,!0),cn(),hr.current=(0,Ne.Z)(function(){bn=je(Hn,At);var xn=Zn.getAttribute("aria-controls"),Vn=document.getElementById(xn),Ar=he(Vn,bn.elements);bt(Ar)},5);else if(xr.offset<0){var Br=jt(Qn,!0),Tr=Br[Br.length-2],Er=Wn.get(Tr);Rn(Tr,!1),bt(Er)}}Ln==null||Ln(Pn)}}function we(at){Promise.resolve().then(at)}var M="__RC_UTIL_PATH_SPLIT__",de=function(yt){return yt.join(M)},_e=function(yt){return yt.split(M)},Me="rc-menu-more";function Fe(){var at=S.useState({}),yt=(0,z.Z)(at,2),kt=yt[1],At=(0,S.useRef)(new Map),Lt=(0,S.useRef)(new Map),Bt=S.useState([]),jt=(0,z.Z)(Bt,2),Vt=jt[0],Rn=jt[1],Ln=(0,S.useRef)(0),hr=(0,S.useRef)(!1),dn=function(){hr.current||kt({})},cn=(0,S.useCallback)(function(Wn,zn){var or=de(zn);Lt.current.set(or,Wn),At.current.set(Wn,or),Ln.current+=1;var Zn=Ln.current;we(function(){Zn===Ln.current&&dn()})},[]),Pn=(0,S.useCallback)(function(Wn,zn){var or=de(zn);Lt.current.delete(or),At.current.delete(Wn)},[]),Gn=(0,S.useCallback)(function(Wn){Rn(Wn)},[]),Hn=(0,S.useCallback)(function(Wn,zn){var or=At.current.get(Wn)||"",Zn=_e(or);return zn&&Vt.includes(Zn[0])&&Zn.unshift(Me),Zn},[Vt]),bn=(0,S.useCallback)(function(Wn,zn){return Wn.filter(function(or){return or!==void 0}).some(function(or){var Zn=Hn(or,!0);return Zn.includes(zn)})},[Hn]),kn=function(){var zn=(0,pe.Z)(At.current.keys());return Vt.length&&zn.push(Me),zn},qn=(0,S.useCallback)(function(Wn){var zn="".concat(At.current.get(Wn)).concat(M),or=new Set;return(0,pe.Z)(Lt.current.keys()).forEach(function(Zn){Zn.startsWith(zn)&&or.add(Lt.current.get(Zn))}),or},[]);return S.useEffect(function(){return function(){hr.current=!0}},[]),{registerPath:cn,unregisterPath:Pn,refreshOverflowKeys:Gn,isSubPathKey:bn,getKeyPath:Hn,getKeys:kn,getSubPathKeys:qn}}function Ze(at){var yt=S.useRef(at);yt.current=at;var kt=S.useCallback(function(){for(var At,Lt=arguments.length,Bt=new Array(Lt),jt=0;jt<Lt;jt++)Bt[jt]=arguments[jt];return(At=yt.current)===null||At===void 0?void 0:At.call.apply(At,[yt].concat(Bt))},[]);return at?kt:void 0}var Qe=Math.random().toFixed(5).toString().slice(2),tt=0;function ut(at){var yt=(0,Y.Z)(at,{value:at}),kt=(0,z.Z)(yt,2),At=kt[0],Lt=kt[1];return S.useEffect(function(){tt+=1;var Bt="".concat(Qe,"-").concat(tt);Lt("rc-menu-uuid-".concat(Bt))},[]),At}var dt=b(38705),St=b(17212),gt=b(39153),_t=b(55401),Xe=b(2738),qe=b(8654);function st(at,yt,kt,At){var Lt=S.useContext(V),Bt=Lt.activeKey,jt=Lt.onActive,Vt=Lt.onInactive,Rn={active:Bt===at};return yt||(Rn.onMouseEnter=function(Ln){kt==null||kt({key:at,domEvent:Ln}),jt(at)},Rn.onMouseLeave=function(Ln){At==null||At({key:at,domEvent:Ln}),Vt(at)}),Rn}function ot(at){var yt=S.useContext(V),kt=yt.mode,At=yt.rtl,Lt=yt.inlineIndent;if(kt!=="inline")return null;var Bt=at;return At?{paddingRight:Bt*Lt}:{paddingLeft:Bt*Lt}}function Ct(at){var yt=at.icon,kt=at.props,At=at.children,Lt;return yt===null||yt===!1?null:(typeof yt=="function"?Lt=S.createElement(yt,(0,be.Z)({},kt)):typeof yt!="boolean"&&(Lt=yt),Lt||At||null)}var x=["item"];function D(at){var yt=at.item,kt=(0,m.Z)(at,x);return Object.defineProperty(kt,"item",{get:function(){return(0,w.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),yt}}),kt}var se=["title","attribute","elementRef"],I=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],U=["active"],it=function(at){(0,gt.Z)(kt,at);var yt=(0,_t.Z)(kt);function kt(){return(0,dt.Z)(this,kt),yt.apply(this,arguments)}return(0,St.Z)(kt,[{key:"render",value:function(){var Lt=this.props,Bt=Lt.title,jt=Lt.attribute,Vt=Lt.elementRef,Rn=(0,m.Z)(Lt,se),Ln=(0,Xe.Z)(Rn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,w.ZP)(!jt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),S.createElement(o.Z.Item,(0,_.Z)({},jt,{title:typeof Bt=="string"?Bt:void 0},Ln,{ref:Vt}))}}]),kt}(S.Component),xe=S.forwardRef(function(at,yt){var kt=at.style,At=at.className,Lt=at.eventKey,Bt=at.warnKey,jt=at.disabled,Vt=at.itemIcon,Rn=at.children,Ln=at.role,hr=at.onMouseEnter,dn=at.onMouseLeave,cn=at.onClick,Pn=at.onKeyDown,Gn=at.onFocus,Hn=(0,m.Z)(at,I),bn=q(Lt),kn=S.useContext(V),qn=kn.prefixCls,Wn=kn.onItemClick,zn=kn.disabled,or=kn.overflowDisabled,Zn=kn.itemIcon,Qn=kn.selectedKeys,xr=kn.onActive,bt=S.useContext(ae),mn=bt._internalRenderMenuItem,Yn="".concat(qn,"-item"),wr=S.useRef(),Br=S.useRef(),Tr=zn||jt,Er=(0,qe.x1)(yt,Br),xn=Ue(Lt),Vn=function(Nr){return{key:Lt,keyPath:(0,pe.Z)(xn).reverse(),item:wr.current,domEvent:Nr}},Ar=Vt||Zn,lr=st(Lt,Tr,hr,dn),Qt=lr.active,gn=(0,m.Z)(lr,U),Fn=Qn.includes(Lt),yn=ot(xn.length),Yt=function(Nr){if(!Tr){var Wr=Vn(Nr);cn==null||cn(D(Wr)),Wn(Wr)}},tr=function(Nr){if(Pn==null||Pn(Nr),Nr.which===ue.Z.ENTER){var Wr=Vn(Nr);cn==null||cn(D(Wr)),Wn(Wr)}},rr=function(Nr){xr(Lt),Gn==null||Gn(Nr)},Hr={};at.role==="option"&&(Hr["aria-selected"]=Fn);var ei=S.createElement(it,(0,_.Z)({ref:wr,elementRef:Er,role:Ln===null?"none":Ln||"menuitem",tabIndex:jt?null:-1,"data-menu-id":or&&bn?null:bn},(0,Xe.Z)(Hn,["extra"]),gn,Hr,{component:"li","aria-disabled":jt,style:(0,be.Z)((0,be.Z)({},yn),kt),className:ie()(Yn,(0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(Yn,"-active"),Qt),"".concat(Yn,"-selected"),Fn),"".concat(Yn,"-disabled"),Tr),At),onClick:Yt,onKeyDown:tr,onFocus:rr}),Rn,S.createElement(Ct,{props:(0,be.Z)((0,be.Z)({},at),{},{isSelected:Fn}),icon:Ar}));return mn&&(ei=mn(ei,at,{selected:Fn})),ei});function Re(at,yt){var kt=at.eventKey,At=le(),Lt=Ue(kt);return S.useEffect(function(){if(At)return At.registerPath(kt,Lt),function(){At.unregisterPath(kt,Lt)}},[Lt]),At?null:S.createElement(xe,(0,_.Z)({},at,{ref:yt}))}var He=S.forwardRef(Re),G=["className","children"],J=function(yt,kt){var At=yt.className,Lt=yt.children,Bt=(0,m.Z)(yt,G),jt=S.useContext(V),Vt=jt.prefixCls,Rn=jt.mode,Ln=jt.rtl;return S.createElement("ul",(0,_.Z)({className:ie()(Vt,Ln&&"".concat(Vt,"-rtl"),"".concat(Vt,"-sub"),"".concat(Vt,"-").concat(Rn==="inline"?"inline":"vertical"),At),role:"menu"},Bt,{"data-menu-list":!0,ref:kt}),Lt)},ve=S.forwardRef(J);ve.displayName="SubMenuList";var Ce=ve,X=b(11592);function ct(at,yt){return(0,X.Z)(at).map(function(kt,At){if(S.isValidElement(kt)){var Lt,Bt,jt=kt.key,Vt=(Lt=(Bt=kt.props)===null||Bt===void 0?void 0:Bt.eventKey)!==null&&Lt!==void 0?Lt:jt,Rn=Vt==null;Rn&&(Vt="tmp_key-".concat([].concat((0,pe.Z)(yt),[At]).join("-")));var Ln={key:Vt,eventKey:Vt};return S.cloneElement(kt,Ln)}return kt})}var ge=b(68196),wt={adjustX:1,adjustY:1},Ft={topLeft:{points:["bl","tl"],overflow:wt},topRight:{points:["br","tr"],overflow:wt},bottomLeft:{points:["tl","bl"],overflow:wt},bottomRight:{points:["tr","br"],overflow:wt},leftTop:{points:["tr","tl"],overflow:wt},leftBottom:{points:["br","bl"],overflow:wt},rightTop:{points:["tl","tr"],overflow:wt},rightBottom:{points:["bl","br"],overflow:wt}},Kt={topLeft:{points:["bl","tl"],overflow:wt},topRight:{points:["br","tr"],overflow:wt},bottomLeft:{points:["tl","bl"],overflow:wt},bottomRight:{points:["tr","br"],overflow:wt},rightTop:{points:["tr","tl"],overflow:wt},rightBottom:{points:["br","bl"],overflow:wt},leftTop:{points:["tl","tr"],overflow:wt},leftBottom:{points:["bl","br"],overflow:wt}},on=null;function rn(at,yt,kt){if(yt)return yt;if(kt)return kt[at]||kt.other}var Zt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ln(at){var yt=at.prefixCls,kt=at.visible,At=at.children,Lt=at.popup,Bt=at.popupStyle,jt=at.popupClassName,Vt=at.popupOffset,Rn=at.disabled,Ln=at.mode,hr=at.onVisibleChange,dn=S.useContext(V),cn=dn.getPopupContainer,Pn=dn.rtl,Gn=dn.subMenuOpenDelay,Hn=dn.subMenuCloseDelay,bn=dn.builtinPlacements,kn=dn.triggerSubMenuAction,qn=dn.forceSubMenuRender,Wn=dn.rootClassName,zn=dn.motion,or=dn.defaultMotions,Zn=S.useState(!1),Qn=(0,z.Z)(Zn,2),xr=Qn[0],bt=Qn[1],mn=Pn?(0,be.Z)((0,be.Z)({},Kt),bn):(0,be.Z)((0,be.Z)({},Ft),bn),Yn=Zt[Ln],wr=rn(Ln,zn,or),Br=S.useRef(wr);Ln!=="inline"&&(Br.current=wr);var Tr=(0,be.Z)((0,be.Z)({},Br.current),{},{leavedClassName:"".concat(yt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Er=S.useRef();return S.useEffect(function(){return Er.current=(0,Ne.Z)(function(){bt(kt)}),function(){Ne.Z.cancel(Er.current)}},[kt]),S.createElement(ge.Z,{prefixCls:yt,popupClassName:ie()("".concat(yt,"-popup"),(0,fe.Z)({},"".concat(yt,"-rtl"),Pn),jt,Wn),stretch:Ln==="horizontal"?"minWidth":null,getPopupContainer:cn,builtinPlacements:mn,popupPlacement:Yn,popupVisible:xr,popup:Lt,popupStyle:Bt,popupAlign:Vt&&{offset:Vt},action:Rn?[]:[kn],mouseEnterDelay:Gn,mouseLeaveDelay:Hn,onPopupVisibleChange:hr,forceRender:qn,popupMotion:Tr,fresh:!0},At)}var er=b(77900);function Sn(at){var yt=at.id,kt=at.open,At=at.keyPath,Lt=at.children,Bt="inline",jt=S.useContext(V),Vt=jt.prefixCls,Rn=jt.forceSubMenuRender,Ln=jt.motion,hr=jt.defaultMotions,dn=jt.mode,cn=S.useRef(!1);cn.current=dn===Bt;var Pn=S.useState(!cn.current),Gn=(0,z.Z)(Pn,2),Hn=Gn[0],bn=Gn[1],kn=cn.current?kt:!1;S.useEffect(function(){cn.current&&bn(!1)},[dn]);var qn=(0,be.Z)({},rn(Bt,Ln,hr));At.length>1&&(qn.motionAppear=!1);var Wn=qn.onVisibleChanged;return qn.onVisibleChanged=function(zn){return!cn.current&&!zn&&bn(!0),Wn==null?void 0:Wn(zn)},Hn?null:S.createElement(F,{mode:Bt,locked:!cn.current},S.createElement(er.default,(0,_.Z)({visible:kn},qn,{forceRender:Rn,removeOnLeave:!1,leavedClassName:"".concat(Vt,"-hidden")}),function(zn){var or=zn.className,Zn=zn.style;return S.createElement(Ce,{id:yt,className:or,style:Zn},Lt)}))}var pn=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Ut=["active"],Rt=S.forwardRef(function(at,yt){var kt=at.style,At=at.className,Lt=at.title,Bt=at.eventKey,jt=at.warnKey,Vt=at.disabled,Rn=at.internalPopupClose,Ln=at.children,hr=at.itemIcon,dn=at.expandIcon,cn=at.popupClassName,Pn=at.popupOffset,Gn=at.popupStyle,Hn=at.onClick,bn=at.onMouseEnter,kn=at.onMouseLeave,qn=at.onTitleClick,Wn=at.onTitleMouseEnter,zn=at.onTitleMouseLeave,or=(0,m.Z)(at,pn),Zn=q(Bt),Qn=S.useContext(V),xr=Qn.prefixCls,bt=Qn.mode,mn=Qn.openKeys,Yn=Qn.disabled,wr=Qn.overflowDisabled,Br=Qn.activeKey,Tr=Qn.selectedKeys,Er=Qn.itemIcon,xn=Qn.expandIcon,Vn=Qn.onItemClick,Ar=Qn.onOpenChange,lr=Qn.onActive,Qt=S.useContext(ae),gn=Qt._internalRenderSubMenuItem,Fn=S.useContext(Be),yn=Fn.isSubPathKey,Yt=Ue(),tr="".concat(xr,"-submenu"),rr=Yn||Vt,Hr=S.useRef(),ei=S.useRef(),ti=hr!=null?hr:Er,Nr=dn!=null?dn:xn,Wr=mn.includes(Bt),fr=!wr&&Wr,di=yn(Tr,Bt),jr=st(Bt,rr,Wn,zn),Xr=jr.active,ni=(0,m.Z)(jr,Ut),ri=S.useState(!1),jn=(0,z.Z)(ri,2),hi=jn[0],fi=jn[1],si=function(qr){rr||fi(qr)},Ur=function(qr){si(!0),bn==null||bn({key:Bt,domEvent:qr})},An=function(qr){si(!1),kn==null||kn({key:Bt,domEvent:qr})},Ii=S.useMemo(function(){return Xr||(bt!=="inline"?hi||yn([Br],Bt):!1)},[bt,Xr,Br,hi,Bt,yn]),Ht=ot(Yt.length),zr=function(qr){rr||(qn==null||qn({key:Bt,domEvent:qr}),bt==="inline"&&Ar(Bt,!Wr))},Ri=Ze(function(Lr){Hn==null||Hn(D(Lr)),Vn(Lr)}),Ei=function(qr){bt!=="inline"&&Ar(Bt,qr)},Gr=function(){lr(Bt)},Qr=Zn&&"".concat(Zn,"-popup"),Cn=S.useMemo(function(){return S.createElement(Ct,{icon:bt!=="horizontal"?Nr:void 0,props:(0,be.Z)((0,be.Z)({},at),{},{isOpen:fr,isSubMenu:!0})},S.createElement("i",{className:"".concat(tr,"-arrow")}))},[bt,Nr,at,fr,tr]),Kr=S.createElement("div",(0,_.Z)({role:"menuitem",style:Ht,className:"".concat(tr,"-title"),tabIndex:rr?null:-1,ref:Hr,title:typeof Lt=="string"?Lt:null,"data-menu-id":wr&&Zn?null:Zn,"aria-expanded":fr,"aria-haspopup":!0,"aria-controls":Qr,"aria-disabled":rr,onClick:zr,onFocus:Gr},ni),Lt,Cn),ai=S.useRef(bt);if(bt!=="inline"&&Yt.length>1?ai.current="vertical":ai.current=bt,!wr){var Li=ai.current;Kr=S.createElement(ln,{mode:Li,prefixCls:tr,visible:!Rn&&fr&&bt!=="inline",popupClassName:cn,popupOffset:Pn,popupStyle:Gn,popup:S.createElement(F,{mode:Li==="horizontal"?"vertical":Li},S.createElement(Ce,{id:Qr,ref:ei},Ln)),disabled:rr,onVisibleChange:Ei},Kr)}var $r=S.createElement(o.Z.Item,(0,_.Z)({ref:yt,role:"none"},or,{component:"li",style:kt,className:ie()(tr,"".concat(tr,"-").concat(bt),At,(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(tr,"-open"),fr),"".concat(tr,"-active"),Ii),"".concat(tr,"-selected"),di),"".concat(tr,"-disabled"),rr)),onMouseEnter:Ur,onMouseLeave:An}),Kr,!wr&&S.createElement(Sn,{id:Qr,open:fr,keyPath:Yt},Ln));return gn&&($r=gn($r,at,{selected:di,active:Ii,open:fr,disabled:rr})),S.createElement(F,{onItemClick:Ri,mode:bt==="horizontal"?"vertical":bt,itemIcon:ti,expandIcon:Nr},$r)}),Ot=S.forwardRef(function(at,yt){var kt=at.eventKey,At=at.children,Lt=Ue(kt),Bt=ct(At,Lt),jt=le();S.useEffect(function(){if(jt)return jt.registerPath(kt,Lt),function(){jt.unregisterPath(kt,Lt)}},[Lt]);var Vt;return jt?Vt=Bt:Vt=S.createElement(Rt,(0,_.Z)({ref:yt},at),Bt),S.createElement(De.Provider,{value:Lt},Vt)}),Xt=Ot,un=b(43749);function In(at){var yt=at.className,kt=at.style,At=S.useContext(V),Lt=At.prefixCls,Bt=le();return Bt?null:S.createElement("li",{role:"separator",className:ie()("".concat(Lt,"-item-divider"),yt),style:kt})}var ar=["className","title","eventKey","children"],yr=S.forwardRef(function(at,yt){var kt=at.className,At=at.title,Lt=at.eventKey,Bt=at.children,jt=(0,m.Z)(at,ar),Vt=S.useContext(V),Rn=Vt.prefixCls,Ln="".concat(Rn,"-item-group");return S.createElement("li",(0,_.Z)({ref:yt,role:"presentation"},jt,{onClick:function(dn){return dn.stopPropagation()},className:ie()(Ln,kt)}),S.createElement("div",{role:"presentation",className:"".concat(Ln,"-title"),title:typeof At=="string"?At:void 0},At),S.createElement("ul",{role:"group",className:"".concat(Ln,"-list")},Bt))}),br=S.forwardRef(function(at,yt){var kt=at.eventKey,At=at.children,Lt=Ue(kt),Bt=ct(At,Lt),jt=le();return jt?Bt:S.createElement(yr,(0,_.Z)({ref:yt},(0,Xe.Z)(at,["warnKey"])),Bt)}),_r=br,On=["label","children","key","type","extra"];function cr(at,yt,kt){var At=yt.item,Lt=yt.group,Bt=yt.submenu,jt=yt.divider;return(at||[]).map(function(Vt,Rn){if(Vt&&(0,un.Z)(Vt)==="object"){var Ln=Vt,hr=Ln.label,dn=Ln.children,cn=Ln.key,Pn=Ln.type,Gn=Ln.extra,Hn=(0,m.Z)(Ln,On),bn=cn!=null?cn:"tmp-".concat(Rn);return dn||Pn==="group"?Pn==="group"?S.createElement(Lt,(0,_.Z)({key:bn},Hn,{title:hr}),cr(dn,yt,kt)):S.createElement(Bt,(0,_.Z)({key:bn},Hn,{title:hr}),cr(dn,yt,kt)):Pn==="divider"?S.createElement(jt,(0,_.Z)({key:bn},Hn)):S.createElement(At,(0,_.Z)({key:bn},Hn,{extra:Gn}),hr,(!!Gn||Gn===0)&&S.createElement("span",{className:"".concat(kt,"-item-extra")},Gn))}return null}).filter(function(Vt){return Vt})}function nr(at,yt,kt,At,Lt){var Bt=at,jt=(0,be.Z)({divider:In,item:He,group:_r,submenu:Xt},At);return yt&&(Bt=cr(yt,jt,Lt)),ct(Bt,kt)}var Mr=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],dr=[],Mn=S.forwardRef(function(at,yt){var kt,At=at,Lt=At.prefixCls,Bt=Lt===void 0?"rc-menu":Lt,jt=At.rootClassName,Vt=At.style,Rn=At.className,Ln=At.tabIndex,hr=Ln===void 0?0:Ln,dn=At.items,cn=At.children,Pn=At.direction,Gn=At.id,Hn=At.mode,bn=Hn===void 0?"vertical":Hn,kn=At.inlineCollapsed,qn=At.disabled,Wn=At.disabledOverflow,zn=At.subMenuOpenDelay,or=zn===void 0?.1:zn,Zn=At.subMenuCloseDelay,Qn=Zn===void 0?.1:Zn,xr=At.forceSubMenuRender,bt=At.defaultOpenKeys,mn=At.openKeys,Yn=At.activeKey,wr=At.defaultActiveFirst,Br=At.selectable,Tr=Br===void 0?!0:Br,Er=At.multiple,xn=Er===void 0?!1:Er,Vn=At.defaultSelectedKeys,Ar=At.selectedKeys,lr=At.onSelect,Qt=At.onDeselect,gn=At.inlineIndent,Fn=gn===void 0?24:gn,yn=At.motion,Yt=At.defaultMotions,tr=At.triggerSubMenuAction,rr=tr===void 0?"hover":tr,Hr=At.builtinPlacements,ei=At.itemIcon,ti=At.expandIcon,Nr=At.overflowedIndicator,Wr=Nr===void 0?"...":Nr,fr=At.overflowedIndicatorPopupClassName,di=At.getPopupContainer,jr=At.onClick,Xr=At.onOpenChange,ni=At.onKeyDown,ri=At.openAnimation,jn=At.openTransitionName,hi=At._internalRenderMenuItem,fi=At._internalRenderSubMenuItem,si=At._internalComponents,Ur=(0,m.Z)(At,Mr),An=S.useMemo(function(){return[nr(cn,dn,dr,si,Bt),nr(cn,dn,dr,{},Bt)]},[cn,dn,si]),Ii=(0,z.Z)(An,2),Ht=Ii[0],zr=Ii[1],Ri=S.useState(!1),Ei=(0,z.Z)(Ri,2),Gr=Ei[0],Qr=Ei[1],Cn=S.useRef(),Kr=ut(Gn),ai=Pn==="rtl",Li=(0,Y.Z)(bt,{value:mn,postState:function(vr){return vr||dr}}),$r=(0,z.Z)(Li,2),Lr=$r[0],qr=$r[1],Jr=function(vr){var Ir=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function ii(){qr(vr),Xr==null||Xr(vr)}Ir?(0,C.flushSync)(ii):ii()},Si=S.useState(Lr),pi=(0,z.Z)(Si,2),Gi=pi[0],Xi=pi[1],Mi=S.useRef(!1),mi=S.useMemo(function(){return(bn==="inline"||bn==="vertical")&&kn?["vertical",kn]:[bn,!1]},[bn,kn]),sn=(0,z.Z)(mi,2),Dn=sn[0],pr=sn[1],$n=Dn==="inline",Xn=S.useState(Dn),wi=(0,z.Z)(Xn,2),Vr=wi[0],ki=wi[1],Ki=S.useState(pr),na=(0,z.Z)(Ki,2),Ea=na[0],ra=na[1];S.useEffect(function(){ki(Dn),ra(pr),Mi.current&&($n?qr(Gi):Jr(dr))},[Dn,pr]);var Bi=S.useState(0),Ti=(0,z.Z)(Bi,2),_i=Ti[0],Ns=Ti[1],is=_i>=Ht.length-1||Vr!=="horizontal"||Wn;S.useEffect(function(){$n&&Xi(Lr)},[Lr]),S.useEffect(function(){return Mi.current=!0,function(){Mi.current=!1}},[]);var Ni=Fe(),Fs=Ni.registerPath,_s=Ni.unregisterPath,Sa=Ni.refreshOverflowKeys,hs=Ni.isSubPathKey,bs=Ni.getKeyPath,Ai=Ni.getKeys,ia=Ni.getSubPathKeys,wa=S.useMemo(function(){return{registerPath:Fs,unregisterPath:_s}},[Fs,_s]),$s=S.useMemo(function(){return{isSubPathKey:hs}},[hs]);S.useEffect(function(){Sa(is?dr:Ht.slice(_i+1).map(function(gr){return gr.key}))},[_i,is]);var sa=(0,Y.Z)(Yn||wr&&((kt=Ht[0])===null||kt===void 0?void 0:kt.key),{value:Yn}),xs=(0,z.Z)(sa,2),qi=xs[0],Us=xs[1],Oi=Ze(function(gr){Us(gr)}),zs=Ze(function(){Us(void 0)});(0,S.useImperativeHandle)(yt,function(){return{list:Cn.current,focus:function(vr){var Ir,ii=Ai(),oi=je(ii,Kr),ps=oi.elements,ms=oi.key2element,Ji=oi.element2key,Gs=Ae(Cn.current,ps),ws=qi!=null?qi:Gs[0]?Ji.get(Gs[0]):(Ir=Ht.find(function(As){return!As.props.disabled}))===null||Ir===void 0?void 0:Ir.key,es=ms.get(ws);if(ws&&es){var Ts;es==null||(Ts=es.focus)===null||Ts===void 0||Ts.call(es,vr)}}}});var aa=(0,Y.Z)(Vn||[],{value:Ar,postState:function(vr){return Array.isArray(vr)?vr:vr==null?dr:[vr]}}),gi=(0,z.Z)(aa,2),ss=gi[0],fs=gi[1],Es=function(vr){if(Tr){var Ir=vr.key,ii=ss.includes(Ir),oi;xn?ii?oi=ss.filter(function(ms){return ms!==Ir}):oi=[].concat((0,pe.Z)(ss),[Ir]):oi=[Ir],fs(oi);var ps=(0,be.Z)((0,be.Z)({},vr),{},{selectedKeys:oi});ii?Qt==null||Qt(ps):lr==null||lr(ps)}!xn&&Lr.length&&Vr!=="inline"&&Jr(dr)},oa=Ze(function(gr){jr==null||jr(D(gr)),Es(gr)}),Fi=Ze(function(gr,vr){var Ir=Lr.filter(function(oi){return oi!==gr});if(vr)Ir.push(gr);else if(Vr!=="inline"){var ii=ia(gr);Ir=Ir.filter(function(oi){return!ii.has(oi)})}(0,N.Z)(Lr,Ir,!0)||Jr(Ir,!0)}),la=function(vr,Ir){var ii=Ir!=null?Ir:!Lr.includes(vr);Fi(vr,ii)},Qi=Ie(Vr,qi,ai,Kr,Cn,Ai,bs,Us,la,ni);S.useEffect(function(){Qr(!0)},[]);var Ss=S.useMemo(function(){return{_internalRenderMenuItem:hi,_internalRenderSubMenuItem:fi}},[hi,fi]),$i=Vr!=="horizontal"||Wn?Ht:Ht.map(function(gr,vr){return S.createElement(F,{key:gr.key,overflowDisabled:vr>_i},gr)}),js=S.createElement(o.Z,(0,_.Z)({id:Gn,ref:Cn,prefixCls:"".concat(Bt,"-overflow"),component:"ul",itemComponent:He,className:ie()(Bt,"".concat(Bt,"-root"),"".concat(Bt,"-").concat(Vr),Rn,(0,fe.Z)((0,fe.Z)({},"".concat(Bt,"-inline-collapsed"),Ea),"".concat(Bt,"-rtl"),ai),jt),dir:Pn,style:Vt,role:"menu",tabIndex:hr,data:$i,renderRawItem:function(vr){return vr},renderRawRest:function(vr){var Ir=vr.length,ii=Ir?Ht.slice(-Ir):null;return S.createElement(Xt,{eventKey:Me,title:Wr,disabled:is,internalPopupClose:Ir===0,popupClassName:fr},ii)},maxCount:Vr!=="horizontal"||Wn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(vr){Ns(vr)},onKeyDown:Qi},Ur));return S.createElement(ae.Provider,{value:Ss},S.createElement(L.Provider,{value:Kr},S.createElement(F,{prefixCls:Bt,rootClassName:jt,mode:Vr,openKeys:Lr,rtl:ai,disabled:qn,motion:Gr?yn:null,defaultMotions:Gr?Yt:null,activeKey:qi,onActive:Oi,onInactive:zs,selectedKeys:ss,inlineIndent:Fn,subMenuOpenDelay:or,subMenuCloseDelay:Qn,forceSubMenuRender:xr,builtinPlacements:Hr,triggerSubMenuAction:rr,getPopupContainer:di,itemIcon:ei,expandIcon:ti,onItemClick:oa,onOpenChange:Fi},S.createElement(Be.Provider,{value:$s},js),S.createElement("div",{style:{display:"none"},"aria-hidden":!0},S.createElement(ye.Provider,{value:wa},zr)))))}),Bn=Mn,Nn=Bn;Nn.Item=He,Nn.SubMenu=Xt,Nn.ItemGroup=_r,Nn.Divider=In;var ir=Nn},83836:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return W}});var _=b(60499),fe=b(85899),be=b(72190),pe=b(42244),z=b(59301),m=b(92310),ce=b.n(m),ie=b(29301),o=b(34280),Y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],N=void 0;function w(y,E){var B=y.prefixCls,ue=y.invalidate,Ne=y.item,We=y.renderItem,Te=y.responsive,ze=y.responsiveDisabled,Ye=y.registerSize,Je=y.itemKey,Ve=y.className,Tt=y.style,Ke=y.children,Et=y.display,Le=y.order,pt=y.component,Pe=pt===void 0?"div":pt,Ae=(0,pe.Z)(y,Y),he=Te&&!Et;function je(_e){Ye(Je,_e)}z.useEffect(function(){return function(){je(null)}},[]);var Ie=We&&Ne!==N?We(Ne,{index:Le}):Ke,we;ue||(we={opacity:he?0:1,height:he?0:N,overflowY:he?"hidden":N,order:Te?Le:N,pointerEvents:he?"none":N,position:he?"absolute":N});var M={};he&&(M["aria-hidden"]=!0);var de=z.createElement(Pe,(0,_.Z)({className:ce()(!ue&&B,Ve),style:(0,fe.Z)((0,fe.Z)({},we),Tt)},M,Ae,{ref:E}),Ie);return Te&&(de=z.createElement(ie.Z,{onResize:function(Me){var Fe=Me.offsetWidth;je(Fe)},disabled:ze},de)),de}var S=z.forwardRef(w);S.displayName="Item";var C=S,L=b(6089),Q=b(4676),q=b(16089);function H(y){if(typeof MessageChannel=="undefined")(0,q.Z)(y);else{var E=new MessageChannel;E.port1.onmessage=function(){return y()},E.port2.postMessage(void 0)}}function T(){var y=z.useRef(null),E=function(ue){y.current||(y.current=[],H(function(){(0,Q.unstable_batchedUpdates)(function(){y.current.forEach(function(Ne){Ne()}),y.current=null})})),y.current.push(ue)};return E}function V(y,E){var B=z.useState(E),ue=(0,be.Z)(B,2),Ne=ue[0],We=ue[1],Te=(0,L.Z)(function(ze){y(function(){We(ze)})});return[Ne,Te]}var P=z.createContext(null),F=["component"],oe=["className"],ye=["className"],le=function(E,B){var ue=z.useContext(P);if(!ue){var Ne=E.component,We=Ne===void 0?"div":Ne,Te=(0,pe.Z)(E,F);return z.createElement(We,(0,_.Z)({},Te,{ref:B}))}var ze=ue.className,Ye=(0,pe.Z)(ue,oe),Je=E.className,Ve=(0,pe.Z)(E,ye);return z.createElement(P.Provider,{value:null},z.createElement(C,(0,_.Z)({ref:B,className:ce()(ze,Je)},Ye,Ve)))},De=z.forwardRef(le);De.displayName="RawItem";var Ue=De,Be=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],rt="responsive",ae="invalidate";function $(y){return"+ ".concat(y.length," ...")}function Z(y,E){var B=y.prefixCls,ue=B===void 0?"rc-overflow":B,Ne=y.data,We=Ne===void 0?[]:Ne,Te=y.renderItem,ze=y.renderRawItem,Ye=y.itemKey,Je=y.itemWidth,Ve=Je===void 0?10:Je,Tt=y.ssr,Ke=y.style,Et=y.className,Le=y.maxCount,pt=y.renderRest,Pe=y.renderRawRest,Ae=y.prefix,he=y.suffix,je=y.component,Ie=je===void 0?"div":je,we=y.itemComponent,M=y.onVisibleChange,de=(0,pe.Z)(y,Be),_e=Tt==="full",Me=T(),Fe=V(Me,null),Ze=(0,be.Z)(Fe,2),Qe=Ze[0],tt=Ze[1],ut=Qe||0,dt=V(Me,new Map),St=(0,be.Z)(dt,2),gt=St[0],_t=St[1],Xe=V(Me,0),qe=(0,be.Z)(Xe,2),st=qe[0],ot=qe[1],Ct=V(Me,0),x=(0,be.Z)(Ct,2),D=x[0],se=x[1],I=V(Me,0),U=(0,be.Z)(I,2),it=U[0],xe=U[1],Re=V(Me,0),He=(0,be.Z)(Re,2),G=He[0],J=He[1],ve=(0,z.useState)(null),Ce=(0,be.Z)(ve,2),X=Ce[0],ct=Ce[1],ge=(0,z.useState)(null),wt=(0,be.Z)(ge,2),Ft=wt[0],Kt=wt[1],on=z.useMemo(function(){return Ft===null&&_e?Number.MAX_SAFE_INTEGER:Ft||0},[Ft,Qe]),rn=(0,z.useState)(!1),Zt=(0,be.Z)(rn,2),ln=Zt[0],er=Zt[1],Sn="".concat(ue,"-item"),pn=Math.max(st,D),Ut=Le===rt,Rt=We.length&&Ut,Ot=Le===ae,Xt=Rt||typeof Le=="number"&&We.length>Le,un=(0,z.useMemo)(function(){var Lt=We;return Rt?Qe===null&&_e?Lt=We:Lt=We.slice(0,Math.min(We.length,ut/Ve)):typeof Le=="number"&&(Lt=We.slice(0,Le)),Lt},[We,Ve,Qe,Le,Rt]),In=(0,z.useMemo)(function(){return Rt?We.slice(on+1):We.slice(un.length)},[We,un,Rt,on]),ar=(0,z.useCallback)(function(Lt,Bt){var jt;return typeof Ye=="function"?Ye(Lt):(jt=Ye&&(Lt==null?void 0:Lt[Ye]))!==null&&jt!==void 0?jt:Bt},[Ye]),yr=(0,z.useCallback)(Te||function(Lt){return Lt},[Te]);function br(Lt,Bt,jt){Ft===Lt&&(Bt===void 0||Bt===X)||(Kt(Lt),jt||(er(Lt<We.length-1),M==null||M(Lt)),Bt!==void 0&&ct(Bt))}function _r(Lt,Bt){tt(Bt.clientWidth)}function On(Lt,Bt){_t(function(jt){var Vt=new Map(jt);return Bt===null?Vt.delete(Lt):Vt.set(Lt,Bt),Vt})}function cr(Lt,Bt){se(Bt),ot(D)}function nr(Lt,Bt){xe(Bt)}function Mr(Lt,Bt){J(Bt)}function dr(Lt){return gt.get(ar(un[Lt],Lt))}(0,o.Z)(function(){if(ut&&typeof pn=="number"&&un){var Lt=it+G,Bt=un.length,jt=Bt-1;if(!Bt){br(0,null);return}for(var Vt=0;Vt<Bt;Vt+=1){var Rn=dr(Vt);if(_e&&(Rn=Rn||0),Rn===void 0){br(Vt-1,void 0,!0);break}if(Lt+=Rn,jt===0&&Lt<=ut||Vt===jt-1&&Lt+dr(jt)<=ut){br(jt,null);break}else if(Lt+pn>ut){br(Vt-1,Lt-Rn-G+D);break}}he&&dr(0)+G>ut&&ct(null)}},[ut,gt,D,it,G,ar,un]);var Mn=ln&&!!In.length,Bn={};X!==null&&Rt&&(Bn={position:"absolute",left:X,top:0});var Nn={prefixCls:Sn,responsive:Rt,component:we,invalidate:Ot},ir=ze?function(Lt,Bt){var jt=ar(Lt,Bt);return z.createElement(P.Provider,{key:jt,value:(0,fe.Z)((0,fe.Z)({},Nn),{},{order:Bt,item:Lt,itemKey:jt,registerSize:On,display:Bt<=on})},ze(Lt,Bt))}:function(Lt,Bt){var jt=ar(Lt,Bt);return z.createElement(C,(0,_.Z)({},Nn,{order:Bt,key:jt,item:Lt,renderItem:yr,itemKey:jt,registerSize:On,display:Bt<=on}))},at={order:Mn?on:Number.MAX_SAFE_INTEGER,className:"".concat(Sn,"-rest"),registerSize:cr,display:Mn},yt=pt||$,kt=Pe?z.createElement(P.Provider,{value:(0,fe.Z)((0,fe.Z)({},Nn),at)},Pe(In)):z.createElement(C,(0,_.Z)({},Nn,at),typeof yt=="function"?yt(In):yt),At=z.createElement(Ie,(0,_.Z)({className:ce()(!Ot&&ue,Et),style:Ke,ref:E},de),Ae&&z.createElement(C,(0,_.Z)({},Nn,{responsive:Ut,responsiveDisabled:!Rt,order:-1,className:"".concat(Sn,"-prefix"),registerSize:nr,display:!0}),Ae),un.map(ir),Xt?kt:null,he&&z.createElement(C,(0,_.Z)({},Nn,{responsive:Ut,responsiveDisabled:!Rt,order:on,className:"".concat(Sn,"-suffix"),registerSize:Mr,display:!0,style:Bn}),he));return Ut?z.createElement(ie.Z,{onResize:_r,disabled:!Rt},At):At}var ne=z.forwardRef(Z);ne.displayName="Overflow",ne.Item=Ue,ne.RESPONSIVE=rt,ne.INVALIDATE=ae;var re=ne,W=re},29301:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ae}});var _=b(60499),fe=b(59301),be=b(11592),pe=b(48736),z=b(85899),m=b(43749),ce=b(76846),ie=b(8654),o=fe.createContext(null);function Y($){var Z=$.children,ne=$.onBatchResize,re=fe.useRef(0),W=fe.useRef([]),y=fe.useContext(o),E=fe.useCallback(function(B,ue,Ne){re.current+=1;var We=re.current;W.current.push({size:B,element:ue,data:Ne}),Promise.resolve().then(function(){We===re.current&&(ne==null||ne(W.current),W.current=[])}),y==null||y(B,ue,Ne)},[ne,y]);return fe.createElement(o.Provider,{value:E},Z)}var N=b(76374),w=new Map;function S($){$.forEach(function(Z){var ne,re=Z.target;(ne=w.get(re))===null||ne===void 0||ne.forEach(function(W){return W(re)})})}var C=new N.Z(S),L=null,Q=null;function q($,Z){w.has($)||(w.set($,new Set),C.observe($)),w.get($).add(Z)}function H($,Z){w.has($)&&(w.get($).delete(Z),w.get($).size||(C.unobserve($),w.delete($)))}var T=b(38705),V=b(17212),P=b(39153),F=b(55401),oe=function($){(0,P.Z)(ne,$);var Z=(0,F.Z)(ne);function ne(){return(0,T.Z)(this,ne),Z.apply(this,arguments)}return(0,V.Z)(ne,[{key:"render",value:function(){return this.props.children}}]),ne}(fe.Component);function ye($,Z){var ne=$.children,re=$.disabled,W=fe.useRef(null),y=fe.useRef(null),E=fe.useContext(o),B=typeof ne=="function",ue=B?ne(W):ne,Ne=fe.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),We=!B&&fe.isValidElement(ue)&&(0,ie.Yr)(ue),Te=We?(0,ie.C4)(ue):null,ze=(0,ie.x1)(Te,W),Ye=function(){var Ke;return(0,ce.ZP)(W.current)||(W.current&&(0,m.Z)(W.current)==="object"?(0,ce.ZP)((Ke=W.current)===null||Ke===void 0?void 0:Ke.nativeElement):null)||(0,ce.ZP)(y.current)};fe.useImperativeHandle(Z,function(){return Ye()});var Je=fe.useRef($);Je.current=$;var Ve=fe.useCallback(function(Tt){var Ke=Je.current,Et=Ke.onResize,Le=Ke.data,pt=Tt.getBoundingClientRect(),Pe=pt.width,Ae=pt.height,he=Tt.offsetWidth,je=Tt.offsetHeight,Ie=Math.floor(Pe),we=Math.floor(Ae);if(Ne.current.width!==Ie||Ne.current.height!==we||Ne.current.offsetWidth!==he||Ne.current.offsetHeight!==je){var M={width:Ie,height:we,offsetWidth:he,offsetHeight:je};Ne.current=M;var de=he===Math.round(Pe)?Pe:he,_e=je===Math.round(Ae)?Ae:je,Me=(0,z.Z)((0,z.Z)({},M),{},{offsetWidth:de,offsetHeight:_e});E==null||E(Me,Tt,Le),Et&&Promise.resolve().then(function(){Et(Me,Tt)})}},[]);return fe.useEffect(function(){var Tt=Ye();return Tt&&!re&&q(Tt,Ve),function(){return H(Tt,Ve)}},[W.current,re]),fe.createElement(oe,{ref:y},We?fe.cloneElement(ue,{ref:ze}):ue)}var le=fe.forwardRef(ye),De=le,Ue="rc-observer-key";function Be($,Z){var ne=$.children,re=typeof ne=="function"?[ne]:(0,be.Z)(ne);return re.map(function(W,y){var E=(W==null?void 0:W.key)||"".concat(Ue,"-").concat(y);return fe.createElement(De,(0,_.Z)({},$,{key:E,ref:y===0?Z:void 0}),W)})}var rt=fe.forwardRef(Be);rt.Collection=Y;var ae=rt},22711:function(Gt,nt,b){"use strict";b.r(nt),b.d(nt,{ResizableTextArea:function(){return rt},default:function(){return ne}});var _=b(60499),fe=b(18642),be=b(85899),pe=b(77654),z=b(72190),m=b(42244),ce=b(92310),ie=b.n(ce),o=b(36901),Y=b(66003),N=b(30292),w=b(18929),S=b(59301),C=b(43749),L=b(29301),Q=b(34280),q=b(16089),H=`
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;
`,T=["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"],V={},P;function F(re){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=re.getAttribute("id")||re.getAttribute("data-reactid")||re.getAttribute("name");if(W&&V[y])return V[y];var E=window.getComputedStyle(re),B=E.getPropertyValue("box-sizing")||E.getPropertyValue("-moz-box-sizing")||E.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(E.getPropertyValue("padding-bottom"))+parseFloat(E.getPropertyValue("padding-top")),Ne=parseFloat(E.getPropertyValue("border-bottom-width"))+parseFloat(E.getPropertyValue("border-top-width")),We=T.map(function(ze){return"".concat(ze,":").concat(E.getPropertyValue(ze))}).join(";"),Te={sizingStyle:We,paddingSize:ue,borderSize:Ne,boxSizing:B};return W&&y&&(V[y]=Te),Te}function oe(re){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,E=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),P.setAttribute("name","hiddenTextarea"),document.body.appendChild(P)),re.getAttribute("wrap")?P.setAttribute("wrap",re.getAttribute("wrap")):P.removeAttribute("wrap");var B=F(re,W),ue=B.paddingSize,Ne=B.borderSize,We=B.boxSizing,Te=B.sizingStyle;P.setAttribute("style","".concat(Te,";").concat(H)),P.value=re.value||re.placeholder||"";var ze=void 0,Ye=void 0,Je,Ve=P.scrollHeight;if(We==="border-box"?Ve+=Ne:We==="content-box"&&(Ve-=ue),y!==null||E!==null){P.value=" ";var Tt=P.scrollHeight-ue;y!==null&&(ze=Tt*y,We==="border-box"&&(ze=ze+ue+Ne),Ve=Math.max(ze,Ve)),E!==null&&(Ye=Tt*E,We==="border-box"&&(Ye=Ye+ue+Ne),Je=Ve>Ye?"":"hidden",Ve=Math.min(Ye,Ve))}var Ke={height:Ve,overflowY:Je,resize:"none"};return ze&&(Ke.minHeight=ze),Ye&&(Ke.maxHeight=Ye),Ke}var ye=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],le=0,De=1,Ue=2,Be=S.forwardRef(function(re,W){var y=re,E=y.prefixCls,B=y.defaultValue,ue=y.value,Ne=y.autoSize,We=y.onResize,Te=y.className,ze=y.style,Ye=y.disabled,Je=y.onChange,Ve=y.onInternalAutoSize,Tt=(0,m.Z)(y,ye),Ke=(0,w.Z)(B,{value:ue,postState:function(Ct){return Ct!=null?Ct:""}}),Et=(0,z.Z)(Ke,2),Le=Et[0],pt=Et[1],Pe=function(Ct){pt(Ct.target.value),Je==null||Je(Ct)},Ae=S.useRef();S.useImperativeHandle(W,function(){return{textArea:Ae.current}});var he=S.useMemo(function(){return Ne&&(0,C.Z)(Ne)==="object"?[Ne.minRows,Ne.maxRows]:[]},[Ne]),je=(0,z.Z)(he,2),Ie=je[0],we=je[1],M=!!Ne,de=function(){try{if(document.activeElement===Ae.current){var Ct=Ae.current,x=Ct.selectionStart,D=Ct.selectionEnd,se=Ct.scrollTop;Ae.current.setSelectionRange(x,D),Ae.current.scrollTop=se}}catch(I){}},_e=S.useState(Ue),Me=(0,z.Z)(_e,2),Fe=Me[0],Ze=Me[1],Qe=S.useState(),tt=(0,z.Z)(Qe,2),ut=tt[0],dt=tt[1],St=function(){Ze(le)};(0,Q.Z)(function(){M&&St()},[ue,Ie,we,M]),(0,Q.Z)(function(){if(Fe===le)Ze(De);else if(Fe===De){var ot=oe(Ae.current,!1,Ie,we);Ze(Ue),dt(ot)}else de()},[Fe]);var gt=S.useRef(),_t=function(){q.Z.cancel(gt.current)},Xe=function(Ct){Fe===Ue&&(We==null||We(Ct),Ne&&(_t(),gt.current=(0,q.Z)(function(){St()})))};S.useEffect(function(){return _t},[]);var qe=M?ut:null,st=(0,be.Z)((0,be.Z)({},ze),qe);return(Fe===le||Fe===De)&&(st.overflowY="hidden",st.overflowX="hidden"),S.createElement(L.Z,{onResize:Xe,disabled:!(Ne||We)},S.createElement("textarea",(0,_.Z)({},Tt,{ref:Ae,style:st,className:ie()(E,Te,(0,fe.Z)({},"".concat(E,"-disabled"),Ye)),disabled:Ye,value:Le,onChange:Pe})))}),rt=Be,ae=["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"],$=S.forwardRef(function(re,W){var y,E=re.defaultValue,B=re.value,ue=re.onFocus,Ne=re.onBlur,We=re.onChange,Te=re.allowClear,ze=re.maxLength,Ye=re.onCompositionStart,Je=re.onCompositionEnd,Ve=re.suffix,Tt=re.prefixCls,Ke=Tt===void 0?"rc-textarea":Tt,Et=re.showCount,Le=re.count,pt=re.className,Pe=re.style,Ae=re.disabled,he=re.hidden,je=re.classNames,Ie=re.styles,we=re.onResize,M=re.onClear,de=re.onPressEnter,_e=re.readOnly,Me=re.autoSize,Fe=re.onKeyDown,Ze=(0,m.Z)(re,ae),Qe=(0,w.Z)(E,{value:B,defaultValue:E}),tt=(0,z.Z)(Qe,2),ut=tt[0],dt=tt[1],St=ut==null?"":String(ut),gt=S.useState(!1),_t=(0,z.Z)(gt,2),Xe=_t[0],qe=_t[1],st=S.useRef(!1),ot=S.useState(null),Ct=(0,z.Z)(ot,2),x=Ct[0],D=Ct[1],se=(0,S.useRef)(null),I=(0,S.useRef)(null),U=function(){var Ot;return(Ot=I.current)===null||Ot===void 0?void 0:Ot.textArea},it=function(){U().focus()};(0,S.useImperativeHandle)(W,function(){var Rt;return{resizableTextArea:I.current,focus:it,blur:function(){U().blur()},nativeElement:((Rt=se.current)===null||Rt===void 0?void 0:Rt.nativeElement)||U()}}),(0,S.useEffect)(function(){qe(function(Rt){return!Ae&&Rt})},[Ae]);var xe=S.useState(null),Re=(0,z.Z)(xe,2),He=Re[0],G=Re[1];S.useEffect(function(){if(He){var Rt;(Rt=U()).setSelectionRange.apply(Rt,(0,pe.Z)(He))}},[He]);var J=(0,Y.Z)(Le,Et),ve=(y=J.max)!==null&&y!==void 0?y:ze,Ce=Number(ve)>0,X=J.strategy(St),ct=!!ve&&X>ve,ge=function(Ot,Xt){var un=Xt;!st.current&&J.exceedFormatter&&J.max&&J.strategy(Xt)>J.max&&(un=J.exceedFormatter(Xt,{max:J.max}),Xt!==un&&G([U().selectionStart||0,U().selectionEnd||0])),dt(un),(0,N.rJ)(Ot.currentTarget,Ot,We,un)},wt=function(Ot){st.current=!0,Ye==null||Ye(Ot)},Ft=function(Ot){st.current=!1,ge(Ot,Ot.currentTarget.value),Je==null||Je(Ot)},Kt=function(Ot){ge(Ot,Ot.target.value)},on=function(Ot){Ot.key==="Enter"&&de&&de(Ot),Fe==null||Fe(Ot)},rn=function(Ot){qe(!0),ue==null||ue(Ot)},Zt=function(Ot){qe(!1),Ne==null||Ne(Ot)},ln=function(Ot){dt(""),it(),(0,N.rJ)(U(),Ot,We)},er=Ve,Sn;J.show&&(J.showFormatter?Sn=J.showFormatter({value:St,count:X,maxLength:ve}):Sn="".concat(X).concat(Ce?" / ".concat(ve):""),er=S.createElement(S.Fragment,null,er,S.createElement("span",{className:ie()("".concat(Ke,"-data-count"),je==null?void 0:je.count),style:Ie==null?void 0:Ie.count},Sn)));var pn=function(Ot){var Xt;we==null||we(Ot),(Xt=U())!==null&&Xt!==void 0&&Xt.style.height&&D(!0)},Ut=!Me&&!Et&&!Te;return S.createElement(o.BaseInput,{ref:se,value:St,allowClear:Te,handleReset:ln,suffix:er,prefixCls:Ke,classNames:(0,be.Z)((0,be.Z)({},je),{},{affixWrapper:ie()(je==null?void 0:je.affixWrapper,(0,fe.Z)((0,fe.Z)({},"".concat(Ke,"-show-count"),Et),"".concat(Ke,"-textarea-allow-clear"),Te))}),disabled:Ae,focused:Xe,className:ie()(pt,ct&&"".concat(Ke,"-out-of-range")),style:(0,be.Z)((0,be.Z)({},Pe),x&&!Ut?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Sn=="string"?Sn:void 0}},hidden:he,readOnly:_e,onClear:M},S.createElement(rt,(0,_.Z)({},Ze,{autoSize:Me,maxLength:ze,onKeyDown:on,onChange:Kt,onFocus:rn,onBlur:Zt,onCompositionStart:wt,onCompositionEnd:Ft,className:ie()(je==null?void 0:je.textarea),style:(0,be.Z)((0,be.Z)({},Ie==null?void 0:Ie.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:Ae,prefixCls:Ke,onResize:pn,ref:I,readOnly:_e})))}),Z=$,ne=Z},29125:function(Gt,nt,b){"use strict";b.d(nt,{G:function(){return pe},Z:function(){return H}});var _=b(92310),fe=b.n(_),be=b(59301);function pe(T){var V=T.children,P=T.prefixCls,F=T.id,oe=T.overlayInnerStyle,ye=T.bodyClassName,le=T.className,De=T.style;return be.createElement("div",{className:fe()("".concat(P,"-content"),le),style:De},be.createElement("div",{className:fe()("".concat(P,"-inner"),ye),id:F,role:"tooltip",style:oe},typeof V=="function"?V():V))}var z=b(60499),m=b(85899),ce=b(42244),ie=b(68196),o={shiftX:64,adjustY:1},Y={adjustX:1,shiftY:!0},N=[0,0],w={left:{points:["cr","cl"],overflow:Y,offset:[-4,0],targetOffset:N},right:{points:["cl","cr"],overflow:Y,offset:[4,0],targetOffset:N},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:N},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:N},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:N},leftTop:{points:["tr","tl"],overflow:Y,offset:[-4,0],targetOffset:N},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:N},rightTop:{points:["tl","tr"],overflow:Y,offset:[4,0],targetOffset:N},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:N},rightBottom:{points:["bl","br"],overflow:Y,offset:[4,0],targetOffset:N},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:N},leftBottom:{points:["br","bl"],overflow:Y,offset:[-4,0],targetOffset:N}},S=null,C=b(80402),L=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],Q=function(V,P){var F=V.overlayClassName,oe=V.trigger,ye=oe===void 0?["hover"]:oe,le=V.mouseEnterDelay,De=le===void 0?0:le,Ue=V.mouseLeaveDelay,Be=Ue===void 0?.1:Ue,rt=V.overlayStyle,ae=V.prefixCls,$=ae===void 0?"rc-tooltip":ae,Z=V.children,ne=V.onVisibleChange,re=V.afterVisibleChange,W=V.transitionName,y=V.animation,E=V.motion,B=V.placement,ue=B===void 0?"right":B,Ne=V.align,We=Ne===void 0?{}:Ne,Te=V.destroyTooltipOnHide,ze=Te===void 0?!1:Te,Ye=V.defaultVisible,Je=V.getTooltipContainer,Ve=V.overlayInnerStyle,Tt=V.arrowContent,Ke=V.overlay,Et=V.id,Le=V.showArrow,pt=Le===void 0?!0:Le,Pe=V.classNames,Ae=V.styles,he=(0,ce.Z)(V,L),je=(0,C.Z)(Et),Ie=(0,be.useRef)(null);(0,be.useImperativeHandle)(P,function(){return Ie.current});var we=(0,m.Z)({},he);"visible"in V&&(we.popupVisible=V.visible);var M=function(){return be.createElement(pe,{key:"content",prefixCls:$,id:je,bodyClassName:Pe==null?void 0:Pe.body,overlayInnerStyle:(0,m.Z)((0,m.Z)({},Ve),Ae==null?void 0:Ae.body)},Ke)},de=function(){var Me=be.Children.only(Z),Fe=(Me==null?void 0:Me.props)||{},Ze=(0,m.Z)((0,m.Z)({},Fe),{},{"aria-describedby":Ke?je:null});return be.cloneElement(Z,Ze)};return be.createElement(ie.Z,(0,z.Z)({popupClassName:fe()(F,Pe==null?void 0:Pe.root),prefixCls:$,popup:M,action:ye,builtinPlacements:w,popupPlacement:ue,ref:Ie,popupAlign:We,getPopupContainer:Je,onPopupVisibleChange:ne,afterPopupVisibleChange:re,popupTransitionName:W,popupAnimation:y,popupMotion:E,defaultPopupVisible:Ye,autoDestroy:ze,mouseLeaveDelay:Be,popupStyle:(0,m.Z)((0,m.Z)({},rt),Ae==null?void 0:Ae.root),mouseEnterDelay:De,arrow:pt},we),de())},q=(0,be.forwardRef)(Q),H=q},49658:function(Gt,nt){"use strict";nt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var b=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(b)||/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(b==null?void 0:b.substr(0,4))}},83145:function(Gt,nt,b){"use strict";Object.defineProperty(nt,"__esModule",{value:!0}),nt.CopyToClipboard=void 0;var _=be(b(59301)),fe=be(b(25769));function be(T){return T&&T.__esModule?T:{default:T}}function pe(T){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pe=function(P){return typeof P}:pe=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},pe(T)}function z(T,V){var P=Object.keys(T);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(T);V&&(F=F.filter(function(oe){return Object.getOwnPropertyDescriptor(T,oe).enumerable})),P.push.apply(P,F)}return P}function m(T){for(var V=1;V<arguments.length;V++){var P=arguments[V]!=null?arguments[V]:{};V%2?z(P,!0).forEach(function(F){q(T,F,P[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(P)):z(P).forEach(function(F){Object.defineProperty(T,F,Object.getOwnPropertyDescriptor(P,F))})}return T}function ce(T,V){if(T==null)return{};var P=ie(T,V),F,oe;if(Object.getOwnPropertySymbols){var ye=Object.getOwnPropertySymbols(T);for(oe=0;oe<ye.length;oe++)F=ye[oe],!(V.indexOf(F)>=0)&&Object.prototype.propertyIsEnumerable.call(T,F)&&(P[F]=T[F])}return P}function ie(T,V){if(T==null)return{};var P={},F=Object.keys(T),oe,ye;for(ye=0;ye<F.length;ye++)oe=F[ye],!(V.indexOf(oe)>=0)&&(P[oe]=T[oe]);return P}function o(T,V){if(!(T instanceof V))throw new TypeError("Cannot call a class as a function")}function Y(T,V){for(var P=0;P<V.length;P++){var F=V[P];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(T,F.key,F)}}function N(T,V,P){return V&&Y(T.prototype,V),P&&Y(T,P),T}function w(T,V){return V&&(pe(V)==="object"||typeof V=="function")?V:C(T)}function S(T){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},S(T)}function C(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function L(T,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(V&&V.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),V&&Q(T,V)}function Q(T,V){return Q=Object.setPrototypeOf||function(F,oe){return F.__proto__=oe,F},Q(T,V)}function q(T,V,P){return V in T?Object.defineProperty(T,V,{value:P,enumerable:!0,configurable:!0,writable:!0}):T[V]=P,T}var H=function(T){L(V,T);function V(){var P,F;o(this,V);for(var oe=arguments.length,ye=new Array(oe),le=0;le<oe;le++)ye[le]=arguments[le];return F=w(this,(P=S(V)).call.apply(P,[this].concat(ye))),q(C(F),"onClick",function(De){var Ue=F.props,Be=Ue.text,rt=Ue.onCopy,ae=Ue.children,$=Ue.options,Z=_.default.Children.only(ae),ne=(0,fe.default)(Be,$);rt&&rt(Be,ne),Z&&Z.props&&typeof Z.props.onClick=="function"&&Z.props.onClick(De)}),F}return N(V,[{key:"render",value:function(){var F=this.props,oe=F.text,ye=F.onCopy,le=F.options,De=F.children,Ue=ce(F,["text","onCopy","options","children"]),Be=_.default.Children.only(De);return _.default.cloneElement(Be,m({},Ue,{onClick:this.onClick}))}}]),V}(_.default.PureComponent);nt.CopyToClipboard=H,q(H,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Gt,nt,b){"use strict";var _=b(83145),fe=_.CopyToClipboard;fe.CopyToClipboard=fe,Gt.exports=fe},76374:function(Gt,nt,b){"use strict";var _=function(){if(typeof Map!="undefined")return Map;function ae($,Z){var ne=-1;return $.some(function(re,W){return re[0]===Z?(ne=W,!0):!1}),ne}return function(){function $(){this.__entries__=[]}return Object.defineProperty($.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),$.prototype.get=function(Z){var ne=ae(this.__entries__,Z),re=this.__entries__[ne];return re&&re[1]},$.prototype.set=function(Z,ne){var re=ae(this.__entries__,Z);~re?this.__entries__[re][1]=ne:this.__entries__.push([Z,ne])},$.prototype.delete=function(Z){var ne=this.__entries__,re=ae(ne,Z);~re&&ne.splice(re,1)},$.prototype.has=function(Z){return!!~ae(this.__entries__,Z)},$.prototype.clear=function(){this.__entries__.splice(0)},$.prototype.forEach=function(Z,ne){ne===void 0&&(ne=null);for(var re=0,W=this.__entries__;re<W.length;re++){var y=W[re];Z.call(ne,y[1],y[0])}},$}()}(),fe=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,be=function(){return typeof b.g!="undefined"&&b.g.Math===Math?b.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),pe=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(be):function(ae){return setTimeout(function(){return ae(Date.now())},1e3/60)}}(),z=2;function m(ae,$){var Z=!1,ne=!1,re=0;function W(){Z&&(Z=!1,ae()),ne&&E()}function y(){pe(W)}function E(){var B=Date.now();if(Z){if(B-re<z)return;ne=!0}else Z=!0,ne=!1,setTimeout(y,$);re=B}return E}var ce=20,ie=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",Y=function(){function ae(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=m(this.refresh.bind(this),ce)}return ae.prototype.addObserver=function($){~this.observers_.indexOf($)||this.observers_.push($),this.connected_||this.connect_()},ae.prototype.removeObserver=function($){var Z=this.observers_,ne=Z.indexOf($);~ne&&Z.splice(ne,1),!Z.length&&this.connected_&&this.disconnect_()},ae.prototype.refresh=function(){var $=this.updateObservers_();$&&this.refresh()},ae.prototype.updateObservers_=function(){var $=this.observers_.filter(function(Z){return Z.gatherActive(),Z.hasActive()});return $.forEach(function(Z){return Z.broadcastActive()}),$.length>0},ae.prototype.connect_=function(){!fe||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},ae.prototype.disconnect_=function(){!fe||!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)},ae.prototype.onTransitionEnd_=function($){var Z=$.propertyName,ne=Z===void 0?"":Z,re=ie.some(function(W){return!!~ne.indexOf(W)});re&&this.refresh()},ae.getInstance=function(){return this.instance_||(this.instance_=new ae),this.instance_},ae.instance_=null,ae}(),N=function(ae,$){for(var Z=0,ne=Object.keys($);Z<ne.length;Z++){var re=ne[Z];Object.defineProperty(ae,re,{value:$[re],enumerable:!1,writable:!1,configurable:!0})}return ae},w=function(ae){var $=ae&&ae.ownerDocument&&ae.ownerDocument.defaultView;return $||be},S=oe(0,0,0,0);function C(ae){return parseFloat(ae)||0}function L(ae){for(var $=[],Z=1;Z<arguments.length;Z++)$[Z-1]=arguments[Z];return $.reduce(function(ne,re){var W=ae["border-"+re+"-width"];return ne+C(W)},0)}function Q(ae){for(var $=["top","right","bottom","left"],Z={},ne=0,re=$;ne<re.length;ne++){var W=re[ne],y=ae["padding-"+W];Z[W]=C(y)}return Z}function q(ae){var $=ae.getBBox();return oe(0,0,$.width,$.height)}function H(ae){var $=ae.clientWidth,Z=ae.clientHeight;if(!$&&!Z)return S;var ne=w(ae).getComputedStyle(ae),re=Q(ne),W=re.left+re.right,y=re.top+re.bottom,E=C(ne.width),B=C(ne.height);if(ne.boxSizing==="border-box"&&(Math.round(E+W)!==$&&(E-=L(ne,"left","right")+W),Math.round(B+y)!==Z&&(B-=L(ne,"top","bottom")+y)),!V(ae)){var ue=Math.round(E+W)-$,Ne=Math.round(B+y)-Z;Math.abs(ue)!==1&&(E-=ue),Math.abs(Ne)!==1&&(B-=Ne)}return oe(re.left,re.top,E,B)}var T=function(){return typeof SVGGraphicsElement!="undefined"?function(ae){return ae instanceof w(ae).SVGGraphicsElement}:function(ae){return ae instanceof w(ae).SVGElement&&typeof ae.getBBox=="function"}}();function V(ae){return ae===w(ae).document.documentElement}function P(ae){return fe?T(ae)?q(ae):H(ae):S}function F(ae){var $=ae.x,Z=ae.y,ne=ae.width,re=ae.height,W=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,y=Object.create(W.prototype);return N(y,{x:$,y:Z,width:ne,height:re,top:Z,right:$+ne,bottom:re+Z,left:$}),y}function oe(ae,$,Z,ne){return{x:ae,y:$,width:Z,height:ne}}var ye=function(){function ae($){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=oe(0,0,0,0),this.target=$}return ae.prototype.isActive=function(){var $=P(this.target);return this.contentRect_=$,$.width!==this.broadcastWidth||$.height!==this.broadcastHeight},ae.prototype.broadcastRect=function(){var $=this.contentRect_;return this.broadcastWidth=$.width,this.broadcastHeight=$.height,$},ae}(),le=function(){function ae($,Z){var ne=F(Z);N(this,{target:$,contentRect:ne})}return ae}(),De=function(){function ae($,Z,ne){if(this.activeObservations_=[],this.observations_=new _,typeof $!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=$,this.controller_=Z,this.callbackCtx_=ne}return ae.prototype.observe=function($){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!($ instanceof w($).Element))throw new TypeError('parameter 1 is not of type "Element".');var Z=this.observations_;Z.has($)||(Z.set($,new ye($)),this.controller_.addObserver(this),this.controller_.refresh())}},ae.prototype.unobserve=function($){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!($ instanceof w($).Element))throw new TypeError('parameter 1 is not of type "Element".');var Z=this.observations_;Z.has($)&&(Z.delete($),Z.size||this.controller_.removeObserver(this))}},ae.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ae.prototype.gatherActive=function(){var $=this;this.clearActive(),this.observations_.forEach(function(Z){Z.isActive()&&$.activeObservations_.push(Z)})},ae.prototype.broadcastActive=function(){if(this.hasActive()){var $=this.callbackCtx_,Z=this.activeObservations_.map(function(ne){return new le(ne.target,ne.broadcastRect())});this.callback_.call($,Z,$),this.clearActive()}},ae.prototype.clearActive=function(){this.activeObservations_.splice(0)},ae.prototype.hasActive=function(){return this.activeObservations_.length>0},ae}(),Ue=typeof WeakMap!="undefined"?new WeakMap:new _,Be=function(){function ae($){if(!(this instanceof ae))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var Z=Y.getInstance(),ne=new De($,Z,this);Ue.set(this,ne)}return ae}();["observe","unobserve","disconnect"].forEach(function(ae){Be.prototype[ae]=function(){var $;return($=Ue.get(this))[ae].apply($,arguments)}});var rt=function(){return typeof be.ResizeObserver!="undefined"?be.ResizeObserver:Be}();nt.Z=rt},98040:function(Gt){Gt.exports=function(){var nt=document.getSelection();if(!nt.rangeCount)return function(){};for(var b=document.activeElement,_=[],fe=0;fe<nt.rangeCount;fe++)_.push(nt.getRangeAt(fe));switch(b.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":b.blur();break;default:b=null;break}return nt.removeAllRanges(),function(){nt.type==="Caret"&&nt.removeAllRanges(),nt.rangeCount||_.forEach(function(be){nt.addRange(be)}),b&&b.focus()}}},4977:function(Gt){"use strict";Gt.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(Gt,nt,b){"use strict";b.d(nt,{ZP:function(){return Bs}});const _=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},fe=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=be},be=Number.MAX_SAFE_INTEGER||9007199254740991;let pe=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}({}),z=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}({}),m=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var ce={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ie={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class Y{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o(e),this.fast_=new o(t),this.defaultTTFB_=r,this.ttfb_=new o(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new o(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new o(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,i=n/r;this.fast_.sample(r,i),this.slow_.sample(r,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function N(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 w(){return w=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},w.apply(null,arguments)}function S(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function C(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?S(Object(t),!0).forEach(function(n){N(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):S(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function L(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function Q(a){var e=L(a,"string");return typeof e=="symbol"?e:e+""}class q{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=H,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const H=function(){},T={trace:H,debug:H,log:H,warn:H,info:H,error:H};function V(){return w({},T)}function P(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):H}function F(a,e,t){return e[a]?e[a].bind(e):P(a,t)}const oe=V();function ye(a,e,t){const n=V();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=F(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return V()}r.forEach(i=>{oe[i]=F(i,a)})}else w(oe,n);return n}const le=oe;function De(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Ue(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Be(a,e){const t=Object.keys(a),n=Object.keys(e),r=t.length,i=n.length;return!r||!i||r===i&&!t.some(s=>n.indexOf(s)===-1)}function rt(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const p=c.indexOf("\0");return p!==-1?c.substring(0,p):c}return c.replace(/\0/g,"")}const t=a.length;let n,r,i,s="",l=0;for(;l<t;){if(n=a[l++],n===0&&e)return s;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=a[l++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[l++],i=a[l++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function ae(a){let e="";for(let t=0;t<a.length;t++){let n=a[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}function $(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function Z(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ne={exports:{}},re;function W(){return re||(re=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(d,c,p){if(p=p||{},d=d.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return d;var g=l.parseURL(d);if(!g)throw new Error("Error trying to parse base URL.");return g.path=l.normalizePath(g.path),l.buildURLFromParts(g)}var A=l.parseURL(c);if(!A)throw new Error("Error trying to parse relative URL.");if(A.scheme)return p.alwaysNormalize?(A.path=l.normalizePath(A.path),l.buildURLFromParts(A)):c;var k=l.parseURL(d);if(!k)throw new Error("Error trying to parse base URL.");if(!k.netLoc&&k.path&&k.path[0]!=="/"){var O=r.exec(k.path);k.netLoc=O[1],k.path=O[2]}k.netLoc&&!k.path&&(k.path="/");var te={scheme:k.scheme,netLoc:A.netLoc,path:null,params:A.params,query:A.query,fragment:A.fragment};if(!A.netLoc&&(te.netLoc=k.netLoc,A.path[0]!=="/"))if(!A.path)te.path=k.path,A.params||(te.params=k.params,A.query||(te.query=k.query));else{var ee=k.path,Se=ee.substring(0,ee.lastIndexOf("/")+1)+A.path;te.path=l.normalizePath(Se)}return te.path===null&&(te.path=p.alwaysNormalize?l.normalizePath(A.path):A.path),l.buildURLFromParts(te)},parseURL:function(d){var c=n.exec(d);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(d){for(d=d.split("").reverse().join("").replace(i,"");d.length!==(d=d.replace(s,"")).length;);return d.split("").reverse().join("")},buildURLFromParts:function(d){return d.scheme+d.netLoc+d.path+d.params+d.query+d.fragment}};a.exports=l})()}(ne)),ne.exports}var y=W();class E{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var B={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ue{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,Ye(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;n.length===1?r=(t==null?void 0:t.byteRangeEndOffset)||0:r=parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[B.AUDIO]:null,[B.VIDEO]:null,[B.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new E),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=y.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[B.AUDIO]=null,e[B.VIDEO]=null,e[B.AUDIOVIDEO]=null}}function Ne(a){return a.sn!=="initSegment"}class We extends ue{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(_(e)&&_(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 n=Object.keys(t);if(n.length===1){const r=this._decryptdata=t[n[0]]||null;r&&(this._decryptdata=r.getDecryptData(this.sn,t))}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=_(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var t;const n=Object.keys(this.levelkeys),r=n.length;if(r>1||r===1&&(t=this.levelkeys[n[0]])!=null&&t.encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!_(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ne(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 n;const r=t[e];r&&!((n=this._decryptdata)!=null&&n.keyId)&&(this._decryptdata=r.getDecryptData(this.sn,t))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:l}=this,d=l[e];if(!d){l[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}d.startPTS=Math.min(d.startPTS,t),d.endPTS=Math.max(d.endPTS,n),d.startDTS=Math.min(d.startDTS,r),d.endDTS=Math.max(d.endDTS,i)}}class Te extends ue{constructor(e,t,n,r,i){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function ze(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||ze(t,e)}}function Ye(a,e){const t=ze(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const Je=Math.pow(2,32)-1,Ve=[].push,Tt={video:1,audio:2,id3:3,text:4};function Ke(a){return String.fromCharCode.apply(null,a)}function Et(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Le(a,e){const t=Pe(a,e);return t<0?4294967296+t:t}function pt(a,e){let t=Le(a,e);return t*=Math.pow(2,32),t+=Le(a,e+4),t}function Pe(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Ae(a){const e=a.byteLength;for(let t=0;t<e;){const n=Le(a,t);if(n>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=n>1?t+n:e}return!1}function he(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Le(a,r),s=Ke(a.subarray(r+4,r+8)),l=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,l));else{const d=he(a.subarray(r+8,l),e.slice(1));d.length&&Ve.apply(t,d)}r=l}return t}function je(a){const e=[],t=a[0];let n=8;const r=Le(a,n);n+=4;let i=0,s=0;t===0?(i=Le(a,n),s=Le(a,n+4),n+=8):(i=pt(a,n),s=pt(a,n+8),n+=16),n+=2;let l=a.length+s;const d=Et(a,n);n+=2;for(let c=0;c<d;c++){let p=n;const g=Le(a,p);p+=4;const A=g&2147483647;if((g&2147483648)>>>31===1)return le.warn("SIDX has hierarchical references (not supported)"),null;const O=Le(a,p);p+=4,e.push({referenceSize:A,subsegmentDuration:O,info:{duration:O/r,start:l,end:l+A-1}}),l+=A,p+=4,n=p}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:d,references:e}}function Ie(a){const e=[],t=he(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=he(i,["tkhd"])[0];if(s){let l=s[0];const d=Le(s,l===0?12:20),c=he(i,["mdia","mdhd"])[0];if(c){l=c[0];const p=Le(c,l===0?12:20),g=he(i,["mdia","hdlr"])[0];if(g){const A=Ke(g.subarray(8,12)),k={soun:B.AUDIO,vide:B.VIDEO}[A],O=he(i,["mdia","minf","stbl","stsd"])[0],te=we(O);k?(e[d]={timescale:p,type:k,stsd:te},e[k]=C({timescale:p,id:d},te)):e[d]={timescale:p,type:A,stsd:te}}}}}return he(a,["moov","mvex","trex"]).forEach(r=>{const i=Le(r,4),s=e[i];s&&(s.default={duration:Le(r,12),flags:Le(r,20)})}),e}function we(a){const e=a.subarray(8),t=e.subarray(86),n=Ke(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=he(e,[n])[0].subarray(n==="enca"?28:78);he(c,["sinf"]).forEach(g=>{const A=he(g,["schm"])[0];if(A){const k=Ke(A.subarray(4,8));if(k==="cbcs"||k==="cenc"){const O=he(g,["frma"])[0];O&&(r=Ke(O))}}})}const l=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const d=he(t,["avcC"])[0];d&&d.length>3&&(r+="."+Me(d[1])+Me(d[2])+Me(d[3]),i=M(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const d=he(e,[n])[0],c=he(d.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=_e(c,p),p+=2;const g=c[p++];if(g&128&&(p+=2),g&64&&(p+=c[p++]),c[p++]!==4)break;p=_e(c,p);const A=c[p++];if(A===64)r+="."+Me(A);else break;if(p+=12,c[p++]!==5)break;p=_e(c,p);const k=c[p++];let O=(k&248)>>3;O===31&&(O+=1+((k&7)<<3)+((c[p]&224)>>5)),r+="."+O}break}case"hvc1":case"hev1":{const d=he(t,["hvcC"])[0];if(d&&d.length>12){const c=d[1],p=["","A","B","C"][c>>6],g=c&31,A=Le(d,2),k=(c&32)>>5?"H":"L",O=d[12],te=d.subarray(6,12);r+="."+p+g,r+="."+de(A).toString(16).toUpperCase(),r+="."+k+O;let ee="";for(let Se=te.length;Se--;){const ke=te[Se];(ke||ee)&&(ee="."+ke.toString(16).toUpperCase()+ee)}r+=ee}i=M(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=M(r,t)||r;break}case"vp09":{const d=he(t,["vpcC"])[0];if(d&&d.length>6){const c=d[4],p=d[5],g=d[6]>>4&15;r+="."+Fe(c)+"."+Fe(p)+"."+Fe(g)}break}case"av01":{const d=he(t,["av1C"])[0];if(d&&d.length>2){const c=d[1]>>>5,p=d[1]&31,g=d[2]>>>7?"H":"M",A=(d[2]&64)>>6,k=(d[2]&32)>>5,O=c===2&&A?k?12:10:A?10:8,te=(d[2]&16)>>4,ee=(d[2]&8)>>3,Se=(d[2]&4)>>2,ke=d[2]&3;r+="."+c+"."+Fe(p)+g+"."+Fe(O)+"."+te+"."+ee+Se+ke+"."+Fe(1)+"."+Fe(1)+"."+Fe(1)+"."+0,i=M("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function M(a,e){const t=he(e,["dvvC"]),n=t.length?t[0]:he(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+Fe(r)+"."+Fe(i)}}function de(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function _e(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function Me(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function Fe(a){return(a<10?"0":"")+a}function Ze(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&tt(a,(n,r)=>{const i=n.subarray(8,24);i.some(s=>s!==0)||(le.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${ae(i)} -> ${ae(t)}`),n.set(t,8))})}function Qe(a){const e=[];return tt(a,t=>e.push(t.subarray(8,24))),e}function tt(a,e){he(a,["moov","trak"]).forEach(n=>{const r=he(n,["mdia","minf","stbl","stsd"])[0];if(!r)return;const i=r.subarray(8);let s=he(i,["enca"]);const l=s.length>0;l||(s=he(i,["encv"])),s.forEach(d=>{const c=l?d.subarray(28):d.subarray(78);he(c,["sinf"]).forEach(g=>{const A=ut(g);A&&e(A,l)})})})}function ut(a){const e=he(a,["schm"])[0];if(e){const t=Ke(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const n=he(a,["schi","tenc"])[0];if(n)return n}}}function dt(a,e,t){const n={},r=he(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],l=he(s,["tfhd"])[0],d=Le(l,4),c=e[d];if(!c)continue;n[d]||(n[d]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const p=n[d],g=he(s,["tfdt"])[0];if(g){const $e=g[0];let et=Le(g,4);$e===1&&(et===Je?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(et*=Je+1,et+=Le(g,8))),_(et)&&(!_(p.start)||et<p.start)&&(p.start=et)}const A=c.default,k=Le(l,0)|(A==null?void 0:A.flags);let O=(A==null?void 0:A.duration)||0;k&8&&(k&2?O=Le(l,12):O=Le(l,8));const te=he(s,["trun"]);let ee=p.start||0,Se=0,ke=O;for(let $e=0;$e<te.length;$e++){const et=te[$e],ft=Le(et,4),Pt=p.sampleCount;p.sampleCount+=ft;const mt=et[3]&1,It=et[3]&4,Dt=et[2]&1,vt=et[2]&2,$t=et[2]&4,nn=et[2]&8;let hn=8,Tn=ft;for(mt&&(hn+=4),It&&ft&&(!(et[hn+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=Pt),hn+=4,Dt?(ke=Le(et,hn),hn+=4):ke=O,vt&&(hn+=4),nn&&(hn+=4),ee+=ke,Se+=ke,Tn--);Tn--;)Dt?(ke=Le(et,hn),hn+=4):ke=O,vt&&(hn+=4),$t&&(et[hn+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(Tn+1),p.keyFrameStart=ee),hn+=4),nn&&(hn+=4),ee+=ke,Se+=ke;!Se&&O&&(Se+=O*ft)}p.duration+=Se}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const l=he(a,["sidx"]);for(let d=0;d<l.length;d++){const c=je(l[d]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((g,A)=>g+A.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&_(s)&&Object.keys(n).forEach(d=>{n[d].duration||(n[d].duration=s*n[d].timescale-n[d].start)})}return n}function St(a){const e={valid:null,remainder:null},t=he(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=a.slice(0,n.byteOffset-8),e.remainder=a.slice(n.byteOffset-8),e}function gt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function _t(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return he(n,["moof"]).map(d=>{const c=d.byteOffset-8;he(d,["traf"]).map(g=>{const A=he(g,["tfdt"]).map(k=>{const O=k[0];let te=Le(k,4);return O===1&&(te*=Math.pow(2,32),te+=Le(k,8)),te/r})[0];return A!==void 0&&(a=A),he(g,["tfhd"]).map(k=>{const O=Le(k,4),te=Le(k,0)&16777215,ee=(te&1)!==0,Se=(te&2)!==0,ke=(te&8)!==0;let $e=0;const et=(te&16)!==0;let ft=0;const Pt=(te&32)!==0;let mt=8;O===i&&(ee&&(mt+=8),Se&&(mt+=4),ke&&($e=Le(k,mt),mt+=4),et&&(ft=Le(k,mt),mt+=4),Pt&&(mt+=4),e.type==="video"&&(s=Xe(e.codec)),he(g,["trun"]).map(It=>{const Dt=It[0],vt=Le(It,0)&16777215,$t=(vt&1)!==0;let nn=0;const hn=(vt&4)!==0,Tn=(vt&256)!==0;let fn=0;const qt=(vt&512)!==0;let _n=0;const an=(vt&1024)!==0,wn=(vt&2048)!==0;let Kn=0;const en=Le(It,4);let tn=8;$t&&(nn=Le(It,tn),tn+=4),hn&&(tn+=4);let sr=nn+c;for(let Dr=0;Dr<en;Dr++){if(Tn?(fn=Le(It,tn),tn+=4):fn=$e,qt?(_n=Le(It,tn),tn+=4):_n=ft,an&&(tn+=4),wn&&(Dt===0?Kn=Le(It,tn):Kn=Pe(It,tn),tn+=4),e.type===B.VIDEO){let ur=0;for(;ur<_n;){const mr=Le(n,sr);if(sr+=4,qe(s,n[sr])){const bi=n.subarray(sr,sr+mr);st(bi,s?2:1,a+Kn/r,t)}sr+=mr,ur+=mr+4}}a+=fn/r}}))})})}),t}function Xe(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function qe(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function st(a,e,t,n){const r=ot(a);let i=0;i+=e;let s=0,l=0,d=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;d=r[i++],s+=d}while(d===255);l=0;do{if(i>=r.length)break;d=r[i++],l+=d}while(d===255);const c=r.length-i;let p=i;if(l<c)i+=l;else if(l>c){le.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[p++]===181){const A=Et(r,p);if(p+=2,A===49){const k=Le(r,p);if(p+=4,k===1195456820){const O=r[p++];if(O===3){const te=r[p++],ee=31&te,Se=64&te,ke=Se?2+ee*3:0,$e=new Uint8Array(ke);if(Se){$e[0]=te;for(let et=1;et<ke;et++)$e[et]=r[p++]}n.push({type:O,payloadType:s,pts:t,bytes:$e})}}}}}else if(s===5&&l>16){const g=[];for(let O=0;O<16;O++){const te=r[p++].toString(16);g.push(te.length==1?"0"+te:te),(O===3||O===5||O===7||O===9)&&g.push("-")}const A=l-16,k=new Uint8Array(A);for(let O=0;O<A;O++)k[O]=r[p++];n.push({payloadType:s,pts:t,uuid:g.join(""),userData:rt(k),userDataBytes:k})}}}function ot(a){const e=a.byteLength,t=[];let n=1;for(;n<e-2;)a[n]===0&&a[n+1]===0&&a[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return a;const r=e-t.length,i=new Uint8Array(r);let s=0;for(n=0;n<r;s++,n++)s===t[0]&&(s++,t.shift()),i[n]=a[s];return i}function Ct(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,d=0,c=0;if(e===0){for(;Ke(a.subarray(c,c+1))!=="\0";)t+=Ke(a.subarray(c,c+1)),c+=1;for(t+=Ke(a.subarray(c,c+1)),c+=1;Ke(a.subarray(c,c+1))!=="\0";)n+=Ke(a.subarray(c,c+1)),c+=1;n+=Ke(a.subarray(c,c+1)),c+=1,r=Le(a,12),i=Le(a,16),l=Le(a,20),d=Le(a,24),c=28}else if(e===1){c+=4,r=Le(a,c),c+=4;const g=Le(a,c);c+=4;const A=Le(a,c);for(c+=4,s=bu(2,32)*g+A,fe(s)||(s=Number.MAX_SAFE_INTEGER,le.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Le(a,c),c+=4,d=Le(a,c),c+=4;Ke(a.subarray(c,c+1))!=="\0";)t+=Ke(a.subarray(c,c+1)),c+=1;for(t+=Ke(a.subarray(c,c+1)),c+=1;Ke(a.subarray(c,c+1))!=="\0";)n+=Ke(a.subarray(c,c+1)),c+=1;n+=Ke(a.subarray(c,c+1)),c+=1}const p=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:l,id:d,payload:p}}function x(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function D(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),x([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}function se(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let n=0;for(;n+32<t;){const r=new DataView(a,n),i=I(r);e.push(i),n+=i.size}}return e}function I(a){const e=a.getUint32(0),t=a.byteOffset,n=a.byteLength;if(n<e)return{offset:t,size:n};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,l=ae(new Uint8Array(s,t+12,16));let d=null,c=null,p=0;if(i===0)p=28;else{const A=a.getUint32(28);if(!A||n<32+A*16)return{offset:t,size:e};d=[];for(let k=0;k<A;k++)d.push(new Uint8Array(s,t+32+k*16,16));p=32+A*16}if(!p)return{offset:t,size:e};const g=a.getUint32(p);return e-32<g?{offset:t,size:e}:(c=new Uint8Array(s,t+p+4,g),{version:i,systemId:l,kids:d,data:c,offset:t,size:e})}const U=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),it={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 xe(a,e){const t=it[e];return!!t&&!!t[a.slice(0,4)]}function Re(a,e,t=!0){return!a.split(",").some(n=>!He(n,e,t))}function He(a,e,t=!0){var n;const r=De(t);return(n=r==null?void 0:r.isTypeSupported(G(a,e)))!=null?n:!1}function G(a,e){return`${e}/mp4;codecs=${a}`}function J(a){if(a){const e=a.substring(0,4);return it.video[e]}return 2}function ve(a){const e=U();return a.split(",").reduce((t,n)=>{const i=e&&Xe(n)?9:it.video[n];return i?(i*2+t)/(t?3:2):(it.audio[n]+t)/(t?2:1)},0)}const Ce={};function X(a,e=!0){if(Ce[a])return Ce[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let r=0;r<t.length;r++){var n;if(He(t[r],"audio",e))return Ce[a]=t[r],t[r];if(t[r]==="mp3"&&(n=De(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const ct=/flac|opus|mp4a\.40\.34/i;function ge(a,e=!0){return a.replace(ct,t=>X(t.toLowerCase(),e))}function wt(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)xe(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function Ft(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Kt(a,"audio")||Kt(a,"video")))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function Kt(a,e){return xe(a,e)&&He(a,e)}function on(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function rn(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function Zt(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 ln(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const er={supported:!0,powerEfficient:!0,smooth:!0},Sn={supported:!1,smooth:!1,powerEfficient:!1},pn={supported:!0,configurations:[],decodingInfoResults:[er]};function Ut(a,e){return{supported:!1,configurations:e,decodingInfoResults:[Sn],error:a}}function Rt(a,e,t,n,r,i){const s=a.videoCodec,l=a.audioCodec?a.audioGroups:null,d=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,p=c?parseInt(c):d?1/0:2;let g=null;if(l!=null&&l.length)try{l.length===1&&l[0]?g=e.groups[l[0]].channels:g=l.reduce((A,k)=>{if(k){const O=e.groups[k];if(!O)throw new Error(`Audio track group ${k} not found`);Object.keys(O.channels).forEach(te=>{A[te]=(A[te]||0)+O.channels[te]})}return A},{2:0})}catch(A){return!0}return s!==void 0&&(s.split(",").some(A=>Xe(A))||a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!g&&_(p)&&Object.keys(g).some(A=>parseInt(A)>p)}function Ot(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(pn);const i=[],s=Xt(a),l=s.length,d=un(a,e,l>0),c=d.length;for(let p=l||1*c||1;p--;){const g={type:"media-source"};if(l&&(g.video=s[p%l]),c){g.audio=d[p%c];const A=g.audio.bitrate;g.video&&A&&(g.video.bitrate-=A)}i.push(g)}if(r){const p=navigator.userAgent;if(r.split(",").some(g=>Xe(g))&&U())return Promise.resolve(Ut(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const g=yr(p);return n[g]||(n[g]=t.decodingInfo(p))})).then(p=>({supported:!p.some(g=>!g.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function Xt(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=ar(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,l=a.videoRange.toLowerCase();return t?t.map(d=>{const c={contentType:G(rn(d),"video"),width:r,height:i,bitrate:n,framerate:s};return l!=="sdr"&&(c.transferFunction=l),c}):[]}function un(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=ar(a);return r&&a.audioGroups?a.audioGroups.reduce((s,l)=>{var d;const c=l?(d=e.groups[l])==null?void 0:d.tracks:null;return c?c.reduce((p,g)=>{if(g.groupId===l){const A=parseFloat(g.channels||"");r.forEach(k=>{const O={contentType:G(k,"audio"),bitrate:t?In(k,i):i};A&&(O.channels=""+A),p.push(O)})}return p},s):s},[]):[]}function In(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 ar(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function yr(a){let e="";const{audio:t,video:n}=a;if(n){const r=ln(n.contentType);e+=`${r}_r${n.height}x${n.width}f${Math.ceil(n.framerate)}${n.transferFunction||"sd"}_${Math.ceil(n.bitrate/1e5)}`}if(t){const r=ln(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const br=["NONE","TYPE-0","TYPE-1",null];function _r(a){return br.indexOf(a)>-1}const On=["SDR","PQ","HLG"];function cr(a){return!!a&&On.indexOf(a)>-1}var nr={No:"",Yes:"YES",v2:"v2"};function Mr(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?nr.v2:nr.Yes:nr.No}class dr{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Mn{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Bn(this._audioGroups,e)}hasSubtitleGroup(e){return Bn(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function Bn(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Nn(){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 ir(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||On.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Nn(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const at=a=>{const e=new WeakSet;return(t,n)=>{if(a&&(n=a(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},yt=(a,e)=>JSON.stringify(a,at(e));function kt(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,l=n==null?void 0:n.audioCodec,d=r==null?void 0:r.videoCodec,c=s&&parseInt(s)===2;let p=!1,g=!1,A=1/0,k=1/0,O=1/0,te=1/0,ee=0,Se=[];const{preferHDR:ke,allowedVideoRanges:$e}=ir(e,r);for(let It=i.length;It--;){const Dt=a[i[It]];p||(p=Dt.channels[2]>0),A=Math.min(A,Dt.minHeight),k=Math.min(k,Dt.minFramerate),O=Math.min(O,Dt.minBitrate),$e.filter($t=>Dt.videoRanges[$t]>0).length>0&&(g=!0)}A=_(A)?A:0,k=_(k)?k:0;const et=Math.max(1080,A),ft=Math.max(30,k);O=_(O)?O:t,t=Math.max(O,t),g||(e=void 0);const Pt=i.length>1;return{codecSet:i.reduce((It,Dt)=>{const vt=a[Dt];if(Dt===It)return It;if(Se=g?$e.filter($t=>vt.videoRanges[$t]>0):[],Pt){if(vt.minBitrate>t)return At(Dt,`min bitrate of ${vt.minBitrate} > current estimate of ${t}`),It;if(!vt.hasDefaultAudio)return At(Dt,"no renditions with default or auto-select sound found"),It;if(l&&Dt.indexOf(l.substring(0,4))%5!==0)return At(Dt,`audio codec preference "${l}" not found`),It;if(s&&!c){if(!vt.channels[s])return At(Dt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(vt.channels)})`),It}else if((!l||c)&&p&&vt.channels[2]===0)return At(Dt,"no renditions with stereo sound found"),It;if(vt.minHeight>et)return At(Dt,`min resolution of ${vt.minHeight} > maximum of ${et}`),It;if(vt.minFramerate>ft)return At(Dt,`min framerate of ${vt.minFramerate} > maximum of ${ft}`),It;if(!Se.some($t=>vt.videoRanges[$t]>0))return At(Dt,`no variants with VIDEO-RANGE of ${yt(Se)} found`),It;if(d&&Dt.indexOf(d.substring(0,4))%5!==0)return At(Dt,`video codec preference "${d}" not found`),It;if(vt.maxScore<ee)return At(Dt,`max score of ${vt.maxScore} < selected max of ${ee}`),It}return It&&(ve(Dt)>=ve(It)||vt.fragmentError>a[It].fragmentError)?It:(te=vt.minIndex,ee=vt.maxScore,Dt)},void 0),videoRanges:Se,preferHDR:ke,minFramerate:k,minBitrate:O,minIndex:te}}function At(a,e){le.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function Lt(a){return a.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function Bt(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const l=i.audioGroups;let d=r[i.codecSet];d||(r[i.codecSet]=d={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),d.minBitrate=Math.min(d.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return d.minHeight=Math.min(d.minHeight,c),d.minFramerate=Math.min(d.minFramerate,i.frameRate),d.minIndex=Math.min(d.minIndex,s),d.maxScore=Math.max(d.maxScore,i.score),d.fragmentError+=i.fragmentError,d.videoRanges[i.videoRange]=(d.videoRanges[i.videoRange]||0)+1,l&&l.forEach(p=>{if(!p)return;const g=e.groups[p];g&&(d.hasDefaultAudio=d.hasDefaultAudio||e.hasDefaultAudio?g.hasDefault:g.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(g.channels).forEach(A=>{d.channels[A]=(d.channels[A]||0)+g.channels[A]}))}),r},{})}function jt(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}}function Vt(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(Rn(a,r,t))return n}return-1}function Rn(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:l}=a,d=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||Ln(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(d===void 0||e.forced===d)&&(!("characteristics"in a)||hr(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Ln(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function hr(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function dn(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function cn(a,e,t,n,r){const i=e[n],l=e.reduce((A,k,O)=>{const te=k.uri;return(A[te]||(A[te]=[])).push(O),A},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const d=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),g=Pn(e,n,A=>{if(A.videoRange!==d||A.frameRate!==c||A.codecSet.substring(0,4)!==p)return!1;const k=A.audioGroups,O=t.filter(te=>!k||k.indexOf(te.groupId)!==-1);return Vt(a,O,r)>-1});return g>-1?g:Pn(e,n,A=>{const k=A.audioGroups,O=t.filter(te=>!k||k.indexOf(te.groupId)!==-1);return Vt(a,O,r)>-1})}function Pn(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n<a.length;n++)if(t(a[n]))return n;return-1}function Gn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Hn extends q{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:l,media:d}=s;if(!r||!d)return;const c=performance.now(),p=i?i.stats:r.stats,g=i?i.duration:r.duration,A=c-p.loading.start,k=s.minAutoLevel,O=r.level,te=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||O<=k){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const ee=te>-1&&te!==O,Se=!!t||ee;if(!Se&&(d.paused||!d.playbackRate||!d.readyState))return;const ke=s.mainForwardBufferInfo;if(!Se&&ke===null)return;const $e=this.bwEstimator.getEstimateTTFB(),et=Math.abs(d.playbackRate);if(A<=Math.max($e,1e3*(g/(et*2))))return;const ft=ke?ke.len/et:0,Pt=p.loading.first?p.loading.first-p.loading.start:-1,mt=p.loaded&&Pt>-1,It=this.getBwEstimate(),Dt=s.levels,vt=Dt[O],$t=Math.max(p.loaded,Math.round(g*(r.bitrate||vt.averageBitrate)/8));let nn=mt?A-Pt:A;nn<1&&mt&&(nn=Math.min(A,p.loaded*8/It));const hn=mt?p.loaded*1e3/nn:0,Tn=$e/1e3,fn=hn?($t-p.loaded)/hn:$t*8/It+Tn;if(fn<=ft)return;const qt=hn?hn*8:It,_n=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,an=this.hls.config.abrBandWidthUpFactor;let wn=Number.POSITIVE_INFINITY,Kn;for(Kn=O-1;Kn>k;Kn--){const Dr=Dt[Kn].maxBitrate,ur=!Dt[Kn].details||_n;if(wn=this.getTimeToLoadFrag(Tn,qt,g*Dr,ur),wn<Math.min(ft,g+Tn))break}if(wn>=fn||wn>g*10)return;mt?this.bwEstimator.sample(A-Math.min($e,Pt),p.loaded):this.bwEstimator.sampleTTFB(A);const en=Dt[Kn].maxBitrate;this.getBwEstimate()*an>en&&this.resetEstimator(en);const tn=this.findBestLevel(en,k,Kn,0,ft,1,1);tn>-1&&(Kn=tn),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${O} is loading too slowly;
Fragment duration: ${r.duration.toFixed(3)}
Time to underbuffer: ${ft.toFixed(3)} s
Estimated load time for current fragment: ${fn.toFixed(3)} s
Estimated load time for down switch fragment: ${wn.toFixed(3)} s
TTFB estimate: ${Pt|0} ms
Current BW estimate: ${_(It)?It|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${Kn} @ ${en|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Kn,this.clearTimer();const sr=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===Kn&&Kn>0){const Dr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Kn>0?"and switching down":""}
Fragment duration: ${r.duration.toFixed(3)} s
Time to underbuffer: ${Dr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,Kn>k){let ur=this.findBestLevel(this.hls.levels[k].bitrate,k,Kn,0,Dr,1,1);ur===-1&&(ur=k),this.hls.nextLoadLevel=this.hls.nextAutoLevel=ur,this.resetEstimator(this.hls.levels[ur].bitrate)}}};ee||fn>wn*2?sr():this.timer=self.setInterval(sr,wn*1e3),s.trigger(m.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:p})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new Y(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(m.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=this.supportedCache=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.supportedCache={},this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case z.BUFFER_ADD_CODEC_ERROR:case z.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case z.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),l=i?i.stats:n.stats,d=s-l.loading.start,c=l.loading.first?l.loading.first-l.loading.start:-1;if(l.loaded&&c>-1){const g=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(d-Math.min(g,c),l.loaded)}else this.bwEstimator.sampleTTFB(d)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.first;_(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===ie.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=n?n.duration:t.duration,s=this.hls.levels[t.level],l=(s.loaded?s.loaded.bytes:0)+r.loaded,d=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:d},s.realBitrate=Math.round(8*l/d)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(m.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==ie.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,1,1);if(i>-1)return i;const s=this.hls.firstLevel,l=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 ${l}`),l}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,l=t?t.duration:e?e.duration:0,d=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(c){const ee=this.findBestLevel(d,s,r,c,0,p,g);if(ee>=0)return this.rebufferNotice=-1,ee}let A=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const ee=this.bitrateTestDelay;ee&&(A=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-ee,this.info(`bitrate test took ${Math.round(1e3*ee)}ms, set first fragment max fetchDuration to ${Math.round(1e3*A)} ms`),p=g=1)}const k=this.findBestLevel(d,s,r,c,A,p,g);if(this.rebufferNotice!==k&&(this.rebufferNotice=k,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${k}`)),k>-1)return k;const O=n.levels[s],te=n.loadLevelObj;return te&&(O==null?void 0:O.bitrate)<te.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,i,s,l){var d;const c=r+i,p=this.lastLoadedFragLevel,g=p===-1?this.hls.firstLevel:p,{fragCurrent:A,partCurrent:k}=this,{levels:O,allAudioTracks:te,loadLevel:ee,config:Se}=this.hls;if(O.length===1)return 0;const ke=O[g],$e=!!((d=this.hls.latestLevelDetails)!=null&&d.live),et=ee===-1||p===-1;let ft,Pt="SDR",mt=(ke==null?void 0:ke.frameRate)||0;const{audioPreference:It,videoPreference:Dt}=Se,vt=this.audioTracksByGroup||(this.audioTracksByGroup=Lt(te));let $t=-1;if(et){if(this.firstSelection!==-1)return this.firstSelection;const qt=this.codecTiers||(this.codecTiers=Bt(O,vt,t,n)),_n=kt(qt,Pt,e,It,Dt),{codecSet:an,videoRanges:wn,minFramerate:Kn,minBitrate:en,minIndex:tn,preferHDR:sr}=_n;$t=tn,ft=an,Pt=sr?wn[wn.length-1]:wn[0],mt=Kn,e=Math.max(e,en),this.log(`picked start tier ${yt(_n)}`)}else ft=ke==null?void 0:ke.codecSet,Pt=ke==null?void 0:ke.videoRange;const nn=k?k.duration:A?A.duration:0,hn=this.bwEstimator.getEstimateTTFB()/1e3,Tn=[];for(let qt=n;qt>=t;qt--){var fn;const _n=O[qt],an=qt>g;if(!_n)continue;if(Se.useMediaCapabilities&&!_n.supportedResult&&!_n.supportedPromise){const ur=navigator.mediaCapabilities;typeof(ur==null?void 0:ur.decodingInfo)=="function"&&Rt(_n,vt,Pt,mt,e,It)?(_n.supportedPromise=Ot(_n,vt,ur,this.supportedCache),_n.supportedPromise.then(mr=>{if(!this.hls)return;_n.supportedResult=mr;const bi=this.hls.levels,yi=bi.indexOf(_n);mr.error?this.warn(`MediaCapabilities decodingInfo error: "${mr.error}" for level ${yi} ${yt(mr)}`):mr.supported?mr.decodingInfoResults.some(Zi=>Zi.smooth===!1||Zi.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${yi} not smooth or powerEfficient: ${yt(mr)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${yi} ${yt(mr)}`),yi>-1&&bi.length>1&&(this.log(`Removing unsupported level ${yi}`),this.hls.removeLevel(yi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(mr=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${mr}`)})):_n.supportedResult=pn}if((ft&&_n.codecSet!==ft||Pt&&_n.videoRange!==Pt||an&&mt>_n.frameRate||!an&&mt>0&&mt<_n.frameRate||(fn=_n.supportedResult)!=null&&(fn=fn.decodingInfoResults)!=null&&fn.some(ur=>ur.smooth===!1))&&(!et||qt!==$t)){Tn.push(qt);continue}const wn=_n.details,Kn=(k?wn==null?void 0:wn.partTarget:wn==null?void 0:wn.averagetargetduration)||nn;let en;an?en=l*e:en=s*e;const tn=nn&&r>=nn*2&&i===0?_n.averageBitrate:_n.maxBitrate,sr=this.getTimeToLoadFrag(hn,en,tn*Kn,wn===void 0);if(en>=tn&&(qt===p||_n.loadError===0&&_n.fragmentError===0)&&(sr<=hn||!_(sr)||$e&&!this.bitrateTestDelay||sr<c)){const ur=this.forcedAutoLevel;return qt!==ee&&(ur===-1||ur!==ee)&&(Tn.length&&this.trace(`Skipped level(s) ${Tn.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${O[Tn[0]].codecs}" ${O[Tn[0]].videoRange}; not compatible with "${ft}" ${Pt}`),this.info(`switch candidate:${g}->${qt} adjustedbw(${Math.round(en)})-bitrate=${Math.round(en-tn)} ttfb:${hn.toFixed(1)} avgDuration:${Kn.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${sr.toFixed(1)} firstSelection:${et} codecSet:${_n.codecSet} videoRange:${_n.videoRange} hls.loadLevel:${ee}`)),et&&(this.firstSelection=qt),qt}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const bn={search:function(a,e){let t=0,n=a.length-1,r=null,i=null;for(;t<=n;){r=(t+n)/2|0,i=a[r];const s=e(i);if(s>0)t=r+1;else if(s<0)n=r-1;else return i}return null}};function kn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!_(e))return null;const n=a[0].programDateTime;if(e<(n||0))return null;const r=a[a.length-1].endProgramDateTime;if(e>=(r||0))return null;for(let i=0;i<a.length;++i){const s=a[i];if(or(e,t,s))return s}return null}function qn(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const l=a.endDTS-t;l>0&&l<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)&&zn(t,n,i)===0||Wn(i,a,Math.min(r,n))))return i;const s=bn.search(e,zn.bind(null,t,n));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 n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function zn(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=a?1:t.start-n>a&&t.start?-1:0}function or(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function Zn(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){let n=a.fragments;const{fragmentHint:r}=a;r&&(n=n.concat(r));let i;return bn.search(n,s=>s.cc<e?1:s.cc>e?-1:(i=s,s.end<=t?1:s.start>t?-1:0)),i||null}return null}function Qn(a){switch(a.details){case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_TIMEOUT:case z.LEVEL_LOAD_TIMEOUT:case z.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function xr(a){return a.details.startsWith("key")}function bt(a){return xr(a)&&!!a.frag&&!a.frag.decryptdata}function mn(a,e){const t=Qn(e);return a.default[`${t?"timeout":"error"}Retry`]}function Yn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function wr(a){return C(C({},a),{errorRetry:null,timeoutRetry:null})}function Br(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(Tr(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function Tr(a){return Er(a)||!!a&&(a<400||a>499)}function Er(a){return a===0&&navigator.onLine===!1}var xn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Vn={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class Ar extends q{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(m.ERROR,this.onError,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.ERROR,this.onError,this),e.off(m.ERROR,this.onErrorOut,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===ie.MAIN?e.level:this.getVariantIndex()}getVariantIndex(){var e;const t=this.hls,n=t.currentLevel;return(e=t.loadLevelObj)!=null&&e.details||n===-1?t.loadLevel:n}variantHasKey(e,t){if(e){var n;if((n=e.details)!=null&&n.hasKey(t))return!0;const r=e.audioGroups;if(r)return this.hls.allAudioTracks.filter(s=>r.indexOf(s.groupId)>=0).some(s=>{var l;return(l=s.details)==null?void 0:l.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case z.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=lr();return}case z.FRAG_GAP:case z.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=xn.SendAlternateToPenaltyBox;return}case z.LEVEL_EMPTY_ERROR:case z.LEVEL_PARSING_ERROR:{var s;const d=t.parent===ie.MAIN?t.level:r.loadLevel;t.details===z.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(s=s.levelDetails)!=null&&s.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,d):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,d))}return;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.SUBTITLE_LOAD_ERROR:case z.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const d=r.loadLevelObj;if(d&&(i.type===ce.AUDIO_TRACK&&d.hasAudioGroup(i.groupId)||i.type===ce.SUBTITLE_TRACK&&d.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=xn.SendAlternateToPenaltyBox,t.errorAction.flags=Vn.MoveAllAlternatesMatchingHost;return}}return;case z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:xn.SendAlternateToPenaltyBox,flags:Vn.MoveAllAlternatesMatchingHDCP};return;case z.KEY_SYSTEM_SESSION_UPDATE_FAILED:case z.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case z.KEY_SYSTEM_NO_SESSION:t.errorAction={action:xn.SendAlternateToPenaltyBox,flags:Vn.MoveAllAlternatesMatchingKey};return;case z.BUFFER_ADD_CODEC_ERROR:case z.REMUX_ALLOC_ERROR:case z.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:r.loadLevel)}return;case z.INTERNAL_EXCEPTION:case z.BUFFER_APPENDING_ERROR:case z.BUFFER_FULL_ERROR:case z.LEVEL_SWITCH_ERROR:case z.BUFFER_STALLED_ERROR:case z.BUFFER_SEEK_OVER_HOLE:case z.BUFFER_NUDGE_ON_STALL:t.errorAction=lr();return}t.type===pe.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=lr())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=mn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(Br(r,i,Qn(e),e.response))return{action:xn.RetryRequest,flags:Vn.None,retryConfig:r,retryCount:i};const l=this.getLevelSwitchAction(e,t);return r&&(l.retryConfig=r,l.retryCount=i),l}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,l=mn(xr(e)?s:i,e),d=t.levels.reduce((p,g)=>p+g.fragmentError,0);if(r&&(e.details!==z.FRAG_GAP&&r.fragmentError++,!bt(e)&&Br(l,d,Qn(e),e.response)))return{action:xn.RetryRequest,flags:Vn.None,retryConfig:l,retryCount:d};const c=this.getLevelSwitchAction(e,n);return l&&(c.retryConfig=l,c.retryCount=d),c}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const c=e.details;r.loadError++,c===z.BUFFER_APPEND_ERROR&&r.fragmentError++;let p=-1;const{levels:g,loadLevel:A,minAutoLevel:k,maxAutoLevel:O}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const te=(i=e.frag)==null?void 0:i.type,Se=(te===ie.AUDIO&&c===z.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===z.BUFFER_ADD_CODEC_ERROR||c===z.BUFFER_APPEND_ERROR))&&g.some(({audioCodec:Pt})=>r.audioCodec!==Pt),$e=e.sourceBufferName==="video"&&(c===z.BUFFER_ADD_CODEC_ERROR||c===z.BUFFER_APPEND_ERROR)&&g.some(({codecSet:Pt,audioCodec:mt})=>r.codecSet!==Pt&&r.audioCodec===mt),{type:et,groupId:ft}=(s=e.context)!=null?s:{};for(let Pt=g.length;Pt--;){const mt=(Pt+A)%g.length;if(mt!==A&&mt>=k&&mt<=O&&g[mt].loadError===0){var l,d;const It=g[mt];if(c===z.FRAG_GAP&&te===ie.MAIN&&e.frag){const Dt=g[mt].details;if(Dt){const vt=qn(e.frag,Dt.fragments,e.frag.start);if(vt!=null&&vt.gap)continue}}else{if(et===ce.AUDIO_TRACK&&It.hasAudioGroup(ft)||et===ce.SUBTITLE_TRACK&&It.hasSubtitleGroup(ft))continue;if(te===ie.AUDIO&&(l=r.audioGroups)!=null&&l.some(Dt=>It.hasAudioGroup(Dt))||te===ie.SUBTITLE&&(d=r.subtitleGroups)!=null&&d.some(Dt=>It.hasSubtitleGroup(Dt))||Se&&r.audioCodec===It.audioCodec||$e&&r.codecSet===It.codecSet||!Se&&r.codecSet!==It.codecSet)continue}p=mt;break}}if(p>-1&&n.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:xn.SendAlternateToPenaltyBox,flags:Vn.None,nextAutoLevel:p}}return{action:xn.SendAlternateToPenaltyBox,flags:Vn.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case xn.DoNothing:break;case xn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==z.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 xn.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r}=n,i=n.nextAutoLevel;switch(r){case Vn.None:this.switchLevel(e,i);break;case Vn.MoveAllAlternatesMatchingHDCP:{const d=this.getVariantLevelIndex(e.frag),c=t.levels[d],p=c==null?void 0:c.attrs["HDCP-LEVEL"];if(n.hdcpLevel=p,p==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(p){t.maxHdcpLevel=br[br.indexOf(p)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case Vn.MoveAllAlternatesMatchingKey:{const d=e.decryptdata;if(d){const c=this.hls.levels,p=c.length;for(let A=p;A--;)if(this.variantHasKey(c[A],d)){var s,l;this.log(`Banned key found in level ${A} (${c[A].bitrate}bps) or audio group "${(s=c[A].audioGroups)==null?void 0:s.join(",")}" (${(l=e.frag)==null?void 0:l.type} fragment) ${ae(d.keyId||[])}`),c[A].fragmentError++,c[A].loadError++,this.log(`Removing level ${A} with key error (${e.error})`),this.hls.removeLevel(A)}const g=e.frag;if(this.hls.levels.length<p)n.resolved=!0;else if(g&&g.type!==ie.MAIN){const A=g.decryptdata;A&&!d.matches(A)&&(n.resolved=!0)}}break}}n.resolved||this.switchLevel(e,i)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===z.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=ln(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&(this.log(`Removing level ${i} for ${e.details} ("${n}" not supported)`),this.hls.removeLevel(i))}}}function lr(a){const e={action:xn.DoNothing,flags:Vn.None};return a&&(e.resolved=!0),e}var Qt={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class gn{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this))}destroy(){this._unregisterListeners(),this.hls=this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const i=n[r];if(!i)break;if(i.start<=e&&e<=i.end&&i.loaded)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const l=r[i[s]];if((l==null?void 0:l.body.type)===t&&(!n||l.buffered)){const d=l.body;if(d.start<=e&&e<=d.end)return d}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(l=>{const d=this.fragments[l];if(!d||s>=d.body.sn)return;if(!d.buffered&&(!d.loaded||i)){d.body.type===n&&this.removeFragment(d.body);return}const c=d.range[e];if(c){if(c.time.length===0){this.removeFragment(d.body);return}c.time.some(p=>{const g=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return g&&this.removeFragment(d.body),g})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=yn(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(l=>{const d=n.elementaryStreams[l];if(!d)return;const c=t[l],p=s||d.partial===!0;i.range[l]=this.getBufferedTimes(n,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,n),Fn(i)||this.removeParts(n.sn-1,n.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 n=this.activePartLists[t];n&&(this.activePartLists[t]=Yt(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=yn(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,this.bufferedEnd(r,e))}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,l=e.end,d=e.minEndPTS||l,c=e.maxStartPTS||s;for(let p=0;p<r.length;p++){const g=r.start(p)-this.bufferPadding,A=r.end(p)+this.bufferPadding;if(c>=g&&d<=A){i.time.push({startPTS:Math.max(s,r.start(p)),endPTS:Math.min(l,r.end(p))});break}else if(s<A&&l>g){const k=Math.max(s,r.start(p)),O=Math.min(l,r.end(p));O>k&&(i.partial=!0,i.time.push({startPTS:k,endPTS:O}))}else if(l<=g)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:l,fragments:d}=this;return Object.keys(d).forEach(c=>{const p=d[c];p&&Fn(p)&&(r=p.body.start-l,i=p.body.end+l,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=p.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Fn(t))}getState(e){const t=yn(e),n=this.fragments[t];return n?n.buffered?Fn(n)?Qt.PARTIAL:Qt.OK:Qt.APPENDING:Qt.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=yn(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if(n.sn==="initSegment")return;const l=n.type;if(r){let c=this.activePartLists[l];c||(this.activePartLists[l]=c=[]),c.push(r)}this.timeRanges=i;const d=i[s];this.detectEvictedFragments(s,d,l,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=yn(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const l=this.fragments[s];if(!l)return;const d=l.body;d.type!==n||r&&!d.gap||d.start<t&&d.end>e&&(l.buffered||i)&&this.removeFragment(d)})}removeFragment(e){const t=yn(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=Yt(n,i=>i.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const t=(e=this.hls)==null||(e=e.latestLevelDetails)==null?void 0:e.partList;t&&t.forEach(n=>n.clearElementaryStreamInfo())}}function Fn(a){var e,t,n;return a.buffered&&!!(a.body.gap||(e=a.range.video)!=null&&e.partial||(t=a.range.audio)!=null&&t.partial||(n=a.range.audiovideo)!=null&&n.partial)}function yn(a){return`${a.type}_${a.level}_${a.sn}`}function Yt(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var tr={cbc:0,ctr:1};class rr{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case tr.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case tr.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 Hr(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class ei{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],l=n[3],d=this.invSubMix,c=d[0],p=d[1],g=d[2],A=d[3],k=new Uint32Array(256);let O=0,te=0,ee=0;for(ee=0;ee<256;ee++)ee<128?k[ee]=ee<<1:k[ee]=ee<<1^283;for(ee=0;ee<256;ee++){let Se=te^te<<1^te<<2^te<<3^te<<4;Se=Se>>>8^Se&255^99,e[O]=Se,t[Se]=O;const ke=k[O],$e=k[ke],et=k[$e];let ft=k[Se]*257^Se*16843008;r[O]=ft<<24|ft>>>8,i[O]=ft<<16|ft>>>16,s[O]=ft<<8|ft>>>24,l[O]=ft,ft=et*16843009^$e*65537^ke*257^O*16843008,c[Se]=ft<<24|ft>>>8,p[Se]=ft<<16|ft>>>16,g[Se]=ft<<8|ft>>>24,A[Se]=ft,O?(O=ke^k[k[k[et^ke]]],te^=k[k[te]]):O=te=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let l,d;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),g=this.sBox,A=this.rcon,k=this.invSubMix,O=k[0],te=k[1],ee=k[2],Se=k[3];let ke,$e;for(l=0;l<s;l++){if(l<i){ke=c[l]=t[l];continue}$e=ke,l%i===0?($e=$e<<8|$e>>>24,$e=g[$e>>>24]<<24|g[$e>>>16&255]<<16|g[$e>>>8&255]<<8|g[$e&255],$e^=A[l/i|0]<<24):i>6&&l%i===4&&($e=g[$e>>>24]<<24|g[$e>>>16&255]<<16|g[$e>>>8&255]<<8|g[$e&255]),c[l]=ke=(c[l-i]^$e)>>>0}for(d=0;d<s;d++)l=s-d,d&3?$e=c[l]:$e=c[l-4],d<4||l<=4?p[d]=$e:p[d]=O[g[$e>>>24]]^te[g[$e>>>16&255]]^ee[g[$e>>>8&255]]^Se[g[$e&255]],p[d]=p[d]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,d=l[0],c=l[1],p=l[2],g=l[3],A=this.uint8ArrayToUint32Array_(n);let k=A[0],O=A[1],te=A[2],ee=A[3];const Se=new Int32Array(e),ke=new Int32Array(Se.length);let $e,et,ft,Pt,mt,It,Dt,vt,$t,nn,hn,Tn,fn,qt;const _n=this.networkToHostOrderSwap;for(;t<Se.length;){for($t=_n(Se[t]),nn=_n(Se[t+1]),hn=_n(Se[t+2]),Tn=_n(Se[t+3]),mt=$t^i[0],It=Tn^i[1],Dt=hn^i[2],vt=nn^i[3],fn=4,qt=1;qt<r;qt++)$e=d[mt>>>24]^c[It>>16&255]^p[Dt>>8&255]^g[vt&255]^i[fn],et=d[It>>>24]^c[Dt>>16&255]^p[vt>>8&255]^g[mt&255]^i[fn+1],ft=d[Dt>>>24]^c[vt>>16&255]^p[mt>>8&255]^g[It&255]^i[fn+2],Pt=d[vt>>>24]^c[mt>>16&255]^p[It>>8&255]^g[Dt&255]^i[fn+3],mt=$e,It=et,Dt=ft,vt=Pt,fn=fn+4;$e=s[mt>>>24]<<24^s[It>>16&255]<<16^s[Dt>>8&255]<<8^s[vt&255]^i[fn],et=s[It>>>24]<<24^s[Dt>>16&255]<<16^s[vt>>8&255]<<8^s[mt&255]^i[fn+1],ft=s[Dt>>>24]<<24^s[vt>>16&255]<<16^s[mt>>8&255]<<8^s[It&255]^i[fn+2],Pt=s[vt>>>24]<<24^s[mt>>16&255]<<16^s[It>>8&255]<<8^s[Dt&255]^i[fn+3],ke[t]=_n($e^k),ke[t+1]=_n(Pt^O),ke[t+2]=_n(ft^te),ke[t+3]=_n(et^ee),k=$t,O=nn,te=hn,ee=Tn,t=t+4}return ke.buffer}}class ti{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=Nr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function Nr(a){switch(a){case tr.cbc:return"AES-CBC";case tr.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Wr=16;class fr{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Hr(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((i,s)=>{const l=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(l,t,n,r);const d=this.flush();d?i(d.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:l}=this;if(r!==tr.cbc||t.byteLength!==16)return le.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=gt(l,e),this.remainderData=null);const d=this.getValidChunk(e);if(!d.length)return null;i&&(n=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new ei),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(d.buffer,0,n),this.currentIV=d.slice(-16).buffer,p||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new ti(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new rr(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(le.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%Wr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(le.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const di=Math.pow(2,17);class jr{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new jn({type:pe.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,d)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(O=>O[0]==="GAP")){d(ni(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),p=Xr(e);e.loader=c;const g=wr(r.fragLoadPolicy.default),A={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:di};e.stats=c.stats;const k={onSuccess:(O,te,ee,Se)=>{this.resetLoader(e,c);let ke=O.data;ee.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(ke.slice(0,16)),ke=ke.slice(16)),l({frag:e,part:null,payload:ke,networkDetails:Se})},onError:(O,te,ee,Se)=>{this.resetLoader(e,c),d(new jn({type:pe.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:C({url:n,data:void 0},O),error:new Error(`HTTP Error ${O.code} ${O.text}`),networkDetails:ee,stats:Se}))},onAbort:(O,te,ee)=>{this.resetLoader(e,c),d(new jn({type:pe.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:ee,stats:O}))},onTimeout:(O,te,ee)=>{this.resetLoader(e,c),d(new jn({type:pe.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${A.timeout}ms`),networkDetails:ee,stats:O}))}};t&&(k.onProgress=(O,te,ee,Se)=>t({frag:e,part:null,payload:ee,networkDetails:Se})),c.load(p,A,k)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,d)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){d(ni(e,t));return}const c=this.loader=i?new i(r):new s(r),p=Xr(e,t);e.loader=c;const g=wr(r.fragLoadPolicy.default),A={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:di};t.stats=c.stats,c.load(p,A,{onSuccess:(k,O,te,ee)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const Se={frag:e,part:t,payload:k.data,networkDetails:ee};n(Se),l(Se)},onError:(k,O,te,ee)=>{this.resetLoader(e,c),d(new jn({type:pe.NETWORK_ERROR,details:z.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:C({url:p.url,data:void 0},k),error:new Error(`HTTP Error ${k.code} ${k.text}`),networkDetails:te,stats:ee}))},onAbort:(k,O,te)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),d(new jn({type:pe.NETWORK_ERROR,details:z.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:te,stats:k}))},onTimeout:(k,O,te)=>{this.resetLoader(e,c),d(new jn({type:pe.NETWORK_ERROR,details:z.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${A.timeout}ms`),networkDetails:te,stats:k}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const d=Math.round(e.duration/t.duration),c=Math.min(Math.round(n.loaded/i),d),g=(d-c)*Math.round(n.loaded/c);n.total=n.loaded+g}else n.total=Math.max(n.loaded,n.total);const s=n.loading,l=r.loading;s.start?s.first+=l.first-l.start:(s.start=l.start,s.first=l.first),s.end=l.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Xr(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(_(r)&&_(i)){var s;let l=r,d=i;if(a.sn==="initSegment"&&ri((s=a.decryptdata)==null?void 0:s.method)){const c=i-r;c%16&&(d=i+(16-c%16)),r!==0&&(n.resetIV=!0,l=r-16)}n.rangeStart=l,n.rangeEnd=d}return n}function ni(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:pe.MEDIA_ERROR,details:z.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new jn(n)}function ri(a){return a==="AES-128"||a==="AES-256"}class jn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class hi extends q{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 fi{constructor(e,t,n,r=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=si(),this.buffering={audio:si(),video:si(),audiovideo:si()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function si(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Ur={length:0,start:()=>0,end:()=>0};class An{static isBuffered(e,t){if(e){const n=An.getBuffered(e);for(let r=n.length;r--;)if(t>=n.start(r)&&t<=n.end(r))return!0}return!1}static bufferedRanges(e){if(e){const t=An.getBuffered(e);return An.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=An.bufferedRanges(e);if(r.length)return An.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((p,g)=>p.start-g.start||g.end-p.end);let r=-1,i=[];if(n)for(let p=0;p<e.length;p++){t>=e[p].start&&t<=e[p].end&&(r=p);const g=i.length;if(g){const A=i[g-1].end;e[p].start-A<n?e[p].end>A&&(i[g-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,l,d=t,c=t;for(let p=0;p<i.length;p++){const g=i[p].start,A=i[p].end;if(r===-1&&t>=g&&t<=A&&(r=p),t+n>=g&&t<A)d=g,c=A,s=c-t;else if(t+n<g){l=g;break}}return{len:s,start:d||0,end:c||0,nextStart:l,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Ur}catch(t){return le.log("failed to get media.buffered",t),Ur}}}const Ii=/\{\$([a-zA-Z0-9-_]+)\}/g;function Ht(a){return Ii.test(a)}function zr(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Ii,n=>{const r=n.substring(2,n.length-1),i=t==null?void 0:t[r];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):i})}return e}function Ri(a,e,t){let n=a.variableList;n||(a.variableList=n={});let r,i;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(r))i=s.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=e.NAME,i=e.VALUE;r in n?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=i||""}function Ei(a,e,t){const n=e.IMPORT;if(t&&n in t){let r=a.variableList;r||(a.variableList=r={}),r[n]=t[n]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const Gr=/^(\d+)x(\d+)$/,Qr=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Cn{constructor(e,t){typeof e=="string"&&(e=Cn.parseAttrList(e,t)),w(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,i)=>(r[i.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=Gr.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},i='"';for(Qr.lastIndex=0;(n=Qr.exec(e))!==null;){const s=n[1].trim();let l=n[2];const d=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let c=!1;if(d)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(d||c))l=zr(t,l);else if(!c&&!d)switch(s){case"CLOSED-CAPTIONS":if(l==="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":le.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const Kr="com.apple.hls.interstitial";function ai(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Li(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class $r{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){le.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=w(new Cn({}),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"]);_(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?(le.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(_(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===Kr}get isValid(){return!!this.id&&!this._badValueForSameId&&_(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 Lr=10;class qr{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}hasKey(e){return this.encryptedFragments.some(t=>{let n=t.decryptdata;return n||(t.setKeyFormat(e.keyFormat),n=t.decryptdata),!!n&&e.matches(n)})}get hasProgramDateTime(){return this.fragments.length?_(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Lr}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){return this.fragments.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){return this.fragments.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function Jr(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function Si(a,e){return!a&&!e?!0:!a||!e?!1:Jr(a,e)}function pi(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Gi(a){switch(a){case"AES-128":case"AES-256":return tr.cbc;case"AES-256-CTR":return tr.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function Xi(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Mi(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function mi(a){const e=Mi(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function sn(a){const e=function(n,r,i){const s=n[r];n[r]=n[i],n[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function Dn(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const i=r[0]==="base64",s=r[1];i?(n.splice(-1,1),t=Xi(s)):t=mi(s)}}return t}const pr=typeof self!="undefined"?self:void 0;var $n={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Xn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function wi(a){switch(a){case Xn.FAIRPLAY:return $n.FAIRPLAY;case Xn.PLAYREADY:return $n.PLAYREADY;case Xn.WIDEVINE:return $n.WIDEVINE;case Xn.CLEARKEY:return $n.CLEARKEY}}function Vr(a){switch(a){case $n.FAIRPLAY:return Xn.FAIRPLAY;case $n.PLAYREADY:return Xn.PLAYREADY;case $n.WIDEVINE:return Xn.WIDEVINE;case $n.CLEARKEY:return Xn.CLEARKEY}}function ki(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[$n.FAIRPLAY,$n.WIDEVINE,$n.PLAYREADY,$n.CLEARKEY].filter(r=>!!e[r]):[];return!n[$n.WIDEVINE]&&t&&n.push($n.WIDEVINE),n}const Ki=function(a){return pr!=null&&(a=pr.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function na(a,e,t,n){let r;switch(a){case $n.FAIRPLAY:r=["cenc","sinf"];break;case $n.WIDEVINE:case $n.PLAYREADY:r=["cenc"];break;case $n.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Ea(r,e,t,n)}function Ea(a,e,t,n){return[{initDataTypes:a,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function ra(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Bi(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const l=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(l){const d=Xi(l).subarray(0,16);return sn(d),d}}return null}let Ti={};class _i{static clearKeyUriToKeyIdMap(){Ti={}}static setKeyIdForUri(e,t){Ti[e]=t}static addKeyIdForUri(e){const t=Object.keys(Ti).length%Number.MAX_SAFE_INTEGER,n=new Uint8Array(16);return new DataView(n.buffer,12,4).setUint32(0,t),Ti[e]=n,n}constructor(e,t,n,r=[1],i=null,s){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!pi(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array($(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&Jr(e.keyFormatVersions,this.keyFormatVersions)&&Si(e.iv,this.iv)&&Si(e.keyId,this.keyId)}isSupported(){if(this.method){if(pi(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case Xn.FAIRPLAY:case Xn.WIDEVINE:case Xn.PLAYREADY:case Xn.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(pi(this.method)){let i=this.iv;return i||(typeof e!="number"&&(le.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=Ni(e)),new _i(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=Ti[this.uri];if(i&&!Jr(this.keyId,i)&&_i.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const n=Dn(this.uri);if(n)switch(this.keyFormat){case Xn.WIDEVINE:if(this.pssh=n,!this.keyId){const i=se(n.buffer);if(i.length){var r;const s=i[0];this.keyId=(r=s.kids)!=null&&r.length?s.kids[0]:null}}this.keyId||(this.keyId=is(t));break;case Xn.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=D(i,null,n),this.keyId=Bi(n);break}default:{let i=n.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=Ns(t),i||(i=is(t),i||(i=Ti[this.uri])),i&&(this.keyId=i,_i.setKeyIdForUri(this.uri,i))}return this}}function Ns(a){const e=a==null?void 0:a[Xn.WIDEVINE];return e?e.keyId:null}function is(a){const e=a==null?void 0:a[Xn.PLAYREADY];if(e){const t=Dn(e.uri);if(t)return Bi(t)}return null}function Ni(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Fs=/#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,_s=/#EXT-X-MEDIA:(.*)/g,Sa=/^#EXT(?:INF|-X-TARGETDURATION):/m,hs=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),bs=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 Ai{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return y.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Sa.test(e)}static parseMasterPlaylist(e,t){const n=Ht(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(Fs.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=Fs.exec(e))!=null;)if(s[1]){var l;const c=new Cn(s[1],r),p=zr(r,s[2]),g={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Ai.resolve(p,t)},A=c.decimalResolution("RESOLUTION");A&&(g.width=A.width,g.height=A.height),xs(c.CODECS,g);const k=c["SUPPLEMENTAL-CODECS"];k&&(g.supplemental={},xs(k,g.supplemental)),(l=g.unknownCodecs)!=null&&l.length||i.push(g),r.levels.push(g)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const g=new Cn(p,r),A=g["DATA-ID"];A&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[A]=g);break}case"SESSION-KEY":{const g=$s(p,t,r);g.encrypted&&g.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(g)):le.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const g=new Cn(p,r);Ri(r,g,t)}break}case"CONTENT-STEERING":{const g=new Cn(p,r);r.contentSteering={uri:Ai.resolve(g["SERVER-URI"],t),pathwayId:g["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=sa(p);break}}}const d=i.length>0&&i.length<r.levels.length;return r.levels=d?i:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.levels,l={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 d=0;for(_s.lastIndex=0;(r=_s.exec(e))!==null;){const c=new Cn(r[1],n),p=c.TYPE;if(p){const g=l[p],A=i[p]||[];i[p]=A;const k=c.LANGUAGE,O=c["ASSOC-LANGUAGE"],te=c.CHANNELS,ee=c.CHARACTERISTICS,Se=c["INSTREAM-ID"],ke={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||k||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:k,url:c.URI?Ai.resolve(c.URI,t):""};if(O&&(ke.assocLang=O),te&&(ke.channels=te),ee&&(ke.characteristics=ee),Se&&(ke.instreamId=Se),g!=null&&g.length){const $e=Ai.findGroup(g,ke.groupId)||g[0];qi(ke,$e,"audioCodec"),qi(ke,$e,"textCodec")}A.push(ke)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const d={url:t},c=new qr(t),p=c.fragments,g=[];let A=null,k=0,O=0,te=0,ee=0,Se=0,ke=null,$e=new We(r,d),et,ft,Pt,mt=-1,It=!1,Dt=null,vt;if(hs.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Ht(e),((l=hs.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(et=hs.exec(e))!==null;){It&&(It=!1,$e=new We(r,d),$e.playlistOffset=te,$e.setStart(te),$e.sn=k,$e.cc=ee,Se&&($e.bitrate=Se),$e.level=n,A&&($e.initSegment=A,A.rawProgramDateTime&&($e.rawProgramDateTime=A.rawProgramDateTime,A.rawProgramDateTime=null),Dt&&($e.setByteRange(Dt),Dt=null)));const Tn=et[1];if(Tn){$e.duration=parseFloat(Tn);const fn=(" "+et[2]).slice(1);$e.title=fn||null,$e.tagList.push(fn?["INF",Tn,fn]:["INF",Tn])}else if(et[3]){if(_($e.duration)){$e.playlistOffset=te,$e.setStart(te),Pt&&aa($e,Pt,c),$e.sn=k,$e.level=n,$e.cc=ee,p.push($e);const fn=(" "+et[3]).slice(1);$e.relurl=zr(c,fn),Oi($e,ke,g),ke=$e,te+=$e.duration,k++,O=0,It=!0}}else{if(et=et[0].match(bs),!et){le.warn("No matches on slow regex match for level playlist!");continue}for(ft=1;ft<et.length&&et[ft]===void 0;ft++);const fn=(" "+et[ft]).slice(1),qt=(" "+et[ft+1]).slice(1),_n=et[ft+2]?(" "+et[ft+2]).slice(1):null;switch(fn){case"BYTERANGE":ke?$e.setByteRange(qt,ke):$e.setByteRange(qt);break;case"PROGRAM-DATE-TIME":$e.rawProgramDateTime=qt,$e.tagList.push(["PROGRAM-DATE-TIME",qt]),mt===-1&&(mt=p.length);break;case"PLAYLIST-TYPE":c.type&&gi(c,fn,et),c.type=qt.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?gi(c,fn,et):p.length>0&&ss(c,fn,et),k=c.startSN=parseInt(qt);break;case"SKIP":{c.skippedSegments&&gi(c,fn,et);const an=new Cn(qt,c),wn=an.decimalInteger("SKIPPED-SEGMENTS");if(_(wn)){c.skippedSegments+=wn;for(let en=wn;en--;)p.push(null);k+=wn}const Kn=an.enumeratedString("RECENTLY-REMOVED-DATERANGES");Kn&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(Kn.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&gi(c,fn,et),c.targetduration=Math.max(parseInt(qt),1);break;case"VERSION":c.version!==null&&gi(c,fn,et),c.version=parseInt(qt);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||gi(c,fn,et),c.live=!1;break;case"#":(qt||_n)&&$e.tagList.push(_n?[qt,_n]:[qt]);break;case"DISCONTINUITY":ee++,$e.tagList.push(["DIS"]);break;case"GAP":$e.gap=!0,$e.tagList.push([fn]);break;case"BITRATE":$e.tagList.push([fn,qt]),Se=parseInt(qt)*1e3,_(Se)?$e.bitrate=Se:Se=0;break;case"DATERANGE":{const an=new Cn(qt,c),wn=new $r(an,c.dateRanges[an.ID],c.dateRangeTagCount);c.dateRangeTagCount++,wn.isValid||c.skippedSegments?c.dateRanges[wn.id]=wn:le.warn(`Ignoring invalid DATERANGE tag: "${qt}"`),$e.tagList.push(["EXT-X-DATERANGE",qt]);break}case"DEFINE":{{const an=new Cn(qt,c);"IMPORT"in an?Ei(c,an,s):Ri(c,an,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?gi(c,fn,et):p.length>0&&ss(c,fn,et),c.startCC=ee=parseInt(qt);break;case"KEY":{const an=$s(qt,t,c);if(an.isSupported()){if(an.method==="NONE"){Pt=void 0;break}Pt||(Pt={});const wn=Pt[an.keyFormat];wn!=null&&wn.matches(an)||(wn&&(Pt=w({},Pt)),Pt[an.keyFormat]=an)}else le.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${qt}"`);break}case"START":c.startTimeOffset=sa(qt);break;case"MAP":{const an=new Cn(qt,c);if($e.duration){const wn=new We(r,d);zs(wn,an,n,Pt),A=wn,$e.initSegment=A,A.rawProgramDateTime&&!$e.rawProgramDateTime&&($e.rawProgramDateTime=A.rawProgramDateTime)}else{const wn=$e.byteRangeEndOffset;if(wn){const Kn=$e.byteRangeStartOffset;Dt=`${wn-Kn}@${Kn}`}else Dt=null;zs($e,an,n,Pt),A=$e,It=!0}A.cc=ee;break}case"SERVER-CONTROL":{vt&&gi(c,fn,et),vt=new Cn(qt),c.canBlockReload=vt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=vt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&vt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=vt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=vt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&gi(c,fn,et);const an=new Cn(qt);c.partTarget=an.decimalFloatingPoint("PART-TARGET");break}case"PART":{let an=c.partList;an||(an=c.partList=[]);const wn=O>0?an[an.length-1]:void 0,Kn=O++,en=new Cn(qt,c),tn=new Te(en,$e,d,Kn,wn);an.push(tn),$e.duration+=tn.duration;break}case"PRELOAD-HINT":{const an=new Cn(qt,c);c.preloadHint=an;break}case"RENDITION-REPORT":{const an=new Cn(qt,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(an);break}default:le.warn(`line parsed but not handled: ${et}`);break}}}ke&&!ke.relurl?(p.pop(),te-=ke.duration,c.partList&&(c.fragmentHint=ke)):c.partList&&(Oi($e,ke,g),$e.cc=ee,c.fragmentHint=$e,Pt&&aa($e,Pt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const $t=p.length,nn=p[0],hn=p[$t-1];if(te+=c.skippedSegments*c.targetduration,te>0&&$t&&hn){c.averagetargetduration=te/$t;const Tn=hn.sn;c.endSN=Tn!=="initSegment"?Tn:0,c.live||(hn.endList=!0),mt>0&&(Us(p,mt),nn&&g.unshift(nn))}return c.fragmentHint&&(te+=c.fragmentHint.duration),c.totalduration=te,g.length&&c.dateRangeTagCount&&nn&&ia(g,c),c.endCC=ee,c}}function ia(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const l=e.fragments[e.fragments.length-1];a.push(l),t++}else return;const n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let l=i.length;l--;){const d=e.dateRanges[i[l]],c=d.startDate.getTime();d.tagAnchor=n.ref;for(let p=t;p--;){var s;if(((s=a[p])==null?void 0:s.sn)<e.startSN)break;const g=wa(e,c,a,p,r);if(g!==-1){d.tagAnchor=e.fragments[g].ref;break}}}}function wa(a,e,t,n,r){const i=t[n];if(i){const l=i.programDateTime;if(e>=l||n===0){var s;const d=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=l+d*1e3){const c=t[n].sn-a.startSN;if(c<0)return-1;const p=a.fragments;if(p.length>t.length){const A=(t[n+1]||p[p.length-1]).sn-a.startSN;for(let k=A;k>c;k--){const O=p[k].programDateTime;if(e>=O&&e<O+p[k].duration*1e3)return k}}return c}}}return-1}function $s(a,e,t){var n,r;const i=new Cn(a,t),s=(n=i.METHOD)!=null?n:"",l=i.URI,d=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(r=i.KEYFORMAT)!=null?r:"identity";l&&i.IV&&!d&&le.error(`Invalid IV: ${i.IV}`);const g=l?Ai.resolve(l,e):"",A=(c||"1").split("/").map(Number).filter(Number.isFinite);return new _i(s,g,p,A,d,i.KEYID)}function sa(a){const t=new Cn(a).decimalFloatingPoint("TIME-OFFSET");return _(t)?t:null}function xs(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>xe(i,n));r.length&&(e[`${n}Codec`]=r.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function qi(a,e,t){const n=e[t];n&&(a[t]=n)}function Us(a,e){let t=a[e];for(let n=e;n--;){const r=a[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Oi(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function zs(a,e,t,n){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",n&&(a.levelkeys=n),a.initSegment=null}function aa(a,e,t){a.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(a)}function gi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function ss(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function fs(a,e){const t=e.startPTS;if(_(t)){let n=0,r;e.sn>a.sn?(n=t-a.start,r=a):(n=a.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function Es(a,e,t,n,r,i,s){n-t<=0&&(s.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let d=t,c=n;const p=e.startPTS,g=e.endPTS;if(_(p)){const Se=Math.abs(p-t);a&&Se>a.totalduration?s.warn(`media timestamps and playlist times differ by ${Se}s for level ${e.level} ${a.url}`):_(e.deltaPTS)?e.deltaPTS=Math.max(Se,e.deltaPTS):e.deltaPTS=Se,d=Math.max(t,p),t=Math.min(t,p),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,c=Math.min(n,g),n=Math.max(n,g),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const A=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=d,e.startDTS=r,e.endPTS=n,e.minEndPTS=c,e.endDTS=i;const k=e.sn;if(!a||k<a.startSN||k>a.endSN)return 0;let O;const te=k-a.startSN,ee=a.fragments;for(ee[te]=e,O=te;O>0;O--)fs(ee[O],ee[O-1]);for(O=te;O<ee.length-1;O++)fs(ee[O],ee[O+1]);return a.fragmentHint&&fs(ee[ee.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,A}function oa(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let p=r.length-1;p>=0;p--){const g=r[p].initSegment;if(g){n=g;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;Qi(a,e,(p,g,A,k)=>{if((!e.startCC||e.skippedSegments)&&g.cc!==p.cc){const O=p.cc-g.cc;for(let te=A;te<k.length;te++)k[te].cc+=O;e.endCC=k[k.length-1].cc}_(p.startPTS)&&_(p.endPTS)&&(g.setStart(g.startPTS=p.startPTS),g.startDTS=p.startDTS,g.maxStartPTS=p.maxStartPTS,g.endPTS=p.endPTS,g.endDTS=p.endDTS,g.minEndPTS=p.minEndPTS,g.setDuration(p.endPTS-p.startPTS),g.duration&&(i=g),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(g.elementaryStreams=p.elementaryStreams),g.loader=p.loader,p.hasStats&&(g.stats=p.stats),p.initSegment&&(g.initSegment=p.initSegment,n=p.initSegment)});const s=e.fragments,l=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&l.forEach(p=>{var g;p&&(!p.initSegment||p.initSegment.relurl===((g=n)==null?void 0:g.relurl))&&(p.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(p=>!p),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let p=e.skippedSegments;p--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=Fi(a.dateRanges,e,t));const p=a.fragments.filter(g=>g.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let g=1;g<l.length;g++)l[g].programDateTime===null&&Oi(l[g],l[g-1],p);ia(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var d;const p=vr(a,e.startSN-1);e.startCC=(d=p==null?void 0:p.cc)!=null?d:s[0].cc}la(a.partList,e.partList,(p,g)=>{g.elementaryStreams=p.elementaryStreams,g.stats=p.stats}),i?Es(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):$i(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 Fi(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=w({},a);r&&r.forEach(d=>{delete i[d]});const l=Object.keys(i).length;return l?(Object.keys(n).forEach(d=>{const c=i[d],p=new $r(n[d].attr,c);p.isValid?(i[d]=p,c||(p.tagOrder+=l)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${yt(n[d].attr)}"`)}),i):n}function la(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],l=e[r+n];s&&l&&s.index===l.index&&s.fragment.sn===l.fragment.sn?t(s,l):n--}}}function Qi(a,e,t){const n=e.skippedSegments,r=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(n?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,d=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=r;c<=i;c++){const p=d[s+c];let g=l[c];if(n&&!g&&p&&(g=e.fragments[c]=p),p&&g){t(p,g,c,l);const A=p.relurl,k=g.relurl;if(A&&ps(A,k)){e.playlistParsingError=Ss(`media sequence mismatch ${g.sn}:`,a,e,p,g);return}else if(p.cc!==g.cc){e.playlistParsingError=Ss(`discontinuity sequence mismatch (${p.cc}!=${g.cc})`,a,e,p,g);return}}}}function Ss(a,e,t,n,r){return new Error(`${a} ${r.url}
Playlist starting @${e.startSN}
${e.m3u8}
Playlist starting @${t.startSN}
${t.m3u8}`)}function $i(a,e,t=!0){const n=e.startSN+e.skippedSegments-a.startSN,r=a.fragments,i=n>=0;let s=0;if(i&&n<r.length)s=r[n].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;js(e,s)}function js(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;n<t.length;n++)t[n].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function gr(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const n=a.fragments;if(n.length&&t*4>e){const i=n[n.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function vr(a,e,t){if(!a)return null;let n=a.fragments[e-a.startSN];return n||(n=a.fragmentHint,n&&n.sn===e)?n:e<a.startSN&&t&&t.sn===e?t:null}function Ir(a,e,t){return a?ii(a.partList,e,t):null}function ii(a,e,t){if(a)for(let n=a.length;n--;){const r=a[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function oi(a){a.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function ps(a,e){return a!==e&&e?ms(a)!==ms(e):!1}function ms(a){return a.replace(/\?[^?]*$/,"")}function Ji(a,e){for(let n=0,r=a.length;n<r;n++){var t;if(((t=a[n])==null?void 0:t.cc)===e)return a[n]}return null}function Gs(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function ws(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function es(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)ws(t[n],a);e.fragmentHint&&ws(e.fragmentHint,a),e.alignedSliding=!0}function Ts(a,e){a&&(As(e,a),e.alignedSliding||Cs(e,a),!e.alignedSliding&&!e.skippedSegments&&$i(a,e,!1))}function As(a,e){if(!Gs(e,a))return;const t=Math.min(e.endCC,a.endCC),n=Ji(e.fragments,t),r=Ji(a.fragments,t);if(!n||!r)return;le.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;es(i,a)}function Cs(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(r=Ji(n,s),i=Ji(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=Ji(t,r.cc)||t[Math.floor(t.length/2)]);const l=r.programDateTime,d=i.programDateTime;if(!l||!d)return;const c=(d-l)/1e3-(i.start-r.start);es(c,a)}function li(a,e,t){vi(a,e,t),a.addEventListener(e,t)}function vi(a,e,t){a.removeEventListener(e,t)}const Ga={toString:function(a){let e="";const t=a.length;for(let n=0;n<t;n++)e+=`[${a.start(n).toFixed(3)}-${a.end(n).toFixed(3)}]`;return e}},Nt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class Ks extends hi{constructor(e,t,n,r,i){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Nt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:l,media:d,mediaBuffer:c,state:p}=this,g=d?d.currentTime:0,A=An.bufferInfo(c||d,g,s.maxBufferHole),k=!A.len;if(this.log(`Media seeking to ${_(g)?g.toFixed(3):g}, state: ${p}, ${k?"out of":"in"} buffer`),this.state===Nt.ENDED)this.resetLoadingState();else if(l){const O=s.maxFragLookUpTolerance,te=l.start-O,ee=l.start+l.duration+O;if(k||ee<A.start||te>A.end){const Se=g>ee;(g<te||Se)&&(Se&&l.loader&&(this.log(`Cancelling fragment load for seek (sn: ${l.sn})`),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(d){this.fragmentTracker.removeFragmentsInRange(g,1/0,this.playlistType,!0);const O=this.lastCurrentTime;if(g>O&&(this.lastCurrentTime=g),!this.loadingParts){const te=Math.max(A.end,g),ee=this.shouldLoadParts(this.getLevelDetails(),te);ee&&(this.log(`LL-Part loading ON after seeking to ${g.toFixed(2)} with buffer @${te.toFixed(2)}`),this.loadingParts=ee)}}this.hls.hasEnoughToStart||(this.log(`Setting ${k?"startPosition":"nextLoadPosition"} to ${g} for seek without enough to start`),this.nextLoadPosition=g,k&&(this.startPosition=g)),k&&this.state===Nt.IDLE&&this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new jr(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new fr(e.config)}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Nt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Nt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.buffered;this.config.maxBufferHole&&i&&i.length>1&&(e=An.bufferedInfo(i,e.start,0));const s=e.nextStart;if(s&&s>r&&s<t.edge||this.media.currentTime<e.start)return!1;const d=t.partList;if(d!=null&&d.length){const p=d[d.length-1];return An.isBuffered(this.media,p.start+p.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;li(n,"seeking",this.onMediaSeeking),li(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Nt.STOPPED&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(r!==null){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),vi(r,"seeking",this.onMediaSeeking),vi(r,"ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Nt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,n,r).then(i=>{if(!i)return;const s=this.state,l=i.frag;if(this.fragContextChanged(l)){(s===Nt.FRAG_LOADING||!this.fragCurrent&&s===Nt.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=Nt.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(m.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Nt.STOPPED||this.state===Nt.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===Qt.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),d=this.backtrackFragment;((d?e.sn-d.sn:0)===1||this.reduceMaxBufferLength(l,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===Qt.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(m.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:i,payload:s}=n,l=i.decryptdata;if(s&&s.byteLength>0&&l!=null&&l.key&&l.iv&&pi(l.method)){const d=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,Gi(l.method)).catch(c=>{throw r.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return r.trigger(m.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:d,tdecrypt:p}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Nt.STOPPED||this.state===Nt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==Nt.STOPPED&&(this.state=Nt.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}unhandledEncryptionError(e,t){var n,r;const i=e.tracks;if(i&&!t.encrypted&&((n=i.audio)!=null&&n.encrypted||(r=i.video)!=null&&r.encrypted)&&(!this.config.emeEnabled||!this.keyLoader.emeController)){const s=this.media,l=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(l.message),!s||s.mediaKeys?!1:(this.hls.trigger(m.ERROR,{type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_KEYS,fatal:!1,error:l,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Ga.toString(An.getBuffered(n)):"(detached)"})`),Ne(e)){var r;if(e.type!==ie.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=Nt.IDLE;return}}const i=(r=this.levels)==null?void 0:r[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=Nt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(d=>!d),l=new fi(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(l)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var i;this.fragCurrent=e;const s=t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let l=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Nt.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(A=>{if(!this.fragContextChanged(A.frag))return this.hls.trigger(m.KEY_LOADED,A),this.state===Nt.KEY_LOADING&&(this.state=Nt.IDLE),A}),this.hls.trigger(m.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(l=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),l&&this.log("[eme] blocking frag load until media-keys acquired"));const d=this.fragPrevious;if(Ne(e)&&(!d||e.sn!==d.sn)){const A=this.shouldLoadParts(t.details,e.end);A!==this.loadingParts&&(this.log(`LL-Part loading ${A?"ON":"OFF"} loading sn ${d==null?void 0:d.sn}->${e.sn}`),this.loadingParts=A)}if(n=Math.max(e.start,n||0),this.loadingParts&&Ne(e)){const A=s.partList;if(A&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const k=this.getNextPart(A,e,n);if(k>-1){const O=A[k];e=this.fragCurrent=O.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${O.index} (${k}/${A.length-1}) of ${this.fragInfo(e,!1,O)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=O.start+O.duration,this.state=Nt.FRAG_LOADING;let te;return l?te=l.then(ee=>!ee||this.fragContextChanged(ee.frag)?null:this.doFragPartsLoad(e,O,t,r)).catch(ee=>this.handleFragLoadError(ee)):te=this.doFragPartsLoad(e,O,t,r).catch(ee=>this.handleFragLoadError(ee)),this.hls.trigger(m.FRAG_LOADING,{frag:e,part:O,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):te}else if(!e.url||this.loadedEndOfParts(A,n))return Promise.resolve(null)}}if(Ne(e)&&this.loadingParts){var c;this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)} Check buffer at sn: ${e.sn} loaded parts: ${(c=s.partList)==null?void 0:c.filter(A=>A.loaded).map(A=>`[${A.start}-${A.end}]`)}`),this.loadingParts=!1}else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${"["+s.startSN+"-"+s.endSN+"]"}, target: ${parseFloat(n.toFixed(3))}`),_(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Nt.FRAG_LOADING;const p=this.config.progressive&&e.type!==ie.SUBTITLE;let g;return p&&l?g=l.then(A=>!A||this.fragContextChanged(A.frag)?null:this.fragmentLoader.load(e,r)).catch(A=>this.handleFragLoadError(A)):g=Promise.all([this.fragmentLoader.load(e,p?r:void 0),l]).then(([A])=>(!p&&r&&r(A),A)).catch(A=>this.handleFragLoadError(A)),this.hls.trigger(m.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):g}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var l;const d=[],c=(l=n.details)==null?void 0:l.partList,p=g=>{this.fragmentLoader.loadPart(e,g,r).then(A=>{d[g.index]=A;const k=A.part;this.hls.trigger(m.FRAG_LOADED,A);const O=Ir(n.details,e.sn,g.index+1)||ii(c,e.sn,g.index+1);if(O)p(O);else return i({frag:e,part:k,partsLoaded:d})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===z.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===pe.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(m.ERROR,t)}else this.hls.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Nt.PARSING){!this.fragCurrent&&this.state!==Nt.STOPPED&&this.state!==Nt.ERROR&&(this.state=Nt.IDLE);return}const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const l=this.getLevelDetails(),c=l&&n.sn>l.endSN||this.shouldLoadParts(l,n.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e.partList){var n;const i=e.partList[0];if(i.fragment.type===ie.SUBTITLE)return!1;const s=i.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=s){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const l=t[r],d=l.details,c=s>-1?Ir(d,i,s):null,p=c?c.fragment:vr(d,i,n);return p?(n&&n!==p&&(p.stats=n.stats),{frag:p,part:c,level:l}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==Nt.PARSING)return;const{data1:s,data2:l}=e;let d=s;if(l&&(d=gt(s,l)),!d.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,g={type:e.type,frag:t,part:n,chunkMeta:r,offset:p,parent:t.type,data:d};if(this.hls.trigger(m.BUFFER_APPENDING,g),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!An.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=An.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),l=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-l>s&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!_(r))return null;const s=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=An.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const l=Math.max(Math.min(i.nextStart,s.end)-t,r);return An.bufferInfo(e,t,l)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return i>=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=ie.MAIN){const n=this.fragmentTracker?this.fragmentTracker.getAppendedFrag(e,t):null;return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,l=i.lowLatencyMode&&!!t.partList;let d=null;if(t.live){const g=i.initialLiveManifestSize;if(r<g)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${g})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var c;l&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),d=this.getInitialLiveFragment(t);const A=this.hls.startPosition,k=this.hls.liveSyncPosition,O=d?(A!==-1&&A>=s?A:k)||d.start:e;this.log(`Setting startPosition to ${O} to match start frag at live edge. mainStart: ${A} liveSyncPosition: ${k} frag.start: ${(c=d)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=O}}else e<=s&&(d=n[0]);if(!d){const g=this.loadingParts?t.partEnd:t.fragmentEnd;d=this.getFragmentAtPosition(e,g,t)}let p=this.filterReplacedPrimary(d,t);if(!p&&d){const g=d.sn-t.startSN;p=this.filterReplacedPrimary(n[g+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===Qt.OK||n===Qt.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(l!==null&&n.len+l.len>=i){const d=s.sn;return this.loopSn!==d&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${d}`),this.loopSn=d),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Ta(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(Ta(this.config)&&e.type!==ie.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const s=r.event;if(s){if(s.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const i=n==null?void 0:n.playerQueue;if(i)for(let s=i.length;s--;){const l=i[s].interstitial;if(l.appendInPlace&&e.start>=l.startTime&&e.end<=l.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let l=0,d=e.length;l<d;l++){const c=e[l];if(s=s&&!c.independent,r>-1&&n<c.start)break;const p=c.loaded;p?r=-1:(i||(c.independent||s)&&c.fragment===t)&&(c.fragment!==t&&this.warn(`Need buffer at ${n} but next unloaded part starts at ${c.start}`),r=l),i=p}return r}loadedEndOfParts(e,t){let n;for(let r=e.length;r--;){if(n=e[r],!n.loaded)return!1;if(t>n.start)return!0}return!1}getInitialLiveFragment(e){const t=e.fragments,n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=kn(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];n.cc===s.cc&&(r=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=Zn(e,n.cc,n.end),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(r=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:l}=n;const{fragmentHint:d}=n,{maxFragLookUpTolerance:c}=r,p=n.partList,g=!!(this.loadingParts&&p!=null&&p.length&&d);g&&!this.bitrateTest&&p[p.length-1].fragment.sn===d.sn&&(s=s.concat(d),l=d.sn);let A;if(e<t){var k;const te=e<this.lastCurrentTime||e>t-c||(k=this.media)!=null&&k.paused||!this.startFragRequested?0:c;A=qn(i,s,e,te)}else A=s[s.length-1];if(A){const O=A.sn-n.startSN,te=this.fragmentTracker.getState(A);if((te===Qt.OK||te===Qt.PARTIAL&&A.gap)&&(i=A),i&&A.sn===i.sn&&(!g||p[0].fragment.sn>A.sn||!n.live)&&A.level===i.level){const Se=s[O+1];A.sn<l&&this.fragmentTracker.getState(Se)!==Qt.OK?A=Se:A=null}}return A}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,l=e.alignedSliding&&_(i);if(s||!l&&!i){Ts(n,e);const d=e.fragmentStart;return this.log(`Live playlist sliding: ${d.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),d}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&_(s)?(n=t+s,s<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&Ne(e)&&e.stats.aborted&&(this.log(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==Nt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Nt.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const Se=this.getCurrentContext(t.chunkMeta);Se&&(t.frag=Se.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var i;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const s=t.details===z.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const l=t.errorAction;if(!l){this.state=Nt.ERROR;return}const{action:d,flags:c,retryCount:p=0,retryConfig:g}=l,A=!!g,k=A&&d===xn.RetryRequest,O=A&&!l.resolved&&c===Vn.MoveAllAlternatesMatchingHost,te=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!k&&O&&Ne(r)&&!r.endList&&te&&!bt(t))this.resetFragmentErrors(e),this.treatAsGap(r),l.resolved=!0;else if((k||O)&&p<g.maxNumRetry){var ee;const Se=Er((ee=t.response)==null?void 0:ee.code),ke=Yn(g,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+ke,this.state=Nt.FRAG_LOADING_WAITING_RETRY,l.resolved=!0,Se){this.log("Waiting for connection (offline)"),this.retryDate=1/0,t.reason="offline";return}this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${p+1}/${g.maxNumRetry} in ${ke}ms`)}else if(g)if(this.resetFragmentErrors(e),p<g.maxNumRetry)!s&&d!==xn.RemoveAlternatePermanently&&(l.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else d===xn.SendAlternateToPenaltyBox?this.state=Nt.WAITING_LEVEL:this.state=Nt.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!Er(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=Nt.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===Nt.PARSING||this.state===Nt.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime (${this.getLoadPosition()}) is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===ie.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Nt.STOPPED&&(this.state=Nt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=An.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Nt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Nt.STOPPED&&(this.state=Nt.IDLE)}resetStartWhenNotLoaded(){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const e=this.levelLastLoaded,t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.log(`Loading context changed while buffering sn ${e.sn} of ${this.playlistLabel()} ${e.level===-1?"<removed>":e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((d,c)=>{const p=e.elementaryStreams[c];if(p){const g=p.endPTS-p.startPTS;if(g<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${g})`),d||!1;const A=r?0:Es(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(m.LEVEL_PTS_UPDATED,{details:i,level:n,drift:A,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return d},!1)){var l;const d=((l=this.transmuxer)==null?void 0:l.error)===null;if((n.fragmentError===0||d&&(n.fragmentError<2||e.endList))&&this.treatAsGap(e,n),d){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(m.ERROR,{type:pe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Nt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(m.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ie.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Ta(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Aa{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=Ka(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function Ka(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<a.length;r++){const i=a[r];t.set(i,n),n+=i.length}return t}var as={exports:{}},Ds;function Ao(){return Ds||(Ds=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(d,c,p){this.fn=d,this.context=c,this.once=p||!1}function i(d,c,p,g,A){if(typeof p!="function")throw new TypeError("The listener must be a function");var k=new r(p,g||d,A),O=t?t+c:c;return d._events[O]?d._events[O].fn?d._events[O]=[d._events[O],k]:d._events[O].push(k):(d._events[O]=k,d._eventsCount++),d}function s(d,c){--d._eventsCount===0?d._events=new n:delete d._events[c]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],p,g;if(this._eventsCount===0)return c;for(g in p=this._events)e.call(p,g)&&c.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},l.prototype.listeners=function(c){var p=t?t+c:c,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var A=0,k=g.length,O=new Array(k);A<k;A++)O[A]=g[A].fn;return O},l.prototype.listenerCount=function(c){var p=t?t+c:c,g=this._events[p];return g?g.fn?1:g.length:0},l.prototype.emit=function(c,p,g,A,k,O){var te=t?t+c:c;if(!this._events[te])return!1;var ee=this._events[te],Se=arguments.length,ke,$e;if(ee.fn){switch(ee.once&&this.removeListener(c,ee.fn,void 0,!0),Se){case 1:return ee.fn.call(ee.context),!0;case 2:return ee.fn.call(ee.context,p),!0;case 3:return ee.fn.call(ee.context,p,g),!0;case 4:return ee.fn.call(ee.context,p,g,A),!0;case 5:return ee.fn.call(ee.context,p,g,A,k),!0;case 6:return ee.fn.call(ee.context,p,g,A,k,O),!0}for($e=1,ke=new Array(Se-1);$e<Se;$e++)ke[$e-1]=arguments[$e];ee.fn.apply(ee.context,ke)}else{var et=ee.length,ft;for($e=0;$e<et;$e++)switch(ee[$e].once&&this.removeListener(c,ee[$e].fn,void 0,!0),Se){case 1:ee[$e].fn.call(ee[$e].context);break;case 2:ee[$e].fn.call(ee[$e].context,p);break;case 3:ee[$e].fn.call(ee[$e].context,p,g);break;case 4:ee[$e].fn.call(ee[$e].context,p,g,A);break;default:if(!ke)for(ft=1,ke=new Array(Se-1);ft<Se;ft++)ke[ft-1]=arguments[ft];ee[$e].fn.apply(ee[$e].context,ke)}}return!0},l.prototype.on=function(c,p,g){return i(this,c,p,g,!1)},l.prototype.once=function(c,p,g){return i(this,c,p,g,!0)},l.prototype.removeListener=function(c,p,g,A){var k=t?t+c:c;if(!this._events[k])return this;if(!p)return s(this,k),this;var O=this._events[k];if(O.fn)O.fn===p&&(!A||O.once)&&(!g||O.context===g)&&s(this,k);else{for(var te=0,ee=[],Se=O.length;te<Se;te++)(O[te].fn!==p||A&&!O[te].once||g&&O[te].context!==g)&&ee.push(O[te]);ee.length?this._events[k]=ee.length===1?ee[0]:ee:s(this,k)}return this},l.prototype.removeAllListeners=function(c){var p;return c?(p=t?t+c:c,this._events[p]&&s(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,a.exports=l}(as)),as.exports}var Co=Ao(),ua=Z(Co);const Hs="1.6.15",gs={};function Ha(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Do(){const a=gs[Hs];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return gs[Hs]=r,r}function Wa(a){const e=gs[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return gs[a]=r,r}function Io(a){const e=gs[a||Hs];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete gs[a||Hs],r&&self.URL.revokeObjectURL(r),n.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 Ws(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 Is(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 Rs(a,e){const t=e;let n=0;for(;Ws(a,e);){n+=10;const r=Is(a,e+6);n+=r,Ca(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function Va(a,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const k=new Error(`invalid ADTS sampling index:${s}`);a.emit(m.ERROR,m.ERROR,{type:pe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!0,error:k,reason:k.message});return}const l=(i>>6&3)+1,d=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+l,p=r[s];let g=s;(l===5||l===29)&&(g-=3);const A=[l<<3|(g&14)>>1,(g&1)<<7|d<<3];return le.log(`manifest codec:${n}, parsed codec:${c}, channels:${d}, rate:${p} (ADTS object type:${l} sampling index:${s})`),{config:A,samplerate:p,channelCount:d,codec:c,parsedCodec:c,manifestCodec:n}}function Da(a,e){return a[e]===255&&(a[e+1]&246)===240}function Za(a,e){return a[e+1]&1?7:9}function ca(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Ya(a,e){return e+5<a.length}function da(a,e){return e+1<a.length&&Da(a,e)}function Vs(a,e){return Ya(a,e)&&Da(a,e)&&ca(a,e)<=a.length-e}function Ia(a,e){if(da(a,e)){const t=Za(a,e);if(e+t>=a.length)return!1;const n=ca(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||da(a,r)}return!1}function Ra(a,e,t,n,r){if(!a.samplerate){const i=Va(e,t,n,r);if(!i)return;w(a,i)}}function Xa(a){return 1024*9e4/a}function Ro(a,e){const t=Za(a,e);if(e+t<=a.length){const n=ca(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function qa(a,e,t,n,r){const i=Xa(a.samplerate),s=n+r*i,l=Ro(e,t);let d;if(l){const{frameLength:g,headerLength:A}=l,k=A+g,O=Math.max(0,t+k-e.length);O?(d=new Uint8Array(k-A),d.set(e.subarray(t+A,e.length),0)):d=e.subarray(t+A,t+k);const te={unit:d,pts:s};return O||a.samples.push(te),{sample:te,length:k,missing:O}}const c=e.length-t;return d=new Uint8Array(c),d.set(e.subarray(t,e.length),0),{sample:{unit:d,pts:s},length:c,missing:-1}}function La(a,e){return Ws(a,e)&&Is(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 ka(a,e=0,t=1/0){return Qa(a,e,t,Uint8Array)}function Qa(a,e,t,n){const r=ko(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=Ja(a)?a.byteOffset:0,l=(s+a.byteLength)/i,d=(s+e)/i,c=Math.floor(Math.max(0,Math.min(d,l))),p=Math.floor(Math.min(c+Math.max(t,0),l));return new n(r,c,p-c)}function ko(a){return a instanceof ArrayBuffer?a:a.buffer}function Ja(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function Oo(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=rt(ka(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=rt(ka(a.data,3+n,s));let d;return r==="-->"?d=rt(ka(a.data,4+n+s)):d=Lo(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=l,e.data=d,e}function Oe(a){if(a.size<2)return;const e=rt(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function eo(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=rt(a.data.subarray(t),!0);t+=n.length+1;const r=rt(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=rt(a.data.subarray(1));return{key:a.type,info:"",data:e}}function Oa(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=rt(a.data.subarray(t),!0);t+=n.length+1;const r=rt(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=rt(a.data);return{key:a.type,info:"",data:e}}function Pa(a){return a.type==="PRIV"?Oe(a):a.type[0]==="W"?Oa(a):a.type==="APIC"?Oo(a):eo(a)}function to(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Is(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const Ls=10,no=10;function Ma(a){let e=0;const t=[];for(;Ws(a,e);){const n=Is(a,e+6);a[e+5]>>6&1&&(e+=Ls),e+=Ls;const r=e+n;for(;e+no<r;){const i=to(a.subarray(e)),s=Pa(i);s&&t.push(s),e+=i.size+Ls}Ca(a,e)&&(e+=Ls)}return t}function ro(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function io(a){if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function ha(a){const e=Ma(a);for(let t=0;t<e.length;t++){const n=e[t];if(ro(n))return io(n)}}let ui=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 Hi(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class Zs{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=gt(this.cachedData,e),this.cachedData=null);let n=Rs(e,0),r=n?n.length:0,i;const s=this._audioTrack,l=this._id3Track,d=n?ha(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&_(d))&&(this.basePTS=so(d,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:ui.audioId3,duration:Number.POSITIVE_INFINITY});r<c;){if(this.canParse(e,r)){const p=this.appendFrame(s,e,r);p?(this.frameIndex++,this.lastPTS=p.sample.pts,r+=p.length,i=r):r=c}else La(e,r)?(n=Rs(e,r),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:ui.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===c&&i!==c){const p=e.slice(i);this.cachedData?this.cachedData=gt(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Hi(),id3Track:l,textTrack:Hi()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Hi(),id3Track:this._id3Track,textTrack:Hi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(_(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let fa=null;const Po=[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],ao=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Ba=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Mo=[0,1,1,4];function oo(a,e,t,n,r){if(t+24>e.length)return;const i=Bo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,l=n+r*s,d={unit:e.subarray(t,t+i.frameLength),pts:l,dts:l};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(d),{sample:d,length:i.frameLength,missing:0}}}function Bo(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,l=a[e+3]>>6,d=t===3?3-n:n===3?3:4,c=Po[d*14+r-1]*1e3,g=ao[(t===3?0:t===2?1:2)*3+i],A=l===3?1:2,k=Ba[t][n],O=Mo[n],te=k*8*O,ee=Math.floor(k*c/g+s)*O;if(fa===null){const $e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);fa=$e?parseInt($e[1]):0}return!!fa&&fa<=87&&n===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:g,channelCount:A,frameLength:ee,samplesPerFrame:te}}}function K(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&&K(a,e)}function h(a,e){return K(a,e)&&4<=a.length-e}function f(a,e){if(e+1<a.length&&K(a,e)){const n=Bo(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||u(a,i)}return!1}class v extends Zs{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=Rs(e,0);let r=(n==null?void 0:n.length)||0;if(f(e,r))return!1;for(let i=e.length;r<i;r++)if(Ia(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Vs(e,t)}appendFrame(e,t,n){Ra(e,this.observer,t,n,e.manifestCodec);const r=qa(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const R=(a,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;n>0;){s[0]=a[e];const l=Math.min(n,8),d=8-l;i[0]=4278190080>>>24+d<<d,r[0]=(s[0]&i[0])>>d,t=t?t<<l|r[0]:r[0],e+=1,n-=l}return t};class j extends Zs{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=me(e,t,n,this.basePTS,this.frameIndex);if(r!==-1)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=Rs(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ha(t)!==void 0&&R(e,n)<16}}function me(a,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const l=[48e3,44100,32e3][i],d=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][d*3+i]*2;if(t+p>e.length)return-1;const g=e[t+6]>>5;let A=0;g===2?A+=2:(g&1&&g!==1&&(A+=2),g&4&&(A+=2));const k=(e[t+6]<<8|e[t+7])>>12-A&1,te=[2,1,2,3,3,4,4,5][g]+k,ee=e[t+5]>>3,Se=e[t+5]&7,ke=new Uint8Array([i<<6|ee<<1|Se>>2,(Se&3)<<6|g<<3|k<<2|d>>4,d<<4&224]),$e=1536/l*9e4,et=n+r*$e,ft=e.subarray(t,t+p);return a.config=ke,a.channelCount=te,a.samplerate=l,a.samples.push({unit:ft,pts:et}),p}class Ee extends Zs{resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Rs(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ha(t)!==void 0&&R(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(f(e,n))return le.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return h(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return oo(e,t,n,this.basePTS,this.frameIndex)}}const Ge=/\/emsg[-/]ID3/i;class lt{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const i=this.videoTrack=Hi("video",1),s=this.audioTrack=Hi("audio",1),l=this.txtTrack=Hi("text",1);if(this.id3Track=Hi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const d=Ie(e);if(d.video){const{id:c,timescale:p,codec:g,supplemental:A}=d.video;i.id=c,i.timescale=l.timescale=p,i.codec=g,i.supplemental=A}if(d.audio){const{id:c,timescale:p,codec:g}=d.audio;s.id=c,s.timescale=p,s.codec=g}l.id=Tt.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return Ae(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=gt(this.remainderData,e));const l=St(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=_t(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=_t(e,t),{videoTrack:t,audioTrack:Hi(),id3Track:r,textTrack:Hi()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=he(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Ct(i);if(Ge.test(s.schemeIdUri)){const l=xt(s,t);let d=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;d<=.001&&(d=Number.POSITIVE_INFINITY);const c=s.payload;n.samples.push({data:c,len:c.byteLength,dts:l,pts:l,type:ui.emsg,duration:d})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=xt(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:ui.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function xt(a,e){return _(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class Mt{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new fr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,tr.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(l=>{const d=new Uint8Array(l);r.set(d,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)}).catch(n)}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e}decryptAvcSample(e,t,n,r,i){const s=ot(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.buffer).then(d=>{i.data=this.getAvcDecryptedUnit(s,d),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)}).catch(r)}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,n,r,s),!this.decrypter.isSync()))return}}}}class zt{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const i=n.units;r=i[i.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const i=n[r-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,l=[];let d=0,c,p,g,A=-1,k=0;for(i===-1&&(A=0,k=this.getNALuType(t,0),i=0,d=1);d<r;){if(c=t[d++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=d-i-1,A>=0){const O={data:t.subarray(A,p),type:k};l.push(O)}else{const O=this.getLastNalUnit(e.samples);O&&(s&&d<=4-s&&O.state&&(O.data=O.data.subarray(0,O.data.byteLength-s)),p>0&&(O.data=gt(O.data,t.subarray(0,p)),O.state=0))}d<r?(g=this.getNALuType(t,d),A=d,k=g,i=0):i=-1}else i=0}if(A>=0&&i>=0){const O={data:t.subarray(A,r),type:k,state:i};l.push(O)}if(l.length===0){const O=this.getLastNalUnit(e.samples);O&&(O.data=gt(O.data,t))}return e.naluState=i,l}}class Wt{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&le.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class Jt extends zt{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,d=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var p,g;switch(c.type){case 1:{let te=!1;l=!0;const ee=c.data;if(d&&ee.length>4){const Se=this.readSliceType(ee);(Se===2||Se===4||Se===7||Se===9)&&(te=!0)}if(te){var A;(A=s)!=null&&A.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.frame=!0,s.key=te;break}case 5:l=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 6:{l=!0,st(c.data,1,n.pts,t.samples);break}case 7:{var k,O;l=!0,d=!0;const te=c.data,ee=this.readSPS(te);if(!e.sps||e.width!==ee.width||e.height!==ee.height||((k=e.pixelRatio)==null?void 0:k[0])!==ee.pixelRatio[0]||((O=e.pixelRatio)==null?void 0:O[1])!==ee.pixelRatio[1]){e.width=ee.width,e.height=ee.height,e.pixelRatio=ee.pixelRatio,e.sps=[te];const Se=te.subarray(1,4);let ke="avc1.";for(let $e=0;$e<3;$e++){let et=Se[$e].toString(16);et.length<2&&(et="0"+et),ke+=et}e.codec=ke}break}case 8:l=!0,e.pps=[c.data];break;case 9:l=!0,e.audFound=!0,(g=s)!=null&&g.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:l=!0;break;default:l=!1;break}s&&l&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Wt(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,i;for(let s=0;s<e;s++)r!==0&&(i=t.readEG(),r=(n+i+256)%256),n=r===0?n:r}readSPS(e){const t=new Wt(e);let n=0,r=0,i=0,s=0,l,d,c;const p=t.readUByte.bind(t),g=t.readBits.bind(t),A=t.readUEG.bind(t),k=t.readBoolean.bind(t),O=t.skipBits.bind(t),te=t.skipEG.bind(t),ee=t.skipUEG.bind(t),Se=this.skipScalingList.bind(this);p();const ke=p();if(g(5),O(3),p(),ee(),ke===100||ke===110||ke===122||ke===244||ke===44||ke===83||ke===86||ke===118||ke===128){const It=A();if(It===3&&O(1),ee(),ee(),O(1),k())for(d=It!==3?8:12,c=0;c<d;c++)k()&&(c<6?Se(16,t):Se(64,t))}ee();const $e=A();if($e===0)A();else if($e===1)for(O(1),te(),te(),l=A(),c=0;c<l;c++)te();ee(),O(1);const et=A(),ft=A(),Pt=g(1);Pt===0&&O(1),O(1),k()&&(n=A(),r=A(),i=A(),s=A());let mt=[1,1];if(k()&&k())switch(p()){case 1:mt=[1,1];break;case 2:mt=[12,11];break;case 3:mt=[10,11];break;case 4:mt=[16,11];break;case 5:mt=[40,33];break;case 6:mt=[24,11];break;case 7:mt=[20,11];break;case 8:mt=[32,11];break;case 9:mt=[80,33];break;case 10:mt=[18,11];break;case 11:mt=[15,11];break;case 12:mt=[64,33];break;case 13:mt=[160,99];break;case 14:mt=[4,3];break;case 15:mt=[3,2];break;case 16:mt=[2,1];break;case 255:{mt=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((et+1)*16-n*2-r*2),height:(2-Pt)*(ft+1)*16-(Pt?2:4)*(i+s),pixelRatio:mt}}}class vn extends zt{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,d=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(c=>{var p,g;switch(c.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.frame=!0,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,d){var A;(A=s)!=null&&A.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:l=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 39:l=!0,st(c.data,2,n.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=w(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(l=!0,d=!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 k=this.readSPS(c.data);e.width=k.width,e.height=k.height,e.pixelRatio=k.pixelRatio,e.codec=k.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const O in k.params)e.params[O]=k.params[O]}this.pushParameterSet(e.sps,c.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0;break;case 34:if(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const k=this.readPPS(c.data);for(const O in k)e.params[O]=k[O]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(g=s)!=null&&g.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:l=!1;break}s&&l&&s.units.push(c)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Wt(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),r=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:r}}readSPS(e){const t=new Wt(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),l=t.readUByte(),d=t.readUByte(),c=t.readUByte(),p=t.readUByte(),g=t.readUByte(),A=t.readUByte(),k=t.readUByte(),O=t.readUByte(),te=t.readUByte(),ee=t.readUByte(),Se=t.readUByte(),ke=[],$e=[];for(let Sr=0;Sr<n;Sr++)ke.push(t.readBoolean()),$e.push(t.readBoolean());if(n>0)for(let Sr=n;Sr<8;Sr++)t.readBits(2);for(let Sr=0;Sr<n;Sr++)ke[Sr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),$e[Sr]&&t.readUByte();t.readUEG();const et=t.readUEG();et==3&&t.skipBits(1);const ft=t.readUEG(),Pt=t.readUEG(),mt=t.readBoolean();let It=0,Dt=0,vt=0,$t=0;mt&&(It+=t.readUEG(),Dt+=t.readUEG(),vt+=t.readUEG(),$t+=t.readUEG());const nn=t.readUEG(),hn=t.readUEG(),Tn=t.readUEG(),fn=t.readBoolean();for(let Sr=fn?0:n;Sr<=n;Sr++)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 xi=0;xi<4;xi++)for(let Yi=0;Yi<(xi===3?2:6);Yi++)if(!t.readBoolean())t.readUEG();else{const rs=Math.min(64,1<<4+(xi<<1));xi>1&&t.readEG();for(let xa=0;xa<rs;xa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const an=t.readUEG();let wn=0;for(let Sr=0;Sr<an;Sr++){let xi=!1;if(Sr!==0&&(xi=t.readBoolean()),xi){Sr===an&&t.readUEG(),t.readBoolean(),t.readUEG();let Yi=0;for(let ea=0;ea<=wn;ea++){const rs=t.readBoolean();let xa=!1;rs||(xa=t.readBoolean()),(rs||xa)&&Yi++}wn=Yi}else{const Yi=t.readUEG(),ea=t.readUEG();wn=Yi+ea;for(let rs=0;rs<Yi;rs++)t.readUEG(),t.readBoolean();for(let rs=0;rs<ea;rs++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Sr=t.readUEG();for(let xi=0;xi<Sr;xi++){for(let Yi=0;Yi<Tn+4;Yi++)t.readBits(1);t.readBits(1)}}let en=0,tn=1,sr=1,Dr=!0,ur=1,mr=0;t.readBoolean(),t.readBoolean();let bi=!1;if(t.readBoolean()){if(t.readBoolean()){const ta=t.readUByte(),mu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],To=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];ta>0&&ta<16?(tn=mu[ta-1],sr=To[ta-1]):ta===255&&(tn=t.readBits(16),sr=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(),bi=t.readBoolean(),bi&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(ur=t.readBits(32),mr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const To=t.readBoolean(),gu=t.readBoolean();let za=!1;(To||gu)&&(za=t.readBoolean(),za&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),za&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let vu=0;vu<=n;vu++){Dr=t.readBoolean();const Kc=Dr||t.readBoolean();let yu=!1;Kc?t.readEG():yu=t.readBoolean();const _u=yu?1:t.readUEG()+1;if(To)for(let ja=0;ja<_u;ja++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(gu)for(let ja=0;ja<_u;ja++)t.readUEG(),t.readUEG(),za&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),en=t.readUEG())}let Zi=ft,ds=Pt;if(mt){let Sr=1,xi=1;et===1?Sr=xi=2:et==2&&(Sr=2),Zi=ft-Sr*Dt-Sr*It,ds=Pt-xi*$t-xi*vt}const Js=r?["A","B","C"][r]:"",Gc=l<<24|d<<16|c<<8|p;let hl=0;for(let Sr=0;Sr<32;Sr++)hl=(hl|(Gc>>Sr&1)<<31-Sr)>>>0;let fl=hl.toString(16);return s===1&&fl==="2"&&(fl="6"),{codecString:`hvc1.${Js}${s}.${fl}.${i?"H":"L"}${Se}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[l,d,c,p],general_constraint_indicator_flags:[g,A,k,O,te,ee],general_level_idc:Se,bit_depth:nn+8,bit_depth_luma_minus8:nn,bit_depth_chroma_minus8:hn,min_spatial_segmentation_idc:en,chroma_format_idc:et,frame_rate:{fixed:Dr,fps:mr/ur}},width:Zi,height:ds,pixelRatio:[tn,sr]}}readPPS(e){const t=new Wt(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),i=t.readBoolean();let s=1;return i&&r?s=0:i?s=3:r&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const En=188;class Un{constructor(e,t,n,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=Un.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(En*5,t-En)+1,r=0;for(;r<n;){let i=!1,s=-1,l=0;for(let d=r;d<t;d+=En)if(e[d]===71&&(t-d===En||e[d+En]===71)){if(l++,s===-1&&(s=d,s!==0&&(n=Math.min(s+En*99,e.length-En)+1)),i||(i=Jn(e,d)===0),i&&l>1&&(s===0&&l>2||d+En>n))return s}else{if(l)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:Tt[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Un.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=Un.createTrack("audio",r),this._id3Track=Un.createTrack("id3"),this._txtTrack=Un.createTrack("text"),this._audioTrack.segmentCodec="aac",this.videoParser=null,this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let i;const s=this._videoTrack,l=this._audioTrack,d=this._id3Track,c=this._txtTrack;let p=s.pid,g=s.pesData,A=l.pid,k=d.pid,O=l.pesData,te=d.pesData,ee=null,Se=this.pmtParsed,ke=this._pmtId,$e=e.length;if(this.remainderData&&(e=gt(this.remainderData,e),$e=e.length,this.remainderData=null),$e<En&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};const et=Math.max(0,Un.syncOffset(e));$e-=($e-et)%En,$e<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,$e,e.buffer.byteLength-$e));let ft=0;for(let mt=et;mt<$e;mt+=En)if(e[mt]===71){const It=!!(e[mt+1]&64),Dt=Jn(e,mt),vt=(e[mt+3]&48)>>4;let $t;if(vt>1){if($t=mt+5+e[mt+4],$t===mt+En)continue}else $t=mt+4;switch(Dt){case p:It&&(g&&(i=Rr(g,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),g={data:[],size:0}),g&&(g.data.push(e.subarray($t,mt+En)),g.size+=mt+En-$t);break;case A:if(It){if(O&&(i=Rr(O,this.logger)))switch(l.segmentCodec){case"aac":this.parseAACPES(l,i);break;case"mp3":this.parseMPEGPES(l,i);break;case"ac3":this.parseAC3PES(l,i);break}O={data:[],size:0}}O&&(O.data.push(e.subarray($t,mt+En)),O.size+=mt+En-$t);break;case k:It&&(te&&(i=Rr(te,this.logger))&&this.parseID3PES(d,i),te={data:[],size:0}),te&&(te.data.push(e.subarray($t,mt+En)),te.size+=mt+En-$t);break;case 0:It&&($t+=e[$t]+1),ke=this._pmtId=kr(e,$t);break;case ke:{It&&($t+=e[$t]+1);const nn=Cr(e,$t,this.typeSupported,n,this.observer,this.logger);p=nn.videoPid,p>0&&(s.pid=p,s.segmentCodec=nn.segmentVideoCodec),A=nn.audioPid,A>0&&(l.pid=A,l.segmentCodec=nn.segmentAudioCodec),k=nn.id3Pid,k>0&&(d.pid=k),ee!==null&&!Se&&(this.logger.warn(`MPEG-TS PMT found at ${mt} after unknown PID '${ee}'. Backtracking to sync byte @${et} to parse all TS packets.`),ee=null,mt=et-188),Se=this.pmtParsed=!0;break}case 17:case 8191:break;default:ee=Dt;break}}else ft++;ft>0&&Or(this.observer,new Error(`Found ${ft} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=g,l.pesData=O,d.pesData=te;const Pt={audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};return r&&this.extractRemainingSamples(Pt),Pt}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:i}=e,s=n.pesData,l=t.pesData,d=r.pesData;let c;if(s&&(c=Rr(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,c,!0),n.pesData=null)):n.pesData=s,l&&(c=Rr(l,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 l!=null&&l.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=l;d&&(c=Rr(d,this.logger))?(this.parseID3PES(r,c),r.pesData=null):r.pesData=d}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new Mt(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Jt:e==="hevc"&&(this.videoParser=new vn))}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const g=r.missing,A=r.sample.unit.byteLength;if(g===-1)i=gt(r.sample.unit,i);else{const k=A-g;r.sample.unit.set(i.subarray(0,g),k),e.samples.push(r.sample),n=r.missing}}let s,l;for(s=n,l=i.length;s<l-1&&!da(i,s);s++);if(s!==n){let g;const A=s<l-1;if(A?g=`AAC PES did not start with ADTS header,offset:${s}`:g="No ADTS header found in AAC PES",Or(this.observer,new Error(g),A,this.logger),!A)return}Ra(e,this.observer,i,s,this.audioCodec);let d;if(t.pts!==void 0)d=t.pts;else if(r){const g=Xa(e.samplerate);d=r.sample.pts+g}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<l;)if(p=qa(e,i,s,d,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<l-1&&!da(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const l=t.pts;if(l===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(u(n,s)){const d=oo(e,n,s,l,i);if(d)s+=d.length,i++;else break}else s++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=n.length;let s=0,l=0,d;for(;l<i&&(d=me(e,n,l,r,s++))>0;)l+=d}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=w({},t,{type:this._videoTrack?ui.emsg:ui.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function Jn(a,e){return((a[e+1]&31)<<8)+a[e+2]}function kr(a,e){return(a[e+10]&31)<<8|a[e+11]}function Cr(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(a[e+1]&15)<<8|a[e+2],d=e+3+l-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<d;){const p=Jn(a,e),g=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){Pr("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=p);break;case 21:s.id3Pid===-1&&(s.id3Pid=p);break;case 219:if(!n){Pr("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=p);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="mp3");break;case 193:if(!n){Pr("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&&g>0){let A=e+5,k=g;for(;k>2;){switch(a[A]){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 te=a[A+1]+2;A+=te,k-=te}}break;case 194:case 135:return Or(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=p,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=g+5}return s}function Or(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(m.ERROR,m.ERROR,{type:pe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Pr(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Rr(a,e){let t=0,n,r,i,s,l;const d=a.data;if(!a||a.size===0)return null;for(;d[0].length<19&&d.length>1;)d[0]=gt(d[0],d[1]),d.splice(1,1);if(n=d[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>a.size-6)return null;const p=n[7];p&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,p&64?(l=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-l>60*9e4&&(e.warn(`${Math.round((s-l)/9e4)}s delta between PTS and DTS, align them`),s=l)):l=s),i=n[8];let g=i+9;if(a.size<=g)return null;a.size-=g;const A=new Uint8Array(a.size);for(let k=0,O=d.length;k<O;k++){n=d[k];let te=n.byteLength;if(g)if(g>te){g-=te;continue}else n=n.subarray(g),te-=g,g=0;A.set(n,t),t+=te}return r&&(r-=i+3),{data:A,pts:s,dts:l,len:r}}return null}class ci{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 Fr=Math.pow(2,32)-1;class ht{static init(){ht.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 ht.types)ht.types.hasOwnProperty(e)&&(ht.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);ht.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);ht.STTS=ht.STSC=ht.STCO=i,ht.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ht.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),ht.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),ht.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);ht.FTYP=ht.box(ht.types.ftyp,s,d,s,l),ht.DINF=ht.box(ht.types.dinf,ht.box(ht.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return ht.box(ht.types.hdlr,ht.HDLR_TYPES[e])}static mdat(e){return ht.box(ht.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(Fr+1)),r=Math.floor(t%(Fr+1));return ht.box(ht.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))}static mdia(e){return ht.box(ht.types.mdia,ht.mdhd(e.timescale||0,e.duration||0),ht.hdlr(e.type),ht.minf(e))}static mfhd(e){return ht.box(ht.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"?ht.box(ht.types.minf,ht.box(ht.types.smhd,ht.SMHD),ht.DINF,ht.stbl(e)):ht.box(ht.types.minf,ht.box(ht.types.vmhd,ht.VMHD),ht.DINF,ht.stbl(e))}static moof(e,t,n){return ht.box(ht.types.moof,ht.mfhd(e),ht.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=ht.trak(e[t]);return ht.box.apply(null,[ht.types.moov,ht.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(ht.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=ht.trex(e[t]);return ht.box.apply(null,[ht.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Fr+1)),r=Math.floor(t%(Fr+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return ht.box(ht.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return ht.box(ht.types.sdtp,n)}static stbl(e){return ht.box(ht.types.stbl,ht.stsd(e),ht.box(ht.types.stts,ht.STTS),ht.box(ht.types.stsc,ht.STSC),ht.box(ht.types.stsz,ht.STSZ),ht.box(ht.types.stco,ht.STCO))}static avc1(e){let t=[],n=[],r,i,s;for(r=0;r<e.sps.length;r++)i=e.sps[r],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],s=i.byteLength,n.push(s>>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const l=ht.box(ht.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),d=e.width,c=e.height,p=e.pixelRatio[0],g=e.pixelRatio[1];return ht.box(ht.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,d>>8&255,d&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]),l,ht.box(ht.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ht.box(ht.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,g>>24,g>>16&255,g>>8&255,g&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 ht.box(ht.types.mp4a,ht.audioStsd(e),ht.box(ht.types.esds,ht.esds(e)))}static mp3(e){return ht.box(ht.types[".mp3"],ht.audioStsd(e))}static ac3(e){return ht.box(ht.types["ac-3"],ht.audioStsd(e),ht.box(ht.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return ht.box(ht.types.stsd,ht.STSD,ht.mp4a(e));if(t==="ac3"&&e.config)return ht.box(ht.types.stsd,ht.STSD,ht.ac3(e));if(t==="mp3"&&e.codec==="mp3")return ht.box(ht.types.stsd,ht.STSD,ht.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return ht.box(ht.types.stsd,ht.STSD,ht.avc1(e));if(t==="hevc"&&e.vps)return ht.box(ht.types.stsd,ht.STSD,ht.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(Fr+1)),l=Math.floor(n%(Fr+1));return ht.box(ht.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,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=ht.sdtp(e),r=e.id,i=Math.floor(t/(Fr+1)),s=Math.floor(t%(Fr+1));return ht.box(ht.types.traf,ht.box(ht.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),ht.box(ht.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])),ht.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,ht.box(ht.types.trak,ht.tkhd(e),ht.mdia(e))}static trex(e){const t=e.id;return ht.box(ht.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let l,d,c,p,g,A;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),l=0;l<r;l++)d=n[l],c=d.duration,p=d.size,g=d.flags,A=d.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,g.isLeading<<2|g.dependsOn,g.isDependedOn<<6|g.hasRedundancy<<4|g.paddingValue<<1|g.isNonSync,g.degradPrio&61440,g.degradPrio&15,A>>>24&255,A>>>16&255,A>>>8&255,A&255],12+16*l);return ht.box(ht.types.trun,s)}static initSegment(e){ht.types||ht.init();const t=ht.moov(e);return gt(ht.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let s=i.length;for(let O=0;O<n.length;O+=1){s+=3;for(let te=0;te<n[O].length;te+=1)s+=2+n[O][te].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const d=n.length-1;for(let O=0;O<n.length;O+=1){l.set(new Uint8Array([32+O|(O===d?128:0),0,n[O].length]),s),s+=3;for(let te=0;te<n[O].length;te+=1)l.set(new Uint8Array([n[O][te].length>>8,n[O][te].length&255]),s),s+=2,l.set(n[O][te],s),s+=n[O][te].length}const c=ht.box(ht.types.hvcC,l),p=e.width,g=e.height,A=e.pixelRatio[0],k=e.pixelRatio[1];return ht.box(ht.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,g>>8&255,g&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,ht.box(ht.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),ht.box(ht.types.pasp,new Uint8Array([A>>24,A>>16&255,A>>8&255,A&255,k>>24,k>>16&255,k>>8&255,k&255])))}}ht.types=void 0,ht.HDLR_TYPES=void 0,ht.STTS=void 0,ht.STSC=void 0,ht.STCO=void 0,ht.STSZ=void 0,ht.VMHD=void 0,ht.SMHD=void 0,ht.STSD=void 0,ht.FTYP=void 0,ht.DINF=void 0;const Ci=9e4;function Wi(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Ui(a,e,t=1,n=!1){return Wi(a,e,1/t,n)}function Zr(a,e=!1){return Wi(a,1e3,1/Ci,e)}function os(a,e=1){return Wi(a,Ci,1/e)}function Vi(a){const{baseTime:e,timescale:t,trackId:n}=a;return`${e/t} (${e}/${t}) trackId: ${n}`}const lo=10*1e3,No=1024,ks=1152,Os=1536;let zi=null,Ps=null;function Ys(a,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class pa extends q{constructor(e,t,n,r){if(super("mp4-remuxer",r),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextVideoTs=null,this.nextAudioTs=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,zi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);zi=s?parseInt(s[1]):0}if(Ps===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Ps=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&&Vi(t)} > ${e&&Vi(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 n=e[0].pts,r=e.reduce((i,s)=>{let l=s.pts,d=l-i;return d<-4294967296&&(t=!0,l=Di(l,n),d=l-i),d>0?i:l},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,l,d){let c,p,g,A,k,O,te=i,ee=i;const Se=e.pid>-1,ke=t.pid>-1,$e=t.samples.length,et=e.samples.length>0,ft=l&&$e>0||$e>1;if((!Se||et)&&(!ke||ft)||this.ISGenerated||l){if(this.ISGenerated){var mt,It,Dt,vt;const Tn=this.videoTrackConfig;(Tn&&(t.width!==Tn.width||t.height!==Tn.height||((mt=t.pixelRatio)==null?void 0:mt[0])!==((It=Tn.pixelRatio)==null?void 0:It[0])||((Dt=t.pixelRatio)==null?void 0:Dt[1])!==((vt=Tn.pixelRatio)==null?void 0:vt[1]))||!Tn&&ft||this.nextAudioTs===null&&et)&&this.resetInitSegment()}this.ISGenerated||(g=this.generateIS(e,t,i,s));const $t=this.isVideoContiguous;let nn=-1,hn;if(ft&&(nn=Fo(t.samples),!$t&&this.config.forceKeyFrameOnDiscontinuity))if(O=!0,nn>0){this.warn(`Dropped ${nn} out of ${$e} video samples due to a missing keyframe`);const Tn=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(nn),t.dropped+=nn,ee+=(t.samples[0].pts-Tn)/t.inputTimeScale,hn=ee}else nn===-1&&(this.warn(`No keyframe found out of ${$e} video samples`),O=!1);if(this.ISGenerated){if(et&&ft){const Tn=this.getVideoStartPts(t.samples),qt=(Di(e.samples[0].pts,Tn)-Tn)/t.inputTimeScale;te+=Math.max(0,qt),ee+=Math.max(0,-qt)}if(et){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),g=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,te,this.isAudioContiguous,s,ke||ft||d===ie.AUDIO?ee:void 0),ft){const Tn=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),g=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,ee,$t,Tn)}}else ft&&(c=this.remuxVideo(t,ee,$t,0));c&&(c.firstKeyFrame=nn,c.independent=nn!==-1,c.firstKeyFramePTS=hn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(k=ma(n,i,this._initPTS,this._initDTS)),r.samples.length&&(A=Na(r,i,this._initPTS))),{audio:p,video:c,initSegment:g,independent:O,text:A,id3:k}}computeInitPts(e,t,n,r){const i=Math.round(n*t);let s=Di(e,i);if(s<i+t)for(this.log(`Adjusting PTS for rollover in timeline near ${(i-s)/t} ${r}`);s<i+t;)s+=8589934592;return s-i}generateIS(e,t,n,r){const i=e.samples,s=t.samples,l=this.typeSupported,d={},c=this._initPTS;let p=!c||r,g="audio/mp4",A,k,O,te=-1;if(p&&(A=k=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(g="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}d.audio={id:"audio",container:g,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):ht.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(te=e.id,O=e.inputTimeScale,!c||O!==c.timescale?A=k=this.computeInitPts(i[0].pts,O,n,"audio"):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:ht.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(te=t.id,O=t.inputTimeScale,!c||O!==c.timescale){const ee=this.getVideoStartPts(s),Se=Di(s[0].dts,ee),ke=this.computeInitPts(Se,O,n,"video"),$e=this.computeInitPts(ee,O,n,"video");k=Math.min(k,ke),A=Math.min(A,$e)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(d).length)return this.ISGenerated=!0,p?(c&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${A/O} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${A/O} (${A}/${O}) trackId: ${te}`),this._initPTS={baseTime:A,timescale:O,trackId:te},this._initDTS={baseTime:k,timescale:O,trackId:te}):A=O=void 0,{tracks:d,initPTS:A,timescale:O,trackId:te}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,l=[],d=s.length,c=this._initPTS,p=c.baseTime*i/c.timescale;let g=this.nextVideoTs,A=8,k=this.videoSampleDuration,O,te,ee=Number.POSITIVE_INFINITY,Se=Number.NEGATIVE_INFINITY,ke=!1;if(!n||g===null){const en=p+t*i,tn=s[0].pts-Di(s[0].dts,s[0].pts);zi&&g!==null&&Math.abs(en-tn-(g+p))<15e3?n=!0:g=en-tn-p}const $e=g+p;for(let en=0;en<d;en++){const tn=s[en];tn.pts=Di(tn.pts,$e),tn.dts=Di(tn.dts,$e),tn.dts<s[en>0?en-1:en].dts&&(ke=!0)}ke&&s.sort(function(en,tn){const sr=en.dts-tn.dts,Dr=en.pts-tn.pts;return sr||Dr}),O=s[0].dts,te=s[s.length-1].dts;const et=te-O,ft=et?Math.round(et/(d-1)):k||e.inputTimeScale/30;if(n){const en=O-$e,tn=en>ft,sr=en<-1;if((tn||sr)&&(tn?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Zr(en,!0)} ms (${en}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Zr(-en,!0)} ms (${en}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!sr||$e>=s[0].pts||zi)){O=$e;const Dr=s[0].pts-en;if(tn)s[0].dts=O,s[0].pts=Dr;else{let ur=!0;for(let mr=0;mr<s.length&&!(s[mr].dts>Dr&&ur);mr++){const bi=s[mr].pts;if(s[mr].dts-=en,s[mr].pts-=en,mr<s.length-1){const yi=s[mr+1].pts,Zi=s[mr].pts,ds=yi<=Zi,Js=yi<=bi;ur=ds==Js}}}this.log(`Video: Initial PTS/DTS adjusted: ${Zr(Dr,!0)}/${Zr(O,!0)}, delta: ${Zr(en,!0)} ms`)}}O=Math.max(0,O);let Pt=0,mt=0,It=O;for(let en=0;en<d;en++){const tn=s[en],sr=tn.units,Dr=sr.length;let ur=0;for(let mr=0;mr<Dr;mr++)ur+=sr[mr].data.length;mt+=ur,Pt+=Dr,tn.length=ur,tn.dts<It?(tn.dts=It,It+=ft/4|0||1):It=tn.dts,ee=Math.min(tn.pts,ee),Se=Math.max(tn.pts,Se)}te=s[d-1].dts;const Dt=mt+4*Pt+8;let vt;try{vt=new Uint8Array(Dt)}catch(en){this.observer.emit(m.ERROR,m.ERROR,{type:pe.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:en,bytes:Dt,reason:`fail allocating video mdat ${Dt}`});return}const $t=new DataView(vt.buffer);$t.setUint32(0,Dt),vt.set(ht.types.mdat,4);let nn=!1,hn=Number.POSITIVE_INFINITY,Tn=Number.POSITIVE_INFINITY,fn=Number.NEGATIVE_INFINITY,qt=Number.NEGATIVE_INFINITY;for(let en=0;en<d;en++){const tn=s[en],sr=tn.units;let Dr=0;for(let bi=0,yi=sr.length;bi<yi;bi++){const Zi=sr[bi],ds=Zi.data,Js=Zi.data.byteLength;$t.setUint32(A,Js),A+=4,vt.set(ds,A),A+=Js,Dr+=4+Js}let ur;if(en<d-1)k=s[en+1].dts-tn.dts,ur=s[en+1].pts-tn.pts;else{const bi=this.config,yi=en>0?tn.dts-s[en-1].dts:ft;if(ur=en>0?tn.pts-s[en-1].pts:ft,bi.stretchShortVideoTrack&&this.nextAudioTs!==null){const Zi=Math.floor(bi.maxBufferHole*i),ds=(r?ee+r*i:this.nextAudioTs+p)-tn.pts;ds>Zi?(k=ds-yi,k<0?k=yi:nn=!0,this.log(`It is approximately ${ds/90} ms to the next segment; using duration ${k/90} ms for the last video frame.`)):k=yi}else k=yi}const mr=Math.round(tn.pts-tn.dts);hn=Math.min(hn,k),fn=Math.max(fn,k),Tn=Math.min(Tn,ur),qt=Math.max(qt,ur),l.push(Ys(tn.key,k,Dr,mr))}if(l.length){if(zi){if(zi<70){const en=l[0].flags;en.dependsOn=2,en.isNonSync=0}}else if(Ps&&qt-Tn<fn-hn&&ft/fn<.025&&l[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let en=O;for(let tn=0,sr=l.length;tn<sr;tn++){const Dr=en+l[tn].duration,ur=en+l[tn].cts;if(tn<sr-1){const mr=Dr+l[tn+1].cts;l[tn].duration=mr-ur}else l[tn].duration=tn?l[tn-1].duration:ft;l[tn].cts=0,en=Dr}}}k=nn||!k?ft:k;const _n=te+k;this.nextVideoTs=g=_n-p,this.videoSampleDuration=k,this.isVideoContiguous=!0;const Kn={data1:ht.moof(e.sequenceNumber++,O,w(e,{samples:l})),data2:vt,startPTS:(ee-p)/i,endPTS:(Se+k-p)/i,startDTS:(O-p)/i,endDTS:g/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Kn}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return ks;case"ac3":return Os;default:return No}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,d=s/l,c=this.getSamplesPerFrame(e),p=c*d,g=this._initPTS,A=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,k=[],O=i!==void 0;let te=e.samples,ee=A?0:8,Se=this.nextAudioTs||-1;const ke=g.baseTime*s/g.timescale,$e=ke+t*s;if(this.isAudioContiguous=n=n||te.length&&Se>0&&(r&&Math.abs($e-(Se+ke))<9e3||Math.abs(Di(te[0].pts,$e)-(Se+ke))<20*p),te.forEach(function(qt){qt.pts=Di(qt.pts,$e)}),!n||Se<0){const qt=te.length;if(te=te.filter(_n=>_n.pts>=0),qt!==te.length&&this.warn(`Removed ${te.length-qt} of ${qt} samples (initPTS ${ke} / ${s})`),!te.length)return;i===0?Se=0:r&&!O?Se=Math.max(0,$e-ke):Se=te[0].pts-ke}if(e.segmentCodec==="aac"){const qt=this.config.maxAudioFramesDrift;for(let _n=0,an=Se+ke;_n<te.length;_n++){const wn=te[_n],Kn=wn.pts,en=Kn-an,tn=Math.abs(1e3*en/s);if(en<=-qt*p&&O)_n===0&&(this.warn(`Audio frame @ ${(Kn/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*en/s)} ms.`),this.nextAudioTs=Se=Kn-ke,an=Kn);else if(en>=qt*p&&tn<lo&&O){let sr=Math.round(en/p);for(an=Kn-sr*p;an<0&&sr&&p;)sr--,an+=p;_n===0&&(this.nextAudioTs=Se=an-ke),this.warn(`Injecting ${sr} audio frames @ ${((an-ke)/s).toFixed(3)}s due to ${Math.round(1e3*en/s)} ms gap.`);for(let Dr=0;Dr<sr;Dr++){let ur=ci.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);ur||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),ur=wn.unit.subarray()),te.splice(_n,0,{unit:ur,pts:an}),an+=p,_n++}}wn.pts=an,an+=p}}let et=null,ft=null,Pt,mt=0,It=te.length;for(;It--;)mt+=te[It].unit.byteLength;for(let qt=0,_n=te.length;qt<_n;qt++){const an=te[qt],wn=an.unit;let Kn=an.pts;if(ft!==null){const tn=k[qt-1];tn.duration=Math.round((Kn-ft)/d)}else if(n&&e.segmentCodec==="aac"&&(Kn=Se+ke),et=Kn,mt>0){mt+=ee;try{Pt=new Uint8Array(mt)}catch(tn){this.observer.emit(m.ERROR,m.ERROR,{type:pe.MUX_ERROR,details:z.REMUX_ALLOC_ERROR,fatal:!1,error:tn,bytes:mt,reason:`fail allocating audio mdat ${mt}`});return}A||(new DataView(Pt.buffer).setUint32(0,mt),Pt.set(ht.types.mdat,4))}else return;Pt.set(wn,ee);const en=wn.byteLength;ee+=en,k.push(Ys(!0,c,en,0)),ft=Kn}const Dt=k.length;if(!Dt)return;const vt=k[k.length-1];Se=ft-ke,this.nextAudioTs=Se+d*vt.duration;const $t=A?new Uint8Array(0):ht.moof(e.sequenceNumber++,et/d,w({},e,{samples:k}));e.samples=[];const nn=(et-ke)/s,hn=this.nextAudioTs/s,fn={data1:$t,data2:Pt,startPTS:nn,endPTS:hn,startDTS:nn,endDTS:hn,type:"audio",hasAudio:!0,hasVideo:!1,nb:Dt};return this.isAudioContiguous=!0,fn}}function Di(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 Fo(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function ma(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let l=0;l<r;l++){const d=a.samples[l];d.pts=Di(d.pts-t.baseTime*i/t.timescale,e*i)/i,d.dts=Di(d.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Na(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const l=a.samples[s];l.pts=Di(l.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,l)=>s.pts-l.pts);const i=a.samples;return a.samples=[],{samples:i}}class uo extends q{constructor(e,t,n,r){super("passthrough-remuxer",r),this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.isVideoContiguous=!1}destroy(){}resetTimeStamp(e){this.lastEndTime=null;const t=this.initPTS;t&&e&&t.baseTime===e.baseTime&&t.timescale===e.timescale||(this.initPTS=e)}resetNextTimestamp(){this.isVideoContiguous=!1,this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e,r),this.emitInitSegment=!0}generateInitSegment(e,t){let{audioCodec:n,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const{audio:i,video:s}=this.initData=Ie(e);if(t)Ze(e,t);else{const d=i||s;d!=null&&d.encrypted&&this.warn(`Init segment with encrypted track with has no key ("${d.codec}")!`)}i&&(n=pl(i,B.AUDIO,this)),s&&(r=pl(s,B.VIDEO,this));const l={};i&&s?l.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?l.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?l.video={container:"video/mp4",codec:r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:this.warn("initSegment does not contain moov or trak boxes."),this.initTracks=l}remux(e,t,n,r,i,s){var l,d;let{initPTS:c,lastEndTime:p}=this;const g={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};_(p)||(p=this.lastEndTime=i||0);const A=t.samples;if(!A.length)return g;const k={initPTS:void 0,timescale:void 0,trackId:void 0};let O=this.initData;if((l=O)!=null&&l.length||(this.generateInitSegment(A),O=this.initData),!((d=O)!=null&&d.length))return this.warn("Failed to generate initSegment."),g;this.emitInitSegment&&(k.tracks=this.initTracks,this.emitInitSegment=!1);const te=dt(A,O,this),ee=O.audio?te[O.audio.id]:null,Se=O.video?te[O.video.id]:null,ke=Xs(Se,1/0),$e=Xs(ee,1/0),et=Xs(Se,0,!0),ft=Xs(ee,0,!0);let Pt=i,mt=0;const It=ee&&(!Se||!c&&$e<ke||c&&c.trackId===O.audio.id),Dt=It?ee:Se;if(Dt){const an=Dt.timescale,wn=Dt.start-i*an,Kn=It?O.audio.id:O.video.id;Pt=Dt.start/an,mt=It?ft-$e:et-ke,(s||!c)&&(ga(c,Pt,i,mt)||an!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${wn/an} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${Pt-i} (${wn}/${an}) trackId: ${Kn}`),c=null,k.initPTS=wn,k.timescale=an,k.trackId=Kn)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(k.initPTS=c.baseTime,k.timescale=c.timescale,k.trackId=c.trackId):((!k.timescale||k.trackId===void 0||k.initPTS===void 0)&&(this.warn("Could not set initPTS"),k.initPTS=Pt,k.timescale=1,k.trackId=-1),this.initPTS=c={baseTime:k.initPTS,timescale:k.timescale,trackId:k.trackId});const vt=Pt-c.baseTime/c.timescale,$t=vt+mt;mt>0?this.lastEndTime=$t:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const nn=!!O.audio,hn=!!O.video;let Tn="";nn&&(Tn+="audio"),hn&&(Tn+="video");const fn=(O.audio?O.audio.encrypted:!1)||(O.video?O.video.encrypted:!1),qt={data1:A,startPTS:vt,startDTS:vt,endPTS:$t,endDTS:$t,type:Tn,hasAudio:nn,hasVideo:hn,nb:1,dropped:0,encrypted:fn};g.audio=nn&&!hn?qt:void 0,g.video=hn?qt:void 0;const _n=Se==null?void 0:Se.sampleCount;if(_n){const an=Se.keyFrameIndex,wn=an!==-1;qt.nb=_n,qt.dropped=an===0||this.isVideoContiguous?0:wn?an:_n,qt.independent=wn,qt.firstKeyFrame=an,wn&&Se.keyFrameStart&&(qt.firstKeyFramePTS=(Se.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(g.independent=wn),this.isVideoContiguous||(this.isVideoContiguous=wn),qt.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${an}/${_n} dropped: ${qt.dropped} start: ${qt.firstKeyFramePTS||"NA"}`)}return g.initSegment=k,g.id3=ma(n,i,c,c),r.samples.length&&(g.text=Na(r,i,c)),g}}function Xs(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function ga(a,e,t,n){if(a===null)return!0;const r=Math.max(n,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>r}function pl(a,e,t){const n=a.codec;return n&&n.length>4?n:e===B.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?ge(n,!1):(t.warn(`Unhandled audio codec "${n}" in mp4 MAP`),n||"mp4a"):(t.warn(`Unhandled video codec "${n}" in mp4 MAP`),n||"avc1")}let vs;try{vs=self.performance.now.bind(self.performance)}catch(a){vs=Date.now}const co=[{demux:lt,remux:uo},{demux:Un,remux:pa},{demux:v,remux:pa},{demux:Ee,remux:pa}];co.splice(2,0,{demux:j,remux:pa});class ml{constructor(e,t,n,r,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=vs();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:d}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:p,trackSwitch:g,accurateTimeOffset:A,timeOffset:k,initSegmentChange:O}=r||l,{audioCodec:te,videoCodec:ee,defaultInitPts:Se,duration:ke,initSegmentData:$e}=d,et=Su(s,t);if(et&&pi(et.method)){const It=this.getDecrypter(),Dt=Gi(et.method);if(It.isSync()){let vt=It.softwareDecrypt(s,et.key.buffer,et.iv.buffer,Dt);if(n.part>-1){const nn=It.flush();vt=nn&&nn.buffer}if(!vt)return i.executeEnd=vs(),$o(n);s=new Uint8Array(vt)}else return this.asyncResult=!0,this.decryptionPromise=It.webCryptoDecrypt(s,et.key.buffer,et.iv.buffer,Dt).then(vt=>{const $t=this.push(vt,null,n);return this.decryptionPromise=null,$t}),this.decryptionPromise}const ft=this.needsProbing(p,g);if(ft){const It=this.configureTransmuxer(s);if(It)return this.logger.warn(`[transmuxer] ${It.message}`),this.observer.emit(m.ERROR,m.ERROR,{type:pe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,fatal:!1,error:It,reason:It.message}),i.executeEnd=vs(),$o(n)}(p||g||O||ft)&&this.resetInitSegment($e,te,ee,ke,t),(p||O||ft)&&this.resetInitialTimestamp(Se),c||this.resetContiguity();const Pt=this.transmux(s,et,k,A,n);this.asyncResult=Fa(Pt);const mt=this.currentTransmuxState;return mt.contiguous=!0,mt.discontinuity=!1,mt.trackSwitch=!1,i.executeEnd=vs(),Pt}flush(e){const t=e.transmuxing;t.executeStart=vs();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:l}=r;if(n){const g=n.flush();g&&s.push(this.push(g.buffer,null,e))}const{demuxer:d,remuxer:c}=this;if(!d||!c){t.executeEnd=vs();const g=[$o(e)];return this.asyncResult?Promise.resolve(g):g}const p=d.flush(l);return Fa(p)?(this.asyncResult=!0,p.then(g=>(this.flushRemux(s,g,e),s))):(this.flushRemux(s,p,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:l}=t,{accurateTimeOffset:d,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===ie.MAIN?"level":"track"} ${n.level}`);const p=this.remuxer.remux(r,i,s,l,c,d,!0,this.id);e.push({remuxResult:p,chunkMeta:n}),n.transmuxing.executeEnd=vs()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:l}=this;!s||!l||(s.resetInitSegment(e,t,n,r),l.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,n,r,i):s=this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:l,textTrack:d}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,d,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let g=0,A=co.length;g<A;g++){var s;if((s=co[g].demux)!=null&&s.probe(e,this.logger)){i=co[g];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,d=this.remuxer,c=i.remux,p=i.demux;(!d||!(d instanceof c))&&(this.remuxer=new c(n,t,r,this.logger)),(!l||!(l instanceof p))&&(this.demuxer=new p(n,t,r,this.logger),this.probe=p.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new fr(this.config)),e}}function Su(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 Fa(a){return"then"in a&&a.then instanceof Function}class wu{constructor(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null}}class Tu{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let gl=0;class vl{constructor(e,t,n,r){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=d=>{const c=d.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var g;const A=(g=this.workerContext)==null?void 0:g.objectURL;A&&self.URL.revokeObjectURL(A);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=d=>{if(!this.hls)return;const c=new Error(`${d.message} (${d.filename}:${d.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(d,c)=>{c=c||{},c.frag=this.frag||void 0,d===m.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(d,c)};this.observer=new ua,this.observer.on(m.FRAG_DECRYPTED,s),this.observer.on(m.ERROR,s);const l=Zt(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const d=this.hls.logger;if(i.workerPath||Ha()){try{i.workerPath?(d.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=Wa(i.workerPath)):(d.log(`injecting Web Worker for "${t}"`),this.workerContext=Do());const{worker:p}=this.workerContext;p.addEventListener("message",this.onWorkerMessage),p.addEventListener("error",this.onWorkerError),p.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:t,config:yt(i)})}catch(p){d.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new ml(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new ml(this.observer,l,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,n=Zt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:yt(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,n,r,i,s,l,d,c,p){var g,A;c.transmuxing.start=self.performance.now();const{instanceNo:k,transmuxer:O}=this,te=s?s.start:i.start,ee=i.decryptdata,Se=this.frag,ke=!(Se&&i.cc===Se.cc),$e=!(Se&&c.level===Se.level),et=Se?c.sn-Se.sn:-1,ft=this.part?c.part-this.part.index:-1,Pt=et===0&&c.id>1&&c.id===(Se==null?void 0:Se.stats.chunkCount),mt=!$e&&(et===1||et===0&&(ft===1||Pt&&ft<=0)),It=self.performance.now();($e||et||i.stats.parsing.start===0)&&(i.stats.parsing.start=It),s&&(ft||!mt)&&(s.stats.parsing.start=It);const Dt=!(Se&&((g=i.initSegment)==null?void 0:g.url)===((A=Se.initSegment)==null?void 0:A.url)),vt=new Tu(ke,mt,d,$e,te,Dt);if(!mt||ke||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===ie.MAIN?"level":"track"}: ${c.level} id: ${c.id}
discontinuity: ${ke}
trackSwitch: ${$e}
contiguous: ${mt}
accurateTimeOffset: ${d}
timeOffset: ${te}
initSegmentChange: ${Dt}`);const $t=new wu(n,r,t,l,p);this.configureTransmuxer($t)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:k,cmd:"demux",data:e,decryptdata:ee,chunkMeta:c,state:vt},e instanceof ArrayBuffer?[e]:[]);else if(O){const $t=O.push(e,ee,c,vt);Fa($t)?$t.then(nn=>{this.handleTransmuxComplete(nn)}).catch(nn=>{this.transmuxerError(nn,c,"transmuxer-interface push error")}):this.handleTransmuxComplete($t)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const r=n.flush(e);Fa(r)?r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const yl=100;class Au extends Ks{constructor(e,t,n){super(e,t,n,"audio-stream-controller",ie.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===ie.MAIN){const l=t.cc,d=this.fragCurrent;if(this.initPTS[l]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${l} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===Nt.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==l)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&d&&d.cc!==l?(d.abortRequests(),this.syncWithAnchor(t,d)):this.state===Nt.IDLE&&this.tick()}}getLoadPosition(){return!this.startFragRequested&&this.nextLoadPosition>=0?this.nextLoadPosition:super.getLoadPosition()}syncWithAnchor(e,t){var n;const r=((n=this.mainFragLoading)==null?void 0:n.frag)||null;if(t&&(r==null?void 0:r.cc)===t.cc)return;const i=(r||e).cc,s=this.getLevelDetails(),l=this.getLoadPosition(),d=Zn(s,i,l);d&&(this.log(`Syncing with main frag at ${d.start} cc ${d.cc}`),this.startFragRequested=!1,this.nextLoadPosition=d.start,this.resetLoadingState(),this.state===Nt.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Nt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(yl),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Nt.IDLE):this.state=Nt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Nt.IDLE:this.doTickIdle();break;case Nt.WAITING_TRACK:{const{levels:e,trackId:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(r))break;this.state=Nt.WAITING_INIT_PTS}break}case Nt.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case Nt.WAITING_INIT_PTS:{const e=this.waitingData;if(e){const{frag:t,part:n,cache:r,complete:i}=e,s=this.mainAnchor;if(this.initPTS[t.cc]!==void 0){this.waitingData=null,this.state=Nt.FRAG_LOADING;const l=r.flush().buffer,d={frag:t,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(d),i&&super._handleFragmentLoadComplete(d)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=Nt.IDLE}}this.onTickEnd()}resetLoadingState(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(n!=null&&n[i]))return;const l=n[i],d=l.details;if(!d||this.waitForLive(l)||this.waitForCdnTuneIn(d)){this.state=Nt.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,B.AUDIO,ie.AUDIO));const p=this.getFwdBufferInfo(c,ie.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,d)){t.trigger(m.BUFFER_EOS,{type:"audio"}),this.state=Nt.ENDED;return}const g=p.len,A=t.maxBufferLength,k=d.fragments,O=k[0].start,te=this.getLoadPosition(),ee=this.flushing?te:p.end;if(this.switchingTrack&&r){const $e=te;d.PTSKnown&&$e<O&&(p.end>O||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=O+.05)}if(g>=A&&!this.switchingTrack&&ee<k[k.length-1].start)return;let Se=this.getNextFragment(ee,d);if(Se&&this.isLoopLoading(Se,ee)&&(Se=this.getNextFragmentLoopLoading(Se,d,p,ie.MAIN,A)),!Se){this.bufferFlushed=!0;return}let ke=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&ke&&Ne(Se)&&!Se.endList&&(!d.live||!this.loadingParts&&ee<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(ke)===Qt.OK&&(this.mainFragLoading=ke=null),ke&&Ne(ke))){if(Se.start>ke.end){const et=this.fragmentTracker.getFragAtPos(ee,ie.MAIN);et&&et.end>ke.end&&(ke=et,this.mainFragLoading={frag:et,targetBufferTime:null})}if(Se.start>ke.end)return}this.loadFragment(Se,l,ee)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new Mn(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Nt.STOPPED&&(this.setInterval(yl),this.state=Nt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(m.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:l,track:d}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${d.name}" of "${l}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==Nt.STOPPED&&(this.state=Nt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${d.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=r[s];let g=0;if(i.live||(n=p.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var A;g=this.alignPlaylists(i,p.details,(A=this.levelLastLoaded)==null?void 0:A.details)}i.alignedSliding||(As(i,c),i.alignedSliding||Cs(i,c),g=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,g),this.hls.trigger(m.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Nt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Nt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:l,levels:d}=this;if(!d){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const c=d[l];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const p=c.details;if(!p){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const g=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let A=this.transmuxer;A||(A=this.transmuxer=new vl(this.hls,ie.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const k=this.initPTS[n.cc],O=(t=n.initSegment)==null?void 0:t.data;if(k!==void 0){const ee=r?r.index:-1,Se=ee!==-1,ke=new fi(n.level,n.sn,n.stats.chunkCount,i.byteLength,ee,Se);A.push(i,O,g,"",n,r,p.totalduration,!1,ke,k)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${p.startSN} ,${p.endSN}],track ${l}`);const{cache:te}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Aa,complete:!1};te.push(new Uint8Array(i)),this.state!==Nt.STOPPED&&(this.state=Nt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===ie.MAIN&&Ne(t.frag)&&(this.mainFragLoading=t,this.state===Nt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==ie.AUDIO){!this.audioOnly&&n.type===ie.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(Ne(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(m.AUDIO_TRACK_SWITCHED,C({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Nt.ERROR;return}switch(t.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.AUDIO,t);break;case z.AUDIO_TRACK_LOAD_ERROR:case z.AUDIO_TRACK_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Nt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===ce.AUDIO_TRACK&&(this.state=Nt.IDLE);break;case z.BUFFER_ADD_CODEC_ERROR:case z.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case z.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==B.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==B.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Nt.ENDED&&(this.state=Nt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,ie.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:d,part:c,level:p}=l,{details:g}=p,{audio:A,text:k,id3:O,initSegment:te}=i;if(this.fragContextChanged(d)||!g){this.fragmentTracker.removeFragment(d);return}if(this.state=Nt.PARSING,this.switchingTrack&&A&&this.completeAudioSwitch(this.switchingTrack),te!=null&&te.tracks){const ee=d.initSegment||d;if(this.unhandledEncryptionError(te,d))return;this._bufferInitSegment(p,te.tracks,ee,s),r.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:ee,id:n,tracks:te.tracks})}if(A){const{startPTS:ee,endPTS:Se,startDTS:ke,endDTS:$e}=A;c&&(c.elementaryStreams[B.AUDIO]={startPTS:ee,endPTS:Se,startDTS:ke,endDTS:$e}),d.setElementaryStreamInfo(B.AUDIO,ee,Se,ke,$e),this.bufferFragmentData(A,d,c,s)}if(O!=null&&(t=O.samples)!=null&&t.length){const ee=w({id:n,frag:d,details:g},O);r.trigger(m.FRAG_PARSING_METADATA,ee)}if(k){const ee=w({id:n,frag:d,details:g},k);r.trigger(m.FRAG_PARSING_USERDATA,ee)}}_bufferInitSegment(e,t,n,r){if(this.state!==Nt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=ie.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(m.BUFFER_CODECS,t);const l=i.initSegment;if(l!=null&&l.byteLength){const d={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:l};this.hls.trigger(m.BUFFER_APPENDING,d)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===Qt.NOT_LOADED||r===Qt.PARTIAL){var i;if(!Ne(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Nt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&Cs(t.details,s)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l}=this.bufferedTrack;Rn({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,dn)||(Gn(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(m.AUDIO_TRACK_SWITCHED,C({},e))}}class Uo extends q{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const l=r[s];let d;try{d=new self.URL(l.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),d=l.URI||""}if(d===e){i=s;break}else d===e.substring(0,d.length)&&(i=s)}if(i!==-1){const s=r[i],l=parseInt(s["LAST-MSN"])||t.lastPartSn;let d=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const p=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&p>t.partTarget&&(d+=1)}const c=n&&Mr(n);return new dr(l,d>=0?d:void 0,c)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),l=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-l;const d=this.hls.config.timelineOffset;if(d!==r.appliedTimelineOffset){const p=Math.max(d||0,0);r.appliedTimelineOffset=p,r.fragments.forEach(g=>{g.setStart(g.playlistOffset+p)})}if(r.live||n!=null&&n.live){const p="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){oa(n,r,this);const ke=r.playlistParsingError;if(ke){this.warn(ke);const $e=this.hls;if(!$e.config.ignorePlaylistParsingErrors){var c;const{networkDetails:et}=t;$e.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:z.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:ke,reason:ke.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:et,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const g=this.hls.mainForwardBufferInfo,A=g?g.end-g.len:0,k=(r.edge-A)*1e3,O=gr(r,k);if(r.requestScheduled+O<s?r.requestScheduled=s:r.requestScheduled+=O,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let te,ee,Se;if(r.canBlockReload&&r.endSN&&r.advanced){const ke=this.hls.config.lowLatencyMode,$e=r.lastPartSn,et=r.endSN,ft=r.lastPartIndex,Pt=ft!==-1,mt=$e===et;Pt?mt?(ee=et+1,Se=ke?0:ft):(ee=$e,Se=ke?ft+1:r.maxPartIndex):ee=et+1;const It=r.age,Dt=It+r.ageHeader;let vt=Math.min(Dt-r.partTarget,r.targetduration*1.5);if(vt>0){if(Dt>r.targetduration*3)this.log(`Playlist last advanced ${It.toFixed(2)}s ago. Omitting segment and part directives.`),ee=void 0,Se=void 0;else if(n!=null&&n.tuneInGoal&&Dt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${vt} with playlist age: ${r.age}`),vt=0;else{const $t=Math.floor(vt/r.targetduration);if(ee+=$t,Se!==void 0){const nn=Math.round(vt%r.targetduration/r.partTarget);Se+=nn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${It.toFixed(2)}s goal: ${vt} skip sn ${$t} to part ${Se}`)}r.tuneInGoal=vt}if(te=this.getDeliveryDirectives(r,t.deliveryDirectives,ee,Se),ke||!mt){r.requestScheduled=s,this.loadingPlaylist(p,te);return}}else(r.canBlockReload||r.canSkipUntil)&&(te=this.getDeliveryDirectives(r,t.deliveryDirectives,ee,Se));te&&ee!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(O-l*2,O/2)),this.scheduleLoading(p,te,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=r.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const l=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(l)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),l)}getDeliveryDirectives(e,t,n,r){let i=Mr(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=nr.No),new dr(n,r,i)}checkRetry(e){const t=e.details,n=Qn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},d=!!r&&!!l&&(i===xn.RetryRequest||!r.resolved&&i===xn.SendAlternateToPenaltyBox);if(d){var c;if(s>=l.maxNumRetry)return!1;if(n&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const p=Yn(l,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),p),this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" in ${p}ms`)}e.levelRetry=!0,r.resolved=!0}return d}}function _l(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!$a(a[t].attrs,e[t].attrs))return!1;return!0}function $a(a,e,t){const n=a["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>a[r]!==e[r])}function zo(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Cu 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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(l=>(r==null?void 0:r.indexOf(l))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(A=>!n||n.indexOf(A.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(A=>A.default)&&(this.selectDefaultTrack=!1),l.forEach((A,k)=>{A.id=k});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const d=this.hls.config.audioPreference;if(!i&&d){const A=Vt(d,l,dn);if(A>-1)i=l[A];else{const k=Vt(d,this.tracks);i=this.tracks[k]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const p={audioTracks:l};this.log(`Updating audio tracks, ${l.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(m.AUDIO_TRACKS_UPDATED,p);const g=this.trackId;if(c!==-1&&g===-1)this.setAudioTrack(c);else if(l.length&&g===-1){var s;const A=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${l.length}`);this.warn(A.message),this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:A})}}}onError(e,t){t.fatal||!t.context||t.context.type===ce.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&Rn(e,r,dn))return r;const i=Vt(e,this.tracksInGroup,dn);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(r){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const l=cn(e,t.levels,n,s,dn);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=Vt(e,n);if(s>-1)return n[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(m.AUDIO_TRACK_SWITCHING,C({},r)),i))return;const s=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||Rn(e,r,dn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d}=e;for(let c=0;c<t.length;c++){const p=t[c];if(Rn({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d},p,dn))return c}for(let c=0;c<t.length;c++){const p=t[c];if($a(e.attrs,p.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const p=t[c];if($a(e.attrs,p.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Gn(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(m.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class Du{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(i){var n;if(r.onError(i),this.queues===null||this.tracks===null)return;const s=(n=this.tracks[e])==null?void 0:n.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
${this.list("video")}
${this.list("audio")}
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const bl=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,xl="HlsJsTrackRemovedError";class Iu extends Error{constructor(e){super(e),this.name=xl}}class Ru extends q{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:i}=this;n&&this.log("Media source opened"),!(!r||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(m.MEDIA_ATTACHED,{media:r,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=Ue(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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_APPENDING,this.onBufferAppending,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.BUFFER_EOS,this.onBufferEos,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.FRAG_PARSED,this.onFragParsed,this),e.on(m.FRAG_CHANGED,this.onFragChanged,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_APPENDING,this.onBufferAppending,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_EOS,this.onBufferEos,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.FRAG_PARSED,this.onFragParsed,this),e.off(m.FRAG_CHANGED,this.onFragChanged,this),e.off(m.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?w(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=w({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media;this.transferData=this.overrides=void 0;const r=De(this.appendSource);if(r){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(s),i)this._objectUrl=n.src,this.attachTransferred();else{const l=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const d=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||d&&s instanceof d,El(n),Lu(n,l),n.load()}catch(d){n.src=l}else n.src=l}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,l=()=>{Promise.resolve().then(()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()})};if(r&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
required tracks: ${yt(n,(d,c)=>d==="initSegment"?void 0:c)};
transfer tracks: ${yt(r,(d,c)=>d==="initSegment"?void 0:c)}}`),!Be(r,n)){t.mediaSource=null,t.tracks=void 0;const d=e.currentTime,c=this.details,p=Math.max(d,(c==null?void 0:c.fragments[0].start)||0);if(p-d>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${d} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${p} currentTime: ${d}`),this.onMediaDetaching(m.MEDIA_DETACHING,{}),this.onMediaAttaching(m.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(d=>{const c=d,p=r[c];if(p){const g=p.buffer;if(g){const A=this.fragmentTracker,k=p.id;if(A.hasFragments(k)||A.hasParts(k)){const ee=An.getBuffered(g);A.detectEvictedFragments(c,ee,k,null,!0)}const O=jo(c),te=[c,g];this.sourceBuffers[O]=te,g.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,p)}}}),l(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),l()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([l])=>{l&&this.removeBuffer(l)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const l=i.readyState==="open";try{const d=i.sourceBuffers;for(let c=d.length;c--;)l&&d[c].abort(),i.removeSourceBuffer(d[c]);l&&i.endOfStream()}catch(d){this.warn(`onMediaDetaching: ${d.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&El(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(m.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[jo(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new Du(this.tracks)}onBufferCodecs(e,t){var n;const r=this.tracks,i=Object.keys(t);this.log(`BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`);const s="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),l=!s&&this.sourceBufferCount&&this.media&&i.some(d=>!r[d]);if(s||l){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${i}" SourceBuffers`);return}i.forEach(d=>{var c,p;const g=t[d],{id:A,codec:k,levelCodec:O,container:te,metadata:ee,supplemental:Se}=g;let ke=r[d];const $e=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[d],et=$e!=null&&$e.buffer?$e:ke,ft=(et==null?void 0:et.pendingCodec)||(et==null?void 0:et.codec),Pt=et==null?void 0:et.levelCodec;ke||(ke=r[d]={buffer:void 0,listeners:[],codec:k,supplemental:Se,container:te,levelCodec:O,metadata:ee,id:A});const mt=Ft(ft,Pt),It=mt==null?void 0:mt.replace(bl,"$1");let Dt=Ft(k,O);const vt=(p=Dt)==null?void 0:p.replace(bl,"$1");Dt&&mt&&It!==vt&&(d.slice(0,5)==="audio"&&(Dt=ge(Dt,this.appendSource)),this.log(`switching codec ${ft} to ${Dt}`),Dt!==(ke.pendingCodec||ke.codec)&&(ke.pendingCodec=Dt),ke.container=te,this.appendChangeType(d,te,Dt))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&(this.bufferCodecEventsTotal>1&&!this.tracks.video&&!t.video&&((n=t.audio)==null?void 0:n.id)==="main"&&(this.log("Main audio-only"),this.bufferCodecEventsTotal=1),this.mediaSourceOpenOrEnded&&this.checkPendingTracks())}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const l=s.buffer;l!=null&&l.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),l.changeType(r),s.codec=n,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,ie.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const d=this.tracks.video;(this.lastVideoAppendEnd>r||d!=null&&d.buffer&&An.isBuffered(d.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,ie.MAIN))==null?void 0:l.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:l=>{this.warn("Error executing block-audio operation",l)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:l,part:d,chunkMeta:c,offset:p}=t,g=c.buffering[i],{sn:A,cc:k}=l,O=self.performance.now();g.start=O;const te=l.stats.buffering,ee=d?d.stats.buffering:null;te.start===0&&(te.start=O),ee&&ee.start===0&&(ee.start=O);const Se=n.audio;let ke=!1;i==="audio"&&(Se==null?void 0:Se.container)==="audio/mpeg"&&(ke=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const $e=n.video,et=$e==null?void 0:$e.buffer;if(et&&A!=="initSegment"){const mt=d||l,It=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!($e.ending||$e.ended)){const vt=mt.start+mt.duration*.05,$t=et.buffered,nn=this.currentOp("video");!$t.length&&!nn?this.blockAudio(mt):!nn&&!An.isBuffered(et,vt)&&this.lastVideoAppendEnd<vt&&this.blockAudio(mt)}else if(i==="video"){const Dt=mt.end;if(It){const vt=It.frag.start;(Dt>vt||Dt<this.lastVideoAppendEnd||An.isBuffered(et,vt))&&this.unblockAudio()}this.lastVideoAppendEnd=Dt}}const ft=(d||l).start,Pt={label:`append-${i}`,execute:()=>{var mt;g.executeStart=self.performance.now();const It=(mt=this.tracks[i])==null?void 0:mt.buffer;It&&(ke?this.updateTimestampOffset(It,ft,.1,i,A,k):p!==void 0&&_(p)&&this.updateTimestampOffset(It,p,1e-6,i,A,k)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const mt=self.performance.now();g.executeEnd=g.end=mt,te.first===0&&(te.first=mt),ee&&ee.first===0&&(ee.first=mt);const It={};this.sourceBuffers.forEach(([Dt,vt])=>{Dt&&(It[Dt]=An.getBuffered(vt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(m.BUFFER_APPENDED,{type:i,frag:l,part:d,chunkMeta:c,parent:l.type,timeRanges:It})},onError:mt=>{var It;const Dt={type:pe.MEDIA_ERROR,parent:l.type,details:z.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:d,chunkMeta:c,error:mt,err:mt,fatal:!1},vt=(It=this.media)==null?void 0:It.error;if(mt.code===DOMException.QUOTA_EXCEEDED_ERR||mt.name=="QuotaExceededError"||"quota"in mt)Dt.details=z.BUFFER_FULL_ERROR;else if(mt.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!vt)Dt.errorAction=lr(!0);else if(mt.name===xl&&this.sourceBufferCount===0)Dt.errorAction=lr(!0);else{const $t=++this.appendErrors[i];this.warn(`Failed ${$t}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${vt||"no media error"})`),($t>=this.hls.config.appendErrorMaxRetry||vt)&&(Dt.fatal=!0)}this.hls.trigger(m.ERROR,Dt)}};this.log(`queuing "${i}" append sn: ${A}${d?" p: "+d.index:""} of ${l.type===ie.MAIN?"level":"track"} ${l.level} cc: ${k}`),this.append(Pt,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(m.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,r,i),s)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[B.AUDIOVIDEO]?i.push("audiovideo"):(s[B.AUDIO]&&i.push("audio"),s[B.VIDEO]&&i.push("video"));const l=()=>{const d=self.performance.now();n.stats.buffering.end=d,r&&(r.stats.buffering.end=d);const c=r?r.stats:n.stats;this.hls.trigger(m.FRAG_BUFFERED,{frag:n,part:r,stats:c,id:n.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(l,i).catch(d=>{this.warn(`Fragment buffered callback ${d}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{if(e){const t=this.tracks[e];if(t)return!t.ended||t.ending}return!1})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([s])=>{if(s){const l=this.tracks[s];(!t.type||t.type===s)&&(l.ending=!0,l.ended||(l.ended=!0,this.log(`${s} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var l;return s&&!((l=this.tracks[s])!=null&&l.ended)})?r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(m.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(m.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===z.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;_(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,i=n.currentTime,s=t.levelTargetDuration,l=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(_(l)&&l>=0){const c=Math.max(l,s),p=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,p)}const d=r.frontBufferFlushThreshold;if(_(d)&&d>0){const c=Math.max(r.maxBufferLength,d),p=Math.max(c,s),g=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,g)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const l=An.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(m.BACK_BUFFER_REACHED,{bufferEnd:n});const d=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(m.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(d!=null&&d.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=An.getBuffered(i),l=s.length;if(l<2)return;const d=s.start(l-1),c=s.end(l-1);if(n>d||e>=d&&e<=c)return;this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:d,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&n.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),p=Math.max(c,r);return{duration:1/0,start:c,end:p}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return _(i)?{duration:i}:null;const s=this.media.duration,l=_(n.duration)?n.duration:0;return r>l&&r>s||!_(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(_(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${yt(n)}`),this.tracksReady){var r;const i=(r=this.transferData)==null?void 0:r.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(m.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,l=e[s];if(this.isPending(l)){const d=this.getTrackCodec(l,s),c=`${l.container};codecs=${d}`;l.codec=d,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${yt(l)}`);try{const p=n.addSourceBuffer(c),g=jo(s),A=[s,p];t[g]=A,l.buffer=p}catch(p){var r;this.error(`error while trying to add sourceBuffer: ${p.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,sourceBufferName:s,mimeType:c,parent:l.id});return}this.trackSourceBuffer(s,l)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&Re(n,"video")&&(r=wt(r,n));const i=Ft(r,e.levelCodec);return i?t.slice(0,5)==="audio"?ge(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const l=s.removedRanges;l!=null&&l.length&&this.hls.trigger(m.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}updateTimestampOffset(e,t,n,r,i,s){const l=t-e.timestampOffset;Math.abs(l)>=n&&(this.log(`Updating ${r} SourceBuffer timestampOffset to ${t} (sn: ${i} cc: ${s})`),e.timestampOffset=t)}removeExecutor(e,t,n){const{media:r,mediaSource:i}=this,s=this.tracks[e],l=s==null?void 0:s.buffer;if(!r||!i||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const d=_(r.duration)?r.duration:1/0,c=_(i.duration)?i.duration:1/0,p=Math.max(0,t),g=Math.min(n,d,c);g>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${g}] from the ${e} SourceBuffer`),l.remove(p,g)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new Iu(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(s=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function El(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 jo(a){return a==="audio"?1:0}class Go{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&_(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,Go.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const r=(l,d)=>d?l.width!==d.width||l.height!==d.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let l=0;l<e.length;l+=1){const d=e[l];if((d.width>=s||d.height>=s)&&r(d,e[l+1])){i=l;break}}return i}}const Pi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},ku={HLS:"h"};class ls{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof ls?n:new ls(n))),this.value=e,this.params=t}}const Ou="Dict";function Pu(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 Mu(a,e,t,n){return new Error(`failed to ${a} "${Pu(e)}" as ${t}`,{cause:n})}function us(a,e,t){return Mu("serialize",a,e,t)}class Sl{constructor(e){this.description=e}}const wl="Bare Item",Bu="Boolean";function Nu(a){if(typeof a!="boolean")throw us(a,Bu);return a?"?1":"?0"}function Fu(a){return btoa(String.fromCharCode(...a))}const $u="Byte Sequence";function Uu(a){if(ArrayBuffer.isView(a)===!1)throw us(a,$u);return`:${Fu(a)}:`}const zu="Integer";function ju(a){return a<-999999999999999||999999999999999<a}function Tl(a){if(ju(a))throw us(a,zu);return a.toString()}function Gu(a){return`@${Tl(a.getTime()/1e3)}`}function Al(a,e){if(a<0)return-Al(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}const Ku="Decimal";function Hu(a){const e=Al(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw us(a,Ku);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Wu="String",Vu=/[\x00-\x1f\x7f]+/;function Zu(a){if(Vu.test(a))throw us(a,Wu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yu(a){return a.description||a.toString().slice(7,-1)}const Xu="Token";function Cl(a){const e=Yu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw us(e,Xu);return e}function Ko(a){switch(typeof a){case"number":if(!_(a))throw us(a,wl);return Number.isInteger(a)?Tl(a):Hu(a);case"string":return Zu(a);case"symbol":return Cl(a);case"boolean":return Nu(a);case"object":if(a instanceof Date)return Gu(a);if(a instanceof Uint8Array)return Uu(a);if(a instanceof Sl)return Cl(a);default:throw us(a,wl)}}const qu="Key";function Ho(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw us(a,qu);return a}function Wo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Ho(e)}`:`;${Ho(e)}=${Ko(t)}`).join("")}function Dl(a){return a instanceof ls?`${Ko(a.value)}${Wo(a.params)}`:Ko(a)}function Qu(a){return`(${a.value.map(Dl).join(" ")})${Wo(a.params)}`}function Ju(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw us(a,Ou);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof ls||(i=new ls(i));let s=Ho(r);return i.value===!0?s+=Wo(i.params):(s+="=",Array.isArray(i.value)?s+=Qu(i):s+=Dl(i)),s}).join(`,${n}`)}function Il(a,e){return Ju(a,e)}const cs="CMCD-Object",Yr="CMCD-Request",qs="CMCD-Session",Ms="CMCD-Status",e0={br:cs,ab:cs,d:cs,ot:cs,tb:cs,tpb:cs,lb:cs,tab:cs,lab:cs,url:cs,pb:Yr,bl:Yr,tbl:Yr,dl:Yr,ltc:Yr,mtp:Yr,nor:Yr,nrr:Yr,rc:Yr,sn:Yr,sta:Yr,su:Yr,ttfb:Yr,ttfbb:Yr,ttlb:Yr,cmsdd:Yr,cmsds:Yr,smrt:Yr,df:Yr,cs:Yr,ts:Yr,cid:qs,pr:qs,sf:qs,sid:qs,st:qs,v:qs,msd:qs,bs:Ms,bsd:Ms,cdn:Ms,rtp:Ms,bg:Ms,pt:Ms,ec:Ms,e:Ms},t0={REQUEST:Yr};function n0(a){return Object.keys(a).reduce((e,t)=>{var n;return(n=a[t])===null||n===void 0||n.forEach(r=>e[r]=t),e},{})}function r0(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?n0(e):{};return n.reduce((i,s)=>{var l;const d=e0[s]||r[s]||t0.REQUEST,c=(l=i[d])!==null&&l!==void 0?l:i[d]={};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"?_(a):a!=null&&a!==""&&a!==!1}const Rl="event";function a0(a,e){const t=new URL(a),n=new URL(e);if(t.origin!==n.origin)return a;const r=t.pathname.split("/").slice(1),i=n.pathname.split("/").slice(1,-1);for(;r[0]===i[0];)r.shift(),i.shift();for(;i.length;)i.shift(),r.unshift("..");return r.join("/")+t.search+t.hash}const ho=a=>Math.round(a),Vo=(a,e)=>Array.isArray(a)?a.map(t=>Vo(t,e)):a instanceof ls&&typeof a.value=="string"?new ls(Vo(a.value,e),a.params):(e.baseUrl&&(a=a0(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),fo=a=>ho(a/100)*100,o0={br:ho,d:ho,bl:fo,dl:fo,mtp:fo,nor:(a,e)=>{let t=a;return e.version>=2&&(a instanceof ls&&typeof a.value=="string"?t=new ls([a]):typeof a=="string"&&(t=[a])),Vo(t,e)},rtp:fo,tb:ho},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 po(a){return u0.test(a)}function c0(a){return Zo.includes(a)||l0.includes(a)||po(a)}const Ol=["d","dl","nor","ot","rtp","su"];function d0(a){return Zo.includes(a)||Ol.includes(a)||po(a)}const h0=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function f0(a){return Zo.includes(a)||Ol.includes(a)||h0.includes(a)||po(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)||po(a)}const g0={[kl]:f0,[Rl]:c0,[Ll]:d0};function Pl(a,e={}){const t={};if(a==null||typeof a!="object")return t;const n=e.version||a.v||1,r=e.reportingMode||Ll,i=n===1?m0:g0[r];let s=Object.keys(a).filter(i);const l=e.filter;typeof l=="function"&&(s=s.filter(l));const d=r===kl||r===Rl;d&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const c=w({},o0,e.formatters),p={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(g=>{let A=a[g];const k=c[g];if(typeof k=="function"&&(A=k(A,p)),g==="v"){if(n===1)return;A=n}g=="pr"&&A===1||(d&&g==="ts"&&!_(A)&&(A=Date.now()),s0(A)&&(i0(g)&&typeof A=="string"&&(A=new Sl(A)),t[g]=A))}),t}function v0(a,e={}){const t={};if(!a)return t;const n=Pl(a,e),r=r0(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,l])=>{const d=Il(l,{whitespace:!1});return d&&(i[s]=d),i},t)}function y0(a,e,t){return w(a,v0(e,t))}const _0="CMCD";function b0(a,e={}){return a?Il(Pl(a,e),{whitespace:!1}):""}function x0(a,e={}){if(!a)return"";const t=b0(a,e);return encodeURIComponent(t)}function E0(a,e={}){if(!a)return"";const t=x0(a,e);return`${_0}=${t}`}const Ml=/CMCD=[^&#]+/;function S0(a,e,t){const n=E0(e,t);if(!n)return a;if(Ml.test(a))return a.replace(Ml,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class w0{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=r=>{try{this.apply(r,{ot:Pi.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const{frag:i,part:s}=r,l=this.hls.levels[i.level],d=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:d};(d===Pi.VIDEO||d===Pi.AUDIO||d==Pi.MUXED)&&(c.br=l.bitrate/1e3,c.tb=this.getTopBandwidth(d)/1e3,c.bl=this.getBufferLength(d));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(r,c)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHED,this.onMediaDetached,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHED,this.onMediaDetached,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf: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={}){w(t,this.createData());const n=t.ot===Pi.INIT||t.ot===Pi.VIDEO||t.ot===Pi.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((s,l)=>(r.includes(l)&&(s[l]=t[l]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),y0(e.headers,t,i)):e.url=S0(e.url,t,i)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t;const{index:n,fragment:r}=e,i=(t=this.hls.levels[r.level])==null||(t=t.details)==null?void 0:t.partList;if(i){const{sn:s}=r;for(let l=i.length-1;l>=0;l--){const d=i[l];if(d.index===n&&d.fragment.sn===s)return i[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Pi.TIMED_TEXT;if(e.sn==="initSegment")return Pi.INIT;if(t==="audio")return Pi.AUDIO;if(t==="main")return this.hls.audioTracks.length?Pi.VIDEO:Pi.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Pi.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}return n.forEach(i=>{i.bitrate>t&&(t=i.bitrate)}),t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===Pi.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:An.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}}const T0=3e5;class A0 extends q{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===xn.SendAlternateToPenaltyBox&&n.flags===Vn.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:d,type:c}=t.context;l&&r?s=this.getPathwayForGroupId(l,c,s):d&&(s=d)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),t.details===z.BUFFER_APPEND_ERROR&&!t.fatal?n.resolved=!0:n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${yt(i)} penalized: ${yt(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(i=>{r-n[i]>T0&&delete n[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in n)continue;if(s===this.pathwayId)return;const l=this.hls.nextLoadLevel,d=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,oi(t),this.hls.trigger(m.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];d&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===ce.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===ce.SUBTITLE_TRACK&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(i=>{const{ID:s,"BASE-ID":l,"URI-REPLACEMENT":d}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(l).map(p=>{const g=new Cn(p.attrs);g["PATHWAY-ID"]=s;const A=g.AUDIO&&`${g.AUDIO}_clone_${s}`,k=g.SUBTITLES&&`${g.SUBTITLES}_clone_${s}`;A&&(n[g.AUDIO]=A,g.AUDIO=A),k&&(r[g.SUBTITLES]=k,g.SUBTITLES=k);const O=Nl(p.uri,g["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),te=new Mn({attrs:g,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:O,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let ee=1;ee<p.audioGroups.length;ee++)te.addGroupId("audio",`${p.audioGroups[ee]}_clone_${s}`);if(p.subtitleGroups)for(let ee=1;ee<p.subtitleGroups.length;ee++)te.addGroupId("text",`${p.subtitleGroups[ee]}_clone_${s}`);return te});t.push(...c),Bl(this.audioTracks,n,d,s),Bl(this.subtitleTracks,r,d,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(p){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const p=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+p)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},d={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(p,g,A,k)=>{this.log(`Loaded steering manifest: "${r}"`);const O=p.data;if((O==null?void 0:O.VERSION)!==1){this.log(`Steering VERSION ${O.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=O.TTL;const{"RELOAD-URI":te,"PATHWAY-CLONES":ee,"PATHWAY-PRIORITY":Se}=O;if(te)try{this.uri=new self.URL(te,r).href}catch($e){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${te}`);return}this.scheduleRefresh(this.uri||A.url),ee&&this.clonePathways(ee);const ke={steeringManifest:O,url:r.toString()};this.hls.trigger(m.STEERING_MANIFEST_LOADED,ke),Se&&this.updatePathwayPriority(Se)},onError:(p,g,A,k)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${g.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${g.url} no longer available`);return}let O=this.timeToLoad*1e3;if(p.code===429){const te=this.loader;if(typeof(te==null?void 0:te.getResponseHeader)=="function"){const ee=te.getResponseHeader("Retry-After");ee&&(O=parseFloat(ee)*1e3)}this.log(`Steering manifest ${g.url} rate limited`);return}this.scheduleRefresh(this.uri||g.url,O)},onTimeout:(p,g,A)=>{this.log(`Timeout loading steering manifest (${g.url})`),this.scheduleRefresh(this.uri||g.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Bl(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const l=w({},s);return l.details=void 0,l.attrs=new Cn(l.attrs),l.url=l.attrs.URI=Nl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[r],l.attrs["PATHWAY-ID"]=n,l});a.push(...i)})}function Nl(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let l;e&&(l=s==null?void 0:s[e],l&&(a=l));const d=new self.URL(a);return r&&!l&&(d.host=r),i&&Object.keys(i).sort().forEach(c=>{c&&d.searchParams.set(c,i[c])}),d.href}class va extends q{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=va.CDMCleanupPromise?[va.CDMCleanupPromise]:[],this.bannedKeyIds={},this.onMediaEncrypted=t=>{const{initDataType:n,initData:r}=t,i=`"${t.type}" event: init data type: "${n}"`;if(this.debug(i),r!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=ki(this.config));const l=s.map(Vr).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=wi(s);if(n!=="sinf"||l!==$n.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}let d;try{const k=Ke(new Uint8Array(r)),O=Xi(JSON.parse(k).sinf),te=ut(O);if(!te)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=new Uint8Array(te.subarray(8,24))}catch(k){this.warn(`${i} Failed to parse sinf: ${k}`);return}const c=ae(d),{keyIdToKeySessionPromise:p,mediaKeySessions:g}=this;let A=p[c];for(let k=0;k<g.length;k++){const O=g[k],te=O.decryptdata;if(!te.keyId)continue;const ee=ae(te.keyId);if(Jr(d,te.keyId)||te.uri.replace(/-/g,"").indexOf(c)!==-1){if(A=p[ee],!A)continue;if(te.pssh)break;delete p[ee],te.pssh=new Uint8Array(r),te.keyId=d,A=p[c]=A.then(()=>this.generateRequestWithPreferredKeySession(O,n,r,"encrypted-event-key-match")),A.catch(Se=>this.handleError(Se));break}}A||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${g.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(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(m.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(m.DESTROYING,this.onDestroying,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t==null?void 0:t[e];if(r)return r.licenseUrl;if(e===$n.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t==null?void 0:t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(s,l,d)=>!!s&&d.indexOf(s)===l,r=t.map(s=>s.audioCodec).filter(n),i=t.map(s=>s.videoCodec).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,l)=>{const d=c=>{const p=c.shift();this.getMediaKeysPromise(p,r,i).then(g=>s({keySystem:p,mediaKeys:g})).catch(g=>{c.length?d(c):g instanceof ji?l(g):l(new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_ACCESS,error:g,fatal:!0},g.message))})};d(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Ki===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){var r;const i=na(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],l=(r=s)==null?void 0:r.keySystemAccess;if(!l){this.log(`Requesting encrypted media "${e}" key-system access with config: ${yt(i)}`),l=this.requestMediaKeySystemAccess(e,i);const d=s=this.keySystemAccessPromises[e]={keySystemAccess:l};return l.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),l.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const p=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const g=d.mediaKeys=c.createMediaKeys().then(A=>(this.log(`Media-keys created for "${e}"`),d.hasMediaKeys=!0,p.then(k=>k?this.setMediaKeysServerCertificate(A,e,k):A)));return g.catch(A=>{this.error(`Failed to create media-keys for "${e}"}: ${A}`)}),g})}return l.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${ae(e.keyId||[])} keyUri: ${e.uri}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=mo(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}updateKeySession(e,t){const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyId ${ae(e.decryptdata.keyId||[])}
} (data length: ${t.byteLength})`),n.update(t)}getSelectedKeySystemFormats(){return Object.keys(this.keySystemAccessPromises).map(e=>({keySystem:e,hasMediaKeys:this.keySystemAccessPromises[e].hasMediaKeys})).filter(({hasMediaKeys:e})=>!!e).map(({keySystem:e})=>Vr(e)).filter(e=>!!e)}getKeySystemAccess(e){return this.getKeySystemSelectionPromise(e).then(({keySystem:t,mediaKeys:n})=>this.attemptSetMediaKeys(t,n))}selectKeySystem(e){return new Promise((t,n)=>{this.getKeySystemSelectionPromise(e).then(({keySystem:r})=>{const i=Vr(r);i?t(i):n(new Error(`Unable to find format for key-system "${r}"`))}).catch(n)})}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){const t=ki(this.config),n=e.map(wi).filter(r=>!!r&&t.indexOf(r)!==-1);return this.selectKeySystem(n)}getKeyStatus(e){const{mediaKeySessions:t}=this;for(let n=0;n<t.length;n++){const r=C0(e,t[n]);if(r)return r}}loadKey(e){const t=e.keyInfo.decryptdata,n=mo(t),r=this.bannedKeyIds[n];if(r||this.getKeyStatus(t)==="internal-error"){const l=Fl(r||"internal-error",t);return this.handleError(l,e.frag),Promise.reject(l)}const i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);const s=this.keyIdToKeySessionPromise[n];if(!s){const l=this.getKeySystemForKeyPromise(t).then(({keySystem:d,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(d,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:d,mediaKeys:c,decryptdata:t}))))).then(d=>{const c="cenc",p=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(d,c,p,"playlist-key")});return l.catch(d=>this.handleError(d,e.frag)),this.keyIdToKeySessionPromise[n]=l,l}return s.catch(l=>{if(l instanceof ji){const d=C({},l.data);this.getKeyStatus(t)==="internal-error"&&(d.decryptdata=t);const c=new ji(d,l.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 ji){t&&(e.data.frag=t);const n=e.data.decryptdata;this.error(`${e.message}${n?` (${ae(n.keyId||[])})`:""}`),this.hls.trigger(m.ERROR,e.data)}else this.error(e.message),this.hls.trigger(m.ERROR,{type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=mo(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=wi(e.keyFormat),i=r?[r]:ki(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=ki(this.config)),e.length===0)throw new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${yt({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){if(this.mediaResolved=void 0,this.mediaKeys===t)return Promise.resolve();const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).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(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>n.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var i;const s=(i=this.config.drmSystems)==null||(i=i[e.keySystem])==null?void 0:i.generateRequest;if(s)try{const O=s.call(this.hls,t,n,e);if(!O)throw new Error("Invalid response from configured generateRequest filter");t=O.initDataType,n=O.initData?O.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(O){if(this.warn(O.message),this.hls&&this.hls.config.debug)throw O}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const l=mo(e.decryptdata),d=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${l} URI: ${d} (init data type: ${t} length: ${n.byteLength})`);const c=new ua,p=e._onmessage=O=>{const te=e.mediaKeysSession;if(!te){c.emit("error",new Error("invalid state"));return}const{messageType:ee,message:Se}=O;this.log(`"${ee}" message event for session "${te.sessionId}" message size: ${Se.byteLength}`),ee==="license-request"||ee==="license-renewal"?this.renewLicense(e,Se).catch(ke=>{c.eventNames().length?c.emit("error",ke):this.handleError(ke)}):ee==="license-release"?e.keySystem===$n.FAIRPLAY&&this.updateKeySession(e,Mi("acknowledged")).then(()=>this.removeSession(e)).catch(ke=>this.handleError(ke)):this.warn(`unhandled media key message type "${ee}"`)},g=(O,te)=>{te.keyStatus=O;let ee;O.startsWith("usable")?c.emit("resolved"):O==="internal-error"||O==="output-restricted"||O==="output-downscaled"?ee=Fl(O,te.decryptdata):O==="expired"?ee=new Error(`key expired (keyId: ${l})`):O==="released"?ee=new Error("key released"):O==="status-pending"||this.warn(`unhandled key status change "${O}" (keyId: ${l})`),ee&&(c.eventNames().length?c.emit("error",ee):this.handleError(ee))},A=e._onkeystatuseschange=O=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const ee=this.getKeyStatuses(e);if(!Object.keys(ee).some(et=>ee[et]!=="status-pending"))return;if(ee[l]==="expired"){this.log(`Expired key ${yt(ee)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let ke=ee[l];if(ke)g(ke,e);else{var $e;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),($e=e.keyStatusTimeouts)[l]||($e[l]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const ft=this.getKeyStatus(e.decryptdata);if(ft&&ft!=="status-pending")return this.log(`No status for keyId ${l} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${ft} from other session.`),g(ft,e);this.log(`key status for ${l} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),ke="internal-error",g(ke,e)},1e3)),this.log(`No status for keyId ${l} (${yt(ee)}).`)}};li(e.mediaKeysSession,"message",p),li(e.mediaKeysSession,"keystatuseschange",A);const k=new Promise((O,te)=>{c.on("error",te),c.on("resolved",O)});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${l} URI: ${d}`)}).catch(O=>{throw new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_NO_SESSION,error:O,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${O}`)}).then(()=>k).catch(O=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw O}))).then(()=>(c.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const l=r;r=n,n=l}const i="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);if(e.keySystem===$n.PLAYREADY&&i.length===16){const l=ae(i);t[l]=n,sn(i)}const s=ae(i);n==="internal-error"&&(this.bannedKeyIds[s]=n),this.log(`key status change "${n}" for keyStatuses keyId: ${s} key-session "${e.mediaKeysSession.sessionId}"`),t[s]=n}),t}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,l)=>{const d={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(A,k,O,te)=>{s(A.data)},onError:(A,k,O,te)=>{l(new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:O,response:C({url:d.url,data:void 0},A)},`"${e}" certificate request failed (${i}). Status: ${A.code} (${A.text})`))},onTimeout:(A,k,O)=>{l(new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:O,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(A,k,O)=>{l(new Error("aborted"))}};r.load(d,p,g)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_SESSION_UPDATE_FAILED,decryptdata:e.decryptdata,error:r,fatal:!1},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let p;for(let g=0,A=i.length;g<A;g++){var s,l;p=i[g];const k=(s=p.querySelector("name"))==null?void 0:s.textContent,O=(l=p.querySelector("value"))==null?void 0:l.textContent;k&&O&&e.setRequestHeader(k,O)}}const d=r.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Mi(atob(c))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)}).catch(s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let d=l.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,l,s,e)}catch(p){this.error(p)}r(d)}else{const d=n.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)i(new ji({type:pe.KEY_SYSTEM_ERROR,details:z.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:l,response:{url:s,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${s}). Status: ${l.status} (${l.statusText})`));else{const p=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${p} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,s,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==$n.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)}).catch(i)})}onDestroying(){this.unregisterListeners(),this._clear()}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,li(n,"encrypted",this.onMediaEncrypted),li(n,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=n.mediaKeys}onMediaDetached(){const e=this.media;e&&(vi(e,"encrypted",this.onMediaEncrypted),vi(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 n=this.media,r=this.mediaKeySessions.slice();this.mediaKeySessions=[],this.mediaKeys=null,_i.clearKeyUriToKeyIdMap();const i=r.length;va.CDMCleanupPromise=Promise.all(r.map(s=>this.removeSession(s)).concat((n==null||(e=n.setMediaKeys(null))==null?void 0:e.catch(s=>{this.log(`Could not clear media keys: ${s}`),this.hls&&this.hls.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:z.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(m.ERROR,{type:pe.OTHER_ERROR,details:z.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 n=t.reduce((r,i)=>(r.indexOf(i.keyFormat)===-1&&r.push(i.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n,decryptdata:r}=e;if(t){this.log(`Remove licenses and keys and close session "${t.sessionId}" keyId: ${ae((r==null?void 0:r.keyId)||[])}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);i>-1&&this.mediaKeySessions.splice(i,1);const{keyStatusTimeouts:s}=e;s&&Object.keys(s).forEach(c=>self.clearTimeout(s[c]));const{drmSystemOptions:l}=this.config;return(ra(l)?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(m.ERROR,{type:pe.OTHER_ERROR,details:z.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(m.ERROR,{type:pe.OTHER_ERROR,details:z.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}va.CDMCleanupPromise=void 0;function mo(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return ae(a.keyId)}function C0(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 ji 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 Fl(a,e){const t=a==="output-restricted",n=t?z.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:z.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new ji({type:pe.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class D0{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,d=1e3*s/i,c=this.hls;if(c.trigger(m.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),d>0&&s>c.config.fpsDroppedMonitoringThreshold*l){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(m.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function $l(a,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function 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(n){le.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,a.addCue(r)}catch(r){le.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function ya(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let n=a.cues.length;n--;)e&&a.cues[n].removeEventListener("enter",e),a.removeCue(a.cues[n]);t==="disabled"&&(a.mode=t)}function Yo(a,e,t,n){const r=a.mode;if(r==="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++)(!n||n(i[s]))&&a.removeCue(i[s])}r==="disabled"&&(a.mode=r)}function I0(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let n=0,r=t,i;for(;n<=r;)if(i=Math.floor((r+n)/2),e<a[i].startTime)r=i-1;else if(e>a[i].startTime&&n<t)n=i+1;else return i;return a[n].startTime-e<e-a[r].startTime?n:r}function R0(a,e,t){const n=[],r=I0(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const l=a[i];if(l.startTime>=e&&l.endTime<=t)n.push(l);else if(l.startTime>t)return n}return n}function go(a){const e=[];for(let t=0;t<a.length;t++){const n=a[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(a[t])}return e}class 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 n=go(this.media.textTracks);for(let i=0;i<n.length;i++)if(n[i].mode==="hidden")t=n[i];else if(n[i].mode==="showing"){t=n[i];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;go(n.textTracks).forEach(s=>{ya(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(s=>(r==null?void 0:r.indexOf(s))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(p=>!n||n.indexOf(p.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(p=>p.default)&&(this.selectDefaultTrack=!1),s.forEach((p,g)=>{p.id=g});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const p=Vt(l,s);if(p>-1)i=s[p];else{const g=Vt(l,this.tracks);i=this.tracks[g]}}let d=this.findTrackId(i);d===-1&&i&&(d=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(m.SUBTITLE_TRACKS_UPDATED,c),d!==-1&&this.trackId===-1&&this.setSubtitleTrack(d)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if(!(n&&!i.default||!n&&!e)&&(!e||Rn(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if($a(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if($a(e.attrs,i.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(zo(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ce.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&Rn(e,n))return n;const r=Vt(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=Vt(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(m.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=go(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>zo(n,i))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==r&&(i.mode="disabled")}),r){const i=this.subtitleDisplay?"showing":"hidden";r.mode!==i&&(r.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!_(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:l="",name:d,type:c,url:p}=r;this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:d,type:c,url:p});const g=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(g)}}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,r=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?i:i&3|8).toString(16)})}}}function Ua(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const _a=.025;let vo=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function O0(a,e,t){return`${a.identifier}-${t+1}-${Ua(e)}`}class P0{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){var t;if(e>0&&e>=this.assetList.length)return!0;const n=this.playoutLimit;return e<=0||isNaN(n)?!1:n===0?!0:(((t=this.assetList[e])==null?void 0:t.startOffset)||0)>n}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return Xo(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=Xo(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=_(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return Xo(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<_a))}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"?vo.Range:vo.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 M0(this)}}function Xo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<_a)?e.start:e.start+e.duration}function zl(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function qo(a,e){for(;(t=a.assetList[++e])!=null&&t.error;)var t;return e}function M0(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function ba(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class B0{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{this.reachedPlayout(this.currentTime)&&this.hls&&this.hls.trigger(m.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(m.LEVEL_LOADED,s),i.once(m.AUDIO_TRACK_LOADED,s),i.once(m.SUBTITLE_TRACK_LOADED,s),i.on(m.MEDIA_ATTACHING,(l,{media:d})=>{this.removeMediaListeners(),this.mediaAttached=d,this.interstitial.playoutLimit&&(d.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(m.BUFFER_APPENDED,()=>{const p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,i.trigger(m.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(n){}e.loadSource(t)}}bufferedInPlaceToEnd(e){var t;if(!this.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e)return!1;const n=Math.min(this._bufferedEosTime||1/0,this.duration),r=this.timelineOffset,i=An.bufferInfo(e,r,0);return this.getAssetTime(i.end)>=n-.02}reachedPlayout(e){const n=this.interstitial.playoutLimit;return this.startOffset+e>=n}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=An.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;if(!e)return 0;const t=this.interstitial.playoutLimit;if(t){const n=t-this.startOffset;if(n>0&&n<e)return n}return e}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4&&this.hls){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls&&this.hls.destroy(),this.hls=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){var t;this.loadSource(),(t=this.hls)==null||t.attachMedia(e)}detachMedia(){var e;this.removeMediaListeners(),this.mediaAttached=null,(e=this.hls)==null||e.detachMedia()}resumeBuffering(){var e;(e=this.hls)==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.hls)==null||e.pauseBuffering()}transferMedia(){var e;return this.bufferSnapShot(),((e=this.hls)==null?void 0:e.transferMedia())||null}resetDetails(){const e=this.hls;if(e&&this.hasDetails){e.stopLoad();const t=n=>delete n.details;e.levels.forEach(t),e.allAudioTracks.forEach(t),e.allSubtitleTracks.forEach(t),this.hasDetails=!1}}on(e,t,n){var r;(r=this.hls)==null||r.on(e,t)}once(e,t,n){var r;(r=this.hls)==null||r.once(e,t)}off(e,t,n){var r;(r=this.hls)==null||r.off(e,t)}toString(){var e;return`HlsAssetPlayer: ${ba(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const jl=.033;class N0 extends q{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(i=r[n])!=null&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const i=n[r].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let i=0;i<r;i++){const s=n[i];if(!s.error){const l=s.timelineStart;if(t===l||t>l&&(t<l+(s.duration||0)||i===r-1))return i}}return 0}get assetIdAtEnd(){var e;const t=(e=this.items)==null||(e=e[this.length-1])==null?void 0:e.event;if(t){const n=t.assetList,r=n[n.length-1];if(r)return r.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),l=Object.keys(r),d=i?i.filter(c=>!l.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const g=c.cue.pre,A=c.cue.post,k=p.cue.pre,O=p.cue.post;if(g&&!k)return-1;if(k&&!g||A&&!O)return 1;if(O&&!A)return-1;if(!g&&!k&&!A&&!O){const te=c.startTime,ee=p.startTime;if(te!==ee)return te-ee}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,d.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,d)}updateSchedule(e,t=[],n=!1){const r=this.events||[];if(r.length||t.length||this.length<2){const i=this.items,s=this.parseSchedule(r,e);(n||t.length||(i==null?void 0:i.length)!==s.length||s.some((d,c)=>Math.abs(d.playout.start-i[c].playout.start)>.005||Math.abs(d.playout.end-i[c].playout.end)>.005))&&(this.items=s,this.onScheduleUpdate(t,i))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=i[s],d=e[l];if(d.isInterstitial){let c=this.eventMap[l];c?c.setDateRange(d):(c=new P0(d,t),this.eventMap[l]=c,n===!1&&(c.appendInPlace=n)),r.push(c)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if(e=e.filter(d=>!d.error&&!(d.cue.once&&d.hasPlayed)),e.length){this.resolveOffsets(e,t);let d=0,c=0;if(e.forEach((p,g)=>{const A=p.cue.pre,k=p.cue.post,O=e[g-1]||null,te=p.appendInPlace,ee=k?i:p.startOffset,Se=p.duration,ke=p.timelineOccupancy===vo.Range?Se:0,$e=p.resumptionOffset,et=(O==null?void 0:O.startTime)===ee,ft=ee+p.cumulativeDuration;let Pt=te?ft+Se:ee+$e;if(A||!k&&ee<=0){const It=c;c+=ke,p.timelineStart=ft;const Dt=s;s+=Se,n.push({event:p,start:ft,end:Pt,playout:{start:Dt,end:s},integrated:{start:It,end:c}})}else if(ee<=i){if(!et){const vt=ee-d;if(vt>jl){const $t=d,nn=c;c+=vt;const hn=s;s+=vt;const Tn={previousEvent:e[g-1]||null,nextEvent:p,start:$t,end:$t+vt,playout:{start:hn,end:s},integrated:{start:nn,end:c}};n.push(Tn)}else vt>0&&O&&(O.cumulativeDuration+=vt,n[n.length-1].end=ee)}k&&(Pt=ft),p.timelineStart=ft;const It=c;c+=ke;const Dt=s;s+=Se,n.push({event:p,start:ft,end:Pt,playout:{start:Dt,end:s},integrated:{start:It,end:c}})}else return;const mt=p.resumeTime;k||mt>i?d=i:d=mt}),d<i){var l;const p=d,g=c,A=i-d;c+=A;const k=s;s+=A,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:d,end:p+A,playout:{start:k,end:s},integrated:{start:g,end:c}})}this.setDurations(i,s,c)}else n.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((l,d)=>{const c=l.cue.pre,p=l.cue.post,g=c?0:p?r:l.startTime;this.updateAssetDurations(l),s===g?l.cumulativeDuration=i:(i=0,s=g),!p&&l.snapOptions.in&&(l.resumeAnchor=qn(null,n.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.appendInPlace&&d+1<e.length&&e[d+1].startTime-e[d].resumeTime<jl&&(e[d+1].appendInPlace=!1,e[d+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const k=_(l.resumeOffset)?l.resumeOffset:l.duration;i+=k})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>_a?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const l=t[s].details,d=l.edge;if(n>=d)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${d}`),!1;const c=qn(null,l.fragments,n);if(!c)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${l.fragStart}-${l.fragmentEnd})`),!0;const p=s==="audio"?.175:0;return Math.abs(c.start-n)<_a+p||Math.abs(c.end-n)<_a+p?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`),!0)})}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;for(let s=0;s<e.assetList.length;s++){const l=e.assetList[s],d=t+n;l.startOffset=n,l.timelineStart=d,r||(r=l.duration===null),i||(i=!!l.error);const c=l.error?0:l.duration||0;n+=c}r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function ts(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class F0{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=zl(n,this.hls.sessionId,e.baseUrl)}catch(A){const k=this.assignAssetListError(e,z.ASSET_LIST_LOAD_ERROR,A,n);this.hls.trigger(m.ERROR,k);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=new s(i),d={responseType:"json",url:r.href},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(A,k,O,te)=>{const ee=A.data,Se=ee==null?void 0:ee.ASSETS;if(!Array.isArray(Se)){const ke=this.assignAssetListError(e,z.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),O.url,k,te);this.hls.trigger(m.ERROR,ke);return}e.assetListResponse=ee,this.hls.trigger(m.ASSET_LIST_LOADED,{event:e,assetListResponse:ee,networkDetails:te})},onError:(A,k,O,te)=>{const ee=this.assignAssetListError(e,z.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${A.code} ${A.text} (${k.url})`),k.url,te,O);this.hls.trigger(m.ERROR,ee)},onTimeout:(A,k,O)=>{const te=this.assignAssetListError(e,z.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${k.url})`),k.url,A,O);this.hls.trigger(m.ERROR,te)}};return l.load(d,p,g),this.hls.trigger(m.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:pe.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Gl(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function yo(a,e){return`[${a}] Advancing timeline position to ${e}`}class $0 extends q{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled||!this.schedule)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const s=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const l=this.playingItem;if(!l){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<l.start||n>=l.end){var d;const k=this.findItemIndex(l);let O=this.schedule.findItemIndexAtTime(n);if(O===-1&&(O=k+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${k} to ${O})`)),!this.isInterstitial(l)&&(d=this.media)!=null&&d.paused&&(this.shouldPlay=!1),!s&&O>k){const te=this.schedule.findJumpRestrictedIndex(k+1,O);if(te>k){this.setSchedulePosition(te);return}}this.setSchedulePosition(O);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const k=l.event.assetList[0];k&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,k))}return}const p=c.timelineStart,g=c.duration||0;if(s&&n<p||n>=p+g){var A;(A=l.event)!=null&&A.appendInPlace&&(this.clearAssetPlayers(l.event,l),this.flushFrontBuffer(n)),this.setScheduleToAssetAtTime(n,c)}},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const l=this.findItemIndex(r);this.setSchedulePosition(l+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);n>=s&&this.setScheduleToAssetAtTime(n,i)},this.onScheduleUpdate=(n,r)=>{const i=this.schedule;if(!i)return;const s=this.playingItem,l=i.events||[],d=i.items||[],c=i.durations,p=n.map(te=>te.identifier),g=!!(l.length||p.length);(g||r)&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
Schedule: ${d.map(te=>ts(te))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let A=null,k=null;s&&(A=this.updateItem(s,this.timelinePos),this.itemsMatch(s,A)?this.playingItem=A:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const O=this.bufferingItem;if(O&&(k=this.updateItem(O,this.bufferedPos),this.itemsMatch(O,k)?this.bufferingItem=k:O.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(O.event,null))),n.forEach(te=>{te.assetList.forEach(ee=>{this.clearAssetPlayer(ee.identifier,null)})}),this.playerQueue.forEach(te=>{if(te.interstitial.appendInPlace){const ee=te.assetItem.timelineStart,Se=te.timelineOffset-ee;if(Se)try{te.timelineOffset=ee}catch(ke){Math.abs(Se)>_a&&this.warn(`${ke} ("${te.assetId}" ${te.timelineOffset}->${ee})`)}}}),g||r){if(this.hls.trigger(m.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:d.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(A,s),O&&k!==A&&this.trimInPlace(k,O),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new F0(e),this.schedule=new N0(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(m.MEDIA_ENDED,this.onMediaEnded,this),e.on(m.ERROR,this.onError,this),e.on(m.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(m.MEDIA_ENDED,this.onMediaEnded,this),e.off(m.ERROR,this.onError,this),e.off(m.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.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){vi(e,"play",this.onPlay),vi(e,"pause",this.onPause),vi(e,"seeking",this.onSeeking),vi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;li(n,"seeking",this.onSeeking),li(n,"timeupdate",this.onTimeupdate),li(n,"play",this.onPlay),li(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=g=>g&&e.getAssetPlayer(g.identifier),r=(g,A,k,O,te)=>{if(g){let ee=g[A].start;const Se=g.event;if(Se){if(A==="playout"||Se.timelineOccupancy!==vo.Point){const ke=n(k);(ke==null?void 0:ke.interstitial)===Se&&(ee+=ke.assetItem.startOffset+ke[te])}}else{const ke=O==="bufferedPos"?s():e[O];ee+=ke-g.start}return ee}return 0},i=(g,A)=>{var k;if(g!==0&&A!=="primary"&&(k=e.schedule)!=null&&k.length){var O;const te=e.schedule.findItemIndexAtTime(g),ee=(O=e.schedule.items)==null?void 0:O[te];if(ee){const Se=ee[A].start-ee.start;return g+Se}}return g},s=()=>{const g=e.bufferedPos;return g===Number.MAX_VALUE?l("primary"):Math.max(g,0)},l=g=>{var A,k;return(A=e.primaryDetails)!=null&&A.live?e.primaryDetails.edge:((k=e.schedule)==null?void 0:k.durations[g])||0},d=(g,A)=>{var k,O;const te=e.effectivePlayingItem;if(te!=null&&(k=te.event)!=null&&k.restrictions.skip||!e.schedule)return;e.log(`seek to ${g} "${A}"`);const ee=e.effectivePlayingItem,Se=e.schedule.findItemIndexAtTime(g,A),ke=(O=e.schedule.items)==null?void 0:O[Se],$e=e.getBufferingPlayer(),et=$e==null?void 0:$e.interstitial,ft=et==null?void 0:et.appendInPlace,Pt=ee&&e.itemsMatch(ee,ke);if(ee&&(ft||Pt)){const mt=n(e.playingAsset),It=(mt==null?void 0:mt.media)||e.primaryMedia;if(It){const Dt=A==="primary"?It.currentTime:r(ee,A,e.playingAsset,"timelinePos","currentTime"),vt=g-Dt,$t=(ft?Dt:It.currentTime)+vt;if($t>=0&&(!mt||ft||$t<=mt.duration)){It.currentTime=$t;return}}}if(ke){let mt=g;if(A!=="primary"){const Dt=ke[A].start,vt=g-Dt;mt=ke.start+vt}const It=!e.isInterstitial(ke);if((!e.isInterstitial(ee)||ee.event.appendInPlace)&&(It||ke.event.appendInPlace)){const Dt=e.media||(ft?$e==null?void 0:$e.media:null);Dt&&(Dt.currentTime=mt)}else if(ee){const Dt=e.findItemIndex(ee);if(Se>Dt){const $t=e.schedule.findJumpRestrictedIndex(Dt+1,Se);if($t>Dt){e.setSchedulePosition($t);return}}let vt=0;if(It)e.timelinePos=mt,e.checkBuffer();else{const $t=ke.event.assetList,nn=g-(ke[A]||ke).start;for(let hn=$t.length;hn--;){const Tn=$t[hn];if(Tn.duration&&nn>=Tn.startOffset&&nn<Tn.startOffset+Tn.duration){vt=hn;break}}}e.setSchedulePosition(Se,vt)}}},c=()=>{const g=e.effectivePlayingItem;if(e.isInterstitial(g))return g;const A=t();return e.isInterstitial(A)?A:null},p={get bufferedEnd(){const g=t(),A=e.bufferingItem;if(A&&A===g){var k;return r(A,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-A.playout.start||((k=e.bufferingAsset)==null?void 0:k.startOffset)||0}return 0},get currentTime(){const g=c(),A=e.effectivePlayingItem;return A&&A===g?r(A,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-A.playout.start:0},set currentTime(g){const A=c(),k=e.effectivePlayingItem;k&&k===A&&d(g+k.playout.start,"playout")},get duration(){const g=c();return g?g.playout.end-g.playout.start:0},get assetPlayers(){var g;const A=(g=c())==null?void 0:g.event.assetList;return A?A.map(k=>e.getAssetPlayer(k.identifier)):[]},get playingIndex(){var g;const A=(g=c())==null?void 0:g.event;return A&&e.effectivePlayingAsset?A.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var g;return((g=e.schedule)==null||(g=g.events)==null?void 0:g.slice(0))||[]},get schedule(){var g;return((g=e.schedule)==null||(g=g.items)==null?void 0:g.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 g=t();return e.findItemIndex(g)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const g=e.effectivePlayingItem;return e.findItemIndex(g)},primary:{get bufferedEnd(){return s()},get currentTime(){const g=e.timelinePos;return g>0?g:0},set currentTime(g){d(g,"primary")},get duration(){return l("primary")},get seekableStart(){var g;return((g=e.primaryDetails)==null?void 0:g.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(g){d(g,"integrated")},get duration(){return l("integrated")},get seekableStart(){var g;return i(((g=e.primaryDetails)==null?void 0:g.fragmentStart)||0,"integrated")}},skip:()=>{const g=e.effectivePlayingItem,A=g==null?void 0:g.event;if(A&&!A.restrictions.skip){const k=e.findItemIndex(g);if(A.appendInPlace){const O=g.playout.start+g.event.duration;d(O+.001,"playout")}else e.advanceAfterAssetEnded(A,k,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let r=this.media;!r&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(r=this.primaryMedia);const i=(t=r)==null?void 0:t.currentTime;if(!(i===void 0||!_(i)))return i}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${yt(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,l=e!==s,d=l&&e.interstitial.appendInPlace,c=(n=this.detachedData)==null?void 0:n.mediaSource;let p;if(s.media)d&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const O=this.getBufferingPlayer();O?(i=O.transferMedia(),p=`${O}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${yt(i)}`);else if(!this.detachedData||s.media===t){const O=this.playerQueue;O.length>1&&O.forEach(te=>{if(l&&te.interstitial.appendInPlace!==d){const ee=te.interstitial;this.clearInterstitial(te.interstitial,null),ee.appendInPlace=!1,ee.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${ee}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const g=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",A=g&&i?i:t;this.log(`${g?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const k=this.schedule;if(A===i&&k){const O=l&&e.assetId===k.assetIdAtEnd;A.overrides={duration:k.duration,endOfStream:!l||O,cueRemoval:!l}}e.attachMedia(A)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e==null?void 0:e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.log(yo("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,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}else if(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAssetBuffering(e,t){const n=e.event,r=n.findAssetIndex(t),i=qo(n,r);if(!n.isAssetPastPlayoutLimit(i))this.bufferedToEvent(e,i);else if(this.schedule){var s;const l=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];l&&this.bufferedToItem(l)}}advanceAfterAssetEnded(e,t,n){const r=qo(e,n);if(e.isAssetPastPlayoutLimit(r)){if(this.schedule){const i=this.schedule.items;if(i){const s=t+1,l=i.length;if(s>=l){this.setSchedulePosition(-1);return}const d=e.resumeTime;this.timelinePos<d&&(this.log(yo("advanceAfterAssetEnded",d)),this.timelinePos=d,e.appendInPlace&&this.advanceInPlace(d),this.checkBuffer(this.bufferedPos<d)),this.setSchedulePosition(s)}}}else{if(e.appendInPlace){const i=e.assetList[r];i&&this.advanceInPlace(i.timelineStart)}this.setSchedulePosition(t,r)}}setScheduleToAssetAtTime(e,t){const n=this.schedule;if(!n)return;const r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),l=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,l-1)}}setSchedulePosition(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(!r||this.playbackDisabled)return;const i=e>=0?r[e]:null;this.log(`setSchedulePosition ${e}, ${t} (${i&&ts(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,l=this.playingLastItem;if(this.isInterstitial(s)){const p=s.event,g=this.playingAsset,A=g==null?void 0:g.identifier,k=A?this.getAssetPlayer(A):null;if(k&&A&&(!this.eventItemsMatch(s,i)||t!==void 0&&A!==p.assetList[t].identifier)){var d;const O=p.findAssetIndex(g);if(this.log(`INTERSTITIAL_ASSET_ENDED ${O+1}/${p.assetList.length} ${ba(g)}`),this.endedAsset=g,this.playingAsset=null,this.hls.trigger(m.INTERSTITIAL_ASSET_ENDED,{asset:g,assetListIndex:O,event:p,schedule:r.slice(0),scheduleIndex:e,player:k}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),O);return}this.retreiveMediaSource(A,i),k.media&&!((d=this.detachedData)!=null&&d.mediaSource)&&k.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${p} ${ts(s)}`),p.hasPlayed=!0,this.hls.trigger(m.INTERSTITIAL_ENDED,{event:p,schedule:r.slice(0),scheduleIndex:e}),p.cue.once)){var c;this.updateSchedule();const O=(c=this.schedule)==null?void 0:c.items;if(i&&O){const te=this.findItemIndex(i);this.advanceSchedule(te,O,t,s,l)}return}}this.advanceSchedule(e,r,t,s,l)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const l=t[e]||null,d=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(p=>{const g=p.interstitial,A=s.findEventIndex(g.identifier);(A<e||A>e+1)&&this.clearInterstitial(g,l)}),this.isInterstitial(l)){this.timelinePos=Math.min(Math.max(this.timelinePos,l.start),l.end);const p=l.event;if(n===void 0){n=s.findAssetIndex(p,this.timelinePos);const O=qo(p,n-1);if(p.isAssetPastPlayoutLimit(O)||p.appendInPlace&&this.timelinePos===l.end){this.advanceAfterAssetEnded(p,e,n);return}n=O}const g=this.waitingItem;this.assetsBuffered(l,d)||this.setBufferingItem(l);let A=this.preloadAssets(p,n);if(this.eventItemsMatch(l,g||r)||(this.waitingItem=l,this.log(`INTERSTITIAL_STARTED ${ts(l)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(m.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),!d){this.log(`Waiting for attachMedia to start Interstitial ${p}`);return}this.waitingItem=this.endedItem=null,this.playingItem=l;const k=p.assetList[n];if(!k){this.advanceAfterAssetEnded(p,e,n||0);return}if(A||(A=this.getAssetPlayer(k.identifier)),A===null||A.destroyed){const O=p.assetList.length;this.warn(`asset ${n+1}/${O} player destroyed ${p}`),A=this.createAssetPlayer(p,k,n),A.loadSource()}if(!this.eventItemsMatch(l,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(k))return;this.startAssetPlayer(A,n,t,e,d),this.shouldPlay&&Gl(A.media)}else l?(this.resumePrimary(l,e,r),this.shouldPlay&&Gl(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(s.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e;return(e=this.mediaSelection)==null?void 0:e.main.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r,i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${ts(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let l=this.timelinePos;(l<e.start||l>=e.end)&&(l=this.getPrimaryResumption(e,t),this.log(yo("resumePrimary",l)),this.timelinePos=l),this.attachPrimary(l,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${ts(e)}`),this.hls.trigger(m.INTERSTITIALS_PRIMARY_RESUMED,{schedule:s.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:An.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.log(yo("attachPrimary",e)),this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){var e;this.stopLoad(),(e=this.schedule)==null||e.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(m.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(m.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1||!this.schedule)return;const n=this.hls.levels[t.level];if(!n.details)return;const r=C(C({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=C(C({},this.altSelection),{},{audio:n});return}const i=C(C({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=C(C({},this.altSelection),{},{subtitles:n});return}const i=C(C({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=jt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=jt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setSubtitleOption(t)||t.id!==-1&&r.setSubtitleOption(n)))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){if(!this.schedule)return;const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const i=t[r];if(i.cue.post){var n;const s=this.schedule.findEventIndex(i.identifier),l=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(l)&&this.eventItemsMatch(l,this.bufferingItem)&&this.bufferedToItem(l,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){var n;const r=(n=this.schedule)==null?void 0:n.items;if(e&&r){const i=this.findItemIndex(e,t);return r[i]||null}return null}trimInPlace(e,t){if(this.isInterstitial(e)&&e.event.appendInPlace&&t.end-e.end>.25){e.event.assetList.forEach((i,s)=>{e.event.isAssetPastPlayoutLimit(s)&&this.clearAssetPlayer(i.identifier,null)});const n=e.end+.25,r=An.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${ts(e)} (was ${ts(t)})`),this.attachPrimary(n,null,!0),this.flushFrontBuffer(n))}}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e&&this.schedule?this.schedule.findItemIndex(e,t):-1}updateSchedule(e=!1){var t;const n=this.mediaSelection;n&&((t=this.schedule)==null||t.updateSchedule(n,[],e))}checkBuffer(e){var t;const n=(t=this.schedule)==null?void 0:t.items;if(!n)return;const r=An.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,n,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e||!r)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,l=this.findItemIndex(s);let d=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const p=this.findItemIndex(i),g=Math.min(p+1,t.length-1),A=t[g];if((d===-1&&i&&e>=i.end||(c=A.event)!=null&&c.appendInPlace&&e+.01>=A.start)&&(d=g),this.isInterstitial(i)){const k=i.event;if(g-l>1&&k.appendInPlace===!1||k.assetList.length===0&&k.assetListLoader)return}if(this.bufferedPos=e,d>p&&d>l)this.bufferedToItem(A);else{const k=this.primaryDetails;this.primaryLive&&k&&e>k.edge-k.targetduration&&A.start<k.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(A)&&this.preloadAssets(A.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(d===l?this.bufferedToItem(s):d===l+1&&this.bufferedToItem(t[d]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const i=this.getAssetPlayer(r.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(!this.itemsMatch(e,t)&&n){const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),l=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const d=l?l.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${ts(e)}`+(t?` (${d.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((p,g)=>{const A=this.getAssetPlayer(p.identifier);A&&(g===c&&A.loadSource(),A.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(m.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}else this.bufferingItem!==e&&(this.bufferingItem=e);return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,i=n.cue.once;if(r||!i){const s=this.preloadAssets(n,t);if(s!=null&&s.interstitial.appendInPlace){const l=this.primaryMedia;l&&this.bufferAssetPlayer(s,l)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const d=e.timelineStart;if(e.appendInPlace){var l;const A=this.playingItem;!this.isInterstitial(A)&&(A==null||(l=A.nextEvent)==null?void 0:l.identifier)===e.identifier&&this.flushFrontBuffer(d+.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 A=p-d;A>0&&(c=Math.round(A*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${c?` live-start: ${p} start-offset: ${c}`:""}`),n)return this.createAsset(e,0,0,d,e.duration,n);const g=this.assetListLoader.loadAssetList(e,c);g&&(e.assetListLoader=g)}else if(!s&&r){for(let c=t;c<r;c++){const p=e.assetList[c],g=this.getAssetPlayerQueueIndex(p.identifier);(g===-1||this.playerQueue[g].destroyed)&&!p.error&&this.createAssetPlayer(e,p,c)}const d=e.assetList[t];if(d){const c=this.getAssetPlayer(d.identifier);return c&&c.loadSource(),c}}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,i,s){const l={parentIdentifier:e.identifier,identifier:O0(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const l=r.loadLevelObj||r.levels[r.currentLevel];(s||l)&&(s=w({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));const d=r.audioTracks[r.audioTrack],c=r.subtitleTracks[r.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const et=this.timelinePos-t.timelineStart;if(et>1){const ft=t.duration;ft&&et<ft&&(p=et)}}const g=t.identifier,A=C(C({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:g,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:p,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:d||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(A.timelineOffset=t.timelineStart));const k=A.cmcd;k!=null&&k.sessionId&&k.contentId&&(A.cmcd=w({},k,{contentId:Ua(t.uri)})),this.getAssetPlayer(g)&&this.warn(`Duplicate date range identifier ${e} and asset ${g}`);const O=new B0(this.HlsPlayerClass,A,e,t);this.playerQueue.push(O),e.assetList[n]=t;let te=!0;const ee=et=>{if(et.live){var ft;const It=new Error(`Interstitials MUST be VOD assets ${e}`),Dt={fatal:!0,type:pe.OTHER_ERROR,details:z.INTERSTITIAL_ASSET_ITEM_ERROR,error:It},vt=((ft=this.schedule)==null?void 0:ft.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Dt,e,vt,n,It.message);return}const Pt=et.edge-et.fragmentStart,mt=t.duration;(te||mt===null||Pt>mt)&&(te=!1,this.log(`Interstitial asset "${g}" duration change ${mt} > ${Pt}`),t.duration=Pt,this.updateSchedule())};O.on(m.LEVEL_UPDATED,(et,{details:ft})=>ee(ft)),O.on(m.LEVEL_PTS_UPDATED,(et,{details:ft})=>ee(ft)),O.on(m.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const Se=(et,ft)=>{const Pt=this.getAssetPlayer(g);if(Pt&&ft.tracks){Pt.off(m.BUFFER_CODECS,Se),Pt.tracks=ft.tracks;const mt=this.primaryMedia;this.bufferingAsset===Pt.assetItem&&mt&&!Pt.media&&this.bufferAssetPlayer(Pt,mt)}};O.on(m.BUFFER_CODECS,Se);const ke=()=>{var et;const ft=this.getAssetPlayer(g);if(this.log(`buffered to end of asset ${ft}`),!ft||!this.schedule)return;const Pt=this.schedule.findEventIndex(e.identifier),mt=(et=this.schedule.items)==null?void 0:et[Pt];this.isInterstitial(mt)&&this.advanceAssetBuffering(mt,t)};O.on(m.BUFFERED_TO_END,ke);const $e=et=>()=>{if(!this.getAssetPlayer(g)||!this.schedule)return;this.shouldPlay=!0;const Pt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Pt,et)};return O.once(m.MEDIA_ENDED,$e(n)),O.once(m.PLAYOUT_LIMIT_REACHED,$e(1/0)),O.on(m.ERROR,(et,ft)=>{if(!this.schedule)return;const Pt=this.getAssetPlayer(g);if(ft.details===z.BUFFER_STALLED_ERROR){if(Pt!=null&&Pt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(ft,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${ft.error} ${e}`)}),O.on(m.DESTROYING,()=>{if(!this.getAssetPlayer(g)||!this.schedule)return;const ft=new Error(`Asset player destroyed unexpectedly ${g}`),Pt={fatal:!0,type:pe.OTHER_ERROR,details:z.INTERSTITIAL_ASSET_ITEM_ERROR,error:ft};this.handleAssetItemError(Pt,e,this.schedule.findEventIndex(e.identifier),n,ft.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${ba(t)}`),this.hls.trigger(m.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:O}),O}clearInterstitial(e,t){this.clearAssetPlayers(e,t),e.reset()}clearAssetPlayers(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)})}resetAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);if(t!==-1){this.log(`reset asset player "${e}" after error`);const n=this.playerQueue[t];this.transferMediaFromPlayer(n,null),n.resetDetails()}}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){const r=this.playerQueue[n];this.log(`clear ${r} toSegment: ${t&&ts(t)}`),this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:l,assetId:d}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!p||p.identifier!==d)&&(p&&(this.clearAssetPlayer(p.identifier,n[r]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${ba(l)}`),this.hls.trigger(m.INTERSTITIAL_ASSET_STARTED,{asset:l,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;if(!this.schedule)return;const{interstitial:i,assetItem:s}=e,l=this.schedule.findEventIndex(i.identifier),d=(n=this.schedule.items)==null?void 0:n[l];if(!d)return;e.loadSource(),this.setBufferingItem(d),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 g=(c==null?void 0:c.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(p&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(g&&!Be(g,e.tracks)){const A=new Error(`Asset ${ba(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(g)}')`),k={fatal:!0,type:pe.OTHER_ERROR,details:z.INTERSTITIAL_ASSET_ITEM_ERROR,error:A},O=i.findAssetIndex(s);this.handleAssetItemError(k,i,l,O,A.message);return}}this.transferMediaTo(e,t)}handleInPlaceStall(e){const t=this.schedule,n=this.primaryMedia;if(!t||!n)return;const r=n.currentTime,i=t.findAssetIndex(e,r),s=e.assetList[i];if(s){const l=this.getAssetPlayer(s.identifier);if(l){const d=l.currentTime||r-s.timelineStart,c=l.duration-d;if(this.warn(`Stalled at ${d} of ${d+c} in ${l} ${e} (media.currentTime: ${r})`),d&&(c/n.playbackRate<.5||l.bufferedInPlaceToEnd(n))&&l.hls){const p=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,p,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===z.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&ba(s)} ${e.error}`),!this.schedule)return;const l=(s==null?void 0:s.identifier)||"",d=this.getAssetPlayerQueueIndex(l),c=this.playerQueue[d]||null,p=this.schedule.items,g=w({},e,{fatal:!1,errorAction:lr(!0),asset:s,assetListIndex:r,event:t,schedule:p,scheduleIndex:n,player:c});if(this.hls.trigger(m.INTERSTITIAL_ASSET_ERROR,g),!e.fatal)return;const A=this.playingAsset,k=this.bufferingAsset,O=new Error(i);if(s&&(this.clearAssetPlayer(l,null),s.error=O),!t.assetList.some(te=>!te.error))t.error=O;else for(let te=r;te<t.assetList.length;te++)this.resetAssetPlayer(t.assetList[te].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):A&&A.identifier===l?this.advanceAfterAssetEnded(t,n,r):k&&k.identifier===l&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,k)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;let r=this.timelinePos;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${r} playing: ${ts(n)} error: ${e.error}`),r===-1&&(r=this.hls.startPosition);const s=this.updateItem(n,r);this.itemsMatch(n,s)&&this.clearInterstitial(e,null),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t))}else if(r===-1){this.checkStart();return}if(!this.schedule)return;const i=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(i)}onAssetListLoaded(e,t){var n,r;const i=t.event,s=i.identifier,l=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const d=i.timelineStart,c=i.duration;let p=0;l.forEach((te,ee)=>{const Se=parseFloat(te.DURATION);this.createAsset(i,ee,p,d+p,Se,te.URI),p+=Se}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const g=this.waitingItem,A=(g==null?void 0:g.event.identifier)===s;this.updateSchedule();const k=(r=this.bufferingItem)==null?void 0:r.event;if(A){var O;const te=this.schedule.findEventIndex(s),ee=(O=this.schedule.items)==null?void 0:O[te];if(ee){if(!this.playingItem&&this.timelinePos>ee.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==te){i.error=new Error(`Interstitial ${l.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(ee)}this.setSchedulePosition(te)}else if((k==null?void 0:k.identifier)===s){const te=i.assetList[0];if(te){const ee=this.getAssetPlayer(te.identifier);if(k.appendInPlace){const Se=this.primaryMedia;ee&&Se&&this.bufferAssetPlayer(ee,Se)}else ee&&ee.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case z.ASSET_LIST_PARSING_ERROR:case z.ASSET_LIST_LOAD_ERROR:case z.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case z.BUFFER_STALLED_ERROR:{const n=this.endedItem||this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&n.event.appendInPlace){this.handleInPlaceStall(n.event);return}this.log(`Primary player stall @${this.timelinePos} bufferedPos: ${this.bufferedPos}`),this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Kl=500;class U0 extends Ks{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",ie.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Nt.IDLE,this.setInterval(Kl),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(this.fragContextChanged(n)||(Ne(n)&&(this.fragPrevious=n),this.state=Nt.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const l=n.start;for(let c=0;c<i.length;c++)if(l>=i[c].start&&l<=i[c].end){s=i[c];break}const d=n.start+n.duration;s?s.end=d:(s={start:l,end:d},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let l=0;l<s.length;){if(s[l].end<=i){s.shift();continue}else if(s[l].start<i)s[l].start=i;else break;l++}}),this.fragmentTracker.removeFragmentsInRange(n,i,ie.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===ie.SUBTITLE&&(t.details===z.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Nt.STOPPED&&(this.state=Nt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&_l(this.levels,t)){this.levels=t.map(n=>new Mn(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new Mn(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ie.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==Nt.STOPPED&&this.setInterval(Kl)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:l}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${l}`);return}const d=i[l];if(l>=i.length||!d)return;this.log(`Subtitle track ${l} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(n=d.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const g=this.mainDetails;if(!g){this.startFragRequested=!1;return}const A=g.fragments[0];if(!d.details)s.hasProgramDateTime&&g.hasProgramDateTime?(Cs(s,g),c=s.fragmentStart):A&&(c=A.start,js(s,c));else{var p;c=this.alignPlaylists(s,d.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&A&&(c=A.start,js(s,c))}g&&!this.startFragRequested&&this.setStartPosition(g,c)}d.details=s,this.levelLastLoaded=d,l===r&&(this.hls.trigger(m.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Nt.IDLE&&(qn(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),d.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&pi(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Gi(r.method)).catch(l=>{throw i.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const d=performance.now();i.trigger(m.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:d}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=Nt.IDLE})}}doTick(){if(!this.media){this.state=Nt.IDLE;return}if(this.state===Nt.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=An.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:l,len:d}=s,c=n.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(d>p)return;const g=c.fragments,A=g.length,k=c.edge;let O=null;const te=this.fragPrevious;if(l<k){const ke=r.maxFragLookUpTolerance,$e=l>k-ke?0:ke;O=qn(te,g,Math.max(g[0].start,l),$e),!O&&te&&te.start<g[0].start&&(O=g[0])}else O=g[A-1];if(O=this.filterReplacedPrimary(O,n.details),!O)return;const ee=O.sn-c.startSN,Se=g[ee-1];if(Se&&Se.cc===O.cc&&this.fragmentTracker.getState(Se)===Qt.NOT_LOADED&&(O=Se),this.fragmentTracker.getState(O)===Qt.NOT_LOADED){const ke=this.mapToInitFragWhenRequired(O);ke&&this.loadFragment(ke,n,l)}}}loadFragment(e,t,n){Ne(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new z0(this.tracksBuffered[this.currentTrackId]||[])}}class z0{constructor(e){this.buffered=void 0;const t=(n,r,i)=>{if(r=r>>>0,r>i-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${i})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const j0={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},Hl=a=>String.fromCharCode(j0[a]||a),ns=15,ys=100,G0={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},K0={17:2,18:4,21:6,22:8,23:10,19:13,20:15},H0={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},W0={25:2,26:4,29:6,30:8,31:10,27:13,28:15},V0=["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 n=typeof t=="function"?t():t;le.log(`${this.time} [${e}] ${n}`)}}}const Qs=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class Wl{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Y0{constructor(){this.uchar=" ",this.penState=new Wl}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 X0{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Wl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ys;t++)this.chars.push(new Y0);this.logger=e}equals(e){for(let t=0;t<ys;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ys;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ys;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>ys&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ys)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Hl(e);if(this.pos>=ys){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<ys;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<ys;n++){const r=this.chars[n].uchar;r!==" "&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Qo{constructor(e){this.rows=[],this.currRow=ns-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ns;t++)this.rows.push(new X0(e));this.logger=e}reset(){for(let e=0;e<ns;e++)this.rows[e].clear();this.currRow=ns-1}equals(e){let t=!0;for(let n=0;n<ns;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<ns;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ns;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+yt(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let l=0;l<ns;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,d=this.logger.time;if(l!==null&&d!==null&&l<d)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[s].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+yt(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let i=0;i<ns;i++){const s=this.rows[i].getTextString();s&&(r=i+1,e?t.push("Row "+r+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
`)),n}getTextAndFormat(){return this.rows}}class Vl{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Qo(n),this.nonDisplayedMemory=new Qo(n),this.lastOutputScreen=new Qo(n),this.currRollUpRow=this.displayedMemory.rows[ns-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[ns-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+yt(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,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Q0(),this.logger=void 0;const r=this.logger=new Z0;this.channels=[null,new Vl(e,t,r),new Vl(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,i=t[n+1]&127;let s=!1,l=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+Qs([t[n],t[n+1]])+"] -> ("+Qs([r,i])+")");const d=this.cmdHistory;if(r>=16&&r<=31){if(q0(r,i,d)){_o(null,null,d),this.logger.log(3,()=>"Repeated command ("+Qs([r,i])+") is dropped");continue}_o(r,i,this.cmdHistory),s=this.parseCmd(r,i),s||(s=this.parseMidrow(r,i)),s||(s=this.parsePAC(r,i)),s||(s=this.parseBackgroundAttributes(r,i))}else _o(null,null,d);if(!s&&(l=this.parseChars(r,i),l)){const p=this.currentChannel;p&&p>0?this.channels[p].insertChars(l):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!l&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Qs([r,i])+" orig: "+Qs([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Qs([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(r||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?n=s===1?G0[e]:H0[e]:n=s===1?K0[e]:W0[e];const l=this.channels[s];return l?(l.setPAC(this.interpretPAC(n,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+Hl(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+Qs(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=V0[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const l=e<=23?1:2;return this.channels[l].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}_o(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function _o(a,e,t){t.a=a,t.b=e}function q0(a,e,t){return t.a===a&&t.b===e}function Q0(){return{a:null,b:null}}var Jo=function(){if(pr!=null&&pr.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,d){if(typeof d!="string"||!Array.isArray(l))return!1;const c=d.toLowerCase();return~l.indexOf(c)?c:!1}function n(l){return t(a,l)}function r(l){return t(e,l)}function i(l,...d){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const g in p)l[g]=p[g]}return l}function s(l,d,c){const p=this,g={enumerable:!0};p.hasBeenReset=!1;let A="",k=!1,O=l,te=d,ee=c,Se=null,ke="",$e=!0,et="auto",ft="start",Pt=50,mt="middle",It=50,Dt="middle";Object.defineProperty(p,"id",i({},g,{get:function(){return A},set:function(vt){A=""+vt}})),Object.defineProperty(p,"pauseOnExit",i({},g,{get:function(){return k},set:function(vt){k=!!vt}})),Object.defineProperty(p,"startTime",i({},g,{get:function(){return O},set:function(vt){if(typeof vt!="number")throw new TypeError("Start time must be set to a number.");O=vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},g,{get:function(){return te},set:function(vt){if(typeof vt!="number")throw new TypeError("End time must be set to a number.");te=vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},g,{get:function(){return ee},set:function(vt){ee=""+vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},g,{get:function(){return Se},set:function(vt){Se=vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},g,{get:function(){return ke},set:function(vt){const $t=n(vt);if($t===!1)throw new SyntaxError("An invalid or illegal string was specified.");ke=$t,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},g,{get:function(){return $e},set:function(vt){$e=!!vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},g,{get:function(){return et},set:function(vt){if(typeof vt!="number"&&vt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");et=vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},g,{get:function(){return ft},set:function(vt){const $t=r(vt);if(!$t)throw new SyntaxError("An invalid or illegal string was specified.");ft=$t,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},g,{get:function(){return Pt},set:function(vt){if(vt<0||vt>100)throw new Error("Position must be between 0 and 100.");Pt=vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},g,{get:function(){return mt},set:function(vt){const $t=r(vt);if(!$t)throw new SyntaxError("An invalid or illegal string was specified.");mt=$t,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},g,{get:function(){return It},set:function(vt){if(vt<0||vt>100)throw new Error("Size must be between 0 and 100.");It=vt,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},g,{get:function(){return Dt},set:function(vt){const $t=r(vt);if(!$t)throw new SyntaxError("An invalid or illegal string was specified.");Dt=$t,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(n,r,i,s){return(n|0)*3600+(r|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class ec{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function Xl(a,e,t,n){const r=n?a.split(n):[a];for(const i in r){if(typeof r[i]!="string")continue;const s=r[i].split(t);if(s.length!==2)continue;const l=s[0],d=s[1];e(l,d)}}const el=new Jo(0,0,""),bo=el.align==="middle"?"middle":"center";function tc(a,e,t){const n=a;function r(){const l=Yl(a);if(l===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),l}function i(l,d){const c=new ec;Xl(l,function(A,k){let O;switch(A){case"region":for(let te=t.length-1;te>=0;te--)if(t[te].id===k){c.set(A,t[te].region);break}break;case"vertical":c.alt(A,k,["rl","lr"]);break;case"line":O=k.split(","),c.integer(A,O[0]),c.percent(A,O[0])&&c.set("snapToLines",!1),c.alt(A,O[0],["auto"]),O.length===2&&c.alt("lineAlign",O[1],["start",bo,"end"]);break;case"position":O=k.split(","),c.percent(A,O[0]),O.length===2&&c.alt("positionAlign",O[1],["start",bo,"end","line-left","line-right","auto"]);break;case"size":c.percent(A,k);break;case"align":c.alt(A,k,["start",bo,"end","left","right"]);break}},/:/,/\s/),d.region=c.get("region",null),d.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&el.line===-1&&(p=-1),d.line=p,d.lineAlign=c.get("lineAlign","start"),d.snapToLines=c.get("snapToLines",!0),d.size=c.get("size",100),d.align=c.get("align",bo);let g=c.get("position","auto");g==="auto"&&el.position===50&&(g=d.align==="start"||d.align==="left"?0:d.align==="end"||d.align==="right"?100:50),d.position=g}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function ql(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class nc{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 n(){let i=t.buffer,s=0;for(i=ql(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
`;)++s;const l=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
`&&++s,t.buffer=i.slice(s),l}function r(i){Xl(i,function(s,l){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const l=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(l!=null&&l[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new 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(l){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const l=i.indexOf("-->")!==-1;if(!i||l&&(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 rc=/\r\n|\n\r|\n|\r/g,tl=function(e,t,n=0){return e.slice(n,n+t.length)===t},ic=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!_(t)||!_(n)||!_(r)||!_(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function nl(a,e,t){return Ua(a.toString())+Ua(e.toString())+Ua(t)}const sc=function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n};function ac(a,e,t,n,r,i,s){const l=new nc,d=rt(new Uint8Array(a)).trim().replace(rc,`
`).split(`
`),c=[],p=e?os(e.baseTime,e.timescale):0;let g="00:00.000",A=0,k=0,O,te=!0;l.oncue=function(ee){const Se=t[n];let ke=t.ccOffset;const $e=(A-p)/9e4;if(Se!=null&&Se.new&&(k!==void 0?ke=t.ccOffset=Se.start:sc(t,n,$e)),$e){if(!e){O=new Error("Missing initPTS for VTT MPEGTS");return}ke=$e-t.presentationOffset}const et=ee.endTime-ee.startTime,ft=Di((ee.startTime+ke-k)*9e4,r*9e4)/9e4;ee.startTime=Math.max(ft,0),ee.endTime=Math.max(ft+et,0);const Pt=ee.text.trim();ee.text=decodeURIComponent(encodeURIComponent(Pt)),ee.id||(ee.id=nl(ee.startTime,ee.endTime,Pt)),ee.endTime>0&&c.push(ee)},l.onparsingerror=function(ee){O=ee},l.onflush=function(){if(O){s(O);return}i(c)},d.forEach(ee=>{if(te)if(tl(ee,"X-TIMESTAMP-MAP=")){te=!1,ee.slice(16).split(",").forEach(Se=>{tl(Se,"LOCAL:")?g=Se.slice(6):tl(Se,"MPEGTS:")&&(A=parseInt(Se.slice(7)))});try{k=ic(g)/1e3}catch(Se){O=Se}return}else ee===""&&(te=!1);l.parse(ee+`
`)}),l.flush()}const rl="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,n){const r=he(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(l=>rt(l)),s=Ui(e.baseTime,1,e.timescale);try{i.forEach(l=>t(lc(l,s)))}catch(l){n(l)}}function lc(a,e){const r=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((g,A)=>(g[A]=r.getAttribute(`ttp:${A}`)||i[A],g),{}),l=r.getAttribute("xml:space")!=="preserve",d=tu(il(r,"styling","style")),c=tu(il(r,"layout","region")),p=il(r,"body","[begin]");return[].map.call(p,g=>{const A=nu(g,l);if(!A||!g.hasAttribute("begin"))return null;const k=al(g.getAttribute("begin"),s),O=al(g.getAttribute("dur"),s);let te=al(g.getAttribute("end"),s);if(k===null)throw ru(g);if(te===null){if(O===null)throw ru(g);te=k+O}const ee=new Jo(k-e,te-e,A);ee.id=nl(ee.startTime,ee.endTime,ee.text);const Se=c[g.getAttribute("region")],ke=d[g.getAttribute("style")],$e=uc(Se,ke,d),{textAlign:et}=$e;if(et){const ft=oc[et];ft&&(ee.lineAlign=ft),ee.align=et}return w(ee,$e),ee}).filter(g=>g!==null)}function il(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function tu(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function nu(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
`:(i=n.childNodes)!=null&&i.length?nu(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function uc(a,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(r=t[s]),i.reduce((l,d)=>{const c=sl(e,n,d)||sl(a,n,d)||sl(r,n,d);return c&&(l[d]=c),l},{})}function sl(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function ru(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=dc(a,e))),t}function cc(a,e){const t=Ql.exec(a),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function dc(a,e){const t=Jl.exec(a),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class xo{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class hc{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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new xo(this,"textTrack1"),t=new xo(this,"textTrack2"),n=new xo(this,"textTrack3"),r=new xo(this,"textTrack4");this.cea608Parser1=new Zl(1,e,t),this.cea608Parser2=new Zl(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let l=i.length;l--;){const d=i[l],c=fc(d[0],d[1],t,n);if(c>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),s=!0,c/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,n,r)}else{const l=this.Cues.newCue(null,t,n,r);this.hls.trigger(m.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:l}=this;n===ie.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),l.length&&(this.unparsedVttFrags=[],l.forEach(d=>{this.initPTS[d.frag.cc]?this.onFragLoaded(m.FRAG_LOADED,d):this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:d.frag,error:new Error("Subtitle discontinuity domain does not match main")})}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(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:n,media:r}=this,{label:i,languageCode:s}=t[e],l=this.getExistingTrack(i,s);if(l)n[e]=l,ya(n[e]),$l(n[e],r);else{const d=this.createTextTrack("captions",i,s);d&&(d[e]=!0,n[e]=d)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(i=>{ya(r[i]),delete r[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 n=0;n<t.length;n++)ya(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===rl);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(_l(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,l=s?go(s.textTracks):null;if(this.tracks.forEach((d,c)=>{let p;if(l){let g=null;for(let A=0;A<l.length;A++)if(l[A]&&su(l[A],d)){g=l[A],l[A]=null;break}g&&(p=g)}if(p)ya(p);else{const g=iu(d);p=this.createTextTrack(g,d.name,d.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),l!=null&&l.length){const d=l.filter(c=>c!==null).map(c=>c.label);d.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${d.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===ie.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:d,sn:c}=t.frag,p=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(c!==l+1||c===l&&p!==this.lastPartIndex+1||d!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=d,this.lastSn=c,this.lastPartIndex=p}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===ie.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=this.tracks[n.level],d=this.vttCCs;d[n.cc]||(d[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),l&&l.textCodec===rl?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;eu(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,l=i.length-1;if(!i[n.cc]&&l===-1){s.push(e);return}const d=this.hls,c=(t=n.initSegment)!=null&&t.data?gt(n.initSegment.data,new Uint8Array(r)).buffer:r;ac(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,p=>{this._appendCues(p,n.level),d.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},p=>{const g=p.message==="Missing initPTS for VTT MPEGTS";g?s.push(e):this._fallbackToIMSC1(n,r),d.logger.log(`Failed to parse VTT cue: ${p}`),!(g&&l>n.cc)&&d.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:p})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||eu(t,this.initPTS[e.cc],()=>{n.textCodec=rl,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(i=>Ul(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(m.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===ie.SUBTITLE&&this.onFragLoaded(m.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===ie.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let i=0;i<r.length;i++){const s=r[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const l=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,l[0]),this.cea608Parser2.addData(r[i].pts,l[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(!(!s||s.currentTime<n)){if(!i||i==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(d=>Yo(l[d],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(d=>Yo(l[d],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],l=127&e[r++],d=127&e[r++];if(l===0&&d===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(l),t[p].push(d))}}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,n){return Math.min(e,n)-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,n){const r=[];let i,s,l,d,c;const p=self.VTTCue||self.TextTrackCue;for(let A=0;A<n.rows.length;A++)if(i=n.rows[A],l=!0,d=0,c="",!i.isEmpty()){var g;for(let te=0;te<i.chars.length;te++)pc.test(i.chars[te].uchar)&&l?d++:(c+=i.chars[te].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const k=ql(c.trim()),O=nl(e,t,k);a!=null&&(g=a.cues)!=null&&g.getCueById(O)||(s=new p(e,t,k),s.id=O,s.line=A+1,s.align="left",s.position=10+Math.min(80,Math.floor(d*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((A,k)=>A.line==="auto"||k.line==="auto"?0:A.line>8&&k.line>8?k.line-A.line:A.line-k.line),r.forEach(A=>Ul(a,A))),r}};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||xc,this.controller=new self.AbortController,this.stats=new E}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const i=yc(e,this.controller.signal),s=e.responseType==="arraybuffer",l=s?"byteLength":"length",{maxTimeToFirstByteMs:d,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=d&&_(d)?d:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Fa(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(g=>{var A;this.response=this.loader=g;const k=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},c-(k-r.loading.start)),!g.ok){const{status:te,statusText:ee}=g;throw new Ec(ee||"fetch, bad network response",te,g)}r.loading.first=k,r.total=bc(g.headers)||r.total;const O=(A=this.callbacks)==null?void 0:A.onProgress;return O&&_(t.highWaterMark)?this.loadProgressively(g,r,e,t.highWaterMark,O):s?g.arrayBuffer():e.responseType==="json"?g.json():g.text()}).then(g=>{var A,k;const O=this.response;if(!O)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const te=g[l];te&&(r.loaded=r.total=te);const ee={url:O.url,data:g,code:O.status},Se=(A=this.callbacks)==null?void 0:A.onProgress;Se&&!_(t.highWaterMark)&&Se(r,e,g,O),(k=this.callbacks)==null||k.onSuccess(ee,r,e,O)}).catch(g=>{var A;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const k=g&&g.code||0,O=g?g.message:null;(A=this.callbacks)==null||A.onError({code:k,text:O},e,g?g.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new Aa,l=e.body.getReader(),d=()=>l.read().then(c=>{if(c.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const p=c.value,g=p.length;return t.loaded+=g,g<r||s.dataLength?(s.push(p),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,p.buffer,e),d()}).catch(()=>Promise.reject());return d()}}function yc(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(w({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function _c(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 n=_c(e);if(_(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function xc(a,e){return new self.Request(a.url,e)}class Ec extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const Sc=/^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 E,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return i(n,t.url)}).catch(s=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),i(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(s=>{var l;(l=this.callbacks)==null||l.onError({code:n.status,text:s.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=n.loadPolicy;if(r)for(const l in r)e.setRequestHeader(l,r[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=i&&_(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const c=t.status,p=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const O=p!=null?p:t.response;if(O!=null){var s,l;n.loading.end=Math.max(self.performance.now(),n.loading.first);const te=t.responseType==="arraybuffer"?O.byteLength:O.length;n.loaded=n.total=te,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const ee=(s=this.callbacks)==null?void 0:s.onProgress;ee&&ee(n,e,O,t);const Se={url:t.responseURL,data:O,code:c};(l=this.callbacks)==null||l.onSuccess(Se,n,e,t);return}}const g=i.loadPolicy.errorRetry,A=n.retry,k={url:e.url,data:void 0,code:c};if(Br(g,A,!1,k))this.retry(g);else{var d;le.error(`${c} while loading ${e.url}`),(d=this.callbacks)==null||d.onError({code:c,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Br(e,t,!0))this.retry(e);else{var n;le.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=Yn(e,n.retry),n.retry++,le.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&Sc.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const wc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Tc=C(C({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:Hn,bufferController:Ru,capLevelController:Go,errorController:Ar,fpsController:D0,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:Ki,requireKeySystemAccessOnStart:!1,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,preserveManualLevelOnError:!1,certLoadPolicy:{default:wc},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},Ac()),{},{subtitleStreamController:U0,subtitleTrackController:L0,timelineController:hc,audioStreamController:Au,audioTrackController:Cu,emeController:va,cmcdController:w0,contentSteeringController:A0,interstitialsController:$0});function Ac(){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 Cc(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=ol(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const l=`${s==="level"?"playlist":s}LoadPolicy`,d=e[l]===void 0,c=[];i.forEach(p=>{const g=`${s}Loading${p}`,A=e[g];if(A!==void 0&&d){c.push(g);const k=n[l].default;switch(e[l]={default:k},p){case"TimeOut":k.maxLoadTimeMs=A,k.maxTimeToFirstByteMs=A;break;case"MaxRetry":k.errorRetry.maxNumRetry=A,k.timeoutRetry.maxNumRetry=A;break;case"RetryDelay":k.errorRetry.retryDelayMs=A,k.timeoutRetry.retryDelayMs=A;break;case"MaxRetryTimeout":k.errorRetry.maxRetryDelayMs=A,k.timeoutRetry.maxRetryDelayMs=A;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${yt(e[l])}`)}),C(C({},n),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 Dc(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 Eo=2,Ic=.1,Rc=.05,Lc=100;class kc extends hi{constructor(e,t){super("gap-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(Lc),this.mediaSource=t.mediaSource;const n=this.media=t.media;li(n,"playing",this.onMediaPlaying),li(n,"waiting",this.onMediaWaiting),li(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(vi(n,"playing",this.onMediaPlaying),vi(n,"waiting",this.onMediaWaiting),vi(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const i=(n=this.hls)==null?void 0:n.config;if(!i)return;const s=this.media;if(!s)return;const{seeking:l}=s,d=this.seeking&&!l,c=!this.seeking&&l,p=s.paused&&!l||s.ended||s.playbackRate===0;if(this.seeking=l,e!==t){t&&(this.ended=0),this.moved=!0,l||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!p&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||d){d&&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(m.MEDIA_ENDED,{stalled:!1}));return}if(!An.getBuffered(s).length){this.nudgeRetry=0;return}const g=An.bufferInfo(s,e,0),A=g.nextStart||0,k=this.fragmentTracker;if(l&&k&&this.hls){const Pt=uu(this.hls.inFlightFragments,e),mt=g.len>Eo,It=!A||Pt||A-e>Eo&&!k.getPartialFragment(e);if(mt||It)return;this.moved=!1}const O=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&k){if(!(g.len>0)&&!A)return;const mt=Math.max(A,g.start||0)-e,Dt=!!(O!=null&&O.live)?O.targetduration*2:Eo,vt=So(e,k);if(mt>0&&(mt<=Dt||vt)){s.paused||this._trySkipBufferHole(vt);return}}const te=i.detectStallWithCurrentTimeMs,ee=self.performance.now(),Se=this.waiting;let ke=this.stalled;if(ke===null)if(Se>0&&ee-Se<te)ke=this.stalled=Se;else{this.stalled=ee;return}const $e=ee-ke;if(!l&&($e>=te||Se)&&this.hls){var et;if(((et=this.mediaSource)==null?void 0:et.readyState)==="ended"&&!(O!=null&&O.live)&&Math.abs(e-((O==null?void 0:O.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(g),!this.media||!this.hls)return}const ft=An.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(ft,$e,e)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(m.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const i=An.bufferedInfo(An.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=An.timeRangesToArray(r),l=An.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const d=An.bufferedInfo(s,e,0).bufferedIndex,c=s[l].end,p=s[l+1].start;if((d===-1||d>l)&&p-c<1&&e-c<2){const g=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${d}`);this.warn(g.message),this.media.currentTime+=1e-6;let A=So(e,this.fragmentTracker);A&&"fragment"in A?A=A.fragment:A||(A=void 0);const k=An.bufferInfo(this.media,e,0);this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:g,reason:g.message,frag:A,buffer:k.len,bufferInfo:k})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:l}=this,d=(r=this.hls)==null?void 0:r.config;if(!l||!s||!d)return;const c=(i=this.hls)==null?void 0:i.latestLevelDetails,p=So(n,s);if((p||c!=null&&c.live&&n<c.fragmentStart)&&(this._trySkipBufferHole(p)||!this.media))return;const g=e.buffered,A=this.adjacentTraversal(e,n);(g&&g.length>1&&e.len>d.maxBufferHole||e.nextStart&&(e.nextStart-n<d.maxBufferHole||A))&&(t>d.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}adjacentTraversal(e,t){const n=this.fragmentTracker,r=e.nextStart;if(n&&r){const i=n.getFragAtPos(t,ie.MAIN),s=n.getFragAtPos(r,ie.MAIN);if(i&&s)return s.sn-i.sn<2}return!1}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&i!==null&&n&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${yt(e)})`);this.warn(s.message),t.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,l=An.bufferInfo(r,s,0),d=s<l.start?l.start:l.nextStart;if(d&&this.hls){const p=l.len<=i.maxBufferHole,g=l.len>0&&l.len<1&&r.readyState<3,A=d-s;if(A>0&&(p||g)){if(A>i.maxBufferHole){let O=!1;if(s===0){const te=n.getAppendedFrag(0,ie.MAIN);te&&d<te.end&&(O=!0)}if(!O&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,d))return 0;let ee=!1,Se=e.end;for(;Se<d;){const ke=So(Se,n);if(ke)Se+=ke.duration;else{ee=!0;break}}if(ee)return 0}}const k=Math.max(d+Rc,s+Ic);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${k}`),this.moved=!0,r.currentTime=k,!(e!=null&&e.gap)){const O=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${k}`),te={type:pe.MEDIA_ERROR,details:z.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:O,reason:O.message,buffer:l.len,bufferInfo:l};e&&("fragment"in e?te.part=e:te.frag=e),this.hls.trigger(m.ERROR,te)}return k}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const l=s+(r+1)*i.nudgeOffset,d=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(d.message),n.currentTime=l,t.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.BUFFER_NUDGE_ON_STALL,error:d,fatal:!1,buffer:e.len,bufferInfo:e})}else{const l=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(l.message),t.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}}}function uu(a,e){const t=cu(a.main);if(t&&t.start<=e)return t;const n=cu(a.audio);return n&&n.start<=e?n:null}function cu(a){if(!a)return null;switch(a.state){case Nt.IDLE:case Nt.STOPPED:case Nt.ENDED:case Nt.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,ie.MAIN)||e.getPartialFragment(a)}const Oc=.25;function ll(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function ul(a,e,t,n,r){let i=new a(e,t,"");try{i.value=n,r&&(i.type=r)}catch(s){i=new a(e,t,yt(r?C({type:r},n):n))}return i}const wo=(()=>{const a=ll();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();class Pc{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(m.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){var e;const t=(e=this.hls)==null?void 0:e.latestLevelDetails;t&&this.updateDateRangeCues(t)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&ya(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return $l(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media||!this.hls)return;const{enableEmsgMetadataCues:n,enableID3MetadataCues:r}=this.hls.config;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=ll();if(s)for(let l=0;l<i.length;l++){const d=i[l].type;if(d===ui.emsg&&!n||!r)continue;const c=Ma(i[l].data),p=i[l].pts;let g=p+i[l].duration;g>wo&&(g=wo),g-p<=0&&(g=p+Oc);for(let k=0;k<c.length;k++){const O=c[k];if(!ro(O)){this.updateId3CueEnds(p,d);const te=ul(s,p,g,O,d);te&&this.id3Track.addCue(te)}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let i=r.length;i--;){const s=r[i];s.type===t&&s.startTime<e&&s.endTime===wo&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:d}}=s;if(i&&(l||d)){let c;r==="audio"?c=p=>p.type===ui.audioId3&&d:r==="video"?c=p=>p.type===ui.emsg&&l:c=p=>p.type===ui.audioId3&&d||p.type===ui.emsg&&l,Yo(i,t,n,c)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.hls||!this.media)return;const{assetPlayerId:n,timelineOffset:r,enableDateRangeMetadataCues:i,interstitialsController:s}=this.hls.config;if(!i)return;const l=ll();if(n&&r&&!s){const{fragmentStart:te,fragmentEnd:ee}=e;let Se=this.assetCue;Se?(Se.startTime=te,Se.endTime=ee):l&&(Se=this.assetCue=ul(l,te,ee,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),Se&&(Se.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(Se),Se.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:d}=this,{dateRanges:c}=e,p=Object.keys(c);let g=this.dateRangeCuesAppended;if(d&&t){var A;if((A=d.cues)!=null&&A.length){const te=Object.keys(g).filter(ee=>!p.includes(ee));for(let ee=te.length;ee--;){var k;const Se=te[ee],ke=(k=g[Se])==null?void 0:k.cues;delete g[Se],ke&&Object.keys(ke).forEach($e=>{const et=ke[$e];if(et){et.removeEventListener("enter",this.onEventCueEnter);try{d.removeCue(et)}catch(ft){}}})}}else g=this.dateRangeCuesAppended={}}const O=e.fragments[e.fragments.length-1];if(!(p.length===0||!_(O==null?void 0:O.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let te=0;te<p.length;te++){const ee=p[te],Se=c[ee],ke=Se.startTime,$e=g[ee],et=($e==null?void 0:$e.cues)||{};let ft=($e==null?void 0:$e.durationKnown)||!1,Pt=wo;const{duration:mt,endDate:It}=Se;if(It&&mt!==null)Pt=ke+mt,ft=!0;else if(Se.endOnNext&&!ft){const vt=p.reduce(($t,nn)=>{if(nn!==Se.id){const hn=c[nn];if(hn.class===Se.class&&hn.startDate>Se.startDate&&(!$t||Se.startDate<$t.startDate))return hn}return $t},null);vt&&(Pt=vt.startTime,ft=!0)}const Dt=Object.keys(Se.attr);for(let vt=0;vt<Dt.length;vt++){const $t=Dt[vt];if(!ai($t))continue;const nn=et[$t];if(nn)ft&&!($e!=null&&$e.durationKnown)?nn.endTime=Pt:Math.abs(nn.startTime-ke)>.01&&(nn.startTime=ke,nn.endTime=Pt);else if(l){let hn=Se.attr[$t];Li($t)&&(hn=$(hn));const fn=ul(l,ke,Pt,{key:$t,data:hn},ui.dateRange);fn&&(fn.id=ee,this.id3Track.addCue(fn),et[$t]=fn,s&&($t==="X-ASSET-LIST"||$t==="X-ASSET-URL")&&fn.addEventListener("enter",this.onEventCueEnter))}}g[ee]={cues:et,dateRange:Se,durationKnown:ft}}}}}class Mc{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!n.live)return;const l=this.targetLatency;if(l===null)return;const d=r-l,c=Math.min(this.maxLatency,l+n.targetduration);if(d<c&&d>.05&&this.forwardBufferLength>1){const g=Math.min(2,Math.max(1,s)),A=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20,k=Math.min(g,Math.max(1,A));this.changeMediaPlaybackRate(t,k)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:l}=this.config,d=this.hls.userConfig;let c=l&&n||t;(this._targetLatencyUpdated||d.liveSyncDuration||d.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*r);const p=r;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,p)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,l=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),l)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===z.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r=this.targetLatency)==null?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class Bc 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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let l=!1,d=!1,c=!1;t.levels.forEach(p=>{const g=p.attrs;let{audioCodec:A,videoCodec:k}=p;A&&(p.audioCodec=A=ge(A,n)||void 0),k&&(k=p.videoCodec=on(k));const{width:O,height:te,unknownCodecs:ee}=p,Se=(ee==null?void 0:ee.length)||0;if(l||(l=!!(O&&te)),d||(d=!!k),c||(c=!!A),Se||A&&!this.isAudioSupported(A)||k&&!this.isVideoSupported(k)){this.log(`Some or all CODECS not supported "${g.CODECS}"`);return}const{CODECS:ke,"FRAME-RATE":$e,"HDCP-LEVEL":et,"PATHWAY-ID":ft,RESOLUTION:Pt,"VIDEO-RANGE":mt}=g,Dt=`${`${ft||"."}-`}${p.bitrate}-${Pt}-${$e}-${ke}-${mt}-${et}`;if(i[Dt])if(i[Dt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const vt=s[Dt]+=1;p.attrs["PATHWAY-ID"]=new Array(vt+1).join(".");const $t=this.createLevel(p);i[Dt]=$t,r.push($t)}else i[Dt].addGroupId("audio",g.AUDIO),i[Dt].addGroupId("text",g.SUBTITLES);else{const vt=this.createLevel(p);i[Dt]=vt,s[Dt]=1,r.push(vt)}}),this.filterAndSortMediaOptions(r,t,l,d,c)}createLevel(e){const t=new Mn(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const r=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(r.message),t.supportedResult=Ut(r,[])}return t}isAudioSupported(e){return Re(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Re(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){var s;let l=[],d=[],c=e;const p=((s=t.stats)==null?void 0:s.parsing)||{};if((n||r)&&i&&(c=c.filter(({videoCodec:ke,videoRange:$e,width:et,height:ft})=>(!!ke||!!(et&&ft))&&cr($e))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let ke="no level with compatible codecs found in manifest",$e=ke;t.levels.length&&($e=`one or more CODECS in variant not supported: ${yt(t.levels.map(ft=>ft.attrs.CODECS).filter((ft,Pt,mt)=>mt.indexOf(ft)===Pt))}`,this.warn($e),ke+=` (${$e})`);const et=new Error(ke);this.hls.trigger(m.ERROR,{type:pe.MEDIA_ERROR,details:z.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:et,reason:$e})}}),p.end=performance.now();return}t.audioTracks&&(l=t.audioTracks.filter(ke=>!ke.audioCodec||this.isAudioSupported(ke.audioCodec)),du(l)),t.subtitles&&(d=t.subtitles,du(d));const g=c.slice(0);c.sort((ke,$e)=>{if(ke.attrs["HDCP-LEVEL"]!==$e.attrs["HDCP-LEVEL"])return(ke.attrs["HDCP-LEVEL"]||"")>($e.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&ke.height!==$e.height)return ke.height-$e.height;if(ke.frameRate!==$e.frameRate)return ke.frameRate-$e.frameRate;if(ke.videoRange!==$e.videoRange)return On.indexOf(ke.videoRange)-On.indexOf($e.videoRange);if(ke.videoCodec!==$e.videoCodec){const et=J(ke.videoCodec),ft=J($e.videoCodec);if(et!==ft)return ft-et}if(ke.uri===$e.uri&&ke.codecSet!==$e.codecSet){const et=ve(ke.codecSet),ft=ve($e.codecSet);if(et!==ft)return ft-et}return ke.averageBitrate!==$e.averageBitrate?ke.averageBitrate-$e.averageBitrate:0});let A=g[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==g.length)){for(let ke=0;ke<g.length;ke++)if(g[ke].pathwayId===c[0].pathwayId){A=g[ke];break}}this._levels=c;for(let ke=0;ke<c.length;ke++)if(c[ke]===A){var k;this._firstLevel=ke;const $e=A.bitrate,et=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${$e}`),((k=this.hls.userConfig)==null?void 0:k.abrEwmaDefaultEstimate)===void 0){const ft=Math.min($e,this.hls.config.abrEwmaDefaultEstimateMax);ft>et&&et===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=ft)}break}const O=i&&!r,te=this.hls.config,ee=!!(te.audioStreamController&&te.audioTrackController),Se={levels:c,audioTracks:l,subtitleTracks:d,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:ee&&!O&&l.some(ke=>!!ke.url)};p.end=performance.now(),this.hls.trigger(m.MANIFEST_PARSED,Se)}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"),g=e<0;if(this.hls.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:z.LEVEL_SWITCH_ERROR,level:e,fatal:g,error:p,reason:p.message}),g)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===l)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${l?" with Pathway "+l:""} from level ${n}${i?" with Pathway "+i:""}`);const d={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(m.LEVEL_SWITCHING,d);const c=s.details;if(!c||c.live){const p=this.switchParams(s.uri,r==null?void 0:r.details,c);this.loadPlaylist(p)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),n=e.filter(r=>t.indexOf(r)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===ce.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ie.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(i=>!!n[i]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;if(!s){var l;this.warn(`Invalid level index ${r}`),(l=t.deliveryDirectives)!=null&&l.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let d=s.details;d===t.details&&d.advanced&&(d=void 0),this.playlistLoaded(r,t,d)}else(n=t.deliveryDirectives)!=null&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,l=s==null?void 0:s.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(m.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(l=>l.level=-1)),!1));oi(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(m.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(m.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function du(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function hu(){return self.SourceBuffer||self.WebKitSourceBuffer}function fu(){if(!De())return!1;const e=hu();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function Nc(){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(G(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(G(e,"audio"))))}function Fc(){var a;const e=hu();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const $c=100;class Uc extends Ks{constructor(e,t,n){super(e,t,n,"stream-controller",ie.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,i=r?r.currentTime:null;if(i===null||!_(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,ie.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(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval($c),this.level=-1,!this.startFragRequested){let i=r.startLevel;i===-1&&(r.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=r.firstAutoLevel),r.nextLoadLevel=i,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=Nt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Nt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Nt.WAITING_LEVEL:{const{levels:e,level:t}=this,n=e==null?void 0:e[t],r=n==null?void 0:n.details;if(r&&(!r.live||this.levelLastLoaded===n&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(r))break;this.state=Nt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Nt.IDLE;break}break}case Nt.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===Nt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[i]))return;const s=n[i],l=this.getMainFwdBufferInfo();if(l===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(l,d)){const te={};this.altAudio===2&&(te.type="video"),this.hls.trigger(m.BUFFER_EOS,te),this.state=Nt.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const c=s.details;if(!c||this.state===Nt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Nt.WAITING_LEVEL,this.startFragRequested=!1;return}const p=l.len,g=this.getMaxBufferLength(s.maxBitrate);if(p>=g)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const A=this.backtrackFragment?this.backtrackFragment.start:l.end;let k=this.getNextFragment(A,c);if(this.couldBacktrack&&!this.fragPrevious&&k&&Ne(k)&&this.fragmentTracker.getState(k)!==Qt.OK){var O;const ee=((O=this.backtrackFragment)!=null?O:k).sn-c.startSN,Se=c.fragments[ee-1];Se&&k.cc===Se.cc&&(k=Se,this.fragmentTracker.removeFragment(Se))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(k&&this.isLoopLoading(k,A)){if(!k.gap){const ee=this.audioOnly&&!this.altAudio?B.AUDIO:B.VIDEO,Se=(ee===B.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Se&&this.afterBufferFlushed(Se,ee,ie.MAIN)}k=this.getNextFragmentLoopLoading(k,c,l,ie.MAIN,g)}k&&(k.initSegment&&!k.initSegment.data&&!this.bitrateTest&&(k=k.initSegment),this.loadFragment(k,s,A))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===Qt.NOT_LOADED||r===Qt.PARTIAL?Ne(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,ie.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<i.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,d=e[l],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*d.maxBitrate/(1e3*c)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const l=this.followingBufferedFrag(s);if(l){this.abortCurrentFrag();const d=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,p=Math.max(s.end,d+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 Nt.KEY_LOADING:case Nt.FRAG_LOADING:case Nt.FRAG_LOADING_WAITING_RETRY:case Nt.PARSING:case Nt.PARSED:this.state=Nt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;li(n,"playing",this.onMediaPlaying),li(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(vi(n,"playing",this.onMediaPlaying),vi(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(m.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;for(let i=0;i<t.levels.length;i++){const s=t.levels[i].audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}this.audioCodecSwitch=n&&r&&!Fc(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==Nt.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Nt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,l=t.details,d=l.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""}, cc [${l.startCC}, ${l.endCC}] duration:${d}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===Nt.FRAG_LOADING||this.state===Nt.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let g=0;if(l.live||(n=c.details)!=null&&n.live){var A;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;g=this.alignPlaylists(l,c.details,(A=this.levelLastLoaded)==null?void 0:A.details)}if(c.details=l,this.levelLastLoaded=c,i||this.setStartPosition(l,g),this.hls.trigger(m.LEVEL_UPDATED,{details:l,level:s}),this.state===Nt.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=Nt.IDLE}i&&l.live&&this.synchronizeToLiveEdge(l),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,l=e.edge,d=i>=s-t.maxFragLookUpTolerance&&i<=l;if(r!==null&&n.duration>r&&(i<r||!d)){const p=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!d&&n.readyState<4||i<l-p)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState))if(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const g=An.bufferInfo(n,r,0);if(!((c=g.buffered)!=null&&c.length)){n.currentTime=r;return}if(g.start<=i){n.currentTime=r;return}const{nextStart:k}=An.bufferedInfo(g.buffered,i,0);k&&(n.currentTime=k)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=s[n.level];if(!l){this.warn(`Level ${n.level} not found on progress`);return}const d=l.details;if(!d){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const c=l.videoCodec,p=d.PTSKnown||!d.live,g=(t=n.initSegment)==null?void 0:t.data,A=this._getAudioCodec(l),k=this.transmuxer=this.transmuxer||new vl(this.hls,ie.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),O=r?r.index:-1,te=O!==-1,ee=new fi(n.level,n.sn,n.stats.chunkCount,i.byteLength,O,te),Se=this.initPTS[n.cc];k.push(i,g,A,c,n,r,d.totalduration,p,ee,Se)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio!==0;if(Gn(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.altAudio=0,this.fragmentTracker.removeAllFragments(),n.once(m.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(m.AUDIO_TRACK_SWITCHED,t)}),n.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(m.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Gn(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const l in n){const d=n[l];if(d.id==="main"){if(i=l,r=d,l==="video"){const c=n[l];c&&(this.videoBuffer=c.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===ie.MAIN;if(i){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===Nt.PARSED&&(this.state=Nt.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),Ne(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&An.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=Nt.ERROR;return}switch(t.details){case z.FRAG_GAP:case z.FRAG_PARSING_ERROR:case z.FRAG_DECRYPT_ERROR:case z.FRAG_LOAD_ERROR:case z.FRAG_LOAD_TIMEOUT:case z.KEY_LOAD_ERROR:case z.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.MAIN,t);break;case z.LEVEL_LOAD_ERROR:case z.LEVEL_LOAD_TIMEOUT:case z.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Nt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===ce.LEVEL&&(this.state=Nt.IDLE);break;case z.BUFFER_ADD_CODEC_ERROR:case z.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case z.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 z.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Nt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==B.AUDIO||!this.altAudio){const n=(t===B.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,ie.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=An.getBuffered(e),l=s.length?s.start(0):0,d=l-n,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);(this.config.startOnSegmentBoundary||d>0&&(d<c||this.loadingParts&&d<2*((i==null?void 0:i.partTarget)||0)))&&(this.log(`adjusting start position by ${d} to match buffer start`),n+=d,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${l}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=Nt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),r.trigger(m.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===Nt.STOPPED||this.state===Nt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}_handleTransmuxComplete(e){const t=this.playlistType,{hls:n}=this,{remuxResult:r,chunkMeta:i}=e,s=this.getCurrentContext(i);if(!s){this.resetWhenMissingContext(i);return}const{frag:l,part:d,level:c}=s,{video:p,text:g,id3:A,initSegment:k}=r,{details:O}=c,te=this.altAudio?void 0:r.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=Nt.PARSING,k){const ee=k.tracks;if(ee){const et=l.initSegment||l;if(this.unhandledEncryptionError(k,l))return;this._bufferInitSegment(c,ee,et,i),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:et,id:t,tracks:ee})}const Se=k.initPTS,ke=k.timescale,$e=this.initPTS[l.cc];if(_(Se)&&(!$e||$e.baseTime!==Se||$e.timescale!==ke)){const et=k.trackId;this.initPTS[l.cc]={baseTime:Se,timescale:ke,trackId:et},n.trigger(m.INIT_PTS_FOUND,{frag:l,id:t,initPTS:Se,timescale:ke,trackId:et})}}if(p&&O){te&&p.type==="audiovideo"&&this.logMuxedErr(l);const ee=O.fragments[l.sn-1-O.startSN],Se=l.sn===O.startSN,ke=!ee||l.cc>ee.cc;if(r.independent!==!1){const{startPTS:$e,endPTS:et,startDTS:ft,endDTS:Pt}=p;if(d)d.elementaryStreams[p.type]={startPTS:$e,endPTS:et,startDTS:ft,endDTS:Pt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!ke&&(this.couldBacktrack=!0),p.dropped&&p.independent){const mt=this.getMainFwdBufferInfo(),It=(mt?mt.end:this.getLoadPosition())+this.config.maxBufferHole,Dt=p.firstKeyFramePTS?p.firstKeyFramePTS:$e;if(!Se&&It<Dt-this.config.maxBufferHole&&!ke){this.backtrack(l);return}else ke&&(l.gap=!0);l.setElementaryStreamInfo(p.type,l.start,et,l.start,Pt,!0)}else Se&&$e-(O.appliedTimelineOffset||0)>Eo&&(l.gap=!0);l.setElementaryStreamInfo(p.type,$e,et,ft,Pt),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(p,l,d,i,Se||ke)}else if(Se||ke)l.gap=!0;else{this.backtrack(l);return}}if(te){const{startPTS:ee,endPTS:Se,startDTS:ke,endDTS:$e}=te;d&&(d.elementaryStreams[B.AUDIO]={startPTS:ee,endPTS:Se,startDTS:ke,endDTS:$e}),l.setElementaryStreamInfo(B.AUDIO,ee,Se,ke,$e),this.bufferFragmentData(te,l,d,i)}if(O&&A!=null&&A.samples.length){const ee={id:t,frag:l,details:O,samples:A.samples};n.trigger(m.FRAG_PARSING_METADATA,ee)}if(O&&g){const ee={id:t,frag:l,details:O,samples:g.samples};n.trigger(m.FRAG_PARSING_USERDATA,ee)}}logMuxedErr(e){this.warn(`${Ne(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Nt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:l}=t;if(i){const c=e.audioCodec;let p=Ft(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const g=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){p&&(p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5");const A=i.metadata;A&&"channelCount"in A&&(A.channelCount||1)!==1&&g.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&g.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=ie.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=ie.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}l&&(this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),delete t.video,delete t.audio);const d=Object.keys(t);if(d.length){if(this.hls.trigger(m.BUFFER_CODECS,t),!this.hls)return;d.forEach(c=>{const g=t[c].initSegment;g!=null&&g.byteLength&&this.hls.trigger(m.BUFFER_APPENDING,{type:c,data:g,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,ie.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Nt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(An.isBuffered(e,n)?t=this.getAppendedFrag(n):An.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(m.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(m.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 _(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(_(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?qn(null,n.fragments,t):null);if(r){const i=r.programDateTime;if(i!==null){const s=i+(t-r.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class zc extends q{constructor(e,t){super("key-loader",t),this.config=void 0,this.keyIdToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyIdToKeyInfo){const r=this.keyIdToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyIdToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyIdToKeyInfo){const t=this.keyIdToKeyInfo[e].loader;t&&t.destroy()}this.keyIdToKeyInfo={}}createKeyLoadError(e,t=z.KEY_LOAD_ERROR,n,r,i){return new jn({type:pe.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t,n){if(this.emeController&&this.config.emeEnabled&&!this.emeController.getSelectedKeySystemFormats().length){if(t.length)for(let r=0,i=t.length;r<i;r++){const s=t[r];if(e.cc<=s.cc&&(!Ne(e)||!Ne(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(l=>{if(!this.emeController)return;s.setKeyFormat(l);const d=wi(l);if(d)return this.emeController.getKeySystemAccess([d])})}if(this.config.requireKeySystemAccessOnStart){const r=ki(this.config);if(r.length)return this.emeController.getKeySystemAccess(r)}}return null}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const 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,z.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const l=cl(i);let d=this.keyIdToKeyInfo[l];if((n=d)!=null&&n.decryptdata.key)return i.key=d.decryptdata.key,Promise.resolve({frag:e,keyInfo:d});if(this.emeController&&(r=d)!=null&&r.keyLoadPromise)switch(this.emeController.getKeyStatus(d.decryptdata)){case"usable":case"usable-in-future":return d.keyLoadPromise.then(p=>{const{keyInfo:g}=p;return i.key=g.decryptdata.key,{frag:e,keyInfo:g}})}switch(this.log(`${this.keyIdToKeyInfo[l]?"Rel":"L"}oading${i.keyId?" keyId: "+ae(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),d=this.keyIdToKeyInfo[l]={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(d,e):this.loadKeyEME(d,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(d,e);default:return Promise.reject(this.createKeyLoadError(e,z.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r;if(!e.decryptdata.keyId&&(r=t.initSegment)!=null&&r.data){const s=Qe(t.initSegment.data);if(s.length){let l=s[0];l.some(d=>d!==0)?(this.log(`Using keyId found in init segment ${ae(l)}`),_i.setKeyIdForUri(e.decryptdata.uri,l)):(l=_i.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${ae(l)}`)),e.decryptdata.keyId=l}}if(!e.decryptdata.keyId&&!Ne(t))return Promise.resolve(n);const i=this.emeController.loadKey(n);return(e.keyLoadPromise=i.then(s=>(e.mediaKeySessionContext=s,n))).catch(s=>{throw e.keyLoadPromise=null,"data"in s&&(s.data.frag=t),s})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,l)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(A,k,O,te)=>{const{frag:ee,keyInfo:Se}=O,ke=cl(Se.decryptdata);if(!ee.decryptdata||Se!==this.keyIdToKeyInfo[ke])return l(this.createKeyLoadError(ee,z.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),te));Se.decryptdata.key=ee.decryptdata.key=new Uint8Array(A.data),ee.keyLoader=null,Se.loader=null,s({frag:ee,keyInfo:Se})},onError:(A,k,O,te)=>{this.resetLoader(k),l(this.createKeyLoadError(t,z.KEY_LOAD_ERROR,new Error(`HTTP Error ${A.code} loading key ${A.text}`),O,C({url:d.url,data:void 0},A)))},onTimeout:(A,k,O)=>{this.resetLoader(k),l(this.createKeyLoadError(t,z.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),O))},onAbort:(A,k,O)=>{this.resetLoader(k),l(this.createKeyLoadError(t,z.INTERNAL_ABORTED,new Error("key loading aborted"),O))}};i.load(d,p,g)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=cl(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function cl(a){if(a.keyFormat!==Xn.FAIRPLAY){const e=a.keyId;if(e)return ae(e)}return a.uri}function pu(a){const{type:e}=a;switch(e){case ce.AUDIO_TRACK:return ie.AUDIO;case ce.SUBTITLE_TRACK:return ie.SUBTITLE;default:return ie.MAIN}}function dl(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class jc{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=n||r,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ce.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:d}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:ce.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:d})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ce.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ce.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[ce.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[ce.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const c=this.hls.logger,p=r.context;if(p&&p.levelOrTrack===e.levelOrTrack&&(p.url===e.url||p.deliveryDirectives&&!e.deliveryDirectives)){p.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${p.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===ce.MANIFEST?i=n.manifestLoadPolicy.default:i=w({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),_((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===ce.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===ce.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===ce.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,g=c.targetduration;if(p&&g){const A=Math.max(p*3,g*.8)*1e3;i=w({},i,{maxTimeToFirstByteMs:Math.min(A,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(A,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},l={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},d={onSuccess:(c,p,g,A)=>{const k=this.getInternalLoader(g);this.resetInternalLoader(g.type);const O=c.data;p.parsing.start=performance.now(),Ai.isMediaPlaylist(O)||g.type!==ce.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,g,A||null,k):this.handleMasterPlaylist(c,p,g,A)},onError:(c,p,g,A)=>{this.handleNetworkError(p,g,!1,c,A)},onTimeout:(c,p,g)=>{this.handleNetworkError(p,g,!0,void 0,c)}};r.load(e,l,d)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,l=dl(e,n),d=Ai.parseMasterPlaylist(s,l);if(d.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,n,d.playlistParsingError,r,t);return}const{contentSteering:c,levels:p,sessionData:g,sessionKeys:A,startTimeOffset:k,variableList:O}=d;this.variableList=O,p.forEach(ke=>{const{unknownCodecs:$e}=ke;if($e){const{preferManagedMediaSource:et}=this.hls.config;let{audioCodec:ft,videoCodec:Pt}=ke;for(let mt=$e.length;mt--;){const It=$e[mt];Re(It,"audio",et)?(ke.audioCodec=ft=ft?`${ft},${It}`:It,it.audio[ft.substring(0,4)]=2,$e.splice(mt,1)):Re(It,"video",et)&&(ke.videoCodec=Pt=Pt?`${Pt},${It}`:It,it.video[Pt.substring(0,4)]=2,$e.splice(mt,1))}}});const{AUDIO:te=[],SUBTITLES:ee,"CLOSED-CAPTIONS":Se}=Ai.parseMasterPlaylistMedia(s,l,d);te.length&&!te.some($e=>!$e.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"),te.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Cn({}),bitrate:0,url:""})),i.trigger(m.MANIFEST_LOADED,{levels:p,audioTracks:te,subtitles:ee,captions:Se,contentSteering:c,url:l,stats:t,networkDetails:r,sessionData:g,sessionKeys:A,startTimeOffset:k,variableList:O})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:d,type:c}=n,p=dl(e,n),g=_(d)?d:_(l)?l:0,A=pu(n),k=Ai.parseLevelPlaylist(e.data,p,g,A,0,this.variableList);if(c===ce.MANIFEST){const O={attrs:new Cn({}),bitrate:0,details:k,name:"",url:p};k.requestScheduled=t.loading.start+gr(k,0),s.trigger(m.MANIFEST_LOADED,{levels:[O],audioTracks:[],url:p,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=k,this.handlePlaylistLoaded(k,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:z.MANIFEST_PARSING_ERROR,fatal:t.type===ce.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===ce.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===ce.AUDIO_TRACK||e.type===ce.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let d=z.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case ce.MANIFEST:d=n?z.MANIFEST_LOAD_TIMEOUT:z.MANIFEST_LOAD_ERROR,c=!0;break;case ce.LEVEL:d=n?z.LEVEL_LOAD_TIMEOUT:z.LEVEL_LOAD_ERROR,c=!1;break;case ce.AUDIO_TRACK:d=n?z.AUDIO_TRACK_LOAD_TIMEOUT:z.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case ce.SUBTITLE_TRACK:d=n?z.SUBTITLE_TRACK_LOAD_TIMEOUT:z.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const g={type:pe.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:p,context:e,error:l,networkDetails:t,stats:i};if(r){const A=(t==null?void 0:t.url)||e.url;g.response=C({url:A,data:void 0},r)}this.hls.trigger(m.ERROR,g)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:d,level:c,levelOrTrack:p,id:g,groupId:A,deliveryDirectives:k}=r,O=dl(t,r),te=pu(r);let ee=typeof r.level=="number"&&te===ie.MAIN?c:void 0;const Se=e.playlistParsingError;if(Se){if(this.hls.logger.warn(`${Se} ${e.url}`),!l.config.ignorePlaylistParsingErrors){l.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:z.LEVEL_PARSING_ERROR,fatal:!1,url:O,error:Se,reason:Se.message,response:t,context:r,level:ee,parent:te,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const ke=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(m.ERROR,{type:pe.NETWORK_ERROR,details:z.LEVEL_EMPTY_ERROR,fatal:!1,url:O,error:ke,reason:ke.message,response:t,context:r,level:ee,parent:te,networkDetails:i,stats:n});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),d){case ce.MANIFEST:case ce.LEVEL:if(ee){if(!p)ee=0;else if(p!==l.levels[ee]){const ke=l.levels.indexOf(p);ke>-1&&(ee=ke)}}l.trigger(m.LEVEL_LOADED,{details:e,levelInfo:p||l.levels[0],level:ee||0,id:g||0,stats:n,networkDetails:i,deliveryDirectives:k,withoutMultiVariant:d===ce.MANIFEST});break;case ce.AUDIO_TRACK:l.trigger(m.AUDIO_TRACK_LOADED,{details:e,track:p,id:g||0,groupId:A||"",stats:n,networkDetails:i,deliveryDirectives:k});break;case ce.SUBTITLE_TRACK:l.trigger(m.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:g||0,groupId:A||"",stats:n,networkDetails:i,deliveryDirectives:k});break}}}class Bs{static get version(){return Hs}static isMSESupported(){return fu()}static isSupported(){return Nc()}static getMediaSource(){return De()}static get Events(){return m}static get MetadataSchema(){return ui}static get ErrorTypes(){return pe}static get ErrorDetails(){return z}static get DefaultConfig(){return Bs.defaultConfig?Bs.defaultConfig:Tc}static set DefaultConfig(e){Bs.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 ua,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=ye(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=Cc(Bs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&Dc(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:d}=n,c=new l(this),p=this.abrController=new r(this),g=new gn(this),A=n.interstitialsController,k=A?this.interstitialsController=new A(this,Bs):null,O=this.bufferController=new i(this,g),te=this.capLevelController=new s(this),ee=new d(this),Se=new jc(this),ke=n.contentSteeringController,$e=ke?new ke(this):null,et=this.levelController=new Bc(this,$e),ft=new Pc(this),Pt=new zc(this.config,this.logger),mt=this.streamController=new Uc(this,g,Pt),It=this.gapController=new kc(this,g);te.setStreamController(mt),ee.setStreamController(mt);const Dt=[Se,et,mt];k&&Dt.splice(1,0,k),$e&&Dt.splice(1,0,$e),this.networkControllers=Dt;const vt=[p,O,It,te,ee,ft,g];this.audioTrackController=this.createController(n.audioTrackController,Dt);const $t=n.audioStreamController;$t&&Dt.push(this.audioStreamController=new $t(this,g,Pt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Dt);const nn=n.subtitleStreamController;nn&&Dt.push(this.subtititleStreamController=new nn(this,g,Pt)),this.createController(n.timelineController,vt),Pt.emeController=this.emeController=this.createController(n.emeController,vt),this.cmcdController=this.createController(n.cmcdController,vt),this.latencyController=this.createController(Mc,vt),this.coreComponents=vt,Dt.push(c);const hn=c.onErrorOut;typeof hn=="function"&&this.on(m.ERROR,hn,c),this.on(m.MANIFEST_LOADED,Se.onManifestLoaded,Se)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===m.ERROR;this.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:z.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(m.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(m.ERROR,{type:pe.OTHER_ERROR,details:z.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(m.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(m.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(m.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=y.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[ie.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ie.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ie.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){_r(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let i=r;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=n)return i}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=Lt(t);return Ot(e,n,navigator.mediaCapabilities)}}Bs.defaultConfig=void 0},16722:function(Gt,nt,b){"use strict";b.d(nt,{Z:function(){return ie}});const _=o=>typeof o=="object"&&o!=null&&o.nodeType===1,fe=(o,Y)=>(!Y||o!=="hidden")&&o!=="visible"&&o!=="clip",be=(o,Y)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const N=getComputedStyle(o,null);return fe(N.overflowY,Y)||fe(N.overflowX,Y)||(w=>{const S=(C=>{if(!C.ownerDocument||!C.ownerDocument.defaultView)return null;try{return C.ownerDocument.defaultView.frameElement}catch(L){return null}})(w);return!!S&&(S.clientHeight<w.scrollHeight||S.clientWidth<w.scrollWidth)})(o)}return!1},pe=(o,Y,N,w,S,C,L,Q)=>C<o&&L>Y||C>o&&L<Y?0:C<=o&&Q<=N||L>=Y&&Q>=N?C-o-w:L>Y&&Q<N||C<o&&Q>N?L-Y+S:0,z=o=>{const Y=o.parentElement;return Y==null?o.getRootNode().host||null:Y},m=(o,Y)=>{var N,w,S,C;if(typeof document=="undefined")return[];const{scrollMode:L,block:Q,inline:q,boundary:H,skipOverflowHiddenElements:T}=Y,V=typeof H=="function"?H:We=>We!==H;if(!_(o))throw new TypeError("Invalid target");const P=document.scrollingElement||document.documentElement,F=[];let oe=o;for(;_(oe)&&V(oe);){if(oe=z(oe),oe===P){F.push(oe);break}oe!=null&&oe===document.body&&be(oe)&&!be(document.documentElement)||oe!=null&&be(oe,T)&&F.push(oe)}const ye=(w=(N=window.visualViewport)==null?void 0:N.width)!=null?w:innerWidth,le=(C=(S=window.visualViewport)==null?void 0:S.height)!=null?C:innerHeight,{scrollX:De,scrollY:Ue}=window,{height:Be,width:rt,top:ae,right:$,bottom:Z,left:ne}=o.getBoundingClientRect(),{top:re,right:W,bottom:y,left:E}=(We=>{const Te=window.getComputedStyle(We);return{top:parseFloat(Te.scrollMarginTop)||0,right:parseFloat(Te.scrollMarginRight)||0,bottom:parseFloat(Te.scrollMarginBottom)||0,left:parseFloat(Te.scrollMarginLeft)||0}})(o);let B=Q==="start"||Q==="nearest"?ae-re:Q==="end"?Z+y:ae+Be/2-re+y,ue=q==="center"?ne+rt/2-E+W:q==="end"?$+W:ne-E;const Ne=[];for(let We=0;We<F.length;We++){const Te=F[We],{height:ze,width:Ye,top:Je,right:Ve,bottom:Tt,left:Ke}=Te.getBoundingClientRect();if(L==="if-needed"&&ae>=0&&ne>=0&&Z<=le&&$<=ye&&(Te===P&&!be(Te)||ae>=Je&&Z<=Tt&&ne>=Ke&&$<=Ve))return Ne;const Et=getComputedStyle(Te),Le=parseInt(Et.borderLeftWidth,10),pt=parseInt(Et.borderTopWidth,10),Pe=parseInt(Et.borderRightWidth,10),Ae=parseInt(Et.borderBottomWidth,10);let he=0,je=0;const Ie="offsetWidth"in Te?Te.offsetWidth-Te.clientWidth-Le-Pe:0,we="offsetHeight"in Te?Te.offsetHeight-Te.clientHeight-pt-Ae:0,M="offsetWidth"in Te?Te.offsetWidth===0?0:Ye/Te.offsetWidth:0,de="offsetHeight"in Te?Te.offsetHeight===0?0:ze/Te.offsetHeight:0;if(P===Te)he=Q==="start"?B:Q==="end"?B-le:Q==="nearest"?pe(Ue,Ue+le,le,pt,Ae,Ue+B,Ue+B+Be,Be):B-le/2,je=q==="start"?ue:q==="center"?ue-ye/2:q==="end"?ue-ye:pe(De,De+ye,ye,Le,Pe,De+ue,De+ue+rt,rt),he=Math.max(0,he+Ue),je=Math.max(0,je+De);else{he=Q==="start"?B-Je-pt:Q==="end"?B-Tt+Ae+we:Q==="nearest"?pe(Je,Tt,ze,pt,Ae+we,B,B+Be,Be):B-(Je+ze/2)+we/2,je=q==="start"?ue-Ke-Le:q==="center"?ue-(Ke+Ye/2)+Ie/2:q==="end"?ue-Ve+Pe+Ie:pe(Ke,Ve,Ye,Le,Pe+Ie,ue,ue+rt,rt);const{scrollLeft:_e,scrollTop:Me}=Te;he=de===0?0:Math.max(0,Math.min(Me+he/de,Te.scrollHeight-ze/de+we)),je=M===0?0:Math.max(0,Math.min(_e+je/M,Te.scrollWidth-Ye/M+Ie)),B+=Me-he,ue+=_e-je}Ne.push({el:Te,top:he,left:je})}return Ne},ce=o=>o===!1?{block:"end",inline:"nearest"}:(Y=>Y===Object(Y)&&Object.keys(Y).length!==0)(o)?o:{block:"start",inline:"nearest"};function ie(o,Y){if(!o.isConnected||!(S=>{let C=S;for(;C&&C.parentNode;){if(C.parentNode===document)return!0;C=C.parentNode instanceof ShadowRoot?C.parentNode.host:C.parentNode}return!1})(o))return;const N=(S=>{const C=window.getComputedStyle(S);return{top:parseFloat(C.scrollMarginTop)||0,right:parseFloat(C.scrollMarginRight)||0,bottom:parseFloat(C.scrollMarginBottom)||0,left:parseFloat(C.scrollMarginLeft)||0}})(o);if((S=>typeof S=="object"&&typeof S.behavior=="function")(Y))return Y.behavior(m(o,Y));const w=typeof Y=="boolean"||Y==null?void 0:Y.behavior;for(const{el:S,top:C,left:L}of m(o,ce(Y))){const Q=C-N.top+N.bottom,q=L-N.left+N.right;S.scroll({top:Q,left:q,behavior:w})}}}}]);
}());