|
|
!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5238],{70557:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={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"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},40001:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},26227:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},41464:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},18785:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={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"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},73331:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={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"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},15277:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={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"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},33853:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={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"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},61485:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},47472:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});var m=_(60499),ce=_(59301),se={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"},ve=se,j=_(7657),g=function(G,B){return ce.createElement(j.Z,(0,m.Z)({},G,{ref:B,icon:ve}))},de=ce.forwardRef(g),ae=de},68196:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return yt}});var m=_(85899),ce=_(72190),se=_(42244),ve=_(43403),j=_(92310),g=_.n(j),de=_(29301),ae=_(76846),o=_(96452),G=_(6089),B=_(80402),E=_(34280),S=_(49658),C=_(59301),R=_(60499),ee=_(77900),Q=_(8654);function W(Le){var Ce=Le.prefixCls,he=Le.align,We=Le.arrow,Re=Le.arrowPos,Ie=We||{},M=Ie.className,me=Ie.content,Ee=Re.x,Ke=Ee===void 0?0:Ee,et=Re.y,ut=et===void 0?0:et,St=C.useRef();if(!he||!he.points)return null;var Dt={position:"absolute"};if(he.autoArrow!==!1){var mt=he.points[0],kt=he.points[1],Ht=mt[0],zt=mt[1],Ut=kt[0],st=kt[1];Ht===Ut||!["t","b"].includes(Ht)?Dt.top=ut:Ht==="t"?Dt.top=0:Dt.bottom=0,zt===st||!["l","r"].includes(zt)?Dt.left=Ke:zt==="l"?Dt.left=0:Dt.right=0}return C.createElement("div",{ref:St,className:g()("".concat(Ce,"-arrow"),M),style:Dt},me)}function D(Le){var Ce=Le.prefixCls,he=Le.open,We=Le.zIndex,Re=Le.mask,Ie=Le.motion;return Re?C.createElement(ee.default,(0,R.Z)({},Ie,{motionAppear:!0,visible:he,removeOnLeave:!0}),function(M){var me=M.className;return C.createElement("div",{style:{zIndex:We},className:g()("".concat(Ce,"-mask"),me)})}):null}var z=C.memo(function(Le){var Ce=Le.children;return Ce},function(Le,Ce){return Ce.cache}),F=z,$=C.forwardRef(function(Le,Ce){var he=Le.popup,We=Le.className,Re=Le.prefixCls,Ie=Le.style,M=Le.target,me=Le.onVisibleChanged,Ee=Le.open,Ke=Le.keepDom,et=Le.fresh,ut=Le.onClick,St=Le.mask,Dt=Le.arrow,mt=Le.arrowPos,kt=Le.align,Ht=Le.motion,zt=Le.maskMotion,Ut=Le.forceRender,st=Le.getPopupContainer,Rt=Le.autoDestroy,Lt=Le.portal,_e=Le.zIndex,Ze=Le.onMouseEnter,b=Le.onMouseLeave,A=Le.onPointerEnter,Oe=Le.onPointerDownCapture,U=Le.ready,le=Le.offsetX,wt=Le.offsetY,Se=Le.offsetR,je=Le.offsetB,Ge=Le.onAlign,Y=Le.onPrepare,ne=Le.stretch,be=Le.targetWidth,Pe=Le.targetHeight,P=typeof he=="function"?he():he,Je=Ee||Ke,J=(st==null?void 0:st.length)>0,rt=C.useState(!st||!J),Gt=(0,ce.Z)(rt,2),Xt=Gt[0],Jt=Gt[1];if((0,E.Z)(function(){!Xt&&J&&M&&Jt(!0)},[Xt,J,M]),!Xt)return null;var an="auto",rn={left:"-1000vw",top:"-1000vh",right:an,bottom:an};if(U||!Ee){var Sn,On=kt.points,pn=kt.dynamicInset||((Sn=kt._experimental)===null||Sn===void 0?void 0:Sn.dynamicInset),Pn=pn&&On[0][1]==="r",tn=pn&&On[0][0]==="b";Pn?(rn.right=Se,rn.left=an):(rn.left=le,rn.right=an),tn?(rn.bottom=je,rn.top=an):(rn.top=wt,rn.bottom=an)}var $t={};return ne&&(ne.includes("height")&&Pe?$t.height=Pe:ne.includes("minHeight")&&Pe&&($t.minHeight=Pe),ne.includes("width")&&be?$t.width=be:ne.includes("minWidth")&&be&&($t.minWidth=be)),Ee||($t.pointerEvents="none"),C.createElement(Lt,{open:Ut||Je,getContainer:st&&function(){return st(M)},autoDestroy:Rt},C.createElement(D,{prefixCls:Re,open:Ee,zIndex:_e,mask:St,motion:zt}),C.createElement(de.Z,{onResize:Ge,disabled:!Ee},function(Nt){return C.createElement(ee.default,(0,R.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ut,leavedClassName:"".concat(Re,"-hidden")},Ht,{onAppearPrepare:Y,onEnterPrepare:Y,visible:Ee,onVisibleChanged:function(nn){var An;Ht==null||(An=Ht.onVisibleChanged)===null||An===void 0||An.call(Ht,nn),me(nn)}}),function(on,nn){var An=on.className,or=on.style,Ne=g()(Re,An,We);return C.createElement("div",{ref:(0,Q.sQ)(Nt,Ce,nn),className:Ne,style:(0,m.Z)((0,m.Z)((0,m.Z)((0,m.Z)({"--arrow-x":"".concat(mt.x||0,"px"),"--arrow-y":"".concat(mt.y||0,"px")},rn),$t),or),{},{boxSizing:"border-box",zIndex:_e},Ie),onMouseEnter:Ze,onMouseLeave:b,onPointerEnter:A,onClick:ut,onPointerDownCapture:Oe},Dt&&C.createElement(W,{prefixCls:Re,arrow:Dt,arrowPos:mt,align:kt}),C.createElement(F,{cache:!Ee&&!et},P))})}))}),ue=$,pe=C.forwardRef(function(Le,Ce){var he=Le.children,We=Le.getTriggerDOMNode,Re=(0,Q.Yr)(he),Ie=C.useCallback(function(me){(0,Q.mH)(Ce,We?We(me):me)},[We]),M=(0,Q.x1)(Ie,(0,Q.C4)(he));return Re?C.cloneElement(he,{ref:M}):he}),oe=pe,xe=C.createContext(null),ke=xe;function De(Le){return Le?Array.isArray(Le)?Le:[Le]:[]}function Be(Le,Ce,he,We){return C.useMemo(function(){var Re=De(he!=null?he:Ce),Ie=De(We!=null?We:Ce),M=new Set(Re),me=new Set(Ie);return Le&&(M.has("hover")&&(M.delete("hover"),M.add("click")),me.has("hover")&&(me.delete("hover"),me.add("click"))),[M,me]},[Le,Ce,he,We])}var X=_(29194);function N(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],he=arguments.length>2?arguments[2]:void 0;return he?Le[0]===Ce[0]:Le[0]===Ce[0]&&Le[1]===Ce[1]}function k(Le,Ce,he,We){for(var Re=he.points,Ie=Object.keys(Le),M=0;M<Ie.length;M+=1){var me,Ee=Ie[M];if(N((me=Le[Ee])===null||me===void 0?void 0:me.points,Re,We))return"".concat(Ce,"-placement-").concat(Ee)}return""}function q(Le,Ce,he,We){return Ce||(he?{motionName:"".concat(Le,"-").concat(he)}:We?{motionName:We}:null)}function te(Le){return Le.ownerDocument.defaultView}function Z(Le){for(var Ce=[],he=Le==null?void 0:Le.parentElement,We=["hidden","scroll","clip","auto"];he;){var Re=te(he).getComputedStyle(he),Ie=Re.overflowX,M=Re.overflowY,me=Re.overflow;[Ie,M,me].some(function(Ee){return We.includes(Ee)})&&Ce.push(he),he=he.parentElement}return Ce}function x(Le){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Le)?Ce:Le}function w(Le){return x(parseFloat(Le),0)}function V(Le,Ce){var he=(0,m.Z)({},Le);return(Ce||[]).forEach(function(We){if(!(We instanceof HTMLBodyElement||We instanceof HTMLHtmlElement)){var Re=te(We).getComputedStyle(We),Ie=Re.overflow,M=Re.overflowClipMargin,me=Re.borderTopWidth,Ee=Re.borderBottomWidth,Ke=Re.borderLeftWidth,et=Re.borderRightWidth,ut=We.getBoundingClientRect(),St=We.offsetHeight,Dt=We.clientHeight,mt=We.offsetWidth,kt=We.clientWidth,Ht=w(me),zt=w(Ee),Ut=w(Ke),st=w(et),Rt=x(Math.round(ut.width/mt*1e3)/1e3),Lt=x(Math.round(ut.height/St*1e3)/1e3),_e=(mt-kt-Ut-st)*Rt,Ze=(St-Dt-Ht-zt)*Lt,b=Ht*Lt,A=zt*Lt,Oe=Ut*Rt,U=st*Rt,le=0,wt=0;if(Ie==="clip"){var Se=w(M);le=Se*Rt,wt=Se*Lt}var je=ut.x+Oe-le,Ge=ut.y+b-wt,Y=je+ut.width+2*le-Oe-U-_e,ne=Ge+ut.height+2*wt-b-A-Ze;he.left=Math.max(he.left,je),he.top=Math.max(he.top,Ge),he.right=Math.min(he.right,Y),he.bottom=Math.min(he.bottom,ne)}}),he}function fe(Le){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,he="".concat(Ce),We=he.match(/^(.*)\%$/);return We?Le*(parseFloat(We[1])/100):parseFloat(he)}function $e(Le,Ce){var he=Ce||[],We=(0,ce.Z)(he,2),Re=We[0],Ie=We[1];return[fe(Le.width,Re),fe(Le.height,Ie)]}function Qe(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Le[0],Le[1]]}function ye(Le,Ce){var he=Ce[0],We=Ce[1],Re,Ie;return he==="t"?Ie=Le.y:he==="b"?Ie=Le.y+Le.height:Ie=Le.y+Le.height/2,We==="l"?Re=Le.x:We==="r"?Re=Le.x+Le.width:Re=Le.x+Le.width/2,{x:Re,y:Ie}}function He(Le,Ce){var he={t:"b",b:"t",l:"r",r:"l"};return Le.map(function(We,Re){return Re===Ce?he[We]||"c":We}).join("")}function Ye(Le,Ce,he,We,Re,Ie,M){var me=C.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Re[We]||{}}),Ee=(0,ce.Z)(me,2),Ke=Ee[0],et=Ee[1],ut=C.useRef(0),St=C.useMemo(function(){return Ce?Z(Ce):[]},[Ce]),Dt=C.useRef({}),mt=function(){Dt.current={}};Le||mt();var kt=(0,G.Z)(function(){if(Ce&&he&&Le){let Xr=function(li,ui){var Ti=arguments.length>2&&arguments[2]!==void 0?arguments[2]:we,vi=Je.x+li,Hi=Je.y+ui,Xi=vi+tn,Mi=Hi+Pn,yi=Math.max(vi,Ti.left),Un=Math.max(Hi,Ti.top),lr=Math.min(Xi,Ti.right),Ir=Math.min(Mi,Ti.bottom);return Math.max(0,(lr-yi)*(Ir-Un))},Kr=function(){br=Je.y+kn,Rn=br+Pn,gn=Je.x+bn,Fn=gn+tn};var Ut,st,Rt,Lt,_e=Ce,Ze=_e.ownerDocument,b=te(_e),A=b.getComputedStyle(_e),Oe=A.position,U=_e.style.left,le=_e.style.top,wt=_e.style.right,Se=_e.style.bottom,je=_e.style.overflow,Ge=(0,m.Z)((0,m.Z)({},Re[We]),Ie),Y=Ze.createElement("div");(Ut=_e.parentElement)===null||Ut===void 0||Ut.appendChild(Y),Y.style.left="".concat(_e.offsetLeft,"px"),Y.style.top="".concat(_e.offsetTop,"px"),Y.style.position=Oe,Y.style.height="".concat(_e.offsetHeight,"px"),Y.style.width="".concat(_e.offsetWidth,"px"),_e.style.left="0",_e.style.top="0",_e.style.right="auto",_e.style.bottom="auto",_e.style.overflow="hidden";var ne;if(Array.isArray(he))ne={x:he[0],y:he[1],width:0,height:0};else{var be,Pe,P=he.getBoundingClientRect();P.x=(be=P.x)!==null&&be!==void 0?be:P.left,P.y=(Pe=P.y)!==null&&Pe!==void 0?Pe:P.top,ne={x:P.x,y:P.y,width:P.width,height:P.height}}var Je=_e.getBoundingClientRect(),J=b.getComputedStyle(_e),rt=J.height,Gt=J.width;Je.x=(st=Je.x)!==null&&st!==void 0?st:Je.left,Je.y=(Rt=Je.y)!==null&&Rt!==void 0?Rt:Je.top;var Xt=Ze.documentElement,Jt=Xt.clientWidth,an=Xt.clientHeight,rn=Xt.scrollWidth,Sn=Xt.scrollHeight,On=Xt.scrollTop,pn=Xt.scrollLeft,Pn=Je.height,tn=Je.width,$t=ne.height,Nt=ne.width,on={left:0,top:0,right:Jt,bottom:an},nn={left:-pn,top:-On,right:rn-pn,bottom:Sn-On},An=Ge.htmlRegion,or="visible",Ne="visibleFirst";An!=="scroll"&&An!==Ne&&(An=or);var pt=An===Ne,It=V(nn,St),ht=V(on,St),we=An===or?ht:It,at=pt?ht:we;_e.style.left="auto",_e.style.top="auto",_e.style.right="0",_e.style.bottom="0";var vt=_e.getBoundingClientRect();_e.style.left=U,_e.style.top=le,_e.style.right=wt,_e.style.bottom=Se,_e.style.overflow=je,(Lt=_e.parentElement)===null||Lt===void 0||Lt.removeChild(Y);var Ct=x(Math.round(tn/parseFloat(Gt)*1e3)/1e3),Et=x(Math.round(Pn/parseFloat(rt)*1e3)/1e3);if(Ct===0||Et===0||(0,ae.Sh)(he)&&!(0,X.Z)(he))return;var Pt=Ge.offset,Kt=Ge.targetOffset,xt=$e(Je,Pt),Ve=(0,ce.Z)(xt,2),it=Ve[0],Tt=Ve[1],ot=$e(ne,Kt),dt=(0,ce.Z)(ot,2),Ot=dt[0],Vt=dt[1];ne.x-=Ot,ne.y-=Vt;var Wt=Ge.points||[],dn=(0,ce.Z)(Wt,2),un=dn[0],xn=dn[1],vn=Qe(xn),ln=Qe(un),en=ye(ne,vn),Tn=ye(Je,ln),En=(0,m.Z)({},Ge),bn=en.x-Tn.x+it,kn=en.y-Tn.y+Tt,Hn=Xr(bn,kn),Nn=Xr(bn,kn,ht),jn=ye(ne,["t","l"]),Wn=ye(Je,["t","l"]),nr=ye(ne,["b","r"]),$n=ye(Je,["b","r"]),fr=Ge.overflow||{},gt=fr.adjustX,Mn=fr.adjustY,ir=fr.shiftX,xr=fr.shiftY,_r=function(ui){return typeof ui=="boolean"?ui:ui>=0},br,Rn,gn,Fn;Kr();var sr=_r(Mn),Kn=ln[0]===vn[0];if(sr&&ln[0]==="t"&&(Rn>at.bottom||Dt.current.bt)){var er=kn;Kn?er-=Pn-$t:er=jn.y-$n.y-Tt;var Pr=Xr(bn,er),Dr=Xr(bn,er,ht);Pr>Hn||Pr===Hn&&(!pt||Dr>=Nn)?(Dt.current.bt=!0,kn=er,Tt=-Tt,En.points=[He(ln,0),He(vn,0)]):Dt.current.bt=!1}if(sr&&ln[0]==="b"&&(br<at.top||Dt.current.tb)){var Er=kn;Kn?Er+=Pn-$t:Er=nr.y-Wn.y-Tt;var _n=Xr(bn,Er),Gn=Xr(bn,Er,ht);_n>Hn||_n===Hn&&(!pt||Gn>=Nn)?(Dt.current.tb=!0,kn=Er,Tt=-Tt,En.points=[He(ln,0),He(vn,0)]):Dt.current.tb=!1}var qn=_r(gt),wr=ln[1]===vn[1];if(qn&&ln[1]==="l"&&(Fn>at.right||Dt.current.rl)){var qr=bn;wr?qr-=tn-Nt:qr=jn.x-$n.x-it;var Yr=Xr(qr,kn),kr=Xr(qr,kn,ht);Yr>Hn||Yr===Hn&&(!pt||kr>=Nn)?(Dt.current.rl=!0,bn=qr,it=-it,En.points=[He(ln,1),He(vn,1)]):Dt.current.rl=!1}if(qn&&ln[1]==="r"&&(gn<at.left||Dt.current.lr)){var Zr=bn;wr?Zr+=tn-Nt:Zr=nr.x-Wn.x-it;var Sr=Xr(Zr,kn),ei=Xr(Zr,kn,ht);Sr>Hn||Sr===Hn&&(!pt||ei>=Nn)?(Dt.current.lr=!0,bn=Zr,it=-it,En.points=[He(ln,1),He(vn,1)]):Dt.current.lr=!1}Kr();var $r=ir===!0?0:ir;typeof $r=="number"&&(gn<ht.left&&(bn-=gn-ht.left-it,ne.x+Nt<ht.left+$r&&(bn+=ne.x-ht.left+Nt-$r)),Fn>ht.right&&(bn-=Fn-ht.right-it,ne.x>ht.right-$r&&(bn+=ne.x-ht.right+$r)));var jr=xr===!0?0:xr;typeof jr=="number"&&(br<ht.top&&(kn-=br-ht.top-Tt,ne.y+$t<ht.top+jr&&(kn+=ne.y-ht.top+$t-jr)),Rn>ht.bottom&&(kn-=Rn-ht.bottom-Tt,ne.y>ht.bottom-jr&&(kn+=ne.y-ht.bottom+jr)));var ai=Je.x+bn,oi=ai+tn,cr=Je.y+kn,ci=cr+Pn,di=ne.x,ti=di+Nt,Hr=ne.y,rr=Hr+$t,Ei=Math.max(ai,di),mn=Math.min(oi,ti),Xn=(Ei+mn)/2,vr=Xn-ai,Cr=Math.max(cr,Hr),ur=Math.min(ci,rr),pr=(Cr+ur)/2,Bn=pr-cr;M==null||M(Ce,En);var Fr=vt.right-Je.x-(bn+Je.width),Jr=vt.bottom-Je.y-(kn+Je.height);Ct===1&&(bn=Math.floor(bn),Fr=Math.floor(Fr)),Et===1&&(kn=Math.floor(kn),Jr=Math.floor(Jr));var ni={ready:!0,offsetX:bn/Ct,offsetY:kn/Et,offsetR:Fr/Ct,offsetB:Jr/Et,arrowX:vr/Ct,arrowY:Bn/Et,scaleX:Ct,scaleY:Et,align:En};et(ni)}}),Ht=function(){ut.current+=1;var st=ut.current;Promise.resolve().then(function(){ut.current===st&&kt()})},zt=function(){et(function(st){return(0,m.Z)((0,m.Z)({},st),{},{ready:!1})})};return(0,E.Z)(zt,[We]),(0,E.Z)(function(){Le||zt()},[Le]),[Ke.ready,Ke.offsetX,Ke.offsetY,Ke.offsetR,Ke.offsetB,Ke.arrowX,Ke.arrowY,Ke.scaleX,Ke.scaleY,Ke.align,Ht]}var tt=_(77654);function nt(Le,Ce,he,We,Re){(0,E.Z)(function(){if(Le&&Ce&&he){let ut=function(){We(),Re()};var Ie=Ce,M=he,me=Z(Ie),Ee=Z(M),Ke=te(M),et=new Set([Ke].concat((0,tt.Z)(me),(0,tt.Z)(Ee)));return et.forEach(function(St){St.addEventListener("scroll",ut,{passive:!0})}),Ke.addEventListener("resize",ut,{passive:!0}),We(),function(){et.forEach(function(St){St.removeEventListener("scroll",ut),Ke.removeEventListener("resize",ut)})}}},[Le,Ce,he])}var Bt=_(48736);function qe(Le,Ce,he,We,Re,Ie,M,me){var Ee=C.useRef(Le);Ee.current=Le;var Ke=C.useRef(!1);C.useEffect(function(){if(Ce&&We&&(!Re||Ie)){var ut=function(){Ke.current=!1},St=function(Rt){var Lt;Ee.current&&!M(((Lt=Rt.composedPath)===null||Lt===void 0||(Lt=Lt.call(Rt))===null||Lt===void 0?void 0:Lt[0])||Rt.target)&&!Ke.current&&me(!1)},Dt=te(We);Dt.addEventListener("pointerdown",ut,!0),Dt.addEventListener("mousedown",St,!0),Dt.addEventListener("contextmenu",St,!0);var mt=(0,o.A)(he);if(mt&&(mt.addEventListener("mousedown",St,!0),mt.addEventListener("contextmenu",St,!0)),0)var kt,Ht,zt,Ut;return function(){Dt.removeEventListener("pointerdown",ut,!0),Dt.removeEventListener("mousedown",St,!0),Dt.removeEventListener("contextmenu",St,!0),mt&&(mt.removeEventListener("mousedown",St,!0),mt.removeEventListener("contextmenu",St,!0))}}},[Ce,he,We,Re,Ie]);function et(){Ke.current=!0}return et}var jt=["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 Ue(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ve.Z,Ce=C.forwardRef(function(he,We){var Re=he.prefixCls,Ie=Re===void 0?"rc-trigger-popup":Re,M=he.children,me=he.action,Ee=me===void 0?"hover":me,Ke=he.showAction,et=he.hideAction,ut=he.popupVisible,St=he.defaultPopupVisible,Dt=he.onPopupVisibleChange,mt=he.afterPopupVisibleChange,kt=he.mouseEnterDelay,Ht=he.mouseLeaveDelay,zt=Ht===void 0?.1:Ht,Ut=he.focusDelay,st=he.blurDelay,Rt=he.mask,Lt=he.maskClosable,_e=Lt===void 0?!0:Lt,Ze=he.getPopupContainer,b=he.forceRender,A=he.autoDestroy,Oe=he.destroyPopupOnHide,U=he.popup,le=he.popupClassName,wt=he.popupStyle,Se=he.popupPlacement,je=he.builtinPlacements,Ge=je===void 0?{}:je,Y=he.popupAlign,ne=he.zIndex,be=he.stretch,Pe=he.getPopupClassNameFromAlign,P=he.fresh,Je=he.alignPoint,J=he.onPopupClick,rt=he.onPopupAlign,Gt=he.arrow,Xt=he.popupMotion,Jt=he.maskMotion,an=he.popupTransitionName,rn=he.popupAnimation,Sn=he.maskTransitionName,On=he.maskAnimation,pn=he.className,Pn=he.getTriggerDOMNode,tn=(0,se.Z)(he,jt),$t=A||Oe||!1,Nt=C.useState(!1),on=(0,ce.Z)(Nt,2),nn=on[0],An=on[1];(0,E.Z)(function(){An((0,S.Z)())},[]);var or=C.useRef({}),Ne=C.useContext(ke),pt=C.useMemo(function(){return{registerSubPopup:function(lr,Ir){or.current[lr]=Ir,Ne==null||Ne.registerSubPopup(lr,Ir)}}},[Ne]),It=(0,B.Z)(),ht=C.useState(null),we=(0,ce.Z)(ht,2),at=we[0],vt=we[1],Ct=C.useRef(null),Et=(0,G.Z)(function(Un){Ct.current=Un,(0,ae.Sh)(Un)&&at!==Un&&vt(Un),Ne==null||Ne.registerSubPopup(It,Un)}),Pt=C.useState(null),Kt=(0,ce.Z)(Pt,2),xt=Kt[0],Ve=Kt[1],it=C.useRef(null),Tt=(0,G.Z)(function(Un){(0,ae.Sh)(Un)&&xt!==Un&&(Ve(Un),it.current=Un)}),ot=C.Children.only(M),dt=(ot==null?void 0:ot.props)||{},Ot={},Vt=(0,G.Z)(function(Un){var lr,Ir,dr=xt;return(dr==null?void 0:dr.contains(Un))||((lr=(0,o.A)(dr))===null||lr===void 0?void 0:lr.host)===Un||Un===dr||(at==null?void 0:at.contains(Un))||((Ir=(0,o.A)(at))===null||Ir===void 0?void 0:Ir.host)===Un||Un===at||Object.values(or.current).some(function(gr){return(gr==null?void 0:gr.contains(Un))||Un===gr})}),Wt=q(Ie,Xt,rn,an),dn=q(Ie,Jt,On,Sn),un=C.useState(St||!1),xn=(0,ce.Z)(un,2),vn=xn[0],ln=xn[1],en=ut!=null?ut:vn,Tn=(0,G.Z)(function(Un){ut===void 0&&ln(Un)});(0,E.Z)(function(){ln(ut||!1)},[ut]);var En=C.useRef(en);En.current=en;var bn=C.useRef([]);bn.current=[];var kn=(0,G.Z)(function(Un){var lr;Tn(Un),((lr=bn.current[bn.current.length-1])!==null&&lr!==void 0?lr:en)!==Un&&(bn.current.push(Un),Dt==null||Dt(Un))}),Hn=C.useRef(),Nn=function(){clearTimeout(Hn.current)},jn=function(lr){var Ir=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Nn(),Ir===0?kn(lr):Hn.current=setTimeout(function(){kn(lr)},Ir*1e3)};C.useEffect(function(){return Nn},[]);var Wn=C.useState(!1),nr=(0,ce.Z)(Wn,2),$n=nr[0],fr=nr[1];(0,E.Z)(function(Un){(!Un||en)&&fr(!0)},[en]);var gt=C.useState(null),Mn=(0,ce.Z)(gt,2),ir=Mn[0],xr=Mn[1],_r=C.useState(null),br=(0,ce.Z)(_r,2),Rn=br[0],gn=br[1],Fn=function(lr){gn([lr.clientX,lr.clientY])},sr=Ye(en,at,Je&&Rn!==null?Rn:xt,Se,Ge,Y,rt),Kn=(0,ce.Z)(sr,11),er=Kn[0],Pr=Kn[1],Dr=Kn[2],Er=Kn[3],_n=Kn[4],Gn=Kn[5],qn=Kn[6],wr=Kn[7],qr=Kn[8],Yr=Kn[9],kr=Kn[10],Zr=Be(nn,Ee,Ke,et),Sr=(0,ce.Z)(Zr,2),ei=Sr[0],$r=Sr[1],jr=ei.has("click"),ai=$r.has("click")||$r.has("contextMenu"),oi=(0,G.Z)(function(){$n||kr()}),cr=function(){En.current&&Je&&ai&&jn(!1)};nt(en,xt,at,oi,cr),(0,E.Z)(function(){oi()},[Rn,Se]),(0,E.Z)(function(){en&&!(Ge!=null&&Ge[Se])&&oi()},[JSON.stringify(Y)]);var ci=C.useMemo(function(){var Un=k(Ge,Ie,Yr,Je);return g()(Un,Pe==null?void 0:Pe(Yr))},[Yr,Pe,Ge,Ie,Je]);C.useImperativeHandle(We,function(){return{nativeElement:it.current,popupElement:Ct.current,forceAlign:oi}});var di=C.useState(0),ti=(0,ce.Z)(di,2),Hr=ti[0],rr=ti[1],Ei=C.useState(0),mn=(0,ce.Z)(Ei,2),Xn=mn[0],vr=mn[1],Cr=function(){if(be&&xt){var lr=xt.getBoundingClientRect();rr(lr.width),vr(lr.height)}},ur=function(){Cr(),oi()},pr=function(lr){fr(!1),kr(),mt==null||mt(lr)},Bn=function(){return new Promise(function(lr){Cr(),xr(function(){return lr})})};(0,E.Z)(function(){ir&&(kr(),ir(),xr(null))},[ir]);function Fr(Un,lr,Ir,dr){Ot[Un]=function(gr){var Ci;dr==null||dr(gr),jn(lr,Ir);for(var ri=arguments.length,Oi=new Array(ri>1?ri-1:0),Ki=1;Ki<ri;Ki++)Oi[Ki-1]=arguments[Ki];(Ci=dt[Un])===null||Ci===void 0||Ci.call.apply(Ci,[dt,gr].concat(Oi))}}(jr||ai)&&(Ot.onClick=function(Un){var lr;En.current&&ai?jn(!1):!En.current&&jr&&(Fn(Un),jn(!0));for(var Ir=arguments.length,dr=new Array(Ir>1?Ir-1:0),gr=1;gr<Ir;gr++)dr[gr-1]=arguments[gr];(lr=dt.onClick)===null||lr===void 0||lr.call.apply(lr,[dt,Un].concat(dr))});var Jr=qe(en,ai,xt,at,Rt,_e,Vt,jn),ni=ei.has("hover"),Xr=$r.has("hover"),Kr,li;ni&&(Fr("onMouseEnter",!0,kt,function(Un){Fn(Un)}),Fr("onPointerEnter",!0,kt,function(Un){Fn(Un)}),Kr=function(lr){(en||$n)&&at!==null&&at!==void 0&&at.contains(lr.target)&&jn(!0,kt)},Je&&(Ot.onMouseMove=function(Un){var lr;(lr=dt.onMouseMove)===null||lr===void 0||lr.call(dt,Un)})),Xr&&(Fr("onMouseLeave",!1,zt),Fr("onPointerLeave",!1,zt),li=function(){jn(!1,zt)}),ei.has("focus")&&Fr("onFocus",!0,Ut),$r.has("focus")&&Fr("onBlur",!1,st),ei.has("contextMenu")&&(Ot.onContextMenu=function(Un){var lr;En.current&&$r.has("contextMenu")?jn(!1):(Fn(Un),jn(!0)),Un.preventDefault();for(var Ir=arguments.length,dr=new Array(Ir>1?Ir-1:0),gr=1;gr<Ir;gr++)dr[gr-1]=arguments[gr];(lr=dt.onContextMenu)===null||lr===void 0||lr.call.apply(lr,[dt,Un].concat(dr))}),pn&&(Ot.className=g()(dt.className,pn));var ui=C.useRef(!1);ui.current||(ui.current=b||en||$n);var Ti=(0,m.Z)((0,m.Z)({},dt),Ot),vi={},Hi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Hi.forEach(function(Un){tn[Un]&&(vi[Un]=function(){for(var lr,Ir=arguments.length,dr=new Array(Ir),gr=0;gr<Ir;gr++)dr[gr]=arguments[gr];(lr=Ti[Un])===null||lr===void 0||lr.call.apply(lr,[Ti].concat(dr)),tn[Un].apply(tn,dr)})});var Xi=C.cloneElement(ot,(0,m.Z)((0,m.Z)({},Ti),vi)),Mi={x:Gn,y:qn},yi=Gt?(0,m.Z)({},Gt!==!0?Gt:{}):null;return C.createElement(C.Fragment,null,C.createElement(de.Z,{disabled:!en,ref:Tt,onResize:ur},C.createElement(oe,{getTriggerDOMNode:Pn},Xi)),ui.current&&C.createElement(ke.Provider,{value:pt},C.createElement(ue,{portal:Le,ref:Et,prefixCls:Ie,popup:U,className:g()(le,ci),style:wt,target:xt,onMouseEnter:Kr,onMouseLeave:li,onPointerEnter:Kr,zIndex:ne,open:en,keepDom:$n,fresh:P,onClick:J,onPointerDownCapture:Jr,mask:Rt,motion:Wt,maskMotion:dn,onVisibleChanged:pr,onPrepare:Bn,forceRender:b,autoDestroy:$t,getPopupContainer:Ze,align:Yr,arrow:yi,arrowPos:Mi,ready:er,offsetX:Pr,offsetY:Dr,offsetR:Er,offsetB:_n,onAlign:oi,stretch:be,targetWidth:Hr/wr,targetHeight:Xn/qr})))});return Ce}var yt=Ue(ve.Z)},46214:function(){"use strict"},39967:function(fn,ct){"use strict";ct.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}},90736:function(fn,ct,_){"use strict";var m=_(59301),ce=_(4977),se=_(7939),ve=Object.defineProperty,j=Object.defineProperties,g=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,G=(C,R,ee)=>R in C?ve(C,R,{enumerable:!0,configurable:!0,writable:!0,value:ee}):C[R]=ee,B=(C,R)=>{for(var ee in R||(R={}))ae.call(R,ee)&&G(C,ee,R[ee]);if(de)for(var ee of de(R))o.call(R,ee)&&G(C,ee,R[ee]);return C},E=(C,R)=>j(C,g(R));const S=({img:C,buttonProps:R={},styles:ee={},customText:Q,ButtonText:W,ButtonClick:D,Buttonclass:z,ButtonTwo:F,imgStyles:$,loading:ue=!1,className:pe=""})=>m.createElement("section",{className:`tc animated fadeIn ${pe}`,style:B({color:"#999",margin:"100px auto",visibility:ue?"hidden":"visible"},ee)},m.createElement("img",{src:C||ce,style:E(B({},$),{pointerEvents:"none",userSelect:"none"})}),m.createElement("p",{className:"mt20 font14"},Q||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),W&&m.createElement(se.ZP,B({className:z,onClick:D},R),W),F&&F);ct.Z=S},86974:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return z}});var m=_(59301),ce={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},se=_(7939),ve=_(70557),j=_(34728),g=_(25399),de=_(76406),ae=_(84849),o=_(90736),G=_(14185),B=_(52078),E=_(59301),S=Object.defineProperty,C=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,Q=(F,$,ue)=>$ in F?S(F,$,{enumerable:!0,configurable:!0,writable:!0,value:ue}):F[$]=ue,W=(F,$)=>{for(var ue in $||($={}))R.call($,ue)&&Q(F,ue,$[ue]);if(C)for(var ue of C($))ee.call($,ue)&&Q(F,ue,$[ue]);return F},D=(F,$,ue)=>new Promise((pe,oe)=>{var xe=Be=>{try{De(ue.next(Be))}catch(X){oe(X)}},ke=Be=>{try{De(ue.throw(Be))}catch(X){oe(X)}},De=Be=>Be.done?pe(Be.value):Promise.resolve(Be.value).then(xe,ke);De((ue=ue.apply(F,$)).next())}),z=({editOffice:F="view",data:$,issaver:ue,onSaver:pe,theme:oe,type:xe,filename:ke,monacoEditor:De,className:Be,style:X,close:N,onClose:k,hasMask:q,disabledDownload:te,onImgDimensions:Z,showNodata:x,recordInfo:w})=>{const[V,fe]=(0,m.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[$e,Qe]=(0,m.useState)(""),[ye,He]=(0,m.useState)(),Ye=window.ENV==="build"?"/react/build":"",tt=location.host.startsWith("localhost")?G.Z.PROXY_SERVER:G.Z.API_SERVER,Bt=10*(1024*1024),qe=(0,m.useRef)();$!=null&&$.startsWith("/api")&&xe!=="txt"&&($=G.Z.API_SERVER+$);const jt=We=>We.substring(We.lastIndexOf("/")+1).split(".").pop();ke&&De&&(De.filename=ke),(0,m.useEffect)(()=>{var We,Re;const Ie=(Re=(We=document.cookie)==null?void 0:We.replace(/\s/g,""))==null?void 0:Re.split(";");Ie==null||Ie.map(M=>{let me=M.split("=");me[0]==="_educoder_session"&&Qe(me[1])})},[]),(0,m.useEffect)(()=>{xe==="office"&&($.indexOf("bigfilescdn.")>-1||$.indexOf("bigfiles1")>-1?He({url:$,fileType:jt($),model:$.indexOf("model=edit")?"edit":"view"}):$.indexOf("coze")>-1?He({url:$,fileType:"doc",model:"view"}):yt())},[xe,$]);function Ue(We){return D(this,null,function*(){We.data.type==="pdfdata"&&(pe(We.data.data),window.removeEventListener("message",Ue,!1)),console.log("mess---:",We.data)})}const yt=()=>D(void 0,null,function*(){console.log("data:",$);let We=$;$.startsWith("http")||(We=location.origin+We);let Re=new URL(We).pathname.split("/").pop();const Ie=yield(0,ae.gJ)({attachment_id:Re});Ie.url=tt+Ie.url,He(Ie)}),Le=()=>{if($.startsWith("http")||$.startsWith("blob:")){Ce();return}(0,de.Sv)(ke||"educoder",$,ke)},Ce=()=>{w&&(0,B.fc)({id:w==null?void 0:w.id,watch_type:1,course_id:w==null?void 0:w.course_id}),(0,de.Nd)(ke||"educoder",decodeURIComponent($))};(0,m.useEffect)(()=>(window.addEventListener("message",he),()=>{window.removeEventListener("message",he)}),[]);const he=We=>{var Re;((Re=We==null?void 0:We.data)==null?void 0:Re.type)==="closePop"&&k()};return E.createElement("div",{style:W({},X||{}),className:`${q&&ce.bgBlack} ${xe?ce.wrp:"hide"}`},!!xe&&N&&E.createElement("div",{id:"closePop",className:ce.close,ref:qe},!!Z&&E.createElement(g.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>qe.current},E.createElement("span",{onClick:()=>{k(),Z()}},E.createElement("i",{className:"icon-yulanpizhu"}))),!te&&window.parent===window&&E.createElement(g.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>qe.current},E.createElement("span",{onClick:Ce},E.createElement("i",{className:"icon-quxiaozhiding"}))),ue&&E.createElement(g.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>qe.current},E.createElement("span",{className:"",onClick:()=>{const We=document.getElementById("pdfiframe");window.addEventListener("message",Ue,!1),setTimeout(()=>{We.contentWindow.postMessage("getData","*")},300)}},E.createElement("i",{className:"icon-baocun"}))),E.createElement(g.Z,{title:"\u5173\u95ED",getPopupContainer:()=>qe.current},E.createElement("span",{className:"",onClick:()=>{k()}},E.createElement("i",{className:"icon-guanbi1"})))),E.createElement("div",{className:`${ce[Be]} ${Be} ${ce.monaco} ${xe==="txt"?"show":"hide"}`},xe==="txt"&&E.createElement(E.Fragment,null,E.createElement(j.ZP,W({},De)))),xe==="audio"&&E.createElement("audio",{controls:!0,src:`${($==null?void 0:$.indexOf("http://"))>-1||($==null?void 0:$.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${$}`,autoPlay:!0}),xe==="video"&&E.createElement(E.Fragment,null,($==null?void 0:$.indexOf("http"))>-1?E.createElement("video",{controls:!0,src:`${$}`,autoPlay:!0}):E.createElement("video",{controls:!0,src:`data:video/mp4;base64,${$}`,autoPlay:!0})),xe==="office"&&ye&&E.createElement("iframe",{src:`${Ye}/office.html?key=${ye.key}&url=${btoa(ye.url)}&callbackUrl=${tt+(ye.callbackUrl||"")}&fileType=${ye.fileType}&title=${ye.title||""}&model=${F}&officeServer=${G.Z.ONLYOFFICE}&disabledDownload=${!!te}`}),xe==="html"&&E.createElement("iframe",{src:$+"&disposition=inline"}),xe==="pdf"&&E.createElement("iframe",{id:"pdfiframe",src:`${Ye}/js/pdf/index.html?filename=${ke||"educoder.pdf"}&url=${encodeURIComponent($)}&disabledDownload=${!!te}&model=${F}`}),xe==="image"&&E.createElement("img",{src:`${($==null?void 0:$.indexOf("http://"))>-1||($==null?void 0:$.indexOf("https://"))>-1?"":"data:image/png;base64,"}${$}`}),(xe==="other"||xe==="download")&&E.createElement(E.Fragment,null,x?E.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:E.createElement(se.ZP,{icon:E.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Le,disabled:te},"\u4E0B\u8F7D")}):E.createElement(se.ZP,{type:"primary",size:"middle",onClick:Le,disabled:te},E.createElement(ve.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),xe==="flowChart"&&E.createElement("div",{className:"embed"},E.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${$||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(fn,ct,_){"use strict";_.d(ct,{z:function(){return De},Z:function(){return Be}});var m=_(59301),ce=_(46214),se=_(20047),ve=_(64018),j=_(16471),g=_(14185),de=_(76406),ae=_(15342),o=_(44104),G=_(7939),B=_(1012),E=_(86974),S=_(59301),R=({html:X})=>{const N=(0,m.useRef)(null),k=(0,m.useRef)(null),q=`.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,m.useEffect)(()=>{const te=N.current.attachShadow({mode:"open"});k.current=document.createElement("div"),k.current.className="markdown-body",k.current.innerHTML=X,te.appendChild(k.current);const Z=document.createElement("style");return Z.textContent=q,te.appendChild(Z),()=>{te.innerHTML=""}},[]),(0,m.useEffect)(()=>{k.current&&(k.current.innerHTML=X)},[X]),S.createElement("div",{ref:N})};function ee(X){const N=["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"],k=new RegExp(`\\b(${N.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),q=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return X.replace(k,"").replace(q,"").trim()}var Q={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},W=Object.defineProperty,D=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,$=(X,N,k)=>N in X?W(X,N,{enumerable:!0,configurable:!0,writable:!0,value:k}):X[N]=k,ue=(X,N)=>{for(var k in N||(N={}))z.call(N,k)&&$(X,k,N[k]);if(D)for(var k of D(N))F.call(N,k)&&$(X,k,N[k]);return X};const pe="@\u2581\u2581@",oe="@\u2581@",xe=/<pre[^>]*>/g;function ke(X){let N=document.createElement("div");return N.innerHTML=X,N.childNodes.length===0?"":N.childNodes[0].nodeValue}const De=(X,N)=>{X=X||"";const k=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,q=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,te=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Z=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return N?X.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(k,(x,w,V,fe,$e,Qe,ye)=>{const He=w||fe||Qe,Ye=V||$e||ye||"?";return g.Z.API_SERVER+"/api/attachments/"+He+Ye+"&t="+(0,de.Jn)(He,Date.now())+(x.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(X=X.replace(Z,(x,w,V,fe,$e,Qe,ye)=>{const He=w||fe||Qe,Ye=V||$e||ye||"?";return g.Z.API_SERVER+"/attachments/download/"+He+Ye+"&t="+(0,de.Jn)(He,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(k,(x,w,V,fe,$e,Qe,ye)=>{const He=w||fe||Qe,Ye=V||$e||ye||"?";return g.Z.API_SERVER+"/api/attachments/"+He+Ye+"&t="+(0,de.Jn)(He,Date.now())+(x.indexOf(")")>-1?")":"&")}).replace(q,(x,w,V,fe,$e)=>{const Qe=w||fe,ye=V||$e||"";return'"'+g.Z.API_SERVER+"/api/attachments/"+Qe+ye+Qe+ye+"&t="+(0,de.Jn)(Qe,Date.now())}).replace(te,(x,w,V,fe,$e)=>{const Qe=w||fe,ye=V||$e||"";return"("+g.Z.API_SERVER+"/files/uploads/"+Qe+ye+Qe+ye+"&t="+(0,de.Jn)(Qe,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,`
|
|
|
`),X)};var Be=({value:X="",edit:N=!1,className:k,showTextOnly:q,showLines:te,style:Z={},stylesPrev:x={},highlightKeywords:w,showProgramFill:V,isProgramFill:fe,disabledFill:$e=!1,programFillValue:Qe,openEditor:ye=()=>{},onFillChange:He=nt=>{},onFillBlur:Ye=()=>{},onFillFocus:tt=()=>{}})=>{let nt=ee(String(X||""));const Bt=(0,m.useRef)(),qe=(0,m.useRef)(),[jt,Ue]=(0,m.useState)(""),[yt,Le]=(0,m.useState)("office"),[Ce,he]=(0,m.useState)([]),We=(0,m.useRef)("a"+(0,B.Z)()),Re={},Ie=st=>/<style[\s\S]*?>/i.test(st||""),M=(st,Rt,Lt)=>{const _e=document.createElement(st===oe?"input":"textarea");_e.style.width="100%",_e.style.height=st===oe?"40px":"151px",_e.rows=5,_e.spellcheck=!1,_e.name="edu-program-fill",_e.placeholder="\u8BF7\u8F93\u5165",_e.dataset.id=Rt;const Ze=Object.keys(Re).length;return Re[Ze]=_e,`<span class="edu-program-fill-wrap ${st===oe?"":"show"}" style="width:${st===oe?"600px":"100%"}" title=${Lt||""}><span>${_e.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function me(st){return st=st.replace(/!\[.*?\]\(.*?\)/g,""),st=st.replace(/\[.*?\]\(.*?\)/g,""),st=st.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),st=st.replace(/<embed.*?>/g,""),st=st.replace(/<img.*?>/g,""),st=st.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),st=st.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),st=st.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),st=st.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),st}const Ee=st=>!q&&Ie(nt)?st:st.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Rt,Lt){let _e=Lt.replace(/(\n|\r)/g,"").split("}"),Ze=[];return _e.map(b=>{b!=""&&Ze.push(`.${We.current} ${b}`)}),`<style>${Ze.join("}")}</style>`}),Ke=(0,m.useMemo)(()=>{(0,se.Iy)();try{const _e=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ze=/\"\/api\/attachments\/|\"\/attachments\/download\//g,b=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,A=/\(\/attachments\/download\//g;nt=nt.replace(A,"("+g.Z.API_SERVER+"/attachments/download/").replace(_e,"("+g.Z.API_SERVER+"/api/attachments/").replace(Ze,'"'+g.Z.API_SERVER+"/api/attachments/").replace(b,'"'+g.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,`
|
|
|
`),Bt.current.style.display="none"}catch(_e){}if(V){let _e=-1;return nt=nt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Ze,b,A){var Oe;return++_e,M(Ze,_e,(Oe=Qe==null?void 0:Qe[_e])==null?void 0:Oe.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ee(nt||"")}</pre>`}let st=Ee(nt);st=(0,se.ZP)(st);const Rt=(0,se.ez)();nt.match(/\[TOC\]/)&&(st=st.replace("<p>[TOC]</p>",(0,se.Qv)()),(0,se.Iy)()),st=st.replace(/(__special_katext_id_\d+__)/g,(_e,Ze)=>{const{type:b,expression:A}=Rt[Ze];return(0,ae.renderToString)(ke(A)||"",{displayMode:b==="block",throwOnError:!1,output:"html"})}),st=st.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,se.AL)();const Lt=document.createElement("div");if(Lt.innerHTML=st,q)return Lt.innerText;if(w){const _e=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Dt(Lt,_e),Lt.innerHTML}return setTimeout(()=>Ht(),500),Lt.innerHTML},[nt,w]);(0,m.useEffect)(()=>{mt.current&&mt.current.querySelectorAll(["input","textarea"]).forEach(Rt=>{Rt.oninput=et,Rt.onblur=ut,Rt.onfocus=St})},[Ce]),(0,m.useEffect)(()=>{var st,Rt,Lt,_e,Ze;if(Qe!=null&&Qe.length)try{const b=mt.current.querySelectorAll(".edu-program-fill-score"),A=mt.current.querySelectorAll('[name="edu-program-fill"]');for(const[Oe,U]of A.entries())U.value=((st=Qe==null?void 0:Qe[Oe])==null?void 0:st.value)||"",((Rt=Qe==null?void 0:Qe[Oe])==null?void 0:Rt.type)==="warning"?U.className="program-fill-warning":((Lt=Qe==null?void 0:Qe[Oe])==null?void 0:Lt.type)==="success"?U.className="program-fill-success":U.className="";for(const[Oe,U]of b.entries())U.innerHTML=(_e=Qe==null?void 0:Qe[Oe])!=null&&_e.score?`${(Ze=Qe==null?void 0:Qe[Oe])==null?void 0:Ze.score}\u5206`:"";he(Qe)}catch(b){console.log(b,"error")}},[Qe]);const et=st=>{Ce[st.target.dataset.id]=Ce[st.target.dataset.id]||{},Ce[st.target.dataset.id].value=st.target.value,he([...Ce]),He(Ce,st.target.dataset.id)},ut=st=>{Ce[st.target.dataset.id]=Ce[st.target.dataset.id]||{},Ce[st.target.dataset.id].value=st.target.value,he([...Ce]),Ye(Ce,st.target.dataset.id)},St=st=>{Ce[st.target.dataset.id]=Ce[st.target.dataset.id]||{},Ce[st.target.dataset.id].value=st.target.value,he([...Ce]),tt(Ce,st.target.dataset.id)};function Dt(st,Rt){return st.childNodes.forEach(Lt=>{var _e;if(Lt.childNodes.length>0)Dt(Lt,Rt);else if(Lt.nodeName!=="IMG")if(Lt.innerHTML)Lt.innerHTML=(_e=Lt.innerHTML)==null?void 0:_e.replace(new RegExp(Rt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ze=document.createElement("span");Ze.innerHTML=Lt.textContent.replace(new RegExp(Rt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Lt.replaceWith(Ze)}})}const mt=(0,m.useRef)();se.jb.WebkitLineClamp=te,te&&(Z=ue(ue({},Z),se.jb));function kt(st){let Rt=st.target;if(Rt.tagName.toUpperCase()==="A"){let Lt=Rt.getAttribute("href");if(Lt.indexOf("office")>-1)st.preventDefault(),Ue(Lt),Le("office");else if(Lt.indexOf("application/pdf")>-1)st.preventDefault(),Ue(Lt),Le("pdf");else if(Lt.indexOf("text/html")>-1)st.preventDefault(),Ue(Lt),Le("html");else if(Lt.startsWith("#")){st.preventDefault();let _e=document.getElementById(Lt.replace("#",""));_e&&_e.scrollIntoView(!0)}}}const Ht=()=>{var st;const Rt=(st=mt.current)==null?void 0:st.querySelectorAll("video");Rt==null||Rt.forEach(Lt=>{if(Lt.oncontextmenu=()=>!1,Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(j.ZP.isSupported()){var _e=new j.ZP;_e.loadSource(Lt.src),_e.attachMedia(Lt)}}})};(0,m.useEffect)(()=>{if(mt.current&&Ke&&Ke.match(xe)&&window.PR.prettyPrint(),mt.current)return mt.current.addEventListener("click",kt),()=>{var st;(st=mt.current)==null||st.removeEventListener("click",kt),(0,se.AL)(),(0,se.Iy)()}},[Ke,mt.current,kt]);const zt=st=>{st.target.nodeName==="IMG"&&st.target.className.indexOf("draw-flowchart")>-1?(Bt.current.style.zIndex=1,Bt.current.style.display="flex",Bt.current.style.width=st.target.clientWidth+"px",Bt.current.style.height=st.target.clientHeight+"px",Bt.current.style.top=st.target.offsetTop+"px",Bt.current.style.left=st.target.offsetLeft+"px",st.target.id&&(qe.current=st.target.id)):Bt.current.style.display="none"},Ut=()=>{Bt.current.style.display="none"};return(0,m.useEffect)(()=>{var st;const Rt=Lt=>{Lt.preventDefault(),Lt.clipboardData.setData("text",window.getSelection().toString())};return(st=mt.current)==null||st.addEventListener("copy",Rt),()=>{var Lt;(Lt=mt.current)==null||Lt.removeEventListener("copy",Rt)}},[mt.current]),m.createElement("div",{style:{position:"relative"},onMouseLeave:Ut},q&&m.createElement("div",{ref:mt,className:`${Q.mdBody} `},Ke),!q&&!Ie(Ke)&&m.createElement("div",{ref:mt,style:ue({},Z),onMouseOver:zt,className:`${k||""} ${$e?"disabled-fill":""} markdown-body ${Q.mdBody} ${We.current}`,dangerouslySetInnerHTML:{__html:Ke}}),!q&&Ie(Ke)&&m.createElement(R,{html:Ke}),m.createElement("div",{ref:Bt,className:`${Q.button} ${N?"":Q.previewFlowChart}`},m.createElement(o.Z,null,m.createElement(G.ZP,{onClick:()=>{N?ye(qe.current):(Ue(qe.current),Le("flowChart"))}},N?"\u7F16\u8F91":"\u9884\u89C8"))),m.createElement(E.Z,{close:!0,data:jt,type:jt!=null&&jt.length?yt:"",style:ue({},x),onClose:()=>Ue("")}))}},34728:function(fn,ct,_){"use strict";_.d(ct,{SV:function(){return Bt},ZP:function(){return nt}});var m=_(59301),ce=_(76374);const se={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"]},ve={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},j={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std",content:["using namespace std"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},g={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},de={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
|
`)}]};var ae=_(53184),o=_.n(ae),G=(qe,jt,Ue)=>new Promise((yt,Le)=>{var Ce=Re=>{try{We(Ue.next(Re))}catch(Ie){Le(Ie)}},he=Re=>{try{We(Ue.throw(Re))}catch(Ie){Le(Ie)}},We=Re=>Re.done?yt(Re.value):Promise.resolve(Re.value).then(Ce,he);We((Ue=Ue.apply(qe,jt)).next())});const B={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},E=(qe,jt,Ue,yt)=>{const Le=jt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Ue.lineNumber,endColumn:Ue.column});return Array.from(new Set(Le.match(/\b\w{2,}\b/g)||[])).map(he=>({label:he,kind:qe.languages.CompletionItemKind.Text,insertText:he,range:yt}))},S=(qe,jt,Ue,yt)=>{qe.languages.registerCompletionItemProvider(jt,{provideCompletionItems(Le,Ce){const he=Le.getWordUntilPosition(Ce),We={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},Re=Le.getLineContent(Ce.lineNumber).substring(he.startColumn-2,he.endColumn);return{suggestions:[...E(qe,Le,Ce,We),...Ue.map(M=>({label:M,kind:qe.languages.CompletionItemKind.Keyword,documentation:M,insertText:M,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We})),...yt.map(M=>({label:M.label,kind:qe.languages.CompletionItemKind.Snippet,documentation:M.content,insertText:Re.startsWith("#")?M.content.replace(/#/,""):M.content,insertTextRules:qe.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}})};var C=qe=>{B.languages.forEach(jt=>{qe.languages.registerDocumentFormattingEditProvider(jt,{provideDocumentFormattingEdits(Ue){return G(this,null,function*(){const yt=o()(Ue.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:Ue.getFullModelRange(),text:yt}]})}})}),S(qe,"java",ve.keywords,ve.quickKey),S(qe,"cpp",j.keywords,j.quickKey),S(qe,"c",se.keywords,[]),S(qe,"python",g.keywords,g.quickKey),S(qe,"scala",de.keywords,de.quickKey)};const R="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ee=Object.defineProperty,Q=(qe,jt,Ue)=>jt in qe?ee(qe,jt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):qe[jt]=Ue,W=(qe,jt,Ue)=>Q(qe,typeof jt!="symbol"?jt+"":jt,Ue);const D=class xu{constructor(jt,Ue,yt){this.placeholder=jt,this.editor=Ue,this.monaco=yt,Ue.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)}};W(D,"ID","editor.widget.placeholderHint");var F=D,$=_(96236),ue=_(6767),pe=_(25399),oe=_(78267),xe=_(33156),ke=_(56102),De=Object.defineProperty,Be=Object.defineProperties,X=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,te=(qe,jt,Ue)=>jt in qe?De(qe,jt,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):qe[jt]=Ue,Z=(qe,jt)=>{for(var Ue in jt||(jt={}))k.call(jt,Ue)&&te(qe,Ue,jt[Ue]);if(N)for(var Ue of N(jt))q.call(jt,Ue)&&te(qe,Ue,jt[Ue]);return qe},x=(qe,jt)=>Be(qe,X(jt)),w=(qe,jt)=>{var Ue={};for(var yt in qe)k.call(qe,yt)&&jt.indexOf(yt)<0&&(Ue[yt]=qe[yt]);if(qe!=null&&N)for(var yt of N(qe))jt.indexOf(yt)<0&&q.call(qe,yt)&&(Ue[yt]=qe[yt]);return Ue},V=(qe,jt,Ue)=>new Promise((yt,Le)=>{var Ce=Re=>{try{We(Ue.next(Re))}catch(Ie){Le(Ie)}},he=Re=>{try{We(Ue.throw(Re))}catch(Ie){Le(Ie)}},We=Re=>Re.done?yt(Re.value):Promise.resolve(Re.value).then(Ce,he);We((Ue=Ue.apply(qe,jt)).next())});function fe(qe){return/^\d+$/.test(qe)?`${qe}px`:qe}function $e(){}let Qe=!1;const ye={"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 He(qe=[]){let jt=qe;if(Array.isArray(qe)){for(let Ue=0;Ue<qe.length;Ue++){let yt=ye[qe[Ue]];if(yt)return yt}return jt[0]}return ye[jt]||jt}let Ye=null;const tt=()=>V(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(qe){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",qe)}});var nt=qe=>{var jt=qe,{width:Ue="100%",height:yt="100%",value:Le,language:Ce="javascript",style:he={},options:We={},overrideServices:Re={},theme:Ie="vs-dark",onEditBlur:M,isCopy:me=!1,onSave:Ee,autoHeight:Ke=!1,forbidCopy:et=!1,forbidCopyTips:ut,onChange:St=$e,editorDidMount:Dt=$e,onFocus:mt=$e,onBreakPoint:kt=$e,breakPointValue:Ht=[],filename:zt="educoder.txt",errorLine:Ut,errorContent:st="",highlightLine:Rt,openBreakPoint:Lt=!1,placeholder:_e="",showMiniMap:Ze=!0}=jt,b=w(jt,["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 A=(0,m.useRef)(),Oe=(0,m.useRef)({}),U=(0,m.useRef)(),le=(0,m.useRef)(),wt=(0,m.useRef)([]),Se=(0,m.useRef)(!1),je=(0,m.useRef)(),Ge=(0,m.useRef)(),Y=(0,m.useRef)(!1),[ne,be]=(0,m.useState)(!1);function Pe(){let $t;return A.current&&($t=new ce.Z(Nt=>{for(let on of Nt)(on.target.offsetHeight>0||on.target.offsetWidth>0)&&Oe.current.instance.layout()}),$t.observe(A.current)),$t}function P(){ue.ZP.warning({content:decodeURIComponent(ut||R),key:"monaco-editor-tip"})}const Je=()=>{let $t=Oe.current.instance;if(Le!=null&&$t&&ne){const Nt=$t.getModel();Nt&&Le!==Nt.getValue()&&(Qe=!0,Nt.setValue(Le),$t.layout(),Qe=!1)}};(0,m.useEffect)(()=>{const $t=xe.Z.subscribe("formatDocument",Nt=>{var on;let nn=Oe.current.instance;(on=nn==null?void 0:nn.getAction)==null||on.call(nn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Nt=>{St(Nt)},$t},[]),(0,m.useEffect)(()=>{var $t;let Nt=Oe.current.instance;le.current&&clearTimeout(le.current),le.current=setTimeout(()=>{Je()},500),Le&&(Le!=null&&Le.length)&&(($t=Nt==null?void 0:Nt.updateOptions)==null||$t.call(Nt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Le.split(/\r\n|\r|\n/g).length))+3,5)}))},[Le,ne,Oe.current]),(0,m.useEffect)(()=>{if(Ut&&Oe.current&&Oe.current.instance){let Nt=Oe.current.instance;Nt.changeViewZones(function(on){var nn=document.createElement("div");nn.style.padding="10px 20px",nn.style.width="calc(100% - 20px)",nn.className="my-error-line-wrp",nn.innerHTML=st,on.addZone({afterLineNumber:Ut||11,heightInLines:3,domNode:nn})});var $t={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}};Nt.addOverlayWidget($t),Nt.revealPositionInCenter({lineNumber:20,column:1})}},[Ut,Oe.current,ne]);const J=($t="",Nt)=>{if(!$t||$t.trim()==="")return!0;const nn=Oe.current.instance.getModel().getLineTokens(Nt);let An=!1;for(let or=0;or<2;or++)nn.getStandardTokenType(or)===1&&(An=!0);return An};(0,m.useEffect)(()=>{var $t;const Nt=($t=Oe.current)==null?void 0:$t.instance;if(Nt&&ne&&et){const on=Nt.onDidBlurEditorWidget(()=>{Y.current=!1}),nn=Nt.onDidFocusEditorText(()=>{Y.current=!0});return()=>{on.dispose(),nn.dispose()}}},[Oe.current,ne,et]),(0,m.useEffect)(()=>{var $t;if(($t=Oe.current)!=null&&$t.instance&&ne&&Lt){let Nt=Oe.current.instance,on=Nt.getModel();if(!on)return;(()=>{var Et;let Pt=[],Kt=[];const xt=on.getAllDecorations();for(let it of xt)it.options.className==="highlighted-line"&&(Pt.push((Et=it==null?void 0:it.range)==null?void 0:Et.startLineNumber),Kt.push(it==null?void 0:it.id));if(Rt===Pt[0])return;on.deltaDecorations(Kt,[]);const Ve=on.getLineCount();Rt&&Rt<=Ve&&(Nt.deltaDecorations([],[{range:new Ye.Range(Rt,1,Rt,on.getLineMaxColumn(Rt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Nt.revealLineInCenter(Rt))})();const An=(Et=!1)=>{var Pt;let Kt=[],xt=[];const Ve=on.getAllDecorations();for(let it of Ve)it.options.linesDecorationsClassName==="breakpoints-select"&&(Kt.push((Pt=it==null?void 0:it.range)==null?void 0:Pt.startLineNumber),xt.push(it==null?void 0:it.id));if(Et)return{lines:Kt,ids:xt};kt(Kt)},or=Et=>V(void 0,null,function*(){let Pt={range:new Ye.Range(Et,1,Et,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield on.deltaDecorations([],[Pt]),An()}),Ne=Et=>V(void 0,null,function*(){let Pt=[];const Kt=Nt.getLineDecorations(Et);for(let xt of Kt)xt.options.linesDecorationsClassName==="breakpoints-select"&&Pt.push(xt.id);yield on.deltaDecorations(Pt,[]),An()}),pt=Et=>{let Pt=Nt.getLineDecorations(Et);for(let Kt of Pt)if(Kt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,oe.isEqual)(Ht,An(!0).lines)){on.deltaDecorations(An(!0).ids,[]);const Et=Ht.map(Pt=>({range:new Ye.Range(Pt,1,Pt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));on.deltaDecorations([],Et)}const It=Nt.onDidChangeModelContent(Et=>{let Pt=Nt.getPosition();if(Pt){let Kt=Pt.lineNumber;clearTimeout(Ge.current),Ge.current=setTimeout(()=>{J(on.getLineContent(Kt),Kt)?Ne(Kt):pt(Kt)?(Ne(Kt),or(Kt)):An()},100)}}),ht=Nt.onMouseDown(Et=>{var Pt,Kt,xt;if(Et.target.detail&&((xt=(Kt=(Pt=Et.target)==null?void 0:Pt.element)==null?void 0:Kt.className)!=null&&xt.includes("line-numbers"))){let Ve=Et.target.position.lineNumber;if(J(on.getLineContent(Ve),Ve))return;pt(Ve)?Ne(Ve):or(Ve)}}),we=Et=>{let Pt={range:new Ye.Range(Et,1,Et,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};wt.current=Nt.deltaDecorations(wt.current,[Pt])},at=()=>{wt.current=Nt.deltaDecorations(wt.current,[])},vt=Nt.onMouseMove(Et=>{var Pt,Kt,xt;if(at(),Et.target.detail&&((xt=(Kt=(Pt=Et.target)==null?void 0:Pt.element)==null?void 0:Kt.className)!=null&&xt.includes("line-numbers"))){let Ve=Et.target.position.lineNumber;if(J(on.getLineContent(Ve),Ve))return;we(Ve)}}),Ct=Nt.onMouseLeave(()=>{at()});return()=>{It.dispose(),ht.dispose(),vt.dispose(),Ct.dispose()}}},[Oe.current,ne,Ht,Rt,Lt,Ce]),(0,m.useEffect)(()=>{var $t;($t=Oe.current)!=null&&$t.instance&&Lt&&Oe.current.instance.setPosition({lineNumber:0,column:0})},[Rt]);function rt(){let $t=Oe.current.instance;if($t){const Nt=$t.getSelection(),on=Oe.current.pastePos||{},nn=new Ye.Range(on.startLineNumber||Nt.endLineNumber,on.startColumn||Nt.endColumn,on.endLineNumber||Nt.endLineNumber,on.endColumn||Nt.endColumn);setTimeout(()=>{$t.executeEdits("",[{range:nn,text:""}])},300)}}function Gt($t){(window.navigator.platform.match("Mac")?$t.metaKey:$t.ctrlKey)&&$t.keyCode==83&&($t.preventDefault(),Ee())}const Xt=()=>{if(Ke&&Oe.current.instance){const $t=Oe.current.instance.getContentHeight();Pn($t<yt?yt:$t)}else Pn(yt)};function Jt($t){var Nt=document.createEvent("MouseEvents");Nt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),$t.dispatchEvent(Nt)}const an=$t=>{if(!Y.current)return;const{keyCode:Nt,ctrlKey:on,metaKey:nn,target:An,type:or}=$t;return(or==="paste"||(Nt===67||Nt===86)&&(nn||on))&&An.nodeName==="TEXTAREA"&&(P(),$t.preventDefault()),!1};function rn($t,Nt){var on=window.URL||window.webkitURL||window,nn=new Blob([Nt]),An=document.createElementNS("http://www.w3.org/1999/xhtml","a");An.href=on.createObjectURL(nn),An.download=$t,Jt(An)}(0,m.useEffect)(()=>{Xt()},[Xt]),(0,m.useEffect)(()=>{A.current&&!ne&&Promise.all([_.e(8909),_.e(5977)]).then(_.bind(_,71448)).then($t=>{try{Ye=$t,Oe.current.instance=Ye.editor.create(A.current,{value:Le,language:He(Ce),theme:Ie,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Ze||!1}},Re);const Nt=Oe.current.instance;let An=[...$.BH._menuItems].find(It=>It[0]._debugName=="EditorContext")[1],or=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ne=(It,ht)=>{var we,at;let vt=It._first;do ht.includes((at=(we=vt.element)==null?void 0:we.command)==null?void 0:at.id)&&It._remove(vt);while(vt=vt.next)};if(Dt(Nt,Ye),setTimeout(()=>{Xt(),Oe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{rn(zt||"educoder.txt",Nt.getValue())}})},500),Oe.current.subscription=Nt.onDidChangeModelContent(It=>{Se.current?clearTimeout(je.current):(Xt(),St(Nt.getValue(),It)),je.current=setTimeout(()=>{Se.current=!1},500)}),window.Monaco||C(Ye,He(Ce)),et&&(Ne(An,or),A.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",an),window.removeEventListener("paste",an),window.addEventListener("keydown",an),window.addEventListener("paste",an)),window.Monaco=Ye,M&&Nt.onDidBlurEditorWidget(()=>{M(Nt.getValue())}),mt&&Nt.onDidFocusEditorText(()=>{et&&tt(),mt(Nt.getValue())}),et){tt();try{Nt.onDidPaste(It=>{const ht=Nt.getSelection(),we=Oe.current.pastePos||{},at=new Ye.Range(we.startLineNumber||ht.endLineNumber,we.startColumn||ht.endColumn,we.endLineNumber||ht.endLineNumber,we.endColumn||ht.endColumn);Nt.executeEdits("",[{range:It.range,text:""}])})}catch(It){}}let pt=Pe();return _e&&typeof _e=="string"&&new F(_e,Nt,Ye),be(!0),()=>{const It=Oe.current.instance;It.dispose();const ht=It.getModel();ht&&ht.dispose(),Oe.current.subscription&&Oe.current.subscription.dispose(),pt.unobserve(A.current)}}catch(Nt){}})},[]),(0,m.useEffect)(()=>{if(Oe.current.instance&&ne)return document.addEventListener("keydown",Gt,!1),()=>{document.removeEventListener("keydown",Gt)}},[Ee,ne]),(0,m.useEffect)(()=>{let $t=Oe.current.instance;if($t&&ne){let Nt=He(Ce);Ye.editor.setModelLanguage($t.getModel(),Nt)}},[Ce,ne]),(0,m.useEffect)(()=>{Oe.current.instance&&ne&&Ye.editor.setTheme(Ie)},[Ie,ne]),(0,m.useEffect)(()=>{let $t=Oe.current.instance;U.current=We,$t&&ne&&($t.updateOptions(Z({},We)),setTimeout(()=>{$t.getModel().updateOptions(Z({},We))},200))},[JSON.stringify(We),ne]),(0,m.useEffect)(()=>{let $t=Oe.current.instance;$t&&ne&&$t.layout()},[Ue,yt,ne]);const[Sn,On]=(0,m.useState)(fe(Ue)),[pn,Pn]=(0,m.useState)(fe(yt)),tn=x(Z({},he),{width:Sn,height:pn,position:"relative"});return m.createElement("div",{className:"my-monaco-editor",ref:A,style:tn,onFocus:()=>{et&&tt()}},me&&m.createElement(ke.CopyToClipboard,{text:Le,onCopy:()=>ue.ZP.success("\u590D\u5236\u6210\u529F")},m.createElement(pe.Z,{title:"\u590D\u5236\u4EE3\u7801"},m.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},m.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Bt({width:qe="100%",height:jt="100%",original:Ue,modified:yt,language:Le,options:Ce={}}){const he=(0,m.useRef)(),[We,Re]=(0,m.useState)(null);function Ie(Ke){let et;return he.current&&(et=new ce.Z(ut=>{for(let St of ut)(St.target.offsetHeight>0||St.target.offsetWidth>0)&&Ke.layout()}),et.observe(he.current)),et}(0,m.useEffect)(()=>(he.current&&Promise.all([_.e(8909),_.e(9404)]).then(_.bind(_,2550)).then(Ke=>{Ye=Ke;const et=Ye.editor.createDiffEditor(he.current,x(Z({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ce),{wordWrap:!0}));Re(et);let ut=Ie(et);return()=>{et.dispose();const St=et.getModel();St&&St.dispose(),ut.unobserve(he.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,m.useEffect)(()=>{We&&We.setModel({original:Ye.editor.createModel(Ue,Le),modified:Ye.editor.createModel(yt,Le)})},[Ue,yt,Le,We]);const M=fe(qe),me=fe(jt),Ee={width:M,height:me};return m.createElement("div",{className:"my-diff-editor",ref:he,style:Ee})}},54077:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return B}});var m={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT",tagsDom:"tagsDom___COQg7",hiddenbq:"hiddenbq___TqlUF"},ce=_(29787),se=_(25399),ve=_(89787),j=_(92310),g=_.n(j),de=_(76406),ae=_(90736),o=_(59301),B=({className:E,dataSource:S=[],col:C=4,right:R,bottom:ee=23,precision:Q=0,wrapWidth:W=1200,trackEventItems:D,loading:z,onRemove:F=()=>{},isCurrent:$=!0,showProgress:ue=!1,showAlias:pe=!1,category:oe="notDisplay",hiddenClick:xe=()=>{}})=>{const ke=Math.floor((W-(C-1)*R)/C),De=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png",ptclass:"sprite-70",swclass:"sprite-68"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png",ptclass:"sprite-60",swclass:"sprite-65"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png",ptclass:"sprite-58",swclass:"sprite-63"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png",ptclass:"sprite-62",swclass:"sprite-67"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png",ptclass:"sprite-61",swclass:"sprite-66"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png",ptclass:"sprite-59",swclass:"sprite-64"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png",ptclass:"sprite-71",swclass:"sprite-69"}];return o.createElement(ce.Z,{spinning:z},o.createElement("div",{className:g()(m.list,E)},!!(S!=null&&S.length)&&(S==null?void 0:S.map((Be,X)=>{var N,k,q,te,Z,x,w;const{name:V,id:fe,identifier:$e,featured:Qe,school_name:ye,image_url:He,excellent:Ye,is_plan:tt}=Be;return o.createElement("div",{key:fe,className:$&&ue?m.wrapisCurrent:m.wrap,style:{width:ke,marginRight:(1+X)%C===0?0:R+Q,marginBottom:ee}},o.createElement("a",{className:m.li,onClick:nt=>{nt.preventDefault(),nt.stopPropagation(),D&&(0,de.L9)([D]),(0,de.xg)(`/paths/${$e}`)}},o.createElement("div",{className:m.img},o.createElement("img",{className:m.cover,src:`${He}`}),(N=Be==null?void 0:Be.subject_tags)==null?void 0:N.map((nt,Bt)=>{var qe,jt;if(Bt===0){const yt=(qe=De.find(Le=>Le.name==nt))==null?void 0:qe.swclass;return o.createElement("span",{className:`sprite ${yt} ${m.sign}`,style:{left:"-4px"}})}const Ue=(jt=De.find(yt=>yt.name==nt))==null?void 0:jt.ptclass;return o.createElement("span",{className:`sprite ${Ue} ${m.sign}`,style:{left:`${48+52*(Bt-1)+2*Bt}px`}})}),o.createElement("div",{className:m.tagsDom},o.createElement("div",{className:"flex flex-wrap item-center",style:{gap:"0 6px"}},(Be==null?void 0:Be.excellent)&&o.createElement("div",{className:m.bq},"\u5F00\u653E\u8BFE\u7A0B"),((k=Be==null?void 0:Be.custom_tags)==null?void 0:k.length)>0&&(Be==null?void 0:Be.custom_tags.map((nt,Bt)=>{var qe;return o.createElement(se.Z,{title:nt==null?void 0:nt.tag_name,key:Bt},o.createElement("div",{className:"font12 rounded-2px c-white flex item-center",style:{height:22,padding:"0 6px",maxWidth:((qe=Be==null?void 0:Be.custom_tags)==null?void 0:qe.length)>2?"60px":"71px",background:"rgba(48, 97, 208, .6)",border:"1px solid #8FAFF8"}},o.createElement("span",{className:"multi-llipsis1e"},nt==null?void 0:nt.tag_name)))})))),oe=="hide"&&(Be==null?void 0:Be.studying)&&$&&o.createElement("div",{className:`${m.movebq} user-path-items`,onClick:nt=>{nt.stopPropagation(),F(Be)}},o.createElement("i",{className:"iconfont icon-yichu1 font12"}),o.createElement("span",null,"\u79FB\u9664")),!["notDisplay","collect","payed"].includes(oe)&&$&&o.createElement("div",{className:`${m.hiddenbq} user-path-items`,onClick:nt=>{nt.stopPropagation(),xe(Be)}},o.createElement("i",{className:`iconfont ${oe=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),o.createElement("span",null,oe=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF"))),o.createElement("div",{className:m.name},o.createElement(se.Z,{title:pe&&(Be!=null&&Be.excellent_alias_name)?o.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${V}`,o.createElement("br",null),o.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Be==null?void 0:Be.excellent_alias_name}`)):V},o.createElement("span",{className:m.e},pe&&(Be==null?void 0:Be.excellent_alias_name)||V))),$&&ue&&((q=Be==null?void 0:Be.progress)==null?void 0:q.all_score)!=0&&o.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},o.createElement(ve.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((te=Be==null?void 0:Be.progress)==null?void 0:te.my_score)/((Z=Be==null?void 0:Be.progress)==null?void 0:Z.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(x=Be==null?void 0:Be.progress)==null?void 0:x.my_score,"/",(w=Be==null?void 0:Be.progress)==null?void 0:w.all_score),(!$||!ue)&&o.createElement(se.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${ye}`},o.createElement("div",{className:m.unit},o.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),ye)),(!$||!ue)&&o.createElement("div",{className:m.tags},o.createElement("div",null,o.createElement(se.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},o.createElement("span",null,o.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),o.createElement("span",null,Be.stages_count))),o.createElement(se.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},o.createElement("span",null,o.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),o.createElement("span",null,Be.members_count)))))))})),!S.length&&o.createElement(ae.Z,null)))}},70467:function(fn,ct,_){"use strict";_.d(ct,{jL:function(){return ve},w9:function(){return V},QD:function(){return Ht},cQ:function(){return X.Z},op:function(){return et},O5:function(){return Pe},_b:function(){return _e},t7:function(){return Q},Gi:function(){return Ye},YG:function(){return ye},qp:function(){return G},vr:function(){return st},qE:function(){return Dt},Je:function(){return z},wb:function(){return Be},cq:function(){return Ue},tp:function(){return S}});var m=_(59301),ce={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},ve=({dataSource:P=[],img:Je,imgWidth:J=346,title:rt,sunTitle:Gt,bannerExtraContent:Xt})=>m.createElement("div",{className:ce.banner},m.createElement("div",{className:ce.content},m.createElement("aside",null,m.createElement("p",null,m.createElement("b",null,rt),m.createElement("span",null,Gt)),P.length>0&&m.createElement("div",{className:ce.btns},P.map((Jt,an)=>m.createElement("div",{key:an,onClick:Jt.click},Jt.name,Jt.sign?m.createElement("span",{className:"sprite sprite-33"}):null))),Xt),Je&&m.createElement("img",{style:{marginTop:33,marginRight:38},src:Je,width:J}))),j={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},g=_(92310),de=_.n(g),ae=_(78267),G=({dataSource:P=[],value:Je,onChange:J,onTitleChange:rt,className:Gt,title:Xt,titleWidth:Jt=41,style:an={},fontColor:rn="#6A7283",showCount:Sn})=>{const[On,pn]=(0,m.useState)(1),[Pn,tn]=(0,m.useState)(!1),$t=(0,m.useRef)(null),Nt=(0,m.useRef)(null);return(0,m.useEffect)(()=>{var on;P.length!==0&&(((on=$t==null?void 0:$t.current)==null?void 0:on.clientHeight)>97?pn(1):pn(0)),P.length===0&&pn(0),tn(!1)},[P]),m.createElement("div",{className:de()(j.row,Gt,"fadeIn","animated"),style:an},m.createElement("div",{onClick:(0,ae.throttle)(()=>rt==null?void 0:rt(),2e3),style:{width:Jt,marginTop:Pn?12:4},className:`${j.title} ${rt?"current":""}`},Xt),m.createElement("div",{className:Pn?`${j.tagsWrap} ${j.tagsBorderWrap}`:j.tagsWrap},m.createElement("div",{className:j.bar,ref:Nt,style:On>0?{height:On===1?97:"auto",overflow:On===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},m.createElement("div",{className:j.tag,ref:$t},P==null?void 0:P.map(on=>m.createElement("span",{onClick:()=>J(on.id),key:on.id,style:{color:rn},className:Je===on.id?j.active:""},m.createElement("span",{title:on.name,className:j.name},on.name),!!Sn&&m.createElement("span",{className:j.num},on.count))))),!!On&&m.createElement(m.Fragment,null,On===1?m.createElement("div",{onClick:()=>{var on;pn(2),((on=$t==null?void 0:$t.current)==null?void 0:on.clientHeight)>245?tn(!0):tn(!1)},className:j.action},"\u5C55\u5F00",m.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):m.createElement("div",{onClick:()=>{Nt.current.scrollTop=0,pn(1),tn(!1)},className:j.action},"\u6536\u8D77",m.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},B={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},S=({dataSource:P=[],value:Je,onChange:J,className:rt,style:Gt={}})=>m.createElement("div",{style:Gt,className:de()(B.tabs,rt)},P.map(Xt=>m.createElement("span",{onClick:()=>J(Xt.id),className:Je===Xt.id?B.active:"",key:Xt.id},Xt.name))),C={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},R=_(37568),Q=({dataSource:P=[],value:Je="",onChange:J,onInputChange:rt=()=>{},className:Gt,style:Xt={},placeholder:Jt,allowClear:an=!1})=>{var rn;const[Sn,On]=(0,m.useState)(""),[pn,Pn]=(0,m.useState)("");(0,m.useEffect)(()=>{var Nt;let on=Je;(Nt=JSON.stringify(Je))!=null&&Nt.includes("{")&&(On(Je.id),on=Je.value||"");try{Pn(decodeURIComponent(on||""))}catch(nn){Pn(decodeURIComponent(on||""))}},[Je]);const tn=()=>{J(encodeURIComponent(pn),Sn||null)},$t=Nt=>{Nt!==Sn&&(On(Nt),J(encodeURIComponent(pn),Nt))};return m.createElement("div",{className:de()(C.input,Gt),style:Xt},!!P.length&&m.createElement("div",{className:C.dropdown},m.createElement("div",{className:C.text},(rn=P.find(Nt=>Nt.id===Sn))==null?void 0:rn.name,m.createElement("i",{className:"iconfont icon-zhankai4"}),m.createElement("b",{className:C.b1}),m.createElement("b",{className:C.b2})),m.createElement("div",{className:C.menu},P.map((Nt,on)=>m.createElement("div",{key:on,onClick:()=>$t(Nt.id)},Nt.name)))),m.createElement(R.default,{onPressEnter:tn,value:pn,onChange:Nt=>{Pn(Nt.target.value),rt(encodeURIComponent(Nt.target.value),Sn||null)},placeholder:Jt,variant:"borderless",allowClear:an,onClear:()=>J("",Sn||null)}),m.createElement("i",{onClick:tn,className:"iconfont icon-sousuo9 font14 current"}))},W={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},z=({value:P,onChange:Je,className:J,total:rt,pageSize:Gt,style:Xt={}})=>{const Jt=P<2,an=P>=Math.ceil(rt/Gt);return rt<=Gt?m.createElement(m.Fragment,null):m.createElement("div",{className:de()(W.quickPager,J),style:Xt},m.createElement("div",{onClick:()=>{Jt||Je(P-1,"prev")},className:Jt?W.disabled:""},"\u4E0A\u4E00\u9875"),m.createElement("div",{onClick:()=>{an||Je(P+1,"next")},className:an?W.disabled:""},"\u4E0B\u4E00\u9875"))},F={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},$=_(29787),ue=_(25399),pe=_(63139),oe=_(14185),xe=_(76406),ke=_(90736),Be=({className:P,dataSource:Je=[],col:J=4,right:rt,bottom:Gt=23,precision:Xt=0,wrapWidth:Jt=1200,trackEventItems:an,loading:rn})=>{const Sn=Math.floor((Jt-(J-1)*rt)/J);return m.createElement($.Z,{spinning:rn},m.createElement("div",{className:de()(F.list,P)},!!Je.length&&Je.map((On,pn)=>{const{name:Pn,id:tn,identifier:$t,power:Nt,cover_image_id:on,pic:nn}=On;return m.createElement("div",{className:F.wrap,key:tn,style:{width:Sn,marginRight:(1+pn)%J===0?0:rt+Xt,marginBottom:Gt}},m.createElement("a",{target:"_blank",href:`/shixuns/${$t}/challenges`,className:F.li,onClick:An=>{An.preventDefault(),an&&(0,xe.L9)([an]),Nt&&(0,xe.xg)(`/shixuns/${$t}/challenges`)}},m.createElement("div",{className:F.img},m.createElement("img",{className:F.cover,src:`${nn}`}),On.is_jupyter&&m.createElement("span",{className:`sprite sprite-43 ${F.sign}`}),On.is_jupyter_lab&&m.createElement("span",{className:`sprite sprite-42 ${F.sign}`}),On.is_unity_3d&&m.createElement("span",{className:`sprite sprite-44 ${F.sign}`})),m.createElement("div",{className:F.name},m.createElement(ue.Z,{title:Pn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},m.createElement("span",{className:F.e},Pn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),m.createElement("div",{className:F.tags},m.createElement(ue.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},m.createElement("span",null,m.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),m.createElement("span",null,On.challenges_count))),!!On.myshixuns_count&&m.createElement(ue.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},m.createElement("span",null,m.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),m.createElement("span",null,On.myshixuns_count))),m.createElement(ue.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},m.createElement("span",null,m.createElement("span",null,On.level))),m.createElement("div",{className:F.rate},m.createElement(pe.Z,{allowHalf:!0,disabled:!0,defaultValue:On.score_info}),m.createElement("span",null,"\xA0",On.score_info?`${On.score_info}\u5206`:"5\u5206")))),!Nt&&m.createElement("div",{className:F.lockWrap},m.createElement("img",{src:`${oe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),m.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Je.length&&m.createElement(ke.Z,null)))},X=_(54077),N={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",hidden:"hidden___NniIi",wrap:"wrap___pKgcW",btnsTop:"btnsTop___Lrm6T",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},k=_(62957),q=_(96599),te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Z=_(59301),x=(P,Je,J)=>new Promise((rt,Gt)=>{var Xt=rn=>{try{an(J.next(rn))}catch(Sn){Gt(Sn)}},Jt=rn=>{try{an(J.throw(rn))}catch(Sn){Gt(Sn)}},an=rn=>rn.done?rt(rn.value):Promise.resolve(rn.value).then(Xt,Jt);an((J=J.apply(P,Je)).next())}),V=({className:P,dataSource:Je=[],col:J=4,right:rt,bottom:Gt=23,precision:Xt=0,wrapWidth:Jt=1200,trackEventItems:an,loading:rn,category:Sn,hiddenClick:On,handleVery:pn=()=>!0,isCurrent:Pn})=>{const[tn,$t]=k.default.useModal(),Nt=Math.floor((Jt-(J-1)*rt)/J),on=nn=>x(void 0,null,function*(){tn.confirm({title:"\u7F6E\u9876",width:500,content:Z.createElement("div",null,"\u60A8\u786E\u5B9A\u8981\u5C06",Z.createElement("span",{className:"c-blue"},"\u201C",nn.name,"\u201D"),"\u8BFE\u5802\u7F6E\u9876\u5417\uFF1F"),okText:"\u786E\u8BA4\u7F6E\u9876",centered:!0,cancelText:"\u53D6\u6D88"})});return Z.createElement($.Z,{spinning:rn},$t,Z.createElement("div",{className:de()(N.list,P)},!!Je.length&&Je.map((nn,An)=>{const{subject_identifier:or,id:Ne,identifier:pt,power:It}=nn,ht=nn.is_public!=0&&nn.is_public;return Z.createElement("div",{className:N.wrap,key:Ne,style:{width:Nt,marginRight:(1+An)%J===0?0:rt+Xt,marginBottom:Gt}},nn.homepage_show&&Z.createElement("div",{className:N.btnsTop},Z.createElement(q.default,{color:"red"},"\u7F6E\u9876")),Z.createElement("a",{className:N.li,onClick:we=>{we.preventDefault(),pn(nn==null?void 0:nn.first_category_url)&&(an&&(0,xe.L9)([an]),(0,xe.xg)(nn.first_category_url))}},Z.createElement("div",{className:N.top},Z.createElement(ue.Z,{title:nn.name},Z.createElement("div",{className:N.name},nn.name)),Z.createElement("img",{className:N.img,src:oe.Z.IMG_SERVER+"/images/"+nn.avatar_url}),Z.createElement("div",{className:N.text,title:nn.creator},nn.creator),or&&Z.createElement("div",{className:N.btns},Z.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Z.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),ht&&Z.createElement("div",{className:N.sign},"\u516C\u5F00"),Pn&&Z.createElement("div",{className:N.hidden,onClick:we=>{we.stopPropagation(),On(nn)}},Z.createElement("i",{className:`iconfont ${Sn=="hide"?"icon-chakan2":"icon-yincangtiaojianshezhi"} font12`}),Sn=="hide"?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")),Z.createElement("div",{className:N.bottom},nn.visits>0&&Z.createElement(ue.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Z.createElement("span",null,Z.createElement("i",{className:"iconfont icon-liulanyan"}),Z.createElement("span",null,nn.visits))),nn.course_members_count>0&&Z.createElement(ue.Z,{title:"\u6210\u5458",placement:"bottom"},Z.createElement("span",null,Z.createElement("i",{className:"iconfont icon-chengyuan"}),nn.course_members_count)),nn.tasks_count>0&&Z.createElement(ue.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Z.createElement("span",null,Z.createElement("i",{className:"iconfont icon-zuoye"}),nn.tasks_count)),nn.is_end?Z.createElement("div",{style:{color:"#6B758B"}}):Z.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!nn.is_accessible&&Z.createElement("div",{className:N.lockWrap},Z.createElement("img",{src:`${oe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Z.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Je.length&&Z.createElement(ke.Z,null)))},fe={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},$e=_(44283),ye=({dataSource:P=[],value:Je,onChange:J,className:rt,style:Gt={},tabBarExtraContent:Xt})=>m.createElement("div",{className:de()(fe.tabs,rt),style:Gt},m.createElement("div",{className:fe.tabsWrap},P.map((Jt,an)=>!(Jt!=null&&Jt.hide)&&m.createElement("aside",{className:fe.tab,onClick:()=>{J(Jt.id),Jt.link&&$e.history.push(Jt.link)},key:an},m.createElement("div",{className:Je===Jt.id?fe.active:""},Jt.name),(Jt==null?void 0:Jt.resetCount)==null&&(Jt==null?void 0:Jt.total)!==void 0&&m.createElement("span",null,"\uFF08",Jt==null?void 0:Jt.total,"\uFF09"),(Jt==null?void 0:Jt.resetCount)!==void 0&&(Jt==null?void 0:Jt.total)!==void 0&&m.createElement(ue.Z,{title:(Jt==null?void 0:Jt.tip)!=null?Jt==null?void 0:Jt.tip:""},m.createElement("span",{style:{color:"#9096A3"}},"\uFF08",m.createElement("span",{style:{color:"#000"}},Jt==null?void 0:Jt.resetCount),"/",m.createElement("span",null,Jt==null?void 0:Jt.total),"\uFF09"))))),m.createElement("div",{className:fe.tabBar},Xt)),Ye=({className:P,style:Je={},children:J})=>m.createElement("div",{className:de()(P),style:Je},J),tt={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},nt=_(75727),Bt=_(93041);const qe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ue=({sortValue:P,dropValue:Je,className:J,onSort:rt,onDrop:Gt,dataSource:Xt=qe})=>{var Jt;return m.createElement("div",{className:de()(tt.orderWrap,J)},m.createElement(nt.Z,{dropdownRender:()=>m.createElement(Bt.default,null,Xt.map((an,rn)=>m.createElement(Bt.default.Item,{key:rn,onClick:()=>Gt(an.id)},an.name)))},m.createElement("span",{className:tt.orderTextWrap},(Jt=Xt.find(an=>Je===an.id))==null?void 0:Jt.name)),m.createElement("span",{className:tt.orderIconWrap},m.createElement("span",{className:tt.orderAsc},m.createElement("i",{className:P==="asc"?`iconfont icon-sanjiaoxing-up font12 ${tt.cursorPointer} ${tt.active}`:`iconfont icon-sanjiaoxing-up font12 ${tt.cursorPointer}`,onClick:()=>rt(P==="asc"?"desc":"asc")})),m.createElement("span",{className:tt.orderDesc},m.createElement("i",{className:P==="desc"?`iconfont icon-sanjiaoxing-down font12 ${tt.cursorPointer} ${tt.active}`:`iconfont icon-sanjiaoxing-down font12 ${tt.cursorPointer}`,onClick:()=>rt(P==="asc"?"desc":"asc")}))))},yt={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Le=_(7939),Ce=Object.defineProperty,he=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Ie=(P,Je,J)=>Je in P?Ce(P,Je,{enumerable:!0,configurable:!0,writable:!0,value:J}):P[Je]=J,M=(P,Je)=>{for(var J in Je||(Je={}))We.call(Je,J)&&Ie(P,J,Je[J]);if(he)for(var J of he(Je))Re.call(Je,J)&&Ie(P,J,Je[J]);return P},me=(P,Je)=>{var J={};for(var rt in P)We.call(P,rt)&&Je.indexOf(rt)<0&&(J[rt]=P[rt]);if(P!=null&&he)for(var rt of he(P))Je.indexOf(rt)<0&&Re.call(P,rt)&&(J[rt]=P[rt]);return J},Ee=(P,Je,J)=>new Promise((rt,Gt)=>{var Xt=rn=>{try{an(J.next(rn))}catch(Sn){Gt(Sn)}},Jt=rn=>{try{an(J.throw(rn))}catch(Sn){Gt(Sn)}},an=rn=>rn.done?rt(rn.value):Promise.resolve(rn.value).then(Xt,Jt);an((J=J.apply(P,Je)).next())}),et=P=>{var Je=P,{className:J,style:rt,children:Gt,loading:Xt=!1,openLoading:Jt,onClick:an=()=>{},size:rn="middle",shape:Sn="round"}=Je,On=me(Je,["className","style","children","loading","openLoading","onClick","size","shape"]);const[pn,Pn]=(0,m.useState)(!1);return m.createElement(Le.ZP,M({onClick:(0,ae.throttle)(tn=>Ee(void 0,null,function*(){Jt&&Pn(!0);try{yield an(tn)}catch($t){console.log("error",$t)}Jt&&Pn(!1)}),2e3,{leading:!0,trailing:!1}),className:de()(yt.btn,yt[`${rn}-${Sn}`],J),style:rt,size:rn,shape:Sn,loading:pn||Xt},On),Gt)},ut={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Dt=({className:P,style:Je,children:J=null,onClick:rt,title:Gt})=>m.createElement("div",{className:de()(ut.head,P),style:Je},m.createElement("span",{className:"primary-hover",onClick:rt},m.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),m.createElement("b",{title:Gt},Gt),m.createElement("div",{className:ut.node},J)),mt={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Ht=({confirmShow:P=!0,confirmTitle:Je,confirmClick:J,cancelShow:rt=!0,cancelTitle:Gt,cancelClick:Xt,className:Jt,style:an,confirmLoading:rn=!1})=>m.createElement("div",{className:de()(mt.btns,Jt),style:an},P&&m.createElement(Le.ZP,{loading:rn,onClick:J,type:"primary",className:mt.confirm},Je),rt&&m.createElement(Le.ZP,{onClick:Xt,className:mt.cancel},Gt)),zt={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},st=({className:P,style:Je={},LeftContent:J,children:rt,RightContent:Gt})=>m.createElement("div",{className:de()(zt.fixedBottom,P),style:Je},m.createElement("div",{className:zt.wrap},m.createElement("div",{className:zt.left},J),m.createElement("div",{className:zt.center},rt),m.createElement("div",{className:zt.right},Gt))),Rt={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},_e=({className:P,style:Je={},dataSource:J=[]})=>m.createElement("div",{className:de()(Rt.crumbs,P),style:Je},J.map((rt,Gt)=>Gt<J.length-1?m.createElement(m.Fragment,{key:Gt},rt.path||rt.onClick?m.createElement("span",{className:Rt.hover,onClick:rt!=null&&rt.onClick?rt.onClick:()=>$e.history.push(rt.path)},rt.name):m.createElement("span",null,rt.name),m.createElement("span",null,"\xA0",">","\xA0")):m.createElement("span",{key:Gt,style:{color:"#5F6368"}},rt.name))),Ze=_(11938),b=Object.defineProperty,A=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,Se=(P,Je,J)=>Je in P?b(P,Je,{enumerable:!0,configurable:!0,writable:!0,value:J}):P[Je]=J,je=(P,Je)=>{for(var J in Je||(Je={}))le.call(Je,J)&&Se(P,J,Je[J]);if(U)for(var J of U(Je))wt.call(Je,J)&&Se(P,J,Je[J]);return P},Ge=(P,Je)=>A(P,Oe(Je)),Y=(P,Je)=>{var J={};for(var rt in P)le.call(P,rt)&&Je.indexOf(rt)<0&&(J[rt]=P[rt]);if(P!=null&&U)for(var rt of U(P))Je.indexOf(rt)<0&&wt.call(P,rt)&&(J[rt]=P[rt]);return J};const{Countdown:ne}=Ze.default;var Pe=P=>{var Je=P,{onChange:J}=Je,rt=Y(Je,["onChange"]);const[Gt,Xt]=(0,m.useState)(null);(0,m.useEffect)(()=>{typeof Gt=="number"&&Gt>=0&&J(Gt)},[Gt]);const Jt=an=>{const rn=Math.floor(an/1e3);Xt(rn)};return m.createElement(ne,Ge(je({},rt),{onChange:Jt}))}},83195:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ue}});var m=_(59301),ce=_(28284),se=_(6767),ve=_(62957),j=_(37568),g=_(94968),de={flex_box_center:"flex_box_center___eFoM9",flex_space_between:"flex_space_between___Wg6Gr",flex_box_vertical_center:"flex_box_vertical_center___TqrrQ",flex_box_center_end:"flex_box_center_end___L9c4u",flex_box_column:"flex_box_column___SvH8v",form:"form___LQCl5",btn:"btn___l3d4K",img:"img___CeTIL"},ae=_(39967),o=_(14185),G=_(19248),B=_(70467),E=Object.defineProperty,S=Object.defineProperties,C=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,W=(pe,oe,xe)=>oe in pe?E(pe,oe,{enumerable:!0,configurable:!0,writable:!0,value:xe}):pe[oe]=xe,D=(pe,oe)=>{for(var xe in oe||(oe={}))ee.call(oe,xe)&&W(pe,xe,oe[xe]);if(R)for(var xe of R(oe))Q.call(oe,xe)&&W(pe,xe,oe[xe]);return pe},z=(pe,oe)=>S(pe,C(oe)),F=(pe,oe,xe)=>new Promise((ke,De)=>{var Be=k=>{try{N(xe.next(k))}catch(q){De(q)}},X=k=>{try{N(xe.throw(k))}catch(q){De(q)}},N=k=>k.done?ke(k.value):Promise.resolve(k.value).then(Be,X);N((xe=xe.apply(pe,oe)).next())}),ue=({visible:pe,onOk:oe,onCancel:xe,title:ke=""})=>{var De,Be;const[X]=ce.default.useForm(),[N,k]=(0,m.useState)(!1),[q,te]=(0,m.useState)([]),[Z,x]=(0,m.useState)(!1);console.log(pe,22),(0,m.useEffect)(()=>{var Ye,tt;if(pe!=null&&pe.id){X.setFieldsValue(z(D({},pe),{attachment_id:(Ye=pe==null?void 0:pe.attachment)==null?void 0:Ye.id}));const nt=[z(D({},pe==null?void 0:pe.attachment),{response:{id:(tt=pe==null?void 0:pe.attachment)==null?void 0:tt.id}})];te(nt)}},[pe]);const w=()=>{X.submit()},V=()=>{xe()},fe=Ye=>F(void 0,null,function*(){var tt,nt;k(!0);const Bt=z(D({},Ye),{attachment_id:((nt=(tt=q==null?void 0:q[0])==null?void 0:tt.response)==null?void 0:nt.id)||""});oe(Bt)}),$e=Ye=>{var tt,nt,Bt;X.setFieldsValue({attachment_id:""}),["uploading","done","removed"].includes(Ye.file.status)&&(Ye.file.status==="uploading"&&x(!0),Ye.file.status==="done"&&x(!1),te(Ye.fileList),X.setFieldsValue({attachment_id:(Bt=(nt=(tt=Ye.fileList)==null?void 0:tt[0])==null?void 0:nt.response)==null?void 0:Bt.id}))},Qe=Ye=>{te([])},ye=Ye=>Ye.type==="image/jpeg"||Ye.type==="image/png"?Ye.size/1024/1024>2?(se.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E2MB"),Promise.reject()):(te([]),!0):(se.ZP.error("\u8BF7\u4E0A\u4F20jpg\u6216png\u7684\u56FE\u7247!"),Promise.reject()),He=()=>{var Ye,tt;return m.createElement("div",{className:de.img},m.createElement("img",{src:o.Z.API_SERVER+"/api/attachments/"+((tt=(Ye=q==null?void 0:q[0])==null?void 0:Ye.response)==null?void 0:tt.id),alt:"avatar",style:{width:"100%"}}),m.createElement("div",null,m.createElement(G.Z,{onClick:()=>{te([]),X.setFieldsValue({attachment_id:""})},style:{fontSize:"16px",color:"red"}})))};return m.createElement(ve.default,{title:`${pe!=null&&pe.id?"\u7F16\u8F91":"\u65B0\u5EFA"}${ke}`,open:pe,onOk:w,centered:!0,onCancel:V,confirmLoading:N,okButtonProps:{disabled:Z},width:686,afterClose:()=>{k(!1),te([]),X.resetFields()},okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",wrapClassName:ae.Z.CustomCss},m.createElement(ce.default,{form:X,colon:!1,labelCol:{span:4},wrapperCol:{span:18},onFinish:fe,className:de.form},m.createElement(ce.default.Item,{label:`${ke}\u540D\u79F0`,name:"name",rules:[{required:!0,message:`\u8BF7\u8F93\u5165${ke}\u540D\u79F0`},{whitespace:!0,message:`\u8BF7\u8F93\u5165${ke}\u540D\u79F0`},{max:100,message:"\u53EA\u80FD\u8F93\u516560\u4E2A\u5B57\u7B26"}]},m.createElement(j.default,{maxLength:100,placeholder:`\u8BF7\u8F93\u5165${ke}\u540D\u79F0`})),m.createElement(ce.default.Item,{label:"\u4F5C\u8005",name:"author",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005"},{max:50,message:"\u53EA\u80FD\u8F93\u516550\u4E2A\u5B57\u7B26"}]},m.createElement(j.default,{maxLength:50,placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005"})),m.createElement(ce.default.Item,{label:"\u51FA\u7248\u793E",name:"publisher",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u51FA\u7248\u793E"},{whitespace:!0,message:"\u5B9E\u8DF5\u51FA\u7248\u793E"},{max:50,message:"\u53EA\u80FD\u8F93\u516550\u4E2A\u5B57\u7B26"}]},m.createElement(j.default,{maxLength:50,placeholder:"\u8BF7\u8F93\u5165\u51FA\u7248\u793E"})),m.createElement(ce.default.Item,{label:"\u51FA\u7248\u65F6\u95F4",name:"publication_time",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u51FA\u7248\u65F6\u95F4"},{whitespace:!0,message:"\u8BF7\u8F93\u5165\u51FA\u7248\u65F6\u95F4"}]},m.createElement(j.default,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u51FA\u7248\u65F6\u95F4"})),m.createElement(ce.default.Item,{label:"ISBN",name:"number",rules:[{required:!0,message:"\u8BF7\u8F93\u5165ISBN"},{whitespace:!0,message:"\u8BF7\u8F93\u5165ISBN"}]},m.createElement(j.default,{maxLength:60,placeholder:"\u8BF7\u8F93\u5165ISBN"})),m.createElement(ce.default.Item,{name:"attachment_id",label:"\u5C01\u9762\u56FE\u7247",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE\u7247"}]},m.createElement("div",{className:de.upload},(Be=(De=q==null?void 0:q[0])==null?void 0:De.response)!=null&&Be.id?He():m.createElement(g.default,{fileList:q,action:`${o.Z.API_SERVER}/api/attachments.json`,onChange:Ye=>$e(Ye),onRemove:Ye=>Qe(Ye),beforeUpload:Ye=>ye(Ye),withCredentials:!0,accept:"image/*"},m.createElement(B.op,{style:{borderRadius:"2px",marginLeft:4,marginTop:3}},m.createElement("i",{className:"iconfont icon-shangchuantupian2 mr5"}),"\u4E0A\u4F20\u56FE\u7247")))),m.createElement(ce.default.Item,{label:"\u8D2D\u4E66\u94FE\u63A5",name:"buy_url",rules:[{type:"url",message:"\u8D2D\u4E66\u94FE\u63A5\u683C\u5F0F\u4E0D\u6B63\u786E"}]},m.createElement(j.default,{placeholder:"\u8BF7\u8F93\u5165\u8D2D\u4E66\u94FE\u63A5",maxLength:150})),m.createElement(ce.default.Item,{label:"\u76F8\u5173\u8BFE\u7A0B\u94FE\u63A5",name:"relevance_url",rules:[{type:"url",message:"\u76F8\u5173\u8BFE\u7A0B\u94FE\u63A5\u683C\u5F0F\u4E0D\u6B63\u786E"}]},m.createElement(j.default,{placeholder:"\u8BF7\u8F93\u5165\u76F8\u5173\u8BFE\u7A0B\u94FE\u63A5",maxLength:150}))))}},89508:function(fn,ct,_){"use strict";_.r(ct),_.d(ct,{default:function(){return xe}});var m=_(59301),ce=_(44283),se=_(77019),ve=_(5269),j=_(458),g=_(25399),de=_(90736),ae={flex_box_center:"flex_box_center___ib72a",flex_space_between:"flex_space_between___QmDfb",flex_box_vertical_center:"flex_box_vertical_center___XXhZp",flex_box_center_end:"flex_box_center_end___HeMGP",flex_box_column:"flex_box_column___g0Y22",Onerow:"Onerow___vo6jS",MultiLine:"MultiLine___W7Vel",wrap:"wrap___VxAa4",list:"list___BOHb1",left:"left___KgBuF",right:"right___bBZU2",title:"title___uBnVu",des:"des___MgP7x",PieceFenbuList:"PieceFenbuList___gzTyL",PieceFenbuItem:"PieceFenbuItem___Z9J18",MultiLine3:"MultiLine3___KeM07"},o=_(49317),G=_(70467),B="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAACxVJREFUWEftWGtwVdW9/6219vs8804gFhQEMwQJBqI8gxRBafqUjNWO006rlLHttHeu05lOv3T6tf1UR3uruXO1t4oaBSsRkFqNrZRqI51ChaLhJUEgj5Pk5Jz9Wnuv1VmLez+0QDsdOtN+YM9kspPZ5+zf/r3+/3OIlJLh3/gg1wBepTrXGLxKAnGNwX8Jg/v37/fyDQ2zIUSTTc2WOE68JOFnGMsPLV78sTIANvSH9zoyrr2QgZA4lufjavl8QpKzXV1dU/8I6L8p8fDw8MJyudwsKXUdx6v3bLeVGWarYbAbDMtshYDHGPMIgSFBKqXpiSEpo+/L2Lovm8t8LptxikISEkbc5zz0eZyM8iQ+mabJaR7JkRR8VPBkhnNSnjWreHju3Ln8r8H/NUA6+O6peUOTwTyPV9p6FrV8qbGxuZEnghIiTEaJlQhpETAqRAop1dtJpGkKZpoolUp86He/PbJwwaK58+bNKUjBwRMJaphQF6vLkziBkDIWaRpxHnNImQa+Hx06M/r0Ce4NXVdL37/31vajAIR6978A+MN9h5y3T0/9cLSS3LvUKXvf2rTErG1oAecRCJFIkwQRF6hWfYSBD0ZN5HJZRHGEMAzh+z4OHDiA9vbFaGtbAJHGqAYRLMvWrw2CEJ7ngRACy7RhOw48L4MkqODJPYPJ3lIulYxsX9nMvvG93nXBJQC/1z/ovjkSPwGJ3g35Crtv3RIIZiEKA2SzHkzTQJoSJKmEaRhIhQAlEiIVYIaJsbFx7Nu3Fx1Ll6JjyWK4jolqEIPzBAQEURRrcAmP4fsBXM/DddfNReyX0T8wgJdHPZRhPdc+13vg0SsB3D8S/SRN0nu681V2//pOZAu14EkIyzTguA5GR8cRRhye66LqV8CYGuUEpmFpqXfufAmLFrXjxgU3oKaYhx9EGmDCE0RhBEIpLNOCZVsQQiDj5WCbFC/u2Y2B8w58Zjx705z8g1cE+Osz/uOCy97uQsW4f/1yMMtBkkRwHCWnumGMmbKvzAFCJSzT1F6UhKA8NYWBlwfQccsyLF/WAds2MVP1EccckBTKt5zHkFLCNC2kSQrTdJDPOtjx6l4MnLP/PsDBk5UnZJr0dhcC9sUNt8JwMoDkyGQcLUsUCVQrVYRxhFw2B9dTD8A1S6Ojoxh84w0sWXILupYvRS6fweRUGX7VR5pKGIapQTqOA8YMVKtVFAo1sA2CHa/uw65zJnzKtrddX9x6WQa/1j/oHh6e6pNpuqW7GLIvb1qJTKEIIWJ4rgIiEAQx/CBEmgqdTEIB13Z1Qs+eO4u9u3dj+fIVuOWWm+G6JiozPvwwgJQEBjVBCNXyKmsogCokjsHwwt492HWWwmfWM4vm1371igD/8H6pj0dx74Z6Tr+yaTWo44BIDi/jaQYrlQBRnIBSAoOZOjiZTAY84RgZOYM9e3ajfdHNWLXqVhQKOVQqKt0BYs4hhdRBUdWUzxfAOdcPWlfI4+U3XseO0yliZj/TvrDh8gBVin9x7EJfFMa962s53br5duTrakGRwHFtRFGKaiVEGEXa4CoUhsHAGNWyjZw9gxf6+7Fq1Vp0dXXC8xxwLjAxUQJPUmQzeVBCVKZAKUUcXfSjaxn4+eu/xIsnuQL49JLGlm2PPnSZmlESH3zvfF8U+r0bGiV9YFM3mOuAkkT318TEtGaDx4nuMMe2YdsWTOtiUD4cOYkdL+xAW1s7urvXoLm5ATwWGBuf0D607It9qNi2bRvNTbPheVn45RKe2z2AF06ESCz36Y4mZ9ujD/Ve2oMK4LuHzvQFYdi7sYnRB+5cg1xtEaYJ2Lar01vxAxBQpOnF6igWC7AdC75fxfETw3jppZewasVarFu3FrbDEMcSUkCHRAVJhUR1oWJfPbTqwtivoH/3Hjw7PANpeT9buaBl2w/u3xheUtQK4Du/P9UXhuGWO1ss9pU7V8FwVeIETNPGhQsTmJqa0mC1tJShvqEOjmNjojSJ06dPaQ8ualuM29etRX1jLQI/Qhyn2mtj46NIkgQF5b9EVQ80QINIvHbgbWw/Ng1Yzs8+e9N12x6+IsCDx/uCIN6ysdlg23rWoX5WM4AYhmGjOsNRUZUhEkgh9AizXUuXuPLS4T8exrPbt2PN6m5s3nwXMllbe9b3FRlEl7QKipDi/zqRQ9UAFTH2vLkf24+VYHjZn37mpjkP/Q2Aw32VarhlUwtjX/2ECkkd0jSESCWq/kVZJ0pj+kaO46K2rgaOltjH8RMnMLBrF5Z2dGoPFoo5XS8qJFEYgzKKIFBjMwfDMHTQXNeDTCLsefNNPHNkEm6h+NQn137saw9vvJLE737wxEw16N3UYrCtm9fBzuaQ8BAJTxFzoU2dpDFMZoEZTKfb82xdIwcPHkT/88/jtq4V+PRnP4XamoJmT3VnGKmZHCMMAy2tkFKfa1Z5iAOHDuPZo5Nw83VP9qxt/frfBXhHE2HbetajrmkWVDPEcaI7bHx8DOofikl1p0Ixrz0ohMSRI+/hlYFd6FjaiU0b70BtbVFPEuW7MIxQqVT09FEJzuULOiyUMviVKezYuxfPvT+DXF39/2xesfQbD2+8+dKQqB585eDw45Wq37uxmRkP3rUGVqaAKAqRJKmeBJVqRVeMaZh6ItTUFOC5Nqp+gKGhIc3govbF2HL33WiZ1aSlVb1ZLs+gWq3oBlBzu6ZYoycRNQxwv4Kdv9iH5z7wUdfQ8N8fX97+zSsCfPXQyZ9MTlfu2dAomSrqOTcs0AGIIrWVqCVV6h91WJYJL+Mim7EQJyne+tWv8dRTP8VtK1ait3cLGhuLiEKp98Ao4lArq2L6/0teBY0yhjiYwc9few39xwM0Nzf13d3R9q37r8Tga4c//HFpunzP7fWp+fVPb8TcG9v0SFILqZJJtf/FBdUHT9QkEHrvc70Mjh49ih0v7sCyZV1YvWY1TJPqmtHz17J1INSiqjYZNUnUoTZxtQ8+v3sA/cMBGpubH39w/er/6OlsiS67sA4eOfPYhAYorY8vnA07k0MUhwh8X+9/apIEfhWVahlJfFF6IVV9uaDUwrmPJlBfX4RhSsSRr6YaDMq0HbxMDplMFq6bheM5sEwHhgJMJP40cg47T8ZobGj4ry+vv/4/ezo7Lw/wNx+cf2R0cvreFU7Jzk+dwHQYKWEgU4lEJEgEtEyJkOCp1Fu1zahmBbIKi3IIaYKTLATnCOJYp92kaqmlYJSAEgpDn6vPfBSOyeA1zMVbcYtsaWp47AurWr99WYD/u++Q03/4T4+cHJu5zxs/bhulk0jUqiCBSABhKhCrkSXVb4IUBLGQyPMqlmeOQYhpTPsSNRkg4xTwzuR8nEsdDcZgBBalMAlgGQSO/pvAYgSG4IBXh3D2MjmvtfGRO+a1fmdrz2UYfKx/0N1/YfpHH/HM5/2U2lF5IiWQIpGpJKBCyFRIIQUjUp2nikrCaJrMjDnO+NuFD8dilCdTOFaM62fZCGuXzrDiHB9SMkLAVOmlghJqUEoUdSDUACVCpNTOFFgu68kGI3jkjuvJd7f29Fwq8ZODp8xjH33w+Qu+0eVmCtRiyVTK06gxZ4UXJifD5ppsQFME5ZlyuLC1xj81XgpaXbsyUubz974/um06DOcLHrpxnER5L3/m9oVNjzc55I9Ozs3ZML0Pp6ed2fWNzunSjCMpdWqyGXekFFgZ13UCKXOVim/McuXr3V2tO++aP18V7T/vu5nhQ4daHn3r2G3nQt5Q5xhTX7h13jsrOztP/SPfIlzu2mtfHl1j8GoZuNrXX/Pg1TL4ZyWza4M6tuQaAAAAAElFTkSuQmCC",E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAACF9JREFUWEftmH1MU1cfx0+LKFy4UJAWQQHtUk2jSFTClESpxrgF3Vz2yoyTbRgxZDg0UYcYvXuy1LcCi1EQpxvJ8+LGMHFLlhRnJsjwJQ6aZnYOqIiCChVQoKW11Hb5nmeHXPqyusCe7I/nJs3tvffccz7n+3s5v3skHo8nhPyND8n/ASdoHR8FN23aFDY0NPTm0qVLNaGhoW6Xy0WkUum4Ydi1RCIJOnxYWBgJCQkhT58+9dvW4/HQ5y6XS/pDY+OPTx2OL79Zu9ZBtmxx4wUfwPz8/JltbW3f3r59O81ut1M4b5BnAaOdSyQkOTmZqFQqABDA4GBnRux2u0kEx5Eno6O/TOX5tV9UVnaxZz6AgiAkXLhwofbq1avPB5p1UNlEDcLDw0lmZibBeXR0lD4BOCDZRAGI5zKZzDBjxoxXDh48eC8goFarjaurq/vcaDRmDw4O/hkWv21hvgULFhClUkkBvdXDS1TBiAjCcdyF2NjYTeXl5ZaAgAcOHJCdP3/+U5PJtPHhw4cTBkQH0dHRJD09nUydOpX6oreCuIc2HMd9rVAoCnQ63aOAgIcOHYqsq6vTtra2Fty/f39SAKHivHnzSFJSEvVF7wOAsbGxMPNnUVFRuysqKoYCAup0ujC9Xl9iNpuL79y5MymA6CQmJoakpaXR/mBS8QFAhUIBQJ1KpfpYEAR7QMDq6urQM2fOFHV0dBwwm82TBhgaGkrUajU1pbeKAExMTIQf7lcoFEfKysqcAQGbm5ul+/bty7t161Zla2vrpAGio4SEBDJr1iwfFQEI8/M8/2FWVlbllt9zII14f0vd+vXr32hvb//nzZs3p0wm4bRp08icOXNoShGbGYomJyd7FArFu9XV1f8Wj+kXMCcnZ82NGze+NJlMUZMJiL7ga3K5nKYblnKgoFKptCcmJuacPn36u6CAubm5GUajsdZoNCZONiB8EaZGymGQUFOlUlmUSuUbJ06caAoKWFBQMP/atWu1BoNB5S+xThQaEc3zPAUEHPKiWq2+PX/+/NfLy8uNQQG3b98+98qVK/9qbm5e7C9vTRQQKgISYADEep+amvpzamrq22VlZb8GBdy1a9fsxsbGUwaDQfPkyZOJ8vh9H0sbW58BvGjRoqb09PT3tVrtraCAe/fuTWxoaDje0tLy0sjIyF8CiNWF4ziaExHdGRkZ+hUrVmwtKSnpDgqo0+mmnzt3rrSlpWUjSq6/6mBrMkCXLVv21apVq7bv2bNnrFAImAe3bdsW0dXV9Ul/f3/h48ePqY/4CxZxyfQskxAXCXiXFb4IGLlcXhUfH18sXocDAhYVFcVxHFdmNps3dHZ20rQAkwwNDaFmI4CGk/f19dGcNjAwQMsllFOsesbgMB2eoU1/fz8tCHCNd9EXqm0ECc5qtfprq9X6objUCggoCMJzHMdVd3d3L3vw4AGZPn06jTj4I0BsNhuJjIwkw8PDJCoqil6zUkqsNgBRU2L9tVqtY++gDwQfJsMAZ8+e/ZPNZntn//797UF98PDhw4tsNlutyWRKQcfwEaiA8gsrAe4hAuGfAMeAFouFtnn06BFtg4nhDHhAoA/8hznRdubMmaS3t5fewyQXL158n+f51woLC68HBSwtLX3J6XT+5/Lly+FOp5PCQAWYFmeAQR2mwpQpUyg0QB0OB1WKtcU1JoE26AvmhPLoB+riOdRfvnz5qNvt3rh79+6zfwgoCEJISEhIgVQqLW9qahpzZHQCX+zu7ibx8fEE1XZcXBwdFIPADe7du0fb9PT00PIJbQANOPggFIZ6qGjQln2jQOGsrCxM+KO+vr5Pjx49OlbV+hQLeXl5XFJS0j8kEklRQ0MDnTE6gir4MWfH4AgYPEMug+kQNAgAqAdgKASlAYj/mBBcAMECFeHTeAZLrFy5EkpX3L17d09VVZU1YD2Ijya73X6qra1tHXwOA3V1ddGPHlTYAEAgQAE4OUs14jOeszWWDYRrqIozYKFiR0cHSUlJoarirFarz4eFheXu3Llz7GPIR8Hjx4/Pstls37a3ty/EbOF/OMM8UIgt8rgHQHb4AxV/P+M5FMeBwICaCBIIADURUCqV6pfo6Oh1mzdvvhtQwZKSkrSFCxfqExIS5DABS6iYOcuFzDR/VOmwpCx2eBbNmCRqQGYB9IMo7+3tfWwwGF7UarU/BQQsLi5+WaPRnOV5XoIAoMlStMUBFWEi+I734Q9K3Aa+ipTCClZxe/TncDg89fX1b69evfqsRqOh2xDjTIwIdrvdH2RnZ5cilXh/feEFACKleO/XsEmITe09AfaBDvOyhM7a432oqNfriwkhZYIg0M2ccYD5+fnTUlJSDq5Zs6YQS5H3gc4QvTCxN+CzrMUwKyDgb2JA9i5y48WLF09aLJYdR44ccfgAVlRUhLvd7jOZmZnrkCrGJczfi0tEHNRlJhb7ITMZ81tW0rPJwMQIOjGgOMgQRNevX/++p6fndUEQbD6AO3bsmLFkyZLv586dq4YZvQExAJIwfJMN6q+iEd/z3iRi3yQ4i3e78B95trOz03zp0qXVx44do3XhOBPnbd2a8darr+plMlkUq6TFJRKSMnwQpgIg+4nVFDs+/qMt2zSCD6ItUosYkAmB1cpqtY7U1NRknzx58kcfwJzc3HXvbdhwDr7A1lBv32JbcoCDkiMjI7aBgQE72xTyyn2eiIiIcIVCEQkwlrzRhvmgOLgACPeprKzMqampqfUB3PnCC8nO1NQtsTJZ/KjD4fa3USkKDunw8HCX0+m8NDg42Ge1Wul2K5Rhh8vl8sjl8tiYmBgNz/NJHo/nv7umfnZm0S/HcVKLxdJXX19f1dTU1OkD+CyR+L9u87ff5f8NjD4NdNLUnrwAAAAASUVORK5CYII=",S=_(83195),C=_(35883),R=_(14185),ee=_(15267),Q=_(76406),W=Object.defineProperty,D=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,$=(ke,De,Be)=>De in ke?W(ke,De,{enumerable:!0,configurable:!0,writable:!0,value:Be}):ke[De]=Be,ue=(ke,De)=>{for(var Be in De||(De={}))z.call(De,Be)&&$(ke,Be,De[Be]);if(D)for(var Be of D(De))F.call(De,Be)&&$(ke,Be,De[Be]);return ke},pe=(ke,De,Be)=>new Promise((X,N)=>{var k=Z=>{try{te(Be.next(Z))}catch(x){N(x)}},q=Z=>{try{te(Be.throw(Z))}catch(x){N(x)}},te=Z=>Z.done?X(Z.value):Promise.resolve(Z.value).then(k,q);te((Be=Be.apply(ke,De)).next())});const oe=({globalSetting:ke,dispatch:De,virtualSpaces:Be})=>{const[X,N]=(0,m.useState)(!0),[k,q]=(0,m.useState)(!1),[te,Z]=(0,m.useState)(parseInt(localStorage.getItem("isMaterPieceFenbu")||"1")),[x,w]=(0,m.useState)([]),{virtualSpacesDetails:V}=Be,fe=(0,ce.useParams)(),[$e,Qe]=(0,m.useState)("1"),ye=(V==null?void 0:V.is_member)||(0,ee.Ny)();(0,m.useEffect)(()=>{He()},[$e,window.localStorage.getItem("vtrsModuleId")]);const He=()=>pe(void 0,null,function*(){N(!0);const nt=yield(0,o.ZP)(`/api/virtual_classrooms/${fe.virtual_spacesId}/subject_materials/list.json`,{method:"get",params:{material_type:$e,virtual_module_id:window.localStorage.getItem("vtrsModuleId")}});(nt==null?void 0:nt.status)!==-1&&w((nt==null?void 0:nt.list)||[]),N(!1)}),Ye=[{id:"1",name:"\u4E3B\u6559\u6750"},{id:"2",name:"\u5B9E\u8DF5\u6559\u6750"}],tt=nt=>pe(void 0,null,function*(){const Bt=yield(0,o.ZP)(`/api/virtual_classrooms/${fe.virtual_spacesId}/subject_materials.json`,{method:"post",body:ue({material_type:$e,virtual_module_id:window.localStorage.getItem("vtrsModuleId")},nt)});(Bt==null?void 0:Bt.status)!==-1&&(He(),q(!1))});return m.createElement("section",{className:ae.wrap},m.createElement(G.YG,{value:$e,onChange:nt=>{Qe(nt)},tabBarExtraContent:ye&&m.createElement(se.Z,{align:"middle"},m.createElement(ve.Z,{className:"mr20"},m.createElement("i",{className:`iconfont ${te!=1?"icon-fenbu-2":"icon-fenbu"}`,onClick:()=>{Z(te!=1?1:2),localStorage.setItem("isMaterPieceFenbu",`${te!=1?1:2}`)}})),$e==="1"&&m.createElement(G.op,{onClick:()=>q(!0)},m.createElement("img",{className:"mr5",width:20,style:{marginTop:-2},src:B}),"\u65B0\u5EFA\u4E3B\u6559\u6750"),$e==="2"&&m.createElement(G.op,{onClick:()=>q(!0)},m.createElement("img",{className:"mr5",width:20,style:{marginTop:-2},src:E}),"\u65B0\u5EFA\u5B9E\u8DF5\u6559\u6750")),dataSource:Ye}),m.createElement(j.Z,{className:"mt20",loading:X},!x.length&&m.createElement(de.Z,null),te!=1?m.createElement("div",{className:ae.PieceFenbuList},x.map(nt=>{const{name:Bt,id:qe,attachment:jt,author:Ue,publisher:yt,number:Le,publication_time:Ce,description:he}=nt;return m.createElement(se.Z,{key:qe,className:ae.PieceFenbuItem,wrap:!1,onClick:()=>ce.history.push(`/${Q.AS}/${fe.virtual_spacesId}/material/${qe}/detail?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},m.createElement(se.Z,{style:{flexDirection:"column",width:171}},m.createElement("img",{width:171,height:215,src:R.Z.API_SERVER+(jt==null?void 0:jt.url)}),m.createElement(ve.Z,{className:"font12",style:{marginTop:"15px"}},"\u4F5C\u8005\uFF1A",Ue),m.createElement(ve.Z,{className:"mt10 font12"},"\u51FA\u7248\u793E\uFF1A",yt),m.createElement(ve.Z,{className:"mt10 font12"},"ISBN\uFF1A",Le),m.createElement(ve.Z,{className:"mt10 font12"},"\u51FA\u7248\u65F6\u95F4\uFF1A",Ce)),m.createElement(se.Z,{className:"ml20",style:{flexDirection:"column",flex:1,position:"relative"}},m.createElement(g.Z,{placement:"topLeft",title:Bt},m.createElement(ve.Z,{className:`${ae.MultiLine} font16`,style:{marginTop:"13px",fontWeight:500}},Bt)),m.createElement(ve.Z,{className:ae.MultiLine3},m.createElement(C.Z,{showTextOnly:!0,value:"\u7B80\u4ECB\uFF1A"+(he||"\u6682\u672A\u586B\u5199\u5185\u5BB9\uFF5E")}))))})):m.createElement(m.Fragment,null,x.map(nt=>{const{name:Bt,id:qe,attachment:jt,author:Ue,publisher:yt,number:Le,publication_time:Ce,description:he}=nt;return m.createElement("div",{key:qe,className:ae.list,onClick:()=>ce.history.push(`/${Q.AS}/${fe.virtual_spacesId}/material/${qe}/detail?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`)},m.createElement("div",{className:ae.left},m.createElement("img",{src:R.Z.API_SERVER+(jt==null?void 0:jt.url)})),m.createElement("div",{className:ae.right},m.createElement("div",{className:ae.title},Bt),m.createElement("aside",null,m.createElement(g.Z,{title:Ue},m.createElement("span",null,"\u4F5C\u8005\uFF1A",Ue)),m.createElement(g.Z,{title:yt},m.createElement("span",null,"\u51FA\u7248\u793E\uFF1A",yt))),m.createElement("aside",null,m.createElement(g.Z,{title:Le},m.createElement("span",null,"ISBN\uFF1A",Le)),m.createElement("span",null,"\u51FA\u7248\u65F6\u95F4\uFF1A",Ce)),m.createElement("div",{className:"c-grey-666 font14 mb5"},"\u7B80\u4ECB\uFF1A"),m.createElement("div",{className:ae.des},m.createElement(C.Z,{showTextOnly:!0,showLines:3,value:he||""}))))}))),m.createElement(S.Z,{visible:k,title:$e==="1"?"\u4E3B\u6559\u6750":"\u5B9E\u8DF5\u6559\u6750",onCancel:()=>q(!1),onOk:tt}))};var xe=(0,ce.connect)(({virtualSpaces:ke,globalSetting:De})=>({globalSetting:De,virtualSpaces:ke}))(oe)},20047:function(fn,ct,_){"use strict";_.d(ct,{AL:function(){return F},Iy:function(){return B},Qv:function(){return C},ez:function(){return z},jb:function(){return E}});var m=_(32834),ce=_.n(m),se=_(11690),ve=_.n(se);let j=1;function g(xe,ke){const De=xe.match(/^(\s+)(?:```)/);if(De===null)return ke;const Be=De[1];return ke.split(`
|
|
|
`).map(X=>{const N=X.match(/^\s+/);if(N===null)return X;const[k]=N;return k.length>=Be.length?X.slice(Be.length):X}).join(`
|
|
|
`)}let de=[],ae=["<ul>"];const o=new(ce()).Renderer,G=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function B(){de.length=0,ae=["<ul>"]}const E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function S(xe,ke,De,Be){if(ke>=xe.length||xe[ke].level<=De)return ke;var X=xe[ke];Be.push("<li><a href='#"+j+X.anchor+"'>"+X.text+"</a>"),ke++;var N=[];return ke=S(xe,ke,X.level,N),N.length>0&&(Be.push("<ul>"),N.forEach(function(k){Be.push(k)}),Be.push("</ul>")),Be.push("</li>"),ke=S(xe,ke,De,Be),ke}function C(){return S(de,0,0,ae),ae.push("</ul>"),ae.join("")}const R={heading(xe){const ke=G.exec(xe);if(j+=1,ke)return{type:"heading",raw:ke[0],depth:ke[1].length,text:ke[2]}},fences(xe){const ke=this.rules.block.fences.exec(xe);if(ke){const De=ke[0];let Be=g(De,ke[3]||"");const X=ke[2]?ke[2].trim():ke[2];if(["latex","katex","math"].indexOf(X)>=0){const N=W(),k=Be;Be=N,D[N]={type:"block",expression:k}}return{type:"code",raw:De,lang:X,text:Be}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let Q=0;const W=()=>`__special_katext_id_${Q++}__`;let D={};function z(){return D}function F(){Q=0,D={}}function $(xe){return xe=xe.replace(ee,(ke,De)=>{const Be=W();return D[Be]={type:"inline",expression:De},Be}),xe}const ue=o.listitem;o.listitem=function(xe){return ue($(xe))};const pe=o.paragraph;o.paragraph=function(xe){return pe($(xe))};const oe=o.tablecell;o.tablecell=function(xe,ke){return oe($(xe),ke)},o.code=function(xe,ke,De){const Be=(ke||"").match(/\S*/)[0];return Be?["latex","katex","math"].indexOf(Be)>=0?`<p class='editormd-tex'>${xe}</p>`:`<pre class="prettyprint linenums"><code class="language-${ke}">${De?xe:(0,se.escape)(xe,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(De?xe:(0,se.escape)(xe,!0))+"</code></pre>"},o.heading=function(xe,ke,De){let Be=this.options.headerPrefix+De.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return de.push({anchor:Be,level:ke,text:xe}),"<h"+ke+' id="'+j+Be+'">'+xe+"</h"+ke+">"},ce().setOptions({silent:!0,gfm:!0,pedantic:!1}),ce().use({tokenizer:R,renderer:o}),ct.ZP=ce()},29509:function(fn,ct,_){"use strict";_.d(ct,{o2:function(){return j},yT:function(){return g}});var m=_(77654),ce=_(34998);const se=ce.i.map(de=>`${de}-inverse`),ve=["success","processing","error","default","warning"];function j(de){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,m.Z)(se),(0,m.Z)(ce.i)).includes(de):ce.i.includes(de)}function g(de){return ve.includes(de)}},99402:function(fn,ct,_){"use strict";_.d(ct,{T:function(){return ce},n:function(){return m}});function m(se){return["small","middle","large"].includes(se)}function ce(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}},86013:function(fn,ct,_){"use strict";var m=_(59301),ce=_(19248);const se=ve=>{let j;return typeof ve=="object"&&(ve!=null&&ve.clearIcon)?j=ve:ve&&(j={clearIcon:m.createElement(ce.Z,null)}),j};ct.Z=se},52838:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return g}});var m=_(37645);function ce(de,ae,o,G){if(G===!1)return{adjustX:!1,adjustY:!1};const B=G&&typeof G=="object"?G:{},E={};switch(de){case"top":case"bottom":E.shiftX=ae.arrowOffsetHorizontal*2+o,E.shiftY=!0,E.adjustY=!0;break;case"left":case"right":E.shiftY=ae.arrowOffsetVertical*2+o,E.shiftX=!0,E.adjustX=!0;break}const S=Object.assign(Object.assign({},E),B);return S.shiftX||(S.adjustX=!0),S.shiftY||(S.adjustY=!0),S}const se={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"]}},ve={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},j=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function g(de){const{arrowWidth:ae,autoAdjustOverflow:o,arrowPointAtCenter:G,offset:B,borderRadius:E,visibleFirst:S}=de,C=ae/2,R={};return Object.keys(se).forEach(ee=>{const Q=G&&ve[ee]||se[ee],W=Object.assign(Object.assign({},Q),{offset:[0,0],dynamicInset:!0});switch(R[ee]=W,j.has(ee)&&(W.autoArrow=!1),ee){case"top":case"topLeft":case"topRight":W.offset[1]=-C-B;break;case"bottom":case"bottomLeft":case"bottomRight":W.offset[1]=C+B;break;case"left":case"leftTop":case"leftBottom":W.offset[0]=-C-B;break;case"right":case"rightTop":case"rightBottom":W.offset[0]=C+B;break}const D=(0,m.wZ)({contentRadius:E,limitVerticalRadius:!0});if(G)switch(ee){case"topLeft":case"bottomLeft":W.offset[0]=-D.arrowOffsetHorizontal-C;break;case"topRight":case"bottomRight":W.offset[0]=D.arrowOffsetHorizontal+C;break;case"leftTop":case"rightTop":W.offset[1]=-D.arrowOffsetHorizontal*2+C;break;case"leftBottom":case"rightBottom":W.offset[1]=D.arrowOffsetHorizontal*2-C;break}W.overflow=ce(ee,D,ae,o),S&&(W.htmlRegion="visibleFirst")}),R}},82855:function(fn,ct,_){"use strict";_.d(ct,{F:function(){return j},Z:function(){return ve}});var m=_(92310),ce=_.n(m);const se=null;function ve(g,de,ae){return ce()({[`${g}-status-success`]:de==="success",[`${g}-status-warning`]:de==="warning",[`${g}-status-error`]:de==="error",[`${g}-status-validating`]:de==="validating",[`${g}-has-feedback`]:ae})}const j=(g,de)=>de||g},19563:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return Qe}});var m=_(59301),ce=_(33853),se=_(38819),ve=_(92310),j=_.n(ve),g=_(96478),de=_(6089),ae=_(18929),o=_(2738),G=_(75030),E=ye=>typeof ye!="object"&&typeof ye!="function"||ye===null,S=_(52838),C=_(45915),R=_(22703),ee=_(32383),Q=_(55743),W=_(48755),D=_(83397),z=_(93041),F=_(78857),$=_(57700),ue=_(36237),pe=_(63356),oe=_(46e3),xe=_(93873),ke=_(34925),De=_(37645),Be=_(36305),X=_(16931),N=_(51636),q=ye=>{const{componentCls:He,menuCls:Ye,colorError:tt,colorTextLightSolid:nt}=ye,Bt=`${Ye}-item`;return{[`${He}, ${He}-menu-submenu`]:{[`${Ye} ${Bt}`]:{[`&${Bt}-danger:not(${Bt}-disabled)`]:{color:tt,"&:hover":{color:nt,backgroundColor:tt}}}}}};const te=ye=>{const{componentCls:He,menuCls:Ye,zIndexPopup:tt,dropdownArrowDistance:nt,sizePopupArrow:Bt,antCls:qe,iconCls:jt,motionDurationMid:Ue,paddingBlock:yt,fontSize:Le,dropdownEdgeChildPadding:Ce,colorTextDisabled:he,fontSizeIcon:We,controlPaddingHorizontal:Re,colorBgElevated:Ie}=ye;return[{[He]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:tt,display:"block","&::before":{position:"absolute",insetBlock:ye.calc(Bt).div(2).sub(nt).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${qe}-btn`]:{[`& > ${jt}-down, & > ${qe}-btn-icon > ${jt}-down`]:{fontSize:We}},[`${He}-wrap`]:{position:"relative",[`${qe}-btn > ${jt}-down`]:{fontSize:We},[`${jt}-down::before`]:{transition:`transform ${Ue}`}},[`${He}-wrap-open`]:{[`${jt}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${qe}-slide-down-enter${qe}-slide-down-enter-active${He}-placement-bottomLeft,
|
|
|
&${qe}-slide-down-appear${qe}-slide-down-appear-active${He}-placement-bottomLeft,
|
|
|
&${qe}-slide-down-enter${qe}-slide-down-enter-active${He}-placement-bottom,
|
|
|
&${qe}-slide-down-appear${qe}-slide-down-appear-active${He}-placement-bottom,
|
|
|
&${qe}-slide-down-enter${qe}-slide-down-enter-active${He}-placement-bottomRight,
|
|
|
&${qe}-slide-down-appear${qe}-slide-down-appear-active${He}-placement-bottomRight`]:{animationName:oe.fJ},[`&${qe}-slide-up-enter${qe}-slide-up-enter-active${He}-placement-topLeft,
|
|
|
&${qe}-slide-up-appear${qe}-slide-up-appear-active${He}-placement-topLeft,
|
|
|
&${qe}-slide-up-enter${qe}-slide-up-enter-active${He}-placement-top,
|
|
|
&${qe}-slide-up-appear${qe}-slide-up-appear-active${He}-placement-top,
|
|
|
&${qe}-slide-up-enter${qe}-slide-up-enter-active${He}-placement-topRight,
|
|
|
&${qe}-slide-up-appear${qe}-slide-up-appear-active${He}-placement-topRight`]:{animationName:oe.Qt},[`&${qe}-slide-down-leave${qe}-slide-down-leave-active${He}-placement-bottomLeft,
|
|
|
&${qe}-slide-down-leave${qe}-slide-down-leave-active${He}-placement-bottom,
|
|
|
&${qe}-slide-down-leave${qe}-slide-down-leave-active${He}-placement-bottomRight`]:{animationName:oe.Uw},[`&${qe}-slide-up-leave${qe}-slide-up-leave-active${He}-placement-topLeft,
|
|
|
&${qe}-slide-up-leave${qe}-slide-up-leave-active${He}-placement-top,
|
|
|
&${qe}-slide-up-leave${qe}-slide-up-leave-active${He}-placement-topRight`]:{animationName:oe.ly}}},(0,De.ZP)(ye,Ie,{arrowPlacement:{top:!0,bottom:!0}}),{[`${He} ${Ye}`]:{position:"relative",margin:0},[`${Ye}-submenu-popup`]:{position:"absolute",zIndex:tt,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${He}, ${He}-menu-submenu`]:Object.assign(Object.assign({},(0,pe.Wf)(ye)),{[Ye]:Object.assign(Object.assign({padding:Ce,listStyleType:"none",backgroundColor:Ie,backgroundClip:"padding-box",borderRadius:ye.borderRadiusLG,outline:"none",boxShadow:ye.boxShadowSecondary},(0,pe.Qy)(ye)),{"&:empty":{padding:0,boxShadow:"none"},[`${Ye}-item-group-title`]:{padding:`${(0,ue.unit)(yt)} ${(0,ue.unit)(Re)}`,color:ye.colorTextDescription,transition:`all ${Ue}`},[`${Ye}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Ye}-item-icon`]:{minWidth:Le,marginInlineEnd:ye.marginXS,fontSize:ye.fontSizeSM},[`${Ye}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${Ue}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${Ye}-item-extra`]:{paddingInlineStart:ye.padding,marginInlineStart:"auto",fontSize:ye.fontSizeSM,color:ye.colorTextDescription}},[`${Ye}-item, ${Ye}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${(0,ue.unit)(yt)} ${(0,ue.unit)(Re)}`,color:ye.colorText,fontWeight:"normal",fontSize:Le,lineHeight:ye.lineHeight,cursor:"pointer",transition:`all ${Ue}`,borderRadius:ye.borderRadiusSM,"&:hover, &-active":{backgroundColor:ye.controlItemBgHover}},(0,pe.Qy)(ye)),{"&-selected":{color:ye.colorPrimary,backgroundColor:ye.controlItemBgActive,"&:hover, &-active":{backgroundColor:ye.controlItemBgActiveHover}},"&-disabled":{color:he,cursor:"not-allowed","&:hover":{color:he,backgroundColor:Ie,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${(0,ue.unit)(ye.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:ye.colorSplit},[`${He}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:ye.paddingXS,[`${He}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:ye.colorTextDescription,fontSize:We,fontStyle:"normal"}}}),[`${Ye}-item-group-list`]:{margin:`0 ${(0,ue.unit)(ye.marginXS)}`,padding:0,listStyle:"none"},[`${Ye}-submenu-title`]:{paddingInlineEnd:ye.calc(Re).add(ye.fontSizeSM).equal()},[`${Ye}-submenu-vertical`]:{position:"relative"},[`${Ye}-submenu${Ye}-submenu-disabled ${He}-menu-submenu-title`]:{[`&, ${He}-menu-submenu-arrow-icon`]:{color:he,backgroundColor:Ie,cursor:"not-allowed"}},[`${Ye}-submenu-selected ${He}-menu-submenu-title`]:{color:ye.colorPrimary}})})},[(0,oe.oN)(ye,"slide-up"),(0,oe.oN)(ye,"slide-down"),(0,xe.Fm)(ye,"move-up"),(0,xe.Fm)(ye,"move-down"),(0,ke._y)(ye,"zoom-big")]]},Z=ye=>Object.assign(Object.assign({zIndexPopup:ye.zIndexPopupBase+50,paddingBlock:(ye.controlHeight-ye.fontSize*ye.lineHeight)/2},(0,De.wZ)({contentRadius:ye.borderRadiusLG,limitVerticalRadius:!0})),(0,Be.w)(ye));var x=(0,X.I$)("Dropdown",ye=>{const{marginXXS:He,sizePopupArrow:Ye,paddingXXS:tt,componentCls:nt}=ye,Bt=(0,N.mergeToken)(ye,{menuCls:`${nt}-menu`,dropdownArrowDistance:ye.calc(Ye).div(2).add(He).equal(),dropdownEdgeChildPadding:tt});return[te(Bt),q(Bt)]},Z,{resetStyle:!1});const w=null,V=ye=>{var He;const{menu:Ye,arrow:tt,prefixCls:nt,children:Bt,trigger:qe,disabled:jt,dropdownRender:Ue,getPopupContainer:yt,overlayClassName:Le,rootClassName:Ce,overlayStyle:he,open:We,onOpenChange:Re,visible:Ie,onVisibleChange:M,mouseEnterDelay:me=.15,mouseLeaveDelay:Ee=.1,autoAdjustOverflow:Ke=!0,placement:et="",overlay:ut,transitionName:St}=ye,{getPopupContainer:Dt,getPrefixCls:mt,direction:kt,dropdown:Ht}=m.useContext(W.E_),zt=(0,ee.ln)("Dropdown"),Ut=m.useMemo(()=>{const rt=mt();return St!==void 0?St:et.includes("top")?`${rt}-slide-down`:`${rt}-slide-up`},[mt,et,St]),st=m.useMemo(()=>et?et.includes("Center")?et.slice(0,et.indexOf("Center")):et:kt==="rtl"?"bottomRight":"bottomLeft",[et,kt]),Rt=mt("dropdown",nt),Lt=(0,D.Z)(Rt),[_e,Ze,b]=x(Rt,Lt),[,A]=(0,$.ZP)(),Oe=m.Children.only(E(Bt)?m.createElement("span",null,Bt):Bt),U=(0,R.Tm)(Oe,{className:j()(`${Rt}-trigger`,{[`${Rt}-rtl`]:kt==="rtl"},Oe.props.className),disabled:(He=Oe.props.disabled)!==null&&He!==void 0?He:jt}),le=jt?[]:qe,wt=!!(le!=null&&le.includes("contextMenu")),[Se,je]=(0,ae.Z)(!1,{value:We!=null?We:Ie}),Ge=(0,de.Z)(rt=>{Re==null||Re(rt,{source:"trigger"}),M==null||M(rt),je(rt)}),Y=j()(Le,Ce,Ze,b,Lt,Ht==null?void 0:Ht.className,{[`${Rt}-rtl`]:kt==="rtl"}),ne=(0,S.Z)({arrowPointAtCenter:typeof tt=="object"&&tt.pointAtCenter,autoAdjustOverflow:Ke,offset:A.marginXXS,arrowWidth:tt?A.sizePopupArrow:0,borderRadius:A.borderRadius}),be=m.useCallback(()=>{Ye!=null&&Ye.selectable&&(Ye!=null&&Ye.multiple)||(Re==null||Re(!1,{source:"menu"}),je(!1))},[Ye==null?void 0:Ye.selectable,Ye==null?void 0:Ye.multiple]),Pe=()=>{let rt;return Ye!=null&&Ye.items?rt=m.createElement(z.default,Object.assign({},Ye)):typeof ut=="function"?rt=ut():rt=ut,Ue&&(rt=Ue(rt)),rt=m.Children.only(typeof rt=="string"?m.createElement("span",null,rt):rt),m.createElement(F.J,{prefixCls:`${Rt}-menu`,rootClassName:j()(b,Lt),expandIcon:m.createElement("span",{className:`${Rt}-menu-submenu-arrow`},kt==="rtl"?m.createElement(ce.Z,{className:`${Rt}-menu-submenu-arrow-icon`}):m.createElement(se.Z,{className:`${Rt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:be,validator:Gt=>{let{mode:Xt}=Gt}},rt)},[P,Je]=(0,G.Cn)("Dropdown",he==null?void 0:he.zIndex);let J=m.createElement(g.Z,Object.assign({alignPoint:wt},(0,o.Z)(ye,["rootClassName"]),{mouseEnterDelay:me,mouseLeaveDelay:Ee,visible:Se,builtinPlacements:ne,arrow:!!tt,overlayClassName:Y,prefixCls:Rt,getPopupContainer:yt||Dt,transitionName:Ut,trigger:le,overlay:Pe,placement:st,onVisibleChange:Ge,overlayStyle:Object.assign(Object.assign(Object.assign({},Ht==null?void 0:Ht.style),he),{zIndex:P})}),U);return P&&(J=m.createElement(Q.Z.Provider,{value:Je},J)),_e(J)},fe=(0,C.Z)(V,"align",void 0,"dropdown",ye=>ye),$e=ye=>m.createElement(fe,Object.assign({},ye),m.createElement("span",null));V._InternalPanelDoNotUseOrYouWillBeFired=$e;var Qe=V},75727:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return C}});var m=_(19563),ce=_(59301),se=_(18785),ve=_(92310),j=_.n(ve),g=_(7939),de=_(48755),ae=_(44104),o=_(70045),G=function(R,ee){var Q={};for(var W in R)Object.prototype.hasOwnProperty.call(R,W)&&ee.indexOf(W)<0&&(Q[W]=R[W]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,W=Object.getOwnPropertySymbols(R);D<W.length;D++)ee.indexOf(W[D])<0&&Object.prototype.propertyIsEnumerable.call(R,W[D])&&(Q[W[D]]=R[W[D]]);return Q};const B=R=>{const{getPopupContainer:ee,getPrefixCls:Q,direction:W}=ce.useContext(de.E_),{prefixCls:D,type:z="default",danger:F,disabled:$,loading:ue,onClick:pe,htmlType:oe,children:xe,className:ke,menu:De,arrow:Be,autoFocus:X,overlay:N,trigger:k,align:q,open:te,onOpenChange:Z,placement:x,getPopupContainer:w,href:V,icon:fe=ce.createElement(se.Z,null),title:$e,buttonsRender:Qe=me=>me,mouseEnterDelay:ye,mouseLeaveDelay:He,overlayClassName:Ye,overlayStyle:tt,destroyPopupOnHide:nt,dropdownRender:Bt}=R,qe=G(R,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","dropdownRender"]),jt=Q("dropdown",D),Ue=`${jt}-button`,yt={menu:De,arrow:Be,autoFocus:X,align:q,disabled:$,trigger:$?[]:k,onOpenChange:Z,getPopupContainer:w||ee,mouseEnterDelay:ye,mouseLeaveDelay:He,overlayClassName:Ye,overlayStyle:tt,destroyPopupOnHide:nt,dropdownRender:Bt},{compactSize:Le,compactItemClassnames:Ce}=(0,o.ri)(jt,W),he=j()(Ue,Ce,ke);"overlay"in R&&(yt.overlay=N),"open"in R&&(yt.open=te),"placement"in R?yt.placement=x:yt.placement=W==="rtl"?"bottomLeft":"bottomRight";const We=ce.createElement(g.ZP,{type:z,danger:F,disabled:$,loading:ue,onClick:pe,htmlType:oe,href:V,title:$e},xe),Re=ce.createElement(g.ZP,{type:z,danger:F,icon:fe}),[Ie,M]=Qe([We,Re]);return ce.createElement(ae.Z.Compact,Object.assign({className:he,size:Le,block:!0},qe),Ie,ce.createElement(m.Z,Object.assign({},yt),M))};B.__ANT_BUTTON=!0;var E=B;const S=m.Z;S.Button=E;var C=S},24971:function(fn,ct,_){"use strict";var m=_(59301),ce=_(56553),se=_(48755);const ve=function(j,g){let de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var ae,o;const{variant:G,[j]:B}=m.useContext(se.E_),E=m.useContext(ce.pg),S=B==null?void 0:B.variant;let C;typeof g!="undefined"?C=g:de===!1?C="borderless":C=(o=(ae=E!=null?E:S)!==null&&ae!==void 0?ae:G)!==null&&o!==void 0?o:"outlined";const R=se.tr.includes(C);return[C,R]};ct.Z=ve},28284:function(fn,ct,_){"use strict";_.d(ct,{default:function(){return or}});var m=_(56553),ce=_(77654),se=_(59301),ve=_(92310),j=_.n(ve),g=_(77900),de=_(86641),ae=_(83397);function o(Ne){const[pt,It]=se.useState(Ne);return se.useEffect(()=>{const ht=setTimeout(()=>{It(Ne)},Ne.length?0:10);return()=>{clearTimeout(ht)}},[Ne]),pt}var G=_(36237),B=_(63356),E=_(34925),S=_(34961),C=_(51636),R=_(16931),Q=Ne=>{const{componentCls:pt}=Ne,It=`${pt}-show-help`,ht=`${pt}-show-help-item`;return{[It]:{transition:`opacity ${Ne.motionDurationFast} ${Ne.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[ht]:{overflow:"hidden",transition:`height ${Ne.motionDurationFast} ${Ne.motionEaseInOut},
|
|
|
opacity ${Ne.motionDurationFast} ${Ne.motionEaseInOut},
|
|
|
transform ${Ne.motionDurationFast} ${Ne.motionEaseInOut} !important`,[`&${ht}-appear, &${ht}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${ht}-leave-active`]:{transform:"translateY(-5px)"}}}}};const W=Ne=>({legend:{display:"block",width:"100%",marginBottom:Ne.marginLG,padding:0,color:Ne.colorTextDescription,fontSize:Ne.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,G.unit)(Ne.lineWidth)} ${Ne.lineType} ${Ne.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${(0,G.unit)(Ne.controlOutlineWidth)} ${Ne.controlOutline}`},output:{display:"block",paddingTop:15,color:Ne.colorText,fontSize:Ne.fontSize,lineHeight:Ne.lineHeight}}),D=(Ne,pt)=>{const{formItemCls:It}=Ne;return{[It]:{[`${It}-label > label`]:{height:pt},[`${It}-control-input`]:{minHeight:pt}}}},z=Ne=>{const{componentCls:pt}=Ne;return{[Ne.componentCls]:Object.assign(Object.assign(Object.assign({},(0,B.Wf)(Ne)),W(Ne)),{[`${pt}-text`]:{display:"inline-block",paddingInlineEnd:Ne.paddingSM},"&-small":Object.assign({},D(Ne,Ne.controlHeightSM)),"&-large":Object.assign({},D(Ne,Ne.controlHeightLG))})}},F=Ne=>{const{formItemCls:pt,iconCls:It,rootPrefixCls:ht,antCls:we,labelRequiredMarkColor:at,labelColor:vt,labelFontSize:Ct,labelHeight:Et,labelColonMarginInlineStart:Pt,labelColonMarginInlineEnd:Kt,itemMarginBottom:xt}=Ne;return{[pt]:Object.assign(Object.assign({},(0,B.Wf)(Ne)),{marginBottom:xt,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden${we}-row`]:{display:"none"},"&-has-warning":{[`${pt}-split`]:{color:Ne.colorError}},"&-has-error":{[`${pt}-split`]:{color:Ne.colorWarning}},[`${pt}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:Ne.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Et,color:vt,fontSize:Ct,[`> ${It}`]:{fontSize:Ne.fontSize,verticalAlign:"top"},[`&${pt}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:Ne.marginXXS,color:at,fontSize:Ne.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${pt}-required-mark-hidden, &${pt}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${pt}-optional`]:{display:"inline-block",marginInlineStart:Ne.marginXXS,color:Ne.colorTextDescription,[`&${pt}-required-mark-hidden`]:{display:"none"}},[`${pt}-tooltip`]:{color:Ne.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Ne.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Pt,marginInlineEnd:Kt},[`&${pt}-no-colon::after`]:{content:'"\\a0"'}}},[`${pt}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ht}-col-'"]):not([class*="' ${ht}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Ne.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[pt]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:Ne.colorTextDescription,fontSize:Ne.fontSize,lineHeight:Ne.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Ne.controlHeightSM,transition:`color ${Ne.motionDurationMid} ${Ne.motionEaseOut}`},"&-explain":{"&-error":{color:Ne.colorError},"&-warning":{color:Ne.colorWarning}}},[`&-with-help ${pt}-explain`]:{height:"auto",opacity:1},[`${pt}-feedback-icon`]:{fontSize:Ne.fontSize,textAlign:"center",visibility:"visible",animationName:E.kr,animationDuration:Ne.motionDurationMid,animationTimingFunction:Ne.motionEaseOutBack,pointerEvents:"none","&-success":{color:Ne.colorSuccess},"&-error":{color:Ne.colorError},"&-warning":{color:Ne.colorWarning},"&-validating":{color:Ne.colorPrimary}}})}},$=(Ne,pt)=>{const{formItemCls:It}=Ne;return{[`${pt}-horizontal`]:{[`${It}-label`]:{flexGrow:0},[`${It}-control`]:{flex:"1 1 0",minWidth:0},[`${It}-label[class$='-24'], ${It}-label[class*='-24 ']`]:{[`& + ${It}-control`]:{minWidth:"unset"}}}}},ue=Ne=>{const{componentCls:pt,formItemCls:It,inlineItemMarginBottom:ht}=Ne;return{[`${pt}-inline`]:{display:"flex",flexWrap:"wrap",[It]:{flex:"none",marginInlineEnd:Ne.margin,marginBottom:ht,"&-row":{flexWrap:"nowrap"},[`> ${It}-label,
|
|
|
> ${It}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${It}-label`]:{flex:"none"},[`${pt}-text`]:{display:"inline-block"},[`${It}-has-feedback`]:{display:"inline-block"}}}}},pe=Ne=>({padding:Ne.verticalLabelPadding,margin:Ne.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),oe=Ne=>{const{componentCls:pt,formItemCls:It,rootPrefixCls:ht}=Ne;return{[`${It} ${It}-label`]:pe(Ne),[`${pt}:not(${pt}-inline)`]:{[It]:{flexWrap:"wrap",[`${It}-label, ${It}-control`]:{[`&:not([class*=" ${ht}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},xe=Ne=>{const{componentCls:pt,formItemCls:It,antCls:ht}=Ne;return{[`${pt}-vertical`]:{[`${It}:not(${It}-horizontal)`]:{[`${It}-row`]:{flexDirection:"column"},[`${It}-label > label`]:{height:"auto"},[`${It}-control`]:{width:"100%"},[`${It}-label,
|
|
|
${ht}-col-24${It}-label,
|
|
|
${ht}-col-xl-24${It}-label`]:pe(Ne)}},[`@media (max-width: ${(0,G.unit)(Ne.screenXSMax)})`]:[oe(Ne),{[pt]:{[`${It}:not(${It}-horizontal)`]:{[`${ht}-col-xs-24${It}-label`]:pe(Ne)}}}],[`@media (max-width: ${(0,G.unit)(Ne.screenSMMax)})`]:{[pt]:{[`${It}:not(${It}-horizontal)`]:{[`${ht}-col-sm-24${It}-label`]:pe(Ne)}}},[`@media (max-width: ${(0,G.unit)(Ne.screenMDMax)})`]:{[pt]:{[`${It}:not(${It}-horizontal)`]:{[`${ht}-col-md-24${It}-label`]:pe(Ne)}}},[`@media (max-width: ${(0,G.unit)(Ne.screenLGMax)})`]:{[pt]:{[`${It}:not(${It}-horizontal)`]:{[`${ht}-col-lg-24${It}-label`]:pe(Ne)}}}}},ke=Ne=>{const{formItemCls:pt,antCls:It}=Ne;return{[`${pt}-vertical`]:{[`${pt}-row`]:{flexDirection:"column"},[`${pt}-label > label`]:{height:"auto"},[`${pt}-control`]:{width:"100%"}},[`${pt}-vertical ${pt}-label,
|
|
|
${It}-col-24${pt}-label,
|
|
|
${It}-col-xl-24${pt}-label`]:pe(Ne),[`@media (max-width: ${(0,G.unit)(Ne.screenXSMax)})`]:[oe(Ne),{[pt]:{[`${It}-col-xs-24${pt}-label`]:pe(Ne)}}],[`@media (max-width: ${(0,G.unit)(Ne.screenSMMax)})`]:{[pt]:{[`${It}-col-sm-24${pt}-label`]:pe(Ne)}},[`@media (max-width: ${(0,G.unit)(Ne.screenMDMax)})`]:{[pt]:{[`${It}-col-md-24${pt}-label`]:pe(Ne)}},[`@media (max-width: ${(0,G.unit)(Ne.screenLGMax)})`]:{[pt]:{[`${It}-col-lg-24${pt}-label`]:pe(Ne)}}}},De=Ne=>({labelRequiredMarkColor:Ne.colorError,labelColor:Ne.colorTextHeading,labelFontSize:Ne.fontSize,labelHeight:Ne.controlHeight,labelColonMarginInlineStart:Ne.marginXXS/2,labelColonMarginInlineEnd:Ne.marginXS,itemMarginBottom:Ne.marginLG,verticalLabelPadding:`0 0 ${Ne.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),Be=(Ne,pt)=>(0,C.mergeToken)(Ne,{formItemCls:`${Ne.componentCls}-item`,rootPrefixCls:pt});var X=(0,R.I$)("Form",(Ne,pt)=>{let{rootPrefixCls:It}=pt;const ht=Be(Ne,It);return[z(ht),F(ht),Q(ht),$(ht,ht.componentCls),$(ht,ht.formItemCls),ue(ht),xe(ht),ke(ht),(0,S.Z)(ht),E.kr]},De,{order:-1e3});const N=[];function k(Ne,pt,It){let ht=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Ne=="string"?Ne:`${pt}-${ht}`,error:Ne,errorStatus:It}}var te=Ne=>{let{help:pt,helpStatus:It,errors:ht=N,warnings:we=N,className:at,fieldId:vt,onVisibleChanged:Ct}=Ne;const{prefixCls:Et}=se.useContext(m.Rk),Pt=`${Et}-item-explain`,Kt=(0,ae.Z)(Et),[xt,Ve,it]=X(Et,Kt),Tt=se.useMemo(()=>(0,de.Z)(Et),[Et]),ot=o(ht),dt=o(we),Ot=se.useMemo(()=>pt!=null?[k(pt,"help",It)]:[].concat((0,ce.Z)(ot.map((dn,un)=>k(dn,"error","error",un))),(0,ce.Z)(dt.map((dn,un)=>k(dn,"warning","warning",un)))),[pt,It,ot,dt]),Vt=se.useMemo(()=>{const dn={};return Ot.forEach(un=>{let{key:xn}=un;dn[xn]=(dn[xn]||0)+1}),Ot.map((un,xn)=>Object.assign(Object.assign({},un),{key:dn[un.key]>1?`${un.key}-fallback-${xn}`:un.key}))},[Ot]),Wt={};return vt&&(Wt.id=`${vt}_help`),xt(se.createElement(g.default,{motionDeadline:Tt.motionDeadline,motionName:`${Et}-show-help`,visible:!!Vt.length,onVisibleChanged:Ct},dn=>{const{className:un,style:xn}=dn;return se.createElement("div",Object.assign({},Wt,{className:j()(Pt,un,it,Kt,at,Ve),style:xn}),se.createElement(g.CSSMotionList,Object.assign({keys:Vt},(0,de.Z)(Et),{motionName:`${Et}-show-help-item`,component:!1}),vn=>{const{key:ln,error:en,errorStatus:Tn,className:En,style:bn}=vn;return se.createElement("div",{key:ln,className:j()(En,{[`${Pt}-${Tn}`]:Tn}),style:bn},en)}))}))},Z=_(69180),x=_(48755),w=_(2171),V=_(31756),fe=_(23069),$e=_(76846),Qe=_(16722);const ye=["parentNode"],He="form_item";function Ye(Ne){return Ne===void 0||Ne===!1?[]:Array.isArray(Ne)?Ne:[Ne]}function tt(Ne,pt){if(!Ne.length)return;const It=Ne.join("_");return pt?`${pt}_${It}`:ye.includes(It)?`${He}_${It}`:It}function nt(Ne,pt,It,ht,we,at){let vt=ht;return at!==void 0?vt=at:It.validating?vt="validating":Ne.length?vt="error":pt.length?vt="warning":(It.touched||we&&It.validated)&&(vt="success"),vt}var Bt=function(Ne,pt){var It={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&pt.indexOf(ht)<0&&(It[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)pt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(It[ht[we]]=Ne[ht[we]]);return It};function qe(Ne){return Ye(Ne).join("_")}function jt(Ne,pt){const It=pt.getFieldInstance(Ne),ht=(0,$e.bn)(It);if(ht)return ht;const we=tt(Ye(Ne),pt.__INTERNAL__.name);if(we)return document.getElementById(we)}function Ue(Ne){const[pt]=(0,Z.useForm)(),It=se.useRef({}),ht=se.useMemo(()=>Ne!=null?Ne:Object.assign(Object.assign({},pt),{__INTERNAL__:{itemRef:we=>at=>{const vt=qe(we);at?It.current[vt]=at:delete It.current[vt]}},scrollToField:function(we){let at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:vt}=at,Ct=Bt(at,["focus"]),Et=jt(we,ht);Et&&((0,Qe.Z)(Et,Object.assign({scrollMode:"if-needed",block:"nearest"},Ct)),vt&&ht.focusField(we))},focusField:we=>{var at,vt;const Ct=ht.getFieldInstance(we);typeof(Ct==null?void 0:Ct.focus)=="function"?Ct.focus():(vt=(at=jt(we,ht))===null||at===void 0?void 0:at.focus)===null||vt===void 0||vt.call(at)},getFieldInstance:we=>{const at=qe(we);return It.current[at]}}),[Ne,pt]);return[ht]}var yt=_(98350),Le=function(Ne,pt){var It={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&pt.indexOf(ht)<0&&(It[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)pt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(It[ht[we]]=Ne[ht[we]]);return It};const Ce=(Ne,pt)=>{const It=se.useContext(w.Z),{getPrefixCls:ht,direction:we,requiredMark:at,colon:vt,scrollToFirstError:Ct,className:Et,style:Pt}=(0,x.dj)("form"),{prefixCls:Kt,className:xt,rootClassName:Ve,size:it,disabled:Tt=It,form:ot,colon:dt,labelAlign:Ot,labelWrap:Vt,labelCol:Wt,wrapperCol:dn,hideRequiredMark:un,layout:xn="horizontal",scrollToFirstError:vn,requiredMark:ln,onFinishFailed:en,name:Tn,style:En,feedbackIcons:bn,variant:kn}=Ne,Hn=Le(Ne,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Nn=(0,V.Z)(it),jn=se.useContext(yt.Z),Wn=se.useMemo(()=>ln!==void 0?ln:un?!1:at!==void 0?at:!0,[un,ln,at]),nr=dt!=null?dt:vt,$n=ht("form",Kt),fr=(0,ae.Z)($n),[gt,Mn,ir]=X($n,fr),xr=j()($n,`${$n}-${xn}`,{[`${$n}-hide-required-mark`]:Wn===!1,[`${$n}-rtl`]:we==="rtl",[`${$n}-${Nn}`]:Nn},ir,fr,Mn,Et,xt,Ve),[_r]=Ue(ot),{__INTERNAL__:br}=_r;br.name=Tn;const Rn=se.useMemo(()=>({name:Tn,labelAlign:Ot,labelCol:Wt,labelWrap:Vt,wrapperCol:dn,vertical:xn==="vertical",colon:nr,requiredMark:Wn,itemRef:br.itemRef,form:_r,feedbackIcons:bn}),[Tn,Ot,Wt,dn,xn,nr,Wn,_r,bn]),gn=se.useRef(null);se.useImperativeHandle(pt,()=>{var Kn;return Object.assign(Object.assign({},_r),{nativeElement:(Kn=gn.current)===null||Kn===void 0?void 0:Kn.nativeElement})});const Fn=(Kn,er)=>{if(Kn){let Pr={block:"nearest"};typeof Kn=="object"&&(Pr=Object.assign(Object.assign({},Pr),Kn)),_r.scrollToField(er,Pr)}},sr=Kn=>{if(en==null||en(Kn),Kn.errorFields.length){const er=Kn.errorFields[0].name;if(vn!==void 0){Fn(vn,er);return}Ct!==void 0&&Fn(Ct,er)}};return gt(se.createElement(m.pg.Provider,{value:kn},se.createElement(w.n,{disabled:Tt},se.createElement(fe.Z.Provider,{value:Nn},se.createElement(m.RV,{validateMessages:jn},se.createElement(m.q3.Provider,{value:Rn},se.createElement(Z.default,Object.assign({id:Tn},Hn,{name:Tn,onFinishFailed:sr,form:_r,ref:gn,style:Object.assign(Object.assign({},Pt),En),className:xr}))))))))};var We=se.forwardRef(Ce),Re=_(41799),Ie=_(8654),M=_(22703),me=_(32383),Ee=_(11592);function Ke(Ne){if(typeof Ne=="function")return Ne;const pt=(0,Ee.Z)(Ne);return pt.length<=1?pt[0]:pt}const et=()=>{const{status:Ne,errors:pt=[],warnings:It=[]}=se.useContext(m.aM);return{status:Ne,errors:pt,warnings:It}};et.Context=m.aM;var ut=et,St=_(16089);function Dt(Ne){const[pt,It]=se.useState(Ne),ht=se.useRef(null),we=se.useRef([]),at=se.useRef(!1);se.useEffect(()=>(at.current=!1,()=>{at.current=!0,St.Z.cancel(ht.current),ht.current=null}),[]);function vt(Ct){at.current||(ht.current===null&&(we.current=[],ht.current=(0,St.Z)(()=>{ht.current=null,It(Et=>{let Pt=Et;return we.current.forEach(Kt=>{Pt=Kt(Pt)}),Pt})})),we.current.push(Ct))}return[pt,vt]}function mt(){const{itemRef:Ne}=se.useContext(m.q3),pt=se.useRef({});function It(ht,we){const at=we&&typeof we=="object"&&(0,Ie.C4)(we),vt=ht.join("_");return(pt.current.name!==vt||pt.current.originRef!==at)&&(pt.current.name=vt,pt.current.originRef=at,pt.current.ref=(0,Ie.sQ)(Ne(ht),at)),pt.current.ref}return It}var kt=_(29194),Ht=_(34280),zt=_(2738),Ut=_(65970),st=_(70425),Rt=_(5472);const Lt=Ne=>{const{formItemCls:pt}=Ne;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${pt}-control`]:{display:"flex"}}}};var _e=(0,R.bk)(["Form","item-item"],(Ne,pt)=>{let{rootPrefixCls:It}=pt;const ht=Be(Ne,It);return[Lt(ht)]}),Ze=function(Ne,pt){var It={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&pt.indexOf(ht)<0&&(It[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)pt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(It[ht[we]]=Ne[ht[we]]);return It};const b=24;var Oe=Ne=>{const{prefixCls:pt,status:It,labelCol:ht,wrapperCol:we,children:at,errors:vt,warnings:Ct,_internalItemRender:Et,extra:Pt,help:Kt,fieldId:xt,marginBottom:Ve,onErrorVisibleChanged:it,label:Tt}=Ne,ot=`${pt}-item`,dt=se.useContext(m.q3),Ot=se.useMemo(()=>{let Hn=Object.assign({},we||dt.wrapperCol||{});return Tt===null&&!ht&&!we&&dt.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(jn=>{const Wn=jn?[jn]:[],nr=(0,st.U2)(dt.labelCol,Wn),$n=typeof nr=="object"?nr:{},fr=(0,st.U2)(Hn,Wn),gt=typeof fr=="object"?fr:{};"span"in $n&&!("offset"in gt)&&$n.span<b&&(Hn=(0,st.t8)(Hn,[].concat(Wn,["offset"]),$n.span))}),Hn},[we,dt]),Vt=j()(`${ot}-control`,Ot.className),Wt=se.useMemo(()=>{const{labelCol:Hn,wrapperCol:Nn}=dt;return Ze(dt,["labelCol","wrapperCol"])},[dt]),dn=se.useRef(null),[un,xn]=se.useState(0);(0,Ht.Z)(()=>{Pt&&dn.current?xn(dn.current.clientHeight):xn(0)},[Pt]);const vn=se.createElement("div",{className:`${ot}-control-input`},se.createElement("div",{className:`${ot}-control-input-content`},at)),ln=se.useMemo(()=>({prefixCls:pt,status:It}),[pt,It]),en=Ve!==null||vt.length||Ct.length?se.createElement(m.Rk.Provider,{value:ln},se.createElement(te,{fieldId:xt,errors:vt,warnings:Ct,help:Kt,helpStatus:It,className:`${ot}-explain-connected`,onVisibleChanged:it})):null,Tn={};xt&&(Tn.id=`${xt}_extra`);const En=Pt?se.createElement("div",Object.assign({},Tn,{className:`${ot}-extra`,ref:dn}),Pt):null,bn=en||En?se.createElement("div",{className:`${ot}-additional`,style:Ve?{minHeight:Ve+un}:{}},en,En):null,kn=Et&&Et.mark==="pro_table_render"&&Et.render?Et.render(Ne,{input:vn,errorList:en,extra:En}):se.createElement(se.Fragment,null,vn,bn);return se.createElement(m.q3.Provider,{value:Wt},se.createElement(Rt.Z,Object.assign({},Ot,{className:Vt}),kn),se.createElement(_e,{prefixCls:pt}))},U=_(61485),le=_(9017),wt=_(85981),Se=_(25399),je=function(Ne,pt){var It={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&pt.indexOf(ht)<0&&(It[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)pt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(It[ht[we]]=Ne[ht[we]]);return It};function Ge(Ne){return Ne?typeof Ne=="object"&&!se.isValidElement(Ne)?Ne:{title:Ne}:null}var ne=Ne=>{let{prefixCls:pt,label:It,htmlFor:ht,labelCol:we,labelAlign:at,colon:vt,required:Ct,requiredMark:Et,tooltip:Pt,vertical:Kt}=Ne;var xt;const[Ve]=(0,le.Z)("Form"),{labelAlign:it,labelCol:Tt,labelWrap:ot,colon:dt}=se.useContext(m.q3);if(!It)return null;const Ot=we||Tt||{},Vt=at||it,Wt=`${pt}-item-label`,dn=j()(Wt,Vt==="left"&&`${Wt}-left`,Ot.className,{[`${Wt}-wrap`]:!!ot});let un=It;const xn=vt===!0||dt!==!1&&vt!==!1;xn&&!Kt&&typeof It=="string"&&It.trim()&&(un=It.replace(/[:|:]\s*$/,""));const ln=Ge(Pt);if(ln){const{icon:Hn=se.createElement(U.Z,null)}=ln,Nn=je(ln,["icon"]),jn=se.createElement(Se.Z,Object.assign({},Nn),se.cloneElement(Hn,{className:`${pt}-item-tooltip`,title:"",onClick:Wn=>{Wn.preventDefault()},tabIndex:null}));un=se.createElement(se.Fragment,null,un,jn)}const en=Et==="optional",Tn=typeof Et=="function",En=Et===!1;Tn?un=Et(un,{required:!!Ct}):en&&!Ct&&(un=se.createElement(se.Fragment,null,un,se.createElement("span",{className:`${pt}-item-optional`,title:""},(Ve==null?void 0:Ve.optional)||((xt=wt.Z.Form)===null||xt===void 0?void 0:xt.optional))));let bn;En?bn="hidden":(en||Tn)&&(bn="optional");const kn=j()({[`${pt}-item-required`]:Ct,[`${pt}-item-required-mark-${bn}`]:bn,[`${pt}-item-no-colon`]:!xn});return se.createElement(Rt.Z,Object.assign({},Ot,{className:dn}),se.createElement("label",{htmlFor:ht,className:kn,title:typeof It=="string"?It:""},un))},be=_(29679),Pe=_(19248),P=_(96512),Je=_(58617);const J={success:be.Z,warning:P.Z,error:Pe.Z,validating:Je.Z};function rt(Ne){let{children:pt,errors:It,warnings:ht,hasFeedback:we,validateStatus:at,prefixCls:vt,meta:Ct,noStyle:Et}=Ne;const Pt=`${vt}-item`,{feedbackIcons:Kt}=se.useContext(m.q3),xt=nt(It,ht,Ct,null,!!we,at),{isFormItemInput:Ve,status:it,hasFeedback:Tt,feedbackIcon:ot}=se.useContext(m.aM),dt=se.useMemo(()=>{var Ot;let Vt;if(we){const dn=we!==!0&&we.icons||Kt,un=xt&&((Ot=dn==null?void 0:dn({status:xt,errors:It,warnings:ht}))===null||Ot===void 0?void 0:Ot[xt]),xn=xt&&J[xt];Vt=un!==!1&&xn?se.createElement("span",{className:j()(`${Pt}-feedback-icon`,`${Pt}-feedback-icon-${xt}`)},un||se.createElement(xn,null)):null}const Wt={status:xt||"",errors:It,warnings:ht,hasFeedback:!!we,feedbackIcon:Vt,isFormItemInput:!0};return Et&&(Wt.status=(xt!=null?xt:it)||"",Wt.isFormItemInput=Ve,Wt.hasFeedback=!!(we!=null?we:Tt),Wt.feedbackIcon=we!==void 0?Wt.feedbackIcon:ot),Wt},[xt,we,Et,Ve,it]);return se.createElement(m.aM.Provider,{value:dt},pt)}var Gt=function(Ne,pt){var It={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&pt.indexOf(ht)<0&&(It[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)pt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(It[ht[we]]=Ne[ht[we]]);return It};function Xt(Ne){const{prefixCls:pt,className:It,rootClassName:ht,style:we,help:at,errors:vt,warnings:Ct,validateStatus:Et,meta:Pt,hasFeedback:Kt,hidden:xt,children:Ve,fieldId:it,required:Tt,isRequired:ot,onSubItemMetaChange:dt,layout:Ot}=Ne,Vt=Gt(Ne,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),Wt=`${pt}-item`,{requiredMark:dn,vertical:un}=se.useContext(m.q3),xn=un||Ot==="vertical",vn=se.useRef(null),ln=o(vt),en=o(Ct),Tn=at!=null,En=!!(Tn||vt.length||Ct.length),bn=!!vn.current&&(0,kt.Z)(vn.current),[kn,Hn]=se.useState(null);(0,Ht.Z)(()=>{if(En&&vn.current){const $n=getComputedStyle(vn.current);Hn(parseInt($n.marginBottom,10))}},[En,bn]);const Nn=$n=>{$n||Hn(null)},Wn=function(){let $n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const fr=$n?ln:Pt.errors,gt=$n?en:Pt.warnings;return nt(fr,gt,Pt,"",!!Kt,Et)}(),nr=j()(Wt,It,ht,{[`${Wt}-with-help`]:Tn||ln.length||en.length,[`${Wt}-has-feedback`]:Wn&&Kt,[`${Wt}-has-success`]:Wn==="success",[`${Wt}-has-warning`]:Wn==="warning",[`${Wt}-has-error`]:Wn==="error",[`${Wt}-is-validating`]:Wn==="validating",[`${Wt}-hidden`]:xt,[`${Wt}-${Ot}`]:Ot});return se.createElement("div",{className:nr,style:we,ref:vn},se.createElement(Ut.Z,Object.assign({className:`${Wt}-row`},(0,zt.Z)(Vt,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),se.createElement(ne,Object.assign({htmlFor:it},Ne,{requiredMark:dn,required:Tt!=null?Tt:ot,prefixCls:pt,vertical:xn})),se.createElement(Oe,Object.assign({},Ne,Pt,{errors:ln,warnings:en,prefixCls:pt,status:Wn,help:at,marginBottom:kn,onErrorVisibleChanged:Nn}),se.createElement(m.qI.Provider,{value:dt},se.createElement(rt,{prefixCls:pt,meta:Pt,errors:Pt.errors,warnings:Pt.warnings,hasFeedback:Kt,validateStatus:Wn},Ve)))),!!kn&&se.createElement("div",{className:`${Wt}-margin-offset`,style:{marginBottom:-kn}}))}const Jt="__SPLIT__",an=null;function rn(Ne,pt){const It=Object.keys(Ne),ht=Object.keys(pt);return It.length===ht.length&&It.every(we=>{const at=Ne[we],vt=pt[we];return at===vt||typeof at=="function"||typeof vt=="function"})}const Sn=se.memo(Ne=>{let{children:pt}=Ne;return pt},(Ne,pt)=>rn(Ne.control,pt.control)&&Ne.update===pt.update&&Ne.childProps.length===pt.childProps.length&&Ne.childProps.every((It,ht)=>It===pt.childProps[ht]));function On(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function pn(Ne){const{name:pt,noStyle:It,className:ht,dependencies:we,prefixCls:at,shouldUpdate:vt,rules:Ct,children:Et,required:Pt,label:Kt,messageVariables:xt,trigger:Ve="onChange",validateTrigger:it,hidden:Tt,help:ot,layout:dt}=Ne,{getPrefixCls:Ot}=se.useContext(x.E_),{name:Vt}=se.useContext(m.q3),Wt=Ke(Et),dn=typeof Wt=="function",un=se.useContext(m.qI),{validateTrigger:xn}=se.useContext(Z.FieldContext),vn=it!==void 0?it:xn,ln=pt!=null,en=Ot("form",at),Tn=(0,ae.Z)(en),[En,bn,kn]=X(en,Tn),Hn=(0,me.ln)("Form.Item"),Nn=se.useContext(Z.ListContext),jn=se.useRef(null),[Wn,nr]=Dt({}),[$n,fr]=(0,Re.Z)(()=>On()),gt=gn=>{const Fn=Nn==null?void 0:Nn.getKey(gn.name);if(fr(gn.destroy?On():gn,!0),It&&ot!==!1&&un){let sr=gn.name;if(gn.destroy)sr=jn.current||sr;else if(Fn!==void 0){const[Kn,er]=Fn;sr=[Kn].concat((0,ce.Z)(er)),jn.current=sr}un(gn,sr)}},Mn=(gn,Fn)=>{nr(sr=>{const Kn=Object.assign({},sr),Pr=[].concat((0,ce.Z)(gn.name.slice(0,-1)),(0,ce.Z)(Fn)).join(Jt);return gn.destroy?delete Kn[Pr]:Kn[Pr]=gn,Kn})},[ir,xr]=se.useMemo(()=>{const gn=(0,ce.Z)($n.errors),Fn=(0,ce.Z)($n.warnings);return Object.values(Wn).forEach(sr=>{gn.push.apply(gn,(0,ce.Z)(sr.errors||[])),Fn.push.apply(Fn,(0,ce.Z)(sr.warnings||[]))}),[gn,Fn]},[Wn,$n.errors,$n.warnings]),_r=mt();function br(gn,Fn,sr){return It&&!Tt?se.createElement(rt,{prefixCls:en,hasFeedback:Ne.hasFeedback,validateStatus:Ne.validateStatus,meta:$n,errors:ir,warnings:xr,noStyle:!0},gn):se.createElement(Xt,Object.assign({key:"row"},Ne,{className:j()(ht,kn,Tn,bn),prefixCls:en,fieldId:Fn,isRequired:sr,errors:ir,warnings:xr,meta:$n,onSubItemMetaChange:Mn,layout:dt}),gn)}if(!ln&&!dn&&!we)return En(br(Wt));let Rn={};return typeof Kt=="string"?Rn.label=Kt:pt&&(Rn.label=String(pt)),xt&&(Rn=Object.assign(Object.assign({},Rn),xt)),En(se.createElement(Z.Field,Object.assign({},Ne,{messageVariables:Rn,trigger:Ve,validateTrigger:vn,onMetaChange:gt}),(gn,Fn,sr)=>{const Kn=Ye(pt).length&&Fn?Fn.name:[],er=tt(Kn,Vt),Pr=Pt!==void 0?Pt:!!(Ct!=null&&Ct.some(_n=>{if(_n&&typeof _n=="object"&&_n.required&&!_n.warningOnly)return!0;if(typeof _n=="function"){const Gn=_n(sr);return(Gn==null?void 0:Gn.required)&&!(Gn!=null&&Gn.warningOnly)}return!1})),Dr=Object.assign({},gn);let Er=null;if(Array.isArray(Wt)&&ln)Er=Wt;else if(!(dn&&(!(vt||we)||ln))){if(!(we&&!dn&&!ln))if(se.isValidElement(Wt)){const _n=Object.assign(Object.assign({},Wt.props),Dr);if(_n.id||(_n.id=er),ot||ir.length>0||xr.length>0||Ne.extra){const wr=[];(ot||ir.length>0)&&wr.push(`${er}_help`),Ne.extra&&wr.push(`${er}_extra`),_n["aria-describedby"]=wr.join(" ")}ir.length>0&&(_n["aria-invalid"]="true"),Pr&&(_n["aria-required"]="true"),(0,Ie.Yr)(Wt)&&(_n.ref=_r(Kn,Wt)),new Set([].concat((0,ce.Z)(Ye(Ve)),(0,ce.Z)(Ye(vn)))).forEach(wr=>{_n[wr]=function(){for(var qr,Yr,kr,Zr,Sr,ei=arguments.length,$r=new Array(ei),jr=0;jr<ei;jr++)$r[jr]=arguments[jr];(kr=Dr[wr])===null||kr===void 0||(qr=kr).call.apply(qr,[Dr].concat($r)),(Sr=(Zr=Wt.props)[wr])===null||Sr===void 0||(Yr=Sr).call.apply(Yr,[Zr].concat($r))}});const qn=[_n["aria-required"],_n["aria-invalid"],_n["aria-describedby"]];Er=se.createElement(Sn,{control:Dr,update:Wt,childProps:qn},(0,M.Tm)(Wt,_n))}else dn&&(vt||we)&&!ln?Er=Wt(sr):Er=Wt}return br(Er,er,Pr)}))}const Pn=pn;Pn.useStatus=ut;var tn=Pn,$t=function(Ne,pt){var It={};for(var ht in Ne)Object.prototype.hasOwnProperty.call(Ne,ht)&&pt.indexOf(ht)<0&&(It[ht]=Ne[ht]);if(Ne!=null&&typeof Object.getOwnPropertySymbols=="function")for(var we=0,ht=Object.getOwnPropertySymbols(Ne);we<ht.length;we++)pt.indexOf(ht[we])<0&&Object.prototype.propertyIsEnumerable.call(Ne,ht[we])&&(It[ht[we]]=Ne[ht[we]]);return It},on=Ne=>{var{prefixCls:pt,children:It}=Ne,ht=$t(Ne,["prefixCls","children"]);const{getPrefixCls:we}=se.useContext(x.E_),at=we("form",pt),vt=se.useMemo(()=>({prefixCls:at,status:"error"}),[at]);return se.createElement(Z.List,Object.assign({},ht),(Ct,Et,Pt)=>se.createElement(m.Rk.Provider,{value:vt},It(Ct.map(Kt=>Object.assign(Object.assign({},Kt),{fieldKey:Kt.key})),Et,{errors:Pt.errors,warnings:Pt.warnings})))};function nn(){const{form:Ne}=se.useContext(m.q3);return Ne}const An=We;An.Item=tn,An.List=on,An.ErrorList=te,An.useForm=Ue,An.useFormInstance=nn,An.useWatch=Z.useWatch,An.Provider=m.RV,An.create=()=>{};var or=An},49397:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return F}});var m=_(59301),ce=_(92310),se=_.n(ce),ve=_(36901),j=_(8654),g=_(62487),de=_(86013),ae=_(82855),o=_(48755),G=_(2171),B=_(83397),E=_(31756),S=_(56553),C=_(24971),R=_(70045),ee=_(23826),Q=_(53075);function W($){return!!($.prefix||$.suffix||$.allowClear||$.showCount)}var D=function($,ue){var pe={};for(var oe in $)Object.prototype.hasOwnProperty.call($,oe)&&ue.indexOf(oe)<0&&(pe[oe]=$[oe]);if($!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xe=0,oe=Object.getOwnPropertySymbols($);xe<oe.length;xe++)ue.indexOf(oe[xe])<0&&Object.prototype.propertyIsEnumerable.call($,oe[xe])&&(pe[oe[xe]]=$[oe[xe]]);return pe},F=(0,m.forwardRef)(($,ue)=>{const{prefixCls:pe,bordered:oe=!0,status:xe,size:ke,disabled:De,onBlur:Be,onFocus:X,suffix:N,allowClear:k,addonAfter:q,addonBefore:te,className:Z,style:x,styles:w,rootClassName:V,onChange:fe,classNames:$e,variant:Qe}=$,ye=D($,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:He,direction:Ye,allowClear:tt,autoComplete:nt,className:Bt,style:qe,classNames:jt,styles:Ue}=(0,o.dj)("input"),yt=He("input",pe),Le=(0,m.useRef)(null),Ce=(0,B.Z)(yt),[he,We,Re]=(0,Q.TI)(yt,V),[Ie]=(0,Q.ZP)(yt,Ce),{compactSize:M,compactItemClassnames:me}=(0,R.ri)(yt,Ye),Ee=(0,E.Z)(A=>{var Oe;return(Oe=ke!=null?ke:M)!==null&&Oe!==void 0?Oe:A}),Ke=m.useContext(G.Z),et=De!=null?De:Ke,{status:ut,hasFeedback:St,feedbackIcon:Dt}=(0,m.useContext)(S.aM),mt=(0,ae.F)(ut,xe),kt=W($)||!!St,Ht=(0,m.useRef)(kt),zt=(0,ee.Z)(Le,!0),Ut=A=>{zt(),Be==null||Be(A)},st=A=>{zt(),X==null||X(A)},Rt=A=>{zt(),fe==null||fe(A)},Lt=(St||N)&&m.createElement(m.Fragment,null,N,St&&Dt),_e=(0,de.Z)(k!=null?k:tt),[Ze,b]=(0,C.Z)("input",Qe,oe);return he(Ie(m.createElement(ve.default,Object.assign({ref:(0,j.sQ)(ue,Le),prefixCls:yt,autoComplete:nt},ye,{disabled:et,onBlur:Ut,onFocus:st,style:Object.assign(Object.assign({},qe),x),styles:Object.assign(Object.assign({},Ue),w),suffix:Lt,allowClear:_e,className:se()(Z,V,Re,Ce,me,Bt),onChange:Rt,addonBefore:te&&m.createElement(g.Z,{form:!0,space:!0},te),addonAfter:q&&m.createElement(g.Z,{form:!0,space:!0},q),classNames:Object.assign(Object.assign(Object.assign({},$e),jt),{input:se()({[`${yt}-sm`]:Ee==="small",[`${yt}-lg`]:Ee==="large",[`${yt}-rtl`]:Ye==="rtl"},$e==null?void 0:$e.input,jt.input,We),variant:se()({[`${yt}-${Ze}`]:b},(0,ae.Z)(yt,mt)),affixWrapper:se()({[`${yt}-affix-wrapper-sm`]:Ee==="small",[`${yt}-affix-wrapper-lg`]:Ee==="large",[`${yt}-affix-wrapper-rtl`]:Ye==="rtl"},We),wrapper:se()({[`${yt}-group-rtl`]:Ye==="rtl"},We),groupWrapper:se()({[`${yt}-group-wrapper-sm`]:Ee==="small",[`${yt}-group-wrapper-lg`]:Ee==="large",[`${yt}-group-wrapper-rtl`]:Ye==="rtl",[`${yt}-group-wrapper-${Ze}`]:b},(0,ae.Z)(`${yt}-group-wrapper`,mt,St),We)})}))))})},79809:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ue}});var m=_(59301),ce=_(92310),se=_.n(ce),ve=_(22711),j=_(86013),g=_(82855),de=_(48755),ae=_(2171),o=_(83397),G=_(31756),B=_(56553),E=_(24971),S=_(70045),C=_(30292),R=_(53075),ee=_(16931),Q=_(51636),W=_(64910);const D=pe=>{const{componentCls:oe,paddingLG:xe}=pe,ke=`${oe}-textarea`;return{[`textarea${oe}`]:{maxWidth:"100%",height:"auto",minHeight:pe.controlHeight,lineHeight:pe.lineHeight,verticalAlign:"bottom",transition:`all ${pe.motionDurationSlow}`,resize:"vertical",[`&${oe}-mouse-active`]:{transition:`all ${pe.motionDurationSlow}, height 0s, width 0s`}},[`${oe}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[ke]:{position:"relative","&-show-count":{[`> ${oe}`]:{height:"100%"},[`${oe}-data-count`]:{position:"absolute",bottom:pe.calc(pe.fontSize).mul(pe.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:pe.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
|
&-allow-clear > ${oe},
|
|
|
&-affix-wrapper${ke}-has-feedback ${oe}
|
|
|
`]:{paddingInlineEnd:xe},[`&-affix-wrapper${oe}-affix-wrapper`]:{padding:0,[`> textarea${oe}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:pe.calc(pe.controlHeight).sub(pe.calc(pe.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${oe}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${oe}-clear-icon`]:{position:"absolute",insetInlineEnd:pe.paddingInline,insetBlockStart:pe.paddingXS},[`${ke}-suffix`]:{position:"absolute",top:0,insetInlineEnd:pe.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${oe}-affix-wrapper-sm`]:{[`${oe}-suffix`]:{[`${oe}-clear-icon`]:{insetInlineEnd:pe.paddingInlineSM}}}}}};var z=(0,ee.I$)(["Input","TextArea"],pe=>{const oe=(0,Q.mergeToken)(pe,(0,W.e)(pe));return[D(oe)]},W.T,{resetFont:!1}),F=function(pe,oe){var xe={};for(var ke in pe)Object.prototype.hasOwnProperty.call(pe,ke)&&oe.indexOf(ke)<0&&(xe[ke]=pe[ke]);if(pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,ke=Object.getOwnPropertySymbols(pe);De<ke.length;De++)oe.indexOf(ke[De])<0&&Object.prototype.propertyIsEnumerable.call(pe,ke[De])&&(xe[ke[De]]=pe[ke[De]]);return xe},ue=(0,m.forwardRef)((pe,oe)=>{var xe;const{prefixCls:ke,bordered:De=!0,size:Be,disabled:X,status:N,allowClear:k,classNames:q,rootClassName:te,className:Z,style:x,styles:w,variant:V,showCount:fe,onMouseDown:$e,onResize:Qe}=pe,ye=F(pe,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:He,direction:Ye,allowClear:tt,autoComplete:nt,className:Bt,style:qe,classNames:jt,styles:Ue}=(0,de.dj)("textArea"),yt=m.useContext(ae.Z),Le=X!=null?X:yt,{status:Ce,hasFeedback:he,feedbackIcon:We}=m.useContext(B.aM),Re=(0,g.F)(Ce,N),Ie=m.useRef(null);m.useImperativeHandle(oe,()=>{var b;return{resizableTextArea:(b=Ie.current)===null||b===void 0?void 0:b.resizableTextArea,focus:A=>{var Oe,U;(0,C.nH)((U=(Oe=Ie.current)===null||Oe===void 0?void 0:Oe.resizableTextArea)===null||U===void 0?void 0:U.textArea,A)},blur:()=>{var A;return(A=Ie.current)===null||A===void 0?void 0:A.blur()}}});const M=He("input",ke),me=(0,o.Z)(M),[Ee,Ke,et]=(0,R.TI)(M,te),[ut]=z(M,me),{compactSize:St,compactItemClassnames:Dt}=(0,S.ri)(M,Ye),mt=(0,G.Z)(b=>{var A;return(A=Be!=null?Be:St)!==null&&A!==void 0?A:b}),[kt,Ht]=(0,E.Z)("textArea",V,De),zt=(0,j.Z)(k!=null?k:tt),[Ut,st]=m.useState(!1),[Rt,Lt]=m.useState(!1),_e=b=>{st(!0),$e==null||$e(b);const A=()=>{st(!1),document.removeEventListener("mouseup",A)};document.addEventListener("mouseup",A)},Ze=b=>{var A,Oe;if(Qe==null||Qe(b),Ut&&typeof getComputedStyle=="function"){const U=(Oe=(A=Ie.current)===null||A===void 0?void 0:A.nativeElement)===null||Oe===void 0?void 0:Oe.querySelector("textarea");U&&getComputedStyle(U).resize==="both"&&Lt(!0)}};return Ee(ut(m.createElement(ve.default,Object.assign({autoComplete:nt},ye,{style:Object.assign(Object.assign({},qe),x),styles:Object.assign(Object.assign({},Ue),w),disabled:Le,allowClear:zt,className:se()(et,me,Z,te,Dt,Bt,Rt&&`${M}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},q),jt),{textarea:se()({[`${M}-sm`]:mt==="small",[`${M}-lg`]:mt==="large"},Ke,q==null?void 0:q.textarea,jt.textarea,Ut&&`${M}-mouse-active`),variant:se()({[`${M}-${kt}`]:Ht},(0,g.Z)(M,Re)),affixWrapper:se()(`${M}-textarea-affix-wrapper`,{[`${M}-affix-wrapper-rtl`]:Ye==="rtl",[`${M}-affix-wrapper-sm`]:mt==="small",[`${M}-affix-wrapper-lg`]:mt==="large",[`${M}-textarea-show-count`]:fe||((xe=pe.count)===null||xe===void 0?void 0:xe.show)},Ke)}),prefixCls:M,suffix:he&&m.createElement("span",{className:`${M}-textarea-suffix`},We),showCount:fe,ref:Ie,onResize:Ze,onMouseDown:_e}))))})},23826:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ce}});var m=_(59301);function ce(se,ve){const j=(0,m.useRef)([]),g=()=>{j.current.push(setTimeout(()=>{var de,ae,o,G;!((de=se.current)===null||de===void 0)&&de.input&&((ae=se.current)===null||ae===void 0?void 0:ae.input.getAttribute("type"))==="password"&&(!((o=se.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((G=se.current)===null||G===void 0||G.input.removeAttribute("value"))}))};return(0,m.useEffect)(()=>(ve&&g(),()=>j.current.forEach(de=>{de&&clearTimeout(de)})),[]),g}},37568:function(fn,ct,_){"use strict";_.d(ct,{default:function(){return jt}});var m=_(59301),ce=_(92310),se=_.n(ce),ve=_(48755),j=_(56553),g=_(53075),ae=Ue=>{const{getPrefixCls:yt,direction:Le}=(0,m.useContext)(ve.E_),{prefixCls:Ce,className:he}=Ue,We=yt("input-group",Ce),Re=yt("input"),[Ie,M,me]=(0,g.ZP)(Re),Ee=se()(We,me,{[`${We}-lg`]:Ue.size==="large",[`${We}-sm`]:Ue.size==="small",[`${We}-compact`]:Ue.compact,[`${We}-rtl`]:Le==="rtl"},M,he),Ke=(0,m.useContext)(j.aM),et=(0,m.useMemo)(()=>Object.assign(Object.assign({},Ke),{isFormItemInput:!1}),[Ke]);return Ie(m.createElement("span",{className:Ee,style:Ue.style,onMouseEnter:Ue.onMouseEnter,onMouseLeave:Ue.onMouseLeave,onFocus:Ue.onFocus,onBlur:Ue.onBlur},m.createElement(j.aM.Provider,{value:et},Ue.children)))},o=_(49397),G=_(77654),B=_(6089),E=_(26112),S=_(82855),C=_(31756),R=_(16931),ee=_(51636),Q=_(64910);const W=Ue=>{const{componentCls:yt,paddingXS:Le}=Ue;return{[yt]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Le,"&-rtl":{direction:"rtl"},[`${yt}-input`]:{textAlign:"center",paddingInline:Ue.paddingXXS},[`&${yt}-sm ${yt}-input`]:{paddingInline:Ue.calc(Ue.paddingXXS).div(2).equal()},[`&${yt}-lg ${yt}-input`]:{paddingInline:Ue.paddingXS}}}};var D=(0,R.I$)(["Input","OTP"],Ue=>{const yt=(0,ee.mergeToken)(Ue,(0,Q.e)(Ue));return[W(yt)]},Q.T),z=_(16089),F=function(Ue,yt){var Le={};for(var Ce in Ue)Object.prototype.hasOwnProperty.call(Ue,Ce)&&yt.indexOf(Ce)<0&&(Le[Ce]=Ue[Ce]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ce=Object.getOwnPropertySymbols(Ue);he<Ce.length;he++)yt.indexOf(Ce[he])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Ce[he])&&(Le[Ce[he]]=Ue[Ce[he]]);return Le},ue=m.forwardRef((Ue,yt)=>{const{value:Le,onChange:Ce,onActiveChange:he,index:We,mask:Re}=Ue,Ie=F(Ue,["value","onChange","onActiveChange","index","mask"]),M=Le&&typeof Re=="string"?Re:Le,me=St=>{Ce(We,St.target.value)},Ee=m.useRef(null);m.useImperativeHandle(yt,()=>Ee.current);const Ke=()=>{(0,z.Z)(()=>{var St;const Dt=(St=Ee.current)===null||St===void 0?void 0:St.input;document.activeElement===Dt&&Dt&&Dt.select()})},et=St=>{const{key:Dt,ctrlKey:mt,metaKey:kt}=St;Dt==="ArrowLeft"?he(We-1):Dt==="ArrowRight"?he(We+1):Dt==="z"&&(mt||kt)&&St.preventDefault(),Ke()},ut=St=>{St.key==="Backspace"&&!Le&&he(We-1),Ke()};return m.createElement(o.Z,Object.assign({type:Re===!0?"password":"text"},Ie,{ref:Ee,value:M,onInput:me,onFocus:Ke,onKeyDown:et,onKeyUp:ut,onMouseDown:Ke,onMouseUp:Ke}))}),pe=function(Ue,yt){var Le={};for(var Ce in Ue)Object.prototype.hasOwnProperty.call(Ue,Ce)&&yt.indexOf(Ce)<0&&(Le[Ce]=Ue[Ce]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ce=Object.getOwnPropertySymbols(Ue);he<Ce.length;he++)yt.indexOf(Ce[he])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Ce[he])&&(Le[Ce[he]]=Ue[Ce[he]]);return Le};function oe(Ue){return(Ue||"").split("")}const xe=Ue=>{const{index:yt,prefixCls:Le,separator:Ce}=Ue,he=typeof Ce=="function"?Ce(yt):Ce;return he?m.createElement("span",{className:`${Le}-separator`},he):null};var De=m.forwardRef((Ue,yt)=>{const{prefixCls:Le,length:Ce=6,size:he,defaultValue:We,value:Re,onChange:Ie,formatter:M,separator:me,variant:Ee,disabled:Ke,status:et,autoFocus:ut,mask:St,type:Dt,onInput:mt,inputMode:kt}=Ue,Ht=pe(Ue,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:zt,direction:Ut}=m.useContext(ve.E_),st=zt("otp",Le),Rt=(0,E.Z)(Ht,{aria:!0,data:!0,attr:!0}),[Lt,_e,Ze]=D(st),b=(0,C.Z)(Je=>he!=null?he:Je),A=m.useContext(j.aM),Oe=(0,S.F)(A.status,et),U=m.useMemo(()=>Object.assign(Object.assign({},A),{status:Oe,hasFeedback:!1,feedbackIcon:null}),[A,Oe]),le=m.useRef(null),wt=m.useRef({});m.useImperativeHandle(yt,()=>({focus:()=>{var Je;(Je=wt.current[0])===null||Je===void 0||Je.focus()},blur:()=>{var Je;for(let J=0;J<Ce;J+=1)(Je=wt.current[J])===null||Je===void 0||Je.blur()},nativeElement:le.current}));const Se=Je=>M?M(Je):Je,[je,Ge]=m.useState(()=>oe(Se(We||"")));m.useEffect(()=>{Re!==void 0&&Ge(oe(Re))},[Re]);const Y=(0,B.Z)(Je=>{Ge(Je),mt&&mt(Je),Ie&&Je.length===Ce&&Je.every(J=>J)&&Je.some((J,rt)=>je[rt]!==J)&&Ie(Je.join(""))}),ne=(0,B.Z)((Je,J)=>{let rt=(0,G.Z)(je);for(let Xt=0;Xt<Je;Xt+=1)rt[Xt]||(rt[Xt]="");J.length<=1?rt[Je]=J:rt=rt.slice(0,Je).concat(oe(J)),rt=rt.slice(0,Ce);for(let Xt=rt.length-1;Xt>=0&&!rt[Xt];Xt-=1)rt.pop();const Gt=Se(rt.map(Xt=>Xt||" ").join(""));return rt=oe(Gt).map((Xt,Jt)=>Xt===" "&&!rt[Jt]?rt[Jt]:Xt),rt}),be=(Je,J)=>{var rt;const Gt=ne(Je,J),Xt=Math.min(Je+J.length,Ce-1);Xt!==Je&&Gt[Je]!==void 0&&((rt=wt.current[Xt])===null||rt===void 0||rt.focus()),Y(Gt)},Pe=Je=>{var J;(J=wt.current[Je])===null||J===void 0||J.focus()},P={variant:Ee,disabled:Ke,status:Oe,mask:St,type:Dt,inputMode:kt};return Lt(m.createElement("div",Object.assign({},Rt,{ref:le,className:se()(st,{[`${st}-sm`]:b==="small",[`${st}-lg`]:b==="large",[`${st}-rtl`]:Ut==="rtl"},Ze,_e)}),m.createElement(j.aM.Provider,{value:U},Array.from({length:Ce}).map((Je,J)=>{const rt=`otp-${J}`,Gt=je[J]||"";return m.createElement(m.Fragment,{key:rt},m.createElement(ue,Object.assign({ref:Xt=>{wt.current[J]=Xt},index:J,size:b,htmlSize:1,className:`${st}-input`,onChange:be,value:Gt,onActiveChange:Pe,autoFocus:J===0&&ut},P)),J<Ce-1&&m.createElement(xe,{separator:me,index:J,prefixCls:st}))}))))}),Be=_(73331),X=_(15277),N=_(2738),k=_(8654),q=_(2171),te=_(23826),Z=function(Ue,yt){var Le={};for(var Ce in Ue)Object.prototype.hasOwnProperty.call(Ue,Ce)&&yt.indexOf(Ce)<0&&(Le[Ce]=Ue[Ce]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ce=Object.getOwnPropertySymbols(Ue);he<Ce.length;he++)yt.indexOf(Ce[he])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Ce[he])&&(Le[Ce[he]]=Ue[Ce[he]]);return Le};const x=Ue=>Ue?m.createElement(X.Z,null):m.createElement(Be.Z,null),w={click:"onClick",hover:"onMouseOver"};var fe=m.forwardRef((Ue,yt)=>{const{disabled:Le,action:Ce="click",visibilityToggle:he=!0,iconRender:We=x}=Ue,Re=m.useContext(q.Z),Ie=Le!=null?Le:Re,M=typeof he=="object"&&he.visible!==void 0,[me,Ee]=(0,m.useState)(()=>M?he.visible:!1),Ke=(0,m.useRef)(null);m.useEffect(()=>{M&&Ee(he.visible)},[M,he]);const et=(0,te.Z)(Ke),ut=()=>{var b;if(Ie)return;me&&et();const A=!me;Ee(A),typeof he=="object"&&((b=he.onVisibleChange)===null||b===void 0||b.call(he,A))},St=b=>{const A=w[Ce]||"",Oe=We(me),U={[A]:ut,className:`${b}-icon`,key:"passwordIcon",onMouseDown:le=>{le.preventDefault()},onMouseUp:le=>{le.preventDefault()}};return m.cloneElement(m.isValidElement(Oe)?Oe:m.createElement("span",null,Oe),U)},{className:Dt,prefixCls:mt,inputPrefixCls:kt,size:Ht}=Ue,zt=Z(Ue,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Ut}=m.useContext(ve.E_),st=Ut("input",kt),Rt=Ut("input-password",mt),Lt=he&&St(Rt),_e=se()(Rt,Dt,{[`${Rt}-${Ht}`]:!!Ht}),Ze=Object.assign(Object.assign({},(0,N.Z)(zt,["suffix","iconRender","visibilityToggle"])),{type:me?"text":"password",className:_e,prefixCls:st,suffix:Lt});return Ht&&(Ze.size=Ht),m.createElement(o.Z,Object.assign({ref:(0,k.sQ)(yt,Ke)},Ze))}),$e=_(47472),Qe=_(22703),ye=_(7939),He=_(70045),Ye=function(Ue,yt){var Le={};for(var Ce in Ue)Object.prototype.hasOwnProperty.call(Ue,Ce)&&yt.indexOf(Ce)<0&&(Le[Ce]=Ue[Ce]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,Ce=Object.getOwnPropertySymbols(Ue);he<Ce.length;he++)yt.indexOf(Ce[he])<0&&Object.prototype.propertyIsEnumerable.call(Ue,Ce[he])&&(Le[Ce[he]]=Ue[Ce[he]]);return Le},nt=m.forwardRef((Ue,yt)=>{const{prefixCls:Le,inputPrefixCls:Ce,className:he,size:We,suffix:Re,enterButton:Ie=!1,addonAfter:M,loading:me,disabled:Ee,onSearch:Ke,onChange:et,onCompositionStart:ut,onCompositionEnd:St}=Ue,Dt=Ye(Ue,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:mt,direction:kt}=m.useContext(ve.E_),Ht=m.useRef(!1),zt=mt("input-search",Le),Ut=mt("input",Ce),{compactSize:st}=(0,He.ri)(zt,kt),Rt=(0,C.Z)(be=>{var Pe;return(Pe=We!=null?We:st)!==null&&Pe!==void 0?Pe:be}),Lt=m.useRef(null),_e=be=>{be!=null&&be.target&&be.type==="click"&&Ke&&Ke(be.target.value,be,{source:"clear"}),et==null||et(be)},Ze=be=>{var Pe;document.activeElement===((Pe=Lt.current)===null||Pe===void 0?void 0:Pe.input)&&be.preventDefault()},b=be=>{var Pe,P;Ke&&Ke((P=(Pe=Lt.current)===null||Pe===void 0?void 0:Pe.input)===null||P===void 0?void 0:P.value,be,{source:"input"})},A=be=>{Ht.current||me||b(be)},Oe=typeof Ie=="boolean"?m.createElement($e.Z,null):null,U=`${zt}-button`;let le;const wt=Ie||{},Se=wt.type&&wt.type.__ANT_BUTTON===!0;Se||wt.type==="button"?le=(0,Qe.Tm)(wt,Object.assign({onMouseDown:Ze,onClick:be=>{var Pe,P;(P=(Pe=wt==null?void 0:wt.props)===null||Pe===void 0?void 0:Pe.onClick)===null||P===void 0||P.call(Pe,be),b(be)},key:"enterButton"},Se?{className:U,size:Rt}:{})):le=m.createElement(ye.ZP,{className:U,type:Ie?"primary":void 0,size:Rt,disabled:Ee,key:"enterButton",onMouseDown:Ze,onClick:b,loading:me,icon:Oe},Ie),M&&(le=[le,(0,Qe.Tm)(M,{key:"addonAfter"})]);const je=se()(zt,{[`${zt}-rtl`]:kt==="rtl",[`${zt}-${Rt}`]:!!Rt,[`${zt}-with-button`]:!!Ie},he),Ge=Object.assign(Object.assign({},Dt),{className:je,prefixCls:Ut,type:"search"}),Y=be=>{Ht.current=!0,ut==null||ut(be)},ne=be=>{Ht.current=!1,St==null||St(be)};return m.createElement(o.Z,Object.assign({ref:(0,k.sQ)(Lt,yt),onPressEnter:A},Ge,{size:Rt,onCompositionStart:Y,onCompositionEnd:ne,addonAfter:le,suffix:Re,onChange:_e,disabled:Ee}))}),Bt=_(79809);const qe=o.Z;qe.Group=ae,qe.Search=nt,qe.TextArea=Bt.Z,qe.Password=fe,qe.OTP=De;var jt=qe},53075:function(fn,ct,_){"use strict";_.d(ct,{TI:function(){return z},ik:function(){return E},nz:function(){return ae},s7:function(){return S},x0:function(){return B}});var m=_(36237),ce=_(63356),se=_(56119),ve=_(16931),j=_(51636),g=_(64910),de=_(39082);const ae=F=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:F,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),o=F=>({borderColor:F.activeBorderColor,boxShadow:F.activeShadow,outline:0,backgroundColor:F.activeBg}),G=F=>{const{paddingBlockLG:$,lineHeightLG:ue,borderRadiusLG:pe,paddingInlineLG:oe}=F;return{padding:`${(0,m.unit)($)} ${(0,m.unit)(oe)}`,fontSize:F.inputFontSizeLG,lineHeight:ue,borderRadius:pe}},B=F=>({padding:`${(0,m.unit)(F.paddingBlockSM)} ${(0,m.unit)(F.paddingInlineSM)}`,fontSize:F.inputFontSizeSM,borderRadius:F.borderRadiusSM}),E=F=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,m.unit)(F.paddingBlock)} ${(0,m.unit)(F.paddingInline)}`,color:F.colorText,fontSize:F.inputFontSize,lineHeight:F.lineHeight,borderRadius:F.borderRadius,transition:`all ${F.motionDurationMid}`},ae(F.colorTextPlaceholder)),{"&-lg":Object.assign({},G(F)),"&-sm":Object.assign({},B(F)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),S=F=>{const{componentCls:$,antCls:ue}=F;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:F.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${$}, &-lg > ${$}-group-addon`]:Object.assign({},G(F)),[`&-sm ${$}, &-sm > ${$}-group-addon`]:Object.assign({},B(F)),[`&-lg ${ue}-select-single ${ue}-select-selector`]:{height:F.controlHeightLG},[`&-sm ${ue}-select-single ${ue}-select-selector`]:{height:F.controlHeightSM},[`> ${$}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${$}-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,m.unit)(F.paddingInline)}`,color:F.colorText,fontWeight:"normal",fontSize:F.inputFontSize,textAlign:"center",borderRadius:F.borderRadius,transition:`all ${F.motionDurationSlow}`,lineHeight:1,[`${ue}-select`]:{margin:`${(0,m.unit)(F.calc(F.paddingBlock).add(1).mul(-1).equal())} ${(0,m.unit)(F.calc(F.paddingInline).mul(-1).equal())}`,[`&${ue}-select-single:not(${ue}-select-customize-input):not(${ue}-pagination-size-changer)`]:{[`${ue}-select-selector`]:{backgroundColor:"inherit",border:`${(0,m.unit)(F.lineWidth)} ${F.lineType} transparent`,boxShadow:"none"}}},[`${ue}-cascader-picker`]:{margin:`-9px ${(0,m.unit)(F.calc(F.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${ue}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[$]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${$}-search-with-button &`]:{zIndex:0}}},[`> ${$}:first-child, ${$}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${ue}-select ${ue}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${$}-affix-wrapper`]:{[`&:not(:first-child) ${$}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${$}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${$}:last-child, ${$}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${ue}-select ${ue}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${$}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${$}-search &`]:{borderStartStartRadius:F.borderRadius,borderEndStartRadius:F.borderRadius}},[`&:not(:first-child), ${$}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${$}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ce.dF)()),{[`${$}-group-addon, ${$}-group-wrap, > ${$}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:F.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${$}-affix-wrapper,
|
|
|
& > ${$}-number-affix-wrapper,
|
|
|
& > ${ue}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:F.calc(F.lineWidth).mul(-1).equal(),borderInlineEndWidth:F.lineWidth},[$]:{float:"none"},[`& > ${ue}-select > ${ue}-select-selector,
|
|
|
& > ${ue}-select-auto-complete ${$},
|
|
|
& > ${ue}-cascader-picker ${$},
|
|
|
& > ${$}-group-wrapper ${$}`]:{borderInlineEndWidth:F.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${ue}-select-focused`]:{zIndex:1},[`& > ${ue}-select > ${ue}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${ue}-select:first-child > ${ue}-select-selector,
|
|
|
& > ${ue}-select-auto-complete:first-child ${$},
|
|
|
& > ${ue}-cascader-picker:first-child ${$}`]:{borderStartStartRadius:F.borderRadius,borderEndStartRadius:F.borderRadius},[`& > *:last-child,
|
|
|
& > ${ue}-select:last-child > ${ue}-select-selector,
|
|
|
& > ${ue}-cascader-picker:last-child ${$},
|
|
|
& > ${ue}-cascader-picker-focused:last-child ${$}`]:{borderInlineEndWidth:F.lineWidth,borderStartEndRadius:F.borderRadius,borderEndEndRadius:F.borderRadius},[`& > ${ue}-select-auto-complete ${$}`]:{verticalAlign:"top"},[`${$}-group-wrapper + ${$}-group-wrapper`]:{marginInlineStart:F.calc(F.lineWidth).mul(-1).equal(),[`${$}-affix-wrapper`]:{borderRadius:0}},[`${$}-group-wrapper:not(:last-child)`]:{[`&${$}-search > ${$}-group`]:{[`& > ${$}-group-addon > ${$}-search-button`]:{borderRadius:0},[`& > ${$}`]:{borderStartStartRadius:F.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:F.borderRadius}}}})}},C=F=>{const{componentCls:$,controlHeightSM:ue,lineWidth:pe,calc:oe}=F,ke=oe(ue).sub(oe(pe).mul(2)).sub(16).div(2).equal();return{[$]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(F)),E(F)),(0,de.qG)(F)),(0,de.H8)(F)),(0,de.Mu)(F)),(0,de.vc)(F)),{'&[type="color"]':{height:F.controlHeight,[`&${$}-lg`]:{height:F.controlHeightLG},[`&${$}-sm`]:{height:ue,paddingTop:ke,paddingBottom:ke}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},R=F=>{const{componentCls:$}=F;return{[`${$}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:F.colorTextQuaternary,fontSize:F.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${F.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:F.colorTextTertiary},"&:active":{color:F.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,m.unit)(F.inputAffixPadding)}`}}}},ee=F=>{const{componentCls:$,inputAffixPadding:ue,colorTextDescription:pe,motionDurationSlow:oe,colorIcon:xe,colorIconHover:ke,iconCls:De}=F,Be=`${$}-affix-wrapper`,X=`${$}-affix-wrapper-disabled`;return{[Be]:Object.assign(Object.assign(Object.assign(Object.assign({},E(F)),{display:"inline-flex",[`&:not(${$}-disabled):hover`]:{zIndex:1,[`${$}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${$}`]:{padding:0},[`> input${$}, > textarea${$}`]:{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"'},[$]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:F.paddingXS}},"&-show-count-suffix":{color:pe},"&-show-count-has-suffix":{marginInlineEnd:F.paddingXXS},"&-prefix":{marginInlineEnd:ue},"&-suffix":{marginInlineStart:ue}}}),R(F)),{[`${De}${$}-password-icon`]:{color:xe,cursor:"pointer",transition:`all ${oe}`,"&:hover":{color:ke}}}),[`${$}-underlined`]:{borderRadius:0},[X]:{[`${De}${$}-password-icon`]:{color:xe,cursor:"not-allowed","&:hover":{color:xe}}}}},Q=F=>{const{componentCls:$,borderRadiusLG:ue,borderRadiusSM:pe}=F;return{[`${$}-group`]:Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(F)),S(F)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${$}-group-addon`]:{borderRadius:ue,fontSize:F.inputFontSizeLG}},"&-sm":{[`${$}-group-addon`]:{borderRadius:pe}}},(0,de.ir)(F)),(0,de.S5)(F)),{[`&:not(${$}-compact-first-item):not(${$}-compact-last-item)${$}-compact-item`]:{[`${$}, ${$}-group-addon`]:{borderRadius:0}},[`&:not(${$}-compact-last-item)${$}-compact-first-item`]:{[`${$}, ${$}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${$}-compact-first-item)${$}-compact-last-item`]:{[`${$}, ${$}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${$}-compact-last-item)${$}-compact-item`]:{[`${$}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${$}-compact-first-item)${$}-compact-item`]:{[`${$}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},W=F=>{const{componentCls:$,antCls:ue}=F,pe=`${$}-search`;return{[pe]:{[$]:{"&:hover, &:focus":{[`+ ${$}-group-addon ${pe}-button:not(${ue}-btn-primary)`]:{borderInlineStartColor:F.colorPrimaryHover}}},[`${$}-affix-wrapper`]:{height:F.controlHeight,borderRadius:0},[`${$}-lg`]:{lineHeight:F.calc(F.lineHeightLG).sub(2e-4).equal()},[`> ${$}-group`]:{[`> ${$}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${pe}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${pe}-button:not(${ue}-btn-primary)`]:{color:F.colorTextDescription,"&:hover":{color:F.colorPrimaryHover},"&:active":{color:F.colorPrimaryActive},[`&${ue}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${pe}-button`]:{height:F.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${$}-affix-wrapper, ${pe}-button`]:{height:F.controlHeightLG}},"&-small":{[`${$}-affix-wrapper, ${pe}-button`]:{height:F.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${$}-compact-item`]:{[`&:not(${$}-compact-last-item)`]:{[`${$}-group-addon`]:{[`${$}-search-button`]:{marginInlineEnd:F.calc(F.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${$}-compact-first-item)`]:{[`${$},${$}-affix-wrapper`]:{borderRadius:0}},[`> ${$}-group-addon ${$}-search-button,
|
|
|
> ${$},
|
|
|
${$}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${$}-affix-wrapper-focused`]:{zIndex:2}}}}},D=F=>{const{componentCls:$}=F;return{[`${$}-out-of-range`]:{[`&, & input, & textarea, ${$}-show-count-suffix, ${$}-data-count`]:{color:F.colorError}}}},z=(0,ve.I$)(["Input","Shared"],F=>{const $=(0,j.mergeToken)(F,(0,g.e)(F));return[C($),ee($)]},g.T,{resetFont:!1});ct.ZP=(0,ve.I$)(["Input","Component"],F=>{const $=(0,j.mergeToken)(F,(0,g.e)(F));return[Q($),W($),D($),(0,se.c)($)]},g.T,{resetFont:!1})},64910:function(fn,ct,_){"use strict";_.d(ct,{T:function(){return se},e:function(){return ce}});var m=_(51636);function ce(ve){return(0,m.mergeToken)(ve,{inputAffixPadding:ve.paddingXXS})}const se=ve=>{const{controlHeight:j,fontSize:g,lineHeight:de,lineWidth:ae,controlHeightSM:o,controlHeightLG:G,fontSizeLG:B,lineHeightLG:E,paddingSM:S,controlPaddingHorizontalSM:C,controlPaddingHorizontal:R,colorFillAlter:ee,colorPrimaryHover:Q,colorPrimary:W,controlOutlineWidth:D,controlOutline:z,colorErrorOutline:F,colorWarningOutline:$,colorBgContainer:ue,inputFontSize:pe,inputFontSizeLG:oe,inputFontSizeSM:xe}=ve,ke=pe||g,De=xe||ke,Be=oe||B,X=Math.round((j-ke*de)/2*10)/10-ae,N=Math.round((o-De*de)/2*10)/10-ae,k=Math.ceil((G-Be*E)/2*10)/10-ae;return{paddingBlock:Math.max(X,0),paddingBlockSM:Math.max(N,0),paddingBlockLG:Math.max(k,0),paddingInline:S-ae,paddingInlineSM:C-ae,paddingInlineLG:R-ae,addonBg:ee,activeBorderColor:W,hoverBorderColor:Q,activeShadow:`0 0 0 ${D}px ${z}`,errorActiveShadow:`0 0 0 ${D}px ${F}`,warningActiveShadow:`0 0 0 ${D}px ${$}`,hoverBg:ue,activeBg:ue,inputFontSize:ke,inputFontSizeLG:Be,inputFontSizeSM:De}}},39082:function(fn,ct,_){"use strict";_.d(ct,{$U:function(){return j},H8:function(){return S},Mu:function(){return G},S5:function(){return R},Xy:function(){return ve},ir:function(){return o},qG:function(){return de},vc:function(){return W}});var m=_(36237),ce=_(51636);const se=D=>({borderColor:D.hoverBorderColor,backgroundColor:D.hoverBg}),ve=D=>({color:D.colorTextDisabled,backgroundColor:D.colorBgContainerDisabled,borderColor:D.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},se((0,ce.mergeToken)(D,{hoverBorderColor:D.colorBorder,hoverBg:D.colorBgContainerDisabled})))}),j=(D,z)=>({background:D.colorBgContainer,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:z.borderColor,"&:hover":{borderColor:z.hoverBorderColor,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:z.activeBorderColor,boxShadow:z.activeShadow,outline:0,backgroundColor:D.activeBg}}),g=(D,z)=>({[`&${D.componentCls}-status-${z.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},j(D,z)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:z.affixColor}}),[`&${D.componentCls}-status-${z.status}${D.componentCls}-disabled`]:{borderColor:z.borderColor}}),de=(D,z)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},j(D,{borderColor:D.colorBorder,hoverBorderColor:D.hoverBorderColor,activeBorderColor:D.activeBorderColor,activeShadow:D.activeShadow})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},ve(D))}),g(D,{status:"error",borderColor:D.colorError,hoverBorderColor:D.colorErrorBorderHover,activeBorderColor:D.colorError,activeShadow:D.errorActiveShadow,affixColor:D.colorError})),g(D,{status:"warning",borderColor:D.colorWarning,hoverBorderColor:D.colorWarningBorderHover,activeBorderColor:D.colorWarning,activeShadow:D.warningActiveShadow,affixColor:D.colorWarning})),z)}),ae=(D,z)=>({[`&${D.componentCls}-group-wrapper-status-${z.status}`]:{[`${D.componentCls}-group-addon`]:{borderColor:z.addonBorderColor,color:z.addonColor}}}),o=D=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${D.componentCls}-group`]:{"&-addon":{background:D.addonBg,border:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},ae(D,{status:"error",addonBorderColor:D.colorError,addonColor:D.colorErrorText})),ae(D,{status:"warning",addonBorderColor:D.colorWarning,addonColor:D.colorWarningText})),{[`&${D.componentCls}-group-wrapper-disabled`]:{[`${D.componentCls}-group-addon`]:Object.assign({},ve(D))}})}),G=(D,z)=>{const{componentCls:F}=D;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${F}-disabled, &[disabled]`]:{color:D.colorTextDisabled,cursor:"not-allowed"},[`&${F}-status-error`]:{"&, & input, & textarea":{color:D.colorError}},[`&${F}-status-warning`]:{"&, & input, & textarea":{color:D.colorWarning}}},z)}},B=(D,z)=>{var F;return{background:z.bg,borderWidth:D.lineWidth,borderStyle:D.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(F=z==null?void 0:z.inputColor)!==null&&F!==void 0?F:"unset"},"&:hover":{background:z.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:z.activeBorderColor,backgroundColor:D.activeBg}}},E=(D,z)=>({[`&${D.componentCls}-status-${z.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},B(D,z)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:z.affixColor}})}),S=(D,z)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},B(D,{bg:D.colorFillTertiary,hoverBg:D.colorFillSecondary,activeBorderColor:D.activeBorderColor})),{[`&${D.componentCls}-disabled, &[disabled]`]:Object.assign({},ve(D))}),E(D,{status:"error",bg:D.colorErrorBg,hoverBg:D.colorErrorBgHover,activeBorderColor:D.colorError,inputColor:D.colorErrorText,affixColor:D.colorError})),E(D,{status:"warning",bg:D.colorWarningBg,hoverBg:D.colorWarningBgHover,activeBorderColor:D.colorWarning,inputColor:D.colorWarningText,affixColor:D.colorWarning})),z)}),C=(D,z)=>({[`&${D.componentCls}-group-wrapper-status-${z.status}`]:{[`${D.componentCls}-group-addon`]:{background:z.addonBg,color:z.addonColor}}}),R=D=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${D.componentCls}-group`]:{"&-addon":{background:D.colorFillTertiary},[`${D.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorSplit}`}}}},C(D,{status:"error",addonBg:D.colorErrorBg,addonColor:D.colorErrorText})),C(D,{status:"warning",addonBg:D.colorWarningBg,addonColor:D.colorWarningText})),{[`&${D.componentCls}-group-wrapper-disabled`]:{[`${D.componentCls}-group`]:{"&-addon":{background:D.colorFillTertiary,color:D.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderTop:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`,borderBottom:`${(0,m.unit)(D.lineWidth)} ${D.lineType} ${D.colorBorder}`}}}})}),ee=(D,z)=>({background:D.colorBgContainer,borderWidth:`${(0,m.unit)(D.lineWidth)} 0`,borderStyle:`${D.lineType} none`,borderColor:`transparent transparent ${z.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${z.borderColor} transparent`,backgroundColor:D.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${z.borderColor} transparent`,outline:0,backgroundColor:D.activeBg}}),Q=(D,z)=>({[`&${D.componentCls}-status-${z.status}:not(${D.componentCls}-disabled)`]:Object.assign(Object.assign({},ee(D,z)),{[`${D.componentCls}-prefix, ${D.componentCls}-suffix`]:{color:z.affixColor}}),[`&${D.componentCls}-status-${z.status}${D.componentCls}-disabled`]:{borderColor:`transparent transparent ${z.borderColor} transparent`}}),W=(D,z)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ee(D,{borderColor:D.colorBorder,hoverBorderColor:D.hoverBorderColor,activeBorderColor:D.activeBorderColor,activeShadow:D.activeShadow})),{[`&${D.componentCls}-disabled, &[disabled]`]:{color:D.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${D.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),Q(D,{status:"error",borderColor:D.colorError,hoverBorderColor:D.colorErrorBorderHover,activeBorderColor:D.colorError,activeShadow:D.errorActiveShadow,affixColor:D.colorError})),Q(D,{status:"warning",borderColor:D.colorWarning,hoverBorderColor:D.colorWarningBorderHover,activeBorderColor:D.colorWarning,activeShadow:D.warningActiveShadow,affixColor:D.colorWarning})),z)})},24303:function(fn,ct,_){"use strict";_.d(ct,{D:function(){return pe},Z:function(){return ke}});var m=_(59301),ce=_(60499),se={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"},ve=se,j=_(7657),g=function(Be,X){return m.createElement(j.Z,(0,ce.Z)({},Be,{ref:X,icon:ve}))},de=m.forwardRef(g),ae=de,o=_(33853),G=_(38819),B=_(92310),E=_.n(B),S=_(2738),C=_(48755),R=_(6989),ee=_(36237),Q=_(48923),W=_(16931);const D=De=>{const{componentCls:Be,siderBg:X,motionDurationMid:N,motionDurationSlow:k,antCls:q,triggerHeight:te,triggerColor:Z,triggerBg:x,headerHeight:w,zeroTriggerWidth:V,zeroTriggerHeight:fe,borderRadiusLG:$e,lightSiderBg:Qe,lightTriggerColor:ye,lightTriggerBg:He,bodyBg:Ye}=De;return{[Be]:{position:"relative",minWidth:0,background:X,transition:`all ${N}, background 0s`,"&-has-trigger":{paddingBottom:te},"&-right":{order:1},[`${Be}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${q}-menu${q}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${Be}-children`]:{overflow:"hidden"},[`${Be}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:te,color:Z,lineHeight:(0,ee.unit)(te),textAlign:"center",background:x,cursor:"pointer",transition:`all ${N}`},[`${Be}-zero-width-trigger`]:{position:"absolute",top:w,insetInlineEnd:De.calc(V).mul(-1).equal(),zIndex:1,width:V,height:fe,color:Z,fontSize:De.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:X,borderRadius:`0 ${(0,ee.unit)($e)} ${(0,ee.unit)($e)} 0`,cursor:"pointer",transition:`background ${k} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${k}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:De.calc(V).mul(-1).equal(),borderRadius:`${(0,ee.unit)($e)} 0 0 ${(0,ee.unit)($e)}`}},"&-light":{background:Qe,[`${Be}-trigger`]:{color:ye,background:He},[`${Be}-zero-width-trigger`]:{color:ye,background:He,border:`1px solid ${Ye}`,borderInlineStart:0}}}}};var z=(0,W.I$)(["Layout","Sider"],De=>[D(De)],Q.eh,{deprecatedTokens:Q.jn}),F=function(De,Be){var X={};for(var N in De)Object.prototype.hasOwnProperty.call(De,N)&&Be.indexOf(N)<0&&(X[N]=De[N]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,N=Object.getOwnPropertySymbols(De);k<N.length;k++)Be.indexOf(N[k])<0&&Object.prototype.propertyIsEnumerable.call(De,N[k])&&(X[N[k]]=De[N[k]]);return X};const $={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ue=De=>!Number.isNaN(Number.parseFloat(De))&&isFinite(De),pe=m.createContext({}),oe=(()=>{let De=0;return function(){let Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return De+=1,`${Be}${De}`}})();var ke=m.forwardRef((De,Be)=>{const{prefixCls:X,className:N,trigger:k,children:q,defaultCollapsed:te=!1,theme:Z="dark",style:x={},collapsible:w=!1,reverseArrow:V=!1,width:fe=200,collapsedWidth:$e=80,zeroWidthTriggerStyle:Qe,breakpoint:ye,onCollapse:He,onBreakpoint:Ye}=De,tt=F(De,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:nt}=(0,m.useContext)(R.V),[Bt,qe]=(0,m.useState)("collapsed"in De?De.collapsed:te),[jt,Ue]=(0,m.useState)(!1);(0,m.useEffect)(()=>{"collapsed"in De&&qe(De.collapsed)},[De.collapsed]);const yt=(Rt,Lt)=>{"collapsed"in De||qe(Rt),He==null||He(Rt,Lt)},{getPrefixCls:Le,direction:Ce}=(0,m.useContext)(C.E_),he=Le("layout-sider",X),[We,Re,Ie]=z(he),M=(0,m.useRef)(null);M.current=Rt=>{Ue(Rt.matches),Ye==null||Ye(Rt.matches),Bt!==Rt.matches&&yt(Rt.matches,"responsive")},(0,m.useEffect)(()=>{function Rt(_e){return M.current(_e)}let Lt;if(typeof window!="undefined"){const{matchMedia:_e}=window;if(_e&&ye&&ye in $){Lt=_e(`screen and (max-width: ${$[ye]})`);try{Lt.addEventListener("change",Rt)}catch(Ze){Lt.addListener(Rt)}Rt(Lt)}}return()=>{try{Lt==null||Lt.removeEventListener("change",Rt)}catch(_e){Lt==null||Lt.removeListener(Rt)}}},[ye]),(0,m.useEffect)(()=>{const Rt=oe("ant-sider-");return nt.addSider(Rt),()=>nt.removeSider(Rt)},[]);const me=()=>{yt(!Bt,"clickTrigger")},Ee=(0,S.Z)(tt,["collapsed"]),Ke=Bt?$e:fe,et=ue(Ke)?`${Ke}px`:String(Ke),ut=parseFloat(String($e||0))===0?m.createElement("span",{onClick:me,className:E()(`${he}-zero-width-trigger`,`${he}-zero-width-trigger-${V?"right":"left"}`),style:Qe},k||m.createElement(ae,null)):null,St=Ce==="rtl"==!V,kt={expanded:St?m.createElement(G.Z,null):m.createElement(o.Z,null),collapsed:St?m.createElement(o.Z,null):m.createElement(G.Z,null)}[Bt?"collapsed":"expanded"],Ht=k!==null?ut||m.createElement("div",{className:`${he}-trigger`,onClick:me,style:{width:et}},k||kt):null,zt=Object.assign(Object.assign({},x),{flex:`0 0 ${et}`,maxWidth:et,minWidth:et,width:et}),Ut=E()(he,`${he}-${Z}`,{[`${he}-collapsed`]:!!Bt,[`${he}-has-trigger`]:w&&k!==null&&!ut,[`${he}-below`]:!!jt,[`${he}-zero-width`]:parseFloat(et)===0},N,Re,Ie),st=m.useMemo(()=>({siderCollapsed:Bt}),[Bt]);return We(m.createElement(pe.Provider,{value:st},m.createElement("aside",Object.assign({className:Ut},Ee,{style:zt,ref:Be}),m.createElement("div",{className:`${he}-children`},q),w||jt&&ut?Ht:null)))})},6989:function(fn,ct,_){"use strict";_.d(ct,{V:function(){return ce}});var m=_(59301);const ce=m.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},48923:function(fn,ct,_){"use strict";_.d(ct,{eh:function(){return ve},jn:function(){return j}});var m=_(36237),ce=_(16931);const se=g=>{const{antCls:de,componentCls:ae,colorText:o,footerBg:G,headerHeight:B,headerPadding:E,headerColor:S,footerPadding:C,fontSize:R,bodyBg:ee,headerBg:Q}=g;return{[ae]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:ee,"&, *":{boxSizing:"border-box"},[`&${ae}-has-sider`]:{flexDirection:"row",[`> ${ae}, > ${ae}-content`]:{width:0}},[`${ae}-header, &${ae}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${ae}-header`]:{height:B,padding:E,color:S,lineHeight:(0,m.unit)(B),background:Q,[`${de}-menu`]:{lineHeight:"inherit"}},[`${ae}-footer`]:{padding:C,color:o,fontSize:R,background:G},[`${ae}-content`]:{flex:"auto",color:o,minHeight:0}}},ve=g=>{const{colorBgLayout:de,controlHeight:ae,controlHeightLG:o,colorText:G,controlHeightSM:B,marginXXS:E,colorTextLightSolid:S,colorBgContainer:C}=g,R=o*1.25;return{colorBgHeader:"#001529",colorBgBody:de,colorBgTrigger:"#002140",bodyBg:de,headerBg:"#001529",headerHeight:ae*2,headerPadding:`0 ${R}px`,headerColor:G,footerPadding:`${B}px ${R}px`,footerBg:de,siderBg:"#001529",triggerHeight:o+E*2,triggerBg:"#002140",triggerColor:S,zeroTriggerWidth:o,zeroTriggerHeight:o,lightSiderBg:C,lightTriggerBg:C,lightTriggerColor:G}},j=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];ct.ZP=(0,ce.I$)("Layout",g=>[se(g)],ve,{deprecatedTokens:j})},78857:function(fn,ct,_){"use strict";_.d(ct,{J:function(){return g}});var m=_(59301),ce=_(8654),se=_(62487),ve=function(de,ae){var o={};for(var G in de)Object.prototype.hasOwnProperty.call(de,G)&&ae.indexOf(G)<0&&(o[G]=de[G]);if(de!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,G=Object.getOwnPropertySymbols(de);B<G.length;B++)ae.indexOf(G[B])<0&&Object.prototype.propertyIsEnumerable.call(de,G[B])&&(o[G[B]]=de[G[B]]);return o};const j=m.createContext(null),g=m.forwardRef((de,ae)=>{const{children:o}=de,G=ve(de,["children"]),B=m.useContext(j),E=m.useMemo(()=>Object.assign(Object.assign({},B),G),[B,G.prefixCls,G.mode,G.selectable,G.rootClassName]),S=(0,ce.t4)(o),C=(0,ce.x1)(ae,S?(0,ce.C4)(o):null);return m.createElement(j.Provider,{value:E},m.createElement(se.Z,{space:!0},S?m.cloneElement(o,{ref:C}):o))});ct.Z=j},93041:function(fn,ct,_){"use strict";_.d(ct,{default:function(){return We}});var m=_(59301),ce=_(28321),se=_(24303),ve=_(18785),j=_(92310),g=_.n(j),de=_(6089),ae=_(2738),o=_(86641),G=_(22703),B=_(48755),E=_(83397),C=(0,m.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),R=function(Re,Ie){var M={};for(var me in Re)Object.prototype.hasOwnProperty.call(Re,me)&&Ie.indexOf(me)<0&&(M[me]=Re[me]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,me=Object.getOwnPropertySymbols(Re);Ee<me.length;Ee++)Ie.indexOf(me[Ee])<0&&Object.prototype.propertyIsEnumerable.call(Re,me[Ee])&&(M[me[Ee]]=Re[me[Ee]]);return M},Q=Re=>{const{prefixCls:Ie,className:M,dashed:me}=Re,Ee=R(Re,["prefixCls","className","dashed"]),{getPrefixCls:Ke}=m.useContext(B.E_),et=Ke("menu",Ie),ut=g()({[`${et}-item-divider-dashed`]:!!me},M);return m.createElement(ce.iz,Object.assign({className:ut},Ee))},W=_(11592),D=_(25399),F=Re=>{var Ie;const{className:M,children:me,icon:Ee,title:Ke,danger:et,extra:ut}=Re,{prefixCls:St,firstLevel:Dt,direction:mt,disableMenuItemTitleTooltip:kt,inlineCollapsed:Ht}=m.useContext(C),zt=Ze=>{const b=me==null?void 0:me[0],A=m.createElement("span",{className:g()(`${St}-title-content`,{[`${St}-title-content-with-extra`]:!!ut||ut===0})},me);return(!Ee||m.isValidElement(me)&&me.type==="span")&&me&&Ze&&Dt&&typeof b=="string"?m.createElement("div",{className:`${St}-inline-collapsed-noicon`},b.charAt(0)):A},{siderCollapsed:Ut}=m.useContext(se.D);let st=Ke;typeof Ke=="undefined"?st=Dt?me:"":Ke===!1&&(st="");const Rt={title:st};!Ut&&!Ht&&(Rt.title=null,Rt.open=!1);const Lt=(0,W.Z)(me).length;let _e=m.createElement(ce.ck,Object.assign({},(0,ae.Z)(Re,["title","icon","danger"]),{className:g()({[`${St}-item-danger`]:et,[`${St}-item-only-child`]:(Ee?Lt+1:Lt)===1},M),title:typeof Ke=="string"?Ke:void 0}),(0,G.Tm)(Ee,{className:g()(m.isValidElement(Ee)?(Ie=Ee.props)===null||Ie===void 0?void 0:Ie.className:"",`${St}-item-icon`)}),zt(Ht));return kt||(_e=m.createElement(D.Z,Object.assign({},Rt,{placement:mt==="rtl"?"left":"right",classNames:{root:`${St}-inline-collapsed-tooltip`}}),_e)),_e},$=_(78857),ue=_(36237),pe=_(17835),oe=_(63356),xe=_(34961),ke=_(46e3),De=_(34925),Be=_(16931),X=_(51636),k=Re=>{const{componentCls:Ie,motionDurationSlow:M,horizontalLineHeight:me,colorSplit:Ee,lineWidth:Ke,lineType:et,itemPaddingInline:ut}=Re;return{[`${Ie}-horizontal`]:{lineHeight:me,border:0,borderBottom:`${(0,ue.unit)(Ke)} ${et} ${Ee}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ie}-item, ${Ie}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:ut},[`> ${Ie}-item:hover,
|
|
|
> ${Ie}-item-active,
|
|
|
> ${Ie}-submenu ${Ie}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ie}-item, ${Ie}-submenu-title`]:{transition:[`border-color ${M}`,`background ${M}`].join(",")},[`${Ie}-submenu-arrow`]:{display:"none"}}}},te=Re=>{let{componentCls:Ie,menuArrowOffset:M,calc:me}=Re;return{[`${Ie}-rtl`]:{direction:"rtl"},[`${Ie}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ie}-rtl${Ie}-vertical,
|
|
|
${Ie}-submenu-rtl ${Ie}-vertical`]:{[`${Ie}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,ue.unit)(me(M).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,ue.unit)(M)})`}}}}};const Z=Re=>Object.assign({},(0,oe.oN)(Re));var w=(Re,Ie)=>{const{componentCls:M,itemColor:me,itemSelectedColor:Ee,subMenuItemSelectedColor:Ke,groupTitleColor:et,itemBg:ut,subMenuItemBg:St,itemSelectedBg:Dt,activeBarHeight:mt,activeBarWidth:kt,activeBarBorderWidth:Ht,motionDurationSlow:zt,motionEaseInOut:Ut,motionEaseOut:st,itemPaddingInline:Rt,motionDurationMid:Lt,itemHoverColor:_e,lineType:Ze,colorSplit:b,itemDisabledColor:A,dangerItemColor:Oe,dangerItemHoverColor:U,dangerItemSelectedColor:le,dangerItemActiveBg:wt,dangerItemSelectedBg:Se,popupBg:je,itemHoverBg:Ge,itemActiveBg:Y,menuSubMenuBg:ne,horizontalItemSelectedColor:be,horizontalItemSelectedBg:Pe,horizontalItemBorderRadius:P,horizontalItemHoverBg:Je}=Re;return{[`${M}-${Ie}, ${M}-${Ie} > ${M}`]:{color:me,background:ut,[`&${M}-root:focus-visible`]:Object.assign({},Z(Re)),[`${M}-item`]:{"&-group-title, &-extra":{color:et}},[`${M}-submenu-selected > ${M}-submenu-title`]:{color:Ke},[`${M}-item, ${M}-submenu-title`]:{color:me,[`&:not(${M}-item-disabled):focus-visible`]:Object.assign({},Z(Re))},[`${M}-item-disabled, ${M}-submenu-disabled`]:{color:`${A} !important`},[`${M}-item:not(${M}-item-selected):not(${M}-submenu-selected)`]:{[`&:hover, > ${M}-submenu-title:hover`]:{color:_e}},[`&:not(${M}-horizontal)`]:{[`${M}-item:not(${M}-item-selected)`]:{"&:hover":{backgroundColor:Ge},"&:active":{backgroundColor:Y}},[`${M}-submenu-title`]:{"&:hover":{backgroundColor:Ge},"&:active":{backgroundColor:Y}}},[`${M}-item-danger`]:{color:Oe,[`&${M}-item:hover`]:{[`&:not(${M}-item-selected):not(${M}-submenu-selected)`]:{color:U}},[`&${M}-item:active`]:{background:wt}},[`${M}-item a`]:{"&, &:hover":{color:"inherit"}},[`${M}-item-selected`]:{color:Ee,[`&${M}-item-danger`]:{color:le},"a, a:hover":{color:"inherit"}},[`& ${M}-item-selected`]:{backgroundColor:Dt,[`&${M}-item-danger`]:{backgroundColor:Se}},[`&${M}-submenu > ${M}`]:{backgroundColor:ne},[`&${M}-popup > ${M}`]:{backgroundColor:je},[`&${M}-submenu-popup > ${M}`]:{backgroundColor:je},[`&${M}-horizontal`]:Object.assign(Object.assign({},Ie==="dark"?{borderBottom:0}:{}),{[`> ${M}-item, > ${M}-submenu`]:{top:Ht,marginTop:Re.calc(Ht).mul(-1).equal(),marginBottom:0,borderRadius:P,"&::after":{position:"absolute",insetInline:Rt,bottom:0,borderBottom:`${(0,ue.unit)(mt)} solid transparent`,transition:`border-color ${zt} ${Ut}`,content:'""'},"&:hover, &-active, &-open":{background:Je,"&::after":{borderBottomWidth:mt,borderBottomColor:be}},"&-selected":{color:be,backgroundColor:Pe,"&:hover":{backgroundColor:Pe},"&::after":{borderBottomWidth:mt,borderBottomColor:be}}}}),[`&${M}-root`]:{[`&${M}-inline, &${M}-vertical`]:{borderInlineEnd:`${(0,ue.unit)(Ht)} ${Ze} ${b}`}},[`&${M}-inline`]:{[`${M}-sub${M}-inline`]:{background:St},[`${M}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,ue.unit)(kt)} solid ${Ee}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Lt} ${st}`,`opacity ${Lt} ${st}`].join(","),content:'""'},[`&${M}-item-danger`]:{"&::after":{borderInlineEndColor:le}}},[`${M}-selected, ${M}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Lt} ${Ut}`,`opacity ${Lt} ${Ut}`].join(",")}}}}}};const V=Re=>{const{componentCls:Ie,itemHeight:M,itemMarginInline:me,padding:Ee,menuArrowSize:Ke,marginXS:et,itemMarginBlock:ut,itemWidth:St,itemPaddingInline:Dt}=Re,mt=Re.calc(Ke).add(Ee).add(et).equal();return{[`${Ie}-item`]:{position:"relative",overflow:"hidden"},[`${Ie}-item, ${Ie}-submenu-title`]:{height:M,lineHeight:(0,ue.unit)(M),paddingInline:Dt,overflow:"hidden",textOverflow:"ellipsis",marginInline:me,marginBlock:ut,width:St},[`> ${Ie}-item,
|
|
|
> ${Ie}-submenu > ${Ie}-submenu-title`]:{height:M,lineHeight:(0,ue.unit)(M)},[`${Ie}-item-group-list ${Ie}-submenu-title,
|
|
|
${Ie}-submenu-title`]:{paddingInlineEnd:mt}}};var $e=Re=>{const{componentCls:Ie,iconCls:M,itemHeight:me,colorTextLightSolid:Ee,dropdownWidth:Ke,controlHeightLG:et,motionEaseOut:ut,paddingXL:St,itemMarginInline:Dt,fontSizeLG:mt,motionDurationFast:kt,motionDurationSlow:Ht,paddingXS:zt,boxShadowSecondary:Ut,collapsedWidth:st,collapsedIconSize:Rt}=Re,Lt={height:me,lineHeight:(0,ue.unit)(me),listStylePosition:"inside",listStyleType:"disc"};return[{[Ie]:{"&-inline, &-vertical":Object.assign({[`&${Ie}-root`]:{boxShadow:"none"}},V(Re))},[`${Ie}-submenu-popup`]:{[`${Ie}-vertical`]:Object.assign(Object.assign({},V(Re)),{boxShadow:Ut})}},{[`${Ie}-submenu-popup ${Ie}-vertical${Ie}-sub`]:{minWidth:Ke,maxHeight:`calc(100vh - ${(0,ue.unit)(Re.calc(et).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ie}-inline`]:{width:"100%",[`&${Ie}-root`]:{[`${Ie}-item, ${Ie}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Ht}`,`background ${Ht}`,`padding ${kt} ${ut}`].join(","),[`> ${Ie}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ie}-sub${Ie}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ie}-submenu > ${Ie}-submenu-title`]:Lt,[`& ${Ie}-item-group-title`]:{paddingInlineStart:St}},[`${Ie}-item`]:Lt}},{[`${Ie}-inline-collapsed`]:{width:st,[`&${Ie}-root`]:{[`${Ie}-item, ${Ie}-submenu ${Ie}-submenu-title`]:{[`> ${Ie}-inline-collapsed-noicon`]:{fontSize:mt,textAlign:"center"}}},[`> ${Ie}-item,
|
|
|
> ${Ie}-item-group > ${Ie}-item-group-list > ${Ie}-item,
|
|
|
> ${Ie}-item-group > ${Ie}-item-group-list > ${Ie}-submenu > ${Ie}-submenu-title,
|
|
|
> ${Ie}-submenu > ${Ie}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,ue.unit)(Re.calc(Rt).div(2).equal())} - ${(0,ue.unit)(Dt)})`,textOverflow:"clip",[`
|
|
|
${Ie}-submenu-arrow,
|
|
|
${Ie}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Ie}-item-icon, ${M}`]:{margin:0,fontSize:Rt,lineHeight:(0,ue.unit)(me),"+ span":{display:"inline-block",opacity:0}}},[`${Ie}-item-icon, ${M}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ie}-item-icon, ${M}`]:{display:"none"},"a, a:hover":{color:Ee}},[`${Ie}-item-group-title`]:Object.assign(Object.assign({},oe.vS),{paddingInline:zt})}}]};const Qe=Re=>{const{componentCls:Ie,motionDurationSlow:M,motionDurationMid:me,motionEaseInOut:Ee,motionEaseOut:Ke,iconCls:et,iconSize:ut,iconMarginInlineEnd:St}=Re;return{[`${Ie}-item, ${Ie}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${M}`,`background ${M}`,`padding calc(${M} + 0.1s) ${Ee}`].join(","),[`${Ie}-item-icon, ${et}`]:{minWidth:ut,fontSize:ut,transition:[`font-size ${me} ${Ke}`,`margin ${M} ${Ee}`,`color ${M}`].join(","),"+ span":{marginInlineStart:St,opacity:1,transition:[`opacity ${M} ${Ee}`,`margin ${M}`,`color ${M}`].join(",")}},[`${Ie}-item-icon`]:Object.assign({},(0,oe.Ro)()),[`&${Ie}-item-only-child`]:{[`> ${et}, > ${Ie}-item-icon`]:{marginInlineEnd:0}}},[`${Ie}-item-disabled, ${Ie}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${Ie}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ye=Re=>{const{componentCls:Ie,motionDurationSlow:M,motionEaseInOut:me,borderRadius:Ee,menuArrowSize:Ke,menuArrowOffset:et}=Re;return{[`${Ie}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Re.margin,width:Ke,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${M} ${me}, opacity ${M}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Re.calc(Ke).mul(.6).equal(),height:Re.calc(Ke).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:Ee,transition:[`background ${M} ${me}`,`transform ${M} ${me}`,`top ${M} ${me}`,`color ${M} ${me}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,ue.unit)(Re.calc(et).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,ue.unit)(et)})`}}}}},He=Re=>{const{antCls:Ie,componentCls:M,fontSize:me,motionDurationSlow:Ee,motionDurationMid:Ke,motionEaseInOut:et,paddingXS:ut,padding:St,colorSplit:Dt,lineWidth:mt,zIndexPopup:kt,borderRadiusLG:Ht,subMenuItemBorderRadius:zt,menuArrowSize:Ut,menuArrowOffset:st,lineType:Rt,groupTitleLineHeight:Lt,groupTitleFontSize:_e}=Re;return[{"":{[M]:Object.assign(Object.assign({},(0,oe.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,oe.Wf)(Re)),(0,oe.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:me,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Ee} 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:Re.itemBorderRadius},[`${M}-item-group-title`]:{padding:`${(0,ue.unit)(ut)} ${(0,ue.unit)(St)}`,fontSize:_e,lineHeight:Lt,transition:`all ${Ee}`},[`&-horizontal ${M}-submenu`]:{transition:[`border-color ${Ee} ${et}`,`background ${Ee} ${et}`].join(",")},[`${M}-submenu, ${M}-submenu-inline`]:{transition:[`border-color ${Ee} ${et}`,`background ${Ee} ${et}`,`padding ${Ke} ${et}`].join(",")},[`${M}-submenu ${M}-sub`]:{cursor:"initial",transition:[`background ${Ee} ${et}`,`padding ${Ee} ${et}`].join(",")},[`${M}-title-content`]:{transition:`color ${Ee}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${Ie}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${M}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:Re.padding}},[`${M}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${M}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Dt,borderStyle:Rt,borderWidth:0,borderTopWidth:mt,marginBlock:mt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Qe(Re)),{[`${M}-item-group`]:{[`${M}-item-group-list`]:{margin:0,padding:0,[`${M}-item, ${M}-submenu-title`]:{paddingInline:`${(0,ue.unit)(Re.calc(me).mul(2).equal())} ${(0,ue.unit)(St)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:kt,borderRadius:Ht,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:Ht},Qe(Re)),ye(Re)),{[`${M}-item, ${M}-submenu > ${M}-submenu-title`]:{borderRadius:zt},[`${M}-submenu-title::after`]:{transition:`transform ${Ee} ${et}`}})},"\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:Re.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Re.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Re.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Re.paddingXS}}}),ye(Re)),{[`&-inline-collapsed ${M}-submenu-arrow,
|
|
|
&-inline ${M}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,ue.unit)(st)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,ue.unit)(Re.calc(st).mul(-1).equal())})`}},[`${M}-submenu-open${M}-submenu-inline > ${M}-submenu-title > ${M}-submenu-arrow`]:{transform:`translateY(${(0,ue.unit)(Re.calc(Ut).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,ue.unit)(Re.calc(st).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,ue.unit)(st)})`}}})},{[`${Ie}-layout-header`]:{[M]:{lineHeight:"inherit"}}}]},Ye=Re=>{var Ie,M,me;const{colorPrimary:Ee,colorError:Ke,colorTextDisabled:et,colorErrorBg:ut,colorText:St,colorTextDescription:Dt,colorBgContainer:mt,colorFillAlter:kt,colorFillContent:Ht,lineWidth:zt,lineWidthBold:Ut,controlItemBgActive:st,colorBgTextHover:Rt,controlHeightLG:Lt,lineHeight:_e,colorBgElevated:Ze,marginXXS:b,padding:A,fontSize:Oe,controlHeightSM:U,fontSizeLG:le,colorTextLightSolid:wt,colorErrorHover:Se}=Re,je=(Ie=Re.activeBarWidth)!==null&&Ie!==void 0?Ie:0,Ge=(M=Re.activeBarBorderWidth)!==null&&M!==void 0?M:zt,Y=(me=Re.itemMarginInline)!==null&&me!==void 0?me:Re.marginXXS,ne=new pe.FastColor(wt).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Re.zIndexPopupBase+50,radiusItem:Re.borderRadiusLG,itemBorderRadius:Re.borderRadiusLG,radiusSubMenuItem:Re.borderRadiusSM,subMenuItemBorderRadius:Re.borderRadiusSM,colorItemText:St,itemColor:St,colorItemTextHover:St,itemHoverColor:St,colorItemTextHoverHorizontal:Ee,horizontalItemHoverColor:Ee,colorGroupTitle:Dt,groupTitleColor:Dt,colorItemTextSelected:Ee,itemSelectedColor:Ee,subMenuItemSelectedColor:Ee,colorItemTextSelectedHorizontal:Ee,horizontalItemSelectedColor:Ee,colorItemBg:mt,itemBg:mt,colorItemBgHover:Rt,itemHoverBg:Rt,colorItemBgActive:Ht,itemActiveBg:st,colorSubItemBg:kt,subMenuItemBg:kt,colorItemBgSelected:st,itemSelectedBg:st,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:je,colorActiveBarHeight:Ut,activeBarHeight:Ut,colorActiveBarBorderSize:zt,activeBarBorderWidth:Ge,colorItemTextDisabled:et,itemDisabledColor:et,colorDangerItemText:Ke,dangerItemColor:Ke,colorDangerItemTextHover:Ke,dangerItemHoverColor:Ke,colorDangerItemTextSelected:Ke,dangerItemSelectedColor:Ke,colorDangerItemBgActive:ut,dangerItemActiveBg:ut,colorDangerItemBgSelected:ut,dangerItemSelectedBg:ut,itemMarginInline:Y,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Lt,groupTitleLineHeight:_e,collapsedWidth:Lt*2,popupBg:Ze,itemMarginBlock:b,itemPaddingInline:A,horizontalLineHeight:`${Lt*1.15}px`,iconSize:Oe,iconMarginInlineEnd:U-Oe,collapsedIconSize:le,groupTitleFontSize:Oe,darkItemDisabledColor:new pe.FastColor(wt).setA(.25).toRgbString(),darkItemColor:ne,darkDangerItemColor:Ke,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:wt,darkItemSelectedBg:Ee,darkDangerItemSelectedBg:Ke,darkItemHoverBg:"transparent",darkGroupTitleColor:ne,darkItemHoverColor:wt,darkDangerItemHoverColor:Se,darkDangerItemSelectedColor:wt,darkDangerItemActiveBg:Ke,itemWidth:je?`calc(100% + ${Ge}px)`:`calc(100% - ${Y*2}px)`}};var tt=function(Re){let Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Re,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,Be.I$)("Menu",Ee=>{const{colorBgElevated:Ke,controlHeightLG:et,fontSize:ut,darkItemColor:St,darkDangerItemColor:Dt,darkItemBg:mt,darkSubMenuItemBg:kt,darkItemSelectedColor:Ht,darkItemSelectedBg:zt,darkDangerItemSelectedBg:Ut,darkItemHoverBg:st,darkGroupTitleColor:Rt,darkItemHoverColor:Lt,darkItemDisabledColor:_e,darkDangerItemHoverColor:Ze,darkDangerItemSelectedColor:b,darkDangerItemActiveBg:A,popupBg:Oe,darkPopupBg:U}=Ee,le=Ee.calc(ut).div(7).mul(5).equal(),wt=(0,X.mergeToken)(Ee,{menuArrowSize:le,menuHorizontalHeight:Ee.calc(et).mul(1.15).equal(),menuArrowOffset:Ee.calc(le).mul(.25).equal(),menuSubMenuBg:Ke,calc:Ee.calc,popupBg:Oe}),Se=(0,X.mergeToken)(wt,{itemColor:St,itemHoverColor:Lt,groupTitleColor:Rt,itemSelectedColor:Ht,subMenuItemSelectedColor:Ht,itemBg:mt,popupBg:U,subMenuItemBg:kt,itemActiveBg:"transparent",itemSelectedBg:zt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:st,itemDisabledColor:_e,dangerItemColor:Dt,dangerItemHoverColor:Ze,dangerItemSelectedColor:b,dangerItemActiveBg:A,dangerItemSelectedBg:Ut,menuSubMenuBg:kt,horizontalItemSelectedColor:Ht,horizontalItemSelectedBg:zt});return[He(wt),k(wt),$e(wt),w(wt,"light"),w(Se,"dark"),te(wt),(0,xe.Z)(wt),(0,ke.oN)(wt,"slide-up"),(0,ke.oN)(wt,"slide-down"),(0,De._y)(wt,"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}})(Re,Ie)},nt=_(75030),qe=Re=>{var Ie;const{popupClassName:M,icon:me,title:Ee,theme:Ke}=Re,et=m.useContext(C),{prefixCls:ut,inlineCollapsed:St,theme:Dt}=et,mt=(0,ce.Xl)();let kt;if(!me)kt=St&&!mt.length&&Ee&&typeof Ee=="string"?m.createElement("div",{className:`${ut}-inline-collapsed-noicon`},Ee.charAt(0)):m.createElement("span",{className:`${ut}-title-content`},Ee);else{const Ut=m.isValidElement(Ee)&&Ee.type==="span";kt=m.createElement(m.Fragment,null,(0,G.Tm)(me,{className:g()(m.isValidElement(me)?(Ie=me.props)===null||Ie===void 0?void 0:Ie.className:"",`${ut}-item-icon`)}),Ut?Ee:m.createElement("span",{className:`${ut}-title-content`},Ee))}const Ht=m.useMemo(()=>Object.assign(Object.assign({},et),{firstLevel:!1}),[et]),[zt]=(0,nt.Cn)("Menu");return m.createElement(C.Provider,{value:Ht},m.createElement(ce.Wd,Object.assign({},(0,ae.Z)(Re,["icon"]),{title:kt,popupClassName:g()(ut,M,`${ut}-${Ke||Dt}`),popupStyle:Object.assign({zIndex:zt},Re.popupStyle)})))},jt=function(Re,Ie){var M={};for(var me in Re)Object.prototype.hasOwnProperty.call(Re,me)&&Ie.indexOf(me)<0&&(M[me]=Re[me]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,me=Object.getOwnPropertySymbols(Re);Ee<me.length;Ee++)Ie.indexOf(me[Ee])<0&&Object.prototype.propertyIsEnumerable.call(Re,me[Ee])&&(M[me[Ee]]=Re[me[Ee]]);return M};function Ue(Re){return Re===null||Re===!1}const yt={item:F,submenu:qe,divider:Q};var Ce=(0,m.forwardRef)((Re,Ie)=>{var M;const me=m.useContext($.Z),Ee=me||{},{getPrefixCls:Ke,getPopupContainer:et,direction:ut,menu:St}=m.useContext(B.E_),Dt=Ke(),{prefixCls:mt,className:kt,style:Ht,theme:zt="light",expandIcon:Ut,_internalDisableMenuItemTitleTooltip:st,inlineCollapsed:Rt,siderCollapsed:Lt,rootClassName:_e,mode:Ze,selectable:b,onClick:A,overflowedIndicatorPopupClassName:Oe}=Re,U=jt(Re,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),le=(0,ae.Z)(U,["collapsedWidth"]);(M=Ee.validator)===null||M===void 0||M.call(Ee,{mode:Ze});const wt=(0,de.Z)(function(){var Xt;A==null||A.apply(void 0,arguments),(Xt=Ee.onClick)===null||Xt===void 0||Xt.call(Ee)}),Se=Ee.mode||Ze,je=b!=null?b:Ee.selectable,Ge=Rt!=null?Rt:Lt,Y={horizontal:{motionName:`${Dt}-slide-up`},inline:(0,o.Z)(Dt),other:{motionName:`${Dt}-zoom-big`}},ne=Ke("menu",mt||Ee.prefixCls),be=(0,E.Z)(ne),[Pe,P,Je]=tt(ne,be,!me),J=g()(`${ne}-${zt}`,St==null?void 0:St.className,kt),rt=m.useMemo(()=>{var Xt,Jt;if(typeof Ut=="function"||Ue(Ut))return Ut||null;if(typeof Ee.expandIcon=="function"||Ue(Ee.expandIcon))return Ee.expandIcon||null;if(typeof(St==null?void 0:St.expandIcon)=="function"||Ue(St==null?void 0:St.expandIcon))return(St==null?void 0:St.expandIcon)||null;const an=(Xt=Ut!=null?Ut:Ee==null?void 0:Ee.expandIcon)!==null&&Xt!==void 0?Xt:St==null?void 0:St.expandIcon;return(0,G.Tm)(an,{className:g()(`${ne}-submenu-expand-icon`,m.isValidElement(an)?(Jt=an.props)===null||Jt===void 0?void 0:Jt.className:void 0)})},[Ut,Ee==null?void 0:Ee.expandIcon,St==null?void 0:St.expandIcon,ne]),Gt=m.useMemo(()=>({prefixCls:ne,inlineCollapsed:Ge||!1,direction:ut,firstLevel:!0,theme:zt,mode:Se,disableMenuItemTitleTooltip:st}),[ne,Ge,ut,st,zt]);return Pe(m.createElement($.Z.Provider,{value:null},m.createElement(C.Provider,{value:Gt},m.createElement(ce.ZP,Object.assign({getPopupContainer:et,overflowedIndicator:m.createElement(ve.Z,null),overflowedIndicatorPopupClassName:g()(ne,`${ne}-${zt}`,Oe),mode:Se,selectable:je,onClick:wt},le,{inlineCollapsed:Ge,style:Object.assign(Object.assign({},St==null?void 0:St.style),Ht),className:J,prefixCls:ne,direction:ut,defaultMotions:Y,expandIcon:rt,ref:Ie,rootClassName:g()(_e,P,Ee.rootClassName,Je,be),_internalComponents:yt})))))});const he=(0,m.forwardRef)((Re,Ie)=>{const M=(0,m.useRef)(null),me=m.useContext(se.D);return(0,m.useImperativeHandle)(Ie,()=>({menu:M.current,focus:Ee=>{var Ke;(Ke=M.current)===null||Ke===void 0||Ke.focus(Ee)}})),m.createElement(Ce,Object.assign({ref:M},Re,me))});he.Item=F,he.SubMenu=qe,he.Divider=Q,he.ItemGroup=ce.BW;var We=he},89787:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return Lt}});var m=_(59301),ce=_(17835),se=_(29679),ve=_(40001),j=_(19248),g=_(99267),de=_(92310),ae=_.n(de),o=_(2738),G=_(48755),B=_(60499),E=_(85899),S=_(42244),C={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},R=function(){var Ze=(0,m.useRef)([]),b=(0,m.useRef)(null);return(0,m.useEffect)(function(){var A=Date.now(),Oe=!1;Ze.current.forEach(function(U){if(U){Oe=!0;var le=U.style;le.transitionDuration=".3s, .3s, .3s, .06s",b.current&&A-b.current<100&&(le.transitionDuration="0s, 0s")}}),Oe&&(b.current=Date.now())}),Ze.current},ee=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Q=function(Ze){var b=(0,E.Z)((0,E.Z)({},C),Ze),A=b.className,Oe=b.percent,U=b.prefixCls,le=b.strokeColor,wt=b.strokeLinecap,Se=b.strokeWidth,je=b.style,Ge=b.trailColor,Y=b.trailWidth,ne=b.transition,be=(0,S.Z)(b,ee);delete be.gapPosition;var Pe=Array.isArray(Oe)?Oe:[Oe],P=Array.isArray(le)?le:[le],Je=R(),J=Se/2,rt=100-Se/2,Gt="M ".concat(wt==="round"?J:0,",").concat(J,`
|
|
|
L `).concat(wt==="round"?rt:100,",").concat(J),Xt="0 0 100 ".concat(Se),Jt=0;return m.createElement("svg",(0,B.Z)({className:ae()("".concat(U,"-line"),A),viewBox:Xt,preserveAspectRatio:"none",style:je},be),m.createElement("path",{className:"".concat(U,"-line-trail"),d:Gt,strokeLinecap:wt,stroke:Ge,strokeWidth:Y||Se,fillOpacity:"0"}),Pe.map(function(an,rn){var Sn=1;switch(wt){case"round":Sn=1-Se/100;break;case"square":Sn=1-Se/2/100;break;default:Sn=1;break}var On={strokeDasharray:"".concat(an*Sn,"px, 100px"),strokeDashoffset:"-".concat(Jt,"px"),transition:ne||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},pn=P[rn]||P[P.length-1];return Jt+=an,m.createElement("path",{key:rn,className:"".concat(U,"-line-path"),d:Gt,strokeLinecap:wt,stroke:pn,strokeWidth:Se,fillOpacity:"0",ref:function(tn){Je[rn]=tn},style:On})}))},W=Q,D=_(43749),z=_(72190),F=_(47273),$=0,ue=(0,F.Z)();function pe(){var _e;return ue?(_e=$,$+=1):_e="TEST_OR_SSR",_e}var oe=function(_e){var Ze=m.useState(),b=(0,z.Z)(Ze,2),A=b[0],Oe=b[1];return m.useEffect(function(){Oe("rc_progress_".concat(pe()))},[]),_e||A},xe=function(Ze){var b=Ze.bg,A=Ze.children;return m.createElement("div",{style:{width:"100%",height:"100%",background:b}},A)};function ke(_e,Ze){return Object.keys(_e).map(function(b){var A=parseFloat(b),Oe="".concat(Math.floor(A*Ze),"%");return"".concat(_e[b]," ").concat(Oe)})}var De=m.forwardRef(function(_e,Ze){var b=_e.prefixCls,A=_e.color,Oe=_e.gradientId,U=_e.radius,le=_e.style,wt=_e.ptg,Se=_e.strokeLinecap,je=_e.strokeWidth,Ge=_e.size,Y=_e.gapDegree,ne=A&&(0,D.Z)(A)==="object",be=ne?"#FFF":void 0,Pe=Ge/2,P=m.createElement("circle",{className:"".concat(b,"-circle-path"),r:U,cx:Pe,cy:Pe,stroke:be,strokeLinecap:Se,strokeWidth:je,opacity:wt===0?0:1,style:le,ref:Ze});if(!ne)return P;var Je="".concat(Oe,"-conic"),J=Y?"".concat(180+Y/2,"deg"):"0deg",rt=ke(A,(360-Y)/360),Gt=ke(A,1),Xt="conic-gradient(from ".concat(J,", ").concat(rt.join(", "),")"),Jt="linear-gradient(to ".concat(Y?"bottom":"top",", ").concat(Gt.join(", "),")");return m.createElement(m.Fragment,null,m.createElement("mask",{id:Je},P),m.createElement("foreignObject",{x:0,y:0,width:Ge,height:Ge,mask:"url(#".concat(Je,")")},m.createElement(xe,{bg:Jt},m.createElement(xe,{bg:Xt}))))}),Be=De,X=100,N=function(Ze,b,A,Oe,U,le,wt,Se,je,Ge){var Y=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,ne=A/100*360*((360-le)/360),be=le===0?0:{bottom:0,top:180,left:90,right:-90}[wt],Pe=(100-Oe)/100*b;je==="round"&&Oe!==100&&(Pe+=Ge/2,Pe>=b&&(Pe=b-.01));var P=X/2;return{stroke:typeof Se=="string"?Se:void 0,strokeDasharray:"".concat(b,"px ").concat(Ze),strokeDashoffset:Pe+Y,transform:"rotate(".concat(U+ne+be,"deg)"),transformOrigin:"".concat(P,"px ").concat(P,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},k=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function q(_e){var Ze=_e!=null?_e:[];return Array.isArray(Ze)?Ze:[Ze]}var te=function(Ze){var b=(0,E.Z)((0,E.Z)({},C),Ze),A=b.id,Oe=b.prefixCls,U=b.steps,le=b.strokeWidth,wt=b.trailWidth,Se=b.gapDegree,je=Se===void 0?0:Se,Ge=b.gapPosition,Y=b.trailColor,ne=b.strokeLinecap,be=b.style,Pe=b.className,P=b.strokeColor,Je=b.percent,J=(0,S.Z)(b,k),rt=X/2,Gt=oe(A),Xt="".concat(Gt,"-gradient"),Jt=rt-le/2,an=Math.PI*2*Jt,rn=je>0?90+je/2:-90,Sn=an*((360-je)/360),On=(0,D.Z)(U)==="object"?U:{count:U,gap:2},pn=On.count,Pn=On.gap,tn=q(Je),$t=q(P),Nt=$t.find(function(It){return It&&(0,D.Z)(It)==="object"}),on=Nt&&(0,D.Z)(Nt)==="object",nn=on?"butt":ne,An=N(an,Sn,0,100,rn,je,Ge,Y,nn,le),or=R(),Ne=function(){var ht=0;return tn.map(function(we,at){var vt=$t[at]||$t[$t.length-1],Ct=N(an,Sn,ht,we,rn,je,Ge,vt,nn,le);return ht+=we,m.createElement(Be,{key:at,color:vt,ptg:we,radius:Jt,prefixCls:Oe,gradientId:Xt,style:Ct,strokeLinecap:nn,strokeWidth:le,gapDegree:je,ref:function(Pt){or[at]=Pt},size:X})}).reverse()},pt=function(){var ht=Math.round(pn*(tn[0]/100)),we=100/pn,at=0;return new Array(pn).fill(null).map(function(vt,Ct){var Et=Ct<=ht-1?$t[0]:Y,Pt=Et&&(0,D.Z)(Et)==="object"?"url(#".concat(Xt,")"):void 0,Kt=N(an,Sn,at,we,rn,je,Ge,Et,"butt",le,Pn);return at+=(Sn-Kt.strokeDashoffset+Pn)*100/Sn,m.createElement("circle",{key:Ct,className:"".concat(Oe,"-circle-path"),r:Jt,cx:rt,cy:rt,stroke:Pt,strokeWidth:le,opacity:1,style:Kt,ref:function(Ve){or[Ct]=Ve}})})};return m.createElement("svg",(0,B.Z)({className:ae()("".concat(Oe,"-circle"),Pe),viewBox:"0 0 ".concat(X," ").concat(X),style:be,id:A,role:"presentation"},J),!pn&&m.createElement("circle",{className:"".concat(Oe,"-circle-trail"),r:Jt,cx:rt,cy:rt,stroke:Y,strokeLinecap:nn,strokeWidth:wt||le,style:An}),pn?pt():Ne())},Z=te,x={Line:W,Circle:Z},w=_(25399),V=_(68361);function fe(_e){return!_e||_e<0?0:_e>100?100:_e}function $e(_e){let{success:Ze,successPercent:b}=_e,A=b;return Ze&&"progress"in Ze&&(A=Ze.progress),Ze&&"percent"in Ze&&(A=Ze.percent),A}const Qe=_e=>{let{percent:Ze,success:b,successPercent:A}=_e;const Oe=fe($e({success:b,successPercent:A}));return[Oe,fe(fe(Ze)-Oe)]},ye=_e=>{let{success:Ze={},strokeColor:b}=_e;const{strokeColor:A}=Ze;return[A||V.presetPrimaryColors.green,b||null]},He=(_e,Ze,b)=>{var A,Oe,U,le;let wt=-1,Se=-1;if(Ze==="step"){const je=b.steps,Ge=b.strokeWidth;typeof _e=="string"||typeof _e=="undefined"?(wt=_e==="small"?2:14,Se=Ge!=null?Ge:8):typeof _e=="number"?[wt,Se]=[_e,_e]:[wt=14,Se=8]=Array.isArray(_e)?_e:[_e.width,_e.height],wt*=je}else if(Ze==="line"){const je=b==null?void 0:b.strokeWidth;typeof _e=="string"||typeof _e=="undefined"?Se=je||(_e==="small"?6:8):typeof _e=="number"?[wt,Se]=[_e,_e]:[wt=-1,Se=8]=Array.isArray(_e)?_e:[_e.width,_e.height]}else(Ze==="circle"||Ze==="dashboard")&&(typeof _e=="string"||typeof _e=="undefined"?[wt,Se]=_e==="small"?[60,60]:[120,120]:typeof _e=="number"?[wt,Se]=[_e,_e]:Array.isArray(_e)&&(wt=(Oe=(A=_e[0])!==null&&A!==void 0?A:_e[1])!==null&&Oe!==void 0?Oe:120,Se=(le=(U=_e[0])!==null&&U!==void 0?U:_e[1])!==null&&le!==void 0?le:120));return[wt,Se]},Ye=3,tt=_e=>Ye/_e*100;var Bt=_e=>{const{prefixCls:Ze,trailColor:b=null,strokeLinecap:A="round",gapPosition:Oe,gapDegree:U,width:le=120,type:wt,children:Se,success:je,size:Ge=le,steps:Y}=_e,[ne,be]=He(Ge,"circle");let{strokeWidth:Pe}=_e;Pe===void 0&&(Pe=Math.max(tt(ne),6));const P={width:ne,height:be,fontSize:ne*.15+6},Je=m.useMemo(()=>{if(U||U===0)return U;if(wt==="dashboard")return 75},[U,wt]),J=Qe(_e),rt=Oe||wt==="dashboard"&&"bottom"||void 0,Gt=Object.prototype.toString.call(_e.strokeColor)==="[object Object]",Xt=ye({success:je,strokeColor:_e.strokeColor}),Jt=ae()(`${Ze}-inner`,{[`${Ze}-circle-gradient`]:Gt}),an=m.createElement(Z,{steps:Y,percent:Y?J[1]:J,strokeWidth:Pe,trailWidth:Pe,strokeColor:Y?Xt[1]:Xt,strokeLinecap:A,trailColor:b,prefixCls:Ze,gapDegree:Je,gapPosition:rt}),rn=ne<=20,Sn=m.createElement("div",{className:Jt,style:P},an,!rn&&Se);return rn?m.createElement(w.Z,{title:Se},Sn):Sn},qe=_(36237),jt=_(63356),Ue=_(16931),yt=_(51636);const Le="--progress-line-stroke-color",Ce="--progress-percent",he=_e=>{const Ze=_e?"100%":"-100%";return new qe.Keyframes(`antProgress${_e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Ze}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Ze}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},We=_e=>{const{componentCls:Ze,iconCls:b}=_e;return{[Ze]:Object.assign(Object.assign({},(0,jt.Wf)(_e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:_e.fontSize},[`${Ze}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Ze}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:_e.remainingColor,borderRadius:_e.lineBorderRadius},[`${Ze}-inner:not(${Ze}-circle-gradient)`]:{[`${Ze}-circle-path`]:{stroke:_e.defaultColor}},[`${Ze}-success-bg, ${Ze}-bg`]:{position:"relative",background:_e.defaultColor,borderRadius:_e.lineBorderRadius,transition:`all ${_e.motionDurationSlow} ${_e.motionEaseInOutCirc}`},[`${Ze}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Ze}-text`]:{width:"max-content",marginInlineStart:0,marginTop:_e.marginXXS}},[`${Ze}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Le})`]},height:"100%",width:`calc(1 / var(${Ce}) * 100%)`,display:"block"},[`&${Ze}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Ze}-text-inner`]:{color:_e.colorWhite,[`&${Ze}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Ze}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:_e.colorSuccess},[`${Ze}-text`]:{display:"inline-block",marginInlineStart:_e.marginXS,color:_e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[b]:{fontSize:_e.fontSize},[`&${Ze}-text-outer`]:{width:"max-content"},[`&${Ze}-text-outer${Ze}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:_e.marginXS}},[`${Ze}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,qe.unit)(_e.paddingXXS)}`,[`&${Ze}-text-start`]:{justifyContent:"start"},[`&${Ze}-text-end`]:{justifyContent:"end"}},[`&${Ze}-status-active`]:{[`${Ze}-bg::before`]:{position:"absolute",inset:0,backgroundColor:_e.colorBgContainer,borderRadius:_e.lineBorderRadius,opacity:0,animationName:he(),animationDuration:_e.progressActiveMotionDuration,animationTimingFunction:_e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Ze}-rtl${Ze}-status-active`]:{[`${Ze}-bg::before`]:{animationName:he(!0)}},[`&${Ze}-status-exception`]:{[`${Ze}-bg`]:{backgroundColor:_e.colorError},[`${Ze}-text`]:{color:_e.colorError}},[`&${Ze}-status-exception ${Ze}-inner:not(${Ze}-circle-gradient)`]:{[`${Ze}-circle-path`]:{stroke:_e.colorError}},[`&${Ze}-status-success`]:{[`${Ze}-bg`]:{backgroundColor:_e.colorSuccess},[`${Ze}-text`]:{color:_e.colorSuccess}},[`&${Ze}-status-success ${Ze}-inner:not(${Ze}-circle-gradient)`]:{[`${Ze}-circle-path`]:{stroke:_e.colorSuccess}}})}},Re=_e=>{const{componentCls:Ze,iconCls:b}=_e;return{[Ze]:{[`${Ze}-circle-trail`]:{stroke:_e.remainingColor},[`&${Ze}-circle ${Ze}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Ze}-circle ${Ze}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:_e.circleTextColor,fontSize:_e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[b]:{fontSize:_e.circleIconFontSize}},[`${Ze}-circle&-status-exception`]:{[`${Ze}-text`]:{color:_e.colorError}},[`${Ze}-circle&-status-success`]:{[`${Ze}-text`]:{color:_e.colorSuccess}}},[`${Ze}-inline-circle`]:{lineHeight:1,[`${Ze}-inner`]:{verticalAlign:"bottom"}}}},Ie=_e=>{const{componentCls:Ze}=_e;return{[Ze]:{[`${Ze}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:_e.progressStepMinWidth,marginInlineEnd:_e.progressStepMarginInlineEnd,backgroundColor:_e.remainingColor,transition:`all ${_e.motionDurationSlow}`,"&-active":{backgroundColor:_e.defaultColor}}}}}},M=_e=>{const{componentCls:Ze,iconCls:b}=_e;return{[Ze]:{[`${Ze}-small&-line, ${Ze}-small&-line ${Ze}-text ${b}`]:{fontSize:_e.fontSizeSM}}}},me=_e=>({circleTextColor:_e.colorText,defaultColor:_e.colorInfo,remainingColor:_e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${_e.fontSize/_e.fontSizeSM}em`});var Ee=(0,Ue.I$)("Progress",_e=>{const Ze=_e.calc(_e.marginXXS).div(2).equal(),b=(0,yt.mergeToken)(_e,{progressStepMarginInlineEnd:Ze,progressStepMinWidth:Ze,progressActiveMotionDuration:"2.4s"});return[We(b),Re(b),Ie(b),M(b)]},me),Ke=function(_e,Ze){var b={};for(var A in _e)Object.prototype.hasOwnProperty.call(_e,A)&&Ze.indexOf(A)<0&&(b[A]=_e[A]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,A=Object.getOwnPropertySymbols(_e);Oe<A.length;Oe++)Ze.indexOf(A[Oe])<0&&Object.prototype.propertyIsEnumerable.call(_e,A[Oe])&&(b[A[Oe]]=_e[A[Oe]]);return b};const et=_e=>{let Ze=[];return Object.keys(_e).forEach(b=>{const A=parseFloat(b.replace(/%/g,""));Number.isNaN(A)||Ze.push({key:A,value:_e[b]})}),Ze=Ze.sort((b,A)=>b.key-A.key),Ze.map(b=>{let{key:A,value:Oe}=b;return`${Oe} ${A}%`}).join(", ")},ut=(_e,Ze)=>{const{from:b=V.presetPrimaryColors.blue,to:A=V.presetPrimaryColors.blue,direction:Oe=Ze==="rtl"?"to left":"to right"}=_e,U=Ke(_e,["from","to","direction"]);if(Object.keys(U).length!==0){const wt=et(U),Se=`linear-gradient(${Oe}, ${wt})`;return{background:Se,[Le]:Se}}const le=`linear-gradient(${Oe}, ${b}, ${A})`;return{background:le,[Le]:le}};var Dt=_e=>{const{prefixCls:Ze,direction:b,percent:A,size:Oe,strokeWidth:U,strokeColor:le,strokeLinecap:wt="round",children:Se,trailColor:je=null,percentPosition:Ge,success:Y}=_e,{align:ne,type:be}=Ge,Pe=le&&typeof le!="string"?ut(le,b):{[Le]:le,background:le},P=wt==="square"||wt==="butt"?0:void 0,Je=Oe!=null?Oe:[-1,U||(Oe==="small"?6:8)],[J,rt]=He(Je,"line",{strokeWidth:U}),Gt={backgroundColor:je||void 0,borderRadius:P},Xt=Object.assign(Object.assign({width:`${fe(A)}%`,height:rt,borderRadius:P},Pe),{[Ce]:fe(A)/100}),Jt=$e(_e),an={width:`${fe(Jt)}%`,height:rt,borderRadius:P,backgroundColor:Y==null?void 0:Y.strokeColor},rn={width:J<0?"100%":J},Sn=m.createElement("div",{className:`${Ze}-inner`,style:Gt},m.createElement("div",{className:ae()(`${Ze}-bg`,`${Ze}-bg-${be}`),style:Xt},be==="inner"&&Se),Jt!==void 0&&m.createElement("div",{className:`${Ze}-success-bg`,style:an})),On=be==="outer"&&ne==="start",pn=be==="outer"&&ne==="end";return be==="outer"&&ne==="center"?m.createElement("div",{className:`${Ze}-layout-bottom`},Sn,Se):m.createElement("div",{className:`${Ze}-outer`,style:rn},On&&Se,Sn,pn&&Se)},kt=_e=>{const{size:Ze,steps:b,rounding:A=Math.round,percent:Oe=0,strokeWidth:U=8,strokeColor:le,trailColor:wt=null,prefixCls:Se,children:je}=_e,Ge=A(b*(Oe/100)),Y=Ze==="small"?2:14,ne=Ze!=null?Ze:[Y,U],[be,Pe]=He(ne,"step",{steps:b,strokeWidth:U}),P=be/b,Je=Array.from({length:b});for(let J=0;J<b;J++){const rt=Array.isArray(le)?le[J]:le;Je[J]=m.createElement("div",{key:J,className:ae()(`${Se}-steps-item`,{[`${Se}-steps-item-active`]:J<=Ge-1}),style:{backgroundColor:J<=Ge-1?rt:wt,width:P,height:Pe}})}return m.createElement("div",{className:`${Se}-steps-outer`},Je,je)},Ht=function(_e,Ze){var b={};for(var A in _e)Object.prototype.hasOwnProperty.call(_e,A)&&Ze.indexOf(A)<0&&(b[A]=_e[A]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Oe=0,A=Object.getOwnPropertySymbols(_e);Oe<A.length;Oe++)Ze.indexOf(A[Oe])<0&&Object.prototype.propertyIsEnumerable.call(_e,A[Oe])&&(b[A[Oe]]=_e[A[Oe]]);return b};const zt=null,Ut=["normal","exception","active","success"];var Rt=m.forwardRef((_e,Ze)=>{const{prefixCls:b,className:A,rootClassName:Oe,steps:U,strokeColor:le,percent:wt=0,size:Se="default",showInfo:je=!0,type:Ge="line",status:Y,format:ne,style:be,percentPosition:Pe={}}=_e,P=Ht(_e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:Je="end",type:J="outer"}=Pe,rt=Array.isArray(le)?le[0]:le,Gt=typeof le=="string"||Array.isArray(le)?le:void 0,Xt=m.useMemo(()=>{if(rt){const Ne=typeof rt=="string"?rt:Object.values(rt)[0];return new ce.FastColor(Ne).isLight()}return!1},[le]),Jt=m.useMemo(()=>{var Ne,pt;const It=$e(_e);return parseInt(It!==void 0?(Ne=It!=null?It:0)===null||Ne===void 0?void 0:Ne.toString():(pt=wt!=null?wt:0)===null||pt===void 0?void 0:pt.toString(),10)},[wt,_e.success,_e.successPercent]),an=m.useMemo(()=>!Ut.includes(Y)&&Jt>=100?"success":Y||"normal",[Y,Jt]),{getPrefixCls:rn,direction:Sn,progress:On}=m.useContext(G.E_),pn=rn("progress",b),[Pn,tn,$t]=Ee(pn),Nt=Ge==="line",on=Nt&&!U,nn=m.useMemo(()=>{if(!je)return null;const Ne=$e(_e);let pt;const It=ne||(we=>`${we}%`),ht=Nt&&Xt&&J==="inner";return J==="inner"||ne||an!=="exception"&&an!=="success"?pt=It(fe(wt),fe(Ne)):an==="exception"?pt=Nt?m.createElement(j.Z,null):m.createElement(g.Z,null):an==="success"&&(pt=Nt?m.createElement(se.Z,null):m.createElement(ve.Z,null)),m.createElement("span",{className:ae()(`${pn}-text`,{[`${pn}-text-bright`]:ht,[`${pn}-text-${Je}`]:on,[`${pn}-text-${J}`]:on}),title:typeof pt=="string"?pt:void 0},pt)},[je,wt,Jt,an,Ge,pn,ne]);let An;Ge==="line"?An=U?m.createElement(kt,Object.assign({},_e,{strokeColor:Gt,prefixCls:pn,steps:typeof U=="object"?U.count:U}),nn):m.createElement(Dt,Object.assign({},_e,{strokeColor:rt,prefixCls:pn,direction:Sn,percentPosition:{align:Je,type:J}}),nn):(Ge==="circle"||Ge==="dashboard")&&(An=m.createElement(Bt,Object.assign({},_e,{strokeColor:rt,prefixCls:pn,progressStatus:an}),nn));const or=ae()(pn,`${pn}-status-${an}`,{[`${pn}-${Ge==="dashboard"&&"circle"||Ge}`]:Ge!=="line",[`${pn}-inline-circle`]:Ge==="circle"&&He(Se,"circle")[0]<=20,[`${pn}-line`]:on,[`${pn}-line-align-${Je}`]:on,[`${pn}-line-position-${J}`]:on,[`${pn}-steps`]:U,[`${pn}-show-info`]:je,[`${pn}-${Se}`]:typeof Se=="string",[`${pn}-rtl`]:Sn==="rtl"},On==null?void 0:On.className,A,Oe,tn,$t);return Pn(m.createElement("div",Object.assign({ref:Ze,style:Object.assign(Object.assign({},On==null?void 0:On.style),be),className:or,role:"progressbar","aria-valuenow":Jt,"aria-valuemin":0,"aria-valuemax":100},(0,o.Z)(P,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),An))}),Lt=Rt},63139:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return Qe}});var m=_(59301),ce=_(60499),se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"},ve=se,j=_(7657),g=function(He,Ye){return m.createElement(j.Z,(0,ce.Z)({},He,{ref:Ye,icon:ve}))},de=m.forwardRef(g),ae=de,o=_(92310),G=_.n(o),B=_(18642),E=_(72190),S=_(42244),C=_(18929),R=_(10228),ee=_(26112);function Q(ye,He){var Ye=ye.disabled,tt=ye.prefixCls,nt=ye.character,Bt=ye.characterRender,qe=ye.index,jt=ye.count,Ue=ye.value,yt=ye.allowHalf,Le=ye.focused,Ce=ye.onHover,he=ye.onClick,We=function(ut){Ce(ut,qe)},Re=function(ut){he(ut,qe)},Ie=function(ut){ut.keyCode===R.Z.ENTER&&he(ut,qe)},M=qe+1,me=new Set([tt]);Ue===0&&qe===0&&Le?me.add("".concat(tt,"-focused")):yt&&Ue+.5>=M&&Ue<M?(me.add("".concat(tt,"-half")),me.add("".concat(tt,"-active")),Le&&me.add("".concat(tt,"-focused"))):(M<=Ue?me.add("".concat(tt,"-full")):me.add("".concat(tt,"-zero")),M===Ue&&Le&&me.add("".concat(tt,"-focused")));var Ee=typeof nt=="function"?nt(ye):nt,Ke=m.createElement("li",{className:G()(Array.from(me)),ref:He},m.createElement("div",{onClick:Ye?null:Re,onKeyDown:Ye?null:Ie,onMouseMove:Ye?null:We,role:"radio","aria-checked":Ue>qe?"true":"false","aria-posinset":qe+1,"aria-setsize":jt,tabIndex:Ye?-1:0},m.createElement("div",{className:"".concat(tt,"-first")},Ee),m.createElement("div",{className:"".concat(tt,"-second")},Ee)));return Bt&&(Ke=Bt(Ke,ye)),Ke}var W=m.forwardRef(Q);function D(){var ye=m.useRef({});function He(tt){return ye.current[tt]}function Ye(tt){return function(nt){ye.current[tt]=nt}}return[He,Ye]}function z(ye){var He=ye.pageXOffset,Ye="scrollLeft";if(typeof He!="number"){var tt=ye.document;He=tt.documentElement[Ye],typeof He!="number"&&(He=tt.body[Ye])}return He}function F(ye){var He,Ye,tt=ye.ownerDocument,nt=tt.body,Bt=tt&&tt.documentElement,qe=ye.getBoundingClientRect();return He=qe.left,Ye=qe.top,He-=Bt.clientLeft||nt.clientLeft||0,Ye-=Bt.clientTop||nt.clientTop||0,{left:He,top:Ye}}function $(ye){var He=F(ye),Ye=ye.ownerDocument,tt=Ye.defaultView||Ye.parentWindow;return He.left+=z(tt),He.left}var ue=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function pe(ye,He){var Ye=ye.prefixCls,tt=Ye===void 0?"rc-rate":Ye,nt=ye.className,Bt=ye.defaultValue,qe=ye.value,jt=ye.count,Ue=jt===void 0?5:jt,yt=ye.allowHalf,Le=yt===void 0?!1:yt,Ce=ye.allowClear,he=Ce===void 0?!0:Ce,We=ye.keyboard,Re=We===void 0?!0:We,Ie=ye.character,M=Ie===void 0?"\u2605":Ie,me=ye.characterRender,Ee=ye.disabled,Ke=ye.direction,et=Ke===void 0?"ltr":Ke,ut=ye.tabIndex,St=ut===void 0?0:ut,Dt=ye.autoFocus,mt=ye.onHoverChange,kt=ye.onChange,Ht=ye.onFocus,zt=ye.onBlur,Ut=ye.onKeyDown,st=ye.onMouseLeave,Rt=(0,S.Z)(ye,ue),Lt=D(),_e=(0,E.Z)(Lt,2),Ze=_e[0],b=_e[1],A=m.useRef(null),Oe=function(){if(!Ee){var nn;(nn=A.current)===null||nn===void 0||nn.focus()}};m.useImperativeHandle(He,function(){return{focus:Oe,blur:function(){if(!Ee){var nn;(nn=A.current)===null||nn===void 0||nn.blur()}}}});var U=(0,C.Z)(Bt||0,{value:qe}),le=(0,E.Z)(U,2),wt=le[0],Se=le[1],je=(0,C.Z)(null),Ge=(0,E.Z)(je,2),Y=Ge[0],ne=Ge[1],be=function(nn,An){var or=et==="rtl",Ne=nn+1;if(Le){var pt=Ze(nn),It=$(pt),ht=pt.clientWidth;(or&&An-It>ht/2||!or&&An-It<ht/2)&&(Ne-=.5)}return Ne},Pe=function(nn){Se(nn),kt==null||kt(nn)},P=m.useState(!1),Je=(0,E.Z)(P,2),J=Je[0],rt=Je[1],Gt=function(){rt(!0),Ht==null||Ht()},Xt=function(){rt(!1),zt==null||zt()},Jt=m.useState(null),an=(0,E.Z)(Jt,2),rn=an[0],Sn=an[1],On=function(nn,An){var or=be(An,nn.pageX);or!==Y&&(Sn(or),ne(null)),mt==null||mt(or)},pn=function(nn){Ee||(Sn(null),ne(null),mt==null||mt(void 0)),nn&&(st==null||st(nn))},Pn=function(nn,An){var or=be(An,nn.pageX),Ne=!1;he&&(Ne=or===wt),pn(),Pe(Ne?0:or),ne(Ne?or:null)},tn=function(nn){var An=nn.keyCode,or=et==="rtl",Ne=Le?.5:1;Re&&(An===R.Z.RIGHT&&wt<Ue&&!or?(Pe(wt+Ne),nn.preventDefault()):An===R.Z.LEFT&&wt>0&&!or||An===R.Z.RIGHT&&wt>0&&or?(Pe(wt-Ne),nn.preventDefault()):An===R.Z.LEFT&&wt<Ue&&or&&(Pe(wt+Ne),nn.preventDefault())),Ut==null||Ut(nn)};m.useEffect(function(){Dt&&!Ee&&Oe()},[]);var $t=new Array(Ue).fill(0).map(function(on,nn){return m.createElement(W,{ref:b(nn),index:nn,count:Ue,disabled:Ee,prefixCls:"".concat(tt,"-star"),allowHalf:Le,value:rn===null?wt:rn,onClick:Pn,onHover:On,key:on||nn,character:M,characterRender:me,focused:J})}),Nt=G()(tt,nt,(0,B.Z)((0,B.Z)({},"".concat(tt,"-disabled"),Ee),"".concat(tt,"-rtl"),et==="rtl"));return m.createElement("ul",(0,ce.Z)({className:Nt,onMouseLeave:pn,tabIndex:Ee?-1:St,onFocus:Ee?null:Gt,onBlur:Ee?null:Xt,onKeyDown:Ee?null:tn,ref:A},(0,ee.Z)(Rt,{aria:!0,data:!0,attr:!0})),$t)}var oe=m.forwardRef(pe),xe=oe,ke=_(48755),De=_(25399),Be=_(36237),X=_(63356),N=_(16931),k=_(51636);const q=ye=>{const{componentCls:He}=ye;return{[`${He}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:ye.marginXS},"> div":{transition:`all ${ye.motionDurationMid}, outline 0s`,"&:hover":{transform:ye.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${(0,Be.unit)(ye.lineWidth)} dashed ${ye.starColor}`,transform:ye.starHoverScale}},"&-first, &-second":{color:ye.starBg,transition:`all ${ye.motionDurationMid}`,userSelect:"none"},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${He}-star-first, &-half ${He}-star-second`]:{opacity:1},[`&-half ${He}-star-first, &-full ${He}-star-second`]:{color:"inherit"}}}},te=ye=>({[`&-rtl${ye.componentCls}`]:{direction:"rtl"}}),Z=ye=>{const{componentCls:He}=ye;return{[He]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,X.Wf)(ye)),{display:"inline-block",margin:0,padding:0,color:ye.starColor,fontSize:ye.starSize,lineHeight:1,listStyle:"none",outline:"none",[`&-disabled${He} ${He}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),q(ye)),te(ye))}},x=ye=>({starColor:ye.yellow6,starSize:ye.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:ye.colorFillContent});var w=(0,N.I$)("Rate",ye=>{const He=(0,k.mergeToken)(ye,{});return[Z(He)]},x),V=_(2171),fe=function(ye,He){var Ye={};for(var tt in ye)Object.prototype.hasOwnProperty.call(ye,tt)&&He.indexOf(tt)<0&&(Ye[tt]=ye[tt]);if(ye!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,tt=Object.getOwnPropertySymbols(ye);nt<tt.length;nt++)He.indexOf(tt[nt])<0&&Object.prototype.propertyIsEnumerable.call(ye,tt[nt])&&(Ye[tt[nt]]=ye[tt[nt]]);return Ye},Qe=m.forwardRef((ye,He)=>{const{prefixCls:Ye,className:tt,rootClassName:nt,style:Bt,tooltips:qe,character:jt=m.createElement(ae,null),disabled:Ue}=ye,yt=fe(ye,["prefixCls","className","rootClassName","style","tooltips","character","disabled"]),Le=(ut,St)=>{let{index:Dt}=St;return qe?m.createElement(De.Z,{title:qe[Dt]},ut):ut},{getPrefixCls:Ce,direction:he,rate:We}=m.useContext(ke.E_),Re=Ce("rate",Ye),[Ie,M,me]=w(Re),Ee=Object.assign(Object.assign({},We==null?void 0:We.style),Bt),Ke=m.useContext(V.Z),et=Ue!=null?Ue:Ke;return Ie(m.createElement(xe,Object.assign({ref:He,character:jt,characterRender:Le,disabled:et},yt,{className:G()(tt,nt,M,me,We==null?void 0:We.className),style:Ee,prefixCls:Re,direction:he})))})},44104:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ee}});var m=_(59301),ce=_(92310),se=_.n(ce),ve=_(11592),j=_(99402),g=_(48755),de=_(70045);const ae=m.createContext({latestIndex:0}),o=ae.Provider;var B=Q=>{let{className:W,index:D,children:z,split:F,style:$}=Q;const{latestIndex:ue}=m.useContext(ae);return z==null?null:m.createElement(m.Fragment,null,m.createElement("div",{className:W,style:$},z),D<ue&&F&&m.createElement("span",{className:`${W}-split`},F))},E=_(31547),S=function(Q,W){var D={};for(var z in Q)Object.prototype.hasOwnProperty.call(Q,z)&&W.indexOf(z)<0&&(D[z]=Q[z]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var F=0,z=Object.getOwnPropertySymbols(Q);F<z.length;F++)W.indexOf(z[F])<0&&Object.prototype.propertyIsEnumerable.call(Q,z[F])&&(D[z[F]]=Q[z[F]]);return D};const R=m.forwardRef((Q,W)=>{var D;const{getPrefixCls:z,direction:F,size:$,className:ue,style:pe,classNames:oe,styles:xe}=(0,g.dj)("space"),{size:ke=$!=null?$:"small",align:De,className:Be,rootClassName:X,children:N,direction:k="horizontal",prefixCls:q,split:te,style:Z,wrap:x=!1,classNames:w,styles:V}=Q,fe=S(Q,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[$e,Qe]=Array.isArray(ke)?ke:[ke,ke],ye=(0,j.n)(Qe),He=(0,j.n)($e),Ye=(0,j.T)(Qe),tt=(0,j.T)($e),nt=(0,ve.Z)(N,{keepEmpty:!0}),Bt=De===void 0&&k==="horizontal"?"center":De,qe=z("space",q),[jt,Ue,yt]=(0,E.Z)(qe),Le=se()(qe,ue,Ue,`${qe}-${k}`,{[`${qe}-rtl`]:F==="rtl",[`${qe}-align-${Bt}`]:Bt,[`${qe}-gap-row-${Qe}`]:ye,[`${qe}-gap-col-${$e}`]:He},Be,X,yt),Ce=se()(`${qe}-item`,(D=w==null?void 0:w.item)!==null&&D!==void 0?D:oe.item);let he=0;const We=nt.map((M,me)=>{var Ee;M!=null&&(he=me);const Ke=(M==null?void 0:M.key)||`${Ce}-${me}`;return m.createElement(B,{className:Ce,key:Ke,index:me,split:te,style:(Ee=V==null?void 0:V.item)!==null&&Ee!==void 0?Ee:xe.item},M)}),Re=m.useMemo(()=>({latestIndex:he}),[he]);if(nt.length===0)return null;const Ie={};return x&&(Ie.flexWrap="wrap"),!He&&tt&&(Ie.columnGap=$e),!ye&&Ye&&(Ie.rowGap=Qe),jt(m.createElement("div",Object.assign({ref:W,className:Le,style:Object.assign(Object.assign(Object.assign({},Ie),pe),Z)},fe),m.createElement(o,{value:Re},We)))});R.Compact=de.ZP;var ee=R},11938:function(fn,ct,_){"use strict";_.d(ct,{default:function(){return De}});var m=_(59301),ce=_(40192),se=_(22703),ve=_(92310),j=_.n(ve),g=_(26112),de=_(48755),ae=_(458),G=Be=>{const{value:X,formatter:N,precision:k,decimalSeparator:q,groupSeparator:te="",prefixCls:Z}=Be;let x;if(typeof N=="function")x=N(X);else{const w=String(X),V=w.match(/^(-?)(\d*)(\.(\d+))?$/);if(!V||w==="-")x=w;else{const fe=V[1];let $e=V[2]||"0",Qe=V[4]||"";$e=$e.replace(/\B(?=(\d{3})+(?!\d))/g,te),typeof k=="number"&&(Qe=Qe.padEnd(k,"0").slice(0,k>0?k:0)),Qe&&(Qe=`${q}${Qe}`),x=[m.createElement("span",{key:"int",className:`${Z}-content-value-int`},fe,$e),Qe&&m.createElement("span",{key:"decimal",className:`${Z}-content-value-decimal`},Qe)]}}return m.createElement("span",{className:`${Z}-content-value`},x)},B=_(63356),E=_(16931),S=_(51636);const C=Be=>{const{componentCls:X,marginXXS:N,padding:k,colorTextDescription:q,titleFontSize:te,colorTextHeading:Z,contentFontSize:x,fontFamily:w}=Be;return{[X]:Object.assign(Object.assign({},(0,B.Wf)(Be)),{[`${X}-title`]:{marginBottom:N,color:q,fontSize:te},[`${X}-skeleton`]:{paddingTop:k},[`${X}-content`]:{color:Z,fontSize:x,fontFamily:w,[`${X}-content-value`]:{display:"inline-block",direction:"ltr"},[`${X}-content-prefix, ${X}-content-suffix`]:{display:"inline-block"},[`${X}-content-prefix`]:{marginInlineEnd:N},[`${X}-content-suffix`]:{marginInlineStart:N}}})}},R=Be=>{const{fontSizeHeading3:X,fontSize:N}=Be;return{titleFontSize:N,contentFontSize:X}};var ee=(0,E.I$)("Statistic",Be=>{const X=(0,S.mergeToken)(Be,{});return[C(X)]},R),Q=function(Be,X){var N={};for(var k in Be)Object.prototype.hasOwnProperty.call(Be,k)&&X.indexOf(k)<0&&(N[k]=Be[k]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,k=Object.getOwnPropertySymbols(Be);q<k.length;q++)X.indexOf(k[q])<0&&Object.prototype.propertyIsEnumerable.call(Be,k[q])&&(N[k[q]]=Be[k[q]]);return N},D=Be=>{const{prefixCls:X,className:N,rootClassName:k,style:q,valueStyle:te,value:Z=0,title:x,valueRender:w,prefix:V,suffix:fe,loading:$e=!1,formatter:Qe,precision:ye,decimalSeparator:He=".",groupSeparator:Ye=",",onMouseEnter:tt,onMouseLeave:nt}=Be,Bt=Q(Be,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:qe,direction:jt,className:Ue,style:yt}=(0,de.dj)("statistic"),Le=qe("statistic",X),[Ce,he,We]=ee(Le),Re=m.createElement(G,{decimalSeparator:He,groupSeparator:Ye,prefixCls:Le,formatter:Qe,precision:ye,value:Z}),Ie=j()(Le,{[`${Le}-rtl`]:jt==="rtl"},Ue,N,k,he,We),M=(0,g.Z)(Bt,{aria:!0,data:!0});return Ce(m.createElement("div",Object.assign({},M,{className:Ie,style:Object.assign(Object.assign({},yt),q),onMouseEnter:tt,onMouseLeave:nt}),x&&m.createElement("div",{className:`${Le}-title`},x),m.createElement(ae.Z,{paragraph:!1,loading:$e,className:`${Le}-skeleton`},m.createElement("div",{style:te,className:`${Le}-content`},V&&m.createElement("span",{className:`${Le}-content-prefix`},V),w?w(Re):Re,fe&&m.createElement("span",{className:`${Le}-content-suffix`},fe)))))};const z=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function F(Be,X){let N=Be;const k=/\[[^\]]*]/g,q=(X.match(k)||[]).map(w=>w.slice(1,-1)),te=X.replace(k,"[]"),Z=z.reduce((w,V)=>{let[fe,$e]=V;if(w.includes(fe)){const Qe=Math.floor(N/$e);return N-=Qe*$e,w.replace(new RegExp(`${fe}+`,"g"),ye=>{const He=ye.length;return Qe.toString().padStart(He,"0")})}return w},te);let x=0;return Z.replace(k,()=>{const w=q[x];return x+=1,w})}function $(Be,X){const{format:N=""}=X,k=new Date(Be).getTime(),q=Date.now(),te=Math.max(k-q,0);return F(te,N)}var ue=function(Be,X){var N={};for(var k in Be)Object.prototype.hasOwnProperty.call(Be,k)&&X.indexOf(k)<0&&(N[k]=Be[k]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,k=Object.getOwnPropertySymbols(Be);q<k.length;q++)X.indexOf(k[q])<0&&Object.prototype.propertyIsEnumerable.call(Be,k[q])&&(N[k[q]]=Be[k[q]]);return N};const pe=1e3/30;function oe(Be){return new Date(Be).getTime()}const xe=Be=>{const{value:X,format:N="HH:mm:ss",onChange:k,onFinish:q}=Be,te=ue(Be,["value","format","onChange","onFinish"]),Z=(0,ce.Z)(),x=m.useRef(null),w=()=>{q==null||q(),x.current&&(clearInterval(x.current),x.current=null)},V=()=>{const Qe=oe(X);Qe>=Date.now()&&(x.current=setInterval(()=>{Z(),k==null||k(Qe-Date.now()),Qe<Date.now()&&w()},pe))};m.useEffect(()=>(V(),()=>{x.current&&(clearInterval(x.current),x.current=null)}),[X]);const fe=(Qe,ye)=>$(Qe,Object.assign(Object.assign({},ye),{format:N})),$e=Qe=>(0,se.Tm)(Qe,{title:void 0});return m.createElement(D,Object.assign({},te,{value:X,valueRender:$e,formatter:fe}))};var ke=m.memo(xe);D.Countdown=ke;var De=D},93873:function(fn,ct,_){"use strict";_.d(ct,{Fm:function(){return E}});var m=_(36237),ce=_(48746);const se=new m.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ve=new m.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),j=new m.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),g=new m.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),de=new m.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ae=new m.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 m.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),G=new m.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),B={"move-up":{inKeyframes:o,outKeyframes:G},"move-down":{inKeyframes:se,outKeyframes:ve},"move-left":{inKeyframes:j,outKeyframes:g},"move-right":{inKeyframes:de,outKeyframes:ae}},E=(S,C)=>{const{antCls:R}=S,ee=`${R}-${C}`,{inKeyframes:Q,outKeyframes:W}=B[C];return[(0,ce.R)(ee,Q,W,S.motionDurationMid),{[`
|
|
|
${ee}-enter,
|
|
|
${ee}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:S.motionEaseOutCirc},[`${ee}-leave`]:{animationTimingFunction:S.motionEaseInOutCirc}}]}},46e3:function(fn,ct,_){"use strict";_.d(ct,{Qt:function(){return j},Uw:function(){return ve},fJ:function(){return se},ly:function(){return g},oN:function(){return E}});var m=_(36237),ce=_(48746);const se=new m.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ve=new m.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),j=new m.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),g=new m.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),de=new m.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ae=new m.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new m.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),G=new m.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),B={"slide-up":{inKeyframes:se,outKeyframes:ve},"slide-down":{inKeyframes:j,outKeyframes:g},"slide-left":{inKeyframes:de,outKeyframes:ae},"slide-right":{inKeyframes:o,outKeyframes:G}},E=(S,C)=>{const{antCls:R}=S,ee=`${R}-${C}`,{inKeyframes:Q,outKeyframes:W}=B[C];return[(0,ce.R)(ee,Q,W,S.motionDurationMid),{[`
|
|
|
${ee}-enter,
|
|
|
${ee}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:S.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${ee}-leave`]:{animationTimingFunction:S.motionEaseInQuint}}]}},37645:function(fn,ct,_){"use strict";_.d(ct,{ZP:function(){return g},qN:function(){return se},wZ:function(){return ve}});var m=_(36237),ce=_(36305);const se=8;function ve(de){const{contentRadius:ae,limitVerticalRadius:o}=de,G=ae>12?ae+2:12;return{arrowOffsetHorizontal:G,arrowOffsetVertical:o?se:G}}function j(de,ae){return de?ae:{}}function g(de,ae,o){const{componentCls:G,boxShadowPopoverArrow:B,arrowOffsetVertical:E,arrowOffsetHorizontal:S}=de,{arrowDistance:C=0,arrowPlacement:R={left:!0,right:!0,top:!0,bottom:!0}}=o||{};return{[G]:Object.assign(Object.assign(Object.assign(Object.assign({[`${G}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,ce.W)(de,ae,B)),{"&:before":{background:ae}})]},j(!!R.top,{[[`&-placement-top > ${G}-arrow`,`&-placement-topLeft > ${G}-arrow`,`&-placement-topRight > ${G}-arrow`].join(",")]:{bottom:C,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${G}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":S,[`> ${G}-arrow`]:{left:{_skip_check_:!0,value:S}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,m.unit)(S)})`,[`> ${G}-arrow`]:{right:{_skip_check_:!0,value:S}}}})),j(!!R.bottom,{[[`&-placement-bottom > ${G}-arrow`,`&-placement-bottomLeft > ${G}-arrow`,`&-placement-bottomRight > ${G}-arrow`].join(",")]:{top:C,transform:"translateY(-100%)"},[`&-placement-bottom > ${G}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":S,[`> ${G}-arrow`]:{left:{_skip_check_:!0,value:S}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,m.unit)(S)})`,[`> ${G}-arrow`]:{right:{_skip_check_:!0,value:S}}}})),j(!!R.left,{[[`&-placement-left > ${G}-arrow`,`&-placement-leftTop > ${G}-arrow`,`&-placement-leftBottom > ${G}-arrow`].join(",")]:{right:{_skip_check_:!0,value:C},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${G}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${G}-arrow`]:{top:E},[`&-placement-leftBottom > ${G}-arrow`]:{bottom:E}})),j(!!R.right,{[[`&-placement-right > ${G}-arrow`,`&-placement-rightTop > ${G}-arrow`,`&-placement-rightBottom > ${G}-arrow`].join(",")]:{left:{_skip_check_:!0,value:C},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${G}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${G}-arrow`]:{top:E},[`&-placement-rightBottom > ${G}-arrow`]:{bottom:E}}))}}},36305:function(fn,ct,_){"use strict";_.d(ct,{W:function(){return se},w:function(){return ce}});var m=_(36237);function ce(ve){const{sizePopupArrow:j,borderRadiusXS:g,borderRadiusOuter:de}=ve,ae=j/2,o=0,G=ae,B=de*1/Math.sqrt(2),E=ae-de*(1-1/Math.sqrt(2)),S=ae-g*(1/Math.sqrt(2)),C=de*(Math.sqrt(2)-1)+g*(1/Math.sqrt(2)),R=2*ae-S,ee=C,Q=2*ae-B,W=E,D=2*ae-o,z=G,F=ae*Math.sqrt(2)+de*(Math.sqrt(2)-2),$=de*(Math.sqrt(2)-1),ue=`polygon(${$}px 100%, 50% ${$}px, ${2*ae-$}px 100%, ${$}px 100%)`,pe=`path('M ${o} ${G} A ${de} ${de} 0 0 0 ${B} ${E} L ${S} ${C} A ${g} ${g} 0 0 1 ${R} ${ee} L ${Q} ${W} A ${de} ${de} 0 0 0 ${D} ${z} Z')`;return{arrowShadowWidth:F,arrowPath:pe,arrowPolygon:ue}}const se=(ve,j,g)=>{const{sizePopupArrow:de,arrowPolygon:ae,arrowPath:o,arrowShadowWidth:G,borderRadiusXS:B,calc:E}=ve;return{pointerEvents:"none",width:de,height:de,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:de,height:E(de).div(2).equal(),background:j,clipPath:{_multi_value_:!0,value:[ae,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:G,height:G,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,m.unit)(B)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:g,zIndex:0,background:"transparent"}}}},96599:function(fn,ct,_){"use strict";_.d(ct,{default:function(){return N}});var m=_(59301),ce=_(92310),se=_.n(ce),ve=_(2738),j=_(29509),g=_(78776),de=_(22703),ae=_(12919),o=_(48755),G=_(36237),B=_(17835),E=_(63356),S=_(51636),C=_(16931);const R=k=>{const{paddingXXS:q,lineWidth:te,tagPaddingHorizontal:Z,componentCls:x,calc:w}=k,V=w(Z).sub(te).equal(),fe=w(q).sub(te).equal();return{[x]:Object.assign(Object.assign({},(0,E.Wf)(k)),{display:"inline-block",height:"auto",marginInlineEnd:k.marginXS,paddingInline:V,fontSize:k.tagFontSize,lineHeight:k.tagLineHeight,whiteSpace:"nowrap",background:k.defaultBg,border:`${(0,G.unit)(k.lineWidth)} ${k.lineType} ${k.colorBorder}`,borderRadius:k.borderRadiusSM,opacity:1,transition:`all ${k.motionDurationMid}`,textAlign:"start",position:"relative",[`&${x}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:k.defaultColor},[`${x}-close-icon`]:{marginInlineStart:fe,fontSize:k.tagIconSize,color:k.colorTextDescription,cursor:"pointer",transition:`all ${k.motionDurationMid}`,"&:hover":{color:k.colorTextHeading}},[`&${x}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${k.iconCls}-close, ${k.iconCls}-close:hover`]:{color:k.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${x}-checkable-checked):hover`]:{color:k.colorPrimary,backgroundColor:k.colorFillSecondary},"&:active, &-checked":{color:k.colorTextLightSolid},"&-checked":{backgroundColor:k.colorPrimary,"&:hover":{backgroundColor:k.colorPrimaryHover}},"&:active":{backgroundColor:k.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${k.iconCls} + span, > span + ${k.iconCls}`]:{marginInlineStart:V}}),[`${x}-borderless`]:{borderColor:"transparent",background:k.tagBorderlessBg}}},ee=k=>{const{lineWidth:q,fontSizeIcon:te,calc:Z}=k,x=k.fontSizeSM;return(0,S.mergeToken)(k,{tagFontSize:x,tagLineHeight:(0,G.unit)(Z(k.lineHeightSM).mul(x).equal()),tagIconSize:Z(te).sub(Z(q).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:k.defaultBg})},Q=k=>({defaultBg:new B.FastColor(k.colorFillQuaternary).onBackground(k.colorBgContainer).toHexString(),defaultColor:k.colorText});var W=(0,C.I$)("Tag",k=>{const q=ee(k);return R(q)},Q),D=function(k,q){var te={};for(var Z in k)Object.prototype.hasOwnProperty.call(k,Z)&&q.indexOf(Z)<0&&(te[Z]=k[Z]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,Z=Object.getOwnPropertySymbols(k);x<Z.length;x++)q.indexOf(Z[x])<0&&Object.prototype.propertyIsEnumerable.call(k,Z[x])&&(te[Z[x]]=k[Z[x]]);return te},F=m.forwardRef((k,q)=>{const{prefixCls:te,style:Z,className:x,checked:w,onChange:V,onClick:fe}=k,$e=D(k,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:Qe,tag:ye}=m.useContext(o.E_),He=jt=>{V==null||V(!w),fe==null||fe(jt)},Ye=Qe("tag",te),[tt,nt,Bt]=W(Ye),qe=se()(Ye,`${Ye}-checkable`,{[`${Ye}-checkable-checked`]:w},ye==null?void 0:ye.className,x,nt,Bt);return tt(m.createElement("span",Object.assign({},$e,{ref:q,style:Object.assign(Object.assign({},Z),ye==null?void 0:ye.style),className:qe,onClick:He})))}),$=_(93427);const ue=k=>(0,$.Z)(k,(q,te)=>{let{textColor:Z,lightBorderColor:x,lightColor:w,darkColor:V}=te;return{[`${k.componentCls}${k.componentCls}-${q}`]:{color:Z,background:w,borderColor:x,"&-inverse":{color:k.colorTextLightSolid,background:V,borderColor:V},[`&${k.componentCls}-borderless`]:{borderColor:"transparent"}}}});var pe=(0,C.bk)(["Tag","preset"],k=>{const q=ee(k);return ue(q)},Q);function oe(k){return typeof k!="string"?k:k.charAt(0).toUpperCase()+k.slice(1)}const xe=(k,q,te)=>{const Z=oe(te);return{[`${k.componentCls}${k.componentCls}-${q}`]:{color:k[`color${te}`],background:k[`color${Z}Bg`],borderColor:k[`color${Z}Border`],[`&${k.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ke=(0,C.bk)(["Tag","status"],k=>{const q=ee(k);return[xe(q,"success","Success"),xe(q,"processing","Info"),xe(q,"error","Error"),xe(q,"warning","Warning")]},Q),De=function(k,q){var te={};for(var Z in k)Object.prototype.hasOwnProperty.call(k,Z)&&q.indexOf(Z)<0&&(te[Z]=k[Z]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var x=0,Z=Object.getOwnPropertySymbols(k);x<Z.length;x++)q.indexOf(Z[x])<0&&Object.prototype.propertyIsEnumerable.call(k,Z[x])&&(te[Z[x]]=k[Z[x]]);return te};const X=m.forwardRef((k,q)=>{const{prefixCls:te,className:Z,rootClassName:x,style:w,children:V,icon:fe,color:$e,onClose:Qe,bordered:ye=!0,visible:He}=k,Ye=De(k,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:tt,direction:nt,tag:Bt}=m.useContext(o.E_),[qe,jt]=m.useState(!0),Ue=(0,ve.Z)(Ye,["closeIcon","closable"]);m.useEffect(()=>{He!==void 0&&jt(He)},[He]);const yt=(0,j.o2)($e),Le=(0,j.yT)($e),Ce=yt||Le,he=Object.assign(Object.assign({backgroundColor:$e&&!Ce?$e:void 0},Bt==null?void 0:Bt.style),w),We=tt("tag",te),[Re,Ie,M]=W(We),me=se()(We,Bt==null?void 0:Bt.className,{[`${We}-${$e}`]:Ce,[`${We}-has-color`]:$e&&!Ce,[`${We}-hidden`]:!qe,[`${We}-rtl`]:nt==="rtl",[`${We}-borderless`]:!ye},Z,x,Ie,M),Ee=mt=>{mt.stopPropagation(),Qe==null||Qe(mt),!mt.defaultPrevented&&jt(!1)},[,Ke]=(0,g.Z)((0,g.w)(k),(0,g.w)(Bt),{closable:!1,closeIconRender:mt=>{const kt=m.createElement("span",{className:`${We}-close-icon`,onClick:Ee},mt);return(0,de.wm)(mt,kt,Ht=>({onClick:zt=>{var Ut;(Ut=Ht==null?void 0:Ht.onClick)===null||Ut===void 0||Ut.call(Ht,zt),Ee(zt)},className:se()(Ht==null?void 0:Ht.className,`${We}-close-icon`)}))}}),et=typeof Ye.onClick=="function"||V&&V.type==="a",ut=fe||null,St=ut?m.createElement(m.Fragment,null,ut,V&&m.createElement("span",null,V)):V,Dt=m.createElement("span",Object.assign({},Ue,{ref:q,className:me,style:he}),St,Ke,yt&&m.createElement(pe,{key:"preset",prefixCls:We}),Le&&m.createElement(ke,{key:"status",prefixCls:We}));return Re(et?m.createElement(ae.Z,{component:"Tag"},Dt):Dt)});X.CheckableTag=F;var N=X},93427:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ce}});var m=_(34998);function ce(se,ve){return m.i.reduce((j,g)=>{const de=se[`${g}1`],ae=se[`${g}3`],o=se[`${g}6`],G=se[`${g}7`];return Object.assign(Object.assign({},j),ve(g,{lightColor:de,lightBorderColor:ae,darkColor:o,textColor:G}))},{})}},25399:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return q}});var m=_(59301),ce=_(92310),se=_.n(ce),ve=_(29125),j=_(18929),g=_(62487),de=_(75030),ae=_(86641),o=_(52838),G=_(22703),B=_(32383),E=_(55743),S=_(57700),C=_(48755),R=_(36237),ee=_(63356),Q=_(34925),W=_(37645),D=_(36305),z=_(93427),F=_(51636),$=_(16931);const ue=te=>{const{calc:Z,componentCls:x,tooltipMaxWidth:w,tooltipColor:V,tooltipBg:fe,tooltipBorderRadius:$e,zIndexPopup:Qe,controlHeight:ye,boxShadowSecondary:He,paddingSM:Ye,paddingXS:tt,arrowOffsetHorizontal:nt,sizePopupArrow:Bt}=te,qe=Z($e).add(Bt).add(nt).equal(),jt=Z($e).mul(2).add(Bt).equal();return[{[x]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,ee.Wf)(te)),{position:"absolute",zIndex:Qe,display:"block",width:"max-content",maxWidth:w,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":fe,[`${x}-inner`]:{minWidth:jt,minHeight:ye,padding:`${(0,R.unit)(te.calc(Ye).div(2).equal())} ${(0,R.unit)(tt)}`,color:V,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:fe,borderRadius:$e,boxShadow:He,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:qe},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${x}-inner`]:{borderRadius:te.min($e,W.qN)}},[`${x}-content`]:{position:"relative"}}),(0,z.Z)(te,(Ue,yt)=>{let{darkColor:Le}=yt;return{[`&${x}-${Ue}`]:{[`${x}-inner`]:{backgroundColor:Le},[`${x}-arrow`]:{"--antd-arrow-background-color":Le}}}})),{"&-rtl":{direction:"rtl"}})},(0,W.ZP)(te,"var(--antd-arrow-background-color)"),{[`${x}-pure`]:{position:"relative",maxWidth:"none",margin:te.sizePopupArrow}}]},pe=te=>Object.assign(Object.assign({zIndexPopup:te.zIndexPopupBase+70},(0,W.wZ)({contentRadius:te.borderRadius,limitVerticalRadius:!0})),(0,D.w)((0,F.mergeToken)(te,{borderRadiusOuter:Math.min(te.borderRadiusOuter,4)})));var oe=function(te){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,$.I$)("Tooltip",w=>{const{borderRadius:V,colorTextLightSolid:fe,colorBgSpotlight:$e}=w,Qe=(0,F.mergeToken)(w,{tooltipMaxWidth:250,tooltipColor:fe,tooltipBorderRadius:V,tooltipBg:$e});return[ue(Qe),(0,Q._y)(w,"zoom-big-fast")]},pe,{resetStyle:!1,injectStyle:Z})(te)},xe=_(29509);function ke(te,Z){const x=(0,xe.o2)(Z),w=se()({[`${te}-${Z}`]:Z&&x}),V={},fe={};return Z&&!x&&(V.background=Z,fe["--antd-arrow-background-color"]=Z),{className:w,overlayStyle:V,arrowStyle:fe}}var Be=te=>{const{prefixCls:Z,className:x,placement:w="top",title:V,color:fe,overlayInnerStyle:$e}=te,{getPrefixCls:Qe}=m.useContext(C.E_),ye=Qe("tooltip",Z),[He,Ye,tt]=oe(ye),nt=ke(ye,fe),Bt=nt.arrowStyle,qe=Object.assign(Object.assign({},$e),nt.overlayStyle),jt=se()(Ye,tt,ye,`${ye}-pure`,`${ye}-placement-${w}`,x,nt.className);return He(m.createElement("div",{className:jt,style:Bt},m.createElement("div",{className:`${ye}-arrow`}),m.createElement(ve.G,Object.assign({},te,{className:Ye,prefixCls:ye,overlayInnerStyle:qe}),V)))},X=function(te,Z){var x={};for(var w in te)Object.prototype.hasOwnProperty.call(te,w)&&Z.indexOf(w)<0&&(x[w]=te[w]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var V=0,w=Object.getOwnPropertySymbols(te);V<w.length;V++)Z.indexOf(w[V])<0&&Object.prototype.propertyIsEnumerable.call(te,w[V])&&(x[w[V]]=te[w[V]]);return x};const k=m.forwardRef((te,Z)=>{var x,w;const{prefixCls:V,openClassName:fe,getTooltipContainer:$e,color:Qe,overlayInnerStyle:ye,children:He,afterOpenChange:Ye,afterVisibleChange:tt,destroyTooltipOnHide:nt,arrow:Bt=!0,title:qe,overlay:jt,builtinPlacements:Ue,arrowPointAtCenter:yt=!1,autoAdjustOverflow:Le=!0,motion:Ce,getPopupContainer:he,placement:We="top",mouseEnterDelay:Re=.1,mouseLeaveDelay:Ie=.1,overlayStyle:M,rootClassName:me,overlayClassName:Ee,styles:Ke,classNames:et}=te,ut=X(te,["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"]),St=!!Bt,[,Dt]=(0,S.ZP)(),{getPopupContainer:mt,getPrefixCls:kt,direction:Ht,className:zt,style:Ut,classNames:st,styles:Rt}=(0,C.dj)("tooltip"),Lt=(0,B.ln)("Tooltip"),_e=m.useRef(null),Ze=()=>{var pn;(pn=_e.current)===null||pn===void 0||pn.forceAlign()};m.useImperativeHandle(Z,()=>{var pn,Pn;return{forceAlign:Ze,forcePopupAlign:()=>{Lt.deprecated(!1,"forcePopupAlign","forceAlign"),Ze()},nativeElement:(pn=_e.current)===null||pn===void 0?void 0:pn.nativeElement,popupElement:(Pn=_e.current)===null||Pn===void 0?void 0:Pn.popupElement}});const[b,A]=(0,j.Z)(!1,{value:(x=te.open)!==null&&x!==void 0?x:te.visible,defaultValue:(w=te.defaultOpen)!==null&&w!==void 0?w:te.defaultVisible}),Oe=!qe&&!jt&&qe!==0,U=pn=>{var Pn,tn;A(Oe?!1:pn),Oe||((Pn=te.onOpenChange)===null||Pn===void 0||Pn.call(te,pn),(tn=te.onVisibleChange)===null||tn===void 0||tn.call(te,pn))},le=m.useMemo(()=>{var pn,Pn;let tn=yt;return typeof Bt=="object"&&(tn=(Pn=(pn=Bt.pointAtCenter)!==null&&pn!==void 0?pn:Bt.arrowPointAtCenter)!==null&&Pn!==void 0?Pn:yt),Ue||(0,o.Z)({arrowPointAtCenter:tn,autoAdjustOverflow:Le,arrowWidth:St?Dt.sizePopupArrow:0,borderRadius:Dt.borderRadius,offset:Dt.marginXXS,visibleFirst:!0})},[yt,Bt,Ue,Dt]),wt=m.useMemo(()=>qe===0?qe:jt||qe||"",[jt,qe]),Se=m.createElement(g.Z,{space:!0},typeof wt=="function"?wt():wt),je=kt("tooltip",V),Ge=kt(),Y=te["data-popover-inject"];let ne=b;!("open"in te)&&!("visible"in te)&&Oe&&(ne=!1);const be=m.isValidElement(He)&&!(0,G.M2)(He)?He:m.createElement("span",null,He),Pe=be.props,P=!Pe.className||typeof Pe.className=="string"?se()(Pe.className,fe||`${je}-open`):Pe.className,[Je,J,rt]=oe(je,!Y),Gt=ke(je,Qe),Xt=Gt.arrowStyle,Jt=se()(Ee,{[`${je}-rtl`]:Ht==="rtl"},Gt.className,me,J,rt,zt,st.root,et==null?void 0:et.root),an=se()(st.body,et==null?void 0:et.body),[rn,Sn]=(0,de.Cn)("Tooltip",ut.zIndex),On=m.createElement(ve.Z,Object.assign({},ut,{zIndex:rn,showArrow:St,placement:We,mouseEnterDelay:Re,mouseLeaveDelay:Ie,prefixCls:je,classNames:{root:Jt,body:an},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Xt),Rt.root),Ut),M),Ke==null?void 0:Ke.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},Rt.body),ye),Ke==null?void 0:Ke.body),Gt.overlayStyle)},getTooltipContainer:he||$e||mt,ref:_e,builtinPlacements:le,overlay:Se,visible:ne,onVisibleChange:U,afterVisibleChange:Ye!=null?Ye:tt,arrowContent:m.createElement("span",{className:`${je}-arrow-content`}),motion:{motionName:(0,ae.m)(Ge,"zoom-big-fast",te.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!nt}),ne?(0,G.Tm)(be,{className:P}):be);return Je(m.createElement(E.Z.Provider,{value:Sn},On))});k._InternalPanelDoNotUseOrYouWillBeFired=Be;var q=k},94968:function(fn,ct,_){"use strict";_.d(ct,{default:function(){return ht}});var m=_(59301),ce=_(77654),se=_(4676),ve=_(92310),j=_.n(ve),g=_(60499),de=_(38705),ae=_(17212),o=_(15793),G=_(39153),B=_(55401),E=_(18642),S=_(85899),C=_(42244),R=_(43749),ee=_(73001),Q=_(11576),W=_(26112),D=_(48736),z=function(we,at){if(we&&at){var vt=Array.isArray(at)?at:at.split(","),Ct=we.name||"",Et=we.type||"",Pt=Et.replace(/\/.*$/,"");return vt.some(function(Kt){var xt=Kt.trim();if(/^\*(\/\*)?$/.test(Kt))return!0;if(xt.charAt(0)==="."){var Ve=Ct.toLowerCase(),it=xt.toLowerCase(),Tt=[it];return(it===".jpg"||it===".jpeg")&&(Tt=[".jpg",".jpeg"]),Tt.some(function(ot){return Ve.endsWith(ot)})}return/\/\*$/.test(xt)?Pt===xt.replace(/\/.*$/,""):Et===xt?!0:/^\w+$/.test(xt)?((0,D.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(xt,"'.Skip for check.")),!0):!1})}return!0};function F(we,at){var vt="cannot ".concat(we.method," ").concat(we.action," ").concat(at.status,"'"),Ct=new Error(vt);return Ct.status=at.status,Ct.method=we.method,Ct.url=we.action,Ct}function $(we){var at=we.responseText||we.response;if(!at)return at;try{return JSON.parse(at)}catch(vt){return at}}function ue(we){var at=new XMLHttpRequest;we.onProgress&&at.upload&&(at.upload.onprogress=function(Pt){Pt.total>0&&(Pt.percent=Pt.loaded/Pt.total*100),we.onProgress(Pt)});var vt=new FormData;we.data&&Object.keys(we.data).forEach(function(Et){var Pt=we.data[Et];if(Array.isArray(Pt)){Pt.forEach(function(Kt){vt.append("".concat(Et,"[]"),Kt)});return}vt.append(Et,Pt)}),we.file instanceof Blob?vt.append(we.filename,we.file,we.file.name):vt.append(we.filename,we.file),at.onerror=function(Pt){we.onError(Pt)},at.onload=function(){return at.status<200||at.status>=300?we.onError(F(we,at),$(at)):we.onSuccess($(at),at)},at.open(we.method,we.action,!0),we.withCredentials&&"withCredentials"in at&&(at.withCredentials=!0);var Ct=we.headers||{};return Ct["X-Requested-With"]!==null&&at.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Ct).forEach(function(Et){Ct[Et]!==null&&at.setRequestHeader(Et,Ct[Et])}),at.send(vt),{abort:function(){at.abort()}}}var pe=function(){var we=(0,Q.Z)((0,ee.Z)().mark(function at(vt,Ct){var Et,Pt,Kt,xt,Ve,it,Tt,ot;return(0,ee.Z)().wrap(function(Ot){for(;;)switch(Ot.prev=Ot.next){case 0:it=function(){return it=(0,Q.Z)((0,ee.Z)().mark(function Wt(dn){return(0,ee.Z)().wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:return xn.abrupt("return",new Promise(function(vn){dn.file(function(ln){Ct(ln)?(dn.fullPath&&!ln.webkitRelativePath&&(Object.defineProperties(ln,{webkitRelativePath:{writable:!0}}),ln.webkitRelativePath=dn.fullPath.replace(/^\//,""),Object.defineProperties(ln,{webkitRelativePath:{writable:!1}})),vn(ln)):vn(null)})}));case 1:case"end":return xn.stop()}},Wt)})),it.apply(this,arguments)},Ve=function(Wt){return it.apply(this,arguments)},xt=function(){return xt=(0,Q.Z)((0,ee.Z)().mark(function Wt(dn){var un,xn,vn,ln,en;return(0,ee.Z)().wrap(function(En){for(;;)switch(En.prev=En.next){case 0:un=dn.createReader(),xn=[];case 2:return En.next=5,new Promise(function(bn){un.readEntries(bn,function(){return bn([])})});case 5:if(vn=En.sent,ln=vn.length,ln){En.next=9;break}return En.abrupt("break",12);case 9:for(en=0;en<ln;en++)xn.push(vn[en]);En.next=2;break;case 12:return En.abrupt("return",xn);case 13:case"end":return En.stop()}},Wt)})),xt.apply(this,arguments)},Kt=function(Wt){return xt.apply(this,arguments)},Et=[],Pt=[],vt.forEach(function(Vt){return Pt.push(Vt.webkitGetAsEntry())}),Tt=function(){var Vt=(0,Q.Z)((0,ee.Z)().mark(function Wt(dn,un){var xn,vn;return(0,ee.Z)().wrap(function(en){for(;;)switch(en.prev=en.next){case 0:if(dn){en.next=2;break}return en.abrupt("return");case 2:if(dn.path=un||"",!dn.isFile){en.next=10;break}return en.next=6,Ve(dn);case 6:xn=en.sent,xn&&Et.push(xn),en.next=15;break;case 10:if(!dn.isDirectory){en.next=15;break}return en.next=13,Kt(dn);case 13:vn=en.sent,Pt.push.apply(Pt,(0,ce.Z)(vn));case 15:case"end":return en.stop()}},Wt)}));return function(dn,un){return Vt.apply(this,arguments)}}(),ot=0;case 9:if(!(ot<Pt.length)){Ot.next=15;break}return Ot.next=12,Tt(Pt[ot]);case 12:ot++,Ot.next=9;break;case 15:return Ot.abrupt("return",Et);case 16:case"end":return Ot.stop()}},at)}));return function(vt,Ct){return we.apply(this,arguments)}}(),oe=pe,xe=+new Date,ke=0;function De(){return"rc-upload-".concat(xe,"-").concat(++ke)}var Be=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],X=function(we){(0,G.Z)(vt,we);var at=(0,B.Z)(vt);function vt(){var Ct;(0,de.Z)(this,vt);for(var Et=arguments.length,Pt=new Array(Et),Kt=0;Kt<Et;Kt++)Pt[Kt]=arguments[Kt];return Ct=at.call.apply(at,[this].concat(Pt)),(0,E.Z)((0,o.Z)(Ct),"state",{uid:De()}),(0,E.Z)((0,o.Z)(Ct),"reqs",{}),(0,E.Z)((0,o.Z)(Ct),"fileInput",void 0),(0,E.Z)((0,o.Z)(Ct),"_isMounted",void 0),(0,E.Z)((0,o.Z)(Ct),"onChange",function(xt){var Ve=Ct.props,it=Ve.accept,Tt=Ve.directory,ot=xt.target.files,dt=(0,ce.Z)(ot).filter(function(Ot){return!Tt||z(Ot,it)});Ct.uploadFiles(dt),Ct.reset()}),(0,E.Z)((0,o.Z)(Ct),"onClick",function(xt){var Ve=Ct.fileInput;if(Ve){var it=xt.target,Tt=Ct.props.onClick;if(it&&it.tagName==="BUTTON"){var ot=Ve.parentNode;ot.focus(),it.blur()}Ve.click(),Tt&&Tt(xt)}}),(0,E.Z)((0,o.Z)(Ct),"onKeyDown",function(xt){xt.key==="Enter"&&Ct.onClick(xt)}),(0,E.Z)((0,o.Z)(Ct),"onFileDrop",function(){var xt=(0,Q.Z)((0,ee.Z)().mark(function Ve(it){var Tt,ot,dt;return(0,ee.Z)().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(Tt=Ct.props.multiple,it.preventDefault(),it.type!=="dragover"){Vt.next=4;break}return Vt.abrupt("return");case 4:if(!Ct.props.directory){Vt.next=11;break}return Vt.next=7,oe(Array.prototype.slice.call(it.dataTransfer.items),function(Wt){return z(Wt,Ct.props.accept)});case 7:ot=Vt.sent,Ct.uploadFiles(ot),Vt.next=14;break;case 11:dt=(0,ce.Z)(it.dataTransfer.files).filter(function(Wt){return z(Wt,Ct.props.accept)}),Tt===!1&&(dt=dt.slice(0,1)),Ct.uploadFiles(dt);case 14:case"end":return Vt.stop()}},Ve)}));return function(Ve){return xt.apply(this,arguments)}}()),(0,E.Z)((0,o.Z)(Ct),"uploadFiles",function(xt){var Ve=(0,ce.Z)(xt),it=Ve.map(function(Tt){return Tt.uid=De(),Ct.processFile(Tt,Ve)});Promise.all(it).then(function(Tt){var ot=Ct.props.onBatchStart;ot==null||ot(Tt.map(function(dt){var Ot=dt.origin,Vt=dt.parsedFile;return{file:Ot,parsedFile:Vt}})),Tt.filter(function(dt){return dt.parsedFile!==null}).forEach(function(dt){Ct.post(dt)})})}),(0,E.Z)((0,o.Z)(Ct),"processFile",function(){var xt=(0,Q.Z)((0,ee.Z)().mark(function Ve(it,Tt){var ot,dt,Ot,Vt,Wt,dn,un,xn,vn;return(0,ee.Z)().wrap(function(en){for(;;)switch(en.prev=en.next){case 0:if(ot=Ct.props.beforeUpload,dt=it,!ot){en.next=14;break}return en.prev=3,en.next=6,ot(it,Tt);case 6:dt=en.sent,en.next=12;break;case 9:en.prev=9,en.t0=en.catch(3),dt=!1;case 12:if(dt!==!1){en.next=14;break}return en.abrupt("return",{origin:it,parsedFile:null,action:null,data:null});case 14:if(Ot=Ct.props.action,typeof Ot!="function"){en.next=21;break}return en.next=18,Ot(it);case 18:Vt=en.sent,en.next=22;break;case 21:Vt=Ot;case 22:if(Wt=Ct.props.data,typeof Wt!="function"){en.next=29;break}return en.next=26,Wt(it);case 26:dn=en.sent,en.next=30;break;case 29:dn=Wt;case 30:return un=((0,R.Z)(dt)==="object"||typeof dt=="string")&&dt?dt:it,un instanceof File?xn=un:xn=new File([un],it.name,{type:it.type}),vn=xn,vn.uid=it.uid,en.abrupt("return",{origin:it,data:dn,parsedFile:vn,action:Vt});case 35:case"end":return en.stop()}},Ve,null,[[3,9]])}));return function(Ve,it){return xt.apply(this,arguments)}}()),(0,E.Z)((0,o.Z)(Ct),"saveFileInput",function(xt){Ct.fileInput=xt}),Ct}return(0,ae.Z)(vt,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Et){var Pt=this,Kt=Et.data,xt=Et.origin,Ve=Et.action,it=Et.parsedFile;if(this._isMounted){var Tt=this.props,ot=Tt.onStart,dt=Tt.customRequest,Ot=Tt.name,Vt=Tt.headers,Wt=Tt.withCredentials,dn=Tt.method,un=xt.uid,xn=dt||ue,vn={action:Ve,filename:Ot,data:Kt,file:it,headers:Vt,withCredentials:Wt,method:dn||"post",onProgress:function(en){var Tn=Pt.props.onProgress;Tn==null||Tn(en,it)},onSuccess:function(en,Tn){var En=Pt.props.onSuccess;En==null||En(en,it,Tn),delete Pt.reqs[un]},onError:function(en,Tn){var En=Pt.props.onError;En==null||En(en,Tn,it),delete Pt.reqs[un]}};ot(xt),this.reqs[un]=xn(vn)}}},{key:"reset",value:function(){this.setState({uid:De()})}},{key:"abort",value:function(Et){var Pt=this.reqs;if(Et){var Kt=Et.uid?Et.uid:Et;Pt[Kt]&&Pt[Kt].abort&&Pt[Kt].abort(),delete Pt[Kt]}else Object.keys(Pt).forEach(function(xt){Pt[xt]&&Pt[xt].abort&&Pt[xt].abort(),delete Pt[xt]})}},{key:"render",value:function(){var Et=this.props,Pt=Et.component,Kt=Et.prefixCls,xt=Et.className,Ve=Et.classNames,it=Ve===void 0?{}:Ve,Tt=Et.disabled,ot=Et.id,dt=Et.name,Ot=Et.style,Vt=Et.styles,Wt=Vt===void 0?{}:Vt,dn=Et.multiple,un=Et.accept,xn=Et.capture,vn=Et.children,ln=Et.directory,en=Et.openFileDialogOnClick,Tn=Et.onMouseEnter,En=Et.onMouseLeave,bn=Et.hasControlInside,kn=(0,C.Z)(Et,Be),Hn=j()((0,E.Z)((0,E.Z)((0,E.Z)({},Kt,!0),"".concat(Kt,"-disabled"),Tt),xt,xt)),Nn=ln?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},jn=Tt?{}:{onClick:en?this.onClick:function(){},onKeyDown:en?this.onKeyDown:function(){},onMouseEnter:Tn,onMouseLeave:En,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:bn?void 0:"0"};return m.createElement(Pt,(0,g.Z)({},jn,{className:Hn,role:bn?void 0:"button",style:Ot}),m.createElement("input",(0,g.Z)({},(0,W.Z)(kn,{aria:!0,data:!0}),{id:ot,name:dt,disabled:Tt,type:"file",ref:this.saveFileInput,onClick:function(nr){return nr.stopPropagation()},key:this.state.uid,style:(0,S.Z)({display:"none"},Wt.input),className:it.input,accept:un},Nn,{multiple:dn,onChange:this.onChange},xn!=null?{capture:xn}:{})),vn)}}]),vt}(m.Component),N=X;function k(){}var q=function(we){(0,G.Z)(vt,we);var at=(0,B.Z)(vt);function vt(){var Ct;(0,de.Z)(this,vt);for(var Et=arguments.length,Pt=new Array(Et),Kt=0;Kt<Et;Kt++)Pt[Kt]=arguments[Kt];return Ct=at.call.apply(at,[this].concat(Pt)),(0,E.Z)((0,o.Z)(Ct),"uploader",void 0),(0,E.Z)((0,o.Z)(Ct),"saveUploader",function(xt){Ct.uploader=xt}),Ct}return(0,ae.Z)(vt,[{key:"abort",value:function(Et){this.uploader.abort(Et)}},{key:"render",value:function(){return m.createElement(N,(0,g.Z)({},this.props,{ref:this.saveUploader}))}}]),vt}(m.Component);(0,E.Z)(q,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:k,onError:k,onSuccess:k,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var te=q,Z=te,x=_(18929),w=_(48755),V=_(2171),fe=_(9017),$e=_(85981),Qe=_(63356),ye=_(34961),He=_(16931),Ye=_(51636),tt=_(36237),Bt=we=>{const{componentCls:at,iconCls:vt}=we;return{[`${at}-wrapper`]:{[`${at}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:we.colorFillAlter,border:`${(0,tt.unit)(we.lineWidth)} dashed ${we.colorBorder}`,borderRadius:we.borderRadiusLG,cursor:"pointer",transition:`border-color ${we.motionDurationSlow}`,[at]:{padding:we.padding},[`${at}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:we.borderRadiusLG,"&:focus-visible":{outline:`${(0,tt.unit)(we.lineWidthFocus)} solid ${we.colorPrimaryBorder}`}},[`${at}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
|
|
|
&:not(${at}-disabled):hover,
|
|
|
&-hover:not(${at}-disabled)
|
|
|
`]:{borderColor:we.colorPrimaryHover},[`p${at}-drag-icon`]:{marginBottom:we.margin,[vt]:{color:we.colorPrimary,fontSize:we.uploadThumbnailSize}},[`p${at}-text`]:{margin:`0 0 ${(0,tt.unit)(we.marginXXS)}`,color:we.colorTextHeading,fontSize:we.fontSizeLG},[`p${at}-hint`]:{color:we.colorTextDescription,fontSize:we.fontSize},[`&${at}-disabled`]:{[`p${at}-drag-icon ${vt},
|
|
|
p${at}-text,
|
|
|
p${at}-hint
|
|
|
`]:{color:we.colorTextDisabled}}}}}},jt=we=>{const{componentCls:at,iconCls:vt,fontSize:Ct,lineHeight:Et,calc:Pt}=we,Kt=`${at}-list-item`,xt=`${Kt}-actions`,Ve=`${Kt}-action`;return{[`${at}-wrapper`]:{[`${at}-list`]:Object.assign(Object.assign({},(0,Qe.dF)()),{lineHeight:we.lineHeight,[Kt]:{position:"relative",height:Pt(we.lineHeight).mul(Ct).equal(),marginTop:we.marginXS,fontSize:Ct,display:"flex",alignItems:"center",transition:`background-color ${we.motionDurationSlow}`,borderRadius:we.borderRadiusSM,"&:hover":{backgroundColor:we.controlItemBgHover},[`${Kt}-name`]:Object.assign(Object.assign({},Qe.vS),{padding:`0 ${(0,tt.unit)(we.paddingXS)}`,lineHeight:Et,flex:"auto",transition:`all ${we.motionDurationSlow}`}),[xt]:{whiteSpace:"nowrap",[Ve]:{opacity:0},[vt]:{color:we.actionsColor,transition:`all ${we.motionDurationSlow}`},[`
|
|
|
${Ve}:focus-visible,
|
|
|
&.picture ${Ve}
|
|
|
`]:{opacity:1}},[`${at}-icon ${vt}`]:{color:we.colorTextDescription,fontSize:Ct},[`${Kt}-progress`]:{position:"absolute",bottom:we.calc(we.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:Pt(Ct).add(we.paddingXS).equal(),fontSize:Ct,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${Kt}:hover ${Ve}`]:{opacity:1},[`${Kt}-error`]:{color:we.colorError,[`${Kt}-name, ${at}-icon ${vt}`]:{color:we.colorError},[xt]:{[`${vt}, ${vt}:hover`]:{color:we.colorError},[Ve]:{opacity:1}}},[`${at}-list-item-container`]:{transition:`opacity ${we.motionDurationSlow}, height ${we.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ue=_(99495),Le=we=>{const{componentCls:at}=we,vt=new tt.Keyframes("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:we.calc(we.marginXS).div(-2).equal()}}),Ct=new tt.Keyframes("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:we.calc(we.marginXS).div(-2).equal()}}),Et=`${at}-animate-inline`;return[{[`${at}-wrapper`]:{[`${Et}-appear, ${Et}-enter, ${Et}-leave`]:{animationDuration:we.motionDurationSlow,animationTimingFunction:we.motionEaseInOutCirc,animationFillMode:"forwards"},[`${Et}-appear, ${Et}-enter`]:{animationName:vt},[`${Et}-leave`]:{animationName:Ct}}},{[`${at}-wrapper`]:(0,Ue.J$)(we)},vt,Ct]},Ce=_(68361);const he=we=>{const{componentCls:at,iconCls:vt,uploadThumbnailSize:Ct,uploadProgressOffset:Et,calc:Pt}=we,Kt=`${at}-list`,xt=`${Kt}-item`;return{[`${at}-wrapper`]:{[`
|
|
|
${Kt}${Kt}-picture,
|
|
|
${Kt}${Kt}-picture-card,
|
|
|
${Kt}${Kt}-picture-circle
|
|
|
`]:{[xt]:{position:"relative",height:Pt(Ct).add(Pt(we.lineWidth).mul(2)).add(Pt(we.paddingXS).mul(2)).equal(),padding:we.paddingXS,border:`${(0,tt.unit)(we.lineWidth)} ${we.lineType} ${we.colorBorder}`,borderRadius:we.borderRadiusLG,"&:hover":{background:"transparent"},[`${xt}-thumbnail`]:Object.assign(Object.assign({},Qe.vS),{width:Ct,height:Ct,lineHeight:(0,tt.unit)(Pt(Ct).add(we.paddingSM).equal()),textAlign:"center",flex:"none",[vt]:{fontSize:we.fontSizeHeading2,color:we.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${xt}-progress`]:{bottom:Et,width:`calc(100% - ${(0,tt.unit)(Pt(we.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:Pt(Ct).add(we.paddingXS).equal()}},[`${xt}-error`]:{borderColor:we.colorError,[`${xt}-thumbnail ${vt}`]:{[`svg path[fill='${Ce.blue[0]}']`]:{fill:we.colorErrorBg},[`svg path[fill='${Ce.blue.primary}']`]:{fill:we.colorError}}},[`${xt}-uploading`]:{borderStyle:"dashed",[`${xt}-name`]:{marginBottom:Et}}},[`${Kt}${Kt}-picture-circle ${xt}`]:{[`&, &::before, ${xt}-thumbnail`]:{borderRadius:"50%"}}}}},We=we=>{const{componentCls:at,iconCls:vt,fontSizeLG:Ct,colorTextLightSolid:Et,calc:Pt}=we,Kt=`${at}-list`,xt=`${Kt}-item`,Ve=we.uploadPicCardSize;return{[`
|
|
|
${at}-wrapper${at}-picture-card-wrapper,
|
|
|
${at}-wrapper${at}-picture-circle-wrapper
|
|
|
`]:Object.assign(Object.assign({},(0,Qe.dF)()),{display:"block",[`${at}${at}-select`]:{width:Ve,height:Ve,textAlign:"center",verticalAlign:"top",backgroundColor:we.colorFillAlter,border:`${(0,tt.unit)(we.lineWidth)} dashed ${we.colorBorder}`,borderRadius:we.borderRadiusLG,cursor:"pointer",transition:`border-color ${we.motionDurationSlow}`,[`> ${at}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${at}-disabled):hover`]:{borderColor:we.colorPrimary}},[`${Kt}${Kt}-picture-card, ${Kt}${Kt}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:we.marginXS,marginInlineEnd:we.marginXS}},"@supports (gap: 1px)":{gap:we.marginXS},[`${Kt}-item-container`]:{display:"inline-block",width:Ve,height:Ve,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[xt]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${(0,tt.unit)(Pt(we.paddingXS).mul(2).equal())})`,height:`calc(100% - ${(0,tt.unit)(Pt(we.paddingXS).mul(2).equal())})`,backgroundColor:we.colorBgMask,opacity:0,transition:`all ${we.motionDurationSlow}`,content:'" "'}},[`${xt}:hover`]:{[`&::before, ${xt}-actions`]:{opacity:1}},[`${xt}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${we.motionDurationSlow}`,[`
|
|
|
${vt}-eye,
|
|
|
${vt}-download,
|
|
|
${vt}-delete
|
|
|
`]:{zIndex:10,width:Ct,margin:`0 ${(0,tt.unit)(we.marginXXS)}`,fontSize:Ct,cursor:"pointer",transition:`all ${we.motionDurationSlow}`,color:Et,"&:hover":{color:Et},svg:{verticalAlign:"baseline"}}},[`${xt}-thumbnail, ${xt}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${xt}-name`]:{display:"none",textAlign:"center"},[`${xt}-file + ${xt}-name`]:{position:"absolute",bottom:we.margin,display:"block",width:`calc(100% - ${(0,tt.unit)(Pt(we.paddingXS).mul(2).equal())})`},[`${xt}-uploading`]:{[`&${xt}`]:{backgroundColor:we.colorFillAlter},[`&::before, ${vt}-eye, ${vt}-download, ${vt}-delete`]:{display:"none"}},[`${xt}-progress`]:{bottom:we.marginXL,width:`calc(100% - ${(0,tt.unit)(Pt(we.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${at}-wrapper${at}-picture-circle-wrapper`]:{[`${at}${at}-select`]:{borderRadius:"50%"}}}};var Ie=we=>{const{componentCls:at}=we;return{[`${at}-rtl`]:{direction:"rtl"}}};const M=we=>{const{componentCls:at,colorTextDisabled:vt}=we;return{[`${at}-wrapper`]:Object.assign(Object.assign({},(0,Qe.Wf)(we)),{[at]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${at}-select`]:{display:"inline-block"},[`${at}-hidden`]:{display:"none"},[`${at}-disabled`]:{color:vt,cursor:"not-allowed"}})}},me=we=>({actionsColor:we.colorTextDescription});var Ee=(0,He.I$)("Upload",we=>{const{fontSizeHeading3:at,fontHeight:vt,lineWidth:Ct,controlHeightLG:Et,calc:Pt}=we,Kt=(0,Ye.mergeToken)(we,{uploadThumbnailSize:Pt(at).mul(2).equal(),uploadProgressOffset:Pt(Pt(vt).div(2)).add(Ct).equal(),uploadPicCardSize:Pt(Et).mul(2.55).equal()});return[M(Kt),Bt(Kt),he(Kt),We(Kt),jt(Kt),Le(Kt),Ie(Kt),(0,ye.Z)(Kt)]},me),Ke={icon:function(at,vt){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:vt}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:at}}]}},name:"file",theme:"twotone"},et=Ke,ut=_(7657),St=function(at,vt){return m.createElement(ut.Z,(0,g.Z)({},at,{ref:vt,icon:et}))},Dt=m.forwardRef(St),mt=Dt,kt=_(58617),Ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},zt=Ht,Ut=function(at,vt){return m.createElement(ut.Z,(0,g.Z)({},at,{ref:vt,icon:zt}))},st=m.forwardRef(Ut),Rt=st,Lt={icon:function(at,vt){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:at}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:vt}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:vt}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:vt}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:at}}]}},name:"picture",theme:"twotone"},_e=Lt,Ze=function(at,vt){return m.createElement(ut.Z,(0,g.Z)({},at,{ref:vt,icon:_e}))},b=m.forwardRef(Ze),A=b,Oe=_(77900),U=_(2738),le=_(40192),wt=_(86641),Se=_(22703),je=_(7939);function Ge(we){return Object.assign(Object.assign({},we),{lastModified:we.lastModified,lastModifiedDate:we.lastModifiedDate,name:we.name,size:we.size,type:we.type,uid:we.uid,percent:0,originFileObj:we})}function Y(we,at){const vt=(0,ce.Z)(at),Ct=vt.findIndex(Et=>{let{uid:Pt}=Et;return Pt===we.uid});return Ct===-1?vt.push(we):vt[Ct]=we,vt}function ne(we,at){const vt=we.uid!==void 0?"uid":"name";return at.filter(Ct=>Ct[vt]===we[vt])[0]}function be(we,at){const vt=we.uid!==void 0?"uid":"name",Ct=at.filter(Et=>Et[vt]!==we[vt]);return Ct.length===at.length?null:Ct}const Pe=function(){const at=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),Ct=at[at.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(Ct)||[""])[0]},P=we=>we.indexOf("image/")===0,Je=we=>{if(we.type&&!we.thumbUrl)return P(we.type);const at=we.thumbUrl||we.url||"",vt=Pe(at);return/^data:image\//.test(at)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(vt)?!0:!(/^data:/.test(at)||vt)},J=200;function rt(we){return new Promise(at=>{if(!we.type||!P(we.type)){at("");return}const vt=document.createElement("canvas");vt.width=J,vt.height=J,vt.style.cssText=`position: fixed; left: 0; top: 0; width: ${J}px; height: ${J}px; z-index: 9999; display: none;`,document.body.appendChild(vt);const Ct=vt.getContext("2d"),Et=new Image;if(Et.onload=()=>{const{width:Pt,height:Kt}=Et;let xt=J,Ve=J,it=0,Tt=0;Pt>Kt?(Ve=Kt*(J/Pt),Tt=-(Ve-xt)/2):(xt=Pt*(J/Kt),it=-(xt-Ve)/2),Ct.drawImage(Et,it,Tt,xt,Ve);const ot=vt.toDataURL();document.body.removeChild(vt),window.URL.revokeObjectURL(Et.src),at(ot)},Et.crossOrigin="anonymous",we.type.startsWith("image/svg+xml")){const Pt=new FileReader;Pt.onload=()=>{Pt.result&&typeof Pt.result=="string"&&(Et.src=Pt.result)},Pt.readAsDataURL(we)}else if(we.type.startsWith("image/gif")){const Pt=new FileReader;Pt.onload=()=>{Pt.result&&at(Pt.result)},Pt.readAsDataURL(we)}else Et.src=window.URL.createObjectURL(we)})}var Gt=_(26227),Xt=_(41464),Jt=_(15277),an=_(89787),rn=_(25399),On=m.forwardRef((we,at)=>{let{prefixCls:vt,className:Ct,style:Et,locale:Pt,listType:Kt,file:xt,items:Ve,progress:it,iconRender:Tt,actionIconRender:ot,itemRender:dt,isImgUrl:Ot,showPreviewIcon:Vt,showRemoveIcon:Wt,showDownloadIcon:dn,previewIcon:un,removeIcon:xn,downloadIcon:vn,extra:ln,onPreview:en,onDownload:Tn,onClose:En}=we;var bn,kn;const{status:Hn}=xt,[Nn,jn]=m.useState(Hn);m.useEffect(()=>{Hn!=="removed"&&jn(Hn)},[Hn]);const[Wn,nr]=m.useState(!1);m.useEffect(()=>{const Gn=setTimeout(()=>{nr(!0)},300);return()=>{clearTimeout(Gn)}},[]);const $n=Tt(xt);let fr=m.createElement("div",{className:`${vt}-icon`},$n);if(Kt==="picture"||Kt==="picture-card"||Kt==="picture-circle")if(Nn==="uploading"||!xt.thumbUrl&&!xt.url){const Gn=j()(`${vt}-list-item-thumbnail`,{[`${vt}-list-item-file`]:Nn!=="uploading"});fr=m.createElement("div",{className:Gn},$n)}else{const Gn=Ot!=null&&Ot(xt)?m.createElement("img",{src:xt.thumbUrl||xt.url,alt:xt.name,className:`${vt}-list-item-image`,crossOrigin:xt.crossOrigin}):$n,qn=j()(`${vt}-list-item-thumbnail`,{[`${vt}-list-item-file`]:Ot&&!Ot(xt)});fr=m.createElement("a",{className:qn,onClick:wr=>en(xt,wr),href:xt.url||xt.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Gn)}const gt=j()(`${vt}-list-item`,`${vt}-list-item-${Nn}`),Mn=typeof xt.linkProps=="string"?JSON.parse(xt.linkProps):xt.linkProps,ir=(typeof Wt=="function"?Wt(xt):Wt)?ot((typeof xn=="function"?xn(xt):xn)||m.createElement(Gt.Z,null),()=>En(xt),vt,Pt.removeFile,!0):null,xr=(typeof dn=="function"?dn(xt):dn)&&Nn==="done"?ot((typeof vn=="function"?vn(xt):vn)||m.createElement(Xt.Z,null),()=>Tn(xt),vt,Pt.downloadFile):null,_r=Kt!=="picture-card"&&Kt!=="picture-circle"&&m.createElement("span",{key:"download-delete",className:j()(`${vt}-list-item-actions`,{picture:Kt==="picture"})},xr,ir),br=typeof ln=="function"?ln(xt):ln,Rn=br&&m.createElement("span",{className:`${vt}-list-item-extra`},br),gn=j()(`${vt}-list-item-name`),Fn=xt.url?m.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:gn,title:xt.name},Mn,{href:xt.url,onClick:Gn=>en(xt,Gn)}),xt.name,Rn):m.createElement("span",{key:"view",className:gn,onClick:Gn=>en(xt,Gn),title:xt.name},xt.name,Rn),sr=(typeof Vt=="function"?Vt(xt):Vt)&&(xt.url||xt.thumbUrl)?m.createElement("a",{href:xt.url||xt.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Gn=>en(xt,Gn),title:Pt.previewFile},typeof un=="function"?un(xt):un||m.createElement(Jt.Z,null)):null,Kn=(Kt==="picture-card"||Kt==="picture-circle")&&Nn!=="uploading"&&m.createElement("span",{className:`${vt}-list-item-actions`},sr,Nn==="done"&&xr,ir),{getPrefixCls:er}=m.useContext(w.E_),Pr=er(),Dr=m.createElement("div",{className:gt},fr,Fn,_r,Kn,Wn&&m.createElement(Oe.default,{motionName:`${Pr}-fade`,visible:Nn==="uploading",motionDeadline:2e3},Gn=>{let{className:qn}=Gn;const wr="percent"in xt?m.createElement(an.Z,Object.assign({},it,{type:"line",percent:xt.percent,"aria-label":xt["aria-label"],"aria-labelledby":xt["aria-labelledby"]})):null;return m.createElement("div",{className:j()(`${vt}-list-item-progress`,qn)},wr)})),Er=xt.response&&typeof xt.response=="string"?xt.response:((bn=xt.error)===null||bn===void 0?void 0:bn.statusText)||((kn=xt.error)===null||kn===void 0?void 0:kn.message)||Pt.uploadError,_n=Nn==="error"?m.createElement(rn.Z,{title:Er,getPopupContainer:Gn=>Gn.parentNode},Dr):Dr;return m.createElement("div",{className:j()(`${vt}-list-item-container`,Ct),style:Et,ref:at},dt?dt(_n,xt,Ve,{download:Tn.bind(null,xt),preview:en.bind(null,xt),remove:En.bind(null,xt)}):_n)});const pn=(we,at)=>{const{listType:vt="text",previewFile:Ct=rt,onPreview:Et,onDownload:Pt,onRemove:Kt,locale:xt,iconRender:Ve,isImageUrl:it=Je,prefixCls:Tt,items:ot=[],showPreviewIcon:dt=!0,showRemoveIcon:Ot=!0,showDownloadIcon:Vt=!1,removeIcon:Wt,previewIcon:dn,downloadIcon:un,extra:xn,progress:vn={size:[-1,2],showInfo:!1},appendAction:ln,appendActionVisible:en=!0,itemRender:Tn,disabled:En}=we,bn=(0,le.Z)(),[kn,Hn]=m.useState(!1),Nn=["picture-card","picture-circle"].includes(vt);m.useEffect(()=>{vt.startsWith("picture")&&(ot||[]).forEach(Rn=>{!(Rn.originFileObj instanceof File||Rn.originFileObj instanceof Blob)||Rn.thumbUrl!==void 0||(Rn.thumbUrl="",Ct==null||Ct(Rn.originFileObj).then(gn=>{Rn.thumbUrl=gn||"",bn()}))})},[vt,ot,Ct]),m.useEffect(()=>{Hn(!0)},[]);const jn=(Rn,gn)=>{if(Et)return gn==null||gn.preventDefault(),Et(Rn)},Wn=Rn=>{typeof Pt=="function"?Pt(Rn):Rn.url&&window.open(Rn.url)},nr=Rn=>{Kt==null||Kt(Rn)},$n=Rn=>{if(Ve)return Ve(Rn,vt);const gn=Rn.status==="uploading";if(vt.startsWith("picture")){const Fn=vt==="picture"?m.createElement(kt.Z,null):xt.uploading,sr=it!=null&&it(Rn)?m.createElement(A,null):m.createElement(mt,null);return gn?Fn:sr}return gn?m.createElement(kt.Z,null):m.createElement(Rt,null)},fr=(Rn,gn,Fn,sr,Kn)=>{const er={type:"text",size:"small",title:sr,onClick:Pr=>{var Dr,Er;gn(),m.isValidElement(Rn)&&((Er=(Dr=Rn.props).onClick)===null||Er===void 0||Er.call(Dr,Pr))},className:`${Fn}-list-item-action`};return Kn&&(er.disabled=En),m.isValidElement(Rn)?m.createElement(je.ZP,Object.assign({},er,{icon:(0,Se.Tm)(Rn,Object.assign(Object.assign({},Rn.props),{onClick:()=>{}}))})):m.createElement(je.ZP,Object.assign({},er),m.createElement("span",null,Rn))};m.useImperativeHandle(at,()=>({handlePreview:jn,handleDownload:Wn}));const{getPrefixCls:gt}=m.useContext(w.E_),Mn=gt("upload",Tt),ir=gt(),xr=j()(`${Mn}-list`,`${Mn}-list-${vt}`),_r=m.useMemo(()=>(0,U.Z)((0,wt.Z)(ir),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[ir]),br=Object.assign(Object.assign({},Nn?{}:_r),{motionDeadline:2e3,motionName:`${Mn}-${Nn?"animate-inline":"animate"}`,keys:(0,ce.Z)(ot.map(Rn=>({key:Rn.uid,file:Rn}))),motionAppear:kn});return m.createElement("div",{className:xr},m.createElement(Oe.CSSMotionList,Object.assign({},br,{component:!1}),Rn=>{let{key:gn,file:Fn,className:sr,style:Kn}=Rn;return m.createElement(On,{key:gn,locale:xt,prefixCls:Mn,className:sr,style:Kn,file:Fn,items:ot,progress:vn,listType:vt,isImgUrl:it,showPreviewIcon:dt,showRemoveIcon:Ot,showDownloadIcon:Vt,removeIcon:Wt,previewIcon:dn,downloadIcon:un,extra:xn,iconRender:$n,actionIconRender:fr,itemRender:Tn,onPreview:jn,onDownload:Wn,onClose:nr})}),ln&&m.createElement(Oe.default,Object.assign({},br,{visible:en,forceRender:!0}),Rn=>{let{className:gn,style:Fn}=Rn;return(0,Se.Tm)(ln,sr=>({className:j()(sr.className,gn),style:Object.assign(Object.assign(Object.assign({},Fn),{pointerEvents:gn?"none":void 0}),sr.style)}))}))};var tn=m.forwardRef(pn),$t=function(we,at,vt,Ct){function Et(Pt){return Pt instanceof vt?Pt:new vt(function(Kt){Kt(Pt)})}return new(vt||(vt=Promise))(function(Pt,Kt){function xt(Tt){try{it(Ct.next(Tt))}catch(ot){Kt(ot)}}function Ve(Tt){try{it(Ct.throw(Tt))}catch(ot){Kt(ot)}}function it(Tt){Tt.done?Pt(Tt.value):Et(Tt.value).then(xt,Ve)}it((Ct=Ct.apply(we,at||[])).next())})};const Nt=`__LIST_IGNORE_${Date.now()}__`,on=(we,at)=>{const{fileList:vt,defaultFileList:Ct,onRemove:Et,showUploadList:Pt=!0,listType:Kt="text",onPreview:xt,onDownload:Ve,onChange:it,onDrop:Tt,previewFile:ot,disabled:dt,locale:Ot,iconRender:Vt,isImageUrl:Wt,progress:dn,prefixCls:un,className:xn,type:vn="select",children:ln,style:en,itemRender:Tn,maxCount:En,data:bn={},multiple:kn=!1,hasControlInside:Hn=!0,action:Nn="",accept:jn="",supportServerRender:Wn=!0,rootClassName:nr}=we,$n=m.useContext(V.Z),fr=dt!=null?dt:$n,[gt,Mn]=(0,x.Z)(Ct||[],{value:vt,postState:Xn=>Xn!=null?Xn:[]}),[ir,xr]=m.useState("drop"),_r=m.useRef(null),br=m.useRef(null);m.useMemo(()=>{const Xn=Date.now();(vt||[]).forEach((vr,Cr)=>{!vr.uid&&!Object.isFrozen(vr)&&(vr.uid=`__AUTO__${Xn}_${Cr}__`)})},[vt]);const Rn=(Xn,vr,Cr)=>{let ur=(0,ce.Z)(vr),pr=!1;En===1?ur=ur.slice(-1):En&&(pr=ur.length>En,ur=ur.slice(0,En)),(0,se.flushSync)(()=>{Mn(ur)});const Bn={file:Xn,fileList:ur};Cr&&(Bn.event=Cr),(!pr||Xn.status==="removed"||ur.some(Fr=>Fr.uid===Xn.uid))&&(0,se.flushSync)(()=>{it==null||it(Bn)})},gn=(Xn,vr)=>$t(void 0,void 0,void 0,function*(){const{beforeUpload:Cr,transformFile:ur}=we;let pr=Xn;if(Cr){const Bn=yield Cr(Xn,vr);if(Bn===!1)return!1;if(delete Xn[Nt],Bn===Nt)return Object.defineProperty(Xn,Nt,{value:!0,configurable:!0}),!1;typeof Bn=="object"&&Bn&&(pr=Bn)}return ur&&(pr=yield ur(pr)),pr}),Fn=Xn=>{const vr=Xn.filter(pr=>!pr.file[Nt]);if(!vr.length)return;const Cr=vr.map(pr=>Ge(pr.file));let ur=(0,ce.Z)(gt);Cr.forEach(pr=>{ur=Y(pr,ur)}),Cr.forEach((pr,Bn)=>{let Fr=pr;if(vr[Bn].parsedFile)pr.status="uploading";else{const{originFileObj:Jr}=pr;let ni;try{ni=new File([Jr],Jr.name,{type:Jr.type})}catch(Xr){ni=new Blob([Jr],{type:Jr.type}),ni.name=Jr.name,ni.lastModifiedDate=new Date,ni.lastModified=new Date().getTime()}ni.uid=pr.uid,Fr=ni}Rn(Fr,ur)})},sr=(Xn,vr,Cr)=>{try{typeof Xn=="string"&&(Xn=JSON.parse(Xn))}catch(Bn){}if(!ne(vr,gt))return;const ur=Ge(vr);ur.status="done",ur.percent=100,ur.response=Xn,ur.xhr=Cr;const pr=Y(ur,gt);Rn(ur,pr)},Kn=(Xn,vr)=>{if(!ne(vr,gt))return;const Cr=Ge(vr);Cr.status="uploading",Cr.percent=Xn.percent;const ur=Y(Cr,gt);Rn(Cr,ur,Xn)},er=(Xn,vr,Cr)=>{if(!ne(Cr,gt))return;const ur=Ge(Cr);ur.error=Xn,ur.response=vr,ur.status="error";const pr=Y(ur,gt);Rn(ur,pr)},Pr=Xn=>{let vr;Promise.resolve(typeof Et=="function"?Et(Xn):Et).then(Cr=>{var ur;if(Cr===!1)return;const pr=be(Xn,gt);pr&&(vr=Object.assign(Object.assign({},Xn),{status:"removed"}),gt==null||gt.forEach(Bn=>{const Fr=vr.uid!==void 0?"uid":"name";Bn[Fr]===vr[Fr]&&!Object.isFrozen(Bn)&&(Bn.status="removed")}),(ur=_r.current)===null||ur===void 0||ur.abort(vr),Rn(vr,pr))})},Dr=Xn=>{xr(Xn.type),Xn.type==="drop"&&(Tt==null||Tt(Xn))};m.useImperativeHandle(at,()=>({onBatchStart:Fn,onSuccess:sr,onProgress:Kn,onError:er,fileList:gt,upload:_r.current,nativeElement:br.current}));const{getPrefixCls:Er,direction:_n,upload:Gn}=m.useContext(w.E_),qn=Er("upload",un),wr=Object.assign(Object.assign({onBatchStart:Fn,onError:er,onProgress:Kn,onSuccess:sr},we),{data:bn,multiple:kn,action:Nn,accept:jn,supportServerRender:Wn,prefixCls:qn,disabled:fr,beforeUpload:gn,onChange:void 0,hasControlInside:Hn});delete wr.className,delete wr.style,(!ln||fr)&&delete wr.id;const qr=`${qn}-wrapper`,[Yr,kr,Zr]=Ee(qn,qr),[Sr]=(0,fe.Z)("Upload",$e.Z.Upload),{showRemoveIcon:ei,showPreviewIcon:$r,showDownloadIcon:jr,removeIcon:ai,previewIcon:oi,downloadIcon:cr,extra:ci}=typeof Pt=="boolean"?{}:Pt,di=typeof ei=="undefined"?!fr:ei,ti=(Xn,vr)=>Pt?m.createElement(tn,{prefixCls:qn,listType:Kt,items:gt,previewFile:ot,onPreview:xt,onDownload:Ve,onRemove:Pr,showRemoveIcon:di,showPreviewIcon:$r,showDownloadIcon:jr,removeIcon:ai,previewIcon:oi,downloadIcon:cr,iconRender:Vt,extra:ci,locale:Object.assign(Object.assign({},Sr),Ot),isImageUrl:Wt,progress:dn,appendAction:Xn,appendActionVisible:vr,itemRender:Tn,disabled:fr}):Xn,Hr=j()(qr,xn,nr,kr,Zr,Gn==null?void 0:Gn.className,{[`${qn}-rtl`]:_n==="rtl",[`${qn}-picture-card-wrapper`]:Kt==="picture-card",[`${qn}-picture-circle-wrapper`]:Kt==="picture-circle"}),rr=Object.assign(Object.assign({},Gn==null?void 0:Gn.style),en);if(vn==="drag"){const Xn=j()(kr,qn,`${qn}-drag`,{[`${qn}-drag-uploading`]:gt.some(vr=>vr.status==="uploading"),[`${qn}-drag-hover`]:ir==="dragover",[`${qn}-disabled`]:fr,[`${qn}-rtl`]:_n==="rtl"});return Yr(m.createElement("span",{className:Hr,ref:br},m.createElement("div",{className:Xn,style:rr,onDrop:Dr,onDragOver:Dr,onDragLeave:Dr},m.createElement(Z,Object.assign({},wr,{ref:_r,className:`${qn}-btn`}),m.createElement("div",{className:`${qn}-drag-container`},ln))),ti()))}const Ei=j()(qn,`${qn}-select`,{[`${qn}-disabled`]:fr,[`${qn}-hidden`]:!ln}),mn=m.createElement("div",{className:Ei},m.createElement(Z,Object.assign({},wr,{ref:_r})));return Yr(Kt==="picture-card"||Kt==="picture-circle"?m.createElement("span",{className:Hr,ref:br},ti(mn,!!ln)):m.createElement("span",{className:Hr,ref:br},mn,ti()))};var An=m.forwardRef(on),or=function(we,at){var vt={};for(var Ct in we)Object.prototype.hasOwnProperty.call(we,Ct)&&at.indexOf(Ct)<0&&(vt[Ct]=we[Ct]);if(we!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Ct=Object.getOwnPropertySymbols(we);Et<Ct.length;Et++)at.indexOf(Ct[Et])<0&&Object.prototype.propertyIsEnumerable.call(we,Ct[Et])&&(vt[Ct[Et]]=we[Ct[Et]]);return vt},pt=m.forwardRef((we,at)=>{var{style:vt,height:Ct,hasControlInside:Et=!1}=we,Pt=or(we,["style","height","hasControlInside"]);return m.createElement(An,Object.assign({ref:at,hasControlInside:Et},Pt,{type:"drag",style:Object.assign(Object.assign({},vt),{height:Ct})}))});const It=An;It.Dragger=pt,It.LIST_IGNORE=Nt;var ht=It},64018:function(){var fn,ct,_,m=!1,ce,se;window.PR_SHOULD_USE_CONTINUATION=!0;var ve,j;(function(){var g=window,de=["break,continue,do,else,for,if,return,while"],ae=[de,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[ae,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],G=[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"],B=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],E=[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"],R="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",ee=[de,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],Q=[de,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[de,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],D=[G,E,B,C,R,ee,Q,W],z=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,F="str",$="kwd",ue="com",pe="typ",oe="lit",xe="pun",ke="pln",De="tag",Be="dec",X="src",N="atn",k="atv",q="nocode",te="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function Z(Ce){for(var he=0,We=!1,Re=!1,Ie=0,M=Ce.length;Ie<M;++Ie){var me=Ce[Ie];if(me.ignoreCase)Re=!0;else if(/[a-z]/i.test(me.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){We=!0,Re=!1;break}}var Ee={b:8,t:9,n:10,v:11,f:12,r:13};function Ke(mt){var kt=mt.charCodeAt(0);if(kt!==92)return kt;var Ht=mt.charAt(1);return kt=Ee[Ht],kt||("0"<=Ht&&Ht<="7"?parseInt(mt.substring(1),8):Ht==="u"||Ht==="x"?parseInt(mt.substring(2),16):mt.charCodeAt(1))}function et(mt){if(mt<32)return(mt<16?"\\x0":"\\x")+mt.toString(16);var kt=String.fromCharCode(mt);return kt==="\\"||kt==="-"||kt==="]"||kt==="^"?"\\"+kt:kt}function ut(mt){var kt=mt.substring(1,mt.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Ht=[],zt=kt[0]==="^",Ut=["["];zt&&Ut.push("^");for(var st=zt?1:0,Rt=kt.length;st<Rt;++st){var Lt=kt[st];if(/\\[bdsw]/i.test(Lt))Ut.push(Lt);else{var _e=Ke(Lt),Ze;st+2<Rt&&kt[st+1]==="-"?(Ze=Ke(kt[st+2]),st+=2):Ze=_e,Ht.push([_e,Ze]),Ze<65||_e>122||(Ze<65||_e>90||Ht.push([Math.max(65,_e)|32,Math.min(Ze,90)|32]),Ze<97||_e>122||Ht.push([Math.max(97,_e)&-33,Math.min(Ze,122)&-33]))}}Ht.sort(function(U,le){return U[0]-le[0]||le[1]-U[1]});for(var b=[],A=[],st=0;st<Ht.length;++st){var Oe=Ht[st];Oe[0]<=A[1]+1?A[1]=Math.max(A[1],Oe[1]):b.push(A=Oe)}for(var st=0;st<b.length;++st){var Oe=b[st];Ut.push(et(Oe[0])),Oe[1]>Oe[0]&&(Oe[1]+1>Oe[0]&&Ut.push("-"),Ut.push(et(Oe[1])))}return Ut.push("]"),Ut.join("")}function St(mt){for(var kt=mt.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ht=kt.length,zt=[],Ut=0,st=0;Ut<Ht;++Ut){var Rt=kt[Ut];if(Rt==="(")++st;else if(Rt.charAt(0)==="\\"){var Lt=+Rt.substring(1);Lt&&(Lt<=st?zt[Lt]=-1:kt[Ut]=et(Lt))}}for(var Ut=1;Ut<zt.length;++Ut)zt[Ut]===-1&&(zt[Ut]=++he);for(var Ut=0,st=0;Ut<Ht;++Ut){var Rt=kt[Ut];if(Rt==="(")++st,zt[st]||(kt[Ut]="(?:");else if(Rt.charAt(0)==="\\"){var Lt=+Rt.substring(1);Lt&&Lt<=st&&(kt[Ut]="\\"+zt[Lt])}}for(var Ut=0;Ut<Ht;++Ut)kt[Ut]==="^"&&kt[Ut+1]!=="^"&&(kt[Ut]="");if(mt.ignoreCase&&We)for(var Ut=0;Ut<Ht;++Ut){var Rt=kt[Ut],_e=Rt.charAt(0);Rt.length>=2&&_e==="["?kt[Ut]=ut(Rt):_e!=="\\"&&(kt[Ut]=Rt.replace(/[a-zA-Z]/g,function(A){var Oe=A.charCodeAt(0);return"["+String.fromCharCode(Oe&-33,Oe|32)+"]"}))}return kt.join("")}for(var Dt=[],Ie=0,M=Ce.length;Ie<M;++Ie){var me=Ce[Ie];if(me.global||me.multiline)throw new Error(""+me);Dt.push("(?:"+St(me)+")")}return new RegExp(Dt.join("|"),Re?"gi":"g")}function x(Ce,he){var We=/(?:^|\s)nocode(?:\s|$)/,Re=[],Ie=0,M=[],me=0;function Ee(Ke){var et=Ke.nodeType;if(et==1){if(We.test(Ke.className))return;for(var ut=Ke.firstChild;ut;ut=ut.nextSibling)Ee(ut);var St=Ke.nodeName.toLowerCase();(St==="br"||St==="li")&&(Re[me]=`
|
|
|
`,M[me<<1]=Ie++,M[me++<<1|1]=Ke)}else if(et==3||et==4){var Dt=Ke.nodeValue;Dt.length&&(he?Dt=Dt.replace(/\r\n?/g,`
|
|
|
`):Dt=Dt.replace(/[ \t\r\n]+/g," "),Re[me]=Dt,M[me<<1]=Ie,Ie+=Dt.length,M[me++<<1|1]=Ke)}}return Ee(Ce),{sourceCode:Re.join("").replace(/\n$/,""),spans:M}}function w(Ce,he,We,Re,Ie){if(We){var M={sourceNode:Ce,pre:1,langExtension:null,numberLines:null,sourceCode:We,spans:null,basePos:he,decorations:null};Re(M),Ie.push.apply(Ie,M.decorations)}}var V=/\S/;function fe(Ce){for(var he=void 0,We=Ce.firstChild;We;We=We.nextSibling){var Re=We.nodeType;he=Re===1?he?Ce:We:Re===3&&V.test(We.nodeValue)?Ce:he}return he===Ce?void 0:he}function $e(Ce,he){var We={},Re;(function(){for(var me=Ce.concat(he),Ee=[],Ke={},et=0,ut=me.length;et<ut;++et){var St=me[et],Dt=St[3];if(Dt)for(var mt=Dt.length;--mt>=0;)We[Dt.charAt(mt)]=St;var kt=St[1],Ht=""+kt;Ke.hasOwnProperty(Ht)||(Ee.push(kt),Ke[Ht]=null)}Ee.push(/[\0-\uffff]/),Re=Z(Ee)})();var Ie=he.length,M=function(me){for(var Ee=me.sourceCode,Ke=me.basePos,et=me.sourceNode,ut=[Ke,ke],St=0,Dt=Ee.match(Re)||[],mt={},kt=0,Ht=Dt.length;kt<Ht;++kt){var zt=Dt[kt],Ut=mt[zt],st=void 0,Rt;if(typeof Ut=="string")Rt=!1;else{var Lt=We[zt.charAt(0)];if(Lt)st=zt.match(Lt[1]),Ut=Lt[0];else{for(var _e=0;_e<Ie;++_e)if(Lt=he[_e],st=zt.match(Lt[1]),st){Ut=Lt[0];break}st||(Ut=ke)}Rt=Ut.length>=5&&Ut.substring(0,5)==="lang-",Rt&&!(st&&typeof st[1]=="string")&&(Rt=!1,Ut=X),Rt||(mt[zt]=Ut)}var Ze=St;if(St+=zt.length,!Rt)ut.push(Ke+Ze,Ut);else{var b=st[1],A=zt.indexOf(b),Oe=A+b.length;st[2]&&(Oe=zt.length-st[2].length,A=Oe-b.length);var U=Ut.substring(5);w(et,Ke+Ze,zt.substring(0,A),M,ut),w(et,Ke+Ze+A,b,Bt(U,b),ut),w(et,Ke+Ze+Oe,zt.substring(Oe),M,ut)}}me.decorations=ut};return M}function Qe(Ce){var he=[],We=[];Ce.tripleQuotedStrings?he.push([F,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Ce.multiLineStrings?he.push([F,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):he.push([F,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Ce.verbatimStrings&&We.push([F,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Re=Ce.hashComments;Re&&(Ce.cStyleComments?(Re>1?he.push([ue,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):he.push([ue,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),We.push([F,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):he.push([ue,/^#[^\r\n]*/,null,"#"])),Ce.cStyleComments&&(We.push([ue,/^\/\/[^\r\n]*/,null]),We.push([ue,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ie=Ce.regexLiterals;if(Ie){var M=Ie>1?"":`
|
|
|
\r`,me=M?".":"[\\S\\s]",Ee="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+me+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+me+")*(?:\\x5D|$))+/";We.push(["lang-regex",RegExp("^"+te+"("+Ee+")")])}var Ke=Ce.types;Ke&&We.push([pe,Ke]);var et=(""+Ce.keywords).replace(/^ | $/g,"");et.length&&We.push([$,new RegExp("^(?:"+et.replace(/[\s,]+/g,"|")+")\\b"),null]),he.push([ke,/^\s+/,null,` \r
|
|
|
\xA0`]);var ut="^.[^\\s\\w.$@'\"`/\\\\]*";return Ce.regexLiterals&&(ut+="(?!s*/)"),We.push([oe,/^@[a-z_$][a-z_$@0-9]*/i,null],[pe,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[ke,/^[a-z_$][a-z_$@0-9]*/i,null],[oe,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[ke,/^\\[\s\S]?/,null],[xe,new RegExp(ut),null]),$e(he,We)}var ye=Qe({keywords:D,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function He(Ce,he,We){for(var Re=/(?:^|\s)nocode(?:\s|$)/,Ie=/\r\n?|\n/,M=Ce.ownerDocument,me=M.createElement("li");Ce.firstChild;)me.appendChild(Ce.firstChild);var Ee=[me];function Ke(kt){var Ht=kt.nodeType;if(Ht==1&&!Re.test(kt.className))if(kt.nodeName==="br")et(kt),kt.parentNode&&kt.parentNode.removeChild(kt);else for(var zt=kt.firstChild;zt;zt=zt.nextSibling)Ke(zt);else if((Ht==3||Ht==4)&&We){var Ut=kt.nodeValue,st=Ut.match(Ie);if(st){var Rt=Ut.substring(0,st.index);kt.nodeValue=Rt;var Lt=Ut.substring(st.index+st[0].length);if(Lt){var _e=kt.parentNode;_e.insertBefore(M.createTextNode(Lt),kt.nextSibling)}et(kt),Rt||kt.parentNode.removeChild(kt)}}}function et(kt){for(;!kt.nextSibling;)if(kt=kt.parentNode,!kt)return;function Ht(st,Rt){var Lt=Rt?st.cloneNode(!1):st,_e=st.parentNode;if(_e){var Ze=Ht(_e,1),b=st.nextSibling;Ze.appendChild(Lt);for(var A=b;A;A=b)b=A.nextSibling,Ze.appendChild(A)}return Lt}for(var zt=Ht(kt.nextSibling,0),Ut;(Ut=zt.parentNode)&&Ut.nodeType===1;)zt=Ut;Ee.push(zt)}for(var ut=0;ut<Ee.length;++ut)Ke(Ee[ut]);he===(he|0)&&Ee[0].setAttribute("value",he);var St=M.createElement("ol");St.className="linenums";for(var Dt=Math.max(0,he-1|0)||0,ut=0,mt=Ee.length;ut<mt;++ut)me=Ee[ut],me.className="L"+(ut+Dt)%10,me.firstChild||me.appendChild(M.createTextNode("\xA0")),St.appendChild(me);Ce.appendChild(St)}function Ye(Ce){var he=/\bMSIE\s(\d+)/.exec(navigator.userAgent);he=he&&+he[1]<=8;var We=/\n/g,Re=Ce.sourceCode,Ie=Re.length,M=0,me=Ce.spans,Ee=me.length,Ke=0,et=Ce.decorations,ut=et.length,St=0;et[ut]=Ie;var Dt,mt;for(mt=Dt=0;mt<ut;)et[mt]!==et[mt+2]?(et[Dt++]=et[mt++],et[Dt++]=et[mt++]):mt+=2;for(ut=Dt,mt=Dt=0;mt<ut;){for(var kt=et[mt],Ht=et[mt+1],zt=mt+2;zt+2<=ut&&et[zt+1]===Ht;)zt+=2;et[Dt++]=kt,et[Dt++]=Ht,mt=zt}ut=et.length=Dt;var Ut=Ce.sourceNode,st="";Ut&&(st=Ut.style.display,Ut.style.display="none");try{for(var Rt=null;Ke<Ee;){var Lt=me[Ke],_e=me[Ke+2]||Ie,Ze=et[St+2]||Ie,zt=Math.min(_e,Ze),b=me[Ke+1],A;if(b.nodeType!==1&&(A=Re.substring(M,zt))){he&&(A=A.replace(We,"\r")),b.nodeValue=A;var Oe=b.ownerDocument,U=Oe.createElement("span");U.className=et[St+1];var le=b.parentNode;le.replaceChild(U,b),U.appendChild(b),M<_e&&(me[Ke+1]=b=Oe.createTextNode(Re.substring(zt,_e)),le.insertBefore(b,U.nextSibling))}M=zt,M>=_e&&(Ke+=2),M>=Ze&&(St+=2)}}finally{Ut&&(Ut.style.display=st)}}var tt={};function nt(Ce,he){for(var We=he.length;--We>=0;){var Re=he[We];tt.hasOwnProperty(Re)?g.console&&console.warn("cannot override language handler %s",Re):tt[Re]=Ce}}function Bt(Ce,he){return Ce&&tt.hasOwnProperty(Ce)||(Ce=/^\s*</.test(he)?"default-markup":"default-code"),tt[Ce]}nt(ye,["default-code"]),nt($e([],[[ke,/^[^<?]+/],[Be,/^<!\w[^>]*(?:>|$)/],[ue,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[xe,/^(?:<[%?]|[%?]>)/],["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"]),nt($e([[ke,/^[\s]+/,null,` \r
|
|
|
`],[k,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[De,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[N,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[xe,/^[=<>\/]+/],["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"]),nt($e([],[[k,/^[\s\S]+/]]),["uq.val"]),nt(Qe({keywords:G,hashComments:!0,cStyleComments:!0,types:z}),["c","cc","cpp","cxx","cyc","m"]),nt(Qe({keywords:"null,true,false"}),["json"]),nt(Qe({keywords:E,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:z}),["cs"]),nt(Qe({keywords:B,cStyleComments:!0}),["java"]),nt(Qe({keywords:W,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),nt(Qe({keywords:ee,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),nt(Qe({keywords:R,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),nt(Qe({keywords:Q,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),nt(Qe({keywords:C,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),nt(Qe({keywords:S,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),nt($e([],[[F,/^[\s\S]+/]]),["regex"]);function qe(Ce){var he=Ce.langExtension;try{var We=x(Ce.sourceNode,Ce.pre),Re=We.sourceCode;Ce.sourceCode=Re,Ce.spans=We.spans,Ce.basePos=0,Bt(he,Re)(Ce),Ye(Ce)}catch(Ie){g.console&&console.log(Ie&&Ie.stack||Ie)}}function jt(Ce,he,We){var Re=We||!1,Ie=he||null,M=document.createElement("div");M.innerHTML="<pre>"+Ce+"</pre>",M=M.firstChild,Re&&He(M,Re,!0);var me={langExtension:Ie,numberLines:Re,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return qe(me),M.innerHTML}function Ue(Ce,he){var We=he||document.body,Re=We.ownerDocument||document;function Ie(Lt){return We.getElementsByTagName(Lt)}for(var M=[Ie("pre"),Ie("code"),Ie("xmp")],me=[],Ee=0;Ee<M.length;++Ee)for(var Ke=0,et=M[Ee].length;Ke<et;++Ke)me.push(M[Ee][Ke]);M=null;var ut=Date;ut.now||(ut={now:function(){return+new Date}});var St=0,Dt=/\blang(?:uage)?-([\w.]+)(?!\S)/,mt=/\bprettyprint\b/,kt=/\bprettyprinted\b/,Ht=/pre|xmp/i,zt=/^code$/i,Ut=/^(?:pre|code|xmp)$/i,st={};function Rt(){for(var Lt=g.PR_SHOULD_USE_CONTINUATION?ut.now()+250:1/0;St<me.length&&ut.now()<Lt;St++){for(var _e=me[St],Ze=st,b=_e;b=b.previousSibling;){var A=b.nodeType,Oe=(A===7||A===8)&&b.nodeValue;if(Oe?!/^\??prettify\b/.test(Oe):A!==3||/\S/.test(b.nodeValue))break;if(Oe){Ze={},Oe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(J,rt,Gt){Ze[rt]=Gt});break}}var U=_e.className;if((Ze!==st||mt.test(U))&&!kt.test(U)){for(var le=!1,wt=_e.parentNode;wt;wt=wt.parentNode){var Se=wt.tagName;if(Ut.test(Se)&&wt.className&&mt.test(wt.className)){le=!0;break}}if(!le){_e.className+=" prettyprinted";var je=Ze.lang;if(!je){je=U.match(Dt);var Ge;!je&&(Ge=fe(_e))&&zt.test(Ge.tagName)&&(je=Ge.className.match(Dt)),je&&(je=je[1])}var Y;if(Ht.test(_e.tagName))Y=1;else{var ne=_e.currentStyle,be=Re.defaultView,Pe=ne?ne.whiteSpace:be&&be.getComputedStyle?be.getComputedStyle(_e,null).getPropertyValue("white-space"):0;Y=Pe&&Pe.substring(0,3)==="pre"}var P=Ze.linenums;(P=P==="true"||+P)||(P=U.match(/\blinenums\b(?::(\d+))?/),P=P?P[1]&&P[1].length?+P[1]:!0:!1),P&&He(_e,P,Y);var Je={langExtension:je,sourceNode:_e,numberLines:P,pre:Y,sourceCode:null,basePos:null,spans:null,decorations:null};qe(Je)}}}St<me.length?g.setTimeout(Rt,250):typeof Ce=="function"&&Ce()}Rt()}var yt=g.PR={createSimpleLexer:$e,registerLangHandler:nt,sourceDecorator:Qe,PR_ATTRIB_NAME:N,PR_ATTRIB_VALUE:k,PR_COMMENT:ue,PR_DECLARATION:Be,PR_KEYWORD:$,PR_LITERAL:oe,PR_NOCODE:q,PR_PLAIN:ke,PR_PUNCTUATION:xe,PR_SOURCE:X,PR_STRING:F,PR_TAG:De,PR_TYPE:pe,prettyPrintOne:m?g.prettyPrintOne=jt:ve=jt,prettyPrint:j=m?g.prettyPrint=Ue:j=Ue},Le=g.define;typeof Le=="function"&&Le.amd&&Le("google-code-prettify",[],function(){return yt})})()},25769:function(fn,ct,_){"use strict";var m=_(98040),ce={"text/plain":"Text","text/html":"Url",default:"Text"},se="Copy to clipboard: #{key}, Enter";function ve(g){var de=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,de)}function j(g,de){var ae,o,G,B,E,S,C=!1;de||(de={}),ae=de.debug||!1;try{G=m(),B=document.createRange(),E=document.getSelection(),S=document.createElement("span"),S.textContent=g,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(ee){if(ee.stopPropagation(),de.format)if(ee.preventDefault(),typeof ee.clipboardData=="undefined"){ae&&console.warn("unable to use e.clipboardData"),ae&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var Q=ce[de.format]||ce.default;window.clipboardData.setData(Q,g)}else ee.clipboardData.clearData(),ee.clipboardData.setData(de.format,g);de.onCopy&&(ee.preventDefault(),de.onCopy(ee.clipboardData))}),document.body.appendChild(S),B.selectNodeContents(S),E.addRange(B);var R=document.execCommand("copy");if(!R)throw new Error("copy command was unsuccessful");C=!0}catch(ee){ae&&console.error("unable to copy using execCommand: ",ee),ae&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(de.format||"text",g),de.onCopy&&de.onCopy(window.clipboardData),C=!0}catch(Q){ae&&console.error("unable to copy using clipboardData: ",Q),ae&&console.error("falling back to prompt"),o=ve("message"in de?de.message:se),window.prompt(o,g)}}finally{E&&(typeof E.removeRange=="function"?E.removeRange(B):E.removeAllRanges()),S&&document.body.removeChild(S),G()}return C}fn.exports=j},53184:function(fn,ct,_){"use strict";var m,ce;function se(ve,j,g){var de=function(ae,o){return ve.js_beautify(ae,o)};return de.js=ve.js_beautify,de.css=j.css_beautify,de.html=g.html_beautify,de.js_beautify=ve.js_beautify,de.css_beautify=j.css_beautify,de.html_beautify=g.html_beautify,de}m=[_(58553),_(87804),_(40998)],ce=function(ve,j,g){return se(ve,j,g)}.apply(ct,m),ce!==void 0&&(fn.exports=ce)},87804:function(fn,ct){var _,m;(function(){var ce;(function(){"use strict";var ve=[,,function(ae){function o(E){this.__parent=E,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var E=new o(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},o.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},o.prototype.has_match=function(E){for(var S=this.__items.length-1;S>=0;S--)if(this.__items[S].match(E))return!0;return!1},o.prototype.set_indent=function(E,S){this.is_empty()&&(this.__indent_count=E||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 E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},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(E){this.__items.push(E);var S=E.lastIndexOf(`
|
|
|
`);S!==-1?this.__character_count=E.length-S:this.__character_count+=E.length},o.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},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 E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function G(E,S){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),S=S||"",E.indent_level>0&&(S=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=S,this.__base_string_length=S.length}G.prototype.get_indent_size=function(E,S){var C=this.__base_string_length;return S=S||0,E<0&&(C=0),C+=E*this.__indent_size,C+=S,C},G.prototype.get_indent_string=function(E,S){var C=this.__base_string;return S=S||0,E<0&&(E=0,C=""),S+=E*this.__indent_size,this.__ensure_cache(S),C+=this.__cache[S],C},G.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},G.prototype.__add_column=function(){var E=this.__cache.length,S=0,C="";this.__indent_size&&E>=this.__indent_size&&(S=Math.floor(E/this.__indent_size),E-=S*this.__indent_size,C=new Array(S+1).join(this.__indent_string)),E&&(C+=new Array(E+1).join(" ")),this.__cache.push(C)};function B(E,S){this.__indent_cache=new G(E,S),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}B.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},B.prototype.get_line_number=function(){return this.__lines.length},B.prototype.get_indent_string=function(E,S){return this.__indent_cache.get_indent_string(E,S)},B.prototype.get_indent_size=function(E,S){return this.__indent_cache.get_indent_size(E,S)},B.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},B.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},B.prototype.get_code=function(E){this.trim(!0);var 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 E!==`
|
|
|
`&&(C=C.replace(/[\n]/g,E)),C},B.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},B.prototype.set_indent=function(E,S){return E=E||0,S=S||0,this.next_line.set_indent(E,S),this.__lines.length>1?(this.current_line.set_indent(E,S),!0):(this.current_line.set_indent(),!1)},B.prototype.add_raw_token=function(E){for(var S=0;S<E.newlines;S++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},B.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},B.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},B.prototype.remove_indent=function(E){for(var S=this.__lines.length;E<S;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},B.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},B.prototype.just_added_newline=function(){return this.current_line.is_empty()},B.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},B.prototype.ensure_empty_line_above=function(E,S){for(var C=this.__lines.length-2;C>=0;){var R=this.__lines[C];if(R.is_empty())break;if(R.item(0).indexOf(E)!==0&&R.item(-1)!==S){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},ae.exports.Output=B},,,,function(ae){function o(E,S){this.raw_options=G(E,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(E,S){var C=this.raw_options[E],R=S||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(R=C.concat()):typeof C=="string"&&(R=C.split(/[^a-zA-Z0-9_\/\-]+/)),R},o.prototype._get_boolean=function(E,S){var C=this.raw_options[E],R=C===void 0?!!S:!!C;return R},o.prototype._get_characters=function(E,S){var C=this.raw_options[E],R=S||"";return typeof C=="string"&&(R=C.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),R},o.prototype._get_number=function(E,S){var C=this.raw_options[E];S=parseInt(S,10),isNaN(S)&&(S=0);var R=parseInt(C,10);return isNaN(R)&&(R=S),R},o.prototype._get_selection=function(E,S,C){var R=this._get_selection_list(E,S,C);if(R.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
|
|
|
`+S+`
|
|
|
You passed in: '`+this.raw_options[E]+"'");return R[0]},o.prototype._get_selection_list=function(E,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 R=this._get_array(E,C);if(!this._is_valid_selection(R,S))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
|
|
|
`+S+`
|
|
|
You passed in: '`+this.raw_options[E]+"'");return R},o.prototype._is_valid_selection=function(E,S){return E.length&&S.length&&!E.some(function(C){return S.indexOf(C)===-1})};function G(E,S){var C={};E=B(E);var R;for(R in E)R!==S&&(C[R]=E[R]);if(S&&E[S])for(R in E[S])C[R]=E[S][R];return C}function B(E){var S={},C;for(C in E){var R=C.replace(/-/g,"_");S[R]=E[C]}return S}ae.exports.Options=o,ae.exports.normalizeOpts=B,ae.exports.mergeOpts=G},,function(ae){var o=RegExp.prototype.hasOwnProperty("sticky");function G(B){this.__input=B||"",this.__input_length=this.__input.length,this.__position=0}G.prototype.restart=function(){this.__position=0},G.prototype.back=function(){this.__position>0&&(this.__position-=1)},G.prototype.hasNext=function(){return this.__position<this.__input_length},G.prototype.next=function(){var B=null;return this.hasNext()&&(B=this.__input.charAt(this.__position),this.__position+=1),B},G.prototype.peek=function(B){var E=null;return B=B||0,B+=this.__position,B>=0&&B<this.__input_length&&(E=this.__input.charAt(B)),E},G.prototype.__match=function(B,E){B.lastIndex=E;var S=B.exec(this.__input);return S&&!(o&&B.sticky)&&S.index!==E&&(S=null),S},G.prototype.test=function(B,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(B,E):!1},G.prototype.testChar=function(B,E){var S=this.peek(E);return B.lastIndex=0,S!==null&&B.test(S)},G.prototype.match=function(B){var E=this.__match(B,this.__position);return E?this.__position+=E[0].length:E=null,E},G.prototype.read=function(B,E,S){var C="",R;return B&&(R=this.match(B),R&&(C+=R[0])),E&&(R||!B)&&(C+=this.readUntil(E,S)),C},G.prototype.readUntil=function(B,E){var S="",C=this.__position;B.lastIndex=this.__position;var R=B.exec(this.__input);return R?(C=R.index,E&&(C+=R[0].length)):C=this.__input_length,S=this.__input.substring(this.__position,C),this.__position=C,S},G.prototype.readUntilAfter=function(B){return this.readUntil(B,!0)},G.prototype.get_regexp=function(B,E){var S=null,C="g";return E&&o&&(C="y"),typeof B=="string"&&B!==""?S=new RegExp(B,C):B&&(S=new RegExp(B.source,C)),S},G.prototype.get_literal_regexp=function(B){return RegExp(B.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},G.prototype.peekUntilAfter=function(B){var E=this.__position,S=this.readUntilAfter(B);return this.__position=E,S},G.prototype.lookBack=function(B){var E=this.__position-1;return E>=B.length&&this.__input.substring(E-B.length,E).toLowerCase()===B},ae.exports.InputScanner=G},,,,,function(ae){function o(G,B){G=typeof G=="string"?G:G.source,B=typeof B=="string"?B:B.source,this.__directives_block_pattern=new RegExp(G+/ beautify( \w+[:]\w+)+ /.source+B,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(G+/\sbeautify\signore:end\s/.source+B,"g")}o.prototype.get_directives=function(G){if(!G.match(this.__directives_block_pattern))return null;var B={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(G);E;)B[E[1]]=E[2],E=this.__directive_pattern.exec(G);return B},o.prototype.readIgnored=function(G){return G.readUntilAfter(this.__directives_end_ignore_pattern)},ae.exports.Directives=o},,function(ae,o,G){var B=G(16).Beautifier,E=G(17).Options;function S(C,R){var ee=new B(C,R);return ee.beautify()}ae.exports=S,ae.exports.defaultOptions=function(){return new E}},function(ae,o,G){var B=G(17).Options,E=G(2).Output,S=G(8).InputScanner,C=G(13).Directives,R=new C(/\/\*/,/\*\//),ee=/\r\n|[\r\n]/,Q=/\r\n|[\r\n]/g,W=/\s/,D=/(?:\s|\n)+/g,z=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,F=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function $(ue,pe){this._source_text=ue||"",this._options=new B(pe),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"]}$.prototype.eatString=function(ue){var pe="";for(this._ch=this._input.next();this._ch;){if(pe+=this._ch,this._ch==="\\")pe+=this._input.next();else if(ue.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return pe},$.prototype.eatWhitespace=function(ue){for(var pe=W.test(this._input.peek()),oe=0;W.test(this._input.peek());)this._ch=this._input.next(),ue&&this._ch===`
|
|
|
`&&(oe===0||oe<this._options.max_preserve_newlines)&&(oe++,this._output.add_new_line(!0));return pe},$.prototype.foundNestedPseudoClass=function(){for(var ue=0,pe=1,oe=this._input.peek(pe);oe;){if(oe==="{")return!0;if(oe==="(")ue+=1;else if(oe===")"){if(ue===0)return!1;ue-=1}else if(oe===";"||oe==="}")return!1;pe++,oe=this._input.peek(pe)}return!1},$.prototype.print_string=function(ue){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(ue)},$.prototype.preserveSingleSpace=function(ue){ue&&(this._output.space_before_token=!0)},$.prototype.indent=function(){this._indentLevel++},$.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},$.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ue=this._source_text,pe=this._options.eol;pe==="auto"&&(pe=`
|
|
|
`,ue&&ee.test(ue||"")&&(pe=ue.match(ee)[0])),ue=ue.replace(Q,`
|
|
|
`);var oe=ue.match(/^[\t ]*/)[0];this._output=new E(this._options,oe),this._input=new S(ue),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var xe=0,ke=!1,De=!1,Be=!1,X=!1,N=!1,k=this._ch,q=!1,te,Z,x;te=this._input.read(D),Z=te!=="",x=k,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),k=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var w=this._input.read(z),V=R.get_directives(w);V&&V.ignore==="start"&&(w+=R.readIgnored(this._input)),this.print_string(w),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(F)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(Z),this.print_string(this._ch);var fe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);fe.match(/[ :]$/)&&(fe=this.eatString(": ").replace(/\s+$/,""),this.print_string(fe),this._output.space_before_token=!0),xe===0&&fe.indexOf(":")!==-1&&(De=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(Z),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $e=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$e.match(/[ :]$/)&&($e=this.eatString(": ").replace(/\s+$/,""),this.print_string($e),this._output.space_before_token=!0),xe===0&&$e.indexOf(":")!==-1?(De=!0,this.indent()):$e in this.NESTED_AT_RULE?(this._nestedLevel+=1,$e in this.CONDITIONAL_GROUP_RULE&&(Be=!0)):xe===0&&!De&&(X=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(Z),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")De&&(De=!1,this.outdent()),X=!1,Be?(Be=!1,ke=this._indentLevel>=this._nestedLevel):ke=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&ke&&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)):(x==="("?this._output.space_before_token=!1:x!==","&&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(),x==="{"&&this._output.trim(!0),De&&(this.outdent(),De=!1),this.print_string(this._ch),ke=!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 Qe=0;Qe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Qe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Qe])){q=!0;break}(ke||Be)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!X&&xe===0?(this.print_string(":"),De||(De=!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 ye=x==='"'||x==="'";this.preserveSingleSpace(ye||Z),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")q=!1,xe===0?(De&&(this.outdent(),De=!1),X=!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(),xe++,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(")")),xe&&(xe--,this.outdent()));else{var He=!1;this._input.lookBack("with")&&(He=!0),this.preserveSingleSpace(Z||He),this.print_string(this._ch),De&&x==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),N=!0):(this.eatWhitespace(),xe++,this.indent())}else if(this._ch===")")xe&&(xe--,this.outdent()),N&&this._input.peek()===";"&&this._options.selector_separator_newline&&(N=!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&&(!De||N)&&xe===0&&!X?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!De&&xe===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&&W.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(Z),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),W.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=x==='"'||x==="'";this.preserveSingleSpace(Ye||Z),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&q&&this._output.add_new_line()}var tt=this._output.get_code(pe);return tt},ae.exports.Beautifier=$},function(ae,o,G){var B=G(6).Options;function E(S){B.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 R=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var ee=0;ee<R.length;ee++)R[ee]!=="expand"?this.brace_style="collapse":this.brace_style=R[ee]}E.prototype=new B,ae.exports.Options=E}],j={};function g(ae){var o=j[ae];if(o!==void 0)return o.exports;var G=j[ae]={exports:{}};return ve[ae](G,G.exports,g),G.exports}var de=g(15);ce=de})();var se=ce;_=[],m=function(){return{css_beautify:se}}.apply(ct,_),m!==void 0&&(fn.exports=m)})()},40998:function(fn,ct,_){var m,ce;(function(){var se;(function(){"use strict";var de=[,,function(B){function E(R){this.__parent=R,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}E.prototype.clone_empty=function(){var R=new E(this.__parent);return R.set_indent(this.__indent_count,this.__alignment_count),R},E.prototype.item=function(R){return R<0?this.__items[this.__items.length+R]:this.__items[R]},E.prototype.has_match=function(R){for(var ee=this.__items.length-1;ee>=0;ee--)if(this.__items[ee].match(R))return!0;return!1},E.prototype.set_indent=function(R,ee){this.is_empty()&&(this.__indent_count=R||0,this.__alignment_count=ee||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},E.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var R=this.__parent.current_line;return R.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),R.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),R.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,R.__items[0]===" "&&(R.__items.splice(0,1),R.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(R){this.__items.push(R);var ee=R.lastIndexOf(`
|
|
|
`);ee!==-1?this.__character_count=R.length-ee:this.__character_count+=R.length},E.prototype.pop=function(){var R=null;return this.is_empty()||(R=this.__items.pop(),this.__character_count-=R.length),R},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var R="";return this.is_empty()?this.__parent.indent_empty_lines&&(R=this.__parent.get_indent_string(this.__indent_count)):(R=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),R+=this.__items.join("")),R};function S(R,ee){this.__cache=[""],this.__indent_size=R.indent_size,this.__indent_string=R.indent_char,R.indent_with_tabs||(this.__indent_string=new Array(R.indent_size+1).join(R.indent_char)),ee=ee||"",R.indent_level>0&&(ee=new Array(R.indent_level+1).join(this.__indent_string)),this.__base_string=ee,this.__base_string_length=ee.length}S.prototype.get_indent_size=function(R,ee){var Q=this.__base_string_length;return ee=ee||0,R<0&&(Q=0),Q+=R*this.__indent_size,Q+=ee,Q},S.prototype.get_indent_string=function(R,ee){var Q=this.__base_string;return ee=ee||0,R<0&&(R=0,Q=""),ee+=R*this.__indent_size,this.__ensure_cache(ee),Q+=this.__cache[ee],Q},S.prototype.__ensure_cache=function(R){for(;R>=this.__cache.length;)this.__add_column()},S.prototype.__add_column=function(){var R=this.__cache.length,ee=0,Q="";this.__indent_size&&R>=this.__indent_size&&(ee=Math.floor(R/this.__indent_size),R-=ee*this.__indent_size,Q=new Array(ee+1).join(this.__indent_string)),R&&(Q+=new Array(R+1).join(" ")),this.__cache.push(Q)};function C(R,ee){this.__indent_cache=new S(R,ee),this.raw=!1,this._end_with_newline=R.end_with_newline,this.indent_size=R.indent_size,this.wrap_line_length=R.wrap_line_length,this.indent_empty_lines=R.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}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(R,ee){return this.__indent_cache.get_indent_string(R,ee)},C.prototype.get_indent_size=function(R,ee){return this.__indent_cache.get_indent_size(R,ee)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(R){return this.is_empty()||!R&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(R){this.trim(!0);var ee=this.current_line.pop();ee&&(ee[ee.length-1]===`
|
|
|
`&&(ee=ee.replace(/\n+$/g,"")),this.current_line.push(ee)),this._end_with_newline&&this.__add_outputline();var Q=this.__lines.join(`
|
|
|
`);return R!==`
|
|
|
`&&(Q=Q.replace(/[\n]/g,R)),Q},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(R,ee){return R=R||0,ee=ee||0,this.next_line.set_indent(R,ee),this.__lines.length>1?(this.current_line.set_indent(R,ee),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(R){for(var ee=0;ee<R.newlines;ee++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(R.whitespace_before),this.current_line.push(R.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(R){this.__add_space_before_token(),this.current_line.push(R),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(R){for(var ee=this.__lines.length;R<ee;)this.__lines[R]._remove_indent(),R++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(R){for(R=R===void 0?!1:R,this.current_line.trim();R&&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(R,ee){for(var Q=this.__lines.length-2;Q>=0;){var W=this.__lines[Q];if(W.is_empty())break;if(W.item(0).indexOf(R)!==0&&W.item(-1)!==ee){this.__lines.splice(Q+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}Q--}},B.exports.Output=C},function(B){function E(S,C,R,ee){this.type=S,this.text=C,this.comments_before=null,this.newlines=R||0,this.whitespace_before=ee||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}B.exports.Token=E},,,function(B){function E(R,ee){this.raw_options=S(R,ee),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}E.prototype._get_array=function(R,ee){var Q=this.raw_options[R],W=ee||[];return typeof Q=="object"?Q!==null&&typeof Q.concat=="function"&&(W=Q.concat()):typeof Q=="string"&&(W=Q.split(/[^a-zA-Z0-9_\/\-]+/)),W},E.prototype._get_boolean=function(R,ee){var Q=this.raw_options[R],W=Q===void 0?!!ee:!!Q;return W},E.prototype._get_characters=function(R,ee){var Q=this.raw_options[R],W=ee||"";return typeof Q=="string"&&(W=Q.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),W},E.prototype._get_number=function(R,ee){var Q=this.raw_options[R];ee=parseInt(ee,10),isNaN(ee)&&(ee=0);var W=parseInt(Q,10);return isNaN(W)&&(W=ee),W},E.prototype._get_selection=function(R,ee,Q){var W=this._get_selection_list(R,ee,Q);if(W.length!==1)throw new Error("Invalid Option Value: The option '"+R+`' can only be one of the following values:
|
|
|
`+ee+`
|
|
|
You passed in: '`+this.raw_options[R]+"'");return W[0]},E.prototype._get_selection_list=function(R,ee,Q){if(!ee||ee.length===0)throw new Error("Selection list cannot be empty.");if(Q=Q||[ee[0]],!this._is_valid_selection(Q,ee))throw new Error("Invalid Default Value!");var W=this._get_array(R,Q);if(!this._is_valid_selection(W,ee))throw new Error("Invalid Option Value: The option '"+R+`' can contain only the following values:
|
|
|
`+ee+`
|
|
|
You passed in: '`+this.raw_options[R]+"'");return W},E.prototype._is_valid_selection=function(R,ee){return R.length&&ee.length&&!R.some(function(Q){return ee.indexOf(Q)===-1})};function S(R,ee){var Q={};R=C(R);var W;for(W in R)W!==ee&&(Q[W]=R[W]);if(ee&&R[ee])for(W in R[ee])Q[W]=R[ee][W];return Q}function C(R){var ee={},Q;for(Q in R){var W=Q.replace(/-/g,"_");ee[W]=R[Q]}return ee}B.exports.Options=E,B.exports.normalizeOpts=C,B.exports.mergeOpts=S},,function(B){var E=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 R=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(R=this.__input.charAt(C)),R},S.prototype.__match=function(C,R){C.lastIndex=R;var ee=C.exec(this.__input);return ee&&!(E&&C.sticky)&&ee.index!==R&&(ee=null),ee},S.prototype.test=function(C,R){return R=R||0,R+=this.__position,R>=0&&R<this.__input_length?!!this.__match(C,R):!1},S.prototype.testChar=function(C,R){var ee=this.peek(R);return C.lastIndex=0,ee!==null&&C.test(ee)},S.prototype.match=function(C){var R=this.__match(C,this.__position);return R?this.__position+=R[0].length:R=null,R},S.prototype.read=function(C,R,ee){var Q="",W;return C&&(W=this.match(C),W&&(Q+=W[0])),R&&(W||!C)&&(Q+=this.readUntil(R,ee)),Q},S.prototype.readUntil=function(C,R){var ee="",Q=this.__position;C.lastIndex=this.__position;var W=C.exec(this.__input);return W?(Q=W.index,R&&(Q+=W[0].length)):Q=this.__input_length,ee=this.__input.substring(this.__position,Q),this.__position=Q,ee},S.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},S.prototype.get_regexp=function(C,R){var ee=null,Q="g";return R&&E&&(Q="y"),typeof C=="string"&&C!==""?ee=new RegExp(C,Q):C&&(ee=new RegExp(C.source,Q)),ee},S.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},S.prototype.peekUntilAfter=function(C){var R=this.__position,ee=this.readUntilAfter(C);return this.__position=R,ee},S.prototype.lookBack=function(C){var R=this.__position-1;return R>=C.length&&this.__input.substring(R-C.length,R).toLowerCase()===C},B.exports.InputScanner=S},function(B,E,S){var C=S(8).InputScanner,R=S(3).Token,ee=S(10).TokenStream,Q=S(11).WhitespacePattern,W={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},D=function(z,F){this._input=new C(z),this._options=F||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new Q(this._input)};D.prototype.tokenize=function(){this._input.restart(),this.__tokens=new ee,this._reset();for(var z,F=new R(W.START,""),$=null,ue=[],pe=new ee;F.type!==W.EOF;){for(z=this._get_next_token(F,$);this._is_comment(z);)pe.add(z),z=this._get_next_token(F,$);pe.isEmpty()||(z.comments_before=pe,pe=new ee),z.parent=$,this._is_opening(z)?(ue.push($),$=z):$&&this._is_closing(z,$)&&(z.opened=$,$.closed=z,$=ue.pop(),z.parent=$),z.previous=F,F.next=z,this.__tokens.add(z),F=z}return this.__tokens},D.prototype._is_first_token=function(){return this.__tokens.isEmpty()},D.prototype._reset=function(){},D.prototype._get_next_token=function(z,F){this._readWhitespace();var $=this._input.read(/.+/g);return $?this._create_token(W.RAW,$):this._create_token(W.EOF,"")},D.prototype._is_comment=function(z){return!1},D.prototype._is_opening=function(z){return!1},D.prototype._is_closing=function(z,F){return!1},D.prototype._create_token=function(z,F){var $=new R(z,F,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return $},D.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},B.exports.Tokenizer=D,B.exports.TOKEN=W},function(B){function E(S){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=S}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position<this.__tokens_length},E.prototype.next=function(){var S=null;return this.hasNext()&&(S=this.__tokens[this.__position],this.__position+=1),S},E.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},E.prototype.add=function(S){this.__parent_token&&(S.parent=this.__parent_token),this.__tokens.push(S),this.__tokens_length+=1},B.exports.TokenStream=E},function(B,E,S){var C=S(12).Pattern;function R(ee,Q){C.call(this,ee,Q),Q?this._line_regexp=this._input.get_regexp(Q._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}R.prototype=new C,R.prototype.__set_whitespace_patterns=function(ee,Q){ee+="\\t ",Q+="\\n\\r",this._match_pattern=this._input.get_regexp("["+ee+Q+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+Q+"]")},R.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var ee=this._input.read(this._match_pattern);if(ee===" ")this.whitespace_before_token=" ";else if(ee){var Q=this.__split(this._newline_regexp,ee);this.newline_count=Q.length-1,this.whitespace_before_token=Q[this.newline_count]}return ee},R.prototype.matching=function(ee,Q){var W=this._create();return W.__set_whitespace_patterns(ee,Q),W._update(),W},R.prototype._create=function(){return new R(this._input,this)},R.prototype.__split=function(ee,Q){ee.lastIndex=0;for(var W=0,D=[],z=ee.exec(Q);z;)D.push(Q.substring(W,z.index)),W=z.index+z[0].length,z=ee.exec(Q);return W<Q.length?D.push(Q.substring(W,Q.length)):D.push(""),D},B.exports.WhitespacePattern=R},function(B){function E(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)}E.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},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.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},E.prototype.until=function(S){var C=this._create();return C._until_after=!1,C._until_pattern=this._input.get_regexp(S),C._update(),C},E.prototype.starting_with=function(S){var C=this._create();return C._starting_pattern=this._input.get_regexp(S,!0),C._update(),C},E.prototype.matching=function(S){var C=this._create();return C._match_pattern=this._input.get_regexp(S,!0),C._update(),C},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},B.exports.Pattern=E},function(B){function E(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")}E.prototype.get_directives=function(S){if(!S.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var R=this.__directive_pattern.exec(S);R;)C[R[1]]=R[2],R=this.__directive_pattern.exec(S);return C},E.prototype.readIgnored=function(S){return S.readUntilAfter(this.__directives_end_ignore_pattern)},B.exports.Directives=E},function(B,E,S){var C=S(12).Pattern,R={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function ee(Q,W){C.call(this,Q,W),this.__template_pattern=null,this._disabled=Object.assign({},R),this._excluded=Object.assign({},R),W&&(this.__template_pattern=this._input.get_regexp(W.__template_pattern),this._excluded=Object.assign(this._excluded,W._excluded),this._disabled=Object.assign(this._disabled,W._disabled));var D=new C(Q);this.__patterns={handlebars_comment:D.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:D.starting_with(/{{{/).until_after(/}}}/),handlebars:D.starting_with(/{{/).until_after(/}}/),php:D.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:D.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:D.starting_with(/{%/).until_after(/%}/),django_value:D.starting_with(/{{/).until_after(/}}/),django_comment:D.starting_with(/{#/).until_after(/#}/),smarty:D.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:D.starting_with(/{\*/).until_after(/\*}/),smarty_literal:D.starting_with(/{literal}/).until_after(/{\/literal}/)}}ee.prototype=new C,ee.prototype._create=function(){return new ee(this._input,this)},ee.prototype._update=function(){this.__set_templated_pattern()},ee.prototype.disable=function(Q){var W=this._create();return W._disabled[Q]=!0,W._update(),W},ee.prototype.read_options=function(Q){var W=this._create();for(var D in R)W._disabled[D]=Q.templating.indexOf(D)===-1;return W._update(),W},ee.prototype.exclude=function(Q){var W=this._create();return W._excluded[Q]=!0,W._update(),W},ee.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 W=this._read_template();W;)this._match_pattern?W+=this._input.read(this._match_pattern):W+=this._input.readUntil(this.__template_pattern),Q+=W,W=this._read_template();return this._until_after&&(Q+=this._input.readUntilAfter(this._until_pattern)),Q},ee.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("|")+")")},ee.prototype._read_template=function(){var Q="",W=this._input.peek();if(W==="<"){var D=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&D==="?"&&(Q=Q||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&D==="%"&&(Q=Q||this.__patterns.erb.read())}else W==="{"&&(!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},B.exports.TemplatablePattern=ee},,,,function(B,E,S){var C=S(19).Beautifier,R=S(20).Options;function ee(Q,W,D,z){var F=new C(Q,W,D,z);return F.beautify()}B.exports=ee,B.exports.defaultOptions=function(){return new R}},function(B,E,S){var C=S(20).Options,R=S(2).Output,ee=S(21).Tokenizer,Q=S(21).TOKEN,W=/\r\n|[\r\n]/,D=/\r\n|[\r\n]/g,z=function(X,N){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=X.max_preserve_newlines,this.preserve_newlines=X.preserve_newlines,this._output=new R(X,N)};z.prototype.current_line_has_match=function(X){return this._output.current_line.has_match(X)},z.prototype.set_space_before_token=function(X,N){this._output.space_before_token=X,this._output.non_breaking_space=N},z.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},z.prototype.add_raw_token=function(X){this._output.add_raw_token(X)},z.prototype.print_preserved_newlines=function(X){var N=0;X.type!==Q.TEXT&&X.previous.type!==Q.TEXT&&(N=X.newlines?1:0),this.preserve_newlines&&(N=X.newlines<this.max_preserve_newlines+1?X.newlines:this.max_preserve_newlines+1);for(var k=0;k<N;k++)this.print_newline(k>0);return N!==0},z.prototype.traverse_whitespace=function(X){return X.whitespace_before||X.newlines?(this.print_preserved_newlines(X)||(this._output.space_before_token=!0),!0):!1},z.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},z.prototype.print_newline=function(X){this._output.add_new_line(X)},z.prototype.print_token=function(X){X.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(X.text))},z.prototype.indent=function(){this.indent_level++},z.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},z.prototype.get_full_indent=function(X){return X=this.indent_level+(X||0),X<1?"":this._output.get_indent_string(X)};var F=function(X){for(var N=null,k=X.next;k.type!==Q.EOF&&X.closed!==k;){if(k.type===Q.ATTRIBUTE&&k.text==="type"){k.next&&k.next.type===Q.EQUALS&&k.next.next&&k.next.next.type===Q.VALUE&&(N=k.next.next.text);break}k=k.next}return N},$=function(X,N){var k=null,q=null;return N.closed?(X==="script"?k="text/javascript":X==="style"&&(k="text/css"),k=F(N)||k,k.search("text/css")>-1?q="css":k.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?q="javascript":k.search(/(text|application|dojo)\/(x-)?(html)/)>-1?q="html":k.search(/test\/null/)>-1&&(q="null"),q):null};function ue(X,N){return N.indexOf(X)!==-1}function pe(X,N,k){this.parent=X||null,this.tag=N?N.tag_name:"",this.indent_level=k||0,this.parser_token=N||null}function oe(X){this._printer=X,this._current_frame=null}oe.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},oe.prototype.record_tag=function(X){var N=new pe(this._current_frame,X,this._printer.indent_level);this._current_frame=N},oe.prototype._try_pop_frame=function(X){var N=null;return X&&(N=X.parser_token,this._printer.indent_level=X.indent_level,this._current_frame=X.parent),N},oe.prototype._get_frame=function(X,N){for(var k=this._current_frame;k&&X.indexOf(k.tag)===-1;){if(N&&N.indexOf(k.tag)!==-1){k=null;break}k=k.parent}return k},oe.prototype.try_pop=function(X,N){var k=this._get_frame([X],N);return this._try_pop_frame(k)},oe.prototype.indent_to_tag=function(X){var N=this._get_frame(X);N&&(this._printer.indent_level=N.indent_level)};function xe(X,N,k,q){this._source_text=X||"",N=N||{},this._js_beautify=k,this._css_beautify=q,this._tag_stack=null;var te=new C(N,"html");this._options=te,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"}xe.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var X=this._source_text,N=this._options.eol;this._options.eol==="auto"&&(N=`
|
|
|
`,X&&W.test(X)&&(N=X.match(W)[0])),X=X.replace(D,`
|
|
|
`);var k=X.match(/^[\t ]*/)[0],q={text:"",type:""},te=new ke(this._options),Z=new z(this._options,k),x=new ee(X,this._options).tokenize();this._tag_stack=new oe(Z);for(var w=null,V=x.next();V.type!==Q.EOF;)V.type===Q.TAG_OPEN||V.type===Q.COMMENT?(w=this._handle_tag_open(Z,V,te,q,x),te=w):V.type===Q.ATTRIBUTE||V.type===Q.EQUALS||V.type===Q.VALUE||V.type===Q.TEXT&&!te.tag_complete?w=this._handle_inside_tag(Z,V,te,q):V.type===Q.TAG_CLOSE?w=this._handle_tag_close(Z,V,te):V.type===Q.TEXT?w=this._handle_text(Z,V,te):V.type===Q.CONTROL_FLOW_OPEN?w=this._handle_control_flow_open(Z,V):V.type===Q.CONTROL_FLOW_CLOSE?w=this._handle_control_flow_close(Z,V):Z.add_raw_token(V),q=w,V=x.next();var fe=Z._output.get_code(N);return fe},xe.prototype._handle_control_flow_open=function(X,N){var k={text:N.text,type:N.type};return X.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),N.newlines?X.print_preserved_newlines(N):X.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),X.print_token(N),X.indent(),k},xe.prototype._handle_control_flow_close=function(X,N){var k={text:N.text,type:N.type};return X.deindent(),N.newlines?X.print_preserved_newlines(N):X.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),X.print_token(N),k},xe.prototype._handle_tag_close=function(X,N,k){var q={text:N.text,type:N.type};return X.alignment_size=0,k.tag_complete=!0,X.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),k.is_unformatted?X.add_raw_token(N):(k.tag_start_char==="<"&&(X.set_space_before_token(N.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&k.has_wrapped_attrs&&X.print_newline(!1)),X.print_token(N)),k.indent_content&&!(k.is_unformatted||k.is_content_unformatted)&&(X.indent(),k.indent_content=!1),!k.is_inline_element&&!(k.is_unformatted||k.is_content_unformatted)&&X.set_wrap_point(),q},xe.prototype._handle_inside_tag=function(X,N,k,q){var te=k.has_wrapped_attrs,Z={text:N.text,type:N.type};return X.set_space_before_token(N.newlines||N.whitespace_before!=="",!0),k.is_unformatted?X.add_raw_token(N):k.tag_start_char==="{"&&N.type===Q.TEXT?X.print_preserved_newlines(N)?(N.newlines=0,X.add_raw_token(N)):X.print_token(N):(N.type===Q.ATTRIBUTE?X.set_space_before_token(!0):(N.type===Q.EQUALS||N.type===Q.VALUE&&N.previous.type===Q.EQUALS)&&X.set_space_before_token(!1),N.type===Q.ATTRIBUTE&&k.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(X.traverse_whitespace(N),te=te||N.newlines!==0),this._is_wrap_attributes_force&&k.attr_count>=this._options.wrap_attributes_min_attrs&&(q.type!==Q.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(X.print_newline(!1),te=!0)),X.print_token(N),te=te||X.previous_token_wrapped(),k.has_wrapped_attrs=te),Z},xe.prototype._handle_text=function(X,N,k){var q={text:N.text,type:"TK_CONTENT"};return k.custom_beautifier_name?this._print_custom_beatifier_text(X,N,k):k.is_unformatted||k.is_content_unformatted?X.add_raw_token(N):(X.traverse_whitespace(N),X.print_token(N)),q},xe.prototype._print_custom_beatifier_text=function(X,N,k){var q=this;if(N.text!==""){var te=N.text,Z,x=1,w="",V="";k.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Z=this._js_beautify:k.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Z=this._css_beautify:k.custom_beautifier_name==="html"&&(Z=function(Ye,tt){var nt=new xe(Ye,tt,q._js_beautify,q._css_beautify);return nt.beautify()}),this._options.indent_scripts==="keep"?x=0:this._options.indent_scripts==="separate"&&(x=-X.indent_level);var fe=X.get_full_indent(x);if(te=te.replace(/\n[ \t]*$/,""),k.custom_beautifier_name!=="html"&&te[0]==="<"&&te.match(/^(<!--|<!\[CDATA\[)/)){var $e=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(te);if(!$e){X.add_raw_token(N);return}w=fe+$e[1]+`
|
|
|
`,te=$e[4],$e[5]&&(V=fe+$e[5]),te=te.replace(/\n[ \t]*$/,""),($e[2]||$e[3].indexOf(`
|
|
|
`)!==-1)&&($e=$e[3].match(/[ \t]+$/),$e&&(N.whitespace_before=$e[0]))}if(te)if(Z){var Qe=function(){this.eol=`
|
|
|
`};Qe.prototype=this._options.raw_options;var ye=new Qe;te=Z(fe+te,ye)}else{var He=N.whitespace_before;He&&(te=te.replace(new RegExp(`
|
|
|
(`+He+")?","g"),`
|
|
|
`)),te=fe+te.replace(/\n/g,`
|
|
|
`+fe)}w&&(te?te=w+te+`
|
|
|
`+V:te=w+V),X.print_newline(!1),te&&(N.text=te,N.whitespace_before="",N.newlines=0,X.add_raw_token(N),X.print_newline(!0))}},xe.prototype._handle_tag_open=function(X,N,k,q,te){var Z=this._get_tag_open_token(N);if((k.is_unformatted||k.is_content_unformatted)&&!k.is_empty_element&&N.type===Q.TAG_OPEN&&!Z.is_start_tag?(X.add_raw_token(N),Z.start_tag_token=this._tag_stack.try_pop(Z.tag_name)):(X.traverse_whitespace(N),this._set_tag_position(X,N,Z,k,q),Z.is_inline_element||X.set_wrap_point(),X.print_token(N)),Z.is_start_tag&&this._is_wrap_attributes_force){var x=0,w;do w=te.peek(x),w.type===Q.ATTRIBUTE&&(Z.attr_count+=1),x+=1;while(w.type!==Q.EOF&&w.type!==Q.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(Z.alignment_size=N.text.length+1),!Z.tag_complete&&!Z.is_unformatted&&(X.alignment_size=Z.alignment_size),Z};var ke=function(X,N,k){if(this.parent=N||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!k)this.tag_complete=!0;else{var q;this.tag_start_char=k.text[0],this.text=k.text,this.tag_start_char==="<"?(q=k.text.match(/^<([^\s>]*)/),this.tag_check=q?q[1]:""):(q=k.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=q?q[1]:"",(k.text.startsWith("{{#>")||k.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&k.next!==null?this.tag_check=k.next.text.split(" ")[0]:this.tag_check=k.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),k.type===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||k.closed&&k.closed.text==="/>";var te=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(te=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!X.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(te)))}};xe.prototype._get_tag_open_token=function(X){var N=new ke(this._options,this._tag_stack.get_parser_token(),X);return N.alignment_size=this._options.wrap_attributes_indent_size,N.is_end_tag=N.is_end_tag||ue(N.tag_check,this._options.void_elements),N.is_empty_element=N.tag_complete||N.is_start_tag&&N.is_end_tag,N.is_unformatted=!N.tag_complete&&ue(N.tag_check,this._options.unformatted),N.is_content_unformatted=!N.is_empty_element&&ue(N.tag_check,this._options.content_unformatted),N.is_inline_element=ue(N.tag_name,this._options.inline)||this._options.inline_custom_elements&&N.tag_name.includes("-")||N.tag_start_char==="{",N},xe.prototype._set_tag_position=function(X,N,k,q,te){if(k.is_empty_element||(k.is_end_tag?k.start_tag_token=this._tag_stack.try_pop(k.tag_name):(this._do_optional_end_element(k)&&(k.is_inline_element||X.print_newline(!1)),this._tag_stack.record_tag(k),(k.tag_name==="script"||k.tag_name==="style")&&!(k.is_unformatted||k.is_content_unformatted)&&(k.custom_beautifier_name=$(k.tag_check,N)))),ue(k.tag_check,this._options.extra_liners)&&(X.print_newline(!1),X._output.just_added_blankline()||X.print_newline(!0)),k.is_empty_element){if(k.tag_start_char==="{"&&k.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),k.indent_content=!0;var Z=X.current_line_has_match(/{{#if/);Z||X.print_newline(!1)}k.tag_name==="!--"&&te.type===Q.TAG_CLOSE&&q.is_end_tag&&k.text.indexOf(`
|
|
|
`)===-1||(k.is_inline_element||k.is_unformatted||X.print_newline(!1),this._calcluate_parent_multiline(X,k))}else if(k.is_end_tag){var x=!1;x=k.start_tag_token&&k.start_tag_token.multiline_content,x=x||!k.is_inline_element&&!(q.is_inline_element||q.is_unformatted)&&!(te.type===Q.TAG_CLOSE&&k.start_tag_token===q)&&te.type!=="TK_CONTENT",(k.is_content_unformatted||k.is_unformatted)&&(x=!1),x&&X.print_newline(!1)}else k.indent_content=!k.custom_beautifier_name,k.tag_start_char==="<"&&(k.tag_name==="html"?k.indent_content=this._options.indent_inner_html:k.tag_name==="head"?k.indent_content=this._options.indent_head_inner_html:k.tag_name==="body"&&(k.indent_content=this._options.indent_body_inner_html)),!(k.is_inline_element||k.is_unformatted)&&(te.type!=="TK_CONTENT"||k.is_content_unformatted)&&X.print_newline(!1),this._calcluate_parent_multiline(X,k)},xe.prototype._calcluate_parent_multiline=function(X,N){N.parent&&X._output.just_added_newline()&&!((N.is_inline_element||N.is_unformatted)&&N.parent.is_inline_element)&&(N.parent.multiline_content=!0)};var De=["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"],Be=["a","audio","del","ins","map","noscript","video"];xe.prototype._do_optional_end_element=function(X){var N=null;if(!(X.is_empty_element||!X.is_start_tag||!X.parent)){if(X.tag_name==="body")N=N||this._tag_stack.try_pop("head");else if(X.tag_name==="li")N=N||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(X.tag_name==="dd"||X.tag_name==="dt")N=N||this._tag_stack.try_pop("dt",["dl"]),N=N||this._tag_stack.try_pop("dd",["dl"]);else if(X.parent.tag_name==="p"&&De.indexOf(X.tag_name)!==-1){var k=X.parent.parent;(!k||Be.indexOf(k.tag_name)===-1)&&(N=N||this._tag_stack.try_pop("p"))}else X.tag_name==="rp"||X.tag_name==="rt"?(N=N||this._tag_stack.try_pop("rt",["ruby","rtc"]),N=N||this._tag_stack.try_pop("rp",["ruby","rtc"])):X.tag_name==="optgroup"?N=N||this._tag_stack.try_pop("optgroup",["select"]):X.tag_name==="option"?N=N||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):X.tag_name==="colgroup"?N=N||this._tag_stack.try_pop("caption",["table"]):X.tag_name==="thead"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"])):X.tag_name==="tbody"||X.tag_name==="tfoot"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("thead",["table"]),N=N||this._tag_stack.try_pop("tbody",["table"])):X.tag_name==="tr"?(N=N||this._tag_stack.try_pop("caption",["table"]),N=N||this._tag_stack.try_pop("colgroup",["table"]),N=N||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(X.tag_name==="th"||X.tag_name==="td")&&(N=N||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),N=N||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return X.parent=this._tag_stack.get_parser_token(),N}},B.exports.Beautifier=xe},function(B,E,S){var C=S(6).Options;function R(ee){C.call(this,ee,"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"])}R.prototype=new C,B.exports.Options=R},function(B,E,S){var C=S(9).Tokenizer,R=S(9).TOKEN,ee=S(13).Directives,Q=S(14).TemplatablePattern,W=S(12).Pattern,D={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:R.START,RAW:R.RAW,EOF:R.EOF},z=new ee(/<\!--/,/-->/),F=function($,ue){C.call(this,$,ue),this._current_tag_name="";var pe=new Q(this._input).read_options(this._options),oe=new W(this._input);if(this.__patterns={word:pe.until(/[\n\r\t <]/),word_control_flow_close_excluded:pe.until(/[\n\r\t <}]/),single_quote:pe.until_after(/'/),double_quote:pe.until_after(/"/),attribute:pe.until(/[\n\r\t =>]|\/>/),element_name:pe.until(/[\n\r\t >\/]/),angular_control_flow_start:oe.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:oe.starting_with(/{{!--/).until_after(/--}}/),handlebars:oe.starting_with(/{{/).until_after(/}}/),handlebars_open:oe.until(/[\n\r\t }]/),handlebars_raw_close:oe.until(/}}/),comment:oe.starting_with(/<!--/).until_after(/-->/),cdata:oe.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:oe.starting_with(/<!\[/).until_after(/]>/),processing:oe.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 xe=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=oe.matching(xe).until_after(xe)}};F.prototype=new C,F.prototype._is_comment=function($){return!1},F.prototype._is_opening=function($){return $.type===D.TAG_OPEN||$.type===D.CONTROL_FLOW_OPEN},F.prototype._is_closing=function($,ue){return $.type===D.TAG_CLOSE&&ue&&(($.text===">"||$.text==="/>")&&ue.text[0]==="<"||$.text==="}}"&&ue.text[0]==="{"&&ue.text[1]==="{")||$.type===D.CONTROL_FLOW_CLOSE&&$.text==="}"&&ue.text.endsWith("{")},F.prototype._reset=function(){this._current_tag_name=""},F.prototype._get_next_token=function($,ue){var pe=null;this._readWhitespace();var oe=this._input.peek();return oe===null?this._create_token(D.EOF,""):(pe=pe||this._read_open_handlebars(oe,ue),pe=pe||this._read_attribute(oe,$,ue),pe=pe||this._read_close(oe,ue),pe=pe||this._read_script_and_style(oe,$),pe=pe||this._read_control_flows(oe,ue),pe=pe||this._read_raw_content(oe,$,ue),pe=pe||this._read_content_word(oe,ue),pe=pe||this._read_comment_or_cdata(oe),pe=pe||this._read_processing(oe),pe=pe||this._read_open(oe,ue),pe=pe||this._create_token(D.UNKNOWN,this._input.next()),pe)},F.prototype._read_comment_or_cdata=function($){var ue=null,pe=null,oe=null;if($==="<"){var xe=this._input.peek(1);xe==="!"&&(pe=this.__patterns.comment.read(),pe?(oe=z.get_directives(pe),oe&&oe.ignore==="start"&&(pe+=z.readIgnored(this._input))):pe=this.__patterns.cdata.read()),pe&&(ue=this._create_token(D.COMMENT,pe),ue.directives=oe)}return ue},F.prototype._read_processing=function($){var ue=null,pe=null,oe=null;if($==="<"){var xe=this._input.peek(1);(xe==="!"||xe==="?")&&(pe=this.__patterns.conditional_comment.read(),pe=pe||this.__patterns.processing.read()),pe&&(ue=this._create_token(D.COMMENT,pe),ue.directives=oe)}return ue},F.prototype._read_open=function($,ue){var pe=null,oe=null;return(!ue||ue.type===D.CONTROL_FLOW_OPEN)&&$==="<"&&(pe=this._input.next(),this._input.peek()==="/"&&(pe+=this._input.next()),pe+=this.__patterns.element_name.read(),oe=this._create_token(D.TAG_OPEN,pe)),oe},F.prototype._read_open_handlebars=function($,ue){var pe=null,oe=null;return(!ue||ue.type===D.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&$==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(pe=this.__patterns.handlebars_comment.read(),pe=pe||this.__patterns.handlebars.read(),oe=this._create_token(D.COMMENT,pe)):(pe=this.__patterns.handlebars_open.read(),oe=this._create_token(D.TAG_OPEN,pe))),oe},F.prototype._read_control_flows=function($,ue){var pe="",oe=null;if(!this._options.templating.includes("angular"))return oe;if($==="@"){if(pe=this.__patterns.angular_control_flow_start.read(),pe==="")return oe;for(var xe=pe.endsWith("(")?1:0,ke=0;!(pe.endsWith("{")&&xe===ke);){var De=this._input.next();if(De===null)break;De==="("?xe++:De===")"&&ke++,pe+=De}oe=this._create_token(D.CONTROL_FLOW_OPEN,pe)}else $==="}"&&ue&&ue.type===D.CONTROL_FLOW_OPEN&&(pe=this._input.next(),oe=this._create_token(D.CONTROL_FLOW_CLOSE,pe));return oe},F.prototype._read_close=function($,ue){var pe=null,oe=null;return ue&&ue.type===D.TAG_OPEN&&(ue.text[0]==="<"&&($===">"||$==="/"&&this._input.peek(1)===">")?(pe=this._input.next(),$==="/"&&(pe+=this._input.next()),oe=this._create_token(D.TAG_CLOSE,pe)):ue.text[0]==="{"&&$==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),oe=this._create_token(D.TAG_CLOSE,"}}"))),oe},F.prototype._read_attribute=function($,ue,pe){var oe=null,xe="";if(pe&&pe.text[0]==="<")if($==="=")oe=this._create_token(D.EQUALS,this._input.next());else if($==='"'||$==="'"){var ke=this._input.next();$==='"'?ke+=this.__patterns.double_quote.read():ke+=this.__patterns.single_quote.read(),oe=this._create_token(D.VALUE,ke)}else xe=this.__patterns.attribute.read(),xe&&(ue.type===D.EQUALS?oe=this._create_token(D.VALUE,xe):oe=this._create_token(D.ATTRIBUTE,xe));return oe},F.prototype._is_content_unformatted=function($){return this._options.void_elements.indexOf($)===-1&&(this._options.content_unformatted.indexOf($)!==-1||this._options.unformatted.indexOf($)!==-1)},F.prototype._read_raw_content=function($,ue,pe){var oe="";if(pe&&pe.text[0]==="{")oe=this.__patterns.handlebars_raw_close.read();else if(ue.type===D.TAG_CLOSE&&ue.opened.text[0]==="<"&&ue.text[0]!=="/"){var xe=ue.opened.text.substr(1).toLowerCase();this._is_content_unformatted(xe)&&(oe=this._input.readUntil(new RegExp("</"+xe+"[\\n\\r\\t ]*?>","ig")))}return oe?this._create_token(D.TEXT,oe):null},F.prototype._read_script_and_style=function($,ue){if(ue.type===D.TAG_CLOSE&&ue.opened.text[0]==="<"&&ue.text[0]!=="/"){var pe=ue.opened.text.substr(1).toLowerCase();if(pe==="script"||pe==="style"){var oe=this._read_comment_or_cdata($);if(oe)return oe.type=D.TEXT,oe;var xe=this._input.readUntil(new RegExp("</"+pe+"[\\n\\r\\t ]*?>","ig"));if(xe)return this._create_token(D.TEXT,xe)}}return null},F.prototype._read_content_word=function($,ue){var pe="";return this._options.unformatted_content_delimiter&&$===this._options.unformatted_content_delimiter[0]&&(pe=this.__patterns.unformatted_content_delimiter.read()),pe||(pe=ue&&ue.type===D.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),pe?this._create_token(D.TEXT,pe):null},B.exports.Tokenizer=F,B.exports.TOKEN=D}],ae={};function o(B){var E=ae[B];if(E!==void 0)return E.exports;var S=ae[B]={exports:{}};return de[B](S,S.exports,o),S.exports}var G=o(18);se=G})();var ve=se;if(1)m=[_,_(58553),_(87804)],ce=function(de){var ae=_(58553),o=_(87804);return{html_beautify:function(G,B){return ve(G,B,ae.js_beautify,o.css_beautify)}}}.apply(ct,m),ce!==void 0&&(fn.exports=ce);else var j,g})()},58553:function(fn,ct){var _,m;(function(){var ce;(function(){"use strict";var ve=[function(ae,o,G){var B=G(1).Beautifier,E=G(5).Options;function S(C,R){var ee=new B(C,R);return ee.beautify()}ae.exports=S,ae.exports.defaultOptions=function(){return new E}},function(ae,o,G){var B=G(2).Output,E=G(3).Token,S=G(4),C=G(5).Options,R=G(7).Tokenizer,ee=G(7).line_starters,Q=G(7).positionable_operators,W=G(7).TOKEN;function D(w,V){return V.indexOf(w)!==-1}function z(w){return w.replace(/^\s+/g,"")}function F(w){for(var V={},fe=0;fe<w.length;fe++)V[w[fe].replace(/-/g,"_")]=w[fe];return V}function $(w,V){return w&&w.type===W.RESERVED&&w.text===V}function ue(w,V){return w&&w.type===W.RESERVED&&D(w.text,V)}var pe=["case","return","do","if","throw","else","await","break","continue","async"],oe=["before-newline","after-newline","preserve-newline"],xe=F(oe),ke=[xe.before_newline,xe.preserve_newline],De={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Be(w,V){V.multiline_frame||V.mode===De.ForInitializer||V.mode===De.Conditional||w.remove_indent(V.start_line_index)}function X(w){w=w.replace(S.allLineBreaks,`
|
|
|
`);for(var V=[],fe=w.indexOf(`
|
|
|
`);fe!==-1;)V.push(w.substring(0,fe)),w=w.substring(fe+1),fe=w.indexOf(`
|
|
|
`);return w.length&&V.push(w),V}function N(w){return w===De.ArrayLiteral}function k(w){return D(w,[De.Expression,De.ForInitializer,De.Conditional])}function q(w,V){for(var fe=0;fe<w.length;fe++){var $e=w[fe].trim();if($e.charAt(0)!==V)return!1}return!0}function te(w,V){for(var fe=0,$e=w.length,Qe;fe<$e;fe++)if(Qe=w[fe],Qe&&Qe.indexOf(V)!==0)return!1;return!0}function Z(w,V){V=V||{},this._source_text=w||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new C(V)}Z.prototype.create_flags=function(w,V){var fe=0;w&&(fe=w.indentation_level,!this._output.just_added_newline()&&w.line_indent_level>fe&&(fe=w.line_indent_level));var $e={mode:V,parent:w,last_token:w?w.last_token:new E(W.START_BLOCK,""),last_word:w?w.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:fe,alignment:0,line_indent_level:w?w.line_indent_level:fe,start_line_index:this._output.get_line_number(),ternary_depth:0};return $e},Z.prototype._reset=function(w){var V=w.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new B(this._options,V),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(De.BlockStatement);var fe=new R(w,this._options);return this._tokens=fe.tokenize(),w},Z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w,V=this._reset(this._source_text),fe=this._options.eol;this._options.eol==="auto"&&(fe=`
|
|
|
`,V&&S.lineBreak.test(V||"")&&(fe=V.match(S.lineBreak)[0]));for(var $e=this._tokens.next();$e;)this.handle_token($e),this._last_last_text=this._flags.last_token.text,this._flags.last_token=$e,$e=this._tokens.next();return w=this._output.get_code(fe),w},Z.prototype.handle_token=function(w,V){w.type===W.START_EXPR?this.handle_start_expr(w):w.type===W.END_EXPR?this.handle_end_expr(w):w.type===W.START_BLOCK?this.handle_start_block(w):w.type===W.END_BLOCK?this.handle_end_block(w):w.type===W.WORD?this.handle_word(w):w.type===W.RESERVED?this.handle_word(w):w.type===W.SEMICOLON?this.handle_semicolon(w):w.type===W.STRING?this.handle_string(w):w.type===W.EQUALS?this.handle_equals(w):w.type===W.OPERATOR?this.handle_operator(w):w.type===W.COMMA?this.handle_comma(w):w.type===W.BLOCK_COMMENT?this.handle_block_comment(w,V):w.type===W.COMMENT?this.handle_comment(w,V):w.type===W.DOT?this.handle_dot(w):w.type===W.EOF?this.handle_eof(w):w.type===W.UNKNOWN?this.handle_unknown(w,V):this.handle_unknown(w,V)},Z.prototype.handle_whitespace_and_comments=function(w,V){var fe=w.newlines,$e=this._options.keep_array_indentation&&N(this._flags.mode);if(w.comments_before)for(var Qe=w.comments_before.next();Qe;)this.handle_whitespace_and_comments(Qe,V),this.handle_token(Qe,V),Qe=w.comments_before.next();if($e)for(var ye=0;ye<fe;ye+=1)this.print_newline(ye>0,V);else if(this._options.max_preserve_newlines&&fe>this._options.max_preserve_newlines&&(fe=this._options.max_preserve_newlines),this._options.preserve_newlines&&fe>1){this.print_newline(!1,V);for(var He=1;He<fe;He+=1)this.print_newline(!0,V)}};var x=["async","break","continue","return","throw","yield"];Z.prototype.allow_wrap_or_preserved_newline=function(w,V){if(V=V===void 0?!1:V,!this._output.just_added_newline()){var fe=this._options.preserve_newlines&&w.newlines||V,$e=D(this._flags.last_token.text,Q)||D(w.text,Q);if($e){var Qe=D(this._flags.last_token.text,Q)&&D(this._options.operator_position,ke)||D(w.text,Q);fe=fe&&Qe}if(fe)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(ue(this._flags.last_token,x))return;this._output.set_wrap_point()}}},Z.prototype.print_newline=function(w,V){if(!V&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==W.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var fe=this._tokens.peek();this._flags.mode===De.Statement&&!(this._flags.if_block&&$(fe,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(w)&&(this._flags.multiline_frame=!0)},Z.prototype.print_token_line_indentation=function(w){this._output.just_added_newline()&&(this._options.keep_array_indentation&&w.newlines&&(w.text==="["||N(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(w.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},Z.prototype.print_token=function(w){if(this._output.raw){this._output.add_raw_token(w);return}if(this._options.comma_first&&w.previous&&w.previous.type===W.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var V=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(V),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(w),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(w),this._output.non_breaking_space=!0,this._output.add_token(w.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},Z.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.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))},Z.prototype.set_mode=function(w){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,w),this._flags=this.create_flags(this._previous_flags,w),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===De.Statement&&Be(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Z.prototype.start_of_object_property=function(){return this._flags.parent.mode===De.ObjectLiteral&&this._flags.mode===De.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ue(this._flags.last_token,["get","set"]))},Z.prototype.start_of_statement=function(w){var V=!1;return V=V||ue(this._flags.last_token,["var","let","const"])&&w.type===W.WORD,V=V||$(this._flags.last_token,"do"),V=V||!(this._flags.parent.mode===De.ObjectLiteral&&this._flags.mode===De.Statement)&&ue(this._flags.last_token,x)&&!w.newlines,V=V||$(this._flags.last_token,"else")&&!($(w,"if")&&!w.comments_before),V=V||this._flags.last_token.type===W.END_EXPR&&(this._previous_flags.mode===De.ForInitializer||this._previous_flags.mode===De.Conditional),V=V||this._flags.last_token.type===W.WORD&&this._flags.mode===De.BlockStatement&&!this._flags.in_case&&!(w.text==="--"||w.text==="++")&&this._last_last_text!=="function"&&w.type!==W.WORD&&w.type!==W.RESERVED,V=V||this._flags.mode===De.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ue(this._flags.last_token,["get","set"])),V?(this.set_mode(De.Statement),this.indent(),this.handle_whitespace_and_comments(w,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w,ue(w,["do","for","if","while"])),!0):!1},Z.prototype.handle_start_expr=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w);var V=De.Expression;if(w.text==="["){if(this._flags.last_token.type===W.WORD||this._flags.last_token.text===")"){ue(this._flags.last_token,ee)&&(this._output.space_before_token=!0),this.print_token(w),this.set_mode(V),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}V=De.ArrayLiteral,N(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()),D(this._flags.last_token.type,[W.START_EXPR,W.END_EXPR,W.WORD,W.OPERATOR,W.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===W.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,V=De.ForInitializer):D(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,V=De.Conditional):D(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&w.whitespace_before===""?this._output.space_before_token=!1:(D(this._flags.last_token.text,ee)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w);else if(this._flags.last_token.type===W.WORD){this._output.space_before_token=!1;var fe=this._tokens.peek(-3);if(this._options.space_after_named_function&&fe){var $e=this._tokens.peek(-4);ue(fe,["async","function"])||fe.text==="*"&&ue($e,["async","function"])?this._output.space_before_token=!0:this._flags.mode===De.ObjectLiteral?(fe.text==="{"||fe.text===","||fe.text==="*"&&($e.text==="{"||$e.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(w);(this._flags.last_token.type===W.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(D(this._last_last_text,["function","yield"])||this._flags.mode===De.ObjectLiteral&&D(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===W.START_BLOCK?this.print_newline():(this._flags.last_token.type===W.END_EXPR||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===W.COMMA)&&this.allow_wrap_or_preserved_newline(w,w.newlines),this.print_token(w),this.set_mode(V),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Z.prototype.handle_end_expr=function(w){for(;this._flags.mode===De.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(w,w.text==="]"&&N(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===W.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(w),this.restore_mode(),Be(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===De.Conditional&&(this._previous_flags.mode=De.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Z.prototype.handle_start_block=function(w){this.handle_whitespace_and_comments(w);var V=this._tokens.peek(),fe=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===W.END_EXPR?(this.set_mode(De.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(De.BlockStatement):fe&&(D(fe.text,[":",","])&&D(V.type,[W.STRING,W.WORD,W.RESERVED])||D(V.text,["get","set","..."])&&D(fe.type,[W.WORD,W.RESERVED]))?D(this._last_last_text,["class","interface"])&&!D(fe.text,[":",","])?this.set_mode(De.BlockStatement):this.set_mode(De.ObjectLiteral):this._flags.last_token.type===W.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(De.BlockStatement):D(this._flags.last_token.type,[W.EQUALS,W.START_EXPR,W.COMMA,W.OPERATOR])||ue(this._flags.last_token,["return","throw","import","default"])?this.set_mode(De.ObjectLiteral):this.set_mode(De.BlockStatement),this._flags.last_token&&ue(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var $e=!V.comments_before&&V.text==="}",Qe=$e&&this._flags.last_word==="function"&&this._flags.last_token.type===W.END_EXPR;if(this._options.brace_preserve_inline){var ye=0,He=null;this._flags.inline_frame=!0;do if(ye+=1,He=this._tokens.peek(ye-1),He.newlines){this._flags.inline_frame=!1;break}while(He.type!==W.EOF&&!(He.type===W.END_BLOCK&&He.opened===w))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==W.OPERATOR&&(Qe||this._flags.last_token.type===W.EQUALS||ue(this._flags.last_token,pe)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(N(this._previous_flags.mode)&&(this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.COMMA)&&((this._flags.last_token.type===W.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(w),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==W.OPERATOR&&this._flags.last_token.type!==W.START_EXPR&&(D(this._flags.last_token.type,[W.START_BLOCK,W.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(w),this.indent(),!$e&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Z.prototype.handle_end_block=function(w){for(this.handle_whitespace_and_comments(w);this._flags.mode===De.Statement;)this.restore_mode();var V=this._flags.last_token.type===W.START_BLOCK;this._flags.inline_frame&&!V?this._output.space_before_token=!0:this._options.brace_style==="expand"?V||this.print_newline():V||(N(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(w)},Z.prototype.handle_word=function(w){if(w.type===W.RESERVED){if(D(w.text,["set","get"])&&this._flags.mode!==De.ObjectLiteral)w.type=W.WORD;else if(w.text==="import"&&D(this._tokens.peek().text,["(","."]))w.type=W.WORD;else if(D(w.text,["as","from"])&&!this._flags.import_block)w.type=W.WORD;else if(this._flags.mode===De.ObjectLiteral){var V=this._tokens.peek();V.text===":"&&(w.type=W.WORD)}}if(this.start_of_statement(w)?ue(this._flags.last_token,["var","let","const"])&&w.type===W.WORD&&(this._flags.declaration_statement=!0):w.newlines&&!k(this._flags.mode)&&(this._flags.last_token.type!==W.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==W.EQUALS&&(this._options.preserve_newlines||!ue(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(w),this.print_newline()):this.handle_whitespace_and_comments(w),this._flags.do_block&&!this._flags.do_while)if($(w,"while")){this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&$(w,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===De.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&ue(w,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(w),this._flags.in_case=!0;return}if((this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR)&&!this.start_of_object_property()&&!(D(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===De.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(w),$(w,"function")){(D(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(D(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===W.OPERATOR))&&!this._output.just_added_blankline()&&!w.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD?ue(this._flags.last_token,["get","set","new","export"])||ue(this._flags.last_token,x)?this._output.space_before_token=!0:$(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===W.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(k(this._flags.mode)||N(this._flags.mode))||this.print_newline(),this.print_token(w),this._flags.last_word=w.text;return}var fe="NONE";if(this._flags.last_token.type===W.END_BLOCK?this._previous_flags.inline_frame?fe="SPACE":ue(w,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines?fe="NEWLINE":(fe="SPACE",this._output.space_before_token=!0):fe="NEWLINE":this._flags.last_token.type===W.SEMICOLON&&this._flags.mode===De.BlockStatement?fe="NEWLINE":this._flags.last_token.type===W.SEMICOLON&&k(this._flags.mode)?fe="SPACE":this._flags.last_token.type===W.STRING?fe="NEWLINE":this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD||this._flags.last_token.text==="*"&&(D(this._last_last_text,["function","yield"])||this._flags.mode===De.ObjectLiteral&&D(this._last_last_text,["{",","]))?fe="SPACE":this._flags.last_token.type===W.START_BLOCK?this._flags.inline_frame?fe="SPACE":fe="NEWLINE":this._flags.last_token.type===W.END_EXPR&&(this._output.space_before_token=!0,fe="NEWLINE"),ue(w,ee)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?fe="SPACE":fe="NEWLINE"),ue(w,["else","catch","finally"]))if((!(this._flags.last_token.type===W.END_BLOCK&&this._previous_flags.mode===De.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&w.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var $e=this._output.current_line;$e.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else fe==="NEWLINE"?ue(this._flags.last_token,pe)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&ue(w,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==W.END_EXPR?(this._flags.last_token.type!==W.START_EXPR||!ue(w,["var","let","const"]))&&this._flags.last_token.text!==":"&&($(w,"if")&&$(w.previous,"else")?this._output.space_before_token=!0:this.print_newline()):ue(w,ee)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&N(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():fe==="SPACE"&&(this._output.space_before_token=!0);w.previous&&(w.previous.type===W.WORD||w.previous.type===W.RESERVED)&&(this._output.space_before_token=!0),this.print_token(w),this._flags.last_word=w.text,w.type===W.RESERVED&&(w.text==="do"?this._flags.do_block=!0:w.text==="if"?this._flags.if_block=!0:w.text==="import"?this._flags.import_block=!0:this._flags.import_block&&$(w,"from")&&(this._flags.import_block=!1))},Z.prototype.handle_semicolon=function(w){this.start_of_statement(w)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(w);for(var V=this._tokens.peek();this._flags.mode===De.Statement&&!(this._flags.if_block&&$(V,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(w)},Z.prototype.handle_string=function(w){w.text.startsWith("`")&&w.newlines===0&&w.whitespace_before===""&&(w.previous.text===")"||this._flags.last_token.type===W.WORD)||(this.start_of_statement(w)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(w),this._flags.last_token.type===W.RESERVED||this._flags.last_token.type===W.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR||this._flags.last_token.type===W.EQUALS||this._flags.last_token.type===W.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(w):w.text.startsWith("`")&&this._flags.last_token.type===W.END_EXPR&&(w.previous.text==="]"||w.previous.text===")")&&w.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(w)},Z.prototype.handle_equals=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0},Z.prototype.handle_comma=function(w){this.handle_whitespace_and_comments(w,!0),this.print_token(w),this._output.space_before_token=!0,this._flags.declaration_statement?(k(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(w)):this._flags.mode===De.ObjectLiteral||this._flags.mode===De.Statement&&this._flags.parent.mode===De.ObjectLiteral?(this._flags.mode===De.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(w)},Z.prototype.handle_operator=function(w){var V=w.text==="*"&&(ue(this._flags.last_token,["function","yield"])||D(this._flags.last_token.type,[W.START_BLOCK,W.COMMA,W.END_BLOCK,W.SEMICOLON])),fe=D(w.text,["-","+"])&&(D(this._flags.last_token.type,[W.START_BLOCK,W.START_EXPR,W.EQUALS,W.OPERATOR])||D(this._flags.last_token.text,ee)||this._flags.last_token.text===",");if(!this.start_of_statement(w)){var $e=!V;this.handle_whitespace_and_comments(w,$e)}if(w.text==="*"&&this._flags.last_token.type===W.DOT){this.print_token(w);return}if(w.text==="::"){this.print_token(w);return}if(D(w.text,["-","+"])&&this.start_of_object_property()){this.print_token(w);return}if(this._flags.last_token.type===W.OPERATOR&&D(this._options.operator_position,ke)&&this.allow_wrap_or_preserved_newline(w),w.text===":"&&this._flags.in_case){this.print_token(w),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==W.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 Qe=!0,ye=!0,He=!1;if(w.text===":"?this._flags.ternary_depth===0?Qe=!1:(this._flags.ternary_depth-=1,He=!0):w.text==="?"&&(this._flags.ternary_depth+=1),!fe&&!V&&this._options.preserve_newlines&&D(w.text,Q)){var Ye=w.text===":",tt=Ye&&He,nt=Ye&&!He;switch(this._options.operator_position){case xe.before_newline:this._output.space_before_token=!nt,this.print_token(w),(!Ye||tt)&&this.allow_wrap_or_preserved_newline(w),this._output.space_before_token=!0;return;case xe.after_newline:this._output.space_before_token=!0,!Ye||tt?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(w):this._output.space_before_token=!1,this.print_token(w),this._output.space_before_token=!0;return;case xe.preserve_newline:nt||this.allow_wrap_or_preserved_newline(w),Qe=!(this._output.just_added_newline()||nt),this._output.space_before_token=Qe,this.print_token(w),this._output.space_before_token=!0;return}}if(V){this.allow_wrap_or_preserved_newline(w),Qe=!1;var Bt=this._tokens.peek();ye=Bt&&D(Bt.type,[W.WORD,W.RESERVED])}else if(w.text==="...")this.allow_wrap_or_preserved_newline(w),Qe=this._flags.last_token.type===W.START_BLOCK,ye=!1;else if(D(w.text,["--","++","!","~"])||fe){if((this._flags.last_token.type===W.COMMA||this._flags.last_token.type===W.START_EXPR)&&this.allow_wrap_or_preserved_newline(w),Qe=!1,ye=!1,w.newlines&&(w.text==="--"||w.text==="++"||w.text==="~")){var qe=ue(this._flags.last_token,pe)&&w.newlines;qe&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(qe,!0)}this._flags.last_token.text===";"&&k(this._flags.mode)&&(Qe=!0),this._flags.last_token.type===W.RESERVED?Qe=!0:this._flags.last_token.type===W.END_EXPR?Qe=!(this._flags.last_token.text==="]"&&(w.text==="--"||w.text==="++")):this._flags.last_token.type===W.OPERATOR&&(Qe=D(w.text,["--","-","++","+"])&&D(this._flags.last_token.text,["--","-","++","+"]),D(w.text,["+","-"])&&D(this._flags.last_token.text,["--","++"])&&(ye=!0)),(this._flags.mode===De.BlockStatement&&!this._flags.inline_frame||this._flags.mode===De.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Qe,this.print_token(w),this._output.space_before_token=ye},Z.prototype.handle_block_comment=function(w,V){if(this._output.raw){this._output.add_raw_token(w),w.directives&&w.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(w.directives){this.print_newline(!1,V),this.print_token(w),w.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!S.newline.test(w.text)&&!w.newlines){this._output.space_before_token=!0,this.print_token(w),this._output.space_before_token=!0;return}else this.print_block_commment(w,V)},Z.prototype.print_block_commment=function(w,V){var fe=X(w.text),$e,Qe=!1,ye=!1,He=w.whitespace_before,Ye=He.length;if(this.print_newline(!1,V),this.print_token_line_indentation(w),this._output.add_token(fe[0]),this.print_newline(!1,V),fe.length>1){for(fe=fe.slice(1),Qe=q(fe,"*"),ye=te(fe,He),Qe&&(this._flags.alignment=1),$e=0;$e<fe.length;$e++)Qe?(this.print_token_line_indentation(w),this._output.add_token(z(fe[$e]))):ye&&fe[$e]?(this.print_token_line_indentation(w),this._output.add_token(fe[$e].substring(Ye))):(this._output.current_line.set_indent(-1),this._output.add_token(fe[$e])),this.print_newline(!1,V);this._flags.alignment=0}},Z.prototype.handle_comment=function(w,V){w.newlines?this.print_newline(!1,V):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(w),this.print_newline(!1,V)},Z.prototype.handle_dot=function(w){this.start_of_statement(w)||this.handle_whitespace_and_comments(w,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),ue(this._flags.last_token,pe)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(w,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(w)},Z.prototype.handle_unknown=function(w,V){this.print_token(w),w.text[w.text.length-1]===`
|
|
|
`&&this.print_newline(!1,V)},Z.prototype.handle_eof=function(w){for(;this._flags.mode===De.Statement;)this.restore_mode();this.handle_whitespace_and_comments(w)},ae.exports.Beautifier=Z},function(ae){function o(E){this.__parent=E,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var E=new o(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},o.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},o.prototype.has_match=function(E){for(var S=this.__items.length-1;S>=0;S--)if(this.__items[S].match(E))return!0;return!1},o.prototype.set_indent=function(E,S){this.is_empty()&&(this.__indent_count=E||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 E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},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(E){this.__items.push(E);var S=E.lastIndexOf(`
|
|
|
`);S!==-1?this.__character_count=E.length-S:this.__character_count+=E.length},o.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},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 E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function G(E,S){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),S=S||"",E.indent_level>0&&(S=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=S,this.__base_string_length=S.length}G.prototype.get_indent_size=function(E,S){var C=this.__base_string_length;return S=S||0,E<0&&(C=0),C+=E*this.__indent_size,C+=S,C},G.prototype.get_indent_string=function(E,S){var C=this.__base_string;return S=S||0,E<0&&(E=0,C=""),S+=E*this.__indent_size,this.__ensure_cache(S),C+=this.__cache[S],C},G.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},G.prototype.__add_column=function(){var E=this.__cache.length,S=0,C="";this.__indent_size&&E>=this.__indent_size&&(S=Math.floor(E/this.__indent_size),E-=S*this.__indent_size,C=new Array(S+1).join(this.__indent_string)),E&&(C+=new Array(E+1).join(" ")),this.__cache.push(C)};function B(E,S){this.__indent_cache=new G(E,S),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}B.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},B.prototype.get_line_number=function(){return this.__lines.length},B.prototype.get_indent_string=function(E,S){return this.__indent_cache.get_indent_string(E,S)},B.prototype.get_indent_size=function(E,S){return this.__indent_cache.get_indent_size(E,S)},B.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},B.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},B.prototype.get_code=function(E){this.trim(!0);var 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 E!==`
|
|
|
`&&(C=C.replace(/[\n]/g,E)),C},B.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},B.prototype.set_indent=function(E,S){return E=E||0,S=S||0,this.next_line.set_indent(E,S),this.__lines.length>1?(this.current_line.set_indent(E,S),!0):(this.current_line.set_indent(),!1)},B.prototype.add_raw_token=function(E){for(var S=0;S<E.newlines;S++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},B.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},B.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},B.prototype.remove_indent=function(E){for(var S=this.__lines.length;E<S;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},B.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},B.prototype.just_added_newline=function(){return this.current_line.is_empty()},B.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},B.prototype.ensure_empty_line_above=function(E,S){for(var C=this.__lines.length-2;C>=0;){var R=this.__lines[C];if(R.is_empty())break;if(R.item(0).indexOf(E)!==0&&R.item(-1)!==S){this.__lines.splice(C+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}C--}},ae.exports.Output=B},function(ae){function o(G,B,E,S){this.type=G,this.text=B,this.comments_before=null,this.newlines=E||0,this.whitespace_before=S||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ae.exports.Token=o},function(ae,o){var G="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",B="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",E="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",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]+\\}",R="(?:"+C+"|["+G+E+"])",ee="(?:"+C+"|["+B+E+S+"])*";o.identifier=new RegExp(R+ee,"g"),o.identifierStart=new RegExp(R),o.identifierMatch=new RegExp("(?:"+C+"|["+B+E+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(ae,o,G){var B=G(6).Options,E=["before-newline","after-newline","preserve-newline"];function S(C){B.call(this,C,"js");var R=this.raw_options.brace_style||null;R==="expand-strict"?this.raw_options.brace_style="expand":R==="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 ee=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<ee.length;Q++)ee[Q]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=ee[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",E),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}S.prototype=new B,ae.exports.Options=S},function(ae){function o(E,S){this.raw_options=G(E,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(E,S){var C=this.raw_options[E],R=S||[];return typeof C=="object"?C!==null&&typeof C.concat=="function"&&(R=C.concat()):typeof C=="string"&&(R=C.split(/[^a-zA-Z0-9_\/\-]+/)),R},o.prototype._get_boolean=function(E,S){var C=this.raw_options[E],R=C===void 0?!!S:!!C;return R},o.prototype._get_characters=function(E,S){var C=this.raw_options[E],R=S||"";return typeof C=="string"&&(R=C.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),R},o.prototype._get_number=function(E,S){var C=this.raw_options[E];S=parseInt(S,10),isNaN(S)&&(S=0);var R=parseInt(C,10);return isNaN(R)&&(R=S),R},o.prototype._get_selection=function(E,S,C){var R=this._get_selection_list(E,S,C);if(R.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
|
|
|
`+S+`
|
|
|
You passed in: '`+this.raw_options[E]+"'");return R[0]},o.prototype._get_selection_list=function(E,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 R=this._get_array(E,C);if(!this._is_valid_selection(R,S))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
|
|
|
`+S+`
|
|
|
You passed in: '`+this.raw_options[E]+"'");return R},o.prototype._is_valid_selection=function(E,S){return E.length&&S.length&&!E.some(function(C){return S.indexOf(C)===-1})};function G(E,S){var C={};E=B(E);var R;for(R in E)R!==S&&(C[R]=E[R]);if(S&&E[S])for(R in E[S])C[R]=E[S][R];return C}function B(E){var S={},C;for(C in E){var R=C.replace(/-/g,"_");S[R]=E[C]}return S}ae.exports.Options=o,ae.exports.normalizeOpts=B,ae.exports.mergeOpts=G},function(ae,o,G){var B=G(8).InputScanner,E=G(9).Tokenizer,S=G(9).TOKEN,C=G(13).Directives,R=G(4),ee=G(12).Pattern,Q=G(14).TemplatablePattern;function W(q,te){return te.indexOf(q)!==-1}var D={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},z=new C(/\/\*/,/\*\//),F=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,$=/[0-9]/,ue=/[^\d\.]/,pe=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),oe=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";oe=oe.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),oe="\\?\\.(?!\\d) "+oe,oe=oe.replace(/ /g,"|");var xe=new RegExp(oe),ke="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),De=ke.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Be=new RegExp("^(?:"+De.join("|")+")$"),X,N=function(q,te){E.call(this,q,te),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Z=new ee(this._input),x=new Q(this._input).read_options(this._options);this.__patterns={template:x,identifier:x.starting_with(R.identifier).matching(R.identifierMatch),number:Z.matching(F),punct:Z.matching(xe),comment:Z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Z.matching(/<!--/),html_comment_end:Z.matching(/-->/),include:Z.starting_with(/#include/).until_after(R.lineBreak),shebang:Z.starting_with(/#!/).until_after(R.lineBreak),xml:Z.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:x.until(/['\\\n\r\u2028\u2029]/),double_quote:x.until(/["\\\n\r\u2028\u2029]/),template_text:x.until(/[`\\$]/),template_expression:x.until(/[`}\\]/)}};N.prototype=new E,N.prototype._is_comment=function(q){return q.type===D.COMMENT||q.type===D.BLOCK_COMMENT||q.type===D.UNKNOWN},N.prototype._is_opening=function(q){return q.type===D.START_BLOCK||q.type===D.START_EXPR},N.prototype._is_closing=function(q,te){return(q.type===D.END_BLOCK||q.type===D.END_EXPR)&&te&&(q.text==="]"&&te.text==="["||q.text===")"&&te.text==="("||q.text==="}"&&te.text==="{")},N.prototype._reset=function(){X=!1},N.prototype._get_next_token=function(q,te){var Z=null;this._readWhitespace();var x=this._input.peek();return x===null?this._create_token(D.EOF,""):(Z=Z||this._read_non_javascript(x),Z=Z||this._read_string(x),Z=Z||this._read_pair(x,this._input.peek(1)),Z=Z||this._read_word(q),Z=Z||this._read_singles(x),Z=Z||this._read_comment(x),Z=Z||this._read_regexp(x,q),Z=Z||this._read_xml(x,q),Z=Z||this._read_punctuation(),Z=Z||this._create_token(D.UNKNOWN,this._input.next()),Z)},N.prototype._read_word=function(q){var te;if(te=this.__patterns.identifier.read(),te!=="")return te=te.replace(R.allLineBreaks,`
|
|
|
`),!(q.type===D.DOT||q.type===D.RESERVED&&(q.text==="set"||q.text==="get"))&&Be.test(te)?(te==="in"||te==="of")&&(q.type===D.WORD||q.type===D.STRING)?this._create_token(D.OPERATOR,te):this._create_token(D.RESERVED,te):this._create_token(D.WORD,te);if(te=this.__patterns.number.read(),te!=="")return this._create_token(D.WORD,te)},N.prototype._read_singles=function(q){var te=null;return q==="("||q==="["?te=this._create_token(D.START_EXPR,q):q===")"||q==="]"?te=this._create_token(D.END_EXPR,q):q==="{"?te=this._create_token(D.START_BLOCK,q):q==="}"?te=this._create_token(D.END_BLOCK,q):q===";"?te=this._create_token(D.SEMICOLON,q):q==="."&&ue.test(this._input.peek(1))?te=this._create_token(D.DOT,q):q===","&&(te=this._create_token(D.COMMA,q)),te&&this._input.next(),te},N.prototype._read_pair=function(q,te){var Z=null;return q==="#"&&te==="{"&&(Z=this._create_token(D.START_BLOCK,q+te)),Z&&(this._input.next(),this._input.next()),Z},N.prototype._read_punctuation=function(){var q=this.__patterns.punct.read();if(q!=="")return q==="="?this._create_token(D.EQUALS,q):q==="?."?this._create_token(D.DOT,q):this._create_token(D.OPERATOR,q)},N.prototype._read_non_javascript=function(q){var te="";if(q==="#"){if(this._is_first_token()&&(te=this.__patterns.shebang.read(),te))return this._create_token(D.UNKNOWN,te.trim()+`
|
|
|
`);if(te=this.__patterns.include.read(),te)return this._create_token(D.UNKNOWN,te.trim()+`
|
|
|
`);q=this._input.next();var Z="#";if(this._input.hasNext()&&this._input.testChar($)){do q=this._input.next(),Z+=q;while(this._input.hasNext()&&q!=="#"&&q!=="=");return q==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Z+="{}",this._input.next(),this._input.next())),this._create_token(D.WORD,Z)}this._input.back()}else if(q==="<"&&this._is_first_token()){if(te=this.__patterns.html_comment_start.read(),te){for(;this._input.hasNext()&&!this._input.testChar(R.newline);)te+=this._input.next();return X=!0,this._create_token(D.COMMENT,te)}}else if(X&&q==="-"&&(te=this.__patterns.html_comment_end.read(),te))return X=!1,this._create_token(D.COMMENT,te);return null},N.prototype._read_comment=function(q){var te=null;if(q==="/"){var Z="";if(this._input.peek(1)==="*"){Z=this.__patterns.block_comment.read();var x=z.get_directives(Z);x&&x.ignore==="start"&&(Z+=z.readIgnored(this._input)),Z=Z.replace(R.allLineBreaks,`
|
|
|
`),te=this._create_token(D.BLOCK_COMMENT,Z),te.directives=x}else this._input.peek(1)==="/"&&(Z=this.__patterns.comment.read(),te=this._create_token(D.COMMENT,Z))}return te},N.prototype._read_string=function(q){if(q==="`"||q==="'"||q==='"'){var te=this._input.next();return this.has_char_escapes=!1,q==="`"?te+=this._read_string_recursive("`",!0,"${"):te+=this._read_string_recursive(q),this.has_char_escapes&&this._options.unescape_strings&&(te=k(te)),this._input.peek()===q&&(te+=this._input.next()),te=te.replace(R.allLineBreaks,`
|
|
|
`),this._create_token(D.STRING,te)}return null},N.prototype._allow_regexp_or_xml=function(q){return q.type===D.RESERVED&&W(q.text,["return","case","throw","else","do","typeof","yield"])||q.type===D.END_EXPR&&q.text===")"&&q.opened.previous.type===D.RESERVED&&W(q.opened.previous.text,["if","while","for"])||W(q.type,[D.COMMENT,D.START_EXPR,D.START_BLOCK,D.START,D.END_BLOCK,D.OPERATOR,D.EQUALS,D.EOF,D.SEMICOLON,D.COMMA])},N.prototype._read_regexp=function(q,te){if(q==="/"&&this._allow_regexp_or_xml(te)){for(var Z=this._input.next(),x=!1,w=!1;this._input.hasNext()&&(x||w||this._input.peek()!==q)&&!this._input.testChar(R.newline);)Z+=this._input.peek(),x?x=!1:(x=this._input.peek()==="\\",this._input.peek()==="["?w=!0:this._input.peek()==="]"&&(w=!1)),this._input.next();return this._input.peek()===q&&(Z+=this._input.next(),Z+=this._input.read(R.identifier)),this._create_token(D.STRING,Z)}return null},N.prototype._read_xml=function(q,te){if(this._options.e4x&&q==="<"&&this._allow_regexp_or_xml(te)){var Z="",x=this.__patterns.xml.read_match();if(x){for(var w=x[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),V=w.indexOf("{")===0,fe=0;x;){var $e=!!x[1],Qe=x[2],ye=!!x[x.length-1]||Qe.slice(0,8)==="![CDATA[";if(!ye&&(Qe===w||V&&Qe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&($e?--fe:++fe),Z+=x[0],fe<=0)break;x=this.__patterns.xml.read_match()}return x||(Z+=this._input.match(/[\s\S]*/g)[0]),Z=Z.replace(R.allLineBreaks,`
|
|
|
`),this._create_token(D.STRING,Z)}}return null};function k(q){for(var te="",Z=0,x=new B(q),w=null;x.hasNext();)if(w=x.match(/([\s]|[^\\]|\\\\)+/g),w&&(te+=w[0]),x.peek()==="\\"){if(x.next(),x.peek()==="x")w=x.match(/x([0-9A-Fa-f]{2})/g);else if(x.peek()==="u")w=x.match(/u([0-9A-Fa-f]{4})/g),w||(w=x.match(/u\{([0-9A-Fa-f]+)\}/g));else{te+="\\",x.hasNext()&&(te+=x.next());continue}if(!w||(Z=parseInt(w[1],16),Z>126&&Z<=255&&w[0].indexOf("x")===0))return q;Z>=0&&Z<32||Z>1114111?te+="\\"+w[0]:Z===34||Z===39||Z===92?te+="\\"+String.fromCharCode(Z):te+=String.fromCharCode(Z)}return te}N.prototype._read_string_recursive=function(q,te,Z){var x,w;q==="'"?w=this.__patterns.single_quote:q==='"'?w=this.__patterns.double_quote:q==="`"?w=this.__patterns.template_text:q==="}"&&(w=this.__patterns.template_expression);for(var V=w.read(),fe="";this._input.hasNext();){if(fe=this._input.next(),fe===q||!te&&R.newline.test(fe)){this._input.back();break}else fe==="\\"&&this._input.hasNext()?(x=this._input.peek(),x==="x"||x==="u"?this.has_char_escapes=!0:x==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),fe+=this._input.next()):Z&&(Z==="${"&&fe==="$"&&this._input.peek()==="{"&&(fe+=this._input.next()),Z===fe&&(q==="`"?fe+=this._read_string_recursive("}",te,"`"):fe+=this._read_string_recursive("`",te,"${"),this._input.hasNext()&&(fe+=this._input.next())));fe+=w.read(),V+=fe}return V},ae.exports.Tokenizer=N,ae.exports.TOKEN=D,ae.exports.positionable_operators=pe.slice(),ae.exports.line_starters=ke.slice()},function(ae){var o=RegExp.prototype.hasOwnProperty("sticky");function G(B){this.__input=B||"",this.__input_length=this.__input.length,this.__position=0}G.prototype.restart=function(){this.__position=0},G.prototype.back=function(){this.__position>0&&(this.__position-=1)},G.prototype.hasNext=function(){return this.__position<this.__input_length},G.prototype.next=function(){var B=null;return this.hasNext()&&(B=this.__input.charAt(this.__position),this.__position+=1),B},G.prototype.peek=function(B){var E=null;return B=B||0,B+=this.__position,B>=0&&B<this.__input_length&&(E=this.__input.charAt(B)),E},G.prototype.__match=function(B,E){B.lastIndex=E;var S=B.exec(this.__input);return S&&!(o&&B.sticky)&&S.index!==E&&(S=null),S},G.prototype.test=function(B,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(B,E):!1},G.prototype.testChar=function(B,E){var S=this.peek(E);return B.lastIndex=0,S!==null&&B.test(S)},G.prototype.match=function(B){var E=this.__match(B,this.__position);return E?this.__position+=E[0].length:E=null,E},G.prototype.read=function(B,E,S){var C="",R;return B&&(R=this.match(B),R&&(C+=R[0])),E&&(R||!B)&&(C+=this.readUntil(E,S)),C},G.prototype.readUntil=function(B,E){var S="",C=this.__position;B.lastIndex=this.__position;var R=B.exec(this.__input);return R?(C=R.index,E&&(C+=R[0].length)):C=this.__input_length,S=this.__input.substring(this.__position,C),this.__position=C,S},G.prototype.readUntilAfter=function(B){return this.readUntil(B,!0)},G.prototype.get_regexp=function(B,E){var S=null,C="g";return E&&o&&(C="y"),typeof B=="string"&&B!==""?S=new RegExp(B,C):B&&(S=new RegExp(B.source,C)),S},G.prototype.get_literal_regexp=function(B){return RegExp(B.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},G.prototype.peekUntilAfter=function(B){var E=this.__position,S=this.readUntilAfter(B);return this.__position=E,S},G.prototype.lookBack=function(B){var E=this.__position-1;return E>=B.length&&this.__input.substring(E-B.length,E).toLowerCase()===B},ae.exports.InputScanner=G},function(ae,o,G){var B=G(8).InputScanner,E=G(3).Token,S=G(10).TokenStream,C=G(11).WhitespacePattern,R={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},ee=function(Q,W){this._input=new B(Q),this._options=W||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new C(this._input)};ee.prototype.tokenize=function(){this._input.restart(),this.__tokens=new S,this._reset();for(var Q,W=new E(R.START,""),D=null,z=[],F=new S;W.type!==R.EOF;){for(Q=this._get_next_token(W,D);this._is_comment(Q);)F.add(Q),Q=this._get_next_token(W,D);F.isEmpty()||(Q.comments_before=F,F=new S),Q.parent=D,this._is_opening(Q)?(z.push(D),D=Q):D&&this._is_closing(Q,D)&&(Q.opened=D,D.closed=Q,D=z.pop(),Q.parent=D),Q.previous=W,W.next=Q,this.__tokens.add(Q),W=Q}return this.__tokens},ee.prototype._is_first_token=function(){return this.__tokens.isEmpty()},ee.prototype._reset=function(){},ee.prototype._get_next_token=function(Q,W){this._readWhitespace();var D=this._input.read(/.+/g);return D?this._create_token(R.RAW,D):this._create_token(R.EOF,"")},ee.prototype._is_comment=function(Q){return!1},ee.prototype._is_opening=function(Q){return!1},ee.prototype._is_closing=function(Q,W){return!1},ee.prototype._create_token=function(Q,W){var D=new E(Q,W,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return D},ee.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ae.exports.Tokenizer=ee,ae.exports.TOKEN=R},function(ae){function o(G){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=G}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 G=null;return this.hasNext()&&(G=this.__tokens[this.__position],this.__position+=1),G},o.prototype.peek=function(G){var B=null;return G=G||0,G+=this.__position,G>=0&&G<this.__tokens_length&&(B=this.__tokens[G]),B},o.prototype.add=function(G){this.__parent_token&&(G.parent=this.__parent_token),this.__tokens.push(G),this.__tokens_length+=1},ae.exports.TokenStream=o},function(ae,o,G){var B=G(12).Pattern;function E(S,C){B.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=""}E.prototype=new B,E.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+"]")},E.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},E.prototype.matching=function(S,C){var R=this._create();return R.__set_whitespace_patterns(S,C),R._update(),R},E.prototype._create=function(){return new E(this._input,this)},E.prototype.__split=function(S,C){S.lastIndex=0;for(var R=0,ee=[],Q=S.exec(C);Q;)ee.push(C.substring(R,Q.index)),R=Q.index+Q[0].length,Q=S.exec(C);return R<C.length?ee.push(C.substring(R,C.length)):ee.push(""),ee},ae.exports.WhitespacePattern=E},function(ae){function o(G,B){this._input=G,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,B&&(this._starting_pattern=this._input.get_regexp(B._starting_pattern,!0),this._match_pattern=this._input.get_regexp(B._match_pattern,!0),this._until_pattern=this._input.get_regexp(B._until_pattern),this._until_after=B._until_after)}o.prototype.read=function(){var G=this._input.read(this._starting_pattern);return(!this._starting_pattern||G)&&(G+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),G},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(G){var B=this._create();return B._until_after=!0,B._until_pattern=this._input.get_regexp(G),B._update(),B},o.prototype.until=function(G){var B=this._create();return B._until_after=!1,B._until_pattern=this._input.get_regexp(G),B._update(),B},o.prototype.starting_with=function(G){var B=this._create();return B._starting_pattern=this._input.get_regexp(G,!0),B._update(),B},o.prototype.matching=function(G){var B=this._create();return B._match_pattern=this._input.get_regexp(G,!0),B._update(),B},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},ae.exports.Pattern=o},function(ae){function o(G,B){G=typeof G=="string"?G:G.source,B=typeof B=="string"?B:B.source,this.__directives_block_pattern=new RegExp(G+/ beautify( \w+[:]\w+)+ /.source+B,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(G+/\sbeautify\signore:end\s/.source+B,"g")}o.prototype.get_directives=function(G){if(!G.match(this.__directives_block_pattern))return null;var B={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(G);E;)B[E[1]]=E[2],E=this.__directive_pattern.exec(G);return B},o.prototype.readIgnored=function(G){return G.readUntilAfter(this.__directives_end_ignore_pattern)},ae.exports.Directives=o},function(ae,o,G){var B=G(12).Pattern,E={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function S(C,R){B.call(this,C,R),this.__template_pattern=null,this._disabled=Object.assign({},E),this._excluded=Object.assign({},E),R&&(this.__template_pattern=this._input.get_regexp(R.__template_pattern),this._excluded=Object.assign(this._excluded,R._excluded),this._disabled=Object.assign(this._disabled,R._disabled));var ee=new B(C);this.__patterns={handlebars_comment:ee.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:ee.starting_with(/{{{/).until_after(/}}}/),handlebars:ee.starting_with(/{{/).until_after(/}}/),php:ee.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:ee.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:ee.starting_with(/{%/).until_after(/%}/),django_value:ee.starting_with(/{{/).until_after(/}}/),django_comment:ee.starting_with(/{#/).until_after(/#}/),smarty:ee.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:ee.starting_with(/{\*/).until_after(/\*}/),smarty_literal:ee.starting_with(/{literal}/).until_after(/{\/literal}/)}}S.prototype=new B,S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){this.__set_templated_pattern()},S.prototype.disable=function(C){var R=this._create();return R._disabled[C]=!0,R._update(),R},S.prototype.read_options=function(C){var R=this._create();for(var ee in E)R._disabled[ee]=C.templating.indexOf(ee)===-1;return R._update(),R},S.prototype.exclude=function(C){var R=this._create();return R._excluded[C]=!0,R._update(),R},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 R=this._read_template();R;)this._match_pattern?R+=this._input.read(this._match_pattern):R+=this._input.readUntil(this.__template_pattern),C+=R,R=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="",R=this._input.peek();if(R==="<"){var ee=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&ee==="?"&&(C=C||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&ee==="%"&&(C=C||this.__patterns.erb.read())}else R==="{"&&(!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},ae.exports.TemplatablePattern=S}],j={};function g(ae){var o=j[ae];if(o!==void 0)return o.exports;var G=j[ae]={exports:{}};return ve[ae](G,G.exports,g),G.exports}var de=g(0);ce=de})();var se=ce;_=[],m=function(){return{js_beautify:se}}.apply(ct,_),m!==void 0&&(fn.exports=m)})()},15342:function(fn){(function(_,m){fn.exports=m()})(typeof self!="undefined"?self:this,function(){return function(ct){var _={};function m(ce){if(_[ce])return _[ce].exports;var se=_[ce]={i:ce,l:!1,exports:{}};return ct[ce].call(se.exports,se,se.exports,m),se.l=!0,se.exports}return m.m=ct,m.c=_,m.d=function(ce,se,ve){m.o(ce,se)||Object.defineProperty(ce,se,{enumerable:!0,get:ve})},m.r=function(ce){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ce,"__esModule",{value:!0})},m.t=function(ce,se){if(se&1&&(ce=m(ce)),se&8||se&4&&typeof ce=="object"&&ce&&ce.__esModule)return ce;var ve=Object.create(null);if(m.r(ve),Object.defineProperty(ve,"default",{enumerable:!0,value:ce}),se&2&&typeof ce!="string")for(var j in ce)m.d(ve,j,function(g){return ce[g]}.bind(null,j));return ve},m.n=function(ce){var se=ce&&ce.__esModule?function(){return ce.default}:function(){return ce};return m.d(se,"a",se),se},m.o=function(ce,se){return Object.prototype.hasOwnProperty.call(ce,se)},m.p="",m(m.s=1)}([function(ct,_,m){},function(ct,_,m){"use strict";m.r(_);var ce=m(0),se=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}(),ve=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,y){return new K(y,se.range(this,f))},K}(),j=function K(u,h){this.position=void 0;var f="KaTeX parse error: "+u,y,I=h&&h.loc;if(I&&I.start<=I.end){var H=I.lexer.input;y=I.start;var ge=I.end;y===H.length?f+=" at end of input: ":f+=" at position "+(y+1)+": ";var Ae=H.slice(y,ge).replace(/[^]/g,"$&\u0332"),Xe;y>15?Xe="\u2026"+H.slice(y-15,y):Xe=H.slice(0,y);var ft;ge+15<H.length?ft=H.slice(ge,ge+15)+"\u2026":ft=H.slice(ge),f+=Xe+Ae+ft}var Ft=new Error(f);return Ft.name="ParseError",Ft.__proto__=K.prototype,Ft.position=y,Ft};j.prototype.__proto__=Error.prototype;var g=j,de=function(u,h){return u.indexOf(h)!==-1},ae=function(u,h){return u===void 0?h:u},o=/([A-Z])/g,G=function(u){return u.replace(o,"-$1").toLowerCase()},B={"&":"&",">":">","<":"<",'"':""","'":"'"},E=/[&><"']/g;function S(K){return String(K).replace(E,function(u){return B[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},R=function(u){var h=C(u);return h.type==="mathord"||h.type==="textord"||h.type==="atom"},ee=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},Q=function(u){var h=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(u);return h!=null?h[1]:"_relative"},W={contains:de,deflt:ae,escape:S,hyphenate:G,getBaseElem:C,isCharacterBox:R,protocolFromUrl:Q},D=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=W.deflt(h.displayMode,!1),this.output=W.deflt(h.output,"htmlAndMathml"),this.leqno=W.deflt(h.leqno,!1),this.fleqn=W.deflt(h.fleqn,!1),this.throwOnError=W.deflt(h.throwOnError,!0),this.errorColor=W.deflt(h.errorColor,"#cc0000"),this.macros=h.macros||{},this.minRuleThickness=Math.max(0,W.deflt(h.minRuleThickness,0)),this.colorIsTextColor=W.deflt(h.colorIsTextColor,!1),this.strict=W.deflt(h.strict,"warn"),this.trust=W.deflt(h.trust,!1),this.maxSize=Math.max(0,W.deflt(h.maxSize,1/0)),this.maxExpand=Math.max(0,W.deflt(h.maxExpand,1e3))}var u=K.prototype;return u.reportNonstrict=function(f,y,I){var H=this.strict;if(typeof H=="function"&&(H=H(f,y,I)),!(!H||H==="ignore")){if(H===!0||H==="error")throw new g("LaTeX-incompatible input and strict mode is set to 'error': "+(y+" ["+f+"]"),I);H==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+H+"': "+y+" ["+f+"]"))}},u.useStrictBehavior=function(f,y,I){var H=this.strict;if(typeof H=="function")try{H=H(f,y,I)}catch(ge){H="error"}return!H||H==="ignore"?!1:H===!0||H==="error"?!0:H==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(y+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+H+"': "+y+" ["+f+"]")),!1)},u.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=W.protocolFromUrl(f.url));var y=typeof this.trust=="function"?this.trust(f):this.trust;return!!y},K}(),z=function(){function K(h,f,y){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=f,this.cramped=y}var u=K.prototype;return u.sup=function(){return Be[X[this.id]]},u.sub=function(){return Be[N[this.id]]},u.fracNum=function(){return Be[k[this.id]]},u.fracDen=function(){return Be[q[this.id]]},u.cramp=function(){return Be[te[this.id]]},u.text=function(){return Be[Z[this.id]]},u.isTight=function(){return this.size>=2},K}(),F=0,$=1,ue=2,pe=3,oe=4,xe=5,ke=6,De=7,Be=[new z(F,0,!1),new z($,0,!0),new z(ue,1,!1),new z(pe,1,!0),new z(oe,2,!1),new z(xe,2,!0),new z(ke,3,!1),new z(De,3,!0)],X=[oe,xe,oe,xe,ke,De,ke,De],N=[xe,xe,xe,xe,De,De,De,De],k=[ue,pe,oe,xe,ke,De,ke,De],q=[pe,pe,xe,xe,De,De,De,De],te=[$,$,pe,pe,xe,xe,De,De],Z=[F,$,ue,pe,ue,pe,ue,pe],x={DISPLAY:Be[F],TEXT:Be[ue],SCRIPT:Be[oe],SCRIPTSCRIPT:Be[ke]},w=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function V(K){for(var u=0;u<w.length;u++)for(var h=w[u],f=0;f<h.blocks.length;f++){var y=h.blocks[f];if(K>=y[0]&&K<=y[1])return h.name}return null}var fe=[];w.forEach(function(K){return K.blocks.forEach(function(u){return fe.push.apply(fe,u)})});function $e(K){for(var u=0;u<fe.length;u+=2)if(K>=fe[u]&&K<=fe[u+1])return!0;return!1}var Qe=80,ye=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"},He=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"},tt=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"},nt=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"},Bt=function(u,h,f){var y=f-54-h-u;return"M702 "+(u+h)+"H400000"+(40+u)+`
|
|
|
H742v`+y+`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"},qe=function(u,h,f){h=1e3*h;var y="";switch(u){case"sqrtMain":y=ye(h,Qe);break;case"sqrtSize1":y=He(h,Qe);break;case"sqrtSize2":y=Ye(h,Qe);break;case"sqrtSize3":y=tt(h,Qe);break;case"sqrtSize4":y=nt(h,Qe);break;case"sqrtTall":y=Bt(h,Qe,f)}return y},jt={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`},Ue=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 W.contains(this.classes,f)},u.toNode=function(){for(var f=document.createDocumentFragment(),y=0;y<this.children.length;y++)f.appendChild(this.children[y].toNode());return f},u.toMarkup=function(){for(var f="",y=0;y<this.children.length;y++)f+=this.children[y].toMarkup();return f},u.toText=function(){var f=function(I){return I.toText()};return this.children.map(f).join("")},K}(),yt=function(u){return u.filter(function(h){return h}).join(" ")},Le=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 y=h.getColor();y&&(this.style.color=y)}},Ce=function(u){var h=document.createElement(u);h.className=yt(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(h.style[f]=this.style[f]);for(var y in this.attributes)this.attributes.hasOwnProperty(y)&&h.setAttribute(y,this.attributes[y]);for(var I=0;I<this.children.length;I++)h.appendChild(this.children[I].toNode());return h},he=function(u){var h="<"+u;this.classes.length&&(h+=' class="'+W.escape(yt(this.classes))+'"');var f="";for(var y in this.style)this.style.hasOwnProperty(y)&&(f+=W.hyphenate(y)+":"+this.style[y]+";");f&&(h+=' style="'+W.escape(f)+'"');for(var I in this.attributes)this.attributes.hasOwnProperty(I)&&(h+=" "+I+'="'+W.escape(this.attributes[I])+'"');h+=">";for(var H=0;H<this.children.length;H++)h+=this.children[H].toMarkup();return h+="</"+u+">",h},We=function(){function K(h,f,y,I){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,Le.call(this,h,y,I),this.children=f||[]}var u=K.prototype;return u.setAttribute=function(f,y){this.attributes[f]=y},u.hasClass=function(f){return W.contains(this.classes,f)},u.toNode=function(){return Ce.call(this,"span")},u.toMarkup=function(){return he.call(this,"span")},K}(),Re=function(){function K(h,f,y,I){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,Le.call(this,f,I),this.children=y||[],this.setAttribute("href",h)}var u=K.prototype;return u.setAttribute=function(f,y){this.attributes[f]=y},u.hasClass=function(f){return W.contains(this.classes,f)},u.toNode=function(){return Ce.call(this,"a")},u.toMarkup=function(){return he.call(this,"a")},K}(),Ie=function(){function K(h,f,y){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=y}var u=K.prototype;return u.hasClass=function(f){return W.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 y in this.style)this.style.hasOwnProperty(y)&&(f.style[y]=this.style[y]);return f},u.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",y="";for(var I in this.style)this.style.hasOwnProperty(I)&&(y+=W.hyphenate(I)+":"+this.style[I]+";");return y&&(f+=' style="'+W.escape(y)+'"'),f+="'/>",f},K}(),M={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},me=function(){function K(h,f,y,I,H,ge,Ae,Xe){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=y||0,this.italic=I||0,this.skew=H||0,this.width=ge||0,this.classes=Ae||[],this.style=Xe||{},this.maxFontSize=0;var ft=V(this.text.charCodeAt(0));ft&&this.classes.push(ft+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=M[this.text])}var u=K.prototype;return u.hasClass=function(f){return W.contains(this.classes,f)},u.toNode=function(){var f=document.createTextNode(this.text),y=null;this.italic>0&&(y=document.createElement("span"),y.style.marginRight=this.italic+"em"),this.classes.length>0&&(y=y||document.createElement("span"),y.className=yt(this.classes));for(var I in this.style)this.style.hasOwnProperty(I)&&(y=y||document.createElement("span"),y.style[I]=this.style[I]);return y?(y.appendChild(f),y):f},u.toMarkup=function(){var f=!1,y="<span";this.classes.length&&(f=!0,y+=' class="',y+=W.escape(yt(this.classes)),y+='"');var I="";this.italic>0&&(I+="margin-right:"+this.italic+"em;");for(var H in this.style)this.style.hasOwnProperty(H)&&(I+=W.hyphenate(H)+":"+this.style[H]+";");I&&(f=!0,y+=' style="'+W.escape(I)+'"');var ge=W.escape(this.text);return f?(y+=">",y+=ge,y+="</span>",y):ge},K}(),Ee=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",y=document.createElementNS(f,"svg");for(var I in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,I)&&y.setAttribute(I,this.attributes[I]);for(var H=0;H<this.children.length;H++)y.appendChild(this.children[H].toNode());return y},u.toMarkup=function(){var f="<svg";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+"='"+this.attributes[y]+"'");f+=">";for(var I=0;I<this.children.length;I++)f+=this.children[I].toMarkup();return f+="</svg>",f},K}(),Ke=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",y=document.createElementNS(f,"path");return this.alternate?y.setAttribute("d",this.alternate):y.setAttribute("d",jt[this.pathName]),y},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+jt[this.pathName]+"'/>"},K}(),et=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",y=document.createElementNS(f,"line");for(var I in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,I)&&y.setAttribute(I,this.attributes[I]);return y},u.toMarkup=function(){var f="<line";for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+"='"+this.attributes[y]+"'");return f+="/>",f},K}();function ut(K){if(K instanceof me)return K;throw new Error("Expected symbolNode but got "+String(K)+".")}function St(K){if(K instanceof We)return K;throw new Error("Expected span<HtmlDomNode> but got "+String(K)+".")}var Dt={"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]}},mt={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]},kt={\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 Ht(K,u){Dt[K]=u}function zt(K,u,h){if(!Dt[u])throw new Error("Font metrics not found for font: "+u+".");var f=K.charCodeAt(0),y=Dt[u][f];if(!y&&K[0]in kt&&(f=kt[K[0]].charCodeAt(0),y=Dt[u][f]),!y&&h==="text"&&$e(f)&&(y=Dt[u][77]),y)return{depth:y[0],height:y[1],italic:y[2],skew:y[3],width:y[4]}}var Ut={};function st(K){var u;if(K>=5?u=0:K>=3?u=1:u=2,!Ut[u]){var h=Ut[u]={cssEmPerMu:mt.quad[u]/18};for(var f in mt)mt.hasOwnProperty(f)&&(h[f]=mt[f][u])}return Ut[u]}var Rt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Lt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},_e={math:{},text:{}},Ze=_e;function b(K,u,h,f,y,I){_e[K][y]={font:u,group:h,replace:f},I&&f&&(_e[K][f]=_e[K][y])}var A="math",Oe="text",U="main",le="ams",wt="accent-token",Se="bin",je="close",Ge="inner",Y="mathord",ne="op-token",be="open",Pe="punct",P="rel",Je="spacing",J="textord";b(A,U,P,"\u2261","\\equiv",!0),b(A,U,P,"\u227A","\\prec",!0),b(A,U,P,"\u227B","\\succ",!0),b(A,U,P,"\u223C","\\sim",!0),b(A,U,P,"\u22A5","\\perp"),b(A,U,P,"\u2AAF","\\preceq",!0),b(A,U,P,"\u2AB0","\\succeq",!0),b(A,U,P,"\u2243","\\simeq",!0),b(A,U,P,"\u2223","\\mid",!0),b(A,U,P,"\u226A","\\ll",!0),b(A,U,P,"\u226B","\\gg",!0),b(A,U,P,"\u224D","\\asymp",!0),b(A,U,P,"\u2225","\\parallel"),b(A,U,P,"\u22C8","\\bowtie",!0),b(A,U,P,"\u2323","\\smile",!0),b(A,U,P,"\u2291","\\sqsubseteq",!0),b(A,U,P,"\u2292","\\sqsupseteq",!0),b(A,U,P,"\u2250","\\doteq",!0),b(A,U,P,"\u2322","\\frown",!0),b(A,U,P,"\u220B","\\ni",!0),b(A,U,P,"\u221D","\\propto",!0),b(A,U,P,"\u22A2","\\vdash",!0),b(A,U,P,"\u22A3","\\dashv",!0),b(A,U,P,"\u220B","\\owns"),b(A,U,Pe,".","\\ldotp"),b(A,U,Pe,"\u22C5","\\cdotp"),b(A,U,J,"#","\\#"),b(Oe,U,J,"#","\\#"),b(A,U,J,"&","\\&"),b(Oe,U,J,"&","\\&"),b(A,U,J,"\u2135","\\aleph",!0),b(A,U,J,"\u2200","\\forall",!0),b(A,U,J,"\u210F","\\hbar",!0),b(A,U,J,"\u2203","\\exists",!0),b(A,U,J,"\u2207","\\nabla",!0),b(A,U,J,"\u266D","\\flat",!0),b(A,U,J,"\u2113","\\ell",!0),b(A,U,J,"\u266E","\\natural",!0),b(A,U,J,"\u2663","\\clubsuit",!0),b(A,U,J,"\u2118","\\wp",!0),b(A,U,J,"\u266F","\\sharp",!0),b(A,U,J,"\u2662","\\diamondsuit",!0),b(A,U,J,"\u211C","\\Re",!0),b(A,U,J,"\u2661","\\heartsuit",!0),b(A,U,J,"\u2111","\\Im",!0),b(A,U,J,"\u2660","\\spadesuit",!0),b(Oe,U,J,"\xA7","\\S",!0),b(Oe,U,J,"\xB6","\\P",!0),b(A,U,J,"\u2020","\\dag"),b(Oe,U,J,"\u2020","\\dag"),b(Oe,U,J,"\u2020","\\textdagger"),b(A,U,J,"\u2021","\\ddag"),b(Oe,U,J,"\u2021","\\ddag"),b(Oe,U,J,"\u2021","\\textdaggerdbl"),b(A,U,je,"\u23B1","\\rmoustache",!0),b(A,U,be,"\u23B0","\\lmoustache",!0),b(A,U,je,"\u27EF","\\rgroup",!0),b(A,U,be,"\u27EE","\\lgroup",!0),b(A,U,Se,"\u2213","\\mp",!0),b(A,U,Se,"\u2296","\\ominus",!0),b(A,U,Se,"\u228E","\\uplus",!0),b(A,U,Se,"\u2293","\\sqcap",!0),b(A,U,Se,"\u2217","\\ast"),b(A,U,Se,"\u2294","\\sqcup",!0),b(A,U,Se,"\u25EF","\\bigcirc"),b(A,U,Se,"\u2219","\\bullet"),b(A,U,Se,"\u2021","\\ddagger"),b(A,U,Se,"\u2240","\\wr",!0),b(A,U,Se,"\u2A3F","\\amalg"),b(A,U,Se,"&","\\And"),b(A,U,P,"\u27F5","\\longleftarrow",!0),b(A,U,P,"\u21D0","\\Leftarrow",!0),b(A,U,P,"\u27F8","\\Longleftarrow",!0),b(A,U,P,"\u27F6","\\longrightarrow",!0),b(A,U,P,"\u21D2","\\Rightarrow",!0),b(A,U,P,"\u27F9","\\Longrightarrow",!0),b(A,U,P,"\u2194","\\leftrightarrow",!0),b(A,U,P,"\u27F7","\\longleftrightarrow",!0),b(A,U,P,"\u21D4","\\Leftrightarrow",!0),b(A,U,P,"\u27FA","\\Longleftrightarrow",!0),b(A,U,P,"\u21A6","\\mapsto",!0),b(A,U,P,"\u27FC","\\longmapsto",!0),b(A,U,P,"\u2197","\\nearrow",!0),b(A,U,P,"\u21A9","\\hookleftarrow",!0),b(A,U,P,"\u21AA","\\hookrightarrow",!0),b(A,U,P,"\u2198","\\searrow",!0),b(A,U,P,"\u21BC","\\leftharpoonup",!0),b(A,U,P,"\u21C0","\\rightharpoonup",!0),b(A,U,P,"\u2199","\\swarrow",!0),b(A,U,P,"\u21BD","\\leftharpoondown",!0),b(A,U,P,"\u21C1","\\rightharpoondown",!0),b(A,U,P,"\u2196","\\nwarrow",!0),b(A,U,P,"\u21CC","\\rightleftharpoons",!0),b(A,le,P,"\u226E","\\nless",!0),b(A,le,P,"\uE010","\\@nleqslant"),b(A,le,P,"\uE011","\\@nleqq"),b(A,le,P,"\u2A87","\\lneq",!0),b(A,le,P,"\u2268","\\lneqq",!0),b(A,le,P,"\uE00C","\\@lvertneqq"),b(A,le,P,"\u22E6","\\lnsim",!0),b(A,le,P,"\u2A89","\\lnapprox",!0),b(A,le,P,"\u2280","\\nprec",!0),b(A,le,P,"\u22E0","\\npreceq",!0),b(A,le,P,"\u22E8","\\precnsim",!0),b(A,le,P,"\u2AB9","\\precnapprox",!0),b(A,le,P,"\u2241","\\nsim",!0),b(A,le,P,"\uE006","\\@nshortmid"),b(A,le,P,"\u2224","\\nmid",!0),b(A,le,P,"\u22AC","\\nvdash",!0),b(A,le,P,"\u22AD","\\nvDash",!0),b(A,le,P,"\u22EA","\\ntriangleleft"),b(A,le,P,"\u22EC","\\ntrianglelefteq",!0),b(A,le,P,"\u228A","\\subsetneq",!0),b(A,le,P,"\uE01A","\\@varsubsetneq"),b(A,le,P,"\u2ACB","\\subsetneqq",!0),b(A,le,P,"\uE017","\\@varsubsetneqq"),b(A,le,P,"\u226F","\\ngtr",!0),b(A,le,P,"\uE00F","\\@ngeqslant"),b(A,le,P,"\uE00E","\\@ngeqq"),b(A,le,P,"\u2A88","\\gneq",!0),b(A,le,P,"\u2269","\\gneqq",!0),b(A,le,P,"\uE00D","\\@gvertneqq"),b(A,le,P,"\u22E7","\\gnsim",!0),b(A,le,P,"\u2A8A","\\gnapprox",!0),b(A,le,P,"\u2281","\\nsucc",!0),b(A,le,P,"\u22E1","\\nsucceq",!0),b(A,le,P,"\u22E9","\\succnsim",!0),b(A,le,P,"\u2ABA","\\succnapprox",!0),b(A,le,P,"\u2246","\\ncong",!0),b(A,le,P,"\uE007","\\@nshortparallel"),b(A,le,P,"\u2226","\\nparallel",!0),b(A,le,P,"\u22AF","\\nVDash",!0),b(A,le,P,"\u22EB","\\ntriangleright"),b(A,le,P,"\u22ED","\\ntrianglerighteq",!0),b(A,le,P,"\uE018","\\@nsupseteqq"),b(A,le,P,"\u228B","\\supsetneq",!0),b(A,le,P,"\uE01B","\\@varsupsetneq"),b(A,le,P,"\u2ACC","\\supsetneqq",!0),b(A,le,P,"\uE019","\\@varsupsetneqq"),b(A,le,P,"\u22AE","\\nVdash",!0),b(A,le,P,"\u2AB5","\\precneqq",!0),b(A,le,P,"\u2AB6","\\succneqq",!0),b(A,le,P,"\uE016","\\@nsubseteqq"),b(A,le,Se,"\u22B4","\\unlhd"),b(A,le,Se,"\u22B5","\\unrhd"),b(A,le,P,"\u219A","\\nleftarrow",!0),b(A,le,P,"\u219B","\\nrightarrow",!0),b(A,le,P,"\u21CD","\\nLeftarrow",!0),b(A,le,P,"\u21CF","\\nRightarrow",!0),b(A,le,P,"\u21AE","\\nleftrightarrow",!0),b(A,le,P,"\u21CE","\\nLeftrightarrow",!0),b(A,le,P,"\u25B3","\\vartriangle"),b(A,le,J,"\u210F","\\hslash"),b(A,le,J,"\u25BD","\\triangledown"),b(A,le,J,"\u25CA","\\lozenge"),b(A,le,J,"\u24C8","\\circledS"),b(A,le,J,"\xAE","\\circledR"),b(Oe,le,J,"\xAE","\\circledR"),b(A,le,J,"\u2221","\\measuredangle",!0),b(A,le,J,"\u2204","\\nexists"),b(A,le,J,"\u2127","\\mho"),b(A,le,J,"\u2132","\\Finv",!0),b(A,le,J,"\u2141","\\Game",!0),b(A,le,J,"\u2035","\\backprime"),b(A,le,J,"\u25B2","\\blacktriangle"),b(A,le,J,"\u25BC","\\blacktriangledown"),b(A,le,J,"\u25A0","\\blacksquare"),b(A,le,J,"\u29EB","\\blacklozenge"),b(A,le,J,"\u2605","\\bigstar"),b(A,le,J,"\u2222","\\sphericalangle",!0),b(A,le,J,"\u2201","\\complement",!0),b(A,le,J,"\xF0","\\eth",!0),b(A,le,J,"\u2571","\\diagup"),b(A,le,J,"\u2572","\\diagdown"),b(A,le,J,"\u25A1","\\square"),b(A,le,J,"\u25A1","\\Box"),b(A,le,J,"\u25CA","\\Diamond"),b(A,le,J,"\xA5","\\yen",!0),b(Oe,le,J,"\xA5","\\yen",!0),b(A,le,J,"\u2713","\\checkmark",!0),b(Oe,le,J,"\u2713","\\checkmark"),b(A,le,J,"\u2136","\\beth",!0),b(A,le,J,"\u2138","\\daleth",!0),b(A,le,J,"\u2137","\\gimel",!0),b(A,le,J,"\u03DD","\\digamma",!0),b(A,le,J,"\u03F0","\\varkappa"),b(A,le,be,"\u250C","\\ulcorner",!0),b(A,le,je,"\u2510","\\urcorner",!0),b(A,le,be,"\u2514","\\llcorner",!0),b(A,le,je,"\u2518","\\lrcorner",!0),b(A,le,P,"\u2266","\\leqq",!0),b(A,le,P,"\u2A7D","\\leqslant",!0),b(A,le,P,"\u2A95","\\eqslantless",!0),b(A,le,P,"\u2272","\\lesssim",!0),b(A,le,P,"\u2A85","\\lessapprox",!0),b(A,le,P,"\u224A","\\approxeq",!0),b(A,le,Se,"\u22D6","\\lessdot"),b(A,le,P,"\u22D8","\\lll",!0),b(A,le,P,"\u2276","\\lessgtr",!0),b(A,le,P,"\u22DA","\\lesseqgtr",!0),b(A,le,P,"\u2A8B","\\lesseqqgtr",!0),b(A,le,P,"\u2251","\\doteqdot"),b(A,le,P,"\u2253","\\risingdotseq",!0),b(A,le,P,"\u2252","\\fallingdotseq",!0),b(A,le,P,"\u223D","\\backsim",!0),b(A,le,P,"\u22CD","\\backsimeq",!0),b(A,le,P,"\u2AC5","\\subseteqq",!0),b(A,le,P,"\u22D0","\\Subset",!0),b(A,le,P,"\u228F","\\sqsubset",!0),b(A,le,P,"\u227C","\\preccurlyeq",!0),b(A,le,P,"\u22DE","\\curlyeqprec",!0),b(A,le,P,"\u227E","\\precsim",!0),b(A,le,P,"\u2AB7","\\precapprox",!0),b(A,le,P,"\u22B2","\\vartriangleleft"),b(A,le,P,"\u22B4","\\trianglelefteq"),b(A,le,P,"\u22A8","\\vDash",!0),b(A,le,P,"\u22AA","\\Vvdash",!0),b(A,le,P,"\u2323","\\smallsmile"),b(A,le,P,"\u2322","\\smallfrown"),b(A,le,P,"\u224F","\\bumpeq",!0),b(A,le,P,"\u224E","\\Bumpeq",!0),b(A,le,P,"\u2267","\\geqq",!0),b(A,le,P,"\u2A7E","\\geqslant",!0),b(A,le,P,"\u2A96","\\eqslantgtr",!0),b(A,le,P,"\u2273","\\gtrsim",!0),b(A,le,P,"\u2A86","\\gtrapprox",!0),b(A,le,Se,"\u22D7","\\gtrdot"),b(A,le,P,"\u22D9","\\ggg",!0),b(A,le,P,"\u2277","\\gtrless",!0),b(A,le,P,"\u22DB","\\gtreqless",!0),b(A,le,P,"\u2A8C","\\gtreqqless",!0),b(A,le,P,"\u2256","\\eqcirc",!0),b(A,le,P,"\u2257","\\circeq",!0),b(A,le,P,"\u225C","\\triangleq",!0),b(A,le,P,"\u223C","\\thicksim"),b(A,le,P,"\u2248","\\thickapprox"),b(A,le,P,"\u2AC6","\\supseteqq",!0),b(A,le,P,"\u22D1","\\Supset",!0),b(A,le,P,"\u2290","\\sqsupset",!0),b(A,le,P,"\u227D","\\succcurlyeq",!0),b(A,le,P,"\u22DF","\\curlyeqsucc",!0),b(A,le,P,"\u227F","\\succsim",!0),b(A,le,P,"\u2AB8","\\succapprox",!0),b(A,le,P,"\u22B3","\\vartriangleright"),b(A,le,P,"\u22B5","\\trianglerighteq"),b(A,le,P,"\u22A9","\\Vdash",!0),b(A,le,P,"\u2223","\\shortmid"),b(A,le,P,"\u2225","\\shortparallel"),b(A,le,P,"\u226C","\\between",!0),b(A,le,P,"\u22D4","\\pitchfork",!0),b(A,le,P,"\u221D","\\varpropto"),b(A,le,P,"\u25C0","\\blacktriangleleft"),b(A,le,P,"\u2234","\\therefore",!0),b(A,le,P,"\u220D","\\backepsilon"),b(A,le,P,"\u25B6","\\blacktriangleright"),b(A,le,P,"\u2235","\\because",!0),b(A,le,P,"\u22D8","\\llless"),b(A,le,P,"\u22D9","\\gggtr"),b(A,le,Se,"\u22B2","\\lhd"),b(A,le,Se,"\u22B3","\\rhd"),b(A,le,P,"\u2242","\\eqsim",!0),b(A,U,P,"\u22C8","\\Join"),b(A,le,P,"\u2251","\\Doteq",!0),b(A,le,Se,"\u2214","\\dotplus",!0),b(A,le,Se,"\u2216","\\smallsetminus"),b(A,le,Se,"\u22D2","\\Cap",!0),b(A,le,Se,"\u22D3","\\Cup",!0),b(A,le,Se,"\u2A5E","\\doublebarwedge",!0),b(A,le,Se,"\u229F","\\boxminus",!0),b(A,le,Se,"\u229E","\\boxplus",!0),b(A,le,Se,"\u22C7","\\divideontimes",!0),b(A,le,Se,"\u22C9","\\ltimes",!0),b(A,le,Se,"\u22CA","\\rtimes",!0),b(A,le,Se,"\u22CB","\\leftthreetimes",!0),b(A,le,Se,"\u22CC","\\rightthreetimes",!0),b(A,le,Se,"\u22CF","\\curlywedge",!0),b(A,le,Se,"\u22CE","\\curlyvee",!0),b(A,le,Se,"\u229D","\\circleddash",!0),b(A,le,Se,"\u229B","\\circledast",!0),b(A,le,Se,"\u22C5","\\centerdot"),b(A,le,Se,"\u22BA","\\intercal",!0),b(A,le,Se,"\u22D2","\\doublecap"),b(A,le,Se,"\u22D3","\\doublecup"),b(A,le,Se,"\u22A0","\\boxtimes",!0),b(A,le,P,"\u21E2","\\dashrightarrow",!0),b(A,le,P,"\u21E0","\\dashleftarrow",!0),b(A,le,P,"\u21C7","\\leftleftarrows",!0),b(A,le,P,"\u21C6","\\leftrightarrows",!0),b(A,le,P,"\u21DA","\\Lleftarrow",!0),b(A,le,P,"\u219E","\\twoheadleftarrow",!0),b(A,le,P,"\u21A2","\\leftarrowtail",!0),b(A,le,P,"\u21AB","\\looparrowleft",!0),b(A,le,P,"\u21CB","\\leftrightharpoons",!0),b(A,le,P,"\u21B6","\\curvearrowleft",!0),b(A,le,P,"\u21BA","\\circlearrowleft",!0),b(A,le,P,"\u21B0","\\Lsh",!0),b(A,le,P,"\u21C8","\\upuparrows",!0),b(A,le,P,"\u21BF","\\upharpoonleft",!0),b(A,le,P,"\u21C3","\\downharpoonleft",!0),b(A,le,P,"\u22B8","\\multimap",!0),b(A,le,P,"\u21AD","\\leftrightsquigarrow",!0),b(A,le,P,"\u21C9","\\rightrightarrows",!0),b(A,le,P,"\u21C4","\\rightleftarrows",!0),b(A,le,P,"\u21A0","\\twoheadrightarrow",!0),b(A,le,P,"\u21A3","\\rightarrowtail",!0),b(A,le,P,"\u21AC","\\looparrowright",!0),b(A,le,P,"\u21B7","\\curvearrowright",!0),b(A,le,P,"\u21BB","\\circlearrowright",!0),b(A,le,P,"\u21B1","\\Rsh",!0),b(A,le,P,"\u21CA","\\downdownarrows",!0),b(A,le,P,"\u21BE","\\upharpoonright",!0),b(A,le,P,"\u21C2","\\downharpoonright",!0),b(A,le,P,"\u21DD","\\rightsquigarrow",!0),b(A,le,P,"\u21DD","\\leadsto"),b(A,le,P,"\u21DB","\\Rrightarrow",!0),b(A,le,P,"\u21BE","\\restriction"),b(A,U,J,"\u2018","`"),b(A,U,J,"$","\\$"),b(Oe,U,J,"$","\\$"),b(Oe,U,J,"$","\\textdollar"),b(A,U,J,"%","\\%"),b(Oe,U,J,"%","\\%"),b(A,U,J,"_","\\_"),b(Oe,U,J,"_","\\_"),b(Oe,U,J,"_","\\textunderscore"),b(A,U,J,"\u2220","\\angle",!0),b(A,U,J,"\u221E","\\infty",!0),b(A,U,J,"\u2032","\\prime"),b(A,U,J,"\u25B3","\\triangle"),b(A,U,J,"\u0393","\\Gamma",!0),b(A,U,J,"\u0394","\\Delta",!0),b(A,U,J,"\u0398","\\Theta",!0),b(A,U,J,"\u039B","\\Lambda",!0),b(A,U,J,"\u039E","\\Xi",!0),b(A,U,J,"\u03A0","\\Pi",!0),b(A,U,J,"\u03A3","\\Sigma",!0),b(A,U,J,"\u03A5","\\Upsilon",!0),b(A,U,J,"\u03A6","\\Phi",!0),b(A,U,J,"\u03A8","\\Psi",!0),b(A,U,J,"\u03A9","\\Omega",!0),b(A,U,J,"A","\u0391"),b(A,U,J,"B","\u0392"),b(A,U,J,"E","\u0395"),b(A,U,J,"Z","\u0396"),b(A,U,J,"H","\u0397"),b(A,U,J,"I","\u0399"),b(A,U,J,"K","\u039A"),b(A,U,J,"M","\u039C"),b(A,U,J,"N","\u039D"),b(A,U,J,"O","\u039F"),b(A,U,J,"P","\u03A1"),b(A,U,J,"T","\u03A4"),b(A,U,J,"X","\u03A7"),b(A,U,J,"\xAC","\\neg",!0),b(A,U,J,"\xAC","\\lnot"),b(A,U,J,"\u22A4","\\top"),b(A,U,J,"\u22A5","\\bot"),b(A,U,J,"\u2205","\\emptyset"),b(A,le,J,"\u2205","\\varnothing"),b(A,U,Y,"\u03B1","\\alpha",!0),b(A,U,Y,"\u03B2","\\beta",!0),b(A,U,Y,"\u03B3","\\gamma",!0),b(A,U,Y,"\u03B4","\\delta",!0),b(A,U,Y,"\u03F5","\\epsilon",!0),b(A,U,Y,"\u03B6","\\zeta",!0),b(A,U,Y,"\u03B7","\\eta",!0),b(A,U,Y,"\u03B8","\\theta",!0),b(A,U,Y,"\u03B9","\\iota",!0),b(A,U,Y,"\u03BA","\\kappa",!0),b(A,U,Y,"\u03BB","\\lambda",!0),b(A,U,Y,"\u03BC","\\mu",!0),b(A,U,Y,"\u03BD","\\nu",!0),b(A,U,Y,"\u03BE","\\xi",!0),b(A,U,Y,"\u03BF","\\omicron",!0),b(A,U,Y,"\u03C0","\\pi",!0),b(A,U,Y,"\u03C1","\\rho",!0),b(A,U,Y,"\u03C3","\\sigma",!0),b(A,U,Y,"\u03C4","\\tau",!0),b(A,U,Y,"\u03C5","\\upsilon",!0),b(A,U,Y,"\u03D5","\\phi",!0),b(A,U,Y,"\u03C7","\\chi",!0),b(A,U,Y,"\u03C8","\\psi",!0),b(A,U,Y,"\u03C9","\\omega",!0),b(A,U,Y,"\u03B5","\\varepsilon",!0),b(A,U,Y,"\u03D1","\\vartheta",!0),b(A,U,Y,"\u03D6","\\varpi",!0),b(A,U,Y,"\u03F1","\\varrho",!0),b(A,U,Y,"\u03C2","\\varsigma",!0),b(A,U,Y,"\u03C6","\\varphi",!0),b(A,U,Se,"\u2217","*"),b(A,U,Se,"+","+"),b(A,U,Se,"\u2212","-"),b(A,U,Se,"\u22C5","\\cdot",!0),b(A,U,Se,"\u2218","\\circ"),b(A,U,Se,"\xF7","\\div",!0),b(A,U,Se,"\xB1","\\pm",!0),b(A,U,Se,"\xD7","\\times",!0),b(A,U,Se,"\u2229","\\cap",!0),b(A,U,Se,"\u222A","\\cup",!0),b(A,U,Se,"\u2216","\\setminus"),b(A,U,Se,"\u2227","\\land"),b(A,U,Se,"\u2228","\\lor"),b(A,U,Se,"\u2227","\\wedge",!0),b(A,U,Se,"\u2228","\\vee",!0),b(A,U,J,"\u221A","\\surd"),b(A,U,be,"(","("),b(A,U,be,"[","["),b(A,U,be,"\u27E8","\\langle",!0),b(A,U,be,"\u2223","\\lvert"),b(A,U,be,"\u2225","\\lVert"),b(A,U,je,")",")"),b(A,U,je,"]","]"),b(A,U,je,"?","?"),b(A,U,je,"!","!"),b(A,U,je,"\u27E9","\\rangle",!0),b(A,U,je,"\u2223","\\rvert"),b(A,U,je,"\u2225","\\rVert"),b(A,U,P,"=","="),b(A,U,P,"<","<"),b(A,U,P,">",">"),b(A,U,P,":",":"),b(A,U,P,"\u2248","\\approx",!0),b(A,U,P,"\u2245","\\cong",!0),b(A,U,P,"\u2265","\\ge"),b(A,U,P,"\u2265","\\geq",!0),b(A,U,P,"\u2190","\\gets"),b(A,U,P,">","\\gt"),b(A,U,P,"\u2208","\\in",!0),b(A,U,P,"\uE020","\\@not"),b(A,U,P,"\u2282","\\subset",!0),b(A,U,P,"\u2283","\\supset",!0),b(A,U,P,"\u2286","\\subseteq",!0),b(A,U,P,"\u2287","\\supseteq",!0),b(A,le,P,"\u2288","\\nsubseteq",!0),b(A,le,P,"\u2289","\\nsupseteq",!0),b(A,U,P,"\u22A8","\\models"),b(A,U,P,"\u2190","\\leftarrow",!0),b(A,U,P,"\u2264","\\le"),b(A,U,P,"\u2264","\\leq",!0),b(A,U,P,"<","\\lt"),b(A,U,P,"\u2192","\\rightarrow",!0),b(A,U,P,"\u2192","\\to"),b(A,le,P,"\u2271","\\ngeq",!0),b(A,le,P,"\u2270","\\nleq",!0),b(A,U,Je,"\xA0","\\ "),b(A,U,Je,"\xA0","~"),b(A,U,Je,"\xA0","\\space"),b(A,U,Je,"\xA0","\\nobreakspace"),b(Oe,U,Je,"\xA0","\\ "),b(Oe,U,Je,"\xA0","~"),b(Oe,U,Je,"\xA0","\\space"),b(Oe,U,Je,"\xA0","\\nobreakspace"),b(A,U,Je,null,"\\nobreak"),b(A,U,Je,null,"\\allowbreak"),b(A,U,Pe,",",","),b(A,U,Pe,";",";"),b(A,le,Se,"\u22BC","\\barwedge",!0),b(A,le,Se,"\u22BB","\\veebar",!0),b(A,U,Se,"\u2299","\\odot",!0),b(A,U,Se,"\u2295","\\oplus",!0),b(A,U,Se,"\u2297","\\otimes",!0),b(A,U,J,"\u2202","\\partial",!0),b(A,U,Se,"\u2298","\\oslash",!0),b(A,le,Se,"\u229A","\\circledcirc",!0),b(A,le,Se,"\u22A1","\\boxdot",!0),b(A,U,Se,"\u25B3","\\bigtriangleup"),b(A,U,Se,"\u25BD","\\bigtriangledown"),b(A,U,Se,"\u2020","\\dagger"),b(A,U,Se,"\u22C4","\\diamond"),b(A,U,Se,"\u22C6","\\star"),b(A,U,Se,"\u25C3","\\triangleleft"),b(A,U,Se,"\u25B9","\\triangleright"),b(A,U,be,"{","\\{"),b(Oe,U,J,"{","\\{"),b(Oe,U,J,"{","\\textbraceleft"),b(A,U,je,"}","\\}"),b(Oe,U,J,"}","\\}"),b(Oe,U,J,"}","\\textbraceright"),b(A,U,be,"{","\\lbrace"),b(A,U,je,"}","\\rbrace"),b(A,U,be,"[","\\lbrack"),b(Oe,U,J,"[","\\lbrack"),b(A,U,je,"]","\\rbrack"),b(Oe,U,J,"]","\\rbrack"),b(A,U,be,"(","\\lparen"),b(A,U,je,")","\\rparen"),b(Oe,U,J,"<","\\textless"),b(Oe,U,J,">","\\textgreater"),b(A,U,be,"\u230A","\\lfloor",!0),b(A,U,je,"\u230B","\\rfloor",!0),b(A,U,be,"\u2308","\\lceil",!0),b(A,U,je,"\u2309","\\rceil",!0),b(A,U,J,"\\","\\backslash"),b(A,U,J,"\u2223","|"),b(A,U,J,"\u2223","\\vert"),b(Oe,U,J,"|","\\textbar"),b(A,U,J,"\u2225","\\|"),b(A,U,J,"\u2225","\\Vert"),b(Oe,U,J,"\u2225","\\textbardbl"),b(Oe,U,J,"~","\\textasciitilde"),b(Oe,U,J,"\\","\\textbackslash"),b(Oe,U,J,"^","\\textasciicircum"),b(A,U,P,"\u2191","\\uparrow",!0),b(A,U,P,"\u21D1","\\Uparrow",!0),b(A,U,P,"\u2193","\\downarrow",!0),b(A,U,P,"\u21D3","\\Downarrow",!0),b(A,U,P,"\u2195","\\updownarrow",!0),b(A,U,P,"\u21D5","\\Updownarrow",!0),b(A,U,ne,"\u2210","\\coprod"),b(A,U,ne,"\u22C1","\\bigvee"),b(A,U,ne,"\u22C0","\\bigwedge"),b(A,U,ne,"\u2A04","\\biguplus"),b(A,U,ne,"\u22C2","\\bigcap"),b(A,U,ne,"\u22C3","\\bigcup"),b(A,U,ne,"\u222B","\\int"),b(A,U,ne,"\u222B","\\intop"),b(A,U,ne,"\u222C","\\iint"),b(A,U,ne,"\u222D","\\iiint"),b(A,U,ne,"\u220F","\\prod"),b(A,U,ne,"\u2211","\\sum"),b(A,U,ne,"\u2A02","\\bigotimes"),b(A,U,ne,"\u2A01","\\bigoplus"),b(A,U,ne,"\u2A00","\\bigodot"),b(A,U,ne,"\u222E","\\oint"),b(A,U,ne,"\u222F","\\oiint"),b(A,U,ne,"\u2230","\\oiiint"),b(A,U,ne,"\u2A06","\\bigsqcup"),b(A,U,ne,"\u222B","\\smallint"),b(Oe,U,Ge,"\u2026","\\textellipsis"),b(A,U,Ge,"\u2026","\\mathellipsis"),b(Oe,U,Ge,"\u2026","\\ldots",!0),b(A,U,Ge,"\u2026","\\ldots",!0),b(A,U,Ge,"\u22EF","\\@cdots",!0),b(A,U,Ge,"\u22F1","\\ddots",!0),b(A,U,J,"\u22EE","\\varvdots"),b(A,U,wt,"\u02CA","\\acute"),b(A,U,wt,"\u02CB","\\grave"),b(A,U,wt,"\xA8","\\ddot"),b(A,U,wt,"~","\\tilde"),b(A,U,wt,"\u02C9","\\bar"),b(A,U,wt,"\u02D8","\\breve"),b(A,U,wt,"\u02C7","\\check"),b(A,U,wt,"^","\\hat"),b(A,U,wt,"\u20D7","\\vec"),b(A,U,wt,"\u02D9","\\dot"),b(A,U,wt,"\u02DA","\\mathring"),b(A,U,Y,"\u0131","\\imath",!0),b(A,U,Y,"\u0237","\\jmath",!0),b(Oe,U,J,"\u0131","\\i",!0),b(Oe,U,J,"\u0237","\\j",!0),b(Oe,U,J,"\xDF","\\ss",!0),b(Oe,U,J,"\xE6","\\ae",!0),b(Oe,U,J,"\xE6","\\ae",!0),b(Oe,U,J,"\u0153","\\oe",!0),b(Oe,U,J,"\xF8","\\o",!0),b(Oe,U,J,"\xC6","\\AE",!0),b(Oe,U,J,"\u0152","\\OE",!0),b(Oe,U,J,"\xD8","\\O",!0),b(Oe,U,wt,"\u02CA","\\'"),b(Oe,U,wt,"\u02CB","\\`"),b(Oe,U,wt,"\u02C6","\\^"),b(Oe,U,wt,"\u02DC","\\~"),b(Oe,U,wt,"\u02C9","\\="),b(Oe,U,wt,"\u02D8","\\u"),b(Oe,U,wt,"\u02D9","\\."),b(Oe,U,wt,"\u02DA","\\r"),b(Oe,U,wt,"\u02C7","\\v"),b(Oe,U,wt,"\xA8",'\\"'),b(Oe,U,wt,"\u02DD","\\H"),b(Oe,U,wt,"\u25EF","\\textcircled");var rt={"--":!0,"---":!0,"``":!0,"''":!0};b(Oe,U,J,"\u2013","--"),b(Oe,U,J,"\u2013","\\textendash"),b(Oe,U,J,"\u2014","---"),b(Oe,U,J,"\u2014","\\textemdash"),b(Oe,U,J,"\u2018","`"),b(Oe,U,J,"\u2018","\\textquoteleft"),b(Oe,U,J,"\u2019","'"),b(Oe,U,J,"\u2019","\\textquoteright"),b(Oe,U,J,"\u201C","``"),b(Oe,U,J,"\u201C","\\textquotedblleft"),b(Oe,U,J,"\u201D","''"),b(Oe,U,J,"\u201D","\\textquotedblright"),b(A,U,J,"\xB0","\\degree",!0),b(Oe,U,J,"\xB0","\\degree"),b(Oe,U,J,"\xB0","\\textdegree",!0),b(A,U,Y,"\xA3","\\pounds"),b(A,U,Y,"\xA3","\\mathsterling",!0),b(Oe,U,Y,"\xA3","\\pounds"),b(Oe,U,Y,"\xA3","\\textsterling",!0),b(A,le,J,"\u2720","\\maltese"),b(Oe,le,J,"\u2720","\\maltese"),b(Oe,U,Je,"\xA0","\\ "),b(Oe,U,Je,"\xA0"," "),b(Oe,U,Je,"\xA0","~");for(var Gt='0123456789/@."',Xt=0;Xt<Gt.length;Xt++){var Jt=Gt.charAt(Xt);b(A,U,J,Jt,Jt)}for(var an='0123456789!@*()-=+[]<>|";:?/.,',rn=0;rn<an.length;rn++){var Sn=an.charAt(rn);b(Oe,U,J,Sn,Sn)}for(var On="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",pn=0;pn<On.length;pn++){var Pn=On.charAt(pn);b(A,U,Y,Pn,Pn),b(Oe,U,J,Pn,Pn)}b(A,le,J,"C","\u2102"),b(Oe,le,J,"C","\u2102"),b(A,le,J,"H","\u210D"),b(Oe,le,J,"H","\u210D"),b(A,le,J,"N","\u2115"),b(Oe,le,J,"N","\u2115"),b(A,le,J,"P","\u2119"),b(Oe,le,J,"P","\u2119"),b(A,le,J,"Q","\u211A"),b(Oe,le,J,"Q","\u211A"),b(A,le,J,"R","\u211D"),b(Oe,le,J,"R","\u211D"),b(A,le,J,"Z","\u2124"),b(Oe,le,J,"Z","\u2124"),b(A,U,Y,"h","\u210E"),b(Oe,U,Y,"h","\u210E");for(var tn="",$t=0;$t<On.length;$t++){var Nt=On.charAt($t);tn=String.fromCharCode(55349,56320+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56372+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56424+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56580+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56736+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56788+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56840+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56944+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),$t<26&&(tn=String.fromCharCode(55349,56632+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn),tn=String.fromCharCode(55349,56476+$t),b(A,U,Y,Nt,tn),b(Oe,U,J,Nt,tn))}tn="\u{1D55C}",b(A,U,Y,"k",tn),b(Oe,U,J,"k",tn);for(var on=0;on<10;on++){var nn=on.toString();tn=String.fromCharCode(55349,57294+on),b(A,U,Y,nn,tn),b(Oe,U,J,nn,tn),tn=String.fromCharCode(55349,57314+on),b(A,U,Y,nn,tn),b(Oe,U,J,nn,tn),tn=String.fromCharCode(55349,57324+on),b(A,U,Y,nn,tn),b(Oe,U,J,nn,tn),tn=String.fromCharCode(55349,57334+on),b(A,U,Y,nn,tn),b(Oe,U,J,nn,tn)}for(var An="\xC7\xD0\xDE\xE7\xFE",or=0;or<An.length;or++){var Ne=An.charAt(or);b(A,U,Y,Ne,Ne),b(Oe,U,J,Ne,Ne)}b(Oe,U,J,"\xF0","\xF0"),b(Oe,U,J,"\u2013","\u2013"),b(Oe,U,J,"\u2014","\u2014"),b(Oe,U,J,"\u2018","\u2018"),b(Oe,U,J,"\u2019","\u2019"),b(Oe,U,J,"\u201C","\u201C"),b(Oe,U,J,"\u201D","\u201D");var pt=[["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"]],It=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],ht=function(u,h){var f=u.charCodeAt(0),y=u.charCodeAt(1),I=(f-55296)*1024+(y-56320)+65536,H=h==="math"?0:1;if(119808<=I&&I<120484){var ge=Math.floor((I-119808)/26);return[pt[ge][2],pt[ge][H]]}else if(120782<=I&&I<=120831){var Ae=Math.floor((I-120782)/10);return[It[Ae][2],It[Ae][H]]}else{if(I===120485||I===120486)return[pt[0][2],pt[0][H]];if(120486<I&&I<120782)return["",""];throw new g("Unsupported character: "+u)}},we=[[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]],at=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],vt=function(u,h){return h.size<2?u:we[u-1][h.size-1]},Ct=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=at[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 y={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 I in f)f.hasOwnProperty(I)&&(y[I]=f[I]);return new K(y)},u.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:vt(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:at[f-1]})},u.havingBaseStyle=function(f){f=f||this.style.text();var y=vt(K.BASESIZE,f);return this.size===y&&this.textSize===K.BASESIZE&&this.style===f?this:this.extend({style:f,size:y})},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=st(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},K}();Ct.BASESIZE=6;var Et=Ct,Pt={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},Kt={ex:!0,em:!0,mu:!0},xt=function(u){return typeof u!="string"&&(u=u.unit),u in Pt||u in Kt||u==="ex"},Ve=function(u,h){var f;if(u.unit in Pt)f=Pt[u.unit]/h.fontMetrics().ptPerEm/h.sizeMultiplier;else if(u.unit==="mu")f=h.fontMetrics().cssEmPerMu;else{var y;if(h.style.isTight()?y=h.havingStyle(h.style.text()):y=h,u.unit==="ex")f=y.fontMetrics().xHeight;else if(u.unit==="em")f=y.fontMetrics().quad;else throw new g("Invalid unit: '"+u.unit+"'");y!==h&&(f*=y.sizeMultiplier/h.sizeMultiplier)}return Math.min(u.number*f,h.maxSize)},it=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Tt=function(u,h,f){return Ze[f][u]&&Ze[f][u].replace&&(u=Ze[f][u].replace),{value:u,metrics:zt(u,h,f)}},ot=function(u,h,f,y,I){var H=Tt(u,h,f),ge=H.metrics;u=H.value;var Ae;if(ge){var Xe=ge.italic;(f==="text"||y&&y.font==="mathit")&&(Xe=0),Ae=new me(u,ge.height,ge.depth,Xe,ge.skew,ge.width,I)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+h+"' and mode '"+f+"'")),Ae=new me(u,0,0,0,0,0,I);if(y){Ae.maxFontSize=y.sizeMultiplier,y.style.isTight()&&Ae.classes.push("mtight");var ft=y.getColor();ft&&(Ae.style.color=ft)}return Ae},dt=function(u,h,f,y){return y===void 0&&(y=[]),f.font==="boldsymbol"&&Tt(u,"Main-Bold",h).metrics?ot(u,"Main-Bold",h,f,y.concat(["mathbf"])):u==="\\"||Ze[h][u].font==="main"?ot(u,"Main-Regular",h,f,y):ot(u,"AMS-Regular",h,f,y.concat(["amsrm"]))},Ot=function(u,h,f,y){return/[0-9]/.test(u.charAt(0))||W.contains(it,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Vt=function(u,h,f,y){return W.contains(it,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Wt=function(u,h,f,y){return Tt(u,"Math-BoldItalic",h).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},dn=function(u,h,f){var y=u.mode,I=u.text,H=["mord"],ge=y==="math"||y==="text"&&h.font,Ae=ge?h.font:h.fontFamily;if(I.charCodeAt(0)===55349){var Xe=ht(I,y),ft=Xe[0],Ft=Xe[1];return ot(I,ft,y,h,H.concat(Ft))}else if(Ae){var qt,hn;if(Ae==="boldsymbol"||Ae==="mathnormal"){var yn=Ae==="boldsymbol"?Wt(I,y,h,H):Vt(I,y,h,H);qt=yn.fontName,hn=[yn.fontClass]}else W.contains(it,I)?(qt="Main-Italic",hn=["mathit"]):ge?(qt=nr[Ae].fontName,hn=[Ae]):(qt=Wn(Ae,h.fontWeight,h.fontShape),hn=[Ae,h.fontWeight,h.fontShape]);if(Tt(I,qt,y).metrics)return ot(I,qt,y,h,H.concat(hn));if(rt.hasOwnProperty(I)&&qt.substr(0,10)==="Typewriter"){for(var Cn=[],Yn=0;Yn<I.length;Yn++)Cn.push(ot(I[Yn],qt,y,h,H.concat(hn)));return bn(Cn)}}if(f==="mathord"){var Jn=Ot(I,y,h,H);return ot(I,Jn.fontName,y,h,H.concat([Jn.fontClass]))}else if(f==="textord"){var hr=Ze[y][I]&&Ze[y][I].font;if(hr==="ams"){var yr=Wn("amsrm",h.fontWeight,h.fontShape);return ot(I,yr,y,h,H.concat("amsrm",h.fontWeight,h.fontShape))}else if(hr==="main"||!hr){var Gr=Wn("textrm",h.fontWeight,h.fontShape);return ot(I,Gr,y,h,H.concat(h.fontWeight,h.fontShape))}else{var Br=Wn(hr,h.fontWeight,h.fontShape);return ot(I,Br,y,h,H.concat(Br,h.fontWeight,h.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},un=function(u,h){if(yt(u.classes)!==yt(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 y in h.style)if(h.style.hasOwnProperty(y)&&u.style[y]!==h.style[y])return!1;return!0},xn=function(u){for(var h=0;h<u.length-1;h++){var f=u[h],y=u[h+1];f instanceof me&&y instanceof me&&un(f,y)&&(f.text+=y.text,f.height=Math.max(f.height,y.height),f.depth=Math.max(f.depth,y.depth),f.italic=y.italic,u.splice(h+1,1),h--)}return u},vn=function(u){for(var h=0,f=0,y=0,I=0;I<u.children.length;I++){var H=u.children[I];H.height>h&&(h=H.height),H.depth>f&&(f=H.depth),H.maxFontSize>y&&(y=H.maxFontSize)}u.height=h,u.depth=f,u.maxFontSize=y},ln=function(u,h,f,y){var I=new We(u,h,f,y);return vn(I),I},en=function(u,h,f,y){return new We(u,h,f,y)},Tn=function(u,h,f){var y=ln([u],[],h);return y.height=Math.max(f||h.fontMetrics().defaultRuleThickness,h.minRuleThickness),y.style.borderBottomWidth=y.height+"em",y.maxFontSize=1,y},En=function(u,h,f,y){var I=new Re(u,h,f,y);return vn(I),I},bn=function(u){var h=new Ue(u);return vn(h),h},kn=function(u,h){return u instanceof Ue?ln([],[u],h):u},Hn=function(u){if(u.positionType==="individualShift"){for(var h=u.children,f=[h[0]],y=-h[0].shift-h[0].elem.depth,I=y,H=1;H<h.length;H++){var ge=-h[H].shift-I-h[H].elem.depth,Ae=ge-(h[H-1].elem.height+h[H-1].elem.depth);I=I+ge,f.push({type:"kern",size:Ae}),f.push(h[H])}return{children:f,depth:y}}var Xe;if(u.positionType==="top"){for(var ft=u.positionData,Ft=0;Ft<u.children.length;Ft++){var qt=u.children[Ft];ft-=qt.type==="kern"?qt.size:qt.elem.height+qt.elem.depth}Xe=ft}else if(u.positionType==="bottom")Xe=-u.positionData;else{var hn=u.children[0];if(hn.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")Xe=-hn.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")Xe=-hn.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:Xe}},Nn=function(u,h){for(var f=Hn(u),y=f.children,I=f.depth,H=0,ge=0;ge<y.length;ge++){var Ae=y[ge];if(Ae.type==="elem"){var Xe=Ae.elem;H=Math.max(H,Xe.maxFontSize,Xe.height)}}H+=2;var ft=ln(["pstrut"],[]);ft.style.height=H+"em";for(var Ft=[],qt=I,hn=I,yn=I,Cn=0;Cn<y.length;Cn++){var Yn=y[Cn];if(Yn.type==="kern")yn+=Yn.size;else{var Jn=Yn.elem,hr=Yn.wrapperClasses||[],yr=Yn.wrapperStyle||{},Gr=ln(hr,[ft,Jn],void 0,yr);Gr.style.top=-H-yn-Jn.depth+"em",Yn.marginLeft&&(Gr.style.marginLeft=Yn.marginLeft),Yn.marginRight&&(Gr.style.marginRight=Yn.marginRight),Ft.push(Gr),yn+=Jn.height+Jn.depth}qt=Math.min(qt,yn),hn=Math.max(hn,yn)}var Br=ln(["vlist"],Ft);Br.style.height=hn+"em";var Wr;if(qt<0){var Vr=ln([],[]),zr=ln(["vlist"],[Vr]);zr.style.height=-qt+"em";var gi=ln(["vlist-s"],[new me("\u200B")]);Wr=[ln(["vlist-r"],[Br,gi]),ln(["vlist-r"],[zr])]}else Wr=[ln(["vlist-r"],[Br])];var Qr=ln(["vlist-t"],Wr);return Wr.length===2&&Qr.classes.push("vlist-t2"),Qr.height=hn,Qr.depth=-qt,Qr},jn=function(u,h){var f=ln(["mspace"],[],h),y=Ve(u,h);return f.style.marginRight=y+"em",f},Wn=function(u,h,f){var y="";switch(u){case"amsrm":y="AMS";break;case"textrm":y="Main";break;case"textsf":y="SansSerif";break;case"texttt":y="Typewriter";break;default:y=u}var I;return h==="textbf"&&f==="textit"?I="BoldItalic":h==="textbf"?I="Bold":h==="textit"?I="Italic":I="Regular",y+"-"+I},nr={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"}},$n={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},fr=function(u,h){var f=$n[u],y=f[0],I=f[1],H=f[2],ge=new Ke(y),Ae=new Ee([ge],{width:I+"em",height:H+"em",style:"width:"+I+"em",viewBox:"0 0 "+1e3*I+" "+1e3*H,preserveAspectRatio:"xMinYMin"}),Xe=en(["overlay"],[Ae],h);return Xe.height=H,Xe.style.height=H+"em",Xe.style.width=I+"em",Xe},gt={fontMap:nr,makeSymbol:ot,mathsym:dt,makeSpan:ln,makeSvgSpan:en,makeLineSpan:Tn,makeAnchor:En,makeFragment:bn,wrapFragment:kn,makeVList:Nn,makeOrd:dn,makeGlue:jn,staticSvg:fr,svgData:$n,tryCombineChars:xn};function Mn(K,u){var h=ir(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 ir(K,u){return K&&K.type===u?K:null}function xr(K,u){var h=_r(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 _r(K,u){return K&&K.type==="atom"&&K.family===u?K:null}function br(K){var u=Rn(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 Rn(K){return K&&(K.type==="atom"||Lt.hasOwnProperty(K.type))?K:null}var gn={number:3,unit:"mu"},Fn={number:4,unit:"mu"},sr={number:5,unit:"mu"},Kn={mord:{mop:gn,mbin:Fn,mrel:sr,minner:gn},mop:{mord:gn,mop:gn,mrel:sr,minner:gn},mbin:{mord:Fn,mop:Fn,mopen:Fn,minner:Fn},mrel:{mord:sr,mop:sr,mopen:sr,minner:sr},mopen:{},mclose:{mop:gn,mbin:Fn,mrel:sr,minner:gn},mpunct:{mord:gn,mop:gn,mrel:sr,mopen:gn,mclose:gn,mpunct:gn,minner:gn},minner:{mord:gn,mop:gn,mbin:Fn,mrel:sr,mopen:gn,mpunct:gn,minner:gn}},er={mord:{mop:gn},mop:{mord:gn,mop:gn},mbin:{},mrel:{},mopen:{},mclose:{mop:gn},mpunct:{},minner:{mop:gn}},Pr={},Dr={},Er={};function _n(K){for(var u=K.type,h=K.names,f=K.props,y=K.handler,I=K.htmlBuilder,H=K.mathmlBuilder,ge={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:y},Ae=0;Ae<h.length;++Ae)Pr[h[Ae]]=ge;u&&(I&&(Dr[u]=I),H&&(Er[u]=H))}function Gn(K){var u=K.type,h=K.htmlBuilder,f=K.mathmlBuilder;_n({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:h,mathmlBuilder:f})}var qn=function(u){var h=ir(u,"ordgroup");return h?h.body:[u]},wr=gt.makeSpan,qr=["leftmost","mbin","mopen","mrel","mop","mpunct"],Yr=["rightmost","mrel","mclose","mpunct"],kr={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},Zr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Sr=function(u,h,f,y){y===void 0&&(y=[null,null]);for(var I=[],H=0;H<u.length;H++){var ge=cr(u[H],h);if(ge instanceof Ue){var Ae=ge.children;I.push.apply(I,Ae)}else I.push(ge)}if(!f)return I;var Xe=h;if(u.length===1){var ft=ir(u[0],"sizing")||ir(u[0],"styling");ft&&(ft.type==="sizing"?Xe=h.havingSize(ft.size):ft.type==="styling"&&(Xe=h.havingStyle(kr[ft.style])))}var Ft=wr([y[0]||"leftmost"],[],h),qt=wr([y[1]||"rightmost"],[],h);return ei(I,function(hn,yn){var Cn=yn.classes[0],Yn=hn.classes[0];Cn==="mbin"&&W.contains(Yr,Yn)?yn.classes[0]="mord":Yn==="mbin"&&W.contains(qr,Cn)&&(hn.classes[0]="mord")},{node:Ft},qt),ei(I,function(hn,yn){var Cn=ai(yn),Yn=ai(hn),Jn=Cn&&Yn?hn.hasClass("mtight")?er[Cn][Yn]:Kn[Cn][Yn]:null;if(Jn)return gt.makeGlue(Jn,Xe)},{node:Ft},qt),I},ei=function K(u,h,f,y){y&&u.push(y);for(var I=0;I<u.length;I++){var H=u[I],ge=$r(H);if(ge){K(ge.children,h,f);continue}if(H.classes[0]!=="mspace"){var Ae=h(H,f.node);Ae&&(f.insertAfter?f.insertAfter(Ae):(u.unshift(Ae),I++)),f.node=H,f.insertAfter=function(Xe){return function(ft){u.splice(Xe+1,0,ft),I++}}(I)}}y&&u.pop()},$r=function(u){return u instanceof Ue||u instanceof Re?u:null},jr=function K(u,h){var f=$r(u);if(f){var y=f.children;if(y.length){if(h==="right")return K(y[y.length-1],"right");if(h==="left")return K(y[0],"left")}}return u},ai=function(u,h){return u?(h&&(u=jr(u,h)),Zr[u.classes[0]]||null):null},oi=function(u,h){var f=["nulldelimiter"].concat(u.baseSizingClasses());return wr(h.concat(f))},cr=function(u,h,f){if(!u)return wr();if(Dr[u.type]){var y=Dr[u.type](u,h);if(f&&h.size!==f.size){y=wr(h.sizingClasses(f),[y],h);var I=h.sizeMultiplier/f.sizeMultiplier;y.height*=I,y.depth*=I}return y}else throw new g("Got group of unknown type: '"+u.type+"'")};function ci(K,u){var h=wr(["base"],K,u),f=wr(["strut"]);return f.style.height=h.height+h.depth+"em",f.style.verticalAlign=-h.depth+"em",h.children.unshift(f),h}function di(K,u){var h=null;K.length===1&&K[0].type==="tag"&&(h=K[0].tag,K=K[0].body);for(var f=Sr(K,u,!0),y=[],I=[],H=0;H<f.length;H++)if(I.push(f[H]),f[H].hasClass("mbin")||f[H].hasClass("mrel")||f[H].hasClass("allowbreak")){for(var ge=!1;H<f.length-1&&f[H+1].hasClass("mspace")&&!f[H+1].hasClass("newline");)H++,I.push(f[H]),f[H].hasClass("nobreak")&&(ge=!0);ge||(y.push(ci(I,u)),I=[])}else f[H].hasClass("newline")&&(I.pop(),I.length>0&&(y.push(ci(I,u)),I=[]),y.push(f[H]));I.length>0&&y.push(ci(I,u));var Ae;h&&(Ae=ci(Sr(h,u,!0)),Ae.classes=["tag"],y.push(Ae));var Xe=wr(["katex-html"],y);if(Xe.setAttribute("aria-hidden","true"),Ae){var ft=Ae.children[0];ft.style.height=Xe.height+Xe.depth+"em",ft.style.verticalAlign=-Xe.depth+"em"}return Xe}function ti(K){return new Ue(K)}var Hr=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,y){this.attributes[f]=y},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 y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&f.setAttribute(y,this.attributes[y]);for(var I=0;I<this.children.length;I++)f.appendChild(this.children[I].toNode());return f},u.toMarkup=function(){var f="<"+this.type;for(var y in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,y)&&(f+=" "+y+'="',f+=W.escape(this.attributes[y]),f+='"');f+=">";for(var I=0;I<this.children.length;I++)f+=this.children[I].toMarkup();return f+="</"+this.type+">",f},u.toText=function(){return this.children.map(function(f){return f.toText()}).join("")},K}(),rr=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 W.escape(this.toText())},u.toText=function(){return this.text},K}(),Ei=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}(),mn={MathNode:Hr,TextNode:rr,SpaceNode:Ei,newDocumentFragment:ti},Xn=function(u,h,f){return Ze[h][u]&&Ze[h][u].replace&&u.charCodeAt(0)!==55349&&!(rt.hasOwnProperty(u)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(u=Ze[h][u].replace),new mn.TextNode(u)},vr=function(u){return u.length===1?u[0]:new mn.MathNode("mrow",u)},Cr=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 y=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 I=u.text;if(W.contains(["\\imath","\\jmath"],I))return null;Ze[y][I]&&Ze[y][I].replace&&(I=Ze[y][I].replace);var H=gt.fontMap[f].fontName;return zt(I,H,y)?gt.fontMap[f].variant:null},ur=function(u,h,f){if(u.length===1){var y=Bn(u[0],h);return f&&y instanceof Hr&&y.type==="mo"&&(y.setAttribute("lspace","0em"),y.setAttribute("rspace","0em")),[y]}for(var I=[],H,ge=0;ge<u.length;ge++){var Ae=Bn(u[ge],h);if(Ae instanceof Hr&&H instanceof Hr){if(Ae.type==="mtext"&&H.type==="mtext"&&Ae.getAttribute("mathvariant")===H.getAttribute("mathvariant")){var Xe;(Xe=H.children).push.apply(Xe,Ae.children);continue}else if(Ae.type==="mn"&&H.type==="mn"){var ft;(ft=H.children).push.apply(ft,Ae.children);continue}else if(Ae.type==="mi"&&Ae.children.length===1&&H.type==="mn"){var Ft=Ae.children[0];if(Ft instanceof rr&&Ft.text==="."){var qt;(qt=H.children).push.apply(qt,Ae.children);continue}}else if(H.type==="mi"&&H.children.length===1){var hn=H.children[0];if(hn instanceof rr&&hn.text==="\u0338"&&(Ae.type==="mo"||Ae.type==="mi"||Ae.type==="mn")){var yn=Ae.children[0];yn instanceof rr&&yn.text.length>0&&(yn.text=yn.text.slice(0,1)+"\u0338"+yn.text.slice(1),I.pop())}}}I.push(Ae),H=Ae}return I},pr=function(u,h,f){return vr(ur(u,h,f))},Bn=function(u,h){if(!u)return new mn.MathNode("mrow");if(Er[u.type]){var f=Er[u.type](u,h);return f}else throw new g("Got group of unknown type: '"+u.type+"'")};function Fr(K,u,h,f){var y=ur(K,h),I;y.length===1&&y[0]instanceof Hr&&W.contains(["mrow","mtable"],y[0].type)?I=y[0]:I=new mn.MathNode("mrow",y);var H=new mn.MathNode("annotation",[new mn.TextNode(u)]);H.setAttribute("encoding","application/x-tex");var ge=new mn.MathNode("semantics",[I,H]),Ae=new mn.MathNode("math",[ge]);Ae.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Xe=f?"katex":"katex-mathml";return gt.makeSpan([Xe],[Ae])}var Jr=function(u){return new Et({style:u.displayMode?x.DISPLAY:x.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},ni=function(u,h){if(h.displayMode){var f=["katex-display"];h.leqno&&f.push("leqno"),h.fleqn&&f.push("fleqn"),u=gt.makeSpan(f,[u])}return u},Xr=function(u,h,f){var y=Jr(f),I;if(f.output==="mathml")return Fr(u,h,y,!0);if(f.output==="html"){var H=di(u,y);I=gt.makeSpan(["katex"],[H])}else{var ge=Fr(u,h,y,!1),Ae=di(u,y);I=gt.makeSpan(["katex"],[ge,Ae])}return ni(I,f)},Kr=function(u,h,f){var y=Jr(f),I=di(u,y),H=gt.makeSpan(["katex"],[I]);return ni(H,f)},li=Xr,ui={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"},Ti=function(u){var h=new mn.MathNode("mo",[new mn.TextNode(ui[u.substr(1)])]);return h.setAttribute("stretchy","true"),h},vi={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]},Hi=function(u){return u.type==="ordgroup"?u.body.length:1},Xi=function(u,h){function f(){var Ae=4e5,Xe=u.label.substr(1);if(W.contains(["widehat","widecheck","widetilde","utilde"],Xe)){var ft=u,Ft=Hi(ft.base),qt,hn,yn;if(Ft>5)Xe==="widehat"||Xe==="widecheck"?(qt=420,Ae=2364,yn=.42,hn=Xe+"4"):(qt=312,Ae=2340,yn=.34,hn="tilde4");else{var Cn=[1,1,2,2,3,3][Ft];Xe==="widehat"||Xe==="widecheck"?(Ae=[0,1062,2364,2364,2364][Cn],qt=[0,239,300,360,420][Cn],yn=[0,.24,.3,.3,.36,.42][Cn],hn=Xe+Cn):(Ae=[0,600,1033,2339,2340][Cn],qt=[0,260,286,306,312][Cn],yn=[0,.26,.286,.3,.306,.34][Cn],hn="tilde"+Cn)}var Yn=new Ke(hn),Jn=new Ee([Yn],{width:"100%",height:yn+"em",viewBox:"0 0 "+Ae+" "+qt,preserveAspectRatio:"none"});return{span:gt.makeSvgSpan([],[Jn],h),minWidth:0,height:yn}}else{var hr=[],yr=vi[Xe],Gr=yr[0],Br=yr[1],Wr=yr[2],Vr=Wr/1e3,zr=Gr.length,gi,Qr;if(zr===1){var _t=yr[3];gi=["hide-tail"],Qr=[_t]}else if(zr===2)gi=["halfarrow-left","halfarrow-right"],Qr=["xMinYMin","xMaxYMin"];else if(zr===3)gi=["brace-left","brace-center","brace-right"],Qr=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
|
`+zr+" children.");for(var Ri=0;Ri<zr;Ri++){var Wi=new Ke(Gr[Ri]),Ui=new Ee([Wi],{width:"400em",height:Vr+"em",viewBox:"0 0 "+Ae+" "+Wr,preserveAspectRatio:Qr[Ri]+" slice"}),ii=gt.makeSvgSpan([gi[Ri]],[Ui],h);if(zr===1)return{span:ii,minWidth:Br,height:Vr};ii.style.height=Vr+"em",hr.push(ii)}return{span:gt.makeSpan(["stretchy"],hr,h),minWidth:Br,height:Vr}}}var y=f(),I=y.span,H=y.minWidth,ge=y.height;return I.height=ge,I.style.height=ge+"em",H>0&&(I.style.minWidth=H+"em"),I},Mi=function(u,h,f,y){var I,H=u.height+u.depth+2*f;if(/fbox|color/.test(h)){if(I=gt.makeSpan(["stretchy",h],[],y),h==="fbox"){var ge=y.color&&y.getColor();ge&&(I.style.borderColor=ge)}}else{var Ae=[];/^[bx]cancel$/.test(h)&&Ae.push(new et({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(h)&&Ae.push(new et({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Xe=new Ee(Ae,{width:"100%",height:H+"em"});I=gt.makeSvgSpan([],[Xe],y)}return I.height=H,I.style.height=H+"em",I},yi={encloseSpan:Mi,mathMLnode:Ti,svgSpan:Xi},Un=function(u,h){var f,y,I=ir(u,"supsub"),H;I?(y=Mn(I.base,"accent"),f=y.base,I.base=f,H=St(cr(I,h)),I.base=y):(y=Mn(u,"accent"),f=y.base);var ge=cr(f,h.havingCrampedStyle()),Ae=y.isShifty&&W.isCharacterBox(f),Xe=0;if(Ae){var ft=W.getBaseElem(f),Ft=cr(ft,h.havingCrampedStyle());Xe=ut(Ft).skew}var qt=Math.min(ge.height,h.fontMetrics().xHeight),hn;if(y.isStretchy)hn=yi.svgSpan(y,h),hn=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"elem",elem:hn,wrapperClasses:["svg-align"],wrapperStyle:Xe>0?{width:"calc(100% - "+2*Xe+"em)",marginLeft:2*Xe+"em"}:void 0}]},h);else{var yn,Cn;y.label==="\\vec"?(yn=gt.staticSvg("vec",h),Cn=gt.svgData.vec[1]):(yn=gt.makeOrd({mode:y.mode,text:y.label},h,"textord"),yn=ut(yn),yn.italic=0,Cn=yn.width),hn=gt.makeSpan(["accent-body"],[yn]);var Yn=y.label==="\\textcircled";Yn&&(hn.classes.push("accent-full"),qt=ge.height);var Jn=Xe;Yn||(Jn-=Cn/2),hn.style.left=Jn+"em",y.label==="\\textcircled"&&(hn.style.top=".2em"),hn=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"kern",size:-qt},{type:"elem",elem:hn}]},h)}var hr=gt.makeSpan(["mord","accent"],[hn],h);return H?(H.children[0]=hr,H.height=Math.max(hr.height,H.height),H.classes[0]="mord",H):hr},lr=function(u,h){var f=u.isStretchy?yi.mathMLnode(u.label):new mn.MathNode("mo",[Xn(u.label,u.mode)]),y=new mn.MathNode("mover",[Bn(u.base,h),f]);return y.setAttribute("accent","true"),y},Ir=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(K){return"\\"+K}).join("|"));_n({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],y=!Ir.test(u.funcName),I=!y||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:y,isShifty:I,base:f}},htmlBuilder:Un,mathmlBuilder:lr}),_n({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:Un,mathmlBuilder:lr}),_n({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"accentUnder",mode:f.mode,label:y,base:I}},htmlBuilder:function(u,h){var f=cr(u.base,h),y=yi.svgSpan(u,h),I=u.label==="\\utilde"?.12:0,H=gt.makeVList({positionType:"bottom",positionData:y.height+I,children:[{type:"elem",elem:y,wrapperClasses:["svg-align"]},{type:"kern",size:I},{type:"elem",elem:f}]},h);return gt.makeSpan(["mord","accentunder"],[H],h)},mathmlBuilder:function(u,h){var f=yi.mathMLnode(u.label),y=new mn.MathNode("munder",[Bn(u.base,h),f]);return y.setAttribute("accentunder","true"),y}});var dr=function(u){var h=new mn.MathNode("mpadded",u?[u]:[]);return h.setAttribute("width","+0.6em"),h.setAttribute("lspace","0.3em"),h};_n({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 y=u.parser,I=u.funcName;return{type:"xArrow",mode:y.mode,label:I,body:h[0],below:f[0]}},htmlBuilder:function(u,h){var f=h.style,y=h.havingStyle(f.sup()),I=gt.wrapFragment(cr(u.body,y,h),h);I.classes.push("x-arrow-pad");var H;u.below&&(y=h.havingStyle(f.sub()),H=gt.wrapFragment(cr(u.below,y,h),h),H.classes.push("x-arrow-pad"));var ge=yi.svgSpan(u,h),Ae=-h.fontMetrics().axisHeight+.5*ge.height,Xe=-h.fontMetrics().axisHeight-.5*ge.height-.111;(I.depth>.25||u.label==="\\xleftequilibrium")&&(Xe-=I.depth);var ft;if(H){var Ft=-h.fontMetrics().axisHeight+H.height+.5*ge.height+.111;ft=gt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:I,shift:Xe},{type:"elem",elem:ge,shift:Ae},{type:"elem",elem:H,shift:Ft}]},h)}else ft=gt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:I,shift:Xe},{type:"elem",elem:ge,shift:Ae}]},h);return ft.children[0].children[0].children[1].classes.push("svg-align"),gt.makeSpan(["mrel","x-arrow"],[ft],h)},mathmlBuilder:function(u,h){var f=yi.mathMLnode(u.label),y;if(u.body){var I=dr(Bn(u.body,h));if(u.below){var H=dr(Bn(u.below,h));y=new mn.MathNode("munderover",[f,H,I])}else y=new mn.MathNode("mover",[f,I])}else if(u.below){var ge=dr(Bn(u.below,h));y=new mn.MathNode("munder",[f,ge])}else y=dr(),y=new mn.MathNode("mover",[f,y]);return y}}),_n({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){for(var f=u.parser,y=Mn(h[0],"ordgroup"),I=y.body,H="",ge=0;ge<I.length;ge++){var Ae=Mn(I[ge],"textord");H+=Ae.text}var Xe=parseInt(H);if(isNaN(Xe))throw new g("\\@char has non-numeric argument "+H);return{type:"textord",mode:f.mode,text:String.fromCharCode(Xe)}}});var gr=function(u,h){var f=Sr(u.body,h.withColor(u.color),!1);return gt.makeFragment(f)},Ci=function(u,h){var f=ur(u.body,h.withColor(u.color)),y=new mn.MathNode("mstyle",f);return y.setAttribute("mathcolor",u.color),y};_n({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,h){var f=u.parser,y=Mn(h[0],"color-token").color,I=h[1];return{type:"color",mode:f.mode,color:y,body:qn(I)}},htmlBuilder:gr,mathmlBuilder:Ci}),_n({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,h){var f=u.parser,y=u.breakOnTokenText,I=Mn(h[0],"color-token").color;f.gullet.macros.set("\\current@color",I);var H=f.parseExpression(!0,y);return{type:"color",mode:f.mode,color:I,body:H}},htmlBuilder:gr,mathmlBuilder:Ci}),_n({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h,f){var y=u.parser,I=u.funcName,H=f[0],ge=I==="\\cr",Ae=!1;return ge||(y.settings.displayMode&&y.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Ae=!1:Ae=!0),{type:"cr",mode:y.mode,newLine:Ae,newRow:ge,size:H&&Mn(H,"size").value}},htmlBuilder:function(u,h){if(u.newRow)throw new g("\\cr valid only within a tabular/array environment");var f=gt.makeSpan(["mspace"],[],h);return u.newLine&&(f.classes.push("newline"),u.size&&(f.style.marginTop=Ve(u.size,h)+"em")),f},mathmlBuilder:function(u,h){var f=new mn.MathNode("mspace");return u.newLine&&(f.setAttribute("linebreak","newline"),u.size&&f.setAttribute("height",Ve(u.size,h)+"em")),f}});var ri=function(u,h,f){var y=Ze.math[u]&&Ze.math[u].replace,I=zt(y||u,h,f);if(!I)throw new Error("Unsupported symbol "+u+" and font size "+h+".");return I},Oi=function(u,h,f,y){var I=f.havingBaseStyle(h),H=gt.makeSpan(y.concat(I.sizingClasses(f)),[u],f),ge=I.sizeMultiplier/f.sizeMultiplier;return H.height*=ge,H.depth*=ge,H.maxFontSize=I.sizeMultiplier,H},Ki=function(u,h,f){var y=h.havingBaseStyle(f),I=(1-h.sizeMultiplier/y.sizeMultiplier)*h.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=I+"em",u.height-=I,u.depth+=I},na=function(u,h,f,y,I,H){var ge=gt.makeSymbol(u,"Main-Regular",I,y),Ae=Oi(ge,h,y,H);return f&&Ki(Ae,y,h),Ae},Ea=function(u,h,f,y){return gt.makeSymbol(u,"Size"+h+"-Regular",f,y)},ra=function(u,h,f,y,I,H){var ge=Ea(u,h,I,y),Ae=Oi(gt.makeSpan(["delimsizing","size"+h],[ge],y),x.TEXT,y,H);return f&&Ki(Ae,y,x.TEXT),Ae},Fi=function(u,h,f){var y;h==="Size1-Regular"?y="delim-size1":y="delim-size4";var I=gt.makeSpan(["delimsizinginner",y],[gt.makeSpan([],[gt.makeSymbol(u,h,f)])]);return{type:"elem",elem:I}},Di={type:"kern",size:-.005},Si=function(u,h,f,y,I,H){var ge,Ae,Xe,ft;ge=Xe=ft=u,Ae=null;var Ft="Size1-Regular";u==="\\uparrow"?Xe=ft="\u23D0":u==="\\Uparrow"?Xe=ft="\u2016":u==="\\downarrow"?ge=Xe="\u23D0":u==="\\Downarrow"?ge=Xe="\u2016":u==="\\updownarrow"?(ge="\\uparrow",Xe="\u23D0",ft="\\downarrow"):u==="\\Updownarrow"?(ge="\\Uparrow",Xe="\u2016",ft="\\Downarrow"):u==="["||u==="\\lbrack"?(ge="\u23A1",Xe="\u23A2",ft="\u23A3",Ft="Size4-Regular"):u==="]"||u==="\\rbrack"?(ge="\u23A4",Xe="\u23A5",ft="\u23A6",Ft="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(Xe=ge="\u23A2",ft="\u23A3",Ft="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(ge="\u23A1",Xe=ft="\u23A2",Ft="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(Xe=ge="\u23A5",ft="\u23A6",Ft="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(ge="\u23A4",Xe=ft="\u23A5",Ft="Size4-Regular"):u==="("||u==="\\lparen"?(ge="\u239B",Xe="\u239C",ft="\u239D",Ft="Size4-Regular"):u===")"||u==="\\rparen"?(ge="\u239E",Xe="\u239F",ft="\u23A0",Ft="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(ge="\u23A7",Ae="\u23A8",ft="\u23A9",Xe="\u23AA",Ft="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(ge="\u23AB",Ae="\u23AC",ft="\u23AD",Xe="\u23AA",Ft="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(ge="\u23A7",ft="\u23A9",Xe="\u23AA",Ft="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(ge="\u23AB",ft="\u23AD",Xe="\u23AA",Ft="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(ge="\u23A7",ft="\u23AD",Xe="\u23AA",Ft="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(ge="\u23AB",ft="\u23A9",Xe="\u23AA",Ft="Size4-Regular");var qt=ri(ge,Ft,I),hn=qt.height+qt.depth,yn=ri(Xe,Ft,I),Cn=yn.height+yn.depth,Yn=ri(ft,Ft,I),Jn=Yn.height+Yn.depth,hr=0,yr=1;if(Ae!==null){var Gr=ri(Ae,Ft,I);hr=Gr.height+Gr.depth,yr=2}var Br=hn+Jn+hr,Wr=Math.max(0,Math.ceil((h-Br)/(yr*Cn))),Vr=Br+Wr*yr*Cn,zr=y.fontMetrics().axisHeight;f&&(zr*=y.sizeMultiplier);var gi=Vr/2-zr,Qr=(Wr+1)*.005-Cn,_t=[];if(_t.push(Fi(ft,Ft,I)),Ae===null)for(var Ri=0;Ri<Wr;Ri++)_t.push(Di),_t.push(Fi(Xe,Ft,I));else{for(var Wi=0;Wi<Wr;Wi++)_t.push(Di),_t.push(Fi(Xe,Ft,I));_t.push({type:"kern",size:Qr}),_t.push(Fi(Xe,Ft,I)),_t.push(Di),_t.push(Fi(Ae,Ft,I));for(var Ui=0;Ui<Wr;Ui++)_t.push(Di),_t.push(Fi(Xe,Ft,I))}_t.push({type:"kern",size:Qr}),_t.push(Fi(Xe,Ft,I)),_t.push(Di),_t.push(Fi(ge,Ft,I));var ii=y.havingBaseStyle(x.TEXT),os=gt.makeVList({positionType:"bottom",positionData:gi,children:_t},ii);return Oi(gt.makeSpan(["delimsizing","mult"],[os],ii),x.TEXT,y,H)},Bs=80,is=.08,Bi=function(u,h,f,y,I){var H=qe(u,y,f),ge=new Ke(u,H),Ae=new Ee([ge],{width:"400em",height:h+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return gt.makeSvgSpan(["hide-tail"],[Ae],I)},Ns=function(u,h){var f=h.havingBaseSizing(),y=xs("\\surd",u*f.sizeMultiplier,$s,f),I=f.sizeMultiplier,H=Math.max(0,h.minRuleThickness-h.fontMetrics().sqrtRuleThickness),ge,Ae=0,Xe=0,ft=0,Ft;return y.type==="small"?(ft=1e3+1e3*H+Bs,u<1?I=1:u<1.4&&(I=.7),Ae=(1+H+is)/I,Xe=(1+H)/I,ge=Bi("sqrtMain",Ae,ft,H,h),ge.style.minWidth="0.853em",Ft=.833/I):y.type==="large"?(ft=(1e3+Bs)*bs[y.size],Xe=(bs[y.size]+H)/I,Ae=(bs[y.size]+H+is)/I,ge=Bi("sqrtSize"+y.size,Ae,ft,H,h),ge.style.minWidth="1.02em",Ft=1/I):(Ae=u+H+is,Xe=u+H,ft=Math.floor(1e3*u+H)+Bs,ge=Bi("sqrtTall",Ae,ft,H,h),ge.style.minWidth="0.742em",Ft=1.056),ge.height=Xe,ge.style.height=Ae+"em",{span:ge,advanceWidth:Ft,ruleWidth:(h.fontMetrics().sqrtRuleThickness+H)*I}},_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],Ii=function(u,h,f,y,I){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),W.contains(_s,u)||W.contains(hs,u))return ra(u,h,!1,f,y,I);if(W.contains(Sa,u))return Si(u,bs[h],!1,f,y,I);throw new g("Illegal delimiter: '"+u+"'")},ia=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wa=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],$s=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.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,y){for(var I=Math.min(2,3-y.style.size),H=I;H<f.length&&f[H].type!=="stack";H++){var ge=ri(u,sa(f[H]),"math"),Ae=ge.height+ge.depth;if(f[H].type==="small"){var Xe=y.havingBaseStyle(f[H].style);Ae*=Xe.sizeMultiplier}if(Ae>h)return f[H]}return f[f.length-1]},Qi=function(u,h,f,y,I,H){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var ge;W.contains(hs,u)?ge=ia:W.contains(_s,u)?ge=$s:ge=wa;var Ae=xs(u,h,ge,y);return Ae.type==="small"?na(u,Ae.style,f,y,I,H):Ae.type==="large"?ra(u,Ae.size,f,y,I,H):Si(u,h,f,y,I,H)},Us=function(u,h,f,y,I,H){var ge=y.fontMetrics().axisHeight*y.sizeMultiplier,Ae=901,Xe=5/y.fontMetrics().ptPerEm,ft=Math.max(h-ge,f+ge),Ft=Math.max(ft/500*Ae,2*ft-Xe);return Qi(u,Ft,!0,y,I,H)},Pi={sqrtImage:Ns,sizedDelim:Ii,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 _i(K,u){var h=Rn(K);if(h&&W.contains(aa,h.text))return h;throw new g("Invalid delimiter: '"+(h?h.text:JSON.stringify(K))+"' after '"+u.funcName+"'",K)}_n({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=_i(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==="."?gt.makeSpan([u.mclass]):Pi.sizedDelim(u.delim,u.size,h,u.mode,[u.mclass])},mathmlBuilder:function(u){var h=[];u.delim!=="."&&h.push(Xn(u.delim,u.mode));var f=new mn.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.")}_n({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 g("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:_i(h[0],u).text,color:f}}}),_n({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,h){var f=_i(h[0],u),y=u.parser;++y.leftrightDepth;var I=y.parseExpression(!1);--y.leftrightDepth,y.expect("\\right",!1);var H=Mn(y.parseFunction(),"leftright-right");return{type:"leftright",mode:y.mode,body:I,left:f.text,right:H.delim,rightColor:H.color}},htmlBuilder:function(u,h){ss(u);for(var f=Sr(u.body,h,!0,["mopen","mclose"]),y=0,I=0,H=!1,ge=0;ge<f.length;ge++)f[ge].isMiddle?H=!0:(y=Math.max(f[ge].height,y),I=Math.max(f[ge].depth,I));y*=h.sizeMultiplier,I*=h.sizeMultiplier;var Ae;if(u.left==="."?Ae=oi(h,["mopen"]):Ae=Pi.leftRightDelim(u.left,y,I,h,u.mode,["mopen"]),f.unshift(Ae),H)for(var Xe=1;Xe<f.length;Xe++){var ft=f[Xe],Ft=ft.isMiddle;Ft&&(f[Xe]=Pi.leftRightDelim(Ft.delim,y,I,Ft.options,u.mode,[]))}var qt;if(u.right===".")qt=oi(h,["mclose"]);else{var hn=u.rightColor?h.withColor(u.rightColor):h;qt=Pi.leftRightDelim(u.right,y,I,hn,u.mode,["mclose"])}return f.push(qt),gt.makeSpan(["minner"],f,h)},mathmlBuilder:function(u,h){ss(u);var f=ur(u.body,h);if(u.left!=="."){var y=new mn.MathNode("mo",[Xn(u.left,u.mode)]);y.setAttribute("fence","true"),f.unshift(y)}if(u.right!=="."){var I=new mn.MathNode("mo",[Xn(u.right,u.mode)]);I.setAttribute("fence","true"),u.rightColor&&I.setAttribute("mathcolor",u.rightColor),f.push(I)}return vr(f)}}),_n({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,h){var f=_i(h[0],u);if(!u.parser.leftrightDepth)throw new g("\\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=oi(h,[]);else{f=Pi.sizedDelim(u.delim,1,h,u.mode,[]);var y={delim:u.delim,options:h};f.isMiddle=y}return f},mathmlBuilder:function(u,h){var f=u.delim==="\\vert"||u.delim==="|"?Xn("|","text"):Xn(u.delim,u.mode),y=new mn.MathNode("mo",[f]);return y.setAttribute("fence","true"),y.setAttribute("lspace","0.05em"),y.setAttribute("rspace","0.05em"),y}});var fs=function(u,h){var f=gt.wrapFragment(cr(u.body,h),h),y=u.label.substr(1),I=h.sizeMultiplier,H,ge=0,Ae=W.isCharacterBox(u.body);if(y==="sout")H=gt.makeSpan(["stretchy","sout"]),H.height=h.fontMetrics().defaultRuleThickness/I,ge=-.5*h.fontMetrics().xHeight;else{/cancel/.test(y)?Ae||f.classes.push("cancel-pad"):f.classes.push("boxpad");var Xe=0,ft=0;/box/.test(y)?(ft=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness),Xe=h.fontMetrics().fboxsep+(y==="colorbox"?0:ft)):Xe=Ae?.2:0,H=yi.encloseSpan(f,y,Xe,h),/fbox|boxed|fcolorbox/.test(y)&&(H.style.borderStyle="solid",H.style.borderWidth=ft+"em"),ge=f.depth+Xe,u.backgroundColor&&(H.style.backgroundColor=u.backgroundColor,u.borderColor&&(H.style.borderColor=u.borderColor))}var Ft;return u.backgroundColor?Ft=gt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:H,shift:ge},{type:"elem",elem:f,shift:0}]},h):Ft=gt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:H,shift:ge,wrapperClasses:/cancel/.test(y)?["svg-align"]:[]}]},h),/cancel/.test(y)&&(Ft.height=f.height,Ft.depth=f.depth),/cancel/.test(y)&&!Ae?gt.makeSpan(["mord","cancel-lap"],[Ft],h):gt.makeSpan(["mord"],[Ft],h)},Es=function(u,h){var f=0,y=new mn.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Bn(u.body,h)]);switch(u.label){case"\\cancel":y.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":y.setAttribute("notation","downdiagonalstrike");break;case"\\sout":y.setAttribute("notation","horizontalstrike");break;case"\\fbox":y.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=h.fontMetrics().fboxsep*h.fontMetrics().ptPerEm,y.setAttribute("width","+"+2*f+"pt"),y.setAttribute("height","+"+2*f+"pt"),y.setAttribute("lspace",f+"pt"),y.setAttribute("voffset",f+"pt"),u.label==="\\fcolorbox"){var I=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness);y.setAttribute("style","border: "+I+"em solid "+String(u.borderColor))}break;case"\\xcancel":y.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&y.setAttribute("mathbackground",u.backgroundColor),y};_n({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,h,f){var y=u.parser,I=u.funcName,H=Mn(h[0],"color-token").color,ge=h[1];return{type:"enclose",mode:y.mode,label:I,backgroundColor:H,body:ge}},htmlBuilder:fs,mathmlBuilder:Es}),_n({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,h,f){var y=u.parser,I=u.funcName,H=Mn(h[0],"color-token").color,ge=Mn(h[1],"color-token").color,Ae=h[2];return{type:"enclose",mode:y.mode,label:I,backgroundColor:ge,borderColor:H,body:Ae}},htmlBuilder:fs,mathmlBuilder:Es}),_n({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]}}}),_n({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,h,f){var y=u.parser,I=u.funcName,H=h[0];return{type:"enclose",mode:y.mode,label:I,body:H}},htmlBuilder:fs,mathmlBuilder:Es});var oa={};function Ni(K){for(var u=K.type,h=K.names,f=K.props,y=K.handler,I=K.htmlBuilder,H=K.mathmlBuilder,ge={type:u,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:y},Ae=0;Ae<h.length;++Ae)oa[h[Ae]]=ge;I&&(Dr[u]=I),H&&(Er[u]=H)}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,y=u.addJot,I=u.cols,H=u.arraystretch,ge=u.colSeparationType;if(K.gullet.beginGroup(),K.gullet.macros.set("\\\\","\\cr"),!H){var Ae=K.gullet.expandMacroAsText("\\arraystretch");if(Ae==null)H=1;else if(H=parseFloat(Ae),!H||H<0)throw new g("Invalid \\arraystretch: "+Ae)}K.gullet.beginGroup();var Xe=[],ft=[Xe],Ft=[],qt=[];for(qt.push(la(K));;){var hn=K.parseExpression(!1,"\\cr");K.gullet.endGroup(),K.gullet.beginGroup(),hn={type:"ordgroup",mode:K.mode,body:hn},h&&(hn={type:"styling",mode:K.mode,style:h,body:[hn]}),Xe.push(hn);var yn=K.fetch().text;if(yn==="&")K.consume();else if(yn==="\\end"){Xe.length===1&&hn.type==="styling"&&hn.body[0].body.length===0&&ft.pop(),qt.length<ft.length+1&&qt.push([]);break}else if(yn==="\\cr"){var Cn=Mn(K.parseFunction(),"cr");Ft.push(Cn.size),qt.push(la(K)),Xe=[],ft.push(Xe)}else throw new g("Expected & or \\\\ or \\cr or \\end",K.nextToken)}return K.gullet.endGroup(),K.gullet.endGroup(),{type:"array",mode:K.mode,addJot:y,arraystretch:H,body:ft,cols:I,rowGaps:Ft,hskipBeforeAndAfter:f,hLinesBeforeRow:qt,colSeparationType:ge}}function Ss(K){return K.substr(0,1)==="d"?"display":"text"}var $i=function(u,h){var f,y,I=u.body.length,H=u.hLinesBeforeRow,ge=0,Ae=new Array(I),Xe=[],ft=Math.max(h.fontMetrics().arrayRuleWidth,h.minRuleThickness),Ft=1/h.fontMetrics().ptPerEm,qt=5*Ft;if(u.colSeparationType&&u.colSeparationType==="small"){var hn=h.havingStyle(x.SCRIPT).sizeMultiplier;qt=.2778*(hn/h.sizeMultiplier)}var yn=12*Ft,Cn=3*Ft,Yn=u.arraystretch*yn,Jn=.7*Yn,hr=.3*Yn,yr=0;function Gr(Xs){for(var ga=0;ga<Xs.length;++ga)ga>0&&(yr+=.25),Xe.push({pos:yr,isDashed:Xs[ga]})}for(Gr(H[0]),f=0;f<u.body.length;++f){var Br=u.body[f],Wr=Jn,Vr=hr;ge<Br.length&&(ge=Br.length);var zr=new Array(Br.length);for(y=0;y<Br.length;++y){var gi=cr(Br[y],h);Vr<gi.depth&&(Vr=gi.depth),Wr<gi.height&&(Wr=gi.height),zr[y]=gi}var Qr=u.rowGaps[f],_t=0;Qr&&(_t=Ve(Qr,h),_t>0&&(_t+=hr,Vr<_t&&(Vr=_t),_t=0)),u.addJot&&(Vr+=Cn),zr.height=Wr,zr.depth=Vr,yr+=Wr,zr.pos=yr,yr+=Vr+_t,Ae[f]=zr,Gr(H[f+1])}var Ri=yr/2+h.fontMetrics().axisHeight,Wi=u.cols||[],Ui=[],ii,os;for(y=0,os=0;y<ge||os<Wi.length;++y,++os){for(var Vi=Wi[os]||{},lo=!0;Vi.type==="separator";){if(lo||(ii=gt.makeSpan(["arraycolsep"],[]),ii.style.width=h.fontMetrics().doubleRuleSep+"em",Ui.push(ii)),Vi.separator==="|"||Vi.separator===":"){var Bo=Vi.separator==="|"?"solid":"dashed",Os=gt.makeSpan(["vertical-separator"],[],h);Os.style.height=yr+"em",Os.style.borderRightWidth=ft+"em",Os.style.borderRightStyle=Bo,Os.style.margin="0 -"+ft/2+"em",Os.style.verticalAlign=-(yr-Ri)+"em",Ui.push(Os)}else throw new g("Invalid separator type: "+Vi.separator);os++,Vi=Wi[os]||{},lo=!1}if(!(y>=ge)){var Ps=void 0;(y>0||u.hskipBeforeAndAfter)&&(Ps=W.deflt(Vi.pregap,qt),Ps!==0&&(ii=gt.makeSpan(["arraycolsep"],[]),ii.style.width=Ps+"em",Ui.push(ii)));var zi=[];for(f=0;f<I;++f){var ks=Ae[f],Ys=ks[y];if(Ys){var ma=ks.pos-Ri;Ys.depth=ks.depth,Ys.height=ks.height,zi.push({type:"elem",elem:Ys,shift:ma})}}zi=gt.makeVList({positionType:"individualShift",children:zi},h),zi=gt.makeSpan(["col-align-"+(Vi.align||"c")],[zi]),Ui.push(zi),(y<ge-1||u.hskipBeforeAndAfter)&&(Ps=W.deflt(Vi.postgap,qt),Ps!==0&&(ii=gt.makeSpan(["arraycolsep"],[]),ii.style.width=Ps+"em",Ui.push(ii)))}}if(Ae=gt.makeSpan(["mtable"],Ui),Xe.length>0){for(var Li=gt.makeLineSpan("hline",h,ft),No=gt.makeLineSpan("hdashline",h,ft),pa=[{type:"elem",elem:Ae,shift:0}];Xe.length>0;){var Ba=Xe.pop(),uo=Ba.pos-Ri;Ba.isDashed?pa.push({type:"elem",elem:No,shift:uo}):pa.push({type:"elem",elem:Li,shift:uo})}Ae=gt.makeVList({positionType:"individualShift",children:pa},h)}return gt.makeSpan(["mord"],[Ae],h)},js={c:"center ",l:"left ",r:"right "},Lr=function(u,h){var f=new mn.MathNode("mtable",u.body.map(function(yr){return new mn.MathNode("mtr",yr.map(function(Gr){return new mn.MathNode("mtd",[Bn(Gr,h)])}))})),y=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);f.setAttribute("rowspacing",y+"em");var I="",H="";if(u.cols){var ge=u.cols,Ae="",Xe=!1,ft=0,Ft=ge.length;ge[0].type==="separator"&&(I+="top ",ft=1),ge[ge.length-1].type==="separator"&&(I+="bottom ",Ft-=1);for(var qt=ft;qt<Ft;qt++)ge[qt].type==="align"?(H+=js[ge[qt].align],Xe&&(Ae+="none "),Xe=!0):ge[qt].type==="separator"&&Xe&&(Ae+=ge[qt].separator==="|"?"solid ":"dashed ",Xe=!1);f.setAttribute("columnalign",H.trim()),/[sd]/.test(Ae)&&f.setAttribute("columnlines",Ae.trim())}if(u.colSeparationType==="align"){for(var hn=u.cols||[],yn="",Cn=1;Cn<hn.length;Cn++)yn+=Cn%2?"0em ":"1em ";f.setAttribute("columnspacing",yn.trim())}else u.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var Yn="",Jn=u.hLinesBeforeRow;I+=Jn[0].length>0?"left ":"",I+=Jn[Jn.length-1].length>0?"right ":"";for(var hr=1;hr<Jn.length-1;hr++)Yn+=Jn[hr].length===0?"none ":Jn[hr][0]?"dashed ":"solid ";return/[sd]/.test(Yn)&&f.setAttribute("rowlines",Yn.trim()),I!==""&&(f=new mn.MathNode("menclose",[f]),f.setAttribute("notation",I.trim())),u.arraystretch&&u.arraystretch<1&&(f=new mn.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},Or=function(u,h){var f=[],y=qi(u.parser,{cols:f,addJot:!0},"display"),I,H=0,ge={type:"ordgroup",mode:u.mode,body:[]},Ae=ir(h[0],"ordgroup");if(Ae){for(var Xe="",ft=0;ft<Ae.body.length;ft++){var Ft=Mn(Ae.body[ft],"textord");Xe+=Ft.text}I=Number(Xe),H=I*2}var qt=!H;y.body.forEach(function(Yn){for(var Jn=1;Jn<Yn.length;Jn+=2){var hr=Mn(Yn[Jn],"styling"),yr=Mn(hr.body[0],"ordgroup");yr.body.unshift(ge)}if(qt)H<Yn.length&&(H=Yn.length);else{var Gr=Yn.length/2;if(I<Gr)throw new g("Too many math in a row: "+("expected "+I+", but got "+Gr),Yn[0])}});for(var hn=0;hn<H;++hn){var yn="r",Cn=0;hn%2===1?yn="l":hn>0&&qt&&(Cn=1),f[hn]={type:"align",align:yn,pregap:Cn,postgap:0}}return y.colSeparationType=qt?"align":"alignat",y};Ni({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,h){var f=Rn(h[0]),y=f?[h[0]]:Mn(h[0],"ordgroup").body,I=y.map(function(ge){var Ae=br(ge),Xe=Ae.text;if("lcr".indexOf(Xe)!==-1)return{type:"align",align:Xe};if(Xe==="|")return{type:"separator",separator:"|"};if(Xe===":")return{type:"separator",separator:":"};throw new g("Unknown column alignment: "+Xe,ge)}),H={cols:I,hskipBeforeAndAfter:!0};return qi(u.parser,H,Ss(u.envName))},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({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},y=qi(u.parser,f,Ss(u.envName));return h?{type:"leftright",mode:u.mode,body:[y],left:h[0],right:h[1],rightColor:void 0}:y},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({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:Lr}),Ni({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,h){var f=Rn(h[0]),y=f?[h[0]]:Mn(h[0],"ordgroup").body,I=y.map(function(ge){var Ae=br(ge),Xe=Ae.text;if("lc".indexOf(Xe)!==-1)return{type:"align",align:Xe};throw new g("Unknown column alignment: "+Xe,ge)});if(I.length>1)throw new g("{subarray} can contain only one column");var H={cols:I,hskipBeforeAndAfter:!1,arraystretch:.5};if(H=qi(u.parser,H,"script"),H.body[0].length>1)throw new g("{subarray} can contain only one column");return H},htmlBuilder:$i,mathmlBuilder:Lr}),Ni({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:Lr}),Ni({type:"array",names:["aligned"],props:{numArgs:0},handler:Or,htmlBuilder:$i,mathmlBuilder:Lr}),Ni({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:Lr}),Ni({type:"array",names:["alignedat"],props:{numArgs:1},handler:Or,htmlBuilder:$i,mathmlBuilder:Lr}),_n({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,h){throw new g(u.funcName+" valid only within array environment")}});var Ur=oa,hi=Ur;_n({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];if(I.type!=="ordgroup")throw new g("Invalid environment name",I);for(var H="",ge=0;ge<I.body.length;++ge)H+=Mn(I.body[ge],"textord").text;if(y==="\\begin"){if(!hi.hasOwnProperty(H))throw new g("No such environment: "+H,I);var Ae=hi[H],Xe=f.parseArguments("\\begin{"+H+"}",Ae),ft=Xe.args,Ft=Xe.optArgs,qt={mode:f.mode,envName:H,parser:f},hn=Ae.handler(qt,ft,Ft);f.expect("\\end",!1);var yn=f.nextToken,Cn=Mn(f.parseFunction(),"environment");if(Cn.name!==H)throw new g("Mismatch: \\begin{"+H+"} matched by \\end{"+Cn.name+"}",yn);return hn}return{type:"environment",mode:f.mode,name:H,nameGroup:I}}});var fi=gt.makeSpan;function ms(K,u){var h=Sr(K.body,u,!0);return fi([K.mclass],h,u)}function ps(K,u){var h,f=ur(K.body,u);return K.mclass==="minner"?mn.newDocumentFragment(f):(K.mclass==="mord"?K.isCharacterBox?(h=f[0],h.type="mi"):h=new mn.MathNode("mi",f):(K.isCharacterBox?(h=f[0],h.type="mo"):h=new mn.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)}_n({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"mclass",mode:f.mode,mclass:"m"+y.substr(5),body:qn(I),isCharacterBox:W.isCharacterBox(I)}},htmlBuilder:ms,mathmlBuilder:ps});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"};_n({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:W.isCharacterBox(h[1])}}}),_n({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[1],H=h[0],ge;y!=="\\stackrel"?ge=Ji(I):ge="mrel";var Ae={type:"op",mode:I.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:y!=="\\stackrel",body:qn(I)},Xe={type:"supsub",mode:H.mode,base:Ae,sup:y==="\\underset"?null:H,sub:y==="\\underset"?H:null};return{type:"mclass",mode:f.mode,mclass:ge,body:[Xe],isCharacterBox:W.isCharacterBox(Xe)}},htmlBuilder:ms,mathmlBuilder:ps});var Hs=function(u,h){var f=u.font,y=h.withFont(f);return cr(u.body,y)},ws=function(u,h){var f=u.font,y=h.withFont(f);return Bn(u.body,y)},es={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};_n({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,y=u.funcName,I=h[0],H=y;return H in es&&(H=es[H]),{type:"font",mode:f.mode,font:H.slice(1),body:I}},htmlBuilder:Hs,mathmlBuilder:ws}),_n({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,h){var f=u.parser,y=h[0],I=W.isCharacterBox(y);return{type:"mclass",mode:f.mode,mclass:Ji(y),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:y}],isCharacterBox:I}}}),_n({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=u.breakOnTokenText,H=f.mode,ge=f.parseExpression(!0,I),Ae="math"+y.slice(1);return{type:"font",mode:H,font:Ae,body:{type:"ordgroup",mode:f.mode,body:ge}}},htmlBuilder:Hs,mathmlBuilder:ws});var As=function(u,h){var f=h;return u==="display"?f=f.id>=x.SCRIPT.id?f.text():x.DISPLAY:u==="text"&&f.size===x.DISPLAY.size?f=x.TEXT:u==="script"?f=x.SCRIPT:u==="scriptscript"&&(f=x.SCRIPTSCRIPT),f},Ts=function(u,h){var f=As(u.size,h.style),y=f.fracNum(),I=f.fracDen(),H;H=h.havingStyle(y);var ge=cr(u.numer,H,h);if(u.continued){var Ae=8.5/h.fontMetrics().ptPerEm,Xe=3.5/h.fontMetrics().ptPerEm;ge.height=ge.height<Ae?Ae:ge.height,ge.depth=ge.depth<Xe?Xe:ge.depth}H=h.havingStyle(I);var ft=cr(u.denom,H,h),Ft,qt,hn;u.hasBarLine?(u.barSize?(qt=Ve(u.barSize,h),Ft=gt.makeLineSpan("frac-line",h,qt)):Ft=gt.makeLineSpan("frac-line",h),qt=Ft.height,hn=Ft.height):(Ft=null,qt=0,hn=h.fontMetrics().defaultRuleThickness);var yn,Cn,Yn;f.size===x.DISPLAY.size||u.size==="display"?(yn=h.fontMetrics().num1,qt>0?Cn=3*hn:Cn=7*hn,Yn=h.fontMetrics().denom1):(qt>0?(yn=h.fontMetrics().num2,Cn=hn):(yn=h.fontMetrics().num3,Cn=3*hn),Yn=h.fontMetrics().denom2);var Jn;if(Ft){var yr=h.fontMetrics().axisHeight;yn-ge.depth-(yr+.5*qt)<Cn&&(yn+=Cn-(yn-ge.depth-(yr+.5*qt))),yr-.5*qt-(ft.height-Yn)<Cn&&(Yn+=Cn-(yr-.5*qt-(ft.height-Yn)));var Gr=-(yr-.5*qt);Jn=gt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:Yn},{type:"elem",elem:Ft,shift:Gr},{type:"elem",elem:ge,shift:-yn}]},h)}else{var hr=yn-ge.depth-(ft.height-Yn);hr<Cn&&(yn+=.5*(Cn-hr),Yn+=.5*(Cn-hr)),Jn=gt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:Yn},{type:"elem",elem:ge,shift:-yn}]},h)}H=h.havingStyle(f),Jn.height*=H.sizeMultiplier/h.sizeMultiplier,Jn.depth*=H.sizeMultiplier/h.sizeMultiplier;var Br;f.size===x.DISPLAY.size?Br=h.fontMetrics().delim1:Br=h.fontMetrics().delim2;var Wr,Vr;return u.leftDelim==null?Wr=oi(h,["mopen"]):Wr=Pi.customSizedDelim(u.leftDelim,Br,!0,h.havingStyle(f),u.mode,["mopen"]),u.continued?Vr=gt.makeSpan([]):u.rightDelim==null?Vr=oi(h,["mclose"]):Vr=Pi.customSizedDelim(u.rightDelim,Br,!0,h.havingStyle(f),u.mode,["mclose"]),gt.makeSpan(["mord"].concat(H.sizingClasses(h)),[Wr,gt.makeSpan(["mfrac"],[Jn]),Vr],h)},Cs=function(u,h){var f=new mn.MathNode("mfrac",[Bn(u.numer,h),Bn(u.denom,h)]);if(!u.hasBarLine)f.setAttribute("linethickness","0px");else if(u.barSize){var y=Ve(u.barSize,h);f.setAttribute("linethickness",y+"em")}var I=As(u.size,h.style);if(I.size!==h.style.size){f=new mn.MathNode("mstyle",[f]);var H=I.size===x.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",H),f.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var ge=[];if(u.leftDelim!=null){var Ae=new mn.MathNode("mo",[new mn.TextNode(u.leftDelim.replace("\\",""))]);Ae.setAttribute("fence","true"),ge.push(Ae)}if(ge.push(f),u.rightDelim!=null){var Xe=new mn.MathNode("mo",[new mn.TextNode(u.rightDelim.replace("\\",""))]);Xe.setAttribute("fence","true"),ge.push(Xe)}return vr(ge)}return f};_n({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,y=u.funcName,I=h[0],H=h[1],ge,Ae=null,Xe=null,ft="auto";switch(y){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":ge=!0;break;case"\\\\atopfrac":ge=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":ge=!1,Ae="(",Xe=")";break;case"\\\\bracefrac":ge=!1,Ae="\\{",Xe="\\}";break;case"\\\\brackfrac":ge=!1,Ae="[",Xe="]";break;default:throw new Error("Unrecognized genfrac command")}switch(y){case"\\cfrac":case"\\dfrac":case"\\dbinom":ft="display";break;case"\\tfrac":case"\\tbinom":ft="text";break}return{type:"genfrac",mode:f.mode,continued:y==="\\cfrac",numer:I,denom:H,hasBarLine:ge,leftDelim:Ae,rightDelim:Xe,size:ft,barSize:null}},htmlBuilder:Ts,mathmlBuilder:Cs}),_n({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var h=u.parser,f=u.funcName,y=u.token,I;switch(f){case"\\over":I="\\frac";break;case"\\choose":I="\\binom";break;case"\\atop":I="\\\\atopfrac";break;case"\\brace":I="\\\\bracefrac";break;case"\\brack":I="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:h.mode,replaceWith:I,token:y}}});var mi=["display","text","script","scriptscript"],bi=function(u){var h=null;return u.length>0&&(h=u,h=h==="."?null:h),h};_n({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,h){var f=u.parser,y=h[4],I=h[5],H=ir(h[0],"atom");H&&(H=xr(h[0],"open"));var ge=H?bi(H.text):null,Ae=ir(h[1],"atom");Ae&&(Ae=xr(h[1],"close"));var Xe=Ae?bi(Ae.text):null,ft=Mn(h[2],"size"),Ft,qt=null;ft.isBlank?Ft=!0:(qt=ft.value,Ft=qt.number>0);var hn="auto",yn=ir(h[3],"ordgroup");if(yn){if(yn.body.length>0){var Cn=Mn(yn.body[0],"textord");hn=mi[Number(Cn.text)]}}else yn=Mn(h[3],"textord"),hn=mi[Number(yn.text)];return{type:"genfrac",mode:f.mode,numer:y,denom:I,continued:!1,hasBarLine:Ft,barSize:qt,leftDelim:ge,rightDelim:Xe,size:hn}},htmlBuilder:Ts,mathmlBuilder:Cs}),_n({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=u.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:Mn(h[0],"size").value,token:I}}}),_n({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0],H=ee(Mn(h[1],"infix").size),ge=h[2],Ae=H.number>0;return{type:"genfrac",mode:f.mode,numer:I,denom:ge,continued:!1,hasBarLine:Ae,barSize:H,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Ts,mathmlBuilder:Cs});var Ha=function(u,h){var f=h.style,y,I,H=ir(u,"supsub");H?(y=H.sup?cr(H.sup,h.havingStyle(f.sup()),h):cr(H.sub,h.havingStyle(f.sub()),h),I=Mn(H.base,"horizBrace")):I=Mn(u,"horizBrace");var ge=cr(I.base,h.havingBaseStyle(x.DISPLAY)),Ae=yi.svgSpan(I,h),Xe;if(I.isOver?(Xe=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"kern",size:.1},{type:"elem",elem:Ae}]},h),Xe.children[0].children[0].children[1].classes.push("svg-align")):(Xe=gt.makeVList({positionType:"bottom",positionData:ge.depth+.1+Ae.height,children:[{type:"elem",elem:Ae},{type:"kern",size:.1},{type:"elem",elem:ge}]},h),Xe.children[0].children[0].children[0].classes.push("svg-align")),y){var ft=gt.makeSpan(["mord",I.isOver?"mover":"munder"],[Xe],h);I.isOver?Xe=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ft},{type:"kern",size:.2},{type:"elem",elem:y}]},h):Xe=gt.makeVList({positionType:"bottom",positionData:ft.depth+.2+y.height+y.depth,children:[{type:"elem",elem:y},{type:"kern",size:.2},{type:"elem",elem:ft}]},h)}return gt.makeSpan(["mord",I.isOver?"mover":"munder"],[Xe],h)},sn=function(u,h){var f=yi.mathMLnode(u.label);return new mn.MathNode(u.isOver?"mover":"munder",[Bn(u.base,h),f])};_n({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName;return{type:"horizBrace",mode:f.mode,label:y,isOver:/^\\over/.test(y),base:h[0]}},htmlBuilder:Ha,mathmlBuilder:sn}),_n({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[1],I=Mn(h[0],"url").url;return f.settings.isTrusted({command:"\\href",url:I})?{type:"href",mode:f.mode,href:I,body:qn(y)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,h){var f=Sr(u.body,h,!1);return gt.makeAnchor(u.href,[],f,h)},mathmlBuilder:function(u,h){var f=pr(u.body,h);return f instanceof Hr||(f=new Hr("mrow",[f])),f.setAttribute("href",u.href),f}}),_n({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=Mn(h[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:y}))return f.formatUnsupportedCmd("\\url");for(var I=[],H=0;H<y.length;H++){var ge=y[H];ge==="~"&&(ge="\\textasciitilde"),I.push({type:"textord",mode:"text",text:ge})}var Ae={type:"text",mode:f.mode,font:"\\texttt",body:I};return{type:"href",mode:f.mode,href:y,body:qn(Ae)}}}),_n({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:qn(h[0]),mathml:qn(h[1])}},htmlBuilder:function(u,h){var f=Sr(u.html,h,!1);return gt.makeFragment(f)},mathmlBuilder:function(u,h){return pr(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 g("Invalid size: '"+u+"' in \\includegraphics");var f={number:+(h[1]+h[2]),unit:h[3]};if(!xt(f))throw new g("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};_n({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,h,f){var y=u.parser,I={number:0,unit:"em"},H={number:.9,unit:"em"},ge={number:0,unit:"em"},Ae="";if(f[0])for(var Xe=Mn(f[0],"raw").string,ft=Xe.split(","),Ft=0;Ft<ft.length;Ft++){var qt=ft[Ft].split("=");if(qt.length===2){var hn=qt[1].trim();switch(qt[0].trim()){case"alt":Ae=hn;break;case"width":I=Ks(hn);break;case"height":H=Ks(hn);break;case"totalheight":ge=Ks(hn);break;default:throw new g("Invalid key: '"+qt[0]+"' in \\includegraphics.")}}}var yn=Mn(h[0],"url").url;return Ae===""&&(Ae=yn,Ae=Ae.replace(/^.*[\\/]/,""),Ae=Ae.substring(0,Ae.lastIndexOf("."))),y.settings.isTrusted({command:"\\includegraphics",url:yn})?{type:"includegraphics",mode:y.mode,alt:Ae,width:I,height:H,totalheight:ge,src:yn}:y.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,h){var f=Ve(u.height,h),y=0;u.totalheight.number>0&&(y=Ve(u.totalheight,h)-f,y=Number(y.toFixed(2)));var I=0;u.width.number>0&&(I=Ve(u.width,h));var H={height:f+y+"em"};I>0&&(H.width=I+"em"),y>0&&(H.verticalAlign=-y+"em");var ge=new Ie(u.src,u.alt,H);return ge.height=f,ge.depth=y,ge},mathmlBuilder:function(u,h){var f=new mn.MathNode("mglyph",[]);f.setAttribute("alt",u.alt);var y=Ve(u.height,h),I=0;if(u.totalheight.number>0&&(I=Ve(u.totalheight,h)-y,I=I.toFixed(2),f.setAttribute("valign","-"+I+"em")),f.setAttribute("height",y+I+"em"),u.width.number>0){var H=Ve(u.width,h);f.setAttribute("width",H+"em")}return f.setAttribute("src",u.src),f}}),_n({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=Mn(h[0],"size");if(f.settings.strict){var H=y[1]==="m",ge=I.value.unit==="mu";H?(ge||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" supports only mu units, "+("not "+I.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" works only in math mode")):ge&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+y+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:I.value}},htmlBuilder:function(u,h){return gt.makeGlue(u.dimension,h)},mathmlBuilder:function(u,h){var f=Ve(u.dimension,h);return new mn.SpaceNode(f)}}),_n({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"lap",mode:f.mode,alignment:y.slice(5),body:I}},htmlBuilder:function(u,h){var f;u.alignment==="clap"?(f=gt.makeSpan([],[cr(u.body,h)]),f=gt.makeSpan(["inner"],[f],h)):f=gt.makeSpan(["inner"],[cr(u.body,h)]);var y=gt.makeSpan(["fix"],[]),I=gt.makeSpan([u.alignment],[f,y],h),H=gt.makeSpan(["strut"]);return H.style.height=I.height+I.depth+"em",H.style.verticalAlign=-I.depth+"em",I.children.unshift(H),I=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:I}]},h),gt.makeSpan(["mord"],[I],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mpadded",[Bn(u.body,h)]);if(u.alignment!=="rlap"){var y=u.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",y+"width")}return f.setAttribute("width","0px"),f}}),_n({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){var f=u.funcName,y=u.parser,I=y.mode;y.switchMode("math");var H=f==="\\("?"\\)":"$",ge=y.parseExpression(!1,H);return y.expect(H),y.switchMode(I),{type:"styling",mode:y.mode,style:"text",body:ge}}}),_n({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){throw new g("Mismatched "+u.funcName)}});var Aa=function(u,h){switch(h.style.size){case x.DISPLAY.size:return u.display;case x.TEXT.size:return u.text;case x.SCRIPT.size:return u.script;case x.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};_n({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,h){var f=u.parser;return{type:"mathchoice",mode:f.mode,display:qn(h[0]),text:qn(h[1]),script:qn(h[2]),scriptscript:qn(h[3])}},htmlBuilder:function(u,h){var f=Aa(u,h),y=Sr(f,h,!1);return gt.makeFragment(y)},mathmlBuilder:function(u,h){var f=Aa(u,h);return pr(f,h)}});var Ta=function(u,h,f,y,I,H,ge){u=gt.makeSpan([],[u]);var Ae,Xe;if(h){var ft=cr(h,y.havingStyle(I.sup()),y);Xe={elem:ft,kern:Math.max(y.fontMetrics().bigOpSpacing1,y.fontMetrics().bigOpSpacing3-ft.depth)}}if(f){var Ft=cr(f,y.havingStyle(I.sub()),y);Ae={elem:Ft,kern:Math.max(y.fontMetrics().bigOpSpacing2,y.fontMetrics().bigOpSpacing4-Ft.height)}}var qt;if(Xe&&Ae){var hn=y.fontMetrics().bigOpSpacing5+Ae.elem.height+Ae.elem.depth+Ae.kern+u.depth+ge;qt=gt.makeVList({positionType:"bottom",positionData:hn,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ae.elem,marginLeft:-H+"em"},{type:"kern",size:Ae.kern},{type:"elem",elem:u},{type:"kern",size:Xe.kern},{type:"elem",elem:Xe.elem,marginLeft:H+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else if(Ae){var yn=u.height-ge;qt=gt.makeVList({positionType:"top",positionData:yn,children:[{type:"kern",size:y.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ae.elem,marginLeft:-H+"em"},{type:"kern",size:Ae.kern},{type:"elem",elem:u}]},y)}else if(Xe){var Cn=u.depth+ge;qt=gt.makeVList({positionType:"bottom",positionData:Cn,children:[{type:"elem",elem:u},{type:"kern",size:Xe.kern},{type:"elem",elem:Xe.elem,marginLeft:H+"em"},{type:"kern",size:y.fontMetrics().bigOpSpacing5}]},y)}else return u;return gt.makeSpan(["mop","op-limits"],[qt],y)},Ka=["\\smallint"],as=function(u,h){var f,y,I=!1,H,ge=ir(u,"supsub");ge?(f=ge.sup,y=ge.sub,H=Mn(ge.base,"op"),I=!0):H=Mn(u,"op");var Ae=h.style,Xe=!1;Ae.size===x.DISPLAY.size&&H.symbol&&!W.contains(Ka,H.name)&&(Xe=!0);var ft;if(H.symbol){var Ft=Xe?"Size2-Regular":"Size1-Regular",qt="";if((H.name==="\\oiint"||H.name==="\\oiiint")&&(qt=H.name.substr(1),H.name=qt==="oiint"?"\\iint":"\\iiint"),ft=gt.makeSymbol(H.name,Ft,"math",h,["mop","op-symbol",Xe?"large-op":"small-op"]),qt.length>0){var hn=ft.italic,yn=gt.staticSvg(qt+"Size"+(Xe?"2":"1"),h);ft=gt.makeVList({positionType:"individualShift",children:[{type:"elem",elem:ft,shift:0},{type:"elem",elem:yn,shift:Xe?.08:0}]},h),H.name="\\"+qt,ft.classes.unshift("mop"),ft.italic=hn}}else if(H.body){var Cn=Sr(H.body,h,!0);Cn.length===1&&Cn[0]instanceof me?(ft=Cn[0],ft.classes[0]="mop"):ft=gt.makeSpan(["mop"],gt.tryCombineChars(Cn),h)}else{for(var Yn=[],Jn=1;Jn<H.name.length;Jn++)Yn.push(gt.mathsym(H.name[Jn],H.mode,h));ft=gt.makeSpan(["mop"],Yn,h)}var hr=0,yr=0;return(ft instanceof me||H.name==="\\oiint"||H.name==="\\oiiint")&&!H.suppressBaseShift&&(hr=(ft.height-ft.depth)/2-h.fontMetrics().axisHeight,yr=ft.italic),I?Ta(ft,f,y,h,Ae,yr,hr):(hr&&(ft.style.position="relative",ft.style.top=hr+"em"),ft)},Ds=function(u,h){var f;if(u.symbol)f=new Hr("mo",[Xn(u.name,u.mode)]),W.contains(Ka,u.name)&&f.setAttribute("largeop","false");else if(u.body)f=new Hr("mo",ur(u.body,h));else{f=new Hr("mi",[new rr(u.name.slice(1))]);var y=new Hr("mo",[Xn("\u2061","text")]);u.parentIsSupSub?f=new Hr("mo",[f,y]):f=ti([f,y])}return f},To={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};_n({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,y=u.funcName,I=y;return I.length===1&&(I=To[I]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:I}},htmlBuilder:as,mathmlBuilder:Ds}),_n({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=h[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:qn(y)}},htmlBuilder:as,mathmlBuilder:Ds});var Co={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};_n({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}),_n({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}),_n({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,y=f;return y.length===1&&(y=Co[y]),{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:y}},htmlBuilder:as,mathmlBuilder:Ds});var ua=function(u,h){var f,y,I=!1,H,ge=ir(u,"supsub");ge?(f=ge.sup,y=ge.sub,H=Mn(ge.base,"operatorname"),I=!0):H=Mn(u,"operatorname");var Ae;if(H.body.length>0){for(var Xe=H.body.map(function(hn){var yn=hn.text;return typeof yn=="string"?{type:"textord",mode:hn.mode,text:yn}:hn}),ft=Sr(Xe,h.withFont("mathrm"),!0),Ft=0;Ft<ft.length;Ft++){var qt=ft[Ft];qt instanceof me&&(qt.text=qt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Ae=gt.makeSpan(["mop"],ft,h)}else Ae=gt.makeSpan(["mop"],[],h);return I?Ta(Ae,f,y,h,h.style,0,0):Ae},Gs=function(u,h){for(var f=ur(u.body,h.withFont("mathrm")),y=!0,I=0;I<f.length;I++){var H=f[I];if(!(H instanceof mn.SpaceNode))if(H instanceof mn.MathNode)switch(H.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var ge=H.children[0];H.children.length===1&&ge instanceof mn.TextNode?ge.text=ge.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):y=!1;break}default:y=!1}else y=!1}if(y){var Ae=f.map(function(Ft){return Ft.toText()}).join("");f=[new mn.TextNode(Ae)]}var Xe=new mn.MathNode("mi",f);Xe.setAttribute("mathvariant","normal");var ft=new mn.MathNode("mo",[Xn("\u2061","text")]);return u.parentIsSupSub?new mn.MathNode("mo",[Xe,ft]):mn.newDocumentFragment([Xe,ft])};_n({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=u.funcName,I=h[0];return{type:"operatorname",mode:f.mode,body:qn(I),alwaysHandleSupSub:y==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:ua,mathmlBuilder:Gs}),Gn({type:"ordgroup",htmlBuilder:function(u,h){return u.semisimple?gt.makeFragment(Sr(u.body,h,!1)):gt.makeSpan(["mord"],Sr(u.body,h,!0),h)},mathmlBuilder:function(u,h){return pr(u.body,h,!0)}}),_n({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,h){var f=u.parser,y=h[0];return{type:"overline",mode:f.mode,body:y}},htmlBuilder:function(u,h){var f=cr(u.body,h.havingCrampedStyle()),y=gt.makeLineSpan("overline-line",h),I=h.fontMetrics().defaultRuleThickness,H=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*I},{type:"elem",elem:y},{type:"kern",size:I}]},h);return gt.makeSpan(["mord","overline"],[H],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mo",[new mn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var y=new mn.MathNode("mover",[Bn(u.body,h),f]);return y.setAttribute("accent","true"),y}}),_n({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[0];return{type:"phantom",mode:f.mode,body:qn(y)}},htmlBuilder:function(u,h){var f=Sr(u.body,h.withPhantom(),!1);return gt.makeFragment(f)},mathmlBuilder:function(u,h){var f=ur(u.body,h);return new mn.MathNode("mphantom",f)}}),_n({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[0];return{type:"hphantom",mode:f.mode,body:y}},htmlBuilder:function(u,h){var f=gt.makeSpan([],[cr(u.body,h.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var y=0;y<f.children.length;y++)f.children[y].height=0,f.children[y].depth=0;return f=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h),gt.makeSpan(["mord"],[f],h)},mathmlBuilder:function(u,h){var f=ur(qn(u.body),h),y=new mn.MathNode("mphantom",f),I=new mn.MathNode("mpadded",[y]);return I.setAttribute("height","0px"),I.setAttribute("depth","0px"),I}}),_n({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,y=h[0];return{type:"vphantom",mode:f.mode,body:y}},htmlBuilder:function(u,h){var f=gt.makeSpan(["inner"],[cr(u.body,h.withPhantom())]),y=gt.makeSpan(["fix"],[]);return gt.makeSpan(["mord","rlap"],[f,y],h)},mathmlBuilder:function(u,h){var f=ur(qn(u.body),h),y=new mn.MathNode("mphantom",f),I=new mn.MathNode("mpadded",[y]);return I.setAttribute("width","0px"),I}}),_n({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,h){var f=u.parser,y=Mn(h[0],"size").value,I=h[1];return{type:"raisebox",mode:f.mode,dy:y,body:I}},htmlBuilder:function(u,h){var f=cr(u.body,h),y=Ve(u.dy,h);return gt.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:f}]},h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mpadded",[Bn(u.body,h)]),y=u.dy.number+u.dy.unit;return f.setAttribute("voffset",y),f}}),_n({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,h,f){var y=u.parser,I=f[0],H=Mn(h[0],"size"),ge=Mn(h[1],"size");return{type:"rule",mode:y.mode,shift:I&&Mn(I,"size").value,width:H.value,height:ge.value}},htmlBuilder:function(u,h){var f=gt.makeSpan(["mord","rule"],[],h),y=Ve(u.width,h),I=Ve(u.height,h),H=u.shift?Ve(u.shift,h):0;return f.style.borderRightWidth=y+"em",f.style.borderTopWidth=I+"em",f.style.bottom=H+"em",f.width=y,f.height=I+H,f.depth=-H,f.maxFontSize=I*1.125*h.sizeMultiplier,f},mathmlBuilder:function(u,h){var f=Ve(u.width,h),y=Ve(u.height,h),I=u.shift?Ve(u.shift,h):0,H=h.color&&h.getColor()||"black",ge=new mn.MathNode("mspace");ge.setAttribute("mathbackground",H),ge.setAttribute("width",f+"em"),ge.setAttribute("height",y+"em");var Ae=new mn.MathNode("mpadded",[ge]);return I>=0?Ae.setAttribute("height","+"+I+"em"):(Ae.setAttribute("height",I+"em"),Ae.setAttribute("depth","+"+-I+"em")),Ae.setAttribute("voffset",I+"em"),Ae}});function gs(K,u,h){for(var f=Sr(K,u,!1),y=u.sizeMultiplier/h.sizeMultiplier,I=0;I<f.length;I++){var H=f[I].classes.indexOf("sizing");H<0?Array.prototype.push.apply(f[I].classes,u.sizingClasses(h)):f[I].classes[H+1]==="reset-size"+u.size&&(f[I].classes[H+1]="reset-size"+h.size),f[I].height*=y,f[I].depth*=y}return gt.makeFragment(f)}var Ga=["\\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)};_n({type:"sizing",names:Ga,props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,y=u.funcName,I=u.parser,H=I.parseExpression(!1,f);return{type:"sizing",mode:I.mode,size:Ga.indexOf(y)+1,body:H}},htmlBuilder:Do,mathmlBuilder:function(u,h){var f=h.havingSize(u.size),y=ur(u.body,f),I=new mn.MathNode("mstyle",y);return I.setAttribute("mathsize",f.sizeMultiplier+"em"),I}}),_n({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,h,f){var y=u.parser,I=!1,H=!1,ge=f[0]&&Mn(f[0],"ordgroup");if(ge)for(var Ae="",Xe=0;Xe<ge.body.length;++Xe){var ft=ge.body[Xe];if(Ae=ft.text,Ae==="t")I=!0;else if(Ae==="b")H=!0;else{I=!1,H=!1;break}}else I=!0,H=!0;var Ft=h[0];return{type:"smash",mode:y.mode,body:Ft,smashHeight:I,smashDepth:H}},htmlBuilder:function(u,h){var f=gt.makeSpan([],[cr(u.body,h)]);if(!u.smashHeight&&!u.smashDepth)return f;if(u.smashHeight&&(f.height=0,f.children))for(var y=0;y<f.children.length;y++)f.children[y].height=0;if(u.smashDepth&&(f.depth=0,f.children))for(var I=0;I<f.children.length;I++)f.children[I].depth=0;var H=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h);return gt.makeSpan(["mord"],[H],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mpadded",[Bn(u.body,h)]);return u.smashHeight&&f.setAttribute("height","0px"),u.smashDepth&&f.setAttribute("depth","0px"),f}}),_n({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,h,f){var y=u.parser,I=f[0],H=h[0];return{type:"sqrt",mode:y.mode,body:H,index:I}},htmlBuilder:function(u,h){var f=cr(u.body,h.havingCrampedStyle());f.height===0&&(f.height=h.fontMetrics().xHeight),f=gt.wrapFragment(f,h);var y=h.fontMetrics(),I=y.defaultRuleThickness,H=I;h.style.id<x.TEXT.id&&(H=h.fontMetrics().xHeight);var ge=I+H/4,Ae=f.height+f.depth+ge+I,Xe=Pi.sqrtImage(Ae,h),ft=Xe.span,Ft=Xe.ruleWidth,qt=Xe.advanceWidth,hn=ft.height-Ft;hn>f.height+f.depth+ge&&(ge=(ge+hn-f.height-f.depth)/2);var yn=ft.height-f.height-ge-Ft;f.style.paddingLeft=qt+"em";var Cn=gt.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+yn)},{type:"elem",elem:ft},{type:"kern",size:Ft}]},h);if(u.index){var Yn=h.havingStyle(x.SCRIPTSCRIPT),Jn=cr(u.index,Yn,h),hr=.6*(Cn.height-Cn.depth),yr=gt.makeVList({positionType:"shift",positionData:-hr,children:[{type:"elem",elem:Jn}]},h),Gr=gt.makeSpan(["root"],[yr]);return gt.makeSpan(["mord","sqrt"],[Gr,Cn],h)}else return gt.makeSpan(["mord","sqrt"],[Cn],h)},mathmlBuilder:function(u,h){var f=u.body,y=u.index;return y?new mn.MathNode("mroot",[Bn(f,h),Bn(y,h)]):new mn.MathNode("msqrt",[Bn(f,h)])}});var Wa={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};_n({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,y=u.funcName,I=u.parser,H=I.parseExpression(!0,f),ge=y.slice(1,y.length-5);return{type:"styling",mode:I.mode,style:ge,body:H}},htmlBuilder:function(u,h){var f=Wa[u.style],y=h.havingStyle(f).withFont("");return gs(u.body,y,h)},mathmlBuilder:function(u,h){var f=Wa[u.style],y=h.havingStyle(f),I=ur(u.body,y),H=new mn.MathNode("mstyle",I),ge={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Ae=ge[u.style];return H.setAttribute("scriptlevel",Ae[0]),H.setAttribute("displaystyle",Ae[1]),H}});var Io=function(u,h){var f=u.base;if(f)if(f.type==="op"){var y=f.limits&&(h.style.size===x.DISPLAY.size||f.alwaysHandleSupSub);return y?as:null}else if(f.type==="operatorname"){var I=f.alwaysHandleSupSub&&(h.style.size===x.DISPLAY.size||f.limits);return I?ua:null}else{if(f.type==="accent")return W.isCharacterBox(f.base)?Un:null;if(f.type==="horizBrace"){var H=!u.sub;return H===f.isOver?Ha:null}else return null}else return null};Gn({type:"supsub",htmlBuilder:function(u,h){var f=Io(u,h);if(f)return f(u,h);var y=u.base,I=u.sup,H=u.sub,ge=cr(y,h),Ae,Xe,ft=h.fontMetrics(),Ft=0,qt=0,hn=y&&W.isCharacterBox(y);if(I){var yn=h.havingStyle(h.style.sup());Ae=cr(I,yn,h),hn||(Ft=ge.height-yn.fontMetrics().supDrop*yn.sizeMultiplier/h.sizeMultiplier)}if(H){var Cn=h.havingStyle(h.style.sub());Xe=cr(H,Cn,h),hn||(qt=ge.depth+Cn.fontMetrics().subDrop*Cn.sizeMultiplier/h.sizeMultiplier)}var Yn;h.style===x.DISPLAY?Yn=ft.sup1:h.style.cramped?Yn=ft.sup3:Yn=ft.sup2;var Jn=h.sizeMultiplier,hr=.5/ft.ptPerEm/Jn+"em",yr=null;if(Xe){var Gr=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(ge instanceof me||Gr)&&(yr=-ge.italic+"em")}var Br;if(Ae&&Xe){Ft=Math.max(Ft,Yn,Ae.depth+.25*ft.xHeight),qt=Math.max(qt,ft.sub2);var Wr=ft.defaultRuleThickness,Vr=4*Wr;if(Ft-Ae.depth-(Xe.height-qt)<Vr){qt=Vr-(Ft-Ae.depth)+Xe.height;var zr=.8*ft.xHeight-(Ft-Ae.depth);zr>0&&(Ft+=zr,qt-=zr)}var gi=[{type:"elem",elem:Xe,shift:qt,marginRight:hr,marginLeft:yr},{type:"elem",elem:Ae,shift:-Ft,marginRight:hr}];Br=gt.makeVList({positionType:"individualShift",children:gi},h)}else if(Xe){qt=Math.max(qt,ft.sub1,Xe.height-.8*ft.xHeight);var Qr=[{type:"elem",elem:Xe,marginLeft:yr,marginRight:hr}];Br=gt.makeVList({positionType:"shift",positionData:qt,children:Qr},h)}else if(Ae)Ft=Math.max(Ft,Yn,Ae.depth+.25*ft.xHeight),Br=gt.makeVList({positionType:"shift",positionData:-Ft,children:[{type:"elem",elem:Ae,marginRight:hr}]},h);else throw new Error("supsub must have either sup or sub.");var _t=ai(ge,"right")||"mord";return gt.makeSpan([_t],[ge,gt.makeSpan(["msupsub"],[Br])],h)},mathmlBuilder:function(u,h){var f=!1,y,I,H=ir(u.base,"horizBrace");H&&(I=!!u.sup,I===H.isOver&&(f=!0,y=H.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var ge=[Bn(u.base,h)];u.sub&&ge.push(Bn(u.sub,h)),u.sup&&ge.push(Bn(u.sup,h));var Ae;if(f)Ae=y?"mover":"munder";else if(u.sub)if(u.sup){var Ft=u.base;Ft&&Ft.type==="op"&&Ft.limits&&h.style===x.DISPLAY||Ft&&Ft.type==="operatorname"&&Ft.alwaysHandleSupSub&&(h.style===x.DISPLAY||Ft.limits)?Ae="munderover":Ae="msubsup"}else{var ft=u.base;ft&&ft.type==="op"&&ft.limits&&(h.style===x.DISPLAY||ft.alwaysHandleSupSub)||ft&&ft.type==="operatorname"&&ft.alwaysHandleSupSub&&(ft.limits||h.style===x.DISPLAY)?Ae="munder":Ae="msub"}else{var Xe=u.base;Xe&&Xe.type==="op"&&Xe.limits&&(h.style===x.DISPLAY||Xe.alwaysHandleSupSub)||Xe&&Xe.type==="operatorname"&&Xe.alwaysHandleSupSub&&(Xe.limits||h.style===x.DISPLAY)?Ae="mover":Ae="msup"}var qt=new mn.MathNode(Ae,ge);return qt}}),Gn({type:"atom",htmlBuilder:function(u,h){return gt.mathsym(u.text,u.mode,h,["m"+u.family])},mathmlBuilder:function(u,h){var f=new mn.MathNode("mo",[Xn(u.text,u.mode)]);if(u.family==="bin"){var y=Cr(u,h);y==="bold-italic"&&f.setAttribute("mathvariant",y)}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"};Gn({type:"mathord",htmlBuilder:function(u,h){return gt.makeOrd(u,h,"mathord")},mathmlBuilder:function(u,h){var f=new mn.MathNode("mi",[Xn(u.text,u.mode,h)]),y=Cr(u,h)||"italic";return y!==Ca[f.type]&&f.setAttribute("mathvariant",y),f}}),Gn({type:"textord",htmlBuilder:function(u,h){return gt.makeOrd(u,h,"textord")},mathmlBuilder:function(u,h){var f=Xn(u.text,u.mode,h),y=Cr(u,h)||"normal",I;return u.mode==="text"?I=new mn.MathNode("mtext",[f]):/[0-9]/.test(u.text)?I=new mn.MathNode("mn",[f]):u.text==="\\prime"?I=new mn.MathNode("mo",[f]):I=new mn.MathNode("mi",[f]),y!==Ca[I.type]&&I.setAttribute("mathvariant",y),I}});var Ws={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Is={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Gn({type:"spacing",htmlBuilder:function(u,h){if(Is.hasOwnProperty(u.text)){var f=Is[u.text].className||"";if(u.mode==="text"){var y=gt.makeOrd(u,h,"textord");return y.classes.push(f),y}else return gt.makeSpan(["mspace",f],[gt.mathsym(u.text,u.mode,h)],h)}else{if(Ws.hasOwnProperty(u.text))return gt.makeSpan(["mspace",Ws[u.text]],[],h);throw new g('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,h){var f;if(Is.hasOwnProperty(u.text))f=new mn.MathNode("mtext",[new mn.TextNode("\xA0")]);else{if(Ws.hasOwnProperty(u.text))return new mn.MathNode("mspace");throw new g('Unknown type of space "'+u.text+'"')}return f}});var Rs=function(){var u=new mn.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};Gn({type:"tag",mathmlBuilder:function(u,h){var f=new mn.MathNode("mtable",[new mn.MathNode("mtr",[Rs(),new mn.MathNode("mtd",[pr(u.body,h)]),Rs(),new mn.MathNode("mtd",[pr(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};_n({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,y=u.funcName,I=h[0];return{type:"text",mode:f.mode,body:qn(I),font:y}},htmlBuilder:function(u,h){var f=ca(u,h),y=Sr(u.body,f,!0);return gt.makeSpan(["mord","text"],gt.tryCombineChars(y),f)},mathmlBuilder:function(u,h){var f=ca(u,h);return pr(u.body,f)}}),_n({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=cr(u.body,h),y=gt.makeLineSpan("underline-line",h),I=h.fontMetrics().defaultRuleThickness,H=gt.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:I},{type:"elem",elem:y},{type:"kern",size:3*I},{type:"elem",elem:f}]},h);return gt.makeSpan(["mord","underline"],[H],h)},mathmlBuilder:function(u,h){var f=new mn.MathNode("mo",[new mn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var y=new mn.MathNode("munder",[Bn(u.body,h),f]);return y.setAttribute("accentunder","true"),y}}),_n({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,h,f){throw new g("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,h){for(var f=Ya(u),y=[],I=h.havingStyle(h.style.text()),H=0;H<f.length;H++){var ge=f[H];ge==="~"&&(ge="\\textasciitilde"),y.push(gt.makeSymbol(ge,"Typewriter-Regular",u.mode,I,["mord","texttt"]))}return gt.makeSpan(["mord","text"].concat(I.sizingClasses(h)),gt.tryCombineChars(y),I)},mathmlBuilder:function(u,h){var f=new mn.TextNode(Ya(u)),y=new mn.MathNode("mtext",[f]);return y.setAttribute("mathvariant","monospace"),y}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},da=Pr,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+"+$"),Oa="("+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(Oa,"g"),this.catcodes={"%":14}}var u=K.prototype;return u.setCatcode=function(f,y){this.catcodes[f]=y},u.lex=function(){var f=this.input,y=this.tokenRegex.lastIndex;if(y===f.length)return new ve("EOF",new se(this,y,y));var I=this.tokenRegex.exec(f);if(I===null||I.index!==y)throw new g("Unexpected character: '"+f[y]+"'",new ve(f[y],new se(this,y,y+1)));var H=I[2]||" ";if(this.catcodes[H]===14){var ge=f.indexOf(`
|
|
|
`,this.tokenRegex.lastIndex);return ge===-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=ge+1,this.lex()}var Ae=H.match(Qa);return Ae&&(H=Ae[1]),new ve(H,new se(this,y,this.tokenRegex.lastIndex))},K}(),Oo=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 g("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var y in f)f.hasOwnProperty(y)&&(f[y]===void 0?delete this.current[y]:this.current[y]=f[y])},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,y,I){if(I===void 0&&(I=!1),I){for(var H=0;H<this.undefStack.length;H++)delete this.undefStack[H][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=y)}else{var ge=this.undefStack[this.undefStack.length-1];ge&&!ge.hasOwnProperty(f)&&(ge[f]=this.current[f])}this.current[f]=y},K}(),Ja={},Po=Ja;function Fe(K,u){Ja[K]=u}Fe("\\@firstoftwo",function(K){var u=K.consumeArgs(2);return{tokens:u[0],numArgs:0}}),Fe("\\@secondoftwo",function(K){var u=K.consumeArgs(2);return{tokens:u[1],numArgs:0}}),Fe("\\@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}}),Fe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Fe("\\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};Fe("\\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 g("\\char` missing argument");f=u.text.charCodeAt(0)}else h=10;if(h){if(f=eo[u.text],f==null||f>=h)throw new g("Invalid base-"+h+" digit "+u.text);for(var y;(y=eo[K.future().text])!=null&&y<h;)f*=h,f+=y,K.popToken()}return"\\@char{"+f+"}"});var Pa=function(u,h){var f=u.consumeArgs(1)[0];if(f.length!==1)throw new g("\\gdef's first argument must be a macro name");var y=f[0].text,I=0;for(f=u.consumeArgs(1)[0];f.length===1&&f[0].text==="#";){if(f=u.consumeArgs(1)[0],f.length!==1)throw new g('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new g('Invalid argument number "'+f[0].text+'"');if(I++,parseInt(f[0].text)!==I)throw new g('Argument number "'+f[0].text+'" out of order');f=u.consumeArgs(1)[0]}return u.macros.set(y,{tokens:f,numArgs:I},h),""};Fe("\\gdef",function(K){return Pa(K,!0)}),Fe("\\def",function(K){return Pa(K,!1)}),Fe("\\global",function(K){var u=K.consumeArgs(1)[0];if(u.length!==1)throw new g("Invalid command after \\global");var h=u[0].text;if(h==="\\def")return Pa(K,!0);throw new g("Invalid command '"+h+"' after \\global")});var ka=function(u,h,f){var y=u.consumeArgs(1)[0];if(y.length!==1)throw new g("\\newcommand's first argument must be a macro name");var I=y[0].text,H=u.isDefined(I);if(H&&!h)throw new g("\\newcommand{"+I+"} attempting to redefine "+(I+"; use \\renewcommand"));if(!H&&!f)throw new g("\\renewcommand{"+I+"} when command "+I+" does not yet exist; use \\newcommand");var ge=0;if(y=u.consumeArgs(1)[0],y.length===1&&y[0].text==="["){for(var Ae="",Xe=u.expandNextToken();Xe.text!=="]"&&Xe.text!=="EOF";)Ae+=Xe.text,Xe=u.expandNextToken();if(!Ae.match(/^\s*[0-9]+\s*$/))throw new g("Invalid number of arguments: "+Ae);ge=parseInt(Ae),y=u.consumeArgs(1)[0]}return u.macros.set(I,{tokens:y,numArgs:ge}),""};Fe("\\newcommand",function(K){return ka(K,!1,!0)}),Fe("\\renewcommand",function(K){return ka(K,!0,!1)}),Fe("\\providecommand",function(K){return ka(K,!0,!0)}),Fe("\\bgroup","{"),Fe("\\egroup","}"),Fe("\\lq","`"),Fe("\\rq","'"),Fe("\\aa","\\r a"),Fe("\\AA","\\r A"),Fe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Fe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Fe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Fe("\u212C","\\mathscr{B}"),Fe("\u2130","\\mathscr{E}"),Fe("\u2131","\\mathscr{F}"),Fe("\u210B","\\mathscr{H}"),Fe("\u2110","\\mathscr{I}"),Fe("\u2112","\\mathscr{L}"),Fe("\u2133","\\mathscr{M}"),Fe("\u211B","\\mathscr{R}"),Fe("\u212D","\\mathfrak{C}"),Fe("\u210C","\\mathfrak{H}"),Fe("\u2128","\\mathfrak{Z}"),Fe("\\Bbbk","\\Bbb{k}"),Fe("\xB7","\\cdotp"),Fe("\\llap","\\mathllap{\\textrm{#1}}"),Fe("\\rlap","\\mathrlap{\\textrm{#1}}"),Fe("\\clap","\\mathclap{\\textrm{#1}}"),Fe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Fe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Fe("\\ne","\\neq"),Fe("\u2260","\\neq"),Fe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Fe("\u2209","\\notin"),Fe("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Fe("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Fe("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Fe("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Fe("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Fe("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Fe("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Fe("\u27C2","\\perp"),Fe("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Fe("\u220C","\\notni"),Fe("\u231C","\\ulcorner"),Fe("\u231D","\\urcorner"),Fe("\u231E","\\llcorner"),Fe("\u231F","\\lrcorner"),Fe("\xA9","\\copyright"),Fe("\xAE","\\textregistered"),Fe("\uFE0F","\\textregistered"),Fe("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Fe("\u22EE","\\vdots"),Fe("\\varGamma","\\mathit{\\Gamma}"),Fe("\\varDelta","\\mathit{\\Delta}"),Fe("\\varTheta","\\mathit{\\Theta}"),Fe("\\varLambda","\\mathit{\\Lambda}"),Fe("\\varXi","\\mathit{\\Xi}"),Fe("\\varPi","\\mathit{\\Pi}"),Fe("\\varSigma","\\mathit{\\Sigma}"),Fe("\\varUpsilon","\\mathit{\\Upsilon}"),Fe("\\varPhi","\\mathit{\\Phi}"),Fe("\\varPsi","\\mathit{\\Psi}"),Fe("\\varOmega","\\mathit{\\Omega}"),Fe("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Fe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),Fe("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Fe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Fe("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Fe("\\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"};Fe("\\dots",function(K){var u="\\dotso",h=K.expandAfterFuture().text;return h in to?u=to[h]:(h.substr(0,4)==="\\not"||h in Ze.math&&W.contains(["bin","rel"],Ze.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};Fe("\\dotso",function(K){var u=K.future().text;return u in Ls?"\\ldots\\,":"\\ldots"}),Fe("\\dotsc",function(K){var u=K.future().text;return u in Ls&&u!==","?"\\ldots\\,":"\\ldots"}),Fe("\\cdots",function(K){var u=K.future().text;return u in Ls?"\\@cdots\\,":"\\@cdots"}),Fe("\\dotsb","\\cdots"),Fe("\\dotsm","\\cdots"),Fe("\\dotsi","\\!\\cdots"),Fe("\\dotsx","\\ldots\\,"),Fe("\\DOTSI","\\relax"),Fe("\\DOTSB","\\relax"),Fe("\\DOTSX","\\relax"),Fe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Fe("\\,","\\tmspace+{3mu}{.1667em}"),Fe("\\thinspace","\\,"),Fe("\\>","\\mskip{4mu}"),Fe("\\:","\\tmspace+{4mu}{.2222em}"),Fe("\\medspace","\\:"),Fe("\\;","\\tmspace+{5mu}{.2777em}"),Fe("\\thickspace","\\;"),Fe("\\!","\\tmspace-{3mu}{.1667em}"),Fe("\\negthinspace","\\!"),Fe("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Fe("\\negthickspace","\\tmspace-{5mu}{.277em}"),Fe("\\enspace","\\kern.5em "),Fe("\\enskip","\\hskip.5em\\relax"),Fe("\\quad","\\hskip1em\\relax"),Fe("\\qquad","\\hskip2em\\relax"),Fe("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Fe("\\tag@paren","\\tag@literal{({#1})}"),Fe("\\tag@literal",function(K){if(K.macros.get("\\df@tag"))throw new g("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Fe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Fe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Fe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Fe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Fe("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Fe("\\\\","\\newline"),Fe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var no=Dt["Main-Regular"][84][1]-.7*Dt["Main-Regular"][65][1]+"em";Fe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Fe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Fe("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Fe("\\@hspace","\\hskip #1\\relax"),Fe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Fe("\\ordinarycolon",":"),Fe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Fe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Fe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Fe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Fe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Fe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Fe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Fe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Fe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Fe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Fe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Fe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Fe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Fe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Fe("\u2237","\\dblcolon"),Fe("\u2239","\\eqcolon"),Fe("\u2254","\\coloneqq"),Fe("\u2255","\\eqqcolon"),Fe("\u2A74","\\Coloneqq"),Fe("\\ratio","\\vcentcolon"),Fe("\\coloncolon","\\dblcolon"),Fe("\\colonequals","\\coloneqq"),Fe("\\coloncolonequals","\\Coloneqq"),Fe("\\equalscolon","\\eqqcolon"),Fe("\\equalscoloncolon","\\Eqqcolon"),Fe("\\colonminus","\\coloneq"),Fe("\\coloncolonminus","\\Coloneq"),Fe("\\minuscolon","\\eqcolon"),Fe("\\minuscoloncolon","\\Eqcolon"),Fe("\\coloncolonapprox","\\Colonapprox"),Fe("\\coloncolonsim","\\Colonsim"),Fe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Fe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Fe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Fe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Fe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Fe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Fe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Fe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Fe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Fe("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Fe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Fe("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Fe("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Fe("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Fe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Fe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Fe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Fe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Fe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Fe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Fe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Fe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Fe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Fe("\u27E6","\\llbracket"),Fe("\u27E7","\\rrbracket"),Fe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Fe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Fe("\u2983","\\lBrace"),Fe("\u2984","\\rBrace"),Fe("\\darr","\\downarrow"),Fe("\\dArr","\\Downarrow"),Fe("\\Darr","\\Downarrow"),Fe("\\lang","\\langle"),Fe("\\rang","\\rangle"),Fe("\\uarr","\\uparrow"),Fe("\\uArr","\\Uparrow"),Fe("\\Uarr","\\Uparrow"),Fe("\\N","\\mathbb{N}"),Fe("\\R","\\mathbb{R}"),Fe("\\Z","\\mathbb{Z}"),Fe("\\alef","\\aleph"),Fe("\\alefsym","\\aleph"),Fe("\\Alpha","\\mathrm{A}"),Fe("\\Beta","\\mathrm{B}"),Fe("\\bull","\\bullet"),Fe("\\Chi","\\mathrm{X}"),Fe("\\clubs","\\clubsuit"),Fe("\\cnums","\\mathbb{C}"),Fe("\\Complex","\\mathbb{C}"),Fe("\\Dagger","\\ddagger"),Fe("\\diamonds","\\diamondsuit"),Fe("\\empty","\\emptyset"),Fe("\\Epsilon","\\mathrm{E}"),Fe("\\Eta","\\mathrm{H}"),Fe("\\exist","\\exists"),Fe("\\harr","\\leftrightarrow"),Fe("\\hArr","\\Leftrightarrow"),Fe("\\Harr","\\Leftrightarrow"),Fe("\\hearts","\\heartsuit"),Fe("\\image","\\Im"),Fe("\\infin","\\infty"),Fe("\\Iota","\\mathrm{I}"),Fe("\\isin","\\in"),Fe("\\Kappa","\\mathrm{K}"),Fe("\\larr","\\leftarrow"),Fe("\\lArr","\\Leftarrow"),Fe("\\Larr","\\Leftarrow"),Fe("\\lrarr","\\leftrightarrow"),Fe("\\lrArr","\\Leftrightarrow"),Fe("\\Lrarr","\\Leftrightarrow"),Fe("\\Mu","\\mathrm{M}"),Fe("\\natnums","\\mathbb{N}"),Fe("\\Nu","\\mathrm{N}"),Fe("\\Omicron","\\mathrm{O}"),Fe("\\plusmn","\\pm"),Fe("\\rarr","\\rightarrow"),Fe("\\rArr","\\Rightarrow"),Fe("\\Rarr","\\Rightarrow"),Fe("\\real","\\Re"),Fe("\\reals","\\mathbb{R}"),Fe("\\Reals","\\mathbb{R}"),Fe("\\Rho","\\mathrm{P}"),Fe("\\sdot","\\cdot"),Fe("\\sect","\\S"),Fe("\\spades","\\spadesuit"),Fe("\\sub","\\subset"),Fe("\\sube","\\subseteq"),Fe("\\supe","\\supseteq"),Fe("\\Tau","\\mathrm{T}"),Fe("\\thetasym","\\vartheta"),Fe("\\weierp","\\wp"),Fe("\\Zeta","\\mathrm{Z}"),Fe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Fe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Fe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Fe("\\blue","\\textcolor{##6495ed}{#1}"),Fe("\\orange","\\textcolor{##ffa500}{#1}"),Fe("\\pink","\\textcolor{##ff00af}{#1}"),Fe("\\red","\\textcolor{##df0030}{#1}"),Fe("\\green","\\textcolor{##28ae7b}{#1}"),Fe("\\gray","\\textcolor{gray}{#1}"),Fe("\\purple","\\textcolor{##9d38bd}{#1}"),Fe("\\blueA","\\textcolor{##ccfaff}{#1}"),Fe("\\blueB","\\textcolor{##80f6ff}{#1}"),Fe("\\blueC","\\textcolor{##63d9ea}{#1}"),Fe("\\blueD","\\textcolor{##11accd}{#1}"),Fe("\\blueE","\\textcolor{##0c7f99}{#1}"),Fe("\\tealA","\\textcolor{##94fff5}{#1}"),Fe("\\tealB","\\textcolor{##26edd5}{#1}"),Fe("\\tealC","\\textcolor{##01d1c1}{#1}"),Fe("\\tealD","\\textcolor{##01a995}{#1}"),Fe("\\tealE","\\textcolor{##208170}{#1}"),Fe("\\greenA","\\textcolor{##b6ffb0}{#1}"),Fe("\\greenB","\\textcolor{##8af281}{#1}"),Fe("\\greenC","\\textcolor{##74cf70}{#1}"),Fe("\\greenD","\\textcolor{##1fab54}{#1}"),Fe("\\greenE","\\textcolor{##0d923f}{#1}"),Fe("\\goldA","\\textcolor{##ffd0a9}{#1}"),Fe("\\goldB","\\textcolor{##ffbb71}{#1}"),Fe("\\goldC","\\textcolor{##ff9c39}{#1}"),Fe("\\goldD","\\textcolor{##e07d10}{#1}"),Fe("\\goldE","\\textcolor{##a75a05}{#1}"),Fe("\\redA","\\textcolor{##fca9a9}{#1}"),Fe("\\redB","\\textcolor{##ff8482}{#1}"),Fe("\\redC","\\textcolor{##f9685d}{#1}"),Fe("\\redD","\\textcolor{##e84d39}{#1}"),Fe("\\redE","\\textcolor{##bc2612}{#1}"),Fe("\\maroonA","\\textcolor{##ffbde0}{#1}"),Fe("\\maroonB","\\textcolor{##ff92c6}{#1}"),Fe("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Fe("\\maroonD","\\textcolor{##ca337c}{#1}"),Fe("\\maroonE","\\textcolor{##9e034e}{#1}"),Fe("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Fe("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Fe("\\purpleC","\\textcolor{##aa87ff}{#1}"),Fe("\\purpleD","\\textcolor{##7854ab}{#1}"),Fe("\\purpleE","\\textcolor{##543b78}{#1}"),Fe("\\mintA","\\textcolor{##f5f9e8}{#1}"),Fe("\\mintB","\\textcolor{##edf2df}{#1}"),Fe("\\mintC","\\textcolor{##e0e5cc}{#1}"),Fe("\\grayA","\\textcolor{##f6f7f7}{#1}"),Fe("\\grayB","\\textcolor{##f0f1f2}{#1}"),Fe("\\grayC","\\textcolor{##e3e5e6}{#1}"),Fe("\\grayD","\\textcolor{##d6d8da}{#1}"),Fe("\\grayE","\\textcolor{##babec2}{#1}"),Fe("\\grayF","\\textcolor{##888d93}{#1}"),Fe("\\grayG","\\textcolor{##626569}{#1}"),Fe("\\grayH","\\textcolor{##3b3e40}{#1}"),Fe("\\grayI","\\textcolor{##21242c}{#1}"),Fe("\\kaBlue","\\textcolor{##314453}{#1}"),Fe("\\kaGreen","\\textcolor{##71B307}{#1}");var Ma={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ro=function(){function K(h,f,y){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 Oo(Po,f.macros),this.mode=y,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 y;(y=this.stack).push.apply(y,f)},u.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},u.consumeArgs=function(f){for(var y=[],I=0;I<f;++I){this.consumeSpaces();var H=this.popToken();if(H.text==="{"){for(var ge=[],Ae=1;Ae!==0;){var Xe=this.popToken();if(ge.push(Xe),Xe.text==="{")++Ae;else if(Xe.text==="}")--Ae;else if(Xe.text==="EOF")throw new g("End of input in macro argument",H)}ge.pop(),ge.reverse(),y[I]=ge}else{if(H.text==="EOF")throw new g("End of input expecting macro argument");y[I]=[H]}}return y},u.expandOnce=function(){var f=this.popToken(),y=f.text,I=this._getExpansion(y);if(I==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new g("Too many expansions: infinite loop or need to increase maxExpand setting");var H=I.tokens;if(I.numArgs){var ge=this.consumeArgs(I.numArgs);H=H.slice();for(var Ae=H.length-1;Ae>=0;--Ae){var Xe=H[Ae];if(Xe.text==="#"){if(Ae===0)throw new g("Incomplete placeholder at end of macro body",Xe);if(Xe=H[--Ae],Xe.text==="#")H.splice(Ae+1,1);else if(/^[1-9]$/.test(Xe.text)){var ft;(ft=H).splice.apply(ft,[Ae,2].concat(ge[+Xe.text-1]))}else throw new g("Not a valid argument number",Xe)}}}return this.pushTokens(H),H},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof ve)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 y=[],I=this.stack.length;for(this.pushToken(new ve(f));this.stack.length>I;){var H=this.expandOnce();H instanceof ve&&y.push(this.stack.pop())}return y}},u.expandMacroAsText=function(f){var y=this.expandMacro(f);return y&&y.map(function(I){return I.text}).join("")},u._getExpansion=function(f){var y=this.macros.get(f);if(y==null)return y;var I=typeof y=="function"?y(this):y;if(typeof I=="string"){var H=0;if(I.indexOf("#")!==-1)for(var ge=I.replace(/##/g,"");ge.indexOf("#"+(H+1))!==-1;)++H;for(var Ae=new qa(I,this.settings),Xe=[],ft=Ae.lex();ft.text!=="EOF";)Xe.push(ft),ft=Ae.lex();Xe.reverse();var Ft={tokens:Xe,numArgs:H};return Ft}return I},u.isDefined=function(f){return this.macros.has(f)||Vs.hasOwnProperty(f)||Ze.math.hasOwnProperty(f)||Ze.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"},pi=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,y){if(y===void 0&&(y=!0),this.fetch().text!==f)throw new g("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());y&&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,y){for(var I=[];;){this.mode==="math"&&this.consumeSpaces();var H=this.fetch();if(K.endOfExpression.indexOf(H.text)!==-1||y&&H.text===y||f&&Vs[H.text]&&Vs[H.text].infix)break;var ge=this.parseAtom(y);if(!ge)break;I.push(ge)}return this.mode==="text"&&this.formLigatures(I),this.handleInfixNodes(I)},u.handleInfixNodes=function(f){for(var y=-1,I,H=0;H<f.length;H++){var ge=ir(f[H],"infix");if(ge){if(y!==-1)throw new g("only one infix operator per group",ge.token);y=H,I=ge.replaceWith}}if(y!==-1&&I){var Ae,Xe,ft=f.slice(0,y),Ft=f.slice(y+1);ft.length===1&&ft[0].type==="ordgroup"?Ae=ft[0]:Ae={type:"ordgroup",mode:this.mode,body:ft},Ft.length===1&&Ft[0].type==="ordgroup"?Xe=Ft[0]:Xe={type:"ordgroup",mode:this.mode,body:Ft};var qt;return I==="\\\\abovefrac"?qt=this.callFunction(I,[Ae,f[y],Xe],[]):qt=this.callFunction(I,[Ae,Xe],[]),[qt]}else return f},u.handleSupSubscript=function(f){var y=this.fetch(),I=y.text;this.consume();var H=this.parseGroup(f,!1,K.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!H)throw new g("Expected group after '"+I+"'",y);return H},u.formatUnsupportedCmd=function(f){for(var y=[],I=0;I<f.length;I++)y.push({type:"textord",mode:"text",text:f[I]});var H={type:"text",mode:this.mode,body:y},ge={type:"color",mode:this.mode,color:this.settings.errorColor,body:[H]};return ge},u.parseAtom=function(f){var y=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return y;for(var I,H;;){this.consumeSpaces();var ge=this.fetch();if(ge.text==="\\limits"||ge.text==="\\nolimits"){var Ae=ir(y,"op");if(Ae){var Xe=ge.text==="\\limits";Ae.limits=Xe,Ae.alwaysHandleSupSub=!0}else if(Ae=ir(y,"operatorname"),Ae&&Ae.alwaysHandleSupSub){var ft=ge.text==="\\limits";Ae.limits=ft}else throw new g("Limit controls must follow a math operator",ge);this.consume()}else if(ge.text==="^"){if(I)throw new g("Double superscript",ge);I=this.handleSupSubscript("superscript")}else if(ge.text==="_"){if(H)throw new g("Double subscript",ge);H=this.handleSupSubscript("subscript")}else if(ge.text==="'"){if(I)throw new g("Double superscript",ge);var Ft={type:"textord",mode:this.mode,text:"\\prime"},qt=[Ft];for(this.consume();this.fetch().text==="'";)qt.push(Ft),this.consume();this.fetch().text==="^"&&qt.push(this.handleSupSubscript("superscript")),I={type:"ordgroup",mode:this.mode,body:qt}}else break}return I||H?{type:"supsub",mode:this.mode,base:y,sup:I,sub:H}:y},u.parseFunction=function(f,y,I){var H=this.fetch(),ge=H.text,Ae=Vs[ge];if(!Ae)return null;if(this.consume(),I!=null&&Ae.greediness<=I)throw new g("Got function '"+ge+"' with no arguments"+(y?" as "+y:""),H);if(this.mode==="text"&&!Ae.allowedInText)throw new g("Can't use function '"+ge+"' in text mode",H);if(this.mode==="math"&&Ae.allowedInMath===!1)throw new g("Can't use function '"+ge+"' in math mode",H);var Xe=this.parseArguments(ge,Ae),ft=Xe.args,Ft=Xe.optArgs;return this.callFunction(ge,ft,Ft,H,f)},u.callFunction=function(f,y,I,H,ge){var Ae={funcName:f,parser:this,token:H,breakOnTokenText:ge},Xe=Vs[f];if(Xe&&Xe.handler)return Xe.handler(Ae,y,I);throw new g("No function handler for "+f)},u.parseArguments=function(f,y){var I=y.numArgs+y.numOptionalArgs;if(I===0)return{args:[],optArgs:[]};for(var H=y.greediness,ge=[],Ae=[],Xe=0;Xe<I;Xe++){var ft=y.argTypes&&y.argTypes[Xe],Ft=Xe<y.numOptionalArgs,qt=Xe>0&&!Ft||Xe===0&&!Ft&&this.mode==="math",hn=this.parseGroupOfType("argument to '"+f+"'",ft,Ft,H,qt);if(!hn){if(Ft){Ae.push(null);continue}throw new g("Expected group after '"+f+"'",this.fetch())}(Ft?Ae:ge).push(hn)}return{args:ge,optArgs:Ae}},u.parseGroupOfType=function(f,y,I,H,ge){switch(y){case"color":return ge&&this.consumeSpaces(),this.parseColorGroup(I);case"size":return ge&&this.consumeSpaces(),this.parseSizeGroup(I);case"url":return this.parseUrlGroup(I,ge);case"math":case"text":return this.parseGroup(f,I,H,void 0,y,ge);case"hbox":{var Ae=this.parseGroup(f,I,H,void 0,"text",ge);if(!Ae)return Ae;var Xe={type:"styling",mode:Ae.mode,body:[Ae],style:"text"};return Xe}case"raw":{if(ge&&this.consumeSpaces(),I&&this.fetch().text==="{")return null;var ft=this.parseStringGroup("raw",I,!0);if(ft)return{type:"raw",mode:"text",string:ft.text};throw new g("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,I,H,void 0,void 0,ge);default:throw new g("Unknown group type as "+f,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(f,y,I){var H=y?"[":"{",ge=y?"]":"}",Ae=this.fetch();if(Ae.text!==H){if(y)return null;if(I&&Ae.text!=="EOF"&&/[^{}[\]]/.test(Ae.text))return this.consume(),Ae}var Xe=this.mode;this.mode="text",this.expect(H);for(var ft="",Ft=this.fetch(),qt=0,hn=Ft,yn;(yn=this.fetch()).text!==ge||I&&qt>0;){switch(yn.text){case"EOF":throw new g("Unexpected end of input in "+f,Ft.range(hn,ft));case H:qt++;break;case ge:qt--;break}hn=yn,ft+=hn.text,this.consume()}return this.expect(ge),this.mode=Xe,Ft.range(hn,ft)},u.parseRegexGroup=function(f,y){var I=this.mode;this.mode="text";for(var H=this.fetch(),ge=H,Ae="",Xe;(Xe=this.fetch()).text!=="EOF"&&f.test(Ae+Xe.text);)ge=Xe,Ae+=ge.text,this.consume();if(Ae==="")throw new g("Invalid "+y+": '"+H.text+"'",H);return this.mode=I,H.range(ge,Ae)},u.parseColorGroup=function(f){var y=this.parseStringGroup("color",f);if(!y)return null;var I=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(y.text);if(!I)throw new g("Invalid color: '"+y.text+"'",y);var H=I[0];return/^[0-9a-f]{6}$/i.test(H)&&(H="#"+H),{type:"color-token",mode:this.mode,color:H}},u.parseSizeGroup=function(f){var y,I=!1;if(!f&&this.fetch().text!=="{"?y=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):y=this.parseStringGroup("size",f),!y)return null;!f&&y.text.length===0&&(y.text="0pt",I=!0);var H=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(y.text);if(!H)throw new g("Invalid size: '"+y.text+"'",y);var ge={number:+(H[1]+H[2]),unit:H[3]};if(!xt(ge))throw new g("Invalid unit: '"+ge.unit+"'",y);return{type:"size",mode:this.mode,value:ge,isBlank:I}},u.parseUrlGroup=function(f,y){this.gullet.lexer.setCatcode("%",13);var I=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!I)return null;var H=I.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:H}},u.parseGroup=function(f,y,I,H,ge,Ae){var Xe=this.mode;ge&&this.switchMode(ge),Ae&&this.consumeSpaces();var ft=this.fetch(),Ft=ft.text,qt;if(y?Ft==="[":Ft==="{"||Ft==="\\begingroup"){this.consume();var hn=K.endOfGroup[Ft];this.gullet.beginGroup();var yn=this.parseExpression(!1,hn),Cn=this.fetch();this.expect(hn),this.gullet.endGroup(),qt={type:"ordgroup",mode:this.mode,loc:se.range(ft,Cn),body:yn,semisimple:Ft==="\\begingroup"||void 0}}else if(y)qt=null;else if(qt=this.parseFunction(H,f,I)||this.parseSymbol(),qt==null&&Ft[0]==="\\"&&!Ma.hasOwnProperty(Ft)){if(this.settings.throwOnError)throw new g("Undefined control sequence: "+Ft,ft);qt=this.formatUnsupportedCmd(Ft),this.consume()}return ge&&this.switchMode(Xe),qt},u.formLigatures=function(f){for(var y=f.length-1,I=0;I<y;++I){var H=f[I],ge=H.text;ge==="-"&&f[I+1].text==="-"&&(I+1<y&&f[I+2].text==="-"?(f.splice(I,3,{type:"textord",mode:"text",loc:se.range(H,f[I+2]),text:"---"}),y-=2):(f.splice(I,2,{type:"textord",mode:"text",loc:se.range(H,f[I+1]),text:"--"}),y-=1)),(ge==="'"||ge==="`")&&f[I+1].text===ge&&(f.splice(I,2,{type:"textord",mode:"text",loc:se.range(H,f[I+1]),text:ge+ge}),y-=1)}},u.parseSymbol=function(){var f=this.fetch(),y=f.text;if(/^\\verb[^a-zA-Z]/.test(y)){this.consume();var I=y.slice(5),H=I.charAt(0)==="*";if(H&&(I=I.slice(1)),I.length<2||I.charAt(0)!==I.slice(-1))throw new g(`\\verb assertion failed --
|
|
|
please report what input caused this bug`);return I=I.slice(1,-1),{type:"verb",mode:"text",body:I,star:H}}ha.hasOwnProperty(y[0])&&!Ze[this.mode][y[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+y[0]+'" used in math mode',f),y=ha[y[0]]+y.substr(1));var ge=Lo.exec(y);ge&&(y=y.substring(0,ge.index),y==="i"?y="\u0131":y==="j"&&(y="\u0237"));var Ae;if(Ze[this.mode][y]){this.settings.strict&&this.mode==="math"&&An.indexOf(y)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+y[0]+'" used in math mode',f);var Xe=Ze[this.mode][y].group,ft=se.range(f),Ft;if(Rt.hasOwnProperty(Xe)){var qt=Xe;Ft={type:"atom",mode:this.mode,family:qt,loc:ft,text:y}}else Ft={type:Xe,mode:this.mode,loc:ft,text:y};Ae=Ft}else if(y.charCodeAt(0)>=128)this.settings.strict&&($e(y.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+y[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+y[0]+'"'+(" ("+y.charCodeAt(0)+")"),f)),Ae={type:"textord",mode:"text",loc:se.range(f),text:y};else return null;if(this.consume(),ge)for(var hn=0;hn<ge[0].length;hn++){var yn=ge[0][hn];if(!io[yn])throw new g("Unknown accent ' "+yn+"'",f);var Cn=io[yn][this.mode];if(!Cn)throw new g("Accent "+yn+" unsupported in "+this.mode+" mode",f);Ae={type:"accent",mode:this.mode,loc:se.range(f),label:Cn,isStretchy:!1,isShifty:!0,base:Ae}}return Ae},K}();pi.endOfExpression=["}","\\endgroup","\\end","\\right","&"],pi.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},pi.SUPSUB_GREEDINESS=1;var Gi=function(u,h){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new pi(u,h);delete f.gullet.macros.current["\\df@tag"];var y=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!h.displayMode)throw new g("\\tag works only in display equations");f.gullet.feed("\\df@tag"),y=[{type:"tag",mode:"text",body:y,tag:f.parse()}]}return y},Zs=Gi,so=function(u,h,f){h.textContent="";var y=Fa(u,f).toNode();h.appendChild(y)};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 g("KaTeX doesn't work in quirks mode.")});var fa=function(u,h){var f=Fa(u,h).toMarkup();return f},ko=function(u,h){var f=new D(h);return Zs(u,f)},ao=function(u,h,f){if(f.throwOnError||!(u instanceof g))throw u;var y=gt.makeSpan(["katex-error"],[new me(h)]);return y.setAttribute("title",u.toString()),y.setAttribute("style","color:"+f.errorColor),y},Fa=function(u,h){var f=new D(h);try{var y=Zs(u,f);return Xr(y,u,f)}catch(I){return ao(I,u,f)}},Mo=function(u,h){var f=new D(h);try{var y=Zs(u,f);return Kr(y,u,f)}catch(I){return ao(I,u,f)}},oo={version:"0.11.1",render:so,renderToString:fa,ParseError:g,__parse:ko,__renderToDomTree:Fa,__renderToHTMLTree:Mo,__setFontMetrics:Ht,__defineSymbol:b,__defineMacro:Fe,__domTree:{Span:We,Anchor:Re,SymbolNode:me,SvgNode:Ee,PathNode:Ke,LineNode:et}},Fo=_.default=oo}]).default})},32834:function(fn){(function(ct,_){fn.exports=_()})(this,function(){"use strict";function ct(Se,je){for(var Ge=0;Ge<je.length;Ge++){var Y=je[Ge];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(Se,Y.key,Y)}}function _(Se,je,Ge){return je&&ct(Se.prototype,je),Ge&&ct(Se,Ge),Se}function m(Se,je){if(Se){if(typeof Se=="string")return ce(Se,je);var Ge=Object.prototype.toString.call(Se).slice(8,-1);if(Ge==="Object"&&Se.constructor&&(Ge=Se.constructor.name),Ge==="Map"||Ge==="Set")return Array.from(Se);if(Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge))return ce(Se,je)}}function ce(Se,je){(je==null||je>Se.length)&&(je=Se.length);for(var Ge=0,Y=new Array(je);Ge<je;Ge++)Y[Ge]=Se[Ge];return Y}function se(Se,je){var Ge=typeof Symbol!="undefined"&&Se[Symbol.iterator]||Se["@@iterator"];if(Ge)return(Ge=Ge.call(Se)).next.bind(Ge);if(Array.isArray(Se)||(Ge=m(Se))||je&&Se&&typeof Se.length=="number"){Ge&&(Se=Ge);var Y=0;return function(){return Y>=Se.length?{done:!0}:{done:!1,value:Se[Y++]}}}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 ve={exports:{}};function j(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function g(Se){ve.exports.defaults=Se}ve.exports={defaults:j(),getDefaults:j,changeDefaults:g};var de=/[&<>"']/,ae=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,G=/[<>"']|&(?!#?\w+;)/g,B={"&":"&","<":"<",">":">",'"':""","'":"'"},E=function(je){return B[je]};function S(Se,je){if(je){if(de.test(Se))return Se.replace(ae,E)}else if(o.test(Se))return Se.replace(G,E);return Se}var C=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function R(Se){return Se.replace(C,function(je,Ge){return Ge=Ge.toLowerCase(),Ge==="colon"?":":Ge.charAt(0)==="#"?Ge.charAt(1)==="x"?String.fromCharCode(parseInt(Ge.substring(2),16)):String.fromCharCode(+Ge.substring(1)):""})}var ee=/(^|[^\[])\^/g;function Q(Se,je){Se=Se.source||Se,je=je||"";var Ge={replace:function(ne,be){return be=be.source||be,be=be.replace(ee,"$1"),Se=Se.replace(ne,be),Ge},getRegex:function(){return new RegExp(Se,je)}};return Ge}var W=/[^\w:]/g,D=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function z(Se,je,Ge){if(Se){var Y;try{Y=decodeURIComponent(R(Ge)).replace(W,"").toLowerCase()}catch(ne){return null}if(Y.indexOf("javascript:")===0||Y.indexOf("vbscript:")===0||Y.indexOf("data:")===0)return null}je&&!D.test(Ge)&&(Ge=oe(je,Ge));try{Ge=encodeURI(Ge).replace(/%25/g,"%")}catch(ne){return null}return Ge}var F={},$=/^[^:]+:\/*[^/]*$/,ue=/^([^:]+:)[\s\S]*$/,pe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function oe(Se,je){F[" "+Se]||($.test(Se)?F[" "+Se]=Se+"/":F[" "+Se]=Be(Se,"/",!0)),Se=F[" "+Se];var Ge=Se.indexOf(":")===-1;return je.substring(0,2)==="//"?Ge?je:Se.replace(ue,"$1")+je:je.charAt(0)==="/"?Ge?je:Se.replace(pe,"$1")+je:Se+je}var xe={exec:function(){}};function ke(Se){for(var je=1,Ge,Y;je<arguments.length;je++){Ge=arguments[je];for(Y in Ge)Object.prototype.hasOwnProperty.call(Ge,Y)&&(Se[Y]=Ge[Y])}return Se}function De(Se,je){var Ge=Se.replace(/\|/g,function(be,Pe,P){for(var Je=!1,J=Pe;--J>=0&&P[J]==="\\";)Je=!Je;return Je?"|":" |"}),Y=Ge.split(/ \|/),ne=0;if(Y.length>je)Y.splice(je);else for(;Y.length<je;)Y.push("");for(;ne<Y.length;ne++)Y[ne]=Y[ne].trim().replace(/\\\|/g,"|");return Y}function Be(Se,je,Ge){var Y=Se.length;if(Y===0)return"";for(var ne=0;ne<Y;){var be=Se.charAt(Y-ne-1);if(be===je&&!Ge)ne++;else if(be!==je&&Ge)ne++;else break}return Se.substr(0,Y-ne)}function X(Se,je){if(Se.indexOf(je[1])===-1)return-1;for(var Ge=Se.length,Y=0,ne=0;ne<Ge;ne++)if(Se[ne]==="\\")ne++;else if(Se[ne]===je[0])Y++;else if(Se[ne]===je[1]&&(Y--,Y<0))return ne;return-1}function N(Se){Se&&Se.sanitize&&!Se.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function k(Se,je){if(je<1)return"";for(var Ge="";je>1;)je&1&&(Ge+=Se),je>>=1,Se+=Se;return Ge+Se}var q={escape:S,unescape:R,edit:Q,cleanUrl:z,resolveUrl:oe,noopTest:xe,merge:ke,splitCells:De,rtrim:Be,findClosingBracket:X,checkSanitizeDeprecation:N,repeatString:k},te=ve.exports.defaults,Z=q.rtrim,x=q.splitCells,w=q.escape,V=q.findClosingBracket;function fe(Se,je,Ge){var Y=je.href,ne=je.title?w(je.title):null,be=Se[1].replace(/\\([\[\]])/g,"$1");return Se[0].charAt(0)!=="!"?{type:"link",raw:Ge,href:Y,title:ne,text:be}:{type:"image",raw:Ge,href:Y,title:ne,text:w(be)}}function $e(Se,je){var Ge=Se.match(/^(\s+)(?:```)/);if(Ge===null)return je;var Y=Ge[1];return je.split(`
|
|
|
`).map(function(ne){var be=ne.match(/^\s+/);if(be===null)return ne;var Pe=be[0];return Pe.length>=Y.length?ne.slice(Y.length):ne}).join(`
|
|
|
`)}var Qe=function(){function Se(Ge){this.options=Ge||te}var je=Se.prototype;return je.space=function(Y){var ne=this.rules.block.newline.exec(Y);if(ne)return ne[0].length>1?{type:"space",raw:ne[0]}:{raw:`
|
|
|
`}},je.code=function(Y){var ne=this.rules.block.code.exec(Y);if(ne){var be=ne[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ne[0],codeBlockStyle:"indented",text:this.options.pedantic?be:Z(be,`
|
|
|
`)}}},je.fences=function(Y){var ne=this.rules.block.fences.exec(Y);if(ne){var be=ne[0],Pe=$e(be,ne[3]||"");return{type:"code",raw:be,lang:ne[2]?ne[2].trim():ne[2],text:Pe}}},je.heading=function(Y){var ne=this.rules.block.heading.exec(Y);if(ne){var be=ne[2].trim();if(/#$/.test(be)){var Pe=Z(be,"#");(this.options.pedantic||!Pe||/ $/.test(Pe))&&(be=Pe.trim())}return{type:"heading",raw:ne[0],depth:ne[1].length,text:be}}},je.nptable=function(Y){var ne=this.rules.block.nptable.exec(Y);if(ne){var be={type:"table",header:x(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:ne[0]};if(be.header.length===be.align.length){var Pe=be.align.length,P;for(P=0;P<Pe;P++)/^ *-+: *$/.test(be.align[P])?be.align[P]="right":/^ *:-+: *$/.test(be.align[P])?be.align[P]="center":/^ *:-+ *$/.test(be.align[P])?be.align[P]="left":be.align[P]=null;for(Pe=be.cells.length,P=0;P<Pe;P++)be.cells[P]=x(be.cells[P],be.header.length);return be}}},je.hr=function(Y){var ne=this.rules.block.hr.exec(Y);if(ne)return{type:"hr",raw:ne[0]}},je.blockquote=function(Y){var ne=this.rules.block.blockquote.exec(Y);if(ne){var be=ne[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ne[0],text:be}}},je.list=function(Y){var ne=this.rules.block.list.exec(Y);if(ne){var be=ne[0],Pe=ne[2],P=Pe.length>1,Je={type:"list",raw:be,ordered:P,start:P?+Pe.slice(0,-1):"",loose:!1,items:[]},J=ne[0].match(this.rules.block.item),rt=!1,Gt,Xt,Jt,an,rn,Sn,On,pn,Pn,tn=J.length;Jt=this.rules.block.listItemStart.exec(J[0]);for(var $t=0;$t<tn;$t++){if(Gt=J[$t],be=Gt,this.options.pedantic||(Pn=Gt.match(new RegExp("\\n\\s*\\n {0,"+(Jt[0].length-1)+"}\\S")),Pn&&(rn=Gt.length-Pn.index+J.slice($t+1).join(`
|
|
|
`).length,Je.raw=Je.raw.substring(0,Je.raw.length-rn),Gt=Gt.substring(0,Pn.index),be=Gt,tn=$t+1)),$t!==tn-1){if(an=this.rules.block.listItemStart.exec(J[$t+1]),this.options.pedantic?an[1].length>Jt[1].length:an[1].length>=Jt[0].length||an[1].length>3){J.splice($t,2,J[$t]+(!this.options.pedantic&&an[1].length<Jt[0].length&&!J[$t].match(/\n$/)?"":`
|
|
|
`)+J[$t+1]),$t--,tn--;continue}else(!this.options.pedantic||this.options.smartLists?an[2][an[2].length-1]!==Pe[Pe.length-1]:P===(an[2].length===1))&&(rn=J.slice($t+1).join(`
|
|
|
`).length,Je.raw=Je.raw.substring(0,Je.raw.length-rn),$t=tn-1);Jt=an}Xt=Gt.length,Gt=Gt.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Gt.indexOf(`
|
|
|
`)&&(Xt-=Gt.length,Gt=this.options.pedantic?Gt.replace(/^ {1,4}/gm,""):Gt.replace(new RegExp("^ {1,"+Xt+"}","gm"),"")),Gt=Z(Gt,`
|
|
|
`),$t!==tn-1&&(be=be+`
|
|
|
`),Sn=rt||/\n\n(?!\s*$)/.test(be),$t!==tn-1&&(rt=be.slice(-2)===`
|
|
|
|
|
|
`,Sn||(Sn=rt)),Sn&&(Je.loose=!0),this.options.gfm&&(On=/^\[[ xX]\] /.test(Gt),pn=void 0,On&&(pn=Gt[1]!==" ",Gt=Gt.replace(/^\[[ xX]\] +/,""))),Je.items.push({type:"list_item",raw:be,task:On,checked:pn,loose:Sn,text:Gt})}return Je}},je.html=function(Y){var ne=this.rules.block.html.exec(Y);if(ne)return{type:this.options.sanitize?"paragraph":"html",raw:ne[0],pre:!this.options.sanitizer&&(ne[1]==="pre"||ne[1]==="script"||ne[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ne[0]):w(ne[0]):ne[0]}},je.def=function(Y){var ne=this.rules.block.def.exec(Y);if(ne){ne[3]&&(ne[3]=ne[3].substring(1,ne[3].length-1));var be=ne[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:be,raw:ne[0],href:ne[2],title:ne[3]}}},je.table=function(Y){var ne=this.rules.block.table.exec(Y);if(ne){var be={type:"table",header:x(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(be.header.length===be.align.length){be.raw=ne[0];var Pe=be.align.length,P;for(P=0;P<Pe;P++)/^ *-+: *$/.test(be.align[P])?be.align[P]="right":/^ *:-+: *$/.test(be.align[P])?be.align[P]="center":/^ *:-+ *$/.test(be.align[P])?be.align[P]="left":be.align[P]=null;for(Pe=be.cells.length,P=0;P<Pe;P++)be.cells[P]=x(be.cells[P].replace(/^ *\| *| *\| *$/g,""),be.header.length);return be}}},je.lheading=function(Y){var ne=this.rules.block.lheading.exec(Y);if(ne)return{type:"heading",raw:ne[0],depth:ne[2].charAt(0)==="="?1:2,text:ne[1]}},je.paragraph=function(Y){var ne=this.rules.block.paragraph.exec(Y);if(ne)return{type:"paragraph",raw:ne[0],text:ne[1].charAt(ne[1].length-1)===`
|
|
|
`?ne[1].slice(0,-1):ne[1]}},je.text=function(Y){var ne=this.rules.block.text.exec(Y);if(ne)return{type:"text",raw:ne[0],text:ne[0]}},je.escape=function(Y){var ne=this.rules.inline.escape.exec(Y);if(ne)return{type:"escape",raw:ne[0],text:w(ne[1])}},je.tag=function(Y,ne,be){var Pe=this.rules.inline.tag.exec(Y);if(Pe)return!ne&&/^<a /i.test(Pe[0])?ne=!0:ne&&/^<\/a>/i.test(Pe[0])&&(ne=!1),!be&&/^<(pre|code|kbd|script)(\s|>)/i.test(Pe[0])?be=!0:be&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Pe[0])&&(be=!1),{type:this.options.sanitize?"text":"html",raw:Pe[0],inLink:ne,inRawBlock:be,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):w(Pe[0]):Pe[0]}},je.link=function(Y){var ne=this.rules.inline.link.exec(Y);if(ne){var be=ne[2].trim();if(!this.options.pedantic&&/^</.test(be)){if(!/>$/.test(be))return;var Pe=Z(be.slice(0,-1),"\\");if((be.length-Pe.length)%2===0)return}else{var P=V(ne[2],"()");if(P>-1){var Je=ne[0].indexOf("!")===0?5:4,J=Je+ne[1].length+P;ne[2]=ne[2].substring(0,P),ne[0]=ne[0].substring(0,J).trim(),ne[3]=""}}var rt=ne[2],Gt="";if(this.options.pedantic){var Xt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(rt);Xt&&(rt=Xt[1],Gt=Xt[3])}else Gt=ne[3]?ne[3].slice(1,-1):"";return rt=rt.trim(),/^</.test(rt)&&(this.options.pedantic&&!/>$/.test(be)?rt=rt.slice(1):rt=rt.slice(1,-1)),fe(ne,{href:rt&&rt.replace(this.rules.inline._escapes,"$1"),title:Gt&&Gt.replace(this.rules.inline._escapes,"$1")},ne[0])}},je.reflink=function(Y,ne){var be;if((be=this.rules.inline.reflink.exec(Y))||(be=this.rules.inline.nolink.exec(Y))){var Pe=(be[2]||be[1]).replace(/\s+/g," ");if(Pe=ne[Pe.toLowerCase()],!Pe||!Pe.href){var P=be[0].charAt(0);return{type:"text",raw:P,text:P}}return fe(be,Pe,be[0])}},je.emStrong=function(Y,ne,be){be===void 0&&(be="");var Pe=this.rules.inline.emStrong.lDelim.exec(Y);if(Pe&&!(Pe[3]&&be.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 P=Pe[1]||Pe[2]||"";if(!P||P&&(be===""||this.rules.inline.punctuation.exec(be))){var Je=Pe[0].length-1,J,rt,Gt=Je,Xt=0,Jt=Pe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Jt.lastIndex=0,ne=ne.slice(-1*Y.length+Je);(Pe=Jt.exec(ne))!=null;)if(J=Pe[1]||Pe[2]||Pe[3]||Pe[4]||Pe[5]||Pe[6],!!J){if(rt=J.length,Pe[3]||Pe[4]){Gt+=rt;continue}else if((Pe[5]||Pe[6])&&Je%3&&!((Je+rt)%3)){Xt+=rt;continue}if(Gt-=rt,!(Gt>0))return rt=Math.min(rt,rt+Gt+Xt),Math.min(Je,rt)%2?{type:"em",raw:Y.slice(0,Je+Pe.index+rt+1),text:Y.slice(1,Je+Pe.index+rt)}:{type:"strong",raw:Y.slice(0,Je+Pe.index+rt+1),text:Y.slice(2,Je+Pe.index+rt-1)}}}}},je.codespan=function(Y){var ne=this.rules.inline.code.exec(Y);if(ne){var be=ne[2].replace(/\n/g," "),Pe=/[^ ]/.test(be),P=/^ /.test(be)&&/ $/.test(be);return Pe&&P&&(be=be.substring(1,be.length-1)),be=w(be,!0),{type:"codespan",raw:ne[0],text:be}}},je.br=function(Y){var ne=this.rules.inline.br.exec(Y);if(ne)return{type:"br",raw:ne[0]}},je.del=function(Y){var ne=this.rules.inline.del.exec(Y);if(ne)return{type:"del",raw:ne[0],text:ne[2]}},je.autolink=function(Y,ne){var be=this.rules.inline.autolink.exec(Y);if(be){var Pe,P;return be[2]==="@"?(Pe=w(this.options.mangle?ne(be[1]):be[1]),P="mailto:"+Pe):(Pe=w(be[1]),P=Pe),{type:"link",raw:be[0],text:Pe,href:P,tokens:[{type:"text",raw:Pe,text:Pe}]}}},je.url=function(Y,ne){var be;if(be=this.rules.inline.url.exec(Y)){var Pe,P;if(be[2]==="@")Pe=w(this.options.mangle?ne(be[0]):be[0]),P="mailto:"+Pe;else{var Je;do Je=be[0],be[0]=this.rules.inline._backpedal.exec(be[0])[0];while(Je!==be[0]);Pe=w(be[0]),be[1]==="www."?P="http://"+Pe:P=Pe}return{type:"link",raw:be[0],text:Pe,href:P,tokens:[{type:"text",raw:Pe,text:Pe}]}}},je.inlineText=function(Y,ne,be){var Pe=this.rules.inline.text.exec(Y);if(Pe){var P;return ne?P=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Pe[0]):w(Pe[0]):Pe[0]:P=w(this.options.smartypants?be(Pe[0]):Pe[0]),{type:"text",raw:Pe[0],text:P}}},Se}(),ye=q.noopTest,He=q.edit,Ye=q.merge,tt={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:ye,table:ye,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};tt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,tt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,tt.def=He(tt.def).replace("label",tt._label).replace("title",tt._title).getRegex(),tt.bullet=/(?:[*+-]|\d{1,9}[.)])/,tt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,tt.item=He(tt.item,"gm").replace(/bull/g,tt.bullet).getRegex(),tt.listItemStart=He(/^( *)(bull) */).replace("bull",tt.bullet).getRegex(),tt.list=He(tt.list).replace(/bull/g,tt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+tt.def.source+")").getRegex(),tt._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",tt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,tt.html=He(tt.html,"i").replace("comment",tt._comment).replace("tag",tt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tt.paragraph=He(tt._paragraph).replace("hr",tt.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",tt._tag).getRegex(),tt.blockquote=He(tt.blockquote).replace("paragraph",tt.paragraph).getRegex(),tt.normal=Ye({},tt),tt.gfm=Ye({},tt.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*|$)"}),tt.gfm.nptable=He(tt.gfm.nptable).replace("hr",tt.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",tt._tag).getRegex(),tt.gfm.table=He(tt.gfm.table).replace("hr",tt.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",tt._tag).getRegex(),tt.pedantic=Ye({},tt.normal,{html:He(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tt._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:ye,paragraph:He(tt.normal._paragraph).replace("hr",tt.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",tt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var nt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ye,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:ye,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};nt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",nt.punctuation=He(nt.punctuation).replace(/punctuation/g,nt._punctuation).getRegex(),nt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,nt.escapedEmSt=/\\\*|\\_/g,nt._comment=He(tt._comment).replace("(?:-->|$)","-->").getRegex(),nt.emStrong.lDelim=He(nt.emStrong.lDelim).replace(/punct/g,nt._punctuation).getRegex(),nt.emStrong.rDelimAst=He(nt.emStrong.rDelimAst,"g").replace(/punct/g,nt._punctuation).getRegex(),nt.emStrong.rDelimUnd=He(nt.emStrong.rDelimUnd,"g").replace(/punct/g,nt._punctuation).getRegex(),nt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,nt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,nt._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])?)+(?![-_])/,nt.autolink=He(nt.autolink).replace("scheme",nt._scheme).replace("email",nt._email).getRegex(),nt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,nt.tag=He(nt.tag).replace("comment",nt._comment).replace("attribute",nt._attribute).getRegex(),nt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,nt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,nt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,nt.link=He(nt.link).replace("label",nt._label).replace("href",nt._href).replace("title",nt._title).getRegex(),nt.reflink=He(nt.reflink).replace("label",nt._label).getRegex(),nt.reflinkSearch=He(nt.reflinkSearch,"g").replace("reflink",nt.reflink).replace("nolink",nt.nolink).getRegex(),nt.normal=Ye({},nt),nt.pedantic=Ye({},nt.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:He(/^!?\[(label)\]\((.*?)\)/).replace("label",nt._label).getRegex(),reflink:He(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nt._label).getRegex()}),nt.gfm=Ye({},nt.normal,{escape:He(nt.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),nt.gfm.url=He(nt.gfm.url,"i").replace("email",nt.gfm._extended_email).getRegex(),nt.breaks=Ye({},nt.gfm,{br:He(nt.br).replace("{2,}","*").getRegex(),text:He(nt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Bt={block:tt,inline:nt},qe=Qe,jt=ve.exports.defaults,Ue=Bt.block,yt=Bt.inline,Le=q.repeatString;function Ce(Se){return Se.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(Se){var je="",Ge,Y,ne=Se.length;for(Ge=0;Ge<ne;Ge++)Y=Se.charCodeAt(Ge),Math.random()>.5&&(Y="x"+Y.toString(16)),je+="&#"+Y+";";return je}var We=function(){function Se(Ge){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ge||jt,this.options.tokenizer=this.options.tokenizer||new qe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var Y={block:Ue.normal,inline:yt.normal};this.options.pedantic?(Y.block=Ue.pedantic,Y.inline=yt.pedantic):this.options.gfm&&(Y.block=Ue.gfm,this.options.breaks?Y.inline=yt.breaks:Y.inline=yt.gfm),this.tokenizer.rules=Y}Se.lex=function(Y,ne){var be=new Se(ne);return be.lex(Y)},Se.lexInline=function(Y,ne){var be=new Se(ne);return be.inlineTokens(Y)};var je=Se.prototype;return je.lex=function(Y){return Y=Y.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(Y,this.tokens,!0),this.inline(this.tokens),this.tokens},je.blockTokens=function(Y,ne,be){ne===void 0&&(ne=[]),be===void 0&&(be=!0),this.options.pedantic&&(Y=Y.replace(/^ +$/gm,""));for(var Pe,P,Je,J;Y;){if(Pe=this.tokenizer.space(Y)){Y=Y.substring(Pe.raw.length),Pe.type&&ne.push(Pe);continue}if(Pe=this.tokenizer.code(Y)){Y=Y.substring(Pe.raw.length),J=ne[ne.length-1],J&&J.type==="paragraph"?(J.raw+=`
|
|
|
`+Pe.raw,J.text+=`
|
|
|
`+Pe.text):ne.push(Pe);continue}if(Pe=this.tokenizer.fences(Y)){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.heading(Y)){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.nptable(Y)){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.hr(Y)){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.blockquote(Y)){Y=Y.substring(Pe.raw.length),Pe.tokens=this.blockTokens(Pe.text,[],be),ne.push(Pe);continue}if(Pe=this.tokenizer.list(Y)){for(Y=Y.substring(Pe.raw.length),Je=Pe.items.length,P=0;P<Je;P++)Pe.items[P].tokens=this.blockTokens(Pe.items[P].text,[],!1);ne.push(Pe);continue}if(Pe=this.tokenizer.html(Y)){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(be&&(Pe=this.tokenizer.def(Y))){Y=Y.substring(Pe.raw.length),this.tokens.links[Pe.tag]||(this.tokens.links[Pe.tag]={href:Pe.href,title:Pe.title});continue}if(Pe=this.tokenizer.table(Y)){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.lheading(Y)){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(be&&(Pe=this.tokenizer.paragraph(Y))){Y=Y.substring(Pe.raw.length),ne.push(Pe);continue}if(Pe=this.tokenizer.text(Y)){Y=Y.substring(Pe.raw.length),J=ne[ne.length-1],J&&J.type==="text"?(J.raw+=`
|
|
|
`+Pe.raw,J.text+=`
|
|
|
`+Pe.text):ne.push(Pe);continue}if(Y){var rt="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(rt);break}else throw new Error(rt)}}return ne},je.inline=function(Y){var ne,be,Pe,P,Je,J,rt=Y.length;for(ne=0;ne<rt;ne++)switch(J=Y[ne],J.type){case"paragraph":case"text":case"heading":{J.tokens=[],this.inlineTokens(J.text,J.tokens);break}case"table":{for(J.tokens={header:[],cells:[]},P=J.header.length,be=0;be<P;be++)J.tokens.header[be]=[],this.inlineTokens(J.header[be],J.tokens.header[be]);for(P=J.cells.length,be=0;be<P;be++)for(Je=J.cells[be],J.tokens.cells[be]=[],Pe=0;Pe<Je.length;Pe++)J.tokens.cells[be][Pe]=[],this.inlineTokens(Je[Pe],J.tokens.cells[be][Pe]);break}case"blockquote":{this.inline(J.tokens);break}case"list":{for(P=J.items.length,be=0;be<P;be++)this.inline(J.items[be].tokens);break}}return Y},je.inlineTokens=function(Y,ne,be,Pe){ne===void 0&&(ne=[]),be===void 0&&(be=!1),Pe===void 0&&(Pe=!1);var P,Je,J=Y,rt,Gt,Xt;if(this.tokens.links){var Jt=Object.keys(this.tokens.links);if(Jt.length>0)for(;(rt=this.tokenizer.rules.inline.reflinkSearch.exec(J))!=null;)Jt.includes(rt[0].slice(rt[0].lastIndexOf("[")+1,-1))&&(J=J.slice(0,rt.index)+"["+Le("a",rt[0].length-2)+"]"+J.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(rt=this.tokenizer.rules.inline.blockSkip.exec(J))!=null;)J=J.slice(0,rt.index)+"["+Le("a",rt[0].length-2)+"]"+J.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(rt=this.tokenizer.rules.inline.escapedEmSt.exec(J))!=null;)J=J.slice(0,rt.index)+"++"+J.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;Y;){if(Gt||(Xt=""),Gt=!1,P=this.tokenizer.escape(Y)){Y=Y.substring(P.raw.length),ne.push(P);continue}if(P=this.tokenizer.tag(Y,be,Pe)){Y=Y.substring(P.raw.length),be=P.inLink,Pe=P.inRawBlock;var an=ne[ne.length-1];an&&P.type==="text"&&an.type==="text"?(an.raw+=P.raw,an.text+=P.text):ne.push(P);continue}if(P=this.tokenizer.link(Y)){Y=Y.substring(P.raw.length),P.type==="link"&&(P.tokens=this.inlineTokens(P.text,[],!0,Pe)),ne.push(P);continue}if(P=this.tokenizer.reflink(Y,this.tokens.links)){Y=Y.substring(P.raw.length);var rn=ne[ne.length-1];P.type==="link"?(P.tokens=this.inlineTokens(P.text,[],!0,Pe),ne.push(P)):rn&&P.type==="text"&&rn.type==="text"?(rn.raw+=P.raw,rn.text+=P.text):ne.push(P);continue}if(P=this.tokenizer.emStrong(Y,J,Xt)){Y=Y.substring(P.raw.length),P.tokens=this.inlineTokens(P.text,[],be,Pe),ne.push(P);continue}if(P=this.tokenizer.codespan(Y)){Y=Y.substring(P.raw.length),ne.push(P);continue}if(P=this.tokenizer.br(Y)){Y=Y.substring(P.raw.length),ne.push(P);continue}if(P=this.tokenizer.del(Y)){Y=Y.substring(P.raw.length),P.tokens=this.inlineTokens(P.text,[],be,Pe),ne.push(P);continue}if(P=this.tokenizer.autolink(Y,he)){Y=Y.substring(P.raw.length),ne.push(P);continue}if(!be&&(P=this.tokenizer.url(Y,he))){Y=Y.substring(P.raw.length),ne.push(P);continue}if(P=this.tokenizer.inlineText(Y,Pe,Ce)){Y=Y.substring(P.raw.length),P.raw.slice(-1)!=="_"&&(Xt=P.raw.slice(-1)),Gt=!0,Je=ne[ne.length-1],Je&&Je.type==="text"?(Je.raw+=P.raw,Je.text+=P.text):ne.push(P);continue}if(Y){var Sn="Infinite loop on byte: "+Y.charCodeAt(0);if(this.options.silent){console.error(Sn);break}else throw new Error(Sn)}}return ne},_(Se,null,[{key:"rules",get:function(){return{block:Ue,inline:yt}}}]),Se}(),Re=ve.exports.defaults,Ie=q.cleanUrl,M=q.escape,me=function(){function Se(Ge){this.options=Ge||Re}var je=Se.prototype;return je.code=function(Y,ne,be){var Pe=(ne||"").match(/\S*/)[0];if(this.options.highlight){var P=this.options.highlight(Y,Pe);P!=null&&P!==Y&&(be=!0,Y=P)}return Y=Y.replace(/\n$/,"")+`
|
|
|
`,Pe?'<pre><code class="'+this.options.langPrefix+M(Pe,!0)+'">'+(be?Y:M(Y,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(be?Y:M(Y,!0))+`</code></pre>
|
|
|
`},je.blockquote=function(Y){return`<blockquote>
|
|
|
`+Y+`</blockquote>
|
|
|
`},je.html=function(Y){return Y},je.heading=function(Y,ne,be,Pe){return this.options.headerIds?"<h"+ne+' id="'+this.options.headerPrefix+Pe.slug(be)+'">'+Y+"</h"+ne+`>
|
|
|
`:"<h"+ne+">"+Y+"</h"+ne+`>
|
|
|
`},je.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},je.list=function(Y,ne,be){var Pe=ne?"ol":"ul",P=ne&&be!==1?' start="'+be+'"':"";return"<"+Pe+P+`>
|
|
|
`+Y+"</"+Pe+`>
|
|
|
`},je.listitem=function(Y){return"<li>"+Y+`</li>
|
|
|
`},je.checkbox=function(Y){return"<input "+(Y?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},je.paragraph=function(Y){return"<p>"+Y+`</p>
|
|
|
`},je.table=function(Y,ne){return ne&&(ne="<tbody>"+ne+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+Y+`</thead>
|
|
|
`+ne+`</table>
|
|
|
`},je.tablerow=function(Y){return`<tr>
|
|
|
`+Y+`</tr>
|
|
|
`},je.tablecell=function(Y,ne){var be=ne.header?"th":"td",Pe=ne.align?"<"+be+' align="'+ne.align+'">':"<"+be+">";return Pe+Y+"</"+be+`>
|
|
|
`},je.strong=function(Y){return"<strong>"+Y+"</strong>"},je.em=function(Y){return"<em>"+Y+"</em>"},je.codespan=function(Y){return"<code>"+Y+"</code>"},je.br=function(){return this.options.xhtml?"<br/>":"<br>"},je.del=function(Y){return"<del>"+Y+"</del>"},je.link=function(Y,ne,be){if(Y=Ie(this.options.sanitize,this.options.baseUrl,Y),Y===null)return be;var Pe='<a href="'+M(Y)+'"';return ne&&(Pe+=' title="'+ne+'"'),Pe+=">"+be+"</a>",Pe},je.image=function(Y,ne,be){if(Y=Ie(this.options.sanitize,this.options.baseUrl,Y),Y===null)return be;var Pe='<img src="'+Y+'" alt="'+be+'"';return ne&&(Pe+=' title="'+ne+'"'),Pe+=this.options.xhtml?"/>":">",Pe},je.text=function(Y){return Y},Se}(),Ee=function(){function Se(){}var je=Se.prototype;return je.strong=function(Y){return Y},je.em=function(Y){return Y},je.codespan=function(Y){return Y},je.del=function(Y){return Y},je.html=function(Y){return Y},je.text=function(Y){return Y},je.link=function(Y,ne,be){return""+be},je.image=function(Y,ne,be){return""+be},je.br=function(){return""},Se}(),Ke=function(){function Se(){this.seen={}}var je=Se.prototype;return je.serialize=function(Y){return Y.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},je.getNextSafeSlug=function(Y,ne){var be=Y,Pe=0;if(this.seen.hasOwnProperty(be)){Pe=this.seen[Y];do Pe++,be=Y+"-"+Pe;while(this.seen.hasOwnProperty(be))}return ne||(this.seen[Y]=Pe,this.seen[be]=0),be},je.slug=function(Y,ne){ne===void 0&&(ne={});var be=this.serialize(Y);return this.getNextSafeSlug(be,ne.dryrun)},Se}(),et=me,ut=Ee,St=Ke,Dt=ve.exports.defaults,mt=q.unescape,kt=function(){function Se(Ge){this.options=Ge||Dt,this.options.renderer=this.options.renderer||new et,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ut,this.slugger=new St}Se.parse=function(Y,ne){var be=new Se(ne);return be.parse(Y)},Se.parseInline=function(Y,ne){var be=new Se(ne);return be.parseInline(Y)};var je=Se.prototype;return je.parse=function(Y,ne){ne===void 0&&(ne=!0);var be="",Pe,P,Je,J,rt,Gt,Xt,Jt,an,rn,Sn,On,pn,Pn,tn,$t,Nt,on,nn=Y.length;for(Pe=0;Pe<nn;Pe++)switch(rn=Y[Pe],rn.type){case"space":continue;case"hr":{be+=this.renderer.hr();continue}case"heading":{be+=this.renderer.heading(this.parseInline(rn.tokens),rn.depth,mt(this.parseInline(rn.tokens,this.textRenderer)),this.slugger);continue}case"code":{be+=this.renderer.code(rn.text,rn.lang,rn.escaped);continue}case"table":{for(Jt="",Xt="",J=rn.header.length,P=0;P<J;P++)Xt+=this.renderer.tablecell(this.parseInline(rn.tokens.header[P]),{header:!0,align:rn.align[P]});for(Jt+=this.renderer.tablerow(Xt),an="",J=rn.cells.length,P=0;P<J;P++){for(Gt=rn.tokens.cells[P],Xt="",rt=Gt.length,Je=0;Je<rt;Je++)Xt+=this.renderer.tablecell(this.parseInline(Gt[Je]),{header:!1,align:rn.align[Je]});an+=this.renderer.tablerow(Xt)}be+=this.renderer.table(Jt,an);continue}case"blockquote":{an=this.parse(rn.tokens),be+=this.renderer.blockquote(an);continue}case"list":{for(Sn=rn.ordered,On=rn.start,pn=rn.loose,J=rn.items.length,an="",P=0;P<J;P++)tn=rn.items[P],$t=tn.checked,Nt=tn.task,Pn="",tn.task&&(on=this.renderer.checkbox($t),pn?tn.tokens.length>0&&tn.tokens[0].type==="text"?(tn.tokens[0].text=on+" "+tn.tokens[0].text,tn.tokens[0].tokens&&tn.tokens[0].tokens.length>0&&tn.tokens[0].tokens[0].type==="text"&&(tn.tokens[0].tokens[0].text=on+" "+tn.tokens[0].tokens[0].text)):tn.tokens.unshift({type:"text",text:on}):Pn+=on),Pn+=this.parse(tn.tokens,pn),an+=this.renderer.listitem(Pn,Nt,$t);be+=this.renderer.list(an,Sn,On);continue}case"html":{be+=this.renderer.html(rn.text);continue}case"paragraph":{be+=this.renderer.paragraph(this.parseInline(rn.tokens));continue}case"text":{for(an=rn.tokens?this.parseInline(rn.tokens):rn.text;Pe+1<nn&&Y[Pe+1].type==="text";)rn=Y[++Pe],an+=`
|
|
|
`+(rn.tokens?this.parseInline(rn.tokens):rn.text);be+=ne?this.renderer.paragraph(an):an;continue}default:{var An='Token with "'+rn.type+'" type was not found.';if(this.options.silent){console.error(An);return}else throw new Error(An)}}return be},je.parseInline=function(Y,ne){ne=ne||this.renderer;var be="",Pe,P,Je=Y.length;for(Pe=0;Pe<Je;Pe++)switch(P=Y[Pe],P.type){case"escape":{be+=ne.text(P.text);break}case"html":{be+=ne.html(P.text);break}case"link":{be+=ne.link(P.href,P.title,this.parseInline(P.tokens,ne));break}case"image":{be+=ne.image(P.href,P.title,P.text);break}case"strong":{be+=ne.strong(this.parseInline(P.tokens,ne));break}case"em":{be+=ne.em(this.parseInline(P.tokens,ne));break}case"codespan":{be+=ne.codespan(P.text);break}case"br":{be+=ne.br();break}case"del":{be+=ne.del(this.parseInline(P.tokens,ne));break}case"text":{be+=ne.text(P.text);break}default:{var J='Token with "'+P.type+'" type was not found.';if(this.options.silent){console.error(J);return}else throw new Error(J)}}return be},Se}(),Ht=We,zt=kt,Ut=Qe,st=me,Rt=Ee,Lt=Ke,_e=q.merge,Ze=q.checkSanitizeDeprecation,b=q.escape,A=ve.exports.getDefaults,Oe=ve.exports.changeDefaults,U=ve.exports.defaults;function le(Se,je,Ge){if(typeof Se=="undefined"||Se===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");if(typeof je=="function"&&(Ge=je,je=null),je=_e({},le.defaults,je||{}),Ze(je),Ge){var Y=je.highlight,ne;try{ne=Ht.lex(Se,je)}catch(Je){return Ge(Je)}var be=function(J){var rt;if(!J)try{je.walkTokens&&le.walkTokens(ne,je.walkTokens),rt=zt.parse(ne,je)}catch(Gt){J=Gt}return je.highlight=Y,J?Ge(J):Ge(null,rt)};if(!Y||Y.length<3||(delete je.highlight,!ne.length))return be();var Pe=0;le.walkTokens(ne,function(Je){Je.type==="code"&&(Pe++,setTimeout(function(){Y(Je.text,Je.lang,function(J,rt){if(J)return be(J);rt!=null&&rt!==Je.text&&(Je.text=rt,Je.escaped=!0),Pe--,Pe===0&&be()})},0))}),Pe===0&&be();return}try{var P=Ht.lex(Se,je);return je.walkTokens&&le.walkTokens(P,je.walkTokens),zt.parse(P,je)}catch(Je){if(Je.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,je.silent)return"<p>An error occurred:</p><pre>"+b(Je.message+"",!0)+"</pre>";throw Je}}le.options=le.setOptions=function(Se){return _e(le.defaults,Se),Oe(le.defaults),le},le.getDefaults=A,le.defaults=U,le.use=function(Se){var je=_e({},Se);if(Se.renderer&&function(){var Y=le.defaults.renderer||new st,ne=function(P){var Je=Y[P];Y[P]=function(){for(var J=arguments.length,rt=new Array(J),Gt=0;Gt<J;Gt++)rt[Gt]=arguments[Gt];var Xt=Se.renderer[P].apply(Y,rt);return Xt===!1&&(Xt=Je.apply(Y,rt)),Xt}};for(var be in Se.renderer)ne(be);je.renderer=Y}(),Se.tokenizer&&function(){var Y=le.defaults.tokenizer||new Ut,ne=function(P){var Je=Y[P];Y[P]=function(){for(var J=arguments.length,rt=new Array(J),Gt=0;Gt<J;Gt++)rt[Gt]=arguments[Gt];var Xt=Se.tokenizer[P].apply(Y,rt);return Xt===!1&&(Xt=Je.apply(Y,rt)),Xt}};for(var be in Se.tokenizer)ne(be);je.tokenizer=Y}(),Se.walkTokens){var Ge=le.defaults.walkTokens;je.walkTokens=function(Y){Se.walkTokens(Y),Ge&&Ge(Y)}}le.setOptions(je)},le.walkTokens=function(Se,je){for(var Ge=se(Se),Y;!(Y=Ge()).done;){var ne=Y.value;switch(je(ne),ne.type){case"table":{for(var be=se(ne.tokens.header),Pe;!(Pe=be()).done;){var P=Pe.value;le.walkTokens(P,je)}for(var Je=se(ne.tokens.cells),J;!(J=Je()).done;)for(var rt=J.value,Gt=se(rt),Xt;!(Xt=Gt()).done;){var Jt=Xt.value;le.walkTokens(Jt,je)}break}case"list":{le.walkTokens(ne.items,je);break}default:ne.tokens&&le.walkTokens(ne.tokens,je)}}},le.parseInline=function(Se,je){if(typeof Se=="undefined"||Se===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Se!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Se)+", string expected");je=_e({},le.defaults,je||{}),Ze(je);try{var Ge=Ht.lexInline(Se,je);return je.walkTokens&&le.walkTokens(Ge,je.walkTokens),zt.parseInline(Ge,je)}catch(Y){if(Y.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,je.silent)return"<p>An error occurred:</p><pre>"+b(Y.message+"",!0)+"</pre>";throw Y}},le.Parser=zt,le.parser=zt.parse,le.Renderer=st,le.TextRenderer=Rt,le.Lexer=Ht,le.lexer=Ht.lex,le.Tokenizer=Ut,le.Slugger=Lt,le.parse=le;var wt=le;return wt})},11690:function(fn){const ct=/[&<>"']/,_=/[&<>"']/g,m=/[<>"']|&(?!#?\w+;)/,ce=/[<>"']|&(?!#?\w+;)/g,se={"&":"&","<":"<",">":">",'"':""","'":"'"},ve=oe=>se[oe];function j(oe,xe){if(xe){if(ct.test(oe))return oe.replace(_,ve)}else if(m.test(oe))return oe.replace(ce,ve);return oe}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function de(oe){return oe.replace(g,(xe,ke)=>(ke=ke.toLowerCase(),ke==="colon"?":":ke.charAt(0)==="#"?ke.charAt(1)==="x"?String.fromCharCode(parseInt(ke.substring(2),16)):String.fromCharCode(+ke.substring(1)):""))}const ae=/(^|[^\[])\^/g;function o(oe,xe){oe=oe.source||oe,xe=xe||"";const ke={replace:(De,Be)=>(Be=Be.source||Be,Be=Be.replace(ae,"$1"),oe=oe.replace(De,Be),ke),getRegex:()=>new RegExp(oe,xe)};return ke}const G=/[^\w:]/g,B=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(oe,xe,ke){if(oe){let De;try{De=decodeURIComponent(de(ke)).replace(G,"").toLowerCase()}catch(Be){return null}if(De.indexOf("javascript:")===0||De.indexOf("vbscript:")===0||De.indexOf("data:")===0)return null}xe&&!B.test(ke)&&(ke=Q(xe,ke));try{ke=encodeURI(ke).replace(/%25/g,"%")}catch(De){return null}return ke}const S={},C=/^[^:]+:\/*[^/]*$/,R=/^([^:]+:)[\s\S]*$/,ee=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Q(oe,xe){S[" "+oe]||(C.test(oe)?S[" "+oe]=oe+"/":S[" "+oe]=F(oe,"/",!0)),oe=S[" "+oe];const ke=oe.indexOf(":")===-1;return xe.substring(0,2)==="//"?ke?xe:oe.replace(R,"$1")+xe:xe.charAt(0)==="/"?ke?xe:oe.replace(ee,"$1")+xe:oe+xe}const W={exec:function(){}};function D(oe){let xe=1,ke,De;for(;xe<arguments.length;xe++){ke=arguments[xe];for(De in ke)Object.prototype.hasOwnProperty.call(ke,De)&&(oe[De]=ke[De])}return oe}function z(oe,xe){const ke=oe.replace(/\|/g,(X,N,k)=>{let q=!1,te=N;for(;--te>=0&&k[te]==="\\";)q=!q;return q?"|":" |"}),De=ke.split(/ \|/);let Be=0;if(De.length>xe)De.splice(xe);else for(;De.length<xe;)De.push("");for(;Be<De.length;Be++)De[Be]=De[Be].trim().replace(/\\\|/g,"|");return De}function F(oe,xe,ke){const De=oe.length;if(De===0)return"";let Be=0;for(;Be<De;){const X=oe.charAt(De-Be-1);if(X===xe&&!ke)Be++;else if(X!==xe&&ke)Be++;else break}return oe.substr(0,De-Be)}function $(oe,xe){if(oe.indexOf(xe[1])===-1)return-1;const ke=oe.length;let De=0,Be=0;for(;Be<ke;Be++)if(oe[Be]==="\\")Be++;else if(oe[Be]===xe[0])De++;else if(oe[Be]===xe[1]&&(De--,De<0))return Be;return-1}function ue(oe){oe&&oe.sanitize&&!oe.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 pe(oe,xe){if(xe<1)return"";let ke="";for(;xe>1;)xe&1&&(ke+=oe),xe>>=1,oe+=oe;return ke+oe}fn.exports={escape:j,unescape:de,edit:o,cleanUrl:E,resolveUrl:Q,noopTest:W,merge:D,splitCells:z,rtrim:F,findClosingBracket:$,checkSanitizeDeprecation:ue,repeatString:pe}},75918:function(fn,ct,_){"use strict";_.d(ct,{Wi:function(){return g},Z0:function(){return de},aU:function(){return j},eZ:function(){return o},wY:function(){return ae}});var m=_(4348),ce=_(69323),se=_(13268),ve=function(G,B,E,S){function C(R){return R instanceof E?R:new E(function(ee){ee(R)})}return new(E||(E=Promise))(function(R,ee){function Q(z){try{D(S.next(z))}catch(F){ee(F)}}function W(z){try{D(S.throw(z))}catch(F){ee(F)}}function D(z){z.done?R(z.value):C(z.value).then(Q,W)}D((S=S.apply(G,B||[])).next())})};class j extends ce.JT{constructor(B,E="",S="",C=!0,R){super(),this._onDidChange=this._register(new m.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=B,this._label=E,this._cssClass=S,this._enabled=C,this._actionCallback=R}get id(){return this._id}get label(){return this._label}set label(B){this._setLabel(B)}_setLabel(B){this._label!==B&&(this._label=B,this._onDidChange.fire({label:B}))}get tooltip(){return this._tooltip||""}set tooltip(B){this._setTooltip(B)}_setTooltip(B){this._tooltip!==B&&(this._tooltip=B,this._onDidChange.fire({tooltip:B}))}get class(){return this._cssClass}set class(B){this._setClass(B)}_setClass(B){this._cssClass!==B&&(this._cssClass=B,this._onDidChange.fire({class:B}))}get enabled(){return this._enabled}set enabled(B){this._setEnabled(B)}_setEnabled(B){this._enabled!==B&&(this._enabled=B,this._onDidChange.fire({enabled:B}))}get checked(){return this._checked}set checked(B){this._setChecked(B)}_setChecked(B){this._checked!==B&&(this._checked=B,this._onDidChange.fire({checked:B}))}run(B,E){return ve(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(B))})}}class g extends ce.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new m.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new m.Q5),this.onDidRun=this._onDidRun.event}run(B,E){return ve(this,void 0,void 0,function*(){if(!B.enabled)return;this._onBeforeRun.fire({action:B});let S;try{yield this.runAction(B,E)}catch(C){S=C}this._onDidRun.fire({action:B,error:S})})}runAction(B,E){return ve(this,void 0,void 0,function*(){yield B.run(E)})}}class de extends j{constructor(B){super(de.ID,B,B?"separator text":"separator"),this.checked=!1,this.enabled=!1}}de.ID="vs.actions.separator";class ae{constructor(B,E,S,C){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=B,this.label=E,this.class=C,this._actions=S}get actions(){return this._actions}dispose(){}run(){return ve(this,void 0,void 0,function*(){})}}class o extends j{constructor(){super(o.ID,se.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(fn,ct,_){"use strict";_.d(ct,{ok:function(){return m}});function m(ce,se){if(!ce)throw new Error(se?`Assertion failed (${se})`:"Assertion Failed")}},52615:function(fn,ct,_){"use strict";_.d(ct,{CM:function(){return j},JL:function(){return g},dT:function(){return ae},fK:function(){return ve},lA:function(){return de}});var m=_(4348);class ce{constructor(){this._icons=new Map,this._onDidRegister=new m.Q5}add(G){const B=this._icons.get(G.id);B?G.description?B.description=G.description:console.error(`Duplicate registration of codicon ${G.id}`):(this._icons.set(G.id,G),this._onDidRegister.fire(G))}get(G){return this._icons.get(G)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const se=new ce,ve=se;function j(o,G){return new de(o,G)}function g(o){return o?o.replace(/\$\((.*?)\)/g,(G,B)=>` ${B} `).trim():""}class de{constructor(G,B,E){this.id=G,this.definition=B,this.description=E,se.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ae;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const G=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function B(C){if(C instanceof de)return["codicon","codicon-"+C.id];const R=G.exec(C.id);if(!R)return B(de.error);let[,ee,Q]=R;const W=["codicon","codicon-"+ee];return Q&&W.push("codicon-modifier-"+Q.substr(1)),W}o.asClassNameArray=B;function E(C){return B(C).join(" ")}o.asClassName=E;function S(C){return"."+B(C).join(".")}o.asCSSSelector=S})(ae||(ae={})),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"})}(de||(de={}))},79881:function(fn,ct,_){"use strict";_.d(ct,{B8:function(){return B},Cp:function(){return ve},F0:function(){return ae},L6:function(){return G},VV:function(){return de},b1:function(){return o},dL:function(){return se},ri:function(){return j}});class m{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 ce=new m;function se(E){de(E)||ce.onUnexpectedError(E)}function ve(E){de(E)||ce.onUnexpectedExternalError(E)}function j(E){if(E instanceof Error){let{name:S,message:C}=E;const R=E.stacktrace||E.stack;return{$isError:!0,name:S,message:C,stack:R}}return E}const g="Canceled";function de(E){return E instanceof Error&&E.name===g&&E.message===g}function ae(){const E=new Error(g);return E.name=E.message,E}function o(E){return E?new Error(`Illegal argument: ${E}`):new Error("Illegal argument")}function G(E){return E?new Error(`Illegal state: ${E}`):new Error("Illegal state")}class B extends Error{constructor(S){super("NotSupported"),S&&(this.message=S)}}},4348:function(fn,ct,_){"use strict";_.d(ct,{D0:function(){return B},E7:function(){return E},K3:function(){return G},Q5:function(){return o},ZD:function(){return S},ju:function(){return j}});var m=_(79881),ce=_(69323),se=_(34502),ve=_(95830),j;(function(C){C.None=()=>ce.JT.None;function R(k){return(q,te=null,Z)=>{let x=!1,w;return w=k(V=>{if(!x)return w?w.dispose():x=!0,q.call(te,V)},null,Z),x&&w.dispose(),w}}C.once=R;function ee(k,q){return $((te,Z=null,x)=>k(w=>te.call(Z,q(w)),null,x))}C.map=ee;function Q(k,q){return $((te,Z=null,x)=>k(w=>{q(w),te.call(Z,w)},null,x))}C.forEach=Q;function W(k,q){return $((te,Z=null,x)=>k(w=>q(w)&&te.call(Z,w),null,x))}C.filter=W;function D(k){return k}C.signal=D;function z(...k){return(q,te=null,Z)=>(0,ce.F8)(...k.map(x=>x(w=>q.call(te,w),null,Z)))}C.any=z;function F(k,q,te){let Z=te;return ee(k,x=>(Z=q(Z,x),Z))}C.reduce=F;function $(k){let q;const te=new o({onFirstListenerAdd(){q=k(te.fire,te)},onLastListenerRemove(){q.dispose()}});return te.event}function ue(k,q,te=100,Z=!1,x){let w,V,fe,$e=0;const Qe=new o({leakWarningThreshold:x,onFirstListenerAdd(){w=k(ye=>{$e++,V=q(V,ye),Z&&!fe&&(Qe.fire(V),V=void 0),clearTimeout(fe),fe=setTimeout(()=>{const He=V;V=void 0,fe=void 0,(!Z||$e>1)&&Qe.fire(He),$e=0},te)})},onLastListenerRemove(){w.dispose()}});return Qe.event}C.debounce=ue;function pe(k,q=(te,Z)=>te===Z){let te=!0,Z;return W(k,x=>{const w=te||!q(x,Z);return te=!1,Z=x,w})}C.latch=pe;function oe(k,q){return[C.filter(k,q),C.filter(k,te=>!q(te))]}C.split=oe;function xe(k,q=!1,te=[]){let Z=te.slice(),x=k(fe=>{Z?Z.push(fe):V.fire(fe)});const w=()=>{Z&&Z.forEach(fe=>V.fire(fe)),Z=null},V=new o({onFirstListenerAdd(){x||(x=k(fe=>V.fire(fe)))},onFirstListenerDidAdd(){Z&&(q?setTimeout(w):w())},onLastListenerRemove(){x&&x.dispose(),x=null}});return V.event}C.buffer=xe;class ke{constructor(q){this.event=q}map(q){return new ke(ee(this.event,q))}forEach(q){return new ke(Q(this.event,q))}filter(q){return new ke(W(this.event,q))}reduce(q,te){return new ke(F(this.event,q,te))}latch(){return new ke(pe(this.event))}debounce(q,te=100,Z=!1,x){return new ke(ue(this.event,q,te,Z,x))}on(q,te,Z){return this.event(q,te,Z)}once(q,te,Z){return R(this.event)(q,te,Z)}}function De(k){return new ke(k)}C.chain=De;function Be(k,q,te=Z=>Z){const Z=(...fe)=>V.fire(te(...fe)),x=()=>k.on(q,Z),w=()=>k.removeListener(q,Z),V=new o({onFirstListenerAdd:x,onLastListenerRemove:w});return V.event}C.fromNodeEventEmitter=Be;function X(k,q,te=Z=>Z){const Z=(...fe)=>V.fire(te(...fe)),x=()=>k.addEventListener(q,Z),w=()=>k.removeEventListener(q,Z),V=new o({onFirstListenerAdd:x,onLastListenerRemove:w});return V.event}C.fromDOMEventEmitter=X;function N(k){return new Promise(q=>R(k)(q))}C.toPromise=N})(j||(j={}));class g{constructor(R){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${R}_${g._idPool++}`}start(R){this._stopWatch=new ve.G(!0),this._listenerCount=R}stop(){if(this._stopWatch){const R=this._stopWatch.elapsed();this._elapsedOverall+=R,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${R.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}g._idPool=0;let de=-1;class ae{constructor(R,ee=Math.random().toString(18).slice(2,5)){this.customThreshold=R,this.name=ee,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(R){let ee=de;if(typeof this.customThreshold=="number"&&(ee=this.customThreshold),ee<=0||R<ee)return;this._stacks||(this._stacks=new Map);const Q=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),W=this._stacks.get(Q)||0;if(this._stacks.set(Q,W+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=ee*.5;let D,z=0;for(const[F,$]of this._stacks)(!D||z<$)&&(D=F,z=$);console.warn(`[${this.name}] potential listener LEAK detected, having ${R} listeners already. MOST frequent listener (${z}):`),console.warn(D)}return()=>{const D=this._stacks.get(Q)||0;this._stacks.set(Q,D-1)}}}class o{constructor(R){var ee;this._disposed=!1,this._options=R,this._leakageMon=de>0?new ae(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((ee=this._options)===null||ee===void 0)&&ee._profName?new g(this._options._profName):void 0}get event(){return this._event||(this._event=(R,ee,Q)=>{var W;this._listeners||(this._listeners=new se.S);const D=this._listeners.isEmpty();D&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const z=this._listeners.push(ee?[R,ee]:R);D&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,R,ee);const F=(W=this._leakageMon)===null||W===void 0?void 0:W.check(this._listeners.size),$=(0,ce.OF)(()=>{F&&F(),this._disposed||(z(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return Q instanceof ce.SL?Q.add($):Array.isArray(Q)&&Q.push($),$}),this._event}fire(R){var ee,Q;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new se.S);for(let W of this._listeners)this._deliveryQueue.push([W,R]);for((ee=this._perfMon)===null||ee===void 0||ee.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[W,D]=this._deliveryQueue.shift();try{typeof W=="function"?W.call(void 0,D):W[0].call(W[1],D)}catch(z){(0,m.dL)(z)}}(Q=this._perfMon)===null||Q===void 0||Q.stop()}}dispose(){var R,ee,Q,W,D;this._disposed||(this._disposed=!0,(R=this._listeners)===null||R===void 0||R.clear(),(ee=this._deliveryQueue)===null||ee===void 0||ee.clear(),(W=(Q=this._options)===null||Q===void 0?void 0:Q.onLastListenerRemove)===null||W===void 0||W.call(Q),(D=this._leakageMon)===null||D===void 0||D.dispose())}}class G extends o{constructor(R){super(R),this._isPaused=0,this._eventQueue=new se.S,this._mergeFn=R==null?void 0:R.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const R=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(R))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(R){this._listeners&&(this._isPaused!==0?this._eventQueue.push(R):super.fire(R))}}class B extends G{constructor(R){var ee;super(R),this._delay=(ee=R.delay)!==null&&ee!==void 0?ee:100}fire(R){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(R)}}class E{constructor(){this.buffers=[]}wrapEvent(R){return(ee,Q,W)=>R(D=>{const z=this.buffers[this.buffers.length-1];z?z.push(()=>ee.call(Q,D)):ee.call(Q,D)},void 0,W)}bufferEvents(R){const ee=[];this.buffers.push(ee);const Q=R();return this.buffers.pop(),ee.forEach(W=>W()),Q}}class S{constructor(){this.listening=!1,this.inputEvent=j.None,this.inputEventListener=ce.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(R){this.inputEvent=R,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=R(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(fn,ct,_){"use strict";_.d(ct,{I:function(){return m}});function m(ce){const se=this;let ve=!1,j;return function(){return ve||(ve=!0,j=ce.apply(se,arguments)),j}}},88226:function(fn,ct,_){"use strict";_.d(ct,{$:function(){return m}});var m;(function(ce){function se(z){return z&&typeof z=="object"&&typeof z[Symbol.iterator]=="function"}ce.is=se;const ve=Object.freeze([]);function j(){return ve}ce.empty=j;function*g(z){yield z}ce.single=g;function de(z){return z||ve}ce.from=de;function ae(z){return!z||z[Symbol.iterator]().next().done===!0}ce.isEmpty=ae;function o(z){return z[Symbol.iterator]().next().value}ce.first=o;function G(z,F){for(const $ of z)if(F($))return!0;return!1}ce.some=G;function B(z,F){for(const $ of z)if(F($))return $}ce.find=B;function*E(z,F){for(const $ of z)F($)&&(yield $)}ce.filter=E;function*S(z,F){let $=0;for(const ue of z)yield F(ue,$++)}ce.map=S;function*C(...z){for(const F of z)for(const $ of F)yield $}ce.concat=C;function*R(z){for(const F of z)for(const $ of F)yield $}ce.concatNested=R;function ee(z,F,$){let ue=$;for(const pe of z)ue=F(ue,pe);return ue}ce.reduce=ee;function*Q(z,F,$=z.length){for(F<0&&(F+=z.length),$<0?$+=z.length:$>z.length&&($=z.length);F<$;F++)yield z[F]}ce.slice=Q;function W(z,F=Number.POSITIVE_INFINITY){const $=[];if(F===0)return[$,z];const ue=z[Symbol.iterator]();for(let pe=0;pe<F;pe++){const oe=ue.next();if(oe.done)return[$,ce.empty()];$.push(oe.value)}return[$,{[Symbol.iterator](){return ue}}]}ce.consume=W;function D(z,F,$=(ue,pe)=>ue===pe){const ue=z[Symbol.iterator](),pe=F[Symbol.iterator]();for(;;){const oe=ue.next(),xe=pe.next();if(oe.done!==xe.done)return!1;if(oe.done)return!0;if(!$(oe.value,xe.value))return!1}}ce.equals=D})(m||(m={}))},69323:function(fn,ct,_){"use strict";_.d(ct,{B9:function(){return S},F8:function(){return C},JT:function(){return Q},Jz:function(){return D},OF:function(){return R},SL:function(){return ee},Wf:function(){return E},XK:function(){return W},dk:function(){return G}});var m=_(17845),ce=_(88226);const se=!1;let ve=null;function j(z){ve=z}if(se){const z="__is_disposable_tracked__";j(new class{trackDisposable(F){const $=new Error("Potentially leaked disposable").stack;setTimeout(()=>{F[z]||console.log($)},3e3)}setParent(F,$){if(F&&F!==Q.None)try{F[z]=!0}catch(ue){}}markAsDisposed(F){if(F&&F!==Q.None)try{F[z]=!0}catch($){}}markAsSingleton(F){}})}function g(z){return ve==null||ve.trackDisposable(z),z}function de(z){ve==null||ve.markAsDisposed(z)}function ae(z,F){ve==null||ve.setParent(z,F)}function o(z,F){if(ve)for(const $ of z)ve.setParent($,F)}function G(z){return ve==null||ve.markAsSingleton(z),z}class B extends Error{constructor(F){super(`Encountered errors while disposing of store. Errors: [${F.join(", ")}]`),this.errors=F}}function E(z){return typeof z.dispose=="function"&&z.dispose.length===0}function S(z){if(ce.$.is(z)){let F=[];for(const $ of z)if($)try{$.dispose()}catch(ue){F.push(ue)}if(F.length===1)throw F[0];if(F.length>1)throw new B(F);return Array.isArray(z)?[]:z}else if(z)return z.dispose(),z}function C(...z){const F=R(()=>S(z));return o(z,F),F}function R(z){const F=g({dispose:(0,m.I)(()=>{de(F),z()})});return F}class ee{constructor(){this._toDispose=new Set,this._isDisposed=!1,g(this)}dispose(){this._isDisposed||(de(this),this._isDisposed=!0,this.clear())}clear(){try{S(this._toDispose.values())}finally{this._toDispose.clear()}}add(F){if(!F)return F;if(F===this)throw new Error("Cannot register a disposable on itself!");return ae(F,this),this._isDisposed?ee.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(F),F}}ee.DISABLE_DISPOSED_WARNING=!1;class Q{constructor(){this._store=new ee,g(this),ae(this._store,this)}dispose(){de(this),this._store.dispose()}_register(F){if(F===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(F)}}Q.None=Object.freeze({dispose(){}});class W{constructor(){this._isDisposed=!1,g(this)}get value(){return this._isDisposed?void 0:this._value}set value(F){var $;this._isDisposed||F===this._value||(($=this._value)===null||$===void 0||$.dispose(),F&&ae(F,this),this._value=F)}clear(){this.value=void 0}dispose(){var F;this._isDisposed=!0,de(this),(F=this._value)===null||F===void 0||F.dispose(),this._value=void 0}clearAndLeak(){const F=this._value;return this._value=void 0,F&&ae(F,null),F}}class D{constructor(F){this.object=F}dispose(){}}},34502:function(fn,ct,_){"use strict";_.d(ct,{S:function(){return ce}});class m{constructor(ve){this.element=ve,this.next=m.Undefined,this.prev=m.Undefined}}m.Undefined=new m(void 0);class ce{constructor(){this._first=m.Undefined,this._last=m.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===m.Undefined}clear(){let ve=this._first;for(;ve!==m.Undefined;){const j=ve.next;ve.prev=m.Undefined,ve.next=m.Undefined,ve=j}this._first=m.Undefined,this._last=m.Undefined,this._size=0}unshift(ve){return this._insert(ve,!1)}push(ve){return this._insert(ve,!0)}_insert(ve,j){const g=new m(ve);if(this._first===m.Undefined)this._first=g,this._last=g;else if(j){const ae=this._last;this._last=g,g.prev=ae,ae.next=g}else{const ae=this._first;this._first=g,g.next=ae,ae.prev=g}this._size+=1;let de=!1;return()=>{de||(de=!0,this._remove(g))}}shift(){if(this._first!==m.Undefined){const ve=this._first.element;return this._remove(this._first),ve}}pop(){if(this._last!==m.Undefined){const ve=this._last.element;return this._remove(this._last),ve}}_remove(ve){if(ve.prev!==m.Undefined&&ve.next!==m.Undefined){const j=ve.prev;j.next=ve.next,ve.next.prev=j}else ve.prev===m.Undefined&&ve.next===m.Undefined?(this._first=m.Undefined,this._last=m.Undefined):ve.next===m.Undefined?(this._last=this._last.prev,this._last.next=m.Undefined):ve.prev===m.Undefined&&(this._first=this._first.next,this._first.prev=m.Undefined);this._size-=1}*[Symbol.iterator](){let ve=this._first;for(;ve!==m.Undefined;)yield ve.element,ve=ve.next}}},23345:function(fn,ct,_){"use strict";_.d(ct,{$L:function(){return ue},ED:function(){return D},IJ:function(){return F},OS:function(){return ke},WE:function(){return oe},dz:function(){return z},gn:function(){return pe},li:function(){return R},r:function(){return X},tY:function(){return $},xS:function(){return xe}});var m=_(97671),ce;const se="en";let ve=!1,j=!1,g=!1,de=!1,ae=!1,o=!1,G=!1,B,E=null,S=null,C;const R=typeof self=="object"?self:typeof _.g=="object"?_.g:{};let ee;typeof R.vscode!="undefined"&&typeof R.vscode.process!="undefined"?ee=R.vscode.process:typeof m!="undefined"&&(ee=m);const Q=typeof((ce=ee==null?void 0:ee.versions)===null||ce===void 0?void 0:ce.electron)=="string"&&ee.type==="renderer";if(typeof navigator=="object"&&!Q)C=navigator.userAgent,ve=C.indexOf("Windows")>=0,j=C.indexOf("Macintosh")>=0,G=(C.indexOf("Macintosh")>=0||C.indexOf("iPad")>=0||C.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,g=C.indexOf("Linux")>=0,o=!0,B=navigator.language,E=B;else if(typeof ee=="object"){ve=ee.platform==="win32",j=ee.platform==="darwin",g=ee.platform==="linux",de=g&&!!ee.env.SNAP&&!!ee.env.SNAP_REVISION,B=se,E=se;const N=ee.env.VSCODE_NLS_CONFIG;if(N)try{const k=JSON.parse(N),q=k.availableLanguages["*"];B=k.locale,E=q||se,S=k._translationsConfigFile}catch(k){}ae=!0}else console.error("Unable to resolve platform.");let W=0;j?W=1:ve?W=3:g&&(W=2);const D=ve,z=j,F=g,$=ae,ue=o,pe=G,oe=C,xe=function(){if(R.setImmediate)return R.setImmediate.bind(R);if(typeof R.postMessage=="function"&&!R.importScripts){let q=[];R.addEventListener("message",Z=>{if(Z.data&&Z.data.vscodeSetImmediateId)for(let x=0,w=q.length;x<w;x++){const V=q[x];if(V.id===Z.data.vscodeSetImmediateId){q.splice(x,1),V.callback();return}}});let te=0;return Z=>{const x=++te;q.push({id:x,callback:Z}),R.postMessage({vscodeSetImmediateId:x},"*")}}if(typeof(ee==null?void 0:ee.nextTick)=="function")return ee.nextTick.bind(ee);const k=Promise.resolve();return q=>k.then(q)}(),ke=j||G?2:ve?1:3;let De=!0,Be=!1;function X(){if(!Be){Be=!0;const N=new Uint8Array(2);N[0]=1,N[1]=2,De=new Uint16Array(N.buffer)[0]===513}return De}},95830:function(fn,ct,_){"use strict";_.d(ct,{G:function(){return se}});var m=_(23345);const ce=m.li.performance&&typeof m.li.performance.now=="function";class se{constructor(j){this._highResolution=ce&&j,this._startTime=this._now(),this._stopTime=-1}static create(j=!0){return new se(j)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?m.li.performance.now():Date.now()}}},82983:function(fn,ct,_){"use strict";_.d(ct,{$i:function(){return $e},C8:function(){return tt},GF:function(){return B},HO:function(){return te},IO:function(){return E},K7:function(){return Ye},Kw:function(){return qe},LC:function(){return R},Mh:function(){return xe},P1:function(){return ke},PJ:function(){return jt},Qe:function(){return Qe},R1:function(){return G},RP:function(){return V},S6:function(){return Ue},TT:function(){return D},Ut:function(){return x},V8:function(){return ee},WU:function(){return se},YK:function(){return Be},YU:function(){return ve},ZG:function(){return De},ZH:function(){return N},ab:function(){return ye},c1:function(){return nt},df:function(){return ue},ec:function(){return j},fi:function(){return yt},fy:function(){return g},j3:function(){return de},j_:function(){return F},m5:function(){return m},mK:function(){return $},mr:function(){return S},oH:function(){return he},oL:function(){return ae},ok:function(){return oe},ow:function(){return Q},qq:function(){return pe},qu:function(){return W},rL:function(){return X},uS:function(){return Bt},un:function(){return o},uq:function(){return C},vH:function(){return q},xe:function(){return He},zY:function(){return z}});function m(M){return!M||typeof M!="string"?!0:M.trim().length===0}const ce=/{(\d+)}/g;function se(M,...me){return me.length===0?M:M.replace(ce,function(Ee,Ke){const et=parseInt(Ke,10);return isNaN(et)||et<0||et>=me.length?Ee:me[et]})}function ve(M){return M.replace(/[<>&]/g,function(me){switch(me){case"<":return"<";case">":return">";case"&":return"&";default:return me}})}function j(M){return M.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function g(M,me=" "){const Ee=de(M,me);return ae(Ee,me)}function de(M,me){if(!M||!me)return M;const Ee=me.length;if(Ee===0||M.length===0)return M;let Ke=0;for(;M.indexOf(me,Ke)===Ke;)Ke=Ke+Ee;return M.substring(Ke)}function ae(M,me){if(!M||!me)return M;const Ee=me.length,Ke=M.length;if(Ee===0||Ke===0)return M;let et=Ke,ut=-1;for(;ut=M.lastIndexOf(me,et-1),!(ut===-1||ut+Ee!==et);){if(ut===0)return"";et=ut}return M.substring(0,et)}function o(M){return M.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function G(M){return M.replace(/\*/g,"")}function B(M,me,Ee={}){if(!M)throw new Error("Cannot create regex from empty string");me||(M=j(M)),Ee.wholeWord&&(/\B/.test(M.charAt(0))||(M="\\b"+M),/\B/.test(M.charAt(M.length-1))||(M=M+"\\b"));let Ke="";return Ee.global&&(Ke+="g"),Ee.matchCase||(Ke+="i"),Ee.multiline&&(Ke+="m"),Ee.unicode&&(Ke+="u"),new RegExp(M,Ke)}function E(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 R(M){for(let me=0,Ee=M.length;me<Ee;me++){const Ke=M.charCodeAt(me);if(Ke!==32&&Ke!==9)return me}return-1}function ee(M,me=0,Ee=M.length){for(let Ke=me;Ke<Ee;Ke++){const et=M.charCodeAt(Ke);if(et!==32&&et!==9)return M.substring(me,Ke)}return M.substring(me,Ee)}function Q(M,me=M.length-1){for(let Ee=me;Ee>=0;Ee--){const Ke=M.charCodeAt(Ee);if(Ke!==32&&Ke!==9)return Ee}return-1}function W(M,me){return M<me?-1:M>me?1:0}function D(M,me,Ee=0,Ke=M.length,et=0,ut=me.length){for(;Ee<Ke&&et<ut;Ee++,et++){let mt=M.charCodeAt(Ee),kt=me.charCodeAt(et);if(mt<kt)return-1;if(mt>kt)return 1}const St=Ke-Ee,Dt=ut-et;return St<Dt?-1:St>Dt?1:0}function z(M,me){return F(M,me,0,M.length,0,me.length)}function F(M,me,Ee=0,Ke=M.length,et=0,ut=me.length){for(;Ee<Ke&&et<ut;Ee++,et++){let mt=M.charCodeAt(Ee),kt=me.charCodeAt(et);if(mt===kt)continue;if(mt>=128||kt>=128)return D(M.toLowerCase(),me.toLowerCase(),Ee,Ke,et,ut);$(mt)&&(mt-=32),$(kt)&&(kt-=32);const Ht=mt-kt;if(Ht!==0)return Ht}const St=Ke-Ee,Dt=ut-et;return St<Dt?-1:St>Dt?1:0}function $(M){return M>=97&&M<=122}function ue(M){return M>=65&&M<=90}function pe(M,me){return M.length===me.length&&F(M,me)===0}function oe(M,me){const Ee=me.length;return me.length>M.length?!1:F(M,me,0,Ee)===0}function xe(M,me){let Ee,Ke=Math.min(M.length,me.length);for(Ee=0;Ee<Ke;Ee++)if(M.charCodeAt(Ee)!==me.charCodeAt(Ee))return Ee;return Ke}function ke(M,me){let Ee,Ke=Math.min(M.length,me.length);const et=M.length-1,ut=me.length-1;for(Ee=0;Ee<Ke;Ee++)if(M.charCodeAt(et-Ee)!==me.charCodeAt(ut-Ee))return Ee;return Ke}function De(M){return 55296<=M&&M<=56319}function Be(M){return 56320<=M&&M<=57343}function X(M,me){return(M-55296<<10)+(me-56320)+65536}function N(M,me,Ee){const Ke=M.charCodeAt(Ee);if(De(Ke)&&Ee+1<me){const et=M.charCodeAt(Ee+1);if(Be(et))return X(Ke,et)}return Ke}function k(M,me){const Ee=M.charCodeAt(me-1);if(Be(Ee)&&me>1){const Ke=M.charCodeAt(me-2);if(De(Ke))return X(Ke,Ee)}return Ee}function q(M,me){const Ee=Le.getInstance(),Ke=me,et=M.length,ut=N(M,et,me);me+=ut>=65536?2:1;let St=Ee.getGraphemeBreakType(ut);for(;me<et;){const Dt=N(M,et,me),mt=Ee.getGraphemeBreakType(Dt);if(yt(St,mt))break;me+=Dt>=65536?2:1,St=mt}return me-Ke}function te(M,me){const Ee=Le.getInstance(),Ke=me,et=k(M,me);me-=et>=65536?2:1;let ut=Ee.getGraphemeBreakType(et);for(;me>0;){const St=k(M,me),Dt=Ee.getGraphemeBreakType(St);if(yt(Dt,ut))break;me-=St>=65536?2:1,ut=Dt}return Ke-me}const Z=/(?:[\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 x(M){return Z.test(M)}const w=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function V(M){return w.test(M)}const fe=/^[\t\n\r\x20-\x7E]*$/;function $e(M){return fe.test(M)}const Qe=/[\u2028\u2029]/;function ye(M){return Qe.test(M)}function He(M){for(let me=0,Ee=M.length;me<Ee;me++)if(Ye(M.charCodeAt(me)))return!0;return!1}function Ye(M){return M=+M,M>=11904&&M<=55215||M>=63744&&M<=64255||M>=65281&&M<=65374}function tt(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 nt="\uFEFF";function Bt(M){return!!(M&&M.length>0&&M.charCodeAt(0)===65279)}function qe(M,me=!1){return M?(me&&(M=M.replace(/\\./g,"")),M.toLowerCase()!==M):!1}function jt(M){return M=M%(2*26),M<26?String.fromCharCode(97+M):String.fromCharCode(65+M-26)}function Ue(M){return Le.getInstance().getGraphemeBreakType(M)}function yt(M,me){return M===0?me!==5&&me!==7:M===2&&me===3?!1:M===4||M===2||M===3||me===4||me===2||me===3?!0:!(M===8&&(me===8||me===9||me===11||me===12)||(M===11||M===9)&&(me===9||me===10)||(M===12||M===10)&&me===10||me===5||me===13||me===7||M===1||M===13&&me===14||M===6&&me===6)}class Le{constructor(){this._data=Ce()}static getInstance(){return Le._INSTANCE||(Le._INSTANCE=new Le),Le._INSTANCE}getGraphemeBreakType(me){if(me<32)return me===10?3:me===13?2:4;if(me<127)return 0;const Ee=this._data,Ke=Ee.length/3;let et=1;for(;et<=Ke;)if(me<Ee[3*et])et=2*et;else if(me>Ee[3*et+1])et=2*et+1;else return Ee[3*et+2];return 0}}Le._INSTANCE=null;function Ce(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function he(M,me){if(M===0)return 0;const Ee=We(M,me);if(Ee!==void 0)return Ee;const Ke=k(me,M);return M-=Re(Ke),M}function We(M,me){let Ee=k(me,M);for(M-=Re(Ee);Ie(Ee)||Ee===65039||Ee===8419;){if(M===0)return;Ee=k(me,M),M-=Re(Ee)}if(tt(Ee)){if(M>=0){const Ke=k(me,M);Ke===8205&&(M-=Re(Ke))}return M}}function Re(M){return M>=65536?2:1}function Ie(M){return 127995<=M&&M<=127999}},72999:function(fn,ct,_){"use strict";_.d(ct,{$E:function(){return R},$K:function(){return de},D8:function(){return E},HD:function(){return ce},IU:function(){return ee},Jp:function(){return ae},Kn:function(){return se},cW:function(){return G},f6:function(){return Q},hj:function(){return ve},jn:function(){return j},kJ:function(){return m},mf:function(){return B},o8:function(){return g},p_:function(){return o},vE:function(){return W}});function m(D){return Array.isArray(D)}function ce(D){return typeof D=="string"}function se(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)&&!(D instanceof RegExp)&&!(D instanceof Date)}function ve(D){return typeof D=="number"&&!isNaN(D)}function j(D){return D===!0||D===!1}function g(D){return typeof D=="undefined"}function de(D){return!ae(D)}function ae(D){return g(D)||D===null}function o(D,z){if(!D)throw new Error(z?`Unexpected type, expected '${z}'`:"Unexpected type")}function G(D){if(ae(D))throw new Error("Assertion Failed: argument is undefined or null");return D}function B(D){return typeof D=="function"}function E(D,z){const F=Math.min(D.length,z.length);for(let $=0;$<F;$++)S(D[$],z[$])}function S(D,z){if(ce(z)){if(typeof D!==z)throw new Error(`argument does not match constraint: typeof ${z}`)}else if(B(z)){try{if(D instanceof z)return}catch(F){}if(!ae(D)&&D.constructor===z||z.length===1&&z.call(void 0,D)===!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(D){let z=[],F=Object.getPrototypeOf(D);for(;Object.prototype!==F;)z=z.concat(Object.getOwnPropertyNames(F)),F=Object.getPrototypeOf(F);return z}function R(D){const z=[];for(const F of C(D))typeof D[F]=="function"&&z.push(F);return z}function ee(D,z){const F=ue=>function(){const pe=Array.prototype.slice.call(arguments,0);return z(ue,pe)};let $={};for(const ue of D)$[ue]=F(ue);return $}function Q(D){return D===null?void 0:D}function W(D,z="Unreachable"){throw new Error(z)}},13268:function(fn,ct,_){"use strict";_.d(ct,{N:function(){return ce}});function m(se,ve){let j;return ve.length===0?j=se:j=se.replace(/\{(\d+)\}/g,function(g,de){const ae=de[0];return typeof ve[ae]!="undefined"?ve[ae]:g}),j}function ce(se,ve,...j){return m(ve,j)}},96236:function(fn,ct,_){"use strict";_.d(ct,{BH:function(){return ee},NZ:function(){return Q},U8:function(){return W},co:function(){return R},eH:function(){return C},vr:function(){return S}});var m=_(75918),ce=_(52615),se=_(4348),ve=_(88226),j=_(69323),g=_(34502),de=_(35884),ae=_(90689),o=_(16925),G=_(49055),B=function(D,z,F,$){var ue=arguments.length,pe=ue<3?z:$===null?$=Object.getOwnPropertyDescriptor(z,F):$,oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(D,z,F,$);else for(var xe=D.length-1;xe>=0;xe--)(oe=D[xe])&&(pe=(ue<3?oe(pe):ue>3?oe(z,F,pe):oe(z,F))||pe);return ue>3&&pe&&Object.defineProperty(z,F,pe),pe},E=function(D,z){return function(F,$){z(F,$,D)}};function S(D){return D.command!==void 0}class C{constructor(z){this.id=C._idPool++,this._debugName=z}}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 R=(0,o.yh)("menuService"),ee=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new se.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:D=>D===C.CommandPalette}}addCommand(D){return this.addCommands(ve.$.single(D))}addCommands(D){for(const z of D)this._commands.set(z.id,z);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,j.OF)(()=>{let z=!1;for(const F of D)z=this._commands.delete(F.id)||z;z&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(D){return this._commands.get(D)}getCommands(){const D=new Map;return this._commands.forEach((z,F)=>D.set(F,z)),D}appendMenuItem(D,z){return this.appendMenuItems(ve.$.single({id:D,item:z}))}appendMenuItems(D){const z=new Set,F=new g.S;for(const{id:$,item:ue}of D){let pe=this._menuItems.get($);pe||(pe=new g.S,this._menuItems.set($,pe)),F.push(pe.push(ue)),z.add($)}return this._onDidChangeMenu.fire(z),(0,j.OF)(()=>{if(F.size>0){for(let $ of F)$();this._onDidChangeMenu.fire(z),F.clear()}})}getMenuItems(D){let z;return this._menuItems.has(D)?z=[...this._menuItems.get(D)]:z=[],D===C.CommandPalette&&this._appendImplicitItems(z),z}_appendImplicitItems(D){const z=new Set;for(const F of D)S(F)&&(z.add(F.command.id),F.alt&&z.add(F.alt.id));this._commands.forEach((F,$)=>{z.has($)||D.push({command:F})})}};class Q extends m.wY{constructor(z,F,$,ue){super(`submenuitem.${z.submenu.id}`,typeof z.title=="string"?z.title:z.title.value,[],"submenu"),this.item=z,this._menuService=F,this._contextKeyService=$,this._options=ue}get actions(){const z=[],F=this._menuService.createMenu(this.item.submenu,this._contextKeyService),$=F.getActions(this._options);F.dispose();for(const[,ue]of $)ue.length>0&&(z.push(...ue),z.push(new m.Z0));return z.length&&z.pop(),z}}let W=class Eu{constructor(z,F,$,ue,pe){var oe,xe;if(this._commandService=pe,this.id=z.id,this.label=$!=null&&$.renderShortTitle&&z.shortTitle?typeof z.shortTitle=="string"?z.shortTitle:z.shortTitle.value:typeof z.title=="string"?z.title:z.title.value,this.tooltip=(xe=typeof z.tooltip=="string"?z.tooltip:(oe=z.tooltip)===null||oe===void 0?void 0:oe.value)!==null&&xe!==void 0?xe:"",this.enabled=!z.precondition||ue.contextMatchesRules(z.precondition),this.checked=void 0,z.toggled){const ke=z.toggled.condition?z.toggled:{condition:z.toggled};this.checked=ue.contextMatchesRules(ke.condition),this.checked&&ke.tooltip&&(this.tooltip=typeof ke.tooltip=="string"?ke.tooltip:ke.tooltip.value),ke.title&&(this.label=typeof ke.title=="string"?ke.title:ke.title.value)}this.item=z,this.alt=F?new Eu(F,void 0,$,ue,pe):void 0,this._options=$,G.kS.isThemeIcon(z.icon)&&(this.class=ce.dT.asClassName(z.icon))}dispose(){}run(...z){var F,$;let ue=[];return!((F=this._options)===null||F===void 0)&&F.arg&&(ue=[...ue,this._options.arg]),!(($=this._options)===null||$===void 0)&&$.shouldForwardArgs&&(ue=[...ue,...z]),this._commandService.executeCommand(this.id,...ue)}};W=B([E(3,ae.i6),E(4,de.H)],W)},35884:function(fn,ct,_){"use strict";_.d(ct,{H:function(){return de},P:function(){return ae}});var m=_(4348),ce=_(88226),se=_(69323),ve=_(34502),j=_(72999),g=_(16925);const de=(0,g.yh)("commandService"),ae=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new m.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,G){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!G)throw new Error("invalid command");return this.registerCommand({id:o,handler:G})}if(o.description){const R=[];for(let Q of o.description.args)R.push(Q.constraint);const ee=o.handler;o.handler=function(Q,...W){return(0,j.D8)(W,R),ee(Q,...W)}}const{id:B}=o;let E=this._commands.get(B);E||(E=new ve.S,this._commands.set(B,E));let S=E.unshift(o),C=(0,se.OF)(()=>{S();const R=this._commands.get(B);R!=null&&R.isEmpty()&&this._commands.delete(B)});return this._onDidRegisterCommand.fire(B),C}registerCommandAlias(o,G){return ae.registerCommand(o,(B,...E)=>B.get(de).executeCommand(G,...E))}getCommand(o){const G=this._commands.get(o);if(!(!G||G.isEmpty()))return ce.$.first(G)}getCommands(){const o=new Map;for(const G of this._commands.keys()){const B=this.getCommand(G);B&&o.set(G,B)}return o}};ae.registerCommand("noop",()=>{})},90689:function(fn,ct,_){"use strict";_.d(ct,{Ao:function(){return de},Eq:function(){return X},Fb:function(){return ae},K8:function(){return q},i6:function(){return Be},uy:function(){return De}});var m=_(23345),ce=_(82983),se=_(16925);let ve=m.WE||"";const j=new Map;j.set("false",!1),j.set("true",!0),j.set("isMac",m.dz),j.set("isLinux",m.IJ),j.set("isWindows",m.ED),j.set("isWeb",m.$L),j.set("isMacNative",m.dz&&!m.$L),j.set("isEdge",ve.indexOf("Edg/")>=0),j.set("isFirefox",ve.indexOf("Firefox")>=0),j.set("isChrome",ve.indexOf("Chrome")>=0),j.set("isSafari",ve.indexOf("Safari")>=0);const g=Object.prototype.hasOwnProperty;class de{static has(x){return E.create(x)}static equals(x,w){return S.create(x,w)}static regex(x,w){return ue.create(x,w)}static not(x){return Q.create(x)}static and(...x){return xe.create(x,null)}static or(...x){return ke.create(x,null,!0)}static deserialize(x,w=!1){if(x)return this._deserializeOrExpression(x,w)}static _deserializeOrExpression(x,w){let V=x.split("||");return ke.create(V.map(fe=>this._deserializeAndExpression(fe,w)),null,!0)}static _deserializeAndExpression(x,w){let V=x.split("&&");return xe.create(V.map(fe=>this._deserializeOne(fe,w)),null)}static _deserializeOne(x,w){if(x=x.trim(),x.indexOf("!=")>=0){let V=x.split("!=");return ee.create(V[0].trim(),this._deserializeValue(V[1],w))}if(x.indexOf("==")>=0){let V=x.split("==");return S.create(V[0].trim(),this._deserializeValue(V[1],w))}if(x.indexOf("=~")>=0){let V=x.split("=~");return ue.create(V[0].trim(),this._deserializeRegexValue(V[1],w))}if(x.indexOf(" in ")>=0){let V=x.split(" in ");return C.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(x)){const V=x.split(">=");return z.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(x)){const V=x.split(">");return D.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(x)){const V=x.split("<=");return $.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(x)){const V=x.split("<");return F.create(V[0].trim(),V[1].trim())}return/^\!\s*/.test(x)?Q.create(x.substr(1).trim()):E.create(x)}static _deserializeValue(x,w){if(x=x.trim(),x==="true")return!0;if(x==="false")return!1;let V=/^'([^']*)'$/.exec(x);return V?V[1].trim():x}static _deserializeRegexValue(x,w){if((0,ce.m5)(x)){if(w)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let V=x.indexOf("/"),fe=x.lastIndexOf("/");if(V===fe||V<0){if(w)throw new Error(`bad regexp-value '${x}', missing /-enclosure`);return console.warn(`bad regexp-value '${x}', missing /-enclosure`),null}let $e=x.slice(V+1,fe),Qe=x[fe+1]==="i"?"i":"";try{return new RegExp($e,Qe)}catch(ye){if(w)throw new Error(`bad regexp-value '${x}', parse error: ${ye}`);return console.warn(`bad regexp-value '${x}', parse error: ${ye}`),null}}}function ae(Z,x){const w=Z?Z.substituteConstants():void 0,V=x?x.substituteConstants():void 0;return!w&&!V?!0:!w||!V?!1:w.equals(V)}function o(Z,x){return Z.cmp(x)}class G{constructor(){this.type=0}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!1}serialize(){return"false"}keys(){return[]}negate(){return B.INSTANCE}}G.INSTANCE=new G;class B{constructor(){this.type=1}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!0}serialize(){return"true"}keys(){return[]}negate(){return G.INSTANCE}}B.INSTANCE=new B;class E{constructor(x,w){this.key=x,this.negated=w,this.type=2}static create(x,w=null){const V=j.get(x);return typeof V=="boolean"?V?B.INSTANCE:G.INSTANCE:new E(x,w)}cmp(x){return x.type!==this.type?this.type-x.type:N(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=j.get(this.key);return typeof x=="boolean"?x?B.INSTANCE:G.INSTANCE:this}evaluate(x){return!!x.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(x,w,V){this.key=x,this.value=w,this.negated=V,this.type=4}static create(x,w,V=null){if(typeof w=="boolean")return w?E.create(x,V):Q.create(x,V);const fe=j.get(x);return typeof fe=="boolean"?w===(fe?"true":"false")?B.INSTANCE:G.INSTANCE:new S(x,w,V)}cmp(x){return x.type!==this.type?this.type-x.type:k(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=j.get(this.key);if(typeof x=="boolean"){const w=x?"true":"false";return this.value===w?B.INSTANCE:G.INSTANCE}return this}evaluate(x){return x.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ee.create(this.key,this.value,this)),this.negated}}class C{constructor(x,w){this.key=x,this.valueKey=w,this.type=10,this.negated=null}static create(x,w){return new C(x,w)}cmp(x){return x.type!==this.type?this.type-x.type:k(this.key,this.valueKey,x.key,x.valueKey)}equals(x){return x.type===this.type?this.key===x.key&&this.valueKey===x.valueKey:!1}substituteConstants(){return this}evaluate(x){const w=x.getValue(this.valueKey),V=x.getValue(this.key);return Array.isArray(w)?w.indexOf(V)>=0:typeof V=="string"&&typeof w=="object"&&w!==null?g.call(w,V):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=R.create(this)),this.negated}}class R{constructor(x){this._actual=x,this.type=11}static create(x){return new R(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class ee{constructor(x,w,V){this.key=x,this.value=w,this.negated=V,this.type=5}static create(x,w,V=null){if(typeof w=="boolean")return w?Q.create(x,V):E.create(x,V);const fe=j.get(x);return typeof fe=="boolean"?w===(fe?"true":"false")?G.INSTANCE:B.INSTANCE:new ee(x,w,V)}cmp(x){return x.type!==this.type?this.type-x.type:k(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=j.get(this.key);if(typeof x=="boolean"){const w=x?"true":"false";return this.value===w?G.INSTANCE:B.INSTANCE}return this}evaluate(x){return x.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(x,w){this.key=x,this.negated=w,this.type=3}static create(x,w=null){const V=j.get(x);return typeof V=="boolean"?V?G.INSTANCE:B.INSTANCE:new Q(x,w)}cmp(x){return x.type!==this.type?this.type-x.type:N(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=j.get(this.key);return typeof x=="boolean"?x?G.INSTANCE:B.INSTANCE:this}evaluate(x){return!x.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this)),this.negated}}function W(Z,x){if(typeof Z=="string"){const w=parseFloat(Z);isNaN(w)||(Z=w)}return typeof Z=="string"||typeof Z=="number"?x(Z):G.INSTANCE}class D{constructor(x,w,V){this.key=x,this.value=w,this.negated=V,this.type=12}static create(x,w,V=null){return W(w,fe=>new D(x,fe,V))}cmp(x){return x.type!==this.type?this.type-x.type:k(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=$.create(this.key,this.value,this)),this.negated}}class z{constructor(x,w,V){this.key=x,this.value=w,this.negated=V,this.type=13}static create(x,w,V=null){return W(w,fe=>new z(x,fe,V))}cmp(x){return x.type!==this.type?this.type-x.type:k(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.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 F{constructor(x,w,V){this.key=x,this.value=w,this.negated=V,this.type=14}static create(x,w,V=null){return W(w,fe=>new F(x,fe,V))}cmp(x){return x.type!==this.type?this.type-x.type:k(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class ${constructor(x,w,V){this.key=x,this.value=w,this.negated=V,this.type=15}static create(x,w,V=null){return W(w,fe=>new $(x,fe,V))}cmp(x){return x.type!==this.type?this.type-x.type:k(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this.value,this)),this.negated}}class ue{constructor(x,w){this.key=x,this.regexp=w,this.type=7,this.negated=null}static create(x,w){return new ue(x,w)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.key<x.key)return-1;if(this.key>x.key)return 1;const w=this.regexp?this.regexp.source:"",V=x.regexp?x.regexp.source:"";return w<V?-1:w>V?1:0}equals(x){if(x.type===this.type){const w=this.regexp?this.regexp.source:"",V=x.regexp?x.regexp.source:"";return this.key===x.key&&w===V}return!1}substituteConstants(){return this}evaluate(x){let w=x.getValue(this.key);return this.regexp?this.regexp.test(w):!1}serialize(){const x=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${x}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=pe.create(this)),this.negated}}class pe{constructor(x){this._actual=x,this.type=8}static create(x){return new pe(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function oe(Z){let x=null;for(let w=0,V=Z.length;w<V;w++){const fe=Z[w].substituteConstants();if(Z[w]!==fe&&x===null){x=[];for(let $e=0;$e<w;$e++)x[$e]=Z[$e]}x!==null&&(x[w]=fe)}return x===null?Z:x}class xe{constructor(x,w){this.expr=x,this.negated=w,this.type=6}static create(x,w){return xe._normalizeArr(x,w)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let w=0,V=this.expr.length;w<V;w++){const fe=o(this.expr[w],x.expr[w]);if(fe!==0)return fe}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let w=0,V=this.expr.length;w<V;w++)if(!this.expr[w].equals(x.expr[w]))return!1;return!0}return!1}substituteConstants(){const x=oe(this.expr);return x===this.expr?this:xe.create(x,this.negated)}evaluate(x){for(let w=0,V=this.expr.length;w<V;w++)if(!this.expr[w].evaluate(x))return!1;return!0}static _normalizeArr(x,w){const V=[];let fe=!1;for(const $e of x)if($e){if($e.type===1){fe=!0;continue}if($e.type===0)return G.INSTANCE;if($e.type===6){V.push(...$e.expr);continue}V.push($e)}if(V.length===0&&fe)return B.INSTANCE;if(V.length!==0){if(V.length===1)return V[0];V.sort(o);for(let $e=1;$e<V.length;$e++)V[$e-1].equals(V[$e])&&(V.splice($e,1),$e--);if(V.length===1)return V[0];for(;V.length>1;){const $e=V[V.length-1];if($e.type!==9)break;V.pop();const Qe=V.pop(),ye=V.length===0,He=ke.create($e.expr.map(Ye=>xe.create([Ye,Qe],null)),null,ye);He&&(V.push(He),V.sort(o))}return V.length===1?V[0]:new xe(V,w)}}serialize(){return this.expr.map(x=>x.serialize()).join(" && ")}keys(){const x=[];for(let w of this.expr)x.push(...w.keys());return x}negate(){if(!this.negated){const x=[];for(let w of this.expr)x.push(w.negate());this.negated=ke.create(x,this,!0)}return this.negated}}class ke{constructor(x,w){this.expr=x,this.negated=w,this.type=9}static create(x,w,V){return ke._normalizeArr(x,w,V)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let w=0,V=this.expr.length;w<V;w++){const fe=o(this.expr[w],x.expr[w]);if(fe!==0)return fe}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let w=0,V=this.expr.length;w<V;w++)if(!this.expr[w].equals(x.expr[w]))return!1;return!0}return!1}substituteConstants(){const x=oe(this.expr);return x===this.expr?this:ke.create(x,this.negated,!1)}evaluate(x){for(let w=0,V=this.expr.length;w<V;w++)if(this.expr[w].evaluate(x))return!0;return!1}static _normalizeArr(x,w,V){let fe=[],$e=!1;if(x){for(let Qe=0,ye=x.length;Qe<ye;Qe++){const He=x[Qe];if(He){if(He.type===0){$e=!0;continue}if(He.type===1)return B.INSTANCE;if(He.type===9){fe=fe.concat(He.expr);continue}fe.push(He)}}if(fe.length===0&&$e)return G.INSTANCE;fe.sort(o)}if(fe.length!==0){if(fe.length===1)return fe[0];for(let Qe=1;Qe<fe.length;Qe++)fe[Qe-1].equals(fe[Qe])&&(fe.splice(Qe,1),Qe--);if(fe.length===1)return fe[0];if(V){for(let Qe=0;Qe<fe.length;Qe++)for(let ye=Qe+1;ye<fe.length;ye++)q(fe[Qe],fe[ye])&&(fe.splice(ye,1),ye--);if(fe.length===1)return fe[0]}return new ke(fe,w)}}serialize(){return this.expr.map(x=>x.serialize()).join(" || ")}keys(){const x=[];for(let w of this.expr)x.push(...w.keys());return x}negate(){if(!this.negated){let x=[];for(let w of this.expr)x.push(w.negate());for(;x.length>1;){const w=x.shift(),V=x.shift(),fe=[];for(const Qe of te(w))for(const ye of te(V))fe.push(xe.create([Qe,ye],null));const $e=x.length===0;x.unshift(ke.create(fe,null,$e))}this.negated=x[0]}return this.negated}}class De extends E{constructor(x,w,V){super(x,null),this._defaultValue=w,typeof V=="object"?De._info.push(Object.assign(Object.assign({},V),{key:x})):V!==!0&&De._info.push({key:x,description:V,type:w!=null?typeof w:void 0})}static all(){return De._info.values()}bindTo(x){return x.createKey(this.key,this._defaultValue)}getValue(x){return x.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(x){return S.create(this.key,x)}}De._info=[];const Be=(0,se.yh)("contextKeyService"),X="setContext";function N(Z,x){return Z<x?-1:Z>x?1:0}function k(Z,x,w,V){return Z<w?-1:Z>w?1:x<V?-1:x>V?1:0}function q(Z,x){if(x.type===6&&Z.type!==9&&Z.type!==6){for(const fe of x.expr)if(Z.equals(fe))return!0}const w=Z.negate(),V=te(w).concat(te(x));V.sort(o);for(let fe=0;fe<V.length;fe++){const Qe=V[fe].negate();for(let ye=fe+1;ye<V.length;ye++){const He=V[ye];if(Qe.equals(He))return!0}}return!1}function te(Z){return Z.type===9?Z.expr:[Z]}},16925:function(fn,ct,_){"use strict";_.d(ct,{I8:function(){return m},TG:function(){return ce},jt:function(){return j},yh:function(){return ve}});var m;(function(g){g.serviceIds=new Map,g.DI_TARGET="$di$target",g.DI_DEPENDENCIES="$di$dependencies";function de(ae){return ae[g.DI_DEPENDENCIES]||[]}g.getServiceDependencies=de})(m||(m={}));const ce=ve("instantiationService");function se(g,de,ae,o){de[m.DI_TARGET]===de?de[m.DI_DEPENDENCIES].push({id:g,index:ae,optional:o}):(de[m.DI_DEPENDENCIES]=[{id:g,index:ae,optional:o}],de[m.DI_TARGET]=de)}function ve(g){if(m.serviceIds.has(g))return m.serviceIds.get(g);const de=function(ae,o,G){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");se(de,ae,G,!1)};return de.toString=()=>g,m.serviceIds.set(g,de),de}function j(g){return function(de,ae,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");se(g,de,o,!0)}}},44650:function(fn,ct,_){"use strict";_.d(ct,{B:function(){return ve}});var m=_(76068),ce=_(72999);class se{constructor(){this.data=new Map}add(g,de){m.ok(ce.HD(g)),m.ok(ce.Kn(de)),m.ok(!this.data.has(g),"There is already an extension with this id"),this.data.set(g,de)}as(g){return this.data.get(g)||null}}const ve=new se},66213:function(fn,ct,_){"use strict";_.d(ct,{e:function(){return m}});var m;(function(ce){ce.DARK="dark",ce.LIGHT="light",ce.HIGH_CONTRAST="hc"})(m||(m={}))},49055:function(fn,ct,_){"use strict";_.d(ct,{EN:function(){return o},IP:function(){return E},Ic:function(){return R},XE:function(){return de},bB:function(){return ee},kS:function(){return G},m6:function(){return B}});var m=_(52615),ce=_(4348),se=_(69323),ve=_(16925),j=_(44650),g=_(66213);const de=(0,ve.yh)("themeService");var ae;(function(Q){function W(D){return D&&typeof D=="object"&&typeof D.id=="string"}Q.isThemeColor=W})(ae||(ae={}));function o(Q){return{id:Q}}var G;(function(Q){function W(pe){return pe&&typeof pe=="object"&&typeof pe.id=="string"&&(typeof pe.color=="undefined"||ae.isThemeColor(pe.color))}Q.isThemeIcon=W;const D=new RegExp(`^\\$\\((${m.dT.iconNameExpression}(?:${m.dT.iconModifierExpression})?)\\)$`);function z(pe){const oe=D.exec(pe);if(!oe)return;let[,xe]=oe;return{id:xe}}Q.fromString=z;function F(pe,oe){let xe=pe.id;const ke=xe.lastIndexOf("~");return ke!==-1&&(xe=xe.substring(0,ke)),oe&&(xe=`${xe}~${oe}`),{id:xe}}Q.modify=F;function $(pe,oe){var xe,ke;return pe.id===oe.id&&((xe=pe.color)===null||xe===void 0?void 0:xe.id)===((ke=oe.color)===null||ke===void 0?void 0:ke.id)}Q.isEqual=$;function ue(pe,oe){return{id:pe.id,color:oe?o(oe):void 0}}Q.asThemeIcon=ue,Q.asClassNameArray=m.dT.asClassNameArray,Q.asClassName=m.dT.asClassName,Q.asCSSSelector=m.dT.asCSSSelector})(G||(G={}));function B(Q){switch(Q){case g.e.DARK:return"vs-dark";case g.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const E={ThemingContribution:"base.contributions.theming"};class S{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ce.Q5}onColorThemeChange(W){return this.themingParticipants.push(W),this.onThemingParticipantAddedEmitter.fire(W),(0,se.OF)(()=>{const D=this.themingParticipants.indexOf(W);this.themingParticipants.splice(D,1)})}getThemingParticipants(){return this.themingParticipants}}let C=new S;j.B.add(E.ThemingContribution,C);function R(Q){return C.onColorThemeChange(Q)}class ee extends se.JT{constructor(W){super(),this.themeService=W,this.theme=W.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(D=>this.onThemeChange(D)))}onThemeChange(W){this.theme=W,this.updateStyles()}updateStyles(){}}},96478:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return pe}});var m=_(60499),ce=_(18642),se=_(72190),ve=_(42244),j=_(68196),g=_(92310),de=_.n(g),ae=_(8654),o=_(59301),G=_(10228),B=_(16089),E=G.Z.ESC,S=G.Z.TAB;function C(oe){var xe=oe.visible,ke=oe.triggerRef,De=oe.onVisibleChange,Be=oe.autoFocus,X=oe.overlayRef,N=o.useRef(!1),k=function(){if(xe){var x,w;(x=ke.current)===null||x===void 0||(w=x.focus)===null||w===void 0||w.call(x),De==null||De(!1)}},q=function(){var x;return(x=X.current)!==null&&x!==void 0&&x.focus?(X.current.focus(),N.current=!0,!0):!1},te=function(x){switch(x.keyCode){case E:k();break;case S:{var w=!1;N.current||(w=q()),w?x.preventDefault():k();break}}};o.useEffect(function(){return xe?(window.addEventListener("keydown",te),Be&&(0,B.Z)(q,3),function(){window.removeEventListener("keydown",te),N.current=!1}):function(){N.current=!1}},[xe])}var R=(0,o.forwardRef)(function(oe,xe){var ke=oe.overlay,De=oe.arrow,Be=oe.prefixCls,X=(0,o.useMemo)(function(){var k;return typeof ke=="function"?k=ke():k=ke,k},[ke]),N=(0,ae.sQ)(xe,(0,ae.C4)(X));return o.createElement(o.Fragment,null,De&&o.createElement("div",{className:"".concat(Be,"-arrow")}),o.cloneElement(X,{ref:(0,ae.Yr)(X)?N:void 0}))}),ee=R,Q={adjustX:1,adjustY:1},W=[0,0],D={topLeft:{points:["bl","tl"],overflow:Q,offset:[0,-4],targetOffset:W},top:{points:["bc","tc"],overflow:Q,offset:[0,-4],targetOffset:W},topRight:{points:["br","tr"],overflow:Q,offset:[0,-4],targetOffset:W},bottomLeft:{points:["tl","bl"],overflow:Q,offset:[0,4],targetOffset:W},bottom:{points:["tc","bc"],overflow:Q,offset:[0,4],targetOffset:W},bottomRight:{points:["tr","br"],overflow:Q,offset:[0,4],targetOffset:W}},z=D,F=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function $(oe,xe){var ke,De=oe.arrow,Be=De===void 0?!1:De,X=oe.prefixCls,N=X===void 0?"rc-dropdown":X,k=oe.transitionName,q=oe.animation,te=oe.align,Z=oe.placement,x=Z===void 0?"bottomLeft":Z,w=oe.placements,V=w===void 0?z:w,fe=oe.getPopupContainer,$e=oe.showAction,Qe=oe.hideAction,ye=oe.overlayClassName,He=oe.overlayStyle,Ye=oe.visible,tt=oe.trigger,nt=tt===void 0?["hover"]:tt,Bt=oe.autoFocus,qe=oe.overlay,jt=oe.children,Ue=oe.onVisibleChange,yt=(0,ve.Z)(oe,F),Le=o.useState(),Ce=(0,se.Z)(Le,2),he=Ce[0],We=Ce[1],Re="visible"in oe?Ye:he,Ie=o.useRef(null),M=o.useRef(null),me=o.useRef(null);o.useImperativeHandle(xe,function(){return Ie.current});var Ee=function(zt){We(zt),Ue==null||Ue(zt)};C({visible:Re,triggerRef:me,onVisibleChange:Ee,autoFocus:Bt,overlayRef:M});var Ke=function(zt){var Ut=oe.onOverlayClick;We(!1),Ut&&Ut(zt)},et=function(){return o.createElement(ee,{ref:M,overlay:qe,prefixCls:N,arrow:Be})},ut=function(){return typeof qe=="function"?et:et()},St=function(){var zt=oe.minOverlayWidthMatchTrigger,Ut=oe.alignPoint;return"minOverlayWidthMatchTrigger"in oe?zt:!Ut},Dt=function(){var zt=oe.openClassName;return zt!==void 0?zt:"".concat(N,"-open")},mt=o.cloneElement(jt,{className:de()((ke=jt.props)===null||ke===void 0?void 0:ke.className,Re&&Dt()),ref:(0,ae.Yr)(jt)?(0,ae.sQ)(me,(0,ae.C4)(jt)):void 0}),kt=Qe;return!kt&&nt.indexOf("contextMenu")!==-1&&(kt=["click"]),o.createElement(j.Z,(0,m.Z)({builtinPlacements:V},yt,{prefixCls:N,ref:Ie,popupClassName:de()(ye,(0,ce.Z)({},"".concat(N,"-show-arrow"),Be)),popupStyle:He,action:nt,showAction:$e,hideAction:kt,popupPlacement:x,popupAlign:te,popupTransitionName:k,popupAnimation:q,popupVisible:Re,stretch:St()?"minWidth":"",popup:ut(),onPopupVisibleChange:Ee,onPopupClick:Ke,getPopupContainer:fe}),mt)}var ue=o.forwardRef($),pe=ue},66003:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return de}});var m=_(42244),ce=_(85899),se=_(43749),ve=_(59301),j=["show"];function g(ae,o){if(!o.max)return!0;var G=o.strategy(ae);return G<=o.max}function de(ae,o){return ve.useMemo(function(){var G={};o&&(G.show=(0,se.Z)(o)==="object"&&o.formatter?o.formatter:!!o),G=(0,ce.Z)((0,ce.Z)({},G),ae);var B=G,E=B.show,S=(0,m.Z)(B,j);return(0,ce.Z)((0,ce.Z)({},S),{},{show:!!E,showFormatter:typeof E=="function"?E:void 0,strategy:S.strategy||function(C){return C.length}})},[ae,o])}},36901:function(fn,ct,_){"use strict";_.r(ct),_.d(ct,{BaseInput:function(){return G},default:function(){return z}});var m=_(85899),ce=_(60499),se=_(18642),ve=_(43749),j=_(92310),g=_.n(j),de=_(59301),ae=_(30292),o=de.forwardRef(function(F,$){var ue,pe,oe,xe=F.inputElement,ke=F.children,De=F.prefixCls,Be=F.prefix,X=F.suffix,N=F.addonBefore,k=F.addonAfter,q=F.className,te=F.style,Z=F.disabled,x=F.readOnly,w=F.focused,V=F.triggerFocus,fe=F.allowClear,$e=F.value,Qe=F.handleReset,ye=F.hidden,He=F.classes,Ye=F.classNames,tt=F.dataAttrs,nt=F.styles,Bt=F.components,qe=F.onClear,jt=ke!=null?ke:xe,Ue=(Bt==null?void 0:Bt.affixWrapper)||"span",yt=(Bt==null?void 0:Bt.groupWrapper)||"span",Le=(Bt==null?void 0:Bt.wrapper)||"span",Ce=(Bt==null?void 0:Bt.groupAddon)||"span",he=(0,de.useRef)(null),We=function(Rt){var Lt;(Lt=he.current)!==null&&Lt!==void 0&&Lt.contains(Rt.target)&&(V==null||V())},Re=(0,ae.X3)(F),Ie=(0,de.cloneElement)(jt,{value:$e,className:g()((ue=jt.props)===null||ue===void 0?void 0:ue.className,!Re&&(Ye==null?void 0:Ye.variant))||null}),M=(0,de.useRef)(null);if(de.useImperativeHandle($,function(){return{nativeElement:M.current||he.current}}),Re){var me=null;if(fe){var Ee=!Z&&!x&&$e,Ke="".concat(De,"-clear-icon"),et=(0,ve.Z)(fe)==="object"&&fe!==null&&fe!==void 0&&fe.clearIcon?fe.clearIcon:"\u2716";me=de.createElement("button",{type:"button",tabIndex:-1,onClick:function(Rt){Qe==null||Qe(Rt),qe==null||qe()},onMouseDown:function(Rt){return Rt.preventDefault()},className:g()(Ke,(0,se.Z)((0,se.Z)({},"".concat(Ke,"-hidden"),!Ee),"".concat(Ke,"-has-suffix"),!!X))},et)}var ut="".concat(De,"-affix-wrapper"),St=g()(ut,(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({},"".concat(De,"-disabled"),Z),"".concat(ut,"-disabled"),Z),"".concat(ut,"-focused"),w),"".concat(ut,"-readonly"),x),"".concat(ut,"-input-with-clear-btn"),X&&fe&&$e),He==null?void 0:He.affixWrapper,Ye==null?void 0:Ye.affixWrapper,Ye==null?void 0:Ye.variant),Dt=(X||fe)&&de.createElement("span",{className:g()("".concat(De,"-suffix"),Ye==null?void 0:Ye.suffix),style:nt==null?void 0:nt.suffix},me,X);Ie=de.createElement(Ue,(0,ce.Z)({className:St,style:nt==null?void 0:nt.affixWrapper,onClick:We},tt==null?void 0:tt.affixWrapper,{ref:he}),Be&&de.createElement("span",{className:g()("".concat(De,"-prefix"),Ye==null?void 0:Ye.prefix),style:nt==null?void 0:nt.prefix},Be),Ie,Dt)}if((0,ae.He)(F)){var mt="".concat(De,"-group"),kt="".concat(mt,"-addon"),Ht="".concat(mt,"-wrapper"),zt=g()("".concat(De,"-wrapper"),mt,He==null?void 0:He.wrapper,Ye==null?void 0:Ye.wrapper),Ut=g()(Ht,(0,se.Z)({},"".concat(Ht,"-disabled"),Z),He==null?void 0:He.group,Ye==null?void 0:Ye.groupWrapper);Ie=de.createElement(yt,{className:Ut,ref:M},de.createElement(Le,{className:zt},N&&de.createElement(Ce,{className:kt},N),Ie,k&&de.createElement(Ce,{className:kt},k)))}return de.cloneElement(Ie,{className:g()((pe=Ie.props)===null||pe===void 0?void 0:pe.className,q)||null,style:(0,m.Z)((0,m.Z)({},(oe=Ie.props)===null||oe===void 0?void 0:oe.style),te),hidden:ye})}),G=o,B=_(77654),E=_(72190),S=_(42244),C=_(18929),R=_(2738),ee=_(66003),Q=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],W=(0,de.forwardRef)(function(F,$){var ue=F.autoComplete,pe=F.onChange,oe=F.onFocus,xe=F.onBlur,ke=F.onPressEnter,De=F.onKeyDown,Be=F.onKeyUp,X=F.prefixCls,N=X===void 0?"rc-input":X,k=F.disabled,q=F.htmlSize,te=F.className,Z=F.maxLength,x=F.suffix,w=F.showCount,V=F.count,fe=F.type,$e=fe===void 0?"text":fe,Qe=F.classes,ye=F.classNames,He=F.styles,Ye=F.onCompositionStart,tt=F.onCompositionEnd,nt=(0,S.Z)(F,Q),Bt=(0,de.useState)(!1),qe=(0,E.Z)(Bt,2),jt=qe[0],Ue=qe[1],yt=(0,de.useRef)(!1),Le=(0,de.useRef)(!1),Ce=(0,de.useRef)(null),he=(0,de.useRef)(null),We=function(wt){Ce.current&&(0,ae.nH)(Ce.current,wt)},Re=(0,C.Z)(F.defaultValue,{value:F.value}),Ie=(0,E.Z)(Re,2),M=Ie[0],me=Ie[1],Ee=M==null?"":String(M),Ke=(0,de.useState)(null),et=(0,E.Z)(Ke,2),ut=et[0],St=et[1],Dt=(0,ee.Z)(V,w),mt=Dt.max||Z,kt=Dt.strategy(Ee),Ht=!!mt&&kt>mt;(0,de.useImperativeHandle)($,function(){var le;return{focus:We,blur:function(){var Se;(Se=Ce.current)===null||Se===void 0||Se.blur()},setSelectionRange:function(Se,je,Ge){var Y;(Y=Ce.current)===null||Y===void 0||Y.setSelectionRange(Se,je,Ge)},select:function(){var Se;(Se=Ce.current)===null||Se===void 0||Se.select()},input:Ce.current,nativeElement:((le=he.current)===null||le===void 0?void 0:le.nativeElement)||Ce.current}}),(0,de.useEffect)(function(){Le.current&&(Le.current=!1),Ue(function(le){return le&&k?!1:le})},[k]);var zt=function(wt,Se,je){var Ge=Se;if(!yt.current&&Dt.exceedFormatter&&Dt.max&&Dt.strategy(Se)>Dt.max){if(Ge=Dt.exceedFormatter(Se,{max:Dt.max}),Se!==Ge){var Y,ne;St([((Y=Ce.current)===null||Y===void 0?void 0:Y.selectionStart)||0,((ne=Ce.current)===null||ne===void 0?void 0:ne.selectionEnd)||0])}}else if(je.source==="compositionEnd")return;me(Ge),Ce.current&&(0,ae.rJ)(Ce.current,wt,pe,Ge)};(0,de.useEffect)(function(){if(ut){var le;(le=Ce.current)===null||le===void 0||le.setSelectionRange.apply(le,(0,B.Z)(ut))}},[ut]);var Ut=function(wt){zt(wt,wt.target.value,{source:"change"})},st=function(wt){yt.current=!1,zt(wt,wt.currentTarget.value,{source:"compositionEnd"}),tt==null||tt(wt)},Rt=function(wt){ke&&wt.key==="Enter"&&!Le.current&&(Le.current=!0,ke(wt)),De==null||De(wt)},Lt=function(wt){wt.key==="Enter"&&(Le.current=!1),Be==null||Be(wt)},_e=function(wt){Ue(!0),oe==null||oe(wt)},Ze=function(wt){Le.current&&(Le.current=!1),Ue(!1),xe==null||xe(wt)},b=function(wt){me(""),We(),Ce.current&&(0,ae.rJ)(Ce.current,wt,pe)},A=Ht&&"".concat(N,"-out-of-range"),Oe=function(){var wt=(0,R.Z)(F,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return de.createElement("input",(0,ce.Z)({autoComplete:ue},wt,{onChange:Ut,onFocus:_e,onBlur:Ze,onKeyDown:Rt,onKeyUp:Lt,className:g()(N,(0,se.Z)({},"".concat(N,"-disabled"),k),ye==null?void 0:ye.input),style:He==null?void 0:He.input,ref:Ce,size:q,type:$e,onCompositionStart:function(je){yt.current=!0,Ye==null||Ye(je)},onCompositionEnd:st}))},U=function(){var wt=Number(mt)>0;if(x||Dt.show){var Se=Dt.showFormatter?Dt.showFormatter({value:Ee,count:kt,maxLength:mt}):"".concat(kt).concat(wt?" / ".concat(mt):"");return de.createElement(de.Fragment,null,Dt.show&&de.createElement("span",{className:g()("".concat(N,"-show-count-suffix"),(0,se.Z)({},"".concat(N,"-show-count-has-suffix"),!!x),ye==null?void 0:ye.count),style:(0,m.Z)({},He==null?void 0:He.count)},Se),x)}return null};return de.createElement(G,(0,ce.Z)({},nt,{prefixCls:N,className:g()(te,A),handleReset:b,value:Ee,focused:jt,triggerFocus:We,suffix:U(),disabled:k,classes:Qe,classNames:ye,styles:He}),Oe())}),D=W,z=D},30292:function(fn,ct,_){"use strict";_.d(ct,{He:function(){return m},X3:function(){return ce},nH:function(){return j},rJ:function(){return ve}});function m(g){return!!(g.addonBefore||g.addonAfter)}function ce(g){return!!(g.prefix||g.suffix||g.allowClear)}function se(g,de,ae){var o=de.cloneNode(!0),G=Object.create(g,{target:{value:o},currentTarget:{value:o}});return o.value=ae,typeof de.selectionStart=="number"&&typeof de.selectionEnd=="number"&&(o.selectionStart=de.selectionStart,o.selectionEnd=de.selectionEnd),o.setSelectionRange=function(){de.setSelectionRange.apply(de,arguments)},G}function ve(g,de,ae,o){if(ae){var G=de;if(de.type==="click"){G=se(de,g,""),ae(G);return}if(g.type!=="file"&&o!==void 0){G=se(de,g,o),ae(G);return}ae(G)}}function j(g,de){if(g){g.focus(de);var ae=de||{},o=ae.cursor;if(o){var G=g.value.length;switch(o){case"start":g.setSelectionRange(0,0);break;case"end":g.setSelectionRange(G,G);break;default:g.setSelectionRange(0,G)}}}}},28321:function(fn,ct,_){"use strict";_.d(ct,{iz:function(){return An},ck:function(){return Ge},BW:function(){return It},sN:function(){return Ge},Wd:function(){return on},ZP:function(){return xt},Xl:function(){return ke}});var m=_(60499),ce=_(18642),se=_(85899),ve=_(77654),j=_(72190),g=_(42244),de=_(92310),ae=_.n(de),o=_(83836),G=_(18929),B=_(13697),E=_(48736),S=_(59301),C=_(4676),R=S.createContext(null);function ee(Ve,it){return Ve===void 0?null:"".concat(Ve,"-").concat(it)}function Q(Ve){var it=S.useContext(R);return ee(it,Ve)}var W=_(80547),D=["children","locked"],z=S.createContext(null);function F(Ve,it){var Tt=(0,se.Z)({},Ve);return Object.keys(it).forEach(function(ot){var dt=it[ot];dt!==void 0&&(Tt[ot]=dt)}),Tt}function $(Ve){var it=Ve.children,Tt=Ve.locked,ot=(0,g.Z)(Ve,D),dt=S.useContext(z),Ot=(0,W.Z)(function(){return F(dt,ot)},[dt,ot],function(Vt,Wt){return!Tt&&(Vt[0]!==Wt[0]||!(0,B.Z)(Vt[1],Wt[1],!0))});return S.createElement(z.Provider,{value:Ot},it)}var ue=[],pe=S.createContext(null);function oe(){return S.useContext(pe)}var xe=S.createContext(ue);function ke(Ve){var it=S.useContext(xe);return S.useMemo(function(){return Ve!==void 0?[].concat((0,ve.Z)(it),[Ve]):it},[it,Ve])}var De=S.createContext(null),Be=S.createContext({}),X=Be,N=_(29194);function k(Ve){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,N.Z)(Ve)){var Tt=Ve.nodeName.toLowerCase(),ot=["input","select","textarea","button"].includes(Tt)||Ve.isContentEditable||Tt==="a"&&!!Ve.getAttribute("href"),dt=Ve.getAttribute("tabindex"),Ot=Number(dt),Vt=null;return dt&&!Number.isNaN(Ot)?Vt=Ot:ot&&Vt===null&&(Vt=0),ot&&Ve.disabled&&(Vt=null),Vt!==null&&(Vt>=0||it&&Vt<0)}return!1}function q(Ve){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Tt=(0,ve.Z)(Ve.querySelectorAll("*")).filter(function(ot){return k(ot,it)});return k(Ve,it)&&Tt.unshift(Ve),Tt}var te=null;function Z(){te=document.activeElement}function x(){te=null}function w(){if(te)try{te.focus()}catch(Ve){}}function V(Ve,it){if(it.keyCode===9){var Tt=q(Ve),ot=Tt[it.shiftKey?0:Tt.length-1],dt=ot===document.activeElement||Ve===document.activeElement;if(dt){var Ot=Tt[it.shiftKey?Tt.length-1:0];Ot.focus(),it.preventDefault()}}}var fe=_(10228),$e=_(16089),Qe=fe.Z.LEFT,ye=fe.Z.RIGHT,He=fe.Z.UP,Ye=fe.Z.DOWN,tt=fe.Z.ENTER,nt=fe.Z.ESC,Bt=fe.Z.HOME,qe=fe.Z.END,jt=[He,Ye,Qe,ye];function Ue(Ve,it,Tt,ot){var dt,Ot="prev",Vt="next",Wt="children",dn="parent";if(Ve==="inline"&&ot===tt)return{inlineTrigger:!0};var un=(0,ce.Z)((0,ce.Z)({},He,Ot),Ye,Vt),xn=(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},Qe,Tt?Vt:Ot),ye,Tt?Ot:Vt),Ye,Wt),tt,Wt),vn=(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},He,Ot),Ye,Vt),tt,Wt),nt,dn),Qe,Tt?Wt:dn),ye,Tt?dn:Wt),ln={inline:un,horizontal:xn,vertical:vn,inlineSub:un,horizontalSub:vn,verticalSub:vn},en=(dt=ln["".concat(Ve).concat(it?"":"Sub")])===null||dt===void 0?void 0:dt[ot];switch(en){case Ot:return{offset:-1,sibling:!0};case Vt:return{offset:1,sibling:!0};case dn:return{offset:-1,sibling:!1};case Wt:return{offset:1,sibling:!1};default:return null}}function yt(Ve){for(var it=Ve;it;){if(it.getAttribute("data-menu-list"))return it;it=it.parentElement}return null}function Le(Ve,it){for(var Tt=Ve||document.activeElement;Tt;){if(it.has(Tt))return Tt;Tt=Tt.parentElement}return null}function Ce(Ve,it){var Tt=q(Ve,!0);return Tt.filter(function(ot){return it.has(ot)})}function he(Ve,it,Tt){var ot=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!Ve)return null;var dt=Ce(Ve,it),Ot=dt.length,Vt=dt.findIndex(function(Wt){return Tt===Wt});return ot<0?Vt===-1?Vt=Ot-1:Vt-=1:ot>0&&(Vt+=1),Vt=(Vt+Ot)%Ot,dt[Vt]}var We=function(it,Tt){var ot=new Set,dt=new Map,Ot=new Map;return it.forEach(function(Vt){var Wt=document.querySelector("[data-menu-id='".concat(ee(Tt,Vt),"']"));Wt&&(ot.add(Wt),Ot.set(Wt,Vt),dt.set(Vt,Wt))}),{elements:ot,key2element:dt,element2key:Ot}};function Re(Ve,it,Tt,ot,dt,Ot,Vt,Wt,dn,un){var xn=S.useRef(),vn=S.useRef();vn.current=it;var ln=function(){$e.Z.cancel(xn.current)};return S.useEffect(function(){return function(){ln()}},[]),function(en){var Tn=en.which;if([].concat(jt,[tt,nt,Bt,qe]).includes(Tn)){var En=Ot(),bn=We(En,ot),kn=bn,Hn=kn.elements,Nn=kn.key2element,jn=kn.element2key,Wn=Nn.get(it),nr=Le(Wn,Hn),$n=jn.get(nr),fr=Ue(Ve,Vt($n,!0).length===1,Tt,Tn);if(!fr&&Tn!==Bt&&Tn!==qe)return;(jt.includes(Tn)||[Bt,qe].includes(Tn))&&en.preventDefault();var gt=function(Fn){if(Fn){var sr=Fn,Kn=Fn.querySelector("a");Kn!=null&&Kn.getAttribute("href")&&(sr=Kn);var er=jn.get(Fn);Wt(er),ln(),xn.current=(0,$e.Z)(function(){vn.current===er&&sr.focus()})}};if([Bt,qe].includes(Tn)||fr.sibling||!nr){var Mn;!nr||Ve==="inline"?Mn=dt.current:Mn=yt(nr);var ir,xr=Ce(Mn,Hn);Tn===Bt?ir=xr[0]:Tn===qe?ir=xr[xr.length-1]:ir=he(Mn,Hn,nr,fr.offset),gt(ir)}else if(fr.inlineTrigger)dn($n);else if(fr.offset>0)dn($n,!0),ln(),xn.current=(0,$e.Z)(function(){bn=We(En,ot);var gn=nr.getAttribute("aria-controls"),Fn=document.getElementById(gn),sr=he(Fn,bn.elements);gt(sr)},5);else if(fr.offset<0){var _r=Vt($n,!0),br=_r[_r.length-2],Rn=Nn.get(br);dn(br,!1),gt(Rn)}}un==null||un(en)}}function Ie(Ve){Promise.resolve().then(Ve)}var M="__RC_UTIL_PATH_SPLIT__",me=function(it){return it.join(M)},Ee=function(it){return it.split(M)},Ke="rc-menu-more";function et(){var Ve=S.useState({}),it=(0,j.Z)(Ve,2),Tt=it[1],ot=(0,S.useRef)(new Map),dt=(0,S.useRef)(new Map),Ot=S.useState([]),Vt=(0,j.Z)(Ot,2),Wt=Vt[0],dn=Vt[1],un=(0,S.useRef)(0),xn=(0,S.useRef)(!1),vn=function(){xn.current||Tt({})},ln=(0,S.useCallback)(function(Nn,jn){var Wn=me(jn);dt.current.set(Wn,Nn),ot.current.set(Nn,Wn),un.current+=1;var nr=un.current;Ie(function(){nr===un.current&&vn()})},[]),en=(0,S.useCallback)(function(Nn,jn){var Wn=me(jn);dt.current.delete(Wn),ot.current.delete(Nn)},[]),Tn=(0,S.useCallback)(function(Nn){dn(Nn)},[]),En=(0,S.useCallback)(function(Nn,jn){var Wn=ot.current.get(Nn)||"",nr=Ee(Wn);return jn&&Wt.includes(nr[0])&&nr.unshift(Ke),nr},[Wt]),bn=(0,S.useCallback)(function(Nn,jn){return Nn.filter(function(Wn){return Wn!==void 0}).some(function(Wn){var nr=En(Wn,!0);return nr.includes(jn)})},[En]),kn=function(){var jn=(0,ve.Z)(ot.current.keys());return Wt.length&&jn.push(Ke),jn},Hn=(0,S.useCallback)(function(Nn){var jn="".concat(ot.current.get(Nn)).concat(M),Wn=new Set;return(0,ve.Z)(dt.current.keys()).forEach(function(nr){nr.startsWith(jn)&&Wn.add(dt.current.get(nr))}),Wn},[]);return S.useEffect(function(){return function(){xn.current=!0}},[]),{registerPath:ln,unregisterPath:en,refreshOverflowKeys:Tn,isSubPathKey:bn,getKeyPath:En,getKeys:kn,getSubPathKeys:Hn}}function ut(Ve){var it=S.useRef(Ve);it.current=Ve;var Tt=S.useCallback(function(){for(var ot,dt=arguments.length,Ot=new Array(dt),Vt=0;Vt<dt;Vt++)Ot[Vt]=arguments[Vt];return(ot=it.current)===null||ot===void 0?void 0:ot.call.apply(ot,[it].concat(Ot))},[]);return Ve?Tt:void 0}var St=Math.random().toFixed(5).toString().slice(2),Dt=0;function mt(Ve){var it=(0,G.Z)(Ve,{value:Ve}),Tt=(0,j.Z)(it,2),ot=Tt[0],dt=Tt[1];return S.useEffect(function(){Dt+=1;var Ot="".concat(St,"-").concat(Dt);dt("rc-menu-uuid-".concat(Ot))},[]),ot}var kt=_(38705),Ht=_(17212),zt=_(39153),Ut=_(55401),st=_(2738),Rt=_(8654);function Lt(Ve,it,Tt,ot){var dt=S.useContext(z),Ot=dt.activeKey,Vt=dt.onActive,Wt=dt.onInactive,dn={active:Ot===Ve};return it||(dn.onMouseEnter=function(un){Tt==null||Tt({key:Ve,domEvent:un}),Vt(Ve)},dn.onMouseLeave=function(un){ot==null||ot({key:Ve,domEvent:un}),Wt(Ve)}),dn}function _e(Ve){var it=S.useContext(z),Tt=it.mode,ot=it.rtl,dt=it.inlineIndent;if(Tt!=="inline")return null;var Ot=Ve;return ot?{paddingRight:Ot*dt}:{paddingLeft:Ot*dt}}function Ze(Ve){var it=Ve.icon,Tt=Ve.props,ot=Ve.children,dt;return it===null||it===!1?null:(typeof it=="function"?dt=S.createElement(it,(0,se.Z)({},Tt)):typeof it!="boolean"&&(dt=it),dt||ot||null)}var b=["item"];function A(Ve){var it=Ve.item,Tt=(0,g.Z)(Ve,b);return Object.defineProperty(Tt,"item",{get:function(){return(0,E.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),it}}),Tt}var Oe=["title","attribute","elementRef"],U=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],le=["active"],wt=function(Ve){(0,zt.Z)(Tt,Ve);var it=(0,Ut.Z)(Tt);function Tt(){return(0,kt.Z)(this,Tt),it.apply(this,arguments)}return(0,Ht.Z)(Tt,[{key:"render",value:function(){var dt=this.props,Ot=dt.title,Vt=dt.attribute,Wt=dt.elementRef,dn=(0,g.Z)(dt,Oe),un=(0,st.Z)(dn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,E.ZP)(!Vt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),S.createElement(o.Z.Item,(0,m.Z)({},Vt,{title:typeof Ot=="string"?Ot:void 0},un,{ref:Wt}))}}]),Tt}(S.Component),Se=S.forwardRef(function(Ve,it){var Tt=Ve.style,ot=Ve.className,dt=Ve.eventKey,Ot=Ve.warnKey,Vt=Ve.disabled,Wt=Ve.itemIcon,dn=Ve.children,un=Ve.role,xn=Ve.onMouseEnter,vn=Ve.onMouseLeave,ln=Ve.onClick,en=Ve.onKeyDown,Tn=Ve.onFocus,En=(0,g.Z)(Ve,U),bn=Q(dt),kn=S.useContext(z),Hn=kn.prefixCls,Nn=kn.onItemClick,jn=kn.disabled,Wn=kn.overflowDisabled,nr=kn.itemIcon,$n=kn.selectedKeys,fr=kn.onActive,gt=S.useContext(X),Mn=gt._internalRenderMenuItem,ir="".concat(Hn,"-item"),xr=S.useRef(),_r=S.useRef(),br=jn||Vt,Rn=(0,Rt.x1)(it,_r),gn=ke(dt),Fn=function(kr){return{key:dt,keyPath:(0,ve.Z)(gn).reverse(),item:xr.current,domEvent:kr}},sr=Wt||nr,Kn=Lt(dt,br,xn,vn),er=Kn.active,Pr=(0,g.Z)(Kn,le),Dr=$n.includes(dt),Er=_e(gn.length),_n=function(kr){if(!br){var Zr=Fn(kr);ln==null||ln(A(Zr)),Nn(Zr)}},Gn=function(kr){if(en==null||en(kr),kr.which===fe.Z.ENTER){var Zr=Fn(kr);ln==null||ln(A(Zr)),Nn(Zr)}},qn=function(kr){fr(dt),Tn==null||Tn(kr)},wr={};Ve.role==="option"&&(wr["aria-selected"]=Dr);var qr=S.createElement(wt,(0,m.Z)({ref:xr,elementRef:Rn,role:un===null?"none":un||"menuitem",tabIndex:Vt?null:-1,"data-menu-id":Wn&&bn?null:bn},(0,st.Z)(En,["extra"]),Pr,wr,{component:"li","aria-disabled":Vt,style:(0,se.Z)((0,se.Z)({},Er),Tt),className:ae()(ir,(0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(ir,"-active"),er),"".concat(ir,"-selected"),Dr),"".concat(ir,"-disabled"),br),ot),onClick:_n,onKeyDown:Gn,onFocus:qn}),dn,S.createElement(Ze,{props:(0,se.Z)((0,se.Z)({},Ve),{},{isSelected:Dr}),icon:sr}));return Mn&&(qr=Mn(qr,Ve,{selected:Dr})),qr});function je(Ve,it){var Tt=Ve.eventKey,ot=oe(),dt=ke(Tt);return S.useEffect(function(){if(ot)return ot.registerPath(Tt,dt),function(){ot.unregisterPath(Tt,dt)}},[dt]),ot?null:S.createElement(Se,(0,m.Z)({},Ve,{ref:it}))}var Ge=S.forwardRef(je),Y=["className","children"],ne=function(it,Tt){var ot=it.className,dt=it.children,Ot=(0,g.Z)(it,Y),Vt=S.useContext(z),Wt=Vt.prefixCls,dn=Vt.mode,un=Vt.rtl;return S.createElement("ul",(0,m.Z)({className:ae()(Wt,un&&"".concat(Wt,"-rtl"),"".concat(Wt,"-sub"),"".concat(Wt,"-").concat(dn==="inline"?"inline":"vertical"),ot),role:"menu"},Ot,{"data-menu-list":!0,ref:Tt}),dt)},be=S.forwardRef(ne);be.displayName="SubMenuList";var Pe=be,P=_(11592);function Je(Ve,it){return(0,P.Z)(Ve).map(function(Tt,ot){if(S.isValidElement(Tt)){var dt,Ot,Vt=Tt.key,Wt=(dt=(Ot=Tt.props)===null||Ot===void 0?void 0:Ot.eventKey)!==null&&dt!==void 0?dt:Vt,dn=Wt==null;dn&&(Wt="tmp_key-".concat([].concat((0,ve.Z)(it),[ot]).join("-")));var un={key:Wt,eventKey:Wt};return S.cloneElement(Tt,un)}return Tt})}var J=_(68196),rt={adjustX:1,adjustY:1},Gt={topLeft:{points:["bl","tl"],overflow:rt},topRight:{points:["br","tr"],overflow:rt},bottomLeft:{points:["tl","bl"],overflow:rt},bottomRight:{points:["tr","br"],overflow:rt},leftTop:{points:["tr","tl"],overflow:rt},leftBottom:{points:["br","bl"],overflow:rt},rightTop:{points:["tl","tr"],overflow:rt},rightBottom:{points:["bl","br"],overflow:rt}},Xt={topLeft:{points:["bl","tl"],overflow:rt},topRight:{points:["br","tr"],overflow:rt},bottomLeft:{points:["tl","bl"],overflow:rt},bottomRight:{points:["tr","br"],overflow:rt},rightTop:{points:["tr","tl"],overflow:rt},rightBottom:{points:["br","bl"],overflow:rt},leftTop:{points:["tl","tr"],overflow:rt},leftBottom:{points:["bl","br"],overflow:rt}},Jt=null;function an(Ve,it,Tt){if(it)return it;if(Tt)return Tt[Ve]||Tt.other}var rn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Sn(Ve){var it=Ve.prefixCls,Tt=Ve.visible,ot=Ve.children,dt=Ve.popup,Ot=Ve.popupStyle,Vt=Ve.popupClassName,Wt=Ve.popupOffset,dn=Ve.disabled,un=Ve.mode,xn=Ve.onVisibleChange,vn=S.useContext(z),ln=vn.getPopupContainer,en=vn.rtl,Tn=vn.subMenuOpenDelay,En=vn.subMenuCloseDelay,bn=vn.builtinPlacements,kn=vn.triggerSubMenuAction,Hn=vn.forceSubMenuRender,Nn=vn.rootClassName,jn=vn.motion,Wn=vn.defaultMotions,nr=S.useState(!1),$n=(0,j.Z)(nr,2),fr=$n[0],gt=$n[1],Mn=en?(0,se.Z)((0,se.Z)({},Xt),bn):(0,se.Z)((0,se.Z)({},Gt),bn),ir=rn[un],xr=an(un,jn,Wn),_r=S.useRef(xr);un!=="inline"&&(_r.current=xr);var br=(0,se.Z)((0,se.Z)({},_r.current),{},{leavedClassName:"".concat(it,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Rn=S.useRef();return S.useEffect(function(){return Rn.current=(0,$e.Z)(function(){gt(Tt)}),function(){$e.Z.cancel(Rn.current)}},[Tt]),S.createElement(J.Z,{prefixCls:it,popupClassName:ae()("".concat(it,"-popup"),(0,ce.Z)({},"".concat(it,"-rtl"),en),Vt,Nn),stretch:un==="horizontal"?"minWidth":null,getPopupContainer:ln,builtinPlacements:Mn,popupPlacement:ir,popupVisible:fr,popup:dt,popupStyle:Ot,popupAlign:Wt&&{offset:Wt},action:dn?[]:[kn],mouseEnterDelay:Tn,mouseLeaveDelay:En,onPopupVisibleChange:xn,forceRender:Hn,popupMotion:br,fresh:!0},ot)}var On=_(77900);function pn(Ve){var it=Ve.id,Tt=Ve.open,ot=Ve.keyPath,dt=Ve.children,Ot="inline",Vt=S.useContext(z),Wt=Vt.prefixCls,dn=Vt.forceSubMenuRender,un=Vt.motion,xn=Vt.defaultMotions,vn=Vt.mode,ln=S.useRef(!1);ln.current=vn===Ot;var en=S.useState(!ln.current),Tn=(0,j.Z)(en,2),En=Tn[0],bn=Tn[1],kn=ln.current?Tt:!1;S.useEffect(function(){ln.current&&bn(!1)},[vn]);var Hn=(0,se.Z)({},an(Ot,un,xn));ot.length>1&&(Hn.motionAppear=!1);var Nn=Hn.onVisibleChanged;return Hn.onVisibleChanged=function(jn){return!ln.current&&!jn&&bn(!0),Nn==null?void 0:Nn(jn)},En?null:S.createElement($,{mode:Ot,locked:!ln.current},S.createElement(On.default,(0,m.Z)({visible:kn},Hn,{forceRender:dn,removeOnLeave:!1,leavedClassName:"".concat(Wt,"-hidden")}),function(jn){var Wn=jn.className,nr=jn.style;return S.createElement(Pe,{id:it,className:Wn,style:nr},dt)}))}var Pn=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],tn=["active"],$t=S.forwardRef(function(Ve,it){var Tt=Ve.style,ot=Ve.className,dt=Ve.title,Ot=Ve.eventKey,Vt=Ve.warnKey,Wt=Ve.disabled,dn=Ve.internalPopupClose,un=Ve.children,xn=Ve.itemIcon,vn=Ve.expandIcon,ln=Ve.popupClassName,en=Ve.popupOffset,Tn=Ve.popupStyle,En=Ve.onClick,bn=Ve.onMouseEnter,kn=Ve.onMouseLeave,Hn=Ve.onTitleClick,Nn=Ve.onTitleMouseEnter,jn=Ve.onTitleMouseLeave,Wn=(0,g.Z)(Ve,Pn),nr=Q(Ot),$n=S.useContext(z),fr=$n.prefixCls,gt=$n.mode,Mn=$n.openKeys,ir=$n.disabled,xr=$n.overflowDisabled,_r=$n.activeKey,br=$n.selectedKeys,Rn=$n.itemIcon,gn=$n.expandIcon,Fn=$n.onItemClick,sr=$n.onOpenChange,Kn=$n.onActive,er=S.useContext(X),Pr=er._internalRenderSubMenuItem,Dr=S.useContext(De),Er=Dr.isSubPathKey,_n=ke(),Gn="".concat(fr,"-submenu"),qn=ir||Wt,wr=S.useRef(),qr=S.useRef(),Yr=xn!=null?xn:Rn,kr=vn!=null?vn:gn,Zr=Mn.includes(Ot),Sr=!xr&&Zr,ei=Er(br,Ot),$r=Lt(Ot,qn,Nn,jn),jr=$r.active,ai=(0,g.Z)($r,tn),oi=S.useState(!1),cr=(0,j.Z)(oi,2),ci=cr[0],di=cr[1],ti=function(li){qn||di(li)},Hr=function(li){ti(!0),bn==null||bn({key:Ot,domEvent:li})},rr=function(li){ti(!1),kn==null||kn({key:Ot,domEvent:li})},Ei=S.useMemo(function(){return jr||(gt!=="inline"?ci||Er([_r],Ot):!1)},[gt,jr,_r,ci,Ot,Er]),mn=_e(_n.length),Xn=function(li){qn||(Hn==null||Hn({key:Ot,domEvent:li}),gt==="inline"&&sr(Ot,!Zr))},vr=ut(function(Kr){En==null||En(A(Kr)),Fn(Kr)}),Cr=function(li){gt!=="inline"&&sr(Ot,li)},ur=function(){Kn(Ot)},pr=nr&&"".concat(nr,"-popup"),Bn=S.useMemo(function(){return S.createElement(Ze,{icon:gt!=="horizontal"?kr:void 0,props:(0,se.Z)((0,se.Z)({},Ve),{},{isOpen:Sr,isSubMenu:!0})},S.createElement("i",{className:"".concat(Gn,"-arrow")}))},[gt,kr,Ve,Sr,Gn]),Fr=S.createElement("div",(0,m.Z)({role:"menuitem",style:mn,className:"".concat(Gn,"-title"),tabIndex:qn?null:-1,ref:wr,title:typeof dt=="string"?dt:null,"data-menu-id":xr&&nr?null:nr,"aria-expanded":Sr,"aria-haspopup":!0,"aria-controls":pr,"aria-disabled":qn,onClick:Xn,onFocus:ur},ai),dt,Bn),Jr=S.useRef(gt);if(gt!=="inline"&&_n.length>1?Jr.current="vertical":Jr.current=gt,!xr){var ni=Jr.current;Fr=S.createElement(Sn,{mode:ni,prefixCls:Gn,visible:!dn&&Sr&>!=="inline",popupClassName:ln,popupOffset:en,popupStyle:Tn,popup:S.createElement($,{mode:ni==="horizontal"?"vertical":ni},S.createElement(Pe,{id:pr,ref:qr},un)),disabled:qn,onVisibleChange:Cr},Fr)}var Xr=S.createElement(o.Z.Item,(0,m.Z)({ref:it,role:"none"},Wn,{component:"li",style:Tt,className:ae()(Gn,"".concat(Gn,"-").concat(gt),ot,(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(Gn,"-open"),Sr),"".concat(Gn,"-active"),Ei),"".concat(Gn,"-selected"),ei),"".concat(Gn,"-disabled"),qn)),onMouseEnter:Hr,onMouseLeave:rr}),Fr,!xr&&S.createElement(pn,{id:pr,open:Sr,keyPath:_n},un));return Pr&&(Xr=Pr(Xr,Ve,{selected:ei,active:Ei,open:Sr,disabled:qn})),S.createElement($,{onItemClick:vr,mode:gt==="horizontal"?"vertical":gt,itemIcon:Yr,expandIcon:kr},Xr)}),Nt=S.forwardRef(function(Ve,it){var Tt=Ve.eventKey,ot=Ve.children,dt=ke(Tt),Ot=Je(ot,dt),Vt=oe();S.useEffect(function(){if(Vt)return Vt.registerPath(Tt,dt),function(){Vt.unregisterPath(Tt,dt)}},[dt]);var Wt;return Vt?Wt=Ot:Wt=S.createElement($t,(0,m.Z)({ref:it},Ve),Ot),S.createElement(xe.Provider,{value:dt},Wt)}),on=Nt,nn=_(43749);function An(Ve){var it=Ve.className,Tt=Ve.style,ot=S.useContext(z),dt=ot.prefixCls,Ot=oe();return Ot?null:S.createElement("li",{role:"separator",className:ae()("".concat(dt,"-item-divider"),it),style:Tt})}var or=["className","title","eventKey","children"],Ne=S.forwardRef(function(Ve,it){var Tt=Ve.className,ot=Ve.title,dt=Ve.eventKey,Ot=Ve.children,Vt=(0,g.Z)(Ve,or),Wt=S.useContext(z),dn=Wt.prefixCls,un="".concat(dn,"-item-group");return S.createElement("li",(0,m.Z)({ref:it,role:"presentation"},Vt,{onClick:function(vn){return vn.stopPropagation()},className:ae()(un,Tt)}),S.createElement("div",{role:"presentation",className:"".concat(un,"-title"),title:typeof ot=="string"?ot:void 0},ot),S.createElement("ul",{role:"group",className:"".concat(un,"-list")},Ot))}),pt=S.forwardRef(function(Ve,it){var Tt=Ve.eventKey,ot=Ve.children,dt=ke(Tt),Ot=Je(ot,dt),Vt=oe();return Vt?Ot:S.createElement(Ne,(0,m.Z)({ref:it},(0,st.Z)(Ve,["warnKey"])),Ot)}),It=pt,ht=["label","children","key","type","extra"];function we(Ve,it,Tt){var ot=it.item,dt=it.group,Ot=it.submenu,Vt=it.divider;return(Ve||[]).map(function(Wt,dn){if(Wt&&(0,nn.Z)(Wt)==="object"){var un=Wt,xn=un.label,vn=un.children,ln=un.key,en=un.type,Tn=un.extra,En=(0,g.Z)(un,ht),bn=ln!=null?ln:"tmp-".concat(dn);return vn||en==="group"?en==="group"?S.createElement(dt,(0,m.Z)({key:bn},En,{title:xn}),we(vn,it,Tt)):S.createElement(Ot,(0,m.Z)({key:bn},En,{title:xn}),we(vn,it,Tt)):en==="divider"?S.createElement(Vt,(0,m.Z)({key:bn},En)):S.createElement(ot,(0,m.Z)({key:bn},En,{extra:Tn}),xn,(!!Tn||Tn===0)&&S.createElement("span",{className:"".concat(Tt,"-item-extra")},Tn))}return null}).filter(function(Wt){return Wt})}function at(Ve,it,Tt,ot,dt){var Ot=Ve,Vt=(0,se.Z)({divider:An,item:Ge,group:It,submenu:on},ot);return it&&(Ot=we(it,Vt,dt)),Je(Ot,Tt)}var vt=["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"],Ct=[],Et=S.forwardRef(function(Ve,it){var Tt,ot=Ve,dt=ot.prefixCls,Ot=dt===void 0?"rc-menu":dt,Vt=ot.rootClassName,Wt=ot.style,dn=ot.className,un=ot.tabIndex,xn=un===void 0?0:un,vn=ot.items,ln=ot.children,en=ot.direction,Tn=ot.id,En=ot.mode,bn=En===void 0?"vertical":En,kn=ot.inlineCollapsed,Hn=ot.disabled,Nn=ot.disabledOverflow,jn=ot.subMenuOpenDelay,Wn=jn===void 0?.1:jn,nr=ot.subMenuCloseDelay,$n=nr===void 0?.1:nr,fr=ot.forceSubMenuRender,gt=ot.defaultOpenKeys,Mn=ot.openKeys,ir=ot.activeKey,xr=ot.defaultActiveFirst,_r=ot.selectable,br=_r===void 0?!0:_r,Rn=ot.multiple,gn=Rn===void 0?!1:Rn,Fn=ot.defaultSelectedKeys,sr=ot.selectedKeys,Kn=ot.onSelect,er=ot.onDeselect,Pr=ot.inlineIndent,Dr=Pr===void 0?24:Pr,Er=ot.motion,_n=ot.defaultMotions,Gn=ot.triggerSubMenuAction,qn=Gn===void 0?"hover":Gn,wr=ot.builtinPlacements,qr=ot.itemIcon,Yr=ot.expandIcon,kr=ot.overflowedIndicator,Zr=kr===void 0?"...":kr,Sr=ot.overflowedIndicatorPopupClassName,ei=ot.getPopupContainer,$r=ot.onClick,jr=ot.onOpenChange,ai=ot.onKeyDown,oi=ot.openAnimation,cr=ot.openTransitionName,ci=ot._internalRenderMenuItem,di=ot._internalRenderSubMenuItem,ti=ot._internalComponents,Hr=(0,g.Z)(ot,vt),rr=S.useMemo(function(){return[at(ln,vn,Ct,ti,Ot),at(ln,vn,Ct,{},Ot)]},[ln,vn,ti]),Ei=(0,j.Z)(rr,2),mn=Ei[0],Xn=Ei[1],vr=S.useState(!1),Cr=(0,j.Z)(vr,2),ur=Cr[0],pr=Cr[1],Bn=S.useRef(),Fr=mt(Tn),Jr=en==="rtl",ni=(0,G.Z)(gt,{value:Mn,postState:function(Or){return Or||Ct}}),Xr=(0,j.Z)(ni,2),Kr=Xr[0],li=Xr[1],ui=function(Or){var Ur=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function hi(){li(Or),jr==null||jr(Or)}Ur?(0,C.flushSync)(hi):hi()},Ti=S.useState(Kr),vi=(0,j.Z)(Ti,2),Hi=vi[0],Xi=vi[1],Mi=S.useRef(!1),yi=S.useMemo(function(){return(bn==="inline"||bn==="vertical")&&kn?["vertical",kn]:[bn,!1]},[bn,kn]),Un=(0,j.Z)(yi,2),lr=Un[0],Ir=Un[1],dr=lr==="inline",gr=S.useState(lr),Ci=(0,j.Z)(gr,2),ri=Ci[0],Oi=Ci[1],Ki=S.useState(Ir),na=(0,j.Z)(Ki,2),Ea=na[0],ra=na[1];S.useEffect(function(){Oi(lr),ra(Ir),Mi.current&&(dr?li(Hi):ui(Ct))},[lr,Ir]);var Fi=S.useState(0),Di=(0,j.Z)(Fi,2),Si=Di[0],Bs=Di[1],is=Si>=mn.length-1||ri!=="horizontal"||Nn;S.useEffect(function(){dr&&Xi(Kr)},[Kr]),S.useEffect(function(){return Mi.current=!0,function(){Mi.current=!1}},[]);var Bi=et(),Ns=Bi.registerPath,_s=Bi.unregisterPath,Sa=Bi.refreshOverflowKeys,hs=Bi.isSubPathKey,bs=Bi.getKeyPath,Ii=Bi.getKeys,ia=Bi.getSubPathKeys,wa=S.useMemo(function(){return{registerPath:Ns,unregisterPath:_s}},[Ns,_s]),$s=S.useMemo(function(){return{isSubPathKey:hs}},[hs]);S.useEffect(function(){Sa(is?Ct:mn.slice(Si+1).map(function(Lr){return Lr.key}))},[Si,is]);var sa=(0,G.Z)(ir||xr&&((Tt=mn[0])===null||Tt===void 0?void 0:Tt.key),{value:ir}),xs=(0,j.Z)(sa,2),Qi=xs[0],Us=xs[1],Pi=ut(function(Lr){Us(Lr)}),zs=ut(function(){Us(void 0)});(0,S.useImperativeHandle)(it,function(){return{list:Bn.current,focus:function(Or){var Ur,hi=Ii(),fi=We(hi,Fr),ms=fi.elements,ps=fi.key2element,Ji=fi.element2key,Hs=Ce(Bn.current,ms),ws=Qi!=null?Qi:Hs[0]?Ji.get(Hs[0]):(Ur=mn.find(function(Ts){return!Ts.props.disabled}))===null||Ur===void 0?void 0:Ur.key,es=ps.get(ws);if(ws&&es){var As;es==null||(As=es.focus)===null||As===void 0||As.call(es,Or)}}}});var aa=(0,G.Z)(Fn||[],{value:sr,postState:function(Or){return Array.isArray(Or)?Or:Or==null?Ct:[Or]}}),_i=(0,j.Z)(aa,2),ss=_i[0],fs=_i[1],Es=function(Or){if(br){var Ur=Or.key,hi=ss.includes(Ur),fi;gn?hi?fi=ss.filter(function(ps){return ps!==Ur}):fi=[].concat((0,ve.Z)(ss),[Ur]):fi=[Ur],fs(fi);var ms=(0,se.Z)((0,se.Z)({},Or),{},{selectedKeys:fi});hi?er==null||er(ms):Kn==null||Kn(ms)}!gn&&Kr.length&&ri!=="inline"&&ui(Ct)},oa=ut(function(Lr){$r==null||$r(A(Lr)),Es(Lr)}),Ni=ut(function(Lr,Or){var Ur=Kr.filter(function(fi){return fi!==Lr});if(Or)Ur.push(Lr);else if(ri!=="inline"){var hi=ia(Lr);Ur=Ur.filter(function(fi){return!hi.has(fi)})}(0,B.Z)(Kr,Ur,!0)||ui(Ur,!0)}),la=function(Or,Ur){var hi=Ur!=null?Ur:!Kr.includes(Or);Ni(Or,hi)},qi=Re(ri,Qi,Jr,Fr,Bn,Ii,bs,Us,la,ai);S.useEffect(function(){pr(!0)},[]);var Ss=S.useMemo(function(){return{_internalRenderMenuItem:ci,_internalRenderSubMenuItem:di}},[ci,di]),$i=ri!=="horizontal"||Nn?mn:mn.map(function(Lr,Or){return S.createElement($,{key:Lr.key,overflowDisabled:Or>Si},Lr)}),js=S.createElement(o.Z,(0,m.Z)({id:Tn,ref:Bn,prefixCls:"".concat(Ot,"-overflow"),component:"ul",itemComponent:Ge,className:ae()(Ot,"".concat(Ot,"-root"),"".concat(Ot,"-").concat(ri),dn,(0,ce.Z)((0,ce.Z)({},"".concat(Ot,"-inline-collapsed"),Ea),"".concat(Ot,"-rtl"),Jr),Vt),dir:en,style:Wt,role:"menu",tabIndex:xn,data:$i,renderRawItem:function(Or){return Or},renderRawRest:function(Or){var Ur=Or.length,hi=Ur?mn.slice(-Ur):null;return S.createElement(on,{eventKey:Ke,title:Zr,disabled:is,internalPopupClose:Ur===0,popupClassName:Sr},hi)},maxCount:ri!=="horizontal"||Nn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Or){Bs(Or)},onKeyDown:qi},Hr));return S.createElement(X.Provider,{value:Ss},S.createElement(R.Provider,{value:Fr},S.createElement($,{prefixCls:Ot,rootClassName:Vt,mode:ri,openKeys:Kr,rtl:Jr,disabled:Hn,motion:ur?Er:null,defaultMotions:ur?_n:null,activeKey:Qi,onActive:Pi,onInactive:zs,selectedKeys:ss,inlineIndent:Dr,subMenuOpenDelay:Wn,subMenuCloseDelay:$n,forceSubMenuRender:fr,builtinPlacements:wr,triggerSubMenuAction:qn,getPopupContainer:ei,itemIcon:qr,expandIcon:Yr,onItemClick:oa,onOpenChange:Ni},S.createElement(De.Provider,{value:$s},js),S.createElement("div",{style:{display:"none"},"aria-hidden":!0},S.createElement(pe.Provider,{value:wa},Xn)))))}),Pt=Et,Kt=Pt;Kt.Item=Ge,Kt.SubMenu=on,Kt.ItemGroup=It,Kt.Divider=An;var xt=Kt},83836:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return Z}});var m=_(60499),ce=_(85899),se=_(72190),ve=_(42244),j=_(59301),g=_(92310),de=_.n(g),ae=_(29301),o=_(34280),G=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],B=void 0;function E(x,w){var V=x.prefixCls,fe=x.invalidate,$e=x.item,Qe=x.renderItem,ye=x.responsive,He=x.responsiveDisabled,Ye=x.registerSize,tt=x.itemKey,nt=x.className,Bt=x.style,qe=x.children,jt=x.display,Ue=x.order,yt=x.component,Le=yt===void 0?"div":yt,Ce=(0,ve.Z)(x,G),he=ye&&!jt;function We(Ee){Ye(tt,Ee)}j.useEffect(function(){return function(){We(null)}},[]);var Re=Qe&&$e!==B?Qe($e,{index:Ue}):qe,Ie;fe||(Ie={opacity:he?0:1,height:he?0:B,overflowY:he?"hidden":B,order:ye?Ue:B,pointerEvents:he?"none":B,position:he?"absolute":B});var M={};he&&(M["aria-hidden"]=!0);var me=j.createElement(Le,(0,m.Z)({className:de()(!fe&&V,nt),style:(0,ce.Z)((0,ce.Z)({},Ie),Bt)},M,Ce,{ref:w}),Re);return ye&&(me=j.createElement(ae.Z,{onResize:function(Ke){var et=Ke.offsetWidth;We(et)},disabled:He},me)),me}var S=j.forwardRef(E);S.displayName="Item";var C=S,R=_(6089),ee=_(4676),Q=_(16089);function W(x){if(typeof MessageChannel=="undefined")(0,Q.Z)(x);else{var w=new MessageChannel;w.port1.onmessage=function(){return x()},w.port2.postMessage(void 0)}}function D(){var x=j.useRef(null),w=function(fe){x.current||(x.current=[],W(function(){(0,ee.unstable_batchedUpdates)(function(){x.current.forEach(function($e){$e()}),x.current=null})})),x.current.push(fe)};return w}function z(x,w){var V=j.useState(w),fe=(0,se.Z)(V,2),$e=fe[0],Qe=fe[1],ye=(0,R.Z)(function(He){x(function(){Qe(He)})});return[$e,ye]}var F=j.createContext(null),$=["component"],ue=["className"],pe=["className"],oe=function(w,V){var fe=j.useContext(F);if(!fe){var $e=w.component,Qe=$e===void 0?"div":$e,ye=(0,ve.Z)(w,$);return j.createElement(Qe,(0,m.Z)({},ye,{ref:V}))}var He=fe.className,Ye=(0,ve.Z)(fe,ue),tt=w.className,nt=(0,ve.Z)(w,pe);return j.createElement(F.Provider,{value:null},j.createElement(C,(0,m.Z)({ref:V,className:de()(He,tt)},Ye,nt)))},xe=j.forwardRef(oe);xe.displayName="RawItem";var ke=xe,De=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],Be="responsive",X="invalidate";function N(x){return"+ ".concat(x.length," ...")}function k(x,w){var V=x.prefixCls,fe=V===void 0?"rc-overflow":V,$e=x.data,Qe=$e===void 0?[]:$e,ye=x.renderItem,He=x.renderRawItem,Ye=x.itemKey,tt=x.itemWidth,nt=tt===void 0?10:tt,Bt=x.ssr,qe=x.style,jt=x.className,Ue=x.maxCount,yt=x.renderRest,Le=x.renderRawRest,Ce=x.prefix,he=x.suffix,We=x.component,Re=We===void 0?"div":We,Ie=x.itemComponent,M=x.onVisibleChange,me=(0,ve.Z)(x,De),Ee=Bt==="full",Ke=D(),et=z(Ke,null),ut=(0,se.Z)(et,2),St=ut[0],Dt=ut[1],mt=St||0,kt=z(Ke,new Map),Ht=(0,se.Z)(kt,2),zt=Ht[0],Ut=Ht[1],st=z(Ke,0),Rt=(0,se.Z)(st,2),Lt=Rt[0],_e=Rt[1],Ze=z(Ke,0),b=(0,se.Z)(Ze,2),A=b[0],Oe=b[1],U=z(Ke,0),le=(0,se.Z)(U,2),wt=le[0],Se=le[1],je=z(Ke,0),Ge=(0,se.Z)(je,2),Y=Ge[0],ne=Ge[1],be=(0,j.useState)(null),Pe=(0,se.Z)(be,2),P=Pe[0],Je=Pe[1],J=(0,j.useState)(null),rt=(0,se.Z)(J,2),Gt=rt[0],Xt=rt[1],Jt=j.useMemo(function(){return Gt===null&&Ee?Number.MAX_SAFE_INTEGER:Gt||0},[Gt,St]),an=(0,j.useState)(!1),rn=(0,se.Z)(an,2),Sn=rn[0],On=rn[1],pn="".concat(fe,"-item"),Pn=Math.max(Lt,A),tn=Ue===Be,$t=Qe.length&&tn,Nt=Ue===X,on=$t||typeof Ue=="number"&&Qe.length>Ue,nn=(0,j.useMemo)(function(){var dt=Qe;return $t?St===null&&Ee?dt=Qe:dt=Qe.slice(0,Math.min(Qe.length,mt/nt)):typeof Ue=="number"&&(dt=Qe.slice(0,Ue)),dt},[Qe,nt,St,Ue,$t]),An=(0,j.useMemo)(function(){return $t?Qe.slice(Jt+1):Qe.slice(nn.length)},[Qe,nn,$t,Jt]),or=(0,j.useCallback)(function(dt,Ot){var Vt;return typeof Ye=="function"?Ye(dt):(Vt=Ye&&(dt==null?void 0:dt[Ye]))!==null&&Vt!==void 0?Vt:Ot},[Ye]),Ne=(0,j.useCallback)(ye||function(dt){return dt},[ye]);function pt(dt,Ot,Vt){Gt===dt&&(Ot===void 0||Ot===P)||(Xt(dt),Vt||(On(dt<Qe.length-1),M==null||M(dt)),Ot!==void 0&&Je(Ot))}function It(dt,Ot){Dt(Ot.clientWidth)}function ht(dt,Ot){Ut(function(Vt){var Wt=new Map(Vt);return Ot===null?Wt.delete(dt):Wt.set(dt,Ot),Wt})}function we(dt,Ot){Oe(Ot),_e(A)}function at(dt,Ot){Se(Ot)}function vt(dt,Ot){ne(Ot)}function Ct(dt){return zt.get(or(nn[dt],dt))}(0,o.Z)(function(){if(mt&&typeof Pn=="number"&&nn){var dt=wt+Y,Ot=nn.length,Vt=Ot-1;if(!Ot){pt(0,null);return}for(var Wt=0;Wt<Ot;Wt+=1){var dn=Ct(Wt);if(Ee&&(dn=dn||0),dn===void 0){pt(Wt-1,void 0,!0);break}if(dt+=dn,Vt===0&&dt<=mt||Wt===Vt-1&&dt+Ct(Vt)<=mt){pt(Vt,null);break}else if(dt+Pn>mt){pt(Wt-1,dt-dn-Y+A);break}}he&&Ct(0)+Y>mt&&Je(null)}},[mt,zt,A,wt,Y,or,nn]);var Et=Sn&&!!An.length,Pt={};P!==null&&$t&&(Pt={position:"absolute",left:P,top:0});var Kt={prefixCls:pn,responsive:$t,component:Ie,invalidate:Nt},xt=He?function(dt,Ot){var Vt=or(dt,Ot);return j.createElement(F.Provider,{key:Vt,value:(0,ce.Z)((0,ce.Z)({},Kt),{},{order:Ot,item:dt,itemKey:Vt,registerSize:ht,display:Ot<=Jt})},He(dt,Ot))}:function(dt,Ot){var Vt=or(dt,Ot);return j.createElement(C,(0,m.Z)({},Kt,{order:Ot,key:Vt,item:dt,renderItem:Ne,itemKey:Vt,registerSize:ht,display:Ot<=Jt}))},Ve={order:Et?Jt:Number.MAX_SAFE_INTEGER,className:"".concat(pn,"-rest"),registerSize:we,display:Et},it=yt||N,Tt=Le?j.createElement(F.Provider,{value:(0,ce.Z)((0,ce.Z)({},Kt),Ve)},Le(An)):j.createElement(C,(0,m.Z)({},Kt,Ve),typeof it=="function"?it(An):it),ot=j.createElement(Re,(0,m.Z)({className:de()(!Nt&&fe,jt),style:qe,ref:w},me),Ce&&j.createElement(C,(0,m.Z)({},Kt,{responsive:tn,responsiveDisabled:!$t,order:-1,className:"".concat(pn,"-prefix"),registerSize:at,display:!0}),Ce),nn.map(xt),on?Tt:null,he&&j.createElement(C,(0,m.Z)({},Kt,{responsive:tn,responsiveDisabled:!$t,order:Jt,className:"".concat(pn,"-suffix"),registerSize:vt,display:!0,style:Pt}),he));return tn?j.createElement(ae.Z,{onResize:It,disabled:!$t},ot):ot}var q=j.forwardRef(k);q.displayName="Overflow",q.Item=ke,q.RESPONSIVE=Be,q.INVALIDATE=X;var te=q,Z=te},29301:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return X}});var m=_(60499),ce=_(59301),se=_(11592),ve=_(48736),j=_(85899),g=_(43749),de=_(76846),ae=_(8654),o=ce.createContext(null);function G(N){var k=N.children,q=N.onBatchResize,te=ce.useRef(0),Z=ce.useRef([]),x=ce.useContext(o),w=ce.useCallback(function(V,fe,$e){te.current+=1;var Qe=te.current;Z.current.push({size:V,element:fe,data:$e}),Promise.resolve().then(function(){Qe===te.current&&(q==null||q(Z.current),Z.current=[])}),x==null||x(V,fe,$e)},[q,x]);return ce.createElement(o.Provider,{value:w},k)}var B=_(76374),E=new Map;function S(N){N.forEach(function(k){var q,te=k.target;(q=E.get(te))===null||q===void 0||q.forEach(function(Z){return Z(te)})})}var C=new B.Z(S),R=null,ee=null;function Q(N,k){E.has(N)||(E.set(N,new Set),C.observe(N)),E.get(N).add(k)}function W(N,k){E.has(N)&&(E.get(N).delete(k),E.get(N).size||(C.unobserve(N),E.delete(N)))}var D=_(38705),z=_(17212),F=_(39153),$=_(55401),ue=function(N){(0,F.Z)(q,N);var k=(0,$.Z)(q);function q(){return(0,D.Z)(this,q),k.apply(this,arguments)}return(0,z.Z)(q,[{key:"render",value:function(){return this.props.children}}]),q}(ce.Component);function pe(N,k){var q=N.children,te=N.disabled,Z=ce.useRef(null),x=ce.useRef(null),w=ce.useContext(o),V=typeof q=="function",fe=V?q(Z):q,$e=ce.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Qe=!V&&ce.isValidElement(fe)&&(0,ae.Yr)(fe),ye=Qe?(0,ae.C4)(fe):null,He=(0,ae.x1)(ye,Z),Ye=function(){var qe;return(0,de.ZP)(Z.current)||(Z.current&&(0,g.Z)(Z.current)==="object"?(0,de.ZP)((qe=Z.current)===null||qe===void 0?void 0:qe.nativeElement):null)||(0,de.ZP)(x.current)};ce.useImperativeHandle(k,function(){return Ye()});var tt=ce.useRef(N);tt.current=N;var nt=ce.useCallback(function(Bt){var qe=tt.current,jt=qe.onResize,Ue=qe.data,yt=Bt.getBoundingClientRect(),Le=yt.width,Ce=yt.height,he=Bt.offsetWidth,We=Bt.offsetHeight,Re=Math.floor(Le),Ie=Math.floor(Ce);if($e.current.width!==Re||$e.current.height!==Ie||$e.current.offsetWidth!==he||$e.current.offsetHeight!==We){var M={width:Re,height:Ie,offsetWidth:he,offsetHeight:We};$e.current=M;var me=he===Math.round(Le)?Le:he,Ee=We===Math.round(Ce)?Ce:We,Ke=(0,j.Z)((0,j.Z)({},M),{},{offsetWidth:me,offsetHeight:Ee});w==null||w(Ke,Bt,Ue),jt&&Promise.resolve().then(function(){jt(Ke,Bt)})}},[]);return ce.useEffect(function(){var Bt=Ye();return Bt&&!te&&Q(Bt,nt),function(){return W(Bt,nt)}},[Z.current,te]),ce.createElement(ue,{ref:x},Qe?ce.cloneElement(fe,{ref:He}):fe)}var oe=ce.forwardRef(pe),xe=oe,ke="rc-observer-key";function De(N,k){var q=N.children,te=typeof q=="function"?[q]:(0,se.Z)(q);return te.map(function(Z,x){var w=(Z==null?void 0:Z.key)||"".concat(ke,"-").concat(x);return ce.createElement(xe,(0,m.Z)({},N,{key:w,ref:x===0?k:void 0}),Z)})}var Be=ce.forwardRef(De);Be.Collection=G;var X=Be},22711:function(fn,ct,_){"use strict";_.r(ct),_.d(ct,{ResizableTextArea:function(){return Be},default:function(){return q}});var m=_(60499),ce=_(18642),se=_(85899),ve=_(77654),j=_(72190),g=_(42244),de=_(92310),ae=_.n(de),o=_(36901),G=_(66003),B=_(30292),E=_(18929),S=_(59301),C=_(43749),R=_(29301),ee=_(34280),Q=_(16089),W=`
|
|
|
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;
|
|
|
`,D=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],z={},F;function $(te){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=te.getAttribute("id")||te.getAttribute("data-reactid")||te.getAttribute("name");if(Z&&z[x])return z[x];var w=window.getComputedStyle(te),V=w.getPropertyValue("box-sizing")||w.getPropertyValue("-moz-box-sizing")||w.getPropertyValue("-webkit-box-sizing"),fe=parseFloat(w.getPropertyValue("padding-bottom"))+parseFloat(w.getPropertyValue("padding-top")),$e=parseFloat(w.getPropertyValue("border-bottom-width"))+parseFloat(w.getPropertyValue("border-top-width")),Qe=D.map(function(He){return"".concat(He,":").concat(w.getPropertyValue(He))}).join(";"),ye={sizingStyle:Qe,paddingSize:fe,borderSize:$e,boxSizing:V};return Z&&x&&(z[x]=ye),ye}function ue(te){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),F.setAttribute("name","hiddenTextarea"),document.body.appendChild(F)),te.getAttribute("wrap")?F.setAttribute("wrap",te.getAttribute("wrap")):F.removeAttribute("wrap");var V=$(te,Z),fe=V.paddingSize,$e=V.borderSize,Qe=V.boxSizing,ye=V.sizingStyle;F.setAttribute("style","".concat(ye,";").concat(W)),F.value=te.value||te.placeholder||"";var He=void 0,Ye=void 0,tt,nt=F.scrollHeight;if(Qe==="border-box"?nt+=$e:Qe==="content-box"&&(nt-=fe),x!==null||w!==null){F.value=" ";var Bt=F.scrollHeight-fe;x!==null&&(He=Bt*x,Qe==="border-box"&&(He=He+fe+$e),nt=Math.max(He,nt)),w!==null&&(Ye=Bt*w,Qe==="border-box"&&(Ye=Ye+fe+$e),tt=nt>Ye?"":"hidden",nt=Math.min(Ye,nt))}var qe={height:nt,overflowY:tt,resize:"none"};return He&&(qe.minHeight=He),Ye&&(qe.maxHeight=Ye),qe}var pe=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],oe=0,xe=1,ke=2,De=S.forwardRef(function(te,Z){var x=te,w=x.prefixCls,V=x.defaultValue,fe=x.value,$e=x.autoSize,Qe=x.onResize,ye=x.className,He=x.style,Ye=x.disabled,tt=x.onChange,nt=x.onInternalAutoSize,Bt=(0,g.Z)(x,pe),qe=(0,E.Z)(V,{value:fe,postState:function(Ze){return Ze!=null?Ze:""}}),jt=(0,j.Z)(qe,2),Ue=jt[0],yt=jt[1],Le=function(Ze){yt(Ze.target.value),tt==null||tt(Ze)},Ce=S.useRef();S.useImperativeHandle(Z,function(){return{textArea:Ce.current}});var he=S.useMemo(function(){return $e&&(0,C.Z)($e)==="object"?[$e.minRows,$e.maxRows]:[]},[$e]),We=(0,j.Z)(he,2),Re=We[0],Ie=We[1],M=!!$e,me=function(){try{if(document.activeElement===Ce.current){var Ze=Ce.current,b=Ze.selectionStart,A=Ze.selectionEnd,Oe=Ze.scrollTop;Ce.current.setSelectionRange(b,A),Ce.current.scrollTop=Oe}}catch(U){}},Ee=S.useState(ke),Ke=(0,j.Z)(Ee,2),et=Ke[0],ut=Ke[1],St=S.useState(),Dt=(0,j.Z)(St,2),mt=Dt[0],kt=Dt[1],Ht=function(){ut(oe)};(0,ee.Z)(function(){M&&Ht()},[fe,Re,Ie,M]),(0,ee.Z)(function(){if(et===oe)ut(xe);else if(et===xe){var _e=ue(Ce.current,!1,Re,Ie);ut(ke),kt(_e)}else me()},[et]);var zt=S.useRef(),Ut=function(){Q.Z.cancel(zt.current)},st=function(Ze){et===ke&&(Qe==null||Qe(Ze),$e&&(Ut(),zt.current=(0,Q.Z)(function(){Ht()})))};S.useEffect(function(){return Ut},[]);var Rt=M?mt:null,Lt=(0,se.Z)((0,se.Z)({},He),Rt);return(et===oe||et===xe)&&(Lt.overflowY="hidden",Lt.overflowX="hidden"),S.createElement(R.Z,{onResize:st,disabled:!($e||Qe)},S.createElement("textarea",(0,m.Z)({},Bt,{ref:Ce,style:Lt,className:ae()(w,ye,(0,ce.Z)({},"".concat(w,"-disabled"),Ye)),disabled:Ye,value:Ue,onChange:Le})))}),Be=De,X=["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"],N=S.forwardRef(function(te,Z){var x,w=te.defaultValue,V=te.value,fe=te.onFocus,$e=te.onBlur,Qe=te.onChange,ye=te.allowClear,He=te.maxLength,Ye=te.onCompositionStart,tt=te.onCompositionEnd,nt=te.suffix,Bt=te.prefixCls,qe=Bt===void 0?"rc-textarea":Bt,jt=te.showCount,Ue=te.count,yt=te.className,Le=te.style,Ce=te.disabled,he=te.hidden,We=te.classNames,Re=te.styles,Ie=te.onResize,M=te.onClear,me=te.onPressEnter,Ee=te.readOnly,Ke=te.autoSize,et=te.onKeyDown,ut=(0,g.Z)(te,X),St=(0,E.Z)(w,{value:V,defaultValue:w}),Dt=(0,j.Z)(St,2),mt=Dt[0],kt=Dt[1],Ht=mt==null?"":String(mt),zt=S.useState(!1),Ut=(0,j.Z)(zt,2),st=Ut[0],Rt=Ut[1],Lt=S.useRef(!1),_e=S.useState(null),Ze=(0,j.Z)(_e,2),b=Ze[0],A=Ze[1],Oe=(0,S.useRef)(null),U=(0,S.useRef)(null),le=function(){var Nt;return(Nt=U.current)===null||Nt===void 0?void 0:Nt.textArea},wt=function(){le().focus()};(0,S.useImperativeHandle)(Z,function(){var $t;return{resizableTextArea:U.current,focus:wt,blur:function(){le().blur()},nativeElement:(($t=Oe.current)===null||$t===void 0?void 0:$t.nativeElement)||le()}}),(0,S.useEffect)(function(){Rt(function($t){return!Ce&&$t})},[Ce]);var Se=S.useState(null),je=(0,j.Z)(Se,2),Ge=je[0],Y=je[1];S.useEffect(function(){if(Ge){var $t;($t=le()).setSelectionRange.apply($t,(0,ve.Z)(Ge))}},[Ge]);var ne=(0,G.Z)(Ue,jt),be=(x=ne.max)!==null&&x!==void 0?x:He,Pe=Number(be)>0,P=ne.strategy(Ht),Je=!!be&&P>be,J=function(Nt,on){var nn=on;!Lt.current&&ne.exceedFormatter&&ne.max&&ne.strategy(on)>ne.max&&(nn=ne.exceedFormatter(on,{max:ne.max}),on!==nn&&Y([le().selectionStart||0,le().selectionEnd||0])),kt(nn),(0,B.rJ)(Nt.currentTarget,Nt,Qe,nn)},rt=function(Nt){Lt.current=!0,Ye==null||Ye(Nt)},Gt=function(Nt){Lt.current=!1,J(Nt,Nt.currentTarget.value),tt==null||tt(Nt)},Xt=function(Nt){J(Nt,Nt.target.value)},Jt=function(Nt){Nt.key==="Enter"&&me&&me(Nt),et==null||et(Nt)},an=function(Nt){Rt(!0),fe==null||fe(Nt)},rn=function(Nt){Rt(!1),$e==null||$e(Nt)},Sn=function(Nt){kt(""),wt(),(0,B.rJ)(le(),Nt,Qe)},On=nt,pn;ne.show&&(ne.showFormatter?pn=ne.showFormatter({value:Ht,count:P,maxLength:be}):pn="".concat(P).concat(Pe?" / ".concat(be):""),On=S.createElement(S.Fragment,null,On,S.createElement("span",{className:ae()("".concat(qe,"-data-count"),We==null?void 0:We.count),style:Re==null?void 0:Re.count},pn)));var Pn=function(Nt){var on;Ie==null||Ie(Nt),(on=le())!==null&&on!==void 0&&on.style.height&&A(!0)},tn=!Ke&&!jt&&!ye;return S.createElement(o.BaseInput,{ref:Oe,value:Ht,allowClear:ye,handleReset:Sn,suffix:On,prefixCls:qe,classNames:(0,se.Z)((0,se.Z)({},We),{},{affixWrapper:ae()(We==null?void 0:We.affixWrapper,(0,ce.Z)((0,ce.Z)({},"".concat(qe,"-show-count"),jt),"".concat(qe,"-textarea-allow-clear"),ye))}),disabled:Ce,focused:st,className:ae()(yt,Je&&"".concat(qe,"-out-of-range")),style:(0,se.Z)((0,se.Z)({},Le),b&&!tn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof pn=="string"?pn:void 0}},hidden:he,readOnly:Ee,onClear:M},S.createElement(Be,(0,m.Z)({},ut,{autoSize:Ke,maxLength:He,onKeyDown:Jt,onChange:Xt,onFocus:an,onBlur:rn,onCompositionStart:rt,onCompositionEnd:Gt,className:ae()(We==null?void 0:We.textarea),style:(0,se.Z)((0,se.Z)({},Re==null?void 0:Re.textarea),{},{resize:Le==null?void 0:Le.resize}),disabled:Ce,prefixCls:qe,onResize:Pn,ref:U,readOnly:Ee})))}),k=N,q=k},29125:function(fn,ct,_){"use strict";_.d(ct,{G:function(){return ve},Z:function(){return W}});var m=_(92310),ce=_.n(m),se=_(59301);function ve(D){var z=D.children,F=D.prefixCls,$=D.id,ue=D.overlayInnerStyle,pe=D.bodyClassName,oe=D.className,xe=D.style;return se.createElement("div",{className:ce()("".concat(F,"-content"),oe),style:xe},se.createElement("div",{className:ce()("".concat(F,"-inner"),pe),id:$,role:"tooltip",style:ue},typeof z=="function"?z():z))}var j=_(60499),g=_(85899),de=_(42244),ae=_(68196),o={shiftX:64,adjustY:1},G={adjustX:1,shiftY:!0},B=[0,0],E={left:{points:["cr","cl"],overflow:G,offset:[-4,0],targetOffset:B},right:{points:["cl","cr"],overflow:G,offset:[4,0],targetOffset:B},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:B},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:B},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:B},leftTop:{points:["tr","tl"],overflow:G,offset:[-4,0],targetOffset:B},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:B},rightTop:{points:["tl","tr"],overflow:G,offset:[4,0],targetOffset:B},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:B},rightBottom:{points:["bl","br"],overflow:G,offset:[4,0],targetOffset:B},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:B},leftBottom:{points:["br","bl"],overflow:G,offset:[-4,0],targetOffset:B}},S=null,C=_(80402),R=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],ee=function(z,F){var $=z.overlayClassName,ue=z.trigger,pe=ue===void 0?["hover"]:ue,oe=z.mouseEnterDelay,xe=oe===void 0?0:oe,ke=z.mouseLeaveDelay,De=ke===void 0?.1:ke,Be=z.overlayStyle,X=z.prefixCls,N=X===void 0?"rc-tooltip":X,k=z.children,q=z.onVisibleChange,te=z.afterVisibleChange,Z=z.transitionName,x=z.animation,w=z.motion,V=z.placement,fe=V===void 0?"right":V,$e=z.align,Qe=$e===void 0?{}:$e,ye=z.destroyTooltipOnHide,He=ye===void 0?!1:ye,Ye=z.defaultVisible,tt=z.getTooltipContainer,nt=z.overlayInnerStyle,Bt=z.arrowContent,qe=z.overlay,jt=z.id,Ue=z.showArrow,yt=Ue===void 0?!0:Ue,Le=z.classNames,Ce=z.styles,he=(0,de.Z)(z,R),We=(0,C.Z)(jt),Re=(0,se.useRef)(null);(0,se.useImperativeHandle)(F,function(){return Re.current});var Ie=(0,g.Z)({},he);"visible"in z&&(Ie.popupVisible=z.visible);var M=function(){return se.createElement(ve,{key:"content",prefixCls:N,id:We,bodyClassName:Le==null?void 0:Le.body,overlayInnerStyle:(0,g.Z)((0,g.Z)({},nt),Ce==null?void 0:Ce.body)},qe)},me=function(){var Ke=se.Children.only(k),et=(Ke==null?void 0:Ke.props)||{},ut=(0,g.Z)((0,g.Z)({},et),{},{"aria-describedby":qe?We:null});return se.cloneElement(k,ut)};return se.createElement(ae.Z,(0,j.Z)({popupClassName:ce()($,Le==null?void 0:Le.root),prefixCls:N,popup:M,action:pe,builtinPlacements:E,popupPlacement:fe,ref:Re,popupAlign:Qe,getPopupContainer:tt,onPopupVisibleChange:q,afterPopupVisibleChange:te,popupTransitionName:Z,popupAnimation:x,popupMotion:w,defaultPopupVisible:Ye,autoDestroy:He,mouseLeaveDelay:De,popupStyle:(0,g.Z)((0,g.Z)({},Be),Ce==null?void 0:Ce.root),mouseEnterDelay:xe,arrow:yt},Ie),me())},Q=(0,se.forwardRef)(ee),W=Q},49658:function(fn,ct){"use strict";ct.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var _=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(_)||/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(_==null?void 0:_.substr(0,4))}},83145:function(fn,ct,_){"use strict";Object.defineProperty(ct,"__esModule",{value:!0}),ct.CopyToClipboard=void 0;var m=se(_(59301)),ce=se(_(25769));function se(D){return D&&D.__esModule?D:{default:D}}function ve(D){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ve=function(F){return typeof F}:ve=function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},ve(D)}function j(D,z){var F=Object.keys(D);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(D);z&&($=$.filter(function(ue){return Object.getOwnPropertyDescriptor(D,ue).enumerable})),F.push.apply(F,$)}return F}function g(D){for(var z=1;z<arguments.length;z++){var F=arguments[z]!=null?arguments[z]:{};z%2?j(F,!0).forEach(function($){Q(D,$,F[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(F)):j(F).forEach(function($){Object.defineProperty(D,$,Object.getOwnPropertyDescriptor(F,$))})}return D}function de(D,z){if(D==null)return{};var F=ae(D,z),$,ue;if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(D);for(ue=0;ue<pe.length;ue++)$=pe[ue],!(z.indexOf($)>=0)&&Object.prototype.propertyIsEnumerable.call(D,$)&&(F[$]=D[$])}return F}function ae(D,z){if(D==null)return{};var F={},$=Object.keys(D),ue,pe;for(pe=0;pe<$.length;pe++)ue=$[pe],!(z.indexOf(ue)>=0)&&(F[ue]=D[ue]);return F}function o(D,z){if(!(D instanceof z))throw new TypeError("Cannot call a class as a function")}function G(D,z){for(var F=0;F<z.length;F++){var $=z[F];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(D,$.key,$)}}function B(D,z,F){return z&&G(D.prototype,z),F&&G(D,F),D}function E(D,z){return z&&(ve(z)==="object"||typeof z=="function")?z:C(D)}function S(D){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(F){return F.__proto__||Object.getPrototypeOf(F)},S(D)}function C(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function R(D,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(z&&z.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),z&&ee(D,z)}function ee(D,z){return ee=Object.setPrototypeOf||function($,ue){return $.__proto__=ue,$},ee(D,z)}function Q(D,z,F){return z in D?Object.defineProperty(D,z,{value:F,enumerable:!0,configurable:!0,writable:!0}):D[z]=F,D}var W=function(D){R(z,D);function z(){var F,$;o(this,z);for(var ue=arguments.length,pe=new Array(ue),oe=0;oe<ue;oe++)pe[oe]=arguments[oe];return $=E(this,(F=S(z)).call.apply(F,[this].concat(pe))),Q(C($),"onClick",function(xe){var ke=$.props,De=ke.text,Be=ke.onCopy,X=ke.children,N=ke.options,k=m.default.Children.only(X),q=(0,ce.default)(De,N);Be&&Be(De,q),k&&k.props&&typeof k.props.onClick=="function"&&k.props.onClick(xe)}),$}return B(z,[{key:"render",value:function(){var $=this.props,ue=$.text,pe=$.onCopy,oe=$.options,xe=$.children,ke=de($,["text","onCopy","options","children"]),De=m.default.Children.only(xe);return m.default.cloneElement(De,g({},ke,{onClick:this.onClick}))}}]),z}(m.default.PureComponent);ct.CopyToClipboard=W,Q(W,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(fn,ct,_){"use strict";var m=_(83145),ce=m.CopyToClipboard;ce.CopyToClipboard=ce,fn.exports=ce},76374:function(fn,ct,_){"use strict";var m=function(){if(typeof Map!="undefined")return Map;function X(N,k){var q=-1;return N.some(function(te,Z){return te[0]===k?(q=Z,!0):!1}),q}return function(){function N(){this.__entries__=[]}return Object.defineProperty(N.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),N.prototype.get=function(k){var q=X(this.__entries__,k),te=this.__entries__[q];return te&&te[1]},N.prototype.set=function(k,q){var te=X(this.__entries__,k);~te?this.__entries__[te][1]=q:this.__entries__.push([k,q])},N.prototype.delete=function(k){var q=this.__entries__,te=X(q,k);~te&&q.splice(te,1)},N.prototype.has=function(k){return!!~X(this.__entries__,k)},N.prototype.clear=function(){this.__entries__.splice(0)},N.prototype.forEach=function(k,q){q===void 0&&(q=null);for(var te=0,Z=this.__entries__;te<Z.length;te++){var x=Z[te];k.call(q,x[1],x[0])}},N}()}(),ce=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,se=function(){return typeof _.g!="undefined"&&_.g.Math===Math?_.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),ve=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(se):function(X){return setTimeout(function(){return X(Date.now())},1e3/60)}}(),j=2;function g(X,N){var k=!1,q=!1,te=0;function Z(){k&&(k=!1,X()),q&&w()}function x(){ve(Z)}function w(){var V=Date.now();if(k){if(V-te<j)return;q=!0}else k=!0,q=!1,setTimeout(x,N);te=V}return w}var de=20,ae=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",G=function(){function X(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=g(this.refresh.bind(this),de)}return X.prototype.addObserver=function(N){~this.observers_.indexOf(N)||this.observers_.push(N),this.connected_||this.connect_()},X.prototype.removeObserver=function(N){var k=this.observers_,q=k.indexOf(N);~q&&k.splice(q,1),!k.length&&this.connected_&&this.disconnect_()},X.prototype.refresh=function(){var N=this.updateObservers_();N&&this.refresh()},X.prototype.updateObservers_=function(){var N=this.observers_.filter(function(k){return k.gatherActive(),k.hasActive()});return N.forEach(function(k){return k.broadcastActive()}),N.length>0},X.prototype.connect_=function(){!ce||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)},X.prototype.disconnect_=function(){!ce||!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)},X.prototype.onTransitionEnd_=function(N){var k=N.propertyName,q=k===void 0?"":k,te=ae.some(function(Z){return!!~q.indexOf(Z)});te&&this.refresh()},X.getInstance=function(){return this.instance_||(this.instance_=new X),this.instance_},X.instance_=null,X}(),B=function(X,N){for(var k=0,q=Object.keys(N);k<q.length;k++){var te=q[k];Object.defineProperty(X,te,{value:N[te],enumerable:!1,writable:!1,configurable:!0})}return X},E=function(X){var N=X&&X.ownerDocument&&X.ownerDocument.defaultView;return N||se},S=ue(0,0,0,0);function C(X){return parseFloat(X)||0}function R(X){for(var N=[],k=1;k<arguments.length;k++)N[k-1]=arguments[k];return N.reduce(function(q,te){var Z=X["border-"+te+"-width"];return q+C(Z)},0)}function ee(X){for(var N=["top","right","bottom","left"],k={},q=0,te=N;q<te.length;q++){var Z=te[q],x=X["padding-"+Z];k[Z]=C(x)}return k}function Q(X){var N=X.getBBox();return ue(0,0,N.width,N.height)}function W(X){var N=X.clientWidth,k=X.clientHeight;if(!N&&!k)return S;var q=E(X).getComputedStyle(X),te=ee(q),Z=te.left+te.right,x=te.top+te.bottom,w=C(q.width),V=C(q.height);if(q.boxSizing==="border-box"&&(Math.round(w+Z)!==N&&(w-=R(q,"left","right")+Z),Math.round(V+x)!==k&&(V-=R(q,"top","bottom")+x)),!z(X)){var fe=Math.round(w+Z)-N,$e=Math.round(V+x)-k;Math.abs(fe)!==1&&(w-=fe),Math.abs($e)!==1&&(V-=$e)}return ue(te.left,te.top,w,V)}var D=function(){return typeof SVGGraphicsElement!="undefined"?function(X){return X instanceof E(X).SVGGraphicsElement}:function(X){return X instanceof E(X).SVGElement&&typeof X.getBBox=="function"}}();function z(X){return X===E(X).document.documentElement}function F(X){return ce?D(X)?Q(X):W(X):S}function $(X){var N=X.x,k=X.y,q=X.width,te=X.height,Z=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,x=Object.create(Z.prototype);return B(x,{x:N,y:k,width:q,height:te,top:k,right:N+q,bottom:te+k,left:N}),x}function ue(X,N,k,q){return{x:X,y:N,width:k,height:q}}var pe=function(){function X(N){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ue(0,0,0,0),this.target=N}return X.prototype.isActive=function(){var N=F(this.target);return this.contentRect_=N,N.width!==this.broadcastWidth||N.height!==this.broadcastHeight},X.prototype.broadcastRect=function(){var N=this.contentRect_;return this.broadcastWidth=N.width,this.broadcastHeight=N.height,N},X}(),oe=function(){function X(N,k){var q=$(k);B(this,{target:N,contentRect:q})}return X}(),xe=function(){function X(N,k,q){if(this.activeObservations_=[],this.observations_=new m,typeof N!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=N,this.controller_=k,this.callbackCtx_=q}return X.prototype.observe=function(N){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(N instanceof E(N).Element))throw new TypeError('parameter 1 is not of type "Element".');var k=this.observations_;k.has(N)||(k.set(N,new pe(N)),this.controller_.addObserver(this),this.controller_.refresh())}},X.prototype.unobserve=function(N){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(N instanceof E(N).Element))throw new TypeError('parameter 1 is not of type "Element".');var k=this.observations_;k.has(N)&&(k.delete(N),k.size||this.controller_.removeObserver(this))}},X.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},X.prototype.gatherActive=function(){var N=this;this.clearActive(),this.observations_.forEach(function(k){k.isActive()&&N.activeObservations_.push(k)})},X.prototype.broadcastActive=function(){if(this.hasActive()){var N=this.callbackCtx_,k=this.activeObservations_.map(function(q){return new oe(q.target,q.broadcastRect())});this.callback_.call(N,k,N),this.clearActive()}},X.prototype.clearActive=function(){this.activeObservations_.splice(0)},X.prototype.hasActive=function(){return this.activeObservations_.length>0},X}(),ke=typeof WeakMap!="undefined"?new WeakMap:new m,De=function(){function X(N){if(!(this instanceof X))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var k=G.getInstance(),q=new xe(N,k,this);ke.set(this,q)}return X}();["observe","unobserve","disconnect"].forEach(function(X){De.prototype[X]=function(){var N;return(N=ke.get(this))[X].apply(N,arguments)}});var Be=function(){return typeof se.ResizeObserver!="undefined"?se.ResizeObserver:De}();ct.Z=Be},98040:function(fn){fn.exports=function(){var ct=document.getSelection();if(!ct.rangeCount)return function(){};for(var _=document.activeElement,m=[],ce=0;ce<ct.rangeCount;ce++)m.push(ct.getRangeAt(ce));switch(_.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":_.blur();break;default:_=null;break}return ct.removeAllRanges(),function(){ct.type==="Caret"&&ct.removeAllRanges(),ct.rangeCount||m.forEach(function(se){ct.addRange(se)}),_&&_.focus()}}},4977:function(fn){"use strict";fn.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(fn,ct,_){"use strict";_.d(ct,{ZP:function(){return Fs}});const m=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ce=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=se},se=Number.MAX_SAFE_INTEGER||9007199254740991;let ve=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),j=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),g=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var de={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ae={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 G{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 B(a,e,t){return(e=ee(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function E(){return E=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},E.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){B(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 R(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 ee(a){var e=R(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=W,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 W=function(){},D={trace:W,debug:W,log:W,warn:W,info:W,error:W};function z(){return E({},D)}function F(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):W}function $(a,e,t){return e[a]?e[a].bind(e):F(a,t)}const ue=z();function pe(a,e,t){const n=z();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=$(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.15`)}catch(i){return z()}r.forEach(i=>{ue[i]=$(i,a)})}else E(ue,n);return n}const oe=ue;function xe(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function ke(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function De(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 Be(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 X(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 N(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function k(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var q={exports:{}},te;function Z(){return te||(te=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 v=l.parseURL(d);if(!v)throw new Error("Error trying to parse base URL.");return v.path=l.normalizePath(v.path),l.buildURLFromParts(v)}var T=l.parseURL(c);if(!T)throw new Error("Error trying to parse relative URL.");if(T.scheme)return p.alwaysNormalize?(T.path=l.normalizePath(T.path),l.buildURLFromParts(T)):c;var L=l.parseURL(d);if(!L)throw new Error("Error trying to parse base URL.");if(!L.netLoc&&L.path&&L.path[0]!=="/"){var O=r.exec(L.path);L.netLoc=O[1],L.path=O[2]}L.netLoc&&!L.path&&(L.path="/");var ie={scheme:L.scheme,netLoc:T.netLoc,path:null,params:T.params,query:T.query,fragment:T.fragment};if(!T.netLoc&&(ie.netLoc=L.netLoc,T.path[0]!=="/"))if(!T.path)ie.path=L.path,T.params||(ie.params=L.params,T.query||(ie.query=L.query));else{var re=L.path,Te=re.substring(0,re.lastIndexOf("/")+1)+T.path;ie.path=l.normalizePath(Te)}return ie.path===null&&(ie.path=p.alwaysNormalize?l.normalizePath(T.path):T.path),l.buildURLFromParts(ie)},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})()}(q)),q.exports}var x=Z();class w{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var V={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class fe{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={[V.AUDIO]:null,[V.VIDEO]:null,[V.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new w),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=x.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[V.AUDIO]=null,e[V.VIDEO]=null,e[V.AUDIOVIDEO]=null}}function $e(a){return a.sn!=="initSegment"}class Qe extends fe{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(m(e)&&m(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){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=m(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){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(!m(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return $e(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 ye extends fe{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 He(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||He(t,e)}}function Ye(a,e){const t=He(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const tt=Math.pow(2,32)-1,nt=[].push,Bt={video:1,audio:2,id3:3,text:4};function qe(a){return String.fromCharCode.apply(null,a)}function jt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Ue(a,e){const t=Le(a,e);return t<0?4294967296+t:t}function yt(a,e){let t=Ue(a,e);return t*=Math.pow(2,32),t+=Ue(a,e+4),t}function Le(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Ce(a){const e=a.byteLength;for(let t=0;t<e;){const n=Ue(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=Ue(a,r),s=qe(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&&nt.apply(t,d)}r=l}return t}function We(a){const e=[],t=a[0];let n=8;const r=Ue(a,n);n+=4;let i=0,s=0;t===0?(i=Ue(a,n),s=Ue(a,n+4),n+=8):(i=yt(a,n),s=yt(a,n+8),n+=16),n+=2;let l=a.length+s;const d=jt(a,n);n+=2;for(let c=0;c<d;c++){let p=n;const v=Ue(a,p);p+=4;const T=v&2147483647;if((v&2147483648)>>>31===1)return oe.warn("SIDX has hierarchical references (not supported)"),null;const O=Ue(a,p);p+=4,e.push({referenceSize:T,subsegmentDuration:O,info:{duration:O/r,start:l,end:l+T-1}}),l+=T,p+=4,n=p}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:d,references:e}}function Re(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=Ue(s,l===0?12:20),c=he(i,["mdia","mdhd"])[0];if(c){l=c[0];const p=Ue(c,l===0?12:20),v=he(i,["mdia","hdlr"])[0];if(v){const T=qe(v.subarray(8,12)),L={soun:V.AUDIO,vide:V.VIDEO}[T],O=he(i,["mdia","minf","stbl","stsd"])[0],ie=Ie(O);L?(e[d]={timescale:p,type:L,stsd:ie},e[L]=C({timescale:p,id:d},ie)):e[d]={timescale:p,type:T,stsd:ie}}}}}return he(a,["moov","mvex","trex"]).forEach(r=>{const i=Ue(r,4),s=e[i];s&&(s.default={duration:Ue(r,12),flags:Ue(r,20)})}),e}function Ie(a){const e=a.subarray(8),t=e.subarray(86),n=qe(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(v=>{const T=he(v,["schm"])[0];if(T){const L=qe(T.subarray(4,8));if(L==="cbcs"||L==="cenc"){const O=he(v,["frma"])[0];O&&(r=qe(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+="."+Ke(d[1])+Ke(d[2])+Ke(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=Ee(c,p),p+=2;const v=c[p++];if(v&128&&(p+=2),v&64&&(p+=c[p++]),c[p++]!==4)break;p=Ee(c,p);const T=c[p++];if(T===64)r+="."+Ke(T);else break;if(p+=12,c[p++]!==5)break;p=Ee(c,p);const L=c[p++];let O=(L&248)>>3;O===31&&(O+=1+((L&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],v=c&31,T=Ue(d,2),L=(c&32)>>5?"H":"L",O=d[12],ie=d.subarray(6,12);r+="."+p+v,r+="."+me(T).toString(16).toUpperCase(),r+="."+L+O;let re="";for(let Te=ie.length;Te--;){const Me=ie[Te];(Me||re)&&(re="."+Me.toString(16).toUpperCase()+re)}r+=re}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],v=d[6]>>4&15;r+="."+et(c)+"."+et(p)+"."+et(v)}break}case"av01":{const d=he(t,["av1C"])[0];if(d&&d.length>2){const c=d[1]>>>5,p=d[1]&31,v=d[2]>>>7?"H":"M",T=(d[2]&64)>>6,L=(d[2]&32)>>5,O=c===2&&T?L?12:10:T?10:8,ie=(d[2]&16)>>4,re=(d[2]&8)>>3,Te=(d[2]&4)>>2,Me=d[2]&3;r+="."+c+"."+et(p)+v+"."+et(O)+"."+ie+"."+re+Te+Me+"."+et(1)+"."+et(1)+"."+et(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+"."+et(r)+"."+et(i)}}function me(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function Ee(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function Ke(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function et(a){return(a<10?"0":"")+a}function ut(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&Dt(a,(n,r)=>{const i=n.subarray(8,24);i.some(s=>s!==0)||(oe.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${X(i)} -> ${X(t)}`),n.set(t,8))})}function St(a){const e=[];return Dt(a,t=>e.push(t.subarray(8,24))),e}function Dt(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(v=>{const T=mt(v);T&&e(T,l)})})})}function mt(a){const e=he(a,["schm"])[0];if(e){const t=qe(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const n=he(a,["schi","tenc"])[0];if(n)return n}}}function kt(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=Ue(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],v=he(s,["tfdt"])[0];if(v){const ze=v[0];let lt=Ue(v,4);ze===1&&(lt===tt?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(lt*=tt+1,lt+=Ue(v,8))),m(lt)&&(!m(p.start)||lt<p.start)&&(p.start=lt)}const T=c.default,L=Ue(l,0)|(T==null?void 0:T.flags);let O=(T==null?void 0:T.duration)||0;L&8&&(L&2?O=Ue(l,12):O=Ue(l,8));const ie=he(s,["trun"]);let re=p.start||0,Te=0,Me=O;for(let ze=0;ze<ie.length;ze++){const lt=ie[ze],bt=Ue(lt,4),Qt=p.sampleCount;p.sampleCount+=bt;const At=lt[3]&1,Yt=lt[3]&4,Zt=lt[2]&1,Mt=lt[2]&2,cn=lt[2]&4,Ln=lt[2]&8;let Vn=8,ar=bt;for(At&&(Vn+=4),Yt&&bt&&(!(lt[Vn+1]&1)&&p.keyFrameIndex===void 0&&(p.keyFrameIndex=Qt),Vn+=4,Zt?(Me=Ue(lt,Vn),Vn+=4):Me=O,Mt&&(Vn+=4),Ln&&(Vn+=4),re+=Me,Te+=Me,ar--);ar--;)Zt?(Me=Ue(lt,Vn),Vn+=4):Me=O,Mt&&(Vn+=4),cn&&(lt[Vn+1]&1||p.keyFrameIndex===void 0&&(p.keyFrameIndex=p.sampleCount-(ar+1),p.keyFrameStart=re),Vn+=4),Ln&&(Vn+=4),re+=Me,Te+=Me;!Te&&O&&(Te+=O*bt)}p.duration+=Te}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=We(l[d]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const p=c.references.reduce((v,T)=>v+T.info.duration||0,0);s=Math.max(s,p+c.earliestPresentationTime/c.timescale)}}s&&m(s)&&Object.keys(n).forEach(d=>{n[d].duration||(n[d].duration=s*n[d].timescale-n[d].start)})}return n}function Ht(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 zt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Ut(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(v=>{const T=he(v,["tfdt"]).map(L=>{const O=L[0];let ie=Ue(L,4);return O===1&&(ie*=Math.pow(2,32),ie+=Ue(L,8)),ie/r})[0];return T!==void 0&&(a=T),he(v,["tfhd"]).map(L=>{const O=Ue(L,4),ie=Ue(L,0)&16777215,re=(ie&1)!==0,Te=(ie&2)!==0,Me=(ie&8)!==0;let ze=0;const lt=(ie&16)!==0;let bt=0;const Qt=(ie&32)!==0;let At=8;O===i&&(re&&(At+=8),Te&&(At+=4),Me&&(ze=Ue(L,At),At+=4),lt&&(bt=Ue(L,At),At+=4),Qt&&(At+=4),e.type==="video"&&(s=st(e.codec)),he(v,["trun"]).map(Yt=>{const Zt=Yt[0],Mt=Ue(Yt,0)&16777215,cn=(Mt&1)!==0;let Ln=0;const Vn=(Mt&4)!==0,ar=(Mt&256)!==0;let Zn=0;const wn=(Mt&512)!==0;let Qn=0;const zn=(Mt&1024)!==0,tr=(Mt&2048)!==0;let mr=0;const Dn=Ue(Yt,4);let In=8;cn&&(Ln=Ue(Yt,In),In+=4),Vn&&(In+=4);let Ar=Ln+c;for(let Nr=0;Nr<Dn;Nr++){if(ar?(Zn=Ue(Yt,In),In+=4):Zn=ze,wn?(Qn=Ue(Yt,In),In+=4):Qn=bt,zn&&(In+=4),tr&&(Zt===0?mr=Ue(Yt,In):mr=Le(Yt,In),In+=4),e.type===V.VIDEO){let Tr=0;for(;Tr<Qn;){const Rr=Ue(n,Ar);if(Ar+=4,Rt(s,n[Ar])){const wi=n.subarray(Ar,Ar+Rr);Lt(wi,s?2:1,a+mr/r,t)}Ar+=Rr,Tr+=Rr+4}}a+=Zn/r}}))})})}),t}function st(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Rt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Lt(a,e,t,n){const r=_e(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){oe.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[p++]===181){const T=jt(r,p);if(p+=2,T===49){const L=Ue(r,p);if(p+=4,L===1195456820){const O=r[p++];if(O===3){const ie=r[p++],re=31&ie,Te=64&ie,Me=Te?2+re*3:0,ze=new Uint8Array(Me);if(Te){ze[0]=ie;for(let lt=1;lt<Me;lt++)ze[lt]=r[p++]}n.push({type:O,payloadType:s,pts:t,bytes:ze})}}}}}else if(s===5&&l>16){const v=[];for(let O=0;O<16;O++){const ie=r[p++].toString(16);v.push(ie.length==1?"0"+ie:ie),(O===3||O===5||O===7||O===9)&&v.push("-")}const T=l-16,L=new Uint8Array(T);for(let O=0;O<T;O++)L[O]=r[p++];n.push({payloadType:s,pts:t,uuid:v.join(""),userData:Be(L),userDataBytes:L})}}}function _e(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 Ze(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,d=0,c=0;if(e===0){for(;qe(a.subarray(c,c+1))!=="\0";)t+=qe(a.subarray(c,c+1)),c+=1;for(t+=qe(a.subarray(c,c+1)),c+=1;qe(a.subarray(c,c+1))!=="\0";)n+=qe(a.subarray(c,c+1)),c+=1;n+=qe(a.subarray(c,c+1)),c+=1,r=Ue(a,12),i=Ue(a,16),l=Ue(a,20),d=Ue(a,24),c=28}else if(e===1){c+=4,r=Ue(a,c),c+=4;const v=Ue(a,c);c+=4;const T=Ue(a,c);for(c+=4,s=bu(2,32)*v+T,ce(s)||(s=Number.MAX_SAFE_INTEGER,oe.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Ue(a,c),c+=4,d=Ue(a,c),c+=4;qe(a.subarray(c,c+1))!=="\0";)t+=qe(a.subarray(c,c+1)),c+=1;for(t+=qe(a.subarray(c,c+1)),c+=1;qe(a.subarray(c,c+1))!=="\0";)n+=qe(a.subarray(c,c+1)),c+=1;n+=qe(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 b(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 A(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),b([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}function Oe(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=U(r);e.push(i),n+=i.size}}return e}function U(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=X(new Uint8Array(s,t+12,16));let d=null,c=null,p=0;if(i===0)p=28;else{const T=a.getUint32(28);if(!T||n<32+T*16)return{offset:t,size:e};d=[];for(let L=0;L<T;L++)d.push(new Uint8Array(s,t+32+L*16,16));p=32+T*16}if(!p)return{offset:t,size:e};const v=a.getUint32(p);return e-32<v?{offset:t,size:e}:(c=new Uint8Array(s,t+p+4,v),{version:i,systemId:l,kids:d,data:c,offset:t,size:e})}const le=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),wt={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 Se(a,e){const t=wt[e];return!!t&&!!t[a.slice(0,4)]}function je(a,e,t=!0){return!a.split(",").some(n=>!Ge(n,e,t))}function Ge(a,e,t=!0){var n;const r=xe(t);return(n=r==null?void 0:r.isTypeSupported(Y(a,e)))!=null?n:!1}function Y(a,e){return`${e}/mp4;codecs=${a}`}function ne(a){if(a){const e=a.substring(0,4);return wt.video[e]}return 2}function be(a){const e=le();return a.split(",").reduce((t,n)=>{const i=e&&st(n)?9:wt.video[n];return i?(i*2+t)/(t?3:2):(wt.audio[n]+t)/(t?2:1)},0)}const Pe={};function P(a,e=!0){if(Pe[a])return Pe[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(Ge(t[r],"audio",e))return Pe[a]=t[r],t[r];if(t[r]==="mp3"&&(n=xe(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const Je=/flac|opus|mp4a\.40\.34/i;function J(a,e=!0){return a.replace(Je,t=>P(t.toLowerCase(),e))}function rt(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Se(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function Gt(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(Xt(a,"audio")||Xt(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 Xt(a,e){return Se(a,e)&&Ge(a,e)}function Jt(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 an(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 rn(a){const e=xe(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 Sn(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const On={supported:!0,powerEfficient:!0,smooth:!0},pn={supported:!1,smooth:!1,powerEfficient:!1},Pn={supported:!0,configurations:[],decodingInfoResults:[On]};function tn(a,e){return{supported:!1,configurations:e,decodingInfoResults:[pn],error:a}}function $t(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 v=null;if(l!=null&&l.length)try{l.length===1&&l[0]?v=e.groups[l[0]].channels:v=l.reduce((T,L)=>{if(L){const O=e.groups[L];if(!O)throw new Error(`Audio track group ${L} not found`);Object.keys(O.channels).forEach(ie=>{T[ie]=(T[ie]||0)+O.channels[ie]})}return T},{2:0})}catch(T){return!0}return s!==void 0&&(s.split(",").some(T=>st(T))||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))||!!v&&m(p)&&Object.keys(v).some(T=>parseInt(T)>p)}function Nt(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(Pn);const i=[],s=on(a),l=s.length,d=nn(a,e,l>0),c=d.length;for(let p=l||1*c||1;p--;){const v={type:"media-source"};if(l&&(v.video=s[p%l]),c){v.audio=d[p%c];const T=v.audio.bitrate;v.video&&T&&(v.video.bitrate-=T)}i.push(v)}if(r){const p=navigator.userAgent;if(r.split(",").some(v=>st(v))&&le())return Promise.resolve(tn(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${p})`),i))}return Promise.all(i.map(p=>{const v=Ne(p);return n[v]||(n[v]=t.decodingInfo(p))})).then(p=>({supported:!p.some(v=>!v.supported),configurations:i,decodingInfoResults:p})).catch(p=>({supported:!1,configurations:i,decodingInfoResults:[],error:p}))}function on(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=or(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:Y(an(d),"video"),width:r,height:i,bitrate:n,framerate:s};return l!=="sdr"&&(c.transferFunction=l),c}):[]}function nn(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=or(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,v)=>{if(v.groupId===l){const T=parseFloat(v.channels||"");r.forEach(L=>{const O={contentType:Y(L,"audio"),bitrate:t?An(L,i):i};T&&(O.channels=""+T),p.push(O)})}return p},s):s},[]):[]}function An(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 or(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function Ne(a){let e="";const{audio:t,video:n}=a;if(n){const r=Sn(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=Sn(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const pt=["NONE","TYPE-0","TYPE-1",null];function It(a){return pt.indexOf(a)>-1}const ht=["SDR","PQ","HLG"];function we(a){return!!a&&ht.indexOf(a)>-1}var at={No:"",Yes:"YES",v2:"v2"};function vt(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?at.v2:at.Yes:at.No}class Ct{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 Et{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 Pt(this._audioGroups,e)}hasSubtitleGroup(e){return Pt(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 Pt(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Kt(){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 xt(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||ht.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Kt(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Ve=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}},it=(a,e)=>JSON.stringify(a,Ve(e));function Tt(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,v=!1,T=1/0,L=1/0,O=1/0,ie=1/0,re=0,Te=[];const{preferHDR:Me,allowedVideoRanges:ze}=xt(e,r);for(let Yt=i.length;Yt--;){const Zt=a[i[Yt]];p||(p=Zt.channels[2]>0),T=Math.min(T,Zt.minHeight),L=Math.min(L,Zt.minFramerate),O=Math.min(O,Zt.minBitrate),ze.filter(cn=>Zt.videoRanges[cn]>0).length>0&&(v=!0)}T=m(T)?T:0,L=m(L)?L:0;const lt=Math.max(1080,T),bt=Math.max(30,L);O=m(O)?O:t,t=Math.max(O,t),v||(e=void 0);const Qt=i.length>1;return{codecSet:i.reduce((Yt,Zt)=>{const Mt=a[Zt];if(Zt===Yt)return Yt;if(Te=v?ze.filter(cn=>Mt.videoRanges[cn]>0):[],Qt){if(Mt.minBitrate>t)return ot(Zt,`min bitrate of ${Mt.minBitrate} > current estimate of ${t}`),Yt;if(!Mt.hasDefaultAudio)return ot(Zt,"no renditions with default or auto-select sound found"),Yt;if(l&&Zt.indexOf(l.substring(0,4))%5!==0)return ot(Zt,`audio codec preference "${l}" not found`),Yt;if(s&&!c){if(!Mt.channels[s])return ot(Zt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Mt.channels)})`),Yt}else if((!l||c)&&p&&Mt.channels[2]===0)return ot(Zt,"no renditions with stereo sound found"),Yt;if(Mt.minHeight>lt)return ot(Zt,`min resolution of ${Mt.minHeight} > maximum of ${lt}`),Yt;if(Mt.minFramerate>bt)return ot(Zt,`min framerate of ${Mt.minFramerate} > maximum of ${bt}`),Yt;if(!Te.some(cn=>Mt.videoRanges[cn]>0))return ot(Zt,`no variants with VIDEO-RANGE of ${it(Te)} found`),Yt;if(d&&Zt.indexOf(d.substring(0,4))%5!==0)return ot(Zt,`video codec preference "${d}" not found`),Yt;if(Mt.maxScore<re)return ot(Zt,`max score of ${Mt.maxScore} < selected max of ${re}`),Yt}return Yt&&(be(Zt)>=be(Yt)||Mt.fragmentError>a[Yt].fragmentError)?Yt:(ie=Mt.minIndex,re=Mt.maxScore,Zt)},void 0),videoRanges:Te,preferHDR:Me,minFramerate:L,minBitrate:O,minIndex:ie}}function ot(a,e){oe.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function dt(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 Ot(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 v=e.groups[p];v&&(d.hasDefaultAudio=d.hasDefaultAudio||e.hasDefaultAudio?v.hasDefault:v.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(v.channels).forEach(T=>{d.channels[T]=(d.channels[T]||0)+v.channels[T]}))}),r},{})}function Vt(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 Wt(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(dn(a,r,t))return n}return-1}function dn(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||un(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(d===void 0||e.forced===d)&&(!("characteristics"in a)||xn(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function un(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function xn(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function vn(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 ln(a,e,t,n,r){const i=e[n],l=e.reduce((T,L,O)=>{const ie=L.uri;return(T[ie]||(T[ie]=[])).push(O),T},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const d=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),v=en(e,n,T=>{if(T.videoRange!==d||T.frameRate!==c||T.codecSet.substring(0,4)!==p)return!1;const L=T.audioGroups,O=t.filter(ie=>!L||L.indexOf(ie.groupId)!==-1);return Wt(a,O,r)>-1});return v>-1?v:en(e,n,T=>{const L=T.audioGroups,O=t.filter(ie=>!L||L.indexOf(ie.groupId)!==-1);return Wt(a,O,r)>-1})}function en(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 Tn(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class En 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,v=i?i.duration:r.duration,T=c-p.loading.start,L=s.minAutoLevel,O=r.level,ie=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||O<=L){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const re=ie>-1&&ie!==O,Te=!!t||re;if(!Te&&(d.paused||!d.playbackRate||!d.readyState))return;const Me=s.mainForwardBufferInfo;if(!Te&&Me===null)return;const ze=this.bwEstimator.getEstimateTTFB(),lt=Math.abs(d.playbackRate);if(T<=Math.max(ze,1e3*(v/(lt*2))))return;const bt=Me?Me.len/lt:0,Qt=p.loading.first?p.loading.first-p.loading.start:-1,At=p.loaded&&Qt>-1,Yt=this.getBwEstimate(),Zt=s.levels,Mt=Zt[O],cn=Math.max(p.loaded,Math.round(v*(r.bitrate||Mt.averageBitrate)/8));let Ln=At?T-Qt:T;Ln<1&&At&&(Ln=Math.min(T,p.loaded*8/Yt));const Vn=At?p.loaded*1e3/Ln:0,ar=ze/1e3,Zn=Vn?(cn-p.loaded)/Vn:cn*8/Yt+ar;if(Zn<=bt)return;const wn=Vn?Vn*8:Yt,Qn=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,zn=this.hls.config.abrBandWidthUpFactor;let tr=Number.POSITIVE_INFINITY,mr;for(mr=O-1;mr>L;mr--){const Nr=Zt[mr].maxBitrate,Tr=!Zt[mr].details||Qn;if(tr=this.getTimeToLoadFrag(ar,wn,v*Nr,Tr),tr<Math.min(bt,v+ar))break}if(tr>=Zn||tr>v*10)return;At?this.bwEstimator.sample(T-Math.min(ze,Qt),p.loaded):this.bwEstimator.sampleTTFB(T);const Dn=Zt[mr].maxBitrate;this.getBwEstimate()*zn>Dn&&this.resetEstimator(Dn);const In=this.findBestLevel(Dn,L,mr,0,bt,1,1);In>-1&&(mr=In),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: ${bt.toFixed(3)} s
|
|
|
Estimated load time for current fragment: ${Zn.toFixed(3)} s
|
|
|
Estimated load time for down switch fragment: ${tr.toFixed(3)} s
|
|
|
TTFB estimate: ${Qt|0} ms
|
|
|
Current BW estimate: ${m(Yt)?Yt|0:"Unknown"} bps
|
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
|
Switching to level ${mr} @ ${Dn|0} bps`),s.nextLoadLevel=s.nextAutoLevel=mr,this.clearTimer();const Ar=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===mr&&mr>0){const Nr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${mr>0?"and switching down":""}
|
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
|
Time to underbuffer: ${Nr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,mr>L){let Tr=this.findBestLevel(this.hls.levels[L].bitrate,L,mr,0,Nr,1,1);Tr===-1&&(Tr=L),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Tr,this.resetEstimator(this.hls.levels[Tr].bitrate)}}};re||Zn>tr*2?Ar():this.timer=self.setInterval(Ar,tr*1e3),s.trigger(g.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 G(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(g.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 j.BUFFER_ADD_CODEC_ERROR:case j.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case j.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 v=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(d-Math.min(v,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;m(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===ae.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(g.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!==ae.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,v=i.abrBandWidthUpFactor;if(c){const re=this.findBestLevel(d,s,r,c,0,p,v);if(re>=0)return this.rebufferNotice=-1,re}let T=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const re=this.bitrateTestDelay;re&&(T=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-re,this.info(`bitrate test took ${Math.round(1e3*re)}ms, set first fragment max fetchDuration to ${Math.round(1e3*T)} ms`),p=v=1)}const L=this.findBestLevel(d,s,r,c,T,p,v);if(this.rebufferNotice!==L&&(this.rebufferNotice=L,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${L}`)),L>-1)return L;const O=n.levels[s],ie=n.loadLevelObj;return ie&&(O==null?void 0:O.bitrate)<ie.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,v=p===-1?this.hls.firstLevel:p,{fragCurrent:T,partCurrent:L}=this,{levels:O,allAudioTracks:ie,loadLevel:re,config:Te}=this.hls;if(O.length===1)return 0;const Me=O[v],ze=!!((d=this.hls.latestLevelDetails)!=null&&d.live),lt=re===-1||p===-1;let bt,Qt="SDR",At=(Me==null?void 0:Me.frameRate)||0;const{audioPreference:Yt,videoPreference:Zt}=Te,Mt=this.audioTracksByGroup||(this.audioTracksByGroup=dt(ie));let cn=-1;if(lt){if(this.firstSelection!==-1)return this.firstSelection;const wn=this.codecTiers||(this.codecTiers=Ot(O,Mt,t,n)),Qn=Tt(wn,Qt,e,Yt,Zt),{codecSet:zn,videoRanges:tr,minFramerate:mr,minBitrate:Dn,minIndex:In,preferHDR:Ar}=Qn;cn=In,bt=zn,Qt=Ar?tr[tr.length-1]:tr[0],At=mr,e=Math.max(e,Dn),this.log(`picked start tier ${it(Qn)}`)}else bt=Me==null?void 0:Me.codecSet,Qt=Me==null?void 0:Me.videoRange;const Ln=L?L.duration:T?T.duration:0,Vn=this.bwEstimator.getEstimateTTFB()/1e3,ar=[];for(let wn=n;wn>=t;wn--){var Zn;const Qn=O[wn],zn=wn>v;if(!Qn)continue;if(Te.useMediaCapabilities&&!Qn.supportedResult&&!Qn.supportedPromise){const Tr=navigator.mediaCapabilities;typeof(Tr==null?void 0:Tr.decodingInfo)=="function"&&$t(Qn,Mt,Qt,At,e,Yt)?(Qn.supportedPromise=Nt(Qn,Mt,Tr,this.supportedCache),Qn.supportedPromise.then(Rr=>{if(!this.hls)return;Qn.supportedResult=Rr;const wi=this.hls.levels,xi=wi.indexOf(Qn);Rr.error?this.warn(`MediaCapabilities decodingInfo error: "${Rr.error}" for level ${xi} ${it(Rr)}`):Rr.supported?Rr.decodingInfoResults.some(Zi=>Zi.smooth===!1||Zi.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${xi} not smooth or powerEfficient: ${it(Rr)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${xi} ${it(Rr)}`),xi>-1&&wi.length>1&&(this.log(`Removing unsupported level ${xi}`),this.hls.removeLevel(xi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Rr=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Rr}`)})):Qn.supportedResult=Pn}if((bt&&Qn.codecSet!==bt||Qt&&Qn.videoRange!==Qt||zn&&At>Qn.frameRate||!zn&&At>0&&At<Qn.frameRate||(Zn=Qn.supportedResult)!=null&&(Zn=Zn.decodingInfoResults)!=null&&Zn.some(Tr=>Tr.smooth===!1))&&(!lt||wn!==cn)){ar.push(wn);continue}const tr=Qn.details,mr=(L?tr==null?void 0:tr.partTarget:tr==null?void 0:tr.averagetargetduration)||Ln;let Dn;zn?Dn=l*e:Dn=s*e;const In=Ln&&r>=Ln*2&&i===0?Qn.averageBitrate:Qn.maxBitrate,Ar=this.getTimeToLoadFrag(Vn,Dn,In*mr,tr===void 0);if(Dn>=In&&(wn===p||Qn.loadError===0&&Qn.fragmentError===0)&&(Ar<=Vn||!m(Ar)||ze&&!this.bitrateTestDelay||Ar<c)){const Tr=this.forcedAutoLevel;return wn!==re&&(Tr===-1||Tr!==re)&&(ar.length&&this.trace(`Skipped level(s) ${ar.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${O[ar[0]].codecs}" ${O[ar[0]].videoRange}; not compatible with "${bt}" ${Qt}`),this.info(`switch candidate:${v}->${wn} adjustedbw(${Math.round(Dn)})-bitrate=${Math.round(Dn-In)} ttfb:${Vn.toFixed(1)} avgDuration:${mr.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${Ar.toFixed(1)} firstSelection:${lt} codecSet:${Qn.codecSet} videoRange:${Qn.videoRange} hls.loadLevel:${re}`)),lt&&(this.firstSelection=wn),wn}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const 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||!m(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(Wn(e,t,s))return s}return null}function Hn(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)&&jn(t,n,i)===0||Nn(i,a,Math.min(r,n))))return i;const s=bn.search(e,jn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function Nn(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 jn(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 Wn(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function nr(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 $n(a){switch(a.details){case j.FRAG_LOAD_TIMEOUT:case j.KEY_LOAD_TIMEOUT:case j.LEVEL_LOAD_TIMEOUT:case j.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function fr(a){return a.details.startsWith("key")}function gt(a){return fr(a)&&!!a.frag&&!a.frag.decryptdata}function Mn(a,e){const t=$n(e);return a.default[`${t?"timeout":"error"}Retry`]}function ir(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function xr(a){return C(C({},a),{errorRetry:null,timeoutRetry:null})}function _r(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(br(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function br(a){return Rn(a)||!!a&&(a<400||a>499)}function Rn(a){return a===0&&navigator.onLine===!1}var gn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Fn={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class sr 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(g.ERROR,this.onError,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.ERROR,this.onError,this),e.off(g.ERROR,this.onErrorOut,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.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)===ae.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 j.FRAG_LOAD_ERROR:case j.FRAG_LOAD_TIMEOUT:case j.KEY_LOAD_ERROR:case j.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case j.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=Kn();return}case j.FRAG_GAP:case j.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=gn.SendAlternateToPenaltyBox;return}case j.LEVEL_EMPTY_ERROR:case j.LEVEL_PARSING_ERROR:{var s;const d=t.parent===ae.MAIN?t.level:r.loadLevel;t.details===j.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 j.LEVEL_LOAD_ERROR:case j.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case j.AUDIO_TRACK_LOAD_ERROR:case j.AUDIO_TRACK_LOAD_TIMEOUT:case j.SUBTITLE_LOAD_ERROR:case j.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const d=r.loadLevelObj;if(d&&(i.type===de.AUDIO_TRACK&&d.hasAudioGroup(i.groupId)||i.type===de.SUBTITLE_TRACK&&d.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=gn.SendAlternateToPenaltyBox,t.errorAction.flags=Fn.MoveAllAlternatesMatchingHost;return}}return;case j.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:gn.SendAlternateToPenaltyBox,flags:Fn.MoveAllAlternatesMatchingHDCP};return;case j.KEY_SYSTEM_SESSION_UPDATE_FAILED:case j.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case j.KEY_SYSTEM_NO_SESSION:t.errorAction={action:gn.SendAlternateToPenaltyBox,flags:Fn.MoveAllAlternatesMatchingKey};return;case j.BUFFER_ADD_CODEC_ERROR:case j.REMUX_ALLOC_ERROR:case j.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:r.loadLevel)}return;case j.INTERNAL_EXCEPTION:case j.BUFFER_APPENDING_ERROR:case j.BUFFER_FULL_ERROR:case j.LEVEL_SWITCH_ERROR:case j.BUFFER_STALLED_ERROR:case j.BUFFER_SEEK_OVER_HOLE:case j.BUFFER_NUDGE_ON_STALL:t.errorAction=Kn();return}t.type===ve.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=Kn())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=Mn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(_r(r,i,$n(e),e.response))return{action:gn.RetryRequest,flags:Fn.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(fr(e)?s:i,e),d=t.levels.reduce((p,v)=>p+v.fragmentError,0);if(r&&(e.details!==j.FRAG_GAP&&r.fragmentError++,!gt(e)&&_r(l,d,$n(e),e.response)))return{action:gn.RetryRequest,flags:Fn.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===j.BUFFER_APPEND_ERROR&&r.fragmentError++;let p=-1;const{levels:v,loadLevel:T,minAutoLevel:L,maxAutoLevel:O}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const ie=(i=e.frag)==null?void 0:i.type,Te=(ie===ae.AUDIO&&c===j.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===j.BUFFER_ADD_CODEC_ERROR||c===j.BUFFER_APPEND_ERROR))&&v.some(({audioCodec:Qt})=>r.audioCodec!==Qt),ze=e.sourceBufferName==="video"&&(c===j.BUFFER_ADD_CODEC_ERROR||c===j.BUFFER_APPEND_ERROR)&&v.some(({codecSet:Qt,audioCodec:At})=>r.codecSet!==Qt&&r.audioCodec===At),{type:lt,groupId:bt}=(s=e.context)!=null?s:{};for(let Qt=v.length;Qt--;){const At=(Qt+T)%v.length;if(At!==T&&At>=L&&At<=O&&v[At].loadError===0){var l,d;const Yt=v[At];if(c===j.FRAG_GAP&&ie===ae.MAIN&&e.frag){const Zt=v[At].details;if(Zt){const Mt=Hn(e.frag,Zt.fragments,e.frag.start);if(Mt!=null&&Mt.gap)continue}}else{if(lt===de.AUDIO_TRACK&&Yt.hasAudioGroup(bt)||lt===de.SUBTITLE_TRACK&&Yt.hasSubtitleGroup(bt))continue;if(ie===ae.AUDIO&&(l=r.audioGroups)!=null&&l.some(Zt=>Yt.hasAudioGroup(Zt))||ie===ae.SUBTITLE&&(d=r.subtitleGroups)!=null&&d.some(Zt=>Yt.hasSubtitleGroup(Zt))||Te&&r.audioCodec===Yt.audioCodec||ze&&r.codecSet===Yt.codecSet||!Te&&r.codecSet!==Yt.codecSet)continue}p=At;break}}if(p>-1&&n.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:gn.SendAlternateToPenaltyBox,flags:Fn.None,nextAutoLevel:p}}return{action:gn.SendAlternateToPenaltyBox,flags:Fn.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case gn.DoNothing:break;case gn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==j.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break;case gn.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 Fn.None:this.switchLevel(e,i);break;case Fn.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=pt[pt.indexOf(p)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case Fn.MoveAllAlternatesMatchingKey:{const d=e.decryptdata;if(d){const c=this.hls.levels,p=c.length;for(let T=p;T--;)if(this.variantHasKey(c[T],d)){var s,l;this.log(`Banned key found in level ${T} (${c[T].bitrate}bps) or audio group "${(s=c[T].audioGroups)==null?void 0:s.join(",")}" (${(l=e.frag)==null?void 0:l.type} fragment) ${X(d.keyId||[])}`),c[T].fragmentError++,c[T].loadError++,this.log(`Removing level ${T} with key error (${e.error})`),this.hls.removeLevel(T)}const v=e.frag;if(this.hls.levels.length<p)n.resolved=!0;else if(v&&v.type!==ae.MAIN){const T=v.decryptdata;T&&!d.matches(T)&&(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===j.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=Sn(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 Kn(a){const e={action:gn.DoNothing,flags:Fn.None};return a&&(e.resolved=!0),e}var er={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Pr{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.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 v=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return v&&this.removeFragment(d.body),v})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Er(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),Dr(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]=_n(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Er(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 v=r.start(p)-this.bufferPadding,T=r.end(p)+this.bufferPadding;if(c>=v&&d<=T){i.time.push({startPTS:Math.max(s,r.start(p)),endPTS:Math.min(l,r.end(p))});break}else if(s<T&&l>v){const L=Math.max(s,r.start(p)),O=Math.min(l,r.end(p));O>L&&(i.partial=!0,i.time.push({startPTS:L,endPTS:O}))}else if(l<=v)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&&Dr(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||Dr(t))}getState(e){const t=Er(e),n=this.fragments[t];return n?n.buffered?Dr(n)?er.PARTIAL:er.OK:er.APPENDING:er.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=Er(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=Er(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=Er(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=_n(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 Dr(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 Er(a){return`${a.type}_${a.level}_${a.sn}`}function _n(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var Gn={cbc:0,ctr:1};class qn{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 Gn.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case Gn.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 wr(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class qr{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],v=d[2],T=d[3],L=new Uint32Array(256);let O=0,ie=0,re=0;for(re=0;re<256;re++)re<128?L[re]=re<<1:L[re]=re<<1^283;for(re=0;re<256;re++){let Te=ie^ie<<1^ie<<2^ie<<3^ie<<4;Te=Te>>>8^Te&255^99,e[O]=Te,t[Te]=O;const Me=L[O],ze=L[Me],lt=L[ze];let bt=L[Te]*257^Te*16843008;r[O]=bt<<24|bt>>>8,i[O]=bt<<16|bt>>>16,s[O]=bt<<8|bt>>>24,l[O]=bt,bt=lt*16843009^ze*65537^Me*257^O*16843008,c[Te]=bt<<24|bt>>>8,p[Te]=bt<<16|bt>>>16,v[Te]=bt<<8|bt>>>24,T[Te]=bt,O?(O=Me^L[L[L[lt^Me]]],ie^=L[L[ie]]):O=ie=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),v=this.sBox,T=this.rcon,L=this.invSubMix,O=L[0],ie=L[1],re=L[2],Te=L[3];let Me,ze;for(l=0;l<s;l++){if(l<i){Me=c[l]=t[l];continue}ze=Me,l%i===0?(ze=ze<<8|ze>>>24,ze=v[ze>>>24]<<24|v[ze>>>16&255]<<16|v[ze>>>8&255]<<8|v[ze&255],ze^=T[l/i|0]<<24):i>6&&l%i===4&&(ze=v[ze>>>24]<<24|v[ze>>>16&255]<<16|v[ze>>>8&255]<<8|v[ze&255]),c[l]=Me=(c[l-i]^ze)>>>0}for(d=0;d<s;d++)l=s-d,d&3?ze=c[l]:ze=c[l-4],d<4||l<=4?p[d]=ze:p[d]=O[v[ze>>>24]]^ie[v[ze>>>16&255]]^re[v[ze>>>8&255]]^Te[v[ze&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],v=l[3],T=this.uint8ArrayToUint32Array_(n);let L=T[0],O=T[1],ie=T[2],re=T[3];const Te=new Int32Array(e),Me=new Int32Array(Te.length);let ze,lt,bt,Qt,At,Yt,Zt,Mt,cn,Ln,Vn,ar,Zn,wn;const Qn=this.networkToHostOrderSwap;for(;t<Te.length;){for(cn=Qn(Te[t]),Ln=Qn(Te[t+1]),Vn=Qn(Te[t+2]),ar=Qn(Te[t+3]),At=cn^i[0],Yt=ar^i[1],Zt=Vn^i[2],Mt=Ln^i[3],Zn=4,wn=1;wn<r;wn++)ze=d[At>>>24]^c[Yt>>16&255]^p[Zt>>8&255]^v[Mt&255]^i[Zn],lt=d[Yt>>>24]^c[Zt>>16&255]^p[Mt>>8&255]^v[At&255]^i[Zn+1],bt=d[Zt>>>24]^c[Mt>>16&255]^p[At>>8&255]^v[Yt&255]^i[Zn+2],Qt=d[Mt>>>24]^c[At>>16&255]^p[Yt>>8&255]^v[Zt&255]^i[Zn+3],At=ze,Yt=lt,Zt=bt,Mt=Qt,Zn=Zn+4;ze=s[At>>>24]<<24^s[Yt>>16&255]<<16^s[Zt>>8&255]<<8^s[Mt&255]^i[Zn],lt=s[Yt>>>24]<<24^s[Zt>>16&255]<<16^s[Mt>>8&255]<<8^s[At&255]^i[Zn+1],bt=s[Zt>>>24]<<24^s[Mt>>16&255]<<16^s[At>>8&255]<<8^s[Yt&255]^i[Zn+2],Qt=s[Mt>>>24]<<24^s[At>>16&255]<<16^s[Yt>>8&255]<<8^s[Zt&255]^i[Zn+3],Me[t]=Qn(ze^L),Me[t+1]=Qn(Qt^O),Me[t+2]=Qn(bt^ie),Me[t+3]=Qn(lt^re),L=cn,O=Ln,ie=Vn,re=ar,t=t+4}return Me.buffer}}class Yr{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=kr(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function kr(a){switch(a){case Gn.cbc:return"AES-CBC";case Gn.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Zr=16;class Sr{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?wr(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!==Gn.cbc||t.byteLength!==16)return oe.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=zt(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 qr),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 Yr(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new qn(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(oe.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%Zr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(oe.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const ei=Math.pow(2,17);class $r{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 cr({type:ve.NETWORK_ERROR,details:j.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(ai(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),p=jr(e);e.loader=c;const v=xr(r.fragLoadPolicy.default),T={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:ei};e.stats=c.stats;const L={onSuccess:(O,ie,re,Te)=>{this.resetLoader(e,c);let Me=O.data;re.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Me.slice(0,16)),Me=Me.slice(16)),l({frag:e,part:null,payload:Me,networkDetails:Te})},onError:(O,ie,re,Te)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:j.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:re,stats:Te}))},onAbort:(O,ie,re)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:j.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:re,stats:O}))},onTimeout:(O,ie,re)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:j.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:re,stats:O}))}};t&&(L.onProgress=(O,ie,re,Te)=>t({frag:e,part:null,payload:re,networkDetails:Te})),c.load(p,T,L)})}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(ai(e,t));return}const c=this.loader=i?new i(r):new s(r),p=jr(e,t);e.loader=c;const v=xr(r.fragLoadPolicy.default),T={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:ei};t.stats=c.stats,c.load(p,T,{onSuccess:(L,O,ie,re)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const Te={frag:e,part:t,payload:L.data,networkDetails:re};n(Te),l(Te)},onError:(L,O,ie,re)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:j.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:C({url:p.url,data:void 0},L),error:new Error(`HTTP Error ${L.code} ${L.text}`),networkDetails:ie,stats:re}))},onAbort:(L,O,ie)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:j.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:ie,stats:L}))},onTimeout:(L,O,ie)=>{this.resetLoader(e,c),d(new cr({type:ve.NETWORK_ERROR,details:j.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:ie,stats:L}))}})})}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),v=(d-c)*Math.round(n.loaded/c);n.total=n.loaded+v}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 jr(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(m(r)&&m(i)){var s;let l=r,d=i;if(a.sn==="initSegment"&&oi((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 ai(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:ve.MEDIA_ERROR,details:j.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new cr(n)}function oi(a){return a==="AES-128"||a==="AES-256"}class cr extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class ci 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 di{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=ti(),this.buffering={audio:ti(),video:ti(),audiovideo:ti()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function ti(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Hr={length:0,start:()=>0,end:()=>0};class rr{static isBuffered(e,t){if(e){const n=rr.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=rr.getBuffered(e);return rr.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=rr.bufferedRanges(e);if(r.length)return rr.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,v)=>p.start-v.start||v.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 v=i.length;if(v){const T=i[v-1].end;e[p].start-T<n?e[p].end>T&&(i[v-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 v=i[p].start,T=i[p].end;if(r===-1&&t>=v&&t<=T&&(r=p),t+n>=v&&t<T)d=v,c=T,s=c-t;else if(t+n<v){l=v;break}}return{len:s,start:d||0,end:c||0,nextStart:l,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Hr}catch(t){return oe.log("failed to get media.buffered",t),Hr}}}const Ei=/\{\$([a-zA-Z0-9-_]+)\}/g;function mn(a){return Ei.test(a)}function Xn(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Ei,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 vr(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 Cr(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 ur=/^(\d+)x(\d+)$/,pr=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Bn{constructor(e,t){typeof e=="string"&&(e=Bn.parseAttrList(e,t)),E(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const 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=ur.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(pr.lastIndex=0;(n=pr.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=Xn(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":oe.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const Fr="com.apple.hls.interstitial";function Jr(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function ni(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Xr{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]){oe.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=E(new Bn({}),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"]);m(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?(oe.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(m(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===Fr}get isValid(){return!!this.id&&!this._badValueForSameId&&m(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const Kr=10;class li{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?m(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Kr}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 ui(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function Ti(a,e){return!a&&!e?!0:!a||!e?!1:ui(a,e)}function vi(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Hi(a){switch(a){case"AES-128":case"AES-256":return Gn.cbc;case"AES-256-CTR":return Gn.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 yi(a){const e=Mi(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Un(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 lr(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=yi(s)}}return t}const Ir=typeof self!="undefined"?self:void 0;var dr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},gr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Ci(a){switch(a){case gr.FAIRPLAY:return dr.FAIRPLAY;case gr.PLAYREADY:return dr.PLAYREADY;case gr.WIDEVINE:return dr.WIDEVINE;case gr.CLEARKEY:return dr.CLEARKEY}}function ri(a){switch(a){case dr.FAIRPLAY:return gr.FAIRPLAY;case dr.PLAYREADY:return gr.PLAYREADY;case dr.WIDEVINE:return gr.WIDEVINE;case dr.CLEARKEY:return gr.CLEARKEY}}function Oi(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[dr.FAIRPLAY,dr.WIDEVINE,dr.PLAYREADY,dr.CLEARKEY].filter(r=>!!e[r]):[];return!n[dr.WIDEVINE]&&t&&n.push(dr.WIDEVINE),n}const Ki=function(a){return Ir!=null&&(a=Ir.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function na(a,e,t,n){let r;switch(a){case dr.FAIRPLAY:r=["cenc","sinf"];break;case dr.WIDEVINE:case dr.PLAYREADY:r=["cenc"];break;case dr.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 Fi(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 Un(d),d}}return null}let Di={};class Si{static clearKeyUriToKeyIdMap(){Di={}}static setKeyIdForUri(e,t){Di[e]=t}static addKeyIdForUri(e){const t=Object.keys(Di).length%Number.MAX_SAFE_INTEGER,n=new Uint8Array(16);return new DataView(n.buffer,12,4).setUint32(0,t),Di[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&&!vi(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(N(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&ui(e.keyFormatVersions,this.keyFormatVersions)&&Ti(e.iv,this.iv)&&Ti(e.keyId,this.keyId)}isSupported(){if(this.method){if(vi(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case gr.FAIRPLAY:case gr.WIDEVINE:case gr.PLAYREADY:case gr.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(vi(this.method)){let i=this.iv;return i||(typeof e!="number"&&(oe.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=Bi(e)),new Si(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=Di[this.uri];if(i&&!ui(this.keyId,i)&&Si.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const n=lr(this.uri);if(n)switch(this.keyFormat){case gr.WIDEVINE:if(this.pssh=n,!this.keyId){const i=Oe(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 gr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=A(i,null,n),this.keyId=Fi(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=Bs(t),i||(i=is(t),i||(i=Di[this.uri])),i&&(this.keyId=i,Si.setKeyIdForUri(this.uri,i))}return this}}function Bs(a){const e=a==null?void 0:a[gr.WIDEVINE];return e?e.keyId:null}function is(a){const e=a==null?void 0:a[gr.PLAYREADY];if(e){const t=lr(e.uri);if(t)return Fi(t)}return null}function Bi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const Ns=/#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 Ii{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 x.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Sa.test(e)}static parseMasterPlaylist(e,t){const n=mn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(Ns.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=Ns.exec(e))!=null;)if(s[1]){var l;const c=new Bn(s[1],r),p=Xn(r,s[2]),v={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Ii.resolve(p,t)},T=c.decimalResolution("RESOLUTION");T&&(v.width=T.width,v.height=T.height),xs(c.CODECS,v);const L=c["SUPPLEMENTAL-CODECS"];L&&(v.supplemental={},xs(L,v.supplemental)),(l=v.unknownCodecs)!=null&&l.length||i.push(v),r.levels.push(v)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const v=new Bn(p,r),T=v["DATA-ID"];T&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[T]=v);break}case"SESSION-KEY":{const v=$s(p,t,r);v.encrypted&&v.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(v)):oe.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const v=new Bn(p,r);vr(r,v,t)}break}case"CONTENT-STEERING":{const v=new Bn(p,r);r.contentSteering={uri:Ii.resolve(v["SERVER-URI"],t),pathwayId:v["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 Bn(r[1],n),p=c.TYPE;if(p){const v=l[p],T=i[p]||[];i[p]=T;const L=c.LANGUAGE,O=c["ASSOC-LANGUAGE"],ie=c.CHANNELS,re=c.CHARACTERISTICS,Te=c["INSTREAM-ID"],Me={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||L||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:L,url:c.URI?Ii.resolve(c.URI,t):""};if(O&&(Me.assocLang=O),ie&&(Me.channels=ie),re&&(Me.characteristics=re),Te&&(Me.instreamId=Te),v!=null&&v.length){const ze=Ii.findGroup(v,Me.groupId)||v[0];Qi(Me,ze,"audioCodec"),Qi(Me,ze,"textCodec")}T.push(Me)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const d={url:t},c=new li(t),p=c.fragments,v=[];let T=null,L=0,O=0,ie=0,re=0,Te=0,Me=null,ze=new Qe(r,d),lt,bt,Qt,At=-1,Yt=!1,Zt=null,Mt;if(hs.lastIndex=0,c.m3u8=e,c.hasVariableRefs=mn(e),((l=hs.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(lt=hs.exec(e))!==null;){Yt&&(Yt=!1,ze=new Qe(r,d),ze.playlistOffset=ie,ze.setStart(ie),ze.sn=L,ze.cc=re,Te&&(ze.bitrate=Te),ze.level=n,T&&(ze.initSegment=T,T.rawProgramDateTime&&(ze.rawProgramDateTime=T.rawProgramDateTime,T.rawProgramDateTime=null),Zt&&(ze.setByteRange(Zt),Zt=null)));const ar=lt[1];if(ar){ze.duration=parseFloat(ar);const Zn=(" "+lt[2]).slice(1);ze.title=Zn||null,ze.tagList.push(Zn?["INF",ar,Zn]:["INF",ar])}else if(lt[3]){if(m(ze.duration)){ze.playlistOffset=ie,ze.setStart(ie),Qt&&aa(ze,Qt,c),ze.sn=L,ze.level=n,ze.cc=re,p.push(ze);const Zn=(" "+lt[3]).slice(1);ze.relurl=Xn(c,Zn),Pi(ze,Me,v),Me=ze,ie+=ze.duration,L++,O=0,Yt=!0}}else{if(lt=lt[0].match(bs),!lt){oe.warn("No matches on slow regex match for level playlist!");continue}for(bt=1;bt<lt.length&<[bt]===void 0;bt++);const Zn=(" "+lt[bt]).slice(1),wn=(" "+lt[bt+1]).slice(1),Qn=lt[bt+2]?(" "+lt[bt+2]).slice(1):null;switch(Zn){case"BYTERANGE":Me?ze.setByteRange(wn,Me):ze.setByteRange(wn);break;case"PROGRAM-DATE-TIME":ze.rawProgramDateTime=wn,ze.tagList.push(["PROGRAM-DATE-TIME",wn]),At===-1&&(At=p.length);break;case"PLAYLIST-TYPE":c.type&&_i(c,Zn,lt),c.type=wn.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?_i(c,Zn,lt):p.length>0&&ss(c,Zn,lt),L=c.startSN=parseInt(wn);break;case"SKIP":{c.skippedSegments&&_i(c,Zn,lt);const zn=new Bn(wn,c),tr=zn.decimalInteger("SKIPPED-SEGMENTS");if(m(tr)){c.skippedSegments+=tr;for(let Dn=tr;Dn--;)p.push(null);L+=tr}const mr=zn.enumeratedString("RECENTLY-REMOVED-DATERANGES");mr&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(mr.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&_i(c,Zn,lt),c.targetduration=Math.max(parseInt(wn),1);break;case"VERSION":c.version!==null&&_i(c,Zn,lt),c.version=parseInt(wn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||_i(c,Zn,lt),c.live=!1;break;case"#":(wn||Qn)&&ze.tagList.push(Qn?[wn,Qn]:[wn]);break;case"DISCONTINUITY":re++,ze.tagList.push(["DIS"]);break;case"GAP":ze.gap=!0,ze.tagList.push([Zn]);break;case"BITRATE":ze.tagList.push([Zn,wn]),Te=parseInt(wn)*1e3,m(Te)?ze.bitrate=Te:Te=0;break;case"DATERANGE":{const zn=new Bn(wn,c),tr=new Xr(zn,c.dateRanges[zn.ID],c.dateRangeTagCount);c.dateRangeTagCount++,tr.isValid||c.skippedSegments?c.dateRanges[tr.id]=tr:oe.warn(`Ignoring invalid DATERANGE tag: "${wn}"`),ze.tagList.push(["EXT-X-DATERANGE",wn]);break}case"DEFINE":{{const zn=new Bn(wn,c);"IMPORT"in zn?Cr(c,zn,s):vr(c,zn,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?_i(c,Zn,lt):p.length>0&&ss(c,Zn,lt),c.startCC=re=parseInt(wn);break;case"KEY":{const zn=$s(wn,t,c);if(zn.isSupported()){if(zn.method==="NONE"){Qt=void 0;break}Qt||(Qt={});const tr=Qt[zn.keyFormat];tr!=null&&tr.matches(zn)||(tr&&(Qt=E({},Qt)),Qt[zn.keyFormat]=zn)}else oe.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${wn}"`);break}case"START":c.startTimeOffset=sa(wn);break;case"MAP":{const zn=new Bn(wn,c);if(ze.duration){const tr=new Qe(r,d);zs(tr,zn,n,Qt),T=tr,ze.initSegment=T,T.rawProgramDateTime&&!ze.rawProgramDateTime&&(ze.rawProgramDateTime=T.rawProgramDateTime)}else{const tr=ze.byteRangeEndOffset;if(tr){const mr=ze.byteRangeStartOffset;Zt=`${tr-mr}@${mr}`}else Zt=null;zs(ze,zn,n,Qt),T=ze,Yt=!0}T.cc=re;break}case"SERVER-CONTROL":{Mt&&_i(c,Zn,lt),Mt=new Bn(wn),c.canBlockReload=Mt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Mt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Mt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Mt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Mt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&_i(c,Zn,lt);const zn=new Bn(wn);c.partTarget=zn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let zn=c.partList;zn||(zn=c.partList=[]);const tr=O>0?zn[zn.length-1]:void 0,mr=O++,Dn=new Bn(wn,c),In=new ye(Dn,ze,d,mr,tr);zn.push(In),ze.duration+=In.duration;break}case"PRELOAD-HINT":{const zn=new Bn(wn,c);c.preloadHint=zn;break}case"RENDITION-REPORT":{const zn=new Bn(wn,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(zn);break}default:oe.warn(`line parsed but not handled: ${lt}`);break}}}Me&&!Me.relurl?(p.pop(),ie-=Me.duration,c.partList&&(c.fragmentHint=Me)):c.partList&&(Pi(ze,Me,v),ze.cc=re,c.fragmentHint=ze,Qt&&aa(ze,Qt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const cn=p.length,Ln=p[0],Vn=p[cn-1];if(ie+=c.skippedSegments*c.targetduration,ie>0&&cn&&Vn){c.averagetargetduration=ie/cn;const ar=Vn.sn;c.endSN=ar!=="initSegment"?ar:0,c.live||(Vn.endList=!0),At>0&&(Us(p,At),Ln&&v.unshift(Ln))}return c.fragmentHint&&(ie+=c.fragmentHint.duration),c.totalduration=ie,v.length&&c.dateRangeTagCount&&Ln&&ia(v,c),c.endCC=re,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 v=wa(e,c,a,p,r);if(v!==-1){d.tagAnchor=e.fragments[v].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 T=(t[n+1]||p[p.length-1]).sn-a.startSN;for(let L=T;L>c;L--){const O=p[L].programDateTime;if(e>=O&&e<O+p[L].duration*1e3)return L}}return c}}}return-1}function $s(a,e,t){var n,r;const i=new Bn(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&&oe.error(`Invalid IV: ${i.IV}`);const v=l?Ii.resolve(l,e):"",T=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Si(s,v,p,T,d,i.KEYID)}function sa(a){const t=new Bn(a).decimalFloatingPoint("TIME-OFFSET");return m(t)?t:null}function xs(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Se(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 Pi(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 _i(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(m(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,v=e.endPTS;if(m(p)){const Te=Math.abs(p-t);a&&Te>a.totalduration?s.warn(`media timestamps and playlist times differ by ${Te}s for level ${e.level} ${a.url}`):m(e.deltaPTS)?e.deltaPTS=Math.max(Te,e.deltaPTS):e.deltaPTS=Te,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,v),n=Math.max(n,v),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const T=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 L=e.sn;if(!a||L<a.startSN||L>a.endSN)return 0;let O;const ie=L-a.startSN,re=a.fragments;for(re[ie]=e,O=ie;O>0;O--)fs(re[O],re[O-1]);for(O=ie;O<re.length-1;O++)fs(re[O],re[O+1]);return a.fragmentHint&&fs(re[re.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,T}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 v=r[p].initSegment;if(v){n=v;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;qi(a,e,(p,v,T,L)=>{if((!e.startCC||e.skippedSegments)&&v.cc!==p.cc){const O=p.cc-v.cc;for(let ie=T;ie<L.length;ie++)L[ie].cc+=O;e.endCC=L[L.length-1].cc}m(p.startPTS)&&m(p.endPTS)&&(v.setStart(v.startPTS=p.startPTS),v.startDTS=p.startDTS,v.maxStartPTS=p.maxStartPTS,v.endPTS=p.endPTS,v.endDTS=p.endDTS,v.minEndPTS=p.minEndPTS,v.setDuration(p.endPTS-p.startPTS),v.duration&&(i=v),e.PTSKnown=e.alignedSliding=!0),p.hasStreams&&(v.elementaryStreams=p.elementaryStreams),v.loader=p.loader,p.hasStats&&(v.stats=p.stats),p.initSegment&&(v.initSegment=p.initSegment,n=p.initSegment)});const s=e.fragments,l=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&l.forEach(p=>{var v;p&&(!p.initSegment||p.initSegment.relurl===((v=n)==null?void 0:v.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=Ni(a.dateRanges,e,t));const p=a.fragments.filter(v=>v.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let v=1;v<l.length;v++)l[v].programDateTime===null&&Pi(l[v],l[v-1],p);ia(p,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var d;const p=Or(a,e.startSN-1);e.startCC=(d=p==null?void 0:p.cc)!=null?d:s[0].cc}la(a.partList,e.partList,(p,v)=>{v.elementaryStreams=p.elementaryStreams,v.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 Ni(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=E({},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 Xr(n[d].attr,c);p.isValid?(i[d]=p,c||(p.tagOrder+=l)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${it(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 v=l[c];if(n&&!v&&p&&(v=e.fragments[c]=p),p&&v){t(p,v,c,l);const T=p.relurl,L=v.relurl;if(T&&ms(T,L)){e.playlistParsingError=Ss(`media sequence mismatch ${v.sn}:`,a,e,p,v);return}else if(p.cc!==v.cc){e.playlistParsingError=Ss(`discontinuity sequence mismatch (${p.cc}!=${v.cc})`,a,e,p,v);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 Lr(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 Or(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 Ur(a,e,t){return a?hi(a.partList,e,t):null}function hi(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 fi(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 ms(a,e){return a!==e&&e?ps(a)!==ps(e):!1}function ps(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 Hs(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 As(a,e){a&&(Ts(e,a),e.alignedSliding||Cs(e,a),!e.alignedSliding&&!e.skippedSegments&&$i(a,e,!1))}function Ts(a,e){if(!Hs(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;oe.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 mi(a,e,t){bi(a,e,t),a.addEventListener(e,t)}function bi(a,e,t){a.removeEventListener(e,t)}const Ha={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}},sn={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 ci{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=sn.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,v=d?d.currentTime:0,T=rr.bufferInfo(c||d,v,s.maxBufferHole),L=!T.len;if(this.log(`Media seeking to ${m(v)?v.toFixed(3):v}, state: ${p}, ${L?"out of":"in"} buffer`),this.state===sn.ENDED)this.resetLoadingState();else if(l){const O=s.maxFragLookUpTolerance,ie=l.start-O,re=l.start+l.duration+O;if(L||re<T.start||ie>T.end){const Te=v>re;(v<ie||Te)&&(Te&&l.loader&&(this.log(`Cancelling fragment load for seek (sn: ${l.sn})`),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(d){this.fragmentTracker.removeFragmentsInRange(v,1/0,this.playlistType,!0);const O=this.lastCurrentTime;if(v>O&&(this.lastCurrentTime=v),!this.loadingParts){const ie=Math.max(T.end,v),re=this.shouldLoadParts(this.getLevelDetails(),ie);re&&(this.log(`LL-Part loading ON after seeking to ${v.toFixed(2)} with buffer @${ie.toFixed(2)}`),this.loadingParts=re)}}this.hls.hasEnoughToStart||(this.log(`Setting ${L?"startPosition":"nextLoadPosition"} to ${v} for seek without enough to start`),this.nextLoadPosition=v,L&&(this.startPosition=v)),L&&this.state===sn.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 $r(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Sr(e.config)}registerListeners(){const{hls:e}=this;e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===sn.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=sn.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=rr.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 rr.isBuffered(this.media,p.start+p.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null)return this.levelLastLoaded.details}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;mi(n,"seeking",this.onMediaSeeking),mi(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===sn.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),bi(r,"seeking",this.onMediaSeeking),bi(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=sn.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===sn.FRAG_LOADING||!this.fragCurrent&&s===sn.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=sn.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(g.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===sn.STOPPED||this.state===sn.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)===er.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)===er.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(g.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&&vi(l.method)){const d=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,Hi(l.method)).catch(c=>{throw r.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:j.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return r.trigger(g.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===sn.STOPPED||this.state===sn.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!==sn.STOPPED&&(this.state=sn.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(g.ERROR,{type:ve.KEY_SYSTEM_ERROR,details:j.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?Ha.toString(rr.getBuffered(n)):"(detached)"})`),$e(e)){var r;if(e.type!==ae.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=sn.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=sn.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 di(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=sn.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(T=>{if(!this.fragContextChanged(T.frag))return this.hls.trigger(g.KEY_LOADED,T),this.state===sn.KEY_LOADING&&(this.state=sn.IDLE),T}),this.hls.trigger(g.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($e(e)&&(!d||e.sn!==d.sn)){const T=this.shouldLoadParts(t.details,e.end);T!==this.loadingParts&&(this.log(`LL-Part loading ${T?"ON":"OFF"} loading sn ${d==null?void 0:d.sn}->${e.sn}`),this.loadingParts=T)}if(n=Math.max(e.start,n||0),this.loadingParts&&$e(e)){const T=s.partList;if(T&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const L=this.getNextPart(T,e,n);if(L>-1){const O=T[L];e=this.fragCurrent=O.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${O.index} (${L}/${T.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=sn.FRAG_LOADING;let ie;return l?ie=l.then(re=>!re||this.fragContextChanged(re.frag)?null:this.doFragPartsLoad(e,O,t,r)).catch(re=>this.handleFragLoadError(re)):ie=this.doFragPartsLoad(e,O,t,r).catch(re=>this.handleFragLoadError(re)),this.hls.trigger(g.FRAG_LOADING,{frag:e,part:O,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):ie}else if(!e.url||this.loadedEndOfParts(T,n))return Promise.resolve(null)}}if($e(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(T=>T.loaded).map(T=>`[${T.start}-${T.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))}`),m(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=sn.FRAG_LOADING;const p=this.config.progressive&&e.type!==ae.SUBTITLE;let v;return p&&l?v=l.then(T=>!T||this.fragContextChanged(T.frag)?null:this.fragmentLoader.load(e,r)).catch(T=>this.handleFragLoadError(T)):v=Promise.all([this.fragmentLoader.load(e,p?r:void 0),l]).then(([T])=>(!p&&r&&r(T),T)).catch(T=>this.handleFragLoadError(T)),this.hls.trigger(g.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):v}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var l;const d=[],c=(l=n.details)==null?void 0:l.partList,p=v=>{this.fragmentLoader.loadPart(e,v,r).then(T=>{d[v.index]=T;const L=T.part;this.hls.trigger(g.FRAG_LOADED,T);const O=Ur(n.details,e.sn,v.index+1)||hi(c,e.sn,v.index+1);if(O)p(O);else return i({frag:e,part:L,partsLoaded:d})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===j.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===ve.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(g.ERROR,t)}else this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:j.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==sn.PARSING){!this.fragCurrent&&this.state!==sn.STOPPED&&this.state!==sn.ERROR&&(this.state=sn.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===ae.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?Ur(d,i,s):null,p=c?c.fragment:Or(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!==sn.PARSING)return;const{data1:s,data2:l}=e;let d=s;if(l&&(d=zt(s,l)),!d.length)return;const c=this.initPTS[t.cc],p=c?-c.baseTime/c.timescale:void 0,v={type:e.type,frag:t,part:n,chunkMeta:r,offset:p,parent:t.type,data:d};if(this.hls.trigger(g.BUFFER_APPENDING,v),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!rr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=rr.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(!m(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=rr.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 rr.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=ae.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 v=i.initialLiveManifestSize;if(r<v)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${v})`),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 T=this.hls.startPosition,L=this.hls.liveSyncPosition,O=d?(T!==-1&&T>=s?T:L)||d.start:e;this.log(`Setting startPosition to ${O} to match start frag at live edge. mainStart: ${T} liveSyncPosition: ${L} frag.start: ${(c=d)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=O}}else e<=s&&(d=n[0]);if(!d){const v=this.loadingParts?t.partEnd:t.fragmentEnd;d=this.getFragmentAtPosition(e,v,t)}let p=this.filterReplacedPrimary(d,t);if(!p&&d){const v=d.sn-t.startSN;p=this.filterReplacedPrimary(n[v+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===er.OK||n===er.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(Aa(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(Aa(this.config)&&e.type!==ae.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=nr(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,v=!!(this.loadingParts&&p!=null&&p.length&&d);v&&!this.bitrateTest&&p[p.length-1].fragment.sn===d.sn&&(s=s.concat(d),l=d.sn);let T;if(e<t){var L;const ie=e<this.lastCurrentTime||e>t-c||(L=this.media)!=null&&L.paused||!this.startFragRequested?0:c;T=Hn(i,s,e,ie)}else T=s[s.length-1];if(T){const O=T.sn-n.startSN,ie=this.fragmentTracker.getState(T);if((ie===er.OK||ie===er.PARTIAL&&T.gap)&&(i=T),i&&T.sn===i.sn&&(!v||p[0].fragment.sn>T.sn||!n.live)&&T.level===i.level){const Te=s[O+1];T.sn<l&&this.fragmentTracker.getState(Te)!==er.OK?T=Te:T=null}}return T}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&&m(i);if(s||!l&&!i){As(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&&m(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&&$e(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!==sn.FRAG_LOADING_WAITING_RETRY)&&(this.state=sn.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const Te=this.getCurrentContext(t.chunkMeta);Te&&(t.frag=Te.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===j.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const l=t.errorAction;if(!l){this.state=sn.ERROR;return}const{action:d,flags:c,retryCount:p=0,retryConfig:v}=l,T=!!v,L=T&&d===gn.RetryRequest,O=T&&!l.resolved&&c===Fn.MoveAllAlternatesMatchingHost,ie=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!L&&O&&$e(r)&&!r.endList&&ie&&!gt(t))this.resetFragmentErrors(e),this.treatAsGap(r),l.resolved=!0;else if((L||O)&&p<v.maxNumRetry){var re;const Te=Rn((re=t.response)==null?void 0:re.code),Me=ir(v,p);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+Me,this.state=sn.FRAG_LOADING_WAITING_RETRY,l.resolved=!0,Te){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}/${v.maxNumRetry} in ${Me}ms`)}else if(v)if(this.resetFragmentErrors(e),p<v.maxNumRetry)!s&&d!==gn.RemoveAlternatePermanently&&(l.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${p})`);return}else d===gn.SendAlternateToPenaltyBox?this.state=sn.WAITING_LEVEL:this.state=sn.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!Rn(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=sn.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===sn.PARSING||this.state===sn.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===ae.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==sn.STOPPED&&(this.state=sn.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=rr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===sn.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==sn.STOPPED&&(this.state=sn.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 v=p.endPTS-p.startPTS;if(v<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${v})`),d||!1;const T=r?0:Es(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS,this);return this.hls.trigger(g.LEVEL_PTS_UPDATED,{details:i,level:n,drift:T,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(g.ERROR,{type:ve.MEDIA_ERROR,details:j.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=sn.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(g.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ae.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 Aa(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Ta{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 To(){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,v,T){if(typeof p!="function")throw new TypeError("The listener must be a function");var L=new r(p,v||d,T),O=t?t+c:c;return d._events[O]?d._events[O].fn?d._events[O]=[d._events[O],L]:d._events[O].push(L):(d._events[O]=L,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,v;if(this._eventsCount===0)return c;for(v in p=this._events)e.call(p,v)&&c.push(t?v.slice(1):v);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},l.prototype.listeners=function(c){var p=t?t+c:c,v=this._events[p];if(!v)return[];if(v.fn)return[v.fn];for(var T=0,L=v.length,O=new Array(L);T<L;T++)O[T]=v[T].fn;return O},l.prototype.listenerCount=function(c){var p=t?t+c:c,v=this._events[p];return v?v.fn?1:v.length:0},l.prototype.emit=function(c,p,v,T,L,O){var ie=t?t+c:c;if(!this._events[ie])return!1;var re=this._events[ie],Te=arguments.length,Me,ze;if(re.fn){switch(re.once&&this.removeListener(c,re.fn,void 0,!0),Te){case 1:return re.fn.call(re.context),!0;case 2:return re.fn.call(re.context,p),!0;case 3:return re.fn.call(re.context,p,v),!0;case 4:return re.fn.call(re.context,p,v,T),!0;case 5:return re.fn.call(re.context,p,v,T,L),!0;case 6:return re.fn.call(re.context,p,v,T,L,O),!0}for(ze=1,Me=new Array(Te-1);ze<Te;ze++)Me[ze-1]=arguments[ze];re.fn.apply(re.context,Me)}else{var lt=re.length,bt;for(ze=0;ze<lt;ze++)switch(re[ze].once&&this.removeListener(c,re[ze].fn,void 0,!0),Te){case 1:re[ze].fn.call(re[ze].context);break;case 2:re[ze].fn.call(re[ze].context,p);break;case 3:re[ze].fn.call(re[ze].context,p,v);break;case 4:re[ze].fn.call(re[ze].context,p,v,T);break;default:if(!Me)for(bt=1,Me=new Array(Te-1);bt<Te;bt++)Me[bt-1]=arguments[bt];re[ze].fn.apply(re[ze].context,Me)}}return!0},l.prototype.on=function(c,p,v){return i(this,c,p,v,!1)},l.prototype.once=function(c,p,v){return i(this,c,p,v,!0)},l.prototype.removeListener=function(c,p,v,T){var L=t?t+c:c;if(!this._events[L])return this;if(!p)return s(this,L),this;var O=this._events[L];if(O.fn)O.fn===p&&(!T||O.once)&&(!v||O.context===v)&&s(this,L);else{for(var ie=0,re=[],Te=O.length;ie<Te;ie++)(O[ie].fn!==p||T&&!O[ie].once||v&&O[ie].context!==v)&&re.push(O[ie]);re.length?this._events[L]=re.length===1?re[0]:re:s(this,L)}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=To(),ua=k(Co);const Gs="1.6.15",gs={};function Ga(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Do(){const a=gs[Gs];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[Gs]=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||Gs];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete gs[a||Gs],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 L=new Error(`invalid ADTS sampling index:${s}`);a.emit(g.ERROR,g.ERROR,{type:ve.MEDIA_ERROR,details:j.FRAG_PARSING_ERROR,fatal:!0,error:L,reason:L.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 v=s;(l===5||l===29)&&(v-=3);const T=[l<<3|(v&14)>>1,(v&1)<<7|d<<3];return oe.log(`manifest codec:${n}, parsed codec:${c}, channels:${d}, rate:${p} (ADTS object type:${l} sampling index:${s})`),{config:T,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;E(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:v,headerLength:T}=l,L=T+v,O=Math.max(0,t+L-e.length);O?(d=new Uint8Array(L-T),d.set(e.subarray(t+T,e.length),0)):d=e.subarray(t+T,t+L);const ie={unit:d,pts:s};return O||a.samples.push(ie),{sample:ie,length:L,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 Oa(a,e=0,t=1/0){return qa(a,e,t,Uint8Array)}function qa(a,e,t,n){const r=Oo(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 Oo(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 Po(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=Be(Oa(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=Be(Oa(a.data,3+n,s));let d;return r==="-->"?d=Be(Oa(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 Fe(a){if(a.size<2)return;const e=Be(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=Be(a.data.subarray(t),!0);t+=n.length+1;const r=Be(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Be(a.data.subarray(1));return{key:a.type,info:"",data:e}}function Pa(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=Be(a.data.subarray(t),!0);t+=n.length+1;const r=Be(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Be(a.data);return{key:a.type,info:"",data:e}}function ka(a){return a.type==="PRIV"?Fe(a):a.type[0]==="W"?Pa(a):a.type==="APIC"?Po(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=ka(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 pi=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 Gi(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=zt(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&&m(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:pi.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:pi.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=zt(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Gi(),id3Track:l,textTrack:Gi()}}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:Gi(),id3Track:this._id3Track,textTrack:Gi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(m(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let fa=null;const ko=[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],Fa=[[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=Fo(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 Fo(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=ko[d*14+r-1]*1e3,v=ao[(t===3?0:t===2?1:2)*3+i],T=l===3?1:2,L=Fa[t][n],O=Mo[n],ie=L*8*O,re=Math.floor(L*c/v+s)*O;if(fa===null){const ze=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);fa=ze?parseInt(ze[1]):0}return!!fa&&fa<=87&&n===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:v,channelCount:T,frameLength:re,samplesPerFrame:ie}}}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=Fo(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 y 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 I=(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 H 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=ge(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&&I(e,n)<16}}function ge(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 v=e[t+6]>>5;let T=0;v===2?T+=2:(v&1&&v!==1&&(T+=2),v&4&&(T+=2));const L=(e[t+6]<<8|e[t+7])>>12-T&1,ie=[2,1,2,3,3,4,4,5][v]+L,re=e[t+5]>>3,Te=e[t+5]&7,Me=new Uint8Array([i<<6|re<<1|Te>>2,(Te&3)<<6|v<<3|L<<2|d>>4,d<<4&224]),ze=1536/l*9e4,lt=n+r*ze,bt=e.subarray(t,t+p);return a.config=Me,a.channelCount=ie,a.samplerate=l,a.samples.push({unit:bt,pts:lt}),p}class Ae 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&&I(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(f(e,n))return oe.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 Xe=/\/emsg[-/]ID3/i;class ft{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=Gi("video",1),s=this.audioTrack=Gi("audio",1),l=this.txtTrack=Gi("text",1);if(this.id3Track=Gi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const d=Re(e);if(d.video){const{id:c,timescale:p,codec:v,supplemental:T}=d.video;i.id=c,i.timescale=l.timescale=p,i.codec=v,i.supplemental=T}if(d.audio){const{id:c,timescale:p,codec:v}=d.audio;s.id=c,s.timescale=p,s.codec=v}l.id=Bt.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return Ce(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=zt(this.remainderData,e));const l=Ht(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=Ut(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=Ut(e,t),{videoTrack:t,audioTrack:Gi(),id3Track:r,textTrack:Gi()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=he(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Ze(i);if(Xe.test(s.schemeIdUri)){const l=Ft(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:pi.emsg,duration:d})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=Ft(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:pi.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 Ft(a,e){return m(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class qt{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Sr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Gn.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=_e(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 hn{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,v,T=-1,L=0;for(i===-1&&(T=0,L=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,T>=0){const O={data:t.subarray(T,p),type:L};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=zt(O.data,t.subarray(0,p)),O.state=0))}d<r?(v=this.getNALuType(t,d),T=d,L=v,i=0):i=-1}else i=0}if(T>=0&&i>=0){const O={data:t.subarray(T,r),type:L,state:i};l.push(O)}if(l.length===0){const O=this.getLastNalUnit(e.samples);O&&(O.data=zt(O.data,t))}return e.naluState=i,l}}class yn{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&&oe.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 Cn extends hn{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,v;switch(c.type){case 1:{let ie=!1;l=!0;const re=c.data;if(d&&re.length>4){const Te=this.readSliceType(re);(Te===2||Te===4||Te===7||Te===9)&&(ie=!0)}if(ie){var T;(T=s)!=null&&T.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=ie;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,Lt(c.data,1,n.pts,t.samples);break}case 7:{var L,O;l=!0,d=!0;const ie=c.data,re=this.readSPS(ie);if(!e.sps||e.width!==re.width||e.height!==re.height||((L=e.pixelRatio)==null?void 0:L[0])!==re.pixelRatio[0]||((O=e.pixelRatio)==null?void 0:O[1])!==re.pixelRatio[1]){e.width=re.width,e.height=re.height,e.pixelRatio=re.pixelRatio,e.sps=[ie];const Te=ie.subarray(1,4);let Me="avc1.";for(let ze=0;ze<3;ze++){let lt=Te[ze].toString(16);lt.length<2&&(lt="0"+lt),Me+=lt}e.codec=Me}break}case 8:l=!0,e.pps=[c.data];break;case 9:l=!0,e.audFound=!0,(v=s)!=null&&v.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 yn(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 yn(e);let n=0,r=0,i=0,s=0,l,d,c;const p=t.readUByte.bind(t),v=t.readBits.bind(t),T=t.readUEG.bind(t),L=t.readBoolean.bind(t),O=t.skipBits.bind(t),ie=t.skipEG.bind(t),re=t.skipUEG.bind(t),Te=this.skipScalingList.bind(this);p();const Me=p();if(v(5),O(3),p(),re(),Me===100||Me===110||Me===122||Me===244||Me===44||Me===83||Me===86||Me===118||Me===128){const Yt=T();if(Yt===3&&O(1),re(),re(),O(1),L())for(d=Yt!==3?8:12,c=0;c<d;c++)L()&&(c<6?Te(16,t):Te(64,t))}re();const ze=T();if(ze===0)T();else if(ze===1)for(O(1),ie(),ie(),l=T(),c=0;c<l;c++)ie();re(),O(1);const lt=T(),bt=T(),Qt=v(1);Qt===0&&O(1),O(1),L()&&(n=T(),r=T(),i=T(),s=T());let At=[1,1];if(L()&&L())switch(p()){case 1:At=[1,1];break;case 2:At=[12,11];break;case 3:At=[10,11];break;case 4:At=[16,11];break;case 5:At=[40,33];break;case 6:At=[24,11];break;case 7:At=[20,11];break;case 8:At=[32,11];break;case 9:At=[80,33];break;case 10:At=[18,11];break;case 11:At=[15,11];break;case 12:At=[64,33];break;case 13:At=[160,99];break;case 14:At=[4,3];break;case 15:At=[3,2];break;case 16:At=[2,1];break;case 255:{At=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((lt+1)*16-n*2-r*2),height:(2-Qt)*(bt+1)*16-(Qt?2:4)*(i+s),pixelRatio:At}}}class Yn extends hn{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,v;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 T;(T=s)!=null&&T.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,Lt(c.data,2,n.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=E(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(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 L=this.readSPS(c.data);e.width=L.width,e.height=L.height,e.pixelRatio=L.pixelRatio,e.codec=L.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const O in L.params)e.params[O]=L.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 L=this.readPPS(c.data);for(const O in L)e.params[O]=L[O]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(v=s)!=null&&v.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 yn(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 yn(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(),v=t.readUByte(),T=t.readUByte(),L=t.readUByte(),O=t.readUByte(),ie=t.readUByte(),re=t.readUByte(),Te=t.readUByte(),Me=[],ze=[];for(let Mr=0;Mr<n;Mr++)Me.push(t.readBoolean()),ze.push(t.readBoolean());if(n>0)for(let Mr=n;Mr<8;Mr++)t.readBits(2);for(let Mr=0;Mr<n;Mr++)Me[Mr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),ze[Mr]&&t.readUByte();t.readUEG();const lt=t.readUEG();lt==3&&t.skipBits(1);const bt=t.readUEG(),Qt=t.readUEG(),At=t.readBoolean();let Yt=0,Zt=0,Mt=0,cn=0;At&&(Yt+=t.readUEG(),Zt+=t.readUEG(),Mt+=t.readUEG(),cn+=t.readUEG());const Ln=t.readUEG(),Vn=t.readUEG(),ar=t.readUEG(),Zn=t.readBoolean();for(let Mr=Zn?0:n;Mr<=n;Mr++)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 Ai=0;Ai<4;Ai++)for(let Yi=0;Yi<(Ai===3?2:6);Yi++)if(!t.readBoolean())t.readUEG();else{const rs=Math.min(64,1<<4+(Ai<<1));Ai>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 zn=t.readUEG();let tr=0;for(let Mr=0;Mr<zn;Mr++){let Ai=!1;if(Mr!==0&&(Ai=t.readBoolean()),Ai){Mr===zn&&t.readUEG(),t.readBoolean(),t.readUEG();let Yi=0;for(let ea=0;ea<=tr;ea++){const rs=t.readBoolean();let xa=!1;rs||(xa=t.readBoolean()),(rs||xa)&&Yi++}tr=Yi}else{const Yi=t.readUEG(),ea=t.readUEG();tr=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 Mr=t.readUEG();for(let Ai=0;Ai<Mr;Ai++){for(let Yi=0;Yi<ar+4;Yi++)t.readBits(1);t.readBits(1)}}let Dn=0,In=1,Ar=1,Nr=!0,Tr=1,Rr=0;t.readBoolean(),t.readBoolean();let wi=!1;if(t.readBoolean()){if(t.readBoolean()){const ta=t.readUByte(),pu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Ao=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];ta>0&&ta<16?(In=pu[ta-1],Ar=Ao[ta-1]):ta===255&&(In=t.readBits(16),Ar=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(),wi=t.readBoolean(),wi&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Tr=t.readBits(32),Rr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const Ao=t.readBoolean(),gu=t.readBoolean();let za=!1;(Ao||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++){Nr=t.readBoolean();const K0=Nr||t.readBoolean();let yu=!1;K0?t.readEG():yu=t.readBoolean();const _u=yu?1:t.readUEG()+1;if(Ao)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(),Dn=t.readUEG())}let Zi=bt,ds=Qt;if(At){let Mr=1,Ai=1;lt===1?Mr=Ai=2:lt==2&&(Mr=2),Zi=bt-Mr*Zt-Mr*Yt,ds=Qt-Ai*cn-Ai*Mt}const Js=r?["A","B","C"][r]:"",H0=l<<24|d<<16|c<<8|p;let hl=0;for(let Mr=0;Mr<32;Mr++)hl=(hl|(H0>>Mr&1)<<31-Mr)>>>0;let fl=hl.toString(16);return s===1&&fl==="2"&&(fl="6"),{codecString:`hvc1.${Js}${s}.${fl}.${i?"H":"L"}${Te}.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:[v,T,L,O,ie,re],general_level_idc:Te,bit_depth:Ln+8,bit_depth_luma_minus8:Ln,bit_depth_chroma_minus8:Vn,min_spatial_segmentation_idc:Dn,chroma_format_idc:lt,frame_rate:{fixed:Nr,fps:Rr/Tr}},width:Zi,height:ds,pixelRatio:[In,Ar]}}readPPS(e){const t=new yn(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 Jn=188;class hr{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=hr.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(Jn*5,t-Jn)+1,r=0;for(;r<n;){let i=!1,s=-1,l=0;for(let d=r;d<t;d+=Jn)if(e[d]===71&&(t-d===Jn||e[d+Jn]===71)){if(l++,s===-1&&(s=d,s!==0&&(n=Math.min(s+Jn*99,e.length-Jn)+1)),i||(i=yr(e,d)===0),i&&l>1&&(s===0&&l>2||d+Jn>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:Bt[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=hr.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=hr.createTrack("audio",r),this._id3Track=hr.createTrack("id3"),this._txtTrack=hr.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,v=s.pesData,T=l.pid,L=d.pid,O=l.pesData,ie=d.pesData,re=null,Te=this.pmtParsed,Me=this._pmtId,ze=e.length;if(this.remainderData&&(e=zt(this.remainderData,e),ze=e.length,this.remainderData=null),ze<Jn&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};const lt=Math.max(0,hr.syncOffset(e));ze-=(ze-lt)%Jn,ze<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,ze,e.buffer.byteLength-ze));let bt=0;for(let At=lt;At<ze;At+=Jn)if(e[At]===71){const Yt=!!(e[At+1]&64),Zt=yr(e,At),Mt=(e[At+3]&48)>>4;let cn;if(Mt>1){if(cn=At+5+e[At+4],cn===At+Jn)continue}else cn=At+4;switch(Zt){case p:Yt&&(v&&(i=zr(v,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),v={data:[],size:0}),v&&(v.data.push(e.subarray(cn,At+Jn)),v.size+=At+Jn-cn);break;case T:if(Yt){if(O&&(i=zr(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(cn,At+Jn)),O.size+=At+Jn-cn);break;case L:Yt&&(ie&&(i=zr(ie,this.logger))&&this.parseID3PES(d,i),ie={data:[],size:0}),ie&&(ie.data.push(e.subarray(cn,At+Jn)),ie.size+=At+Jn-cn);break;case 0:Yt&&(cn+=e[cn]+1),Me=this._pmtId=Gr(e,cn);break;case Me:{Yt&&(cn+=e[cn]+1);const Ln=Br(e,cn,this.typeSupported,n,this.observer,this.logger);p=Ln.videoPid,p>0&&(s.pid=p,s.segmentCodec=Ln.segmentVideoCodec),T=Ln.audioPid,T>0&&(l.pid=T,l.segmentCodec=Ln.segmentAudioCodec),L=Ln.id3Pid,L>0&&(d.pid=L),re!==null&&!Te&&(this.logger.warn(`MPEG-TS PMT found at ${At} after unknown PID '${re}'. Backtracking to sync byte @${lt} to parse all TS packets.`),re=null,At=lt-188),Te=this.pmtParsed=!0;break}case 17:case 8191:break;default:re=Zt;break}}else bt++;bt>0&&Wr(this.observer,new Error(`Found ${bt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=v,l.pesData=O,d.pesData=ie;const Qt={audioTrack:l,videoTrack:s,id3Track:d,textTrack:c};return r&&this.extractRemainingSamples(Qt),Qt}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=zr(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=zr(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=zr(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 qt(this.observer,this.config,t);return this.decrypt(r,i)}readyVideoParser(e){this.videoParser===null&&(e==="avc"?this.videoParser=new Cn:e==="hevc"&&(this.videoParser=new Yn))}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 v=r.missing,T=r.sample.unit.byteLength;if(v===-1)i=zt(r.sample.unit,i);else{const L=T-v;r.sample.unit.set(i.subarray(0,v),L),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 v;const T=s<l-1;if(T?v=`AAC PES did not start with ADTS header,offset:${s}`:v="No ADTS header found in AAC PES",Wr(this.observer,new Error(v),T,this.logger),!T)return}Ra(e,this.observer,i,s,this.audioCodec);let d;if(t.pts!==void 0)d=t.pts;else if(r){const v=Xa(e.samplerate);d=r.sample.pts+v}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=ge(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=E({},t,{type:this._videoTrack?pi.emsg:pi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function yr(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Gr(a,e){return(a[e+10]&31)<<8|a[e+11]}function Br(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=yr(a,e),v=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){Vr("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){Vr("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){Vr("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&&v>0){let T=e+5,L=v;for(;L>2;){switch(a[T]){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 ie=a[T+1]+2;T+=ie,L-=ie}}break;case 194:case 135:return Wr(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+=v+5}return s}function Wr(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(g.ERROR,g.ERROR,{type:ve.MEDIA_ERROR,details:j.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function Vr(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function zr(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]=zt(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 v=i+9;if(a.size<=v)return null;a.size-=v;const T=new Uint8Array(a.size);for(let L=0,O=d.length;L<O;L++){n=d[L];let ie=n.byteLength;if(v)if(v>ie){v-=ie;continue}else n=n.subarray(v),ie-=v,v=0;T.set(n,t),t+=ie}return r&&(r-=i+3),{data:T,pts:s,dts:l,len:r}}return null}class gi{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 Qr=Math.pow(2,32)-1;class _t{static init(){_t.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 _t.types)_t.types.hasOwnProperty(e)&&(_t.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]);_t.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]);_t.STTS=_t.STSC=_t.STCO=i,_t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),_t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),_t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),_t.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]);_t.FTYP=_t.box(_t.types.ftyp,s,d,s,l),_t.DINF=_t.box(_t.types.dinf,_t.box(_t.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 _t.box(_t.types.hdlr,_t.HDLR_TYPES[e])}static mdat(e){return _t.box(_t.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(Qr+1)),r=Math.floor(t%(Qr+1));return _t.box(_t.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 _t.box(_t.types.mdia,_t.mdhd(e.timescale||0,e.duration||0),_t.hdlr(e.type),_t.minf(e))}static mfhd(e){return _t.box(_t.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"?_t.box(_t.types.minf,_t.box(_t.types.smhd,_t.SMHD),_t.DINF,_t.stbl(e)):_t.box(_t.types.minf,_t.box(_t.types.vmhd,_t.VMHD),_t.DINF,_t.stbl(e))}static moof(e,t,n){return _t.box(_t.types.moof,_t.mfhd(e),_t.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=_t.trak(e[t]);return _t.box.apply(null,[_t.types.moov,_t.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(_t.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=_t.trex(e[t]);return _t.box.apply(null,[_t.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(Qr+1)),r=Math.floor(t%(Qr+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 _t.box(_t.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 _t.box(_t.types.sdtp,n)}static stbl(e){return _t.box(_t.types.stbl,_t.stsd(e),_t.box(_t.types.stts,_t.STTS),_t.box(_t.types.stsc,_t.STSC),_t.box(_t.types.stsz,_t.STSZ),_t.box(_t.types.stco,_t.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=_t.box(_t.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],v=e.pixelRatio[1];return _t.box(_t.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,_t.box(_t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),_t.box(_t.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,v>>24,v>>16&255,v>>8&255,v&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 _t.box(_t.types.mp4a,_t.audioStsd(e),_t.box(_t.types.esds,_t.esds(e)))}static mp3(e){return _t.box(_t.types[".mp3"],_t.audioStsd(e))}static ac3(e){return _t.box(_t.types["ac-3"],_t.audioStsd(e),_t.box(_t.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return _t.box(_t.types.stsd,_t.STSD,_t.mp4a(e));if(t==="ac3"&&e.config)return _t.box(_t.types.stsd,_t.STSD,_t.ac3(e));if(t==="mp3"&&e.codec==="mp3")return _t.box(_t.types.stsd,_t.STSD,_t.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return _t.box(_t.types.stsd,_t.STSD,_t.avc1(e));if(t==="hevc"&&e.vps)return _t.box(_t.types.stsd,_t.STSD,_t.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/(Qr+1)),l=Math.floor(n%(Qr+1));return _t.box(_t.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=_t.sdtp(e),r=e.id,i=Math.floor(t/(Qr+1)),s=Math.floor(t%(Qr+1));return _t.box(_t.types.traf,_t.box(_t.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),_t.box(_t.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])),_t.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,_t.box(_t.types.trak,_t.tkhd(e),_t.mdia(e))}static trex(e){const t=e.id;return _t.box(_t.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,v,T;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,v=d.flags,T=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,v.isLeading<<2|v.dependsOn,v.isDependedOn<<6|v.hasRedundancy<<4|v.paddingValue<<1|v.isNonSync,v.degradPrio&61440,v.degradPrio&15,T>>>24&255,T>>>16&255,T>>>8&255,T&255],12+16*l);return _t.box(_t.types.trun,s)}static initSegment(e){_t.types||_t.init();const t=_t.moov(e);return zt(_t.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 ie=0;ie<n[O].length;ie+=1)s+=2+n[O][ie].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 ie=0;ie<n[O].length;ie+=1)l.set(new Uint8Array([n[O][ie].length>>8,n[O][ie].length&255]),s),s+=2,l.set(n[O][ie],s),s+=n[O][ie].length}const c=_t.box(_t.types.hvcC,l),p=e.width,v=e.height,T=e.pixelRatio[0],L=e.pixelRatio[1];return _t.box(_t.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,v>>8&255,v&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,_t.box(_t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),_t.box(_t.types.pasp,new Uint8Array([T>>24,T>>16&255,T>>8&255,T&255,L>>24,L>>16&255,L>>8&255,L&255])))}}_t.types=void 0,_t.HDLR_TYPES=void 0,_t.STTS=void 0,_t.STSC=void 0,_t.STCO=void 0,_t.STSZ=void 0,_t.VMHD=void 0,_t.SMHD=void 0,_t.STSD=void 0,_t.FTYP=void 0,_t.DINF=void 0;const Ri=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 ii(a,e=!1){return Wi(a,1e3,1/Ri,e)}function os(a,e=1){return Wi(a,Ri,1/e)}function Vi(a){const{baseTime:e,timescale:t,trackId:n}=a;return`${e/t} (${e}/${t}) trackId: ${n}`}const lo=10*1e3,Bo=1024,Os=1152,Ps=1536;let zi=null,ks=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 ma 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(ks===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);ks=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=Li(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,v,T,L,O,ie=i,re=i;const Te=e.pid>-1,Me=t.pid>-1,ze=t.samples.length,lt=e.samples.length>0,bt=l&&ze>0||ze>1;if((!Te||lt)&&(!Me||bt)||this.ISGenerated||l){if(this.ISGenerated){var At,Yt,Zt,Mt;const ar=this.videoTrackConfig;(ar&&(t.width!==ar.width||t.height!==ar.height||((At=t.pixelRatio)==null?void 0:At[0])!==((Yt=ar.pixelRatio)==null?void 0:Yt[0])||((Zt=t.pixelRatio)==null?void 0:Zt[1])!==((Mt=ar.pixelRatio)==null?void 0:Mt[1]))||!ar&&bt||this.nextAudioTs===null&<)&&this.resetInitSegment()}this.ISGenerated||(v=this.generateIS(e,t,i,s));const cn=this.isVideoContiguous;let Ln=-1,Vn;if(bt&&(Ln=No(t.samples),!cn&&this.config.forceKeyFrameOnDiscontinuity))if(O=!0,Ln>0){this.warn(`Dropped ${Ln} out of ${ze} video samples due to a missing keyframe`);const ar=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Ln),t.dropped+=Ln,re+=(t.samples[0].pts-ar)/t.inputTimeScale,Vn=re}else Ln===-1&&(this.warn(`No keyframe found out of ${ze} video samples`),O=!1);if(this.ISGenerated){if(lt&&bt){const ar=this.getVideoStartPts(t.samples),wn=(Li(e.samples[0].pts,ar)-ar)/t.inputTimeScale;ie+=Math.max(0,wn),re+=Math.max(0,-wn)}if(lt){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),v=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,ie,this.isAudioContiguous,s,Me||bt||d===ae.AUDIO?re:void 0),bt){const ar=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),v=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,re,cn,ar)}}else bt&&(c=this.remuxVideo(t,re,cn,0));c&&(c.firstKeyFrame=Ln,c.independent=Ln!==-1,c.firstKeyFramePTS=Vn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(L=pa(n,i,this._initPTS,this._initDTS)),r.samples.length&&(T=Ba(r,i,this._initPTS))),{audio:p,video:c,initSegment:v,independent:O,text:T,id3:L}}computeInitPts(e,t,n,r){const i=Math.round(n*t);let s=Li(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,v="audio/mp4",T,L,O,ie=-1;if(p&&(T=L=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(v="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}d.audio={id:"audio",container:v,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):_t.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(ie=e.id,O=e.inputTimeScale,!c||O!==c.timescale?T=L=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:_t.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(ie=t.id,O=t.inputTimeScale,!c||O!==c.timescale){const re=this.getVideoStartPts(s),Te=Li(s[0].dts,re),Me=this.computeInitPts(Te,O,n,"video"),ze=this.computeInitPts(re,O,n,"video");L=Math.min(L,Me),T=Math.min(T,ze)}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} ${T/O} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${T/O} (${T}/${O}) trackId: ${ie}`),this._initPTS={baseTime:T,timescale:O,trackId:ie},this._initDTS={baseTime:L,timescale:O,trackId:ie}):T=O=void 0,{tracks:d,initPTS:T,timescale:O,trackId:ie}}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 v=this.nextVideoTs,T=8,L=this.videoSampleDuration,O,ie,re=Number.POSITIVE_INFINITY,Te=Number.NEGATIVE_INFINITY,Me=!1;if(!n||v===null){const Dn=p+t*i,In=s[0].pts-Li(s[0].dts,s[0].pts);zi&&v!==null&&Math.abs(Dn-In-(v+p))<15e3?n=!0:v=Dn-In-p}const ze=v+p;for(let Dn=0;Dn<d;Dn++){const In=s[Dn];In.pts=Li(In.pts,ze),In.dts=Li(In.dts,ze),In.dts<s[Dn>0?Dn-1:Dn].dts&&(Me=!0)}Me&&s.sort(function(Dn,In){const Ar=Dn.dts-In.dts,Nr=Dn.pts-In.pts;return Ar||Nr}),O=s[0].dts,ie=s[s.length-1].dts;const lt=ie-O,bt=lt?Math.round(lt/(d-1)):L||e.inputTimeScale/30;if(n){const Dn=O-ze,In=Dn>bt,Ar=Dn<-1;if((In||Ar)&&(In?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ii(Dn,!0)} ms (${Dn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${ii(-Dn,!0)} ms (${Dn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Ar||ze>=s[0].pts||zi)){O=ze;const Nr=s[0].pts-Dn;if(In)s[0].dts=O,s[0].pts=Nr;else{let Tr=!0;for(let Rr=0;Rr<s.length&&!(s[Rr].dts>Nr&&Tr);Rr++){const wi=s[Rr].pts;if(s[Rr].dts-=Dn,s[Rr].pts-=Dn,Rr<s.length-1){const xi=s[Rr+1].pts,Zi=s[Rr].pts,ds=xi<=Zi,Js=xi<=wi;Tr=ds==Js}}}this.log(`Video: Initial PTS/DTS adjusted: ${ii(Nr,!0)}/${ii(O,!0)}, delta: ${ii(Dn,!0)} ms`)}}O=Math.max(0,O);let Qt=0,At=0,Yt=O;for(let Dn=0;Dn<d;Dn++){const In=s[Dn],Ar=In.units,Nr=Ar.length;let Tr=0;for(let Rr=0;Rr<Nr;Rr++)Tr+=Ar[Rr].data.length;At+=Tr,Qt+=Nr,In.length=Tr,In.dts<Yt?(In.dts=Yt,Yt+=bt/4|0||1):Yt=In.dts,re=Math.min(In.pts,re),Te=Math.max(In.pts,Te)}ie=s[d-1].dts;const Zt=At+4*Qt+8;let Mt;try{Mt=new Uint8Array(Zt)}catch(Dn){this.observer.emit(g.ERROR,g.ERROR,{type:ve.MUX_ERROR,details:j.REMUX_ALLOC_ERROR,fatal:!1,error:Dn,bytes:Zt,reason:`fail allocating video mdat ${Zt}`});return}const cn=new DataView(Mt.buffer);cn.setUint32(0,Zt),Mt.set(_t.types.mdat,4);let Ln=!1,Vn=Number.POSITIVE_INFINITY,ar=Number.POSITIVE_INFINITY,Zn=Number.NEGATIVE_INFINITY,wn=Number.NEGATIVE_INFINITY;for(let Dn=0;Dn<d;Dn++){const In=s[Dn],Ar=In.units;let Nr=0;for(let wi=0,xi=Ar.length;wi<xi;wi++){const Zi=Ar[wi],ds=Zi.data,Js=Zi.data.byteLength;cn.setUint32(T,Js),T+=4,Mt.set(ds,T),T+=Js,Nr+=4+Js}let Tr;if(Dn<d-1)L=s[Dn+1].dts-In.dts,Tr=s[Dn+1].pts-In.pts;else{const wi=this.config,xi=Dn>0?In.dts-s[Dn-1].dts:bt;if(Tr=Dn>0?In.pts-s[Dn-1].pts:bt,wi.stretchShortVideoTrack&&this.nextAudioTs!==null){const Zi=Math.floor(wi.maxBufferHole*i),ds=(r?re+r*i:this.nextAudioTs+p)-In.pts;ds>Zi?(L=ds-xi,L<0?L=xi:Ln=!0,this.log(`It is approximately ${ds/90} ms to the next segment; using duration ${L/90} ms for the last video frame.`)):L=xi}else L=xi}const Rr=Math.round(In.pts-In.dts);Vn=Math.min(Vn,L),Zn=Math.max(Zn,L),ar=Math.min(ar,Tr),wn=Math.max(wn,Tr),l.push(Ys(In.key,L,Nr,Rr))}if(l.length){if(zi){if(zi<70){const Dn=l[0].flags;Dn.dependsOn=2,Dn.isNonSync=0}}else if(ks&&wn-ar<Zn-Vn&&bt/Zn<.025&&l[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Dn=O;for(let In=0,Ar=l.length;In<Ar;In++){const Nr=Dn+l[In].duration,Tr=Dn+l[In].cts;if(In<Ar-1){const Rr=Nr+l[In+1].cts;l[In].duration=Rr-Tr}else l[In].duration=In?l[In-1].duration:bt;l[In].cts=0,Dn=Nr}}}L=Ln||!L?bt:L;const Qn=ie+L;this.nextVideoTs=v=Qn-p,this.videoSampleDuration=L,this.isVideoContiguous=!0;const mr={data1:_t.moof(e.sequenceNumber++,O,E(e,{samples:l})),data2:Mt,startPTS:(re-p)/i,endPTS:(Te+L-p)/i,startDTS:(O-p)/i,endDTS:v/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,mr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Os;case"ac3":return Ps;default:return Bo}}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,v=this._initPTS,T=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,L=[],O=i!==void 0;let ie=e.samples,re=T?0:8,Te=this.nextAudioTs||-1;const Me=v.baseTime*s/v.timescale,ze=Me+t*s;if(this.isAudioContiguous=n=n||ie.length&&Te>0&&(r&&Math.abs(ze-(Te+Me))<9e3||Math.abs(Li(ie[0].pts,ze)-(Te+Me))<20*p),ie.forEach(function(wn){wn.pts=Li(wn.pts,ze)}),!n||Te<0){const wn=ie.length;if(ie=ie.filter(Qn=>Qn.pts>=0),wn!==ie.length&&this.warn(`Removed ${ie.length-wn} of ${wn} samples (initPTS ${Me} / ${s})`),!ie.length)return;i===0?Te=0:r&&!O?Te=Math.max(0,ze-Me):Te=ie[0].pts-Me}if(e.segmentCodec==="aac"){const wn=this.config.maxAudioFramesDrift;for(let Qn=0,zn=Te+Me;Qn<ie.length;Qn++){const tr=ie[Qn],mr=tr.pts,Dn=mr-zn,In=Math.abs(1e3*Dn/s);if(Dn<=-wn*p&&O)Qn===0&&(this.warn(`Audio frame @ ${(mr/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*Dn/s)} ms.`),this.nextAudioTs=Te=mr-Me,zn=mr);else if(Dn>=wn*p&&In<lo&&O){let Ar=Math.round(Dn/p);for(zn=mr-Ar*p;zn<0&&Ar&&p;)Ar--,zn+=p;Qn===0&&(this.nextAudioTs=Te=zn-Me),this.warn(`Injecting ${Ar} audio frames @ ${((zn-Me)/s).toFixed(3)}s due to ${Math.round(1e3*Dn/s)} ms gap.`);for(let Nr=0;Nr<Ar;Nr++){let Tr=gi.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Tr||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Tr=tr.unit.subarray()),ie.splice(Qn,0,{unit:Tr,pts:zn}),zn+=p,Qn++}}tr.pts=zn,zn+=p}}let lt=null,bt=null,Qt,At=0,Yt=ie.length;for(;Yt--;)At+=ie[Yt].unit.byteLength;for(let wn=0,Qn=ie.length;wn<Qn;wn++){const zn=ie[wn],tr=zn.unit;let mr=zn.pts;if(bt!==null){const In=L[wn-1];In.duration=Math.round((mr-bt)/d)}else if(n&&e.segmentCodec==="aac"&&(mr=Te+Me),lt=mr,At>0){At+=re;try{Qt=new Uint8Array(At)}catch(In){this.observer.emit(g.ERROR,g.ERROR,{type:ve.MUX_ERROR,details:j.REMUX_ALLOC_ERROR,fatal:!1,error:In,bytes:At,reason:`fail allocating audio mdat ${At}`});return}T||(new DataView(Qt.buffer).setUint32(0,At),Qt.set(_t.types.mdat,4))}else return;Qt.set(tr,re);const Dn=tr.byteLength;re+=Dn,L.push(Ys(!0,c,Dn,0)),bt=mr}const Zt=L.length;if(!Zt)return;const Mt=L[L.length-1];Te=bt-Me,this.nextAudioTs=Te+d*Mt.duration;const cn=T?new Uint8Array(0):_t.moof(e.sequenceNumber++,lt/d,E({},e,{samples:L}));e.samples=[];const Ln=(lt-Me)/s,Vn=this.nextAudioTs/s,Zn={data1:cn,data2:Qt,startPTS:Ln,endPTS:Vn,startDTS:Ln,endDTS:Vn,type:"audio",hasAudio:!0,hasVideo:!1,nb:Zt};return this.isAudioContiguous=!0,Zn}}function Li(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function No(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function pa(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=Li(d.pts-t.baseTime*i/t.timescale,e*i)/i,d.dts=Li(d.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Ba(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=Li(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=Re(e);if(t)ut(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=ml(i,V.AUDIO,this)),s&&(r=ml(s,V.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 v={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};m(p)||(p=this.lastEndTime=i||0);const T=t.samples;if(!T.length)return v;const L={initPTS:void 0,timescale:void 0,trackId:void 0};let O=this.initData;if((l=O)!=null&&l.length||(this.generateInitSegment(T),O=this.initData),!((d=O)!=null&&d.length))return this.warn("Failed to generate initSegment."),v;this.emitInitSegment&&(L.tracks=this.initTracks,this.emitInitSegment=!1);const ie=kt(T,O,this),re=O.audio?ie[O.audio.id]:null,Te=O.video?ie[O.video.id]:null,Me=Xs(Te,1/0),ze=Xs(re,1/0),lt=Xs(Te,0,!0),bt=Xs(re,0,!0);let Qt=i,At=0;const Yt=re&&(!Te||!c&&ze<Me||c&&c.trackId===O.audio.id),Zt=Yt?re:Te;if(Zt){const zn=Zt.timescale,tr=Zt.start-i*zn,mr=Yt?O.audio.id:O.video.id;Qt=Zt.start/zn,At=Yt?bt-ze:lt-Me,(s||!c)&&(ga(c,Qt,i,At)||zn!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${tr/zn} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${Qt-i} (${tr}/${zn}) trackId: ${mr}`),c=null,L.initPTS=tr,L.timescale=zn,L.trackId=mr)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(L.initPTS=c.baseTime,L.timescale=c.timescale,L.trackId=c.trackId):((!L.timescale||L.trackId===void 0||L.initPTS===void 0)&&(this.warn("Could not set initPTS"),L.initPTS=Qt,L.timescale=1,L.trackId=-1),this.initPTS=c={baseTime:L.initPTS,timescale:L.timescale,trackId:L.trackId});const Mt=Qt-c.baseTime/c.timescale,cn=Mt+At;At>0?this.lastEndTime=cn:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Ln=!!O.audio,Vn=!!O.video;let ar="";Ln&&(ar+="audio"),Vn&&(ar+="video");const Zn=(O.audio?O.audio.encrypted:!1)||(O.video?O.video.encrypted:!1),wn={data1:T,startPTS:Mt,startDTS:Mt,endPTS:cn,endDTS:cn,type:ar,hasAudio:Ln,hasVideo:Vn,nb:1,dropped:0,encrypted:Zn};v.audio=Ln&&!Vn?wn:void 0,v.video=Vn?wn:void 0;const Qn=Te==null?void 0:Te.sampleCount;if(Qn){const zn=Te.keyFrameIndex,tr=zn!==-1;wn.nb=Qn,wn.dropped=zn===0||this.isVideoContiguous?0:tr?zn:Qn,wn.independent=tr,wn.firstKeyFrame=zn,tr&&Te.keyFrameStart&&(wn.firstKeyFramePTS=(Te.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(v.independent=tr),this.isVideoContiguous||(this.isVideoContiguous=tr),wn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${zn}/${Qn} dropped: ${wn.dropped} start: ${wn.firstKeyFramePTS||"NA"}`)}return v.initSegment=L,v.id3=pa(n,i,c,c),r.samples.length&&(v.text=Ba(r,i,c)),v}}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 ml(a,e,t){const n=a.codec;return n&&n.length>4?n:e===V.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?J(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:ft,remux:uo},{demux:hr,remux:ma},{demux:y,remux:ma},{demux:Ae,remux:ma}];co.splice(2,0,{demux:H,remux:ma});class pl{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:v,accurateTimeOffset:T,timeOffset:L,initSegmentChange:O}=r||l,{audioCodec:ie,videoCodec:re,defaultInitPts:Te,duration:Me,initSegmentData:ze}=d,lt=Su(s,t);if(lt&&vi(lt.method)){const Yt=this.getDecrypter(),Zt=Hi(lt.method);if(Yt.isSync()){let Mt=Yt.softwareDecrypt(s,lt.key.buffer,lt.iv.buffer,Zt);if(n.part>-1){const Ln=Yt.flush();Mt=Ln&&Ln.buffer}if(!Mt)return i.executeEnd=vs(),$o(n);s=new Uint8Array(Mt)}else return this.asyncResult=!0,this.decryptionPromise=Yt.webCryptoDecrypt(s,lt.key.buffer,lt.iv.buffer,Zt).then(Mt=>{const cn=this.push(Mt,null,n);return this.decryptionPromise=null,cn}),this.decryptionPromise}const bt=this.needsProbing(p,v);if(bt){const Yt=this.configureTransmuxer(s);if(Yt)return this.logger.warn(`[transmuxer] ${Yt.message}`),this.observer.emit(g.ERROR,g.ERROR,{type:ve.MEDIA_ERROR,details:j.FRAG_PARSING_ERROR,fatal:!1,error:Yt,reason:Yt.message}),i.executeEnd=vs(),$o(n)}(p||v||O||bt)&&this.resetInitSegment(ze,ie,re,Me,t),(p||O||bt)&&this.resetInitialTimestamp(Te),c||this.resetContiguity();const Qt=this.transmux(s,lt,L,T,n);this.asyncResult=Na(Qt);const At=this.currentTransmuxState;return At.contiguous=!0,At.discontinuity=!1,At.trackSwitch=!1,i.executeEnd=vs(),Qt}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 v=n.flush();v&&s.push(this.push(v.buffer,null,e))}const{demuxer:d,remuxer:c}=this;if(!d||!c){t.executeEnd=vs();const v=[$o(e)];return this.asyncResult?Promise.resolve(v):v}const p=d.flush(l);return Na(p)?(this.asyncResult=!0,p.then(v=>(this.flushRemux(s,v,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===ae.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 v=0,T=co.length;v<T;v++){var s;if((s=co[v].demux)!=null&&s.probe(e,this.logger)){i=co[v];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 Sr(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 Na(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 Au{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 v;const T=(v=this.workerContext)==null?void 0:v.objectURL;T&&self.URL.revokeObjectURL(T);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(g.ERROR,{type:ve.OTHER_ERROR,details:j.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(d,c)=>{c=c||{},c.frag=this.frag||void 0,d===g.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(g.FRAG_DECRYPTED,s),this.observer.on(g.ERROR,s);const l=rn(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const d=this.hls.logger;if(i.workerPath||Ga()){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:it(i)})}catch(p){d.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new pl(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new pl(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=rn(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:it(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 v,T;c.transmuxing.start=self.performance.now();const{instanceNo:L,transmuxer:O}=this,ie=s?s.start:i.start,re=i.decryptdata,Te=this.frag,Me=!(Te&&i.cc===Te.cc),ze=!(Te&&c.level===Te.level),lt=Te?c.sn-Te.sn:-1,bt=this.part?c.part-this.part.index:-1,Qt=lt===0&&c.id>1&&c.id===(Te==null?void 0:Te.stats.chunkCount),At=!ze&&(lt===1||lt===0&&(bt===1||Qt&&bt<=0)),Yt=self.performance.now();(ze||lt||i.stats.parsing.start===0)&&(i.stats.parsing.start=Yt),s&&(bt||!At)&&(s.stats.parsing.start=Yt);const Zt=!(Te&&((v=i.initSegment)==null?void 0:v.url)===((T=Te.initSegment)==null?void 0:T.url)),Mt=new Au(Me,At,d,ze,ie,Zt);if(!At||Me||Zt){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===ae.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
|
discontinuity: ${Me}
|
|
|
trackSwitch: ${ze}
|
|
|
contiguous: ${At}
|
|
|
accurateTimeOffset: ${d}
|
|
|
timeOffset: ${ie}
|
|
|
initSegmentChange: ${Zt}`);const cn=new wu(n,r,t,l,p);this.configureTransmuxer(cn)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:L,cmd:"demux",data:e,decryptdata:re,chunkMeta:c,state:Mt},e instanceof ArrayBuffer?[e]:[]);else if(O){const cn=O.push(e,re,c,Mt);Na(cn)?cn.then(Ln=>{this.handleTransmuxComplete(Ln)}).catch(Ln=>{this.transmuxerError(Ln,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(cn)}}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);Na(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(g.ERROR,{type:ve.MEDIA_ERROR,details:j.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason: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 Tu extends Ks{constructor(e,t,n){super(e,t,n,"audio-stream-controller",ae.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(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===ae.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===sn.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===sn.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=nr(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===sn.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=sn.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=sn.IDLE):this.state=sn.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case sn.IDLE:this.doTickIdle();break;case sn.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=sn.WAITING_INIT_PTS}break}case sn.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case sn.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=sn.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=sn.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=sn.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,V.AUDIO,ae.AUDIO));const p=this.getFwdBufferInfo(c,ae.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,d)){t.trigger(g.BUFFER_EOS,{type:"audio"}),this.state=sn.ENDED;return}const v=p.len,T=t.maxBufferLength,L=d.fragments,O=L[0].start,ie=this.getLoadPosition(),re=this.flushing?ie:p.end;if(this.switchingTrack&&r){const ze=ie;d.PTSKnown&&ze<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(v>=T&&!this.switchingTrack&&re<L[L.length-1].start)return;let Te=this.getNextFragment(re,d);if(Te&&this.isLoopLoading(Te,re)&&(Te=this.getNextFragmentLoopLoading(Te,d,p,ae.MAIN,T)),!Te){this.bufferFlushed=!0;return}let Me=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Me&&$e(Te)&&!Te.endList&&(!d.live||!this.loadingParts&&re<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Me)===er.OK&&(this.mainFragLoading=Me=null),Me&&$e(Me))){if(Te.start>Me.end){const lt=this.fragmentTracker.getFragAtPos(re,ae.MAIN);lt&<.end>Me.end&&(Me=lt,this.mainFragLoading={frag:lt,targetBufferTime:null})}if(Te.start>Me.end)return}this.loadFragment(Te,l,re)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new Et(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!==sn.STOPPED&&(this.setInterval(yl),this.state=sn.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(g.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!==sn.STOPPED&&(this.state=sn.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 v=0;if(i.live||(n=p.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var T;v=this.alignPlaylists(i,p.details,(T=this.levelLastLoaded)==null?void 0:T.details)}i.alignedSliding||(Ts(i,c),i.alignedSliding||Cs(i,c),v=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,v),this.hls.trigger(g.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===sn.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=sn.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 v=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let T=this.transmuxer;T||(T=this.transmuxer=new vl(this.hls,ae.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const L=this.initPTS[n.cc],O=(t=n.initSegment)==null?void 0:t.data;if(L!==void 0){const re=r?r.index:-1,Te=re!==-1,Me=new di(n.level,n.sn,n.stats.chunkCount,i.byteLength,re,Te);T.push(i,O,v,"",n,r,p.totalduration,!1,Me,L)}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:ie}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Ta,complete:!1};ie.push(new Uint8Array(i)),this.state!==sn.STOPPED&&(this.state=sn.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===ae.MAIN&&$e(t.frag)&&(this.mainFragLoading=t,this.state===sn.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==ae.AUDIO){!this.audioOnly&&n.type===ae.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($e(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(g.AUDIO_TRACK_SWITCHED,C({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=sn.ERROR;return}switch(t.details){case j.FRAG_GAP:case j.FRAG_PARSING_ERROR:case j.FRAG_DECRYPT_ERROR:case j.FRAG_LOAD_ERROR:case j.FRAG_LOAD_TIMEOUT:case j.KEY_LOAD_ERROR:case j.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ae.AUDIO,t);break;case j.AUDIO_TRACK_LOAD_ERROR:case j.AUDIO_TRACK_LOAD_TIMEOUT:case j.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===sn.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===de.AUDIO_TRACK&&(this.state=sn.IDLE);break;case j.BUFFER_ADD_CODEC_ERROR:case j.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case j.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case j.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==V.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==V.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===sn.ENDED&&(this.state=sn.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,ae.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:v}=p,{audio:T,text:L,id3:O,initSegment:ie}=i;if(this.fragContextChanged(d)||!v){this.fragmentTracker.removeFragment(d);return}if(this.state=sn.PARSING,this.switchingTrack&&T&&this.completeAudioSwitch(this.switchingTrack),ie!=null&&ie.tracks){const re=d.initSegment||d;if(this.unhandledEncryptionError(ie,d))return;this._bufferInitSegment(p,ie.tracks,re,s),r.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:re,id:n,tracks:ie.tracks})}if(T){const{startPTS:re,endPTS:Te,startDTS:Me,endDTS:ze}=T;c&&(c.elementaryStreams[V.AUDIO]={startPTS:re,endPTS:Te,startDTS:Me,endDTS:ze}),d.setElementaryStreamInfo(V.AUDIO,re,Te,Me,ze),this.bufferFragmentData(T,d,c,s)}if(O!=null&&(t=O.samples)!=null&&t.length){const re=E({id:n,frag:d,details:v},O);r.trigger(g.FRAG_PARSING_METADATA,re)}if(L){const re=E({id:n,frag:d,details:v},L);r.trigger(g.FRAG_PARSING_USERDATA,re)}}_bufferInitSegment(e,t,n,r){if(this.state!==sn.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=ae.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(g.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(g.BUFFER_APPENDING,d)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===er.NOT_LOADED||r===er.PARTIAL){var i;if(!$e(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=sn.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;dn({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,vn)||(Tn(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(g.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&&vt(n);return new Ct(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(v=>{v.setStart(v.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 Me=r.playlistParsingError;if(Me){this.warn(Me);const ze=this.hls;if(!ze.config.ignorePlaylistParsingErrors){var c;const{networkDetails:lt}=t;ze.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:j.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:Me,reason:Me.message,level:t.level||void 0,parent:(c=r.fragments[0])==null?void 0:c.type,networkDetails:lt,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const v=this.hls.mainForwardBufferInfo,T=v?v.end-v.len:0,L=(r.edge-T)*1e3,O=Lr(r,L);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 ie,re,Te;if(r.canBlockReload&&r.endSN&&r.advanced){const Me=this.hls.config.lowLatencyMode,ze=r.lastPartSn,lt=r.endSN,bt=r.lastPartIndex,Qt=bt!==-1,At=ze===lt;Qt?At?(re=lt+1,Te=Me?0:bt):(re=ze,Te=Me?bt+1:r.maxPartIndex):re=lt+1;const Yt=r.age,Zt=Yt+r.ageHeader;let Mt=Math.min(Zt-r.partTarget,r.targetduration*1.5);if(Mt>0){if(Zt>r.targetduration*3)this.log(`Playlist last advanced ${Yt.toFixed(2)}s ago. Omitting segment and part directives.`),re=void 0,Te=void 0;else if(n!=null&&n.tuneInGoal&&Zt-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${Mt} with playlist age: ${r.age}`),Mt=0;else{const cn=Math.floor(Mt/r.targetduration);if(re+=cn,Te!==void 0){const Ln=Math.round(Mt%r.targetduration/r.partTarget);Te+=Ln}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${Yt.toFixed(2)}s goal: ${Mt} skip sn ${cn} to part ${Te}`)}r.tuneInGoal=Mt}if(ie=this.getDeliveryDirectives(r,t.deliveryDirectives,re,Te),Me||!At){r.requestScheduled=s,this.loadingPlaylist(p,ie);return}}else(r.canBlockReload||r.canSkipUntil)&&(ie=this.getDeliveryDirectives(r,t.deliveryDirectives,re,Te));ie&&re!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(O-l*2,O/2)),this.scheduleLoading(p,ie,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=vt(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=at.No),new Ct(n,r,i)}checkRetry(e){const t=e.details,n=$n(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},d=!!r&&!!l&&(i===gn.RetryRequest||!r.resolved&&i===gn.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=ir(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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(g.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(T=>!n||n.indexOf(T.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(T=>T.default)&&(this.selectDefaultTrack=!1),l.forEach((T,L)=>{T.id=L});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const d=this.hls.config.audioPreference;if(!i&&d){const T=Wt(d,l,vn);if(T>-1)i=l[T];else{const L=Wt(d,this.tracks);i=this.tracks[L]}}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(g.AUDIO_TRACKS_UPDATED,p);const v=this.trackId;if(c!==-1&&v===-1)this.setAudioTrack(c);else if(l.length&&v===-1){var s;const T=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(T.message),this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:j.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:T})}}}onError(e,t){t.fatal||!t.context||t.context.type===de.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&dn(e,r,vn))return r;const i=Wt(e,this.tracksInGroup,vn);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=ln(e,t.levels,n,s,vn);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=Wt(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(g.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||dn(e,r,vn)))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(dn({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:d},p,vn))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)&&Tn(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(g.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(g.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=ke(xe(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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.BUFFER_RESET,this.onBufferReset,this),e.on(g.BUFFER_APPENDING,this.onBufferAppending,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.BUFFER_EOS,this.onBufferEos,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.FRAG_PARSED,this.onFragParsed,this),e.on(g.FRAG_CHANGED,this.onFragChanged,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.BUFFER_RESET,this.onBufferReset,this),e.off(g.BUFFER_APPENDING,this.onBufferAppending,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_EOS,this.onBufferEos,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.FRAG_PARSED,this.onFragParsed,this),e.off(g.FRAG_CHANGED,this.onFragChanged,this),e.off(g.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?E(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=E({},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=xe(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: ${it(n,(d,c)=>d==="initSegment"?void 0:c)};
|
|
|
transfer tracks: ${it(r,(d,c)=>d==="initSegment"?void 0:c)}}`),!De(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(g.MEDIA_DETACHING,{}),this.onMediaAttaching(g.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(d=>{const c=d,p=r[c];if(p){const v=p.buffer;if(v){const T=this.fragmentTracker,L=p.id;if(T.hasFragments(L)||T.hasParts(L)){const re=rr.getBuffered(v);T.detectEvictedFragments(c,re,L,null,!0)}const O=jo(c),ie=[c,v];this.sourceBuffers[O]=ie,v.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(g.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 v=t[d],{id:T,codec:L,levelCodec:O,container:ie,metadata:re,supplemental:Te}=v;let Me=r[d];const ze=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[d],lt=ze!=null&&ze.buffer?ze:Me,bt=(lt==null?void 0:lt.pendingCodec)||(lt==null?void 0:lt.codec),Qt=lt==null?void 0:lt.levelCodec;Me||(Me=r[d]={buffer:void 0,listeners:[],codec:L,supplemental:Te,container:ie,levelCodec:O,metadata:re,id:T});const At=Gt(bt,Qt),Yt=At==null?void 0:At.replace(bl,"$1");let Zt=Gt(L,O);const Mt=(p=Zt)==null?void 0:p.replace(bl,"$1");Zt&&At&&Yt!==Mt&&(d.slice(0,5)==="audio"&&(Zt=J(Zt,this.appendSource)),this.log(`switching codec ${bt} to ${Zt}`),Zt!==(Me.pendingCodec||Me.codec)&&(Me.pendingCodec=Zt),Me.container=ie,this.appendChangeType(d,ie,Zt))}),(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,ae.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&&rr.isBuffered(d.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,ae.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,v=c.buffering[i],{sn:T,cc:L}=l,O=self.performance.now();v.start=O;const ie=l.stats.buffering,re=d?d.stats.buffering:null;ie.start===0&&(ie.start=O),re&&re.start===0&&(re.start=O);const Te=n.audio;let Me=!1;i==="audio"&&(Te==null?void 0:Te.container)==="audio/mpeg"&&(Me=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const ze=n.video,lt=ze==null?void 0:ze.buffer;if(lt&&T!=="initSegment"){const At=d||l,Yt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(ze.ending||ze.ended)){const Mt=At.start+At.duration*.05,cn=lt.buffered,Ln=this.currentOp("video");!cn.length&&!Ln?this.blockAudio(At):!Ln&&!rr.isBuffered(lt,Mt)&&this.lastVideoAppendEnd<Mt&&this.blockAudio(At)}else if(i==="video"){const Zt=At.end;if(Yt){const Mt=Yt.frag.start;(Zt>Mt||Zt<this.lastVideoAppendEnd||rr.isBuffered(lt,Mt))&&this.unblockAudio()}this.lastVideoAppendEnd=Zt}}const bt=(d||l).start,Qt={label:`append-${i}`,execute:()=>{var At;v.executeStart=self.performance.now();const Yt=(At=this.tracks[i])==null?void 0:At.buffer;Yt&&(Me?this.updateTimestampOffset(Yt,bt,.1,i,T,L):p!==void 0&&m(p)&&this.updateTimestampOffset(Yt,p,1e-6,i,T,L)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const At=self.performance.now();v.executeEnd=v.end=At,ie.first===0&&(ie.first=At),re&&re.first===0&&(re.first=At);const Yt={};this.sourceBuffers.forEach(([Zt,Mt])=>{Zt&&(Yt[Zt]=rr.getBuffered(Mt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(g.BUFFER_APPENDED,{type:i,frag:l,part:d,chunkMeta:c,parent:l.type,timeRanges:Yt})},onError:At=>{var Yt;const Zt={type:ve.MEDIA_ERROR,parent:l.type,details:j.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:d,chunkMeta:c,error:At,err:At,fatal:!1},Mt=(Yt=this.media)==null?void 0:Yt.error;if(At.code===DOMException.QUOTA_EXCEEDED_ERR||At.name=="QuotaExceededError"||"quota"in At)Zt.details=j.BUFFER_FULL_ERROR;else if(At.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Mt)Zt.errorAction=Kn(!0);else if(At.name===xl&&this.sourceBufferCount===0)Zt.errorAction=Kn(!0);else{const cn=++this.appendErrors[i];this.warn(`Failed ${cn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Mt||"no media error"})`),(cn>=this.hls.config.appendErrorMaxRetry||Mt)&&(Zt.fatal=!0)}this.hls.trigger(g.ERROR,Zt)}};this.log(`queuing "${i}" append sn: ${T}${d?" p: "+d.index:""} of ${l.type===ae.MAIN?"level":"track"} ${l.level} cc: ${L}`),this.append(Qt,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(g.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[V.AUDIOVIDEO]?i.push("audiovideo"):(s[V.AUDIO]&&i.push("audio"),s[V.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(g.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(g.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(g.BUFFERED_TO_END,void 0)):t.type==="video"&&this.unblockAudio()}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){this.blockUntilOpen(()=>{const e=this.getDurationAndRange();e&&this.updateMediaSource(e)})}onError(e,t){if(t.details===j.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;m(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(m(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(m(d)&&d>0){const c=Math.max(r.maxBufferLength,d),p=Math.max(c,s),v=Math.floor(i/s)*s+p;this.flushFrontBuffer(i,s,v)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const l=rr.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(g.BACK_BUFFER_REACHED,{bufferEnd:n});const d=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(g.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(g.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=rr.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(g.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 m(i)?{duration:i}:null;const s=this.media.duration,l=m(n.duration)?n.duration:0;return r>l&&r>s||!m(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(m(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}) ${it(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(g.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(g.ERROR,{type:ve.MEDIA_ERROR,details:j.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":""} ${it(l)}`);try{const p=n.addSourceBuffer(c),v=jo(s),T=[s,p];t[v]=T,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(g.ERROR,{type:ve.MEDIA_ERROR,details:j.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")&&je(n,"video")&&(r=rt(r,n));const i=Gt(r,e.levelCodec);return i?t.slice(0,5)==="audio"?J(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(g.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(g.ERROR,{type:ve.MEDIA_ERROR,details:j.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=m(r.duration)?r.duration:1/0,c=m(i.duration)?i.duration:1/0,p=Math.max(0,t),v=Math.min(n,d,c);v>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${v}] from the ${e} SourceBuffer`),l.remove(p,v)):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 Ho{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(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.BUFFER_CODECS,this.onBufferCodecs,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(g.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&m(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,Ho.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 ki={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Ou={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 Pu="Dict";function ku(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} "${ku(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",Fu="Boolean";function Bu(a){if(typeof a!="boolean")throw us(a,Fu);return a?"?1":"?0"}function Nu(a){return btoa(String.fromCharCode(...a))}const $u="Byte Sequence";function Uu(a){if(ArrayBuffer.isView(a)===!1)throw us(a,$u);return`:${Nu(a)}:`}const zu="Integer";function ju(a){return a<-999999999999999||999999999999999<a}function Al(a){if(ju(a))throw us(a,zu);return a.toString()}function Hu(a){return`@${Al(a.getTime()/1e3)}`}function Tl(a,e){if(a<0)return-Tl(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}const Ku="Decimal";function Gu(a){const e=Tl(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(!m(a))throw us(a,wl);return Number.isInteger(a)?Al(a):Gu(a);case"string":return Zu(a);case"symbol":return Cl(a);case"boolean":return Bu(a);case"object":if(a instanceof Date)return Hu(a);if(a instanceof Uint8Array)return Uu(a);if(a instanceof Sl)return Cl(a);default:throw us(a,wl)}}const Qu="Key";function Go(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?`;${Go(e)}`:`;${Go(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,Pu);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=Go(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",si="CMCD-Request",Qs="CMCD-Session",Ms="CMCD-Status",ec={br:cs,ab:cs,d:cs,ot:cs,tb:cs,tpb:cs,lb:cs,tab:cs,lab:cs,url:cs,pb:si,bl:si,tbl:si,dl:si,ltc:si,mtp:si,nor:si,nrr:si,rc:si,sn:si,sta:si,su:si,ttfb:si,ttfbb:si,ttlb:si,cmsdd:si,cmsds:si,smrt:si,df:si,cs:si,ts:si,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},tc={REQUEST:si};function nc(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 rc(a,e){const t={};if(!a)return t;const n=Object.keys(a),r=e?nc(e):{};return n.reduce((i,s)=>{var l;const d=ec[s]||r[s]||tc.REQUEST,c=(l=i[d])!==null&&l!==void 0?l:i[d]={};return c[s]=a[s],i},t)}function ic(a){return["ot","sf","st","e","sta"].includes(a)}function sc(a){return typeof a=="number"?m(a):a!=null&&a!==""&&a!==!1}const Rl="event";function ac(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=ac(a,e.baseUrl)),e.version===1?encodeURIComponent(a):a),fo=a=>ho(a/100)*100,oc={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",Ol="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"],lc=["e"],uc=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function mo(a){return uc.test(a)}function cc(a){return Zo.includes(a)||lc.includes(a)||mo(a)}const Pl=["d","dl","nor","ot","rtp","su"];function dc(a){return Zo.includes(a)||Pl.includes(a)||mo(a)}const hc=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"];function fc(a){return Zo.includes(a)||Pl.includes(a)||hc.includes(a)||mo(a)}const mc=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"];function pc(a){return mc.includes(a)||mo(a)}const gc={[Ol]:fc,[Rl]:cc,[Ll]:dc};function kl(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?pc:gc[r];let s=Object.keys(a).filter(i);const l=e.filter;typeof l=="function"&&(s=s.filter(l));const d=r===Ol||r===Rl;d&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const c=E({},oc,e.formatters),p={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(v=>{let T=a[v];const L=c[v];if(typeof L=="function"&&(T=L(T,p)),v==="v"){if(n===1)return;T=n}v=="pr"&&T===1||(d&&v==="ts"&&!m(T)&&(T=Date.now()),sc(T)&&(ic(v)&&typeof T=="string"&&(T=new Sl(T)),t[v]=T))}),t}function vc(a,e={}){const t={};if(!a)return t;const n=kl(a,e),r=rc(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 yc(a,e,t){return E(a,vc(e,t))}const _c="CMCD";function bc(a,e={}){return a?Il(kl(a,e),{whitespace:!1}):""}function xc(a,e={}){if(!a)return"";const t=bc(a,e);return encodeURIComponent(t)}function Ec(a,e={}){if(!a)return"";const t=xc(a,e);return`${_c}=${t}`}const Ml=/CMCD=[^&#]+/;function Sc(a,e,t){const n=Ec(e,t);if(!n)return a;if(Ml.test(a))return a.replace(Ml,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class wc{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:ki.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===ki.VIDEO||d===ki.AUDIO||d==ki.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(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHED,this.onMediaDetached,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHED,this.onMediaDetached,this),e.off(g.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:Ou.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){E(t,this.createData());const n=t.ot===ki.INIT||t.ot===ki.VIDEO||t.ot===ki.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={}),yc(e.headers,t,i)):e.url=Sc(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 ki.TIMED_TEXT;if(e.sn==="initSegment")return ki.INIT;if(t==="audio")return ki.AUDIO;if(t==="main")return this.hls.audioTracks.length?ki.VIDEO:ki.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===ki.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===ki.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:rr.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 Ac=3e5;class Tc 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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.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)===gn.SendAlternateToPenaltyBox&&n.flags===Fn.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===j.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: ${it(i)} penalized: ${it(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]>Ac&&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,fi(t),this.hls.trigger(g.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===de.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===de.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 v=new Bn(p.attrs);v["PATHWAY-ID"]=s;const T=v.AUDIO&&`${v.AUDIO}_clone_${s}`,L=v.SUBTITLES&&`${v.SUBTITLES}_clone_${s}`;T&&(n[v.AUDIO]=T,v.AUDIO=T),L&&(r[v.SUBTITLES]=L,v.SUBTITLES=L);const O=Bl(p.uri,v["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),ie=new Et({attrs:v,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 re=1;re<p.audioGroups.length;re++)ie.addGroupId("audio",`${p.audioGroups[re]}_clone_${s}`);if(p.subtitleGroups)for(let re=1;re<p.subtitleGroups.length;re++)ie.addGroupId("text",`${p.subtitleGroups[re]}_clone_${s}`);return ie});t.push(...c),Fl(this.audioTracks,n,d,s),Fl(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,v,T,L)=>{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":ie,"PATHWAY-CLONES":re,"PATHWAY-PRIORITY":Te}=O;if(ie)try{this.uri=new self.URL(ie,r).href}catch(ze){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${ie}`);return}this.scheduleRefresh(this.uri||T.url),re&&this.clonePathways(re);const Me={steeringManifest:O,url:r.toString()};this.hls.trigger(g.STEERING_MANIFEST_LOADED,Me),Te&&this.updatePathwayPriority(Te)},onError:(p,v,T,L)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${v.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${v.url} no longer available`);return}let O=this.timeToLoad*1e3;if(p.code===429){const ie=this.loader;if(typeof(ie==null?void 0:ie.getResponseHeader)=="function"){const re=ie.getResponseHeader("Retry-After");re&&(O=parseFloat(re)*1e3)}this.log(`Steering manifest ${v.url} rate limited`);return}this.scheduleRefresh(this.uri||v.url,O)},onTimeout:(p,v,T)=>{this.log(`Timeout loading steering manifest (${v.url})`),this.scheduleRefresh(this.uri||v.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 Fl(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const l=E({},s);return l.details=void 0,l.attrs=new Bn(l.attrs),l.url=l.attrs.URI=Bl(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 Bl(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=Oi(this.config));const l=s.map(ri).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=Ci(s);if(n!=="sinf"||l!==dr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}let d;try{const L=qe(new Uint8Array(r)),O=Xi(JSON.parse(L).sinf),ie=mt(O);if(!ie)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=new Uint8Array(ie.subarray(8,24))}catch(L){this.warn(`${i} Failed to parse sinf: ${L}`);return}const c=X(d),{keyIdToKeySessionPromise:p,mediaKeySessions:v}=this;let T=p[c];for(let L=0;L<v.length;L++){const O=v[L],ie=O.decryptdata;if(!ie.keyId)continue;const re=X(ie.keyId);if(ui(d,ie.keyId)||ie.uri.replace(/-/g,"").indexOf(c)!==-1){if(T=p[re],!T)continue;if(ie.pssh)break;delete p[re],ie.pssh=new Uint8Array(r),ie.keyId=d,T=p[c]=T.then(()=>this.generateRequestWithPreferredKeySession(O,n,r,"encrypted-event-key-match")),T.catch(Te=>this.handleError(Te));break}}T||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${v.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(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(g.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(g.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(g.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(g.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===dr.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(v=>s({keySystem:p,mediaKeys:v})).catch(v=>{c.length?d(c):v instanceof ji?l(v):l(new ji({type:ve.KEY_SYSTEM_ERROR,details:j.KEY_SYSTEM_NO_ACCESS,error:v,fatal:!0},v.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: ${it(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 v=d.mediaKeys=c.createMediaKeys().then(T=>(this.log(`Media-keys created for "${e}"`),d.hasMediaKeys=!0,p.then(L=>L?this.setMediaKeysServerCertificate(T,e,L):T)));return v.catch(T=>{this.error(`Failed to create media-keys for "${e}"}: ${T}`)}),v})}return l.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${X(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=po(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 ${X(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})=>ri(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=ri(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=Oi(this.config),n=e.map(Ci).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=Cc(e,t[n]);if(r)return r}}loadKey(e){const t=e.keyInfo.decryptdata,n=po(t),r=this.bannedKeyIds[n];if(r||this.getKeyStatus(t)==="internal-error"){const l=Nl(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?` (${X(n.keyId||[])})`:""}`),this.hls.trigger(g.ERROR,e.data)}else this.error(e.message),this.hls.trigger(g.ERROR,{type:ve.KEY_SYSTEM_ERROR,details:j.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=po(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Ci(e.keyFormat),i=r?[r]:Oi(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Oi(this.config)),e.length===0)throw new ji({type:ve.KEY_SYSTEM_ERROR,details:j.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${it({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=po(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 ie=e.mediaKeysSession;if(!ie){c.emit("error",new Error("invalid state"));return}const{messageType:re,message:Te}=O;this.log(`"${re}" message event for session "${ie.sessionId}" message size: ${Te.byteLength}`),re==="license-request"||re==="license-renewal"?this.renewLicense(e,Te).catch(Me=>{c.eventNames().length?c.emit("error",Me):this.handleError(Me)}):re==="license-release"?e.keySystem===dr.FAIRPLAY&&this.updateKeySession(e,Mi("acknowledged")).then(()=>this.removeSession(e)).catch(Me=>this.handleError(Me)):this.warn(`unhandled media key message type "${re}"`)},v=(O,ie)=>{ie.keyStatus=O;let re;O.startsWith("usable")?c.emit("resolved"):O==="internal-error"||O==="output-restricted"||O==="output-downscaled"?re=Nl(O,ie.decryptdata):O==="expired"?re=new Error(`key expired (keyId: ${l})`):O==="released"?re=new Error("key released"):O==="status-pending"||this.warn(`unhandled key status change "${O}" (keyId: ${l})`),re&&(c.eventNames().length?c.emit("error",re):this.handleError(re))},T=e._onkeystatuseschange=O=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const re=this.getKeyStatuses(e);if(!Object.keys(re).some(lt=>re[lt]!=="status-pending"))return;if(re[l]==="expired"){this.log(`Expired key ${it(re)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let Me=re[l];if(Me)v(Me,e);else{var ze;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(ze=e.keyStatusTimeouts)[l]||(ze[l]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const bt=this.getKeyStatus(e.decryptdata);if(bt&&bt!=="status-pending")return this.log(`No status for keyId ${l} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${bt} from other session.`),v(bt,e);this.log(`key status for ${l} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),Me="internal-error",v(Me,e)},1e3)),this.log(`No status for keyId ${l} (${it(re)}).`)}};mi(e.mediaKeysSession,"message",p),mi(e.mediaKeysSession,"keystatuseschange",T);const L=new Promise((O,ie)=>{c.on("error",ie),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:ve.KEY_SYSTEM_ERROR,details:j.KEY_SYSTEM_NO_SESSION,error:O,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${O}`)}).then(()=>L).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===dr.PLAYREADY&&i.length===16){const l=X(i);t[l]=n,Un(i)}const s=X(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},v={onSuccess:(T,L,O,ie)=>{s(T.data)},onError:(T,L,O,ie)=>{l(new ji({type:ve.KEY_SYSTEM_ERROR,details:j.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:O,response:C({url:d.url,data:void 0},T)},`"${e}" certificate request failed (${i}). Status: ${T.code} (${T.text})`))},onTimeout:(T,L,O)=>{l(new ji({type:ve.KEY_SYSTEM_ERROR,details:j.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:O,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(T,L,O)=>{l(new Error("aborted"))}};r.load(d,p,v)})):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:ve.KEY_SYSTEM_ERROR,details:j.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new ji({type:ve.KEY_SYSTEM_ERROR,details:j.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 v=0,T=i.length;v<T;v++){var s,l;p=i[v];const L=(s=p.querySelector("name"))==null?void 0:s.textContent,O=(l=p.querySelector("value"))==null?void 0:l.textContent;L&&O&&e.setRequestHeader(L,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:ve.KEY_SYSTEM_ERROR,details:j.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==dr.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,mi(n,"encrypted",this.onMediaEncrypted),mi(n,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=n.mediaKeys}onMediaDetached(){const e=this.media;e&&(bi(e,"encrypted",this.onMediaEncrypted),bi(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,Si.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(g.ERROR,{type:ve.OTHER_ERROR,details:j.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${s}`)})}))||Promise.resolve())).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}`),this.hls&&this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:j.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${s}`)})}).then(()=>{i&&this.log("finished closing key sessions and clearing media keys")})}onManifestLoading(){this._clear()}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const 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: ${X((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(g.ERROR,{type:ve.OTHER_ERROR,details:j.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${c}`)})}).then(()=>t.close()).catch(c=>{this.log(`Could not close session: ${c}`),this.hls&&this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:j.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}va.CDMCleanupPromise=void 0;function po(a){if(!a)throw new Error("Could not read keyId of undefined decryptdata");if(a.keyId===null)throw new Error("keyId is null");return X(a.keyId)}function Cc(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 Nl(a,e){const t=a==="output-restricted",n=t?j.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:j.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new ji({type:ve.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class Dc{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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(g.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(g.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(g.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(g.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){oe.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){oe.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=Rc(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 Ic(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 Rc(a,e,t){const n=[],r=Ic(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 Lc 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(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.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,v)=>{p.id=v});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const p=Wt(l,s);if(p>-1)i=s[p];else{const v=Wt(l,this.tracks);i=this.tracks[v]}}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(g.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||dn(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===de.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&dn(e,n))return n;const r=Wt(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=Wt(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(g.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||!m(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(g.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(g.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:d,type:c,url:p});const v=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(v)}}function Oc(){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 Pc(a,e,t){return`${a.identifier}-${t+1}-${Ua(e)}`}class kc{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=m(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return 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 Mc(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 Mc(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 Fc{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(g.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(g.LEVEL_LOADED,s),i.once(g.AUDIO_TRACK_LOADED,s),i.once(g.SUBTITLE_TRACK_LOADED,s),i.on(g.MEDIA_ATTACHING,(l,{media:d})=>{this.removeMediaListeners(),this.mediaAttached=d,this.interstitial.playoutLimit&&(d.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(g.BUFFER_APPENDED,()=>{const p=this.bufferedEnd;this.reachedPlayout(p)&&(this._bufferedEosTime=p,i.trigger(g.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=rr.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=rr.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 Bc 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 v=c.cue.pre,T=c.cue.post,L=p.cue.pre,O=p.cue.post;if(v&&!L)return-1;if(L&&!v||T&&!O)return 1;if(O&&!T)return-1;if(!v&&!L&&!T&&!O){const ie=c.startTime,re=p.startTime;if(ie!==re)return ie-re}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 kc(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,v)=>{const T=p.cue.pre,L=p.cue.post,O=e[v-1]||null,ie=p.appendInPlace,re=L?i:p.startOffset,Te=p.duration,Me=p.timelineOccupancy===vo.Range?Te:0,ze=p.resumptionOffset,lt=(O==null?void 0:O.startTime)===re,bt=re+p.cumulativeDuration;let Qt=ie?bt+Te:re+ze;if(T||!L&&re<=0){const Yt=c;c+=Me,p.timelineStart=bt;const Zt=s;s+=Te,n.push({event:p,start:bt,end:Qt,playout:{start:Zt,end:s},integrated:{start:Yt,end:c}})}else if(re<=i){if(!lt){const Mt=re-d;if(Mt>jl){const cn=d,Ln=c;c+=Mt;const Vn=s;s+=Mt;const ar={previousEvent:e[v-1]||null,nextEvent:p,start:cn,end:cn+Mt,playout:{start:Vn,end:s},integrated:{start:Ln,end:c}};n.push(ar)}else Mt>0&&O&&(O.cumulativeDuration+=Mt,n[n.length-1].end=re)}L&&(Qt=bt),p.timelineStart=bt;const Yt=c;c+=Me;const Zt=s;s+=Te,n.push({event:p,start:bt,end:Qt,playout:{start:Zt,end:s},integrated:{start:Yt,end:c}})}else return;const At=p.resumeTime;L||At>i?d=i:d=At}),d<i){var l;const p=d,v=c,T=i-d;c+=T;const L=s;s+=T,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:d,end:p+T,playout:{start:L,end:s},integrated:{start:v,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,v=c?0:p?r:l.startTime;this.updateAssetDurations(l),s===v?l.cumulativeDuration=i:(i=0,s=v),!p&&l.snapOptions.in&&(l.resumeAnchor=Hn(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 L=m(l.resumeOffset)?l.resumeOffset:l.duration;i+=L})}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=Hn(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 Nc{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(T){const L=this.assignAssetListError(e,j.ASSET_LIST_LOAD_ERROR,T,n);this.hls.trigger(g.ERROR,L);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},v={onSuccess:(T,L,O,ie)=>{const re=T.data,Te=re==null?void 0:re.ASSETS;if(!Array.isArray(Te)){const Me=this.assignAssetListError(e,j.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),O.url,L,ie);this.hls.trigger(g.ERROR,Me);return}e.assetListResponse=re,this.hls.trigger(g.ASSET_LIST_LOADED,{event:e,assetListResponse:re,networkDetails:ie})},onError:(T,L,O,ie)=>{const re=this.assignAssetListError(e,j.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${T.code} ${T.text} (${L.url})`),L.url,ie,O);this.hls.trigger(g.ERROR,re)},onTimeout:(T,L,O)=>{const ie=this.assignAssetListError(e,j.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${L.url})`),L.url,T,O);this.hls.trigger(g.ERROR,ie)}};return l.load(d,p,v),this.hls.trigger(g.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:ve.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function Hl(a){var e;a==null||(e=a.play())==null||e.catch(()=>{})}function yo(a,e){return`[${a}] Advancing timeline position to ${e}`}class $c 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 L=this.findItemIndex(l);let O=this.schedule.findItemIndexAtTime(n);if(O===-1&&(O=L+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${L} to ${O})`)),!this.isInterstitial(l)&&(d=this.media)!=null&&d.paused&&(this.shouldPlay=!1),!s&&O>L){const ie=this.schedule.findJumpRestrictedIndex(L+1,O);if(ie>L){this.setSchedulePosition(ie);return}}this.setSchedulePosition(O);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const L=l.event.assetList[0];L&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,L))}return}const p=c.timelineStart,v=c.duration||0;if(s&&n<p||n>=p+v){var T;(T=l.event)!=null&&T.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(ie=>ie.identifier),v=!!(l.length||p.length);(v||r)&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
|
|
|
Schedule: ${d.map(ie=>ts(ie))} pos: ${this.timelinePos}`),p.length&&this.log(`Removed events ${p}`);let T=null,L=null;s&&(T=this.updateItem(s,this.timelinePos),this.itemsMatch(s,T)?this.playingItem=T:this.waitingItem=this.endedItem=null),this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const O=this.bufferingItem;if(O&&(L=this.updateItem(O,this.bufferedPos),this.itemsMatch(O,L)?this.bufferingItem=L:O.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(O.event,null))),n.forEach(ie=>{ie.assetList.forEach(re=>{this.clearAssetPlayer(re.identifier,null)})}),this.playerQueue.forEach(ie=>{if(ie.interstitial.appendInPlace){const re=ie.assetItem.timelineStart,Te=ie.timelineOffset-re;if(Te)try{ie.timelineOffset=re}catch(Me){Math.abs(Te)>_a&&this.warn(`${Me} ("${ie.assetId}" ${ie.timelineOffset}->${re})`)}}}),v||r){if(this.hls.trigger(g.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(T,s),O&&L!==T&&this.trimInPlace(L,O),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Nc(e),this.schedule=new Bc(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(g.MEDIA_ENDED,this.onMediaEnded,this),e.on(g.ERROR,this.onError,this),e.on(g.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(g.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(g.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(g.BUFFER_CODECS,this.onBufferCodecs,this),e.off(g.BUFFER_APPENDED,this.onBufferAppended,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(g.MEDIA_ENDED,this.onMediaEnded,this),e.off(g.ERROR,this.onError,this),e.off(g.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){bi(e,"play",this.onPlay),bi(e,"pause",this.onPause),bi(e,"seeking",this.onSeeking),bi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;mi(n,"seeking",this.onSeeking),mi(n,"timeupdate",this.onTimeupdate),mi(n,"play",this.onPlay),mi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=v=>v&&e.getAssetPlayer(v.identifier),r=(v,T,L,O,ie)=>{if(v){let re=v[T].start;const Te=v.event;if(Te){if(T==="playout"||Te.timelineOccupancy!==vo.Point){const Me=n(L);(Me==null?void 0:Me.interstitial)===Te&&(re+=Me.assetItem.startOffset+Me[ie])}}else{const Me=O==="bufferedPos"?s():e[O];re+=Me-v.start}return re}return 0},i=(v,T)=>{var L;if(v!==0&&T!=="primary"&&(L=e.schedule)!=null&&L.length){var O;const ie=e.schedule.findItemIndexAtTime(v),re=(O=e.schedule.items)==null?void 0:O[ie];if(re){const Te=re[T].start-re.start;return v+Te}}return v},s=()=>{const v=e.bufferedPos;return v===Number.MAX_VALUE?l("primary"):Math.max(v,0)},l=v=>{var T,L;return(T=e.primaryDetails)!=null&&T.live?e.primaryDetails.edge:((L=e.schedule)==null?void 0:L.durations[v])||0},d=(v,T)=>{var L,O;const ie=e.effectivePlayingItem;if(ie!=null&&(L=ie.event)!=null&&L.restrictions.skip||!e.schedule)return;e.log(`seek to ${v} "${T}"`);const re=e.effectivePlayingItem,Te=e.schedule.findItemIndexAtTime(v,T),Me=(O=e.schedule.items)==null?void 0:O[Te],ze=e.getBufferingPlayer(),lt=ze==null?void 0:ze.interstitial,bt=lt==null?void 0:lt.appendInPlace,Qt=re&&e.itemsMatch(re,Me);if(re&&(bt||Qt)){const At=n(e.playingAsset),Yt=(At==null?void 0:At.media)||e.primaryMedia;if(Yt){const Zt=T==="primary"?Yt.currentTime:r(re,T,e.playingAsset,"timelinePos","currentTime"),Mt=v-Zt,cn=(bt?Zt:Yt.currentTime)+Mt;if(cn>=0&&(!At||bt||cn<=At.duration)){Yt.currentTime=cn;return}}}if(Me){let At=v;if(T!=="primary"){const Zt=Me[T].start,Mt=v-Zt;At=Me.start+Mt}const Yt=!e.isInterstitial(Me);if((!e.isInterstitial(re)||re.event.appendInPlace)&&(Yt||Me.event.appendInPlace)){const Zt=e.media||(bt?ze==null?void 0:ze.media:null);Zt&&(Zt.currentTime=At)}else if(re){const Zt=e.findItemIndex(re);if(Te>Zt){const cn=e.schedule.findJumpRestrictedIndex(Zt+1,Te);if(cn>Zt){e.setSchedulePosition(cn);return}}let Mt=0;if(Yt)e.timelinePos=At,e.checkBuffer();else{const cn=Me.event.assetList,Ln=v-(Me[T]||Me).start;for(let Vn=cn.length;Vn--;){const ar=cn[Vn];if(ar.duration&&Ln>=ar.startOffset&&Ln<ar.startOffset+ar.duration){Mt=Vn;break}}}e.setSchedulePosition(Te,Mt)}}},c=()=>{const v=e.effectivePlayingItem;if(e.isInterstitial(v))return v;const T=t();return e.isInterstitial(T)?T:null},p={get bufferedEnd(){const v=t(),T=e.bufferingItem;if(T&&T===v){var L;return r(T,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-T.playout.start||((L=e.bufferingAsset)==null?void 0:L.startOffset)||0}return 0},get currentTime(){const v=c(),T=e.effectivePlayingItem;return T&&T===v?r(T,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-T.playout.start:0},set currentTime(v){const T=c(),L=e.effectivePlayingItem;L&&L===T&&d(v+L.playout.start,"playout")},get duration(){const v=c();return v?v.playout.end-v.playout.start:0},get assetPlayers(){var v;const T=(v=c())==null?void 0:v.event.assetList;return T?T.map(L=>e.getAssetPlayer(L.identifier)):[]},get playingIndex(){var v;const T=(v=c())==null?void 0:v.event;return T&&e.effectivePlayingAsset?T.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var v;return((v=e.schedule)==null||(v=v.events)==null?void 0:v.slice(0))||[]},get schedule(){var v;return((v=e.schedule)==null||(v=v.items)==null?void 0:v.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 v=t();return e.findItemIndex(v)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const v=e.effectivePlayingItem;return e.findItemIndex(v)},primary:{get bufferedEnd(){return s()},get currentTime(){const v=e.timelinePos;return v>0?v:0},set currentTime(v){d(v,"primary")},get duration(){return l("primary")},get seekableStart(){var v;return((v=e.primaryDetails)==null?void 0:v.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(v){d(v,"integrated")},get duration(){return l("integrated")},get seekableStart(){var v;return i(((v=e.primaryDetails)==null?void 0:v.fragmentStart)||0,"integrated")}},skip:()=>{const v=e.effectivePlayingItem,T=v==null?void 0:v.event;if(T&&!T.restrictions.skip){const L=e.findItemIndex(v);if(T.appendInPlace){const O=v.playout.start+v.event.duration;d(O+.001,"playout")}else e.advanceAfterAssetEnded(T,L,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||!m(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} ${it(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 ${it(i)}`);else if(!this.detachedData||s.media===t){const O=this.playerQueue;O.length>1&&O.forEach(ie=>{if(l&&ie.interstitial.appendInPlace!==d){const re=ie.interstitial;this.clearInterstitial(ie.interstitial,null),re.appendInPlace=!1,re.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${re}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const v=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",T=v&&i?i:t;this.log(`${v?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${p} (media.currentTime: ${t.currentTime})`);const L=this.schedule;if(T===i&&L){const O=l&&e.assetId===L.assetIdAtEnd;T.overrides={duration:L.duration,endOfStream:!l||O,cueRemoval:!l}}e.attachMedia(T)}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,v=this.playingAsset,T=v==null?void 0:v.identifier,L=T?this.getAssetPlayer(T):null;if(L&&T&&(!this.eventItemsMatch(s,i)||t!==void 0&&T!==p.assetList[t].identifier)){var d;const O=p.findAssetIndex(v);if(this.log(`INTERSTITIAL_ASSET_ENDED ${O+1}/${p.assetList.length} ${ba(v)}`),this.endedAsset=v,this.playingAsset=null,this.hls.trigger(g.INTERSTITIAL_ASSET_ENDED,{asset:v,assetListIndex:O,event:p,schedule:r.slice(0),scheduleIndex:e,player:L}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(p,this.findItemIndex(this.playingItem),O);return}this.retreiveMediaSource(T,i),L.media&&!((d=this.detachedData)!=null&&d.mediaSource)&&L.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(g.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 ie=this.findItemIndex(i);this.advanceSchedule(ie,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 v=p.interstitial,T=s.findEventIndex(v.identifier);(T<e||T>e+1)&&this.clearInterstitial(v,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 v=this.waitingItem;this.assetsBuffered(l,d)||this.setBufferingItem(l);let T=this.preloadAssets(p,n);if(this.eventItemsMatch(l,v||r)||(this.waitingItem=l,this.log(`INTERSTITIAL_STARTED ${ts(l)} ${p.appendInPlace?"append in place":""}`),this.hls.trigger(g.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 L=p.assetList[n];if(!L){this.advanceAfterAssetEnded(p,e,n||0);return}if(T||(T=this.getAssetPlayer(L.identifier)),T===null||T.destroyed){const O=p.assetList.length;this.warn(`asset ${n+1}/${O} player destroyed ${p}`),T=this.createAssetPlayer(p,L,n),T.loadSource()}if(!this.eventItemsMatch(l,this.bufferingItem)&&p.appendInPlace&&this.isAssetBuffered(L))return;this.startAssetPlayer(T,n,t,e,d),this.shouldPlay&&Hl(T.media)}else l?(this.resumePrimary(l,e,r),this.shouldPlay&&Hl(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(g.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:rr.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(g.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(g.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=Vt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Vt(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=rr.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=rr.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),v=Math.min(p+1,t.length-1),T=t[v];if((d===-1&&i&&e>=i.end||(c=T.event)!=null&&c.appendInPlace&&e+.01>=T.start)&&(d=v),this.isInterstitial(i)){const L=i.event;if(v-l>1&&L.appendInPlace===!1||L.assetList.length===0&&L.assetListLoader)return}if(this.bufferedPos=e,d>p&&d>l)this.bufferedToItem(T);else{const L=this.primaryDetails;this.primaryLive&&L&&e>L.edge-L.targetduration&&T.start<L.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(T)&&this.preloadAssets(T.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,v)=>{const T=this.getAssetPlayer(p.identifier);T&&(v===c&&T.loadSource(),T.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(g.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 T=this.playingItem;!this.isInterstitial(T)&&(T==null||(l=T.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 T=p-d;T>0&&(c=Math.round(T*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 v=this.assetListLoader.loadAssetList(e,c);v&&(e.assetListLoader=v)}else if(!s&&r){for(let c=t;c<r;c++){const p=e.assetList[c],v=this.getAssetPlayerQueueIndex(p.identifier);(v===-1||this.playerQueue[v].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(g.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:Pc(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=E({},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 lt=this.timelinePos-t.timelineStart;if(lt>1){const bt=t.duration;bt&<<bt&&(p=lt)}}const v=t.identifier,T=C(C({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:v,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&&(T.timelineOffset=t.timelineStart));const L=T.cmcd;L!=null&&L.sessionId&&L.contentId&&(T.cmcd=E({},L,{contentId:Ua(t.uri)})),this.getAssetPlayer(v)&&this.warn(`Duplicate date range identifier ${e} and asset ${v}`);const O=new Fc(this.HlsPlayerClass,T,e,t);this.playerQueue.push(O),e.assetList[n]=t;let ie=!0;const re=lt=>{if(lt.live){var bt;const Yt=new Error(`Interstitials MUST be VOD assets ${e}`),Zt={fatal:!0,type:ve.OTHER_ERROR,details:j.INTERSTITIAL_ASSET_ITEM_ERROR,error:Yt},Mt=((bt=this.schedule)==null?void 0:bt.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Zt,e,Mt,n,Yt.message);return}const Qt=lt.edge-lt.fragmentStart,At=t.duration;(ie||At===null||Qt>At)&&(ie=!1,this.log(`Interstitial asset "${v}" duration change ${At} > ${Qt}`),t.duration=Qt,this.updateSchedule())};O.on(g.LEVEL_UPDATED,(lt,{details:bt})=>re(bt)),O.on(g.LEVEL_PTS_UPDATED,(lt,{details:bt})=>re(bt)),O.on(g.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const Te=(lt,bt)=>{const Qt=this.getAssetPlayer(v);if(Qt&&bt.tracks){Qt.off(g.BUFFER_CODECS,Te),Qt.tracks=bt.tracks;const At=this.primaryMedia;this.bufferingAsset===Qt.assetItem&&At&&!Qt.media&&this.bufferAssetPlayer(Qt,At)}};O.on(g.BUFFER_CODECS,Te);const Me=()=>{var lt;const bt=this.getAssetPlayer(v);if(this.log(`buffered to end of asset ${bt}`),!bt||!this.schedule)return;const Qt=this.schedule.findEventIndex(e.identifier),At=(lt=this.schedule.items)==null?void 0:lt[Qt];this.isInterstitial(At)&&this.advanceAssetBuffering(At,t)};O.on(g.BUFFERED_TO_END,Me);const ze=lt=>()=>{if(!this.getAssetPlayer(v)||!this.schedule)return;this.shouldPlay=!0;const Qt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Qt,lt)};return O.once(g.MEDIA_ENDED,ze(n)),O.once(g.PLAYOUT_LIMIT_REACHED,ze(1/0)),O.on(g.ERROR,(lt,bt)=>{if(!this.schedule)return;const Qt=this.getAssetPlayer(v);if(bt.details===j.BUFFER_STALLED_ERROR){if(Qt!=null&&Qt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(bt,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${bt.error} ${e}`)}),O.on(g.DESTROYING,()=>{if(!this.getAssetPlayer(v)||!this.schedule)return;const bt=new Error(`Asset player destroyed unexpectedly ${v}`),Qt={fatal:!0,type:ve.OTHER_ERROR,details:j.INTERSTITIAL_ASSET_ITEM_ERROR,error:bt};this.handleAssetItemError(Qt,e,this.schedule.findEventIndex(e.identifier),n,bt.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${ba(t)}`),this.hls.trigger(g.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(g.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 v=(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(v&&!De(v,e.tracks)){const T=new Error(`Asset ${ba(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(v)}')`),L={fatal:!0,type:ve.OTHER_ERROR,details:j.INTERSTITIAL_ASSET_ITEM_ERROR,error:T},O=i.findAssetIndex(s);this.handleAssetItemError(L,i,l,O,T.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===j.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,v=E({},e,{fatal:!1,errorAction:Kn(!0),asset:s,assetListIndex:r,event:t,schedule:p,scheduleIndex:n,player:c});if(this.hls.trigger(g.INTERSTITIAL_ASSET_ERROR,v),!e.fatal)return;const T=this.playingAsset,L=this.bufferingAsset,O=new Error(i);if(s&&(this.clearAssetPlayer(l,null),s.error=O),!t.assetList.some(ie=>!ie.error))t.error=O;else for(let ie=r;ie<t.assetList.length;ie++)this.resetAssetPlayer(t.assetList[ie].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):T&&T.identifier===l?this.advanceAfterAssetEnded(t,n,r):L&&L.identifier===l&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,L)}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((ie,re)=>{const Te=parseFloat(ie.DURATION);this.createAsset(i,re,p,d+p,Te,ie.URI),p+=Te}),i.duration=p,this.log(`Loaded asset-list with duration: ${p} (was: ${c}) ${i}`);const v=this.waitingItem,T=(v==null?void 0:v.event.identifier)===s;this.updateSchedule();const L=(r=this.bufferingItem)==null?void 0:r.event;if(T){var O;const ie=this.schedule.findEventIndex(s),re=(O=this.schedule.items)==null?void 0:O[ie];if(re){if(!this.playingItem&&this.timelinePos>re.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==ie){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(re)}this.setSchedulePosition(ie)}else if((L==null?void 0:L.identifier)===s){const ie=i.assetList[0];if(ie){const re=this.getAssetPlayer(ie.identifier);if(L.appendInPlace){const Te=this.primaryMedia;re&&Te&&this.bufferAssetPlayer(re,Te)}else re&&re.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case j.ASSET_LIST_PARSING_ERROR:case j.ASSET_LIST_LOAD_ERROR:case j.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case j.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 Uc extends Ks{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",ae.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(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(g.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(g.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=sn.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)||($e(n)&&(this.fragPrevious=n),this.state=sn.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,ae.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===ae.SUBTITLE&&(t.details===j.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==sn.STOPPED&&(this.state=sn.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&_l(this.levels,t)){this.levels=t.map(n=>new Et(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new Et(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ae.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!==sn.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 v=this.mainDetails;if(!v){this.startFragRequested=!1;return}const T=v.fragments[0];if(!d.details)s.hasProgramDateTime&&v.hasProgramDateTime?(Cs(s,v),c=s.fragmentStart):T&&(c=T.start,js(s,c));else{var p;c=this.alignPlaylists(s,d.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&T&&(c=T.start,js(s,c))}v&&!this.startFragRequested&&this.setStartPosition(v,c)}d.details=s,this.levelLastLoaded=d,l===r&&(this.hls.trigger(g.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===sn.IDLE&&(Hn(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&&vi(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Hi(r.method)).catch(l=>{throw i.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:j.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const d=performance.now();i.trigger(g.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:d}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=sn.IDLE})}}doTick(){if(!this.media){this.state=sn.IDLE;return}if(this.state===sn.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=rr.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 v=c.fragments,T=v.length,L=c.edge;let O=null;const ie=this.fragPrevious;if(l<L){const Me=r.maxFragLookUpTolerance,ze=l>L-Me?0:Me;O=Hn(ie,v,Math.max(v[0].start,l),ze),!O&&ie&&ie.start<v[0].start&&(O=v[0])}else O=v[T-1];if(O=this.filterReplacedPrimary(O,n.details),!O)return;const re=O.sn-c.startSN,Te=v[re-1];if(Te&&Te.cc===O.cc&&this.fragmentTracker.getState(Te)===er.NOT_LOADED&&(O=Te),this.fragmentTracker.getState(O)===er.NOT_LOADED){const Me=this.mapToInitFragWhenRequired(O);Me&&this.loadFragment(Me,n,l)}}}loadFragment(e,t,n){$e(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new zc(this.tracksBuffered[this.currentTrackId]||[])}}class zc{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 jc={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},Gl=a=>String.fromCharCode(jc[a]||a),ns=15,ys=100,Hc={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Kc={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Gc={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Wc={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Vc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Zc{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;oe.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 Yc{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 Xc{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 Yc);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=Gl(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 Xc(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 = "+it(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 = "+it(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: "+it(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=qc(),this.logger=void 0;const r=this.logger=new Zc;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(Qc(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?Hc[e]:Gc[e]:n=s===1?Kc[e]:Wc[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 '"+Gl(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=Vc[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 Qc(a,e,t){return t.a===a&&t.b===e}function qc(){return{a:null,b:null}}var Jo=function(){if(Ir!=null&&Ir.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 v in p)l[v]=p[v]}return l}function s(l,d,c){const p=this,v={enumerable:!0};p.hasBeenReset=!1;let T="",L=!1,O=l,ie=d,re=c,Te=null,Me="",ze=!0,lt="auto",bt="start",Qt=50,At="middle",Yt=50,Zt="middle";Object.defineProperty(p,"id",i({},v,{get:function(){return T},set:function(Mt){T=""+Mt}})),Object.defineProperty(p,"pauseOnExit",i({},v,{get:function(){return L},set:function(Mt){L=!!Mt}})),Object.defineProperty(p,"startTime",i({},v,{get:function(){return O},set:function(Mt){if(typeof Mt!="number")throw new TypeError("Start time must be set to a number.");O=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},v,{get:function(){return ie},set:function(Mt){if(typeof Mt!="number")throw new TypeError("End time must be set to a number.");ie=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},v,{get:function(){return re},set:function(Mt){re=""+Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},v,{get:function(){return Te},set:function(Mt){Te=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},v,{get:function(){return Me},set:function(Mt){const cn=n(Mt);if(cn===!1)throw new SyntaxError("An invalid or illegal string was specified.");Me=cn,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},v,{get:function(){return ze},set:function(Mt){ze=!!Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},v,{get:function(){return lt},set:function(Mt){if(typeof Mt!="number"&&Mt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");lt=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},v,{get:function(){return bt},set:function(Mt){const cn=r(Mt);if(!cn)throw new SyntaxError("An invalid or illegal string was specified.");bt=cn,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},v,{get:function(){return Qt},set:function(Mt){if(Mt<0||Mt>100)throw new Error("Position must be between 0 and 100.");Qt=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},v,{get:function(){return At},set:function(Mt){const cn=r(Mt);if(!cn)throw new SyntaxError("An invalid or illegal string was specified.");At=cn,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},v,{get:function(){return Yt},set:function(Mt){if(Mt<0||Mt>100)throw new Error("Size must be between 0 and 100.");Yt=Mt,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},v,{get:function(){return Zt},set:function(Mt){const cn=r(Mt);if(!cn)throw new SyntaxError("An invalid or illegal string was specified.");Zt=cn,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class Jc{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 e0{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 t0(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 e0;Xl(l,function(T,L){let O;switch(T){case"region":for(let ie=t.length-1;ie>=0;ie--)if(t[ie].id===L){c.set(T,t[ie].region);break}break;case"vertical":c.alt(T,L,["rl","lr"]);break;case"line":O=L.split(","),c.integer(T,O[0]),c.percent(T,O[0])&&c.set("snapToLines",!1),c.alt(T,O[0],["auto"]),O.length===2&&c.alt("lineAlign",O[1],["start",bo,"end"]);break;case"position":O=L.split(","),c.percent(T,O[0]),O.length===2&&c.alt("positionAlign",O[1],["start",bo,"end","line-left","line-right","auto"]);break;case"size":c.percent(T,L);break;case"align":c.alt(T,L,["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 v=c.get("position","auto");v==="auto"&&el.position===50&&(v=d.align==="start"||d.align==="left"?0:d.align==="end"||d.align==="right"?100:50),d.position=v}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 n0{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Jc,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{t0(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 r0=/\r\n|\n\r|\n|\r/g,tl=function(e,t,n=0){return e.slice(n,n+t.length)===t},i0=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(!m(t)||!m(n)||!m(r)||!m(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 s0=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 a0(a,e,t,n,r,i,s){const l=new n0,d=Be(new Uint8Array(a)).trim().replace(r0,`
|
|
|
`).split(`
|
|
|
`),c=[],p=e?os(e.baseTime,e.timescale):0;let v="00:00.000",T=0,L=0,O,ie=!0;l.oncue=function(re){const Te=t[n];let Me=t.ccOffset;const ze=(T-p)/9e4;if(Te!=null&&Te.new&&(L!==void 0?Me=t.ccOffset=Te.start:s0(t,n,ze)),ze){if(!e){O=new Error("Missing initPTS for VTT MPEGTS");return}Me=ze-t.presentationOffset}const lt=re.endTime-re.startTime,bt=Li((re.startTime+Me-L)*9e4,r*9e4)/9e4;re.startTime=Math.max(bt,0),re.endTime=Math.max(bt+lt,0);const Qt=re.text.trim();re.text=decodeURIComponent(encodeURIComponent(Qt)),re.id||(re.id=nl(re.startTime,re.endTime,Qt)),re.endTime>0&&c.push(re)},l.onparsingerror=function(re){O=re},l.onflush=function(){if(O){s(O);return}i(c)},d.forEach(re=>{if(ie)if(tl(re,"X-TIMESTAMP-MAP=")){ie=!1,re.slice(16).split(",").forEach(Te=>{tl(Te,"LOCAL:")?v=Te.slice(6):tl(Te,"MPEGTS:")&&(T=parseInt(Te.slice(7)))});try{L=i0(v)/1e3}catch(Te){O=Te}return}else re===""&&(ie=!1);l.parse(re+`
|
|
|
`)}),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)$/,o0={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=>Be(l)),s=Ui(e.baseTime,1,e.timescale);try{i.forEach(l=>t(l0(l,s)))}catch(l){n(l)}}function l0(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((v,T)=>(v[T]=r.getAttribute(`ttp:${T}`)||i[T],v),{}),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,v=>{const T=nu(v,l);if(!T||!v.hasAttribute("begin"))return null;const L=al(v.getAttribute("begin"),s),O=al(v.getAttribute("dur"),s);let ie=al(v.getAttribute("end"),s);if(L===null)throw ru(v);if(ie===null){if(O===null)throw ru(v);ie=L+O}const re=new Jo(L-e,ie-e,T);re.id=nl(re.startTime,re.endTime,re.text);const Te=c[v.getAttribute("region")],Me=d[v.getAttribute("style")],ze=u0(Te,Me,d),{textAlign:lt}=ze;if(lt){const bt=o0[lt];bt&&(re.lineAlign=bt),re.align=lt}return E(re,ze),re}).filter(v=>v!==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 u0(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=c0(a,e):Jl.test(a)&&(t=d0(a,e))),t}function c0(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 d0(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 h0{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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(g.FRAG_LOADING,this.onFragLoading,this),e.on(g.FRAG_LOADED,this.onFragLoaded,this),e.on(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(g.FRAG_LOADING,this.onFragLoading,this),e.off(g.FRAG_LOADED,this.onFragLoaded,this),e.off(g.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(g.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(g.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(g.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(g.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=f0(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(g.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===ae.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(g.FRAG_LOADED,d):this.hls.trigger(g.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(g.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 v=null;for(let T=0;T<l.length;T++)if(l[T]&&su(l[T],d)){v=l[T],l[T]=null;break}v&&(p=v)}if(p)ya(p);else{const v=iu(d);p=this.createTextTrack(v,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(g.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===ae.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===ae.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(g.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(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(g.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?zt(n.initSegment.data,new Uint8Array(r)).buffer:r;a0(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,p=>{this._appendCues(p,n.level),d.trigger(g.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},p=>{const v=p.message==="Missing initPTS for VTT MPEGTS";v?s.push(e):this._fallbackToIMSC1(n,r),d.logger.log(`Failed to parse VTT cue: ${p}`),!(v&&l>n.cc)&&d.trigger(g.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(g.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===ae.SUBTITLE&&this.onFragLoaded(g.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===ae.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 f0(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 m0=/\s/,p0={newCue(a,e,t,n){const r=[];let i,s,l,d,c;const p=self.VTTCue||self.TextTrackCue;for(let T=0;T<n.rows.length;T++)if(i=n.rows[T],l=!0,d=0,c="",!i.isEmpty()){var v;for(let ie=0;ie<i.chars.length;ie++)m0.test(i.chars[ie].uchar)&&l?d++:(c+=i.chars[ie].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const L=Ql(c.trim()),O=nl(e,t,L);a!=null&&(v=a.cues)!=null&&v.getCueById(O)||(s=new p(e,t,L),s.id=O,s.line=T+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((T,L)=>T.line==="auto"||L.line==="auto"?0:T.line>8&&L.line>8?L.line-T.line:T.line-L.line),r.forEach(T=>Ul(a,T))),r}};function g0(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const v0=/(\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||x0,this.controller=new self.AbortController,this.stats=new w}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,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=y0(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&&m(d)?d:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Na(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(v=>{var T;this.response=this.loader=v;const L=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-(L-r.loading.start)),!v.ok){const{status:ie,statusText:re}=v;throw new E0(re||"fetch, bad network response",ie,v)}r.loading.first=L,r.total=b0(v.headers)||r.total;const O=(T=this.callbacks)==null?void 0:T.onProgress;return O&&m(t.highWaterMark)?this.loadProgressively(v,r,e,t.highWaterMark,O):s?v.arrayBuffer():e.responseType==="json"?v.json():v.text()}).then(v=>{var T,L;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 ie=v[l];ie&&(r.loaded=r.total=ie);const re={url:O.url,data:v,code:O.status},Te=(T=this.callbacks)==null?void 0:T.onProgress;Te&&!m(t.highWaterMark)&&Te(r,e,v,O),(L=this.callbacks)==null||L.onSuccess(re,r,e,O)}).catch(v=>{var T;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const L=v&&v.code||0,O=v?v.message:null;(T=this.callbacks)==null||T.onError({code:L,text:O},e,v?v.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 Ta,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,v=p.length;return t.loaded+=v,v<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 y0(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(E({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function _0(a){const e=v0.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function b0(a){const e=a.get("Content-Range");if(e){const n=_0(e);if(m(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function x0(a,e){return new self.Request(a.url,e)}class E0 extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const S0=/^age:\s*[\d.]+\s*$/im;class lu{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new w,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,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&&m(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 ie=t.responseType==="arraybuffer"?O.byteLength:O.length;n.loaded=n.total=ie,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const re=(s=this.callbacks)==null?void 0:s.onProgress;re&&re(n,e,O,t);const Te={url:t.responseURL,data:O,code:c};(l=this.callbacks)==null||l.onSuccess(Te,n,e,t);return}}const v=i.loadPolicy.errorRetry,T=n.retry,L={url:e.url,data:void 0,code:c};if(_r(v,T,!1,L))this.retry(v);else{var d;oe.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(_r(e,t,!0))this.retry(e);else{var n;oe.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=ir(e,n.retry),n.retry++,oe.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&&S0.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 w0={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},A0=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:En,bufferController:Ru,capLevelController:Ho,errorController:sr,fpsController:Dc,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:w0},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},T0()),{},{subtitleStreamController:Uc,subtitleTrackController:Lc,timelineController:h0,audioStreamController:Tu,audioTrackController:Cu,emeController:va,cmcdController:wc,contentSteeringController:Tc,interstitialsController:$c});function T0(){return{cueHandler:p0,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 C0(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 v=`${s}Loading${p}`,T=e[v];if(T!==void 0&&d){c.push(v);const L=n[l].default;switch(e[l]={default:L},p){case"TimeOut":L.maxLoadTimeMs=T,L.maxTimeToFirstByteMs=T;break;case"MaxRetry":L.errorRetry.maxNumRetry=T,L.timeoutRetry.maxNumRetry=T;break;case"RetryDelay":L.errorRetry.retryDelayMs=T,L.timeoutRetry.retryDelayMs=T;break;case"MaxRetryTimeout":L.errorRetry.maxRetryDelayMs=T,L.timeoutRetry.maxRetryDelayMs=T;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${it(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 D0(a,e){const t=a.loader;t!==ou&&t!==lu?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):g0()&&(a.loader=ou,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const Eo=2,I0=.1,R0=.05,L0=100;class O0 extends ci{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(g.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.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(L0),this.mediaSource=t.mediaSource;const n=this.media=t.media;mi(n,"playing",this.onMediaPlaying),mi(n,"waiting",this.onMediaWaiting),mi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(bi(n,"playing",this.onMediaPlaying),bi(n,"waiting",this.onMediaWaiting),bi(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(g.MEDIA_ENDED,{stalled:!1}));return}if(!rr.getBuffered(s).length){this.nudgeRetry=0;return}const v=rr.bufferInfo(s,e,0),T=v.nextStart||0,L=this.fragmentTracker;if(l&&L&&this.hls){const Qt=uu(this.hls.inFlightFragments,e),At=v.len>Eo,Yt=!T||Qt||T-e>Eo&&!L.getPartialFragment(e);if(At||Yt)return;this.moved=!1}const O=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&L){if(!(v.len>0)&&!T)return;const At=Math.max(T,v.start||0)-e,Zt=!!(O!=null&&O.live)?O.targetduration*2:Eo,Mt=So(e,L);if(At>0&&(At<=Zt||Mt)){s.paused||this._trySkipBufferHole(Mt);return}}const ie=i.detectStallWithCurrentTimeMs,re=self.performance.now(),Te=this.waiting;let Me=this.stalled;if(Me===null)if(Te>0&&re-Te<ie)Me=this.stalled=Te;else{this.stalled=re;return}const ze=re-Me;if(!l&&(ze>=ie||Te)&&this.hls){var lt;if(((lt=this.mediaSource)==null?void 0:lt.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(g.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(v),!this.media||!this.hls)return}const bt=rr.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(bt,ze,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(g.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=rr.bufferedInfo(rr.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=rr.timeRangesToArray(r),l=rr.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const d=rr.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 v=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${d}`);this.warn(v.message),this.media.currentTime+=1e-6;let T=So(e,this.fragmentTracker);T&&"fragment"in T?T=T.fragment:T||(T=void 0);const L=rr.bufferInfo(this.media,e,0);this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:j.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:v,reason:v.message,frag:T,buffer:L.len,bufferInfo:L})}}}}}_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 v=e.buffered,T=this.adjacentTraversal(e,n);(v&&v.length>1&&e.len>d.maxBufferHole||e.nextStart&&(e.nextStart-n<d.maxBufferHole||T))&&(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,ae.MAIN),s=n.getFragAtPos(r,ae.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 (${it(e)})`);this.warn(s.message),t.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:j.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,l=rr.bufferInfo(r,s,0),d=s<l.start?l.start:l.nextStart;if(d&&this.hls){const p=l.len<=i.maxBufferHole,v=l.len>0&&l.len<1&&r.readyState<3,T=d-s;if(T>0&&(p||v)){if(T>i.maxBufferHole){let O=!1;if(s===0){const ie=n.getAppendedFrag(0,ae.MAIN);ie&&d<ie.end&&(O=!0)}if(!O&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,d))return 0;let re=!1,Te=e.end;for(;Te<d;){const Me=So(Te,n);if(Me)Te+=Me.duration;else{re=!0;break}}if(re)return 0}}const L=Math.max(d+R0,s+I0);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${L}`),this.moved=!0,r.currentTime=L,!(e!=null&&e.gap)){const O=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${L}`),ie={type:ve.MEDIA_ERROR,details:j.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:O,reason:O.message,buffer:l.len,bufferInfo:l};e&&("fragment"in e?ie.part=e:ie.frag=e),this.hls.trigger(g.ERROR,ie)}return L}}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(g.ERROR,{type:ve.MEDIA_ERROR,details:j.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(g.ERROR,{type:ve.MEDIA_ERROR,details:j.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 sn.IDLE:case sn.STOPPED:case sn.ENDED:case sn.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,ae.MAIN)||e.getPartialFragment(a)}const P0=.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,it(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 k0{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(g.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(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(g.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.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===pi.emsg&&!n||!r)continue;const c=Ma(i[l].data),p=i[l].pts;let v=p+i[l].duration;v>wo&&(v=wo),v-p<=0&&(v=p+P0);for(let L=0;L<c.length;L++){const O=c[L];if(!ro(O)){this.updateId3CueEnds(p,d);const ie=ul(s,p,v,O,d);ie&&this.id3Track.addCue(ie)}}}}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===pi.audioId3&&d:r==="video"?c=p=>p.type===pi.emsg&&l:c=p=>p.type===pi.audioId3&&d||p.type===pi.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:ie,fragmentEnd:re}=e;let Te=this.assetCue;Te?(Te.startTime=ie,Te.endTime=re):l&&(Te=this.assetCue=ul(l,ie,re,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),Te&&(Te.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(Te),Te.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:d}=this,{dateRanges:c}=e,p=Object.keys(c);let v=this.dateRangeCuesAppended;if(d&&t){var T;if((T=d.cues)!=null&&T.length){const ie=Object.keys(v).filter(re=>!p.includes(re));for(let re=ie.length;re--;){var L;const Te=ie[re],Me=(L=v[Te])==null?void 0:L.cues;delete v[Te],Me&&Object.keys(Me).forEach(ze=>{const lt=Me[ze];if(lt){lt.removeEventListener("enter",this.onEventCueEnter);try{d.removeCue(lt)}catch(bt){}}})}}else v=this.dateRangeCuesAppended={}}const O=e.fragments[e.fragments.length-1];if(!(p.length===0||!m(O==null?void 0:O.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let ie=0;ie<p.length;ie++){const re=p[ie],Te=c[re],Me=Te.startTime,ze=v[re],lt=(ze==null?void 0:ze.cues)||{};let bt=(ze==null?void 0:ze.durationKnown)||!1,Qt=wo;const{duration:At,endDate:Yt}=Te;if(Yt&&At!==null)Qt=Me+At,bt=!0;else if(Te.endOnNext&&!bt){const Mt=p.reduce((cn,Ln)=>{if(Ln!==Te.id){const Vn=c[Ln];if(Vn.class===Te.class&&Vn.startDate>Te.startDate&&(!cn||Te.startDate<cn.startDate))return Vn}return cn},null);Mt&&(Qt=Mt.startTime,bt=!0)}const Zt=Object.keys(Te.attr);for(let Mt=0;Mt<Zt.length;Mt++){const cn=Zt[Mt];if(!Jr(cn))continue;const Ln=lt[cn];if(Ln)bt&&!(ze!=null&&ze.durationKnown)?Ln.endTime=Qt:Math.abs(Ln.startTime-Me)>.01&&(Ln.startTime=Me,Ln.endTime=Qt);else if(l){let Vn=Te.attr[cn];ni(cn)&&(Vn=N(Vn));const Zn=ul(l,Me,Qt,{key:cn,data:Vn},pi.dateRange);Zn&&(Zn.id=re,this.id3Track.addCue(Zn),lt[cn]=Zn,s&&(cn==="X-ASSET-LIST"||cn==="X-ASSET-URL")&&Zn.addEventListener("enter",this.onEventCueEnter))}}v[re]={cues:lt,dateRange:Te,durationKnown:bt}}}}}class M0{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 v=Math.min(2,Math.max(1,s)),T=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20,L=Math.min(v,Math.max(1,T));this.changeMediaPlaybackRate(t,L)}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(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(g.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(g.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(g.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(g.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===j.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 F0 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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this),e.on(g.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.FRAG_BUFFERED,this.onFragBuffered,this),e.off(g.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 v=p.attrs;let{audioCodec:T,videoCodec:L}=p;T&&(p.audioCodec=T=J(T,n)||void 0),L&&(L=p.videoCodec=Jt(L));const{width:O,height:ie,unknownCodecs:re}=p,Te=(re==null?void 0:re.length)||0;if(l||(l=!!(O&&ie)),d||(d=!!L),c||(c=!!T),Te||T&&!this.isAudioSupported(T)||L&&!this.isVideoSupported(L)){this.log(`Some or all CODECS not supported "${v.CODECS}"`);return}const{CODECS:Me,"FRAME-RATE":ze,"HDCP-LEVEL":lt,"PATHWAY-ID":bt,RESOLUTION:Qt,"VIDEO-RANGE":At}=v,Zt=`${`${bt||"."}-`}${p.bitrate}-${Qt}-${ze}-${Me}-${At}-${lt}`;if(i[Zt])if(i[Zt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const Mt=s[Zt]+=1;p.attrs["PATHWAY-ID"]=new Array(Mt+1).join(".");const cn=this.createLevel(p);i[Zt]=cn,r.push(cn)}else i[Zt].addGroupId("audio",v.AUDIO),i[Zt].addGroupId("text",v.SUBTITLES);else{const Mt=this.createLevel(p);i[Zt]=Mt,s[Zt]=1,r.push(Mt)}}),this.filterAndSortMediaOptions(r,t,l,d,c)}createLevel(e){const t=new Et(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=tn(r,[])}return t}isAudioSupported(e){return je(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return je(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:Me,videoRange:ze,width:lt,height:bt})=>(!!Me||!!(lt&&bt))&&we(ze))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let Me="no level with compatible codecs found in manifest",ze=Me;t.levels.length&&(ze=`one or more CODECS in variant not supported: ${it(t.levels.map(bt=>bt.attrs.CODECS).filter((bt,Qt,At)=>At.indexOf(bt)===Qt))}`,this.warn(ze),Me+=` (${ze})`);const lt=new Error(Me);this.hls.trigger(g.ERROR,{type:ve.MEDIA_ERROR,details:j.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:lt,reason:ze})}}),p.end=performance.now();return}t.audioTracks&&(l=t.audioTracks.filter(Me=>!Me.audioCodec||this.isAudioSupported(Me.audioCodec)),du(l)),t.subtitles&&(d=t.subtitles,du(d));const v=c.slice(0);c.sort((Me,ze)=>{if(Me.attrs["HDCP-LEVEL"]!==ze.attrs["HDCP-LEVEL"])return(Me.attrs["HDCP-LEVEL"]||"")>(ze.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&Me.height!==ze.height)return Me.height-ze.height;if(Me.frameRate!==ze.frameRate)return Me.frameRate-ze.frameRate;if(Me.videoRange!==ze.videoRange)return ht.indexOf(Me.videoRange)-ht.indexOf(ze.videoRange);if(Me.videoCodec!==ze.videoCodec){const lt=ne(Me.videoCodec),bt=ne(ze.videoCodec);if(lt!==bt)return bt-lt}if(Me.uri===ze.uri&&Me.codecSet!==ze.codecSet){const lt=be(Me.codecSet),bt=be(ze.codecSet);if(lt!==bt)return bt-lt}return Me.averageBitrate!==ze.averageBitrate?Me.averageBitrate-ze.averageBitrate:0});let T=v[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==v.length)){for(let Me=0;Me<v.length;Me++)if(v[Me].pathwayId===c[0].pathwayId){T=v[Me];break}}this._levels=c;for(let Me=0;Me<c.length;Me++)if(c[Me]===T){var L;this._firstLevel=Me;const ze=T.bitrate,lt=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${ze}`),((L=this.hls.userConfig)==null?void 0:L.abrEwmaDefaultEstimate)===void 0){const bt=Math.min(ze,this.hls.config.abrEwmaDefaultEstimateMax);bt>lt&<===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=bt)}break}const O=i&&!r,ie=this.hls.config,re=!!(ie.audioStreamController&&ie.audioTrackController),Te={levels:c,audioTracks:l,subtitleTracks:d,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:re&&!O&&l.some(Me=>!!Me.url)};p.end=performance.now(),this.hls.trigger(g.MANIFEST_PARSED,Te)}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"),v=e<0;if(this.hls.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:j.LEVEL_SWITCH_ERROR,level:e,fatal:v,error:p,reason:p.message}),v)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(g.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===de.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ae.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(g.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));fi(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(g.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(g.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(!xe())return!1;const e=hu();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function B0(){if(!fu())return!1;const a=xe();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(Y(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(Y(e,"audio"))))}function N0(){var a;const e=hu();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const $0=100;class U0 extends Ks{constructor(e,t,n){super(e,t,n,"stream-controller",ae.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||!m(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,ae.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(g.MANIFEST_PARSED,this.onManifestParsed,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.LEVEL_LOADED,this.onLevelLoaded,this),e.on(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(g.BUFFER_CREATED,this.onBufferCreated,this),e.on(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(g.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(g.MANIFEST_PARSED,this.onManifestParsed,this),e.off(g.LEVEL_LOADED,this.onLevelLoaded,this),e.off(g.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(g.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(g.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(g.BUFFER_CREATED,this.onBufferCreated,this),e.off(g.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(g.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(g.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($0),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=sn.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=sn.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case sn.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=sn.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=sn.IDLE;break}break}case sn.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===sn.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 ie={};this.altAudio===2&&(ie.type="video"),this.hls.trigger(g.BUFFER_EOS,ie),this.state=sn.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===sn.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=sn.WAITING_LEVEL,this.startFragRequested=!1;return}const p=l.len,v=this.getMaxBufferLength(s.maxBitrate);if(p>=v)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const T=this.backtrackFragment?this.backtrackFragment.start:l.end;let L=this.getNextFragment(T,c);if(this.couldBacktrack&&!this.fragPrevious&&L&&$e(L)&&this.fragmentTracker.getState(L)!==er.OK){var O;const re=((O=this.backtrackFragment)!=null?O:L).sn-c.startSN,Te=c.fragments[re-1];Te&&L.cc===Te.cc&&(L=Te,this.fragmentTracker.removeFragment(Te))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(L&&this.isLoopLoading(L,T)){if(!L.gap){const re=this.audioOnly&&!this.altAudio?V.AUDIO:V.VIDEO,Te=(re===V.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;Te&&this.afterBufferFlushed(Te,re,ae.MAIN)}L=this.getNextFragmentLoopLoading(L,c,l,ae.MAIN,v)}L&&(L.initSegment&&!L.initSegment.data&&!this.bitrateTest&&(L=L.initSegment),this.loadFragment(L,s,T))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===er.NOT_LOADED||r===er.PARTIAL?$e(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,ae.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 sn.KEY_LOADING:case sn.FRAG_LOADING:case sn.FRAG_LOADING_WAITING_RETRY:case sn.PARSING:case sn.PARSED:this.state=sn.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;mi(n,"playing",this.onMediaPlaying),mi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(bi(n,"playing",this.onMediaPlaying),bi(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(g.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&&!N0(),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!==sn.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=sn.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===sn.FRAG_LOADING||this.state===sn.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let v=0;if(l.live||(n=c.details)!=null&&n.live){var T;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;v=this.alignPlaylists(l,c.details,(T=this.levelLastLoaded)==null?void 0:T.details)}if(c.details=l,this.levelLastLoaded=c,i||this.setStartPosition(l,v),this.hls.trigger(g.LEVEL_UPDATED,{details:l,level:s}),this.state===sn.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=sn.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 v=rr.bufferInfo(n,r,0);if(!((c=v.buffered)!=null&&c.length)){n.currentTime=r;return}if(v.start<=i){n.currentTime=r;return}const{nextStart:L}=rr.bufferedInfo(v.buffered,i,0);L&&(n.currentTime=L)}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,v=(t=n.initSegment)==null?void 0:t.data,T=this._getAudioCodec(l),L=this.transmuxer=this.transmuxer||new vl(this.hls,ae.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),O=r?r.index:-1,ie=O!==-1,re=new di(n.level,n.sn,n.stats.chunkCount,i.byteLength,O,ie),Te=this.initPTS[n.cc];L.push(i,v,T,c,n,r,d.totalduration,p,re,Te)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio!==0;if(Tn(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(g.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(g.AUDIO_TRACK_SWITCHED,t)}),n.trigger(g.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(g.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=Tn(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===ae.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===sn.PARSED&&(this.state=sn.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),$e(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&rr.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=sn.ERROR;return}switch(t.details){case j.FRAG_GAP:case j.FRAG_PARSING_ERROR:case j.FRAG_DECRYPT_ERROR:case j.FRAG_LOAD_ERROR:case j.FRAG_LOAD_TIMEOUT:case j.KEY_LOAD_ERROR:case j.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ae.MAIN,t);break;case j.LEVEL_LOAD_ERROR:case j.LEVEL_LOAD_TIMEOUT:case j.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===sn.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===de.LEVEL&&(this.state=sn.IDLE);break;case j.BUFFER_ADD_CODEC_ERROR:case j.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case j.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&(!this.config.interstitialsController&&this.config.assetPlayerId?this._hasEnoughToStart=!0:this.flushMainBuffer(0,Number.POSITIVE_INFINITY));break;case j.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=sn.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==V.AUDIO||!this.altAudio){const n=(t===V.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,ae.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=rr.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=sn.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(g.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===sn.STOPPED||this.state===sn.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:v,id3:T,initSegment:L}=r,{details:O}=c,ie=this.altAudio?void 0:r.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=sn.PARSING,L){const re=L.tracks;if(re){const lt=l.initSegment||l;if(this.unhandledEncryptionError(L,l))return;this._bufferInitSegment(c,re,lt,i),n.trigger(g.FRAG_PARSING_INIT_SEGMENT,{frag:lt,id:t,tracks:re})}const Te=L.initPTS,Me=L.timescale,ze=this.initPTS[l.cc];if(m(Te)&&(!ze||ze.baseTime!==Te||ze.timescale!==Me)){const lt=L.trackId;this.initPTS[l.cc]={baseTime:Te,timescale:Me,trackId:lt},n.trigger(g.INIT_PTS_FOUND,{frag:l,id:t,initPTS:Te,timescale:Me,trackId:lt})}}if(p&&O){ie&&p.type==="audiovideo"&&this.logMuxedErr(l);const re=O.fragments[l.sn-1-O.startSN],Te=l.sn===O.startSN,Me=!re||l.cc>re.cc;if(r.independent!==!1){const{startPTS:ze,endPTS:lt,startDTS:bt,endDTS:Qt}=p;if(d)d.elementaryStreams[p.type]={startPTS:ze,endPTS:lt,startDTS:bt,endDTS:Qt};else if(p.firstKeyFrame&&p.independent&&i.id===1&&!Me&&(this.couldBacktrack=!0),p.dropped&&p.independent){const At=this.getMainFwdBufferInfo(),Yt=(At?At.end:this.getLoadPosition())+this.config.maxBufferHole,Zt=p.firstKeyFramePTS?p.firstKeyFramePTS:ze;if(!Te&&Yt<Zt-this.config.maxBufferHole&&!Me){this.backtrack(l);return}else Me&&(l.gap=!0);l.setElementaryStreamInfo(p.type,l.start,lt,l.start,Qt,!0)}else Te&&ze-(O.appliedTimelineOffset||0)>Eo&&(l.gap=!0);l.setElementaryStreamInfo(p.type,ze,lt,bt,Qt),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(p,l,d,i,Te||Me)}else if(Te||Me)l.gap=!0;else{this.backtrack(l);return}}if(ie){const{startPTS:re,endPTS:Te,startDTS:Me,endDTS:ze}=ie;d&&(d.elementaryStreams[V.AUDIO]={startPTS:re,endPTS:Te,startDTS:Me,endDTS:ze}),l.setElementaryStreamInfo(V.AUDIO,re,Te,Me,ze),this.bufferFragmentData(ie,l,d,i)}if(O&&T!=null&&T.samples.length){const re={id:t,frag:l,details:O,samples:T.samples};n.trigger(g.FRAG_PARSING_METADATA,re)}if(O&&v){const re={id:t,frag:l,details:O,samples:v.samples};n.trigger(g.FRAG_PARSING_USERDATA,re)}}logMuxedErr(e){this.warn(`${$e(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==sn.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=Gt(i.codec,c);p==="mp4a"&&(p="mp4a.40.5");const v=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){p&&(p.indexOf("mp4a.40.5")!==-1?p="mp4a.40.2":p="mp4a.40.5");const T=i.metadata;T&&"channelCount"in T&&(T.channelCount||1)!==1&&v.indexOf("firefox")===-1&&(p="mp4a.40.5")}p&&p.indexOf("mp4a.40.5")!==-1&&v.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=ae.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=ae.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(g.BUFFER_CODECS,t),!this.hls)return;d.forEach(c=>{const v=t[c].initSegment;v!=null&&v.byteLength&&this.hls.trigger(g.BUFFER_APPENDING,{type:c,data:v,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,ae.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=sn.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(rr.isBuffered(e,n)?t=this.getAppendedFrag(n):rr.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(g.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(g.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 m(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(m(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?Hn(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 z0 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=j.KEY_LOAD_ERROR,n,r,i){return new cr({type:ve.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&&(!$e(e)||!$e(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=Ci(l);if(d)return this.emeController.getKeySystemAccess([d])})}if(this.config.requireKeySystemAccessOnStart){const r=Oi(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,j.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,j.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const 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:v}=p;return i.key=v.decryptdata.key,{frag:e,keyInfo:v}})}switch(this.log(`${this.keyIdToKeyInfo[l]?"Rel":"L"}oading${i.keyId?" keyId: "+X(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,j.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=St(t.initSegment.data);if(s.length){let l=s[0];l.some(d=>d!==0)?(this.log(`Using keyId found in init segment ${X(l)}`),Si.setKeyIdForUri(e.decryptdata.uri,l)):(l=Si.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${X(l)}`)),e.decryptdata.keyId=l}}if(!e.decryptdata.keyId&&!$e(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},v={onSuccess:(T,L,O,ie)=>{const{frag:re,keyInfo:Te}=O,Me=cl(Te.decryptdata);if(!re.decryptdata||Te!==this.keyIdToKeyInfo[Me])return l(this.createKeyLoadError(re,j.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),ie));Te.decryptdata.key=re.decryptdata.key=new Uint8Array(T.data),re.keyLoader=null,Te.loader=null,s({frag:re,keyInfo:Te})},onError:(T,L,O,ie)=>{this.resetLoader(L),l(this.createKeyLoadError(t,j.KEY_LOAD_ERROR,new Error(`HTTP Error ${T.code} loading key ${T.text}`),O,C({url:d.url,data:void 0},T)))},onTimeout:(T,L,O)=>{this.resetLoader(L),l(this.createKeyLoadError(t,j.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),O))},onAbort:(T,L,O)=>{this.resetLoader(L),l(this.createKeyLoadError(t,j.INTERNAL_ABORTED,new Error("key loading aborted"),O))}};i.load(d,p,v)})}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!==gr.FAIRPLAY){const e=a.keyId;if(e)return X(e)}return a.uri}function mu(a){const{type:e}=a;switch(e){case de.AUDIO_TRACK:return ae.AUDIO;case de.SUBTITLE_TRACK:return ae.SUBTITLE;default:return ae.MAIN}}function dl(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class j0{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(g.MANIFEST_LOADING,this.onManifestLoading,this),e.on(g.LEVEL_LOADING,this.onLevelLoading,this),e.on(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(g.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(g.MANIFEST_LOADING,this.onManifestLoading,this),e.off(g.LEVEL_LOADING,this.onLevelLoading,this),e.off(g.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(g.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(g.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:de.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:de.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:de.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:de.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[de.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[de.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===de.MANIFEST?i=n.manifestLoadPolicy.default:i=E({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),m((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===de.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===de.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===de.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,v=c.targetduration;if(p&&v){const T=Math.max(p*3,v*.8)*1e3;i=E({},i,{maxTimeToFirstByteMs:Math.min(T,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(T,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,v,T)=>{const L=this.getInternalLoader(v);this.resetInternalLoader(v.type);const O=c.data;p.parsing.start=performance.now(),Ii.isMediaPlaylist(O)||v.type!==de.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,v,T||null,L):this.handleMasterPlaylist(c,p,v,T)},onError:(c,p,v,T)=>{this.handleNetworkError(p,v,!1,c,T)},onTimeout:(c,p,v)=>{this.handleNetworkError(p,v,!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=Ii.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:v,sessionKeys:T,startTimeOffset:L,variableList:O}=d;this.variableList=O,p.forEach(Me=>{const{unknownCodecs:ze}=Me;if(ze){const{preferManagedMediaSource:lt}=this.hls.config;let{audioCodec:bt,videoCodec:Qt}=Me;for(let At=ze.length;At--;){const Yt=ze[At];je(Yt,"audio",lt)?(Me.audioCodec=bt=bt?`${bt},${Yt}`:Yt,wt.audio[bt.substring(0,4)]=2,ze.splice(At,1)):je(Yt,"video",lt)&&(Me.videoCodec=Qt=Qt?`${Qt},${Yt}`:Yt,wt.video[Qt.substring(0,4)]=2,ze.splice(At,1))}}});const{AUDIO:ie=[],SUBTITLES:re,"CLOSED-CAPTIONS":Te}=Ii.parseMasterPlaylistMedia(s,l,d);ie.length&&!ie.some(ze=>!ze.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"),ie.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Bn({}),bitrate:0,url:""})),i.trigger(g.MANIFEST_LOADED,{levels:p,audioTracks:ie,subtitles:re,captions:Te,contentSteering:c,url:l,stats:t,networkDetails:r,sessionData:v,sessionKeys:T,startTimeOffset:L,variableList:O})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:d,type:c}=n,p=dl(e,n),v=m(d)?d:m(l)?l:0,T=mu(n),L=Ii.parseLevelPlaylist(e.data,p,v,T,0,this.variableList);if(c===de.MANIFEST){const O={attrs:new Bn({}),bitrate:0,details:L,name:"",url:p};L.requestScheduled=t.loading.start+Lr(L,0),s.trigger(g.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=L,this.handlePlaylistLoaded(L,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:j.MANIFEST_PARSING_ERROR,fatal:t.type===de.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===de.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===de.AUDIO_TRACK||e.type===de.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let d=j.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case de.MANIFEST:d=n?j.MANIFEST_LOAD_TIMEOUT:j.MANIFEST_LOAD_ERROR,c=!0;break;case de.LEVEL:d=n?j.LEVEL_LOAD_TIMEOUT:j.LEVEL_LOAD_ERROR,c=!1;break;case de.AUDIO_TRACK:d=n?j.AUDIO_TRACK_LOAD_TIMEOUT:j.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case de.SUBTITLE_TRACK:d=n?j.SUBTITLE_TRACK_LOAD_TIMEOUT:j.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const v={type:ve.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:p,context:e,error:l,networkDetails:t,stats:i};if(r){const T=(t==null?void 0:t.url)||e.url;v.response=C({url:T,data:void 0},r)}this.hls.trigger(g.ERROR,v)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:d,level:c,levelOrTrack:p,id:v,groupId:T,deliveryDirectives:L}=r,O=dl(t,r),ie=mu(r);let re=typeof r.level=="number"&&ie===ae.MAIN?c:void 0;const Te=e.playlistParsingError;if(Te){if(this.hls.logger.warn(`${Te} ${e.url}`),!l.config.ignorePlaylistParsingErrors){l.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:j.LEVEL_PARSING_ERROR,fatal:!1,url:O,error:Te,reason:Te.message,response:t,context:r,level:re,parent:ie,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const Me=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(g.ERROR,{type:ve.NETWORK_ERROR,details:j.LEVEL_EMPTY_ERROR,fatal:!1,url:O,error:Me,reason:Me.message,response:t,context:r,level:re,parent:ie,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 de.MANIFEST:case de.LEVEL:if(re){if(!p)re=0;else if(p!==l.levels[re]){const Me=l.levels.indexOf(p);Me>-1&&(re=Me)}}l.trigger(g.LEVEL_LOADED,{details:e,levelInfo:p||l.levels[0],level:re||0,id:v||0,stats:n,networkDetails:i,deliveryDirectives:L,withoutMultiVariant:d===de.MANIFEST});break;case de.AUDIO_TRACK:l.trigger(g.AUDIO_TRACK_LOADED,{details:e,track:p,id:v||0,groupId:T||"",stats:n,networkDetails:i,deliveryDirectives:L});break;case de.SUBTITLE_TRACK:l.trigger(g.SUBTITLE_TRACK_LOADED,{details:e,track:p,id:v||0,groupId:T||"",stats:n,networkDetails:i,deliveryDirectives:L});break}}}class Fs{static get version(){return Gs}static isMSESupported(){return fu()}static isSupported(){return B0()}static getMediaSource(){return xe()}static get Events(){return g}static get MetadataSchema(){return pi}static get ErrorTypes(){return ve}static get ErrorDetails(){return j}static get DefaultConfig(){return Fs.defaultConfig?Fs.defaultConfig:A0}static set DefaultConfig(e){Fs.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=pe(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=C0(Fs.DefaultConfig,e,t);this.userConfig=e,n.progressive&&D0(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:d}=n,c=new l(this),p=this.abrController=new r(this),v=new Pr(this),T=n.interstitialsController,L=T?this.interstitialsController=new T(this,Fs):null,O=this.bufferController=new i(this,v),ie=this.capLevelController=new s(this),re=new d(this),Te=new j0(this),Me=n.contentSteeringController,ze=Me?new Me(this):null,lt=this.levelController=new F0(this,ze),bt=new k0(this),Qt=new z0(this.config,this.logger),At=this.streamController=new U0(this,v,Qt),Yt=this.gapController=new O0(this,v);ie.setStreamController(At),re.setStreamController(At);const Zt=[Te,lt,At];L&&Zt.splice(1,0,L),ze&&Zt.splice(1,0,ze),this.networkControllers=Zt;const Mt=[p,O,Yt,ie,re,bt,v];this.audioTrackController=this.createController(n.audioTrackController,Zt);const cn=n.audioStreamController;cn&&Zt.push(this.audioStreamController=new cn(this,v,Qt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Zt);const Ln=n.subtitleStreamController;Ln&&Zt.push(this.subtititleStreamController=new Ln(this,v,Qt)),this.createController(n.timelineController,Mt),Qt.emeController=this.emeController=this.createController(n.emeController,Mt),this.cmcdController=this.createController(n.cmcdController,Mt),this.latencyController=this.createController(M0,Mt),this.coreComponents=Mt,Zt.push(c);const Vn=c.onErrorOut;typeof Vn=="function"&&this.on(g.ERROR,Vn,c),this.on(g.MANIFEST_LOADED,Te.onManifestLoaded,Te)}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===g.ERROR;this.trigger(g.ERROR,{type:ve.OTHER_ERROR,details:j.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(g.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(g.ERROR,{type:ve.OTHER_ERROR,details:j.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(g.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(g.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(g.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=x.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(g.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={[ae.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ae.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ae.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=Oc()),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){It(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=dt(t);return Nt(e,n,navigator.mediaCapabilities)}}Fs.defaultConfig=void 0},16722:function(fn,ct,_){"use strict";_.d(ct,{Z:function(){return ae}});const m=o=>typeof o=="object"&&o!=null&&o.nodeType===1,ce=(o,G)=>(!G||o!=="hidden")&&o!=="visible"&&o!=="clip",se=(o,G)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const B=getComputedStyle(o,null);return ce(B.overflowY,G)||ce(B.overflowX,G)||(E=>{const S=(C=>{if(!C.ownerDocument||!C.ownerDocument.defaultView)return null;try{return C.ownerDocument.defaultView.frameElement}catch(R){return null}})(E);return!!S&&(S.clientHeight<E.scrollHeight||S.clientWidth<E.scrollWidth)})(o)}return!1},ve=(o,G,B,E,S,C,R,ee)=>C<o&&R>G||C>o&&R<G?0:C<=o&&ee<=B||R>=G&&ee>=B?C-o-E:R>G&&ee<B||C<o&&ee>B?R-G+S:0,j=o=>{const G=o.parentElement;return G==null?o.getRootNode().host||null:G},g=(o,G)=>{var B,E,S,C;if(typeof document=="undefined")return[];const{scrollMode:R,block:ee,inline:Q,boundary:W,skipOverflowHiddenElements:D}=G,z=typeof W=="function"?W:Qe=>Qe!==W;if(!m(o))throw new TypeError("Invalid target");const F=document.scrollingElement||document.documentElement,$=[];let ue=o;for(;m(ue)&&z(ue);){if(ue=j(ue),ue===F){$.push(ue);break}ue!=null&&ue===document.body&&se(ue)&&!se(document.documentElement)||ue!=null&&se(ue,D)&&$.push(ue)}const pe=(E=(B=window.visualViewport)==null?void 0:B.width)!=null?E:innerWidth,oe=(C=(S=window.visualViewport)==null?void 0:S.height)!=null?C:innerHeight,{scrollX:xe,scrollY:ke}=window,{height:De,width:Be,top:X,right:N,bottom:k,left:q}=o.getBoundingClientRect(),{top:te,right:Z,bottom:x,left:w}=(Qe=>{const ye=window.getComputedStyle(Qe);return{top:parseFloat(ye.scrollMarginTop)||0,right:parseFloat(ye.scrollMarginRight)||0,bottom:parseFloat(ye.scrollMarginBottom)||0,left:parseFloat(ye.scrollMarginLeft)||0}})(o);let V=ee==="start"||ee==="nearest"?X-te:ee==="end"?k+x:X+De/2-te+x,fe=Q==="center"?q+Be/2-w+Z:Q==="end"?N+Z:q-w;const $e=[];for(let Qe=0;Qe<$.length;Qe++){const ye=$[Qe],{height:He,width:Ye,top:tt,right:nt,bottom:Bt,left:qe}=ye.getBoundingClientRect();if(R==="if-needed"&&X>=0&&q>=0&&k<=oe&&N<=pe&&(ye===F&&!se(ye)||X>=tt&&k<=Bt&&q>=qe&&N<=nt))return $e;const jt=getComputedStyle(ye),Ue=parseInt(jt.borderLeftWidth,10),yt=parseInt(jt.borderTopWidth,10),Le=parseInt(jt.borderRightWidth,10),Ce=parseInt(jt.borderBottomWidth,10);let he=0,We=0;const Re="offsetWidth"in ye?ye.offsetWidth-ye.clientWidth-Ue-Le:0,Ie="offsetHeight"in ye?ye.offsetHeight-ye.clientHeight-yt-Ce:0,M="offsetWidth"in ye?ye.offsetWidth===0?0:Ye/ye.offsetWidth:0,me="offsetHeight"in ye?ye.offsetHeight===0?0:He/ye.offsetHeight:0;if(F===ye)he=ee==="start"?V:ee==="end"?V-oe:ee==="nearest"?ve(ke,ke+oe,oe,yt,Ce,ke+V,ke+V+De,De):V-oe/2,We=Q==="start"?fe:Q==="center"?fe-pe/2:Q==="end"?fe-pe:ve(xe,xe+pe,pe,Ue,Le,xe+fe,xe+fe+Be,Be),he=Math.max(0,he+ke),We=Math.max(0,We+xe);else{he=ee==="start"?V-tt-yt:ee==="end"?V-Bt+Ce+Ie:ee==="nearest"?ve(tt,Bt,He,yt,Ce+Ie,V,V+De,De):V-(tt+He/2)+Ie/2,We=Q==="start"?fe-qe-Ue:Q==="center"?fe-(qe+Ye/2)+Re/2:Q==="end"?fe-nt+Le+Re:ve(qe,nt,Ye,Ue,Le+Re,fe,fe+Be,Be);const{scrollLeft:Ee,scrollTop:Ke}=ye;he=me===0?0:Math.max(0,Math.min(Ke+he/me,ye.scrollHeight-He/me+Ie)),We=M===0?0:Math.max(0,Math.min(Ee+We/M,ye.scrollWidth-Ye/M+Re)),V+=Ke-he,fe+=Ee-We}$e.push({el:ye,top:he,left:We})}return $e},de=o=>o===!1?{block:"end",inline:"nearest"}:(G=>G===Object(G)&&Object.keys(G).length!==0)(o)?o:{block:"start",inline:"nearest"};function ae(o,G){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 B=(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")(G))return G.behavior(g(o,G));const E=typeof G=="boolean"||G==null?void 0:G.behavior;for(const{el:S,top:C,left:R}of g(o,de(G))){const ee=C-B.top+B.bottom,Q=R-B.left+B.right;S.scroll({top:ee,left:Q,behavior:E})}}}}]);
|
|
|
}()); |