|
|
!(function(){var bu=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[2829],{70557:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},40001:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},49198:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},84105:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},18785:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},73331:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},15277:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},33853:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},61485:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},47472:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(60499),ce=b(59301),Y={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"},de=Y,$=b(7657),p=function(A,F){return ce.createElement($.Z,(0,y.Z)({},A,{ref:F,icon:de}))},ge=ce.forwardRef(p),le=ge},68196:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return Ke}});var y=b(85899),ce=b(72190),Y=b(42244),de=b(43403),$=b(92310),p=b.n($),ge=b(29301),le=b(76846),l=b(96452),A=b(6089),F=b(80402),_=b(34280),E=b(49658),w=b(59301),O=b(60499),X=b(77900),J=b(8654);function U(Ae){var xe=Ae.prefixCls,se=Ae.align,Ne=Ae.arrow,Ce=Ae.arrowPos,Se=Ne||{},M=Se.className,fe=Se.content,_e=Ce.x,Re=_e===void 0?0:_e,$e=Ce.y,rt=$e===void 0?0:$e,it=w.useRef();if(!se||!se.points)return null;var te={position:"absolute"};if(se.autoArrow!==!1){var Q=se.points[0],lt=se.points[1],st=Q[0],ht=Q[1],bt=lt[0],He=lt[1];st===bt||!["t","b"].includes(st)?te.top=rt:st==="t"?te.top=0:te.bottom=0,ht===He||!["l","r"].includes(ht)?te.left=Re:ht==="l"?te.left=0:te.right=0}return w.createElement("div",{ref:it,className:p()("".concat(xe,"-arrow"),M),style:te},fe)}function R(Ae){var xe=Ae.prefixCls,se=Ae.open,Ne=Ae.zIndex,Ce=Ae.mask,Se=Ae.motion;return Ce?w.createElement(X.default,(0,O.Z)({},Se,{motionAppear:!0,visible:se,removeOnLeave:!0}),function(M){var fe=M.className;return w.createElement("div",{style:{zIndex:Ne},className:p()("".concat(xe,"-mask"),fe)})}):null}var z=w.memo(function(Ae){var xe=Ae.children;return xe},function(Ae,xe){return xe.cache}),P=z,N=w.forwardRef(function(Ae,xe){var se=Ae.popup,Ne=Ae.className,Ce=Ae.prefixCls,Se=Ae.style,M=Ae.target,fe=Ae.onVisibleChanged,_e=Ae.open,Re=Ae.keepDom,$e=Ae.fresh,rt=Ae.onClick,it=Ae.mask,te=Ae.arrow,Q=Ae.arrowPos,lt=Ae.align,st=Ae.motion,ht=Ae.maskMotion,bt=Ae.forceRender,He=Ae.getPopupContainer,Et=Ae.autoDestroy,pt=Ae.portal,ft=Ae.zIndex,Pt=Ae.onMouseEnter,x=Ae.onMouseLeave,D=Ae.onPointerEnter,Ye=Ae.onPointerDownCapture,W=Ae.ready,pe=Ae.offsetX,Bt=Ae.offsetY,Oe=Ae.offsetR,Ue=Ae.offsetB,et=Ae.onAlign,q=Ae.onPrepare,ne=Ae.stretch,we=Ae.targetWidth,Fe=Ae.targetHeight,G=typeof se=="function"?se():se,St=_e||Re,Ee=(He==null?void 0:He.length)>0,Wt=w.useState(!He||!Ee),en=(0,ce.Z)(Wt,2),an=en[0],Zn=en[1];if((0,_.Z)(function(){!an&&Ee&&M&&Zn(!0)},[an,Ee,M]),!an)return null;var Rn="auto",Cn={left:"-1000vw",top:"-1000vh",right:Rn,bottom:Rn};if(W||!_e){var sr,dr=lt.points,$n=lt.dynamicInset||((sr=lt._experimental)===null||sr===void 0?void 0:sr.dynamicInset),qn=$n&&dr[0][1]==="r",ln=$n&&dr[0][0]==="b";qn?(Cn.right=Oe,Cn.left=Rn):(Cn.left=pe,Cn.right=Rn),ln?(Cn.bottom=Ue,Cn.top=Rn):(Cn.top=Bt,Cn.bottom=Rn)}var $t={};return ne&&(ne.includes("height")&&Fe?$t.height=Fe:ne.includes("minHeight")&&Fe&&($t.minHeight=Fe),ne.includes("width")&&we?$t.width=we:ne.includes("minWidth")&&we&&($t.minWidth=we)),_e||($t.pointerEvents="none"),w.createElement(pt,{open:bt||St,getContainer:He&&function(){return He(M)},autoDestroy:Et},w.createElement(R,{prefixCls:Ce,open:_e,zIndex:ft,mask:it,motion:ht}),w.createElement(ge.Z,{onResize:et,disabled:!_e},function(Vt){return w.createElement(X.default,(0,O.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:bt,leavedClassName:"".concat(Ce,"-hidden")},st,{onAppearPrepare:q,onEnterPrepare:q,visible:_e,onVisibleChanged:function(Xn){var Qe;st==null||(Qe=st.onVisibleChanged)===null||Qe===void 0||Qe.call(st,Xn),fe(Xn)}}),function(An,Xn){var Qe=An.className,Je=An.style,ve=p()(Ce,Qe,Ne);return w.createElement("div",{ref:(0,J.sQ)(Vt,xe,Xn),className:ve,style:(0,y.Z)((0,y.Z)((0,y.Z)((0,y.Z)({"--arrow-x":"".concat(Q.x||0,"px"),"--arrow-y":"".concat(Q.y||0,"px")},Cn),$t),Je),{},{boxSizing:"border-box",zIndex:ft},Se),onMouseEnter:Pt,onMouseLeave:x,onPointerEnter:D,onClick:rt,onPointerDownCapture:Ye},te&&w.createElement(U,{prefixCls:Ce,arrow:te,arrowPos:Q,align:lt}),w.createElement(P,{cache:!_e&&!$e},G))})}))}),re=N,ue=w.forwardRef(function(Ae,xe){var se=Ae.children,Ne=Ae.getTriggerDOMNode,Ce=(0,J.Yr)(se),Se=w.useCallback(function(fe){(0,J.mH)(xe,Ne?Ne(fe):fe)},[Ne]),M=(0,J.x1)(Se,(0,J.C4)(se));return Ce?w.cloneElement(se,{ref:M}):se}),me=ue,Te=w.createContext(null),Be=Te;function Le(Ae){return Ae?Array.isArray(Ae)?Ae:[Ae]:[]}function at(Ae,xe,se,Ne){return w.useMemo(function(){var Ce=Le(se!=null?se:xe),Se=Le(Ne!=null?Ne:xe),M=new Set(Ce),fe=new Set(Se);return Ae&&(M.has("hover")&&(M.delete("hover"),M.add("click")),fe.has("hover")&&(fe.delete("hover"),fe.add("click"))),[M,fe]},[Ae,xe,se,Ne])}var ie=b(29194);function K(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],se=arguments.length>2?arguments[2]:void 0;return se?Ae[0]===xe[0]:Ae[0]===xe[0]&&Ae[1]===xe[1]}function I(Ae,xe,se,Ne){for(var Ce=se.points,Se=Object.keys(Ae),M=0;M<Se.length;M+=1){var fe,_e=Se[M];if(K((fe=Ae[_e])===null||fe===void 0?void 0:fe.points,Ce,Ne))return"".concat(xe,"-placement-").concat(_e)}return""}function ee(Ae,xe,se,Ne){return xe||(se?{motionName:"".concat(Ae,"-").concat(se)}:Ne?{motionName:Ne}:null)}function V(Ae){return Ae.ownerDocument.defaultView}function he(Ae){for(var xe=[],se=Ae==null?void 0:Ae.parentElement,Ne=["hidden","scroll","clip","auto"];se;){var Ce=V(se).getComputedStyle(se),Se=Ce.overflowX,M=Ce.overflowY,fe=Ce.overflow;[Se,M,fe].some(function(_e){return Ne.includes(_e)})&&xe.push(se),se=se.parentElement}return xe}function S(Ae){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Ae)?xe:Ae}function C(Ae){return S(parseFloat(Ae),0)}function Z(Ae,xe){var se=(0,y.Z)({},Ae);return(xe||[]).forEach(function(Ne){if(!(Ne instanceof HTMLBodyElement||Ne instanceof HTMLHtmlElement)){var Ce=V(Ne).getComputedStyle(Ne),Se=Ce.overflow,M=Ce.overflowClipMargin,fe=Ce.borderTopWidth,_e=Ce.borderBottomWidth,Re=Ce.borderLeftWidth,$e=Ce.borderRightWidth,rt=Ne.getBoundingClientRect(),it=Ne.offsetHeight,te=Ne.clientHeight,Q=Ne.offsetWidth,lt=Ne.clientWidth,st=C(fe),ht=C(_e),bt=C(Re),He=C($e),Et=S(Math.round(rt.width/Q*1e3)/1e3),pt=S(Math.round(rt.height/it*1e3)/1e3),ft=(Q-lt-bt-He)*Et,Pt=(it-te-st-ht)*pt,x=st*pt,D=ht*pt,Ye=bt*Et,W=He*Et,pe=0,Bt=0;if(Se==="clip"){var Oe=C(M);pe=Oe*Et,Bt=Oe*pt}var Ue=rt.x+Ye-pe,et=rt.y+x-Bt,q=Ue+rt.width+2*pe-Ye-W-ft,ne=et+rt.height+2*Bt-x-D-Pt;se.left=Math.max(se.left,Ue),se.top=Math.max(se.top,et),se.right=Math.min(se.right,q),se.bottom=Math.min(se.bottom,ne)}}),se}function ye(Ae){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se="".concat(xe),Ne=se.match(/^(.*)\%$/);return Ne?Ae*(parseFloat(Ne[1])/100):parseFloat(se)}function Ve(Ae,xe){var se=xe||[],Ne=(0,ce.Z)(se,2),Ce=Ne[0],Se=Ne[1];return[ye(Ae.width,Ce),ye(Ae.height,Se)]}function qe(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Ae[0],Ae[1]]}function gt(Ae,xe){var se=xe[0],Ne=xe[1],Ce,Se;return se==="t"?Se=Ae.y:se==="b"?Se=Ae.y+Ae.height:Se=Ae.y+Ae.height/2,Ne==="l"?Ce=Ae.x:Ne==="r"?Ce=Ae.x+Ae.width:Ce=Ae.x+Ae.width/2,{x:Ce,y:Se}}function yt(Ae,xe){var se={t:"b",b:"t",l:"r",r:"l"};return Ae.map(function(Ne,Ce){return Ce===xe?se[Ne]||"c":Ne}).join("")}function Dt(Ae,xe,se,Ne,Ce,Se,M){var fe=w.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ce[Ne]||{}}),_e=(0,ce.Z)(fe,2),Re=_e[0],$e=_e[1],rt=w.useRef(0),it=w.useMemo(function(){return xe?he(xe):[]},[xe]),te=w.useRef({}),Q=function(){te.current={}};Ae||Q();var lt=(0,A.Z)(function(){if(xe&&se&&Ae){let Lr=function(oi,Yn){var gr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ct,tr=St.x+oi,mr=St.y+Yn,kr=tr+ln,zr=mr+qn,hi=Math.max(tr,gr.left),Bn=Math.max(mr,gr.top),nr=Math.min(kr,gr.right),Sr=Math.min(zr,gr.bottom);return Math.max(0,(nr-hi)*(Sr-Bn))},Jr=function(){Rr=St.y+Tn,Er=Rr+qn,vn=St.x+_n,sn=vn+ln};var bt,He,Et,pt,ft=xe,Pt=ft.ownerDocument,x=V(ft),D=x.getComputedStyle(ft),Ye=D.position,W=ft.style.left,pe=ft.style.top,Bt=ft.style.right,Oe=ft.style.bottom,Ue=ft.style.overflow,et=(0,y.Z)((0,y.Z)({},Ce[Ne]),Se),q=Pt.createElement("div");(bt=ft.parentElement)===null||bt===void 0||bt.appendChild(q),q.style.left="".concat(ft.offsetLeft,"px"),q.style.top="".concat(ft.offsetTop,"px"),q.style.position=Ye,q.style.height="".concat(ft.offsetHeight,"px"),q.style.width="".concat(ft.offsetWidth,"px"),ft.style.left="0",ft.style.top="0",ft.style.right="auto",ft.style.bottom="auto",ft.style.overflow="hidden";var ne;if(Array.isArray(se))ne={x:se[0],y:se[1],width:0,height:0};else{var we,Fe,G=se.getBoundingClientRect();G.x=(we=G.x)!==null&&we!==void 0?we:G.left,G.y=(Fe=G.y)!==null&&Fe!==void 0?Fe:G.top,ne={x:G.x,y:G.y,width:G.width,height:G.height}}var St=ft.getBoundingClientRect(),Ee=x.getComputedStyle(ft),Wt=Ee.height,en=Ee.width;St.x=(He=St.x)!==null&&He!==void 0?He:St.left,St.y=(Et=St.y)!==null&&Et!==void 0?Et:St.top;var an=Pt.documentElement,Zn=an.clientWidth,Rn=an.clientHeight,Cn=an.scrollWidth,sr=an.scrollHeight,dr=an.scrollTop,$n=an.scrollLeft,qn=St.height,ln=St.width,$t=ne.height,Vt=ne.width,An={left:0,top:0,right:Zn,bottom:Rn},Xn={left:-$n,top:-dr,right:Cn-$n,bottom:sr-dr},Qe=et.htmlRegion,Je="visible",ve="visibleFirst";Qe!=="scroll"&&Qe!==ve&&(Qe=Je);var Pe=Qe===ve,Ge=Z(Xn,it),Ze=Z(An,it),ct=Qe===Je?Ze:Ge,Ft=Pe?Ze:ct;ft.style.left="auto",ft.style.top="auto",ft.style.right="0",ft.style.bottom="0";var Xt=ft.getBoundingClientRect();ft.style.left=W,ft.style.top=pe,ft.style.right=Bt,ft.style.bottom=Oe,ft.style.overflow=Ue,(pt=ft.parentElement)===null||pt===void 0||pt.removeChild(q);var qt=S(Math.round(ln/parseFloat(en)*1e3)/1e3),Rt=S(Math.round(qn/parseFloat(Wt)*1e3)/1e3);if(qt===0||Rt===0||(0,le.Sh)(se)&&!(0,ie.Z)(se))return;var Zt=et.offset,mn=et.targetOffset,Jt=Ve(St,Zt),je=(0,ce.Z)(Jt,2),nt=je[0],Ct=je[1],mt=Ve(ne,mn),xt=(0,ce.Z)(mt,2),It=xt[0],Nt=xt[1];ne.x-=It,ne.y-=Nt;var zt=et.points||[],nn=(0,ce.Z)(zt,2),cn=nn[0],zn=nn[1],gn=qe(zn),dn=qe(cn),wn=gt(ne,gn),En=gt(St,dn),Ln=(0,y.Z)({},et),_n=wn.x-En.x+nt,Tn=wn.y-En.y+Ct,kn=Lr(_n,Tn),Nn=Lr(_n,Tn,Ze),On=gt(ne,["t","l"]),In=gt(St,["t","l"]),Dn=gt(ne,["b","r"]),yn=gt(St,["b","r"]),fr=et.overflow||{},_t=fr.adjustX,Pn=fr.adjustY,jn=fr.shiftX,xr=fr.shiftY,pr=function(Yn){return typeof Yn=="boolean"?Yn:Yn>=0},Rr,Er,vn,sn;Jr();var Mt=pr(Pn),jt=dn[0]===gn[0];if(Mt&&dn[0]==="t"&&(Er>Ft.bottom||te.current.bt)){var un=Tn;jt?un-=qn-$t:un=On.y-yn.y-Ct;var bn=Lr(_n,un),Mn=Lr(_n,un,Ze);bn>kn||bn===kn&&(!Pe||Mn>=Nn)?(te.current.bt=!0,Tn=un,Ct=-Ct,Ln.points=[yt(dn,0),yt(gn,0)]):te.current.bt=!1}if(Mt&&dn[0]==="b"&&(Rr<Ft.top||te.current.tb)){var Jn=Tn;jt?Jn+=qn-$t:Jn=Dn.y-In.y-Ct;var tn=Lr(_n,Jn),Hn=Lr(_n,Jn,Ze);tn>kn||tn===kn&&(!Pe||Hn>=Nn)?(te.current.tb=!0,Tn=Jn,Ct=-Ct,Ln.points=[yt(dn,0),yt(gn,0)]):te.current.tb=!1}var er=pr(_t),Tr=dn[1]===gn[1];if(er&&dn[1]==="l"&&(sn>Ft.right||te.current.rl)){var $r=_n;Tr?$r-=ln-Vt:$r=On.x-yn.x-nt;var Wr=Lr($r,Tn),br=Lr($r,Tn,Ze);Wr>kn||Wr===kn&&(!Pe||br>=Nn)?(te.current.rl=!0,_n=$r,nt=-nt,Ln.points=[yt(dn,1),yt(gn,1)]):te.current.rl=!1}if(er&&dn[1]==="r"&&(vn<Ft.left||te.current.lr)){var Kr=_n;Tr?Kr+=ln-Vt:Kr=Dn.x-In.x-nt;var Cr=Lr(Kr,Tn),Hr=Lr(Kr,Tn,Ze);Cr>kn||Cr===kn&&(!Pe||Hr>=Nn)?(te.current.lr=!0,_n=Kr,nt=-nt,Ln.points=[yt(dn,1),yt(gn,1)]):te.current.lr=!1}Jr();var Ir=jn===!0?0:jn;typeof Ir=="number"&&(vn<Ze.left&&(_n-=vn-Ze.left-nt,ne.x+Vt<Ze.left+Ir&&(_n+=ne.x-Ze.left+Vt-Ir)),sn>Ze.right&&(_n-=sn-Ze.right-nt,ne.x>Ze.right-Ir&&(_n+=ne.x-Ze.right+Ir)));var Pr=xr===!0?0:xr;typeof Pr=="number"&&(Rr<Ze.top&&(Tn-=Rr-Ze.top-Ct,ne.y+$t<Ze.top+Pr&&(Tn+=ne.y-Ze.top+$t-Pr)),Er>Ze.bottom&&(Tn-=Er-Ze.bottom-Ct,ne.y>Ze.bottom-Pr&&(Tn+=ne.y-Ze.bottom+Pr)));var Mr=St.x+_n,Yr=Mr+ln,ur=St.y+Tn,ei=ur+qn,Xr=ne.x,Qr=Xr+Vt,Vn=ne.y,xn=Vn+$t,Fr=Math.max(Mr,Xr),rn=Math.min(Yr,Qr),qr=(Fr+rn)/2,Ii=qr-Mr,Si=Math.max(ur,Vn),di=Math.min(ei,xn),pi=(Si+di)/2,or=pi-ur;M==null||M(xe,Ln);var ni=Xt.right-St.x-(_n+St.width),vi=Xt.bottom-St.y-(Tn+St.height);qt===1&&(_n=Math.floor(_n),ni=Math.floor(ni)),Rt===1&&(Tn=Math.floor(Tn),vi=Math.floor(vi));var wi={ready:!0,offsetX:_n/qt,offsetY:Tn/Rt,offsetR:ni/qt,offsetB:vi/Rt,arrowX:Ii/qt,arrowY:or/Rt,scaleX:qt,scaleY:Rt,align:Ln};$e(wi)}}),st=function(){rt.current+=1;var He=rt.current;Promise.resolve().then(function(){rt.current===He&<()})},ht=function(){$e(function(He){return(0,y.Z)((0,y.Z)({},He),{},{ready:!1})})};return(0,_.Z)(ht,[Ne]),(0,_.Z)(function(){Ae||ht()},[Ae]),[Re.ready,Re.offsetX,Re.offsetY,Re.offsetR,Re.offsetB,Re.arrowX,Re.arrowY,Re.scaleX,Re.scaleY,Re.align,st]}var Ut=b(77654);function ot(Ae,xe,se,Ne,Ce){(0,_.Z)(function(){if(Ae&&xe&&se){let rt=function(){Ne(),Ce()};var Se=xe,M=se,fe=he(Se),_e=he(M),Re=V(M),$e=new Set([Re].concat((0,Ut.Z)(fe),(0,Ut.Z)(_e)));return $e.forEach(function(it){it.addEventListener("scroll",rt,{passive:!0})}),Re.addEventListener("resize",rt,{passive:!0}),Ne(),function(){$e.forEach(function(it){it.removeEventListener("scroll",rt),Re.removeEventListener("resize",rt)})}}},[Ae,xe,se])}var kt=b(48736);function tt(Ae,xe,se,Ne,Ce,Se,M,fe){var _e=w.useRef(Ae);_e.current=Ae;var Re=w.useRef(!1);w.useEffect(function(){if(xe&&Ne&&(!Ce||Se)){var rt=function(){Re.current=!1},it=function(Et){var pt;_e.current&&!M(((pt=Et.composedPath)===null||pt===void 0||(pt=pt.call(Et))===null||pt===void 0?void 0:pt[0])||Et.target)&&!Re.current&&fe(!1)},te=V(Ne);te.addEventListener("pointerdown",rt,!0),te.addEventListener("mousedown",it,!0),te.addEventListener("contextmenu",it,!0);var Q=(0,l.A)(se);if(Q&&(Q.addEventListener("mousedown",it,!0),Q.addEventListener("contextmenu",it,!0)),0)var lt,st,ht,bt;return function(){te.removeEventListener("pointerdown",rt,!0),te.removeEventListener("mousedown",it,!0),te.removeEventListener("contextmenu",it,!0),Q&&(Q.removeEventListener("mousedown",it,!0),Q.removeEventListener("contextmenu",it,!0))}}},[xe,se,Ne,Ce,Se]);function $e(){Re.current=!0}return $e}var Gt=["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 Xe(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:de.Z,xe=w.forwardRef(function(se,Ne){var Ce=se.prefixCls,Se=Ce===void 0?"rc-trigger-popup":Ce,M=se.children,fe=se.action,_e=fe===void 0?"hover":fe,Re=se.showAction,$e=se.hideAction,rt=se.popupVisible,it=se.defaultPopupVisible,te=se.onPopupVisibleChange,Q=se.afterPopupVisibleChange,lt=se.mouseEnterDelay,st=se.mouseLeaveDelay,ht=st===void 0?.1:st,bt=se.focusDelay,He=se.blurDelay,Et=se.mask,pt=se.maskClosable,ft=pt===void 0?!0:pt,Pt=se.getPopupContainer,x=se.forceRender,D=se.autoDestroy,Ye=se.destroyPopupOnHide,W=se.popup,pe=se.popupClassName,Bt=se.popupStyle,Oe=se.popupPlacement,Ue=se.builtinPlacements,et=Ue===void 0?{}:Ue,q=se.popupAlign,ne=se.zIndex,we=se.stretch,Fe=se.getPopupClassNameFromAlign,G=se.fresh,St=se.alignPoint,Ee=se.onPopupClick,Wt=se.onPopupAlign,en=se.arrow,an=se.popupMotion,Zn=se.maskMotion,Rn=se.popupTransitionName,Cn=se.popupAnimation,sr=se.maskTransitionName,dr=se.maskAnimation,$n=se.className,qn=se.getTriggerDOMNode,ln=(0,Y.Z)(se,Gt),$t=D||Ye||!1,Vt=w.useState(!1),An=(0,ce.Z)(Vt,2),Xn=An[0],Qe=An[1];(0,_.Z)(function(){Qe((0,E.Z)())},[]);var Je=w.useRef({}),ve=w.useContext(Be),Pe=w.useMemo(function(){return{registerSubPopup:function(nr,Sr){Je.current[nr]=Sr,ve==null||ve.registerSubPopup(nr,Sr)}}},[ve]),Ge=(0,F.Z)(),Ze=w.useState(null),ct=(0,ce.Z)(Ze,2),Ft=ct[0],Xt=ct[1],qt=w.useRef(null),Rt=(0,A.Z)(function(Bn){qt.current=Bn,(0,le.Sh)(Bn)&&Ft!==Bn&&Xt(Bn),ve==null||ve.registerSubPopup(Ge,Bn)}),Zt=w.useState(null),mn=(0,ce.Z)(Zt,2),Jt=mn[0],je=mn[1],nt=w.useRef(null),Ct=(0,A.Z)(function(Bn){(0,le.Sh)(Bn)&&Jt!==Bn&&(je(Bn),nt.current=Bn)}),mt=w.Children.only(M),xt=(mt==null?void 0:mt.props)||{},It={},Nt=(0,A.Z)(function(Bn){var nr,Sr,vr=Jt;return(vr==null?void 0:vr.contains(Bn))||((nr=(0,l.A)(vr))===null||nr===void 0?void 0:nr.host)===Bn||Bn===vr||(Ft==null?void 0:Ft.contains(Bn))||((Sr=(0,l.A)(Ft))===null||Sr===void 0?void 0:Sr.host)===Bn||Bn===Ft||Object.values(Je.current).some(function(wr){return(wr==null?void 0:wr.contains(Bn))||Bn===wr})}),zt=ee(Se,an,Cn,Rn),nn=ee(Se,Zn,dr,sr),cn=w.useState(it||!1),zn=(0,ce.Z)(cn,2),gn=zn[0],dn=zn[1],wn=rt!=null?rt:gn,En=(0,A.Z)(function(Bn){rt===void 0&&dn(Bn)});(0,_.Z)(function(){dn(rt||!1)},[rt]);var Ln=w.useRef(wn);Ln.current=wn;var _n=w.useRef([]);_n.current=[];var Tn=(0,A.Z)(function(Bn){var nr;En(Bn),((nr=_n.current[_n.current.length-1])!==null&&nr!==void 0?nr:wn)!==Bn&&(_n.current.push(Bn),te==null||te(Bn))}),kn=w.useRef(),Nn=function(){clearTimeout(kn.current)},On=function(nr){var Sr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Nn(),Sr===0?Tn(nr):kn.current=setTimeout(function(){Tn(nr)},Sr*1e3)};w.useEffect(function(){return Nn},[]);var In=w.useState(!1),Dn=(0,ce.Z)(In,2),yn=Dn[0],fr=Dn[1];(0,_.Z)(function(Bn){(!Bn||wn)&&fr(!0)},[wn]);var _t=w.useState(null),Pn=(0,ce.Z)(_t,2),jn=Pn[0],xr=Pn[1],pr=w.useState(null),Rr=(0,ce.Z)(pr,2),Er=Rr[0],vn=Rr[1],sn=function(nr){vn([nr.clientX,nr.clientY])},Mt=Dt(wn,Ft,St&&Er!==null?Er:Jt,Oe,et,q,Wt),jt=(0,ce.Z)(Mt,11),un=jt[0],bn=jt[1],Mn=jt[2],Jn=jt[3],tn=jt[4],Hn=jt[5],er=jt[6],Tr=jt[7],$r=jt[8],Wr=jt[9],br=jt[10],Kr=at(Xn,_e,Re,$e),Cr=(0,ce.Z)(Kr,2),Hr=Cr[0],Ir=Cr[1],Pr=Hr.has("click"),Mr=Ir.has("click")||Ir.has("contextMenu"),Yr=(0,A.Z)(function(){yn||br()}),ur=function(){Ln.current&&St&&Mr&&On(!1)};ot(wn,Jt,Ft,Yr,ur),(0,_.Z)(function(){Yr()},[Er,Oe]),(0,_.Z)(function(){wn&&!(et!=null&&et[Oe])&&Yr()},[JSON.stringify(q)]);var ei=w.useMemo(function(){var Bn=I(et,Se,Wr,St);return p()(Bn,Fe==null?void 0:Fe(Wr))},[Wr,Fe,et,Se,St]);w.useImperativeHandle(Ne,function(){return{nativeElement:nt.current,popupElement:qt.current,forceAlign:Yr}});var Xr=w.useState(0),Qr=(0,ce.Z)(Xr,2),Vn=Qr[0],xn=Qr[1],Fr=w.useState(0),rn=(0,ce.Z)(Fr,2),qr=rn[0],Ii=rn[1],Si=function(){if(we&&Jt){var nr=Jt.getBoundingClientRect();xn(nr.width),Ii(nr.height)}},di=function(){Si(),Yr()},pi=function(nr){fr(!1),br(),Q==null||Q(nr)},or=function(){return new Promise(function(nr){Si(),xr(function(){return nr})})};(0,_.Z)(function(){jn&&(br(),jn(),xr(null))},[jn]);function ni(Bn,nr,Sr,vr){It[Bn]=function(wr){var Di;vr==null||vr(wr),On(nr,Sr);for(var gi=arguments.length,Ti=new Array(gi>1?gi-1:0),yi=1;yi<gi;yi++)Ti[yi-1]=arguments[yi];(Di=xt[Bn])===null||Di===void 0||Di.call.apply(Di,[xt,wr].concat(Ti))}}(Pr||Mr)&&(It.onClick=function(Bn){var nr;Ln.current&&Mr?On(!1):!Ln.current&&Pr&&(sn(Bn),On(!0));for(var Sr=arguments.length,vr=new Array(Sr>1?Sr-1:0),wr=1;wr<Sr;wr++)vr[wr-1]=arguments[wr];(nr=xt.onClick)===null||nr===void 0||nr.call.apply(nr,[xt,Bn].concat(vr))});var vi=tt(wn,Mr,Jt,Ft,Et,ft,Nt,On),wi=Hr.has("hover"),Lr=Ir.has("hover"),Jr,oi;wi&&(ni("onMouseEnter",!0,lt,function(Bn){sn(Bn)}),ni("onPointerEnter",!0,lt,function(Bn){sn(Bn)}),Jr=function(nr){(wn||yn)&&Ft!==null&&Ft!==void 0&&Ft.contains(nr.target)&&On(!0,lt)},St&&(It.onMouseMove=function(Bn){var nr;(nr=xt.onMouseMove)===null||nr===void 0||nr.call(xt,Bn)})),Lr&&(ni("onMouseLeave",!1,ht),ni("onPointerLeave",!1,ht),oi=function(){On(!1,ht)}),Hr.has("focus")&&ni("onFocus",!0,bt),Ir.has("focus")&&ni("onBlur",!1,He),Hr.has("contextMenu")&&(It.onContextMenu=function(Bn){var nr;Ln.current&&Ir.has("contextMenu")?On(!1):(sn(Bn),On(!0)),Bn.preventDefault();for(var Sr=arguments.length,vr=new Array(Sr>1?Sr-1:0),wr=1;wr<Sr;wr++)vr[wr-1]=arguments[wr];(nr=xt.onContextMenu)===null||nr===void 0||nr.call.apply(nr,[xt,Bn].concat(vr))}),$n&&(It.className=p()(xt.className,$n));var Yn=w.useRef(!1);Yn.current||(Yn.current=x||wn||yn);var gr=(0,y.Z)((0,y.Z)({},xt),It),tr={},mr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];mr.forEach(function(Bn){ln[Bn]&&(tr[Bn]=function(){for(var nr,Sr=arguments.length,vr=new Array(Sr),wr=0;wr<Sr;wr++)vr[wr]=arguments[wr];(nr=gr[Bn])===null||nr===void 0||nr.call.apply(nr,[gr].concat(vr)),ln[Bn].apply(ln,vr)})});var kr=w.cloneElement(mt,(0,y.Z)((0,y.Z)({},gr),tr)),zr={x:Hn,y:er},hi=en?(0,y.Z)({},en!==!0?en:{}):null;return w.createElement(w.Fragment,null,w.createElement(ge.Z,{disabled:!wn,ref:Ct,onResize:di},w.createElement(me,{getTriggerDOMNode:qn},kr)),Yn.current&&w.createElement(Be.Provider,{value:Pe},w.createElement(re,{portal:Ae,ref:Rt,prefixCls:Se,popup:W,className:p()(pe,ei),style:Bt,target:Jt,onMouseEnter:Jr,onMouseLeave:oi,onPointerEnter:Jr,zIndex:ne,open:wn,keepDom:yn,fresh:G,onClick:Ee,onPointerDownCapture:vi,mask:Et,motion:zt,maskMotion:nn,onVisibleChanged:pi,onPrepare:or,forceRender:x,autoDestroy:$t,getPopupContainer:Pt,align:Wr,arrow:hi,arrowPos:zr,ready:un,offsetX:bn,offsetY:Mn,offsetR:Jn,offsetB:tn,onAlign:Yr,stretch:we,targetWidth:Vn/Tr,targetHeight:qr/$r})))});return xe}var Ke=Xe(de.Z)},46214:function(){"use strict"},90736:function(fn,ut,b){"use strict";var y=b(59301),ce=b(4977),Y=b(7939),de=Object.defineProperty,$=Object.defineProperties,p=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,A=(w,O,X)=>O in w?de(w,O,{enumerable:!0,configurable:!0,writable:!0,value:X}):w[O]=X,F=(w,O)=>{for(var X in O||(O={}))le.call(O,X)&&A(w,X,O[X]);if(ge)for(var X of ge(O))l.call(O,X)&&A(w,X,O[X]);return w},_=(w,O)=>$(w,p(O));const E=({img:w,buttonProps:O={},styles:X={},customText:J,ButtonText:U,ButtonClick:R,Buttonclass:z,ButtonTwo:P,imgStyles:N,loading:re=!1,className:ue=""})=>y.createElement("section",{className:`tc animated fadeIn ${ue}`,style:F({color:"#999",margin:"100px auto",visibility:re?"hidden":"visible"},X)},y.createElement("img",{src:w||ce,style:_(F({},N),{pointerEvents:"none",userSelect:"none"})}),y.createElement("p",{className:"mt20 font14"},J||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),U&&y.createElement(Y.ZP,F({className:z,onClick:R},O),U),P&&P);ut.Z=E},86974:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return z}});var y=b(59301),ce={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},Y=b(7939),de=b(70557),$=b(34728),p=b(25399),ge=b(76406),le=b(84849),l=b(90736),A=b(14185),F=b(52078),_=b(59301),E=Object.defineProperty,w=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,J=(P,N,re)=>N in P?E(P,N,{enumerable:!0,configurable:!0,writable:!0,value:re}):P[N]=re,U=(P,N)=>{for(var re in N||(N={}))O.call(N,re)&&J(P,re,N[re]);if(w)for(var re of w(N))X.call(N,re)&&J(P,re,N[re]);return P},R=(P,N,re)=>new Promise((ue,me)=>{var Te=at=>{try{Le(re.next(at))}catch(ie){me(ie)}},Be=at=>{try{Le(re.throw(at))}catch(ie){me(ie)}},Le=at=>at.done?ue(at.value):Promise.resolve(at.value).then(Te,Be);Le((re=re.apply(P,N)).next())}),z=({editOffice:P="view",data:N,issaver:re,onSaver:ue,theme:me,type:Te,filename:Be,monacoEditor:Le,className:at,style:ie,close:K,onClose:I,hasMask:ee,disabledDownload:V,onImgDimensions:he,showNodata:S,recordInfo:C})=>{const[Z,ye]=(0,y.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ve,qe]=(0,y.useState)(""),[gt,yt]=(0,y.useState)(),Dt=window.ENV==="build"?"/react/build":"",Ut=location.host.startsWith("localhost")?A.Z.PROXY_SERVER:A.Z.API_SERVER,kt=10*(1024*1024),tt=(0,y.useRef)();N!=null&&N.startsWith("/api")&&Te!=="txt"&&(N=A.Z.API_SERVER+N);const Gt=Ne=>Ne.substring(Ne.lastIndexOf("/")+1).split(".").pop();Be&&Le&&(Le.filename=Be),(0,y.useEffect)(()=>{var Ne,Ce;const Se=(Ce=(Ne=document.cookie)==null?void 0:Ne.replace(/\s/g,""))==null?void 0:Ce.split(";");Se==null||Se.map(M=>{let fe=M.split("=");fe[0]==="_educoder_session"&&qe(fe[1])})},[]),(0,y.useEffect)(()=>{Te==="office"&&(N.indexOf("bigfilescdn.")>-1||N.indexOf("bigfiles1")>-1?yt({url:N,fileType:Gt(N),model:N.indexOf("model=edit")?"edit":"view"}):N.indexOf("coze")>-1?yt({url:N,fileType:"doc",model:"view"}):Ke())},[Te,N]);function Xe(Ne){return R(this,null,function*(){Ne.data.type==="pdfdata"&&(ue(Ne.data.data),window.removeEventListener("message",Xe,!1)),console.log("mess---:",Ne.data)})}const Ke=()=>R(void 0,null,function*(){console.log("data:",N);let Ne=N;N.startsWith("http")||(Ne=location.origin+Ne);let Ce=new URL(Ne).pathname.split("/").pop();const Se=yield(0,le.gJ)({attachment_id:Ce});Se.url=Ut+Se.url,yt(Se)}),Ae=()=>{if(N.startsWith("http")||N.startsWith("blob:")){xe();return}(0,ge.Sv)(Be||"educoder",N,Be)},xe=()=>{C&&(0,F.fc)({id:C==null?void 0:C.id,watch_type:1,course_id:C==null?void 0:C.course_id}),(0,ge.Nd)(Be||"educoder",decodeURIComponent(N))};(0,y.useEffect)(()=>(window.addEventListener("message",se),()=>{window.removeEventListener("message",se)}),[]);const se=Ne=>{var Ce;((Ce=Ne==null?void 0:Ne.data)==null?void 0:Ce.type)==="closePop"&&I()};return _.createElement("div",{style:U({},ie||{}),className:`${ee&&ce.bgBlack} ${Te?ce.wrp:"hide"}`},!!Te&&K&&_.createElement("div",{id:"closePop",className:ce.close,ref:tt},!!he&&_.createElement(p.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>tt.current},_.createElement("span",{onClick:()=>{I(),he()}},_.createElement("i",{className:"icon-yulanpizhu"}))),!V&&window.parent===window&&_.createElement(p.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>tt.current},_.createElement("span",{onClick:xe},_.createElement("i",{className:"icon-quxiaozhiding"}))),re&&_.createElement(p.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>tt.current},_.createElement("span",{className:"",onClick:()=>{const Ne=document.getElementById("pdfiframe");window.addEventListener("message",Xe,!1),setTimeout(()=>{Ne.contentWindow.postMessage("getData","*")},300)}},_.createElement("i",{className:"icon-baocun"}))),_.createElement(p.Z,{title:"\u5173\u95ED",getPopupContainer:()=>tt.current},_.createElement("span",{className:"",onClick:()=>{I()}},_.createElement("i",{className:"icon-guanbi1"})))),_.createElement("div",{className:`${ce[at]} ${at} ${ce.monaco} ${Te==="txt"?"show":"hide"}`},Te==="txt"&&_.createElement(_.Fragment,null,_.createElement($.ZP,U({},Le)))),Te==="audio"&&_.createElement("audio",{controls:!0,src:`${(N==null?void 0:N.indexOf("http://"))>-1||(N==null?void 0:N.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${N}`,autoPlay:!0}),Te==="video"&&_.createElement(_.Fragment,null,(N==null?void 0:N.indexOf("http"))>-1?_.createElement("video",{controls:!0,src:`${N}`,autoPlay:!0}):_.createElement("video",{controls:!0,src:`data:video/mp4;base64,${N}`,autoPlay:!0})),Te==="office"&>&&_.createElement("iframe",{src:`${Dt}/office.html?key=${gt.key}&url=${btoa(gt.url)}&callbackUrl=${Ut+(gt.callbackUrl||"")}&fileType=${gt.fileType}&title=${gt.title||""}&model=${P}&officeServer=${A.Z.ONLYOFFICE}&disabledDownload=${!!V}`}),Te==="html"&&_.createElement("iframe",{src:N+"&disposition=inline"}),Te==="pdf"&&_.createElement("iframe",{id:"pdfiframe",src:`${Dt}/js/pdf/index.html?filename=${Be||"educoder.pdf"}&url=${encodeURIComponent(N)}&disabledDownload=${!!V}&model=${P}`}),Te==="image"&&_.createElement("img",{src:`${(N==null?void 0:N.indexOf("http://"))>-1||(N==null?void 0:N.indexOf("https://"))>-1?"":"data:image/png;base64,"}${N}`}),(Te==="other"||Te==="download")&&_.createElement(_.Fragment,null,S?_.createElement(l.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:_.createElement(Y.ZP,{icon:_.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ae,disabled:V},"\u4E0B\u8F7D")}):_.createElement(Y.ZP,{type:"primary",size:"middle",onClick:Ae,disabled:V},_.createElement(de.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Te==="flowChart"&&_.createElement("div",{className:"embed"},_.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${N||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(fn,ut,b){"use strict";b.d(ut,{z:function(){return Le},Z:function(){return at}});var y=b(59301),ce=b(46214),Y=b(20047),de=b(64018),$=b(16471),p=b(14185),ge=b(76406),le=b(15342),l=b(44104),A=b(7939),F=b(1012),_=b(86974),E=b(59301),O=({html:ie})=>{const K=(0,y.useRef)(null),I=(0,y.useRef)(null),ee=`.markdown-body p {
|
|
|
margin: 0 0 16px 0 !important;
|
|
|
line-height: 28px;
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
li {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
dl {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.markdown-body {
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
color: #333;
|
|
|
overflow: hidden;
|
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
|
word-break: break-word;
|
|
|
font-size: 16px;
|
|
|
line-height: 1.6;
|
|
|
white-space: normal;
|
|
|
word-wrap: break-word;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul>li {
|
|
|
list-style-type: disc;
|
|
|
}
|
|
|
|
|
|
.markdown-body ol>li {
|
|
|
list-style-type: decimal;
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:active,
|
|
|
.markdown-body a:hover {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body strong {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 2em;
|
|
|
margin: 0.67em 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
-moz-box-sizing: content-box;
|
|
|
box-sizing: content-box;
|
|
|
height: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
.markdown-body code,
|
|
|
.markdown-body kbd,
|
|
|
.markdown-body pre {
|
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
color: inherit;
|
|
|
font: inherit;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body html input[disabled] {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
border-collapse: collapse;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body td,
|
|
|
.markdown-body th {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body * {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
color: #4183c4;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:hover,
|
|
|
.markdown-body a:active {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
height: 0;
|
|
|
margin: 15px 0;
|
|
|
overflow: hidden;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:before {
|
|
|
display: table;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:after {
|
|
|
display: table;
|
|
|
clear: both;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
margin-top: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
font-size: 21px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding: 0;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
ul.linenums,
|
|
|
ol.linenums {
|
|
|
padding: 16px 0 0 56px !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding-left: 2em;
|
|
|
}
|
|
|
|
|
|
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ul ol {
|
|
|
list-style-type: lower-roman;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul ol,
|
|
|
.markdown-body ul ol ol,
|
|
|
.markdown-body ol ul ol,
|
|
|
.markdown-body ol ol ol {
|
|
|
list-style-type: lower-alpha;
|
|
|
}
|
|
|
|
|
|
.markdown-body dd {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon {
|
|
|
font: normal normal 16px octicons-anchor;
|
|
|
line-height: 1;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon-link:before {
|
|
|
content: '\f05c';
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:first-child {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:last-child {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
display: block;
|
|
|
padding-right: 6px;
|
|
|
padding-left: 30px;
|
|
|
margin-left: -30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor:focus {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
position: relative;
|
|
|
margin-top: 1em;
|
|
|
margin-bottom: 16px;
|
|
|
font-weight: bold;
|
|
|
line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
|
.markdown-body h2 .octicon-link,
|
|
|
.markdown-body h3 .octicon-link,
|
|
|
.markdown-body h4 .octicon-link,
|
|
|
.markdown-body h5 .octicon-link,
|
|
|
.markdown-body h6 .octicon-link {
|
|
|
display: none;
|
|
|
color: #000;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
|
.markdown-body h2:hover .anchor,
|
|
|
.markdown-body h3:hover .anchor,
|
|
|
.markdown-body h4:hover .anchor,
|
|
|
.markdown-body h5:hover .anchor,
|
|
|
.markdown-body h6:hover .anchor {
|
|
|
padding-left: 8px;
|
|
|
margin-left: -30px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 2.25em;
|
|
|
line-height: 1.2;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 1.75em;
|
|
|
line-height: 1.225;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 1.5em;
|
|
|
line-height: 1.43;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 1.25em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 1em;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul,
|
|
|
.markdown-body ul ol,
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ol ul {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body li>p {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dt {
|
|
|
padding: 0;
|
|
|
margin-top: 16px;
|
|
|
font-size: 1em;
|
|
|
font-style: italic;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dd {
|
|
|
padding: 0 16px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
padding: 0 15px;
|
|
|
color: #777;
|
|
|
border-left: 4px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
overflow: auto;
|
|
|
word-break: normal;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th {
|
|
|
font-weight: bold;
|
|
|
text-align: revert;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th,
|
|
|
.markdown-body table td {
|
|
|
padding: 6px 13px;
|
|
|
border: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr {
|
|
|
background-color: #fff;
|
|
|
border-top: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
max-width: 100%;
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
padding: 0;
|
|
|
padding-top: 0.2em;
|
|
|
padding-bottom: 0.2em;
|
|
|
margin: 0;
|
|
|
font-size: 85%;
|
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:has(.katex) {
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:before,
|
|
|
.markdown-body code:after {
|
|
|
letter-spacing: -0.2em;
|
|
|
content: "\\00a0";
|
|
|
}
|
|
|
|
|
|
.markdown-body pre>code {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
font-size: 100%;
|
|
|
word-break: normal;
|
|
|
white-space: pre;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight {
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre,
|
|
|
.markdown-body pre {
|
|
|
padding: 16px;
|
|
|
overflow: auto;
|
|
|
font-size: 85%;
|
|
|
line-height: 1.45;
|
|
|
background-color: #f7f7f7;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre {
|
|
|
margin-bottom: 0;
|
|
|
word-break: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
word-wrap: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code {
|
|
|
display: inline;
|
|
|
max-width: initial;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
overflow: initial;
|
|
|
line-height: inherit;
|
|
|
word-wrap: normal;
|
|
|
background-color: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code:before,
|
|
|
.markdown-body pre code:after {
|
|
|
content: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font-size: 11px;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c {
|
|
|
color: #969896;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c1,
|
|
|
.markdown-body .pl-mdh,
|
|
|
.markdown-body .pl-mm,
|
|
|
.markdown-body .pl-mp,
|
|
|
.markdown-body .pl-mr,
|
|
|
.markdown-body .pl-s1 .pl-v,
|
|
|
.markdown-body .pl-s3,
|
|
|
.markdown-body .pl-sc,
|
|
|
.markdown-body .pl-sv {
|
|
|
color: #0086b3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-e,
|
|
|
.markdown-body .pl-en {
|
|
|
color: #795da3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
|
.markdown-body .pl-smi,
|
|
|
.markdown-body .pl-smp,
|
|
|
.markdown-body .pl-stj,
|
|
|
.markdown-body .pl-vo,
|
|
|
.markdown-body .pl-vpf {
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ent {
|
|
|
color: #63a35c;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-k,
|
|
|
.markdown-body .pl-s,
|
|
|
.markdown-body .pl-st {
|
|
|
color: #a71d5d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-pds,
|
|
|
.markdown-body .pl-s1,
|
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
|
.markdown-body .pl-sr,
|
|
|
.markdown-body .pl-sr .pl-cce,
|
|
|
.markdown-body .pl-sr .pl-sra,
|
|
|
.markdown-body .pl-sr .pl-sre,
|
|
|
.markdown-body .pl-src {
|
|
|
color: #df5000;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mo,
|
|
|
.markdown-body .pl-v {
|
|
|
color: #1d3e81;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-id {
|
|
|
color: #b52a1d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ii {
|
|
|
background-color: #b52a1d;
|
|
|
color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
|
color: #63a35c;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ml {
|
|
|
color: #693a17;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mh,
|
|
|
.markdown-body .pl-mh .pl-en,
|
|
|
.markdown-body .pl-ms {
|
|
|
color: #1d3e81;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mq {
|
|
|
color: #008080;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mi {
|
|
|
color: #333;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mb {
|
|
|
color: #333;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-md,
|
|
|
.markdown-body .pl-mdhf {
|
|
|
background-color: #ffecec;
|
|
|
color: #bd2c00;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdht,
|
|
|
.markdown-body .pl-mi1 {
|
|
|
background-color: #eaffea;
|
|
|
color: #55a532;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdr {
|
|
|
color: #795da3;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item {
|
|
|
list-style-type: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item input {
|
|
|
float: left;
|
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
|
z-index: 1;
|
|
|
position: relative;
|
|
|
border-color: #4183c4;
|
|
|
}
|
|
|
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
|
.pln {
|
|
|
color: #000
|
|
|
}
|
|
|
|
|
|
/* plain text */
|
|
|
|
|
|
@media screen {
|
|
|
.str {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* string content */
|
|
|
.kwd {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a keyword */
|
|
|
.com {
|
|
|
color: #800
|
|
|
}
|
|
|
|
|
|
/* a comment */
|
|
|
.typ {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a type name */
|
|
|
.lit {
|
|
|
color: #066
|
|
|
}
|
|
|
|
|
|
/* a literal value */
|
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #660
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a markup tag name */
|
|
|
.atn {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a markup attribute name */
|
|
|
.atv {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* a markup attribute value */
|
|
|
.dec,
|
|
|
.var {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a declaration; a variable name */
|
|
|
.fun {
|
|
|
color: red
|
|
|
}
|
|
|
|
|
|
/* a function name */
|
|
|
}
|
|
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
|
@media print,
|
|
|
projection {
|
|
|
.str {
|
|
|
color: #060
|
|
|
}
|
|
|
|
|
|
.kwd {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.com {
|
|
|
color: #600;
|
|
|
font-style: italic
|
|
|
}
|
|
|
|
|
|
.typ {
|
|
|
color: #404;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.lit {
|
|
|
color: #044
|
|
|
}
|
|
|
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #440
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.atn {
|
|
|
color: #404
|
|
|
}
|
|
|
|
|
|
.atv {
|
|
|
color: #060
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
|
pre.prettyprint {
|
|
|
padding: 2px;
|
|
|
/* border: 1px solid #888 */
|
|
|
}
|
|
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
|
ol.linenums {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0
|
|
|
}
|
|
|
|
|
|
/* IE indents via margin-left */
|
|
|
li.L0,
|
|
|
li.L1,
|
|
|
li.L2,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L6,
|
|
|
li.L7,
|
|
|
li.L8 {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
/* Alternate shading for lines */
|
|
|
li.L1,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L7,
|
|
|
li.L9 {
|
|
|
background: #eee
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}`;return(0,y.useEffect)(()=>{const V=K.current.attachShadow({mode:"open"});I.current=document.createElement("div"),I.current.className="markdown-body",I.current.innerHTML=ie,V.appendChild(I.current);const he=document.createElement("style");return he.textContent=ee,V.appendChild(he),()=>{V.innerHTML=""}},[]),(0,y.useEffect)(()=>{I.current&&(I.current.innerHTML=ie)},[ie]),E.createElement("div",{ref:K})};function X(ie){const K=["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"],I=new RegExp(`\\b(${K.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),ee=/<meta\s+http-equiv\s*=\s*["']?refresh["']?[^>]*>/gi;return ie.replace(I,"").replace(ee,"").trim()}var J={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},U=Object.defineProperty,R=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,N=(ie,K,I)=>K in ie?U(ie,K,{enumerable:!0,configurable:!0,writable:!0,value:I}):ie[K]=I,re=(ie,K)=>{for(var I in K||(K={}))z.call(K,I)&&N(ie,I,K[I]);if(R)for(var I of R(K))P.call(K,I)&&N(ie,I,K[I]);return ie};const ue="@\u2581\u2581@",me="@\u2581@",Te=/<pre[^>]*>/g;function Be(ie){let K=document.createElement("div");return K.innerHTML=ie,K.childNodes.length===0?"":K.childNodes[0].nodeValue}const Le=(ie,K)=>{ie=ie||"";const I=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ee=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,V=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,he=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return K?ie.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(I,(S,C,Z,ye,Ve,qe,gt)=>{const yt=C||ye||qe,Dt=Z||Ve||gt||"?";return p.Z.API_SERVER+"/api/attachments/"+yt+Dt+"&t="+(0,ge.Jn)(yt,Date.now())+(S.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ie=ie.replace(he,(S,C,Z,ye,Ve,qe,gt)=>{const yt=C||ye||qe,Dt=Z||Ve||gt||"?";return p.Z.API_SERVER+"/attachments/download/"+yt+Dt+"&t="+(0,ge.Jn)(yt,Date.now())+(S.indexOf(")")>-1?")":"&")}).replace(I,(S,C,Z,ye,Ve,qe,gt)=>{const yt=C||ye||qe,Dt=Z||Ve||gt||"?";return p.Z.API_SERVER+"/api/attachments/"+yt+Dt+"&t="+(0,ge.Jn)(yt,Date.now())+(S.indexOf(")")>-1?")":"&")}).replace(ee,(S,C,Z,ye,Ve)=>{const qe=C||ye,gt=Z||Ve||"";return'"'+p.Z.API_SERVER+"/api/attachments/"+qe+gt+qe+gt+"&t="+(0,ge.Jn)(qe,Date.now())}).replace(V,(S,C,Z,ye,Ve)=>{const qe=C||ye,gt=Z||Ve||"";return"("+p.Z.API_SERVER+"/files/uploads/"+qe+gt+qe+gt+"&t="+(0,ge.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,`
|
|
|
`),ie)};var at=({value:ie="",edit:K=!1,className:I,showTextOnly:ee,showLines:V,style:he={},stylesPrev:S={},highlightKeywords:C,showProgramFill:Z,isProgramFill:ye,disabledFill:Ve=!1,programFillValue:qe,openEditor:gt=()=>{},onFillChange:yt=ot=>{},onFillBlur:Dt=()=>{},onFillFocus:Ut=()=>{}})=>{let ot=X(String(ie||""));const kt=(0,y.useRef)(),tt=(0,y.useRef)(),[Gt,Xe]=(0,y.useState)(""),[Ke,Ae]=(0,y.useState)("office"),[xe,se]=(0,y.useState)([]),Ne=(0,y.useRef)("a"+(0,F.Z)()),Ce={},Se=He=>/<style[\s\S]*?>/i.test(He||""),M=(He,Et,pt)=>{const ft=document.createElement(He===me?"input":"textarea");ft.style.width="100%",ft.style.height=He===me?"40px":"151px",ft.rows=5,ft.spellcheck=!1,ft.name="edu-program-fill",ft.placeholder="\u8BF7\u8F93\u5165",ft.dataset.id=Et;const Pt=Object.keys(Ce).length;return Ce[Pt]=ft,`<span class="edu-program-fill-wrap ${He===me?"":"show"}" style="width:${He===me?"600px":"100%"}" title=${pt||""}><span>${ft.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function fe(He){return He=He.replace(/!\[.*?\]\(.*?\)/g,""),He=He.replace(/\[.*?\]\(.*?\)/g,""),He=He.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),He=He.replace(/<embed.*?>/g,""),He=He.replace(/<img.*?>/g,""),He=He.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),He=He.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),He=He.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),He=He.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),He}const _e=He=>!ee&&Se(ot)?He:He.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Et,pt){let ft=pt.replace(/(\n|\r)/g,"").split("}"),Pt=[];return ft.map(x=>{x!=""&&Pt.push(`.${Ne.current} ${x}`)}),`<style>${Pt.join("}")}</style>`}),Re=(0,y.useMemo)(()=>{(0,Y.Iy)();try{const ft=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Pt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,x=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,D=/\(\/attachments\/download\//g;ot=ot.replace(D,"("+p.Z.API_SERVER+"/attachments/download/").replace(ft,"("+p.Z.API_SERVER+"/api/attachments/").replace(Pt,'"'+p.Z.API_SERVER+"/api/attachments/").replace(x,'"'+p.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,`
|
|
|
`),kt.current.style.display="none"}catch(ft){}if(Z){let ft=-1;return ot=ot.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Pt,x,D){var Ye;return++ft,M(Pt,ft,(Ye=qe==null?void 0:qe[ft])==null?void 0:Ye.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${_e(ot||"")}</pre>`}let He=_e(ot);He=(0,Y.ZP)(He);const Et=(0,Y.ez)();ot.match(/\[TOC\]/)&&(He=He.replace("<p>[TOC]</p>",(0,Y.Qv)()),(0,Y.Iy)()),He=He.replace(/(__special_katext_id_\d+__)/g,(ft,Pt)=>{const{type:x,expression:D}=Et[Pt];return(0,le.renderToString)(Be(D)||"",{displayMode:x==="block",throwOnError:!1,output:"html"})}),He=He.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Y.AL)();const pt=document.createElement("div");if(pt.innerHTML=He,ee)return pt.innerText;if(C){const ft=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return te(pt,ft),pt.innerHTML}return setTimeout(()=>st(),500),pt.innerHTML},[ot,C]);(0,y.useEffect)(()=>{Q.current&&Q.current.querySelectorAll(["input","textarea"]).forEach(Et=>{Et.oninput=$e,Et.onblur=rt,Et.onfocus=it})},[xe]),(0,y.useEffect)(()=>{var He,Et,pt,ft,Pt;if(qe!=null&&qe.length)try{const x=Q.current.querySelectorAll(".edu-program-fill-score"),D=Q.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ye,W]of D.entries())W.value=((He=qe==null?void 0:qe[Ye])==null?void 0:He.value)||"",((Et=qe==null?void 0:qe[Ye])==null?void 0:Et.type)==="warning"?W.className="program-fill-warning":((pt=qe==null?void 0:qe[Ye])==null?void 0:pt.type)==="success"?W.className="program-fill-success":W.className="";for(const[Ye,W]of x.entries())W.innerHTML=(ft=qe==null?void 0:qe[Ye])!=null&&ft.score?`${(Pt=qe==null?void 0:qe[Ye])==null?void 0:Pt.score}\u5206`:"";se(qe)}catch(x){console.log(x,"error")}},[qe]);const $e=He=>{xe[He.target.dataset.id]=xe[He.target.dataset.id]||{},xe[He.target.dataset.id].value=He.target.value,se([...xe]),yt(xe,He.target.dataset.id)},rt=He=>{xe[He.target.dataset.id]=xe[He.target.dataset.id]||{},xe[He.target.dataset.id].value=He.target.value,se([...xe]),Dt(xe,He.target.dataset.id)},it=He=>{xe[He.target.dataset.id]=xe[He.target.dataset.id]||{},xe[He.target.dataset.id].value=He.target.value,se([...xe]),Ut(xe,He.target.dataset.id)};function te(He,Et){return He.childNodes.forEach(pt=>{var ft;if(pt.childNodes.length>0)te(pt,Et);else if(pt.nodeName!=="IMG")if(pt.innerHTML)pt.innerHTML=(ft=pt.innerHTML)==null?void 0:ft.replace(new RegExp(Et,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Pt=document.createElement("span");Pt.innerHTML=pt.textContent.replace(new RegExp(Et,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),pt.replaceWith(Pt)}})}const Q=(0,y.useRef)();Y.jb.WebkitLineClamp=V,V&&(he=re(re({},he),Y.jb));function lt(He){let Et=He.target;if(Et.tagName.toUpperCase()==="A"){let pt=Et.getAttribute("href");if(pt.indexOf("office")>-1)He.preventDefault(),Xe(pt),Ae("office");else if(pt.indexOf("application/pdf")>-1)He.preventDefault(),Xe(pt),Ae("pdf");else if(pt.indexOf("text/html")>-1)He.preventDefault(),Xe(pt),Ae("html");else if(pt.startsWith("#")){He.preventDefault();let ft=document.getElementById(pt.replace("#",""));ft&&ft.scrollIntoView(!0)}}}const st=()=>{var He;const Et=(He=Q.current)==null?void 0:He.querySelectorAll("video");Et==null||Et.forEach(pt=>{if(pt.oncontextmenu=()=>!1,pt.src.indexOf(".m3u8")>-1&&!pt.canPlayType("application/vnd.apple.mpegurl")){if($.ZP.isSupported()){var ft=new $.ZP;ft.loadSource(pt.src),ft.attachMedia(pt)}}})};(0,y.useEffect)(()=>{if(Q.current&&Re&&Re.match(Te)&&window.PR.prettyPrint(),Q.current)return Q.current.addEventListener("click",lt),()=>{var He;(He=Q.current)==null||He.removeEventListener("click",lt),(0,Y.AL)(),(0,Y.Iy)()}},[Re,Q.current,lt]);const ht=He=>{He.target.nodeName==="IMG"&&He.target.className.indexOf("draw-flowchart")>-1?(kt.current.style.zIndex=1,kt.current.style.display="flex",kt.current.style.width=He.target.clientWidth+"px",kt.current.style.height=He.target.clientHeight+"px",kt.current.style.top=He.target.offsetTop+"px",kt.current.style.left=He.target.offsetLeft+"px",He.target.id&&(tt.current=He.target.id)):kt.current.style.display="none"},bt=()=>{kt.current.style.display="none"};return(0,y.useEffect)(()=>{var He;const Et=pt=>{pt.preventDefault(),pt.clipboardData.setData("text",window.getSelection().toString())};return(He=Q.current)==null||He.addEventListener("copy",Et),()=>{var pt;(pt=Q.current)==null||pt.removeEventListener("copy",Et)}},[Q.current]),y.createElement("div",{style:{position:"relative"},onMouseLeave:bt},ee&&y.createElement("div",{ref:Q,className:`${J.mdBody} `},Re),!ee&&!Se(Re)&&y.createElement("div",{ref:Q,style:re({},he),onMouseOver:ht,className:`${I||""} ${Ve?"disabled-fill":""} markdown-body ${J.mdBody} ${Ne.current}`,dangerouslySetInnerHTML:{__html:Re}}),!ee&&Se(Re)&&y.createElement(O,{html:Re}),y.createElement("div",{ref:kt,className:`${J.button} ${K?"":J.previewFlowChart}`},y.createElement(l.Z,null,y.createElement(A.ZP,{onClick:()=>{K?gt(tt.current):(Xe(tt.current),Ae("flowChart"))}},K?"\u7F16\u8F91":"\u9884\u89C8"))),y.createElement(_.Z,{close:!0,data:Gt,type:Gt!=null&&Gt.length?Ke:"",style:re({},S),onClose:()=>Xe("")}))}},34728:function(fn,ut,b){"use strict";b.d(ut,{SV:function(){return kt},ZP:function(){return ot}});var y=b(59301),ce=b(76374);const Y={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"]},de={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"]},$={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(`
|
|
|
`)}]},p={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(`
|
|
|
`)}]},ge={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 le=b(53184),l=b.n(le),A=(tt,Gt,Xe)=>new Promise((Ke,Ae)=>{var xe=Ce=>{try{Ne(Xe.next(Ce))}catch(Se){Ae(Se)}},se=Ce=>{try{Ne(Xe.throw(Ce))}catch(Se){Ae(Se)}},Ne=Ce=>Ce.done?Ke(Ce.value):Promise.resolve(Ce.value).then(xe,se);Ne((Xe=Xe.apply(tt,Gt)).next())});const F={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"]}},_=(tt,Gt,Xe,Ke)=>{const Ae=Gt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Xe.lineNumber,endColumn:Xe.column});return Array.from(new Set(Ae.match(/\b\w{2,}\b/g)||[])).map(se=>({label:se,kind:tt.languages.CompletionItemKind.Text,insertText:se,range:Ke}))},E=(tt,Gt,Xe,Ke)=>{tt.languages.registerCompletionItemProvider(Gt,{provideCompletionItems(Ae,xe){const se=Ae.getWordUntilPosition(xe),Ne={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:se.startColumn,endColumn:se.endColumn},Ce=Ae.getLineContent(xe.lineNumber).substring(se.startColumn-2,se.endColumn);return{suggestions:[..._(tt,Ae,xe,Ne),...Xe.map(M=>({label:M,kind:tt.languages.CompletionItemKind.Keyword,documentation:M,insertText:M,insertTextRules:tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne})),...Ke.map(M=>({label:M.label,kind:tt.languages.CompletionItemKind.Snippet,documentation:M.content,insertText:Ce.startsWith("#")?M.content.replace(/#/,""):M.content,insertTextRules:tt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}))]}}})};var w=tt=>{F.languages.forEach(Gt=>{tt.languages.registerDocumentFormattingEditProvider(Gt,{provideDocumentFormattingEdits(Xe){return A(this,null,function*(){const Ke=l()(Xe.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:Xe.getFullModelRange(),text:Ke}]})}})}),E(tt,"java",de.keywords,de.quickKey),E(tt,"cpp",$.keywords,$.quickKey),E(tt,"c",Y.keywords,[]),E(tt,"python",p.keywords,p.quickKey),E(tt,"scala",ge.keywords,ge.quickKey)};const O="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var X=Object.defineProperty,J=(tt,Gt,Xe)=>Gt in tt?X(tt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):tt[Gt]=Xe,U=(tt,Gt,Xe)=>J(tt,typeof Gt!="symbol"?Gt+"":Gt,Xe);const R=class xu{constructor(Gt,Xe,Ke){this.placeholder=Gt,this.editor=Xe,this.monaco=Ke,Xe.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)}};U(R,"ID","editor.widget.placeholderHint");var P=R,N=b(96236),re=b(6767),ue=b(25399),me=b(78267),Te=b(33156),Be=b(56102),Le=Object.defineProperty,at=Object.defineProperties,ie=Object.getOwnPropertyDescriptors,K=Object.getOwnPropertySymbols,I=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,V=(tt,Gt,Xe)=>Gt in tt?Le(tt,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):tt[Gt]=Xe,he=(tt,Gt)=>{for(var Xe in Gt||(Gt={}))I.call(Gt,Xe)&&V(tt,Xe,Gt[Xe]);if(K)for(var Xe of K(Gt))ee.call(Gt,Xe)&&V(tt,Xe,Gt[Xe]);return tt},S=(tt,Gt)=>at(tt,ie(Gt)),C=(tt,Gt)=>{var Xe={};for(var Ke in tt)I.call(tt,Ke)&&Gt.indexOf(Ke)<0&&(Xe[Ke]=tt[Ke]);if(tt!=null&&K)for(var Ke of K(tt))Gt.indexOf(Ke)<0&&ee.call(tt,Ke)&&(Xe[Ke]=tt[Ke]);return Xe},Z=(tt,Gt,Xe)=>new Promise((Ke,Ae)=>{var xe=Ce=>{try{Ne(Xe.next(Ce))}catch(Se){Ae(Se)}},se=Ce=>{try{Ne(Xe.throw(Ce))}catch(Se){Ae(Se)}},Ne=Ce=>Ce.done?Ke(Ce.value):Promise.resolve(Ce.value).then(xe,se);Ne((Xe=Xe.apply(tt,Gt)).next())});function ye(tt){return/^\d+$/.test(tt)?`${tt}px`:tt}function Ve(){}let qe=!1;const gt={"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 yt(tt=[]){let Gt=tt;if(Array.isArray(tt)){for(let Xe=0;Xe<tt.length;Xe++){let Ke=gt[tt[Xe]];if(Ke)return Ke}return Gt[0]}return gt[Gt]||Gt}let Dt=null;const Ut=()=>Z(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(tt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",tt)}});var ot=tt=>{var Gt=tt,{width:Xe="100%",height:Ke="100%",value:Ae,language:xe="javascript",style:se={},options:Ne={},overrideServices:Ce={},theme:Se="vs-dark",onEditBlur:M,isCopy:fe=!1,onSave:_e,autoHeight:Re=!1,forbidCopy:$e=!1,forbidCopyTips:rt,onChange:it=Ve,editorDidMount:te=Ve,onFocus:Q=Ve,onBreakPoint:lt=Ve,breakPointValue:st=[],filename:ht="educoder.txt",errorLine:bt,errorContent:He="",highlightLine:Et,openBreakPoint:pt=!1,placeholder:ft="",showMiniMap:Pt=!0}=Gt,x=C(Gt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const D=(0,y.useRef)(),Ye=(0,y.useRef)({}),W=(0,y.useRef)(),pe=(0,y.useRef)(),Bt=(0,y.useRef)([]),Oe=(0,y.useRef)(!1),Ue=(0,y.useRef)(),et=(0,y.useRef)(),q=(0,y.useRef)(!1),[ne,we]=(0,y.useState)(!1);function Fe(){let $t;return D.current&&($t=new ce.Z(Vt=>{for(let An of Vt)(An.target.offsetHeight>0||An.target.offsetWidth>0)&&Ye.current.instance.layout()}),$t.observe(D.current)),$t}function G(){re.ZP.warning({content:decodeURIComponent(rt||O),key:"monaco-editor-tip"})}const St=()=>{let $t=Ye.current.instance;if(Ae!=null&&$t&&ne){const Vt=$t.getModel();Vt&&Ae!==Vt.getValue()&&(qe=!0,Vt.setValue(Ae),$t.layout(),qe=!1)}};(0,y.useEffect)(()=>{const $t=Te.Z.subscribe("formatDocument",Vt=>{var An;let Xn=Ye.current.instance;(An=Xn==null?void 0:Xn.getAction)==null||An.call(Xn,"editor.action.formatDocument").run()});return window.updateMonacoValue=Vt=>{it(Vt)},$t},[]),(0,y.useEffect)(()=>{var $t;let Vt=Ye.current.instance;pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{St()},500),Ae&&(Ae!=null&&Ae.length)&&(($t=Vt==null?void 0:Vt.updateOptions)==null||$t.call(Vt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ae.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ae,ne,Ye.current]),(0,y.useEffect)(()=>{if(bt&&Ye.current&&Ye.current.instance){let Vt=Ye.current.instance;Vt.changeViewZones(function(An){var Xn=document.createElement("div");Xn.style.padding="10px 20px",Xn.style.width="calc(100% - 20px)",Xn.className="my-error-line-wrp",Xn.innerHTML=He,An.addZone({afterLineNumber:bt||11,heightInLines:3,domNode:Xn})});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}};Vt.addOverlayWidget($t),Vt.revealPositionInCenter({lineNumber:20,column:1})}},[bt,Ye.current,ne]);const Ee=($t="",Vt)=>{if(!$t||$t.trim()==="")return!0;const Xn=Ye.current.instance.getModel().getLineTokens(Vt);let Qe=!1;for(let Je=0;Je<2;Je++)Xn.getStandardTokenType(Je)===1&&(Qe=!0);return Qe};(0,y.useEffect)(()=>{var $t;const Vt=($t=Ye.current)==null?void 0:$t.instance;if(Vt&&ne&&$e){const An=Vt.onDidBlurEditorWidget(()=>{q.current=!1}),Xn=Vt.onDidFocusEditorText(()=>{q.current=!0});return()=>{An.dispose(),Xn.dispose()}}},[Ye.current,ne,$e]),(0,y.useEffect)(()=>{var $t;if(($t=Ye.current)!=null&&$t.instance&&ne&&pt){let Vt=Ye.current.instance,An=Vt.getModel();if(!An)return;(()=>{var Rt;let Zt=[],mn=[];const Jt=An.getAllDecorations();for(let nt of Jt)nt.options.className==="highlighted-line"&&(Zt.push((Rt=nt==null?void 0:nt.range)==null?void 0:Rt.startLineNumber),mn.push(nt==null?void 0:nt.id));if(Et===Zt[0])return;An.deltaDecorations(mn,[]);const je=An.getLineCount();Et&&Et<=je&&(Vt.deltaDecorations([],[{range:new Dt.Range(Et,1,Et,An.getLineMaxColumn(Et)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Vt.revealLineInCenter(Et))})();const Qe=(Rt=!1)=>{var Zt;let mn=[],Jt=[];const je=An.getAllDecorations();for(let nt of je)nt.options.linesDecorationsClassName==="breakpoints-select"&&(mn.push((Zt=nt==null?void 0:nt.range)==null?void 0:Zt.startLineNumber),Jt.push(nt==null?void 0:nt.id));if(Rt)return{lines:mn,ids:Jt};lt(mn)},Je=Rt=>Z(void 0,null,function*(){let Zt={range:new Dt.Range(Rt,1,Rt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield An.deltaDecorations([],[Zt]),Qe()}),ve=Rt=>Z(void 0,null,function*(){let Zt=[];const mn=Vt.getLineDecorations(Rt);for(let Jt of mn)Jt.options.linesDecorationsClassName==="breakpoints-select"&&Zt.push(Jt.id);yield An.deltaDecorations(Zt,[]),Qe()}),Pe=Rt=>{let Zt=Vt.getLineDecorations(Rt);for(let mn of Zt)if(mn.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,me.isEqual)(st,Qe(!0).lines)){An.deltaDecorations(Qe(!0).ids,[]);const Rt=st.map(Zt=>({range:new Dt.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));An.deltaDecorations([],Rt)}const Ge=Vt.onDidChangeModelContent(Rt=>{let Zt=Vt.getPosition();if(Zt){let mn=Zt.lineNumber;clearTimeout(et.current),et.current=setTimeout(()=>{Ee(An.getLineContent(mn),mn)?ve(mn):Pe(mn)?(ve(mn),Je(mn)):Qe()},100)}}),Ze=Vt.onMouseDown(Rt=>{var Zt,mn,Jt;if(Rt.target.detail&&((Jt=(mn=(Zt=Rt.target)==null?void 0:Zt.element)==null?void 0:mn.className)!=null&&Jt.includes("line-numbers"))){let je=Rt.target.position.lineNumber;if(Ee(An.getLineContent(je),je))return;Pe(je)?ve(je):Je(je)}}),ct=Rt=>{let Zt={range:new Dt.Range(Rt,1,Rt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Bt.current=Vt.deltaDecorations(Bt.current,[Zt])},Ft=()=>{Bt.current=Vt.deltaDecorations(Bt.current,[])},Xt=Vt.onMouseMove(Rt=>{var Zt,mn,Jt;if(Ft(),Rt.target.detail&&((Jt=(mn=(Zt=Rt.target)==null?void 0:Zt.element)==null?void 0:mn.className)!=null&&Jt.includes("line-numbers"))){let je=Rt.target.position.lineNumber;if(Ee(An.getLineContent(je),je))return;ct(je)}}),qt=Vt.onMouseLeave(()=>{Ft()});return()=>{Ge.dispose(),Ze.dispose(),Xt.dispose(),qt.dispose()}}},[Ye.current,ne,st,Et,pt,xe]),(0,y.useEffect)(()=>{var $t;($t=Ye.current)!=null&&$t.instance&&pt&&Ye.current.instance.setPosition({lineNumber:0,column:0})},[Et]);function Wt(){let $t=Ye.current.instance;if($t){const Vt=$t.getSelection(),An=Ye.current.pastePos||{},Xn=new Dt.Range(An.startLineNumber||Vt.endLineNumber,An.startColumn||Vt.endColumn,An.endLineNumber||Vt.endLineNumber,An.endColumn||Vt.endColumn);setTimeout(()=>{$t.executeEdits("",[{range:Xn,text:""}])},300)}}function en($t){(window.navigator.platform.match("Mac")?$t.metaKey:$t.ctrlKey)&&$t.keyCode==83&&($t.preventDefault(),_e())}const an=()=>{if(Re&&Ye.current.instance){const $t=Ye.current.instance.getContentHeight();qn($t<Ke?Ke:$t)}else qn(Ke)};function Zn($t){var Vt=document.createEvent("MouseEvents");Vt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),$t.dispatchEvent(Vt)}const Rn=$t=>{if(!q.current)return;const{keyCode:Vt,ctrlKey:An,metaKey:Xn,target:Qe,type:Je}=$t;return(Je==="paste"||(Vt===67||Vt===86)&&(Xn||An))&&Qe.nodeName==="TEXTAREA"&&(G(),$t.preventDefault()),!1};function Cn($t,Vt){var An=window.URL||window.webkitURL||window,Xn=new Blob([Vt]),Qe=document.createElementNS("http://www.w3.org/1999/xhtml","a");Qe.href=An.createObjectURL(Xn),Qe.download=$t,Zn(Qe)}(0,y.useEffect)(()=>{an()},[an]),(0,y.useEffect)(()=>{D.current&&!ne&&Promise.all([b.e(8909),b.e(5977)]).then(b.bind(b,71448)).then($t=>{try{Dt=$t,Ye.current.instance=Dt.editor.create(D.current,{value:Ae,language:yt(xe),theme:Se,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Pt||!1}},Ce);const Vt=Ye.current.instance;let Qe=[...N.BH._menuItems].find(Ge=>Ge[0]._debugName=="EditorContext")[1],Je=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ve=(Ge,Ze)=>{var ct,Ft;let Xt=Ge._first;do Ze.includes((Ft=(ct=Xt.element)==null?void 0:ct.command)==null?void 0:Ft.id)&&Ge._remove(Xt);while(Xt=Xt.next)};if(te(Vt,Dt),setTimeout(()=>{an(),Ye.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Cn(ht||"educoder.txt",Vt.getValue())}})},500),Ye.current.subscription=Vt.onDidChangeModelContent(Ge=>{Oe.current?clearTimeout(Ue.current):(an(),it(Vt.getValue(),Ge)),Ue.current=setTimeout(()=>{Oe.current=!1},500)}),window.Monaco||w(Dt,yt(xe)),$e&&(ve(Qe,Je),D.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Rn),window.removeEventListener("paste",Rn),window.addEventListener("keydown",Rn),window.addEventListener("paste",Rn)),window.Monaco=Dt,M&&Vt.onDidBlurEditorWidget(()=>{M(Vt.getValue())}),Q&&Vt.onDidFocusEditorText(()=>{$e&&Ut(),Q(Vt.getValue())}),$e){Ut();try{Vt.onDidPaste(Ge=>{const Ze=Vt.getSelection(),ct=Ye.current.pastePos||{},Ft=new Dt.Range(ct.startLineNumber||Ze.endLineNumber,ct.startColumn||Ze.endColumn,ct.endLineNumber||Ze.endLineNumber,ct.endColumn||Ze.endColumn);Vt.executeEdits("",[{range:Ge.range,text:""}])})}catch(Ge){}}let Pe=Fe();return ft&&typeof ft=="string"&&new P(ft,Vt,Dt),we(!0),()=>{const Ge=Ye.current.instance;Ge.dispose();const Ze=Ge.getModel();Ze&&Ze.dispose(),Ye.current.subscription&&Ye.current.subscription.dispose(),Pe.unobserve(D.current)}}catch(Vt){}})},[]),(0,y.useEffect)(()=>{if(Ye.current.instance&&ne)return document.addEventListener("keydown",en,!1),()=>{document.removeEventListener("keydown",en)}},[_e,ne]),(0,y.useEffect)(()=>{let $t=Ye.current.instance;if($t&&ne){let Vt=yt(xe);Dt.editor.setModelLanguage($t.getModel(),Vt)}},[xe,ne]),(0,y.useEffect)(()=>{Ye.current.instance&&ne&&Dt.editor.setTheme(Se)},[Se,ne]),(0,y.useEffect)(()=>{let $t=Ye.current.instance;W.current=Ne,$t&&ne&&($t.updateOptions(he({},Ne)),setTimeout(()=>{$t.getModel().updateOptions(he({},Ne))},200))},[JSON.stringify(Ne),ne]),(0,y.useEffect)(()=>{let $t=Ye.current.instance;$t&&ne&&$t.layout()},[Xe,Ke,ne]);const[sr,dr]=(0,y.useState)(ye(Xe)),[$n,qn]=(0,y.useState)(ye(Ke)),ln=S(he({},se),{width:sr,height:$n,position:"relative"});return y.createElement("div",{className:"my-monaco-editor",ref:D,style:ln,onFocus:()=>{$e&&Ut()}},fe&&y.createElement(Be.CopyToClipboard,{text:Ae,onCopy:()=>re.ZP.success("\u590D\u5236\u6210\u529F")},y.createElement(ue.Z,{title:"\u590D\u5236\u4EE3\u7801"},y.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},y.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function kt({width:tt="100%",height:Gt="100%",original:Xe,modified:Ke,language:Ae,options:xe={}}){const se=(0,y.useRef)(),[Ne,Ce]=(0,y.useState)(null);function Se(Re){let $e;return se.current&&($e=new ce.Z(rt=>{for(let it of rt)(it.target.offsetHeight>0||it.target.offsetWidth>0)&&Re.layout()}),$e.observe(se.current)),$e}(0,y.useEffect)(()=>(se.current&&Promise.all([b.e(8909),b.e(9404)]).then(b.bind(b,2550)).then(Re=>{Dt=Re;const $e=Dt.editor.createDiffEditor(se.current,S(he({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},xe),{wordWrap:!0}));Ce($e);let rt=Se($e);return()=>{$e.dispose();const it=$e.getModel();it&&it.dispose(),rt.unobserve(se.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,y.useEffect)(()=>{Ne&&Ne.setModel({original:Dt.editor.createModel(Xe,Ae),modified:Dt.editor.createModel(Ke,Ae)})},[Xe,Ke,Ae,Ne]);const M=ye(tt),fe=ye(Gt),_e={width:M,height:fe};return y.createElement("div",{className:"my-diff-editor",ref:se,style:_e})}},8861:function(fn,ut,b){"use strict";b.r(ut),b.d(ut,{default:function(){return Ut}});var y=b(59301),ce=b(44283),Y=b(66649),de=b.n(Y),$=b(93041),p=b(24404),ge=b(77019),le=b(5269),l=b(37285),A=b(458),F=b(31709),_=b(14185),E=b(90736),w=b(28284),O=b(62957),X=b(6767),J=b(37568),U=b(80007),R={flex_box_center:"flex_box_center___N_gPw",flex_space_between:"flex_space_between___f_LaO",flex_box_vertical_center:"flex_box_vertical_center___silBX",flex_box_center_end:"flex_box_center_end___Nt5TD",flex_box_column:"flex_box_column___xc67X",tabs:"tabs___JYWDM",active:"active___siUX9",list:"list___IZLen",tags:"tags___V_Bdb",searchWrp:"searchWrp___MhTxO",newlight:"newlight___pybQh"},z=Object.defineProperty,P=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ue=(ot,kt,tt)=>kt in ot?z(ot,kt,{enumerable:!0,configurable:!0,writable:!0,value:tt}):ot[kt]=tt,me=(ot,kt)=>{for(var tt in kt||(kt={}))N.call(kt,tt)&&ue(ot,tt,kt[tt]);if(P)for(var tt of P(kt))re.call(kt,tt)&&ue(ot,tt,kt[tt]);return ot},Te=(ot,kt,tt)=>new Promise((Gt,Xe)=>{var Ke=se=>{try{xe(tt.next(se))}catch(Ne){Xe(Ne)}},Ae=se=>{try{xe(tt.throw(se))}catch(Ne){Xe(Ne)}},xe=se=>se.done?Gt(se.value):Promise.resolve(se.value).then(Ke,Ae);xe((tt=tt.apply(ot,kt)).next())});const Be=({messages:ot,loading:kt,user:tt,dispatch:Gt})=>{var Xe;const Ke=(0,ce.useParams)(),Ae=(0,ce.useLocation)(),{actionTabs:xe}=ot,[se]=w.default.useForm(),{recentContacts:Ne}=ot,[Ce,Se]=(0,y.useState)(""),[M,fe]=(0,y.useState)([]),[_e,Re]=(0,y.useState)(!1),[$e,rt]=(0,y.useState)();(0,y.useEffect)(()=>{ot.actionTabs.key==="\u5199\u79C1\u4FE1"&&it()},[ot.actionTabs.key]);const it=()=>Te(void 0,null,function*(){var Q;const lt=yield Gt({type:"messages/getRecentContacts",payload:{id:(Q=tt==null?void 0:tt.userInfo)==null?void 0:Q.user_id,keyword:Ce}});fe(me({},lt))}),te=()=>Te(void 0,null,function*(){if(Ce!==""){const Q=yield Gt({type:"messages/getUsersForPrivateMessages",payload:{keyword:Ce}});fe(me({},Q))}});return(0,y.useEffect)(()=>{te()},[Ce]),y.createElement(O.default,{centered:!0,title:"\u5199\u79C1\u4FE1",open:ot.actionTabs.key==="\u5199\u79C1\u4FE1",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",bodyStyle:{height:320},onOk:()=>Te(void 0,null,function*(){var Q,lt,st;yield se.validateFields();const ht=se.getFieldValue(),bt=`/api/course_modules/${Ke.categoryId}/add_second_category.json`,He=yield(0,U.w0)({content:ht.content,target_id:$e,userId:(Q=tt==null?void 0:tt.userInfo)==null?void 0:Q.user_id});He.status===0&&(X.ZP.success("\u6DFB\u52A0\u6210\u529F"),Gt({type:"messages/setActionTabs",payload:{}}),ce.history.push(`/messages/${(lt=tt==null?void 0:tt.userInfo)==null?void 0:lt.login}/message_detail?target_ids=${(st=He==null?void 0:He.private_message)==null?void 0:st.receiver_id}`))}),onCancel:()=>{Gt({type:"messages/setActionTabs",payload:{}})}},y.createElement(w.default,{form:se,initialValues:{name:""}},y.createElement(w.default.Item,{name:"users",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u53D1\u9001\u5BF9\u8C61"}]},y.createElement(J.default.Search,{onFocus:()=>Re(!0),onSearch:Q=>{Se(Q)},placeholder:"\u53D1\u9001\u7ED9..."})),_e&&y.createElement(A.Z,{loading:kt["messages/getUsersForPrivateMessages"]},y.createElement("aside",{className:R.searchWrp,style:{maxHeight:260,overflow:"auto"}},y.createElement("p",{className:"c-light-black mt10"},Ce===""?"\u6700\u8FD1\u8054\u7CFB\u4EBA":"\u641C\u7D22\u7ED3\u679C"),(Xe=M==null?void 0:M.users)==null?void 0:Xe.map(function(Q,lt){return y.createElement(ge.Z,{key:lt,align:"middle",className:"mt15 current",onClick:()=>{rt(Q.id),se.setFieldsValue({users:Q.name}),Re(!1)}},y.createElement(le.Z,{flex:"58px"},y.createElement("img",{style:{width:48,borderRadius:48},src:_.Z.IMG_SERVER+"/images/"+(Q==null?void 0:Q.image_url),alt:""})),y.createElement(le.Z,null,Q.name))}))),y.createElement(w.default.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D1\u9001\u5185\u5BB9"}],className:_e&&"hide",name:"content"},y.createElement(J.default.TextArea,{rows:10,maxLength:200}))))};var Le=(0,ce.connect)(({messages:ot,loading:kt,user:tt})=>({messages:ot,user:tt,loading:kt.effects}))(Be),at=b(35883),ie=b(79553),K=Object.defineProperty,I=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,C=(ot,kt,tt)=>kt in ot?K(ot,kt,{enumerable:!0,configurable:!0,writable:!0,value:tt}):ot[kt]=tt,Z=(ot,kt)=>{for(var tt in kt||(kt={}))he.call(kt,tt)&&C(ot,tt,kt[tt]);if(V)for(var tt of V(kt))S.call(kt,tt)&&C(ot,tt,kt[tt]);return ot},ye=(ot,kt)=>I(ot,ee(kt)),Ve=(ot,kt)=>{var tt={};for(var Gt in ot)he.call(ot,Gt)&&kt.indexOf(Gt)<0&&(tt[Gt]=ot[Gt]);if(ot!=null&&V)for(var Gt of V(ot))kt.indexOf(Gt)<0&&S.call(ot,Gt)&&(tt[Gt]=ot[Gt]);return tt};const{SubMenu:qe}=$.default,{Sider:gt,Content:yt}=p.default,Dt=ot=>{var kt=ot,{messages:tt,globalSetting:Gt,loading:Xe,user:Ke,dispatch:Ae}=kt,xe=Ve(kt,["messages","globalSetting","loading","user","dispatch"]),se,Ne;const Ce=(0,ce.useParams)(),{userInfo:Se}=Ke,{tidingsList:M,privateMessage:fe}=tt,[_e,Re]=(0,y.useState)({per_page:10,page:1});(0,y.useEffect)(()=>{_e.page=1,$e()},[Ce.userId]);const $e=()=>{Ae({type:"messages/getPrivateMessages",payload:Z(Z({},_e),Ce)})},rt=Q=>{var lt,st;xe.history.push(`/messages/${(lt=Ke==null?void 0:Ke.userInfo)==null?void 0:lt.login}/message_detail?target_ids=${(st=Q==null?void 0:Q.target)==null?void 0:st.id}`)},it=Q=>{var lt;xe.history.push(`/users/${(lt=Q==null?void 0:Q.target)==null?void 0:lt.login}`)},te=(0,y.useMemo)(()=>(Se==null?void 0:Se.is_teacher)&&(Se==null?void 0:Se.professional_certification),[Se]);return y.createElement("section",{className:R.bg},y.createElement("section",{className:"edu-container mt20"},y.createElement(ge.Z,{gutter:[20,20]},y.createElement(ie.Z,null),y.createElement(le.Z,{flex:"1"},y.createElement("aside",{className:"bg-white"},y.createElement("aside",{className:"pt30 pl30 pr30 font16"},y.createElement(ge.Z,null,y.createElement(le.Z,{flex:"1"},"\u5168\u90E8\u79C1\u4FE1"),te&&y.createElement(le.Z,null,y.createElement("span",{className:"c-blue current",onClick:()=>{var Q;Ae({type:"messages/setActionTabs",payload:{key:"\u5199\u79C1\u4FE1",bodyParams:ye(Z({},_e),{user_id:(Q=Ke==null?void 0:Ke.userInfo)==null?void 0:Q.user_id})}})}},"\u5199\u79C1\u4FE1")))),y.createElement(l.Z,null),y.createElement("aside",{className:R.list},y.createElement(A.Z,{active:!0,avatar:{size:40},paragraph:{rows:5},loading:Xe["messages/getPrivateMessages"]},!((se=fe==null?void 0:fe.private_messages)!=null&&se.length)&&y.createElement(E.Z,null),(Ne=fe==null?void 0:fe.private_messages)==null?void 0:Ne.map(function(Q,lt){var st,ht;return y.createElement("aside",null,y.createElement(ge.Z,null,y.createElement(le.Z,{flex:"58px",onClick:()=>it(Q)},y.createElement("img",{src:_.Z.IMG_SERVER+"/images/"+((st=Q==null?void 0:Q.target)==null?void 0:st.image_url),alt:""})),y.createElement(le.Z,{flex:1},y.createElement(ge.Z,null,y.createElement(le.Z,{span:24},y.createElement(ge.Z,null,y.createElement(le.Z,{flex:"1"},y.createElement("span",{onClick:()=>it(Q)},(ht=Q==null?void 0:Q.target)==null?void 0:ht.name),y.createElement("span",{className:"ml15"},"\u4E0E\u4F60\u7684\u79C1\u4FE1"),y.createElement("span",{className:"c-light-black mr15"},"[",Q==null?void 0:Q.message_count,"\u6761]"),y.createElement("span",{className:"ml15 c-light-black"},de()(Q.send_time).fromNow())),y.createElement(le.Z,null,(Q==null?void 0:Q.unread)&&y.createElement("span",{className:R.newlight})))),y.createElement(le.Z,{span:24,onClick:()=>rt(Q)},y.createElement("div",{className:"mt15"},y.createElement(at.Z,{value:Q.content||""})))))))})))),y.createElement("aside",{className:"tc mt20"},!Xe["messages/getTidings"]&&y.createElement(F.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:Q=>{_e.page=Q,Re(Z({},_e)),$e()},current:_e.page||1,total:fe==null?void 0:fe.count}))))),y.createElement(Le,null))};var Ut=(0,ce.connect)(({messages:ot,loading:kt,user:tt,globalSetting:Gt})=>({messages:ot,globalSetting:Gt,user:tt,loading:kt.effects}))(Dt)},79553:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return R}});var y=b(59301),ce=b(44283),Y=b(93041),de=b(24404),$=b(5269),p=b(14185),ge={flex_box_center:"flex_box_center___cQVhO",flex_space_between:"flex_space_between___L36a6",flex_box_vertical_center:"flex_box_vertical_center___sIHwG",flex_box_center_end:"flex_box_center_end___OqNyE",flex_box_column:"flex_box_column___Ct7XG",userInfo:"userInfo____uyMZ",navInfo:"navInfo___acXs6",actived:"actived___WhZza",newTip:"newTip___Jdd6B"},le=Object.defineProperty,l=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,_=(z,P,N)=>P in z?le(z,P,{enumerable:!0,configurable:!0,writable:!0,value:N}):z[P]=N,E=(z,P)=>{for(var N in P||(P={}))A.call(P,N)&&_(z,N,P[N]);if(l)for(var N of l(P))F.call(P,N)&&_(z,N,P[N]);return z},w=(z,P)=>{var N={};for(var re in z)A.call(z,re)&&P.indexOf(re)<0&&(N[re]=z[re]);if(z!=null&&l)for(var re of l(z))P.indexOf(re)<0&&F.call(z,re)&&(N[re]=z[re]);return N};const{SubMenu:O}=Y.default,{Sider:X,Content:J}=de.default,U=z=>{var P=z,{messages:N,globalSetting:re,loading:ue,user:me,dispatch:Te}=P,Be=w(P,["messages","globalSetting","loading","user","dispatch"]);const Le=(0,ce.useParams)(),{userInfo:at}=me,ie=(0,ce.useLocation)(),{tidingsList:K,privateMessage:I,unreadInfo:ee}=N,[V,he]=(0,y.useState)({per_page:10,page:1});(0,y.useEffect)(()=>{S()},[Le.userId]);const S=()=>{Te({type:"messages/unreadMessageInfo",payload:E(E({},V),Le)})};return y.createElement($.Z,{flex:"264px"},y.createElement("aside",{className:ge.userInfo},y.createElement("img",{className:"mt40",src:p.Z.IMG_SERVER+"/images/"+(at==null?void 0:at.image_url)}),y.createElement("p",{className:"font24 mt10"},at==null?void 0:at.username),y.createElement("p",{className:"mt20"},at==null?void 0:at.user_identity)),y.createElement("ul",{className:ge.navInfo},y.createElement(ce.Link,{to:`/messages/${at==null?void 0:at.login}/user_tidings`},y.createElement("li",{className:ie.pathname.indexOf("user_tidings")>-1&&ge.actived},"\u6D88\u606F",!!(ee!=null&&ee.unread_tiding_count)&&y.createElement("span",{className:ge.newTip},ee==null?void 0:ee.unread_tiding_count))),y.createElement(ce.Link,{to:`/messages/${at==null?void 0:at.login}/private_messages`},y.createElement("li",{className:(ie.pathname.indexOf("private_messages")>-1||ie.pathname.indexOf("message_detail")>-1)&&ge.actived},"\u79C1\u4FE1",!!(ee!=null&&ee.unread_message_count)&&y.createElement("span",{className:ge.newTip},ee==null?void 0:ee.unread_message_count)))))};var R=(0,ce.connect)(({messages:z,loading:P,user:N,globalSetting:re})=>({messages:z,globalSetting:re,user:N,loading:P.effects}))(U)},20047:function(fn,ut,b){"use strict";b.d(ut,{AL:function(){return P},Iy:function(){return F},Qv:function(){return w},ez:function(){return z},jb:function(){return _}});var y=b(32834),ce=b.n(y),Y=b(11690),de=b.n(Y);let $=1;function p(Te,Be){const Le=Te.match(/^(\s+)(?:```)/);if(Le===null)return Be;const at=Le[1];return Be.split(`
|
|
|
`).map(ie=>{const K=ie.match(/^\s+/);if(K===null)return ie;const[I]=K;return I.length>=at.length?ie.slice(at.length):ie}).join(`
|
|
|
`)}let ge=[],le=["<ul>"];const l=new(ce()).Renderer,A=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function F(){ge.length=0,le=["<ul>"]}const _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(Te,Be,Le,at){if(Be>=Te.length||Te[Be].level<=Le)return Be;var ie=Te[Be];at.push("<li><a href='#"+$+ie.anchor+"'>"+ie.text+"</a>"),Be++;var K=[];return Be=E(Te,Be,ie.level,K),K.length>0&&(at.push("<ul>"),K.forEach(function(I){at.push(I)}),at.push("</ul>")),at.push("</li>"),Be=E(Te,Be,Le,at),Be}function w(){return E(ge,0,0,le),le.push("</ul>"),le.join("")}const O={heading(Te){const Be=A.exec(Te);if($+=1,Be)return{type:"heading",raw:Be[0],depth:Be[1].length,text:Be[2]}},fences(Te){const Be=this.rules.block.fences.exec(Te);if(Be){const Le=Be[0];let at=p(Le,Be[3]||"");const ie=Be[2]?Be[2].trim():Be[2];if(["latex","katex","math"].indexOf(ie)>=0){const K=U(),I=at;at=K,R[K]={type:"block",expression:I}}return{type:"code",raw:Le,lang:ie,text:at}}}},X=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let J=0;const U=()=>`__special_katext_id_${J++}__`;let R={};function z(){return R}function P(){J=0,R={}}function N(Te){return Te=Te.replace(X,(Be,Le)=>{const at=U();return R[at]={type:"inline",expression:Le},at}),Te}const re=l.listitem;l.listitem=function(Te){return re(N(Te))};const ue=l.paragraph;l.paragraph=function(Te){return ue(N(Te))};const me=l.tablecell;l.tablecell=function(Te,Be){return me(N(Te),Be)},l.code=function(Te,Be,Le){const at=(Be||"").match(/\S*/)[0];return at?["latex","katex","math"].indexOf(at)>=0?`<p class='editormd-tex'>${Te}</p>`:`<pre class="prettyprint linenums"><code class="language-${Be}">${Le?Te:(0,Y.escape)(Te,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(Le?Te:(0,Y.escape)(Te,!0))+"</code></pre>"},l.heading=function(Te,Be,Le){let at=this.options.headerPrefix+Le.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ge.push({anchor:at,level:Be,text:Te}),"<h"+Be+' id="'+$+at+'">'+Te+"</h"+Be+">"},ce().setOptions({silent:!0,gfm:!0,pedantic:!1}),ce().use({tokenizer:O,renderer:l}),ut.ZP=ce()},29509:function(fn,ut,b){"use strict";b.d(ut,{o2:function(){return $},yT:function(){return p}});var y=b(77654),ce=b(34998);const Y=ce.i.map(ge=>`${ge}-inverse`),de=["success","processing","error","default","warning"];function $(ge){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,y.Z)(Y),(0,y.Z)(ce.i)).includes(ge):ce.i.includes(ge)}function p(ge){return de.includes(ge)}},99402:function(fn,ut,b){"use strict";b.d(ut,{T:function(){return ce},n:function(){return y}});function y(Y){return["small","middle","large"].includes(Y)}function ce(Y){return Y?typeof Y=="number"&&!Number.isNaN(Y):!1}},86013:function(fn,ut,b){"use strict";var y=b(59301),ce=b(19248);const Y=de=>{let $;return typeof de=="object"&&(de!=null&&de.clearIcon)?$=de:de&&($={clearIcon:y.createElement(ce.Z,null)}),$};ut.Z=Y},52838:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return p}});var y=b(37645);function ce(ge,le,l,A){if(A===!1)return{adjustX:!1,adjustY:!1};const F=A&&typeof A=="object"?A:{},_={};switch(ge){case"top":case"bottom":_.shiftX=le.arrowOffsetHorizontal*2+l,_.shiftY=!0,_.adjustY=!0;break;case"left":case"right":_.shiftY=le.arrowOffsetVertical*2+l,_.shiftX=!0,_.adjustX=!0;break}const E=Object.assign(Object.assign({},_),F);return E.shiftX||(E.adjustX=!0),E.shiftY||(E.adjustY=!0),E}const Y={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"]}},de={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"]}},$=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function p(ge){const{arrowWidth:le,autoAdjustOverflow:l,arrowPointAtCenter:A,offset:F,borderRadius:_,visibleFirst:E}=ge,w=le/2,O={};return Object.keys(Y).forEach(X=>{const J=A&&de[X]||Y[X],U=Object.assign(Object.assign({},J),{offset:[0,0],dynamicInset:!0});switch(O[X]=U,$.has(X)&&(U.autoArrow=!1),X){case"top":case"topLeft":case"topRight":U.offset[1]=-w-F;break;case"bottom":case"bottomLeft":case"bottomRight":U.offset[1]=w+F;break;case"left":case"leftTop":case"leftBottom":U.offset[0]=-w-F;break;case"right":case"rightTop":case"rightBottom":U.offset[0]=w+F;break}const R=(0,y.wZ)({contentRadius:_,limitVerticalRadius:!0});if(A)switch(X){case"topLeft":case"bottomLeft":U.offset[0]=-R.arrowOffsetHorizontal-w;break;case"topRight":case"bottomRight":U.offset[0]=R.arrowOffsetHorizontal+w;break;case"leftTop":case"rightTop":U.offset[1]=-R.arrowOffsetHorizontal*2+w;break;case"leftBottom":case"rightBottom":U.offset[1]=R.arrowOffsetHorizontal*2-w;break}U.overflow=ce(X,R,le,l),E&&(U.htmlRegion="visibleFirst")}),O}},82855:function(fn,ut,b){"use strict";b.d(ut,{F:function(){return $},Z:function(){return de}});var y=b(92310),ce=b.n(y);const Y=null;function de(p,ge,le){return ce()({[`${p}-status-success`]:ge==="success",[`${p}-status-warning`]:ge==="warning",[`${p}-status-error`]:ge==="error",[`${p}-status-validating`]:ge==="validating",[`${p}-has-feedback`]:le})}const $=(p,ge)=>ge||p},38406:function(fn,ut,b){"use strict";var y=b(59301),ce=b(48755),Y=b(584);const de=$=>{const{componentName:p}=$,{getPrefixCls:ge}=(0,y.useContext)(ce.E_),le=ge("empty");switch(p){case"Table":case"List":return y.createElement(Y.Z,{image:Y.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return y.createElement(Y.Z,{image:Y.Z.PRESENTED_IMAGE_SIMPLE,className:`${le}-small`});case"Table.filter":return null;default:return y.createElement(Y.Z,null)}};ut.Z=de},37285:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return w}});var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(48755),$=b(36237),p=b(63356),ge=b(16931),le=b(51636);const l=O=>{const{componentCls:X,sizePaddingEdgeHorizontal:J,colorSplit:U,lineWidth:R,textPaddingInline:z,orientationMargin:P,verticalMarginInline:N}=O;return{[X]:Object.assign(Object.assign({},(0,p.Wf)(O)),{borderBlockStart:`${(0,$.unit)(R)} solid ${U}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:N,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,$.unit)(R)} solid ${U}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,$.unit)(O.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${X}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,$.unit)(O.dividerHorizontalWithTextGutterMargin)} 0`,color:O.colorTextHeading,fontWeight:500,fontSize:O.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${U}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,$.unit)(R)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${X}-with-text-start`]:{"&::before":{width:`calc(${P} * 100%)`},"&::after":{width:`calc(100% - ${P} * 100%)`}},[`&-horizontal${X}-with-text-end`]:{"&::before":{width:`calc(100% - ${P} * 100%)`},"&::after":{width:`calc(${P} * 100%)`}},[`${X}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:z},"&-dashed":{background:"none",borderColor:U,borderStyle:"dashed",borderWidth:`${(0,$.unit)(R)} 0 0`},[`&-horizontal${X}-with-text${X}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${X}-dashed`]:{borderInlineStartWidth:R,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:U,borderStyle:"dotted",borderWidth:`${(0,$.unit)(R)} 0 0`},[`&-horizontal${X}-with-text${X}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${X}-dotted`]:{borderInlineStartWidth:R,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${X}-with-text`]:{color:O.colorText,fontWeight:"normal",fontSize:O.fontSize},[`&-horizontal${X}-with-text-start${X}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${X}-inner-text`]:{paddingInlineStart:J}},[`&-horizontal${X}-with-text-end${X}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${X}-inner-text`]:{paddingInlineEnd:J}}})}},A=O=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:O.marginXS});var F=(0,ge.I$)("Divider",O=>{const X=(0,le.mergeToken)(O,{dividerHorizontalWithTextGutterMargin:O.margin,dividerHorizontalGutterMargin:O.marginLG,sizePaddingEdgeHorizontal:0});return[l(X)]},A,{unitless:{orientationMargin:!0}}),_=function(O,X){var J={};for(var U in O)Object.prototype.hasOwnProperty.call(O,U)&&X.indexOf(U)<0&&(J[U]=O[U]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,U=Object.getOwnPropertySymbols(O);R<U.length;R++)X.indexOf(U[R])<0&&Object.prototype.propertyIsEnumerable.call(O,U[R])&&(J[U[R]]=O[U[R]]);return J},w=O=>{const{getPrefixCls:X,direction:J,className:U,style:R}=(0,de.dj)("divider"),{prefixCls:z,type:P="horizontal",orientation:N="center",orientationMargin:re,className:ue,rootClassName:me,children:Te,dashed:Be,variant:Le="solid",plain:at,style:ie}=O,K=_(O,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),I=X("divider",z),[ee,V,he]=F(I),S=!!Te,C=y.useMemo(()=>N==="left"?J==="rtl"?"end":"start":N==="right"?J==="rtl"?"start":"end":N,[J,N]),Z=C==="start"&&re!=null,ye=C==="end"&&re!=null,Ve=Y()(I,U,V,he,`${I}-${P}`,{[`${I}-with-text`]:S,[`${I}-with-text-${C}`]:S,[`${I}-dashed`]:!!Be,[`${I}-${Le}`]:Le!=="solid",[`${I}-plain`]:!!at,[`${I}-rtl`]:J==="rtl",[`${I}-no-default-orientation-margin-start`]:Z,[`${I}-no-default-orientation-margin-end`]:ye},ue,me),qe=y.useMemo(()=>typeof re=="number"?re:/^\d+$/.test(re)?Number(re):re,[re]),gt={marginInlineStart:Z?qe:void 0,marginInlineEnd:ye?qe:void 0};return ee(y.createElement("div",Object.assign({className:Ve,style:Object.assign(Object.assign({},R),ie)},K,{role:"separator"}),Te&&P!=="vertical"&&y.createElement("span",{className:`${I}-inner-text`,style:gt},Te)))}},584:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return z}});var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(9017),$=b(17835),p=b(57700),le=()=>{const[,P]=(0,p.ZP)(),[N]=(0,de.Z)("Empty"),ue=new $.FastColor(P.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return y.createElement("svg",{style:ue,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},y.createElement("title",null,(N==null?void 0:N.description)||"Empty"),y.createElement("g",{fill:"none",fillRule:"evenodd"},y.createElement("g",{transform:"translate(24 31.67)"},y.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),y.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),y.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),y.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),y.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),y.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),y.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},y.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),y.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},A=()=>{const[,P]=(0,p.ZP)(),[N]=(0,de.Z)("Empty"),{colorFill:re,colorFillTertiary:ue,colorFillQuaternary:me,colorBgContainer:Te}=P,{borderColor:Be,shadowColor:Le,contentColor:at}=(0,y.useMemo)(()=>({borderColor:new $.FastColor(re).onBackground(Te).toHexString(),shadowColor:new $.FastColor(ue).onBackground(Te).toHexString(),contentColor:new $.FastColor(me).onBackground(Te).toHexString()}),[re,ue,me,Te]);return y.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},y.createElement("title",null,(N==null?void 0:N.description)||"Empty"),y.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},y.createElement("ellipse",{fill:Le,cx:"32",cy:"33",rx:"32",ry:"7"}),y.createElement("g",{fillRule:"nonzero",stroke:Be},y.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),y.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:at}))))},F=b(16931),_=b(51636);const E=P=>{const{componentCls:N,margin:re,marginXS:ue,marginXL:me,fontSize:Te,lineHeight:Be}=P;return{[N]:{marginInline:ue,fontSize:Te,lineHeight:Be,textAlign:"center",[`${N}-image`]:{height:P.emptyImgHeight,marginBottom:ue,opacity:P.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${N}-description`]:{color:P.colorTextDescription},[`${N}-footer`]:{marginTop:re},"&-normal":{marginBlock:me,color:P.colorTextDescription,[`${N}-description`]:{color:P.colorTextDescription},[`${N}-image`]:{height:P.emptyImgHeightMD}},"&-small":{marginBlock:ue,color:P.colorTextDescription,[`${N}-image`]:{height:P.emptyImgHeightSM}}}}};var w=(0,F.I$)("Empty",P=>{const{componentCls:N,controlHeightLG:re,calc:ue}=P,me=(0,_.mergeToken)(P,{emptyImgCls:`${N}-img`,emptyImgHeight:ue(re).mul(2.5).equal(),emptyImgHeightMD:re,emptyImgHeightSM:ue(re).mul(.875).equal()});return[E(me)]}),O=b(48755),X=function(P,N){var re={};for(var ue in P)Object.prototype.hasOwnProperty.call(P,ue)&&N.indexOf(ue)<0&&(re[ue]=P[ue]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var me=0,ue=Object.getOwnPropertySymbols(P);me<ue.length;me++)N.indexOf(ue[me])<0&&Object.prototype.propertyIsEnumerable.call(P,ue[me])&&(re[ue[me]]=P[ue[me]]);return re};const J=y.createElement(le,null),U=y.createElement(A,null),R=P=>{const{className:N,rootClassName:re,prefixCls:ue,image:me=J,description:Te,children:Be,imageStyle:Le,style:at,classNames:ie,styles:K}=P,I=X(P,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:ee,direction:V,className:he,style:S,classNames:C,styles:Z}=(0,O.dj)("empty"),ye=ee("empty",ue),[Ve,qe,gt]=w(ye),[yt]=(0,de.Z)("Empty"),Dt=typeof Te!="undefined"?Te:yt==null?void 0:yt.description,Ut=typeof Dt=="string"?Dt:"empty";let ot=null;return typeof me=="string"?ot=y.createElement("img",{alt:Ut,src:me}):ot=me,Ve(y.createElement("div",Object.assign({className:Y()(qe,gt,ye,he,{[`${ye}-normal`]:me===U,[`${ye}-rtl`]:V==="rtl"},N,re,C.root,ie==null?void 0:ie.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},Z.root),S),K==null?void 0:K.root),at)},I),y.createElement("div",{className:Y()(`${ye}-image`,C.image,ie==null?void 0:ie.image),style:Object.assign(Object.assign(Object.assign({},Le),Z.image),K==null?void 0:K.image)},ot),Dt&&y.createElement("div",{className:Y()(`${ye}-description`,C.description,ie==null?void 0:ie.description),style:Object.assign(Object.assign({},Z.description),K==null?void 0:K.description)},Dt),Be&&y.createElement("div",{className:Y()(`${ye}-footer`,C.footer,ie==null?void 0:ie.footer),style:Object.assign(Object.assign({},Z.footer),K==null?void 0:K.footer)},Be)))};R.PRESENTED_IMAGE_DEFAULT=J,R.PRESENTED_IMAGE_SIMPLE=U;var z=R},24971:function(fn,ut,b){"use strict";var y=b(59301),ce=b(56553),Y=b(48755);const de=function($,p){let ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var le,l;const{variant:A,[$]:F}=y.useContext(Y.E_),_=y.useContext(ce.pg),E=F==null?void 0:F.variant;let w;typeof p!="undefined"?w=p:ge===!1?w="borderless":w=(l=(le=_!=null?_:E)!==null&&le!==void 0?le:A)!==null&&l!==void 0?l:"outlined";const O=Y.tr.includes(w);return[w,O]};ut.Z=de},28284:function(fn,ut,b){"use strict";b.d(ut,{default:function(){return Je}});var y=b(56553),ce=b(77654),Y=b(59301),de=b(92310),$=b.n(de),p=b(77900),ge=b(86641),le=b(83397);function l(ve){const[Pe,Ge]=Y.useState(ve);return Y.useEffect(()=>{const Ze=setTimeout(()=>{Ge(ve)},ve.length?0:10);return()=>{clearTimeout(Ze)}},[ve]),Pe}var A=b(36237),F=b(63356),_=b(34925),E=b(34961),w=b(51636),O=b(16931),J=ve=>{const{componentCls:Pe}=ve,Ge=`${Pe}-show-help`,Ze=`${Pe}-show-help-item`;return{[Ge]:{transition:`opacity ${ve.motionDurationFast} ${ve.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Ze]:{overflow:"hidden",transition:`height ${ve.motionDurationFast} ${ve.motionEaseInOut},
|
|
|
opacity ${ve.motionDurationFast} ${ve.motionEaseInOut},
|
|
|
transform ${ve.motionDurationFast} ${ve.motionEaseInOut} !important`,[`&${Ze}-appear, &${Ze}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Ze}-leave-active`]:{transform:"translateY(-5px)"}}}}};const U=ve=>({legend:{display:"block",width:"100%",marginBottom:ve.marginLG,padding:0,color:ve.colorTextDescription,fontSize:ve.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${(0,A.unit)(ve.lineWidth)} ${ve.lineType} ${ve.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,A.unit)(ve.controlOutlineWidth)} ${ve.controlOutline}`},output:{display:"block",paddingTop:15,color:ve.colorText,fontSize:ve.fontSize,lineHeight:ve.lineHeight}}),R=(ve,Pe)=>{const{formItemCls:Ge}=ve;return{[Ge]:{[`${Ge}-label > label`]:{height:Pe},[`${Ge}-control-input`]:{minHeight:Pe}}}},z=ve=>{const{componentCls:Pe}=ve;return{[ve.componentCls]:Object.assign(Object.assign(Object.assign({},(0,F.Wf)(ve)),U(ve)),{[`${Pe}-text`]:{display:"inline-block",paddingInlineEnd:ve.paddingSM},"&-small":Object.assign({},R(ve,ve.controlHeightSM)),"&-large":Object.assign({},R(ve,ve.controlHeightLG))})}},P=ve=>{const{formItemCls:Pe,iconCls:Ge,rootPrefixCls:Ze,antCls:ct,labelRequiredMarkColor:Ft,labelColor:Xt,labelFontSize:qt,labelHeight:Rt,labelColonMarginInlineStart:Zt,labelColonMarginInlineEnd:mn,itemMarginBottom:Jt}=ve;return{[Pe]:Object.assign(Object.assign({},(0,F.Wf)(ve)),{marginBottom:Jt,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden${ct}-row`]:{display:"none"},"&-has-warning":{[`${Pe}-split`]:{color:ve.colorError}},"&-has-error":{[`${Pe}-split`]:{color:ve.colorWarning}},[`${Pe}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:ve.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:Rt,color:Xt,fontSize:qt,[`> ${Ge}`]:{fontSize:ve.fontSize,verticalAlign:"top"},[`&${Pe}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:ve.marginXXS,color:Ft,fontSize:ve.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${Pe}-required-mark-hidden, &${Pe}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${Pe}-optional`]:{display:"inline-block",marginInlineStart:ve.marginXXS,color:ve.colorTextDescription,[`&${Pe}-required-mark-hidden`]:{display:"none"}},[`${Pe}-tooltip`]:{color:ve.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:ve.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Zt,marginInlineEnd:mn},[`&${Pe}-no-colon::after`]:{content:'"\\a0"'}}},[`${Pe}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${Ze}-col-'"]):not([class*="' ${Ze}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:ve.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[Pe]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:ve.colorTextDescription,fontSize:ve.fontSize,lineHeight:ve.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:ve.controlHeightSM,transition:`color ${ve.motionDurationMid} ${ve.motionEaseOut}`},"&-explain":{"&-error":{color:ve.colorError},"&-warning":{color:ve.colorWarning}}},[`&-with-help ${Pe}-explain`]:{height:"auto",opacity:1},[`${Pe}-feedback-icon`]:{fontSize:ve.fontSize,textAlign:"center",visibility:"visible",animationName:_.kr,animationDuration:ve.motionDurationMid,animationTimingFunction:ve.motionEaseOutBack,pointerEvents:"none","&-success":{color:ve.colorSuccess},"&-error":{color:ve.colorError},"&-warning":{color:ve.colorWarning},"&-validating":{color:ve.colorPrimary}}})}},N=(ve,Pe)=>{const{formItemCls:Ge}=ve;return{[`${Pe}-horizontal`]:{[`${Ge}-label`]:{flexGrow:0},[`${Ge}-control`]:{flex:"1 1 0",minWidth:0},[`${Ge}-label[class$='-24'], ${Ge}-label[class*='-24 ']`]:{[`& + ${Ge}-control`]:{minWidth:"unset"}}}}},re=ve=>{const{componentCls:Pe,formItemCls:Ge,inlineItemMarginBottom:Ze}=ve;return{[`${Pe}-inline`]:{display:"flex",flexWrap:"wrap",[Ge]:{flex:"none",marginInlineEnd:ve.margin,marginBottom:Ze,"&-row":{flexWrap:"nowrap"},[`> ${Ge}-label,
|
|
|
> ${Ge}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${Ge}-label`]:{flex:"none"},[`${Pe}-text`]:{display:"inline-block"},[`${Ge}-has-feedback`]:{display:"inline-block"}}}}},ue=ve=>({padding:ve.verticalLabelPadding,margin:ve.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),me=ve=>{const{componentCls:Pe,formItemCls:Ge,rootPrefixCls:Ze}=ve;return{[`${Ge} ${Ge}-label`]:ue(ve),[`${Pe}:not(${Pe}-inline)`]:{[Ge]:{flexWrap:"wrap",[`${Ge}-label, ${Ge}-control`]:{[`&:not([class*=" ${Ze}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Te=ve=>{const{componentCls:Pe,formItemCls:Ge,antCls:Ze}=ve;return{[`${Pe}-vertical`]:{[`${Ge}:not(${Ge}-horizontal)`]:{[`${Ge}-row`]:{flexDirection:"column"},[`${Ge}-label > label`]:{height:"auto"},[`${Ge}-control`]:{width:"100%"},[`${Ge}-label,
|
|
|
${Ze}-col-24${Ge}-label,
|
|
|
${Ze}-col-xl-24${Ge}-label`]:ue(ve)}},[`@media (max-width: ${(0,A.unit)(ve.screenXSMax)})`]:[me(ve),{[Pe]:{[`${Ge}:not(${Ge}-horizontal)`]:{[`${Ze}-col-xs-24${Ge}-label`]:ue(ve)}}}],[`@media (max-width: ${(0,A.unit)(ve.screenSMMax)})`]:{[Pe]:{[`${Ge}:not(${Ge}-horizontal)`]:{[`${Ze}-col-sm-24${Ge}-label`]:ue(ve)}}},[`@media (max-width: ${(0,A.unit)(ve.screenMDMax)})`]:{[Pe]:{[`${Ge}:not(${Ge}-horizontal)`]:{[`${Ze}-col-md-24${Ge}-label`]:ue(ve)}}},[`@media (max-width: ${(0,A.unit)(ve.screenLGMax)})`]:{[Pe]:{[`${Ge}:not(${Ge}-horizontal)`]:{[`${Ze}-col-lg-24${Ge}-label`]:ue(ve)}}}}},Be=ve=>{const{formItemCls:Pe,antCls:Ge}=ve;return{[`${Pe}-vertical`]:{[`${Pe}-row`]:{flexDirection:"column"},[`${Pe}-label > label`]:{height:"auto"},[`${Pe}-control`]:{width:"100%"}},[`${Pe}-vertical ${Pe}-label,
|
|
|
${Ge}-col-24${Pe}-label,
|
|
|
${Ge}-col-xl-24${Pe}-label`]:ue(ve),[`@media (max-width: ${(0,A.unit)(ve.screenXSMax)})`]:[me(ve),{[Pe]:{[`${Ge}-col-xs-24${Pe}-label`]:ue(ve)}}],[`@media (max-width: ${(0,A.unit)(ve.screenSMMax)})`]:{[Pe]:{[`${Ge}-col-sm-24${Pe}-label`]:ue(ve)}},[`@media (max-width: ${(0,A.unit)(ve.screenMDMax)})`]:{[Pe]:{[`${Ge}-col-md-24${Pe}-label`]:ue(ve)}},[`@media (max-width: ${(0,A.unit)(ve.screenLGMax)})`]:{[Pe]:{[`${Ge}-col-lg-24${Pe}-label`]:ue(ve)}}}},Le=ve=>({labelRequiredMarkColor:ve.colorError,labelColor:ve.colorTextHeading,labelFontSize:ve.fontSize,labelHeight:ve.controlHeight,labelColonMarginInlineStart:ve.marginXXS/2,labelColonMarginInlineEnd:ve.marginXS,itemMarginBottom:ve.marginLG,verticalLabelPadding:`0 0 ${ve.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),at=(ve,Pe)=>(0,w.mergeToken)(ve,{formItemCls:`${ve.componentCls}-item`,rootPrefixCls:Pe});var ie=(0,O.I$)("Form",(ve,Pe)=>{let{rootPrefixCls:Ge}=Pe;const Ze=at(ve,Ge);return[z(Ze),P(Ze),J(Ze),N(Ze,Ze.componentCls),N(Ze,Ze.formItemCls),re(Ze),Te(Ze),Be(Ze),(0,E.Z)(Ze),_.kr]},Le,{order:-1e3});const K=[];function I(ve,Pe,Ge){let Ze=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof ve=="string"?ve:`${Pe}-${Ze}`,error:ve,errorStatus:Ge}}var V=ve=>{let{help:Pe,helpStatus:Ge,errors:Ze=K,warnings:ct=K,className:Ft,fieldId:Xt,onVisibleChanged:qt}=ve;const{prefixCls:Rt}=Y.useContext(y.Rk),Zt=`${Rt}-item-explain`,mn=(0,le.Z)(Rt),[Jt,je,nt]=ie(Rt,mn),Ct=Y.useMemo(()=>(0,ge.Z)(Rt),[Rt]),mt=l(Ze),xt=l(ct),It=Y.useMemo(()=>Pe!=null?[I(Pe,"help",Ge)]:[].concat((0,ce.Z)(mt.map((nn,cn)=>I(nn,"error","error",cn))),(0,ce.Z)(xt.map((nn,cn)=>I(nn,"warning","warning",cn)))),[Pe,Ge,mt,xt]),Nt=Y.useMemo(()=>{const nn={};return It.forEach(cn=>{let{key:zn}=cn;nn[zn]=(nn[zn]||0)+1}),It.map((cn,zn)=>Object.assign(Object.assign({},cn),{key:nn[cn.key]>1?`${cn.key}-fallback-${zn}`:cn.key}))},[It]),zt={};return Xt&&(zt.id=`${Xt}_help`),Jt(Y.createElement(p.default,{motionDeadline:Ct.motionDeadline,motionName:`${Rt}-show-help`,visible:!!Nt.length,onVisibleChanged:qt},nn=>{const{className:cn,style:zn}=nn;return Y.createElement("div",Object.assign({},zt,{className:$()(Zt,cn,nt,mn,Ft,je),style:zn}),Y.createElement(p.CSSMotionList,Object.assign({keys:Nt},(0,ge.Z)(Rt),{motionName:`${Rt}-show-help-item`,component:!1}),gn=>{const{key:dn,error:wn,errorStatus:En,className:Ln,style:_n}=gn;return Y.createElement("div",{key:dn,className:$()(Ln,{[`${Zt}-${En}`]:En}),style:_n},wn)}))}))},he=b(69180),S=b(48755),C=b(2171),Z=b(31756),ye=b(23069),Ve=b(76846),qe=b(16722);const gt=["parentNode"],yt="form_item";function Dt(ve){return ve===void 0||ve===!1?[]:Array.isArray(ve)?ve:[ve]}function Ut(ve,Pe){if(!ve.length)return;const Ge=ve.join("_");return Pe?`${Pe}_${Ge}`:gt.includes(Ge)?`${yt}_${Ge}`:Ge}function ot(ve,Pe,Ge,Ze,ct,Ft){let Xt=Ze;return Ft!==void 0?Xt=Ft:Ge.validating?Xt="validating":ve.length?Xt="error":Pe.length?Xt="warning":(Ge.touched||ct&&Ge.validated)&&(Xt="success"),Xt}var kt=function(ve,Pe){var Ge={};for(var Ze in ve)Object.prototype.hasOwnProperty.call(ve,Ze)&&Pe.indexOf(Ze)<0&&(Ge[Ze]=ve[Ze]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ze=Object.getOwnPropertySymbols(ve);ct<Ze.length;ct++)Pe.indexOf(Ze[ct])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ze[ct])&&(Ge[Ze[ct]]=ve[Ze[ct]]);return Ge};function tt(ve){return Dt(ve).join("_")}function Gt(ve,Pe){const Ge=Pe.getFieldInstance(ve),Ze=(0,Ve.bn)(Ge);if(Ze)return Ze;const ct=Ut(Dt(ve),Pe.__INTERNAL__.name);if(ct)return document.getElementById(ct)}function Xe(ve){const[Pe]=(0,he.useForm)(),Ge=Y.useRef({}),Ze=Y.useMemo(()=>ve!=null?ve:Object.assign(Object.assign({},Pe),{__INTERNAL__:{itemRef:ct=>Ft=>{const Xt=tt(ct);Ft?Ge.current[Xt]=Ft:delete Ge.current[Xt]}},scrollToField:function(ct){let Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{focus:Xt}=Ft,qt=kt(Ft,["focus"]),Rt=Gt(ct,Ze);Rt&&((0,qe.Z)(Rt,Object.assign({scrollMode:"if-needed",block:"nearest"},qt)),Xt&&Ze.focusField(ct))},focusField:ct=>{var Ft,Xt;const qt=Ze.getFieldInstance(ct);typeof(qt==null?void 0:qt.focus)=="function"?qt.focus():(Xt=(Ft=Gt(ct,Ze))===null||Ft===void 0?void 0:Ft.focus)===null||Xt===void 0||Xt.call(Ft)},getFieldInstance:ct=>{const Ft=tt(ct);return Ge.current[Ft]}}),[ve,Pe]);return[Ze]}var Ke=b(98350),Ae=function(ve,Pe){var Ge={};for(var Ze in ve)Object.prototype.hasOwnProperty.call(ve,Ze)&&Pe.indexOf(Ze)<0&&(Ge[Ze]=ve[Ze]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ze=Object.getOwnPropertySymbols(ve);ct<Ze.length;ct++)Pe.indexOf(Ze[ct])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ze[ct])&&(Ge[Ze[ct]]=ve[Ze[ct]]);return Ge};const xe=(ve,Pe)=>{const Ge=Y.useContext(C.Z),{getPrefixCls:Ze,direction:ct,requiredMark:Ft,colon:Xt,scrollToFirstError:qt,className:Rt,style:Zt}=(0,S.dj)("form"),{prefixCls:mn,className:Jt,rootClassName:je,size:nt,disabled:Ct=Ge,form:mt,colon:xt,labelAlign:It,labelWrap:Nt,labelCol:zt,wrapperCol:nn,hideRequiredMark:cn,layout:zn="horizontal",scrollToFirstError:gn,requiredMark:dn,onFinishFailed:wn,name:En,style:Ln,feedbackIcons:_n,variant:Tn}=ve,kn=Ae(ve,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),Nn=(0,Z.Z)(nt),On=Y.useContext(Ke.Z),In=Y.useMemo(()=>dn!==void 0?dn:cn?!1:Ft!==void 0?Ft:!0,[cn,dn,Ft]),Dn=xt!=null?xt:Xt,yn=Ze("form",mn),fr=(0,le.Z)(yn),[_t,Pn,jn]=ie(yn,fr),xr=$()(yn,`${yn}-${zn}`,{[`${yn}-hide-required-mark`]:In===!1,[`${yn}-rtl`]:ct==="rtl",[`${yn}-${Nn}`]:Nn},jn,fr,Pn,Rt,Jt,je),[pr]=Xe(mt),{__INTERNAL__:Rr}=pr;Rr.name=En;const Er=Y.useMemo(()=>({name:En,labelAlign:It,labelCol:zt,labelWrap:Nt,wrapperCol:nn,vertical:zn==="vertical",colon:Dn,requiredMark:In,itemRef:Rr.itemRef,form:pr,feedbackIcons:_n}),[En,It,zt,nn,zn,Dn,In,pr,_n]),vn=Y.useRef(null);Y.useImperativeHandle(Pe,()=>{var jt;return Object.assign(Object.assign({},pr),{nativeElement:(jt=vn.current)===null||jt===void 0?void 0:jt.nativeElement})});const sn=(jt,un)=>{if(jt){let bn={block:"nearest"};typeof jt=="object"&&(bn=Object.assign(Object.assign({},bn),jt)),pr.scrollToField(un,bn)}},Mt=jt=>{if(wn==null||wn(jt),jt.errorFields.length){const un=jt.errorFields[0].name;if(gn!==void 0){sn(gn,un);return}qt!==void 0&&sn(qt,un)}};return _t(Y.createElement(y.pg.Provider,{value:Tn},Y.createElement(C.n,{disabled:Ct},Y.createElement(ye.Z.Provider,{value:Nn},Y.createElement(y.RV,{validateMessages:On},Y.createElement(y.q3.Provider,{value:Er},Y.createElement(he.default,Object.assign({id:En},kn,{name:En,onFinishFailed:Mt,form:pr,ref:vn,style:Object.assign(Object.assign({},Zt),Ln),className:xr}))))))))};var Ne=Y.forwardRef(xe),Ce=b(41799),Se=b(8654),M=b(22703),fe=b(32383),_e=b(11592);function Re(ve){if(typeof ve=="function")return ve;const Pe=(0,_e.Z)(ve);return Pe.length<=1?Pe[0]:Pe}const $e=()=>{const{status:ve,errors:Pe=[],warnings:Ge=[]}=Y.useContext(y.aM);return{status:ve,errors:Pe,warnings:Ge}};$e.Context=y.aM;var rt=$e,it=b(16089);function te(ve){const[Pe,Ge]=Y.useState(ve),Ze=Y.useRef(null),ct=Y.useRef([]),Ft=Y.useRef(!1);Y.useEffect(()=>(Ft.current=!1,()=>{Ft.current=!0,it.Z.cancel(Ze.current),Ze.current=null}),[]);function Xt(qt){Ft.current||(Ze.current===null&&(ct.current=[],Ze.current=(0,it.Z)(()=>{Ze.current=null,Ge(Rt=>{let Zt=Rt;return ct.current.forEach(mn=>{Zt=mn(Zt)}),Zt})})),ct.current.push(qt))}return[Pe,Xt]}function Q(){const{itemRef:ve}=Y.useContext(y.q3),Pe=Y.useRef({});function Ge(Ze,ct){const Ft=ct&&typeof ct=="object"&&(0,Se.C4)(ct),Xt=Ze.join("_");return(Pe.current.name!==Xt||Pe.current.originRef!==Ft)&&(Pe.current.name=Xt,Pe.current.originRef=Ft,Pe.current.ref=(0,Se.sQ)(ve(Ze),Ft)),Pe.current.ref}return Ge}var lt=b(29194),st=b(34280),ht=b(2738),bt=b(65970),He=b(70425),Et=b(5472);const pt=ve=>{const{formItemCls:Pe}=ve;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${Pe}-control`]:{display:"flex"}}}};var ft=(0,O.bk)(["Form","item-item"],(ve,Pe)=>{let{rootPrefixCls:Ge}=Pe;const Ze=at(ve,Ge);return[pt(Ze)]}),Pt=function(ve,Pe){var Ge={};for(var Ze in ve)Object.prototype.hasOwnProperty.call(ve,Ze)&&Pe.indexOf(Ze)<0&&(Ge[Ze]=ve[Ze]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ze=Object.getOwnPropertySymbols(ve);ct<Ze.length;ct++)Pe.indexOf(Ze[ct])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ze[ct])&&(Ge[Ze[ct]]=ve[Ze[ct]]);return Ge};const x=24;var Ye=ve=>{const{prefixCls:Pe,status:Ge,labelCol:Ze,wrapperCol:ct,children:Ft,errors:Xt,warnings:qt,_internalItemRender:Rt,extra:Zt,help:mn,fieldId:Jt,marginBottom:je,onErrorVisibleChanged:nt,label:Ct}=ve,mt=`${Pe}-item`,xt=Y.useContext(y.q3),It=Y.useMemo(()=>{let kn=Object.assign({},ct||xt.wrapperCol||{});return Ct===null&&!Ze&&!ct&&xt.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(On=>{const In=On?[On]:[],Dn=(0,He.U2)(xt.labelCol,In),yn=typeof Dn=="object"?Dn:{},fr=(0,He.U2)(kn,In),_t=typeof fr=="object"?fr:{};"span"in yn&&!("offset"in _t)&&yn.span<x&&(kn=(0,He.t8)(kn,[].concat(In,["offset"]),yn.span))}),kn},[ct,xt]),Nt=$()(`${mt}-control`,It.className),zt=Y.useMemo(()=>{const{labelCol:kn,wrapperCol:Nn}=xt;return Pt(xt,["labelCol","wrapperCol"])},[xt]),nn=Y.useRef(null),[cn,zn]=Y.useState(0);(0,st.Z)(()=>{Zt&&nn.current?zn(nn.current.clientHeight):zn(0)},[Zt]);const gn=Y.createElement("div",{className:`${mt}-control-input`},Y.createElement("div",{className:`${mt}-control-input-content`},Ft)),dn=Y.useMemo(()=>({prefixCls:Pe,status:Ge}),[Pe,Ge]),wn=je!==null||Xt.length||qt.length?Y.createElement(y.Rk.Provider,{value:dn},Y.createElement(V,{fieldId:Jt,errors:Xt,warnings:qt,help:mn,helpStatus:Ge,className:`${mt}-explain-connected`,onVisibleChanged:nt})):null,En={};Jt&&(En.id=`${Jt}_extra`);const Ln=Zt?Y.createElement("div",Object.assign({},En,{className:`${mt}-extra`,ref:nn}),Zt):null,_n=wn||Ln?Y.createElement("div",{className:`${mt}-additional`,style:je?{minHeight:je+cn}:{}},wn,Ln):null,Tn=Rt&&Rt.mark==="pro_table_render"&&Rt.render?Rt.render(ve,{input:gn,errorList:wn,extra:Ln}):Y.createElement(Y.Fragment,null,gn,_n);return Y.createElement(y.q3.Provider,{value:zt},Y.createElement(Et.Z,Object.assign({},It,{className:Nt}),Tn),Y.createElement(ft,{prefixCls:Pe}))},W=b(61485),pe=b(9017),Bt=b(85981),Oe=b(25399),Ue=function(ve,Pe){var Ge={};for(var Ze in ve)Object.prototype.hasOwnProperty.call(ve,Ze)&&Pe.indexOf(Ze)<0&&(Ge[Ze]=ve[Ze]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ze=Object.getOwnPropertySymbols(ve);ct<Ze.length;ct++)Pe.indexOf(Ze[ct])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ze[ct])&&(Ge[Ze[ct]]=ve[Ze[ct]]);return Ge};function et(ve){return ve?typeof ve=="object"&&!Y.isValidElement(ve)?ve:{title:ve}:null}var ne=ve=>{let{prefixCls:Pe,label:Ge,htmlFor:Ze,labelCol:ct,labelAlign:Ft,colon:Xt,required:qt,requiredMark:Rt,tooltip:Zt,vertical:mn}=ve;var Jt;const[je]=(0,pe.Z)("Form"),{labelAlign:nt,labelCol:Ct,labelWrap:mt,colon:xt}=Y.useContext(y.q3);if(!Ge)return null;const It=ct||Ct||{},Nt=Ft||nt,zt=`${Pe}-item-label`,nn=$()(zt,Nt==="left"&&`${zt}-left`,It.className,{[`${zt}-wrap`]:!!mt});let cn=Ge;const zn=Xt===!0||xt!==!1&&Xt!==!1;zn&&!mn&&typeof Ge=="string"&&Ge.trim()&&(cn=Ge.replace(/[:|:]\s*$/,""));const dn=et(Zt);if(dn){const{icon:kn=Y.createElement(W.Z,null)}=dn,Nn=Ue(dn,["icon"]),On=Y.createElement(Oe.Z,Object.assign({},Nn),Y.cloneElement(kn,{className:`${Pe}-item-tooltip`,title:"",onClick:In=>{In.preventDefault()},tabIndex:null}));cn=Y.createElement(Y.Fragment,null,cn,On)}const wn=Rt==="optional",En=typeof Rt=="function",Ln=Rt===!1;En?cn=Rt(cn,{required:!!qt}):wn&&!qt&&(cn=Y.createElement(Y.Fragment,null,cn,Y.createElement("span",{className:`${Pe}-item-optional`,title:""},(je==null?void 0:je.optional)||((Jt=Bt.Z.Form)===null||Jt===void 0?void 0:Jt.optional))));let _n;Ln?_n="hidden":(wn||En)&&(_n="optional");const Tn=$()({[`${Pe}-item-required`]:qt,[`${Pe}-item-required-mark-${_n}`]:_n,[`${Pe}-item-no-colon`]:!zn});return Y.createElement(Et.Z,Object.assign({},It,{className:nn}),Y.createElement("label",{htmlFor:Ze,className:Tn,title:typeof Ge=="string"?Ge:""},cn))},we=b(29679),Fe=b(19248),G=b(96512),St=b(58617);const Ee={success:we.Z,warning:G.Z,error:Fe.Z,validating:St.Z};function Wt(ve){let{children:Pe,errors:Ge,warnings:Ze,hasFeedback:ct,validateStatus:Ft,prefixCls:Xt,meta:qt,noStyle:Rt}=ve;const Zt=`${Xt}-item`,{feedbackIcons:mn}=Y.useContext(y.q3),Jt=ot(Ge,Ze,qt,null,!!ct,Ft),{isFormItemInput:je,status:nt,hasFeedback:Ct,feedbackIcon:mt}=Y.useContext(y.aM),xt=Y.useMemo(()=>{var It;let Nt;if(ct){const nn=ct!==!0&&ct.icons||mn,cn=Jt&&((It=nn==null?void 0:nn({status:Jt,errors:Ge,warnings:Ze}))===null||It===void 0?void 0:It[Jt]),zn=Jt&&Ee[Jt];Nt=cn!==!1&&zn?Y.createElement("span",{className:$()(`${Zt}-feedback-icon`,`${Zt}-feedback-icon-${Jt}`)},cn||Y.createElement(zn,null)):null}const zt={status:Jt||"",errors:Ge,warnings:Ze,hasFeedback:!!ct,feedbackIcon:Nt,isFormItemInput:!0};return Rt&&(zt.status=(Jt!=null?Jt:nt)||"",zt.isFormItemInput=je,zt.hasFeedback=!!(ct!=null?ct:Ct),zt.feedbackIcon=ct!==void 0?zt.feedbackIcon:mt),zt},[Jt,ct,Rt,je,nt]);return Y.createElement(y.aM.Provider,{value:xt},Pe)}var en=function(ve,Pe){var Ge={};for(var Ze in ve)Object.prototype.hasOwnProperty.call(ve,Ze)&&Pe.indexOf(Ze)<0&&(Ge[Ze]=ve[Ze]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ze=Object.getOwnPropertySymbols(ve);ct<Ze.length;ct++)Pe.indexOf(Ze[ct])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ze[ct])&&(Ge[Ze[ct]]=ve[Ze[ct]]);return Ge};function an(ve){const{prefixCls:Pe,className:Ge,rootClassName:Ze,style:ct,help:Ft,errors:Xt,warnings:qt,validateStatus:Rt,meta:Zt,hasFeedback:mn,hidden:Jt,children:je,fieldId:nt,required:Ct,isRequired:mt,onSubItemMetaChange:xt,layout:It}=ve,Nt=en(ve,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),zt=`${Pe}-item`,{requiredMark:nn,vertical:cn}=Y.useContext(y.q3),zn=cn||It==="vertical",gn=Y.useRef(null),dn=l(Xt),wn=l(qt),En=Ft!=null,Ln=!!(En||Xt.length||qt.length),_n=!!gn.current&&(0,lt.Z)(gn.current),[Tn,kn]=Y.useState(null);(0,st.Z)(()=>{if(Ln&&gn.current){const yn=getComputedStyle(gn.current);kn(parseInt(yn.marginBottom,10))}},[Ln,_n]);const Nn=yn=>{yn||kn(null)},In=function(){let yn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const fr=yn?dn:Zt.errors,_t=yn?wn:Zt.warnings;return ot(fr,_t,Zt,"",!!mn,Rt)}(),Dn=$()(zt,Ge,Ze,{[`${zt}-with-help`]:En||dn.length||wn.length,[`${zt}-has-feedback`]:In&&mn,[`${zt}-has-success`]:In==="success",[`${zt}-has-warning`]:In==="warning",[`${zt}-has-error`]:In==="error",[`${zt}-is-validating`]:In==="validating",[`${zt}-hidden`]:Jt,[`${zt}-${It}`]:It});return Y.createElement("div",{className:Dn,style:ct,ref:gn},Y.createElement(bt.Z,Object.assign({className:`${zt}-row`},(0,ht.Z)(Nt,["_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"])),Y.createElement(ne,Object.assign({htmlFor:nt},ve,{requiredMark:nn,required:Ct!=null?Ct:mt,prefixCls:Pe,vertical:zn})),Y.createElement(Ye,Object.assign({},ve,Zt,{errors:dn,warnings:wn,prefixCls:Pe,status:In,help:Ft,marginBottom:Tn,onErrorVisibleChanged:Nn}),Y.createElement(y.qI.Provider,{value:xt},Y.createElement(Wt,{prefixCls:Pe,meta:Zt,errors:Zt.errors,warnings:Zt.warnings,hasFeedback:mn,validateStatus:In},je)))),!!Tn&&Y.createElement("div",{className:`${zt}-margin-offset`,style:{marginBottom:-Tn}}))}const Zn="__SPLIT__",Rn=null;function Cn(ve,Pe){const Ge=Object.keys(ve),Ze=Object.keys(Pe);return Ge.length===Ze.length&&Ge.every(ct=>{const Ft=ve[ct],Xt=Pe[ct];return Ft===Xt||typeof Ft=="function"||typeof Xt=="function"})}const sr=Y.memo(ve=>{let{children:Pe}=ve;return Pe},(ve,Pe)=>Cn(ve.control,Pe.control)&&ve.update===Pe.update&&ve.childProps.length===Pe.childProps.length&&ve.childProps.every((Ge,Ze)=>Ge===Pe.childProps[Ze]));function dr(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function $n(ve){const{name:Pe,noStyle:Ge,className:Ze,dependencies:ct,prefixCls:Ft,shouldUpdate:Xt,rules:qt,children:Rt,required:Zt,label:mn,messageVariables:Jt,trigger:je="onChange",validateTrigger:nt,hidden:Ct,help:mt,layout:xt}=ve,{getPrefixCls:It}=Y.useContext(S.E_),{name:Nt}=Y.useContext(y.q3),zt=Re(Rt),nn=typeof zt=="function",cn=Y.useContext(y.qI),{validateTrigger:zn}=Y.useContext(he.FieldContext),gn=nt!==void 0?nt:zn,dn=Pe!=null,wn=It("form",Ft),En=(0,le.Z)(wn),[Ln,_n,Tn]=ie(wn,En),kn=(0,fe.ln)("Form.Item"),Nn=Y.useContext(he.ListContext),On=Y.useRef(null),[In,Dn]=te({}),[yn,fr]=(0,Ce.Z)(()=>dr()),_t=vn=>{const sn=Nn==null?void 0:Nn.getKey(vn.name);if(fr(vn.destroy?dr():vn,!0),Ge&&mt!==!1&&cn){let Mt=vn.name;if(vn.destroy)Mt=On.current||Mt;else if(sn!==void 0){const[jt,un]=sn;Mt=[jt].concat((0,ce.Z)(un)),On.current=Mt}cn(vn,Mt)}},Pn=(vn,sn)=>{Dn(Mt=>{const jt=Object.assign({},Mt),bn=[].concat((0,ce.Z)(vn.name.slice(0,-1)),(0,ce.Z)(sn)).join(Zn);return vn.destroy?delete jt[bn]:jt[bn]=vn,jt})},[jn,xr]=Y.useMemo(()=>{const vn=(0,ce.Z)(yn.errors),sn=(0,ce.Z)(yn.warnings);return Object.values(In).forEach(Mt=>{vn.push.apply(vn,(0,ce.Z)(Mt.errors||[])),sn.push.apply(sn,(0,ce.Z)(Mt.warnings||[]))}),[vn,sn]},[In,yn.errors,yn.warnings]),pr=Q();function Rr(vn,sn,Mt){return Ge&&!Ct?Y.createElement(Wt,{prefixCls:wn,hasFeedback:ve.hasFeedback,validateStatus:ve.validateStatus,meta:yn,errors:jn,warnings:xr,noStyle:!0},vn):Y.createElement(an,Object.assign({key:"row"},ve,{className:$()(Ze,Tn,En,_n),prefixCls:wn,fieldId:sn,isRequired:Mt,errors:jn,warnings:xr,meta:yn,onSubItemMetaChange:Pn,layout:xt}),vn)}if(!dn&&!nn&&!ct)return Ln(Rr(zt));let Er={};return typeof mn=="string"?Er.label=mn:Pe&&(Er.label=String(Pe)),Jt&&(Er=Object.assign(Object.assign({},Er),Jt)),Ln(Y.createElement(he.Field,Object.assign({},ve,{messageVariables:Er,trigger:je,validateTrigger:gn,onMetaChange:_t}),(vn,sn,Mt)=>{const jt=Dt(Pe).length&&sn?sn.name:[],un=Ut(jt,Nt),bn=Zt!==void 0?Zt:!!(qt!=null&&qt.some(tn=>{if(tn&&typeof tn=="object"&&tn.required&&!tn.warningOnly)return!0;if(typeof tn=="function"){const Hn=tn(Mt);return(Hn==null?void 0:Hn.required)&&!(Hn!=null&&Hn.warningOnly)}return!1})),Mn=Object.assign({},vn);let Jn=null;if(Array.isArray(zt)&&dn)Jn=zt;else if(!(nn&&(!(Xt||ct)||dn))){if(!(ct&&!nn&&!dn))if(Y.isValidElement(zt)){const tn=Object.assign(Object.assign({},zt.props),Mn);if(tn.id||(tn.id=un),mt||jn.length>0||xr.length>0||ve.extra){const Tr=[];(mt||jn.length>0)&&Tr.push(`${un}_help`),ve.extra&&Tr.push(`${un}_extra`),tn["aria-describedby"]=Tr.join(" ")}jn.length>0&&(tn["aria-invalid"]="true"),bn&&(tn["aria-required"]="true"),(0,Se.Yr)(zt)&&(tn.ref=pr(jt,zt)),new Set([].concat((0,ce.Z)(Dt(je)),(0,ce.Z)(Dt(gn)))).forEach(Tr=>{tn[Tr]=function(){for(var $r,Wr,br,Kr,Cr,Hr=arguments.length,Ir=new Array(Hr),Pr=0;Pr<Hr;Pr++)Ir[Pr]=arguments[Pr];(br=Mn[Tr])===null||br===void 0||($r=br).call.apply($r,[Mn].concat(Ir)),(Cr=(Kr=zt.props)[Tr])===null||Cr===void 0||(Wr=Cr).call.apply(Wr,[Kr].concat(Ir))}});const er=[tn["aria-required"],tn["aria-invalid"],tn["aria-describedby"]];Jn=Y.createElement(sr,{control:Mn,update:zt,childProps:er},(0,M.Tm)(zt,tn))}else nn&&(Xt||ct)&&!dn?Jn=zt(Mt):Jn=zt}return Rr(Jn,un,bn)}))}const qn=$n;qn.useStatus=rt;var ln=qn,$t=function(ve,Pe){var Ge={};for(var Ze in ve)Object.prototype.hasOwnProperty.call(ve,Ze)&&Pe.indexOf(Ze)<0&&(Ge[Ze]=ve[Ze]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,Ze=Object.getOwnPropertySymbols(ve);ct<Ze.length;ct++)Pe.indexOf(Ze[ct])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ze[ct])&&(Ge[Ze[ct]]=ve[Ze[ct]]);return Ge},An=ve=>{var{prefixCls:Pe,children:Ge}=ve,Ze=$t(ve,["prefixCls","children"]);const{getPrefixCls:ct}=Y.useContext(S.E_),Ft=ct("form",Pe),Xt=Y.useMemo(()=>({prefixCls:Ft,status:"error"}),[Ft]);return Y.createElement(he.List,Object.assign({},Ze),(qt,Rt,Zt)=>Y.createElement(y.Rk.Provider,{value:Xt},Ge(qt.map(mn=>Object.assign(Object.assign({},mn),{fieldKey:mn.key})),Rt,{errors:Zt.errors,warnings:Zt.warnings})))};function Xn(){const{form:ve}=Y.useContext(y.q3);return ve}const Qe=Ne;Qe.Item=ln,Qe.List=An,Qe.ErrorList=V,Qe.useForm=Xe,Qe.useFormInstance=Xn,Qe.useWatch=he.useWatch,Qe.Provider=y.RV,Qe.create=()=>{};var Je=Qe},49397:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return P}});var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(36901),$=b(8654),p=b(62487),ge=b(86013),le=b(82855),l=b(48755),A=b(2171),F=b(83397),_=b(31756),E=b(56553),w=b(24971),O=b(70045),X=b(23826),J=b(53075);function U(N){return!!(N.prefix||N.suffix||N.allowClear||N.showCount)}var R=function(N,re){var ue={};for(var me in N)Object.prototype.hasOwnProperty.call(N,me)&&re.indexOf(me)<0&&(ue[me]=N[me]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Te=0,me=Object.getOwnPropertySymbols(N);Te<me.length;Te++)re.indexOf(me[Te])<0&&Object.prototype.propertyIsEnumerable.call(N,me[Te])&&(ue[me[Te]]=N[me[Te]]);return ue},P=(0,y.forwardRef)((N,re)=>{const{prefixCls:ue,bordered:me=!0,status:Te,size:Be,disabled:Le,onBlur:at,onFocus:ie,suffix:K,allowClear:I,addonAfter:ee,addonBefore:V,className:he,style:S,styles:C,rootClassName:Z,onChange:ye,classNames:Ve,variant:qe}=N,gt=R(N,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:yt,direction:Dt,allowClear:Ut,autoComplete:ot,className:kt,style:tt,classNames:Gt,styles:Xe}=(0,l.dj)("input"),Ke=yt("input",ue),Ae=(0,y.useRef)(null),xe=(0,F.Z)(Ke),[se,Ne,Ce]=(0,J.TI)(Ke,Z),[Se]=(0,J.ZP)(Ke,xe),{compactSize:M,compactItemClassnames:fe}=(0,O.ri)(Ke,Dt),_e=(0,_.Z)(D=>{var Ye;return(Ye=Be!=null?Be:M)!==null&&Ye!==void 0?Ye:D}),Re=y.useContext(A.Z),$e=Le!=null?Le:Re,{status:rt,hasFeedback:it,feedbackIcon:te}=(0,y.useContext)(E.aM),Q=(0,le.F)(rt,Te),lt=U(N)||!!it,st=(0,y.useRef)(lt),ht=(0,X.Z)(Ae,!0),bt=D=>{ht(),at==null||at(D)},He=D=>{ht(),ie==null||ie(D)},Et=D=>{ht(),ye==null||ye(D)},pt=(it||K)&&y.createElement(y.Fragment,null,K,it&&te),ft=(0,ge.Z)(I!=null?I:Ut),[Pt,x]=(0,w.Z)("input",qe,me);return se(Se(y.createElement(de.default,Object.assign({ref:(0,$.sQ)(re,Ae),prefixCls:Ke,autoComplete:ot},gt,{disabled:$e,onBlur:bt,onFocus:He,style:Object.assign(Object.assign({},tt),S),styles:Object.assign(Object.assign({},Xe),C),suffix:pt,allowClear:ft,className:Y()(he,Z,Ce,xe,fe,kt),onChange:Et,addonBefore:V&&y.createElement(p.Z,{form:!0,space:!0},V),addonAfter:ee&&y.createElement(p.Z,{form:!0,space:!0},ee),classNames:Object.assign(Object.assign(Object.assign({},Ve),Gt),{input:Y()({[`${Ke}-sm`]:_e==="small",[`${Ke}-lg`]:_e==="large",[`${Ke}-rtl`]:Dt==="rtl"},Ve==null?void 0:Ve.input,Gt.input,Ne),variant:Y()({[`${Ke}-${Pt}`]:x},(0,le.Z)(Ke,Q)),affixWrapper:Y()({[`${Ke}-affix-wrapper-sm`]:_e==="small",[`${Ke}-affix-wrapper-lg`]:_e==="large",[`${Ke}-affix-wrapper-rtl`]:Dt==="rtl"},Ne),wrapper:Y()({[`${Ke}-group-rtl`]:Dt==="rtl"},Ne),groupWrapper:Y()({[`${Ke}-group-wrapper-sm`]:_e==="small",[`${Ke}-group-wrapper-lg`]:_e==="large",[`${Ke}-group-wrapper-rtl`]:Dt==="rtl",[`${Ke}-group-wrapper-${Pt}`]:x},(0,le.Z)(`${Ke}-group-wrapper`,Q,it),Ne)})}))))})},79809:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return re}});var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(22711),$=b(86013),p=b(82855),ge=b(48755),le=b(2171),l=b(83397),A=b(31756),F=b(56553),_=b(24971),E=b(70045),w=b(30292),O=b(53075),X=b(16931),J=b(51636),U=b(64910);const R=ue=>{const{componentCls:me,paddingLG:Te}=ue,Be=`${me}-textarea`;return{[`textarea${me}`]:{maxWidth:"100%",height:"auto",minHeight:ue.controlHeight,lineHeight:ue.lineHeight,verticalAlign:"bottom",transition:`all ${ue.motionDurationSlow}`,resize:"vertical",[`&${me}-mouse-active`]:{transition:`all ${ue.motionDurationSlow}, height 0s, width 0s`}},[`${me}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[Be]:{position:"relative","&-show-count":{[`> ${me}`]:{height:"100%"},[`${me}-data-count`]:{position:"absolute",bottom:ue.calc(ue.fontSize).mul(ue.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:ue.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
|
&-allow-clear > ${me},
|
|
|
&-affix-wrapper${Be}-has-feedback ${me}
|
|
|
`]:{paddingInlineEnd:Te},[`&-affix-wrapper${me}-affix-wrapper`]:{padding:0,[`> textarea${me}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:ue.calc(ue.controlHeight).sub(ue.calc(ue.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${me}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${me}-clear-icon`]:{position:"absolute",insetInlineEnd:ue.paddingInline,insetBlockStart:ue.paddingXS},[`${Be}-suffix`]:{position:"absolute",top:0,insetInlineEnd:ue.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${me}-affix-wrapper-sm`]:{[`${me}-suffix`]:{[`${me}-clear-icon`]:{insetInlineEnd:ue.paddingInlineSM}}}}}};var z=(0,X.I$)(["Input","TextArea"],ue=>{const me=(0,J.mergeToken)(ue,(0,U.e)(ue));return[R(me)]},U.T,{resetFont:!1}),P=function(ue,me){var Te={};for(var Be in ue)Object.prototype.hasOwnProperty.call(ue,Be)&&me.indexOf(Be)<0&&(Te[Be]=ue[Be]);if(ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Le=0,Be=Object.getOwnPropertySymbols(ue);Le<Be.length;Le++)me.indexOf(Be[Le])<0&&Object.prototype.propertyIsEnumerable.call(ue,Be[Le])&&(Te[Be[Le]]=ue[Be[Le]]);return Te},re=(0,y.forwardRef)((ue,me)=>{var Te;const{prefixCls:Be,bordered:Le=!0,size:at,disabled:ie,status:K,allowClear:I,classNames:ee,rootClassName:V,className:he,style:S,styles:C,variant:Z,showCount:ye,onMouseDown:Ve,onResize:qe}=ue,gt=P(ue,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:yt,direction:Dt,allowClear:Ut,autoComplete:ot,className:kt,style:tt,classNames:Gt,styles:Xe}=(0,ge.dj)("textArea"),Ke=y.useContext(le.Z),Ae=ie!=null?ie:Ke,{status:xe,hasFeedback:se,feedbackIcon:Ne}=y.useContext(F.aM),Ce=(0,p.F)(xe,K),Se=y.useRef(null);y.useImperativeHandle(me,()=>{var x;return{resizableTextArea:(x=Se.current)===null||x===void 0?void 0:x.resizableTextArea,focus:D=>{var Ye,W;(0,w.nH)((W=(Ye=Se.current)===null||Ye===void 0?void 0:Ye.resizableTextArea)===null||W===void 0?void 0:W.textArea,D)},blur:()=>{var D;return(D=Se.current)===null||D===void 0?void 0:D.blur()}}});const M=yt("input",Be),fe=(0,l.Z)(M),[_e,Re,$e]=(0,O.TI)(M,V),[rt]=z(M,fe),{compactSize:it,compactItemClassnames:te}=(0,E.ri)(M,Dt),Q=(0,A.Z)(x=>{var D;return(D=at!=null?at:it)!==null&&D!==void 0?D:x}),[lt,st]=(0,_.Z)("textArea",Z,Le),ht=(0,$.Z)(I!=null?I:Ut),[bt,He]=y.useState(!1),[Et,pt]=y.useState(!1),ft=x=>{He(!0),Ve==null||Ve(x);const D=()=>{He(!1),document.removeEventListener("mouseup",D)};document.addEventListener("mouseup",D)},Pt=x=>{var D,Ye;if(qe==null||qe(x),bt&&typeof getComputedStyle=="function"){const W=(Ye=(D=Se.current)===null||D===void 0?void 0:D.nativeElement)===null||Ye===void 0?void 0:Ye.querySelector("textarea");W&&getComputedStyle(W).resize==="both"&&pt(!0)}};return _e(rt(y.createElement(de.default,Object.assign({autoComplete:ot},gt,{style:Object.assign(Object.assign({},tt),S),styles:Object.assign(Object.assign({},Xe),C),disabled:Ae,allowClear:ht,className:Y()($e,fe,he,V,te,kt,Et&&`${M}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},ee),Gt),{textarea:Y()({[`${M}-sm`]:Q==="small",[`${M}-lg`]:Q==="large"},Re,ee==null?void 0:ee.textarea,Gt.textarea,bt&&`${M}-mouse-active`),variant:Y()({[`${M}-${lt}`]:st},(0,p.Z)(M,Ce)),affixWrapper:Y()(`${M}-textarea-affix-wrapper`,{[`${M}-affix-wrapper-rtl`]:Dt==="rtl",[`${M}-affix-wrapper-sm`]:Q==="small",[`${M}-affix-wrapper-lg`]:Q==="large",[`${M}-textarea-show-count`]:ye||((Te=ue.count)===null||Te===void 0?void 0:Te.show)},Re)}),prefixCls:M,suffix:se&&y.createElement("span",{className:`${M}-textarea-suffix`},Ne),showCount:ye,ref:Se,onResize:Pt,onMouseDown:ft}))))})},23826:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return ce}});var y=b(59301);function ce(Y,de){const $=(0,y.useRef)([]),p=()=>{$.current.push(setTimeout(()=>{var ge,le,l,A;!((ge=Y.current)===null||ge===void 0)&&ge.input&&((le=Y.current)===null||le===void 0?void 0:le.input.getAttribute("type"))==="password"&&(!((l=Y.current)===null||l===void 0)&&l.input.hasAttribute("value"))&&((A=Y.current)===null||A===void 0||A.input.removeAttribute("value"))}))};return(0,y.useEffect)(()=>(de&&p(),()=>$.current.forEach(ge=>{ge&&clearTimeout(ge)})),[]),p}},37568:function(fn,ut,b){"use strict";b.d(ut,{default:function(){return Gt}});var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(48755),$=b(56553),p=b(53075),le=Xe=>{const{getPrefixCls:Ke,direction:Ae}=(0,y.useContext)(de.E_),{prefixCls:xe,className:se}=Xe,Ne=Ke("input-group",xe),Ce=Ke("input"),[Se,M,fe]=(0,p.ZP)(Ce),_e=Y()(Ne,fe,{[`${Ne}-lg`]:Xe.size==="large",[`${Ne}-sm`]:Xe.size==="small",[`${Ne}-compact`]:Xe.compact,[`${Ne}-rtl`]:Ae==="rtl"},M,se),Re=(0,y.useContext)($.aM),$e=(0,y.useMemo)(()=>Object.assign(Object.assign({},Re),{isFormItemInput:!1}),[Re]);return Se(y.createElement("span",{className:_e,style:Xe.style,onMouseEnter:Xe.onMouseEnter,onMouseLeave:Xe.onMouseLeave,onFocus:Xe.onFocus,onBlur:Xe.onBlur},y.createElement($.aM.Provider,{value:$e},Xe.children)))},l=b(49397),A=b(77654),F=b(6089),_=b(26112),E=b(82855),w=b(31756),O=b(16931),X=b(51636),J=b(64910);const U=Xe=>{const{componentCls:Ke,paddingXS:Ae}=Xe;return{[Ke]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:Ae,"&-rtl":{direction:"rtl"},[`${Ke}-input`]:{textAlign:"center",paddingInline:Xe.paddingXXS},[`&${Ke}-sm ${Ke}-input`]:{paddingInline:Xe.calc(Xe.paddingXXS).div(2).equal()},[`&${Ke}-lg ${Ke}-input`]:{paddingInline:Xe.paddingXS}}}};var R=(0,O.I$)(["Input","OTP"],Xe=>{const Ke=(0,X.mergeToken)(Xe,(0,J.e)(Xe));return[U(Ke)]},J.T),z=b(16089),P=function(Xe,Ke){var Ae={};for(var xe in Xe)Object.prototype.hasOwnProperty.call(Xe,xe)&&Ke.indexOf(xe)<0&&(Ae[xe]=Xe[xe]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,xe=Object.getOwnPropertySymbols(Xe);se<xe.length;se++)Ke.indexOf(xe[se])<0&&Object.prototype.propertyIsEnumerable.call(Xe,xe[se])&&(Ae[xe[se]]=Xe[xe[se]]);return Ae},re=y.forwardRef((Xe,Ke)=>{const{value:Ae,onChange:xe,onActiveChange:se,index:Ne,mask:Ce}=Xe,Se=P(Xe,["value","onChange","onActiveChange","index","mask"]),M=Ae&&typeof Ce=="string"?Ce:Ae,fe=it=>{xe(Ne,it.target.value)},_e=y.useRef(null);y.useImperativeHandle(Ke,()=>_e.current);const Re=()=>{(0,z.Z)(()=>{var it;const te=(it=_e.current)===null||it===void 0?void 0:it.input;document.activeElement===te&&te&&te.select()})},$e=it=>{const{key:te,ctrlKey:Q,metaKey:lt}=it;te==="ArrowLeft"?se(Ne-1):te==="ArrowRight"?se(Ne+1):te==="z"&&(Q||lt)&&it.preventDefault(),Re()},rt=it=>{it.key==="Backspace"&&!Ae&&se(Ne-1),Re()};return y.createElement(l.Z,Object.assign({type:Ce===!0?"password":"text"},Se,{ref:_e,value:M,onInput:fe,onFocus:Re,onKeyDown:$e,onKeyUp:rt,onMouseDown:Re,onMouseUp:Re}))}),ue=function(Xe,Ke){var Ae={};for(var xe in Xe)Object.prototype.hasOwnProperty.call(Xe,xe)&&Ke.indexOf(xe)<0&&(Ae[xe]=Xe[xe]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,xe=Object.getOwnPropertySymbols(Xe);se<xe.length;se++)Ke.indexOf(xe[se])<0&&Object.prototype.propertyIsEnumerable.call(Xe,xe[se])&&(Ae[xe[se]]=Xe[xe[se]]);return Ae};function me(Xe){return(Xe||"").split("")}const Te=Xe=>{const{index:Ke,prefixCls:Ae,separator:xe}=Xe,se=typeof xe=="function"?xe(Ke):xe;return se?y.createElement("span",{className:`${Ae}-separator`},se):null};var Le=y.forwardRef((Xe,Ke)=>{const{prefixCls:Ae,length:xe=6,size:se,defaultValue:Ne,value:Ce,onChange:Se,formatter:M,separator:fe,variant:_e,disabled:Re,status:$e,autoFocus:rt,mask:it,type:te,onInput:Q,inputMode:lt}=Xe,st=ue(Xe,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:ht,direction:bt}=y.useContext(de.E_),He=ht("otp",Ae),Et=(0,_.Z)(st,{aria:!0,data:!0,attr:!0}),[pt,ft,Pt]=R(He),x=(0,w.Z)(St=>se!=null?se:St),D=y.useContext($.aM),Ye=(0,E.F)(D.status,$e),W=y.useMemo(()=>Object.assign(Object.assign({},D),{status:Ye,hasFeedback:!1,feedbackIcon:null}),[D,Ye]),pe=y.useRef(null),Bt=y.useRef({});y.useImperativeHandle(Ke,()=>({focus:()=>{var St;(St=Bt.current[0])===null||St===void 0||St.focus()},blur:()=>{var St;for(let Ee=0;Ee<xe;Ee+=1)(St=Bt.current[Ee])===null||St===void 0||St.blur()},nativeElement:pe.current}));const Oe=St=>M?M(St):St,[Ue,et]=y.useState(()=>me(Oe(Ne||"")));y.useEffect(()=>{Ce!==void 0&&et(me(Ce))},[Ce]);const q=(0,F.Z)(St=>{et(St),Q&&Q(St),Se&&St.length===xe&&St.every(Ee=>Ee)&&St.some((Ee,Wt)=>Ue[Wt]!==Ee)&&Se(St.join(""))}),ne=(0,F.Z)((St,Ee)=>{let Wt=(0,A.Z)(Ue);for(let an=0;an<St;an+=1)Wt[an]||(Wt[an]="");Ee.length<=1?Wt[St]=Ee:Wt=Wt.slice(0,St).concat(me(Ee)),Wt=Wt.slice(0,xe);for(let an=Wt.length-1;an>=0&&!Wt[an];an-=1)Wt.pop();const en=Oe(Wt.map(an=>an||" ").join(""));return Wt=me(en).map((an,Zn)=>an===" "&&!Wt[Zn]?Wt[Zn]:an),Wt}),we=(St,Ee)=>{var Wt;const en=ne(St,Ee),an=Math.min(St+Ee.length,xe-1);an!==St&&en[St]!==void 0&&((Wt=Bt.current[an])===null||Wt===void 0||Wt.focus()),q(en)},Fe=St=>{var Ee;(Ee=Bt.current[St])===null||Ee===void 0||Ee.focus()},G={variant:_e,disabled:Re,status:Ye,mask:it,type:te,inputMode:lt};return pt(y.createElement("div",Object.assign({},Et,{ref:pe,className:Y()(He,{[`${He}-sm`]:x==="small",[`${He}-lg`]:x==="large",[`${He}-rtl`]:bt==="rtl"},Pt,ft)}),y.createElement($.aM.Provider,{value:W},Array.from({length:xe}).map((St,Ee)=>{const Wt=`otp-${Ee}`,en=Ue[Ee]||"";return y.createElement(y.Fragment,{key:Wt},y.createElement(re,Object.assign({ref:an=>{Bt.current[Ee]=an},index:Ee,size:x,htmlSize:1,className:`${He}-input`,onChange:we,value:en,onActiveChange:Fe,autoFocus:Ee===0&&rt},G)),Ee<xe-1&&y.createElement(Te,{separator:fe,index:Ee,prefixCls:He}))}))))}),at=b(73331),ie=b(15277),K=b(2738),I=b(8654),ee=b(2171),V=b(23826),he=function(Xe,Ke){var Ae={};for(var xe in Xe)Object.prototype.hasOwnProperty.call(Xe,xe)&&Ke.indexOf(xe)<0&&(Ae[xe]=Xe[xe]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,xe=Object.getOwnPropertySymbols(Xe);se<xe.length;se++)Ke.indexOf(xe[se])<0&&Object.prototype.propertyIsEnumerable.call(Xe,xe[se])&&(Ae[xe[se]]=Xe[xe[se]]);return Ae};const S=Xe=>Xe?y.createElement(ie.Z,null):y.createElement(at.Z,null),C={click:"onClick",hover:"onMouseOver"};var ye=y.forwardRef((Xe,Ke)=>{const{disabled:Ae,action:xe="click",visibilityToggle:se=!0,iconRender:Ne=S}=Xe,Ce=y.useContext(ee.Z),Se=Ae!=null?Ae:Ce,M=typeof se=="object"&&se.visible!==void 0,[fe,_e]=(0,y.useState)(()=>M?se.visible:!1),Re=(0,y.useRef)(null);y.useEffect(()=>{M&&_e(se.visible)},[M,se]);const $e=(0,V.Z)(Re),rt=()=>{var x;if(Se)return;fe&&$e();const D=!fe;_e(D),typeof se=="object"&&((x=se.onVisibleChange)===null||x===void 0||x.call(se,D))},it=x=>{const D=C[xe]||"",Ye=Ne(fe),W={[D]:rt,className:`${x}-icon`,key:"passwordIcon",onMouseDown:pe=>{pe.preventDefault()},onMouseUp:pe=>{pe.preventDefault()}};return y.cloneElement(y.isValidElement(Ye)?Ye:y.createElement("span",null,Ye),W)},{className:te,prefixCls:Q,inputPrefixCls:lt,size:st}=Xe,ht=he(Xe,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:bt}=y.useContext(de.E_),He=bt("input",lt),Et=bt("input-password",Q),pt=se&&it(Et),ft=Y()(Et,te,{[`${Et}-${st}`]:!!st}),Pt=Object.assign(Object.assign({},(0,K.Z)(ht,["suffix","iconRender","visibilityToggle"])),{type:fe?"text":"password",className:ft,prefixCls:He,suffix:pt});return st&&(Pt.size=st),y.createElement(l.Z,Object.assign({ref:(0,I.sQ)(Ke,Re)},Pt))}),Ve=b(47472),qe=b(22703),gt=b(7939),yt=b(70045),Dt=function(Xe,Ke){var Ae={};for(var xe in Xe)Object.prototype.hasOwnProperty.call(Xe,xe)&&Ke.indexOf(xe)<0&&(Ae[xe]=Xe[xe]);if(Xe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,xe=Object.getOwnPropertySymbols(Xe);se<xe.length;se++)Ke.indexOf(xe[se])<0&&Object.prototype.propertyIsEnumerable.call(Xe,xe[se])&&(Ae[xe[se]]=Xe[xe[se]]);return Ae},ot=y.forwardRef((Xe,Ke)=>{const{prefixCls:Ae,inputPrefixCls:xe,className:se,size:Ne,suffix:Ce,enterButton:Se=!1,addonAfter:M,loading:fe,disabled:_e,onSearch:Re,onChange:$e,onCompositionStart:rt,onCompositionEnd:it}=Xe,te=Dt(Xe,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Q,direction:lt}=y.useContext(de.E_),st=y.useRef(!1),ht=Q("input-search",Ae),bt=Q("input",xe),{compactSize:He}=(0,yt.ri)(ht,lt),Et=(0,w.Z)(we=>{var Fe;return(Fe=Ne!=null?Ne:He)!==null&&Fe!==void 0?Fe:we}),pt=y.useRef(null),ft=we=>{we!=null&&we.target&&we.type==="click"&&Re&&Re(we.target.value,we,{source:"clear"}),$e==null||$e(we)},Pt=we=>{var Fe;document.activeElement===((Fe=pt.current)===null||Fe===void 0?void 0:Fe.input)&&we.preventDefault()},x=we=>{var Fe,G;Re&&Re((G=(Fe=pt.current)===null||Fe===void 0?void 0:Fe.input)===null||G===void 0?void 0:G.value,we,{source:"input"})},D=we=>{st.current||fe||x(we)},Ye=typeof Se=="boolean"?y.createElement(Ve.Z,null):null,W=`${ht}-button`;let pe;const Bt=Se||{},Oe=Bt.type&&Bt.type.__ANT_BUTTON===!0;Oe||Bt.type==="button"?pe=(0,qe.Tm)(Bt,Object.assign({onMouseDown:Pt,onClick:we=>{var Fe,G;(G=(Fe=Bt==null?void 0:Bt.props)===null||Fe===void 0?void 0:Fe.onClick)===null||G===void 0||G.call(Fe,we),x(we)},key:"enterButton"},Oe?{className:W,size:Et}:{})):pe=y.createElement(gt.ZP,{className:W,type:Se?"primary":void 0,size:Et,disabled:_e,key:"enterButton",onMouseDown:Pt,onClick:x,loading:fe,icon:Ye},Se),M&&(pe=[pe,(0,qe.Tm)(M,{key:"addonAfter"})]);const Ue=Y()(ht,{[`${ht}-rtl`]:lt==="rtl",[`${ht}-${Et}`]:!!Et,[`${ht}-with-button`]:!!Se},se),et=Object.assign(Object.assign({},te),{className:Ue,prefixCls:bt,type:"search"}),q=we=>{st.current=!0,rt==null||rt(we)},ne=we=>{st.current=!1,it==null||it(we)};return y.createElement(l.Z,Object.assign({ref:(0,I.sQ)(pt,Ke),onPressEnter:D},et,{size:Et,onCompositionStart:q,onCompositionEnd:ne,addonAfter:pe,suffix:Ce,onChange:ft,disabled:_e}))}),kt=b(79809);const tt=l.Z;tt.Group=le,tt.Search=ot,tt.TextArea=kt.Z,tt.Password=ye,tt.OTP=Le;var Gt=tt},53075:function(fn,ut,b){"use strict";b.d(ut,{TI:function(){return z},ik:function(){return _},nz:function(){return le},s7:function(){return E},x0:function(){return F}});var y=b(36237),ce=b(63356),Y=b(56119),de=b(16931),$=b(51636),p=b(64910),ge=b(39082);const le=P=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:P,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),l=P=>({borderColor:P.activeBorderColor,boxShadow:P.activeShadow,outline:0,backgroundColor:P.activeBg}),A=P=>{const{paddingBlockLG:N,lineHeightLG:re,borderRadiusLG:ue,paddingInlineLG:me}=P;return{padding:`${(0,y.unit)(N)} ${(0,y.unit)(me)}`,fontSize:P.inputFontSizeLG,lineHeight:re,borderRadius:ue}},F=P=>({padding:`${(0,y.unit)(P.paddingBlockSM)} ${(0,y.unit)(P.paddingInlineSM)}`,fontSize:P.inputFontSizeSM,borderRadius:P.borderRadiusSM}),_=P=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,y.unit)(P.paddingBlock)} ${(0,y.unit)(P.paddingInline)}`,color:P.colorText,fontSize:P.inputFontSize,lineHeight:P.lineHeight,borderRadius:P.borderRadius,transition:`all ${P.motionDurationMid}`},le(P.colorTextPlaceholder)),{"&-lg":Object.assign({},A(P)),"&-sm":Object.assign({},F(P)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),E=P=>{const{componentCls:N,antCls:re}=P;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:P.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${N}, &-lg > ${N}-group-addon`]:Object.assign({},A(P)),[`&-sm ${N}, &-sm > ${N}-group-addon`]:Object.assign({},F(P)),[`&-lg ${re}-select-single ${re}-select-selector`]:{height:P.controlHeightLG},[`&-sm ${re}-select-single ${re}-select-selector`]:{height:P.controlHeightSM},[`> ${N}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${N}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${(0,y.unit)(P.paddingInline)}`,color:P.colorText,fontWeight:"normal",fontSize:P.inputFontSize,textAlign:"center",borderRadius:P.borderRadius,transition:`all ${P.motionDurationSlow}`,lineHeight:1,[`${re}-select`]:{margin:`${(0,y.unit)(P.calc(P.paddingBlock).add(1).mul(-1).equal())} ${(0,y.unit)(P.calc(P.paddingInline).mul(-1).equal())}`,[`&${re}-select-single:not(${re}-select-customize-input):not(${re}-pagination-size-changer)`]:{[`${re}-select-selector`]:{backgroundColor:"inherit",border:`${(0,y.unit)(P.lineWidth)} ${P.lineType} transparent`,boxShadow:"none"}}},[`${re}-cascader-picker`]:{margin:`-9px ${(0,y.unit)(P.calc(P.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${re}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[N]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${N}-search-with-button &`]:{zIndex:0}}},[`> ${N}:first-child, ${N}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${re}-select ${re}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${N}-affix-wrapper`]:{[`&:not(:first-child) ${N}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${N}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${N}:last-child, ${N}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${re}-select ${re}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${N}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${N}-search &`]:{borderStartStartRadius:P.borderRadius,borderEndStartRadius:P.borderRadius}},[`&:not(:first-child), ${N}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${N}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,ce.dF)()),{[`${N}-group-addon, ${N}-group-wrap, > ${N}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:P.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${N}-affix-wrapper,
|
|
|
& > ${N}-number-affix-wrapper,
|
|
|
& > ${re}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:P.calc(P.lineWidth).mul(-1).equal(),borderInlineEndWidth:P.lineWidth},[N]:{float:"none"},[`& > ${re}-select > ${re}-select-selector,
|
|
|
& > ${re}-select-auto-complete ${N},
|
|
|
& > ${re}-cascader-picker ${N},
|
|
|
& > ${N}-group-wrapper ${N}`]:{borderInlineEndWidth:P.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${re}-select-focused`]:{zIndex:1},[`& > ${re}-select > ${re}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${re}-select:first-child > ${re}-select-selector,
|
|
|
& > ${re}-select-auto-complete:first-child ${N},
|
|
|
& > ${re}-cascader-picker:first-child ${N}`]:{borderStartStartRadius:P.borderRadius,borderEndStartRadius:P.borderRadius},[`& > *:last-child,
|
|
|
& > ${re}-select:last-child > ${re}-select-selector,
|
|
|
& > ${re}-cascader-picker:last-child ${N},
|
|
|
& > ${re}-cascader-picker-focused:last-child ${N}`]:{borderInlineEndWidth:P.lineWidth,borderStartEndRadius:P.borderRadius,borderEndEndRadius:P.borderRadius},[`& > ${re}-select-auto-complete ${N}`]:{verticalAlign:"top"},[`${N}-group-wrapper + ${N}-group-wrapper`]:{marginInlineStart:P.calc(P.lineWidth).mul(-1).equal(),[`${N}-affix-wrapper`]:{borderRadius:0}},[`${N}-group-wrapper:not(:last-child)`]:{[`&${N}-search > ${N}-group`]:{[`& > ${N}-group-addon > ${N}-search-button`]:{borderRadius:0},[`& > ${N}`]:{borderStartStartRadius:P.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:P.borderRadius}}}})}},w=P=>{const{componentCls:N,controlHeightSM:re,lineWidth:ue,calc:me}=P,Be=me(re).sub(me(ue).mul(2)).sub(16).div(2).equal();return{[N]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(P)),_(P)),(0,ge.qG)(P)),(0,ge.H8)(P)),(0,ge.Mu)(P)),(0,ge.vc)(P)),{'&[type="color"]':{height:P.controlHeight,[`&${N}-lg`]:{height:P.controlHeightLG},[`&${N}-sm`]:{height:re,paddingTop:Be,paddingBottom:Be}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},O=P=>{const{componentCls:N}=P;return{[`${N}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:P.colorTextQuaternary,fontSize:P.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${P.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:P.colorTextTertiary},"&:active":{color:P.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,y.unit)(P.inputAffixPadding)}`}}}},X=P=>{const{componentCls:N,inputAffixPadding:re,colorTextDescription:ue,motionDurationSlow:me,colorIcon:Te,colorIconHover:Be,iconCls:Le}=P,at=`${N}-affix-wrapper`,ie=`${N}-affix-wrapper-disabled`;return{[at]:Object.assign(Object.assign(Object.assign(Object.assign({},_(P)),{display:"inline-flex",[`&:not(${N}-disabled):hover`]:{zIndex:1,[`${N}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${N}`]:{padding:0},[`> input${N}, > textarea${N}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[N]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:P.paddingXS}},"&-show-count-suffix":{color:ue},"&-show-count-has-suffix":{marginInlineEnd:P.paddingXXS},"&-prefix":{marginInlineEnd:re},"&-suffix":{marginInlineStart:re}}}),O(P)),{[`${Le}${N}-password-icon`]:{color:Te,cursor:"pointer",transition:`all ${me}`,"&:hover":{color:Be}}}),[`${N}-underlined`]:{borderRadius:0},[ie]:{[`${Le}${N}-password-icon`]:{color:Te,cursor:"not-allowed","&:hover":{color:Te}}}}},J=P=>{const{componentCls:N,borderRadiusLG:re,borderRadiusSM:ue}=P;return{[`${N}-group`]:Object.assign(Object.assign(Object.assign({},(0,ce.Wf)(P)),E(P)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${N}-group-addon`]:{borderRadius:re,fontSize:P.inputFontSizeLG}},"&-sm":{[`${N}-group-addon`]:{borderRadius:ue}}},(0,ge.ir)(P)),(0,ge.S5)(P)),{[`&:not(${N}-compact-first-item):not(${N}-compact-last-item)${N}-compact-item`]:{[`${N}, ${N}-group-addon`]:{borderRadius:0}},[`&:not(${N}-compact-last-item)${N}-compact-first-item`]:{[`${N}, ${N}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${N}-compact-first-item)${N}-compact-last-item`]:{[`${N}, ${N}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${N}-compact-last-item)${N}-compact-item`]:{[`${N}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${N}-compact-first-item)${N}-compact-item`]:{[`${N}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},U=P=>{const{componentCls:N,antCls:re}=P,ue=`${N}-search`;return{[ue]:{[N]:{"&:hover, &:focus":{[`+ ${N}-group-addon ${ue}-button:not(${re}-btn-primary)`]:{borderInlineStartColor:P.colorPrimaryHover}}},[`${N}-affix-wrapper`]:{height:P.controlHeight,borderRadius:0},[`${N}-lg`]:{lineHeight:P.calc(P.lineHeightLG).sub(2e-4).equal()},[`> ${N}-group`]:{[`> ${N}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${ue}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${ue}-button:not(${re}-btn-primary)`]:{color:P.colorTextDescription,"&:hover":{color:P.colorPrimaryHover},"&:active":{color:P.colorPrimaryActive},[`&${re}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${ue}-button`]:{height:P.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${N}-affix-wrapper, ${ue}-button`]:{height:P.controlHeightLG}},"&-small":{[`${N}-affix-wrapper, ${ue}-button`]:{height:P.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${N}-compact-item`]:{[`&:not(${N}-compact-last-item)`]:{[`${N}-group-addon`]:{[`${N}-search-button`]:{marginInlineEnd:P.calc(P.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${N}-compact-first-item)`]:{[`${N},${N}-affix-wrapper`]:{borderRadius:0}},[`> ${N}-group-addon ${N}-search-button,
|
|
|
> ${N},
|
|
|
${N}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${N}-affix-wrapper-focused`]:{zIndex:2}}}}},R=P=>{const{componentCls:N}=P;return{[`${N}-out-of-range`]:{[`&, & input, & textarea, ${N}-show-count-suffix, ${N}-data-count`]:{color:P.colorError}}}},z=(0,de.I$)(["Input","Shared"],P=>{const N=(0,$.mergeToken)(P,(0,p.e)(P));return[w(N),X(N)]},p.T,{resetFont:!1});ut.ZP=(0,de.I$)(["Input","Component"],P=>{const N=(0,$.mergeToken)(P,(0,p.e)(P));return[J(N),U(N),R(N),(0,Y.c)(N)]},p.T,{resetFont:!1})},64910:function(fn,ut,b){"use strict";b.d(ut,{T:function(){return Y},e:function(){return ce}});var y=b(51636);function ce(de){return(0,y.mergeToken)(de,{inputAffixPadding:de.paddingXXS})}const Y=de=>{const{controlHeight:$,fontSize:p,lineHeight:ge,lineWidth:le,controlHeightSM:l,controlHeightLG:A,fontSizeLG:F,lineHeightLG:_,paddingSM:E,controlPaddingHorizontalSM:w,controlPaddingHorizontal:O,colorFillAlter:X,colorPrimaryHover:J,colorPrimary:U,controlOutlineWidth:R,controlOutline:z,colorErrorOutline:P,colorWarningOutline:N,colorBgContainer:re,inputFontSize:ue,inputFontSizeLG:me,inputFontSizeSM:Te}=de,Be=ue||p,Le=Te||Be,at=me||F,ie=Math.round(($-Be*ge)/2*10)/10-le,K=Math.round((l-Le*ge)/2*10)/10-le,I=Math.ceil((A-at*_)/2*10)/10-le;return{paddingBlock:Math.max(ie,0),paddingBlockSM:Math.max(K,0),paddingBlockLG:Math.max(I,0),paddingInline:E-le,paddingInlineSM:w-le,paddingInlineLG:O-le,addonBg:X,activeBorderColor:U,hoverBorderColor:J,activeShadow:`0 0 0 ${R}px ${z}`,errorActiveShadow:`0 0 0 ${R}px ${P}`,warningActiveShadow:`0 0 0 ${R}px ${N}`,hoverBg:re,activeBg:re,inputFontSize:Be,inputFontSizeLG:at,inputFontSizeSM:Le}}},39082:function(fn,ut,b){"use strict";b.d(ut,{$U:function(){return $},H8:function(){return E},Mu:function(){return A},S5:function(){return O},Xy:function(){return de},ir:function(){return l},qG:function(){return ge},vc:function(){return U}});var y=b(36237),ce=b(51636);const Y=R=>({borderColor:R.hoverBorderColor,backgroundColor:R.hoverBg}),de=R=>({color:R.colorTextDisabled,backgroundColor:R.colorBgContainerDisabled,borderColor:R.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},Y((0,ce.mergeToken)(R,{hoverBorderColor:R.colorBorder,hoverBg:R.colorBgContainerDisabled})))}),$=(R,z)=>({background:R.colorBgContainer,borderWidth:R.lineWidth,borderStyle:R.lineType,borderColor:z.borderColor,"&:hover":{borderColor:z.hoverBorderColor,backgroundColor:R.hoverBg},"&:focus, &:focus-within":{borderColor:z.activeBorderColor,boxShadow:z.activeShadow,outline:0,backgroundColor:R.activeBg}}),p=(R,z)=>({[`&${R.componentCls}-status-${z.status}:not(${R.componentCls}-disabled)`]:Object.assign(Object.assign({},$(R,z)),{[`${R.componentCls}-prefix, ${R.componentCls}-suffix`]:{color:z.affixColor}}),[`&${R.componentCls}-status-${z.status}${R.componentCls}-disabled`]:{borderColor:z.borderColor}}),ge=(R,z)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$(R,{borderColor:R.colorBorder,hoverBorderColor:R.hoverBorderColor,activeBorderColor:R.activeBorderColor,activeShadow:R.activeShadow})),{[`&${R.componentCls}-disabled, &[disabled]`]:Object.assign({},de(R))}),p(R,{status:"error",borderColor:R.colorError,hoverBorderColor:R.colorErrorBorderHover,activeBorderColor:R.colorError,activeShadow:R.errorActiveShadow,affixColor:R.colorError})),p(R,{status:"warning",borderColor:R.colorWarning,hoverBorderColor:R.colorWarningBorderHover,activeBorderColor:R.colorWarning,activeShadow:R.warningActiveShadow,affixColor:R.colorWarning})),z)}),le=(R,z)=>({[`&${R.componentCls}-group-wrapper-status-${z.status}`]:{[`${R.componentCls}-group-addon`]:{borderColor:z.addonBorderColor,color:z.addonColor}}}),l=R=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${R.componentCls}-group`]:{"&-addon":{background:R.addonBg,border:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},le(R,{status:"error",addonBorderColor:R.colorError,addonColor:R.colorErrorText})),le(R,{status:"warning",addonBorderColor:R.colorWarning,addonColor:R.colorWarningText})),{[`&${R.componentCls}-group-wrapper-disabled`]:{[`${R.componentCls}-group-addon`]:Object.assign({},de(R))}})}),A=(R,z)=>{const{componentCls:P}=R;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${P}-disabled, &[disabled]`]:{color:R.colorTextDisabled,cursor:"not-allowed"},[`&${P}-status-error`]:{"&, & input, & textarea":{color:R.colorError}},[`&${P}-status-warning`]:{"&, & input, & textarea":{color:R.colorWarning}}},z)}},F=(R,z)=>{var P;return{background:z.bg,borderWidth:R.lineWidth,borderStyle:R.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(P=z==null?void 0:z.inputColor)!==null&&P!==void 0?P:"unset"},"&:hover":{background:z.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:z.activeBorderColor,backgroundColor:R.activeBg}}},_=(R,z)=>({[`&${R.componentCls}-status-${z.status}:not(${R.componentCls}-disabled)`]:Object.assign(Object.assign({},F(R,z)),{[`${R.componentCls}-prefix, ${R.componentCls}-suffix`]:{color:z.affixColor}})}),E=(R,z)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},F(R,{bg:R.colorFillTertiary,hoverBg:R.colorFillSecondary,activeBorderColor:R.activeBorderColor})),{[`&${R.componentCls}-disabled, &[disabled]`]:Object.assign({},de(R))}),_(R,{status:"error",bg:R.colorErrorBg,hoverBg:R.colorErrorBgHover,activeBorderColor:R.colorError,inputColor:R.colorErrorText,affixColor:R.colorError})),_(R,{status:"warning",bg:R.colorWarningBg,hoverBg:R.colorWarningBgHover,activeBorderColor:R.colorWarning,inputColor:R.colorWarningText,affixColor:R.colorWarning})),z)}),w=(R,z)=>({[`&${R.componentCls}-group-wrapper-status-${z.status}`]:{[`${R.componentCls}-group-addon`]:{background:z.addonBg,color:z.addonColor}}}),O=R=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${R.componentCls}-group`]:{"&-addon":{background:R.colorFillTertiary},[`${R.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorSplit}`}}}},w(R,{status:"error",addonBg:R.colorErrorBg,addonColor:R.colorErrorText})),w(R,{status:"warning",addonBg:R.colorWarningBg,addonColor:R.colorWarningText})),{[`&${R.componentCls}-group-wrapper-disabled`]:{[`${R.componentCls}-group`]:{"&-addon":{background:R.colorFillTertiary,color:R.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorBorder}`,borderTop:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorBorder}`,borderBottom:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorBorder}`,borderTop:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorBorder}`,borderBottom:`${(0,y.unit)(R.lineWidth)} ${R.lineType} ${R.colorBorder}`}}}})}),X=(R,z)=>({background:R.colorBgContainer,borderWidth:`${(0,y.unit)(R.lineWidth)} 0`,borderStyle:`${R.lineType} none`,borderColor:`transparent transparent ${z.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${z.borderColor} transparent`,backgroundColor:R.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${z.borderColor} transparent`,outline:0,backgroundColor:R.activeBg}}),J=(R,z)=>({[`&${R.componentCls}-status-${z.status}:not(${R.componentCls}-disabled)`]:Object.assign(Object.assign({},X(R,z)),{[`${R.componentCls}-prefix, ${R.componentCls}-suffix`]:{color:z.affixColor}}),[`&${R.componentCls}-status-${z.status}${R.componentCls}-disabled`]:{borderColor:`transparent transparent ${z.borderColor} transparent`}}),U=(R,z)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},X(R,{borderColor:R.colorBorder,hoverBorderColor:R.hoverBorderColor,activeBorderColor:R.activeBorderColor,activeShadow:R.activeShadow})),{[`&${R.componentCls}-disabled, &[disabled]`]:{color:R.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${R.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),J(R,{status:"error",borderColor:R.colorError,hoverBorderColor:R.colorErrorBorderHover,activeBorderColor:R.colorError,activeShadow:R.errorActiveShadow,affixColor:R.colorError})),J(R,{status:"warning",borderColor:R.colorWarning,hoverBorderColor:R.colorWarningBorderHover,activeBorderColor:R.colorWarning,activeShadow:R.warningActiveShadow,affixColor:R.colorWarning})),z)})},24303:function(fn,ut,b){"use strict";b.d(ut,{D:function(){return ue},Z:function(){return Be}});var y=b(59301),ce=b(60499),Y={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"},de=Y,$=b(7657),p=function(at,ie){return y.createElement($.Z,(0,ce.Z)({},at,{ref:ie,icon:de}))},ge=y.forwardRef(p),le=ge,l=b(33853),A=b(38819),F=b(92310),_=b.n(F),E=b(2738),w=b(48755),O=b(6989),X=b(36237),J=b(48923),U=b(16931);const R=Le=>{const{componentCls:at,siderBg:ie,motionDurationMid:K,motionDurationSlow:I,antCls:ee,triggerHeight:V,triggerColor:he,triggerBg:S,headerHeight:C,zeroTriggerWidth:Z,zeroTriggerHeight:ye,borderRadiusLG:Ve,lightSiderBg:qe,lightTriggerColor:gt,lightTriggerBg:yt,bodyBg:Dt}=Le;return{[at]:{position:"relative",minWidth:0,background:ie,transition:`all ${K}, background 0s`,"&-has-trigger":{paddingBottom:V},"&-right":{order:1},[`${at}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${ee}-menu${ee}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${at}-children`]:{overflow:"hidden"},[`${at}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:V,color:he,lineHeight:(0,X.unit)(V),textAlign:"center",background:S,cursor:"pointer",transition:`all ${K}`},[`${at}-zero-width-trigger`]:{position:"absolute",top:C,insetInlineEnd:Le.calc(Z).mul(-1).equal(),zIndex:1,width:Z,height:ye,color:he,fontSize:Le.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:ie,borderRadius:`0 ${(0,X.unit)(Ve)} ${(0,X.unit)(Ve)} 0`,cursor:"pointer",transition:`background ${I} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${I}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:Le.calc(Z).mul(-1).equal(),borderRadius:`${(0,X.unit)(Ve)} 0 0 ${(0,X.unit)(Ve)}`}},"&-light":{background:qe,[`${at}-trigger`]:{color:gt,background:yt},[`${at}-zero-width-trigger`]:{color:gt,background:yt,border:`1px solid ${Dt}`,borderInlineStart:0}}}}};var z=(0,U.I$)(["Layout","Sider"],Le=>[R(Le)],J.eh,{deprecatedTokens:J.jn}),P=function(Le,at){var ie={};for(var K in Le)Object.prototype.hasOwnProperty.call(Le,K)&&at.indexOf(K)<0&&(ie[K]=Le[K]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,K=Object.getOwnPropertySymbols(Le);I<K.length;I++)at.indexOf(K[I])<0&&Object.prototype.propertyIsEnumerable.call(Le,K[I])&&(ie[K[I]]=Le[K[I]]);return ie};const N={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},re=Le=>!Number.isNaN(Number.parseFloat(Le))&&isFinite(Le),ue=y.createContext({}),me=(()=>{let Le=0;return function(){let at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Le+=1,`${at}${Le}`}})();var Be=y.forwardRef((Le,at)=>{const{prefixCls:ie,className:K,trigger:I,children:ee,defaultCollapsed:V=!1,theme:he="dark",style:S={},collapsible:C=!1,reverseArrow:Z=!1,width:ye=200,collapsedWidth:Ve=80,zeroWidthTriggerStyle:qe,breakpoint:gt,onCollapse:yt,onBreakpoint:Dt}=Le,Ut=P(Le,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:ot}=(0,y.useContext)(O.V),[kt,tt]=(0,y.useState)("collapsed"in Le?Le.collapsed:V),[Gt,Xe]=(0,y.useState)(!1);(0,y.useEffect)(()=>{"collapsed"in Le&&tt(Le.collapsed)},[Le.collapsed]);const Ke=(Et,pt)=>{"collapsed"in Le||tt(Et),yt==null||yt(Et,pt)},{getPrefixCls:Ae,direction:xe}=(0,y.useContext)(w.E_),se=Ae("layout-sider",ie),[Ne,Ce,Se]=z(se),M=(0,y.useRef)(null);M.current=Et=>{Xe(Et.matches),Dt==null||Dt(Et.matches),kt!==Et.matches&&Ke(Et.matches,"responsive")},(0,y.useEffect)(()=>{function Et(ft){return M.current(ft)}let pt;if(typeof window!="undefined"){const{matchMedia:ft}=window;if(ft&>&> in N){pt=ft(`screen and (max-width: ${N[gt]})`);try{pt.addEventListener("change",Et)}catch(Pt){pt.addListener(Et)}Et(pt)}}return()=>{try{pt==null||pt.removeEventListener("change",Et)}catch(ft){pt==null||pt.removeListener(Et)}}},[gt]),(0,y.useEffect)(()=>{const Et=me("ant-sider-");return ot.addSider(Et),()=>ot.removeSider(Et)},[]);const fe=()=>{Ke(!kt,"clickTrigger")},_e=(0,E.Z)(Ut,["collapsed"]),Re=kt?Ve:ye,$e=re(Re)?`${Re}px`:String(Re),rt=parseFloat(String(Ve||0))===0?y.createElement("span",{onClick:fe,className:_()(`${se}-zero-width-trigger`,`${se}-zero-width-trigger-${Z?"right":"left"}`),style:qe},I||y.createElement(le,null)):null,it=xe==="rtl"==!Z,lt={expanded:it?y.createElement(A.Z,null):y.createElement(l.Z,null),collapsed:it?y.createElement(l.Z,null):y.createElement(A.Z,null)}[kt?"collapsed":"expanded"],st=I!==null?rt||y.createElement("div",{className:`${se}-trigger`,onClick:fe,style:{width:$e}},I||lt):null,ht=Object.assign(Object.assign({},S),{flex:`0 0 ${$e}`,maxWidth:$e,minWidth:$e,width:$e}),bt=_()(se,`${se}-${he}`,{[`${se}-collapsed`]:!!kt,[`${se}-has-trigger`]:C&&I!==null&&!rt,[`${se}-below`]:!!Gt,[`${se}-zero-width`]:parseFloat($e)===0},K,Ce,Se),He=y.useMemo(()=>({siderCollapsed:kt}),[kt]);return Ne(y.createElement(ue.Provider,{value:He},y.createElement("aside",Object.assign({className:bt},_e,{style:ht,ref:at}),y.createElement("div",{className:`${se}-children`},ee),C||Gt&&rt?st:null)))})},6989:function(fn,ut,b){"use strict";b.d(ut,{V:function(){return ce}});var y=b(59301);const ce=y.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},24404:function(fn,ut,b){"use strict";b.d(ut,{default:function(){return N}});var y=b(77654),ce=b(59301),Y=b(92310),de=b.n(Y),$=b(2738),p=b(48755),ge=b(6989),le=b(11592),l=b(24303);function A(re,ue,me){return typeof me=="boolean"?me:re.length?!0:(0,le.Z)(ue).some(Be=>Be.type===l.Z)}var F=b(48923),_=function(re,ue){var me={};for(var Te in re)Object.prototype.hasOwnProperty.call(re,Te)&&ue.indexOf(Te)<0&&(me[Te]=re[Te]);if(re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Te=Object.getOwnPropertySymbols(re);Be<Te.length;Be++)ue.indexOf(Te[Be])<0&&Object.prototype.propertyIsEnumerable.call(re,Te[Be])&&(me[Te[Be]]=re[Te[Be]]);return me};function E(re){let{suffixCls:ue,tagName:me,displayName:Te}=re;return Be=>ce.forwardRef((at,ie)=>ce.createElement(Be,Object.assign({ref:ie,suffixCls:ue,tagName:me},at)))}const w=ce.forwardRef((re,ue)=>{const{prefixCls:me,suffixCls:Te,className:Be,tagName:Le}=re,at=_(re,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:ie}=ce.useContext(p.E_),K=ie("layout",me),[I,ee,V]=(0,F.ZP)(K),he=Te?`${K}-${Te}`:K;return I(ce.createElement(Le,Object.assign({className:de()(me||he,Be,ee,V),ref:ue},at)))}),O=ce.forwardRef((re,ue)=>{const{direction:me}=ce.useContext(p.E_),[Te,Be]=ce.useState([]),{prefixCls:Le,className:at,rootClassName:ie,children:K,hasSider:I,tagName:ee,style:V}=re,he=_(re,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),S=(0,$.Z)(he,["suffixCls"]),{getPrefixCls:C,className:Z,style:ye}=(0,p.dj)("layout"),Ve=C("layout",Le),qe=A(Te,K,I),[gt,yt,Dt]=(0,F.ZP)(Ve),Ut=de()(Ve,{[`${Ve}-has-sider`]:qe,[`${Ve}-rtl`]:me==="rtl"},Z,at,ie,yt,Dt),ot=ce.useMemo(()=>({siderHook:{addSider:kt=>{Be(tt=>[].concat((0,y.Z)(tt),[kt]))},removeSider:kt=>{Be(tt=>tt.filter(Gt=>Gt!==kt))}}}),[]);return gt(ce.createElement(ge.V.Provider,{value:ot},ce.createElement(ee,Object.assign({ref:ue,className:Ut,style:Object.assign(Object.assign({},ye),V)},S),K)))}),X=E({tagName:"div",displayName:"Layout"})(O),J=E({suffixCls:"header",tagName:"header",displayName:"Header"})(w),U=E({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(w),R=E({suffixCls:"content",tagName:"main",displayName:"Content"})(w);var z=X;const P=z;P.Header=J,P.Footer=U,P.Content=R,P.Sider=l.Z,P._InternalSiderContext=l.D;var N=P},48923:function(fn,ut,b){"use strict";b.d(ut,{eh:function(){return de},jn:function(){return $}});var y=b(36237),ce=b(16931);const Y=p=>{const{antCls:ge,componentCls:le,colorText:l,footerBg:A,headerHeight:F,headerPadding:_,headerColor:E,footerPadding:w,fontSize:O,bodyBg:X,headerBg:J}=p;return{[le]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:X,"&, *":{boxSizing:"border-box"},[`&${le}-has-sider`]:{flexDirection:"row",[`> ${le}, > ${le}-content`]:{width:0}},[`${le}-header, &${le}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${le}-header`]:{height:F,padding:_,color:E,lineHeight:(0,y.unit)(F),background:J,[`${ge}-menu`]:{lineHeight:"inherit"}},[`${le}-footer`]:{padding:w,color:l,fontSize:O,background:A},[`${le}-content`]:{flex:"auto",color:l,minHeight:0}}},de=p=>{const{colorBgLayout:ge,controlHeight:le,controlHeightLG:l,colorText:A,controlHeightSM:F,marginXXS:_,colorTextLightSolid:E,colorBgContainer:w}=p,O=l*1.25;return{colorBgHeader:"#001529",colorBgBody:ge,colorBgTrigger:"#002140",bodyBg:ge,headerBg:"#001529",headerHeight:le*2,headerPadding:`0 ${O}px`,headerColor:A,footerPadding:`${F}px ${O}px`,footerBg:ge,siderBg:"#001529",triggerHeight:l+_*2,triggerBg:"#002140",triggerColor:E,zeroTriggerWidth:l,zeroTriggerHeight:l,lightSiderBg:w,lightTriggerBg:w,lightTriggerColor:A}},$=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];ut.ZP=(0,ce.I$)("Layout",p=>[Y(p)],de,{deprecatedTokens:$})},78857:function(fn,ut,b){"use strict";b.d(ut,{J:function(){return p}});var y=b(59301),ce=b(8654),Y=b(62487),de=function(ge,le){var l={};for(var A in ge)Object.prototype.hasOwnProperty.call(ge,A)&&le.indexOf(A)<0&&(l[A]=ge[A]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var F=0,A=Object.getOwnPropertySymbols(ge);F<A.length;F++)le.indexOf(A[F])<0&&Object.prototype.propertyIsEnumerable.call(ge,A[F])&&(l[A[F]]=ge[A[F]]);return l};const $=y.createContext(null),p=y.forwardRef((ge,le)=>{const{children:l}=ge,A=de(ge,["children"]),F=y.useContext($),_=y.useMemo(()=>Object.assign(Object.assign({},F),A),[F,A.prefixCls,A.mode,A.selectable,A.rootClassName]),E=(0,ce.t4)(l),w=(0,ce.x1)(le,E?(0,ce.C4)(l):null);return y.createElement($.Provider,{value:_},y.createElement(Y.Z,{space:!0},E?y.cloneElement(l,{ref:w}):l))});ut.Z=$},93041:function(fn,ut,b){"use strict";b.d(ut,{default:function(){return Ne}});var y=b(59301),ce=b(28321),Y=b(24303),de=b(18785),$=b(92310),p=b.n($),ge=b(6089),le=b(2738),l=b(86641),A=b(22703),F=b(48755),_=b(83397),w=(0,y.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),O=function(Ce,Se){var M={};for(var fe in Ce)Object.prototype.hasOwnProperty.call(Ce,fe)&&Se.indexOf(fe)<0&&(M[fe]=Ce[fe]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,fe=Object.getOwnPropertySymbols(Ce);_e<fe.length;_e++)Se.indexOf(fe[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ce,fe[_e])&&(M[fe[_e]]=Ce[fe[_e]]);return M},J=Ce=>{const{prefixCls:Se,className:M,dashed:fe}=Ce,_e=O(Ce,["prefixCls","className","dashed"]),{getPrefixCls:Re}=y.useContext(F.E_),$e=Re("menu",Se),rt=p()({[`${$e}-item-divider-dashed`]:!!fe},M);return y.createElement(ce.iz,Object.assign({className:rt},_e))},U=b(11592),R=b(25399),P=Ce=>{var Se;const{className:M,children:fe,icon:_e,title:Re,danger:$e,extra:rt}=Ce,{prefixCls:it,firstLevel:te,direction:Q,disableMenuItemTitleTooltip:lt,inlineCollapsed:st}=y.useContext(w),ht=Pt=>{const x=fe==null?void 0:fe[0],D=y.createElement("span",{className:p()(`${it}-title-content`,{[`${it}-title-content-with-extra`]:!!rt||rt===0})},fe);return(!_e||y.isValidElement(fe)&&fe.type==="span")&&fe&&Pt&&te&&typeof x=="string"?y.createElement("div",{className:`${it}-inline-collapsed-noicon`},x.charAt(0)):D},{siderCollapsed:bt}=y.useContext(Y.D);let He=Re;typeof Re=="undefined"?He=te?fe:"":Re===!1&&(He="");const Et={title:He};!bt&&!st&&(Et.title=null,Et.open=!1);const pt=(0,U.Z)(fe).length;let ft=y.createElement(ce.ck,Object.assign({},(0,le.Z)(Ce,["title","icon","danger"]),{className:p()({[`${it}-item-danger`]:$e,[`${it}-item-only-child`]:(_e?pt+1:pt)===1},M),title:typeof Re=="string"?Re:void 0}),(0,A.Tm)(_e,{className:p()(y.isValidElement(_e)?(Se=_e.props)===null||Se===void 0?void 0:Se.className:"",`${it}-item-icon`)}),ht(st));return lt||(ft=y.createElement(R.Z,Object.assign({},Et,{placement:Q==="rtl"?"left":"right",classNames:{root:`${it}-inline-collapsed-tooltip`}}),ft)),ft},N=b(78857),re=b(36237),ue=b(17835),me=b(63356),Te=b(34961),Be=b(46e3),Le=b(34925),at=b(16931),ie=b(51636),I=Ce=>{const{componentCls:Se,motionDurationSlow:M,horizontalLineHeight:fe,colorSplit:_e,lineWidth:Re,lineType:$e,itemPaddingInline:rt}=Ce;return{[`${Se}-horizontal`]:{lineHeight:fe,border:0,borderBottom:`${(0,re.unit)(Re)} ${$e} ${_e}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Se}-item, ${Se}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:rt},[`> ${Se}-item:hover,
|
|
|
> ${Se}-item-active,
|
|
|
> ${Se}-submenu ${Se}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Se}-item, ${Se}-submenu-title`]:{transition:[`border-color ${M}`,`background ${M}`].join(",")},[`${Se}-submenu-arrow`]:{display:"none"}}}},V=Ce=>{let{componentCls:Se,menuArrowOffset:M,calc:fe}=Ce;return{[`${Se}-rtl`]:{direction:"rtl"},[`${Se}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Se}-rtl${Se}-vertical,
|
|
|
${Se}-submenu-rtl ${Se}-vertical`]:{[`${Se}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${(0,re.unit)(fe(M).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${(0,re.unit)(M)})`}}}}};const he=Ce=>Object.assign({},(0,me.oN)(Ce));var C=(Ce,Se)=>{const{componentCls:M,itemColor:fe,itemSelectedColor:_e,subMenuItemSelectedColor:Re,groupTitleColor:$e,itemBg:rt,subMenuItemBg:it,itemSelectedBg:te,activeBarHeight:Q,activeBarWidth:lt,activeBarBorderWidth:st,motionDurationSlow:ht,motionEaseInOut:bt,motionEaseOut:He,itemPaddingInline:Et,motionDurationMid:pt,itemHoverColor:ft,lineType:Pt,colorSplit:x,itemDisabledColor:D,dangerItemColor:Ye,dangerItemHoverColor:W,dangerItemSelectedColor:pe,dangerItemActiveBg:Bt,dangerItemSelectedBg:Oe,popupBg:Ue,itemHoverBg:et,itemActiveBg:q,menuSubMenuBg:ne,horizontalItemSelectedColor:we,horizontalItemSelectedBg:Fe,horizontalItemBorderRadius:G,horizontalItemHoverBg:St}=Ce;return{[`${M}-${Se}, ${M}-${Se} > ${M}`]:{color:fe,background:rt,[`&${M}-root:focus-visible`]:Object.assign({},he(Ce)),[`${M}-item`]:{"&-group-title, &-extra":{color:$e}},[`${M}-submenu-selected > ${M}-submenu-title`]:{color:Re},[`${M}-item, ${M}-submenu-title`]:{color:fe,[`&:not(${M}-item-disabled):focus-visible`]:Object.assign({},he(Ce))},[`${M}-item-disabled, ${M}-submenu-disabled`]:{color:`${D} !important`},[`${M}-item:not(${M}-item-selected):not(${M}-submenu-selected)`]:{[`&:hover, > ${M}-submenu-title:hover`]:{color:ft}},[`&:not(${M}-horizontal)`]:{[`${M}-item:not(${M}-item-selected)`]:{"&:hover":{backgroundColor:et},"&:active":{backgroundColor:q}},[`${M}-submenu-title`]:{"&:hover":{backgroundColor:et},"&:active":{backgroundColor:q}}},[`${M}-item-danger`]:{color:Ye,[`&${M}-item:hover`]:{[`&:not(${M}-item-selected):not(${M}-submenu-selected)`]:{color:W}},[`&${M}-item:active`]:{background:Bt}},[`${M}-item a`]:{"&, &:hover":{color:"inherit"}},[`${M}-item-selected`]:{color:_e,[`&${M}-item-danger`]:{color:pe},"a, a:hover":{color:"inherit"}},[`& ${M}-item-selected`]:{backgroundColor:te,[`&${M}-item-danger`]:{backgroundColor:Oe}},[`&${M}-submenu > ${M}`]:{backgroundColor:ne},[`&${M}-popup > ${M}`]:{backgroundColor:Ue},[`&${M}-submenu-popup > ${M}`]:{backgroundColor:Ue},[`&${M}-horizontal`]:Object.assign(Object.assign({},Se==="dark"?{borderBottom:0}:{}),{[`> ${M}-item, > ${M}-submenu`]:{top:st,marginTop:Ce.calc(st).mul(-1).equal(),marginBottom:0,borderRadius:G,"&::after":{position:"absolute",insetInline:Et,bottom:0,borderBottom:`${(0,re.unit)(Q)} solid transparent`,transition:`border-color ${ht} ${bt}`,content:'""'},"&:hover, &-active, &-open":{background:St,"&::after":{borderBottomWidth:Q,borderBottomColor:we}},"&-selected":{color:we,backgroundColor:Fe,"&:hover":{backgroundColor:Fe},"&::after":{borderBottomWidth:Q,borderBottomColor:we}}}}),[`&${M}-root`]:{[`&${M}-inline, &${M}-vertical`]:{borderInlineEnd:`${(0,re.unit)(st)} ${Pt} ${x}`}},[`&${M}-inline`]:{[`${M}-sub${M}-inline`]:{background:it},[`${M}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${(0,re.unit)(lt)} solid ${_e}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${pt} ${He}`,`opacity ${pt} ${He}`].join(","),content:'""'},[`&${M}-item-danger`]:{"&::after":{borderInlineEndColor:pe}}},[`${M}-selected, ${M}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${pt} ${bt}`,`opacity ${pt} ${bt}`].join(",")}}}}}};const Z=Ce=>{const{componentCls:Se,itemHeight:M,itemMarginInline:fe,padding:_e,menuArrowSize:Re,marginXS:$e,itemMarginBlock:rt,itemWidth:it,itemPaddingInline:te}=Ce,Q=Ce.calc(Re).add(_e).add($e).equal();return{[`${Se}-item`]:{position:"relative",overflow:"hidden"},[`${Se}-item, ${Se}-submenu-title`]:{height:M,lineHeight:(0,re.unit)(M),paddingInline:te,overflow:"hidden",textOverflow:"ellipsis",marginInline:fe,marginBlock:rt,width:it},[`> ${Se}-item,
|
|
|
> ${Se}-submenu > ${Se}-submenu-title`]:{height:M,lineHeight:(0,re.unit)(M)},[`${Se}-item-group-list ${Se}-submenu-title,
|
|
|
${Se}-submenu-title`]:{paddingInlineEnd:Q}}};var Ve=Ce=>{const{componentCls:Se,iconCls:M,itemHeight:fe,colorTextLightSolid:_e,dropdownWidth:Re,controlHeightLG:$e,motionEaseOut:rt,paddingXL:it,itemMarginInline:te,fontSizeLG:Q,motionDurationFast:lt,motionDurationSlow:st,paddingXS:ht,boxShadowSecondary:bt,collapsedWidth:He,collapsedIconSize:Et}=Ce,pt={height:fe,lineHeight:(0,re.unit)(fe),listStylePosition:"inside",listStyleType:"disc"};return[{[Se]:{"&-inline, &-vertical":Object.assign({[`&${Se}-root`]:{boxShadow:"none"}},Z(Ce))},[`${Se}-submenu-popup`]:{[`${Se}-vertical`]:Object.assign(Object.assign({},Z(Ce)),{boxShadow:bt})}},{[`${Se}-submenu-popup ${Se}-vertical${Se}-sub`]:{minWidth:Re,maxHeight:`calc(100vh - ${(0,re.unit)(Ce.calc($e).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Se}-inline`]:{width:"100%",[`&${Se}-root`]:{[`${Se}-item, ${Se}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${st}`,`background ${st}`,`padding ${lt} ${rt}`].join(","),[`> ${Se}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Se}-sub${Se}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Se}-submenu > ${Se}-submenu-title`]:pt,[`& ${Se}-item-group-title`]:{paddingInlineStart:it}},[`${Se}-item`]:pt}},{[`${Se}-inline-collapsed`]:{width:He,[`&${Se}-root`]:{[`${Se}-item, ${Se}-submenu ${Se}-submenu-title`]:{[`> ${Se}-inline-collapsed-noicon`]:{fontSize:Q,textAlign:"center"}}},[`> ${Se}-item,
|
|
|
> ${Se}-item-group > ${Se}-item-group-list > ${Se}-item,
|
|
|
> ${Se}-item-group > ${Se}-item-group-list > ${Se}-submenu > ${Se}-submenu-title,
|
|
|
> ${Se}-submenu > ${Se}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${(0,re.unit)(Ce.calc(Et).div(2).equal())} - ${(0,re.unit)(te)})`,textOverflow:"clip",[`
|
|
|
${Se}-submenu-arrow,
|
|
|
${Se}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Se}-item-icon, ${M}`]:{margin:0,fontSize:Et,lineHeight:(0,re.unit)(fe),"+ span":{display:"inline-block",opacity:0}}},[`${Se}-item-icon, ${M}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Se}-item-icon, ${M}`]:{display:"none"},"a, a:hover":{color:_e}},[`${Se}-item-group-title`]:Object.assign(Object.assign({},me.vS),{paddingInline:ht})}}]};const qe=Ce=>{const{componentCls:Se,motionDurationSlow:M,motionDurationMid:fe,motionEaseInOut:_e,motionEaseOut:Re,iconCls:$e,iconSize:rt,iconMarginInlineEnd:it}=Ce;return{[`${Se}-item, ${Se}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${M}`,`background ${M}`,`padding calc(${M} + 0.1s) ${_e}`].join(","),[`${Se}-item-icon, ${$e}`]:{minWidth:rt,fontSize:rt,transition:[`font-size ${fe} ${Re}`,`margin ${M} ${_e}`,`color ${M}`].join(","),"+ span":{marginInlineStart:it,opacity:1,transition:[`opacity ${M} ${_e}`,`margin ${M}`,`color ${M}`].join(",")}},[`${Se}-item-icon`]:Object.assign({},(0,me.Ro)()),[`&${Se}-item-only-child`]:{[`> ${$e}, > ${Se}-item-icon`]:{marginInlineEnd:0}}},[`${Se}-item-disabled, ${Se}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${Se}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},gt=Ce=>{const{componentCls:Se,motionDurationSlow:M,motionEaseInOut:fe,borderRadius:_e,menuArrowSize:Re,menuArrowOffset:$e}=Ce;return{[`${Se}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Ce.margin,width:Re,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${M} ${fe}, opacity ${M}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ce.calc(Re).mul(.6).equal(),height:Ce.calc(Re).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:_e,transition:[`background ${M} ${fe}`,`transform ${M} ${fe}`,`top ${M} ${fe}`,`color ${M} ${fe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${(0,re.unit)(Ce.calc($e).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${(0,re.unit)($e)})`}}}}},yt=Ce=>{const{antCls:Se,componentCls:M,fontSize:fe,motionDurationSlow:_e,motionDurationMid:Re,motionEaseInOut:$e,paddingXS:rt,padding:it,colorSplit:te,lineWidth:Q,zIndexPopup:lt,borderRadiusLG:st,subMenuItemBorderRadius:ht,menuArrowSize:bt,menuArrowOffset:He,lineType:Et,groupTitleLineHeight:pt,groupTitleFontSize:ft}=Ce;return[{"":{[M]:Object.assign(Object.assign({},(0,me.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,me.Wf)(Ce)),(0,me.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:fe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${_e} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${M}-item`]:{flex:"none"}},[`${M}-item, ${M}-submenu, ${M}-submenu-title`]:{borderRadius:Ce.itemBorderRadius},[`${M}-item-group-title`]:{padding:`${(0,re.unit)(rt)} ${(0,re.unit)(it)}`,fontSize:ft,lineHeight:pt,transition:`all ${_e}`},[`&-horizontal ${M}-submenu`]:{transition:[`border-color ${_e} ${$e}`,`background ${_e} ${$e}`].join(",")},[`${M}-submenu, ${M}-submenu-inline`]:{transition:[`border-color ${_e} ${$e}`,`background ${_e} ${$e}`,`padding ${Re} ${$e}`].join(",")},[`${M}-submenu ${M}-sub`]:{cursor:"initial",transition:[`background ${_e} ${$e}`,`padding ${_e} ${$e}`].join(",")},[`${M}-title-content`]:{transition:`color ${_e}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${Se}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${M}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:Ce.padding}},[`${M}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${M}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:te,borderStyle:Et,borderWidth:0,borderTopWidth:Q,marginBlock:Q,padding:0,"&-dashed":{borderStyle:"dashed"}}}),qe(Ce)),{[`${M}-item-group`]:{[`${M}-item-group-list`]:{margin:0,padding:0,[`${M}-item, ${M}-submenu-title`]:{paddingInline:`${(0,re.unit)(Ce.calc(fe).mul(2).equal())} ${(0,re.unit)(it)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:lt,borderRadius:st,boxShadow:"none",transformOrigin:"0 0",[`&${M}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${M}`]:Object.assign(Object.assign(Object.assign({borderRadius:st},qe(Ce)),gt(Ce)),{[`${M}-item, ${M}-submenu > ${M}-submenu-title`]:{borderRadius:ht},[`${M}-submenu-title::after`]:{transition:`transform ${_e} ${$e}`}})},"\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:Ce.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Ce.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Ce.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Ce.paddingXS}}}),gt(Ce)),{[`&-inline-collapsed ${M}-submenu-arrow,
|
|
|
&-inline ${M}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${(0,re.unit)(He)})`},"&::after":{transform:`rotate(45deg) translateX(${(0,re.unit)(Ce.calc(He).mul(-1).equal())})`}},[`${M}-submenu-open${M}-submenu-inline > ${M}-submenu-title > ${M}-submenu-arrow`]:{transform:`translateY(${(0,re.unit)(Ce.calc(bt).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${(0,re.unit)(Ce.calc(He).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${(0,re.unit)(He)})`}}})},{[`${Se}-layout-header`]:{[M]:{lineHeight:"inherit"}}}]},Dt=Ce=>{var Se,M,fe;const{colorPrimary:_e,colorError:Re,colorTextDisabled:$e,colorErrorBg:rt,colorText:it,colorTextDescription:te,colorBgContainer:Q,colorFillAlter:lt,colorFillContent:st,lineWidth:ht,lineWidthBold:bt,controlItemBgActive:He,colorBgTextHover:Et,controlHeightLG:pt,lineHeight:ft,colorBgElevated:Pt,marginXXS:x,padding:D,fontSize:Ye,controlHeightSM:W,fontSizeLG:pe,colorTextLightSolid:Bt,colorErrorHover:Oe}=Ce,Ue=(Se=Ce.activeBarWidth)!==null&&Se!==void 0?Se:0,et=(M=Ce.activeBarBorderWidth)!==null&&M!==void 0?M:ht,q=(fe=Ce.itemMarginInline)!==null&&fe!==void 0?fe:Ce.marginXXS,ne=new ue.FastColor(Bt).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Ce.zIndexPopupBase+50,radiusItem:Ce.borderRadiusLG,itemBorderRadius:Ce.borderRadiusLG,radiusSubMenuItem:Ce.borderRadiusSM,subMenuItemBorderRadius:Ce.borderRadiusSM,colorItemText:it,itemColor:it,colorItemTextHover:it,itemHoverColor:it,colorItemTextHoverHorizontal:_e,horizontalItemHoverColor:_e,colorGroupTitle:te,groupTitleColor:te,colorItemTextSelected:_e,itemSelectedColor:_e,subMenuItemSelectedColor:_e,colorItemTextSelectedHorizontal:_e,horizontalItemSelectedColor:_e,colorItemBg:Q,itemBg:Q,colorItemBgHover:Et,itemHoverBg:Et,colorItemBgActive:st,itemActiveBg:He,colorSubItemBg:lt,subMenuItemBg:lt,colorItemBgSelected:He,itemSelectedBg:He,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:Ue,colorActiveBarHeight:bt,activeBarHeight:bt,colorActiveBarBorderSize:ht,activeBarBorderWidth:et,colorItemTextDisabled:$e,itemDisabledColor:$e,colorDangerItemText:Re,dangerItemColor:Re,colorDangerItemTextHover:Re,dangerItemHoverColor:Re,colorDangerItemTextSelected:Re,dangerItemSelectedColor:Re,colorDangerItemBgActive:rt,dangerItemActiveBg:rt,colorDangerItemBgSelected:rt,dangerItemSelectedBg:rt,itemMarginInline:q,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:pt,groupTitleLineHeight:ft,collapsedWidth:pt*2,popupBg:Pt,itemMarginBlock:x,itemPaddingInline:D,horizontalLineHeight:`${pt*1.15}px`,iconSize:Ye,iconMarginInlineEnd:W-Ye,collapsedIconSize:pe,groupTitleFontSize:Ye,darkItemDisabledColor:new ue.FastColor(Bt).setA(.25).toRgbString(),darkItemColor:ne,darkDangerItemColor:Re,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:Bt,darkItemSelectedBg:_e,darkDangerItemSelectedBg:Re,darkItemHoverBg:"transparent",darkGroupTitleColor:ne,darkItemHoverColor:Bt,darkDangerItemHoverColor:Oe,darkDangerItemSelectedColor:Bt,darkDangerItemActiveBg:Re,itemWidth:Ue?`calc(100% + ${et}px)`:`calc(100% - ${q*2}px)`}};var Ut=function(Ce){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ce,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(0,at.I$)("Menu",_e=>{const{colorBgElevated:Re,controlHeightLG:$e,fontSize:rt,darkItemColor:it,darkDangerItemColor:te,darkItemBg:Q,darkSubMenuItemBg:lt,darkItemSelectedColor:st,darkItemSelectedBg:ht,darkDangerItemSelectedBg:bt,darkItemHoverBg:He,darkGroupTitleColor:Et,darkItemHoverColor:pt,darkItemDisabledColor:ft,darkDangerItemHoverColor:Pt,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:D,popupBg:Ye,darkPopupBg:W}=_e,pe=_e.calc(rt).div(7).mul(5).equal(),Bt=(0,ie.mergeToken)(_e,{menuArrowSize:pe,menuHorizontalHeight:_e.calc($e).mul(1.15).equal(),menuArrowOffset:_e.calc(pe).mul(.25).equal(),menuSubMenuBg:Re,calc:_e.calc,popupBg:Ye}),Oe=(0,ie.mergeToken)(Bt,{itemColor:it,itemHoverColor:pt,groupTitleColor:Et,itemSelectedColor:st,subMenuItemSelectedColor:st,itemBg:Q,popupBg:W,subMenuItemBg:lt,itemActiveBg:"transparent",itemSelectedBg:ht,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:He,itemDisabledColor:ft,dangerItemColor:te,dangerItemHoverColor:Pt,dangerItemSelectedColor:x,dangerItemActiveBg:D,dangerItemSelectedBg:bt,menuSubMenuBg:lt,horizontalItemSelectedColor:st,horizontalItemSelectedBg:ht});return[yt(Bt),I(Bt),Ve(Bt),C(Bt,"light"),C(Oe,"dark"),V(Bt),(0,Te.Z)(Bt),(0,Be.oN)(Bt,"slide-up"),(0,Be.oN)(Bt,"slide-down"),(0,Le._y)(Bt,"zoom-big")]},Dt,{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}})(Ce,Se)},ot=b(75030),tt=Ce=>{var Se;const{popupClassName:M,icon:fe,title:_e,theme:Re}=Ce,$e=y.useContext(w),{prefixCls:rt,inlineCollapsed:it,theme:te}=$e,Q=(0,ce.Xl)();let lt;if(!fe)lt=it&&!Q.length&&_e&&typeof _e=="string"?y.createElement("div",{className:`${rt}-inline-collapsed-noicon`},_e.charAt(0)):y.createElement("span",{className:`${rt}-title-content`},_e);else{const bt=y.isValidElement(_e)&&_e.type==="span";lt=y.createElement(y.Fragment,null,(0,A.Tm)(fe,{className:p()(y.isValidElement(fe)?(Se=fe.props)===null||Se===void 0?void 0:Se.className:"",`${rt}-item-icon`)}),bt?_e:y.createElement("span",{className:`${rt}-title-content`},_e))}const st=y.useMemo(()=>Object.assign(Object.assign({},$e),{firstLevel:!1}),[$e]),[ht]=(0,ot.Cn)("Menu");return y.createElement(w.Provider,{value:st},y.createElement(ce.Wd,Object.assign({},(0,le.Z)(Ce,["icon"]),{title:lt,popupClassName:p()(rt,M,`${rt}-${Re||te}`),popupStyle:Object.assign({zIndex:ht},Ce.popupStyle)})))},Gt=function(Ce,Se){var M={};for(var fe in Ce)Object.prototype.hasOwnProperty.call(Ce,fe)&&Se.indexOf(fe)<0&&(M[fe]=Ce[fe]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,fe=Object.getOwnPropertySymbols(Ce);_e<fe.length;_e++)Se.indexOf(fe[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ce,fe[_e])&&(M[fe[_e]]=Ce[fe[_e]]);return M};function Xe(Ce){return Ce===null||Ce===!1}const Ke={item:P,submenu:tt,divider:J};var xe=(0,y.forwardRef)((Ce,Se)=>{var M;const fe=y.useContext(N.Z),_e=fe||{},{getPrefixCls:Re,getPopupContainer:$e,direction:rt,menu:it}=y.useContext(F.E_),te=Re(),{prefixCls:Q,className:lt,style:st,theme:ht="light",expandIcon:bt,_internalDisableMenuItemTitleTooltip:He,inlineCollapsed:Et,siderCollapsed:pt,rootClassName:ft,mode:Pt,selectable:x,onClick:D,overflowedIndicatorPopupClassName:Ye}=Ce,W=Gt(Ce,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),pe=(0,le.Z)(W,["collapsedWidth"]);(M=_e.validator)===null||M===void 0||M.call(_e,{mode:Pt});const Bt=(0,ge.Z)(function(){var an;D==null||D.apply(void 0,arguments),(an=_e.onClick)===null||an===void 0||an.call(_e)}),Oe=_e.mode||Pt,Ue=x!=null?x:_e.selectable,et=Et!=null?Et:pt,q={horizontal:{motionName:`${te}-slide-up`},inline:(0,l.Z)(te),other:{motionName:`${te}-zoom-big`}},ne=Re("menu",Q||_e.prefixCls),we=(0,_.Z)(ne),[Fe,G,St]=Ut(ne,we,!fe),Ee=p()(`${ne}-${ht}`,it==null?void 0:it.className,lt),Wt=y.useMemo(()=>{var an,Zn;if(typeof bt=="function"||Xe(bt))return bt||null;if(typeof _e.expandIcon=="function"||Xe(_e.expandIcon))return _e.expandIcon||null;if(typeof(it==null?void 0:it.expandIcon)=="function"||Xe(it==null?void 0:it.expandIcon))return(it==null?void 0:it.expandIcon)||null;const Rn=(an=bt!=null?bt:_e==null?void 0:_e.expandIcon)!==null&&an!==void 0?an:it==null?void 0:it.expandIcon;return(0,A.Tm)(Rn,{className:p()(`${ne}-submenu-expand-icon`,y.isValidElement(Rn)?(Zn=Rn.props)===null||Zn===void 0?void 0:Zn.className:void 0)})},[bt,_e==null?void 0:_e.expandIcon,it==null?void 0:it.expandIcon,ne]),en=y.useMemo(()=>({prefixCls:ne,inlineCollapsed:et||!1,direction:rt,firstLevel:!0,theme:ht,mode:Oe,disableMenuItemTitleTooltip:He}),[ne,et,rt,He,ht]);return Fe(y.createElement(N.Z.Provider,{value:null},y.createElement(w.Provider,{value:en},y.createElement(ce.ZP,Object.assign({getPopupContainer:$e,overflowedIndicator:y.createElement(de.Z,null),overflowedIndicatorPopupClassName:p()(ne,`${ne}-${ht}`,Ye),mode:Oe,selectable:Ue,onClick:Bt},pe,{inlineCollapsed:et,style:Object.assign(Object.assign({},it==null?void 0:it.style),st),className:Ee,prefixCls:ne,direction:rt,defaultMotions:q,expandIcon:Wt,ref:Se,rootClassName:p()(ft,G,_e.rootClassName,St,we),_internalComponents:Ke})))))});const se=(0,y.forwardRef)((Ce,Se)=>{const M=(0,y.useRef)(null),fe=y.useContext(Y.D);return(0,y.useImperativeHandle)(Se,()=>({menu:M.current,focus:_e=>{var Re;(Re=M.current)===null||Re===void 0||Re.focus(_e)}})),y.createElement(xe,Object.assign({ref:M},Ce,fe))});se.Item=P,se.SubMenu=tt,se.Divider=J,se.ItemGroup=ce.BW;var Ne=se},31709:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return it}});var y=b(59301),ce=b(60499),Y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},de=Y,$=b(7657),p=function(Q,lt){return y.createElement($.Z,(0,ce.Z)({},Q,{ref:lt,icon:de}))},ge=y.forwardRef(p),le=ge,l=b(49198),A=b(33853),F=b(38819),_=b(92310),E=b.n(_),w=b(18642),O=b(43749),X=b(85899),J=b(72190),U=b(18929),R=b(10228),z=b(26112),P=b(48736),N=b(17119),re=[10,20,50,100],ue=function(Q){var lt=Q.pageSizeOptions,st=lt===void 0?re:lt,ht=Q.locale,bt=Q.changeSize,He=Q.pageSize,Et=Q.goButton,pt=Q.quickGo,ft=Q.rootPrefixCls,Pt=Q.disabled,x=Q.buildOptionText,D=Q.showSizeChanger,Ye=Q.sizeChangerRender,W=y.useState(""),pe=(0,J.Z)(W,2),Bt=pe[0],Oe=pe[1],Ue=function(){return!Bt||Number.isNaN(Bt)?void 0:Number(Bt)},et=typeof x=="function"?x:function(en){return"".concat(en," ").concat(ht.items_per_page)},q=function(an){Oe(an.target.value)},ne=function(an){Et||Bt===""||(Oe(""),!(an.relatedTarget&&(an.relatedTarget.className.indexOf("".concat(ft,"-item-link"))>=0||an.relatedTarget.className.indexOf("".concat(ft,"-item"))>=0))&&(pt==null||pt(Ue())))},we=function(an){Bt!==""&&(an.keyCode===R.Z.ENTER||an.type==="click")&&(Oe(""),pt==null||pt(Ue()))},Fe=function(){return st.some(function(an){return an.toString()===He.toString()})?st:st.concat([He]).sort(function(an,Zn){var Rn=Number.isNaN(Number(an))?0:Number(an),Cn=Number.isNaN(Number(Zn))?0:Number(Zn);return Rn-Cn})},G="".concat(ft,"-options");if(!D&&!pt)return null;var St=null,Ee=null,Wt=null;return D&&Ye&&(St=Ye({disabled:Pt,size:He,onSizeChange:function(an){bt==null||bt(Number(an))},"aria-label":ht.page_size,className:"".concat(G,"-size-changer"),options:Fe().map(function(en){return{label:et(en),value:en}})})),pt&&(Et&&(Wt=typeof Et=="boolean"?y.createElement("button",{type:"button",onClick:we,onKeyUp:we,disabled:Pt,className:"".concat(G,"-quick-jumper-button")},ht.jump_to_confirm):y.createElement("span",{onClick:we,onKeyUp:we},Et)),Ee=y.createElement("div",{className:"".concat(G,"-quick-jumper")},ht.jump_to,y.createElement("input",{disabled:Pt,type:"text",value:Bt,onChange:q,onKeyUp:we,onBlur:ne,"aria-label":ht.page}),ht.page,Wt)),y.createElement("li",{className:G},St,Ee)},me=ue,Te=function(Q){var lt=Q.rootPrefixCls,st=Q.page,ht=Q.active,bt=Q.className,He=Q.showTitle,Et=Q.onClick,pt=Q.onKeyPress,ft=Q.itemRender,Pt="".concat(lt,"-item"),x=E()(Pt,"".concat(Pt,"-").concat(st),(0,w.Z)((0,w.Z)({},"".concat(Pt,"-active"),ht),"".concat(Pt,"-disabled"),!st),bt),D=function(){Et(st)},Ye=function(Bt){pt(Bt,Et,st)},W=ft(st,"page",y.createElement("a",{rel:"nofollow"},st));return W?y.createElement("li",{title:He?String(st):null,className:x,onClick:D,onKeyDown:Ye,tabIndex:0},W):null},Be=Te,Le=function(Q,lt,st){return st};function at(){}function ie(te){var Q=Number(te);return typeof Q=="number"&&!Number.isNaN(Q)&&isFinite(Q)&&Math.floor(Q)===Q}function K(te,Q,lt){var st=typeof te=="undefined"?Q:te;return Math.floor((lt-1)/st)+1}var I=function(Q){var lt=Q.prefixCls,st=lt===void 0?"rc-pagination":lt,ht=Q.selectPrefixCls,bt=ht===void 0?"rc-select":ht,He=Q.className,Et=Q.current,pt=Q.defaultCurrent,ft=pt===void 0?1:pt,Pt=Q.total,x=Pt===void 0?0:Pt,D=Q.pageSize,Ye=Q.defaultPageSize,W=Ye===void 0?10:Ye,pe=Q.onChange,Bt=pe===void 0?at:pe,Oe=Q.hideOnSinglePage,Ue=Q.align,et=Q.showPrevNextJumpers,q=et===void 0?!0:et,ne=Q.showQuickJumper,we=Q.showLessItems,Fe=Q.showTitle,G=Fe===void 0?!0:Fe,St=Q.onShowSizeChange,Ee=St===void 0?at:St,Wt=Q.locale,en=Wt===void 0?N.Z:Wt,an=Q.style,Zn=Q.totalBoundaryShowSizeChanger,Rn=Zn===void 0?50:Zn,Cn=Q.disabled,sr=Q.simple,dr=Q.showTotal,$n=Q.showSizeChanger,qn=$n===void 0?x>Rn:$n,ln=Q.sizeChangerRender,$t=Q.pageSizeOptions,Vt=Q.itemRender,An=Vt===void 0?Le:Vt,Xn=Q.jumpPrevIcon,Qe=Q.jumpNextIcon,Je=Q.prevIcon,ve=Q.nextIcon,Pe=y.useRef(null),Ge=(0,U.Z)(10,{value:D,defaultValue:W}),Ze=(0,J.Z)(Ge,2),ct=Ze[0],Ft=Ze[1],Xt=(0,U.Z)(1,{value:Et,defaultValue:ft,postState:function(xn){return Math.max(1,Math.min(xn,K(void 0,ct,x)))}}),qt=(0,J.Z)(Xt,2),Rt=qt[0],Zt=qt[1],mn=y.useState(Rt),Jt=(0,J.Z)(mn,2),je=Jt[0],nt=Jt[1];(0,y.useEffect)(function(){nt(Rt)},[Rt]);var Ct=Bt!==at,mt="current"in Q,xt=Math.max(1,Rt-(we?3:5)),It=Math.min(K(void 0,ct,x),Rt+(we?3:5));function Nt(Vn,xn){var Fr=Vn||y.createElement("button",{type:"button","aria-label":xn,className:"".concat(st,"-item-link")});return typeof Vn=="function"&&(Fr=y.createElement(Vn,(0,X.Z)({},Q))),Fr}function zt(Vn){var xn=Vn.target.value,Fr=K(void 0,ct,x),rn;return xn===""?rn=xn:Number.isNaN(Number(xn))?rn=je:xn>=Fr?rn=Fr:rn=Number(xn),rn}function nn(Vn){return ie(Vn)&&Vn!==Rt&&ie(x)&&x>0}var cn=x>ct?ne:!1;function zn(Vn){(Vn.keyCode===R.Z.UP||Vn.keyCode===R.Z.DOWN)&&Vn.preventDefault()}function gn(Vn){var xn=zt(Vn);switch(xn!==je&&nt(xn),Vn.keyCode){case R.Z.ENTER:En(xn);break;case R.Z.UP:En(xn-1);break;case R.Z.DOWN:En(xn+1);break;default:break}}function dn(Vn){En(zt(Vn))}function wn(Vn){var xn=K(Vn,ct,x),Fr=Rt>xn&&xn!==0?xn:Rt;Ft(Vn),nt(Fr),Ee==null||Ee(Rt,Vn),Zt(Fr),Bt==null||Bt(Fr,Vn)}function En(Vn){if(nn(Vn)&&!Cn){var xn=K(void 0,ct,x),Fr=Vn;return Vn>xn?Fr=xn:Vn<1&&(Fr=1),Fr!==je&&nt(Fr),Zt(Fr),Bt==null||Bt(Fr,ct),Fr}return Rt}var Ln=Rt>1,_n=Rt<K(void 0,ct,x);function Tn(){Ln&&En(Rt-1)}function kn(){_n&&En(Rt+1)}function Nn(){En(xt)}function On(){En(It)}function In(Vn,xn){if(Vn.key==="Enter"||Vn.charCode===R.Z.ENTER||Vn.keyCode===R.Z.ENTER){for(var Fr=arguments.length,rn=new Array(Fr>2?Fr-2:0),qr=2;qr<Fr;qr++)rn[qr-2]=arguments[qr];xn.apply(void 0,rn)}}function Dn(Vn){In(Vn,Tn)}function yn(Vn){In(Vn,kn)}function fr(Vn){In(Vn,Nn)}function _t(Vn){In(Vn,On)}function Pn(Vn){var xn=An(Vn,"prev",Nt(Je,"prev page"));return y.isValidElement(xn)?y.cloneElement(xn,{disabled:!Ln}):xn}function jn(Vn){var xn=An(Vn,"next",Nt(ve,"next page"));return y.isValidElement(xn)?y.cloneElement(xn,{disabled:!_n}):xn}function xr(Vn){(Vn.type==="click"||Vn.keyCode===R.Z.ENTER)&&En(je)}var pr=null,Rr=(0,z.Z)(Q,{aria:!0,data:!0}),Er=dr&&y.createElement("li",{className:"".concat(st,"-total-text")},dr(x,[x===0?0:(Rt-1)*ct+1,Rt*ct>x?x:Rt*ct])),vn=null,sn=K(void 0,ct,x);if(Oe&&x<=ct)return null;var Mt=[],jt={rootPrefixCls:st,onClick:En,onKeyPress:In,showTitle:G,itemRender:An,page:-1},un=Rt-1>0?Rt-1:0,bn=Rt+1<sn?Rt+1:sn,Mn=ne&&ne.goButton,Jn=(0,O.Z)(sr)==="object"?sr.readOnly:!sr,tn=Mn,Hn=null;sr&&(Mn&&(typeof Mn=="boolean"?tn=y.createElement("button",{type:"button",onClick:xr,onKeyUp:xr},en.jump_to_confirm):tn=y.createElement("span",{onClick:xr,onKeyUp:xr},Mn),tn=y.createElement("li",{title:G?"".concat(en.jump_to).concat(Rt,"/").concat(sn):null,className:"".concat(st,"-simple-pager")},tn)),Hn=y.createElement("li",{title:G?"".concat(Rt,"/").concat(sn):null,className:"".concat(st,"-simple-pager")},Jn?je:y.createElement("input",{type:"text","aria-label":en.jump_to,value:je,disabled:Cn,onKeyDown:zn,onKeyUp:gn,onChange:gn,onBlur:dn,size:3}),y.createElement("span",{className:"".concat(st,"-slash")},"/"),sn));var er=we?1:2;if(sn<=3+er*2){sn||Mt.push(y.createElement(Be,(0,ce.Z)({},jt,{key:"noPager",page:1,className:"".concat(st,"-item-disabled")})));for(var Tr=1;Tr<=sn;Tr+=1)Mt.push(y.createElement(Be,(0,ce.Z)({},jt,{key:Tr,page:Tr,active:Rt===Tr})))}else{var $r=we?en.prev_3:en.prev_5,Wr=we?en.next_3:en.next_5,br=An(xt,"jump-prev",Nt(Xn,"prev page")),Kr=An(It,"jump-next",Nt(Qe,"next page"));q&&(pr=br?y.createElement("li",{title:G?$r:null,key:"prev",onClick:Nn,tabIndex:0,onKeyDown:fr,className:E()("".concat(st,"-jump-prev"),(0,w.Z)({},"".concat(st,"-jump-prev-custom-icon"),!!Xn))},br):null,vn=Kr?y.createElement("li",{title:G?Wr:null,key:"next",onClick:On,tabIndex:0,onKeyDown:_t,className:E()("".concat(st,"-jump-next"),(0,w.Z)({},"".concat(st,"-jump-next-custom-icon"),!!Qe))},Kr):null);var Cr=Math.max(1,Rt-er),Hr=Math.min(Rt+er,sn);Rt-1<=er&&(Hr=1+er*2),sn-Rt<=er&&(Cr=sn-er*2);for(var Ir=Cr;Ir<=Hr;Ir+=1)Mt.push(y.createElement(Be,(0,ce.Z)({},jt,{key:Ir,page:Ir,active:Rt===Ir})));if(Rt-1>=er*2&&Rt!==3&&(Mt[0]=y.cloneElement(Mt[0],{className:E()("".concat(st,"-item-after-jump-prev"),Mt[0].props.className)}),Mt.unshift(pr)),sn-Rt>=er*2&&Rt!==sn-2){var Pr=Mt[Mt.length-1];Mt[Mt.length-1]=y.cloneElement(Pr,{className:E()("".concat(st,"-item-before-jump-next"),Pr.props.className)}),Mt.push(vn)}Cr!==1&&Mt.unshift(y.createElement(Be,(0,ce.Z)({},jt,{key:1,page:1}))),Hr!==sn&&Mt.push(y.createElement(Be,(0,ce.Z)({},jt,{key:sn,page:sn})))}var Mr=Pn(un);if(Mr){var Yr=!Ln||!sn;Mr=y.createElement("li",{title:G?en.prev_page:null,onClick:Tn,tabIndex:Yr?null:0,onKeyDown:Dn,className:E()("".concat(st,"-prev"),(0,w.Z)({},"".concat(st,"-disabled"),Yr)),"aria-disabled":Yr},Mr)}var ur=jn(bn);if(ur){var ei,Xr;sr?(ei=!_n,Xr=Ln?0:null):(ei=!_n||!sn,Xr=ei?null:0),ur=y.createElement("li",{title:G?en.next_page:null,onClick:kn,tabIndex:Xr,onKeyDown:yn,className:E()("".concat(st,"-next"),(0,w.Z)({},"".concat(st,"-disabled"),ei)),"aria-disabled":ei},ur)}var Qr=E()(st,He,(0,w.Z)((0,w.Z)((0,w.Z)((0,w.Z)((0,w.Z)({},"".concat(st,"-start"),Ue==="start"),"".concat(st,"-center"),Ue==="center"),"".concat(st,"-end"),Ue==="end"),"".concat(st,"-simple"),sr),"".concat(st,"-disabled"),Cn));return y.createElement("ul",(0,ce.Z)({className:Qr,style:an,ref:Pe},Rr),Er,Mr,sr?Hn:Mt,ur,y.createElement(me,{locale:en,rootPrefixCls:st,disabled:Cn,selectPrefixCls:bt,changeSize:wn,pageSize:ct,pageSizeOptions:$t,quickGo:cn?En:null,goButton:tn,showSizeChanger:qn,sizeChangerRender:ln}))},ee=I,V=b(61852),he=b(48755),S=b(31756),C=b(13783),Z=b(9017),ye=b(82326),Ve=b(57700),qe=b(36237),gt=b(53075),yt=b(64910),Dt=b(39082),Ut=b(63356),ot=b(51636),kt=b(16931);const tt=te=>{const{componentCls:Q}=te;return{[`${Q}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${Q}-item-link`]:{color:te.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${Q}-item-link`]:{color:te.colorTextDisabled,cursor:"not-allowed"}}},[`&${Q}-disabled`]:{cursor:"not-allowed",[`${Q}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:te.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:te.colorBorder,backgroundColor:te.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:te.itemActiveBgDisabled},a:{color:te.itemActiveColorDisabled}}},[`${Q}-item-link`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${Q}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${Q}-simple-pager`]:{color:te.colorTextDisabled},[`${Q}-jump-prev, ${Q}-jump-next`]:{[`${Q}-item-link-icon`]:{opacity:0},[`${Q}-item-ellipsis`]:{opacity:1}}},[`&${Q}-simple`]:{[`${Q}-prev, ${Q}-next`]:{[`&${Q}-disabled ${Q}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Gt=te=>{const{componentCls:Q}=te;return{[`&${Q}-mini ${Q}-total-text, &${Q}-mini ${Q}-simple-pager`]:{height:te.itemSizeSM,lineHeight:(0,qe.unit)(te.itemSizeSM)},[`&${Q}-mini ${Q}-item`]:{minWidth:te.itemSizeSM,height:te.itemSizeSM,margin:0,lineHeight:(0,qe.unit)(te.calc(te.itemSizeSM).sub(2).equal())},[`&${Q}-mini ${Q}-prev, &${Q}-mini ${Q}-next`]:{minWidth:te.itemSizeSM,height:te.itemSizeSM,margin:0,lineHeight:(0,qe.unit)(te.itemSizeSM)},[`&${Q}-mini:not(${Q}-disabled)`]:{[`${Q}-prev, ${Q}-next`]:{[`&:hover ${Q}-item-link`]:{backgroundColor:te.colorBgTextHover},[`&:active ${Q}-item-link`]:{backgroundColor:te.colorBgTextActive},[`&${Q}-disabled:hover ${Q}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${Q}-mini ${Q}-prev ${Q}-item-link,
|
|
|
&${Q}-mini ${Q}-next ${Q}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:te.itemSizeSM,lineHeight:(0,qe.unit)(te.itemSizeSM)}},[`&${Q}-mini ${Q}-jump-prev, &${Q}-mini ${Q}-jump-next`]:{height:te.itemSizeSM,marginInlineEnd:0,lineHeight:(0,qe.unit)(te.itemSizeSM)},[`&${Q}-mini ${Q}-options`]:{marginInlineStart:te.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:te.miniOptionsSizeChangerTop},"&-quick-jumper":{height:te.itemSizeSM,lineHeight:(0,qe.unit)(te.itemSizeSM),input:Object.assign(Object.assign({},(0,gt.x0)(te)),{width:te.paginationMiniQuickJumperInputWidth,height:te.controlHeightSM})}}}},Xe=te=>{const{componentCls:Q}=te;return{[`
|
|
|
&${Q}-simple ${Q}-prev,
|
|
|
&${Q}-simple ${Q}-next
|
|
|
`]:{height:te.itemSizeSM,lineHeight:(0,qe.unit)(te.itemSizeSM),verticalAlign:"top",[`${Q}-item-link`]:{height:te.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:te.colorBgTextHover},"&:active":{backgroundColor:te.colorBgTextActive},"&::after":{height:te.itemSizeSM,lineHeight:(0,qe.unit)(te.itemSizeSM)}}},[`&${Q}-simple ${Q}-simple-pager`]:{display:"inline-block",height:te.itemSizeSM,marginInlineEnd:te.marginXS,input:{boxSizing:"border-box",height:"100%",padding:`0 ${(0,qe.unit)(te.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:te.itemInputBg,border:`${(0,qe.unit)(te.lineWidth)} ${te.lineType} ${te.colorBorder}`,borderRadius:te.borderRadius,outline:"none",transition:`border-color ${te.motionDurationMid}`,color:"inherit","&:hover":{borderColor:te.colorPrimary},"&:focus":{borderColor:te.colorPrimaryHover,boxShadow:`${(0,qe.unit)(te.inputOutlineOffset)} 0 ${(0,qe.unit)(te.controlOutlineWidth)} ${te.controlOutline}`},"&[disabled]":{color:te.colorTextDisabled,backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,cursor:"not-allowed"}}}}},Ke=te=>{const{componentCls:Q}=te;return{[`${Q}-jump-prev, ${Q}-jump-next`]:{outline:0,[`${Q}-item-container`]:{position:"relative",[`${Q}-item-link-icon`]:{color:te.colorPrimary,fontSize:te.fontSizeSM,opacity:0,transition:`all ${te.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${Q}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:te.colorTextDisabled,letterSpacing:te.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:te.paginationEllipsisTextIndent,opacity:1,transition:`all ${te.motionDurationMid}`}},"&:hover":{[`${Q}-item-link-icon`]:{opacity:1},[`${Q}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${Q}-prev,
|
|
|
${Q}-jump-prev,
|
|
|
${Q}-jump-next
|
|
|
`]:{marginInlineEnd:te.marginXS},[`
|
|
|
${Q}-prev,
|
|
|
${Q}-next,
|
|
|
${Q}-jump-prev,
|
|
|
${Q}-jump-next
|
|
|
`]:{display:"inline-block",minWidth:te.itemSize,height:te.itemSize,color:te.colorText,fontFamily:te.fontFamily,lineHeight:(0,qe.unit)(te.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}`},[`${Q}-prev, ${Q}-next`]:{outline:0,button:{color:te.colorText,cursor:"pointer",userSelect:"none"},[`${Q}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:te.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${(0,qe.unit)(te.lineWidth)} ${te.lineType} transparent`,borderRadius:te.borderRadius,outline:"none",transition:`all ${te.motionDurationMid}`},[`&:hover ${Q}-item-link`]:{backgroundColor:te.colorBgTextHover},[`&:active ${Q}-item-link`]:{backgroundColor:te.colorBgTextActive},[`&${Q}-disabled:hover`]:{[`${Q}-item-link`]:{backgroundColor:"transparent"}}},[`${Q}-slash`]:{marginInlineEnd:te.paginationSlashMarginInlineEnd,marginInlineStart:te.paginationSlashMarginInlineStart},[`${Q}-options`]:{display:"inline-block",marginInlineStart:te.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:te.controlHeight,marginInlineStart:te.marginXS,lineHeight:(0,qe.unit)(te.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},(0,gt.ik)(te)),(0,Dt.$U)(te,{borderColor:te.colorBorder,hoverBorderColor:te.colorPrimaryHover,activeBorderColor:te.colorPrimary,activeShadow:te.activeShadow})),{"&[disabled]":Object.assign({},(0,Dt.Xy)(te)),width:te.calc(te.controlHeightLG).mul(1.25).equal(),height:te.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:te.marginXS,marginInlineEnd:te.marginXS})}}}},Ae=te=>{const{componentCls:Q}=te;return{[`${Q}-item`]:{display:"inline-block",minWidth:te.itemSize,height:te.itemSize,marginInlineEnd:te.marginXS,fontFamily:te.fontFamily,lineHeight:(0,qe.unit)(te.calc(te.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:te.itemBg,border:`${(0,qe.unit)(te.lineWidth)} ${te.lineType} transparent`,borderRadius:te.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${(0,qe.unit)(te.paginationItemPaddingInline)}`,color:te.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${Q}-item-active)`]:{"&:hover":{transition:`all ${te.motionDurationMid}`,backgroundColor:te.colorBgTextHover},"&:active":{backgroundColor:te.colorBgTextActive}},"&-active":{fontWeight:te.fontWeightStrong,backgroundColor:te.itemActiveBg,borderColor:te.colorPrimary,a:{color:te.colorPrimary},"&:hover":{borderColor:te.colorPrimaryHover},"&:hover a":{color:te.colorPrimaryHover}}}}},xe=te=>{const{componentCls:Q}=te;return{[Q]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ut.Wf)(te)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${Q}-total-text`]:{display:"inline-block",height:te.itemSize,marginInlineEnd:te.marginXS,lineHeight:(0,qe.unit)(te.calc(te.itemSize).sub(2).equal()),verticalAlign:"middle"}}),Ae(te)),Ke(te)),Xe(te)),Gt(te)),tt(te)),{[`@media only screen and (max-width: ${te.screenLG}px)`]:{[`${Q}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${te.screenSM}px)`]:{[`${Q}-options`]:{display:"none"}}}),[`&${te.componentCls}-rtl`]:{direction:"rtl"}}},se=te=>{const{componentCls:Q}=te;return{[`${Q}:not(${Q}-disabled)`]:{[`${Q}-item`]:Object.assign({},(0,Ut.Qy)(te)),[`${Q}-jump-prev, ${Q}-jump-next`]:{"&:focus-visible":Object.assign({[`${Q}-item-link-icon`]:{opacity:1},[`${Q}-item-ellipsis`]:{opacity:0}},(0,Ut.oN)(te))},[`${Q}-prev, ${Q}-next`]:{[`&:focus-visible ${Q}-item-link`]:Object.assign({},(0,Ut.oN)(te))}}}},Ne=te=>Object.assign({itemBg:te.colorBgContainer,itemSize:te.controlHeight,itemSizeSM:te.controlHeightSM,itemActiveBg:te.colorBgContainer,itemLinkBg:te.colorBgContainer,itemActiveColorDisabled:te.colorTextDisabled,itemActiveBgDisabled:te.controlItemBgActiveDisabled,itemInputBg:te.colorBgContainer,miniOptionsSizeChangerTop:0},(0,yt.T)(te)),Ce=te=>(0,ot.mergeToken)(te,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:te.calc(te.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:te.calc(te.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:te.calc(te.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:te.calc(te.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:te.marginSM,paginationSlashMarginInlineEnd:te.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,yt.e)(te));var Se=(0,kt.I$)("Pagination",te=>{const Q=Ce(te);return[xe(Q),se(Q)]},Ne);const M=te=>{const{componentCls:Q}=te;return{[`${Q}${Q}-bordered${Q}-disabled:not(${Q}-mini)`]:{"&, &:hover":{[`${Q}-item-link`]:{borderColor:te.colorBorder}},"&:focus-visible":{[`${Q}-item-link`]:{borderColor:te.colorBorder}},[`${Q}-item, ${Q}-item-link`]:{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,[`&:hover:not(${Q}-item-active)`]:{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,a:{color:te.colorTextDisabled}},[`&${Q}-item-active`]:{backgroundColor:te.itemActiveBgDisabled}},[`${Q}-prev, ${Q}-next`]:{"&:hover button":{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder,color:te.colorTextDisabled},[`${Q}-item-link`]:{backgroundColor:te.colorBgContainerDisabled,borderColor:te.colorBorder}}},[`${Q}${Q}-bordered:not(${Q}-mini)`]:{[`${Q}-prev, ${Q}-next`]:{"&:hover button":{borderColor:te.colorPrimaryHover,backgroundColor:te.itemBg},[`${Q}-item-link`]:{backgroundColor:te.itemLinkBg,borderColor:te.colorBorder},[`&:hover ${Q}-item-link`]:{borderColor:te.colorPrimary,backgroundColor:te.itemBg,color:te.colorPrimary},[`&${Q}-disabled`]:{[`${Q}-item-link`]:{borderColor:te.colorBorder,color:te.colorTextDisabled}}},[`${Q}-item`]:{backgroundColor:te.itemBg,border:`${(0,qe.unit)(te.lineWidth)} ${te.lineType} ${te.colorBorder}`,[`&:hover:not(${Q}-item-active)`]:{borderColor:te.colorPrimary,backgroundColor:te.itemBg,a:{color:te.colorPrimary}},"&-active":{borderColor:te.colorPrimary}}}}};var fe=(0,kt.bk)(["Pagination","bordered"],te=>{const Q=Ce(te);return[M(Q)]},Ne);function _e(te){return(0,y.useMemo)(()=>typeof te=="boolean"?[te,{}]:te&&typeof te=="object"?[!0,te]:[void 0,void 0],[te])}var Re=function(te,Q){var lt={};for(var st in te)Object.prototype.hasOwnProperty.call(te,st)&&Q.indexOf(st)<0&&(lt[st]=te[st]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,st=Object.getOwnPropertySymbols(te);ht<st.length;ht++)Q.indexOf(st[ht])<0&&Object.prototype.propertyIsEnumerable.call(te,st[ht])&&(lt[st[ht]]=te[st[ht]]);return lt},rt=te=>{const{align:Q,prefixCls:lt,selectPrefixCls:st,className:ht,rootClassName:bt,style:He,size:Et,locale:pt,responsive:ft,showSizeChanger:Pt,selectComponentClass:x,pageSizeOptions:D}=te,Ye=Re(te,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:W}=(0,C.Z)(ft),[,pe]=(0,Ve.ZP)(),{getPrefixCls:Bt,direction:Oe,showSizeChanger:Ue,className:et,style:q}=(0,he.dj)("pagination"),ne=Bt("pagination",lt),[we,Fe,G]=Se(ne),St=(0,S.Z)(Et),Ee=St==="small"||!!(W&&!St&&ft),[Wt]=(0,Z.Z)("Pagination",V.Z),en=Object.assign(Object.assign({},Wt),pt),[an,Zn]=_e(Pt),[Rn,Cn]=_e(Ue),sr=an!=null?an:Rn,dr=Zn!=null?Zn:Cn,$n=x||ye.default,qn=y.useMemo(()=>D?D.map(Qe=>Number(Qe)):void 0,[D]),ln=Qe=>{var Je;const{disabled:ve,size:Pe,onSizeChange:Ge,"aria-label":Ze,className:ct,options:Ft}=Qe,{className:Xt,onChange:qt}=dr||{},Rt=(Je=Ft.find(Zt=>String(Zt.value)===String(Pe)))===null||Je===void 0?void 0:Je.value;return y.createElement($n,Object.assign({disabled:ve,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:Zt=>Zt.parentNode,"aria-label":Ze,options:Ft},dr,{value:Rt,onChange:(Zt,mn)=>{Ge==null||Ge(Zt),qt==null||qt(Zt,mn)},size:Ee?"small":"middle",className:E()(ct,Xt)}))},$t=y.useMemo(()=>{const Qe=y.createElement("span",{className:`${ne}-item-ellipsis`},"\u2022\u2022\u2022"),Je=y.createElement("button",{className:`${ne}-item-link`,type:"button",tabIndex:-1},Oe==="rtl"?y.createElement(F.Z,null):y.createElement(A.Z,null)),ve=y.createElement("button",{className:`${ne}-item-link`,type:"button",tabIndex:-1},Oe==="rtl"?y.createElement(A.Z,null):y.createElement(F.Z,null)),Pe=y.createElement("a",{className:`${ne}-item-link`},y.createElement("div",{className:`${ne}-item-container`},Oe==="rtl"?y.createElement(l.Z,{className:`${ne}-item-link-icon`}):y.createElement(le,{className:`${ne}-item-link-icon`}),Qe)),Ge=y.createElement("a",{className:`${ne}-item-link`},y.createElement("div",{className:`${ne}-item-container`},Oe==="rtl"?y.createElement(le,{className:`${ne}-item-link-icon`}):y.createElement(l.Z,{className:`${ne}-item-link-icon`}),Qe));return{prevIcon:Je,nextIcon:ve,jumpPrevIcon:Pe,jumpNextIcon:Ge}},[Oe,ne]),Vt=Bt("select",st),An=E()({[`${ne}-${Q}`]:!!Q,[`${ne}-mini`]:Ee,[`${ne}-rtl`]:Oe==="rtl",[`${ne}-bordered`]:pe.wireframe},et,ht,bt,Fe,G),Xn=Object.assign(Object.assign({},q),He);return we(y.createElement(y.Fragment,null,pe.wireframe&&y.createElement(fe,{prefixCls:ne}),y.createElement(ee,Object.assign({},$t,Ye,{style:Xn,prefixCls:ne,selectPrefixCls:Vt,className:An,locale:en,pageSizeOptions:qn,showSizeChanger:sr,sizeChangerRender:ln}))))},it=rt},82326:function(fn,ut,b){"use strict";var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(37463),$=b(2738),p=b(75030),ge=b(86641),le=b(45915),l=b(82855),A=b(48755),F=b(38406),_=b(2171),E=b(83397),w=b(31756),O=b(56553),X=b(24971),J=b(70045),U=b(57700),R=b(1722),z=b(90376),P=b(68525),N=b(90005),re=function(Le,at){var ie={};for(var K in Le)Object.prototype.hasOwnProperty.call(Le,K)&&at.indexOf(K)<0&&(ie[K]=Le[K]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,K=Object.getOwnPropertySymbols(Le);I<K.length;I++)at.indexOf(K[I])<0&&Object.prototype.propertyIsEnumerable.call(Le,K[I])&&(ie[K[I]]=Le[K[I]]);return ie};const ue="SECRET_COMBOBOX_MODE_DO_NOT_USE",me=(Le,at)=>{var ie;const{prefixCls:K,bordered:I,className:ee,rootClassName:V,getPopupContainer:he,popupClassName:S,dropdownClassName:C,listHeight:Z=256,placement:ye,listItemHeight:Ve,size:qe,disabled:gt,notFoundContent:yt,status:Dt,builtinPlacements:Ut,dropdownMatchSelectWidth:ot,popupMatchSelectWidth:kt,direction:tt,style:Gt,allowClear:Xe,variant:Ke,dropdownStyle:Ae,transitionName:xe,tagRender:se,maxCount:Ne,prefix:Ce}=Le,Se=re(Le,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:M,getPrefixCls:fe,renderEmpty:_e,direction:Re,virtual:$e,popupMatchSelectWidth:rt,popupOverflow:it}=y.useContext(A.E_),te=(0,A.dj)("select"),[,Q]=(0,U.ZP)(),lt=Ve!=null?Ve:Q==null?void 0:Q.controlHeight,st=fe("select",K),ht=fe(),bt=tt!=null?tt:Re,{compactSize:He,compactItemClassnames:Et}=(0,J.ri)(st,bt),[pt,ft]=(0,X.Z)("select",Ke,I),Pt=(0,E.Z)(st),[x,D,Ye]=(0,z.Z)(st,Pt),W=y.useMemo(()=>{const{mode:ln}=Le;if(ln!=="combobox")return ln===ue?"combobox":ln},[Le.mode]),pe=W==="multiple"||W==="tags",Bt=(0,N.Z)(Le.suffixIcon,Le.showArrow),Oe=(ie=kt!=null?kt:ot)!==null&&ie!==void 0?ie:rt,{status:Ue,hasFeedback:et,isFormItemInput:q,feedbackIcon:ne}=y.useContext(O.aM),we=(0,l.F)(Ue,Dt);let Fe;yt!==void 0?Fe=yt:W==="combobox"?Fe=null:Fe=(_e==null?void 0:_e("Select"))||y.createElement(F.Z,{componentName:"Select"});const{suffixIcon:G,itemIcon:St,removeIcon:Ee,clearIcon:Wt}=(0,P.Z)(Object.assign(Object.assign({},Se),{multiple:pe,hasFeedback:et,feedbackIcon:ne,showSuffixIcon:Bt,prefixCls:st,componentName:"Select"})),en=Xe===!0?{clearIcon:Wt}:Xe,an=(0,$.Z)(Se,["suffixIcon","itemIcon"]),Zn=Y()(S||C,{[`${st}-dropdown-${bt}`]:bt==="rtl"},V,Ye,Pt,D),Rn=(0,w.Z)(ln=>{var $t;return($t=qe!=null?qe:He)!==null&&$t!==void 0?$t:ln}),Cn=y.useContext(_.Z),sr=gt!=null?gt:Cn,dr=Y()({[`${st}-lg`]:Rn==="large",[`${st}-sm`]:Rn==="small",[`${st}-rtl`]:bt==="rtl",[`${st}-${pt}`]:ft,[`${st}-in-form-item`]:q},(0,l.Z)(st,we,et),Et,te.className,ee,V,Ye,Pt,D),$n=y.useMemo(()=>ye!==void 0?ye:bt==="rtl"?"bottomRight":"bottomLeft",[ye,bt]),[qn]=(0,p.Cn)("SelectLike",Ae==null?void 0:Ae.zIndex);return x(y.createElement(de.ZP,Object.assign({ref:at,virtual:$e,showSearch:te.showSearch},an,{style:Object.assign(Object.assign({},te.style),Gt),dropdownMatchSelectWidth:Oe,transitionName:(0,ge.m)(ht,"slide-up",xe),builtinPlacements:(0,R.Z)(Ut,it),listHeight:Z,listItemHeight:lt,mode:W,prefixCls:st,placement:$n,direction:bt,prefix:Ce,suffixIcon:G,menuItemSelectedIcon:St,removeIcon:Ee,allowClear:en,notFoundContent:Fe,className:dr,getPopupContainer:he||M,dropdownClassName:Zn,disabled:sr,dropdownStyle:Object.assign(Object.assign({},Ae),{zIndex:qn}),maxCount:pe?Ne:void 0,tagRender:pe?se:void 0})))},Te=y.forwardRef(me),Be=(0,le.Z)(Te,"dropdownAlign");Te.SECRET_COMBOBOX_MODE_DO_NOT_USE=ue,Te.Option=de.Wx,Te.OptGroup=de.Xo,Te._InternalPanelDoNotUseOrYouWillBeFired=Be,ut.default=Te},1722:function(fn,ut){"use strict";const b=ce=>{const de={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:ce==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},de),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},de),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},de),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},de),{points:["br","tr"],offset:[0,-4]})}};function y(ce,Y){return ce||b(Y)}ut.Z=y},90376:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return K}});var y=b(63356),ce=b(56119),Y=b(16931),de=b(51636),$=b(46e3),p=b(93873);const ge=I=>{const{optionHeight:ee,optionFontSize:V,optionLineHeight:he,optionPadding:S}=I;return{position:"relative",display:"block",minHeight:ee,padding:S,color:I.colorText,fontWeight:"normal",fontSize:V,lineHeight:he,boxSizing:"border-box"}};var l=I=>{const{antCls:ee,componentCls:V}=I,he=`${V}-item`,S=`&${ee}-slide-up-enter${ee}-slide-up-enter-active`,C=`&${ee}-slide-up-appear${ee}-slide-up-appear-active`,Z=`&${ee}-slide-up-leave${ee}-slide-up-leave-active`,ye=`${V}-dropdown-placement-`,Ve=`${he}-option-selected`;return[{[`${V}-dropdown`]:Object.assign(Object.assign({},(0,y.Wf)(I)),{position:"absolute",top:-9999,zIndex:I.zIndexPopup,boxSizing:"border-box",padding:I.paddingXXS,overflow:"hidden",fontSize:I.fontSize,fontVariant:"initial",backgroundColor:I.colorBgElevated,borderRadius:I.borderRadiusLG,outline:"none",boxShadow:I.boxShadowSecondary,[`
|
|
|
${S}${ye}bottomLeft,
|
|
|
${C}${ye}bottomLeft
|
|
|
`]:{animationName:$.fJ},[`
|
|
|
${S}${ye}topLeft,
|
|
|
${C}${ye}topLeft,
|
|
|
${S}${ye}topRight,
|
|
|
${C}${ye}topRight
|
|
|
`]:{animationName:$.Qt},[`${Z}${ye}bottomLeft`]:{animationName:$.Uw},[`
|
|
|
${Z}${ye}topLeft,
|
|
|
${Z}${ye}topRight
|
|
|
`]:{animationName:$.ly},"&-hidden":{display:"none"},[he]:Object.assign(Object.assign({},ge(I)),{cursor:"pointer",transition:`background ${I.motionDurationSlow} ease`,borderRadius:I.borderRadiusSM,"&-group":{color:I.colorTextDescription,fontSize:I.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},y.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${he}-option-disabled)`]:{backgroundColor:I.optionActiveBg},[`&-selected:not(${he}-option-disabled)`]:{color:I.optionSelectedColor,fontWeight:I.optionSelectedFontWeight,backgroundColor:I.optionSelectedBg,[`${he}-option-state`]:{color:I.colorPrimary}},"&-disabled":{[`&${he}-option-selected`]:{backgroundColor:I.colorBgContainerDisabled},color:I.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:I.calc(I.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},ge(I)),{color:I.colorTextDisabled})}),[`${Ve}:has(+ ${Ve})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${Ve}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},(0,$.oN)(I,"slide-up"),(0,$.oN)(I,"slide-down"),(0,p.Fm)(I,"move-up"),(0,p.Fm)(I,"move-down")]},A=b(26743),F=b(36237);function _(I,ee){const{componentCls:V,inputPaddingHorizontalBase:he,borderRadius:S}=I,C=I.calc(I.controlHeight).sub(I.calc(I.lineWidth).mul(2)).equal(),Z=ee?`${V}-${ee}`:"";return{[`${V}-single${Z}`]:{fontSize:I.fontSize,height:I.controlHeight,[`${V}-selector`]:Object.assign(Object.assign({},(0,y.Wf)(I,!0)),{display:"flex",borderRadius:S,flex:"1 1 auto",[`${V}-selection-wrap:after`]:{lineHeight:(0,F.unit)(C)},[`${V}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
|
${V}-selection-item,
|
|
|
${V}-selection-placeholder
|
|
|
`]:{display:"block",padding:0,lineHeight:(0,F.unit)(C),transition:`all ${I.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${V}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${V}-selection-item:empty:after`,`${V}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${V}-show-arrow ${V}-selection-item,
|
|
|
&${V}-show-arrow ${V}-selection-search,
|
|
|
&${V}-show-arrow ${V}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:I.showArrowPaddingInlineEnd},[`&${V}-open ${V}-selection-item`]:{color:I.colorTextPlaceholder},[`&:not(${V}-customize-input)`]:{[`${V}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${(0,F.unit)(he)}`,[`${V}-selection-search-input`]:{height:C,fontSize:I.fontSize},"&:after":{lineHeight:(0,F.unit)(C)}}},[`&${V}-customize-input`]:{[`${V}-selector`]:{"&:after":{display:"none"},[`${V}-selection-search`]:{position:"static",width:"100%"},[`${V}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${(0,F.unit)(he)}`,"&:after":{display:"none"}}}}}}}function E(I){const{componentCls:ee}=I,V=I.calc(I.controlPaddingHorizontalSM).sub(I.lineWidth).equal();return[_(I),_((0,de.mergeToken)(I,{controlHeight:I.controlHeightSM,borderRadius:I.borderRadiusSM}),"sm"),{[`${ee}-single${ee}-sm`]:{[`&:not(${ee}-customize-input)`]:{[`${ee}-selector`]:{padding:`0 ${(0,F.unit)(V)}`},[`&${ee}-show-arrow ${ee}-selection-search`]:{insetInlineEnd:I.calc(V).add(I.calc(I.fontSize).mul(1.5)).equal()},[`
|
|
|
&${ee}-show-arrow ${ee}-selection-item,
|
|
|
&${ee}-show-arrow ${ee}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:I.calc(I.fontSize).mul(1.5).equal()}}}},_((0,de.mergeToken)(I,{controlHeight:I.singleItemHeightLG,fontSize:I.fontSizeLG,borderRadius:I.borderRadiusLG}),"lg")]}const w=I=>{const{fontSize:ee,lineHeight:V,lineWidth:he,controlHeight:S,controlHeightSM:C,controlHeightLG:Z,paddingXXS:ye,controlPaddingHorizontal:Ve,zIndexPopupBase:qe,colorText:gt,fontWeightStrong:yt,controlItemBgActive:Dt,controlItemBgHover:Ut,colorBgContainer:ot,colorFillSecondary:kt,colorBgContainerDisabled:tt,colorTextDisabled:Gt,colorPrimaryHover:Xe,colorPrimary:Ke,controlOutline:Ae}=I,xe=ye*2,se=he*2,Ne=Math.min(S-xe,S-se),Ce=Math.min(C-xe,C-se),Se=Math.min(Z-xe,Z-se);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(ye/2),zIndexPopup:qe+50,optionSelectedColor:gt,optionSelectedFontWeight:yt,optionSelectedBg:Dt,optionActiveBg:Ut,optionPadding:`${(S-ee*V)/2}px ${Ve}px`,optionFontSize:ee,optionLineHeight:V,optionHeight:S,selectorBg:ot,clearBg:ot,singleItemHeightLG:Z,multipleItemBg:kt,multipleItemBorderColor:"transparent",multipleItemHeight:Ne,multipleItemHeightSM:Ce,multipleItemHeightLG:Se,multipleSelectorBgDisabled:tt,multipleItemColorDisabled:Gt,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(I.fontSize*1.25),hoverBorderColor:Xe,activeBorderColor:Ke,activeOutlineColor:Ae,selectAffixPadding:ye}},O=(I,ee)=>{const{componentCls:V,antCls:he,controlOutlineWidth:S}=I;return{[`&:not(${V}-customize-input) ${V}-selector`]:{border:`${(0,F.unit)(I.lineWidth)} ${I.lineType} ${ee.borderColor}`,background:I.selectorBg},[`&:not(${V}-disabled):not(${V}-customize-input):not(${he}-pagination-size-changer)`]:{[`&:hover ${V}-selector`]:{borderColor:ee.hoverBorderHover},[`${V}-focused& ${V}-selector`]:{borderColor:ee.activeBorderColor,boxShadow:`0 0 0 ${(0,F.unit)(S)} ${ee.activeOutlineColor}`,outline:0},[`${V}-prefix`]:{color:ee.color}}}},X=(I,ee)=>({[`&${I.componentCls}-status-${ee.status}`]:Object.assign({},O(I,ee))}),J=I=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},O(I,{borderColor:I.colorBorder,hoverBorderHover:I.hoverBorderColor,activeBorderColor:I.activeBorderColor,activeOutlineColor:I.activeOutlineColor,color:I.colorText})),X(I,{status:"error",borderColor:I.colorError,hoverBorderHover:I.colorErrorHover,activeBorderColor:I.colorError,activeOutlineColor:I.colorErrorOutline,color:I.colorError})),X(I,{status:"warning",borderColor:I.colorWarning,hoverBorderHover:I.colorWarningHover,activeBorderColor:I.colorWarning,activeOutlineColor:I.colorWarningOutline,color:I.colorWarning})),{[`&${I.componentCls}-disabled`]:{[`&:not(${I.componentCls}-customize-input) ${I.componentCls}-selector`]:{background:I.colorBgContainerDisabled,color:I.colorTextDisabled}},[`&${I.componentCls}-multiple ${I.componentCls}-selection-item`]:{background:I.multipleItemBg,border:`${(0,F.unit)(I.lineWidth)} ${I.lineType} ${I.multipleItemBorderColor}`}})}),U=(I,ee)=>{const{componentCls:V,antCls:he}=I;return{[`&:not(${V}-customize-input) ${V}-selector`]:{background:ee.bg,border:`${(0,F.unit)(I.lineWidth)} ${I.lineType} transparent`,color:ee.color},[`&:not(${V}-disabled):not(${V}-customize-input):not(${he}-pagination-size-changer)`]:{[`&:hover ${V}-selector`]:{background:ee.hoverBg},[`${V}-focused& ${V}-selector`]:{background:I.selectorBg,borderColor:ee.activeBorderColor,outline:0}}}},R=(I,ee)=>({[`&${I.componentCls}-status-${ee.status}`]:Object.assign({},U(I,ee))}),z=I=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},U(I,{bg:I.colorFillTertiary,hoverBg:I.colorFillSecondary,activeBorderColor:I.activeBorderColor,color:I.colorText})),R(I,{status:"error",bg:I.colorErrorBg,hoverBg:I.colorErrorBgHover,activeBorderColor:I.colorError,color:I.colorError})),R(I,{status:"warning",bg:I.colorWarningBg,hoverBg:I.colorWarningBgHover,activeBorderColor:I.colorWarning,color:I.colorWarning})),{[`&${I.componentCls}-disabled`]:{[`&:not(${I.componentCls}-customize-input) ${I.componentCls}-selector`]:{borderColor:I.colorBorder,background:I.colorBgContainerDisabled,color:I.colorTextDisabled}},[`&${I.componentCls}-multiple ${I.componentCls}-selection-item`]:{background:I.colorBgContainer,border:`${(0,F.unit)(I.lineWidth)} ${I.lineType} ${I.colorSplit}`}})}),P=I=>({"&-borderless":{[`${I.componentCls}-selector`]:{background:"transparent",border:`${(0,F.unit)(I.lineWidth)} ${I.lineType} transparent`},[`&${I.componentCls}-disabled`]:{[`&:not(${I.componentCls}-customize-input) ${I.componentCls}-selector`]:{color:I.colorTextDisabled}},[`&${I.componentCls}-multiple ${I.componentCls}-selection-item`]:{background:I.multipleItemBg,border:`${(0,F.unit)(I.lineWidth)} ${I.lineType} ${I.multipleItemBorderColor}`},[`&${I.componentCls}-status-error`]:{[`${I.componentCls}-prefix, ${I.componentCls}-selection-item`]:{color:I.colorError}},[`&${I.componentCls}-status-warning`]:{[`${I.componentCls}-prefix, ${I.componentCls}-selection-item`]:{color:I.colorWarning}}}}),N=(I,ee)=>{const{componentCls:V,antCls:he}=I;return{[`&:not(${V}-customize-input) ${V}-selector`]:{borderWidth:`0 0 ${(0,F.unit)(I.lineWidth)} 0`,borderStyle:`none none ${I.lineType} none`,borderColor:ee.borderColor,background:I.selectorBg,borderRadius:0},[`&:not(${V}-disabled):not(${V}-customize-input):not(${he}-pagination-size-changer)`]:{[`&:hover ${V}-selector`]:{borderColor:ee.hoverBorderHover},[`${V}-focused& ${V}-selector`]:{borderColor:ee.activeBorderColor,outline:0},[`${V}-prefix`]:{color:ee.color}}}},re=(I,ee)=>({[`&${I.componentCls}-status-${ee.status}`]:Object.assign({},N(I,ee))}),ue=I=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},N(I,{borderColor:I.colorBorder,hoverBorderHover:I.hoverBorderColor,activeBorderColor:I.activeBorderColor,activeOutlineColor:I.activeOutlineColor,color:I.colorText})),re(I,{status:"error",borderColor:I.colorError,hoverBorderHover:I.colorErrorHover,activeBorderColor:I.colorError,activeOutlineColor:I.colorErrorOutline,color:I.colorError})),re(I,{status:"warning",borderColor:I.colorWarning,hoverBorderHover:I.colorWarningHover,activeBorderColor:I.colorWarning,activeOutlineColor:I.colorWarningOutline,color:I.colorWarning})),{[`&${I.componentCls}-disabled`]:{[`&:not(${I.componentCls}-customize-input) ${I.componentCls}-selector`]:{color:I.colorTextDisabled}},[`&${I.componentCls}-multiple ${I.componentCls}-selection-item`]:{background:I.multipleItemBg,border:`${(0,F.unit)(I.lineWidth)} ${I.lineType} ${I.multipleItemBorderColor}`}})});var Te=I=>({[I.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},J(I)),z(I)),P(I)),ue(I))});const Be=I=>{const{componentCls:ee}=I;return{position:"relative",transition:`all ${I.motionDurationMid} ${I.motionEaseInOut}`,input:{cursor:"pointer"},[`${ee}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${ee}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Le=I=>{const{componentCls:ee}=I;return{[`${ee}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},at=I=>{const{antCls:ee,componentCls:V,inputPaddingHorizontalBase:he,iconCls:S}=I;return{[V]:Object.assign(Object.assign({},(0,y.Wf)(I)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${V}-customize-input) ${V}-selector`]:Object.assign(Object.assign({},Be(I)),Le(I)),[`${V}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},y.vS),{[`> ${ee}-typography`]:{display:"inline"}}),[`${V}-selection-placeholder`]:Object.assign(Object.assign({},y.vS),{flex:1,color:I.colorTextPlaceholder,pointerEvents:"none"}),[`${V}-arrow`]:Object.assign(Object.assign({},(0,y.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:he,height:I.fontSizeIcon,marginTop:I.calc(I.fontSizeIcon).mul(-1).div(2).equal(),color:I.colorTextQuaternary,fontSize:I.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${I.motionDurationSlow} ease`,[S]:{verticalAlign:"top",transition:`transform ${I.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${V}-suffix)`]:{pointerEvents:"auto"}},[`${V}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${V}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${V}-prefix`]:{flex:"none",marginInlineEnd:I.selectAffixPadding},[`${V}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:he,zIndex:1,display:"inline-block",width:I.fontSizeIcon,height:I.fontSizeIcon,marginTop:I.calc(I.fontSizeIcon).mul(-1).div(2).equal(),color:I.colorTextQuaternary,fontSize:I.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${I.motionDurationMid} ease, opacity ${I.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:I.colorTextTertiary}},[`&:hover ${V}-clear`]:{opacity:1,background:I.colorBgBase,borderRadius:"50%"}}),[`${V}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${V}-has-feedback`]:{[`${V}-clear`]:{insetInlineEnd:I.calc(he).add(I.fontSize).add(I.paddingXS).equal()}}}}}},ie=I=>{const{componentCls:ee}=I;return[{[ee]:{[`&${ee}-in-form-item`]:{width:"100%"}}},at(I),E(I),(0,A.ZP)(I),l(I),{[`${ee}-rtl`]:{direction:"rtl"}},(0,ce.c)(I,{borderElCls:`${ee}-selector`,focusElCls:`${ee}-focused`})]};var K=(0,Y.I$)("Select",(I,ee)=>{let{rootPrefixCls:V}=ee;const he=(0,de.mergeToken)(I,{rootPrefixCls:V,inputPaddingHorizontalBase:I.calc(I.paddingSM).sub(1).equal(),multipleSelectItemHeight:I.multipleItemHeight,selectHeight:I.controlHeight});return[ie(he),Te(he)]},w,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}})},26743:function(fn,ut,b){"use strict";b.d(ut,{_z:function(){return p},gp:function(){return de}});var y=b(36237),ce=b(63356),Y=b(51636);const de=A=>{const{multipleSelectItemHeight:F,paddingXXS:_,lineWidth:E,INTERNAL_FIXED_ITEM_MARGIN:w}=A,O=A.max(A.calc(_).sub(E).equal(),0),X=A.max(A.calc(O).sub(w).equal(),0);return{basePadding:O,containerPadding:X,itemHeight:(0,y.unit)(F),itemLineHeight:(0,y.unit)(A.calc(F).sub(A.calc(A.lineWidth).mul(2)).equal())}},$=A=>{const{multipleSelectItemHeight:F,selectHeight:_,lineWidth:E}=A;return A.calc(_).sub(F).div(2).sub(E).equal()},p=A=>{const{componentCls:F,iconCls:_,borderRadiusSM:E,motionDurationSlow:w,paddingXS:O,multipleItemColorDisabled:X,multipleItemBorderColorDisabled:J,colorIcon:U,colorIconHover:R,INTERNAL_FIXED_ITEM_MARGIN:z}=A;return{[`${F}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${F}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:z,borderRadius:E,cursor:"default",transition:`font-size ${w}, line-height ${w}, height ${w}`,marginInlineEnd:A.calc(z).mul(2).equal(),paddingInlineStart:O,paddingInlineEnd:A.calc(O).div(2).equal(),[`${F}-disabled&`]:{color:X,borderColor:J,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:A.calc(O).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,ce.Ro)()),{display:"inline-flex",alignItems:"center",color:U,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${_}`]:{verticalAlign:"-0.2em"},"&:hover":{color:R}})}}}},ge=(A,F)=>{const{componentCls:_,INTERNAL_FIXED_ITEM_MARGIN:E}=A,w=`${_}-selection-overflow`,O=A.multipleSelectItemHeight,X=$(A),J=F?`${_}-${F}`:"",U=de(A);return{[`${_}-multiple${J}`]:Object.assign(Object.assign({},p(A)),{[`${_}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:U.basePadding,paddingBlock:U.containerPadding,borderRadius:A.borderRadius,[`${_}-disabled&`]:{background:A.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${(0,y.unit)(E)} 0`,lineHeight:(0,y.unit)(O),visibility:"hidden",content:'"\\a0"'}},[`${_}-selection-item`]:{height:U.itemHeight,lineHeight:(0,y.unit)(U.itemLineHeight)},[`${_}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:(0,y.unit)(O),marginBlock:E}},[`${_}-prefix`]:{marginInlineStart:A.calc(A.inputPaddingHorizontalBase).sub(U.basePadding).equal()},[`${w}-item + ${w}-item,
|
|
|
${_}-prefix + ${_}-selection-wrap
|
|
|
`]:{[`${_}-selection-search`]:{marginInlineStart:0},[`${_}-selection-placeholder`]:{insetInlineStart:0}},[`${w}-item-suffix`]:{minHeight:U.itemHeight,marginBlock:E},[`${_}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:A.calc(A.inputPaddingHorizontalBase).sub(X).equal(),"\n &-input,\n &-mirror\n ":{height:O,fontFamily:A.fontFamily,lineHeight:(0,y.unit)(O),transition:`all ${A.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${_}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:A.calc(A.inputPaddingHorizontalBase).sub(U.basePadding).equal(),insetInlineEnd:A.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${A.motionDurationSlow}`}})}};function le(A,F){const{componentCls:_}=A,E=F?`${_}-${F}`:"",w={[`${_}-multiple${E}`]:{fontSize:A.fontSize,[`${_}-selector`]:{[`${_}-show-search&`]:{cursor:"text"}},[`
|
|
|
&${_}-show-arrow ${_}-selector,
|
|
|
&${_}-allow-clear ${_}-selector
|
|
|
`]:{paddingInlineEnd:A.calc(A.fontSizeIcon).add(A.controlPaddingHorizontal).equal()}}};return[ge(A,F),w]}const l=A=>{const{componentCls:F}=A,_=(0,Y.mergeToken)(A,{selectHeight:A.controlHeightSM,multipleSelectItemHeight:A.multipleItemHeightSM,borderRadius:A.borderRadiusSM,borderRadiusSM:A.borderRadiusXS}),E=(0,Y.mergeToken)(A,{fontSize:A.fontSizeLG,selectHeight:A.controlHeightLG,multipleSelectItemHeight:A.multipleItemHeightLG,borderRadius:A.borderRadiusLG,borderRadiusSM:A.borderRadius});return[le(A),le(_,"sm"),{[`${F}-multiple${F}-sm`]:{[`${F}-selection-placeholder`]:{insetInline:A.calc(A.controlPaddingHorizontalSM).sub(A.lineWidth).equal()},[`${F}-selection-search`]:{marginInlineStart:2}}},le(E,"lg")]};ut.ZP=l},68525:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});var y=b(59301),ce=b(40001),Y=b(19248),de=b(99267),$=b(84105),p=b(58617),ge=b(47472);function le(l){let{suffixIcon:A,clearIcon:F,menuItemSelectedIcon:_,removeIcon:E,loading:w,multiple:O,hasFeedback:X,prefixCls:J,showSuffixIcon:U,feedbackIcon:R,showArrow:z,componentName:P}=l;const N=F!=null?F:y.createElement(Y.Z,null),re=Be=>A===null&&!X&&!z?null:y.createElement(y.Fragment,null,U!==!1&&Be,X&&R);let ue=null;if(A!==void 0)ue=re(A);else if(w)ue=re(y.createElement(p.Z,{spin:!0}));else{const Be=`${J}-suffix`;ue=Le=>{let{open:at,showSearch:ie}=Le;return re(at&&ie?y.createElement(ge.Z,{className:Be}):y.createElement($.Z,{className:Be}))}}let me=null;_!==void 0?me=_:O?me=y.createElement(ce.Z,null):me=null;let Te=null;return E!==void 0?Te=E:Te=y.createElement(de.Z,null),{clearIcon:N,suffixIcon:ue,itemIcon:me,removeIcon:Te}}},90005:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return y}});function y(ce,Y){return Y!==void 0?Y:ce!==null}},44104:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return X}});var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(11592),$=b(99402),p=b(48755),ge=b(70045);const le=y.createContext({latestIndex:0}),l=le.Provider;var F=J=>{let{className:U,index:R,children:z,split:P,style:N}=J;const{latestIndex:re}=y.useContext(le);return z==null?null:y.createElement(y.Fragment,null,y.createElement("div",{className:U,style:N},z),R<re&&P&&y.createElement("span",{className:`${U}-split`},P))},_=b(31547),E=function(J,U){var R={};for(var z in J)Object.prototype.hasOwnProperty.call(J,z)&&U.indexOf(z)<0&&(R[z]=J[z]);if(J!=null&&typeof Object.getOwnPropertySymbols=="function")for(var P=0,z=Object.getOwnPropertySymbols(J);P<z.length;P++)U.indexOf(z[P])<0&&Object.prototype.propertyIsEnumerable.call(J,z[P])&&(R[z[P]]=J[z[P]]);return R};const O=y.forwardRef((J,U)=>{var R;const{getPrefixCls:z,direction:P,size:N,className:re,style:ue,classNames:me,styles:Te}=(0,p.dj)("space"),{size:Be=N!=null?N:"small",align:Le,className:at,rootClassName:ie,children:K,direction:I="horizontal",prefixCls:ee,split:V,style:he,wrap:S=!1,classNames:C,styles:Z}=J,ye=E(J,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ve,qe]=Array.isArray(Be)?Be:[Be,Be],gt=(0,$.n)(qe),yt=(0,$.n)(Ve),Dt=(0,$.T)(qe),Ut=(0,$.T)(Ve),ot=(0,de.Z)(K,{keepEmpty:!0}),kt=Le===void 0&&I==="horizontal"?"center":Le,tt=z("space",ee),[Gt,Xe,Ke]=(0,_.Z)(tt),Ae=Y()(tt,re,Xe,`${tt}-${I}`,{[`${tt}-rtl`]:P==="rtl",[`${tt}-align-${kt}`]:kt,[`${tt}-gap-row-${qe}`]:gt,[`${tt}-gap-col-${Ve}`]:yt},at,ie,Ke),xe=Y()(`${tt}-item`,(R=C==null?void 0:C.item)!==null&&R!==void 0?R:me.item);let se=0;const Ne=ot.map((M,fe)=>{var _e;M!=null&&(se=fe);const Re=(M==null?void 0:M.key)||`${xe}-${fe}`;return y.createElement(F,{className:xe,key:Re,index:fe,split:V,style:(_e=Z==null?void 0:Z.item)!==null&&_e!==void 0?_e:Te.item},M)}),Ce=y.useMemo(()=>({latestIndex:se}),[se]);if(ot.length===0)return null;const Se={};return S&&(Se.flexWrap="wrap"),!yt&&Ut&&(Se.columnGap=Ve),!gt&&Dt&&(Se.rowGap=qe),Gt(y.createElement("div",Object.assign({ref:U,className:Ae,style:Object.assign(Object.assign(Object.assign({},Se),ue),he)},ye),y.createElement(l,{value:Ce},Ne)))});O.Compact=ge.ZP;var X=O},93873:function(fn,ut,b){"use strict";b.d(ut,{Fm:function(){return _}});var y=b(36237),ce=b(48746);const Y=new y.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),de=new y.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),$=new y.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),p=new y.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ge=new y.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),le=new y.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),l=new y.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A=new y.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),F={"move-up":{inKeyframes:l,outKeyframes:A},"move-down":{inKeyframes:Y,outKeyframes:de},"move-left":{inKeyframes:$,outKeyframes:p},"move-right":{inKeyframes:ge,outKeyframes:le}},_=(E,w)=>{const{antCls:O}=E,X=`${O}-${w}`,{inKeyframes:J,outKeyframes:U}=F[w];return[(0,ce.R)(X,J,U,E.motionDurationMid),{[`
|
|
|
${X}-enter,
|
|
|
${X}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:E.motionEaseOutCirc},[`${X}-leave`]:{animationTimingFunction:E.motionEaseInOutCirc}}]}},46e3:function(fn,ut,b){"use strict";b.d(ut,{Qt:function(){return $},Uw:function(){return de},fJ:function(){return Y},ly:function(){return p},oN:function(){return _}});var y=b(36237),ce=b(48746);const Y=new y.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),de=new y.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),$=new y.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),p=new y.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),ge=new y.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),le=new y.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),l=new y.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),A=new y.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),F={"slide-up":{inKeyframes:Y,outKeyframes:de},"slide-down":{inKeyframes:$,outKeyframes:p},"slide-left":{inKeyframes:ge,outKeyframes:le},"slide-right":{inKeyframes:l,outKeyframes:A}},_=(E,w)=>{const{antCls:O}=E,X=`${O}-${w}`,{inKeyframes:J,outKeyframes:U}=F[w];return[(0,ce.R)(X,J,U,E.motionDurationMid),{[`
|
|
|
${X}-enter,
|
|
|
${X}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:E.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${X}-leave`]:{animationTimingFunction:E.motionEaseInQuint}}]}},37645:function(fn,ut,b){"use strict";b.d(ut,{ZP:function(){return p},qN:function(){return Y},wZ:function(){return de}});var y=b(36237),ce=b(36305);const Y=8;function de(ge){const{contentRadius:le,limitVerticalRadius:l}=ge,A=le>12?le+2:12;return{arrowOffsetHorizontal:A,arrowOffsetVertical:l?Y:A}}function $(ge,le){return ge?le:{}}function p(ge,le,l){const{componentCls:A,boxShadowPopoverArrow:F,arrowOffsetVertical:_,arrowOffsetHorizontal:E}=ge,{arrowDistance:w=0,arrowPlacement:O={left:!0,right:!0,top:!0,bottom:!0}}=l||{};return{[A]:Object.assign(Object.assign(Object.assign(Object.assign({[`${A}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,ce.W)(ge,le,F)),{"&:before":{background:le}})]},$(!!O.top,{[[`&-placement-top > ${A}-arrow`,`&-placement-topLeft > ${A}-arrow`,`&-placement-topRight > ${A}-arrow`].join(",")]:{bottom:w,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${A}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":E,[`> ${A}-arrow`]:{left:{_skip_check_:!0,value:E}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,y.unit)(E)})`,[`> ${A}-arrow`]:{right:{_skip_check_:!0,value:E}}}})),$(!!O.bottom,{[[`&-placement-bottom > ${A}-arrow`,`&-placement-bottomLeft > ${A}-arrow`,`&-placement-bottomRight > ${A}-arrow`].join(",")]:{top:w,transform:"translateY(-100%)"},[`&-placement-bottom > ${A}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":E,[`> ${A}-arrow`]:{left:{_skip_check_:!0,value:E}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,y.unit)(E)})`,[`> ${A}-arrow`]:{right:{_skip_check_:!0,value:E}}}})),$(!!O.left,{[[`&-placement-left > ${A}-arrow`,`&-placement-leftTop > ${A}-arrow`,`&-placement-leftBottom > ${A}-arrow`].join(",")]:{right:{_skip_check_:!0,value:w},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${A}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${A}-arrow`]:{top:_},[`&-placement-leftBottom > ${A}-arrow`]:{bottom:_}})),$(!!O.right,{[[`&-placement-right > ${A}-arrow`,`&-placement-rightTop > ${A}-arrow`,`&-placement-rightBottom > ${A}-arrow`].join(",")]:{left:{_skip_check_:!0,value:w},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${A}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${A}-arrow`]:{top:_},[`&-placement-rightBottom > ${A}-arrow`]:{bottom:_}}))}}},36305:function(fn,ut,b){"use strict";b.d(ut,{W:function(){return Y},w:function(){return ce}});var y=b(36237);function ce(de){const{sizePopupArrow:$,borderRadiusXS:p,borderRadiusOuter:ge}=de,le=$/2,l=0,A=le,F=ge*1/Math.sqrt(2),_=le-ge*(1-1/Math.sqrt(2)),E=le-p*(1/Math.sqrt(2)),w=ge*(Math.sqrt(2)-1)+p*(1/Math.sqrt(2)),O=2*le-E,X=w,J=2*le-F,U=_,R=2*le-l,z=A,P=le*Math.sqrt(2)+ge*(Math.sqrt(2)-2),N=ge*(Math.sqrt(2)-1),re=`polygon(${N}px 100%, 50% ${N}px, ${2*le-N}px 100%, ${N}px 100%)`,ue=`path('M ${l} ${A} A ${ge} ${ge} 0 0 0 ${F} ${_} L ${E} ${w} A ${p} ${p} 0 0 1 ${O} ${X} L ${J} ${U} A ${ge} ${ge} 0 0 0 ${R} ${z} Z')`;return{arrowShadowWidth:P,arrowPath:ue,arrowPolygon:re}}const Y=(de,$,p)=>{const{sizePopupArrow:ge,arrowPolygon:le,arrowPath:l,arrowShadowWidth:A,borderRadiusXS:F,calc:_}=de;return{pointerEvents:"none",width:ge,height:ge,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:ge,height:_(ge).div(2).equal(),background:$,clipPath:{_multi_value_:!0,value:[le,l]},content:'""'},"&::after":{content:'""',position:"absolute",width:A,height:A,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,y.unit)(F)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:p,zIndex:0,background:"transparent"}}}},93427:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return ce}});var y=b(34998);function ce(Y,de){return y.i.reduce(($,p)=>{const ge=Y[`${p}1`],le=Y[`${p}3`],l=Y[`${p}6`],A=Y[`${p}7`];return Object.assign(Object.assign({},$),de(p,{lightColor:ge,lightBorderColor:le,darkColor:l,textColor:A}))},{})}},25399:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return ee}});var y=b(59301),ce=b(92310),Y=b.n(ce),de=b(29125),$=b(18929),p=b(62487),ge=b(75030),le=b(86641),l=b(52838),A=b(22703),F=b(32383),_=b(55743),E=b(57700),w=b(48755),O=b(36237),X=b(63356),J=b(34925),U=b(37645),R=b(36305),z=b(93427),P=b(51636),N=b(16931);const re=V=>{const{calc:he,componentCls:S,tooltipMaxWidth:C,tooltipColor:Z,tooltipBg:ye,tooltipBorderRadius:Ve,zIndexPopup:qe,controlHeight:gt,boxShadowSecondary:yt,paddingSM:Dt,paddingXS:Ut,arrowOffsetHorizontal:ot,sizePopupArrow:kt}=V,tt=he(Ve).add(kt).add(ot).equal(),Gt=he(Ve).mul(2).add(kt).equal();return[{[S]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,X.Wf)(V)),{position:"absolute",zIndex:qe,display:"block",width:"max-content",maxWidth:C,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":ye,[`${S}-inner`]:{minWidth:Gt,minHeight:gt,padding:`${(0,O.unit)(V.calc(Dt).div(2).equal())} ${(0,O.unit)(Ut)}`,color:Z,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ye,borderRadius:Ve,boxShadow:yt,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:tt},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${S}-inner`]:{borderRadius:V.min(Ve,U.qN)}},[`${S}-content`]:{position:"relative"}}),(0,z.Z)(V,(Xe,Ke)=>{let{darkColor:Ae}=Ke;return{[`&${S}-${Xe}`]:{[`${S}-inner`]:{backgroundColor:Ae},[`${S}-arrow`]:{"--antd-arrow-background-color":Ae}}}})),{"&-rtl":{direction:"rtl"}})},(0,U.ZP)(V,"var(--antd-arrow-background-color)"),{[`${S}-pure`]:{position:"relative",maxWidth:"none",margin:V.sizePopupArrow}}]},ue=V=>Object.assign(Object.assign({zIndexPopup:V.zIndexPopupBase+70},(0,U.wZ)({contentRadius:V.borderRadius,limitVerticalRadius:!0})),(0,R.w)((0,P.mergeToken)(V,{borderRadiusOuter:Math.min(V.borderRadiusOuter,4)})));var me=function(V){let he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,N.I$)("Tooltip",C=>{const{borderRadius:Z,colorTextLightSolid:ye,colorBgSpotlight:Ve}=C,qe=(0,P.mergeToken)(C,{tooltipMaxWidth:250,tooltipColor:ye,tooltipBorderRadius:Z,tooltipBg:Ve});return[re(qe),(0,J._y)(C,"zoom-big-fast")]},ue,{resetStyle:!1,injectStyle:he})(V)},Te=b(29509);function Be(V,he){const S=(0,Te.o2)(he),C=Y()({[`${V}-${he}`]:he&&S}),Z={},ye={};return he&&!S&&(Z.background=he,ye["--antd-arrow-background-color"]=he),{className:C,overlayStyle:Z,arrowStyle:ye}}var at=V=>{const{prefixCls:he,className:S,placement:C="top",title:Z,color:ye,overlayInnerStyle:Ve}=V,{getPrefixCls:qe}=y.useContext(w.E_),gt=qe("tooltip",he),[yt,Dt,Ut]=me(gt),ot=Be(gt,ye),kt=ot.arrowStyle,tt=Object.assign(Object.assign({},Ve),ot.overlayStyle),Gt=Y()(Dt,Ut,gt,`${gt}-pure`,`${gt}-placement-${C}`,S,ot.className);return yt(y.createElement("div",{className:Gt,style:kt},y.createElement("div",{className:`${gt}-arrow`}),y.createElement(de.G,Object.assign({},V,{className:Dt,prefixCls:gt,overlayInnerStyle:tt}),Z)))},ie=function(V,he){var S={};for(var C in V)Object.prototype.hasOwnProperty.call(V,C)&&he.indexOf(C)<0&&(S[C]=V[C]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,C=Object.getOwnPropertySymbols(V);Z<C.length;Z++)he.indexOf(C[Z])<0&&Object.prototype.propertyIsEnumerable.call(V,C[Z])&&(S[C[Z]]=V[C[Z]]);return S};const I=y.forwardRef((V,he)=>{var S,C;const{prefixCls:Z,openClassName:ye,getTooltipContainer:Ve,color:qe,overlayInnerStyle:gt,children:yt,afterOpenChange:Dt,afterVisibleChange:Ut,destroyTooltipOnHide:ot,arrow:kt=!0,title:tt,overlay:Gt,builtinPlacements:Xe,arrowPointAtCenter:Ke=!1,autoAdjustOverflow:Ae=!0,motion:xe,getPopupContainer:se,placement:Ne="top",mouseEnterDelay:Ce=.1,mouseLeaveDelay:Se=.1,overlayStyle:M,rootClassName:fe,overlayClassName:_e,styles:Re,classNames:$e}=V,rt=ie(V,["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"]),it=!!kt,[,te]=(0,E.ZP)(),{getPopupContainer:Q,getPrefixCls:lt,direction:st,className:ht,style:bt,classNames:He,styles:Et}=(0,w.dj)("tooltip"),pt=(0,F.ln)("Tooltip"),ft=y.useRef(null),Pt=()=>{var $n;($n=ft.current)===null||$n===void 0||$n.forceAlign()};y.useImperativeHandle(he,()=>{var $n,qn;return{forceAlign:Pt,forcePopupAlign:()=>{pt.deprecated(!1,"forcePopupAlign","forceAlign"),Pt()},nativeElement:($n=ft.current)===null||$n===void 0?void 0:$n.nativeElement,popupElement:(qn=ft.current)===null||qn===void 0?void 0:qn.popupElement}});const[x,D]=(0,$.Z)(!1,{value:(S=V.open)!==null&&S!==void 0?S:V.visible,defaultValue:(C=V.defaultOpen)!==null&&C!==void 0?C:V.defaultVisible}),Ye=!tt&&!Gt&&tt!==0,W=$n=>{var qn,ln;D(Ye?!1:$n),Ye||((qn=V.onOpenChange)===null||qn===void 0||qn.call(V,$n),(ln=V.onVisibleChange)===null||ln===void 0||ln.call(V,$n))},pe=y.useMemo(()=>{var $n,qn;let ln=Ke;return typeof kt=="object"&&(ln=(qn=($n=kt.pointAtCenter)!==null&&$n!==void 0?$n:kt.arrowPointAtCenter)!==null&&qn!==void 0?qn:Ke),Xe||(0,l.Z)({arrowPointAtCenter:ln,autoAdjustOverflow:Ae,arrowWidth:it?te.sizePopupArrow:0,borderRadius:te.borderRadius,offset:te.marginXXS,visibleFirst:!0})},[Ke,kt,Xe,te]),Bt=y.useMemo(()=>tt===0?tt:Gt||tt||"",[Gt,tt]),Oe=y.createElement(p.Z,{space:!0},typeof Bt=="function"?Bt():Bt),Ue=lt("tooltip",Z),et=lt(),q=V["data-popover-inject"];let ne=x;!("open"in V)&&!("visible"in V)&&Ye&&(ne=!1);const we=y.isValidElement(yt)&&!(0,A.M2)(yt)?yt:y.createElement("span",null,yt),Fe=we.props,G=!Fe.className||typeof Fe.className=="string"?Y()(Fe.className,ye||`${Ue}-open`):Fe.className,[St,Ee,Wt]=me(Ue,!q),en=Be(Ue,qe),an=en.arrowStyle,Zn=Y()(_e,{[`${Ue}-rtl`]:st==="rtl"},en.className,fe,Ee,Wt,ht,He.root,$e==null?void 0:$e.root),Rn=Y()(He.body,$e==null?void 0:$e.body),[Cn,sr]=(0,ge.Cn)("Tooltip",rt.zIndex),dr=y.createElement(de.Z,Object.assign({},rt,{zIndex:Cn,showArrow:it,placement:Ne,mouseEnterDelay:Ce,mouseLeaveDelay:Se,prefixCls:Ue,classNames:{root:Zn,body:Rn},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},an),Et.root),bt),M),Re==null?void 0:Re.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},Et.body),gt),Re==null?void 0:Re.body),en.overlayStyle)},getTooltipContainer:se||Ve||Q,ref:ft,builtinPlacements:pe,overlay:Oe,visible:ne,onVisibleChange:W,afterVisibleChange:Dt!=null?Dt:Ut,arrowContent:y.createElement("span",{className:`${Ue}-arrow-content`}),motion:{motionName:(0,le.m)(et,"zoom-big-fast",V.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!ot}),ne?(0,A.Tm)(we,{className:G}):we);return St(y.createElement(_.Z.Provider,{value:sr},dr))});I._InternalPanelDoNotUseOrYouWillBeFired=at;var ee=I},64018:function(){var fn,ut,b,y=!1,ce,Y;window.PR_SHOULD_USE_CONTINUATION=!0;var de,$;(function(){var p=window,ge=["break,continue,do,else,for,if,return,while"],le=[ge,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],l=[le,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],A=[l,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],F=[l,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],_=[l,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],E="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",w=[l,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],O="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",X=[ge,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],J=[ge,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],U=[ge,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[A,_,F,w,O,X,J,U],z=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,P="str",N="kwd",re="com",ue="typ",me="lit",Te="pun",Be="pln",Le="tag",at="dec",ie="src",K="atn",I="atv",ee="nocode",V="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function he(xe){for(var se=0,Ne=!1,Ce=!1,Se=0,M=xe.length;Se<M;++Se){var fe=xe[Se];if(fe.ignoreCase)Ce=!0;else if(/[a-z]/i.test(fe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ne=!0,Ce=!1;break}}var _e={b:8,t:9,n:10,v:11,f:12,r:13};function Re(Q){var lt=Q.charCodeAt(0);if(lt!==92)return lt;var st=Q.charAt(1);return lt=_e[st],lt||("0"<=st&&st<="7"?parseInt(Q.substring(1),8):st==="u"||st==="x"?parseInt(Q.substring(2),16):Q.charCodeAt(1))}function $e(Q){if(Q<32)return(Q<16?"\\x0":"\\x")+Q.toString(16);var lt=String.fromCharCode(Q);return lt==="\\"||lt==="-"||lt==="]"||lt==="^"?"\\"+lt:lt}function rt(Q){var lt=Q.substring(1,Q.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),st=[],ht=lt[0]==="^",bt=["["];ht&&bt.push("^");for(var He=ht?1:0,Et=lt.length;He<Et;++He){var pt=lt[He];if(/\\[bdsw]/i.test(pt))bt.push(pt);else{var ft=Re(pt),Pt;He+2<Et&<[He+1]==="-"?(Pt=Re(lt[He+2]),He+=2):Pt=ft,st.push([ft,Pt]),Pt<65||ft>122||(Pt<65||ft>90||st.push([Math.max(65,ft)|32,Math.min(Pt,90)|32]),Pt<97||ft>122||st.push([Math.max(97,ft)&-33,Math.min(Pt,122)&-33]))}}st.sort(function(W,pe){return W[0]-pe[0]||pe[1]-W[1]});for(var x=[],D=[],He=0;He<st.length;++He){var Ye=st[He];Ye[0]<=D[1]+1?D[1]=Math.max(D[1],Ye[1]):x.push(D=Ye)}for(var He=0;He<x.length;++He){var Ye=x[He];bt.push($e(Ye[0])),Ye[1]>Ye[0]&&(Ye[1]+1>Ye[0]&&bt.push("-"),bt.push($e(Ye[1])))}return bt.push("]"),bt.join("")}function it(Q){for(var lt=Q.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),st=lt.length,ht=[],bt=0,He=0;bt<st;++bt){var Et=lt[bt];if(Et==="(")++He;else if(Et.charAt(0)==="\\"){var pt=+Et.substring(1);pt&&(pt<=He?ht[pt]=-1:lt[bt]=$e(pt))}}for(var bt=1;bt<ht.length;++bt)ht[bt]===-1&&(ht[bt]=++se);for(var bt=0,He=0;bt<st;++bt){var Et=lt[bt];if(Et==="(")++He,ht[He]||(lt[bt]="(?:");else if(Et.charAt(0)==="\\"){var pt=+Et.substring(1);pt&&pt<=He&&(lt[bt]="\\"+ht[pt])}}for(var bt=0;bt<st;++bt)lt[bt]==="^"&<[bt+1]!=="^"&&(lt[bt]="");if(Q.ignoreCase&&Ne)for(var bt=0;bt<st;++bt){var Et=lt[bt],ft=Et.charAt(0);Et.length>=2&&ft==="["?lt[bt]=rt(Et):ft!=="\\"&&(lt[bt]=Et.replace(/[a-zA-Z]/g,function(D){var Ye=D.charCodeAt(0);return"["+String.fromCharCode(Ye&-33,Ye|32)+"]"}))}return lt.join("")}for(var te=[],Se=0,M=xe.length;Se<M;++Se){var fe=xe[Se];if(fe.global||fe.multiline)throw new Error(""+fe);te.push("(?:"+it(fe)+")")}return new RegExp(te.join("|"),Ce?"gi":"g")}function S(xe,se){var Ne=/(?:^|\s)nocode(?:\s|$)/,Ce=[],Se=0,M=[],fe=0;function _e(Re){var $e=Re.nodeType;if($e==1){if(Ne.test(Re.className))return;for(var rt=Re.firstChild;rt;rt=rt.nextSibling)_e(rt);var it=Re.nodeName.toLowerCase();(it==="br"||it==="li")&&(Ce[fe]=`
|
|
|
`,M[fe<<1]=Se++,M[fe++<<1|1]=Re)}else if($e==3||$e==4){var te=Re.nodeValue;te.length&&(se?te=te.replace(/\r\n?/g,`
|
|
|
`):te=te.replace(/[ \t\r\n]+/g," "),Ce[fe]=te,M[fe<<1]=Se,Se+=te.length,M[fe++<<1|1]=Re)}}return _e(xe),{sourceCode:Ce.join("").replace(/\n$/,""),spans:M}}function C(xe,se,Ne,Ce,Se){if(Ne){var M={sourceNode:xe,pre:1,langExtension:null,numberLines:null,sourceCode:Ne,spans:null,basePos:se,decorations:null};Ce(M),Se.push.apply(Se,M.decorations)}}var Z=/\S/;function ye(xe){for(var se=void 0,Ne=xe.firstChild;Ne;Ne=Ne.nextSibling){var Ce=Ne.nodeType;se=Ce===1?se?xe:Ne:Ce===3&&Z.test(Ne.nodeValue)?xe:se}return se===xe?void 0:se}function Ve(xe,se){var Ne={},Ce;(function(){for(var fe=xe.concat(se),_e=[],Re={},$e=0,rt=fe.length;$e<rt;++$e){var it=fe[$e],te=it[3];if(te)for(var Q=te.length;--Q>=0;)Ne[te.charAt(Q)]=it;var lt=it[1],st=""+lt;Re.hasOwnProperty(st)||(_e.push(lt),Re[st]=null)}_e.push(/[\0-\uffff]/),Ce=he(_e)})();var Se=se.length,M=function(fe){for(var _e=fe.sourceCode,Re=fe.basePos,$e=fe.sourceNode,rt=[Re,Be],it=0,te=_e.match(Ce)||[],Q={},lt=0,st=te.length;lt<st;++lt){var ht=te[lt],bt=Q[ht],He=void 0,Et;if(typeof bt=="string")Et=!1;else{var pt=Ne[ht.charAt(0)];if(pt)He=ht.match(pt[1]),bt=pt[0];else{for(var ft=0;ft<Se;++ft)if(pt=se[ft],He=ht.match(pt[1]),He){bt=pt[0];break}He||(bt=Be)}Et=bt.length>=5&&bt.substring(0,5)==="lang-",Et&&!(He&&typeof He[1]=="string")&&(Et=!1,bt=ie),Et||(Q[ht]=bt)}var Pt=it;if(it+=ht.length,!Et)rt.push(Re+Pt,bt);else{var x=He[1],D=ht.indexOf(x),Ye=D+x.length;He[2]&&(Ye=ht.length-He[2].length,D=Ye-x.length);var W=bt.substring(5);C($e,Re+Pt,ht.substring(0,D),M,rt),C($e,Re+Pt+D,x,kt(W,x),rt),C($e,Re+Pt+Ye,ht.substring(Ye),M,rt)}}fe.decorations=rt};return M}function qe(xe){var se=[],Ne=[];xe.tripleQuotedStrings?se.push([P,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):xe.multiLineStrings?se.push([P,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):se.push([P,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),xe.verbatimStrings&&Ne.push([P,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ce=xe.hashComments;Ce&&(xe.cStyleComments?(Ce>1?se.push([re,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):se.push([re,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ne.push([P,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):se.push([re,/^#[^\r\n]*/,null,"#"])),xe.cStyleComments&&(Ne.push([re,/^\/\/[^\r\n]*/,null]),Ne.push([re,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Se=xe.regexLiterals;if(Se){var M=Se>1?"":`
|
|
|
\r`,fe=M?".":"[\\S\\s]",_e="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+fe+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+fe+")*(?:\\x5D|$))+/";Ne.push(["lang-regex",RegExp("^"+V+"("+_e+")")])}var Re=xe.types;Re&&Ne.push([ue,Re]);var $e=(""+xe.keywords).replace(/^ | $/g,"");$e.length&&Ne.push([N,new RegExp("^(?:"+$e.replace(/[\s,]+/g,"|")+")\\b"),null]),se.push([Be,/^\s+/,null,` \r
|
|
|
\xA0`]);var rt="^.[^\\s\\w.$@'\"`/\\\\]*";return xe.regexLiterals&&(rt+="(?!s*/)"),Ne.push([me,/^@[a-z_$][a-z_$@0-9]*/i,null],[ue,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Be,/^[a-z_$][a-z_$@0-9]*/i,null],[me,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Be,/^\\[\s\S]?/,null],[Te,new RegExp(rt),null]),Ve(se,Ne)}var gt=qe({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function yt(xe,se,Ne){for(var Ce=/(?:^|\s)nocode(?:\s|$)/,Se=/\r\n?|\n/,M=xe.ownerDocument,fe=M.createElement("li");xe.firstChild;)fe.appendChild(xe.firstChild);var _e=[fe];function Re(lt){var st=lt.nodeType;if(st==1&&!Ce.test(lt.className))if(lt.nodeName==="br")$e(lt),lt.parentNode&<.parentNode.removeChild(lt);else for(var ht=lt.firstChild;ht;ht=ht.nextSibling)Re(ht);else if((st==3||st==4)&&Ne){var bt=lt.nodeValue,He=bt.match(Se);if(He){var Et=bt.substring(0,He.index);lt.nodeValue=Et;var pt=bt.substring(He.index+He[0].length);if(pt){var ft=lt.parentNode;ft.insertBefore(M.createTextNode(pt),lt.nextSibling)}$e(lt),Et||lt.parentNode.removeChild(lt)}}}function $e(lt){for(;!lt.nextSibling;)if(lt=lt.parentNode,!lt)return;function st(He,Et){var pt=Et?He.cloneNode(!1):He,ft=He.parentNode;if(ft){var Pt=st(ft,1),x=He.nextSibling;Pt.appendChild(pt);for(var D=x;D;D=x)x=D.nextSibling,Pt.appendChild(D)}return pt}for(var ht=st(lt.nextSibling,0),bt;(bt=ht.parentNode)&&bt.nodeType===1;)ht=bt;_e.push(ht)}for(var rt=0;rt<_e.length;++rt)Re(_e[rt]);se===(se|0)&&_e[0].setAttribute("value",se);var it=M.createElement("ol");it.className="linenums";for(var te=Math.max(0,se-1|0)||0,rt=0,Q=_e.length;rt<Q;++rt)fe=_e[rt],fe.className="L"+(rt+te)%10,fe.firstChild||fe.appendChild(M.createTextNode("\xA0")),it.appendChild(fe);xe.appendChild(it)}function Dt(xe){var se=/\bMSIE\s(\d+)/.exec(navigator.userAgent);se=se&&+se[1]<=8;var Ne=/\n/g,Ce=xe.sourceCode,Se=Ce.length,M=0,fe=xe.spans,_e=fe.length,Re=0,$e=xe.decorations,rt=$e.length,it=0;$e[rt]=Se;var te,Q;for(Q=te=0;Q<rt;)$e[Q]!==$e[Q+2]?($e[te++]=$e[Q++],$e[te++]=$e[Q++]):Q+=2;for(rt=te,Q=te=0;Q<rt;){for(var lt=$e[Q],st=$e[Q+1],ht=Q+2;ht+2<=rt&&$e[ht+1]===st;)ht+=2;$e[te++]=lt,$e[te++]=st,Q=ht}rt=$e.length=te;var bt=xe.sourceNode,He="";bt&&(He=bt.style.display,bt.style.display="none");try{for(var Et=null;Re<_e;){var pt=fe[Re],ft=fe[Re+2]||Se,Pt=$e[it+2]||Se,ht=Math.min(ft,Pt),x=fe[Re+1],D;if(x.nodeType!==1&&(D=Ce.substring(M,ht))){se&&(D=D.replace(Ne,"\r")),x.nodeValue=D;var Ye=x.ownerDocument,W=Ye.createElement("span");W.className=$e[it+1];var pe=x.parentNode;pe.replaceChild(W,x),W.appendChild(x),M<ft&&(fe[Re+1]=x=Ye.createTextNode(Ce.substring(ht,ft)),pe.insertBefore(x,W.nextSibling))}M=ht,M>=ft&&(Re+=2),M>=Pt&&(it+=2)}}finally{bt&&(bt.style.display=He)}}var Ut={};function ot(xe,se){for(var Ne=se.length;--Ne>=0;){var Ce=se[Ne];Ut.hasOwnProperty(Ce)?p.console&&console.warn("cannot override language handler %s",Ce):Ut[Ce]=xe}}function kt(xe,se){return xe&&Ut.hasOwnProperty(xe)||(xe=/^\s*</.test(se)?"default-markup":"default-code"),Ut[xe]}ot(gt,["default-code"]),ot(Ve([],[[Be,/^[^<?]+/],[at,/^<!\w[^>]*(?:>|$)/],[re,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Te,/^(?:<[%?]|[%?]>)/],["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"]),ot(Ve([[Be,/^[\s]+/,null,` \r
|
|
|
`],[I,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Le,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[K,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Te,/^[=<>\/]+/],["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"]),ot(Ve([],[[I,/^[\s\S]+/]]),["uq.val"]),ot(qe({keywords:A,hashComments:!0,cStyleComments:!0,types:z}),["c","cc","cpp","cxx","cyc","m"]),ot(qe({keywords:"null,true,false"}),["json"]),ot(qe({keywords:_,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:z}),["cs"]),ot(qe({keywords:F,cStyleComments:!0}),["java"]),ot(qe({keywords:U,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),ot(qe({keywords:X,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),ot(qe({keywords:O,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),ot(qe({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),ot(qe({keywords:w,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),ot(qe({keywords:E,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),ot(Ve([],[[P,/^[\s\S]+/]]),["regex"]);function tt(xe){var se=xe.langExtension;try{var Ne=S(xe.sourceNode,xe.pre),Ce=Ne.sourceCode;xe.sourceCode=Ce,xe.spans=Ne.spans,xe.basePos=0,kt(se,Ce)(xe),Dt(xe)}catch(Se){p.console&&console.log(Se&&Se.stack||Se)}}function Gt(xe,se,Ne){var Ce=Ne||!1,Se=se||null,M=document.createElement("div");M.innerHTML="<pre>"+xe+"</pre>",M=M.firstChild,Ce&&yt(M,Ce,!0);var fe={langExtension:Se,numberLines:Ce,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return tt(fe),M.innerHTML}function Xe(xe,se){var Ne=se||document.body,Ce=Ne.ownerDocument||document;function Se(pt){return Ne.getElementsByTagName(pt)}for(var M=[Se("pre"),Se("code"),Se("xmp")],fe=[],_e=0;_e<M.length;++_e)for(var Re=0,$e=M[_e].length;Re<$e;++Re)fe.push(M[_e][Re]);M=null;var rt=Date;rt.now||(rt={now:function(){return+new Date}});var it=0,te=/\blang(?:uage)?-([\w.]+)(?!\S)/,Q=/\bprettyprint\b/,lt=/\bprettyprinted\b/,st=/pre|xmp/i,ht=/^code$/i,bt=/^(?:pre|code|xmp)$/i,He={};function Et(){for(var pt=p.PR_SHOULD_USE_CONTINUATION?rt.now()+250:1/0;it<fe.length&&rt.now()<pt;it++){for(var ft=fe[it],Pt=He,x=ft;x=x.previousSibling;){var D=x.nodeType,Ye=(D===7||D===8)&&x.nodeValue;if(Ye?!/^\??prettify\b/.test(Ye):D!==3||/\S/.test(x.nodeValue))break;if(Ye){Pt={},Ye.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ee,Wt,en){Pt[Wt]=en});break}}var W=ft.className;if((Pt!==He||Q.test(W))&&!lt.test(W)){for(var pe=!1,Bt=ft.parentNode;Bt;Bt=Bt.parentNode){var Oe=Bt.tagName;if(bt.test(Oe)&&Bt.className&&Q.test(Bt.className)){pe=!0;break}}if(!pe){ft.className+=" prettyprinted";var Ue=Pt.lang;if(!Ue){Ue=W.match(te);var et;!Ue&&(et=ye(ft))&&ht.test(et.tagName)&&(Ue=et.className.match(te)),Ue&&(Ue=Ue[1])}var q;if(st.test(ft.tagName))q=1;else{var ne=ft.currentStyle,we=Ce.defaultView,Fe=ne?ne.whiteSpace:we&&we.getComputedStyle?we.getComputedStyle(ft,null).getPropertyValue("white-space"):0;q=Fe&&Fe.substring(0,3)==="pre"}var G=Pt.linenums;(G=G==="true"||+G)||(G=W.match(/\blinenums\b(?::(\d+))?/),G=G?G[1]&&G[1].length?+G[1]:!0:!1),G&&yt(ft,G,q);var St={langExtension:Ue,sourceNode:ft,numberLines:G,pre:q,sourceCode:null,basePos:null,spans:null,decorations:null};tt(St)}}}it<fe.length?p.setTimeout(Et,250):typeof xe=="function"&&xe()}Et()}var Ke=p.PR={createSimpleLexer:Ve,registerLangHandler:ot,sourceDecorator:qe,PR_ATTRIB_NAME:K,PR_ATTRIB_VALUE:I,PR_COMMENT:re,PR_DECLARATION:at,PR_KEYWORD:N,PR_LITERAL:me,PR_NOCODE:ee,PR_PLAIN:Be,PR_PUNCTUATION:Te,PR_SOURCE:ie,PR_STRING:P,PR_TAG:Le,PR_TYPE:ue,prettyPrintOne:y?p.prettyPrintOne=Gt:de=Gt,prettyPrint:$=y?p.prettyPrint=Xe:$=Xe},Ae=p.define;typeof Ae=="function"&&Ae.amd&&Ae("google-code-prettify",[],function(){return Ke})})()},25769:function(fn,ut,b){"use strict";var y=b(98040),ce={"text/plain":"Text","text/html":"Url",default:"Text"},Y="Copy to clipboard: #{key}, Enter";function de(p){var ge=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return p.replace(/#{\s*key\s*}/g,ge)}function $(p,ge){var le,l,A,F,_,E,w=!1;ge||(ge={}),le=ge.debug||!1;try{A=y(),F=document.createRange(),_=document.getSelection(),E=document.createElement("span"),E.textContent=p,E.ariaHidden="true",E.style.all="unset",E.style.position="fixed",E.style.top=0,E.style.clip="rect(0, 0, 0, 0)",E.style.whiteSpace="pre",E.style.webkitUserSelect="text",E.style.MozUserSelect="text",E.style.msUserSelect="text",E.style.userSelect="text",E.addEventListener("copy",function(X){if(X.stopPropagation(),ge.format)if(X.preventDefault(),typeof X.clipboardData=="undefined"){le&&console.warn("unable to use e.clipboardData"),le&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var J=ce[ge.format]||ce.default;window.clipboardData.setData(J,p)}else X.clipboardData.clearData(),X.clipboardData.setData(ge.format,p);ge.onCopy&&(X.preventDefault(),ge.onCopy(X.clipboardData))}),document.body.appendChild(E),F.selectNodeContents(E),_.addRange(F);var O=document.execCommand("copy");if(!O)throw new Error("copy command was unsuccessful");w=!0}catch(X){le&&console.error("unable to copy using execCommand: ",X),le&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ge.format||"text",p),ge.onCopy&&ge.onCopy(window.clipboardData),w=!0}catch(J){le&&console.error("unable to copy using clipboardData: ",J),le&&console.error("falling back to prompt"),l=de("message"in ge?ge.message:Y),window.prompt(l,p)}}finally{_&&(typeof _.removeRange=="function"?_.removeRange(F):_.removeAllRanges()),E&&document.body.removeChild(E),A()}return w}fn.exports=$},53184:function(fn,ut,b){"use strict";var y,ce;function Y(de,$,p){var ge=function(le,l){return de.js_beautify(le,l)};return ge.js=de.js_beautify,ge.css=$.css_beautify,ge.html=p.html_beautify,ge.js_beautify=de.js_beautify,ge.css_beautify=$.css_beautify,ge.html_beautify=p.html_beautify,ge}y=[b(58553),b(87804),b(40998)],ce=function(de,$,p){return Y(de,$,p)}.apply(ut,y),ce!==void 0&&(fn.exports=ce)},87804:function(fn,ut){var b,y;(function(){var ce;(function(){"use strict";var de=[,,function(le){function l(_){this.__parent=_,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var _=new l(this.__parent);return _.set_indent(this.__indent_count,this.__alignment_count),_},l.prototype.item=function(_){return _<0?this.__items[this.__items.length+_]:this.__items[_]},l.prototype.has_match=function(_){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(_))return!0;return!1},l.prototype.set_indent=function(_,E){this.is_empty()&&(this.__indent_count=_||0,this.__alignment_count=E||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var _=this.__parent.current_line;return _.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),_.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),_.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,_.__items[0]===" "&&(_.__items.splice(0,1),_.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(_){this.__items.push(_);var E=_.lastIndexOf(`
|
|
|
`);E!==-1?this.__character_count=_.length-E:this.__character_count+=_.length},l.prototype.pop=function(){var _=null;return this.is_empty()||(_=this.__items.pop(),this.__character_count-=_.length),_},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var _="";return this.is_empty()?this.__parent.indent_empty_lines&&(_=this.__parent.get_indent_string(this.__indent_count)):(_=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),_+=this.__items.join("")),_};function A(_,E){this.__cache=[""],this.__indent_size=_.indent_size,this.__indent_string=_.indent_char,_.indent_with_tabs||(this.__indent_string=new Array(_.indent_size+1).join(_.indent_char)),E=E||"",_.indent_level>0&&(E=new Array(_.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}A.prototype.get_indent_size=function(_,E){var w=this.__base_string_length;return E=E||0,_<0&&(w=0),w+=_*this.__indent_size,w+=E,w},A.prototype.get_indent_string=function(_,E){var w=this.__base_string;return E=E||0,_<0&&(_=0,w=""),E+=_*this.__indent_size,this.__ensure_cache(E),w+=this.__cache[E],w},A.prototype.__ensure_cache=function(_){for(;_>=this.__cache.length;)this.__add_column()},A.prototype.__add_column=function(){var _=this.__cache.length,E=0,w="";this.__indent_size&&_>=this.__indent_size&&(E=Math.floor(_/this.__indent_size),_-=E*this.__indent_size,w=new Array(E+1).join(this.__indent_string)),_&&(w+=new Array(_+1).join(" ")),this.__cache.push(w)};function F(_,E){this.__indent_cache=new A(_,E),this.raw=!1,this._end_with_newline=_.end_with_newline,this.indent_size=_.indent_size,this.wrap_line_length=_.wrap_line_length,this.indent_empty_lines=_.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}F.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},F.prototype.get_line_number=function(){return this.__lines.length},F.prototype.get_indent_string=function(_,E){return this.__indent_cache.get_indent_string(_,E)},F.prototype.get_indent_size=function(_,E){return this.__indent_cache.get_indent_size(_,E)},F.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},F.prototype.add_new_line=function(_){return this.is_empty()||!_&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},F.prototype.get_code=function(_){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
|
|
|
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var w=this.__lines.join(`
|
|
|
`);return _!==`
|
|
|
`&&(w=w.replace(/[\n]/g,_)),w},F.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},F.prototype.set_indent=function(_,E){return _=_||0,E=E||0,this.next_line.set_indent(_,E),this.__lines.length>1?(this.current_line.set_indent(_,E),!0):(this.current_line.set_indent(),!1)},F.prototype.add_raw_token=function(_){for(var E=0;E<_.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(_.whitespace_before),this.current_line.push(_.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},F.prototype.add_token=function(_){this.__add_space_before_token(),this.current_line.push(_),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},F.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(" "))},F.prototype.remove_indent=function(_){for(var E=this.__lines.length;_<E;)this.__lines[_]._remove_indent(),_++;this.current_line._remove_wrap_indent()},F.prototype.trim=function(_){for(_=_===void 0?!1:_,this.current_line.trim();_&&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},F.prototype.just_added_newline=function(){return this.current_line.is_empty()},F.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},F.prototype.ensure_empty_line_above=function(_,E){for(var w=this.__lines.length-2;w>=0;){var O=this.__lines[w];if(O.is_empty())break;if(O.item(0).indexOf(_)!==0&&O.item(-1)!==E){this.__lines.splice(w+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}w--}},le.exports.Output=F},,,,function(le){function l(_,E){this.raw_options=A(_,E),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}l.prototype._get_array=function(_,E){var w=this.raw_options[_],O=E||[];return typeof w=="object"?w!==null&&typeof w.concat=="function"&&(O=w.concat()):typeof w=="string"&&(O=w.split(/[^a-zA-Z0-9_\/\-]+/)),O},l.prototype._get_boolean=function(_,E){var w=this.raw_options[_],O=w===void 0?!!E:!!w;return O},l.prototype._get_characters=function(_,E){var w=this.raw_options[_],O=E||"";return typeof w=="string"&&(O=w.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),O},l.prototype._get_number=function(_,E){var w=this.raw_options[_];E=parseInt(E,10),isNaN(E)&&(E=0);var O=parseInt(w,10);return isNaN(O)&&(O=E),O},l.prototype._get_selection=function(_,E,w){var O=this._get_selection_list(_,E,w);if(O.length!==1)throw new Error("Invalid Option Value: The option '"+_+`' can only be one of the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[_]+"'");return O[0]},l.prototype._get_selection_list=function(_,E,w){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(w=w||[E[0]],!this._is_valid_selection(w,E))throw new Error("Invalid Default Value!");var O=this._get_array(_,w);if(!this._is_valid_selection(O,E))throw new Error("Invalid Option Value: The option '"+_+`' can contain only the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[_]+"'");return O},l.prototype._is_valid_selection=function(_,E){return _.length&&E.length&&!_.some(function(w){return E.indexOf(w)===-1})};function A(_,E){var w={};_=F(_);var O;for(O in _)O!==E&&(w[O]=_[O]);if(E&&_[E])for(O in _[E])w[O]=_[E][O];return w}function F(_){var E={},w;for(w in _){var O=w.replace(/-/g,"_");E[O]=_[w]}return E}le.exports.Options=l,le.exports.normalizeOpts=F,le.exports.mergeOpts=A},,function(le){var l=RegExp.prototype.hasOwnProperty("sticky");function A(F){this.__input=F||"",this.__input_length=this.__input.length,this.__position=0}A.prototype.restart=function(){this.__position=0},A.prototype.back=function(){this.__position>0&&(this.__position-=1)},A.prototype.hasNext=function(){return this.__position<this.__input_length},A.prototype.next=function(){var F=null;return this.hasNext()&&(F=this.__input.charAt(this.__position),this.__position+=1),F},A.prototype.peek=function(F){var _=null;return F=F||0,F+=this.__position,F>=0&&F<this.__input_length&&(_=this.__input.charAt(F)),_},A.prototype.__match=function(F,_){F.lastIndex=_;var E=F.exec(this.__input);return E&&!(l&&F.sticky)&&E.index!==_&&(E=null),E},A.prototype.test=function(F,_){return _=_||0,_+=this.__position,_>=0&&_<this.__input_length?!!this.__match(F,_):!1},A.prototype.testChar=function(F,_){var E=this.peek(_);return F.lastIndex=0,E!==null&&F.test(E)},A.prototype.match=function(F){var _=this.__match(F,this.__position);return _?this.__position+=_[0].length:_=null,_},A.prototype.read=function(F,_,E){var w="",O;return F&&(O=this.match(F),O&&(w+=O[0])),_&&(O||!F)&&(w+=this.readUntil(_,E)),w},A.prototype.readUntil=function(F,_){var E="",w=this.__position;F.lastIndex=this.__position;var O=F.exec(this.__input);return O?(w=O.index,_&&(w+=O[0].length)):w=this.__input_length,E=this.__input.substring(this.__position,w),this.__position=w,E},A.prototype.readUntilAfter=function(F){return this.readUntil(F,!0)},A.prototype.get_regexp=function(F,_){var E=null,w="g";return _&&l&&(w="y"),typeof F=="string"&&F!==""?E=new RegExp(F,w):F&&(E=new RegExp(F.source,w)),E},A.prototype.get_literal_regexp=function(F){return RegExp(F.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},A.prototype.peekUntilAfter=function(F){var _=this.__position,E=this.readUntilAfter(F);return this.__position=_,E},A.prototype.lookBack=function(F){var _=this.__position-1;return _>=F.length&&this.__input.substring(_-F.length,_).toLowerCase()===F},le.exports.InputScanner=A},,,,,function(le){function l(A,F){A=typeof A=="string"?A:A.source,F=typeof F=="string"?F:F.source,this.__directives_block_pattern=new RegExp(A+/ beautify( \w+[:]\w+)+ /.source+F,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(A+/\sbeautify\signore:end\s/.source+F,"g")}l.prototype.get_directives=function(A){if(!A.match(this.__directives_block_pattern))return null;var F={};this.__directive_pattern.lastIndex=0;for(var _=this.__directive_pattern.exec(A);_;)F[_[1]]=_[2],_=this.__directive_pattern.exec(A);return F},l.prototype.readIgnored=function(A){return A.readUntilAfter(this.__directives_end_ignore_pattern)},le.exports.Directives=l},,function(le,l,A){var F=A(16).Beautifier,_=A(17).Options;function E(w,O){var X=new F(w,O);return X.beautify()}le.exports=E,le.exports.defaultOptions=function(){return new _}},function(le,l,A){var F=A(17).Options,_=A(2).Output,E=A(8).InputScanner,w=A(13).Directives,O=new w(/\/\*/,/\*\//),X=/\r\n|[\r\n]/,J=/\r\n|[\r\n]/g,U=/\s/,R=/(?:\s|\n)+/g,z=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,P=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function N(re,ue){this._source_text=re||"",this._options=new F(ue),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}N.prototype.eatString=function(re){var ue="";for(this._ch=this._input.next();this._ch;){if(ue+=this._ch,this._ch==="\\")ue+=this._input.next();else if(re.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return ue},N.prototype.eatWhitespace=function(re){for(var ue=U.test(this._input.peek()),me=0;U.test(this._input.peek());)this._ch=this._input.next(),re&&this._ch===`
|
|
|
`&&(me===0||me<this._options.max_preserve_newlines)&&(me++,this._output.add_new_line(!0));return ue},N.prototype.foundNestedPseudoClass=function(){for(var re=0,ue=1,me=this._input.peek(ue);me;){if(me==="{")return!0;if(me==="(")re+=1;else if(me===")"){if(re===0)return!1;re-=1}else if(me===";"||me==="}")return!1;ue++,me=this._input.peek(ue)}return!1},N.prototype.print_string=function(re){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(re)},N.prototype.preserveSingleSpace=function(re){re&&(this._output.space_before_token=!0)},N.prototype.indent=function(){this._indentLevel++},N.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},N.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var re=this._source_text,ue=this._options.eol;ue==="auto"&&(ue=`
|
|
|
`,re&&X.test(re||"")&&(ue=re.match(X)[0])),re=re.replace(J,`
|
|
|
`);var me=re.match(/^[\t ]*/)[0];this._output=new _(this._options,me),this._input=new E(re),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var Te=0,Be=!1,Le=!1,at=!1,ie=!1,K=!1,I=this._ch,ee=!1,V,he,S;V=this._input.read(R),he=V!=="",S=I,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),I=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var C=this._input.read(z),Z=O.get_directives(C);Z&&Z.ignore==="start"&&(C+=O.readIgnored(this._input)),this.print_string(C),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(P)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(he),this.print_string(this._ch);var ye=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ye.match(/[ :]$/)&&(ye=this.eatString(": ").replace(/\s+$/,""),this.print_string(ye),this._output.space_before_token=!0),Te===0&&ye.indexOf(":")!==-1&&(Le=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(he),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Ve=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Ve.match(/[ :]$/)&&(Ve=this.eatString(": ").replace(/\s+$/,""),this.print_string(Ve),this._output.space_before_token=!0),Te===0&&Ve.indexOf(":")!==-1?(Le=!0,this.indent()):Ve in this.NESTED_AT_RULE?(this._nestedLevel+=1,Ve in this.CONDITIONAL_GROUP_RULE&&(at=!0)):Te===0&&!Le&&(ie=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(he),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Le&&(Le=!1,this.outdent()),ie=!1,at?(at=!1,Be=this._indentLevel>=this._nestedLevel):Be=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Be&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(S==="("?this._output.space_before_token=!1:S!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),S==="{"&&this._output.trim(!0),Le&&(this.outdent(),Le=!1),this.print_string(this._ch),Be=!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])){ee=!0;break}(Be||at)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ie&&Te===0?(this.print_string(":"),Le||(Le=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var gt=S==='"'||S==="'";this.preserveSingleSpace(gt||he),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")ee=!1,Te===0?(Le&&(this.outdent(),Le=!1),ie=!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(),Te++,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(")")),Te&&(Te--,this.outdent()));else{var yt=!1;this._input.lookBack("with")&&(yt=!0),this.preserveSingleSpace(he||yt),this.print_string(this._ch),Le&&S==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),K=!0):(this.eatWhitespace(),Te++,this.indent())}else if(this._ch===")")Te&&(Te--,this.outdent()),K&&this._input.peek()===";"&&this._options.selector_separator_newline&&(K=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!Le||K)&&Te===0&&!ie?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Le&&Te===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&U.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(he),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),U.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Dt=S==='"'||S==="'";this.preserveSingleSpace(Dt||he),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&ee&&this._output.add_new_line()}var Ut=this._output.get_code(ue);return Ut},le.exports.Beautifier=N},function(le,l,A){var F=A(6).Options;function _(E){F.call(this,E,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var w=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||w;var O=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var X=0;X<O.length;X++)O[X]!=="expand"?this.brace_style="collapse":this.brace_style=O[X]}_.prototype=new F,le.exports.Options=_}],$={};function p(le){var l=$[le];if(l!==void 0)return l.exports;var A=$[le]={exports:{}};return de[le](A,A.exports,p),A.exports}var ge=p(15);ce=ge})();var Y=ce;b=[],y=function(){return{css_beautify:Y}}.apply(ut,b),y!==void 0&&(fn.exports=y)})()},40998:function(fn,ut,b){var y,ce;(function(){var Y;(function(){"use strict";var ge=[,,function(F){function _(O){this.__parent=O,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=[]}_.prototype.clone_empty=function(){var O=new _(this.__parent);return O.set_indent(this.__indent_count,this.__alignment_count),O},_.prototype.item=function(O){return O<0?this.__items[this.__items.length+O]:this.__items[O]},_.prototype.has_match=function(O){for(var X=this.__items.length-1;X>=0;X--)if(this.__items[X].match(O))return!0;return!1},_.prototype.set_indent=function(O,X){this.is_empty()&&(this.__indent_count=O||0,this.__alignment_count=X||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},_.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)},_.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},_.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var O=this.__parent.current_line;return O.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),O.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),O.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,O.__items[0]===" "&&(O.__items.splice(0,1),O.__character_count-=1),!0}return!1},_.prototype.is_empty=function(){return this.__items.length===0},_.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},_.prototype.push=function(O){this.__items.push(O);var X=O.lastIndexOf(`
|
|
|
`);X!==-1?this.__character_count=O.length-X:this.__character_count+=O.length},_.prototype.pop=function(){var O=null;return this.is_empty()||(O=this.__items.pop(),this.__character_count-=O.length),O},_.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},_.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},_.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},_.prototype.toString=function(){var O="";return this.is_empty()?this.__parent.indent_empty_lines&&(O=this.__parent.get_indent_string(this.__indent_count)):(O=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),O+=this.__items.join("")),O};function E(O,X){this.__cache=[""],this.__indent_size=O.indent_size,this.__indent_string=O.indent_char,O.indent_with_tabs||(this.__indent_string=new Array(O.indent_size+1).join(O.indent_char)),X=X||"",O.indent_level>0&&(X=new Array(O.indent_level+1).join(this.__indent_string)),this.__base_string=X,this.__base_string_length=X.length}E.prototype.get_indent_size=function(O,X){var J=this.__base_string_length;return X=X||0,O<0&&(J=0),J+=O*this.__indent_size,J+=X,J},E.prototype.get_indent_string=function(O,X){var J=this.__base_string;return X=X||0,O<0&&(O=0,J=""),X+=O*this.__indent_size,this.__ensure_cache(X),J+=this.__cache[X],J},E.prototype.__ensure_cache=function(O){for(;O>=this.__cache.length;)this.__add_column()},E.prototype.__add_column=function(){var O=this.__cache.length,X=0,J="";this.__indent_size&&O>=this.__indent_size&&(X=Math.floor(O/this.__indent_size),O-=X*this.__indent_size,J=new Array(X+1).join(this.__indent_string)),O&&(J+=new Array(O+1).join(" ")),this.__cache.push(J)};function w(O,X){this.__indent_cache=new E(O,X),this.raw=!1,this._end_with_newline=O.end_with_newline,this.indent_size=O.indent_size,this.wrap_line_length=O.wrap_line_length,this.indent_empty_lines=O.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new _(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}w.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},w.prototype.get_line_number=function(){return this.__lines.length},w.prototype.get_indent_string=function(O,X){return this.__indent_cache.get_indent_string(O,X)},w.prototype.get_indent_size=function(O,X){return this.__indent_cache.get_indent_size(O,X)},w.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},w.prototype.add_new_line=function(O){return this.is_empty()||!O&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},w.prototype.get_code=function(O){this.trim(!0);var X=this.current_line.pop();X&&(X[X.length-1]===`
|
|
|
`&&(X=X.replace(/\n+$/g,"")),this.current_line.push(X)),this._end_with_newline&&this.__add_outputline();var J=this.__lines.join(`
|
|
|
`);return O!==`
|
|
|
`&&(J=J.replace(/[\n]/g,O)),J},w.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},w.prototype.set_indent=function(O,X){return O=O||0,X=X||0,this.next_line.set_indent(O,X),this.__lines.length>1?(this.current_line.set_indent(O,X),!0):(this.current_line.set_indent(),!1)},w.prototype.add_raw_token=function(O){for(var X=0;X<O.newlines;X++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(O.whitespace_before),this.current_line.push(O.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},w.prototype.add_token=function(O){this.__add_space_before_token(),this.current_line.push(O),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},w.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},w.prototype.remove_indent=function(O){for(var X=this.__lines.length;O<X;)this.__lines[O]._remove_indent(),O++;this.current_line._remove_wrap_indent()},w.prototype.trim=function(O){for(O=O===void 0?!1:O,this.current_line.trim();O&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},w.prototype.just_added_newline=function(){return this.current_line.is_empty()},w.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},w.prototype.ensure_empty_line_above=function(O,X){for(var J=this.__lines.length-2;J>=0;){var U=this.__lines[J];if(U.is_empty())break;if(U.item(0).indexOf(O)!==0&&U.item(-1)!==X){this.__lines.splice(J+1,0,new _(this)),this.previous_line=this.__lines[this.__lines.length-2];break}J--}},F.exports.Output=w},function(F){function _(E,w,O,X){this.type=E,this.text=w,this.comments_before=null,this.newlines=O||0,this.whitespace_before=X||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}F.exports.Token=_},,,function(F){function _(O,X){this.raw_options=E(O,X),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"])}_.prototype._get_array=function(O,X){var J=this.raw_options[O],U=X||[];return typeof J=="object"?J!==null&&typeof J.concat=="function"&&(U=J.concat()):typeof J=="string"&&(U=J.split(/[^a-zA-Z0-9_\/\-]+/)),U},_.prototype._get_boolean=function(O,X){var J=this.raw_options[O],U=J===void 0?!!X:!!J;return U},_.prototype._get_characters=function(O,X){var J=this.raw_options[O],U=X||"";return typeof J=="string"&&(U=J.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),U},_.prototype._get_number=function(O,X){var J=this.raw_options[O];X=parseInt(X,10),isNaN(X)&&(X=0);var U=parseInt(J,10);return isNaN(U)&&(U=X),U},_.prototype._get_selection=function(O,X,J){var U=this._get_selection_list(O,X,J);if(U.length!==1)throw new Error("Invalid Option Value: The option '"+O+`' can only be one of the following values:
|
|
|
`+X+`
|
|
|
You passed in: '`+this.raw_options[O]+"'");return U[0]},_.prototype._get_selection_list=function(O,X,J){if(!X||X.length===0)throw new Error("Selection list cannot be empty.");if(J=J||[X[0]],!this._is_valid_selection(J,X))throw new Error("Invalid Default Value!");var U=this._get_array(O,J);if(!this._is_valid_selection(U,X))throw new Error("Invalid Option Value: The option '"+O+`' can contain only the following values:
|
|
|
`+X+`
|
|
|
You passed in: '`+this.raw_options[O]+"'");return U},_.prototype._is_valid_selection=function(O,X){return O.length&&X.length&&!O.some(function(J){return X.indexOf(J)===-1})};function E(O,X){var J={};O=w(O);var U;for(U in O)U!==X&&(J[U]=O[U]);if(X&&O[X])for(U in O[X])J[U]=O[X][U];return J}function w(O){var X={},J;for(J in O){var U=J.replace(/-/g,"_");X[U]=O[J]}return X}F.exports.Options=_,F.exports.normalizeOpts=w,F.exports.mergeOpts=E},,function(F){var _=RegExp.prototype.hasOwnProperty("sticky");function E(w){this.__input=w||"",this.__input_length=this.__input.length,this.__position=0}E.prototype.restart=function(){this.__position=0},E.prototype.back=function(){this.__position>0&&(this.__position-=1)},E.prototype.hasNext=function(){return this.__position<this.__input_length},E.prototype.next=function(){var w=null;return this.hasNext()&&(w=this.__input.charAt(this.__position),this.__position+=1),w},E.prototype.peek=function(w){var O=null;return w=w||0,w+=this.__position,w>=0&&w<this.__input_length&&(O=this.__input.charAt(w)),O},E.prototype.__match=function(w,O){w.lastIndex=O;var X=w.exec(this.__input);return X&&!(_&&w.sticky)&&X.index!==O&&(X=null),X},E.prototype.test=function(w,O){return O=O||0,O+=this.__position,O>=0&&O<this.__input_length?!!this.__match(w,O):!1},E.prototype.testChar=function(w,O){var X=this.peek(O);return w.lastIndex=0,X!==null&&w.test(X)},E.prototype.match=function(w){var O=this.__match(w,this.__position);return O?this.__position+=O[0].length:O=null,O},E.prototype.read=function(w,O,X){var J="",U;return w&&(U=this.match(w),U&&(J+=U[0])),O&&(U||!w)&&(J+=this.readUntil(O,X)),J},E.prototype.readUntil=function(w,O){var X="",J=this.__position;w.lastIndex=this.__position;var U=w.exec(this.__input);return U?(J=U.index,O&&(J+=U[0].length)):J=this.__input_length,X=this.__input.substring(this.__position,J),this.__position=J,X},E.prototype.readUntilAfter=function(w){return this.readUntil(w,!0)},E.prototype.get_regexp=function(w,O){var X=null,J="g";return O&&_&&(J="y"),typeof w=="string"&&w!==""?X=new RegExp(w,J):w&&(X=new RegExp(w.source,J)),X},E.prototype.get_literal_regexp=function(w){return RegExp(w.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},E.prototype.peekUntilAfter=function(w){var O=this.__position,X=this.readUntilAfter(w);return this.__position=O,X},E.prototype.lookBack=function(w){var O=this.__position-1;return O>=w.length&&this.__input.substring(O-w.length,O).toLowerCase()===w},F.exports.InputScanner=E},function(F,_,E){var w=E(8).InputScanner,O=E(3).Token,X=E(10).TokenStream,J=E(11).WhitespacePattern,U={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},R=function(z,P){this._input=new w(z),this._options=P||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new J(this._input)};R.prototype.tokenize=function(){this._input.restart(),this.__tokens=new X,this._reset();for(var z,P=new O(U.START,""),N=null,re=[],ue=new X;P.type!==U.EOF;){for(z=this._get_next_token(P,N);this._is_comment(z);)ue.add(z),z=this._get_next_token(P,N);ue.isEmpty()||(z.comments_before=ue,ue=new X),z.parent=N,this._is_opening(z)?(re.push(N),N=z):N&&this._is_closing(z,N)&&(z.opened=N,N.closed=z,N=re.pop(),z.parent=N),z.previous=P,P.next=z,this.__tokens.add(z),P=z}return this.__tokens},R.prototype._is_first_token=function(){return this.__tokens.isEmpty()},R.prototype._reset=function(){},R.prototype._get_next_token=function(z,P){this._readWhitespace();var N=this._input.read(/.+/g);return N?this._create_token(U.RAW,N):this._create_token(U.EOF,"")},R.prototype._is_comment=function(z){return!1},R.prototype._is_opening=function(z){return!1},R.prototype._is_closing=function(z,P){return!1},R.prototype._create_token=function(z,P){var N=new O(z,P,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return N},R.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},F.exports.Tokenizer=R,F.exports.TOKEN=U},function(F){function _(E){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=E}_.prototype.restart=function(){this.__position=0},_.prototype.isEmpty=function(){return this.__tokens_length===0},_.prototype.hasNext=function(){return this.__position<this.__tokens_length},_.prototype.next=function(){var E=null;return this.hasNext()&&(E=this.__tokens[this.__position],this.__position+=1),E},_.prototype.peek=function(E){var w=null;return E=E||0,E+=this.__position,E>=0&&E<this.__tokens_length&&(w=this.__tokens[E]),w},_.prototype.add=function(E){this.__parent_token&&(E.parent=this.__parent_token),this.__tokens.push(E),this.__tokens_length+=1},F.exports.TokenStream=_},function(F,_,E){var w=E(12).Pattern;function O(X,J){w.call(this,X,J),J?this._line_regexp=this._input.get_regexp(J._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}O.prototype=new w,O.prototype.__set_whitespace_patterns=function(X,J){X+="\\t ",J+="\\n\\r",this._match_pattern=this._input.get_regexp("["+X+J+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+J+"]")},O.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var X=this._input.read(this._match_pattern);if(X===" ")this.whitespace_before_token=" ";else if(X){var J=this.__split(this._newline_regexp,X);this.newline_count=J.length-1,this.whitespace_before_token=J[this.newline_count]}return X},O.prototype.matching=function(X,J){var U=this._create();return U.__set_whitespace_patterns(X,J),U._update(),U},O.prototype._create=function(){return new O(this._input,this)},O.prototype.__split=function(X,J){X.lastIndex=0;for(var U=0,R=[],z=X.exec(J);z;)R.push(J.substring(U,z.index)),U=z.index+z[0].length,z=X.exec(J);return U<J.length?R.push(J.substring(U,J.length)):R.push(""),R},F.exports.WhitespacePattern=O},function(F){function _(E,w){this._input=E,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,w&&(this._starting_pattern=this._input.get_regexp(w._starting_pattern,!0),this._match_pattern=this._input.get_regexp(w._match_pattern,!0),this._until_pattern=this._input.get_regexp(w._until_pattern),this._until_after=w._until_after)}_.prototype.read=function(){var E=this._input.read(this._starting_pattern);return(!this._starting_pattern||E)&&(E+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),E},_.prototype.read_match=function(){return this._input.match(this._match_pattern)},_.prototype.until_after=function(E){var w=this._create();return w._until_after=!0,w._until_pattern=this._input.get_regexp(E),w._update(),w},_.prototype.until=function(E){var w=this._create();return w._until_after=!1,w._until_pattern=this._input.get_regexp(E),w._update(),w},_.prototype.starting_with=function(E){var w=this._create();return w._starting_pattern=this._input.get_regexp(E,!0),w._update(),w},_.prototype.matching=function(E){var w=this._create();return w._match_pattern=this._input.get_regexp(E,!0),w._update(),w},_.prototype._create=function(){return new _(this._input,this)},_.prototype._update=function(){},F.exports.Pattern=_},function(F){function _(E,w){E=typeof E=="string"?E:E.source,w=typeof w=="string"?w:w.source,this.__directives_block_pattern=new RegExp(E+/ beautify( \w+[:]\w+)+ /.source+w,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(E+/\sbeautify\signore:end\s/.source+w,"g")}_.prototype.get_directives=function(E){if(!E.match(this.__directives_block_pattern))return null;var w={};this.__directive_pattern.lastIndex=0;for(var O=this.__directive_pattern.exec(E);O;)w[O[1]]=O[2],O=this.__directive_pattern.exec(E);return w},_.prototype.readIgnored=function(E){return E.readUntilAfter(this.__directives_end_ignore_pattern)},F.exports.Directives=_},function(F,_,E){var w=E(12).Pattern,O={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function X(J,U){w.call(this,J,U),this.__template_pattern=null,this._disabled=Object.assign({},O),this._excluded=Object.assign({},O),U&&(this.__template_pattern=this._input.get_regexp(U.__template_pattern),this._excluded=Object.assign(this._excluded,U._excluded),this._disabled=Object.assign(this._disabled,U._disabled));var R=new w(J);this.__patterns={handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:R.starting_with(/{{{/).until_after(/}}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),php:R.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:R.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:R.starting_with(/{%/).until_after(/%}/),django_value:R.starting_with(/{{/).until_after(/}}/),django_comment:R.starting_with(/{#/).until_after(/#}/),smarty:R.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:R.starting_with(/{\*/).until_after(/\*}/),smarty_literal:R.starting_with(/{literal}/).until_after(/{\/literal}/)}}X.prototype=new w,X.prototype._create=function(){return new X(this._input,this)},X.prototype._update=function(){this.__set_templated_pattern()},X.prototype.disable=function(J){var U=this._create();return U._disabled[J]=!0,U._update(),U},X.prototype.read_options=function(J){var U=this._create();for(var R in O)U._disabled[R]=J.templating.indexOf(R)===-1;return U._update(),U},X.prototype.exclude=function(J){var U=this._create();return U._excluded[J]=!0,U._update(),U},X.prototype.read=function(){var J="";this._match_pattern?J=this._input.read(this._starting_pattern):J=this._input.read(this._starting_pattern,this.__template_pattern);for(var U=this._read_template();U;)this._match_pattern?U+=this._input.read(this._match_pattern):U+=this._input.readUntil(this.__template_pattern),J+=U,U=this._read_template();return this._until_after&&(J+=this._input.readUntilAfter(this._until_pattern)),J},X.prototype.__set_templated_pattern=function(){var J=[];this._disabled.php||J.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||J.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||J.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||J.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(J.push(this.__patterns.django._starting_pattern.source),J.push(this.__patterns.django_value._starting_pattern.source),J.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||J.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&J.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+J.join("|")+")")},X.prototype._read_template=function(){var J="",U=this._input.peek();if(U==="<"){var R=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&R==="?"&&(J=J||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&R==="%"&&(J=J||this.__patterns.erb.read())}else U==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(J=J||this.__patterns.handlebars_comment.read(),J=J||this.__patterns.handlebars_unescaped.read(),J=J||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(J=J||this.__patterns.django_value.read()),this._excluded.django||(J=J||this.__patterns.django_comment.read(),J=J||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(J=J||this.__patterns.smarty_comment.read(),J=J||this.__patterns.smarty_literal.read(),J=J||this.__patterns.smarty.read()));return J},F.exports.TemplatablePattern=X},,,,function(F,_,E){var w=E(19).Beautifier,O=E(20).Options;function X(J,U,R,z){var P=new w(J,U,R,z);return P.beautify()}F.exports=X,F.exports.defaultOptions=function(){return new O}},function(F,_,E){var w=E(20).Options,O=E(2).Output,X=E(21).Tokenizer,J=E(21).TOKEN,U=/\r\n|[\r\n]/,R=/\r\n|[\r\n]/g,z=function(ie,K){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=ie.max_preserve_newlines,this.preserve_newlines=ie.preserve_newlines,this._output=new O(ie,K)};z.prototype.current_line_has_match=function(ie){return this._output.current_line.has_match(ie)},z.prototype.set_space_before_token=function(ie,K){this._output.space_before_token=ie,this._output.non_breaking_space=K},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(ie){this._output.add_raw_token(ie)},z.prototype.print_preserved_newlines=function(ie){var K=0;ie.type!==J.TEXT&&ie.previous.type!==J.TEXT&&(K=ie.newlines?1:0),this.preserve_newlines&&(K=ie.newlines<this.max_preserve_newlines+1?ie.newlines:this.max_preserve_newlines+1);for(var I=0;I<K;I++)this.print_newline(I>0);return K!==0},z.prototype.traverse_whitespace=function(ie){return ie.whitespace_before||ie.newlines?(this.print_preserved_newlines(ie)||(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(ie){this._output.add_new_line(ie)},z.prototype.print_token=function(ie){ie.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(ie.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(ie){return ie=this.indent_level+(ie||0),ie<1?"":this._output.get_indent_string(ie)};var P=function(ie){for(var K=null,I=ie.next;I.type!==J.EOF&&ie.closed!==I;){if(I.type===J.ATTRIBUTE&&I.text==="type"){I.next&&I.next.type===J.EQUALS&&I.next.next&&I.next.next.type===J.VALUE&&(K=I.next.next.text);break}I=I.next}return K},N=function(ie,K){var I=null,ee=null;return K.closed?(ie==="script"?I="text/javascript":ie==="style"&&(I="text/css"),I=P(K)||I,I.search("text/css")>-1?ee="css":I.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?ee="javascript":I.search(/(text|application|dojo)\/(x-)?(html)/)>-1?ee="html":I.search(/test\/null/)>-1&&(ee="null"),ee):null};function re(ie,K){return K.indexOf(ie)!==-1}function ue(ie,K,I){this.parent=ie||null,this.tag=K?K.tag_name:"",this.indent_level=I||0,this.parser_token=K||null}function me(ie){this._printer=ie,this._current_frame=null}me.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},me.prototype.record_tag=function(ie){var K=new ue(this._current_frame,ie,this._printer.indent_level);this._current_frame=K},me.prototype._try_pop_frame=function(ie){var K=null;return ie&&(K=ie.parser_token,this._printer.indent_level=ie.indent_level,this._current_frame=ie.parent),K},me.prototype._get_frame=function(ie,K){for(var I=this._current_frame;I&&ie.indexOf(I.tag)===-1;){if(K&&K.indexOf(I.tag)!==-1){I=null;break}I=I.parent}return I},me.prototype.try_pop=function(ie,K){var I=this._get_frame([ie],K);return this._try_pop_frame(I)},me.prototype.indent_to_tag=function(ie){var K=this._get_frame(ie);K&&(this._printer.indent_level=K.indent_level)};function Te(ie,K,I,ee){this._source_text=ie||"",K=K||{},this._js_beautify=I,this._css_beautify=ee,this._tag_stack=null;var V=new w(K,"html");this._options=V,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"}Te.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ie=this._source_text,K=this._options.eol;this._options.eol==="auto"&&(K=`
|
|
|
`,ie&&U.test(ie)&&(K=ie.match(U)[0])),ie=ie.replace(R,`
|
|
|
`);var I=ie.match(/^[\t ]*/)[0],ee={text:"",type:""},V=new Be(this._options),he=new z(this._options,I),S=new X(ie,this._options).tokenize();this._tag_stack=new me(he);for(var C=null,Z=S.next();Z.type!==J.EOF;)Z.type===J.TAG_OPEN||Z.type===J.COMMENT?(C=this._handle_tag_open(he,Z,V,ee,S),V=C):Z.type===J.ATTRIBUTE||Z.type===J.EQUALS||Z.type===J.VALUE||Z.type===J.TEXT&&!V.tag_complete?C=this._handle_inside_tag(he,Z,V,ee):Z.type===J.TAG_CLOSE?C=this._handle_tag_close(he,Z,V):Z.type===J.TEXT?C=this._handle_text(he,Z,V):Z.type===J.CONTROL_FLOW_OPEN?C=this._handle_control_flow_open(he,Z):Z.type===J.CONTROL_FLOW_CLOSE?C=this._handle_control_flow_close(he,Z):he.add_raw_token(Z),ee=C,Z=S.next();var ye=he._output.get_code(K);return ye},Te.prototype._handle_control_flow_open=function(ie,K){var I={text:K.text,type:K.type};return ie.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),K.newlines?ie.print_preserved_newlines(K):ie.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),ie.print_token(K),ie.indent(),I},Te.prototype._handle_control_flow_close=function(ie,K){var I={text:K.text,type:K.type};return ie.deindent(),K.newlines?ie.print_preserved_newlines(K):ie.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),ie.print_token(K),I},Te.prototype._handle_tag_close=function(ie,K,I){var ee={text:K.text,type:K.type};return ie.alignment_size=0,I.tag_complete=!0,ie.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),I.is_unformatted?ie.add_raw_token(K):(I.tag_start_char==="<"&&(ie.set_space_before_token(K.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&I.has_wrapped_attrs&&ie.print_newline(!1)),ie.print_token(K)),I.indent_content&&!(I.is_unformatted||I.is_content_unformatted)&&(ie.indent(),I.indent_content=!1),!I.is_inline_element&&!(I.is_unformatted||I.is_content_unformatted)&&ie.set_wrap_point(),ee},Te.prototype._handle_inside_tag=function(ie,K,I,ee){var V=I.has_wrapped_attrs,he={text:K.text,type:K.type};return ie.set_space_before_token(K.newlines||K.whitespace_before!=="",!0),I.is_unformatted?ie.add_raw_token(K):I.tag_start_char==="{"&&K.type===J.TEXT?ie.print_preserved_newlines(K)?(K.newlines=0,ie.add_raw_token(K)):ie.print_token(K):(K.type===J.ATTRIBUTE?ie.set_space_before_token(!0):(K.type===J.EQUALS||K.type===J.VALUE&&K.previous.type===J.EQUALS)&&ie.set_space_before_token(!1),K.type===J.ATTRIBUTE&&I.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(ie.traverse_whitespace(K),V=V||K.newlines!==0),this._is_wrap_attributes_force&&I.attr_count>=this._options.wrap_attributes_min_attrs&&(ee.type!==J.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(ie.print_newline(!1),V=!0)),ie.print_token(K),V=V||ie.previous_token_wrapped(),I.has_wrapped_attrs=V),he},Te.prototype._handle_text=function(ie,K,I){var ee={text:K.text,type:"TK_CONTENT"};return I.custom_beautifier_name?this._print_custom_beatifier_text(ie,K,I):I.is_unformatted||I.is_content_unformatted?ie.add_raw_token(K):(ie.traverse_whitespace(K),ie.print_token(K)),ee},Te.prototype._print_custom_beatifier_text=function(ie,K,I){var ee=this;if(K.text!==""){var V=K.text,he,S=1,C="",Z="";I.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?he=this._js_beautify:I.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?he=this._css_beautify:I.custom_beautifier_name==="html"&&(he=function(Dt,Ut){var ot=new Te(Dt,Ut,ee._js_beautify,ee._css_beautify);return ot.beautify()}),this._options.indent_scripts==="keep"?S=0:this._options.indent_scripts==="separate"&&(S=-ie.indent_level);var ye=ie.get_full_indent(S);if(V=V.replace(/\n[ \t]*$/,""),I.custom_beautifier_name!=="html"&&V[0]==="<"&&V.match(/^(<!--|<!\[CDATA\[)/)){var Ve=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(V);if(!Ve){ie.add_raw_token(K);return}C=ye+Ve[1]+`
|
|
|
`,V=Ve[4],Ve[5]&&(Z=ye+Ve[5]),V=V.replace(/\n[ \t]*$/,""),(Ve[2]||Ve[3].indexOf(`
|
|
|
`)!==-1)&&(Ve=Ve[3].match(/[ \t]+$/),Ve&&(K.whitespace_before=Ve[0]))}if(V)if(he){var qe=function(){this.eol=`
|
|
|
`};qe.prototype=this._options.raw_options;var gt=new qe;V=he(ye+V,gt)}else{var yt=K.whitespace_before;yt&&(V=V.replace(new RegExp(`
|
|
|
(`+yt+")?","g"),`
|
|
|
`)),V=ye+V.replace(/\n/g,`
|
|
|
`+ye)}C&&(V?V=C+V+`
|
|
|
`+Z:V=C+Z),ie.print_newline(!1),V&&(K.text=V,K.whitespace_before="",K.newlines=0,ie.add_raw_token(K),ie.print_newline(!0))}},Te.prototype._handle_tag_open=function(ie,K,I,ee,V){var he=this._get_tag_open_token(K);if((I.is_unformatted||I.is_content_unformatted)&&!I.is_empty_element&&K.type===J.TAG_OPEN&&!he.is_start_tag?(ie.add_raw_token(K),he.start_tag_token=this._tag_stack.try_pop(he.tag_name)):(ie.traverse_whitespace(K),this._set_tag_position(ie,K,he,I,ee),he.is_inline_element||ie.set_wrap_point(),ie.print_token(K)),he.is_start_tag&&this._is_wrap_attributes_force){var S=0,C;do C=V.peek(S),C.type===J.ATTRIBUTE&&(he.attr_count+=1),S+=1;while(C.type!==J.EOF&&C.type!==J.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(he.alignment_size=K.text.length+1),!he.tag_complete&&!he.is_unformatted&&(ie.alignment_size=he.alignment_size),he};var Be=function(ie,K,I){if(this.parent=K||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="",!I)this.tag_complete=!0;else{var ee;this.tag_start_char=I.text[0],this.text=I.text,this.tag_start_char==="<"?(ee=I.text.match(/^<([^\s>]*)/),this.tag_check=ee?ee[1]:""):(ee=I.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=ee?ee[1]:"",(I.text.startsWith("{{#>")||I.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&I.next!==null?this.tag_check=I.next.text.split(" ")[0]:this.tag_check=I.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),I.type===J.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||I.closed&&I.closed.text==="/>";var V=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(V=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!ie.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(V)))}};Te.prototype._get_tag_open_token=function(ie){var K=new Be(this._options,this._tag_stack.get_parser_token(),ie);return K.alignment_size=this._options.wrap_attributes_indent_size,K.is_end_tag=K.is_end_tag||re(K.tag_check,this._options.void_elements),K.is_empty_element=K.tag_complete||K.is_start_tag&&K.is_end_tag,K.is_unformatted=!K.tag_complete&&re(K.tag_check,this._options.unformatted),K.is_content_unformatted=!K.is_empty_element&&re(K.tag_check,this._options.content_unformatted),K.is_inline_element=re(K.tag_name,this._options.inline)||this._options.inline_custom_elements&&K.tag_name.includes("-")||K.tag_start_char==="{",K},Te.prototype._set_tag_position=function(ie,K,I,ee,V){if(I.is_empty_element||(I.is_end_tag?I.start_tag_token=this._tag_stack.try_pop(I.tag_name):(this._do_optional_end_element(I)&&(I.is_inline_element||ie.print_newline(!1)),this._tag_stack.record_tag(I),(I.tag_name==="script"||I.tag_name==="style")&&!(I.is_unformatted||I.is_content_unformatted)&&(I.custom_beautifier_name=N(I.tag_check,K)))),re(I.tag_check,this._options.extra_liners)&&(ie.print_newline(!1),ie._output.just_added_blankline()||ie.print_newline(!0)),I.is_empty_element){if(I.tag_start_char==="{"&&I.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),I.indent_content=!0;var he=ie.current_line_has_match(/{{#if/);he||ie.print_newline(!1)}I.tag_name==="!--"&&V.type===J.TAG_CLOSE&&ee.is_end_tag&&I.text.indexOf(`
|
|
|
`)===-1||(I.is_inline_element||I.is_unformatted||ie.print_newline(!1),this._calcluate_parent_multiline(ie,I))}else if(I.is_end_tag){var S=!1;S=I.start_tag_token&&I.start_tag_token.multiline_content,S=S||!I.is_inline_element&&!(ee.is_inline_element||ee.is_unformatted)&&!(V.type===J.TAG_CLOSE&&I.start_tag_token===ee)&&V.type!=="TK_CONTENT",(I.is_content_unformatted||I.is_unformatted)&&(S=!1),S&&ie.print_newline(!1)}else I.indent_content=!I.custom_beautifier_name,I.tag_start_char==="<"&&(I.tag_name==="html"?I.indent_content=this._options.indent_inner_html:I.tag_name==="head"?I.indent_content=this._options.indent_head_inner_html:I.tag_name==="body"&&(I.indent_content=this._options.indent_body_inner_html)),!(I.is_inline_element||I.is_unformatted)&&(V.type!=="TK_CONTENT"||I.is_content_unformatted)&&ie.print_newline(!1),this._calcluate_parent_multiline(ie,I)},Te.prototype._calcluate_parent_multiline=function(ie,K){K.parent&&ie._output.just_added_newline()&&!((K.is_inline_element||K.is_unformatted)&&K.parent.is_inline_element)&&(K.parent.multiline_content=!0)};var Le=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],at=["a","audio","del","ins","map","noscript","video"];Te.prototype._do_optional_end_element=function(ie){var K=null;if(!(ie.is_empty_element||!ie.is_start_tag||!ie.parent)){if(ie.tag_name==="body")K=K||this._tag_stack.try_pop("head");else if(ie.tag_name==="li")K=K||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(ie.tag_name==="dd"||ie.tag_name==="dt")K=K||this._tag_stack.try_pop("dt",["dl"]),K=K||this._tag_stack.try_pop("dd",["dl"]);else if(ie.parent.tag_name==="p"&&Le.indexOf(ie.tag_name)!==-1){var I=ie.parent.parent;(!I||at.indexOf(I.tag_name)===-1)&&(K=K||this._tag_stack.try_pop("p"))}else ie.tag_name==="rp"||ie.tag_name==="rt"?(K=K||this._tag_stack.try_pop("rt",["ruby","rtc"]),K=K||this._tag_stack.try_pop("rp",["ruby","rtc"])):ie.tag_name==="optgroup"?K=K||this._tag_stack.try_pop("optgroup",["select"]):ie.tag_name==="option"?K=K||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):ie.tag_name==="colgroup"?K=K||this._tag_stack.try_pop("caption",["table"]):ie.tag_name==="thead"?(K=K||this._tag_stack.try_pop("caption",["table"]),K=K||this._tag_stack.try_pop("colgroup",["table"])):ie.tag_name==="tbody"||ie.tag_name==="tfoot"?(K=K||this._tag_stack.try_pop("caption",["table"]),K=K||this._tag_stack.try_pop("colgroup",["table"]),K=K||this._tag_stack.try_pop("thead",["table"]),K=K||this._tag_stack.try_pop("tbody",["table"])):ie.tag_name==="tr"?(K=K||this._tag_stack.try_pop("caption",["table"]),K=K||this._tag_stack.try_pop("colgroup",["table"]),K=K||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(ie.tag_name==="th"||ie.tag_name==="td")&&(K=K||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),K=K||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return ie.parent=this._tag_stack.get_parser_token(),K}},F.exports.Beautifier=Te},function(F,_,E){var w=E(6).Options;function O(X){w.call(this,X,"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"])}O.prototype=new w,F.exports.Options=O},function(F,_,E){var w=E(9).Tokenizer,O=E(9).TOKEN,X=E(13).Directives,J=E(14).TemplatablePattern,U=E(12).Pattern,R={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:O.START,RAW:O.RAW,EOF:O.EOF},z=new X(/<\!--/,/-->/),P=function(N,re){w.call(this,N,re),this._current_tag_name="";var ue=new J(this._input).read_options(this._options),me=new U(this._input);if(this.__patterns={word:ue.until(/[\n\r\t <]/),word_control_flow_close_excluded:ue.until(/[\n\r\t <}]/),single_quote:ue.until_after(/'/),double_quote:ue.until_after(/"/),attribute:ue.until(/[\n\r\t =>]|\/>/),element_name:ue.until(/[\n\r\t >\/]/),angular_control_flow_start:me.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:me.starting_with(/{{!--/).until_after(/--}}/),handlebars:me.starting_with(/{{/).until_after(/}}/),handlebars_open:me.until(/[\n\r\t }]/),handlebars_raw_close:me.until(/}}/),comment:me.starting_with(/<!--/).until_after(/-->/),cdata:me.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:me.starting_with(/<!\[/).until_after(/]>/),processing:me.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 Te=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=me.matching(Te).until_after(Te)}};P.prototype=new w,P.prototype._is_comment=function(N){return!1},P.prototype._is_opening=function(N){return N.type===R.TAG_OPEN||N.type===R.CONTROL_FLOW_OPEN},P.prototype._is_closing=function(N,re){return N.type===R.TAG_CLOSE&&re&&((N.text===">"||N.text==="/>")&&re.text[0]==="<"||N.text==="}}"&&re.text[0]==="{"&&re.text[1]==="{")||N.type===R.CONTROL_FLOW_CLOSE&&N.text==="}"&&re.text.endsWith("{")},P.prototype._reset=function(){this._current_tag_name=""},P.prototype._get_next_token=function(N,re){var ue=null;this._readWhitespace();var me=this._input.peek();return me===null?this._create_token(R.EOF,""):(ue=ue||this._read_open_handlebars(me,re),ue=ue||this._read_attribute(me,N,re),ue=ue||this._read_close(me,re),ue=ue||this._read_script_and_style(me,N),ue=ue||this._read_control_flows(me,re),ue=ue||this._read_raw_content(me,N,re),ue=ue||this._read_content_word(me,re),ue=ue||this._read_comment_or_cdata(me),ue=ue||this._read_processing(me),ue=ue||this._read_open(me,re),ue=ue||this._create_token(R.UNKNOWN,this._input.next()),ue)},P.prototype._read_comment_or_cdata=function(N){var re=null,ue=null,me=null;if(N==="<"){var Te=this._input.peek(1);Te==="!"&&(ue=this.__patterns.comment.read(),ue?(me=z.get_directives(ue),me&&me.ignore==="start"&&(ue+=z.readIgnored(this._input))):ue=this.__patterns.cdata.read()),ue&&(re=this._create_token(R.COMMENT,ue),re.directives=me)}return re},P.prototype._read_processing=function(N){var re=null,ue=null,me=null;if(N==="<"){var Te=this._input.peek(1);(Te==="!"||Te==="?")&&(ue=this.__patterns.conditional_comment.read(),ue=ue||this.__patterns.processing.read()),ue&&(re=this._create_token(R.COMMENT,ue),re.directives=me)}return re},P.prototype._read_open=function(N,re){var ue=null,me=null;return(!re||re.type===R.CONTROL_FLOW_OPEN)&&N==="<"&&(ue=this._input.next(),this._input.peek()==="/"&&(ue+=this._input.next()),ue+=this.__patterns.element_name.read(),me=this._create_token(R.TAG_OPEN,ue)),me},P.prototype._read_open_handlebars=function(N,re){var ue=null,me=null;return(!re||re.type===R.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&N==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ue=this.__patterns.handlebars_comment.read(),ue=ue||this.__patterns.handlebars.read(),me=this._create_token(R.COMMENT,ue)):(ue=this.__patterns.handlebars_open.read(),me=this._create_token(R.TAG_OPEN,ue))),me},P.prototype._read_control_flows=function(N,re){var ue="",me=null;if(!this._options.templating.includes("angular"))return me;if(N==="@"){if(ue=this.__patterns.angular_control_flow_start.read(),ue==="")return me;for(var Te=ue.endsWith("(")?1:0,Be=0;!(ue.endsWith("{")&&Te===Be);){var Le=this._input.next();if(Le===null)break;Le==="("?Te++:Le===")"&&Be++,ue+=Le}me=this._create_token(R.CONTROL_FLOW_OPEN,ue)}else N==="}"&&re&&re.type===R.CONTROL_FLOW_OPEN&&(ue=this._input.next(),me=this._create_token(R.CONTROL_FLOW_CLOSE,ue));return me},P.prototype._read_close=function(N,re){var ue=null,me=null;return re&&re.type===R.TAG_OPEN&&(re.text[0]==="<"&&(N===">"||N==="/"&&this._input.peek(1)===">")?(ue=this._input.next(),N==="/"&&(ue+=this._input.next()),me=this._create_token(R.TAG_CLOSE,ue)):re.text[0]==="{"&&N==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),me=this._create_token(R.TAG_CLOSE,"}}"))),me},P.prototype._read_attribute=function(N,re,ue){var me=null,Te="";if(ue&&ue.text[0]==="<")if(N==="=")me=this._create_token(R.EQUALS,this._input.next());else if(N==='"'||N==="'"){var Be=this._input.next();N==='"'?Be+=this.__patterns.double_quote.read():Be+=this.__patterns.single_quote.read(),me=this._create_token(R.VALUE,Be)}else Te=this.__patterns.attribute.read(),Te&&(re.type===R.EQUALS?me=this._create_token(R.VALUE,Te):me=this._create_token(R.ATTRIBUTE,Te));return me},P.prototype._is_content_unformatted=function(N){return this._options.void_elements.indexOf(N)===-1&&(this._options.content_unformatted.indexOf(N)!==-1||this._options.unformatted.indexOf(N)!==-1)},P.prototype._read_raw_content=function(N,re,ue){var me="";if(ue&&ue.text[0]==="{")me=this.__patterns.handlebars_raw_close.read();else if(re.type===R.TAG_CLOSE&&re.opened.text[0]==="<"&&re.text[0]!=="/"){var Te=re.opened.text.substr(1).toLowerCase();this._is_content_unformatted(Te)&&(me=this._input.readUntil(new RegExp("</"+Te+"[\\n\\r\\t ]*?>","ig")))}return me?this._create_token(R.TEXT,me):null},P.prototype._read_script_and_style=function(N,re){if(re.type===R.TAG_CLOSE&&re.opened.text[0]==="<"&&re.text[0]!=="/"){var ue=re.opened.text.substr(1).toLowerCase();if(ue==="script"||ue==="style"){var me=this._read_comment_or_cdata(N);if(me)return me.type=R.TEXT,me;var Te=this._input.readUntil(new RegExp("</"+ue+"[\\n\\r\\t ]*?>","ig"));if(Te)return this._create_token(R.TEXT,Te)}}return null},P.prototype._read_content_word=function(N,re){var ue="";return this._options.unformatted_content_delimiter&&N===this._options.unformatted_content_delimiter[0]&&(ue=this.__patterns.unformatted_content_delimiter.read()),ue||(ue=re&&re.type===R.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ue?this._create_token(R.TEXT,ue):null},F.exports.Tokenizer=P,F.exports.TOKEN=R}],le={};function l(F){var _=le[F];if(_!==void 0)return _.exports;var E=le[F]={exports:{}};return ge[F](E,E.exports,l),E.exports}var A=l(18);Y=A})();var de=Y;if(1)y=[b,b(58553),b(87804)],ce=function(ge){var le=b(58553),l=b(87804);return{html_beautify:function(A,F){return de(A,F,le.js_beautify,l.css_beautify)}}}.apply(ut,y),ce!==void 0&&(fn.exports=ce);else var $,p})()},58553:function(fn,ut){var b,y;(function(){var ce;(function(){"use strict";var de=[function(le,l,A){var F=A(1).Beautifier,_=A(5).Options;function E(w,O){var X=new F(w,O);return X.beautify()}le.exports=E,le.exports.defaultOptions=function(){return new _}},function(le,l,A){var F=A(2).Output,_=A(3).Token,E=A(4),w=A(5).Options,O=A(7).Tokenizer,X=A(7).line_starters,J=A(7).positionable_operators,U=A(7).TOKEN;function R(C,Z){return Z.indexOf(C)!==-1}function z(C){return C.replace(/^\s+/g,"")}function P(C){for(var Z={},ye=0;ye<C.length;ye++)Z[C[ye].replace(/-/g,"_")]=C[ye];return Z}function N(C,Z){return C&&C.type===U.RESERVED&&C.text===Z}function re(C,Z){return C&&C.type===U.RESERVED&&R(C.text,Z)}var ue=["case","return","do","if","throw","else","await","break","continue","async"],me=["before-newline","after-newline","preserve-newline"],Te=P(me),Be=[Te.before_newline,Te.preserve_newline],Le={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function at(C,Z){Z.multiline_frame||Z.mode===Le.ForInitializer||Z.mode===Le.Conditional||C.remove_indent(Z.start_line_index)}function ie(C){C=C.replace(E.allLineBreaks,`
|
|
|
`);for(var Z=[],ye=C.indexOf(`
|
|
|
`);ye!==-1;)Z.push(C.substring(0,ye)),C=C.substring(ye+1),ye=C.indexOf(`
|
|
|
`);return C.length&&Z.push(C),Z}function K(C){return C===Le.ArrayLiteral}function I(C){return R(C,[Le.Expression,Le.ForInitializer,Le.Conditional])}function ee(C,Z){for(var ye=0;ye<C.length;ye++){var Ve=C[ye].trim();if(Ve.charAt(0)!==Z)return!1}return!0}function V(C,Z){for(var ye=0,Ve=C.length,qe;ye<Ve;ye++)if(qe=C[ye],qe&&qe.indexOf(Z)!==0)return!1;return!0}function he(C,Z){Z=Z||{},this._source_text=C||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new w(Z)}he.prototype.create_flags=function(C,Z){var ye=0;C&&(ye=C.indentation_level,!this._output.just_added_newline()&&C.line_indent_level>ye&&(ye=C.line_indent_level));var Ve={mode:Z,parent:C,last_token:C?C.last_token:new _(U.START_BLOCK,""),last_word:C?C.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:ye,alignment:0,line_indent_level:C?C.line_indent_level:ye,start_line_index:this._output.get_line_number(),ternary_depth:0};return Ve},he.prototype._reset=function(C){var Z=C.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new F(this._options,Z),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Le.BlockStatement);var ye=new O(C,this._options);return this._tokens=ye.tokenize(),C},he.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var C,Z=this._reset(this._source_text),ye=this._options.eol;this._options.eol==="auto"&&(ye=`
|
|
|
`,Z&&E.lineBreak.test(Z||"")&&(ye=Z.match(E.lineBreak)[0]));for(var Ve=this._tokens.next();Ve;)this.handle_token(Ve),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Ve,Ve=this._tokens.next();return C=this._output.get_code(ye),C},he.prototype.handle_token=function(C,Z){C.type===U.START_EXPR?this.handle_start_expr(C):C.type===U.END_EXPR?this.handle_end_expr(C):C.type===U.START_BLOCK?this.handle_start_block(C):C.type===U.END_BLOCK?this.handle_end_block(C):C.type===U.WORD?this.handle_word(C):C.type===U.RESERVED?this.handle_word(C):C.type===U.SEMICOLON?this.handle_semicolon(C):C.type===U.STRING?this.handle_string(C):C.type===U.EQUALS?this.handle_equals(C):C.type===U.OPERATOR?this.handle_operator(C):C.type===U.COMMA?this.handle_comma(C):C.type===U.BLOCK_COMMENT?this.handle_block_comment(C,Z):C.type===U.COMMENT?this.handle_comment(C,Z):C.type===U.DOT?this.handle_dot(C):C.type===U.EOF?this.handle_eof(C):C.type===U.UNKNOWN?this.handle_unknown(C,Z):this.handle_unknown(C,Z)},he.prototype.handle_whitespace_and_comments=function(C,Z){var ye=C.newlines,Ve=this._options.keep_array_indentation&&K(this._flags.mode);if(C.comments_before)for(var qe=C.comments_before.next();qe;)this.handle_whitespace_and_comments(qe,Z),this.handle_token(qe,Z),qe=C.comments_before.next();if(Ve)for(var gt=0;gt<ye;gt+=1)this.print_newline(gt>0,Z);else if(this._options.max_preserve_newlines&&ye>this._options.max_preserve_newlines&&(ye=this._options.max_preserve_newlines),this._options.preserve_newlines&&ye>1){this.print_newline(!1,Z);for(var yt=1;yt<ye;yt+=1)this.print_newline(!0,Z)}};var S=["async","break","continue","return","throw","yield"];he.prototype.allow_wrap_or_preserved_newline=function(C,Z){if(Z=Z===void 0?!1:Z,!this._output.just_added_newline()){var ye=this._options.preserve_newlines&&C.newlines||Z,Ve=R(this._flags.last_token.text,J)||R(C.text,J);if(Ve){var qe=R(this._flags.last_token.text,J)&&R(this._options.operator_position,Be)||R(C.text,J);ye=ye&&qe}if(ye)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(re(this._flags.last_token,S))return;this._output.set_wrap_point()}}},he.prototype.print_newline=function(C,Z){if(!Z&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ye=this._tokens.peek();this._flags.mode===Le.Statement&&!(this._flags.if_block&&N(ye,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(C)&&(this._flags.multiline_frame=!0)},he.prototype.print_token_line_indentation=function(C){this._output.just_added_newline()&&(this._options.keep_array_indentation&&C.newlines&&(C.text==="["||K(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(C.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))},he.prototype.print_token=function(C){if(this._output.raw){this._output.add_raw_token(C);return}if(this._options.comma_first&&C.previous&&C.previous.type===U.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Z=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Z),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(C),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(C),this._output.non_breaking_space=!0,this._output.add_token(C.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},he.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},he.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))},he.prototype.set_mode=function(C){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,C),this._flags=this.create_flags(this._previous_flags,C),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},he.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Le.Statement&&at(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},he.prototype.start_of_object_property=function(){return this._flags.parent.mode===Le.ObjectLiteral&&this._flags.mode===Le.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||re(this._flags.last_token,["get","set"]))},he.prototype.start_of_statement=function(C){var Z=!1;return Z=Z||re(this._flags.last_token,["var","let","const"])&&C.type===U.WORD,Z=Z||N(this._flags.last_token,"do"),Z=Z||!(this._flags.parent.mode===Le.ObjectLiteral&&this._flags.mode===Le.Statement)&&re(this._flags.last_token,S)&&!C.newlines,Z=Z||N(this._flags.last_token,"else")&&!(N(C,"if")&&!C.comments_before),Z=Z||this._flags.last_token.type===U.END_EXPR&&(this._previous_flags.mode===Le.ForInitializer||this._previous_flags.mode===Le.Conditional),Z=Z||this._flags.last_token.type===U.WORD&&this._flags.mode===Le.BlockStatement&&!this._flags.in_case&&!(C.text==="--"||C.text==="++")&&this._last_last_text!=="function"&&C.type!==U.WORD&&C.type!==U.RESERVED,Z=Z||this._flags.mode===Le.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||re(this._flags.last_token,["get","set"])),Z?(this.set_mode(Le.Statement),this.indent(),this.handle_whitespace_and_comments(C,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C,re(C,["do","for","if","while"])),!0):!1},he.prototype.handle_start_expr=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C);var Z=Le.Expression;if(C.text==="["){if(this._flags.last_token.type===U.WORD||this._flags.last_token.text===")"){re(this._flags.last_token,X)&&(this._output.space_before_token=!0),this.print_token(C),this.set_mode(Z),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Z=Le.ArrayLiteral,K(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()),R(this._flags.last_token.type,[U.START_EXPR,U.END_EXPR,U.WORD,U.OPERATOR,U.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===U.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Z=Le.ForInitializer):R(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Z=Le.Conditional):R(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&C.whitespace_before===""?this._output.space_before_token=!1:(R(this._flags.last_token.text,X)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C);else if(this._flags.last_token.type===U.WORD){this._output.space_before_token=!1;var ye=this._tokens.peek(-3);if(this._options.space_after_named_function&&ye){var Ve=this._tokens.peek(-4);re(ye,["async","function"])||ye.text==="*"&&re(Ve,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Le.ObjectLiteral?(ye.text==="{"||ye.text===","||ye.text==="*"&&(Ve.text==="{"||Ve.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(C);(this._flags.last_token.type===U.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===Le.ObjectLiteral&&R(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===U.START_BLOCK?this.print_newline():(this._flags.last_token.type===U.END_EXPR||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===U.COMMA)&&this.allow_wrap_or_preserved_newline(C,C.newlines),this.print_token(C),this.set_mode(Z),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},he.prototype.handle_end_expr=function(C){for(;this._flags.mode===Le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(C),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(C,C.text==="]"&&K(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===U.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(C),this.restore_mode(),at(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Le.Conditional&&(this._previous_flags.mode=Le.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},he.prototype.handle_start_block=function(C){this.handle_whitespace_and_comments(C);var Z=this._tokens.peek(),ye=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===U.END_EXPR?(this.set_mode(Le.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Le.BlockStatement):ye&&(R(ye.text,[":",","])&&R(Z.type,[U.STRING,U.WORD,U.RESERVED])||R(Z.text,["get","set","..."])&&R(ye.type,[U.WORD,U.RESERVED]))?R(this._last_last_text,["class","interface"])&&!R(ye.text,[":",","])?this.set_mode(Le.BlockStatement):this.set_mode(Le.ObjectLiteral):this._flags.last_token.type===U.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Le.BlockStatement):R(this._flags.last_token.type,[U.EQUALS,U.START_EXPR,U.COMMA,U.OPERATOR])||re(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Le.ObjectLiteral):this.set_mode(Le.BlockStatement),this._flags.last_token&&re(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Ve=!Z.comments_before&&Z.text==="}",qe=Ve&&this._flags.last_word==="function"&&this._flags.last_token.type===U.END_EXPR;if(this._options.brace_preserve_inline){var gt=0,yt=null;this._flags.inline_frame=!0;do if(gt+=1,yt=this._tokens.peek(gt-1),yt.newlines){this._flags.inline_frame=!1;break}while(yt.type!==U.EOF&&!(yt.type===U.END_BLOCK&&yt.opened===C))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&C.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==U.OPERATOR&&(qe||this._flags.last_token.type===U.EQUALS||re(this._flags.last_token,ue)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(K(this._previous_flags.mode)&&(this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.COMMA)&&((this._flags.last_token.type===U.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(C),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==U.OPERATOR&&this._flags.last_token.type!==U.START_EXPR&&(R(this._flags.last_token.type,[U.START_BLOCK,U.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(C),this.indent(),!Ve&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},he.prototype.handle_end_block=function(C){for(this.handle_whitespace_and_comments(C);this._flags.mode===Le.Statement;)this.restore_mode();var Z=this._flags.last_token.type===U.START_BLOCK;this._flags.inline_frame&&!Z?this._output.space_before_token=!0:this._options.brace_style==="expand"?Z||this.print_newline():Z||(K(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(C)},he.prototype.handle_word=function(C){if(C.type===U.RESERVED){if(R(C.text,["set","get"])&&this._flags.mode!==Le.ObjectLiteral)C.type=U.WORD;else if(C.text==="import"&&R(this._tokens.peek().text,["(","."]))C.type=U.WORD;else if(R(C.text,["as","from"])&&!this._flags.import_block)C.type=U.WORD;else if(this._flags.mode===Le.ObjectLiteral){var Z=this._tokens.peek();Z.text===":"&&(C.type=U.WORD)}}if(this.start_of_statement(C)?re(this._flags.last_token,["var","let","const"])&&C.type===U.WORD&&(this._flags.declaration_statement=!0):C.newlines&&!I(this._flags.mode)&&(this._flags.last_token.type!==U.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==U.EQUALS&&(this._options.preserve_newlines||!re(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(C),this.print_newline()):this.handle_whitespace_and_comments(C),this._flags.do_block&&!this._flags.do_while)if(N(C,"while")){this._output.space_before_token=!0,this.print_token(C),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&N(C,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Le.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&re(C,["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(C),this._flags.in_case=!0;return}if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR)&&!this.start_of_object_property()&&!(R(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Le.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(C),N(C,"function")){(R(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(R(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===U.OPERATOR))&&!this._output.just_added_blankline()&&!C.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD?re(this._flags.last_token,["get","set","new","export"])||re(this._flags.last_token,S)?this._output.space_before_token=!0:N(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===U.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(I(this._flags.mode)||K(this._flags.mode))||this.print_newline(),this.print_token(C),this._flags.last_word=C.text;return}var ye="NONE";if(this._flags.last_token.type===U.END_BLOCK?this._previous_flags.inline_frame?ye="SPACE":re(C,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&C.newlines?ye="NEWLINE":(ye="SPACE",this._output.space_before_token=!0):ye="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&this._flags.mode===Le.BlockStatement?ye="NEWLINE":this._flags.last_token.type===U.SEMICOLON&&I(this._flags.mode)?ye="SPACE":this._flags.last_token.type===U.STRING?ye="NEWLINE":this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===Le.ObjectLiteral&&R(this._last_last_text,["{",","]))?ye="SPACE":this._flags.last_token.type===U.START_BLOCK?this._flags.inline_frame?ye="SPACE":ye="NEWLINE":this._flags.last_token.type===U.END_EXPR&&(this._output.space_before_token=!0,ye="NEWLINE"),re(C,X)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ye="SPACE":ye="NEWLINE"),re(C,["else","catch","finally"]))if((!(this._flags.last_token.type===U.END_BLOCK&&this._previous_flags.mode===Le.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&C.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Ve=this._output.current_line;Ve.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ye==="NEWLINE"?re(this._flags.last_token,ue)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&re(C,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==U.END_EXPR?(this._flags.last_token.type!==U.START_EXPR||!re(C,["var","let","const"]))&&this._flags.last_token.text!==":"&&(N(C,"if")&&N(C.previous,"else")?this._output.space_before_token=!0:this.print_newline()):re(C,X)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&K(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ye==="SPACE"&&(this._output.space_before_token=!0);C.previous&&(C.previous.type===U.WORD||C.previous.type===U.RESERVED)&&(this._output.space_before_token=!0),this.print_token(C),this._flags.last_word=C.text,C.type===U.RESERVED&&(C.text==="do"?this._flags.do_block=!0:C.text==="if"?this._flags.if_block=!0:C.text==="import"?this._flags.import_block=!0:this._flags.import_block&&N(C,"from")&&(this._flags.import_block=!1))},he.prototype.handle_semicolon=function(C){this.start_of_statement(C)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(C);for(var Z=this._tokens.peek();this._flags.mode===Le.Statement&&!(this._flags.if_block&&N(Z,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(C)},he.prototype.handle_string=function(C){C.text.startsWith("`")&&C.newlines===0&&C.whitespace_before===""&&(C.previous.text===")"||this._flags.last_token.type===U.WORD)||(this.start_of_statement(C)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(C),this._flags.last_token.type===U.RESERVED||this._flags.last_token.type===U.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR||this._flags.last_token.type===U.EQUALS||this._flags.last_token.type===U.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(C):C.text.startsWith("`")&&this._flags.last_token.type===U.END_EXPR&&(C.previous.text==="]"||C.previous.text===")")&&C.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(C)},he.prototype.handle_equals=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(C),this._output.space_before_token=!0},he.prototype.handle_comma=function(C){this.handle_whitespace_and_comments(C,!0),this.print_token(C),this._output.space_before_token=!0,this._flags.declaration_statement?(I(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(C)):this._flags.mode===Le.ObjectLiteral||this._flags.mode===Le.Statement&&this._flags.parent.mode===Le.ObjectLiteral?(this._flags.mode===Le.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(C)},he.prototype.handle_operator=function(C){var Z=C.text==="*"&&(re(this._flags.last_token,["function","yield"])||R(this._flags.last_token.type,[U.START_BLOCK,U.COMMA,U.END_BLOCK,U.SEMICOLON])),ye=R(C.text,["-","+"])&&(R(this._flags.last_token.type,[U.START_BLOCK,U.START_EXPR,U.EQUALS,U.OPERATOR])||R(this._flags.last_token.text,X)||this._flags.last_token.text===",");if(!this.start_of_statement(C)){var Ve=!Z;this.handle_whitespace_and_comments(C,Ve)}if(C.text==="*"&&this._flags.last_token.type===U.DOT){this.print_token(C);return}if(C.text==="::"){this.print_token(C);return}if(R(C.text,["-","+"])&&this.start_of_object_property()){this.print_token(C);return}if(this._flags.last_token.type===U.OPERATOR&&R(this._options.operator_position,Be)&&this.allow_wrap_or_preserved_newline(C),C.text===":"&&this._flags.in_case){this.print_token(C),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==U.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var qe=!0,gt=!0,yt=!1;if(C.text===":"?this._flags.ternary_depth===0?qe=!1:(this._flags.ternary_depth-=1,yt=!0):C.text==="?"&&(this._flags.ternary_depth+=1),!ye&&!Z&&this._options.preserve_newlines&&R(C.text,J)){var Dt=C.text===":",Ut=Dt&&yt,ot=Dt&&!yt;switch(this._options.operator_position){case Te.before_newline:this._output.space_before_token=!ot,this.print_token(C),(!Dt||Ut)&&this.allow_wrap_or_preserved_newline(C),this._output.space_before_token=!0;return;case Te.after_newline:this._output.space_before_token=!0,!Dt||Ut?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(C):this._output.space_before_token=!1,this.print_token(C),this._output.space_before_token=!0;return;case Te.preserve_newline:ot||this.allow_wrap_or_preserved_newline(C),qe=!(this._output.just_added_newline()||ot),this._output.space_before_token=qe,this.print_token(C),this._output.space_before_token=!0;return}}if(Z){this.allow_wrap_or_preserved_newline(C),qe=!1;var kt=this._tokens.peek();gt=kt&&R(kt.type,[U.WORD,U.RESERVED])}else if(C.text==="...")this.allow_wrap_or_preserved_newline(C),qe=this._flags.last_token.type===U.START_BLOCK,gt=!1;else if(R(C.text,["--","++","!","~"])||ye){if((this._flags.last_token.type===U.COMMA||this._flags.last_token.type===U.START_EXPR)&&this.allow_wrap_or_preserved_newline(C),qe=!1,gt=!1,C.newlines&&(C.text==="--"||C.text==="++"||C.text==="~")){var tt=re(this._flags.last_token,ue)&&C.newlines;tt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(tt,!0)}this._flags.last_token.text===";"&&I(this._flags.mode)&&(qe=!0),this._flags.last_token.type===U.RESERVED?qe=!0:this._flags.last_token.type===U.END_EXPR?qe=!(this._flags.last_token.text==="]"&&(C.text==="--"||C.text==="++")):this._flags.last_token.type===U.OPERATOR&&(qe=R(C.text,["--","-","++","+"])&&R(this._flags.last_token.text,["--","-","++","+"]),R(C.text,["+","-"])&&R(this._flags.last_token.text,["--","++"])&&(gt=!0)),(this._flags.mode===Le.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Le.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||qe,this.print_token(C),this._output.space_before_token=gt},he.prototype.handle_block_comment=function(C,Z){if(this._output.raw){this._output.add_raw_token(C),C.directives&&C.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(C.directives){this.print_newline(!1,Z),this.print_token(C),C.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!E.newline.test(C.text)&&!C.newlines){this._output.space_before_token=!0,this.print_token(C),this._output.space_before_token=!0;return}else this.print_block_commment(C,Z)},he.prototype.print_block_commment=function(C,Z){var ye=ie(C.text),Ve,qe=!1,gt=!1,yt=C.whitespace_before,Dt=yt.length;if(this.print_newline(!1,Z),this.print_token_line_indentation(C),this._output.add_token(ye[0]),this.print_newline(!1,Z),ye.length>1){for(ye=ye.slice(1),qe=ee(ye,"*"),gt=V(ye,yt),qe&&(this._flags.alignment=1),Ve=0;Ve<ye.length;Ve++)qe?(this.print_token_line_indentation(C),this._output.add_token(z(ye[Ve]))):gt&&ye[Ve]?(this.print_token_line_indentation(C),this._output.add_token(ye[Ve].substring(Dt))):(this._output.current_line.set_indent(-1),this._output.add_token(ye[Ve])),this.print_newline(!1,Z);this._flags.alignment=0}},he.prototype.handle_comment=function(C,Z){C.newlines?this.print_newline(!1,Z):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(C),this.print_newline(!1,Z)},he.prototype.handle_dot=function(C){this.start_of_statement(C)||this.handle_whitespace_and_comments(C,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),re(this._flags.last_token,ue)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(C,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(C)},he.prototype.handle_unknown=function(C,Z){this.print_token(C),C.text[C.text.length-1]===`
|
|
|
`&&this.print_newline(!1,Z)},he.prototype.handle_eof=function(C){for(;this._flags.mode===Le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(C)},le.exports.Beautifier=he},function(le){function l(_){this.__parent=_,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}l.prototype.clone_empty=function(){var _=new l(this.__parent);return _.set_indent(this.__indent_count,this.__alignment_count),_},l.prototype.item=function(_){return _<0?this.__items[this.__items.length+_]:this.__items[_]},l.prototype.has_match=function(_){for(var E=this.__items.length-1;E>=0;E--)if(this.__items[E].match(_))return!0;return!1},l.prototype.set_indent=function(_,E){this.is_empty()&&(this.__indent_count=_||0,this.__alignment_count=E||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},l.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},l.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var _=this.__parent.current_line;return _.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),_.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),_.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,_.__items[0]===" "&&(_.__items.splice(0,1),_.__character_count-=1),!0}return!1},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(_){this.__items.push(_);var E=_.lastIndexOf(`
|
|
|
`);E!==-1?this.__character_count=_.length-E:this.__character_count+=_.length},l.prototype.pop=function(){var _=null;return this.is_empty()||(_=this.__items.pop(),this.__character_count-=_.length),_},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.prototype.toString=function(){var _="";return this.is_empty()?this.__parent.indent_empty_lines&&(_=this.__parent.get_indent_string(this.__indent_count)):(_=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),_+=this.__items.join("")),_};function A(_,E){this.__cache=[""],this.__indent_size=_.indent_size,this.__indent_string=_.indent_char,_.indent_with_tabs||(this.__indent_string=new Array(_.indent_size+1).join(_.indent_char)),E=E||"",_.indent_level>0&&(E=new Array(_.indent_level+1).join(this.__indent_string)),this.__base_string=E,this.__base_string_length=E.length}A.prototype.get_indent_size=function(_,E){var w=this.__base_string_length;return E=E||0,_<0&&(w=0),w+=_*this.__indent_size,w+=E,w},A.prototype.get_indent_string=function(_,E){var w=this.__base_string;return E=E||0,_<0&&(_=0,w=""),E+=_*this.__indent_size,this.__ensure_cache(E),w+=this.__cache[E],w},A.prototype.__ensure_cache=function(_){for(;_>=this.__cache.length;)this.__add_column()},A.prototype.__add_column=function(){var _=this.__cache.length,E=0,w="";this.__indent_size&&_>=this.__indent_size&&(E=Math.floor(_/this.__indent_size),_-=E*this.__indent_size,w=new Array(E+1).join(this.__indent_string)),_&&(w+=new Array(_+1).join(" ")),this.__cache.push(w)};function F(_,E){this.__indent_cache=new A(_,E),this.raw=!1,this._end_with_newline=_.end_with_newline,this.indent_size=_.indent_size,this.wrap_line_length=_.wrap_line_length,this.indent_empty_lines=_.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}F.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},F.prototype.get_line_number=function(){return this.__lines.length},F.prototype.get_indent_string=function(_,E){return this.__indent_cache.get_indent_string(_,E)},F.prototype.get_indent_size=function(_,E){return this.__indent_cache.get_indent_size(_,E)},F.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},F.prototype.add_new_line=function(_){return this.is_empty()||!_&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},F.prototype.get_code=function(_){this.trim(!0);var E=this.current_line.pop();E&&(E[E.length-1]===`
|
|
|
`&&(E=E.replace(/\n+$/g,"")),this.current_line.push(E)),this._end_with_newline&&this.__add_outputline();var w=this.__lines.join(`
|
|
|
`);return _!==`
|
|
|
`&&(w=w.replace(/[\n]/g,_)),w},F.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},F.prototype.set_indent=function(_,E){return _=_||0,E=E||0,this.next_line.set_indent(_,E),this.__lines.length>1?(this.current_line.set_indent(_,E),!0):(this.current_line.set_indent(),!1)},F.prototype.add_raw_token=function(_){for(var E=0;E<_.newlines;E++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(_.whitespace_before),this.current_line.push(_.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},F.prototype.add_token=function(_){this.__add_space_before_token(),this.current_line.push(_),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},F.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(" "))},F.prototype.remove_indent=function(_){for(var E=this.__lines.length;_<E;)this.__lines[_]._remove_indent(),_++;this.current_line._remove_wrap_indent()},F.prototype.trim=function(_){for(_=_===void 0?!1:_,this.current_line.trim();_&&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},F.prototype.just_added_newline=function(){return this.current_line.is_empty()},F.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},F.prototype.ensure_empty_line_above=function(_,E){for(var w=this.__lines.length-2;w>=0;){var O=this.__lines[w];if(O.is_empty())break;if(O.item(0).indexOf(_)!==0&&O.item(-1)!==E){this.__lines.splice(w+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}w--}},le.exports.Output=F},function(le){function l(A,F,_,E){this.type=A,this.text=F,this.comments_before=null,this.newlines=_||0,this.whitespace_before=E||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}le.exports.Token=l},function(le,l){var A="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",F="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",_="\\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",E="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",w="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",O="(?:"+w+"|["+A+_+"])",X="(?:"+w+"|["+F+_+E+"])*";l.identifier=new RegExp(O+X,"g"),l.identifierStart=new RegExp(O),l.identifierMatch=new RegExp("(?:"+w+"|["+F+_+E+"])+");var J=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;l.newline=/[\n\r\u2028\u2029]/,l.lineBreak=new RegExp(`\r
|
|
|
|`+l.newline.source),l.allLineBreaks=new RegExp(l.lineBreak.source,"g")},function(le,l,A){var F=A(6).Options,_=["before-newline","after-newline","preserve-newline"];function E(w){F.call(this,w,"js");var O=this.raw_options.brace_style||null;O==="expand-strict"?this.raw_options.brace_style="expand":O==="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 X=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var J=0;J<X.length;J++)X[J]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=X[J];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",_),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}E.prototype=new F,le.exports.Options=E},function(le){function l(_,E){this.raw_options=A(_,E),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}l.prototype._get_array=function(_,E){var w=this.raw_options[_],O=E||[];return typeof w=="object"?w!==null&&typeof w.concat=="function"&&(O=w.concat()):typeof w=="string"&&(O=w.split(/[^a-zA-Z0-9_\/\-]+/)),O},l.prototype._get_boolean=function(_,E){var w=this.raw_options[_],O=w===void 0?!!E:!!w;return O},l.prototype._get_characters=function(_,E){var w=this.raw_options[_],O=E||"";return typeof w=="string"&&(O=w.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),O},l.prototype._get_number=function(_,E){var w=this.raw_options[_];E=parseInt(E,10),isNaN(E)&&(E=0);var O=parseInt(w,10);return isNaN(O)&&(O=E),O},l.prototype._get_selection=function(_,E,w){var O=this._get_selection_list(_,E,w);if(O.length!==1)throw new Error("Invalid Option Value: The option '"+_+`' can only be one of the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[_]+"'");return O[0]},l.prototype._get_selection_list=function(_,E,w){if(!E||E.length===0)throw new Error("Selection list cannot be empty.");if(w=w||[E[0]],!this._is_valid_selection(w,E))throw new Error("Invalid Default Value!");var O=this._get_array(_,w);if(!this._is_valid_selection(O,E))throw new Error("Invalid Option Value: The option '"+_+`' can contain only the following values:
|
|
|
`+E+`
|
|
|
You passed in: '`+this.raw_options[_]+"'");return O},l.prototype._is_valid_selection=function(_,E){return _.length&&E.length&&!_.some(function(w){return E.indexOf(w)===-1})};function A(_,E){var w={};_=F(_);var O;for(O in _)O!==E&&(w[O]=_[O]);if(E&&_[E])for(O in _[E])w[O]=_[E][O];return w}function F(_){var E={},w;for(w in _){var O=w.replace(/-/g,"_");E[O]=_[w]}return E}le.exports.Options=l,le.exports.normalizeOpts=F,le.exports.mergeOpts=A},function(le,l,A){var F=A(8).InputScanner,_=A(9).Tokenizer,E=A(9).TOKEN,w=A(13).Directives,O=A(4),X=A(12).Pattern,J=A(14).TemplatablePattern;function U(ee,V){return V.indexOf(ee)!==-1}var R={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:E.START,RAW:E.RAW,EOF:E.EOF},z=new w(/\/\*/,/\*\//),P=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,N=/[0-9]/,re=/[^\d\.]/,ue=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),me=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";me=me.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),me="\\?\\.(?!\\d) "+me,me=me.replace(/ /g,"|");var Te=new RegExp(me),Be="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Le=Be.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),at=new RegExp("^(?:"+Le.join("|")+")$"),ie,K=function(ee,V){_.call(this,ee,V),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var he=new X(this._input),S=new J(this._input).read_options(this._options);this.__patterns={template:S,identifier:S.starting_with(O.identifier).matching(O.identifierMatch),number:he.matching(P),punct:he.matching(Te),comment:he.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:he.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:he.matching(/<!--/),html_comment_end:he.matching(/-->/),include:he.starting_with(/#include/).until_after(O.lineBreak),shebang:he.starting_with(/#!/).until_after(O.lineBreak),xml:he.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:S.until(/['\\\n\r\u2028\u2029]/),double_quote:S.until(/["\\\n\r\u2028\u2029]/),template_text:S.until(/[`\\$]/),template_expression:S.until(/[`}\\]/)}};K.prototype=new _,K.prototype._is_comment=function(ee){return ee.type===R.COMMENT||ee.type===R.BLOCK_COMMENT||ee.type===R.UNKNOWN},K.prototype._is_opening=function(ee){return ee.type===R.START_BLOCK||ee.type===R.START_EXPR},K.prototype._is_closing=function(ee,V){return(ee.type===R.END_BLOCK||ee.type===R.END_EXPR)&&V&&(ee.text==="]"&&V.text==="["||ee.text===")"&&V.text==="("||ee.text==="}"&&V.text==="{")},K.prototype._reset=function(){ie=!1},K.prototype._get_next_token=function(ee,V){var he=null;this._readWhitespace();var S=this._input.peek();return S===null?this._create_token(R.EOF,""):(he=he||this._read_non_javascript(S),he=he||this._read_string(S),he=he||this._read_pair(S,this._input.peek(1)),he=he||this._read_word(ee),he=he||this._read_singles(S),he=he||this._read_comment(S),he=he||this._read_regexp(S,ee),he=he||this._read_xml(S,ee),he=he||this._read_punctuation(),he=he||this._create_token(R.UNKNOWN,this._input.next()),he)},K.prototype._read_word=function(ee){var V;if(V=this.__patterns.identifier.read(),V!=="")return V=V.replace(O.allLineBreaks,`
|
|
|
`),!(ee.type===R.DOT||ee.type===R.RESERVED&&(ee.text==="set"||ee.text==="get"))&&at.test(V)?(V==="in"||V==="of")&&(ee.type===R.WORD||ee.type===R.STRING)?this._create_token(R.OPERATOR,V):this._create_token(R.RESERVED,V):this._create_token(R.WORD,V);if(V=this.__patterns.number.read(),V!=="")return this._create_token(R.WORD,V)},K.prototype._read_singles=function(ee){var V=null;return ee==="("||ee==="["?V=this._create_token(R.START_EXPR,ee):ee===")"||ee==="]"?V=this._create_token(R.END_EXPR,ee):ee==="{"?V=this._create_token(R.START_BLOCK,ee):ee==="}"?V=this._create_token(R.END_BLOCK,ee):ee===";"?V=this._create_token(R.SEMICOLON,ee):ee==="."&&re.test(this._input.peek(1))?V=this._create_token(R.DOT,ee):ee===","&&(V=this._create_token(R.COMMA,ee)),V&&this._input.next(),V},K.prototype._read_pair=function(ee,V){var he=null;return ee==="#"&&V==="{"&&(he=this._create_token(R.START_BLOCK,ee+V)),he&&(this._input.next(),this._input.next()),he},K.prototype._read_punctuation=function(){var ee=this.__patterns.punct.read();if(ee!=="")return ee==="="?this._create_token(R.EQUALS,ee):ee==="?."?this._create_token(R.DOT,ee):this._create_token(R.OPERATOR,ee)},K.prototype._read_non_javascript=function(ee){var V="";if(ee==="#"){if(this._is_first_token()&&(V=this.__patterns.shebang.read(),V))return this._create_token(R.UNKNOWN,V.trim()+`
|
|
|
`);if(V=this.__patterns.include.read(),V)return this._create_token(R.UNKNOWN,V.trim()+`
|
|
|
`);ee=this._input.next();var he="#";if(this._input.hasNext()&&this._input.testChar(N)){do ee=this._input.next(),he+=ee;while(this._input.hasNext()&&ee!=="#"&&ee!=="=");return ee==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(he+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(he+="{}",this._input.next(),this._input.next())),this._create_token(R.WORD,he)}this._input.back()}else if(ee==="<"&&this._is_first_token()){if(V=this.__patterns.html_comment_start.read(),V){for(;this._input.hasNext()&&!this._input.testChar(O.newline);)V+=this._input.next();return ie=!0,this._create_token(R.COMMENT,V)}}else if(ie&&ee==="-"&&(V=this.__patterns.html_comment_end.read(),V))return ie=!1,this._create_token(R.COMMENT,V);return null},K.prototype._read_comment=function(ee){var V=null;if(ee==="/"){var he="";if(this._input.peek(1)==="*"){he=this.__patterns.block_comment.read();var S=z.get_directives(he);S&&S.ignore==="start"&&(he+=z.readIgnored(this._input)),he=he.replace(O.allLineBreaks,`
|
|
|
`),V=this._create_token(R.BLOCK_COMMENT,he),V.directives=S}else this._input.peek(1)==="/"&&(he=this.__patterns.comment.read(),V=this._create_token(R.COMMENT,he))}return V},K.prototype._read_string=function(ee){if(ee==="`"||ee==="'"||ee==='"'){var V=this._input.next();return this.has_char_escapes=!1,ee==="`"?V+=this._read_string_recursive("`",!0,"${"):V+=this._read_string_recursive(ee),this.has_char_escapes&&this._options.unescape_strings&&(V=I(V)),this._input.peek()===ee&&(V+=this._input.next()),V=V.replace(O.allLineBreaks,`
|
|
|
`),this._create_token(R.STRING,V)}return null},K.prototype._allow_regexp_or_xml=function(ee){return ee.type===R.RESERVED&&U(ee.text,["return","case","throw","else","do","typeof","yield"])||ee.type===R.END_EXPR&&ee.text===")"&&ee.opened.previous.type===R.RESERVED&&U(ee.opened.previous.text,["if","while","for"])||U(ee.type,[R.COMMENT,R.START_EXPR,R.START_BLOCK,R.START,R.END_BLOCK,R.OPERATOR,R.EQUALS,R.EOF,R.SEMICOLON,R.COMMA])},K.prototype._read_regexp=function(ee,V){if(ee==="/"&&this._allow_regexp_or_xml(V)){for(var he=this._input.next(),S=!1,C=!1;this._input.hasNext()&&(S||C||this._input.peek()!==ee)&&!this._input.testChar(O.newline);)he+=this._input.peek(),S?S=!1:(S=this._input.peek()==="\\",this._input.peek()==="["?C=!0:this._input.peek()==="]"&&(C=!1)),this._input.next();return this._input.peek()===ee&&(he+=this._input.next(),he+=this._input.read(O.identifier)),this._create_token(R.STRING,he)}return null},K.prototype._read_xml=function(ee,V){if(this._options.e4x&&ee==="<"&&this._allow_regexp_or_xml(V)){var he="",S=this.__patterns.xml.read_match();if(S){for(var C=S[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Z=C.indexOf("{")===0,ye=0;S;){var Ve=!!S[1],qe=S[2],gt=!!S[S.length-1]||qe.slice(0,8)==="![CDATA[";if(!gt&&(qe===C||Z&&qe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Ve?--ye:++ye),he+=S[0],ye<=0)break;S=this.__patterns.xml.read_match()}return S||(he+=this._input.match(/[\s\S]*/g)[0]),he=he.replace(O.allLineBreaks,`
|
|
|
`),this._create_token(R.STRING,he)}}return null};function I(ee){for(var V="",he=0,S=new F(ee),C=null;S.hasNext();)if(C=S.match(/([\s]|[^\\]|\\\\)+/g),C&&(V+=C[0]),S.peek()==="\\"){if(S.next(),S.peek()==="x")C=S.match(/x([0-9A-Fa-f]{2})/g);else if(S.peek()==="u")C=S.match(/u([0-9A-Fa-f]{4})/g),C||(C=S.match(/u\{([0-9A-Fa-f]+)\}/g));else{V+="\\",S.hasNext()&&(V+=S.next());continue}if(!C||(he=parseInt(C[1],16),he>126&&he<=255&&C[0].indexOf("x")===0))return ee;he>=0&&he<32||he>1114111?V+="\\"+C[0]:he===34||he===39||he===92?V+="\\"+String.fromCharCode(he):V+=String.fromCharCode(he)}return V}K.prototype._read_string_recursive=function(ee,V,he){var S,C;ee==="'"?C=this.__patterns.single_quote:ee==='"'?C=this.__patterns.double_quote:ee==="`"?C=this.__patterns.template_text:ee==="}"&&(C=this.__patterns.template_expression);for(var Z=C.read(),ye="";this._input.hasNext();){if(ye=this._input.next(),ye===ee||!V&&O.newline.test(ye)){this._input.back();break}else ye==="\\"&&this._input.hasNext()?(S=this._input.peek(),S==="x"||S==="u"?this.has_char_escapes=!0:S==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),ye+=this._input.next()):he&&(he==="${"&&ye==="$"&&this._input.peek()==="{"&&(ye+=this._input.next()),he===ye&&(ee==="`"?ye+=this._read_string_recursive("}",V,"`"):ye+=this._read_string_recursive("`",V,"${"),this._input.hasNext()&&(ye+=this._input.next())));ye+=C.read(),Z+=ye}return Z},le.exports.Tokenizer=K,le.exports.TOKEN=R,le.exports.positionable_operators=ue.slice(),le.exports.line_starters=Be.slice()},function(le){var l=RegExp.prototype.hasOwnProperty("sticky");function A(F){this.__input=F||"",this.__input_length=this.__input.length,this.__position=0}A.prototype.restart=function(){this.__position=0},A.prototype.back=function(){this.__position>0&&(this.__position-=1)},A.prototype.hasNext=function(){return this.__position<this.__input_length},A.prototype.next=function(){var F=null;return this.hasNext()&&(F=this.__input.charAt(this.__position),this.__position+=1),F},A.prototype.peek=function(F){var _=null;return F=F||0,F+=this.__position,F>=0&&F<this.__input_length&&(_=this.__input.charAt(F)),_},A.prototype.__match=function(F,_){F.lastIndex=_;var E=F.exec(this.__input);return E&&!(l&&F.sticky)&&E.index!==_&&(E=null),E},A.prototype.test=function(F,_){return _=_||0,_+=this.__position,_>=0&&_<this.__input_length?!!this.__match(F,_):!1},A.prototype.testChar=function(F,_){var E=this.peek(_);return F.lastIndex=0,E!==null&&F.test(E)},A.prototype.match=function(F){var _=this.__match(F,this.__position);return _?this.__position+=_[0].length:_=null,_},A.prototype.read=function(F,_,E){var w="",O;return F&&(O=this.match(F),O&&(w+=O[0])),_&&(O||!F)&&(w+=this.readUntil(_,E)),w},A.prototype.readUntil=function(F,_){var E="",w=this.__position;F.lastIndex=this.__position;var O=F.exec(this.__input);return O?(w=O.index,_&&(w+=O[0].length)):w=this.__input_length,E=this.__input.substring(this.__position,w),this.__position=w,E},A.prototype.readUntilAfter=function(F){return this.readUntil(F,!0)},A.prototype.get_regexp=function(F,_){var E=null,w="g";return _&&l&&(w="y"),typeof F=="string"&&F!==""?E=new RegExp(F,w):F&&(E=new RegExp(F.source,w)),E},A.prototype.get_literal_regexp=function(F){return RegExp(F.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},A.prototype.peekUntilAfter=function(F){var _=this.__position,E=this.readUntilAfter(F);return this.__position=_,E},A.prototype.lookBack=function(F){var _=this.__position-1;return _>=F.length&&this.__input.substring(_-F.length,_).toLowerCase()===F},le.exports.InputScanner=A},function(le,l,A){var F=A(8).InputScanner,_=A(3).Token,E=A(10).TokenStream,w=A(11).WhitespacePattern,O={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},X=function(J,U){this._input=new F(J),this._options=U||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new w(this._input)};X.prototype.tokenize=function(){this._input.restart(),this.__tokens=new E,this._reset();for(var J,U=new _(O.START,""),R=null,z=[],P=new E;U.type!==O.EOF;){for(J=this._get_next_token(U,R);this._is_comment(J);)P.add(J),J=this._get_next_token(U,R);P.isEmpty()||(J.comments_before=P,P=new E),J.parent=R,this._is_opening(J)?(z.push(R),R=J):R&&this._is_closing(J,R)&&(J.opened=R,R.closed=J,R=z.pop(),J.parent=R),J.previous=U,U.next=J,this.__tokens.add(J),U=J}return this.__tokens},X.prototype._is_first_token=function(){return this.__tokens.isEmpty()},X.prototype._reset=function(){},X.prototype._get_next_token=function(J,U){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(O.RAW,R):this._create_token(O.EOF,"")},X.prototype._is_comment=function(J){return!1},X.prototype._is_opening=function(J){return!1},X.prototype._is_closing=function(J,U){return!1},X.prototype._create_token=function(J,U){var R=new _(J,U,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},X.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},le.exports.Tokenizer=X,le.exports.TOKEN=O},function(le){function l(A){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=A}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position<this.__tokens_length},l.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__tokens[this.__position],this.__position+=1),A},l.prototype.peek=function(A){var F=null;return A=A||0,A+=this.__position,A>=0&&A<this.__tokens_length&&(F=this.__tokens[A]),F},l.prototype.add=function(A){this.__parent_token&&(A.parent=this.__parent_token),this.__tokens.push(A),this.__tokens_length+=1},le.exports.TokenStream=l},function(le,l,A){var F=A(12).Pattern;function _(E,w){F.call(this,E,w),w?this._line_regexp=this._input.get_regexp(w._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}_.prototype=new F,_.prototype.__set_whitespace_patterns=function(E,w){E+="\\t ",w+="\\n\\r",this._match_pattern=this._input.get_regexp("["+E+w+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+w+"]")},_.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var E=this._input.read(this._match_pattern);if(E===" ")this.whitespace_before_token=" ";else if(E){var w=this.__split(this._newline_regexp,E);this.newline_count=w.length-1,this.whitespace_before_token=w[this.newline_count]}return E},_.prototype.matching=function(E,w){var O=this._create();return O.__set_whitespace_patterns(E,w),O._update(),O},_.prototype._create=function(){return new _(this._input,this)},_.prototype.__split=function(E,w){E.lastIndex=0;for(var O=0,X=[],J=E.exec(w);J;)X.push(w.substring(O,J.index)),O=J.index+J[0].length,J=E.exec(w);return O<w.length?X.push(w.substring(O,w.length)):X.push(""),X},le.exports.WhitespacePattern=_},function(le){function l(A,F){this._input=A,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,F&&(this._starting_pattern=this._input.get_regexp(F._starting_pattern,!0),this._match_pattern=this._input.get_regexp(F._match_pattern,!0),this._until_pattern=this._input.get_regexp(F._until_pattern),this._until_after=F._until_after)}l.prototype.read=function(){var A=this._input.read(this._starting_pattern);return(!this._starting_pattern||A)&&(A+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),A},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(A){var F=this._create();return F._until_after=!0,F._until_pattern=this._input.get_regexp(A),F._update(),F},l.prototype.until=function(A){var F=this._create();return F._until_after=!1,F._until_pattern=this._input.get_regexp(A),F._update(),F},l.prototype.starting_with=function(A){var F=this._create();return F._starting_pattern=this._input.get_regexp(A,!0),F._update(),F},l.prototype.matching=function(A){var F=this._create();return F._match_pattern=this._input.get_regexp(A,!0),F._update(),F},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},le.exports.Pattern=l},function(le){function l(A,F){A=typeof A=="string"?A:A.source,F=typeof F=="string"?F:F.source,this.__directives_block_pattern=new RegExp(A+/ beautify( \w+[:]\w+)+ /.source+F,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(A+/\sbeautify\signore:end\s/.source+F,"g")}l.prototype.get_directives=function(A){if(!A.match(this.__directives_block_pattern))return null;var F={};this.__directive_pattern.lastIndex=0;for(var _=this.__directive_pattern.exec(A);_;)F[_[1]]=_[2],_=this.__directive_pattern.exec(A);return F},l.prototype.readIgnored=function(A){return A.readUntilAfter(this.__directives_end_ignore_pattern)},le.exports.Directives=l},function(le,l,A){var F=A(12).Pattern,_={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function E(w,O){F.call(this,w,O),this.__template_pattern=null,this._disabled=Object.assign({},_),this._excluded=Object.assign({},_),O&&(this.__template_pattern=this._input.get_regexp(O.__template_pattern),this._excluded=Object.assign(this._excluded,O._excluded),this._disabled=Object.assign(this._disabled,O._disabled));var X=new F(w);this.__patterns={handlebars_comment:X.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:X.starting_with(/{{{/).until_after(/}}}/),handlebars:X.starting_with(/{{/).until_after(/}}/),php:X.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:X.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:X.starting_with(/{%/).until_after(/%}/),django_value:X.starting_with(/{{/).until_after(/}}/),django_comment:X.starting_with(/{#/).until_after(/#}/),smarty:X.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:X.starting_with(/{\*/).until_after(/\*}/),smarty_literal:X.starting_with(/{literal}/).until_after(/{\/literal}/)}}E.prototype=new F,E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){this.__set_templated_pattern()},E.prototype.disable=function(w){var O=this._create();return O._disabled[w]=!0,O._update(),O},E.prototype.read_options=function(w){var O=this._create();for(var X in _)O._disabled[X]=w.templating.indexOf(X)===-1;return O._update(),O},E.prototype.exclude=function(w){var O=this._create();return O._excluded[w]=!0,O._update(),O},E.prototype.read=function(){var w="";this._match_pattern?w=this._input.read(this._starting_pattern):w=this._input.read(this._starting_pattern,this.__template_pattern);for(var O=this._read_template();O;)this._match_pattern?O+=this._input.read(this._match_pattern):O+=this._input.readUntil(this.__template_pattern),w+=O,O=this._read_template();return this._until_after&&(w+=this._input.readUntilAfter(this._until_pattern)),w},E.prototype.__set_templated_pattern=function(){var w=[];this._disabled.php||w.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||w.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||w.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||w.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(w.push(this.__patterns.django._starting_pattern.source),w.push(this.__patterns.django_value._starting_pattern.source),w.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||w.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&w.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+w.join("|")+")")},E.prototype._read_template=function(){var w="",O=this._input.peek();if(O==="<"){var X=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&X==="?"&&(w=w||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&X==="%"&&(w=w||this.__patterns.erb.read())}else O==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(w=w||this.__patterns.handlebars_comment.read(),w=w||this.__patterns.handlebars_unescaped.read(),w=w||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(w=w||this.__patterns.django_value.read()),this._excluded.django||(w=w||this.__patterns.django_comment.read(),w=w||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(w=w||this.__patterns.smarty_comment.read(),w=w||this.__patterns.smarty_literal.read(),w=w||this.__patterns.smarty.read()));return w},le.exports.TemplatablePattern=E}],$={};function p(le){var l=$[le];if(l!==void 0)return l.exports;var A=$[le]={exports:{}};return de[le](A,A.exports,p),A.exports}var ge=p(0);ce=ge})();var Y=ce;b=[],y=function(){return{js_beautify:Y}}.apply(ut,b),y!==void 0&&(fn.exports=y)})()},15342:function(fn){(function(b,y){fn.exports=y()})(typeof self!="undefined"?self:this,function(){return function(ut){var b={};function y(ce){if(b[ce])return b[ce].exports;var Y=b[ce]={i:ce,l:!1,exports:{}};return ut[ce].call(Y.exports,Y,Y.exports,y),Y.l=!0,Y.exports}return y.m=ut,y.c=b,y.d=function(ce,Y,de){y.o(ce,Y)||Object.defineProperty(ce,Y,{enumerable:!0,get:de})},y.r=function(ce){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ce,"__esModule",{value:!0})},y.t=function(ce,Y){if(Y&1&&(ce=y(ce)),Y&8||Y&4&&typeof ce=="object"&&ce&&ce.__esModule)return ce;var de=Object.create(null);if(y.r(de),Object.defineProperty(de,"default",{enumerable:!0,value:ce}),Y&2&&typeof ce!="string")for(var $ in ce)y.d(de,$,function(p){return ce[p]}.bind(null,$));return de},y.n=function(ce){var Y=ce&&ce.__esModule?function(){return ce.default}:function(){return ce};return y.d(Y,"a",Y),Y},y.o=function(ce,Y){return Object.prototype.hasOwnProperty.call(ce,Y)},y.p="",y(y.s=1)}([function(ut,b,y){},function(ut,b,y){"use strict";y.r(b);var ce=y(0),Y=function(){function H(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 H.range=function(h,f){return f?!h||!h.loc||!f.loc||h.loc.lexer!==f.loc.lexer?null:new H(h.loc.lexer,h.loc.start,f.loc.end):h&&h.loc},H}(),de=function(){function H(h,f){this.text=void 0,this.loc=void 0,this.text=h,this.loc=f}var u=H.prototype;return u.range=function(f,v){return new H(v,Y.range(this,f))},H}(),$=function H(u,h){this.position=void 0;var f="KaTeX parse error: "+u,v,L=h&&h.loc;if(L&&L.start<=L.end){var j=L.lexer.input;v=L.start;var be=L.end;v===j.length?f+=" at end of input: ":f+=" at position "+(v+1)+": ";var Ie=j.slice(v,be).replace(/[^]/g,"$&\u0332"),We;v>15?We="\u2026"+j.slice(v-15,v):We=j.slice(0,v);var vt;be+15<j.length?vt=j.slice(be,be+15)+"\u2026":vt=j.slice(be),f+=We+Ie+vt}var Ot=new Error(f);return Ot.name="ParseError",Ot.__proto__=H.prototype,Ot.position=v,Ot};$.prototype.__proto__=Error.prototype;var p=$,ge=function(u,h){return u.indexOf(h)!==-1},le=function(u,h){return u===void 0?h:u},l=/([A-Z])/g,A=function(u){return u.replace(l,"-$1").toLowerCase()},F={"&":"&",">":">","<":"<",'"':""","'":"'"},_=/[&><"']/g;function E(H){return String(H).replace(_,function(u){return F[u]})}var w=function H(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?H(u.body[0]):u:u.type==="font"?H(u.body):u},O=function(u){var h=w(u);return h.type==="mathord"||h.type==="textord"||h.type==="atom"},X=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},J=function(u){var h=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(u);return h!=null?h[1]:"_relative"},U={contains:ge,deflt:le,escape:E,hyphenate:A,getBaseElem:w,isCharacterBox:O,protocolFromUrl:J},R=function(){function H(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=U.deflt(h.displayMode,!1),this.output=U.deflt(h.output,"htmlAndMathml"),this.leqno=U.deflt(h.leqno,!1),this.fleqn=U.deflt(h.fleqn,!1),this.throwOnError=U.deflt(h.throwOnError,!0),this.errorColor=U.deflt(h.errorColor,"#cc0000"),this.macros=h.macros||{},this.minRuleThickness=Math.max(0,U.deflt(h.minRuleThickness,0)),this.colorIsTextColor=U.deflt(h.colorIsTextColor,!1),this.strict=U.deflt(h.strict,"warn"),this.trust=U.deflt(h.trust,!1),this.maxSize=Math.max(0,U.deflt(h.maxSize,1/0)),this.maxExpand=Math.max(0,U.deflt(h.maxExpand,1e3))}var u=H.prototype;return u.reportNonstrict=function(f,v,L){var j=this.strict;if(typeof j=="function"&&(j=j(f,v,L)),!(!j||j==="ignore")){if(j===!0||j==="error")throw new p("LaTeX-incompatible input and strict mode is set to 'error': "+(v+" ["+f+"]"),L);j==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(v+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+j+"': "+v+" ["+f+"]"))}},u.useStrictBehavior=function(f,v,L){var j=this.strict;if(typeof j=="function")try{j=j(f,v,L)}catch(be){j="error"}return!j||j==="ignore"?!1:j===!0||j==="error"?!0:j==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(v+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+j+"': "+v+" ["+f+"]")),!1)},u.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=U.protocolFromUrl(f.url));var v=typeof this.trust=="function"?this.trust(f):this.trust;return!!v},H}(),z=function(){function H(h,f,v){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=h,this.size=f,this.cramped=v}var u=H.prototype;return u.sup=function(){return at[ie[this.id]]},u.sub=function(){return at[K[this.id]]},u.fracNum=function(){return at[I[this.id]]},u.fracDen=function(){return at[ee[this.id]]},u.cramp=function(){return at[V[this.id]]},u.text=function(){return at[he[this.id]]},u.isTight=function(){return this.size>=2},H}(),P=0,N=1,re=2,ue=3,me=4,Te=5,Be=6,Le=7,at=[new z(P,0,!1),new z(N,0,!0),new z(re,1,!1),new z(ue,1,!0),new z(me,2,!1),new z(Te,2,!0),new z(Be,3,!1),new z(Le,3,!0)],ie=[me,Te,me,Te,Be,Le,Be,Le],K=[Te,Te,Te,Te,Le,Le,Le,Le],I=[re,ue,me,Te,Be,Le,Be,Le],ee=[ue,ue,Te,Te,Le,Le,Le,Le],V=[N,N,ue,ue,Te,Te,Le,Le],he=[P,N,re,ue,re,ue,re,ue],S={DISPLAY:at[P],TEXT:at[re],SCRIPT:at[me],SCRIPTSCRIPT:at[Be]},C=[{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 Z(H){for(var u=0;u<C.length;u++)for(var h=C[u],f=0;f<h.blocks.length;f++){var v=h.blocks[f];if(H>=v[0]&&H<=v[1])return h.name}return null}var ye=[];C.forEach(function(H){return H.blocks.forEach(function(u){return ye.push.apply(ye,u)})});function Ve(H){for(var u=0;u<ye.length;u+=2)if(H>=ye[u]&&H<=ye[u+1])return!0;return!1}var qe=80,gt=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"},yt=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"},Dt=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"},Ut=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"},ot=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"},kt=function(u,h,f){var v=f-54-h-u;return"M702 "+(u+h)+"H400000"+(40+u)+`
|
|
|
H742v`+v+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
|
219 661 l218 661zM702 `+h+"H400000v"+(40+u)+"H742z"},tt=function(u,h,f){h=1e3*h;var v="";switch(u){case"sqrtMain":v=gt(h,qe);break;case"sqrtSize1":v=yt(h,qe);break;case"sqrtSize2":v=Dt(h,qe);break;case"sqrtSize3":v=Ut(h,qe);break;case"sqrtSize4":v=ot(h,qe);break;case"sqrtTall":v=kt(h,qe,f)}return v},Gt={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`},Xe=function(){function H(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=H.prototype;return u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){for(var f=document.createDocumentFragment(),v=0;v<this.children.length;v++)f.appendChild(this.children[v].toNode());return f},u.toMarkup=function(){for(var f="",v=0;v<this.children.length;v++)f+=this.children[v].toMarkup();return f},u.toText=function(){var f=function(L){return L.toText()};return this.children.map(f).join("")},H}(),Ke=function(u){return u.filter(function(h){return h}).join(" ")},Ae=function(u,h,f){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=f||{},h){h.style.isTight()&&this.classes.push("mtight");var v=h.getColor();v&&(this.style.color=v)}},xe=function(u){var h=document.createElement(u);h.className=Ke(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(h.style[f]=this.style[f]);for(var v in this.attributes)this.attributes.hasOwnProperty(v)&&h.setAttribute(v,this.attributes[v]);for(var L=0;L<this.children.length;L++)h.appendChild(this.children[L].toNode());return h},se=function(u){var h="<"+u;this.classes.length&&(h+=' class="'+U.escape(Ke(this.classes))+'"');var f="";for(var v in this.style)this.style.hasOwnProperty(v)&&(f+=U.hyphenate(v)+":"+this.style[v]+";");f&&(h+=' style="'+U.escape(f)+'"');for(var L in this.attributes)this.attributes.hasOwnProperty(L)&&(h+=" "+L+'="'+U.escape(this.attributes[L])+'"');h+=">";for(var j=0;j<this.children.length;j++)h+=this.children[j].toMarkup();return h+="</"+u+">",h},Ne=function(){function H(h,f,v,L){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,Ae.call(this,h,v,L),this.children=f||[]}var u=H.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){return xe.call(this,"span")},u.toMarkup=function(){return se.call(this,"span")},H}(),Ce=function(){function H(h,f,v,L){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,Ae.call(this,f,L),this.children=v||[],this.setAttribute("href",h)}var u=H.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){return xe.call(this,"a")},u.toMarkup=function(){return se.call(this,"a")},H}(),Se=function(){function H(h,f,v){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=f,this.src=h,this.classes=["mord"],this.style=v}var u=H.prototype;return u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){var f=document.createElement("img");f.src=this.src,f.alt=this.alt,f.className="mord";for(var v in this.style)this.style.hasOwnProperty(v)&&(f.style[v]=this.style[v]);return f},u.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",v="";for(var L in this.style)this.style.hasOwnProperty(L)&&(v+=U.hyphenate(L)+":"+this.style[L]+";");return v&&(f+=' style="'+U.escape(v)+'"'),f+="'/>",f},H}(),M={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},fe=function(){function H(h,f,v,L,j,be,Ie,We){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=h,this.height=f||0,this.depth=v||0,this.italic=L||0,this.skew=j||0,this.width=be||0,this.classes=Ie||[],this.style=We||{},this.maxFontSize=0;var vt=Z(this.text.charCodeAt(0));vt&&this.classes.push(vt+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=M[this.text])}var u=H.prototype;return u.hasClass=function(f){return U.contains(this.classes,f)},u.toNode=function(){var f=document.createTextNode(this.text),v=null;this.italic>0&&(v=document.createElement("span"),v.style.marginRight=this.italic+"em"),this.classes.length>0&&(v=v||document.createElement("span"),v.className=Ke(this.classes));for(var L in this.style)this.style.hasOwnProperty(L)&&(v=v||document.createElement("span"),v.style[L]=this.style[L]);return v?(v.appendChild(f),v):f},u.toMarkup=function(){var f=!1,v="<span";this.classes.length&&(f=!0,v+=' class="',v+=U.escape(Ke(this.classes)),v+='"');var L="";this.italic>0&&(L+="margin-right:"+this.italic+"em;");for(var j in this.style)this.style.hasOwnProperty(j)&&(L+=U.hyphenate(j)+":"+this.style[j]+";");L&&(f=!0,v+=' style="'+U.escape(L)+'"');var be=U.escape(this.text);return f?(v+=">",v+=be,v+="</span>",v):be},H}(),_e=function(){function H(h,f){this.children=void 0,this.attributes=void 0,this.children=h||[],this.attributes=f||{}}var u=H.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"svg");for(var L in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,L)&&v.setAttribute(L,this.attributes[L]);for(var j=0;j<this.children.length;j++)v.appendChild(this.children[j].toNode());return v},u.toMarkup=function(){var f="<svg";for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+"='"+this.attributes[v]+"'");f+=">";for(var L=0;L<this.children.length;L++)f+=this.children[L].toMarkup();return f+="</svg>",f},H}(),Re=function(){function H(h,f){this.pathName=void 0,this.alternate=void 0,this.pathName=h,this.alternate=f}var u=H.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"path");return this.alternate?v.setAttribute("d",this.alternate):v.setAttribute("d",Gt[this.pathName]),v},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Gt[this.pathName]+"'/>"},H}(),$e=function(){function H(h){this.attributes=void 0,this.attributes=h||{}}var u=H.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",v=document.createElementNS(f,"line");for(var L in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,L)&&v.setAttribute(L,this.attributes[L]);return v},u.toMarkup=function(){var f="<line";for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+"='"+this.attributes[v]+"'");return f+="/>",f},H}();function rt(H){if(H instanceof fe)return H;throw new Error("Expected symbolNode but got "+String(H)+".")}function it(H){if(H instanceof Ne)return H;throw new Error("Expected span<HtmlDomNode> but got "+String(H)+".")}var te={"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]}},Q={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]},lt={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function st(H,u){te[H]=u}function ht(H,u,h){if(!te[u])throw new Error("Font metrics not found for font: "+u+".");var f=H.charCodeAt(0),v=te[u][f];if(!v&&H[0]in lt&&(f=lt[H[0]].charCodeAt(0),v=te[u][f]),!v&&h==="text"&&Ve(f)&&(v=te[u][77]),v)return{depth:v[0],height:v[1],italic:v[2],skew:v[3],width:v[4]}}var bt={};function He(H){var u;if(H>=5?u=0:H>=3?u=1:u=2,!bt[u]){var h=bt[u]={cssEmPerMu:Q.quad[u]/18};for(var f in Q)Q.hasOwnProperty(f)&&(h[f]=Q[f][u])}return bt[u]}var Et={bin:1,close:1,inner:1,open:1,punct:1,rel:1},pt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ft={math:{},text:{}},Pt=ft;function x(H,u,h,f,v,L){ft[H][v]={font:u,group:h,replace:f},L&&f&&(ft[H][f]=ft[H][v])}var D="math",Ye="text",W="main",pe="ams",Bt="accent-token",Oe="bin",Ue="close",et="inner",q="mathord",ne="op-token",we="open",Fe="punct",G="rel",St="spacing",Ee="textord";x(D,W,G,"\u2261","\\equiv",!0),x(D,W,G,"\u227A","\\prec",!0),x(D,W,G,"\u227B","\\succ",!0),x(D,W,G,"\u223C","\\sim",!0),x(D,W,G,"\u22A5","\\perp"),x(D,W,G,"\u2AAF","\\preceq",!0),x(D,W,G,"\u2AB0","\\succeq",!0),x(D,W,G,"\u2243","\\simeq",!0),x(D,W,G,"\u2223","\\mid",!0),x(D,W,G,"\u226A","\\ll",!0),x(D,W,G,"\u226B","\\gg",!0),x(D,W,G,"\u224D","\\asymp",!0),x(D,W,G,"\u2225","\\parallel"),x(D,W,G,"\u22C8","\\bowtie",!0),x(D,W,G,"\u2323","\\smile",!0),x(D,W,G,"\u2291","\\sqsubseteq",!0),x(D,W,G,"\u2292","\\sqsupseteq",!0),x(D,W,G,"\u2250","\\doteq",!0),x(D,W,G,"\u2322","\\frown",!0),x(D,W,G,"\u220B","\\ni",!0),x(D,W,G,"\u221D","\\propto",!0),x(D,W,G,"\u22A2","\\vdash",!0),x(D,W,G,"\u22A3","\\dashv",!0),x(D,W,G,"\u220B","\\owns"),x(D,W,Fe,".","\\ldotp"),x(D,W,Fe,"\u22C5","\\cdotp"),x(D,W,Ee,"#","\\#"),x(Ye,W,Ee,"#","\\#"),x(D,W,Ee,"&","\\&"),x(Ye,W,Ee,"&","\\&"),x(D,W,Ee,"\u2135","\\aleph",!0),x(D,W,Ee,"\u2200","\\forall",!0),x(D,W,Ee,"\u210F","\\hbar",!0),x(D,W,Ee,"\u2203","\\exists",!0),x(D,W,Ee,"\u2207","\\nabla",!0),x(D,W,Ee,"\u266D","\\flat",!0),x(D,W,Ee,"\u2113","\\ell",!0),x(D,W,Ee,"\u266E","\\natural",!0),x(D,W,Ee,"\u2663","\\clubsuit",!0),x(D,W,Ee,"\u2118","\\wp",!0),x(D,W,Ee,"\u266F","\\sharp",!0),x(D,W,Ee,"\u2662","\\diamondsuit",!0),x(D,W,Ee,"\u211C","\\Re",!0),x(D,W,Ee,"\u2661","\\heartsuit",!0),x(D,W,Ee,"\u2111","\\Im",!0),x(D,W,Ee,"\u2660","\\spadesuit",!0),x(Ye,W,Ee,"\xA7","\\S",!0),x(Ye,W,Ee,"\xB6","\\P",!0),x(D,W,Ee,"\u2020","\\dag"),x(Ye,W,Ee,"\u2020","\\dag"),x(Ye,W,Ee,"\u2020","\\textdagger"),x(D,W,Ee,"\u2021","\\ddag"),x(Ye,W,Ee,"\u2021","\\ddag"),x(Ye,W,Ee,"\u2021","\\textdaggerdbl"),x(D,W,Ue,"\u23B1","\\rmoustache",!0),x(D,W,we,"\u23B0","\\lmoustache",!0),x(D,W,Ue,"\u27EF","\\rgroup",!0),x(D,W,we,"\u27EE","\\lgroup",!0),x(D,W,Oe,"\u2213","\\mp",!0),x(D,W,Oe,"\u2296","\\ominus",!0),x(D,W,Oe,"\u228E","\\uplus",!0),x(D,W,Oe,"\u2293","\\sqcap",!0),x(D,W,Oe,"\u2217","\\ast"),x(D,W,Oe,"\u2294","\\sqcup",!0),x(D,W,Oe,"\u25EF","\\bigcirc"),x(D,W,Oe,"\u2219","\\bullet"),x(D,W,Oe,"\u2021","\\ddagger"),x(D,W,Oe,"\u2240","\\wr",!0),x(D,W,Oe,"\u2A3F","\\amalg"),x(D,W,Oe,"&","\\And"),x(D,W,G,"\u27F5","\\longleftarrow",!0),x(D,W,G,"\u21D0","\\Leftarrow",!0),x(D,W,G,"\u27F8","\\Longleftarrow",!0),x(D,W,G,"\u27F6","\\longrightarrow",!0),x(D,W,G,"\u21D2","\\Rightarrow",!0),x(D,W,G,"\u27F9","\\Longrightarrow",!0),x(D,W,G,"\u2194","\\leftrightarrow",!0),x(D,W,G,"\u27F7","\\longleftrightarrow",!0),x(D,W,G,"\u21D4","\\Leftrightarrow",!0),x(D,W,G,"\u27FA","\\Longleftrightarrow",!0),x(D,W,G,"\u21A6","\\mapsto",!0),x(D,W,G,"\u27FC","\\longmapsto",!0),x(D,W,G,"\u2197","\\nearrow",!0),x(D,W,G,"\u21A9","\\hookleftarrow",!0),x(D,W,G,"\u21AA","\\hookrightarrow",!0),x(D,W,G,"\u2198","\\searrow",!0),x(D,W,G,"\u21BC","\\leftharpoonup",!0),x(D,W,G,"\u21C0","\\rightharpoonup",!0),x(D,W,G,"\u2199","\\swarrow",!0),x(D,W,G,"\u21BD","\\leftharpoondown",!0),x(D,W,G,"\u21C1","\\rightharpoondown",!0),x(D,W,G,"\u2196","\\nwarrow",!0),x(D,W,G,"\u21CC","\\rightleftharpoons",!0),x(D,pe,G,"\u226E","\\nless",!0),x(D,pe,G,"\uE010","\\@nleqslant"),x(D,pe,G,"\uE011","\\@nleqq"),x(D,pe,G,"\u2A87","\\lneq",!0),x(D,pe,G,"\u2268","\\lneqq",!0),x(D,pe,G,"\uE00C","\\@lvertneqq"),x(D,pe,G,"\u22E6","\\lnsim",!0),x(D,pe,G,"\u2A89","\\lnapprox",!0),x(D,pe,G,"\u2280","\\nprec",!0),x(D,pe,G,"\u22E0","\\npreceq",!0),x(D,pe,G,"\u22E8","\\precnsim",!0),x(D,pe,G,"\u2AB9","\\precnapprox",!0),x(D,pe,G,"\u2241","\\nsim",!0),x(D,pe,G,"\uE006","\\@nshortmid"),x(D,pe,G,"\u2224","\\nmid",!0),x(D,pe,G,"\u22AC","\\nvdash",!0),x(D,pe,G,"\u22AD","\\nvDash",!0),x(D,pe,G,"\u22EA","\\ntriangleleft"),x(D,pe,G,"\u22EC","\\ntrianglelefteq",!0),x(D,pe,G,"\u228A","\\subsetneq",!0),x(D,pe,G,"\uE01A","\\@varsubsetneq"),x(D,pe,G,"\u2ACB","\\subsetneqq",!0),x(D,pe,G,"\uE017","\\@varsubsetneqq"),x(D,pe,G,"\u226F","\\ngtr",!0),x(D,pe,G,"\uE00F","\\@ngeqslant"),x(D,pe,G,"\uE00E","\\@ngeqq"),x(D,pe,G,"\u2A88","\\gneq",!0),x(D,pe,G,"\u2269","\\gneqq",!0),x(D,pe,G,"\uE00D","\\@gvertneqq"),x(D,pe,G,"\u22E7","\\gnsim",!0),x(D,pe,G,"\u2A8A","\\gnapprox",!0),x(D,pe,G,"\u2281","\\nsucc",!0),x(D,pe,G,"\u22E1","\\nsucceq",!0),x(D,pe,G,"\u22E9","\\succnsim",!0),x(D,pe,G,"\u2ABA","\\succnapprox",!0),x(D,pe,G,"\u2246","\\ncong",!0),x(D,pe,G,"\uE007","\\@nshortparallel"),x(D,pe,G,"\u2226","\\nparallel",!0),x(D,pe,G,"\u22AF","\\nVDash",!0),x(D,pe,G,"\u22EB","\\ntriangleright"),x(D,pe,G,"\u22ED","\\ntrianglerighteq",!0),x(D,pe,G,"\uE018","\\@nsupseteqq"),x(D,pe,G,"\u228B","\\supsetneq",!0),x(D,pe,G,"\uE01B","\\@varsupsetneq"),x(D,pe,G,"\u2ACC","\\supsetneqq",!0),x(D,pe,G,"\uE019","\\@varsupsetneqq"),x(D,pe,G,"\u22AE","\\nVdash",!0),x(D,pe,G,"\u2AB5","\\precneqq",!0),x(D,pe,G,"\u2AB6","\\succneqq",!0),x(D,pe,G,"\uE016","\\@nsubseteqq"),x(D,pe,Oe,"\u22B4","\\unlhd"),x(D,pe,Oe,"\u22B5","\\unrhd"),x(D,pe,G,"\u219A","\\nleftarrow",!0),x(D,pe,G,"\u219B","\\nrightarrow",!0),x(D,pe,G,"\u21CD","\\nLeftarrow",!0),x(D,pe,G,"\u21CF","\\nRightarrow",!0),x(D,pe,G,"\u21AE","\\nleftrightarrow",!0),x(D,pe,G,"\u21CE","\\nLeftrightarrow",!0),x(D,pe,G,"\u25B3","\\vartriangle"),x(D,pe,Ee,"\u210F","\\hslash"),x(D,pe,Ee,"\u25BD","\\triangledown"),x(D,pe,Ee,"\u25CA","\\lozenge"),x(D,pe,Ee,"\u24C8","\\circledS"),x(D,pe,Ee,"\xAE","\\circledR"),x(Ye,pe,Ee,"\xAE","\\circledR"),x(D,pe,Ee,"\u2221","\\measuredangle",!0),x(D,pe,Ee,"\u2204","\\nexists"),x(D,pe,Ee,"\u2127","\\mho"),x(D,pe,Ee,"\u2132","\\Finv",!0),x(D,pe,Ee,"\u2141","\\Game",!0),x(D,pe,Ee,"\u2035","\\backprime"),x(D,pe,Ee,"\u25B2","\\blacktriangle"),x(D,pe,Ee,"\u25BC","\\blacktriangledown"),x(D,pe,Ee,"\u25A0","\\blacksquare"),x(D,pe,Ee,"\u29EB","\\blacklozenge"),x(D,pe,Ee,"\u2605","\\bigstar"),x(D,pe,Ee,"\u2222","\\sphericalangle",!0),x(D,pe,Ee,"\u2201","\\complement",!0),x(D,pe,Ee,"\xF0","\\eth",!0),x(D,pe,Ee,"\u2571","\\diagup"),x(D,pe,Ee,"\u2572","\\diagdown"),x(D,pe,Ee,"\u25A1","\\square"),x(D,pe,Ee,"\u25A1","\\Box"),x(D,pe,Ee,"\u25CA","\\Diamond"),x(D,pe,Ee,"\xA5","\\yen",!0),x(Ye,pe,Ee,"\xA5","\\yen",!0),x(D,pe,Ee,"\u2713","\\checkmark",!0),x(Ye,pe,Ee,"\u2713","\\checkmark"),x(D,pe,Ee,"\u2136","\\beth",!0),x(D,pe,Ee,"\u2138","\\daleth",!0),x(D,pe,Ee,"\u2137","\\gimel",!0),x(D,pe,Ee,"\u03DD","\\digamma",!0),x(D,pe,Ee,"\u03F0","\\varkappa"),x(D,pe,we,"\u250C","\\ulcorner",!0),x(D,pe,Ue,"\u2510","\\urcorner",!0),x(D,pe,we,"\u2514","\\llcorner",!0),x(D,pe,Ue,"\u2518","\\lrcorner",!0),x(D,pe,G,"\u2266","\\leqq",!0),x(D,pe,G,"\u2A7D","\\leqslant",!0),x(D,pe,G,"\u2A95","\\eqslantless",!0),x(D,pe,G,"\u2272","\\lesssim",!0),x(D,pe,G,"\u2A85","\\lessapprox",!0),x(D,pe,G,"\u224A","\\approxeq",!0),x(D,pe,Oe,"\u22D6","\\lessdot"),x(D,pe,G,"\u22D8","\\lll",!0),x(D,pe,G,"\u2276","\\lessgtr",!0),x(D,pe,G,"\u22DA","\\lesseqgtr",!0),x(D,pe,G,"\u2A8B","\\lesseqqgtr",!0),x(D,pe,G,"\u2251","\\doteqdot"),x(D,pe,G,"\u2253","\\risingdotseq",!0),x(D,pe,G,"\u2252","\\fallingdotseq",!0),x(D,pe,G,"\u223D","\\backsim",!0),x(D,pe,G,"\u22CD","\\backsimeq",!0),x(D,pe,G,"\u2AC5","\\subseteqq",!0),x(D,pe,G,"\u22D0","\\Subset",!0),x(D,pe,G,"\u228F","\\sqsubset",!0),x(D,pe,G,"\u227C","\\preccurlyeq",!0),x(D,pe,G,"\u22DE","\\curlyeqprec",!0),x(D,pe,G,"\u227E","\\precsim",!0),x(D,pe,G,"\u2AB7","\\precapprox",!0),x(D,pe,G,"\u22B2","\\vartriangleleft"),x(D,pe,G,"\u22B4","\\trianglelefteq"),x(D,pe,G,"\u22A8","\\vDash",!0),x(D,pe,G,"\u22AA","\\Vvdash",!0),x(D,pe,G,"\u2323","\\smallsmile"),x(D,pe,G,"\u2322","\\smallfrown"),x(D,pe,G,"\u224F","\\bumpeq",!0),x(D,pe,G,"\u224E","\\Bumpeq",!0),x(D,pe,G,"\u2267","\\geqq",!0),x(D,pe,G,"\u2A7E","\\geqslant",!0),x(D,pe,G,"\u2A96","\\eqslantgtr",!0),x(D,pe,G,"\u2273","\\gtrsim",!0),x(D,pe,G,"\u2A86","\\gtrapprox",!0),x(D,pe,Oe,"\u22D7","\\gtrdot"),x(D,pe,G,"\u22D9","\\ggg",!0),x(D,pe,G,"\u2277","\\gtrless",!0),x(D,pe,G,"\u22DB","\\gtreqless",!0),x(D,pe,G,"\u2A8C","\\gtreqqless",!0),x(D,pe,G,"\u2256","\\eqcirc",!0),x(D,pe,G,"\u2257","\\circeq",!0),x(D,pe,G,"\u225C","\\triangleq",!0),x(D,pe,G,"\u223C","\\thicksim"),x(D,pe,G,"\u2248","\\thickapprox"),x(D,pe,G,"\u2AC6","\\supseteqq",!0),x(D,pe,G,"\u22D1","\\Supset",!0),x(D,pe,G,"\u2290","\\sqsupset",!0),x(D,pe,G,"\u227D","\\succcurlyeq",!0),x(D,pe,G,"\u22DF","\\curlyeqsucc",!0),x(D,pe,G,"\u227F","\\succsim",!0),x(D,pe,G,"\u2AB8","\\succapprox",!0),x(D,pe,G,"\u22B3","\\vartriangleright"),x(D,pe,G,"\u22B5","\\trianglerighteq"),x(D,pe,G,"\u22A9","\\Vdash",!0),x(D,pe,G,"\u2223","\\shortmid"),x(D,pe,G,"\u2225","\\shortparallel"),x(D,pe,G,"\u226C","\\between",!0),x(D,pe,G,"\u22D4","\\pitchfork",!0),x(D,pe,G,"\u221D","\\varpropto"),x(D,pe,G,"\u25C0","\\blacktriangleleft"),x(D,pe,G,"\u2234","\\therefore",!0),x(D,pe,G,"\u220D","\\backepsilon"),x(D,pe,G,"\u25B6","\\blacktriangleright"),x(D,pe,G,"\u2235","\\because",!0),x(D,pe,G,"\u22D8","\\llless"),x(D,pe,G,"\u22D9","\\gggtr"),x(D,pe,Oe,"\u22B2","\\lhd"),x(D,pe,Oe,"\u22B3","\\rhd"),x(D,pe,G,"\u2242","\\eqsim",!0),x(D,W,G,"\u22C8","\\Join"),x(D,pe,G,"\u2251","\\Doteq",!0),x(D,pe,Oe,"\u2214","\\dotplus",!0),x(D,pe,Oe,"\u2216","\\smallsetminus"),x(D,pe,Oe,"\u22D2","\\Cap",!0),x(D,pe,Oe,"\u22D3","\\Cup",!0),x(D,pe,Oe,"\u2A5E","\\doublebarwedge",!0),x(D,pe,Oe,"\u229F","\\boxminus",!0),x(D,pe,Oe,"\u229E","\\boxplus",!0),x(D,pe,Oe,"\u22C7","\\divideontimes",!0),x(D,pe,Oe,"\u22C9","\\ltimes",!0),x(D,pe,Oe,"\u22CA","\\rtimes",!0),x(D,pe,Oe,"\u22CB","\\leftthreetimes",!0),x(D,pe,Oe,"\u22CC","\\rightthreetimes",!0),x(D,pe,Oe,"\u22CF","\\curlywedge",!0),x(D,pe,Oe,"\u22CE","\\curlyvee",!0),x(D,pe,Oe,"\u229D","\\circleddash",!0),x(D,pe,Oe,"\u229B","\\circledast",!0),x(D,pe,Oe,"\u22C5","\\centerdot"),x(D,pe,Oe,"\u22BA","\\intercal",!0),x(D,pe,Oe,"\u22D2","\\doublecap"),x(D,pe,Oe,"\u22D3","\\doublecup"),x(D,pe,Oe,"\u22A0","\\boxtimes",!0),x(D,pe,G,"\u21E2","\\dashrightarrow",!0),x(D,pe,G,"\u21E0","\\dashleftarrow",!0),x(D,pe,G,"\u21C7","\\leftleftarrows",!0),x(D,pe,G,"\u21C6","\\leftrightarrows",!0),x(D,pe,G,"\u21DA","\\Lleftarrow",!0),x(D,pe,G,"\u219E","\\twoheadleftarrow",!0),x(D,pe,G,"\u21A2","\\leftarrowtail",!0),x(D,pe,G,"\u21AB","\\looparrowleft",!0),x(D,pe,G,"\u21CB","\\leftrightharpoons",!0),x(D,pe,G,"\u21B6","\\curvearrowleft",!0),x(D,pe,G,"\u21BA","\\circlearrowleft",!0),x(D,pe,G,"\u21B0","\\Lsh",!0),x(D,pe,G,"\u21C8","\\upuparrows",!0),x(D,pe,G,"\u21BF","\\upharpoonleft",!0),x(D,pe,G,"\u21C3","\\downharpoonleft",!0),x(D,pe,G,"\u22B8","\\multimap",!0),x(D,pe,G,"\u21AD","\\leftrightsquigarrow",!0),x(D,pe,G,"\u21C9","\\rightrightarrows",!0),x(D,pe,G,"\u21C4","\\rightleftarrows",!0),x(D,pe,G,"\u21A0","\\twoheadrightarrow",!0),x(D,pe,G,"\u21A3","\\rightarrowtail",!0),x(D,pe,G,"\u21AC","\\looparrowright",!0),x(D,pe,G,"\u21B7","\\curvearrowright",!0),x(D,pe,G,"\u21BB","\\circlearrowright",!0),x(D,pe,G,"\u21B1","\\Rsh",!0),x(D,pe,G,"\u21CA","\\downdownarrows",!0),x(D,pe,G,"\u21BE","\\upharpoonright",!0),x(D,pe,G,"\u21C2","\\downharpoonright",!0),x(D,pe,G,"\u21DD","\\rightsquigarrow",!0),x(D,pe,G,"\u21DD","\\leadsto"),x(D,pe,G,"\u21DB","\\Rrightarrow",!0),x(D,pe,G,"\u21BE","\\restriction"),x(D,W,Ee,"\u2018","`"),x(D,W,Ee,"$","\\$"),x(Ye,W,Ee,"$","\\$"),x(Ye,W,Ee,"$","\\textdollar"),x(D,W,Ee,"%","\\%"),x(Ye,W,Ee,"%","\\%"),x(D,W,Ee,"_","\\_"),x(Ye,W,Ee,"_","\\_"),x(Ye,W,Ee,"_","\\textunderscore"),x(D,W,Ee,"\u2220","\\angle",!0),x(D,W,Ee,"\u221E","\\infty",!0),x(D,W,Ee,"\u2032","\\prime"),x(D,W,Ee,"\u25B3","\\triangle"),x(D,W,Ee,"\u0393","\\Gamma",!0),x(D,W,Ee,"\u0394","\\Delta",!0),x(D,W,Ee,"\u0398","\\Theta",!0),x(D,W,Ee,"\u039B","\\Lambda",!0),x(D,W,Ee,"\u039E","\\Xi",!0),x(D,W,Ee,"\u03A0","\\Pi",!0),x(D,W,Ee,"\u03A3","\\Sigma",!0),x(D,W,Ee,"\u03A5","\\Upsilon",!0),x(D,W,Ee,"\u03A6","\\Phi",!0),x(D,W,Ee,"\u03A8","\\Psi",!0),x(D,W,Ee,"\u03A9","\\Omega",!0),x(D,W,Ee,"A","\u0391"),x(D,W,Ee,"B","\u0392"),x(D,W,Ee,"E","\u0395"),x(D,W,Ee,"Z","\u0396"),x(D,W,Ee,"H","\u0397"),x(D,W,Ee,"I","\u0399"),x(D,W,Ee,"K","\u039A"),x(D,W,Ee,"M","\u039C"),x(D,W,Ee,"N","\u039D"),x(D,W,Ee,"O","\u039F"),x(D,W,Ee,"P","\u03A1"),x(D,W,Ee,"T","\u03A4"),x(D,W,Ee,"X","\u03A7"),x(D,W,Ee,"\xAC","\\neg",!0),x(D,W,Ee,"\xAC","\\lnot"),x(D,W,Ee,"\u22A4","\\top"),x(D,W,Ee,"\u22A5","\\bot"),x(D,W,Ee,"\u2205","\\emptyset"),x(D,pe,Ee,"\u2205","\\varnothing"),x(D,W,q,"\u03B1","\\alpha",!0),x(D,W,q,"\u03B2","\\beta",!0),x(D,W,q,"\u03B3","\\gamma",!0),x(D,W,q,"\u03B4","\\delta",!0),x(D,W,q,"\u03F5","\\epsilon",!0),x(D,W,q,"\u03B6","\\zeta",!0),x(D,W,q,"\u03B7","\\eta",!0),x(D,W,q,"\u03B8","\\theta",!0),x(D,W,q,"\u03B9","\\iota",!0),x(D,W,q,"\u03BA","\\kappa",!0),x(D,W,q,"\u03BB","\\lambda",!0),x(D,W,q,"\u03BC","\\mu",!0),x(D,W,q,"\u03BD","\\nu",!0),x(D,W,q,"\u03BE","\\xi",!0),x(D,W,q,"\u03BF","\\omicron",!0),x(D,W,q,"\u03C0","\\pi",!0),x(D,W,q,"\u03C1","\\rho",!0),x(D,W,q,"\u03C3","\\sigma",!0),x(D,W,q,"\u03C4","\\tau",!0),x(D,W,q,"\u03C5","\\upsilon",!0),x(D,W,q,"\u03D5","\\phi",!0),x(D,W,q,"\u03C7","\\chi",!0),x(D,W,q,"\u03C8","\\psi",!0),x(D,W,q,"\u03C9","\\omega",!0),x(D,W,q,"\u03B5","\\varepsilon",!0),x(D,W,q,"\u03D1","\\vartheta",!0),x(D,W,q,"\u03D6","\\varpi",!0),x(D,W,q,"\u03F1","\\varrho",!0),x(D,W,q,"\u03C2","\\varsigma",!0),x(D,W,q,"\u03C6","\\varphi",!0),x(D,W,Oe,"\u2217","*"),x(D,W,Oe,"+","+"),x(D,W,Oe,"\u2212","-"),x(D,W,Oe,"\u22C5","\\cdot",!0),x(D,W,Oe,"\u2218","\\circ"),x(D,W,Oe,"\xF7","\\div",!0),x(D,W,Oe,"\xB1","\\pm",!0),x(D,W,Oe,"\xD7","\\times",!0),x(D,W,Oe,"\u2229","\\cap",!0),x(D,W,Oe,"\u222A","\\cup",!0),x(D,W,Oe,"\u2216","\\setminus"),x(D,W,Oe,"\u2227","\\land"),x(D,W,Oe,"\u2228","\\lor"),x(D,W,Oe,"\u2227","\\wedge",!0),x(D,W,Oe,"\u2228","\\vee",!0),x(D,W,Ee,"\u221A","\\surd"),x(D,W,we,"(","("),x(D,W,we,"[","["),x(D,W,we,"\u27E8","\\langle",!0),x(D,W,we,"\u2223","\\lvert"),x(D,W,we,"\u2225","\\lVert"),x(D,W,Ue,")",")"),x(D,W,Ue,"]","]"),x(D,W,Ue,"?","?"),x(D,W,Ue,"!","!"),x(D,W,Ue,"\u27E9","\\rangle",!0),x(D,W,Ue,"\u2223","\\rvert"),x(D,W,Ue,"\u2225","\\rVert"),x(D,W,G,"=","="),x(D,W,G,"<","<"),x(D,W,G,">",">"),x(D,W,G,":",":"),x(D,W,G,"\u2248","\\approx",!0),x(D,W,G,"\u2245","\\cong",!0),x(D,W,G,"\u2265","\\ge"),x(D,W,G,"\u2265","\\geq",!0),x(D,W,G,"\u2190","\\gets"),x(D,W,G,">","\\gt"),x(D,W,G,"\u2208","\\in",!0),x(D,W,G,"\uE020","\\@not"),x(D,W,G,"\u2282","\\subset",!0),x(D,W,G,"\u2283","\\supset",!0),x(D,W,G,"\u2286","\\subseteq",!0),x(D,W,G,"\u2287","\\supseteq",!0),x(D,pe,G,"\u2288","\\nsubseteq",!0),x(D,pe,G,"\u2289","\\nsupseteq",!0),x(D,W,G,"\u22A8","\\models"),x(D,W,G,"\u2190","\\leftarrow",!0),x(D,W,G,"\u2264","\\le"),x(D,W,G,"\u2264","\\leq",!0),x(D,W,G,"<","\\lt"),x(D,W,G,"\u2192","\\rightarrow",!0),x(D,W,G,"\u2192","\\to"),x(D,pe,G,"\u2271","\\ngeq",!0),x(D,pe,G,"\u2270","\\nleq",!0),x(D,W,St,"\xA0","\\ "),x(D,W,St,"\xA0","~"),x(D,W,St,"\xA0","\\space"),x(D,W,St,"\xA0","\\nobreakspace"),x(Ye,W,St,"\xA0","\\ "),x(Ye,W,St,"\xA0","~"),x(Ye,W,St,"\xA0","\\space"),x(Ye,W,St,"\xA0","\\nobreakspace"),x(D,W,St,null,"\\nobreak"),x(D,W,St,null,"\\allowbreak"),x(D,W,Fe,",",","),x(D,W,Fe,";",";"),x(D,pe,Oe,"\u22BC","\\barwedge",!0),x(D,pe,Oe,"\u22BB","\\veebar",!0),x(D,W,Oe,"\u2299","\\odot",!0),x(D,W,Oe,"\u2295","\\oplus",!0),x(D,W,Oe,"\u2297","\\otimes",!0),x(D,W,Ee,"\u2202","\\partial",!0),x(D,W,Oe,"\u2298","\\oslash",!0),x(D,pe,Oe,"\u229A","\\circledcirc",!0),x(D,pe,Oe,"\u22A1","\\boxdot",!0),x(D,W,Oe,"\u25B3","\\bigtriangleup"),x(D,W,Oe,"\u25BD","\\bigtriangledown"),x(D,W,Oe,"\u2020","\\dagger"),x(D,W,Oe,"\u22C4","\\diamond"),x(D,W,Oe,"\u22C6","\\star"),x(D,W,Oe,"\u25C3","\\triangleleft"),x(D,W,Oe,"\u25B9","\\triangleright"),x(D,W,we,"{","\\{"),x(Ye,W,Ee,"{","\\{"),x(Ye,W,Ee,"{","\\textbraceleft"),x(D,W,Ue,"}","\\}"),x(Ye,W,Ee,"}","\\}"),x(Ye,W,Ee,"}","\\textbraceright"),x(D,W,we,"{","\\lbrace"),x(D,W,Ue,"}","\\rbrace"),x(D,W,we,"[","\\lbrack"),x(Ye,W,Ee,"[","\\lbrack"),x(D,W,Ue,"]","\\rbrack"),x(Ye,W,Ee,"]","\\rbrack"),x(D,W,we,"(","\\lparen"),x(D,W,Ue,")","\\rparen"),x(Ye,W,Ee,"<","\\textless"),x(Ye,W,Ee,">","\\textgreater"),x(D,W,we,"\u230A","\\lfloor",!0),x(D,W,Ue,"\u230B","\\rfloor",!0),x(D,W,we,"\u2308","\\lceil",!0),x(D,W,Ue,"\u2309","\\rceil",!0),x(D,W,Ee,"\\","\\backslash"),x(D,W,Ee,"\u2223","|"),x(D,W,Ee,"\u2223","\\vert"),x(Ye,W,Ee,"|","\\textbar"),x(D,W,Ee,"\u2225","\\|"),x(D,W,Ee,"\u2225","\\Vert"),x(Ye,W,Ee,"\u2225","\\textbardbl"),x(Ye,W,Ee,"~","\\textasciitilde"),x(Ye,W,Ee,"\\","\\textbackslash"),x(Ye,W,Ee,"^","\\textasciicircum"),x(D,W,G,"\u2191","\\uparrow",!0),x(D,W,G,"\u21D1","\\Uparrow",!0),x(D,W,G,"\u2193","\\downarrow",!0),x(D,W,G,"\u21D3","\\Downarrow",!0),x(D,W,G,"\u2195","\\updownarrow",!0),x(D,W,G,"\u21D5","\\Updownarrow",!0),x(D,W,ne,"\u2210","\\coprod"),x(D,W,ne,"\u22C1","\\bigvee"),x(D,W,ne,"\u22C0","\\bigwedge"),x(D,W,ne,"\u2A04","\\biguplus"),x(D,W,ne,"\u22C2","\\bigcap"),x(D,W,ne,"\u22C3","\\bigcup"),x(D,W,ne,"\u222B","\\int"),x(D,W,ne,"\u222B","\\intop"),x(D,W,ne,"\u222C","\\iint"),x(D,W,ne,"\u222D","\\iiint"),x(D,W,ne,"\u220F","\\prod"),x(D,W,ne,"\u2211","\\sum"),x(D,W,ne,"\u2A02","\\bigotimes"),x(D,W,ne,"\u2A01","\\bigoplus"),x(D,W,ne,"\u2A00","\\bigodot"),x(D,W,ne,"\u222E","\\oint"),x(D,W,ne,"\u222F","\\oiint"),x(D,W,ne,"\u2230","\\oiiint"),x(D,W,ne,"\u2A06","\\bigsqcup"),x(D,W,ne,"\u222B","\\smallint"),x(Ye,W,et,"\u2026","\\textellipsis"),x(D,W,et,"\u2026","\\mathellipsis"),x(Ye,W,et,"\u2026","\\ldots",!0),x(D,W,et,"\u2026","\\ldots",!0),x(D,W,et,"\u22EF","\\@cdots",!0),x(D,W,et,"\u22F1","\\ddots",!0),x(D,W,Ee,"\u22EE","\\varvdots"),x(D,W,Bt,"\u02CA","\\acute"),x(D,W,Bt,"\u02CB","\\grave"),x(D,W,Bt,"\xA8","\\ddot"),x(D,W,Bt,"~","\\tilde"),x(D,W,Bt,"\u02C9","\\bar"),x(D,W,Bt,"\u02D8","\\breve"),x(D,W,Bt,"\u02C7","\\check"),x(D,W,Bt,"^","\\hat"),x(D,W,Bt,"\u20D7","\\vec"),x(D,W,Bt,"\u02D9","\\dot"),x(D,W,Bt,"\u02DA","\\mathring"),x(D,W,q,"\u0131","\\imath",!0),x(D,W,q,"\u0237","\\jmath",!0),x(Ye,W,Ee,"\u0131","\\i",!0),x(Ye,W,Ee,"\u0237","\\j",!0),x(Ye,W,Ee,"\xDF","\\ss",!0),x(Ye,W,Ee,"\xE6","\\ae",!0),x(Ye,W,Ee,"\xE6","\\ae",!0),x(Ye,W,Ee,"\u0153","\\oe",!0),x(Ye,W,Ee,"\xF8","\\o",!0),x(Ye,W,Ee,"\xC6","\\AE",!0),x(Ye,W,Ee,"\u0152","\\OE",!0),x(Ye,W,Ee,"\xD8","\\O",!0),x(Ye,W,Bt,"\u02CA","\\'"),x(Ye,W,Bt,"\u02CB","\\`"),x(Ye,W,Bt,"\u02C6","\\^"),x(Ye,W,Bt,"\u02DC","\\~"),x(Ye,W,Bt,"\u02C9","\\="),x(Ye,W,Bt,"\u02D8","\\u"),x(Ye,W,Bt,"\u02D9","\\."),x(Ye,W,Bt,"\u02DA","\\r"),x(Ye,W,Bt,"\u02C7","\\v"),x(Ye,W,Bt,"\xA8",'\\"'),x(Ye,W,Bt,"\u02DD","\\H"),x(Ye,W,Bt,"\u25EF","\\textcircled");var Wt={"--":!0,"---":!0,"``":!0,"''":!0};x(Ye,W,Ee,"\u2013","--"),x(Ye,W,Ee,"\u2013","\\textendash"),x(Ye,W,Ee,"\u2014","---"),x(Ye,W,Ee,"\u2014","\\textemdash"),x(Ye,W,Ee,"\u2018","`"),x(Ye,W,Ee,"\u2018","\\textquoteleft"),x(Ye,W,Ee,"\u2019","'"),x(Ye,W,Ee,"\u2019","\\textquoteright"),x(Ye,W,Ee,"\u201C","``"),x(Ye,W,Ee,"\u201C","\\textquotedblleft"),x(Ye,W,Ee,"\u201D","''"),x(Ye,W,Ee,"\u201D","\\textquotedblright"),x(D,W,Ee,"\xB0","\\degree",!0),x(Ye,W,Ee,"\xB0","\\degree"),x(Ye,W,Ee,"\xB0","\\textdegree",!0),x(D,W,q,"\xA3","\\pounds"),x(D,W,q,"\xA3","\\mathsterling",!0),x(Ye,W,q,"\xA3","\\pounds"),x(Ye,W,q,"\xA3","\\textsterling",!0),x(D,pe,Ee,"\u2720","\\maltese"),x(Ye,pe,Ee,"\u2720","\\maltese"),x(Ye,W,St,"\xA0","\\ "),x(Ye,W,St,"\xA0"," "),x(Ye,W,St,"\xA0","~");for(var en='0123456789/@."',an=0;an<en.length;an++){var Zn=en.charAt(an);x(D,W,Ee,Zn,Zn)}for(var Rn='0123456789!@*()-=+[]<>|";:?/.,',Cn=0;Cn<Rn.length;Cn++){var sr=Rn.charAt(Cn);x(Ye,W,Ee,sr,sr)}for(var dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",$n=0;$n<dr.length;$n++){var qn=dr.charAt($n);x(D,W,q,qn,qn),x(Ye,W,Ee,qn,qn)}x(D,pe,Ee,"C","\u2102"),x(Ye,pe,Ee,"C","\u2102"),x(D,pe,Ee,"H","\u210D"),x(Ye,pe,Ee,"H","\u210D"),x(D,pe,Ee,"N","\u2115"),x(Ye,pe,Ee,"N","\u2115"),x(D,pe,Ee,"P","\u2119"),x(Ye,pe,Ee,"P","\u2119"),x(D,pe,Ee,"Q","\u211A"),x(Ye,pe,Ee,"Q","\u211A"),x(D,pe,Ee,"R","\u211D"),x(Ye,pe,Ee,"R","\u211D"),x(D,pe,Ee,"Z","\u2124"),x(Ye,pe,Ee,"Z","\u2124"),x(D,W,q,"h","\u210E"),x(Ye,W,q,"h","\u210E");for(var ln="",$t=0;$t<dr.length;$t++){var Vt=dr.charAt($t);ln=String.fromCharCode(55349,56320+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56372+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56424+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56580+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56736+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56788+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56840+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56944+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),$t<26&&(ln=String.fromCharCode(55349,56632+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln),ln=String.fromCharCode(55349,56476+$t),x(D,W,q,Vt,ln),x(Ye,W,Ee,Vt,ln))}ln="\u{1D55C}",x(D,W,q,"k",ln),x(Ye,W,Ee,"k",ln);for(var An=0;An<10;An++){var Xn=An.toString();ln=String.fromCharCode(55349,57294+An),x(D,W,q,Xn,ln),x(Ye,W,Ee,Xn,ln),ln=String.fromCharCode(55349,57314+An),x(D,W,q,Xn,ln),x(Ye,W,Ee,Xn,ln),ln=String.fromCharCode(55349,57324+An),x(D,W,q,Xn,ln),x(Ye,W,Ee,Xn,ln),ln=String.fromCharCode(55349,57334+An),x(D,W,q,Xn,ln),x(Ye,W,Ee,Xn,ln)}for(var Qe="\xC7\xD0\xDE\xE7\xFE",Je=0;Je<Qe.length;Je++){var ve=Qe.charAt(Je);x(D,W,q,ve,ve),x(Ye,W,Ee,ve,ve)}x(Ye,W,Ee,"\xF0","\xF0"),x(Ye,W,Ee,"\u2013","\u2013"),x(Ye,W,Ee,"\u2014","\u2014"),x(Ye,W,Ee,"\u2018","\u2018"),x(Ye,W,Ee,"\u2019","\u2019"),x(Ye,W,Ee,"\u201C","\u201C"),x(Ye,W,Ee,"\u201D","\u201D");var Pe=[["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"]],Ge=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ze=function(u,h){var f=u.charCodeAt(0),v=u.charCodeAt(1),L=(f-55296)*1024+(v-56320)+65536,j=h==="math"?0:1;if(119808<=L&&L<120484){var be=Math.floor((L-119808)/26);return[Pe[be][2],Pe[be][j]]}else if(120782<=L&&L<=120831){var Ie=Math.floor((L-120782)/10);return[Ge[Ie][2],Ge[Ie][j]]}else{if(L===120485||L===120486)return[Pe[0][2],Pe[0][j]];if(120486<L&&L<120782)return["",""];throw new p("Unsupported character: "+u)}},ct=[[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]],Ft=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Xt=function(u,h){return h.size<2?u:ct[u-1][h.size-1]},qt=function(){function H(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||H.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=Ft[this.size-1],this.maxSize=h.maxSize,this.minRuleThickness=h.minRuleThickness,this._fontMetrics=void 0}var u=H.prototype;return u.extend=function(f){var v={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var L in f)f.hasOwnProperty(L)&&(v[L]=f[L]);return new H(v)},u.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:Xt(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:Ft[f-1]})},u.havingBaseStyle=function(f){f=f||this.style.text();var v=Xt(H.BASESIZE,f);return this.size===v&&this.textSize===H.BASESIZE&&this.style===f?this:this.extend({style:f,size:v})},u.havingBaseSizing=function(){var f;switch(this.style.id){case 4:case 5:f=3;break;case 6:case 7:f=1;break;default:f=6}return this.extend({style:this.style.text(),size:f})},u.withColor=function(f){return this.extend({color:f})},u.withPhantom=function(){return this.extend({phantom:!0})},u.withFont=function(f){return this.extend({font:f})},u.withTextFontFamily=function(f){return this.extend({fontFamily:f,font:""})},u.withTextFontWeight=function(f){return this.extend({fontWeight:f,font:""})},u.withTextFontShape=function(f){return this.extend({fontShape:f,font:""})},u.sizingClasses=function(f){return f.size!==this.size?["sizing","reset-size"+f.size,"size"+this.size]:[]},u.baseSizingClasses=function(){return this.size!==H.BASESIZE?["sizing","reset-size"+this.size,"size"+H.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=He(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},H}();qt.BASESIZE=6;var Rt=qt,Zt={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},mn={ex:!0,em:!0,mu:!0},Jt=function(u){return typeof u!="string"&&(u=u.unit),u in Zt||u in mn||u==="ex"},je=function(u,h){var f;if(u.unit in Zt)f=Zt[u.unit]/h.fontMetrics().ptPerEm/h.sizeMultiplier;else if(u.unit==="mu")f=h.fontMetrics().cssEmPerMu;else{var v;if(h.style.isTight()?v=h.havingStyle(h.style.text()):v=h,u.unit==="ex")f=v.fontMetrics().xHeight;else if(u.unit==="em")f=v.fontMetrics().quad;else throw new p("Invalid unit: '"+u.unit+"'");v!==h&&(f*=v.sizeMultiplier/h.sizeMultiplier)}return Math.min(u.number*f,h.maxSize)},nt=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Ct=function(u,h,f){return Pt[f][u]&&Pt[f][u].replace&&(u=Pt[f][u].replace),{value:u,metrics:ht(u,h,f)}},mt=function(u,h,f,v,L){var j=Ct(u,h,f),be=j.metrics;u=j.value;var Ie;if(be){var We=be.italic;(f==="text"||v&&v.font==="mathit")&&(We=0),Ie=new fe(u,be.height,be.depth,We,be.skew,be.width,L)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+h+"' and mode '"+f+"'")),Ie=new fe(u,0,0,0,0,0,L);if(v){Ie.maxFontSize=v.sizeMultiplier,v.style.isTight()&&Ie.classes.push("mtight");var vt=v.getColor();vt&&(Ie.style.color=vt)}return Ie},xt=function(u,h,f,v){return v===void 0&&(v=[]),f.font==="boldsymbol"&&Ct(u,"Main-Bold",h).metrics?mt(u,"Main-Bold",h,f,v.concat(["mathbf"])):u==="\\"||Pt[h][u].font==="main"?mt(u,"Main-Regular",h,f,v):mt(u,"AMS-Regular",h,f,v.concat(["amsrm"]))},It=function(u,h,f,v){return/[0-9]/.test(u.charAt(0))||U.contains(nt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Nt=function(u,h,f,v){return U.contains(nt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},zt=function(u,h,f,v){return Ct(u,"Math-BoldItalic",h).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},nn=function(u,h,f){var v=u.mode,L=u.text,j=["mord"],be=v==="math"||v==="text"&&h.font,Ie=be?h.font:h.fontFamily;if(L.charCodeAt(0)===55349){var We=Ze(L,v),vt=We[0],Ot=We[1];return mt(L,vt,v,h,j.concat(Ot))}else if(Ie){var Qt,pn;if(Ie==="boldsymbol"||Ie==="mathnormal"){var Sn=Ie==="boldsymbol"?zt(L,v,h,j):Nt(L,v,h,j);Qt=Sn.fontName,pn=[Sn.fontClass]}else U.contains(nt,L)?(Qt="Main-Italic",pn=["mathit"]):be?(Qt=Dn[Ie].fontName,pn=[Ie]):(Qt=In(Ie,h.fontWeight,h.fontShape),pn=[Ie,h.fontWeight,h.fontShape]);if(Ct(L,Qt,v).metrics)return mt(L,Qt,v,h,j.concat(pn));if(Wt.hasOwnProperty(L)&&Qt.substr(0,10)==="Typewriter"){for(var Un=[],ar=0;ar<L.length;ar++)Un.push(mt(L[ar],Qt,v,h,j.concat(pn)));return _n(Un)}}if(f==="mathord"){var cr=It(L,v,h,j);return mt(L,cr.fontName,v,h,j.concat([cr.fontClass]))}else if(f==="textord"){var Ar=Pt[v][L]&&Pt[v][L].font;if(Ar==="ams"){var Or=In("amsrm",h.fontWeight,h.fontShape);return mt(L,Or,v,h,j.concat("amsrm",h.fontWeight,h.fontShape))}else if(Ar==="main"||!Ar){var li=In("textrm",h.fontWeight,h.fontShape);return mt(L,li,v,h,j.concat(h.fontWeight,h.fontShape))}else{var ri=In(Ar,h.fontWeight,h.fontShape);return mt(L,ri,v,h,j.concat(ri,h.fontWeight,h.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},cn=function(u,h){if(Ke(u.classes)!==Ke(h.classes)||u.skew!==h.skew||u.maxFontSize!==h.maxFontSize)return!1;for(var f in u.style)if(u.style.hasOwnProperty(f)&&u.style[f]!==h.style[f])return!1;for(var v in h.style)if(h.style.hasOwnProperty(v)&&u.style[v]!==h.style[v])return!1;return!0},zn=function(u){for(var h=0;h<u.length-1;h++){var f=u[h],v=u[h+1];f instanceof fe&&v instanceof fe&&cn(f,v)&&(f.text+=v.text,f.height=Math.max(f.height,v.height),f.depth=Math.max(f.depth,v.depth),f.italic=v.italic,u.splice(h+1,1),h--)}return u},gn=function(u){for(var h=0,f=0,v=0,L=0;L<u.children.length;L++){var j=u.children[L];j.height>h&&(h=j.height),j.depth>f&&(f=j.depth),j.maxFontSize>v&&(v=j.maxFontSize)}u.height=h,u.depth=f,u.maxFontSize=v},dn=function(u,h,f,v){var L=new Ne(u,h,f,v);return gn(L),L},wn=function(u,h,f,v){return new Ne(u,h,f,v)},En=function(u,h,f){var v=dn([u],[],h);return v.height=Math.max(f||h.fontMetrics().defaultRuleThickness,h.minRuleThickness),v.style.borderBottomWidth=v.height+"em",v.maxFontSize=1,v},Ln=function(u,h,f,v){var L=new Ce(u,h,f,v);return gn(L),L},_n=function(u){var h=new Xe(u);return gn(h),h},Tn=function(u,h){return u instanceof Xe?dn([],[u],h):u},kn=function(u){if(u.positionType==="individualShift"){for(var h=u.children,f=[h[0]],v=-h[0].shift-h[0].elem.depth,L=v,j=1;j<h.length;j++){var be=-h[j].shift-L-h[j].elem.depth,Ie=be-(h[j-1].elem.height+h[j-1].elem.depth);L=L+be,f.push({type:"kern",size:Ie}),f.push(h[j])}return{children:f,depth:v}}var We;if(u.positionType==="top"){for(var vt=u.positionData,Ot=0;Ot<u.children.length;Ot++){var Qt=u.children[Ot];vt-=Qt.type==="kern"?Qt.size:Qt.elem.height+Qt.elem.depth}We=vt}else if(u.positionType==="bottom")We=-u.positionData;else{var pn=u.children[0];if(pn.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")We=-pn.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")We=-pn.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:We}},Nn=function(u,h){for(var f=kn(u),v=f.children,L=f.depth,j=0,be=0;be<v.length;be++){var Ie=v[be];if(Ie.type==="elem"){var We=Ie.elem;j=Math.max(j,We.maxFontSize,We.height)}}j+=2;var vt=dn(["pstrut"],[]);vt.style.height=j+"em";for(var Ot=[],Qt=L,pn=L,Sn=L,Un=0;Un<v.length;Un++){var ar=v[Un];if(ar.type==="kern")Sn+=ar.size;else{var cr=ar.elem,Ar=ar.wrapperClasses||[],Or=ar.wrapperStyle||{},li=dn(Ar,[vt,cr],void 0,Or);li.style.top=-j-Sn-cr.depth+"em",ar.marginLeft&&(li.style.marginLeft=ar.marginLeft),ar.marginRight&&(li.style.marginRight=ar.marginRight),Ot.push(li),Sn+=cr.height+cr.depth}Qt=Math.min(Qt,Sn),pn=Math.max(pn,Sn)}var ri=dn(["vlist"],Ot);ri.style.height=pn+"em";var ui;if(Qt<0){var ci=dn([],[]),ai=dn(["vlist"],[ci]);ai.style.height=-Qt+"em";var Ni=dn(["vlist-s"],[new fe("\u200B")]);ui=[dn(["vlist-r"],[ri,Ni]),dn(["vlist-r"],[ai])]}else ui=[dn(["vlist-r"],[ri])];var mi=dn(["vlist-t"],ui);return ui.length===2&&mi.classes.push("vlist-t2"),mi.height=pn,mi.depth=-Qt,mi},On=function(u,h){var f=dn(["mspace"],[],h),v=je(u,h);return f.style.marginRight=v+"em",f},In=function(u,h,f){var v="";switch(u){case"amsrm":v="AMS";break;case"textrm":v="Main";break;case"textsf":v="SansSerif";break;case"texttt":v="Typewriter";break;default:v=u}var L;return h==="textbf"&&f==="textit"?L="BoldItalic":h==="textbf"?L="Bold":h==="textit"?L="Italic":L="Regular",v+"-"+L},Dn={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"}},yn={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=yn[u],v=f[0],L=f[1],j=f[2],be=new Re(v),Ie=new _e([be],{width:L+"em",height:j+"em",style:"width:"+L+"em",viewBox:"0 0 "+1e3*L+" "+1e3*j,preserveAspectRatio:"xMinYMin"}),We=wn(["overlay"],[Ie],h);return We.height=j,We.style.height=j+"em",We.style.width=L+"em",We},_t={fontMap:Dn,makeSymbol:mt,mathsym:xt,makeSpan:dn,makeSvgSpan:wn,makeLineSpan:En,makeAnchor:Ln,makeFragment:_n,wrapFragment:Tn,makeVList:Nn,makeOrd:nn,makeGlue:On,staticSvg:fr,svgData:yn,tryCombineChars:zn};function Pn(H,u){var h=jn(H,u);if(!h)throw new Error("Expected node of type "+u+", but got "+(H?"node of type "+H.type:String(H)));return h}function jn(H,u){return H&&H.type===u?H:null}function xr(H,u){var h=pr(H,u);if(!h)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(H?H.type==="atom"?"atom of family "+H.family:"node of type "+H.type:String(H)));return h}function pr(H,u){return H&&H.type==="atom"&&H.family===u?H:null}function Rr(H){var u=Er(H);if(!u)throw new Error("Expected node of symbol group type, but got "+(H?"node of type "+H.type:String(H)));return u}function Er(H){return H&&(H.type==="atom"||pt.hasOwnProperty(H.type))?H:null}var vn={number:3,unit:"mu"},sn={number:4,unit:"mu"},Mt={number:5,unit:"mu"},jt={mord:{mop:vn,mbin:sn,mrel:Mt,minner:vn},mop:{mord:vn,mop:vn,mrel:Mt,minner:vn},mbin:{mord:sn,mop:sn,mopen:sn,minner:sn},mrel:{mord:Mt,mop:Mt,mopen:Mt,minner:Mt},mopen:{},mclose:{mop:vn,mbin:sn,mrel:Mt,minner:vn},mpunct:{mord:vn,mop:vn,mrel:Mt,mopen:vn,mclose:vn,mpunct:vn,minner:vn},minner:{mord:vn,mop:vn,mbin:sn,mrel:Mt,mopen:vn,mpunct:vn,minner:vn}},un={mord:{mop:vn},mop:{mord:vn,mop:vn},mbin:{},mrel:{},mopen:{},mclose:{mop:vn},mpunct:{},minner:{mop:vn}},bn={},Mn={},Jn={};function tn(H){for(var u=H.type,h=H.names,f=H.props,v=H.handler,L=H.htmlBuilder,j=H.mathmlBuilder,be={type:u,numArgs:f.numArgs,argTypes:f.argTypes,greediness:f.greediness===void 0?1:f.greediness,allowedInText:!!f.allowedInText,allowedInMath:f.allowedInMath===void 0?!0:f.allowedInMath,numOptionalArgs:f.numOptionalArgs||0,infix:!!f.infix,handler:v},Ie=0;Ie<h.length;++Ie)bn[h[Ie]]=be;u&&(L&&(Mn[u]=L),j&&(Jn[u]=j))}function Hn(H){var u=H.type,h=H.htmlBuilder,f=H.mathmlBuilder;tn({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:h,mathmlBuilder:f})}var er=function(u){var h=jn(u,"ordgroup");return h?h.body:[u]},Tr=_t.makeSpan,$r=["leftmost","mbin","mopen","mrel","mop","mpunct"],Wr=["rightmost","mrel","mclose","mpunct"],br={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT},Kr={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Cr=function(u,h,f,v){v===void 0&&(v=[null,null]);for(var L=[],j=0;j<u.length;j++){var be=ur(u[j],h);if(be instanceof Xe){var Ie=be.children;L.push.apply(L,Ie)}else L.push(be)}if(!f)return L;var We=h;if(u.length===1){var vt=jn(u[0],"sizing")||jn(u[0],"styling");vt&&(vt.type==="sizing"?We=h.havingSize(vt.size):vt.type==="styling"&&(We=h.havingStyle(br[vt.style])))}var Ot=Tr([v[0]||"leftmost"],[],h),Qt=Tr([v[1]||"rightmost"],[],h);return Hr(L,function(pn,Sn){var Un=Sn.classes[0],ar=pn.classes[0];Un==="mbin"&&U.contains(Wr,ar)?Sn.classes[0]="mord":ar==="mbin"&&U.contains($r,Un)&&(pn.classes[0]="mord")},{node:Ot},Qt),Hr(L,function(pn,Sn){var Un=Mr(Sn),ar=Mr(pn),cr=Un&&ar?pn.hasClass("mtight")?un[Un][ar]:jt[Un][ar]:null;if(cr)return _t.makeGlue(cr,We)},{node:Ot},Qt),L},Hr=function H(u,h,f,v){v&&u.push(v);for(var L=0;L<u.length;L++){var j=u[L],be=Ir(j);if(be){H(be.children,h,f);continue}if(j.classes[0]!=="mspace"){var Ie=h(j,f.node);Ie&&(f.insertAfter?f.insertAfter(Ie):(u.unshift(Ie),L++)),f.node=j,f.insertAfter=function(We){return function(vt){u.splice(We+1,0,vt),L++}}(L)}}v&&u.pop()},Ir=function(u){return u instanceof Xe||u instanceof Ce?u:null},Pr=function H(u,h){var f=Ir(u);if(f){var v=f.children;if(v.length){if(h==="right")return H(v[v.length-1],"right");if(h==="left")return H(v[0],"left")}}return u},Mr=function(u,h){return u?(h&&(u=Pr(u,h)),Kr[u.classes[0]]||null):null},Yr=function(u,h){var f=["nulldelimiter"].concat(u.baseSizingClasses());return Tr(h.concat(f))},ur=function(u,h,f){if(!u)return Tr();if(Mn[u.type]){var v=Mn[u.type](u,h);if(f&&h.size!==f.size){v=Tr(h.sizingClasses(f),[v],h);var L=h.sizeMultiplier/f.sizeMultiplier;v.height*=L,v.depth*=L}return v}else throw new p("Got group of unknown type: '"+u.type+"'")};function ei(H,u){var h=Tr(["base"],H,u),f=Tr(["strut"]);return f.style.height=h.height+h.depth+"em",f.style.verticalAlign=-h.depth+"em",h.children.unshift(f),h}function Xr(H,u){var h=null;H.length===1&&H[0].type==="tag"&&(h=H[0].tag,H=H[0].body);for(var f=Cr(H,u,!0),v=[],L=[],j=0;j<f.length;j++)if(L.push(f[j]),f[j].hasClass("mbin")||f[j].hasClass("mrel")||f[j].hasClass("allowbreak")){for(var be=!1;j<f.length-1&&f[j+1].hasClass("mspace")&&!f[j+1].hasClass("newline");)j++,L.push(f[j]),f[j].hasClass("nobreak")&&(be=!0);be||(v.push(ei(L,u)),L=[])}else f[j].hasClass("newline")&&(L.pop(),L.length>0&&(v.push(ei(L,u)),L=[]),v.push(f[j]));L.length>0&&v.push(ei(L,u));var Ie;h&&(Ie=ei(Cr(h,u,!0)),Ie.classes=["tag"],v.push(Ie));var We=Tr(["katex-html"],v);if(We.setAttribute("aria-hidden","true"),Ie){var vt=Ie.children[0];vt.style.height=We.height+We.depth+"em",vt.style.verticalAlign=-We.depth+"em"}return We}function Qr(H){return new Xe(H)}var Vn=function(){function H(h,f){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=h,this.attributes={},this.children=f||[]}var u=H.prototype;return u.setAttribute=function(f,v){this.attributes[f]=v},u.getAttribute=function(f){return this.attributes[f]},u.toNode=function(){var f=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&f.setAttribute(v,this.attributes[v]);for(var L=0;L<this.children.length;L++)f.appendChild(this.children[L].toNode());return f},u.toMarkup=function(){var f="<"+this.type;for(var v in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,v)&&(f+=" "+v+'="',f+=U.escape(this.attributes[v]),f+='"');f+=">";for(var L=0;L<this.children.length;L++)f+=this.children[L].toMarkup();return f+="</"+this.type+">",f},u.toText=function(){return this.children.map(function(f){return f.toText()}).join("")},H}(),xn=function(){function H(h){this.text=void 0,this.text=h}var u=H.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return U.escape(this.toText())},u.toText=function(){return this.text},H}(),Fr=function(){function H(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=H.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:" "},H}(),rn={MathNode:Vn,TextNode:xn,SpaceNode:Fr,newDocumentFragment:Qr},qr=function(u,h,f){return Pt[h][u]&&Pt[h][u].replace&&u.charCodeAt(0)!==55349&&!(Wt.hasOwnProperty(u)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(u=Pt[h][u].replace),new rn.TextNode(u)},Ii=function(u){return u.length===1?u[0]:new rn.MathNode("mrow",u)},Si=function(u,h){if(h.fontFamily==="texttt")return"monospace";if(h.fontFamily==="textsf")return h.fontShape==="textit"&&h.fontWeight==="textbf"?"sans-serif-bold-italic":h.fontShape==="textit"?"sans-serif-italic":h.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(h.fontShape==="textit"&&h.fontWeight==="textbf")return"bold-italic";if(h.fontShape==="textit")return"italic";if(h.fontWeight==="textbf")return"bold";var f=h.font;if(!f||f==="mathnormal")return null;var v=u.mode;if(f==="mathit")return"italic";if(f==="boldsymbol")return"bold-italic";if(f==="mathbf")return"bold";if(f==="mathbb")return"double-struck";if(f==="mathfrak")return"fraktur";if(f==="mathscr"||f==="mathcal")return"script";if(f==="mathsf")return"sans-serif";if(f==="mathtt")return"monospace";var L=u.text;if(U.contains(["\\imath","\\jmath"],L))return null;Pt[v][L]&&Pt[v][L].replace&&(L=Pt[v][L].replace);var j=_t.fontMap[f].fontName;return ht(L,j,v)?_t.fontMap[f].variant:null},di=function(u,h,f){if(u.length===1){var v=or(u[0],h);return f&&v instanceof Vn&&v.type==="mo"&&(v.setAttribute("lspace","0em"),v.setAttribute("rspace","0em")),[v]}for(var L=[],j,be=0;be<u.length;be++){var Ie=or(u[be],h);if(Ie instanceof Vn&&j instanceof Vn){if(Ie.type==="mtext"&&j.type==="mtext"&&Ie.getAttribute("mathvariant")===j.getAttribute("mathvariant")){var We;(We=j.children).push.apply(We,Ie.children);continue}else if(Ie.type==="mn"&&j.type==="mn"){var vt;(vt=j.children).push.apply(vt,Ie.children);continue}else if(Ie.type==="mi"&&Ie.children.length===1&&j.type==="mn"){var Ot=Ie.children[0];if(Ot instanceof xn&&Ot.text==="."){var Qt;(Qt=j.children).push.apply(Qt,Ie.children);continue}}else if(j.type==="mi"&&j.children.length===1){var pn=j.children[0];if(pn instanceof xn&&pn.text==="\u0338"&&(Ie.type==="mo"||Ie.type==="mi"||Ie.type==="mn")){var Sn=Ie.children[0];Sn instanceof xn&&Sn.text.length>0&&(Sn.text=Sn.text.slice(0,1)+"\u0338"+Sn.text.slice(1),L.pop())}}}L.push(Ie),j=Ie}return L},pi=function(u,h,f){return Ii(di(u,h,f))},or=function(u,h){if(!u)return new rn.MathNode("mrow");if(Jn[u.type]){var f=Jn[u.type](u,h);return f}else throw new p("Got group of unknown type: '"+u.type+"'")};function ni(H,u,h,f){var v=di(H,h),L;v.length===1&&v[0]instanceof Vn&&U.contains(["mrow","mtable"],v[0].type)?L=v[0]:L=new rn.MathNode("mrow",v);var j=new rn.MathNode("annotation",[new rn.TextNode(u)]);j.setAttribute("encoding","application/x-tex");var be=new rn.MathNode("semantics",[L,j]),Ie=new rn.MathNode("math",[be]);Ie.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var We=f?"katex":"katex-mathml";return _t.makeSpan([We],[Ie])}var vi=function(u){return new Rt({style:u.displayMode?S.DISPLAY:S.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},wi=function(u,h){if(h.displayMode){var f=["katex-display"];h.leqno&&f.push("leqno"),h.fleqn&&f.push("fleqn"),u=_t.makeSpan(f,[u])}return u},Lr=function(u,h,f){var v=vi(f),L;if(f.output==="mathml")return ni(u,h,v,!0);if(f.output==="html"){var j=Xr(u,v);L=_t.makeSpan(["katex"],[j])}else{var be=ni(u,h,v,!1),Ie=Xr(u,v);L=_t.makeSpan(["katex"],[be,Ie])}return wi(L,f)},Jr=function(u,h,f){var v=vi(f),L=Xr(u,v),j=_t.makeSpan(["katex"],[L]);return wi(j,f)},oi=Lr,Yn={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},gr=function(u){var h=new rn.MathNode("mo",[new rn.TextNode(Yn[u.substr(1)])]);return h.setAttribute("stretchy","true"),h},tr={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]},mr=function(u){return u.type==="ordgroup"?u.body.length:1},kr=function(u,h){function f(){var Ie=4e5,We=u.label.substr(1);if(U.contains(["widehat","widecheck","widetilde","utilde"],We)){var vt=u,Ot=mr(vt.base),Qt,pn,Sn;if(Ot>5)We==="widehat"||We==="widecheck"?(Qt=420,Ie=2364,Sn=.42,pn=We+"4"):(Qt=312,Ie=2340,Sn=.34,pn="tilde4");else{var Un=[1,1,2,2,3,3][Ot];We==="widehat"||We==="widecheck"?(Ie=[0,1062,2364,2364,2364][Un],Qt=[0,239,300,360,420][Un],Sn=[0,.24,.3,.3,.36,.42][Un],pn=We+Un):(Ie=[0,600,1033,2339,2340][Un],Qt=[0,260,286,306,312][Un],Sn=[0,.26,.286,.3,.306,.34][Un],pn="tilde"+Un)}var ar=new Re(pn),cr=new _e([ar],{width:"100%",height:Sn+"em",viewBox:"0 0 "+Ie+" "+Qt,preserveAspectRatio:"none"});return{span:_t.makeSvgSpan([],[cr],h),minWidth:0,height:Sn}}else{var Ar=[],Or=tr[We],li=Or[0],ri=Or[1],ui=Or[2],ci=ui/1e3,ai=li.length,Ni,mi;if(ai===1){var wt=Or[3];Ni=["hide-tail"],mi=[wt]}else if(ai===2)Ni=["halfarrow-left","halfarrow-right"],mi=["xMinYMin","xMaxYMin"];else if(ai===3)Ni=["brace-left","brace-center","brace-right"],mi=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
|
`+ai+" children.");for(var Vi=0;Vi<ai;Vi++){var as=new Re(li[Vi]),es=new _e([as],{width:"400em",height:ci+"em",viewBox:"0 0 "+Ie+" "+ui,preserveAspectRatio:mi[Vi]+" slice"}),bi=_t.makeSvgSpan([Ni[Vi]],[es],h);if(ai===1)return{span:bi,minWidth:ri,height:ci};bi.style.height=ci+"em",Ar.push(bi)}return{span:_t.makeSpan(["stretchy"],Ar,h),minWidth:ri,height:ci}}}var v=f(),L=v.span,j=v.minWidth,be=v.height;return L.height=be,L.style.height=be+"em",j>0&&(L.style.minWidth=j+"em"),L},zr=function(u,h,f,v){var L,j=u.height+u.depth+2*f;if(/fbox|color/.test(h)){if(L=_t.makeSpan(["stretchy",h],[],v),h==="fbox"){var be=v.color&&v.getColor();be&&(L.style.borderColor=be)}}else{var Ie=[];/^[bx]cancel$/.test(h)&&Ie.push(new $e({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(h)&&Ie.push(new $e({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var We=new _e(Ie,{width:"100%",height:j+"em"});L=_t.makeSvgSpan([],[We],v)}return L.height=j,L.style.height=j+"em",L},hi={encloseSpan:zr,mathMLnode:gr,svgSpan:kr},Bn=function(u,h){var f,v,L=jn(u,"supsub"),j;L?(v=Pn(L.base,"accent"),f=v.base,L.base=f,j=it(ur(L,h)),L.base=v):(v=Pn(u,"accent"),f=v.base);var be=ur(f,h.havingCrampedStyle()),Ie=v.isShifty&&U.isCharacterBox(f),We=0;if(Ie){var vt=U.getBaseElem(f),Ot=ur(vt,h.havingCrampedStyle());We=rt(Ot).skew}var Qt=Math.min(be.height,h.fontMetrics().xHeight),pn;if(v.isStretchy)pn=hi.svgSpan(v,h),pn=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:be},{type:"elem",elem:pn,wrapperClasses:["svg-align"],wrapperStyle:We>0?{width:"calc(100% - "+2*We+"em)",marginLeft:2*We+"em"}:void 0}]},h);else{var Sn,Un;v.label==="\\vec"?(Sn=_t.staticSvg("vec",h),Un=_t.svgData.vec[1]):(Sn=_t.makeOrd({mode:v.mode,text:v.label},h,"textord"),Sn=rt(Sn),Sn.italic=0,Un=Sn.width),pn=_t.makeSpan(["accent-body"],[Sn]);var ar=v.label==="\\textcircled";ar&&(pn.classes.push("accent-full"),Qt=be.height);var cr=We;ar||(cr-=Un/2),pn.style.left=cr+"em",v.label==="\\textcircled"&&(pn.style.top=".2em"),pn=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:be},{type:"kern",size:-Qt},{type:"elem",elem:pn}]},h)}var Ar=_t.makeSpan(["mord","accent"],[pn],h);return j?(j.children[0]=Ar,j.height=Math.max(Ar.height,j.height),j.classes[0]="mord",j):Ar},nr=function(u,h){var f=u.isStretchy?hi.mathMLnode(u.label):new rn.MathNode("mo",[qr(u.label,u.mode)]),v=new rn.MathNode("mover",[or(u.base,h),f]);return v.setAttribute("accent","true"),v},Sr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(H){return"\\"+H}).join("|"));tn({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(u,h){var f=h[0],v=!Sr.test(u.funcName),L=!v||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:v,isShifty:L,base:f}},htmlBuilder:Bn,mathmlBuilder:nr}),tn({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:Bn,mathmlBuilder:nr}),tn({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0];return{type:"accentUnder",mode:f.mode,label:v,base:L}},htmlBuilder:function(u,h){var f=ur(u.base,h),v=hi.svgSpan(u,h),L=u.label==="\\utilde"?.12:0,j=_t.makeVList({positionType:"bottom",positionData:v.height+L,children:[{type:"elem",elem:v,wrapperClasses:["svg-align"]},{type:"kern",size:L},{type:"elem",elem:f}]},h);return _t.makeSpan(["mord","accentunder"],[j],h)},mathmlBuilder:function(u,h){var f=hi.mathMLnode(u.label),v=new rn.MathNode("munder",[or(u.base,h),f]);return v.setAttribute("accentunder","true"),v}});var vr=function(u){var h=new rn.MathNode("mpadded",u?[u]:[]);return h.setAttribute("width","+0.6em"),h.setAttribute("lspace","0.3em"),h};tn({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,h,f){var v=u.parser,L=u.funcName;return{type:"xArrow",mode:v.mode,label:L,body:h[0],below:f[0]}},htmlBuilder:function(u,h){var f=h.style,v=h.havingStyle(f.sup()),L=_t.wrapFragment(ur(u.body,v,h),h);L.classes.push("x-arrow-pad");var j;u.below&&(v=h.havingStyle(f.sub()),j=_t.wrapFragment(ur(u.below,v,h),h),j.classes.push("x-arrow-pad"));var be=hi.svgSpan(u,h),Ie=-h.fontMetrics().axisHeight+.5*be.height,We=-h.fontMetrics().axisHeight-.5*be.height-.111;(L.depth>.25||u.label==="\\xleftequilibrium")&&(We-=L.depth);var vt;if(j){var Ot=-h.fontMetrics().axisHeight+j.height+.5*be.height+.111;vt=_t.makeVList({positionType:"individualShift",children:[{type:"elem",elem:L,shift:We},{type:"elem",elem:be,shift:Ie},{type:"elem",elem:j,shift:Ot}]},h)}else vt=_t.makeVList({positionType:"individualShift",children:[{type:"elem",elem:L,shift:We},{type:"elem",elem:be,shift:Ie}]},h);return vt.children[0].children[0].children[1].classes.push("svg-align"),_t.makeSpan(["mrel","x-arrow"],[vt],h)},mathmlBuilder:function(u,h){var f=hi.mathMLnode(u.label),v;if(u.body){var L=vr(or(u.body,h));if(u.below){var j=vr(or(u.below,h));v=new rn.MathNode("munderover",[f,j,L])}else v=new rn.MathNode("mover",[f,L])}else if(u.below){var be=vr(or(u.below,h));v=new rn.MathNode("munder",[f,be])}else v=vr(),v=new rn.MathNode("mover",[f,v]);return v}}),tn({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){for(var f=u.parser,v=Pn(h[0],"ordgroup"),L=v.body,j="",be=0;be<L.length;be++){var Ie=Pn(L[be],"textord");j+=Ie.text}var We=parseInt(j);if(isNaN(We))throw new p("\\@char has non-numeric argument "+j);return{type:"textord",mode:f.mode,text:String.fromCharCode(We)}}});var wr=function(u,h){var f=Cr(u.body,h.withColor(u.color),!1);return _t.makeFragment(f)},Di=function(u,h){var f=di(u.body,h.withColor(u.color)),v=new rn.MathNode("mstyle",f);return v.setAttribute("mathcolor",u.color),v};tn({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,h){var f=u.parser,v=Pn(h[0],"color-token").color,L=h[1];return{type:"color",mode:f.mode,color:v,body:er(L)}},htmlBuilder:wr,mathmlBuilder:Di}),tn({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,h){var f=u.parser,v=u.breakOnTokenText,L=Pn(h[0],"color-token").color;f.gullet.macros.set("\\current@color",L);var j=f.parseExpression(!0,v);return{type:"color",mode:f.mode,color:L,body:j}},htmlBuilder:wr,mathmlBuilder:Di}),tn({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h,f){var v=u.parser,L=u.funcName,j=f[0],be=L==="\\cr",Ie=!1;return be||(v.settings.displayMode&&v.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Ie=!1:Ie=!0),{type:"cr",mode:v.mode,newLine:Ie,newRow:be,size:j&&Pn(j,"size").value}},htmlBuilder:function(u,h){if(u.newRow)throw new p("\\cr valid only within a tabular/array environment");var f=_t.makeSpan(["mspace"],[],h);return u.newLine&&(f.classes.push("newline"),u.size&&(f.style.marginTop=je(u.size,h)+"em")),f},mathmlBuilder:function(u,h){var f=new rn.MathNode("mspace");return u.newLine&&(f.setAttribute("linebreak","newline"),u.size&&f.setAttribute("height",je(u.size,h)+"em")),f}});var gi=function(u,h,f){var v=Pt.math[u]&&Pt.math[u].replace,L=ht(v||u,h,f);if(!L)throw new Error("Unsupported symbol "+u+" and font size "+h+".");return L},Ti=function(u,h,f,v){var L=f.havingBaseStyle(h),j=_t.makeSpan(v.concat(L.sizingClasses(f)),[u],f),be=L.sizeMultiplier/f.sizeMultiplier;return j.height*=be,j.depth*=be,j.maxFontSize=L.sizeMultiplier,j},yi=function(u,h,f){var v=h.havingBaseStyle(f),L=(1-h.sizeMultiplier/v.sizeMultiplier)*h.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=L+"em",u.height-=L,u.depth+=L},gs=function(u,h,f,v,L,j){var be=_t.makeSymbol(u,"Main-Regular",L,v),Ie=Ti(be,h,v,j);return f&&yi(Ie,v,h),Ie},Xs=function(u,h,f,v){return _t.makeSymbol(u,"Size"+h+"-Regular",f,v)},Ps=function(u,h,f,v,L,j){var be=Xs(u,h,L,v),Ie=Ti(_t.makeSpan(["delimsizing","size"+h],[be],v),S.TEXT,v,j);return f&&yi(Ie,v,S.TEXT),Ie},Ci=function(u,h,f){var v;h==="Size1-Regular"?v="delim-size1":v="delim-size4";var L=_t.makeSpan(["delimsizinginner",v],[_t.makeSpan([],[_t.makeSymbol(u,h,f)])]);return{type:"elem",elem:L}},$i={type:"kern",size:-.005},Pi=function(u,h,f,v,L,j){var be,Ie,We,vt;be=We=vt=u,Ie=null;var Ot="Size1-Regular";u==="\\uparrow"?We=vt="\u23D0":u==="\\Uparrow"?We=vt="\u2016":u==="\\downarrow"?be=We="\u23D0":u==="\\Downarrow"?be=We="\u2016":u==="\\updownarrow"?(be="\\uparrow",We="\u23D0",vt="\\downarrow"):u==="\\Updownarrow"?(be="\\Uparrow",We="\u2016",vt="\\Downarrow"):u==="["||u==="\\lbrack"?(be="\u23A1",We="\u23A2",vt="\u23A3",Ot="Size4-Regular"):u==="]"||u==="\\rbrack"?(be="\u23A4",We="\u23A5",vt="\u23A6",Ot="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(We=be="\u23A2",vt="\u23A3",Ot="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(be="\u23A1",We=vt="\u23A2",Ot="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(We=be="\u23A5",vt="\u23A6",Ot="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(be="\u23A4",We=vt="\u23A5",Ot="Size4-Regular"):u==="("||u==="\\lparen"?(be="\u239B",We="\u239C",vt="\u239D",Ot="Size4-Regular"):u===")"||u==="\\rparen"?(be="\u239E",We="\u239F",vt="\u23A0",Ot="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(be="\u23A7",Ie="\u23A8",vt="\u23A9",We="\u23AA",Ot="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(be="\u23AB",Ie="\u23AC",vt="\u23AD",We="\u23AA",Ot="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(be="\u23A7",vt="\u23A9",We="\u23AA",Ot="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(be="\u23AB",vt="\u23AD",We="\u23AA",Ot="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(be="\u23A7",vt="\u23AD",We="\u23AA",Ot="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(be="\u23AB",vt="\u23A9",We="\u23AA",Ot="Size4-Regular");var Qt=gi(be,Ot,L),pn=Qt.height+Qt.depth,Sn=gi(We,Ot,L),Un=Sn.height+Sn.depth,ar=gi(vt,Ot,L),cr=ar.height+ar.depth,Ar=0,Or=1;if(Ie!==null){var li=gi(Ie,Ot,L);Ar=li.height+li.depth,Or=2}var ri=pn+cr+Ar,ui=Math.max(0,Math.ceil((h-ri)/(Or*Un))),ci=ri+ui*Or*Un,ai=v.fontMetrics().axisHeight;f&&(ai*=v.sizeMultiplier);var Ni=ci/2-ai,mi=(ui+1)*.005-Un,wt=[];if(wt.push(Ci(vt,Ot,L)),Ie===null)for(var Vi=0;Vi<ui;Vi++)wt.push($i),wt.push(Ci(We,Ot,L));else{for(var as=0;as<ui;as++)wt.push($i),wt.push(Ci(We,Ot,L));wt.push({type:"kern",size:mi}),wt.push(Ci(We,Ot,L)),wt.push($i),wt.push(Ci(Ie,Ot,L));for(var es=0;es<ui;es++)wt.push($i),wt.push(Ci(We,Ot,L))}wt.push({type:"kern",size:mi}),wt.push(Ci(We,Ot,L)),wt.push($i),wt.push(Ci(be,Ot,L));var bi=v.havingBaseStyle(S.TEXT),xs=_t.makeVList({positionType:"bottom",positionData:Ni,children:wt},bi);return Ti(_t.makeSpan(["delimsizing","mult"],[xs],bi),S.TEXT,v,j)},Cs=80,rs=.08,Gi=function(u,h,f,v,L){var j=tt(u,v,f),be=new Re(u,j),Ie=new _e([be],{width:"400em",height:h+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return _t.makeSvgSpan(["hide-tail"],[Ie],L)},vs=function(u,h){var f=h.havingBaseSizing(),v=cs("\\surd",u*f.sizeMultiplier,As,f),L=f.sizeMultiplier,j=Math.max(0,h.minRuleThickness-h.fontMetrics().sqrtRuleThickness),be,Ie=0,We=0,vt=0,Ot;return v.type==="small"?(vt=1e3+1e3*j+Cs,u<1?L=1:u<1.4&&(L=.7),Ie=(1+j+rs)/L,We=(1+j)/L,be=Gi("sqrtMain",Ie,vt,j,h),be.style.minWidth="0.853em",Ot=.833/L):v.type==="large"?(vt=(1e3+Cs)*_s[v.size],We=(_s[v.size]+j)/L,Ie=(_s[v.size]+j+rs)/L,be=Gi("sqrtSize"+v.size,Ie,vt,j,h),be.style.minWidth="1.02em",Ot=1/L):(Ie=u+j+rs,We=u+j,vt=Math.floor(1e3*u+j)+Cs,be=Gi("sqrtTall",Ie,vt,j,h),be.style.minWidth="0.742em",Ot=1.056),be.height=We,be.style.height=Ie+"em",{span:be,advanceWidth:Ot,ruleWidth:(h.fontMetrics().sqrtRuleThickness+j)*L}},ys=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Ms=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],is=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],_s=[0,1.2,1.8,2.4,3],Mi=function(u,h,f,v,L){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),U.contains(ys,u)||U.contains(is,u))return Ps(u,h,!1,f,v,L);if(U.contains(Ms,u))return Pi(u,_s[h],!1,f,v,L);throw new p("Illegal delimiter: '"+u+"'")},ks=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Qs=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"stack"}],As=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Bs=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.")},cs=function(u,h,f,v){for(var L=Math.min(2,3-v.style.size),j=L;j<f.length&&f[j].type!=="stack";j++){var be=gi(u,Bs(f[j]),"math"),Ie=be.height+be.depth;if(f[j].type==="small"){var We=v.havingBaseStyle(f[j].style);Ie*=We.sizeMultiplier}if(Ie>h)return f[j]}return f[f.length-1]},Wi=function(u,h,f,v,L,j){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var be;U.contains(is,u)?be=ks:U.contains(ys,u)?be=As:be=Qs;var Ie=cs(u,h,be,v);return Ie.type==="small"?gs(u,Ie.style,f,v,L,j):Ie.type==="large"?Ps(u,Ie.size,f,v,L,j):Pi(u,h,f,v,L,j)},Br=function(u,h,f,v,L,j){var be=v.fontMetrics().axisHeight*v.sizeMultiplier,Ie=901,We=5/v.fontMetrics().ptPerEm,vt=Math.max(h-be,f+be),Ot=Math.max(vt/500*Ie,2*vt-We);return Wi(u,Ot,!0,v,L,j)},_r={sqrtImage:vs,sizedDelim:Mi,customSizedDelim:Wi,leftRightDelim:Br},_i={"\\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}},Ei=["(","\\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 jr(H,u){var h=Er(H);if(h&&U.contains(Ei,h.text))return h;throw new p("Invalid delimiter: '"+(h?h.text:JSON.stringify(H))+"' after '"+u.funcName+"'",H)}tn({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=jr(h[0],u);return{type:"delimsizing",mode:u.parser.mode,size:_i[u.funcName].size,mclass:_i[u.funcName].mclass,delim:f.text}},htmlBuilder:function(u,h){return u.delim==="."?_t.makeSpan([u.mclass]):_r.sizedDelim(u.delim,u.size,h,u.mode,[u.mclass])},mathmlBuilder:function(u){var h=[];u.delim!=="."&&h.push(qr(u.delim,u.mode));var f=new rn.MathNode("mo",h);return u.mclass==="mopen"||u.mclass==="mclose"?f.setAttribute("fence","true"):f.setAttribute("fence","false"),f}});function fi(H){if(!H.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}tn({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 p("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:jr(h[0],u).text,color:f}}}),tn({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,h){var f=jr(h[0],u),v=u.parser;++v.leftrightDepth;var L=v.parseExpression(!1);--v.leftrightDepth,v.expect("\\right",!1);var j=Pn(v.parseFunction(),"leftright-right");return{type:"leftright",mode:v.mode,body:L,left:f.text,right:j.delim,rightColor:j.color}},htmlBuilder:function(u,h){fi(u);for(var f=Cr(u.body,h,!0,["mopen","mclose"]),v=0,L=0,j=!1,be=0;be<f.length;be++)f[be].isMiddle?j=!0:(v=Math.max(f[be].height,v),L=Math.max(f[be].depth,L));v*=h.sizeMultiplier,L*=h.sizeMultiplier;var Ie;if(u.left==="."?Ie=Yr(h,["mopen"]):Ie=_r.leftRightDelim(u.left,v,L,h,u.mode,["mopen"]),f.unshift(Ie),j)for(var We=1;We<f.length;We++){var vt=f[We],Ot=vt.isMiddle;Ot&&(f[We]=_r.leftRightDelim(Ot.delim,v,L,Ot.options,u.mode,[]))}var Qt;if(u.right===".")Qt=Yr(h,["mclose"]);else{var pn=u.rightColor?h.withColor(u.rightColor):h;Qt=_r.leftRightDelim(u.right,v,L,pn,u.mode,["mclose"])}return f.push(Qt),_t.makeSpan(["minner"],f,h)},mathmlBuilder:function(u,h){fi(u);var f=di(u.body,h);if(u.left!=="."){var v=new rn.MathNode("mo",[qr(u.left,u.mode)]);v.setAttribute("fence","true"),f.unshift(v)}if(u.right!=="."){var L=new rn.MathNode("mo",[qr(u.right,u.mode)]);L.setAttribute("fence","true"),u.rightColor&&L.setAttribute("mathcolor",u.rightColor),f.push(L)}return Ii(f)}}),tn({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,h){var f=jr(h[0],u);if(!u.parser.leftrightDepth)throw new p("\\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=Yr(h,[]);else{f=_r.sizedDelim(u.delim,1,h,u.mode,[]);var v={delim:u.delim,options:h};f.isMiddle=v}return f},mathmlBuilder:function(u,h){var f=u.delim==="\\vert"||u.delim==="|"?qr("|","text"):qr(u.delim,u.mode),v=new rn.MathNode("mo",[f]);return v.setAttribute("fence","true"),v.setAttribute("lspace","0.05em"),v.setAttribute("rspace","0.05em"),v}});var Ri=function(u,h){var f=_t.wrapFragment(ur(u.body,h),h),v=u.label.substr(1),L=h.sizeMultiplier,j,be=0,Ie=U.isCharacterBox(u.body);if(v==="sout")j=_t.makeSpan(["stretchy","sout"]),j.height=h.fontMetrics().defaultRuleThickness/L,be=-.5*h.fontMetrics().xHeight;else{/cancel/.test(v)?Ie||f.classes.push("cancel-pad"):f.classes.push("boxpad");var We=0,vt=0;/box/.test(v)?(vt=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness),We=h.fontMetrics().fboxsep+(v==="colorbox"?0:vt)):We=Ie?.2:0,j=hi.encloseSpan(f,v,We,h),/fbox|boxed|fcolorbox/.test(v)&&(j.style.borderStyle="solid",j.style.borderWidth=vt+"em"),be=f.depth+We,u.backgroundColor&&(j.style.backgroundColor=u.backgroundColor,u.borderColor&&(j.style.borderColor=u.borderColor))}var Ot;return u.backgroundColor?Ot=_t.makeVList({positionType:"individualShift",children:[{type:"elem",elem:j,shift:be},{type:"elem",elem:f,shift:0}]},h):Ot=_t.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:j,shift:be,wrapperClasses:/cancel/.test(v)?["svg-align"]:[]}]},h),/cancel/.test(v)&&(Ot.height=f.height,Ot.depth=f.depth),/cancel/.test(v)&&!Ie?_t.makeSpan(["mord","cancel-lap"],[Ot],h):_t.makeSpan(["mord"],[Ot],h)},Li=function(u,h){var f=0,v=new rn.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[or(u.body,h)]);switch(u.label){case"\\cancel":v.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":v.setAttribute("notation","downdiagonalstrike");break;case"\\sout":v.setAttribute("notation","horizontalstrike");break;case"\\fbox":v.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=h.fontMetrics().fboxsep*h.fontMetrics().ptPerEm,v.setAttribute("width","+"+2*f+"pt"),v.setAttribute("height","+"+2*f+"pt"),v.setAttribute("lspace",f+"pt"),v.setAttribute("voffset",f+"pt"),u.label==="\\fcolorbox"){var L=Math.max(h.fontMetrics().fboxrule,h.minRuleThickness);v.setAttribute("style","border: "+L+"em solid "+String(u.borderColor))}break;case"\\xcancel":v.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&v.setAttribute("mathbackground",u.backgroundColor),v};tn({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,h,f){var v=u.parser,L=u.funcName,j=Pn(h[0],"color-token").color,be=h[1];return{type:"enclose",mode:v.mode,label:L,backgroundColor:j,body:be}},htmlBuilder:Ri,mathmlBuilder:Li}),tn({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,h,f){var v=u.parser,L=u.funcName,j=Pn(h[0],"color-token").color,be=Pn(h[1],"color-token").color,Ie=h[2];return{type:"enclose",mode:v.mode,label:L,backgroundColor:be,borderColor:j,body:Ie}},htmlBuilder:Ri,mathmlBuilder:Li}),tn({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]}}}),tn({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,h,f){var v=u.parser,L=u.funcName,j=h[0];return{type:"enclose",mode:v.mode,label:L,body:j}},htmlBuilder:Ri,mathmlBuilder:Li});var Yi={};function Ai(H){for(var u=H.type,h=H.names,f=H.props,v=H.handler,L=H.htmlBuilder,j=H.mathmlBuilder,be={type:u,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:v},Ie=0;Ie<h.length;++Ie)Yi[h[Ie]]=be;L&&(Mn[u]=L),j&&(Jn[u]=j)}function Xi(H){var u=[];H.consumeSpaces();for(var h=H.fetch().text;h==="\\hline"||h==="\\hdashline";)H.consume(),u.push(h==="\\hdashline"),H.consumeSpaces(),h=H.fetch().text;return u}function ji(H,u,h){var f=u.hskipBeforeAndAfter,v=u.addJot,L=u.cols,j=u.arraystretch,be=u.colSeparationType;if(H.gullet.beginGroup(),H.gullet.macros.set("\\\\","\\cr"),!j){var Ie=H.gullet.expandMacroAsText("\\arraystretch");if(Ie==null)j=1;else if(j=parseFloat(Ie),!j||j<0)throw new p("Invalid \\arraystretch: "+Ie)}H.gullet.beginGroup();var We=[],vt=[We],Ot=[],Qt=[];for(Qt.push(Xi(H));;){var pn=H.parseExpression(!1,"\\cr");H.gullet.endGroup(),H.gullet.beginGroup(),pn={type:"ordgroup",mode:H.mode,body:pn},h&&(pn={type:"styling",mode:H.mode,style:h,body:[pn]}),We.push(pn);var Sn=H.fetch().text;if(Sn==="&")H.consume();else if(Sn==="\\end"){We.length===1&&pn.type==="styling"&&pn.body[0].body.length===0&&vt.pop(),Qt.length<vt.length+1&&Qt.push([]);break}else if(Sn==="\\cr"){var Un=Pn(H.parseFunction(),"cr");Ot.push(Un.size),Qt.push(Xi(H)),We=[],vt.push(We)}else throw new p("Expected & or \\\\ or \\cr or \\end",H.nextToken)}return H.gullet.endGroup(),H.gullet.endGroup(),{type:"array",mode:H.mode,addJot:v,arraystretch:j,body:vt,cols:L,rowGaps:Ot,hskipBeforeAndAfter:f,hLinesBeforeRow:Qt,colSeparationType:be}}function qi(H){return H.substr(0,1)==="d"?"display":"text"}var Ji=function(u,h){var f,v,L=u.body.length,j=u.hLinesBeforeRow,be=0,Ie=new Array(L),We=[],vt=Math.max(h.fontMetrics().arrayRuleWidth,h.minRuleThickness),Ot=1/h.fontMetrics().ptPerEm,Qt=5*Ot;if(u.colSeparationType&&u.colSeparationType==="small"){var pn=h.havingStyle(S.SCRIPT).sizeMultiplier;Qt=.2778*(pn/h.sizeMultiplier)}var Sn=12*Ot,Un=3*Ot,ar=u.arraystretch*Sn,cr=.7*ar,Ar=.3*ar,Or=0;function li(aa){for(var _a=0;_a<aa.length;++_a)_a>0&&(Or+=.25),We.push({pos:Or,isDashed:aa[_a]})}for(li(j[0]),f=0;f<u.body.length;++f){var ri=u.body[f],ui=cr,ci=Ar;be<ri.length&&(be=ri.length);var ai=new Array(ri.length);for(v=0;v<ri.length;++v){var Ni=ur(ri[v],h);ci<Ni.depth&&(ci=Ni.depth),ui<Ni.height&&(ui=Ni.height),ai[v]=Ni}var mi=u.rowGaps[f],wt=0;mi&&(wt=je(mi,h),wt>0&&(wt+=Ar,ci<wt&&(ci=wt),wt=0)),u.addJot&&(ci+=Un),ai.height=ui,ai.depth=ci,Or+=ui,ai.pos=Or,Or+=ci+wt,Ie[f]=ai,li(j[f+1])}var Vi=Or/2+h.fontMetrics().axisHeight,as=u.cols||[],es=[],bi,xs;for(v=0,xs=0;v<be||xs<as.length;++v,++xs){for(var os=as[xs]||{},lo=!0;os.type==="separator";){if(lo||(bi=_t.makeSpan(["arraycolsep"],[]),bi.style.width=h.fontMetrics().doubleRuleSep+"em",es.push(bi)),os.separator==="|"||os.separator===":"){var Fo=os.separator==="|"?"solid":"dashed",Gs=_t.makeSpan(["vertical-separator"],[],h);Gs.style.height=Or+"em",Gs.style.borderRightWidth=vt+"em",Gs.style.borderRightStyle=Fo,Gs.style.margin="0 -"+vt/2+"em",Gs.style.verticalAlign=-(Or-Vi)+"em",es.push(Gs)}else throw new p("Invalid separator type: "+os.separator);xs++,os=as[xs]||{},lo=!1}if(!(v>=be)){var Ws=void 0;(v>0||u.hskipBeforeAndAfter)&&(Ws=U.deflt(os.pregap,Qt),Ws!==0&&(bi=_t.makeSpan(["arraycolsep"],[]),bi.style.width=Ws+"em",es.push(bi)));var ts=[];for(f=0;f<L;++f){var Vs=Ie[f],sa=Vs[v];if(sa){var va=Vs.pos-Vi;sa.depth=Vs.depth,sa.height=Vs.height,ts.push({type:"elem",elem:sa,shift:va})}}ts=_t.makeVList({positionType:"individualShift",children:ts},h),ts=_t.makeSpan(["col-align-"+(os.align||"c")],[ts]),es.push(ts),(v<be-1||u.hskipBeforeAndAfter)&&(Ws=U.deflt(os.postgap,Qt),Ws!==0&&(bi=_t.makeSpan(["arraycolsep"],[]),bi.style.width=Ws+"em",es.push(bi)))}}if(Ie=_t.makeSpan(["mtable"],es),We.length>0){for(var Zi=_t.makeLineSpan("hline",h,vt),No=_t.makeLineSpan("hdashline",h,vt),ya=[{type:"elem",elem:Ie,shift:0}];We.length>0;){var Fa=We.pop(),uo=Fa.pos-Vi;Fa.isDashed?ya.push({type:"elem",elem:No,shift:uo}):ya.push({type:"elem",elem:Zi,shift:uo})}Ie=_t.makeVList({positionType:"individualShift",children:ya},h)}return _t.makeSpan(["mord"],[Ie],h)},qs={c:"center ",l:"left ",r:"right "},Vr=function(u,h){var f=new rn.MathNode("mtable",u.body.map(function(Or){return new rn.MathNode("mtr",Or.map(function(li){return new rn.MathNode("mtd",[or(li,h)])}))})),v=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);f.setAttribute("rowspacing",v+"em");var L="",j="";if(u.cols){var be=u.cols,Ie="",We=!1,vt=0,Ot=be.length;be[0].type==="separator"&&(L+="top ",vt=1),be[be.length-1].type==="separator"&&(L+="bottom ",Ot-=1);for(var Qt=vt;Qt<Ot;Qt++)be[Qt].type==="align"?(j+=qs[be[Qt].align],We&&(Ie+="none "),We=!0):be[Qt].type==="separator"&&We&&(Ie+=be[Qt].separator==="|"?"solid ":"dashed ",We=!1);f.setAttribute("columnalign",j.trim()),/[sd]/.test(Ie)&&f.setAttribute("columnlines",Ie.trim())}if(u.colSeparationType==="align"){for(var pn=u.cols||[],Sn="",Un=1;Un<pn.length;Un++)Sn+=Un%2?"0em ":"1em ";f.setAttribute("columnspacing",Sn.trim())}else u.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var ar="",cr=u.hLinesBeforeRow;L+=cr[0].length>0?"left ":"",L+=cr[cr.length-1].length>0?"right ":"";for(var Ar=1;Ar<cr.length-1;Ar++)ar+=cr[Ar].length===0?"none ":cr[Ar][0]?"dashed ":"solid ";return/[sd]/.test(ar)&&f.setAttribute("rowlines",ar.trim()),L!==""&&(f=new rn.MathNode("menclose",[f]),f.setAttribute("notation",L.trim())),u.arraystretch&&u.arraystretch<1&&(f=new rn.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},Zr=function(u,h){var f=[],v=ji(u.parser,{cols:f,addJot:!0},"display"),L,j=0,be={type:"ordgroup",mode:u.mode,body:[]},Ie=jn(h[0],"ordgroup");if(Ie){for(var We="",vt=0;vt<Ie.body.length;vt++){var Ot=Pn(Ie.body[vt],"textord");We+=Ot.text}L=Number(We),j=L*2}var Qt=!j;v.body.forEach(function(ar){for(var cr=1;cr<ar.length;cr+=2){var Ar=Pn(ar[cr],"styling"),Or=Pn(Ar.body[0],"ordgroup");Or.body.unshift(be)}if(Qt)j<ar.length&&(j=ar.length);else{var li=ar.length/2;if(L<li)throw new p("Too many math in a row: "+("expected "+L+", but got "+li),ar[0])}});for(var pn=0;pn<j;++pn){var Sn="r",Un=0;pn%2===1?Sn="l":pn>0&&Qt&&(Un=1),f[pn]={type:"align",align:Sn,pregap:Un,postgap:0}}return v.colSeparationType=Qt?"align":"alignat",v};Ai({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,h){var f=Er(h[0]),v=f?[h[0]]:Pn(h[0],"ordgroup").body,L=v.map(function(be){var Ie=Rr(be),We=Ie.text;if("lcr".indexOf(We)!==-1)return{type:"align",align:We};if(We==="|")return{type:"separator",separator:"|"};if(We===":")return{type:"separator",separator:":"};throw new p("Unknown column alignment: "+We,be)}),j={cols:L,hskipBeforeAndAfter:!0};return ji(u.parser,j,qi(u.envName))},htmlBuilder:Ji,mathmlBuilder:Vr}),Ai({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var h={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],f={hskipBeforeAndAfter:!1},v=ji(u.parser,f,qi(u.envName));return h?{type:"leftright",mode:u.mode,body:[v],left:h[0],right:h[1],rightColor:void 0}:v},htmlBuilder:Ji,mathmlBuilder:Vr}),Ai({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var h={arraystretch:.5},f=ji(u.parser,h,"script");return f.colSeparationType="small",f},htmlBuilder:Ji,mathmlBuilder:Vr}),Ai({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,h){var f=Er(h[0]),v=f?[h[0]]:Pn(h[0],"ordgroup").body,L=v.map(function(be){var Ie=Rr(be),We=Ie.text;if("lc".indexOf(We)!==-1)return{type:"align",align:We};throw new p("Unknown column alignment: "+We,be)});if(L.length>1)throw new p("{subarray} can contain only one column");var j={cols:L,hskipBeforeAndAfter:!1,arraystretch:.5};if(j=ji(u.parser,j,"script"),j.body[0].length>1)throw new p("{subarray} can contain only one column");return j},htmlBuilder:Ji,mathmlBuilder:Vr}),Ai({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=ji(u.parser,h,qi(u.envName));return{type:"leftright",mode:u.mode,body:[f],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:Ji,mathmlBuilder:Vr}),Ai({type:"array",names:["aligned"],props:{numArgs:0},handler:Zr,htmlBuilder:Ji,mathmlBuilder:Vr}),Ai({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var h={cols:[{type:"align",align:"c"}],addJot:!0};return ji(u.parser,h,"display")},htmlBuilder:Ji,mathmlBuilder:Vr}),Ai({type:"array",names:["alignedat"],props:{numArgs:1},handler:Zr,htmlBuilder:Ji,mathmlBuilder:Vr}),tn({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,h){throw new p(u.funcName+" valid only within array environment")}});var si=Yi,Oi=si;tn({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0];if(L.type!=="ordgroup")throw new p("Invalid environment name",L);for(var j="",be=0;be<L.body.length;++be)j+=Pn(L.body[be],"textord").text;if(v==="\\begin"){if(!Oi.hasOwnProperty(j))throw new p("No such environment: "+j,L);var Ie=Oi[j],We=f.parseArguments("\\begin{"+j+"}",Ie),vt=We.args,Ot=We.optArgs,Qt={mode:f.mode,envName:j,parser:f},pn=Ie.handler(Qt,vt,Ot);f.expect("\\end",!1);var Sn=f.nextToken,Un=Pn(f.parseFunction(),"environment");if(Un.name!==j)throw new p("Mismatch: \\begin{"+j+"} matched by \\end{"+Un.name+"}",Sn);return pn}return{type:"environment",mode:f.mode,name:j,nameGroup:L}}});var ki=_t.makeSpan;function Is(H,u){var h=Cr(H.body,u,!0);return ki([H.mclass],h,u)}function Ds(H,u){var h,f=di(H.body,u);return H.mclass==="minner"?rn.newDocumentFragment(f):(H.mclass==="mord"?H.isCharacterBox?(h=f[0],h.type="mi"):h=new rn.MathNode("mi",f):(H.isCharacterBox?(h=f[0],h.type="mo"):h=new rn.MathNode("mo",f),H.mclass==="mbin"?(h.attributes.lspace="0.22em",h.attributes.rspace="0.22em"):H.mclass==="mpunct"?(h.attributes.lspace="0em",h.attributes.rspace="0.17em"):(H.mclass==="mopen"||H.mclass==="mclose")&&(h.attributes.lspace="0em",h.attributes.rspace="0em")),h)}tn({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0];return{type:"mclass",mode:f.mode,mclass:"m"+v.substr(5),body:er(L),isCharacterBox:U.isCharacterBox(L)}},htmlBuilder:Is,mathmlBuilder:Ds});var ds=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"};tn({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,h){var f=u.parser;return{type:"mclass",mode:f.mode,mclass:ds(h[0]),body:[h[1]],isCharacterBox:U.isCharacterBox(h[1])}}}),tn({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[1],j=h[0],be;v!=="\\stackrel"?be=ds(L):be="mrel";var Ie={type:"op",mode:L.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:v!=="\\stackrel",body:er(L)},We={type:"supsub",mode:j.mode,base:Ie,sup:v==="\\underset"?null:j,sub:v==="\\underset"?j:null};return{type:"mclass",mode:f.mode,mclass:be,body:[We],isCharacterBox:U.isCharacterBox(We)}},htmlBuilder:Is,mathmlBuilder:Ds});var Js=function(u,h){var f=u.font,v=h.withFont(f);return ur(u.body,v)},Fs=function(u,h){var f=u.font,v=h.withFont(f);return or(u.body,v)},hs={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};tn({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0],j=v;return j in hs&&(j=hs[j]),{type:"font",mode:f.mode,font:j.slice(1),body:L}},htmlBuilder:Js,mathmlBuilder:Fs}),tn({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,h){var f=u.parser,v=h[0],L=U.isCharacterBox(v);return{type:"mclass",mode:f.mode,mclass:ds(v),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:v}],isCharacterBox:L}}}),tn({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,L=u.breakOnTokenText,j=f.mode,be=f.parseExpression(!0,L),Ie="math"+v.slice(1);return{type:"font",mode:j,font:Ie,body:{type:"ordgroup",mode:f.mode,body:be}}},htmlBuilder:Js,mathmlBuilder:Fs});var Ns=function(u,h){var f=h;return u==="display"?f=f.id>=S.SCRIPT.id?f.text():S.DISPLAY:u==="text"&&f.size===S.DISPLAY.size?f=S.TEXT:u==="script"?f=S.SCRIPT:u==="scriptscript"&&(f=S.SCRIPTSCRIPT),f},$s=function(u,h){var f=Ns(u.size,h.style),v=f.fracNum(),L=f.fracDen(),j;j=h.havingStyle(v);var be=ur(u.numer,j,h);if(u.continued){var Ie=8.5/h.fontMetrics().ptPerEm,We=3.5/h.fontMetrics().ptPerEm;be.height=be.height<Ie?Ie:be.height,be.depth=be.depth<We?We:be.depth}j=h.havingStyle(L);var vt=ur(u.denom,j,h),Ot,Qt,pn;u.hasBarLine?(u.barSize?(Qt=je(u.barSize,h),Ot=_t.makeLineSpan("frac-line",h,Qt)):Ot=_t.makeLineSpan("frac-line",h),Qt=Ot.height,pn=Ot.height):(Ot=null,Qt=0,pn=h.fontMetrics().defaultRuleThickness);var Sn,Un,ar;f.size===S.DISPLAY.size||u.size==="display"?(Sn=h.fontMetrics().num1,Qt>0?Un=3*pn:Un=7*pn,ar=h.fontMetrics().denom1):(Qt>0?(Sn=h.fontMetrics().num2,Un=pn):(Sn=h.fontMetrics().num3,Un=3*pn),ar=h.fontMetrics().denom2);var cr;if(Ot){var Or=h.fontMetrics().axisHeight;Sn-be.depth-(Or+.5*Qt)<Un&&(Sn+=Un-(Sn-be.depth-(Or+.5*Qt))),Or-.5*Qt-(vt.height-ar)<Un&&(ar+=Un-(Or-.5*Qt-(vt.height-ar)));var li=-(Or-.5*Qt);cr=_t.makeVList({positionType:"individualShift",children:[{type:"elem",elem:vt,shift:ar},{type:"elem",elem:Ot,shift:li},{type:"elem",elem:be,shift:-Sn}]},h)}else{var Ar=Sn-be.depth-(vt.height-ar);Ar<Un&&(Sn+=.5*(Un-Ar),ar+=.5*(Un-Ar)),cr=_t.makeVList({positionType:"individualShift",children:[{type:"elem",elem:vt,shift:ar},{type:"elem",elem:be,shift:-Sn}]},h)}j=h.havingStyle(f),cr.height*=j.sizeMultiplier/h.sizeMultiplier,cr.depth*=j.sizeMultiplier/h.sizeMultiplier;var ri;f.size===S.DISPLAY.size?ri=h.fontMetrics().delim1:ri=h.fontMetrics().delim2;var ui,ci;return u.leftDelim==null?ui=Yr(h,["mopen"]):ui=_r.customSizedDelim(u.leftDelim,ri,!0,h.havingStyle(f),u.mode,["mopen"]),u.continued?ci=_t.makeSpan([]):u.rightDelim==null?ci=Yr(h,["mclose"]):ci=_r.customSizedDelim(u.rightDelim,ri,!0,h.havingStyle(f),u.mode,["mclose"]),_t.makeSpan(["mord"].concat(j.sizingClasses(h)),[ui,_t.makeSpan(["mfrac"],[cr]),ci],h)},zs=function(u,h){var f=new rn.MathNode("mfrac",[or(u.numer,h),or(u.denom,h)]);if(!u.hasBarLine)f.setAttribute("linethickness","0px");else if(u.barSize){var v=je(u.barSize,h);f.setAttribute("linethickness",v+"em")}var L=Ns(u.size,h.style);if(L.size!==h.style.size){f=new rn.MathNode("mstyle",[f]);var j=L.size===S.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",j),f.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var be=[];if(u.leftDelim!=null){var Ie=new rn.MathNode("mo",[new rn.TextNode(u.leftDelim.replace("\\",""))]);Ie.setAttribute("fence","true"),be.push(Ie)}if(be.push(f),u.rightDelim!=null){var We=new rn.MathNode("mo",[new rn.TextNode(u.rightDelim.replace("\\",""))]);We.setAttribute("fence","true"),be.push(We)}return Ii(be)}return f};tn({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0],j=h[1],be,Ie=null,We=null,vt="auto";switch(v){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":be=!0;break;case"\\\\atopfrac":be=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":be=!1,Ie="(",We=")";break;case"\\\\bracefrac":be=!1,Ie="\\{",We="\\}";break;case"\\\\brackfrac":be=!1,Ie="[",We="]";break;default:throw new Error("Unrecognized genfrac command")}switch(v){case"\\cfrac":case"\\dfrac":case"\\dbinom":vt="display";break;case"\\tfrac":case"\\tbinom":vt="text";break}return{type:"genfrac",mode:f.mode,continued:v==="\\cfrac",numer:L,denom:j,hasBarLine:be,leftDelim:Ie,rightDelim:We,size:vt,barSize:null}},htmlBuilder:$s,mathmlBuilder:zs}),tn({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var h=u.parser,f=u.funcName,v=u.token,L;switch(f){case"\\over":L="\\frac";break;case"\\choose":L="\\binom";break;case"\\atop":L="\\\\atopfrac";break;case"\\brace":L="\\\\bracefrac";break;case"\\brack":L="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:h.mode,replaceWith:L,token:v}}});var Bi=["display","text","script","scriptscript"],zi=function(u){var h=null;return u.length>0&&(h=u,h=h==="."?null:h),h};tn({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,h){var f=u.parser,v=h[4],L=h[5],j=jn(h[0],"atom");j&&(j=xr(h[0],"open"));var be=j?zi(j.text):null,Ie=jn(h[1],"atom");Ie&&(Ie=xr(h[1],"close"));var We=Ie?zi(Ie.text):null,vt=Pn(h[2],"size"),Ot,Qt=null;vt.isBlank?Ot=!0:(Qt=vt.value,Ot=Qt.number>0);var pn="auto",Sn=jn(h[3],"ordgroup");if(Sn){if(Sn.body.length>0){var Un=Pn(Sn.body[0],"textord");pn=Bi[Number(Un.text)]}}else Sn=Pn(h[3],"textord"),pn=Bi[Number(Sn.text)];return{type:"genfrac",mode:f.mode,numer:v,denom:L,continued:!1,hasBarLine:Ot,barSize:Qt,leftDelim:be,rightDelim:We,size:pn}},htmlBuilder:$s,mathmlBuilder:zs}),tn({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,h){var f=u.parser,v=u.funcName,L=u.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:Pn(h[0],"size").value,token:L}}}),tn({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0],j=X(Pn(h[1],"infix").size),be=h[2],Ie=j.number>0;return{type:"genfrac",mode:f.mode,numer:L,denom:be,continued:!1,hasBarLine:Ie,barSize:j,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:$s,mathmlBuilder:zs});var Ha=function(u,h){var f=h.style,v,L,j=jn(u,"supsub");j?(v=j.sup?ur(j.sup,h.havingStyle(f.sup()),h):ur(j.sub,h.havingStyle(f.sub()),h),L=Pn(j.base,"horizBrace")):L=Pn(u,"horizBrace");var be=ur(L.base,h.havingBaseStyle(S.DISPLAY)),Ie=hi.svgSpan(L,h),We;if(L.isOver?(We=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:be},{type:"kern",size:.1},{type:"elem",elem:Ie}]},h),We.children[0].children[0].children[1].classes.push("svg-align")):(We=_t.makeVList({positionType:"bottom",positionData:be.depth+.1+Ie.height,children:[{type:"elem",elem:Ie},{type:"kern",size:.1},{type:"elem",elem:be}]},h),We.children[0].children[0].children[0].classes.push("svg-align")),v){var vt=_t.makeSpan(["mord",L.isOver?"mover":"munder"],[We],h);L.isOver?We=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:vt},{type:"kern",size:.2},{type:"elem",elem:v}]},h):We=_t.makeVList({positionType:"bottom",positionData:vt.depth+.2+v.height+v.depth,children:[{type:"elem",elem:v},{type:"kern",size:.2},{type:"elem",elem:vt}]},h)}return _t.makeSpan(["mord",L.isOver?"mover":"munder"],[We],h)},on=function(u,h){var f=hi.mathMLnode(u.label);return new rn.MathNode(u.isOver?"mover":"munder",[or(u.base,h),f])};tn({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName;return{type:"horizBrace",mode:f.mode,label:v,isOver:/^\\over/.test(v),base:h[0]}},htmlBuilder:Ha,mathmlBuilder:on}),tn({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[1],L=Pn(h[0],"url").url;return f.settings.isTrusted({command:"\\href",url:L})?{type:"href",mode:f.mode,href:L,body:er(v)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,h){var f=Cr(u.body,h,!1);return _t.makeAnchor(u.href,[],f,h)},mathmlBuilder:function(u,h){var f=pi(u.body,h);return f instanceof Vn||(f=new Vn("mrow",[f])),f.setAttribute("href",u.href),f}}),tn({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=Pn(h[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:v}))return f.formatUnsupportedCmd("\\url");for(var L=[],j=0;j<v.length;j++){var be=v[j];be==="~"&&(be="\\textasciitilde"),L.push({type:"textord",mode:"text",text:be})}var Ie={type:"text",mode:f.mode,font:"\\texttt",body:L};return{type:"href",mode:f.mode,href:v,body:er(Ie)}}}),tn({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:er(h[0]),mathml:er(h[1])}},htmlBuilder:function(u,h){var f=Cr(u.html,h,!1);return _t.makeFragment(f)},mathmlBuilder:function(u,h){return pi(u.mathml,h)}});var ea=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 p("Invalid size: '"+u+"' in \\includegraphics");var f={number:+(h[1]+h[2]),unit:h[3]};if(!Jt(f))throw new p("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};tn({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,h,f){var v=u.parser,L={number:0,unit:"em"},j={number:.9,unit:"em"},be={number:0,unit:"em"},Ie="";if(f[0])for(var We=Pn(f[0],"raw").string,vt=We.split(","),Ot=0;Ot<vt.length;Ot++){var Qt=vt[Ot].split("=");if(Qt.length===2){var pn=Qt[1].trim();switch(Qt[0].trim()){case"alt":Ie=pn;break;case"width":L=ea(pn);break;case"height":j=ea(pn);break;case"totalheight":be=ea(pn);break;default:throw new p("Invalid key: '"+Qt[0]+"' in \\includegraphics.")}}}var Sn=Pn(h[0],"url").url;return Ie===""&&(Ie=Sn,Ie=Ie.replace(/^.*[\\/]/,""),Ie=Ie.substring(0,Ie.lastIndexOf("."))),v.settings.isTrusted({command:"\\includegraphics",url:Sn})?{type:"includegraphics",mode:v.mode,alt:Ie,width:L,height:j,totalheight:be,src:Sn}:v.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,h){var f=je(u.height,h),v=0;u.totalheight.number>0&&(v=je(u.totalheight,h)-f,v=Number(v.toFixed(2)));var L=0;u.width.number>0&&(L=je(u.width,h));var j={height:f+v+"em"};L>0&&(j.width=L+"em"),v>0&&(j.verticalAlign=-v+"em");var be=new Se(u.src,u.alt,j);return be.height=f,be.depth=v,be},mathmlBuilder:function(u,h){var f=new rn.MathNode("mglyph",[]);f.setAttribute("alt",u.alt);var v=je(u.height,h),L=0;if(u.totalheight.number>0&&(L=je(u.totalheight,h)-v,L=L.toFixed(2),f.setAttribute("valign","-"+L+"em")),f.setAttribute("height",v+L+"em"),u.width.number>0){var j=je(u.width,h);f.setAttribute("width",j+"em")}return f.setAttribute("src",u.src),f}}),tn({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,L=Pn(h[0],"size");if(f.settings.strict){var j=v[1]==="m",be=L.value.unit==="mu";j?(be||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" supports only mu units, "+("not "+L.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" works only in math mode")):be&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+v+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:L.value}},htmlBuilder:function(u,h){return _t.makeGlue(u.dimension,h)},mathmlBuilder:function(u,h){var f=je(u.dimension,h);return new rn.SpaceNode(f)}}),tn({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0];return{type:"lap",mode:f.mode,alignment:v.slice(5),body:L}},htmlBuilder:function(u,h){var f;u.alignment==="clap"?(f=_t.makeSpan([],[ur(u.body,h)]),f=_t.makeSpan(["inner"],[f],h)):f=_t.makeSpan(["inner"],[ur(u.body,h)]);var v=_t.makeSpan(["fix"],[]),L=_t.makeSpan([u.alignment],[f,v],h),j=_t.makeSpan(["strut"]);return j.style.height=L.height+L.depth+"em",j.style.verticalAlign=-L.depth+"em",L.children.unshift(j),L=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:L}]},h),_t.makeSpan(["mord"],[L],h)},mathmlBuilder:function(u,h){var f=new rn.MathNode("mpadded",[or(u.body,h)]);if(u.alignment!=="rlap"){var v=u.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",v+"width")}return f.setAttribute("width","0px"),f}}),tn({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){var f=u.funcName,v=u.parser,L=v.mode;v.switchMode("math");var j=f==="\\("?"\\)":"$",be=v.parseExpression(!1,j);return v.expect(j),v.switchMode(L),{type:"styling",mode:v.mode,style:"text",body:be}}}),tn({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,h){throw new p("Mismatched "+u.funcName)}});var Ta=function(u,h){switch(h.style.size){case S.DISPLAY.size:return u.display;case S.TEXT.size:return u.text;case S.SCRIPT.size:return u.script;case S.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};tn({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,h){var f=u.parser;return{type:"mathchoice",mode:f.mode,display:er(h[0]),text:er(h[1]),script:er(h[2]),scriptscript:er(h[3])}},htmlBuilder:function(u,h){var f=Ta(u,h),v=Cr(f,h,!1);return _t.makeFragment(v)},mathmlBuilder:function(u,h){var f=Ta(u,h);return pi(f,h)}});var Ca=function(u,h,f,v,L,j,be){u=_t.makeSpan([],[u]);var Ie,We;if(h){var vt=ur(h,v.havingStyle(L.sup()),v);We={elem:vt,kern:Math.max(v.fontMetrics().bigOpSpacing1,v.fontMetrics().bigOpSpacing3-vt.depth)}}if(f){var Ot=ur(f,v.havingStyle(L.sub()),v);Ie={elem:Ot,kern:Math.max(v.fontMetrics().bigOpSpacing2,v.fontMetrics().bigOpSpacing4-Ot.height)}}var Qt;if(We&&Ie){var pn=v.fontMetrics().bigOpSpacing5+Ie.elem.height+Ie.elem.depth+Ie.kern+u.depth+be;Qt=_t.makeVList({positionType:"bottom",positionData:pn,children:[{type:"kern",size:v.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ie.elem,marginLeft:-j+"em"},{type:"kern",size:Ie.kern},{type:"elem",elem:u},{type:"kern",size:We.kern},{type:"elem",elem:We.elem,marginLeft:j+"em"},{type:"kern",size:v.fontMetrics().bigOpSpacing5}]},v)}else if(Ie){var Sn=u.height-be;Qt=_t.makeVList({positionType:"top",positionData:Sn,children:[{type:"kern",size:v.fontMetrics().bigOpSpacing5},{type:"elem",elem:Ie.elem,marginLeft:-j+"em"},{type:"kern",size:Ie.kern},{type:"elem",elem:u}]},v)}else if(We){var Un=u.depth+be;Qt=_t.makeVList({positionType:"bottom",positionData:Un,children:[{type:"elem",elem:u},{type:"kern",size:We.kern},{type:"elem",elem:We.elem,marginLeft:j+"em"},{type:"kern",size:v.fontMetrics().bigOpSpacing5}]},v)}else return u;return _t.makeSpan(["mop","op-limits"],[Qt],v)},Ka=["\\smallint"],bs=function(u,h){var f,v,L=!1,j,be=jn(u,"supsub");be?(f=be.sup,v=be.sub,j=Pn(be.base,"op"),L=!0):j=Pn(u,"op");var Ie=h.style,We=!1;Ie.size===S.DISPLAY.size&&j.symbol&&!U.contains(Ka,j.name)&&(We=!0);var vt;if(j.symbol){var Ot=We?"Size2-Regular":"Size1-Regular",Qt="";if((j.name==="\\oiint"||j.name==="\\oiiint")&&(Qt=j.name.substr(1),j.name=Qt==="oiint"?"\\iint":"\\iiint"),vt=_t.makeSymbol(j.name,Ot,"math",h,["mop","op-symbol",We?"large-op":"small-op"]),Qt.length>0){var pn=vt.italic,Sn=_t.staticSvg(Qt+"Size"+(We?"2":"1"),h);vt=_t.makeVList({positionType:"individualShift",children:[{type:"elem",elem:vt,shift:0},{type:"elem",elem:Sn,shift:We?.08:0}]},h),j.name="\\"+Qt,vt.classes.unshift("mop"),vt.italic=pn}}else if(j.body){var Un=Cr(j.body,h,!0);Un.length===1&&Un[0]instanceof fe?(vt=Un[0],vt.classes[0]="mop"):vt=_t.makeSpan(["mop"],_t.tryCombineChars(Un),h)}else{for(var ar=[],cr=1;cr<j.name.length;cr++)ar.push(_t.mathsym(j.name[cr],j.mode,h));vt=_t.makeSpan(["mop"],ar,h)}var Ar=0,Or=0;return(vt instanceof fe||j.name==="\\oiint"||j.name==="\\oiiint")&&!j.suppressBaseShift&&(Ar=(vt.height-vt.depth)/2-h.fontMetrics().axisHeight,Or=vt.italic),L?Ca(vt,f,v,h,Ie,Or,Ar):(Ar&&(vt.style.position="relative",vt.style.top=Ar+"em"),vt)},Us=function(u,h){var f;if(u.symbol)f=new Vn("mo",[qr(u.name,u.mode)]),U.contains(Ka,u.name)&&f.setAttribute("largeop","false");else if(u.body)f=new Vn("mo",di(u.body,h));else{f=new Vn("mi",[new xn(u.name.slice(1))]);var v=new Vn("mo",[qr("\u2061","text")]);u.parentIsSupSub?f=new Vn("mo",[f,v]):f=Qr([f,v])}return f},Co={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};tn({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:function(u,h){var f=u.parser,v=u.funcName,L=v;return L.length===1&&(L=Co[L]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:L}},htmlBuilder:bs,mathmlBuilder:Us}),tn({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=h[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:er(v)}},htmlBuilder:bs,mathmlBuilder:Us});var Ao={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};tn({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:bs,mathmlBuilder:Us}),tn({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:bs,mathmlBuilder:Us}),tn({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var h=u.parser,f=u.funcName,v=f;return v.length===1&&(v=Ao[v]),{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:v}},htmlBuilder:bs,mathmlBuilder:Us});var ha=function(u,h){var f,v,L=!1,j,be=jn(u,"supsub");be?(f=be.sup,v=be.sub,j=Pn(be.base,"operatorname"),L=!0):j=Pn(u,"operatorname");var Ie;if(j.body.length>0){for(var We=j.body.map(function(pn){var Sn=pn.text;return typeof Sn=="string"?{type:"textord",mode:pn.mode,text:Sn}:pn}),vt=Cr(We,h.withFont("mathrm"),!0),Ot=0;Ot<vt.length;Ot++){var Qt=vt[Ot];Qt instanceof fe&&(Qt.text=Qt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Ie=_t.makeSpan(["mop"],vt,h)}else Ie=_t.makeSpan(["mop"],[],h);return L?Ca(Ie,f,v,h,h.style,0,0):Ie},ta=function(u,h){for(var f=di(u.body,h.withFont("mathrm")),v=!0,L=0;L<f.length;L++){var j=f[L];if(!(j instanceof rn.SpaceNode))if(j instanceof rn.MathNode)switch(j.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var be=j.children[0];j.children.length===1&&be instanceof rn.TextNode?be.text=be.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):v=!1;break}default:v=!1}else v=!1}if(v){var Ie=f.map(function(Ot){return Ot.toText()}).join("");f=[new rn.TextNode(Ie)]}var We=new rn.MathNode("mi",f);We.setAttribute("mathvariant","normal");var vt=new rn.MathNode("mo",[qr("\u2061","text")]);return u.parentIsSupSub?new rn.MathNode("mo",[We,vt]):rn.newDocumentFragment([We,vt])};tn({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0];return{type:"operatorname",mode:f.mode,body:er(L),alwaysHandleSupSub:v==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:ha,mathmlBuilder:ta}),Hn({type:"ordgroup",htmlBuilder:function(u,h){return u.semisimple?_t.makeFragment(Cr(u.body,h,!1)):_t.makeSpan(["mord"],Cr(u.body,h,!0),h)},mathmlBuilder:function(u,h){return pi(u.body,h,!0)}}),tn({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,h){var f=u.parser,v=h[0];return{type:"overline",mode:f.mode,body:v}},htmlBuilder:function(u,h){var f=ur(u.body,h.havingCrampedStyle()),v=_t.makeLineSpan("overline-line",h),L=h.fontMetrics().defaultRuleThickness,j=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*L},{type:"elem",elem:v},{type:"kern",size:L}]},h);return _t.makeSpan(["mord","overline"],[j],h)},mathmlBuilder:function(u,h){var f=new rn.MathNode("mo",[new rn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var v=new rn.MathNode("mover",[or(u.body,h),f]);return v.setAttribute("accent","true"),v}}),tn({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[0];return{type:"phantom",mode:f.mode,body:er(v)}},htmlBuilder:function(u,h){var f=Cr(u.body,h.withPhantom(),!1);return _t.makeFragment(f)},mathmlBuilder:function(u,h){var f=di(u.body,h);return new rn.MathNode("mphantom",f)}}),tn({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[0];return{type:"hphantom",mode:f.mode,body:v}},htmlBuilder:function(u,h){var f=_t.makeSpan([],[ur(u.body,h.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var v=0;v<f.children.length;v++)f.children[v].height=0,f.children[v].depth=0;return f=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h),_t.makeSpan(["mord"],[f],h)},mathmlBuilder:function(u,h){var f=di(er(u.body),h),v=new rn.MathNode("mphantom",f),L=new rn.MathNode("mpadded",[v]);return L.setAttribute("height","0px"),L.setAttribute("depth","0px"),L}}),tn({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,h){var f=u.parser,v=h[0];return{type:"vphantom",mode:f.mode,body:v}},htmlBuilder:function(u,h){var f=_t.makeSpan(["inner"],[ur(u.body,h.withPhantom())]),v=_t.makeSpan(["fix"],[]);return _t.makeSpan(["mord","rlap"],[f,v],h)},mathmlBuilder:function(u,h){var f=di(er(u.body),h),v=new rn.MathNode("mphantom",f),L=new rn.MathNode("mpadded",[v]);return L.setAttribute("width","0px"),L}}),tn({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,h){var f=u.parser,v=Pn(h[0],"size").value,L=h[1];return{type:"raisebox",mode:f.mode,dy:v,body:L}},htmlBuilder:function(u,h){var f=ur(u.body,h),v=je(u.dy,h);return _t.makeVList({positionType:"shift",positionData:-v,children:[{type:"elem",elem:f}]},h)},mathmlBuilder:function(u,h){var f=new rn.MathNode("mpadded",[or(u.body,h)]),v=u.dy.number+u.dy.unit;return f.setAttribute("voffset",v),f}}),tn({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,h,f){var v=u.parser,L=f[0],j=Pn(h[0],"size"),be=Pn(h[1],"size");return{type:"rule",mode:v.mode,shift:L&&Pn(L,"size").value,width:j.value,height:be.value}},htmlBuilder:function(u,h){var f=_t.makeSpan(["mord","rule"],[],h),v=je(u.width,h),L=je(u.height,h),j=u.shift?je(u.shift,h):0;return f.style.borderRightWidth=v+"em",f.style.borderTopWidth=L+"em",f.style.bottom=j+"em",f.width=v,f.height=L+j,f.depth=-j,f.maxFontSize=L*1.125*h.sizeMultiplier,f},mathmlBuilder:function(u,h){var f=je(u.width,h),v=je(u.height,h),L=u.shift?je(u.shift,h):0,j=h.color&&h.getColor()||"black",be=new rn.MathNode("mspace");be.setAttribute("mathbackground",j),be.setAttribute("width",f+"em"),be.setAttribute("height",v+"em");var Ie=new rn.MathNode("mpadded",[be]);return L>=0?Ie.setAttribute("height","+"+L+"em"):(Ie.setAttribute("height",L+"em"),Ie.setAttribute("depth","+"+-L+"em")),Ie.setAttribute("voffset",L+"em"),Ie}});function Rs(H,u,h){for(var f=Cr(H,u,!1),v=u.sizeMultiplier/h.sizeMultiplier,L=0;L<f.length;L++){var j=f[L].classes.indexOf("sizing");j<0?Array.prototype.push.apply(f[L].classes,u.sizingClasses(h)):f[L].classes[j+1]==="reset-size"+u.size&&(f[L].classes[j+1]="reset-size"+h.size),f[L].height*=v,f[L].depth*=v}return _t.makeFragment(f)}var Ga=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Io=function(u,h){var f=h.havingSize(u.size);return Rs(u.body,f,h)};tn({type:"sizing",names:Ga,props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,v=u.funcName,L=u.parser,j=L.parseExpression(!1,f);return{type:"sizing",mode:L.mode,size:Ga.indexOf(v)+1,body:j}},htmlBuilder:Io,mathmlBuilder:function(u,h){var f=h.havingSize(u.size),v=di(u.body,f),L=new rn.MathNode("mstyle",v);return L.setAttribute("mathsize",f.sizeMultiplier+"em"),L}}),tn({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,h,f){var v=u.parser,L=!1,j=!1,be=f[0]&&Pn(f[0],"ordgroup");if(be)for(var Ie="",We=0;We<be.body.length;++We){var vt=be.body[We];if(Ie=vt.text,Ie==="t")L=!0;else if(Ie==="b")j=!0;else{L=!1,j=!1;break}}else L=!0,j=!0;var Ot=h[0];return{type:"smash",mode:v.mode,body:Ot,smashHeight:L,smashDepth:j}},htmlBuilder:function(u,h){var f=_t.makeSpan([],[ur(u.body,h)]);if(!u.smashHeight&&!u.smashDepth)return f;if(u.smashHeight&&(f.height=0,f.children))for(var v=0;v<f.children.length;v++)f.children[v].height=0;if(u.smashDepth&&(f.depth=0,f.children))for(var L=0;L<f.children.length;L++)f.children[L].depth=0;var j=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},h);return _t.makeSpan(["mord"],[j],h)},mathmlBuilder:function(u,h){var f=new rn.MathNode("mpadded",[or(u.body,h)]);return u.smashHeight&&f.setAttribute("height","0px"),u.smashDepth&&f.setAttribute("depth","0px"),f}}),tn({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,h,f){var v=u.parser,L=f[0],j=h[0];return{type:"sqrt",mode:v.mode,body:j,index:L}},htmlBuilder:function(u,h){var f=ur(u.body,h.havingCrampedStyle());f.height===0&&(f.height=h.fontMetrics().xHeight),f=_t.wrapFragment(f,h);var v=h.fontMetrics(),L=v.defaultRuleThickness,j=L;h.style.id<S.TEXT.id&&(j=h.fontMetrics().xHeight);var be=L+j/4,Ie=f.height+f.depth+be+L,We=_r.sqrtImage(Ie,h),vt=We.span,Ot=We.ruleWidth,Qt=We.advanceWidth,pn=vt.height-Ot;pn>f.height+f.depth+be&&(be=(be+pn-f.height-f.depth)/2);var Sn=vt.height-f.height-be-Ot;f.style.paddingLeft=Qt+"em";var Un=_t.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+Sn)},{type:"elem",elem:vt},{type:"kern",size:Ot}]},h);if(u.index){var ar=h.havingStyle(S.SCRIPTSCRIPT),cr=ur(u.index,ar,h),Ar=.6*(Un.height-Un.depth),Or=_t.makeVList({positionType:"shift",positionData:-Ar,children:[{type:"elem",elem:cr}]},h),li=_t.makeSpan(["root"],[Or]);return _t.makeSpan(["mord","sqrt"],[li,Un],h)}else return _t.makeSpan(["mord","sqrt"],[Un],h)},mathmlBuilder:function(u,h){var f=u.body,v=u.index;return v?new rn.MathNode("mroot",[or(f,h),or(v,h)]):new rn.MathNode("msqrt",[or(f,h)])}});var Wa={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT};tn({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,h){var f=u.breakOnTokenText,v=u.funcName,L=u.parser,j=L.parseExpression(!0,f),be=v.slice(1,v.length-5);return{type:"styling",mode:L.mode,style:be,body:j}},htmlBuilder:function(u,h){var f=Wa[u.style],v=h.havingStyle(f).withFont("");return Rs(u.body,v,h)},mathmlBuilder:function(u,h){var f=Wa[u.style],v=h.havingStyle(f),L=di(u.body,v),j=new rn.MathNode("mstyle",L),be={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Ie=be[u.style];return j.setAttribute("scriptlevel",Ie[0]),j.setAttribute("displaystyle",Ie[1]),j}});var Do=function(u,h){var f=u.base;if(f)if(f.type==="op"){var v=f.limits&&(h.style.size===S.DISPLAY.size||f.alwaysHandleSupSub);return v?bs:null}else if(f.type==="operatorname"){var L=f.alwaysHandleSupSub&&(h.style.size===S.DISPLAY.size||f.limits);return L?ha:null}else{if(f.type==="accent")return U.isCharacterBox(f.base)?Bn:null;if(f.type==="horizBrace"){var j=!u.sub;return j===f.isOver?Ha:null}else return null}else return null};Hn({type:"supsub",htmlBuilder:function(u,h){var f=Do(u,h);if(f)return f(u,h);var v=u.base,L=u.sup,j=u.sub,be=ur(v,h),Ie,We,vt=h.fontMetrics(),Ot=0,Qt=0,pn=v&&U.isCharacterBox(v);if(L){var Sn=h.havingStyle(h.style.sup());Ie=ur(L,Sn,h),pn||(Ot=be.height-Sn.fontMetrics().supDrop*Sn.sizeMultiplier/h.sizeMultiplier)}if(j){var Un=h.havingStyle(h.style.sub());We=ur(j,Un,h),pn||(Qt=be.depth+Un.fontMetrics().subDrop*Un.sizeMultiplier/h.sizeMultiplier)}var ar;h.style===S.DISPLAY?ar=vt.sup1:h.style.cramped?ar=vt.sup3:ar=vt.sup2;var cr=h.sizeMultiplier,Ar=.5/vt.ptPerEm/cr+"em",Or=null;if(We){var li=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(be instanceof fe||li)&&(Or=-be.italic+"em")}var ri;if(Ie&&We){Ot=Math.max(Ot,ar,Ie.depth+.25*vt.xHeight),Qt=Math.max(Qt,vt.sub2);var ui=vt.defaultRuleThickness,ci=4*ui;if(Ot-Ie.depth-(We.height-Qt)<ci){Qt=ci-(Ot-Ie.depth)+We.height;var ai=.8*vt.xHeight-(Ot-Ie.depth);ai>0&&(Ot+=ai,Qt-=ai)}var Ni=[{type:"elem",elem:We,shift:Qt,marginRight:Ar,marginLeft:Or},{type:"elem",elem:Ie,shift:-Ot,marginRight:Ar}];ri=_t.makeVList({positionType:"individualShift",children:Ni},h)}else if(We){Qt=Math.max(Qt,vt.sub1,We.height-.8*vt.xHeight);var mi=[{type:"elem",elem:We,marginLeft:Or,marginRight:Ar}];ri=_t.makeVList({positionType:"shift",positionData:Qt,children:mi},h)}else if(Ie)Ot=Math.max(Ot,ar,Ie.depth+.25*vt.xHeight),ri=_t.makeVList({positionType:"shift",positionData:-Ot,children:[{type:"elem",elem:Ie,marginRight:Ar}]},h);else throw new Error("supsub must have either sup or sub.");var wt=Mr(be,"right")||"mord";return _t.makeSpan([wt],[be,_t.makeSpan(["msupsub"],[ri])],h)},mathmlBuilder:function(u,h){var f=!1,v,L,j=jn(u.base,"horizBrace");j&&(L=!!u.sup,L===j.isOver&&(f=!0,v=j.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var be=[or(u.base,h)];u.sub&&be.push(or(u.sub,h)),u.sup&&be.push(or(u.sup,h));var Ie;if(f)Ie=v?"mover":"munder";else if(u.sub)if(u.sup){var Ot=u.base;Ot&&Ot.type==="op"&&Ot.limits&&h.style===S.DISPLAY||Ot&&Ot.type==="operatorname"&&Ot.alwaysHandleSupSub&&(h.style===S.DISPLAY||Ot.limits)?Ie="munderover":Ie="msubsup"}else{var vt=u.base;vt&&vt.type==="op"&&vt.limits&&(h.style===S.DISPLAY||vt.alwaysHandleSupSub)||vt&&vt.type==="operatorname"&&vt.alwaysHandleSupSub&&(vt.limits||h.style===S.DISPLAY)?Ie="munder":Ie="msub"}else{var We=u.base;We&&We.type==="op"&&We.limits&&(h.style===S.DISPLAY||We.alwaysHandleSupSub)||We&&We.type==="operatorname"&&We.alwaysHandleSupSub&&(We.limits||h.style===S.DISPLAY)?Ie="mover":Ie="msup"}var Qt=new rn.MathNode(Ie,be);return Qt}}),Hn({type:"atom",htmlBuilder:function(u,h){return _t.mathsym(u.text,u.mode,h,["m"+u.family])},mathmlBuilder:function(u,h){var f=new rn.MathNode("mo",[qr(u.text,u.mode)]);if(u.family==="bin"){var v=Si(u,h);v==="bold-italic"&&f.setAttribute("mathvariant",v)}else u.family==="punct"?f.setAttribute("separator","true"):(u.family==="open"||u.family==="close")&&f.setAttribute("stretchy","false");return f}});var Aa={mi:"italic",mn:"normal",mtext:"normal"};Hn({type:"mathord",htmlBuilder:function(u,h){return _t.makeOrd(u,h,"mathord")},mathmlBuilder:function(u,h){var f=new rn.MathNode("mi",[qr(u.text,u.mode,h)]),v=Si(u,h)||"italic";return v!==Aa[f.type]&&f.setAttribute("mathvariant",v),f}}),Hn({type:"textord",htmlBuilder:function(u,h){return _t.makeOrd(u,h,"textord")},mathmlBuilder:function(u,h){var f=qr(u.text,u.mode,h),v=Si(u,h)||"normal",L;return u.mode==="text"?L=new rn.MathNode("mtext",[f]):/[0-9]/.test(u.text)?L=new rn.MathNode("mn",[f]):u.text==="\\prime"?L=new rn.MathNode("mo",[f]):L=new rn.MathNode("mi",[f]),v!==Aa[L.type]&&L.setAttribute("mathvariant",v),L}});var na={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},js={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Hn({type:"spacing",htmlBuilder:function(u,h){if(js.hasOwnProperty(u.text)){var f=js[u.text].className||"";if(u.mode==="text"){var v=_t.makeOrd(u,h,"textord");return v.classes.push(f),v}else return _t.makeSpan(["mspace",f],[_t.mathsym(u.text,u.mode,h)],h)}else{if(na.hasOwnProperty(u.text))return _t.makeSpan(["mspace",na[u.text]],[],h);throw new p('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,h){var f;if(js.hasOwnProperty(u.text))f=new rn.MathNode("mtext",[new rn.TextNode("\xA0")]);else{if(na.hasOwnProperty(u.text))return new rn.MathNode("mspace");throw new p('Unknown type of space "'+u.text+'"')}return f}});var Hs=function(){var u=new rn.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};Hn({type:"tag",mathmlBuilder:function(u,h){var f=new rn.MathNode("mtable",[new rn.MathNode("mtr",[Hs(),new rn.MathNode("mtd",[pi(u.body,h)]),Hs(),new rn.MathNode("mtd",[pi(u.tag,h)])])]);return f.setAttribute("width","100%"),f}});var Va={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ia={"\\textbf":"textbf","\\textmd":"textmd"},Za={"\\textit":"textit","\\textup":"textup"},fa=function(u,h){var f=u.font;return f?Va[f]?h.withTextFontFamily(Va[f]):Ia[f]?h.withTextFontWeight(Ia[f]):h.withTextFontShape(Za[f]):h};tn({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,h){var f=u.parser,v=u.funcName,L=h[0];return{type:"text",mode:f.mode,body:er(L),font:v}},htmlBuilder:function(u,h){var f=fa(u,h),v=Cr(u.body,f,!0);return _t.makeSpan(["mord","text"],_t.tryCombineChars(v),f)},mathmlBuilder:function(u,h){var f=fa(u,h);return pi(u.body,f)}}),tn({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=ur(u.body,h),v=_t.makeLineSpan("underline-line",h),L=h.fontMetrics().defaultRuleThickness,j=_t.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:L},{type:"elem",elem:v},{type:"kern",size:3*L},{type:"elem",elem:f}]},h);return _t.makeSpan(["mord","underline"],[j],h)},mathmlBuilder:function(u,h){var f=new rn.MathNode("mo",[new rn.TextNode("\u203E")]);f.setAttribute("stretchy","true");var v=new rn.MathNode("munder",[or(u.body,h),f]);return v.setAttribute("accentunder","true"),v}}),tn({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,h,f){throw new p("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,h){for(var f=Ya(u),v=[],L=h.havingStyle(h.style.text()),j=0;j<f.length;j++){var be=f[j];be==="~"&&(be="\\textasciitilde"),v.push(_t.makeSymbol(be,"Typewriter-Regular",u.mode,L,["mord","texttt"]))}return _t.makeSpan(["mord","text"].concat(L.sizingClasses(h)),_t.tryCombineChars(v),L)},mathmlBuilder:function(u,h){var f=new rn.TextNode(Ya(u)),v=new rn.MathNode("mtext",[f]);return v.setAttribute("mathvariant","monospace"),v}});var Ya=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},ma=bn,ra=ma,Da=`[ \r
|
|
|
]`,Ra="\\\\[a-zA-Z@]+",Xa="\\\\[^\uD800-\uDFFF]",Ro=""+Ra+Da+"*",Qa=new RegExp("^("+Ra+")"+Da+"*$"),La="[\u0300-\u036F]",Lo=new RegExp(La+"+$"),Oa="("+Da+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(La+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(La+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+Ro)+("|"+Xa+")"),qa=function(){function H(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=H.prototype;return u.setCatcode=function(f,v){this.catcodes[f]=v},u.lex=function(){var f=this.input,v=this.tokenRegex.lastIndex;if(v===f.length)return new de("EOF",new Y(this,v,v));var L=this.tokenRegex.exec(f);if(L===null||L.index!==v)throw new p("Unexpected character: '"+f[v]+"'",new de(f[v],new Y(this,v,v+1)));var j=L[2]||" ";if(this.catcodes[j]===14){var be=f.indexOf(`
|
|
|
`,this.tokenRegex.lastIndex);return be===-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=be+1,this.lex()}var Ie=j.match(Qa);return Ie&&(j=Ie[1]),new de(j,new Y(this,v,this.tokenRegex.lastIndex))},H}(),Oo=function(){function H(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=H.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new p("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var v in f)f.hasOwnProperty(v)&&(f[v]===void 0?delete this.current[v]:this.current[v]=f[v])},u.has=function(f){return this.current.hasOwnProperty(f)||this.builtins.hasOwnProperty(f)},u.get=function(f){return this.current.hasOwnProperty(f)?this.current[f]:this.builtins[f]},u.set=function(f,v,L){if(L===void 0&&(L=!1),L){for(var j=0;j<this.undefStack.length;j++)delete this.undefStack[j][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=v)}else{var be=this.undefStack[this.undefStack.length-1];be&&!be.hasOwnProperty(f)&&(be[f]=this.current[f])}this.current[f]=v},H}(),Ja={},Po=Ja;function ke(H,u){Ja[H]=u}ke("\\@firstoftwo",function(H){var u=H.consumeArgs(2);return{tokens:u[0],numArgs:0}}),ke("\\@secondoftwo",function(H){var u=H.consumeArgs(2);return{tokens:u[1],numArgs:0}}),ke("\\@ifnextchar",function(H){var u=H.consumeArgs(3),h=H.future();return u[0].length===1&&u[0][0].text===h.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),ke("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),ke("\\TextOrMath",function(H){var u=H.consumeArgs(2);return H.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};ke("\\char",function(H){var u=H.popToken(),h,f="";if(u.text==="'")h=8,u=H.popToken();else if(u.text==='"')h=16,u=H.popToken();else if(u.text==="`")if(u=H.popToken(),u.text[0]==="\\")f=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new p("\\char` missing argument");f=u.text.charCodeAt(0)}else h=10;if(h){if(f=eo[u.text],f==null||f>=h)throw new p("Invalid base-"+h+" digit "+u.text);for(var v;(v=eo[H.future().text])!=null&&v<h;)f*=h,f+=v,H.popToken()}return"\\@char{"+f+"}"});var Pa=function(u,h){var f=u.consumeArgs(1)[0];if(f.length!==1)throw new p("\\gdef's first argument must be a macro name");var v=f[0].text,L=0;for(f=u.consumeArgs(1)[0];f.length===1&&f[0].text==="#";){if(f=u.consumeArgs(1)[0],f.length!==1)throw new p('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new p('Invalid argument number "'+f[0].text+'"');if(L++,parseInt(f[0].text)!==L)throw new p('Argument number "'+f[0].text+'" out of order');f=u.consumeArgs(1)[0]}return u.macros.set(v,{tokens:f,numArgs:L},h),""};ke("\\gdef",function(H){return Pa(H,!0)}),ke("\\def",function(H){return Pa(H,!1)}),ke("\\global",function(H){var u=H.consumeArgs(1)[0];if(u.length!==1)throw new p("Invalid command after \\global");var h=u[0].text;if(h==="\\def")return Pa(H,!0);throw new p("Invalid command '"+h+"' after \\global")});var Ma=function(u,h,f){var v=u.consumeArgs(1)[0];if(v.length!==1)throw new p("\\newcommand's first argument must be a macro name");var L=v[0].text,j=u.isDefined(L);if(j&&!h)throw new p("\\newcommand{"+L+"} attempting to redefine "+(L+"; use \\renewcommand"));if(!j&&!f)throw new p("\\renewcommand{"+L+"} when command "+L+" does not yet exist; use \\newcommand");var be=0;if(v=u.consumeArgs(1)[0],v.length===1&&v[0].text==="["){for(var Ie="",We=u.expandNextToken();We.text!=="]"&&We.text!=="EOF";)Ie+=We.text,We=u.expandNextToken();if(!Ie.match(/^\s*[0-9]+\s*$/))throw new p("Invalid number of arguments: "+Ie);be=parseInt(Ie),v=u.consumeArgs(1)[0]}return u.macros.set(L,{tokens:v,numArgs:be}),""};ke("\\newcommand",function(H){return Ma(H,!1,!0)}),ke("\\renewcommand",function(H){return Ma(H,!0,!1)}),ke("\\providecommand",function(H){return Ma(H,!0,!0)}),ke("\\bgroup","{"),ke("\\egroup","}"),ke("\\lq","`"),ke("\\rq","'"),ke("\\aa","\\r a"),ke("\\AA","\\r A"),ke("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),ke("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),ke("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),ke("\u212C","\\mathscr{B}"),ke("\u2130","\\mathscr{E}"),ke("\u2131","\\mathscr{F}"),ke("\u210B","\\mathscr{H}"),ke("\u2110","\\mathscr{I}"),ke("\u2112","\\mathscr{L}"),ke("\u2133","\\mathscr{M}"),ke("\u211B","\\mathscr{R}"),ke("\u212D","\\mathfrak{C}"),ke("\u210C","\\mathfrak{H}"),ke("\u2128","\\mathfrak{Z}"),ke("\\Bbbk","\\Bbb{k}"),ke("\xB7","\\cdotp"),ke("\\llap","\\mathllap{\\textrm{#1}}"),ke("\\rlap","\\mathrlap{\\textrm{#1}}"),ke("\\clap","\\mathclap{\\textrm{#1}}"),ke("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),ke("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),ke("\\ne","\\neq"),ke("\u2260","\\neq"),ke("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),ke("\u2209","\\notin"),ke("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),ke("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),ke("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),ke("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),ke("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),ke("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),ke("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),ke("\u27C2","\\perp"),ke("\u203C","\\mathclose{!\\mkern-0.8mu!}"),ke("\u220C","\\notni"),ke("\u231C","\\ulcorner"),ke("\u231D","\\urcorner"),ke("\u231E","\\llcorner"),ke("\u231F","\\lrcorner"),ke("\xA9","\\copyright"),ke("\xAE","\\textregistered"),ke("\uFE0F","\\textregistered"),ke("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),ke("\u22EE","\\vdots"),ke("\\varGamma","\\mathit{\\Gamma}"),ke("\\varDelta","\\mathit{\\Delta}"),ke("\\varTheta","\\mathit{\\Theta}"),ke("\\varLambda","\\mathit{\\Lambda}"),ke("\\varXi","\\mathit{\\Xi}"),ke("\\varPi","\\mathit{\\Pi}"),ke("\\varSigma","\\mathit{\\Sigma}"),ke("\\varUpsilon","\\mathit{\\Upsilon}"),ke("\\varPhi","\\mathit{\\Phi}"),ke("\\varPsi","\\mathit{\\Psi}"),ke("\\varOmega","\\mathit{\\Omega}"),ke("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),ke("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),ke("\\boxed","\\fbox{$\\displaystyle{#1}$}"),ke("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),ke("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),ke("\\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"};ke("\\dots",function(H){var u="\\dotso",h=H.expandAfterFuture().text;return h in to?u=to[h]:(h.substr(0,4)==="\\not"||h in Pt.math&&U.contains(["bin","rel"],Pt.math[h].group))&&(u="\\dotsb"),u});var Ks={")":!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};ke("\\dotso",function(H){var u=H.future().text;return u in Ks?"\\ldots\\,":"\\ldots"}),ke("\\dotsc",function(H){var u=H.future().text;return u in Ks&&u!==","?"\\ldots\\,":"\\ldots"}),ke("\\cdots",function(H){var u=H.future().text;return u in Ks?"\\@cdots\\,":"\\@cdots"}),ke("\\dotsb","\\cdots"),ke("\\dotsm","\\cdots"),ke("\\dotsi","\\!\\cdots"),ke("\\dotsx","\\ldots\\,"),ke("\\DOTSI","\\relax"),ke("\\DOTSB","\\relax"),ke("\\DOTSX","\\relax"),ke("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),ke("\\,","\\tmspace+{3mu}{.1667em}"),ke("\\thinspace","\\,"),ke("\\>","\\mskip{4mu}"),ke("\\:","\\tmspace+{4mu}{.2222em}"),ke("\\medspace","\\:"),ke("\\;","\\tmspace+{5mu}{.2777em}"),ke("\\thickspace","\\;"),ke("\\!","\\tmspace-{3mu}{.1667em}"),ke("\\negthinspace","\\!"),ke("\\negmedspace","\\tmspace-{4mu}{.2222em}"),ke("\\negthickspace","\\tmspace-{5mu}{.277em}"),ke("\\enspace","\\kern.5em "),ke("\\enskip","\\hskip.5em\\relax"),ke("\\quad","\\hskip1em\\relax"),ke("\\qquad","\\hskip2em\\relax"),ke("\\tag","\\@ifstar\\tag@literal\\tag@paren"),ke("\\tag@paren","\\tag@literal{({#1})}"),ke("\\tag@literal",function(H){if(H.macros.get("\\df@tag"))throw new p("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),ke("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),ke("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),ke("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),ke("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),ke("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),ke("\\\\","\\newline"),ke("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var no=te["Main-Regular"][84][1]-.7*te["Main-Regular"][65][1]+"em";ke("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),ke("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+no+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),ke("\\hspace","\\@ifstar\\@hspacer\\@hspace"),ke("\\@hspace","\\hskip #1\\relax"),ke("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),ke("\\ordinarycolon",":"),ke("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),ke("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),ke("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),ke("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),ke("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),ke("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),ke("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),ke("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),ke("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),ke("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),ke("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),ke("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),ke("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),ke("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),ke("\u2237","\\dblcolon"),ke("\u2239","\\eqcolon"),ke("\u2254","\\coloneqq"),ke("\u2255","\\eqqcolon"),ke("\u2A74","\\Coloneqq"),ke("\\ratio","\\vcentcolon"),ke("\\coloncolon","\\dblcolon"),ke("\\colonequals","\\coloneqq"),ke("\\coloncolonequals","\\Coloneqq"),ke("\\equalscolon","\\eqqcolon"),ke("\\equalscoloncolon","\\Eqqcolon"),ke("\\colonminus","\\coloneq"),ke("\\coloncolonminus","\\Coloneq"),ke("\\minuscolon","\\eqcolon"),ke("\\minuscoloncolon","\\Eqcolon"),ke("\\coloncolonapprox","\\Colonapprox"),ke("\\coloncolonsim","\\Colonsim"),ke("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ke("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ke("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ke("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ke("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),ke("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),ke("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),ke("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),ke("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),ke("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),ke("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),ke("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),ke("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),ke("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),ke("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),ke("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),ke("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),ke("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),ke("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),ke("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),ke("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),ke("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),ke("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),ke("\u27E6","\\llbracket"),ke("\u27E7","\\rrbracket"),ke("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),ke("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),ke("\u2983","\\lBrace"),ke("\u2984","\\rBrace"),ke("\\darr","\\downarrow"),ke("\\dArr","\\Downarrow"),ke("\\Darr","\\Downarrow"),ke("\\lang","\\langle"),ke("\\rang","\\rangle"),ke("\\uarr","\\uparrow"),ke("\\uArr","\\Uparrow"),ke("\\Uarr","\\Uparrow"),ke("\\N","\\mathbb{N}"),ke("\\R","\\mathbb{R}"),ke("\\Z","\\mathbb{Z}"),ke("\\alef","\\aleph"),ke("\\alefsym","\\aleph"),ke("\\Alpha","\\mathrm{A}"),ke("\\Beta","\\mathrm{B}"),ke("\\bull","\\bullet"),ke("\\Chi","\\mathrm{X}"),ke("\\clubs","\\clubsuit"),ke("\\cnums","\\mathbb{C}"),ke("\\Complex","\\mathbb{C}"),ke("\\Dagger","\\ddagger"),ke("\\diamonds","\\diamondsuit"),ke("\\empty","\\emptyset"),ke("\\Epsilon","\\mathrm{E}"),ke("\\Eta","\\mathrm{H}"),ke("\\exist","\\exists"),ke("\\harr","\\leftrightarrow"),ke("\\hArr","\\Leftrightarrow"),ke("\\Harr","\\Leftrightarrow"),ke("\\hearts","\\heartsuit"),ke("\\image","\\Im"),ke("\\infin","\\infty"),ke("\\Iota","\\mathrm{I}"),ke("\\isin","\\in"),ke("\\Kappa","\\mathrm{K}"),ke("\\larr","\\leftarrow"),ke("\\lArr","\\Leftarrow"),ke("\\Larr","\\Leftarrow"),ke("\\lrarr","\\leftrightarrow"),ke("\\lrArr","\\Leftrightarrow"),ke("\\Lrarr","\\Leftrightarrow"),ke("\\Mu","\\mathrm{M}"),ke("\\natnums","\\mathbb{N}"),ke("\\Nu","\\mathrm{N}"),ke("\\Omicron","\\mathrm{O}"),ke("\\plusmn","\\pm"),ke("\\rarr","\\rightarrow"),ke("\\rArr","\\Rightarrow"),ke("\\Rarr","\\Rightarrow"),ke("\\real","\\Re"),ke("\\reals","\\mathbb{R}"),ke("\\Reals","\\mathbb{R}"),ke("\\Rho","\\mathrm{P}"),ke("\\sdot","\\cdot"),ke("\\sect","\\S"),ke("\\spades","\\spadesuit"),ke("\\sub","\\subset"),ke("\\sube","\\subseteq"),ke("\\supe","\\supseteq"),ke("\\Tau","\\mathrm{T}"),ke("\\thetasym","\\vartheta"),ke("\\weierp","\\wp"),ke("\\Zeta","\\mathrm{Z}"),ke("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),ke("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),ke("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),ke("\\blue","\\textcolor{##6495ed}{#1}"),ke("\\orange","\\textcolor{##ffa500}{#1}"),ke("\\pink","\\textcolor{##ff00af}{#1}"),ke("\\red","\\textcolor{##df0030}{#1}"),ke("\\green","\\textcolor{##28ae7b}{#1}"),ke("\\gray","\\textcolor{gray}{#1}"),ke("\\purple","\\textcolor{##9d38bd}{#1}"),ke("\\blueA","\\textcolor{##ccfaff}{#1}"),ke("\\blueB","\\textcolor{##80f6ff}{#1}"),ke("\\blueC","\\textcolor{##63d9ea}{#1}"),ke("\\blueD","\\textcolor{##11accd}{#1}"),ke("\\blueE","\\textcolor{##0c7f99}{#1}"),ke("\\tealA","\\textcolor{##94fff5}{#1}"),ke("\\tealB","\\textcolor{##26edd5}{#1}"),ke("\\tealC","\\textcolor{##01d1c1}{#1}"),ke("\\tealD","\\textcolor{##01a995}{#1}"),ke("\\tealE","\\textcolor{##208170}{#1}"),ke("\\greenA","\\textcolor{##b6ffb0}{#1}"),ke("\\greenB","\\textcolor{##8af281}{#1}"),ke("\\greenC","\\textcolor{##74cf70}{#1}"),ke("\\greenD","\\textcolor{##1fab54}{#1}"),ke("\\greenE","\\textcolor{##0d923f}{#1}"),ke("\\goldA","\\textcolor{##ffd0a9}{#1}"),ke("\\goldB","\\textcolor{##ffbb71}{#1}"),ke("\\goldC","\\textcolor{##ff9c39}{#1}"),ke("\\goldD","\\textcolor{##e07d10}{#1}"),ke("\\goldE","\\textcolor{##a75a05}{#1}"),ke("\\redA","\\textcolor{##fca9a9}{#1}"),ke("\\redB","\\textcolor{##ff8482}{#1}"),ke("\\redC","\\textcolor{##f9685d}{#1}"),ke("\\redD","\\textcolor{##e84d39}{#1}"),ke("\\redE","\\textcolor{##bc2612}{#1}"),ke("\\maroonA","\\textcolor{##ffbde0}{#1}"),ke("\\maroonB","\\textcolor{##ff92c6}{#1}"),ke("\\maroonC","\\textcolor{##ed5fa6}{#1}"),ke("\\maroonD","\\textcolor{##ca337c}{#1}"),ke("\\maroonE","\\textcolor{##9e034e}{#1}"),ke("\\purpleA","\\textcolor{##ddd7ff}{#1}"),ke("\\purpleB","\\textcolor{##c6b9fc}{#1}"),ke("\\purpleC","\\textcolor{##aa87ff}{#1}"),ke("\\purpleD","\\textcolor{##7854ab}{#1}"),ke("\\purpleE","\\textcolor{##543b78}{#1}"),ke("\\mintA","\\textcolor{##f5f9e8}{#1}"),ke("\\mintB","\\textcolor{##edf2df}{#1}"),ke("\\mintC","\\textcolor{##e0e5cc}{#1}"),ke("\\grayA","\\textcolor{##f6f7f7}{#1}"),ke("\\grayB","\\textcolor{##f0f1f2}{#1}"),ke("\\grayC","\\textcolor{##e3e5e6}{#1}"),ke("\\grayD","\\textcolor{##d6d8da}{#1}"),ke("\\grayE","\\textcolor{##babec2}{#1}"),ke("\\grayF","\\textcolor{##888d93}{#1}"),ke("\\grayG","\\textcolor{##626569}{#1}"),ke("\\grayH","\\textcolor{##3b3e40}{#1}"),ke("\\grayI","\\textcolor{##21242c}{#1}"),ke("\\kaBlue","\\textcolor{##314453}{#1}"),ke("\\kaGreen","\\textcolor{##71B307}{#1}");var ka={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},ro=function(){function H(h,f,v){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=f,this.expansionCount=0,this.feed(h),this.macros=new Oo(Po,f.macros),this.mode=v,this.stack=[]}var u=H.prototype;return u.feed=function(f){this.lexer=new qa(f,this.settings)},u.switchMode=function(f){this.mode=f},u.beginGroup=function(){this.macros.beginGroup()},u.endGroup=function(){this.macros.endGroup()},u.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},u.popToken=function(){return this.future(),this.stack.pop()},u.pushToken=function(f){this.stack.push(f)},u.pushTokens=function(f){var v;(v=this.stack).push.apply(v,f)},u.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},u.consumeArgs=function(f){for(var v=[],L=0;L<f;++L){this.consumeSpaces();var j=this.popToken();if(j.text==="{"){for(var be=[],Ie=1;Ie!==0;){var We=this.popToken();if(be.push(We),We.text==="{")++Ie;else if(We.text==="}")--Ie;else if(We.text==="EOF")throw new p("End of input in macro argument",j)}be.pop(),be.reverse(),v[L]=be}else{if(j.text==="EOF")throw new p("End of input expecting macro argument");v[L]=[j]}}return v},u.expandOnce=function(){var f=this.popToken(),v=f.text,L=this._getExpansion(v);if(L==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new p("Too many expansions: infinite loop or need to increase maxExpand setting");var j=L.tokens;if(L.numArgs){var be=this.consumeArgs(L.numArgs);j=j.slice();for(var Ie=j.length-1;Ie>=0;--Ie){var We=j[Ie];if(We.text==="#"){if(Ie===0)throw new p("Incomplete placeholder at end of macro body",We);if(We=j[--Ie],We.text==="#")j.splice(Ie+1,1);else if(/^[1-9]$/.test(We.text)){var vt;(vt=j).splice.apply(vt,[Ie,2].concat(be[+We.text-1]))}else throw new p("Not a valid argument number",We)}}}return this.pushTokens(j),j},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof de)if(f.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},u.expandMacro=function(f){if(this.macros.get(f)){var v=[],L=this.stack.length;for(this.pushToken(new de(f));this.stack.length>L;){var j=this.expandOnce();j instanceof de&&v.push(this.stack.pop())}return v}},u.expandMacroAsText=function(f){var v=this.expandMacro(f);return v&&v.map(function(L){return L.text}).join("")},u._getExpansion=function(f){var v=this.macros.get(f);if(v==null)return v;var L=typeof v=="function"?v(this):v;if(typeof L=="string"){var j=0;if(L.indexOf("#")!==-1)for(var be=L.replace(/##/g,"");be.indexOf("#"+(j+1))!==-1;)++j;for(var Ie=new qa(L,this.settings),We=[],vt=Ie.lex();vt.text!=="EOF";)We.push(vt),vt=Ie.lex();We.reverse();var Ot={tokens:We,numArgs:j};return Ot}return L},u.isDefined=function(f){return this.macros.has(f)||ra.hasOwnProperty(f)||Pt.math.hasOwnProperty(f)||Pt.text.hasOwnProperty(f)||ka.hasOwnProperty(f)},H}(),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"}},pa={\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"},Fi=function(){function H(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=H.prototype;return u.expect=function(f,v){if(v===void 0&&(v=!0),this.fetch().text!==f)throw new p("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());v&&this.consume()},u.consume=function(){this.nextToken=null},u.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},u.switchMode=function(f){this.mode=f,this.gullet.switchMode(f)},u.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var f=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),f},u.parseExpression=function(f,v){for(var L=[];;){this.mode==="math"&&this.consumeSpaces();var j=this.fetch();if(H.endOfExpression.indexOf(j.text)!==-1||v&&j.text===v||f&&ra[j.text]&&ra[j.text].infix)break;var be=this.parseAtom(v);if(!be)break;L.push(be)}return this.mode==="text"&&this.formLigatures(L),this.handleInfixNodes(L)},u.handleInfixNodes=function(f){for(var v=-1,L,j=0;j<f.length;j++){var be=jn(f[j],"infix");if(be){if(v!==-1)throw new p("only one infix operator per group",be.token);v=j,L=be.replaceWith}}if(v!==-1&&L){var Ie,We,vt=f.slice(0,v),Ot=f.slice(v+1);vt.length===1&&vt[0].type==="ordgroup"?Ie=vt[0]:Ie={type:"ordgroup",mode:this.mode,body:vt},Ot.length===1&&Ot[0].type==="ordgroup"?We=Ot[0]:We={type:"ordgroup",mode:this.mode,body:Ot};var Qt;return L==="\\\\abovefrac"?Qt=this.callFunction(L,[Ie,f[v],We],[]):Qt=this.callFunction(L,[Ie,We],[]),[Qt]}else return f},u.handleSupSubscript=function(f){var v=this.fetch(),L=v.text;this.consume();var j=this.parseGroup(f,!1,H.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!j)throw new p("Expected group after '"+L+"'",v);return j},u.formatUnsupportedCmd=function(f){for(var v=[],L=0;L<f.length;L++)v.push({type:"textord",mode:"text",text:f[L]});var j={type:"text",mode:this.mode,body:v},be={type:"color",mode:this.mode,color:this.settings.errorColor,body:[j]};return be},u.parseAtom=function(f){var v=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return v;for(var L,j;;){this.consumeSpaces();var be=this.fetch();if(be.text==="\\limits"||be.text==="\\nolimits"){var Ie=jn(v,"op");if(Ie){var We=be.text==="\\limits";Ie.limits=We,Ie.alwaysHandleSupSub=!0}else if(Ie=jn(v,"operatorname"),Ie&&Ie.alwaysHandleSupSub){var vt=be.text==="\\limits";Ie.limits=vt}else throw new p("Limit controls must follow a math operator",be);this.consume()}else if(be.text==="^"){if(L)throw new p("Double superscript",be);L=this.handleSupSubscript("superscript")}else if(be.text==="_"){if(j)throw new p("Double subscript",be);j=this.handleSupSubscript("subscript")}else if(be.text==="'"){if(L)throw new p("Double superscript",be);var Ot={type:"textord",mode:this.mode,text:"\\prime"},Qt=[Ot];for(this.consume();this.fetch().text==="'";)Qt.push(Ot),this.consume();this.fetch().text==="^"&&Qt.push(this.handleSupSubscript("superscript")),L={type:"ordgroup",mode:this.mode,body:Qt}}else break}return L||j?{type:"supsub",mode:this.mode,base:v,sup:L,sub:j}:v},u.parseFunction=function(f,v,L){var j=this.fetch(),be=j.text,Ie=ra[be];if(!Ie)return null;if(this.consume(),L!=null&&Ie.greediness<=L)throw new p("Got function '"+be+"' with no arguments"+(v?" as "+v:""),j);if(this.mode==="text"&&!Ie.allowedInText)throw new p("Can't use function '"+be+"' in text mode",j);if(this.mode==="math"&&Ie.allowedInMath===!1)throw new p("Can't use function '"+be+"' in math mode",j);var We=this.parseArguments(be,Ie),vt=We.args,Ot=We.optArgs;return this.callFunction(be,vt,Ot,j,f)},u.callFunction=function(f,v,L,j,be){var Ie={funcName:f,parser:this,token:j,breakOnTokenText:be},We=ra[f];if(We&&We.handler)return We.handler(Ie,v,L);throw new p("No function handler for "+f)},u.parseArguments=function(f,v){var L=v.numArgs+v.numOptionalArgs;if(L===0)return{args:[],optArgs:[]};for(var j=v.greediness,be=[],Ie=[],We=0;We<L;We++){var vt=v.argTypes&&v.argTypes[We],Ot=We<v.numOptionalArgs,Qt=We>0&&!Ot||We===0&&!Ot&&this.mode==="math",pn=this.parseGroupOfType("argument to '"+f+"'",vt,Ot,j,Qt);if(!pn){if(Ot){Ie.push(null);continue}throw new p("Expected group after '"+f+"'",this.fetch())}(Ot?Ie:be).push(pn)}return{args:be,optArgs:Ie}},u.parseGroupOfType=function(f,v,L,j,be){switch(v){case"color":return be&&this.consumeSpaces(),this.parseColorGroup(L);case"size":return be&&this.consumeSpaces(),this.parseSizeGroup(L);case"url":return this.parseUrlGroup(L,be);case"math":case"text":return this.parseGroup(f,L,j,void 0,v,be);case"hbox":{var Ie=this.parseGroup(f,L,j,void 0,"text",be);if(!Ie)return Ie;var We={type:"styling",mode:Ie.mode,body:[Ie],style:"text"};return We}case"raw":{if(be&&this.consumeSpaces(),L&&this.fetch().text==="{")return null;var vt=this.parseStringGroup("raw",L,!0);if(vt)return{type:"raw",mode:"text",string:vt.text};throw new p("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,L,j,void 0,void 0,be);default:throw new p("Unknown group type as "+f,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(f,v,L){var j=v?"[":"{",be=v?"]":"}",Ie=this.fetch();if(Ie.text!==j){if(v)return null;if(L&&Ie.text!=="EOF"&&/[^{}[\]]/.test(Ie.text))return this.consume(),Ie}var We=this.mode;this.mode="text",this.expect(j);for(var vt="",Ot=this.fetch(),Qt=0,pn=Ot,Sn;(Sn=this.fetch()).text!==be||L&&Qt>0;){switch(Sn.text){case"EOF":throw new p("Unexpected end of input in "+f,Ot.range(pn,vt));case j:Qt++;break;case be:Qt--;break}pn=Sn,vt+=pn.text,this.consume()}return this.expect(be),this.mode=We,Ot.range(pn,vt)},u.parseRegexGroup=function(f,v){var L=this.mode;this.mode="text";for(var j=this.fetch(),be=j,Ie="",We;(We=this.fetch()).text!=="EOF"&&f.test(Ie+We.text);)be=We,Ie+=be.text,this.consume();if(Ie==="")throw new p("Invalid "+v+": '"+j.text+"'",j);return this.mode=L,j.range(be,Ie)},u.parseColorGroup=function(f){var v=this.parseStringGroup("color",f);if(!v)return null;var L=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(v.text);if(!L)throw new p("Invalid color: '"+v.text+"'",v);var j=L[0];return/^[0-9a-f]{6}$/i.test(j)&&(j="#"+j),{type:"color-token",mode:this.mode,color:j}},u.parseSizeGroup=function(f){var v,L=!1;if(!f&&this.fetch().text!=="{"?v=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):v=this.parseStringGroup("size",f),!v)return null;!f&&v.text.length===0&&(v.text="0pt",L=!0);var j=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(v.text);if(!j)throw new p("Invalid size: '"+v.text+"'",v);var be={number:+(j[1]+j[2]),unit:j[3]};if(!Jt(be))throw new p("Invalid unit: '"+be.unit+"'",v);return{type:"size",mode:this.mode,value:be,isBlank:L}},u.parseUrlGroup=function(f,v){this.gullet.lexer.setCatcode("%",13);var L=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!L)return null;var j=L.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:j}},u.parseGroup=function(f,v,L,j,be,Ie){var We=this.mode;be&&this.switchMode(be),Ie&&this.consumeSpaces();var vt=this.fetch(),Ot=vt.text,Qt;if(v?Ot==="[":Ot==="{"||Ot==="\\begingroup"){this.consume();var pn=H.endOfGroup[Ot];this.gullet.beginGroup();var Sn=this.parseExpression(!1,pn),Un=this.fetch();this.expect(pn),this.gullet.endGroup(),Qt={type:"ordgroup",mode:this.mode,loc:Y.range(vt,Un),body:Sn,semisimple:Ot==="\\begingroup"||void 0}}else if(v)Qt=null;else if(Qt=this.parseFunction(j,f,L)||this.parseSymbol(),Qt==null&&Ot[0]==="\\"&&!ka.hasOwnProperty(Ot)){if(this.settings.throwOnError)throw new p("Undefined control sequence: "+Ot,vt);Qt=this.formatUnsupportedCmd(Ot),this.consume()}return be&&this.switchMode(We),Qt},u.formLigatures=function(f){for(var v=f.length-1,L=0;L<v;++L){var j=f[L],be=j.text;be==="-"&&f[L+1].text==="-"&&(L+1<v&&f[L+2].text==="-"?(f.splice(L,3,{type:"textord",mode:"text",loc:Y.range(j,f[L+2]),text:"---"}),v-=2):(f.splice(L,2,{type:"textord",mode:"text",loc:Y.range(j,f[L+1]),text:"--"}),v-=1)),(be==="'"||be==="`")&&f[L+1].text===be&&(f.splice(L,2,{type:"textord",mode:"text",loc:Y.range(j,f[L+1]),text:be+be}),v-=1)}},u.parseSymbol=function(){var f=this.fetch(),v=f.text;if(/^\\verb[^a-zA-Z]/.test(v)){this.consume();var L=v.slice(5),j=L.charAt(0)==="*";if(j&&(L=L.slice(1)),L.length<2||L.charAt(0)!==L.slice(-1))throw new p(`\\verb assertion failed --
|
|
|
please report what input caused this bug`);return L=L.slice(1,-1),{type:"verb",mode:"text",body:L,star:j}}pa.hasOwnProperty(v[0])&&!Pt[this.mode][v[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+v[0]+'" used in math mode',f),v=pa[v[0]]+v.substr(1));var be=Lo.exec(v);be&&(v=v.substring(0,be.index),v==="i"?v="\u0131":v==="j"&&(v="\u0237"));var Ie;if(Pt[this.mode][v]){this.settings.strict&&this.mode==="math"&&Qe.indexOf(v)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+v[0]+'" used in math mode',f);var We=Pt[this.mode][v].group,vt=Y.range(f),Ot;if(Et.hasOwnProperty(We)){var Qt=We;Ot={type:"atom",mode:this.mode,family:Qt,loc:vt,text:v}}else Ot={type:We,mode:this.mode,loc:vt,text:v};Ie=Ot}else if(v.charCodeAt(0)>=128)this.settings.strict&&(Ve(v.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+v[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+v[0]+'"'+(" ("+v.charCodeAt(0)+")"),f)),Ie={type:"textord",mode:"text",loc:Y.range(f),text:v};else return null;if(this.consume(),be)for(var pn=0;pn<be[0].length;pn++){var Sn=be[0][pn];if(!io[Sn])throw new p("Unknown accent ' "+Sn+"'",f);var Un=io[Sn][this.mode];if(!Un)throw new p("Accent "+Sn+" unsupported in "+this.mode+" mode",f);Ie={type:"accent",mode:this.mode,loc:Y.range(f),label:Un,isStretchy:!1,isShifty:!0,base:Ie}}return Ie},H}();Fi.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Fi.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Fi.SUPSUB_GREEDINESS=1;var ss=function(u,h){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new Fi(u,h);delete f.gullet.macros.current["\\df@tag"];var v=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!h.displayMode)throw new p("\\tag works only in display equations");f.gullet.feed("\\df@tag"),v=[{type:"tag",mode:"text",body:v,tag:f.parse()}]}return v},ia=ss,so=function(u,h,f){h.textContent="";var v=Ba(u,f).toNode();h.appendChild(v)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),so=function(){throw new p("KaTeX doesn't work in quirks mode.")});var ga=function(u,h){var f=Ba(u,h).toMarkup();return f},Mo=function(u,h){var f=new R(h);return ia(u,f)},ao=function(u,h,f){if(f.throwOnError||!(u instanceof p))throw u;var v=_t.makeSpan(["katex-error"],[new fe(h)]);return v.setAttribute("title",u.toString()),v.setAttribute("style","color:"+f.errorColor),v},Ba=function(u,h){var f=new R(h);try{var v=ia(u,f);return Lr(v,u,f)}catch(L){return ao(L,u,f)}},ko=function(u,h){var f=new R(h);try{var v=ia(u,f);return Jr(v,u,f)}catch(L){return ao(L,u,f)}},oo={version:"0.11.1",render:so,renderToString:ga,ParseError:p,__parse:Mo,__renderToDomTree:Ba,__renderToHTMLTree:ko,__setFontMetrics:st,__defineSymbol:x,__defineMacro:ke,__domTree:{Span:Ne,Anchor:Ce,SymbolNode:fe,SvgNode:_e,PathNode:Re,LineNode:$e}},Bo=b.default=oo}]).default})},32834:function(fn){(function(ut,b){fn.exports=b()})(this,function(){"use strict";function ut(Oe,Ue){for(var et=0;et<Ue.length;et++){var q=Ue[et];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(Oe,q.key,q)}}function b(Oe,Ue,et){return Ue&&ut(Oe.prototype,Ue),et&&ut(Oe,et),Oe}function y(Oe,Ue){if(Oe){if(typeof Oe=="string")return ce(Oe,Ue);var et=Object.prototype.toString.call(Oe).slice(8,-1);if(et==="Object"&&Oe.constructor&&(et=Oe.constructor.name),et==="Map"||et==="Set")return Array.from(Oe);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return ce(Oe,Ue)}}function ce(Oe,Ue){(Ue==null||Ue>Oe.length)&&(Ue=Oe.length);for(var et=0,q=new Array(Ue);et<Ue;et++)q[et]=Oe[et];return q}function Y(Oe,Ue){var et=typeof Symbol!="undefined"&&Oe[Symbol.iterator]||Oe["@@iterator"];if(et)return(et=et.call(Oe)).next.bind(et);if(Array.isArray(Oe)||(et=y(Oe))||Ue&&Oe&&typeof Oe.length=="number"){et&&(Oe=et);var q=0;return function(){return q>=Oe.length?{done:!0}:{done:!1,value:Oe[q++]}}}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 de={exports:{}};function $(){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 p(Oe){de.exports.defaults=Oe}de.exports={defaults:$(),getDefaults:$,changeDefaults:p};var ge=/[&<>"']/,le=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,A=/[<>"']|&(?!#?\w+;)/g,F={"&":"&","<":"<",">":">",'"':""","'":"'"},_=function(Ue){return F[Ue]};function E(Oe,Ue){if(Ue){if(ge.test(Oe))return Oe.replace(le,_)}else if(l.test(Oe))return Oe.replace(A,_);return Oe}var w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function O(Oe){return Oe.replace(w,function(Ue,et){return et=et.toLowerCase(),et==="colon"?":":et.charAt(0)==="#"?et.charAt(1)==="x"?String.fromCharCode(parseInt(et.substring(2),16)):String.fromCharCode(+et.substring(1)):""})}var X=/(^|[^\[])\^/g;function J(Oe,Ue){Oe=Oe.source||Oe,Ue=Ue||"";var et={replace:function(ne,we){return we=we.source||we,we=we.replace(X,"$1"),Oe=Oe.replace(ne,we),et},getRegex:function(){return new RegExp(Oe,Ue)}};return et}var U=/[^\w:]/g,R=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function z(Oe,Ue,et){if(Oe){var q;try{q=decodeURIComponent(O(et)).replace(U,"").toLowerCase()}catch(ne){return null}if(q.indexOf("javascript:")===0||q.indexOf("vbscript:")===0||q.indexOf("data:")===0)return null}Ue&&!R.test(et)&&(et=me(Ue,et));try{et=encodeURI(et).replace(/%25/g,"%")}catch(ne){return null}return et}var P={},N=/^[^:]+:\/*[^/]*$/,re=/^([^:]+:)[\s\S]*$/,ue=/^([^:]+:\/*[^/]*)[\s\S]*$/;function me(Oe,Ue){P[" "+Oe]||(N.test(Oe)?P[" "+Oe]=Oe+"/":P[" "+Oe]=at(Oe,"/",!0)),Oe=P[" "+Oe];var et=Oe.indexOf(":")===-1;return Ue.substring(0,2)==="//"?et?Ue:Oe.replace(re,"$1")+Ue:Ue.charAt(0)==="/"?et?Ue:Oe.replace(ue,"$1")+Ue:Oe+Ue}var Te={exec:function(){}};function Be(Oe){for(var Ue=1,et,q;Ue<arguments.length;Ue++){et=arguments[Ue];for(q in et)Object.prototype.hasOwnProperty.call(et,q)&&(Oe[q]=et[q])}return Oe}function Le(Oe,Ue){var et=Oe.replace(/\|/g,function(we,Fe,G){for(var St=!1,Ee=Fe;--Ee>=0&&G[Ee]==="\\";)St=!St;return St?"|":" |"}),q=et.split(/ \|/),ne=0;if(q.length>Ue)q.splice(Ue);else for(;q.length<Ue;)q.push("");for(;ne<q.length;ne++)q[ne]=q[ne].trim().replace(/\\\|/g,"|");return q}function at(Oe,Ue,et){var q=Oe.length;if(q===0)return"";for(var ne=0;ne<q;){var we=Oe.charAt(q-ne-1);if(we===Ue&&!et)ne++;else if(we!==Ue&&et)ne++;else break}return Oe.substr(0,q-ne)}function ie(Oe,Ue){if(Oe.indexOf(Ue[1])===-1)return-1;for(var et=Oe.length,q=0,ne=0;ne<et;ne++)if(Oe[ne]==="\\")ne++;else if(Oe[ne]===Ue[0])q++;else if(Oe[ne]===Ue[1]&&(q--,q<0))return ne;return-1}function K(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 I(Oe,Ue){if(Ue<1)return"";for(var et="";Ue>1;)Ue&1&&(et+=Oe),Ue>>=1,Oe+=Oe;return et+Oe}var ee={escape:E,unescape:O,edit:J,cleanUrl:z,resolveUrl:me,noopTest:Te,merge:Be,splitCells:Le,rtrim:at,findClosingBracket:ie,checkSanitizeDeprecation:K,repeatString:I},V=de.exports.defaults,he=ee.rtrim,S=ee.splitCells,C=ee.escape,Z=ee.findClosingBracket;function ye(Oe,Ue,et){var q=Ue.href,ne=Ue.title?C(Ue.title):null,we=Oe[1].replace(/\\([\[\]])/g,"$1");return Oe[0].charAt(0)!=="!"?{type:"link",raw:et,href:q,title:ne,text:we}:{type:"image",raw:et,href:q,title:ne,text:C(we)}}function Ve(Oe,Ue){var et=Oe.match(/^(\s+)(?:```)/);if(et===null)return Ue;var q=et[1];return Ue.split(`
|
|
|
`).map(function(ne){var we=ne.match(/^\s+/);if(we===null)return ne;var Fe=we[0];return Fe.length>=q.length?ne.slice(q.length):ne}).join(`
|
|
|
`)}var qe=function(){function Oe(et){this.options=et||V}var Ue=Oe.prototype;return Ue.space=function(q){var ne=this.rules.block.newline.exec(q);if(ne)return ne[0].length>1?{type:"space",raw:ne[0]}:{raw:`
|
|
|
`}},Ue.code=function(q){var ne=this.rules.block.code.exec(q);if(ne){var we=ne[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ne[0],codeBlockStyle:"indented",text:this.options.pedantic?we:he(we,`
|
|
|
`)}}},Ue.fences=function(q){var ne=this.rules.block.fences.exec(q);if(ne){var we=ne[0],Fe=Ve(we,ne[3]||"");return{type:"code",raw:we,lang:ne[2]?ne[2].trim():ne[2],text:Fe}}},Ue.heading=function(q){var ne=this.rules.block.heading.exec(q);if(ne){var we=ne[2].trim();if(/#$/.test(we)){var Fe=he(we,"#");(this.options.pedantic||!Fe||/ $/.test(Fe))&&(we=Fe.trim())}return{type:"heading",raw:ne[0],depth:ne[1].length,text:we}}},Ue.nptable=function(q){var ne=this.rules.block.nptable.exec(q);if(ne){var we={type:"table",header:S(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:ne[0]};if(we.header.length===we.align.length){var Fe=we.align.length,G;for(G=0;G<Fe;G++)/^ *-+: *$/.test(we.align[G])?we.align[G]="right":/^ *:-+: *$/.test(we.align[G])?we.align[G]="center":/^ *:-+ *$/.test(we.align[G])?we.align[G]="left":we.align[G]=null;for(Fe=we.cells.length,G=0;G<Fe;G++)we.cells[G]=S(we.cells[G],we.header.length);return we}}},Ue.hr=function(q){var ne=this.rules.block.hr.exec(q);if(ne)return{type:"hr",raw:ne[0]}},Ue.blockquote=function(q){var ne=this.rules.block.blockquote.exec(q);if(ne){var we=ne[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ne[0],text:we}}},Ue.list=function(q){var ne=this.rules.block.list.exec(q);if(ne){var we=ne[0],Fe=ne[2],G=Fe.length>1,St={type:"list",raw:we,ordered:G,start:G?+Fe.slice(0,-1):"",loose:!1,items:[]},Ee=ne[0].match(this.rules.block.item),Wt=!1,en,an,Zn,Rn,Cn,sr,dr,$n,qn,ln=Ee.length;Zn=this.rules.block.listItemStart.exec(Ee[0]);for(var $t=0;$t<ln;$t++){if(en=Ee[$t],we=en,this.options.pedantic||(qn=en.match(new RegExp("\\n\\s*\\n {0,"+(Zn[0].length-1)+"}\\S")),qn&&(Cn=en.length-qn.index+Ee.slice($t+1).join(`
|
|
|
`).length,St.raw=St.raw.substring(0,St.raw.length-Cn),en=en.substring(0,qn.index),we=en,ln=$t+1)),$t!==ln-1){if(Rn=this.rules.block.listItemStart.exec(Ee[$t+1]),this.options.pedantic?Rn[1].length>Zn[1].length:Rn[1].length>=Zn[0].length||Rn[1].length>3){Ee.splice($t,2,Ee[$t]+(!this.options.pedantic&&Rn[1].length<Zn[0].length&&!Ee[$t].match(/\n$/)?"":`
|
|
|
`)+Ee[$t+1]),$t--,ln--;continue}else(!this.options.pedantic||this.options.smartLists?Rn[2][Rn[2].length-1]!==Fe[Fe.length-1]:G===(Rn[2].length===1))&&(Cn=Ee.slice($t+1).join(`
|
|
|
`).length,St.raw=St.raw.substring(0,St.raw.length-Cn),$t=ln-1);Zn=Rn}an=en.length,en=en.replace(/^ *([*+-]|\d+[.)]) ?/,""),~en.indexOf(`
|
|
|
`)&&(an-=en.length,en=this.options.pedantic?en.replace(/^ {1,4}/gm,""):en.replace(new RegExp("^ {1,"+an+"}","gm"),"")),en=he(en,`
|
|
|
`),$t!==ln-1&&(we=we+`
|
|
|
`),sr=Wt||/\n\n(?!\s*$)/.test(we),$t!==ln-1&&(Wt=we.slice(-2)===`
|
|
|
|
|
|
`,sr||(sr=Wt)),sr&&(St.loose=!0),this.options.gfm&&(dr=/^\[[ xX]\] /.test(en),$n=void 0,dr&&($n=en[1]!==" ",en=en.replace(/^\[[ xX]\] +/,""))),St.items.push({type:"list_item",raw:we,task:dr,checked:$n,loose:sr,text:en})}return St}},Ue.html=function(q){var ne=this.rules.block.html.exec(q);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]):C(ne[0]):ne[0]}},Ue.def=function(q){var ne=this.rules.block.def.exec(q);if(ne){ne[3]&&(ne[3]=ne[3].substring(1,ne[3].length-1));var we=ne[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:we,raw:ne[0],href:ne[2],title:ne[3]}}},Ue.table=function(q){var ne=this.rules.block.table.exec(q);if(ne){var we={type:"table",header:S(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(we.header.length===we.align.length){we.raw=ne[0];var Fe=we.align.length,G;for(G=0;G<Fe;G++)/^ *-+: *$/.test(we.align[G])?we.align[G]="right":/^ *:-+: *$/.test(we.align[G])?we.align[G]="center":/^ *:-+ *$/.test(we.align[G])?we.align[G]="left":we.align[G]=null;for(Fe=we.cells.length,G=0;G<Fe;G++)we.cells[G]=S(we.cells[G].replace(/^ *\| *| *\| *$/g,""),we.header.length);return we}}},Ue.lheading=function(q){var ne=this.rules.block.lheading.exec(q);if(ne)return{type:"heading",raw:ne[0],depth:ne[2].charAt(0)==="="?1:2,text:ne[1]}},Ue.paragraph=function(q){var ne=this.rules.block.paragraph.exec(q);if(ne)return{type:"paragraph",raw:ne[0],text:ne[1].charAt(ne[1].length-1)===`
|
|
|
`?ne[1].slice(0,-1):ne[1]}},Ue.text=function(q){var ne=this.rules.block.text.exec(q);if(ne)return{type:"text",raw:ne[0],text:ne[0]}},Ue.escape=function(q){var ne=this.rules.inline.escape.exec(q);if(ne)return{type:"escape",raw:ne[0],text:C(ne[1])}},Ue.tag=function(q,ne,we){var Fe=this.rules.inline.tag.exec(q);if(Fe)return!ne&&/^<a /i.test(Fe[0])?ne=!0:ne&&/^<\/a>/i.test(Fe[0])&&(ne=!1),!we&&/^<(pre|code|kbd|script)(\s|>)/i.test(Fe[0])?we=!0:we&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Fe[0])&&(we=!1),{type:this.options.sanitize?"text":"html",raw:Fe[0],inLink:ne,inRawBlock:we,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):C(Fe[0]):Fe[0]}},Ue.link=function(q){var ne=this.rules.inline.link.exec(q);if(ne){var we=ne[2].trim();if(!this.options.pedantic&&/^</.test(we)){if(!/>$/.test(we))return;var Fe=he(we.slice(0,-1),"\\");if((we.length-Fe.length)%2===0)return}else{var G=Z(ne[2],"()");if(G>-1){var St=ne[0].indexOf("!")===0?5:4,Ee=St+ne[1].length+G;ne[2]=ne[2].substring(0,G),ne[0]=ne[0].substring(0,Ee).trim(),ne[3]=""}}var Wt=ne[2],en="";if(this.options.pedantic){var an=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Wt);an&&(Wt=an[1],en=an[3])}else en=ne[3]?ne[3].slice(1,-1):"";return Wt=Wt.trim(),/^</.test(Wt)&&(this.options.pedantic&&!/>$/.test(we)?Wt=Wt.slice(1):Wt=Wt.slice(1,-1)),ye(ne,{href:Wt&&Wt.replace(this.rules.inline._escapes,"$1"),title:en&&en.replace(this.rules.inline._escapes,"$1")},ne[0])}},Ue.reflink=function(q,ne){var we;if((we=this.rules.inline.reflink.exec(q))||(we=this.rules.inline.nolink.exec(q))){var Fe=(we[2]||we[1]).replace(/\s+/g," ");if(Fe=ne[Fe.toLowerCase()],!Fe||!Fe.href){var G=we[0].charAt(0);return{type:"text",raw:G,text:G}}return ye(we,Fe,we[0])}},Ue.emStrong=function(q,ne,we){we===void 0&&(we="");var Fe=this.rules.inline.emStrong.lDelim.exec(q);if(Fe&&!(Fe[3]&&we.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 G=Fe[1]||Fe[2]||"";if(!G||G&&(we===""||this.rules.inline.punctuation.exec(we))){var St=Fe[0].length-1,Ee,Wt,en=St,an=0,Zn=Fe[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Zn.lastIndex=0,ne=ne.slice(-1*q.length+St);(Fe=Zn.exec(ne))!=null;)if(Ee=Fe[1]||Fe[2]||Fe[3]||Fe[4]||Fe[5]||Fe[6],!!Ee){if(Wt=Ee.length,Fe[3]||Fe[4]){en+=Wt;continue}else if((Fe[5]||Fe[6])&&St%3&&!((St+Wt)%3)){an+=Wt;continue}if(en-=Wt,!(en>0))return Wt=Math.min(Wt,Wt+en+an),Math.min(St,Wt)%2?{type:"em",raw:q.slice(0,St+Fe.index+Wt+1),text:q.slice(1,St+Fe.index+Wt)}:{type:"strong",raw:q.slice(0,St+Fe.index+Wt+1),text:q.slice(2,St+Fe.index+Wt-1)}}}}},Ue.codespan=function(q){var ne=this.rules.inline.code.exec(q);if(ne){var we=ne[2].replace(/\n/g," "),Fe=/[^ ]/.test(we),G=/^ /.test(we)&&/ $/.test(we);return Fe&&G&&(we=we.substring(1,we.length-1)),we=C(we,!0),{type:"codespan",raw:ne[0],text:we}}},Ue.br=function(q){var ne=this.rules.inline.br.exec(q);if(ne)return{type:"br",raw:ne[0]}},Ue.del=function(q){var ne=this.rules.inline.del.exec(q);if(ne)return{type:"del",raw:ne[0],text:ne[2]}},Ue.autolink=function(q,ne){var we=this.rules.inline.autolink.exec(q);if(we){var Fe,G;return we[2]==="@"?(Fe=C(this.options.mangle?ne(we[1]):we[1]),G="mailto:"+Fe):(Fe=C(we[1]),G=Fe),{type:"link",raw:we[0],text:Fe,href:G,tokens:[{type:"text",raw:Fe,text:Fe}]}}},Ue.url=function(q,ne){var we;if(we=this.rules.inline.url.exec(q)){var Fe,G;if(we[2]==="@")Fe=C(this.options.mangle?ne(we[0]):we[0]),G="mailto:"+Fe;else{var St;do St=we[0],we[0]=this.rules.inline._backpedal.exec(we[0])[0];while(St!==we[0]);Fe=C(we[0]),we[1]==="www."?G="http://"+Fe:G=Fe}return{type:"link",raw:we[0],text:Fe,href:G,tokens:[{type:"text",raw:Fe,text:Fe}]}}},Ue.inlineText=function(q,ne,we){var Fe=this.rules.inline.text.exec(q);if(Fe){var G;return ne?G=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Fe[0]):C(Fe[0]):Fe[0]:G=C(this.options.smartypants?we(Fe[0]):Fe[0]),{type:"text",raw:Fe[0],text:G}}},Oe}(),gt=ee.noopTest,yt=ee.edit,Dt=ee.merge,Ut={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:gt,table:gt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ut._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ut._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ut.def=yt(Ut.def).replace("label",Ut._label).replace("title",Ut._title).getRegex(),Ut.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ut.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Ut.item=yt(Ut.item,"gm").replace(/bull/g,Ut.bullet).getRegex(),Ut.listItemStart=yt(/^( *)(bull) */).replace("bull",Ut.bullet).getRegex(),Ut.list=yt(Ut.list).replace(/bull/g,Ut.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ut.def.source+")").getRegex(),Ut._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",Ut._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Ut.html=yt(Ut.html,"i").replace("comment",Ut._comment).replace("tag",Ut._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ut.paragraph=yt(Ut._paragraph).replace("hr",Ut.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",Ut._tag).getRegex(),Ut.blockquote=yt(Ut.blockquote).replace("paragraph",Ut.paragraph).getRegex(),Ut.normal=Dt({},Ut),Ut.gfm=Dt({},Ut.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*|$)"}),Ut.gfm.nptable=yt(Ut.gfm.nptable).replace("hr",Ut.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",Ut._tag).getRegex(),Ut.gfm.table=yt(Ut.gfm.table).replace("hr",Ut.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",Ut._tag).getRegex(),Ut.pedantic=Dt({},Ut.normal,{html:yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ut._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gt,paragraph:yt(Ut.normal._paragraph).replace("hr",Ut.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",Ut.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ot={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:gt,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:gt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ot._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ot.punctuation=yt(ot.punctuation).replace(/punctuation/g,ot._punctuation).getRegex(),ot.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ot.escapedEmSt=/\\\*|\\_/g,ot._comment=yt(Ut._comment).replace("(?:-->|$)","-->").getRegex(),ot.emStrong.lDelim=yt(ot.emStrong.lDelim).replace(/punct/g,ot._punctuation).getRegex(),ot.emStrong.rDelimAst=yt(ot.emStrong.rDelimAst,"g").replace(/punct/g,ot._punctuation).getRegex(),ot.emStrong.rDelimUnd=yt(ot.emStrong.rDelimUnd,"g").replace(/punct/g,ot._punctuation).getRegex(),ot._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ot._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ot._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])?)+(?![-_])/,ot.autolink=yt(ot.autolink).replace("scheme",ot._scheme).replace("email",ot._email).getRegex(),ot._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ot.tag=yt(ot.tag).replace("comment",ot._comment).replace("attribute",ot._attribute).getRegex(),ot._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ot._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ot._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ot.link=yt(ot.link).replace("label",ot._label).replace("href",ot._href).replace("title",ot._title).getRegex(),ot.reflink=yt(ot.reflink).replace("label",ot._label).getRegex(),ot.reflinkSearch=yt(ot.reflinkSearch,"g").replace("reflink",ot.reflink).replace("nolink",ot.nolink).getRegex(),ot.normal=Dt({},ot),ot.pedantic=Dt({},ot.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:yt(/^!?\[(label)\]\((.*?)\)/).replace("label",ot._label).getRegex(),reflink:yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ot._label).getRegex()}),ot.gfm=Dt({},ot.normal,{escape:yt(ot.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ot.gfm.url=yt(ot.gfm.url,"i").replace("email",ot.gfm._extended_email).getRegex(),ot.breaks=Dt({},ot.gfm,{br:yt(ot.br).replace("{2,}","*").getRegex(),text:yt(ot.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var kt={block:Ut,inline:ot},tt=qe,Gt=de.exports.defaults,Xe=kt.block,Ke=kt.inline,Ae=ee.repeatString;function xe(Oe){return Oe.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 se(Oe){var Ue="",et,q,ne=Oe.length;for(et=0;et<ne;et++)q=Oe.charCodeAt(et),Math.random()>.5&&(q="x"+q.toString(16)),Ue+="&#"+q+";";return Ue}var Ne=function(){function Oe(et){this.tokens=[],this.tokens.links=Object.create(null),this.options=et||Gt,this.options.tokenizer=this.options.tokenizer||new tt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var q={block:Xe.normal,inline:Ke.normal};this.options.pedantic?(q.block=Xe.pedantic,q.inline=Ke.pedantic):this.options.gfm&&(q.block=Xe.gfm,this.options.breaks?q.inline=Ke.breaks:q.inline=Ke.gfm),this.tokenizer.rules=q}Oe.lex=function(q,ne){var we=new Oe(ne);return we.lex(q)},Oe.lexInline=function(q,ne){var we=new Oe(ne);return we.inlineTokens(q)};var Ue=Oe.prototype;return Ue.lex=function(q){return q=q.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(q,this.tokens,!0),this.inline(this.tokens),this.tokens},Ue.blockTokens=function(q,ne,we){ne===void 0&&(ne=[]),we===void 0&&(we=!0),this.options.pedantic&&(q=q.replace(/^ +$/gm,""));for(var Fe,G,St,Ee;q;){if(Fe=this.tokenizer.space(q)){q=q.substring(Fe.raw.length),Fe.type&&ne.push(Fe);continue}if(Fe=this.tokenizer.code(q)){q=q.substring(Fe.raw.length),Ee=ne[ne.length-1],Ee&&Ee.type==="paragraph"?(Ee.raw+=`
|
|
|
`+Fe.raw,Ee.text+=`
|
|
|
`+Fe.text):ne.push(Fe);continue}if(Fe=this.tokenizer.fences(q)){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(Fe=this.tokenizer.heading(q)){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(Fe=this.tokenizer.nptable(q)){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(Fe=this.tokenizer.hr(q)){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(Fe=this.tokenizer.blockquote(q)){q=q.substring(Fe.raw.length),Fe.tokens=this.blockTokens(Fe.text,[],we),ne.push(Fe);continue}if(Fe=this.tokenizer.list(q)){for(q=q.substring(Fe.raw.length),St=Fe.items.length,G=0;G<St;G++)Fe.items[G].tokens=this.blockTokens(Fe.items[G].text,[],!1);ne.push(Fe);continue}if(Fe=this.tokenizer.html(q)){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(we&&(Fe=this.tokenizer.def(q))){q=q.substring(Fe.raw.length),this.tokens.links[Fe.tag]||(this.tokens.links[Fe.tag]={href:Fe.href,title:Fe.title});continue}if(Fe=this.tokenizer.table(q)){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(Fe=this.tokenizer.lheading(q)){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(we&&(Fe=this.tokenizer.paragraph(q))){q=q.substring(Fe.raw.length),ne.push(Fe);continue}if(Fe=this.tokenizer.text(q)){q=q.substring(Fe.raw.length),Ee=ne[ne.length-1],Ee&&Ee.type==="text"?(Ee.raw+=`
|
|
|
`+Fe.raw,Ee.text+=`
|
|
|
`+Fe.text):ne.push(Fe);continue}if(q){var Wt="Infinite loop on byte: "+q.charCodeAt(0);if(this.options.silent){console.error(Wt);break}else throw new Error(Wt)}}return ne},Ue.inline=function(q){var ne,we,Fe,G,St,Ee,Wt=q.length;for(ne=0;ne<Wt;ne++)switch(Ee=q[ne],Ee.type){case"paragraph":case"text":case"heading":{Ee.tokens=[],this.inlineTokens(Ee.text,Ee.tokens);break}case"table":{for(Ee.tokens={header:[],cells:[]},G=Ee.header.length,we=0;we<G;we++)Ee.tokens.header[we]=[],this.inlineTokens(Ee.header[we],Ee.tokens.header[we]);for(G=Ee.cells.length,we=0;we<G;we++)for(St=Ee.cells[we],Ee.tokens.cells[we]=[],Fe=0;Fe<St.length;Fe++)Ee.tokens.cells[we][Fe]=[],this.inlineTokens(St[Fe],Ee.tokens.cells[we][Fe]);break}case"blockquote":{this.inline(Ee.tokens);break}case"list":{for(G=Ee.items.length,we=0;we<G;we++)this.inline(Ee.items[we].tokens);break}}return q},Ue.inlineTokens=function(q,ne,we,Fe){ne===void 0&&(ne=[]),we===void 0&&(we=!1),Fe===void 0&&(Fe=!1);var G,St,Ee=q,Wt,en,an;if(this.tokens.links){var Zn=Object.keys(this.tokens.links);if(Zn.length>0)for(;(Wt=this.tokenizer.rules.inline.reflinkSearch.exec(Ee))!=null;)Zn.includes(Wt[0].slice(Wt[0].lastIndexOf("[")+1,-1))&&(Ee=Ee.slice(0,Wt.index)+"["+Ae("a",Wt[0].length-2)+"]"+Ee.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Wt=this.tokenizer.rules.inline.blockSkip.exec(Ee))!=null;)Ee=Ee.slice(0,Wt.index)+"["+Ae("a",Wt[0].length-2)+"]"+Ee.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Wt=this.tokenizer.rules.inline.escapedEmSt.exec(Ee))!=null;)Ee=Ee.slice(0,Wt.index)+"++"+Ee.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;q;){if(en||(an=""),en=!1,G=this.tokenizer.escape(q)){q=q.substring(G.raw.length),ne.push(G);continue}if(G=this.tokenizer.tag(q,we,Fe)){q=q.substring(G.raw.length),we=G.inLink,Fe=G.inRawBlock;var Rn=ne[ne.length-1];Rn&&G.type==="text"&&Rn.type==="text"?(Rn.raw+=G.raw,Rn.text+=G.text):ne.push(G);continue}if(G=this.tokenizer.link(q)){q=q.substring(G.raw.length),G.type==="link"&&(G.tokens=this.inlineTokens(G.text,[],!0,Fe)),ne.push(G);continue}if(G=this.tokenizer.reflink(q,this.tokens.links)){q=q.substring(G.raw.length);var Cn=ne[ne.length-1];G.type==="link"?(G.tokens=this.inlineTokens(G.text,[],!0,Fe),ne.push(G)):Cn&&G.type==="text"&&Cn.type==="text"?(Cn.raw+=G.raw,Cn.text+=G.text):ne.push(G);continue}if(G=this.tokenizer.emStrong(q,Ee,an)){q=q.substring(G.raw.length),G.tokens=this.inlineTokens(G.text,[],we,Fe),ne.push(G);continue}if(G=this.tokenizer.codespan(q)){q=q.substring(G.raw.length),ne.push(G);continue}if(G=this.tokenizer.br(q)){q=q.substring(G.raw.length),ne.push(G);continue}if(G=this.tokenizer.del(q)){q=q.substring(G.raw.length),G.tokens=this.inlineTokens(G.text,[],we,Fe),ne.push(G);continue}if(G=this.tokenizer.autolink(q,se)){q=q.substring(G.raw.length),ne.push(G);continue}if(!we&&(G=this.tokenizer.url(q,se))){q=q.substring(G.raw.length),ne.push(G);continue}if(G=this.tokenizer.inlineText(q,Fe,xe)){q=q.substring(G.raw.length),G.raw.slice(-1)!=="_"&&(an=G.raw.slice(-1)),en=!0,St=ne[ne.length-1],St&&St.type==="text"?(St.raw+=G.raw,St.text+=G.text):ne.push(G);continue}if(q){var sr="Infinite loop on byte: "+q.charCodeAt(0);if(this.options.silent){console.error(sr);break}else throw new Error(sr)}}return ne},b(Oe,null,[{key:"rules",get:function(){return{block:Xe,inline:Ke}}}]),Oe}(),Ce=de.exports.defaults,Se=ee.cleanUrl,M=ee.escape,fe=function(){function Oe(et){this.options=et||Ce}var Ue=Oe.prototype;return Ue.code=function(q,ne,we){var Fe=(ne||"").match(/\S*/)[0];if(this.options.highlight){var G=this.options.highlight(q,Fe);G!=null&&G!==q&&(we=!0,q=G)}return q=q.replace(/\n$/,"")+`
|
|
|
`,Fe?'<pre><code class="'+this.options.langPrefix+M(Fe,!0)+'">'+(we?q:M(q,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(we?q:M(q,!0))+`</code></pre>
|
|
|
`},Ue.blockquote=function(q){return`<blockquote>
|
|
|
`+q+`</blockquote>
|
|
|
`},Ue.html=function(q){return q},Ue.heading=function(q,ne,we,Fe){return this.options.headerIds?"<h"+ne+' id="'+this.options.headerPrefix+Fe.slug(we)+'">'+q+"</h"+ne+`>
|
|
|
`:"<h"+ne+">"+q+"</h"+ne+`>
|
|
|
`},Ue.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Ue.list=function(q,ne,we){var Fe=ne?"ol":"ul",G=ne&&we!==1?' start="'+we+'"':"";return"<"+Fe+G+`>
|
|
|
`+q+"</"+Fe+`>
|
|
|
`},Ue.listitem=function(q){return"<li>"+q+`</li>
|
|
|
`},Ue.checkbox=function(q){return"<input "+(q?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ue.paragraph=function(q){return"<p>"+q+`</p>
|
|
|
`},Ue.table=function(q,ne){return ne&&(ne="<tbody>"+ne+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+q+`</thead>
|
|
|
`+ne+`</table>
|
|
|
`},Ue.tablerow=function(q){return`<tr>
|
|
|
`+q+`</tr>
|
|
|
`},Ue.tablecell=function(q,ne){var we=ne.header?"th":"td",Fe=ne.align?"<"+we+' align="'+ne.align+'">':"<"+we+">";return Fe+q+"</"+we+`>
|
|
|
`},Ue.strong=function(q){return"<strong>"+q+"</strong>"},Ue.em=function(q){return"<em>"+q+"</em>"},Ue.codespan=function(q){return"<code>"+q+"</code>"},Ue.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ue.del=function(q){return"<del>"+q+"</del>"},Ue.link=function(q,ne,we){if(q=Se(this.options.sanitize,this.options.baseUrl,q),q===null)return we;var Fe='<a href="'+M(q)+'"';return ne&&(Fe+=' title="'+ne+'"'),Fe+=">"+we+"</a>",Fe},Ue.image=function(q,ne,we){if(q=Se(this.options.sanitize,this.options.baseUrl,q),q===null)return we;var Fe='<img src="'+q+'" alt="'+we+'"';return ne&&(Fe+=' title="'+ne+'"'),Fe+=this.options.xhtml?"/>":">",Fe},Ue.text=function(q){return q},Oe}(),_e=function(){function Oe(){}var Ue=Oe.prototype;return Ue.strong=function(q){return q},Ue.em=function(q){return q},Ue.codespan=function(q){return q},Ue.del=function(q){return q},Ue.html=function(q){return q},Ue.text=function(q){return q},Ue.link=function(q,ne,we){return""+we},Ue.image=function(q,ne,we){return""+we},Ue.br=function(){return""},Oe}(),Re=function(){function Oe(){this.seen={}}var Ue=Oe.prototype;return Ue.serialize=function(q){return q.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ue.getNextSafeSlug=function(q,ne){var we=q,Fe=0;if(this.seen.hasOwnProperty(we)){Fe=this.seen[q];do Fe++,we=q+"-"+Fe;while(this.seen.hasOwnProperty(we))}return ne||(this.seen[q]=Fe,this.seen[we]=0),we},Ue.slug=function(q,ne){ne===void 0&&(ne={});var we=this.serialize(q);return this.getNextSafeSlug(we,ne.dryrun)},Oe}(),$e=fe,rt=_e,it=Re,te=de.exports.defaults,Q=ee.unescape,lt=function(){function Oe(et){this.options=et||te,this.options.renderer=this.options.renderer||new $e,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new rt,this.slugger=new it}Oe.parse=function(q,ne){var we=new Oe(ne);return we.parse(q)},Oe.parseInline=function(q,ne){var we=new Oe(ne);return we.parseInline(q)};var Ue=Oe.prototype;return Ue.parse=function(q,ne){ne===void 0&&(ne=!0);var we="",Fe,G,St,Ee,Wt,en,an,Zn,Rn,Cn,sr,dr,$n,qn,ln,$t,Vt,An,Xn=q.length;for(Fe=0;Fe<Xn;Fe++)switch(Cn=q[Fe],Cn.type){case"space":continue;case"hr":{we+=this.renderer.hr();continue}case"heading":{we+=this.renderer.heading(this.parseInline(Cn.tokens),Cn.depth,Q(this.parseInline(Cn.tokens,this.textRenderer)),this.slugger);continue}case"code":{we+=this.renderer.code(Cn.text,Cn.lang,Cn.escaped);continue}case"table":{for(Zn="",an="",Ee=Cn.header.length,G=0;G<Ee;G++)an+=this.renderer.tablecell(this.parseInline(Cn.tokens.header[G]),{header:!0,align:Cn.align[G]});for(Zn+=this.renderer.tablerow(an),Rn="",Ee=Cn.cells.length,G=0;G<Ee;G++){for(en=Cn.tokens.cells[G],an="",Wt=en.length,St=0;St<Wt;St++)an+=this.renderer.tablecell(this.parseInline(en[St]),{header:!1,align:Cn.align[St]});Rn+=this.renderer.tablerow(an)}we+=this.renderer.table(Zn,Rn);continue}case"blockquote":{Rn=this.parse(Cn.tokens),we+=this.renderer.blockquote(Rn);continue}case"list":{for(sr=Cn.ordered,dr=Cn.start,$n=Cn.loose,Ee=Cn.items.length,Rn="",G=0;G<Ee;G++)ln=Cn.items[G],$t=ln.checked,Vt=ln.task,qn="",ln.task&&(An=this.renderer.checkbox($t),$n?ln.tokens.length>0&&ln.tokens[0].type==="text"?(ln.tokens[0].text=An+" "+ln.tokens[0].text,ln.tokens[0].tokens&&ln.tokens[0].tokens.length>0&&ln.tokens[0].tokens[0].type==="text"&&(ln.tokens[0].tokens[0].text=An+" "+ln.tokens[0].tokens[0].text)):ln.tokens.unshift({type:"text",text:An}):qn+=An),qn+=this.parse(ln.tokens,$n),Rn+=this.renderer.listitem(qn,Vt,$t);we+=this.renderer.list(Rn,sr,dr);continue}case"html":{we+=this.renderer.html(Cn.text);continue}case"paragraph":{we+=this.renderer.paragraph(this.parseInline(Cn.tokens));continue}case"text":{for(Rn=Cn.tokens?this.parseInline(Cn.tokens):Cn.text;Fe+1<Xn&&q[Fe+1].type==="text";)Cn=q[++Fe],Rn+=`
|
|
|
`+(Cn.tokens?this.parseInline(Cn.tokens):Cn.text);we+=ne?this.renderer.paragraph(Rn):Rn;continue}default:{var Qe='Token with "'+Cn.type+'" type was not found.';if(this.options.silent){console.error(Qe);return}else throw new Error(Qe)}}return we},Ue.parseInline=function(q,ne){ne=ne||this.renderer;var we="",Fe,G,St=q.length;for(Fe=0;Fe<St;Fe++)switch(G=q[Fe],G.type){case"escape":{we+=ne.text(G.text);break}case"html":{we+=ne.html(G.text);break}case"link":{we+=ne.link(G.href,G.title,this.parseInline(G.tokens,ne));break}case"image":{we+=ne.image(G.href,G.title,G.text);break}case"strong":{we+=ne.strong(this.parseInline(G.tokens,ne));break}case"em":{we+=ne.em(this.parseInline(G.tokens,ne));break}case"codespan":{we+=ne.codespan(G.text);break}case"br":{we+=ne.br();break}case"del":{we+=ne.del(this.parseInline(G.tokens,ne));break}case"text":{we+=ne.text(G.text);break}default:{var Ee='Token with "'+G.type+'" type was not found.';if(this.options.silent){console.error(Ee);return}else throw new Error(Ee)}}return we},Oe}(),st=Ne,ht=lt,bt=qe,He=fe,Et=_e,pt=Re,ft=ee.merge,Pt=ee.checkSanitizeDeprecation,x=ee.escape,D=de.exports.getDefaults,Ye=de.exports.changeDefaults,W=de.exports.defaults;function pe(Oe,Ue,et){if(typeof Oe=="undefined"||Oe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Oe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Oe)+", string expected");if(typeof Ue=="function"&&(et=Ue,Ue=null),Ue=ft({},pe.defaults,Ue||{}),Pt(Ue),et){var q=Ue.highlight,ne;try{ne=st.lex(Oe,Ue)}catch(St){return et(St)}var we=function(Ee){var Wt;if(!Ee)try{Ue.walkTokens&&pe.walkTokens(ne,Ue.walkTokens),Wt=ht.parse(ne,Ue)}catch(en){Ee=en}return Ue.highlight=q,Ee?et(Ee):et(null,Wt)};if(!q||q.length<3||(delete Ue.highlight,!ne.length))return we();var Fe=0;pe.walkTokens(ne,function(St){St.type==="code"&&(Fe++,setTimeout(function(){q(St.text,St.lang,function(Ee,Wt){if(Ee)return we(Ee);Wt!=null&&Wt!==St.text&&(St.text=Wt,St.escaped=!0),Fe--,Fe===0&&we()})},0))}),Fe===0&&we();return}try{var G=st.lex(Oe,Ue);return Ue.walkTokens&&pe.walkTokens(G,Ue.walkTokens),ht.parse(G,Ue)}catch(St){if(St.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Ue.silent)return"<p>An error occurred:</p><pre>"+x(St.message+"",!0)+"</pre>";throw St}}pe.options=pe.setOptions=function(Oe){return ft(pe.defaults,Oe),Ye(pe.defaults),pe},pe.getDefaults=D,pe.defaults=W,pe.use=function(Oe){var Ue=ft({},Oe);if(Oe.renderer&&function(){var q=pe.defaults.renderer||new He,ne=function(G){var St=q[G];q[G]=function(){for(var Ee=arguments.length,Wt=new Array(Ee),en=0;en<Ee;en++)Wt[en]=arguments[en];var an=Oe.renderer[G].apply(q,Wt);return an===!1&&(an=St.apply(q,Wt)),an}};for(var we in Oe.renderer)ne(we);Ue.renderer=q}(),Oe.tokenizer&&function(){var q=pe.defaults.tokenizer||new bt,ne=function(G){var St=q[G];q[G]=function(){for(var Ee=arguments.length,Wt=new Array(Ee),en=0;en<Ee;en++)Wt[en]=arguments[en];var an=Oe.tokenizer[G].apply(q,Wt);return an===!1&&(an=St.apply(q,Wt)),an}};for(var we in Oe.tokenizer)ne(we);Ue.tokenizer=q}(),Oe.walkTokens){var et=pe.defaults.walkTokens;Ue.walkTokens=function(q){Oe.walkTokens(q),et&&et(q)}}pe.setOptions(Ue)},pe.walkTokens=function(Oe,Ue){for(var et=Y(Oe),q;!(q=et()).done;){var ne=q.value;switch(Ue(ne),ne.type){case"table":{for(var we=Y(ne.tokens.header),Fe;!(Fe=we()).done;){var G=Fe.value;pe.walkTokens(G,Ue)}for(var St=Y(ne.tokens.cells),Ee;!(Ee=St()).done;)for(var Wt=Ee.value,en=Y(Wt),an;!(an=en()).done;){var Zn=an.value;pe.walkTokens(Zn,Ue)}break}case"list":{pe.walkTokens(ne.items,Ue);break}default:ne.tokens&&pe.walkTokens(ne.tokens,Ue)}}},pe.parseInline=function(Oe,Ue){if(typeof Oe=="undefined"||Oe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Oe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Oe)+", string expected");Ue=ft({},pe.defaults,Ue||{}),Pt(Ue);try{var et=st.lexInline(Oe,Ue);return Ue.walkTokens&&pe.walkTokens(et,Ue.walkTokens),ht.parseInline(et,Ue)}catch(q){if(q.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Ue.silent)return"<p>An error occurred:</p><pre>"+x(q.message+"",!0)+"</pre>";throw q}},pe.Parser=ht,pe.parser=ht.parse,pe.Renderer=He,pe.TextRenderer=Et,pe.Lexer=st,pe.lexer=st.lex,pe.Tokenizer=bt,pe.Slugger=pt,pe.parse=pe;var Bt=pe;return Bt})},11690:function(fn){const ut=/[&<>"']/,b=/[&<>"']/g,y=/[<>"']|&(?!#?\w+;)/,ce=/[<>"']|&(?!#?\w+;)/g,Y={"&":"&","<":"<",">":">",'"':""","'":"'"},de=me=>Y[me];function $(me,Te){if(Te){if(ut.test(me))return me.replace(b,de)}else if(y.test(me))return me.replace(ce,de);return me}const p=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ge(me){return me.replace(p,(Te,Be)=>(Be=Be.toLowerCase(),Be==="colon"?":":Be.charAt(0)==="#"?Be.charAt(1)==="x"?String.fromCharCode(parseInt(Be.substring(2),16)):String.fromCharCode(+Be.substring(1)):""))}const le=/(^|[^\[])\^/g;function l(me,Te){me=me.source||me,Te=Te||"";const Be={replace:(Le,at)=>(at=at.source||at,at=at.replace(le,"$1"),me=me.replace(Le,at),Be),getRegex:()=>new RegExp(me,Te)};return Be}const A=/[^\w:]/g,F=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function _(me,Te,Be){if(me){let Le;try{Le=decodeURIComponent(ge(Be)).replace(A,"").toLowerCase()}catch(at){return null}if(Le.indexOf("javascript:")===0||Le.indexOf("vbscript:")===0||Le.indexOf("data:")===0)return null}Te&&!F.test(Be)&&(Be=J(Te,Be));try{Be=encodeURI(Be).replace(/%25/g,"%")}catch(Le){return null}return Be}const E={},w=/^[^:]+:\/*[^/]*$/,O=/^([^:]+:)[\s\S]*$/,X=/^([^:]+:\/*[^/]*)[\s\S]*$/;function J(me,Te){E[" "+me]||(w.test(me)?E[" "+me]=me+"/":E[" "+me]=P(me,"/",!0)),me=E[" "+me];const Be=me.indexOf(":")===-1;return Te.substring(0,2)==="//"?Be?Te:me.replace(O,"$1")+Te:Te.charAt(0)==="/"?Be?Te:me.replace(X,"$1")+Te:me+Te}const U={exec:function(){}};function R(me){let Te=1,Be,Le;for(;Te<arguments.length;Te++){Be=arguments[Te];for(Le in Be)Object.prototype.hasOwnProperty.call(Be,Le)&&(me[Le]=Be[Le])}return me}function z(me,Te){const Be=me.replace(/\|/g,(ie,K,I)=>{let ee=!1,V=K;for(;--V>=0&&I[V]==="\\";)ee=!ee;return ee?"|":" |"}),Le=Be.split(/ \|/);let at=0;if(Le.length>Te)Le.splice(Te);else for(;Le.length<Te;)Le.push("");for(;at<Le.length;at++)Le[at]=Le[at].trim().replace(/\\\|/g,"|");return Le}function P(me,Te,Be){const Le=me.length;if(Le===0)return"";let at=0;for(;at<Le;){const ie=me.charAt(Le-at-1);if(ie===Te&&!Be)at++;else if(ie!==Te&&Be)at++;else break}return me.substr(0,Le-at)}function N(me,Te){if(me.indexOf(Te[1])===-1)return-1;const Be=me.length;let Le=0,at=0;for(;at<Be;at++)if(me[at]==="\\")at++;else if(me[at]===Te[0])Le++;else if(me[at]===Te[1]&&(Le--,Le<0))return at;return-1}function re(me){me&&me.sanitize&&!me.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 ue(me,Te){if(Te<1)return"";let Be="";for(;Te>1;)Te&1&&(Be+=me),Te>>=1,me+=me;return Be+me}fn.exports={escape:$,unescape:ge,edit:l,cleanUrl:_,resolveUrl:J,noopTest:U,merge:R,splitCells:z,rtrim:P,findClosingBracket:N,checkSanitizeDeprecation:re,repeatString:ue}},75918:function(fn,ut,b){"use strict";b.d(ut,{Wi:function(){return p},Z0:function(){return ge},aU:function(){return $},eZ:function(){return l},wY:function(){return le}});var y=b(4348),ce=b(69323),Y=b(13268),de=function(A,F,_,E){function w(O){return O instanceof _?O:new _(function(X){X(O)})}return new(_||(_=Promise))(function(O,X){function J(z){try{R(E.next(z))}catch(P){X(P)}}function U(z){try{R(E.throw(z))}catch(P){X(P)}}function R(z){z.done?O(z.value):w(z.value).then(J,U)}R((E=E.apply(A,F||[])).next())})};class $ extends ce.JT{constructor(F,_="",E="",w=!0,O){super(),this._onDidChange=this._register(new y.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=F,this._label=_,this._cssClass=E,this._enabled=w,this._actionCallback=O}get id(){return this._id}get label(){return this._label}set label(F){this._setLabel(F)}_setLabel(F){this._label!==F&&(this._label=F,this._onDidChange.fire({label:F}))}get tooltip(){return this._tooltip||""}set tooltip(F){this._setTooltip(F)}_setTooltip(F){this._tooltip!==F&&(this._tooltip=F,this._onDidChange.fire({tooltip:F}))}get class(){return this._cssClass}set class(F){this._setClass(F)}_setClass(F){this._cssClass!==F&&(this._cssClass=F,this._onDidChange.fire({class:F}))}get enabled(){return this._enabled}set enabled(F){this._setEnabled(F)}_setEnabled(F){this._enabled!==F&&(this._enabled=F,this._onDidChange.fire({enabled:F}))}get checked(){return this._checked}set checked(F){this._setChecked(F)}_setChecked(F){this._checked!==F&&(this._checked=F,this._onDidChange.fire({checked:F}))}run(F,_){return de(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(F))})}}class p extends ce.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new y.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new y.Q5),this.onDidRun=this._onDidRun.event}run(F,_){return de(this,void 0,void 0,function*(){if(!F.enabled)return;this._onBeforeRun.fire({action:F});let E;try{yield this.runAction(F,_)}catch(w){E=w}this._onDidRun.fire({action:F,error:E})})}runAction(F,_){return de(this,void 0,void 0,function*(){yield F.run(_)})}}class ge extends ${constructor(F){super(ge.ID,F,F?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ge.ID="vs.actions.separator";class le{constructor(F,_,E,w){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=F,this.label=_,this.class=w,this._actions=E}get actions(){return this._actions}dispose(){}run(){return de(this,void 0,void 0,function*(){})}}class l extends ${constructor(){super(l.ID,Y.N("submenu.empty","(empty)"),void 0,!1)}}l.ID="vs.actions.empty"},76068:function(fn,ut,b){"use strict";b.d(ut,{ok:function(){return y}});function y(ce,Y){if(!ce)throw new Error(Y?`Assertion failed (${Y})`:"Assertion Failed")}},52615:function(fn,ut,b){"use strict";b.d(ut,{CM:function(){return $},JL:function(){return p},dT:function(){return le},fK:function(){return de},lA:function(){return ge}});var y=b(4348);class ce{constructor(){this._icons=new Map,this._onDidRegister=new y.Q5}add(A){const F=this._icons.get(A.id);F?A.description?F.description=A.description:console.error(`Duplicate registration of codicon ${A.id}`):(this._icons.set(A.id,A),this._onDidRegister.fire(A))}get(A){return this._icons.get(A)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Y=new ce,de=Y;function $(l,A){return new ge(l,A)}function p(l){return l?l.replace(/\$\((.*?)\)/g,(A,F)=>` ${F} `).trim():""}class ge{constructor(A,F,_){this.id=A,this.definition=F,this.description=_,Y.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var le;(function(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9\\-]+",l.iconModifierExpression="~[A-Za-z]+";const A=new RegExp(`^(${l.iconNameExpression})(${l.iconModifierExpression})?$`);function F(w){if(w instanceof ge)return["codicon","codicon-"+w.id];const O=A.exec(w.id);if(!O)return F(ge.error);let[,X,J]=O;const U=["codicon","codicon-"+X];return J&&U.push("codicon-modifier-"+J.substr(1)),U}l.asClassNameArray=F;function _(w){return F(w).join(" ")}l.asClassName=_;function E(w){return"."+F(w).join(".")}l.asCSSSelector=E})(le||(le={})),function(l){l.add=new l("add",{fontCharacter:"\\ea60"}),l.plus=new l("plus",l.add.definition),l.gistNew=new l("gist-new",l.add.definition),l.repoCreate=new l("repo-create",l.add.definition),l.lightbulb=new l("lightbulb",{fontCharacter:"\\ea61"}),l.lightBulb=new l("light-bulb",{fontCharacter:"\\ea61"}),l.repo=new l("repo",{fontCharacter:"\\ea62"}),l.repoDelete=new l("repo-delete",{fontCharacter:"\\ea62"}),l.gistFork=new l("gist-fork",{fontCharacter:"\\ea63"}),l.repoForked=new l("repo-forked",{fontCharacter:"\\ea63"}),l.gitPullRequest=new l("git-pull-request",{fontCharacter:"\\ea64"}),l.gitPullRequestAbandoned=new l("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),l.recordKeys=new l("record-keys",{fontCharacter:"\\ea65"}),l.keyboard=new l("keyboard",{fontCharacter:"\\ea65"}),l.tag=new l("tag",{fontCharacter:"\\ea66"}),l.tagAdd=new l("tag-add",{fontCharacter:"\\ea66"}),l.tagRemove=new l("tag-remove",{fontCharacter:"\\ea66"}),l.person=new l("person",{fontCharacter:"\\ea67"}),l.personFollow=new l("person-follow",{fontCharacter:"\\ea67"}),l.personOutline=new l("person-outline",{fontCharacter:"\\ea67"}),l.personFilled=new l("person-filled",{fontCharacter:"\\ea67"}),l.gitBranch=new l("git-branch",{fontCharacter:"\\ea68"}),l.gitBranchCreate=new l("git-branch-create",{fontCharacter:"\\ea68"}),l.gitBranchDelete=new l("git-branch-delete",{fontCharacter:"\\ea68"}),l.sourceControl=new l("source-control",{fontCharacter:"\\ea68"}),l.mirror=new l("mirror",{fontCharacter:"\\ea69"}),l.mirrorPublic=new l("mirror-public",{fontCharacter:"\\ea69"}),l.star=new l("star",{fontCharacter:"\\ea6a"}),l.starAdd=new l("star-add",{fontCharacter:"\\ea6a"}),l.starDelete=new l("star-delete",{fontCharacter:"\\ea6a"}),l.starEmpty=new l("star-empty",{fontCharacter:"\\ea6a"}),l.comment=new l("comment",{fontCharacter:"\\ea6b"}),l.commentAdd=new l("comment-add",{fontCharacter:"\\ea6b"}),l.alert=new l("alert",{fontCharacter:"\\ea6c"}),l.warning=new l("warning",{fontCharacter:"\\ea6c"}),l.search=new l("search",{fontCharacter:"\\ea6d"}),l.searchSave=new l("search-save",{fontCharacter:"\\ea6d"}),l.logOut=new l("log-out",{fontCharacter:"\\ea6e"}),l.signOut=new l("sign-out",{fontCharacter:"\\ea6e"}),l.logIn=new l("log-in",{fontCharacter:"\\ea6f"}),l.signIn=new l("sign-in",{fontCharacter:"\\ea6f"}),l.eye=new l("eye",{fontCharacter:"\\ea70"}),l.eyeUnwatch=new l("eye-unwatch",{fontCharacter:"\\ea70"}),l.eyeWatch=new l("eye-watch",{fontCharacter:"\\ea70"}),l.circleFilled=new l("circle-filled",{fontCharacter:"\\ea71"}),l.primitiveDot=new l("primitive-dot",{fontCharacter:"\\ea71"}),l.closeDirty=new l("close-dirty",{fontCharacter:"\\ea71"}),l.debugBreakpoint=new l("debug-breakpoint",{fontCharacter:"\\ea71"}),l.debugBreakpointDisabled=new l("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),l.debugHint=new l("debug-hint",{fontCharacter:"\\ea71"}),l.primitiveSquare=new l("primitive-square",{fontCharacter:"\\ea72"}),l.edit=new l("edit",{fontCharacter:"\\ea73"}),l.pencil=new l("pencil",{fontCharacter:"\\ea73"}),l.info=new l("info",{fontCharacter:"\\ea74"}),l.issueOpened=new l("issue-opened",{fontCharacter:"\\ea74"}),l.gistPrivate=new l("gist-private",{fontCharacter:"\\ea75"}),l.gitForkPrivate=new l("git-fork-private",{fontCharacter:"\\ea75"}),l.lock=new l("lock",{fontCharacter:"\\ea75"}),l.mirrorPrivate=new l("mirror-private",{fontCharacter:"\\ea75"}),l.close=new l("close",{fontCharacter:"\\ea76"}),l.removeClose=new l("remove-close",{fontCharacter:"\\ea76"}),l.x=new l("x",{fontCharacter:"\\ea76"}),l.repoSync=new l("repo-sync",{fontCharacter:"\\ea77"}),l.sync=new l("sync",{fontCharacter:"\\ea77"}),l.clone=new l("clone",{fontCharacter:"\\ea78"}),l.desktopDownload=new l("desktop-download",{fontCharacter:"\\ea78"}),l.beaker=new l("beaker",{fontCharacter:"\\ea79"}),l.microscope=new l("microscope",{fontCharacter:"\\ea79"}),l.vm=new l("vm",{fontCharacter:"\\ea7a"}),l.deviceDesktop=new l("device-desktop",{fontCharacter:"\\ea7a"}),l.file=new l("file",{fontCharacter:"\\ea7b"}),l.fileText=new l("file-text",{fontCharacter:"\\ea7b"}),l.more=new l("more",{fontCharacter:"\\ea7c"}),l.ellipsis=new l("ellipsis",{fontCharacter:"\\ea7c"}),l.kebabHorizontal=new l("kebab-horizontal",{fontCharacter:"\\ea7c"}),l.mailReply=new l("mail-reply",{fontCharacter:"\\ea7d"}),l.reply=new l("reply",{fontCharacter:"\\ea7d"}),l.organization=new l("organization",{fontCharacter:"\\ea7e"}),l.organizationFilled=new l("organization-filled",{fontCharacter:"\\ea7e"}),l.organizationOutline=new l("organization-outline",{fontCharacter:"\\ea7e"}),l.newFile=new l("new-file",{fontCharacter:"\\ea7f"}),l.fileAdd=new l("file-add",{fontCharacter:"\\ea7f"}),l.newFolder=new l("new-folder",{fontCharacter:"\\ea80"}),l.fileDirectoryCreate=new l("file-directory-create",{fontCharacter:"\\ea80"}),l.trash=new l("trash",{fontCharacter:"\\ea81"}),l.trashcan=new l("trashcan",{fontCharacter:"\\ea81"}),l.history=new l("history",{fontCharacter:"\\ea82"}),l.clock=new l("clock",{fontCharacter:"\\ea82"}),l.folder=new l("folder",{fontCharacter:"\\ea83"}),l.fileDirectory=new l("file-directory",{fontCharacter:"\\ea83"}),l.symbolFolder=new l("symbol-folder",{fontCharacter:"\\ea83"}),l.logoGithub=new l("logo-github",{fontCharacter:"\\ea84"}),l.markGithub=new l("mark-github",{fontCharacter:"\\ea84"}),l.github=new l("github",{fontCharacter:"\\ea84"}),l.terminal=new l("terminal",{fontCharacter:"\\ea85"}),l.console=new l("console",{fontCharacter:"\\ea85"}),l.repl=new l("repl",{fontCharacter:"\\ea85"}),l.zap=new l("zap",{fontCharacter:"\\ea86"}),l.symbolEvent=new l("symbol-event",{fontCharacter:"\\ea86"}),l.error=new l("error",{fontCharacter:"\\ea87"}),l.stop=new l("stop",{fontCharacter:"\\ea87"}),l.variable=new l("variable",{fontCharacter:"\\ea88"}),l.symbolVariable=new l("symbol-variable",{fontCharacter:"\\ea88"}),l.array=new l("array",{fontCharacter:"\\ea8a"}),l.symbolArray=new l("symbol-array",{fontCharacter:"\\ea8a"}),l.symbolModule=new l("symbol-module",{fontCharacter:"\\ea8b"}),l.symbolPackage=new l("symbol-package",{fontCharacter:"\\ea8b"}),l.symbolNamespace=new l("symbol-namespace",{fontCharacter:"\\ea8b"}),l.symbolObject=new l("symbol-object",{fontCharacter:"\\ea8b"}),l.symbolMethod=new l("symbol-method",{fontCharacter:"\\ea8c"}),l.symbolFunction=new l("symbol-function",{fontCharacter:"\\ea8c"}),l.symbolConstructor=new l("symbol-constructor",{fontCharacter:"\\ea8c"}),l.symbolBoolean=new l("symbol-boolean",{fontCharacter:"\\ea8f"}),l.symbolNull=new l("symbol-null",{fontCharacter:"\\ea8f"}),l.symbolNumeric=new l("symbol-numeric",{fontCharacter:"\\ea90"}),l.symbolNumber=new l("symbol-number",{fontCharacter:"\\ea90"}),l.symbolStructure=new l("symbol-structure",{fontCharacter:"\\ea91"}),l.symbolStruct=new l("symbol-struct",{fontCharacter:"\\ea91"}),l.symbolParameter=new l("symbol-parameter",{fontCharacter:"\\ea92"}),l.symbolTypeParameter=new l("symbol-type-parameter",{fontCharacter:"\\ea92"}),l.symbolKey=new l("symbol-key",{fontCharacter:"\\ea93"}),l.symbolText=new l("symbol-text",{fontCharacter:"\\ea93"}),l.symbolReference=new l("symbol-reference",{fontCharacter:"\\ea94"}),l.goToFile=new l("go-to-file",{fontCharacter:"\\ea94"}),l.symbolEnum=new l("symbol-enum",{fontCharacter:"\\ea95"}),l.symbolValue=new l("symbol-value",{fontCharacter:"\\ea95"}),l.symbolRuler=new l("symbol-ruler",{fontCharacter:"\\ea96"}),l.symbolUnit=new l("symbol-unit",{fontCharacter:"\\ea96"}),l.activateBreakpoints=new l("activate-breakpoints",{fontCharacter:"\\ea97"}),l.archive=new l("archive",{fontCharacter:"\\ea98"}),l.arrowBoth=new l("arrow-both",{fontCharacter:"\\ea99"}),l.arrowDown=new l("arrow-down",{fontCharacter:"\\ea9a"}),l.arrowLeft=new l("arrow-left",{fontCharacter:"\\ea9b"}),l.arrowRight=new l("arrow-right",{fontCharacter:"\\ea9c"}),l.arrowSmallDown=new l("arrow-small-down",{fontCharacter:"\\ea9d"}),l.arrowSmallLeft=new l("arrow-small-left",{fontCharacter:"\\ea9e"}),l.arrowSmallRight=new l("arrow-small-right",{fontCharacter:"\\ea9f"}),l.arrowSmallUp=new l("arrow-small-up",{fontCharacter:"\\eaa0"}),l.arrowUp=new l("arrow-up",{fontCharacter:"\\eaa1"}),l.bell=new l("bell",{fontCharacter:"\\eaa2"}),l.bold=new l("bold",{fontCharacter:"\\eaa3"}),l.book=new l("book",{fontCharacter:"\\eaa4"}),l.bookmark=new l("bookmark",{fontCharacter:"\\eaa5"}),l.debugBreakpointConditionalUnverified=new l("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),l.debugBreakpointConditional=new l("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),l.debugBreakpointConditionalDisabled=new l("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),l.debugBreakpointDataUnverified=new l("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),l.debugBreakpointData=new l("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),l.debugBreakpointDataDisabled=new l("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),l.debugBreakpointLogUnverified=new l("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),l.debugBreakpointLog=new l("debug-breakpoint-log",{fontCharacter:"\\eaab"}),l.debugBreakpointLogDisabled=new l("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),l.briefcase=new l("briefcase",{fontCharacter:"\\eaac"}),l.broadcast=new l("broadcast",{fontCharacter:"\\eaad"}),l.browser=new l("browser",{fontCharacter:"\\eaae"}),l.bug=new l("bug",{fontCharacter:"\\eaaf"}),l.calendar=new l("calendar",{fontCharacter:"\\eab0"}),l.caseSensitive=new l("case-sensitive",{fontCharacter:"\\eab1"}),l.check=new l("check",{fontCharacter:"\\eab2"}),l.checklist=new l("checklist",{fontCharacter:"\\eab3"}),l.chevronDown=new l("chevron-down",{fontCharacter:"\\eab4"}),l.dropDownButton=new l("drop-down-button",l.chevronDown.definition),l.chevronLeft=new l("chevron-left",{fontCharacter:"\\eab5"}),l.chevronRight=new l("chevron-right",{fontCharacter:"\\eab6"}),l.chevronUp=new l("chevron-up",{fontCharacter:"\\eab7"}),l.chromeClose=new l("chrome-close",{fontCharacter:"\\eab8"}),l.chromeMaximize=new l("chrome-maximize",{fontCharacter:"\\eab9"}),l.chromeMinimize=new l("chrome-minimize",{fontCharacter:"\\eaba"}),l.chromeRestore=new l("chrome-restore",{fontCharacter:"\\eabb"}),l.circleOutline=new l("circle-outline",{fontCharacter:"\\eabc"}),l.debugBreakpointUnverified=new l("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),l.circleSlash=new l("circle-slash",{fontCharacter:"\\eabd"}),l.circuitBoard=new l("circuit-board",{fontCharacter:"\\eabe"}),l.clearAll=new l("clear-all",{fontCharacter:"\\eabf"}),l.clippy=new l("clippy",{fontCharacter:"\\eac0"}),l.closeAll=new l("close-all",{fontCharacter:"\\eac1"}),l.cloudDownload=new l("cloud-download",{fontCharacter:"\\eac2"}),l.cloudUpload=new l("cloud-upload",{fontCharacter:"\\eac3"}),l.code=new l("code",{fontCharacter:"\\eac4"}),l.collapseAll=new l("collapse-all",{fontCharacter:"\\eac5"}),l.colorMode=new l("color-mode",{fontCharacter:"\\eac6"}),l.commentDiscussion=new l("comment-discussion",{fontCharacter:"\\eac7"}),l.compareChanges=new l("compare-changes",{fontCharacter:"\\eafd"}),l.creditCard=new l("credit-card",{fontCharacter:"\\eac9"}),l.dash=new l("dash",{fontCharacter:"\\eacc"}),l.dashboard=new l("dashboard",{fontCharacter:"\\eacd"}),l.database=new l("database",{fontCharacter:"\\eace"}),l.debugContinue=new l("debug-continue",{fontCharacter:"\\eacf"}),l.debugDisconnect=new l("debug-disconnect",{fontCharacter:"\\ead0"}),l.debugPause=new l("debug-pause",{fontCharacter:"\\ead1"}),l.debugRestart=new l("debug-restart",{fontCharacter:"\\ead2"}),l.debugStart=new l("debug-start",{fontCharacter:"\\ead3"}),l.debugStepInto=new l("debug-step-into",{fontCharacter:"\\ead4"}),l.debugStepOut=new l("debug-step-out",{fontCharacter:"\\ead5"}),l.debugStepOver=new l("debug-step-over",{fontCharacter:"\\ead6"}),l.debugStop=new l("debug-stop",{fontCharacter:"\\ead7"}),l.debug=new l("debug",{fontCharacter:"\\ead8"}),l.deviceCameraVideo=new l("device-camera-video",{fontCharacter:"\\ead9"}),l.deviceCamera=new l("device-camera",{fontCharacter:"\\eada"}),l.deviceMobile=new l("device-mobile",{fontCharacter:"\\eadb"}),l.diffAdded=new l("diff-added",{fontCharacter:"\\eadc"}),l.diffIgnored=new l("diff-ignored",{fontCharacter:"\\eadd"}),l.diffModified=new l("diff-modified",{fontCharacter:"\\eade"}),l.diffRemoved=new l("diff-removed",{fontCharacter:"\\eadf"}),l.diffRenamed=new l("diff-renamed",{fontCharacter:"\\eae0"}),l.diff=new l("diff",{fontCharacter:"\\eae1"}),l.discard=new l("discard",{fontCharacter:"\\eae2"}),l.editorLayout=new l("editor-layout",{fontCharacter:"\\eae3"}),l.emptyWindow=new l("empty-window",{fontCharacter:"\\eae4"}),l.exclude=new l("exclude",{fontCharacter:"\\eae5"}),l.extensions=new l("extensions",{fontCharacter:"\\eae6"}),l.eyeClosed=new l("eye-closed",{fontCharacter:"\\eae7"}),l.fileBinary=new l("file-binary",{fontCharacter:"\\eae8"}),l.fileCode=new l("file-code",{fontCharacter:"\\eae9"}),l.fileMedia=new l("file-media",{fontCharacter:"\\eaea"}),l.filePdf=new l("file-pdf",{fontCharacter:"\\eaeb"}),l.fileSubmodule=new l("file-submodule",{fontCharacter:"\\eaec"}),l.fileSymlinkDirectory=new l("file-symlink-directory",{fontCharacter:"\\eaed"}),l.fileSymlinkFile=new l("file-symlink-file",{fontCharacter:"\\eaee"}),l.fileZip=new l("file-zip",{fontCharacter:"\\eaef"}),l.files=new l("files",{fontCharacter:"\\eaf0"}),l.filter=new l("filter",{fontCharacter:"\\eaf1"}),l.flame=new l("flame",{fontCharacter:"\\eaf2"}),l.foldDown=new l("fold-down",{fontCharacter:"\\eaf3"}),l.foldUp=new l("fold-up",{fontCharacter:"\\eaf4"}),l.fold=new l("fold",{fontCharacter:"\\eaf5"}),l.folderActive=new l("folder-active",{fontCharacter:"\\eaf6"}),l.folderOpened=new l("folder-opened",{fontCharacter:"\\eaf7"}),l.gear=new l("gear",{fontCharacter:"\\eaf8"}),l.gift=new l("gift",{fontCharacter:"\\eaf9"}),l.gistSecret=new l("gist-secret",{fontCharacter:"\\eafa"}),l.gist=new l("gist",{fontCharacter:"\\eafb"}),l.gitCommit=new l("git-commit",{fontCharacter:"\\eafc"}),l.gitCompare=new l("git-compare",{fontCharacter:"\\eafd"}),l.gitMerge=new l("git-merge",{fontCharacter:"\\eafe"}),l.githubAction=new l("github-action",{fontCharacter:"\\eaff"}),l.githubAlt=new l("github-alt",{fontCharacter:"\\eb00"}),l.globe=new l("globe",{fontCharacter:"\\eb01"}),l.grabber=new l("grabber",{fontCharacter:"\\eb02"}),l.graph=new l("graph",{fontCharacter:"\\eb03"}),l.gripper=new l("gripper",{fontCharacter:"\\eb04"}),l.heart=new l("heart",{fontCharacter:"\\eb05"}),l.home=new l("home",{fontCharacter:"\\eb06"}),l.horizontalRule=new l("horizontal-rule",{fontCharacter:"\\eb07"}),l.hubot=new l("hubot",{fontCharacter:"\\eb08"}),l.inbox=new l("inbox",{fontCharacter:"\\eb09"}),l.issueClosed=new l("issue-closed",{fontCharacter:"\\eba4"}),l.issueReopened=new l("issue-reopened",{fontCharacter:"\\eb0b"}),l.issues=new l("issues",{fontCharacter:"\\eb0c"}),l.italic=new l("italic",{fontCharacter:"\\eb0d"}),l.jersey=new l("jersey",{fontCharacter:"\\eb0e"}),l.json=new l("json",{fontCharacter:"\\eb0f"}),l.kebabVertical=new l("kebab-vertical",{fontCharacter:"\\eb10"}),l.key=new l("key",{fontCharacter:"\\eb11"}),l.law=new l("law",{fontCharacter:"\\eb12"}),l.lightbulbAutofix=new l("lightbulb-autofix",{fontCharacter:"\\eb13"}),l.linkExternal=new l("link-external",{fontCharacter:"\\eb14"}),l.link=new l("link",{fontCharacter:"\\eb15"}),l.listOrdered=new l("list-ordered",{fontCharacter:"\\eb16"}),l.listUnordered=new l("list-unordered",{fontCharacter:"\\eb17"}),l.liveShare=new l("live-share",{fontCharacter:"\\eb18"}),l.loading=new l("loading",{fontCharacter:"\\eb19"}),l.location=new l("location",{fontCharacter:"\\eb1a"}),l.mailRead=new l("mail-read",{fontCharacter:"\\eb1b"}),l.mail=new l("mail",{fontCharacter:"\\eb1c"}),l.markdown=new l("markdown",{fontCharacter:"\\eb1d"}),l.megaphone=new l("megaphone",{fontCharacter:"\\eb1e"}),l.mention=new l("mention",{fontCharacter:"\\eb1f"}),l.milestone=new l("milestone",{fontCharacter:"\\eb20"}),l.mortarBoard=new l("mortar-board",{fontCharacter:"\\eb21"}),l.move=new l("move",{fontCharacter:"\\eb22"}),l.multipleWindows=new l("multiple-windows",{fontCharacter:"\\eb23"}),l.mute=new l("mute",{fontCharacter:"\\eb24"}),l.noNewline=new l("no-newline",{fontCharacter:"\\eb25"}),l.note=new l("note",{fontCharacter:"\\eb26"}),l.octoface=new l("octoface",{fontCharacter:"\\eb27"}),l.openPreview=new l("open-preview",{fontCharacter:"\\eb28"}),l.package_=new l("package",{fontCharacter:"\\eb29"}),l.paintcan=new l("paintcan",{fontCharacter:"\\eb2a"}),l.pin=new l("pin",{fontCharacter:"\\eb2b"}),l.play=new l("play",{fontCharacter:"\\eb2c"}),l.run=new l("run",{fontCharacter:"\\eb2c"}),l.plug=new l("plug",{fontCharacter:"\\eb2d"}),l.preserveCase=new l("preserve-case",{fontCharacter:"\\eb2e"}),l.preview=new l("preview",{fontCharacter:"\\eb2f"}),l.project=new l("project",{fontCharacter:"\\eb30"}),l.pulse=new l("pulse",{fontCharacter:"\\eb31"}),l.question=new l("question",{fontCharacter:"\\eb32"}),l.quote=new l("quote",{fontCharacter:"\\eb33"}),l.radioTower=new l("radio-tower",{fontCharacter:"\\eb34"}),l.reactions=new l("reactions",{fontCharacter:"\\eb35"}),l.references=new l("references",{fontCharacter:"\\eb36"}),l.refresh=new l("refresh",{fontCharacter:"\\eb37"}),l.regex=new l("regex",{fontCharacter:"\\eb38"}),l.remoteExplorer=new l("remote-explorer",{fontCharacter:"\\eb39"}),l.remote=new l("remote",{fontCharacter:"\\eb3a"}),l.remove=new l("remove",{fontCharacter:"\\eb3b"}),l.replaceAll=new l("replace-all",{fontCharacter:"\\eb3c"}),l.replace=new l("replace",{fontCharacter:"\\eb3d"}),l.repoClone=new l("repo-clone",{fontCharacter:"\\eb3e"}),l.repoForcePush=new l("repo-force-push",{fontCharacter:"\\eb3f"}),l.repoPull=new l("repo-pull",{fontCharacter:"\\eb40"}),l.repoPush=new l("repo-push",{fontCharacter:"\\eb41"}),l.report=new l("report",{fontCharacter:"\\eb42"}),l.requestChanges=new l("request-changes",{fontCharacter:"\\eb43"}),l.rocket=new l("rocket",{fontCharacter:"\\eb44"}),l.rootFolderOpened=new l("root-folder-opened",{fontCharacter:"\\eb45"}),l.rootFolder=new l("root-folder",{fontCharacter:"\\eb46"}),l.rss=new l("rss",{fontCharacter:"\\eb47"}),l.ruby=new l("ruby",{fontCharacter:"\\eb48"}),l.saveAll=new l("save-all",{fontCharacter:"\\eb49"}),l.saveAs=new l("save-as",{fontCharacter:"\\eb4a"}),l.save=new l("save",{fontCharacter:"\\eb4b"}),l.screenFull=new l("screen-full",{fontCharacter:"\\eb4c"}),l.screenNormal=new l("screen-normal",{fontCharacter:"\\eb4d"}),l.searchStop=new l("search-stop",{fontCharacter:"\\eb4e"}),l.server=new l("server",{fontCharacter:"\\eb50"}),l.settingsGear=new l("settings-gear",{fontCharacter:"\\eb51"}),l.settings=new l("settings",{fontCharacter:"\\eb52"}),l.shield=new l("shield",{fontCharacter:"\\eb53"}),l.smiley=new l("smiley",{fontCharacter:"\\eb54"}),l.sortPrecedence=new l("sort-precedence",{fontCharacter:"\\eb55"}),l.splitHorizontal=new l("split-horizontal",{fontCharacter:"\\eb56"}),l.splitVertical=new l("split-vertical",{fontCharacter:"\\eb57"}),l.squirrel=new l("squirrel",{fontCharacter:"\\eb58"}),l.starFull=new l("star-full",{fontCharacter:"\\eb59"}),l.starHalf=new l("star-half",{fontCharacter:"\\eb5a"}),l.symbolClass=new l("symbol-class",{fontCharacter:"\\eb5b"}),l.symbolColor=new l("symbol-color",{fontCharacter:"\\eb5c"}),l.symbolConstant=new l("symbol-constant",{fontCharacter:"\\eb5d"}),l.symbolEnumMember=new l("symbol-enum-member",{fontCharacter:"\\eb5e"}),l.symbolField=new l("symbol-field",{fontCharacter:"\\eb5f"}),l.symbolFile=new l("symbol-file",{fontCharacter:"\\eb60"}),l.symbolInterface=new l("symbol-interface",{fontCharacter:"\\eb61"}),l.symbolKeyword=new l("symbol-keyword",{fontCharacter:"\\eb62"}),l.symbolMisc=new l("symbol-misc",{fontCharacter:"\\eb63"}),l.symbolOperator=new l("symbol-operator",{fontCharacter:"\\eb64"}),l.symbolProperty=new l("symbol-property",{fontCharacter:"\\eb65"}),l.wrench=new l("wrench",{fontCharacter:"\\eb65"}),l.wrenchSubaction=new l("wrench-subaction",{fontCharacter:"\\eb65"}),l.symbolSnippet=new l("symbol-snippet",{fontCharacter:"\\eb66"}),l.tasklist=new l("tasklist",{fontCharacter:"\\eb67"}),l.telescope=new l("telescope",{fontCharacter:"\\eb68"}),l.textSize=new l("text-size",{fontCharacter:"\\eb69"}),l.threeBars=new l("three-bars",{fontCharacter:"\\eb6a"}),l.thumbsdown=new l("thumbsdown",{fontCharacter:"\\eb6b"}),l.thumbsup=new l("thumbsup",{fontCharacter:"\\eb6c"}),l.tools=new l("tools",{fontCharacter:"\\eb6d"}),l.triangleDown=new l("triangle-down",{fontCharacter:"\\eb6e"}),l.triangleLeft=new l("triangle-left",{fontCharacter:"\\eb6f"}),l.triangleRight=new l("triangle-right",{fontCharacter:"\\eb70"}),l.triangleUp=new l("triangle-up",{fontCharacter:"\\eb71"}),l.twitter=new l("twitter",{fontCharacter:"\\eb72"}),l.unfold=new l("unfold",{fontCharacter:"\\eb73"}),l.unlock=new l("unlock",{fontCharacter:"\\eb74"}),l.unmute=new l("unmute",{fontCharacter:"\\eb75"}),l.unverified=new l("unverified",{fontCharacter:"\\eb76"}),l.verified=new l("verified",{fontCharacter:"\\eb77"}),l.versions=new l("versions",{fontCharacter:"\\eb78"}),l.vmActive=new l("vm-active",{fontCharacter:"\\eb79"}),l.vmOutline=new l("vm-outline",{fontCharacter:"\\eb7a"}),l.vmRunning=new l("vm-running",{fontCharacter:"\\eb7b"}),l.watch=new l("watch",{fontCharacter:"\\eb7c"}),l.whitespace=new l("whitespace",{fontCharacter:"\\eb7d"}),l.wholeWord=new l("whole-word",{fontCharacter:"\\eb7e"}),l.window=new l("window",{fontCharacter:"\\eb7f"}),l.wordWrap=new l("word-wrap",{fontCharacter:"\\eb80"}),l.zoomIn=new l("zoom-in",{fontCharacter:"\\eb81"}),l.zoomOut=new l("zoom-out",{fontCharacter:"\\eb82"}),l.listFilter=new l("list-filter",{fontCharacter:"\\eb83"}),l.listFlat=new l("list-flat",{fontCharacter:"\\eb84"}),l.listSelection=new l("list-selection",{fontCharacter:"\\eb85"}),l.selection=new l("selection",{fontCharacter:"\\eb85"}),l.listTree=new l("list-tree",{fontCharacter:"\\eb86"}),l.debugBreakpointFunctionUnverified=new l("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),l.debugBreakpointFunction=new l("debug-breakpoint-function",{fontCharacter:"\\eb88"}),l.debugBreakpointFunctionDisabled=new l("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),l.debugStackframeActive=new l("debug-stackframe-active",{fontCharacter:"\\eb89"}),l.debugStackframeDot=new l("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),l.debugStackframe=new l("debug-stackframe",{fontCharacter:"\\eb8b"}),l.debugStackframeFocused=new l("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),l.debugBreakpointUnsupported=new l("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),l.symbolString=new l("symbol-string",{fontCharacter:"\\eb8d"}),l.debugReverseContinue=new l("debug-reverse-continue",{fontCharacter:"\\eb8e"}),l.debugStepBack=new l("debug-step-back",{fontCharacter:"\\eb8f"}),l.debugRestartFrame=new l("debug-restart-frame",{fontCharacter:"\\eb90"}),l.callIncoming=new l("call-incoming",{fontCharacter:"\\eb92"}),l.callOutgoing=new l("call-outgoing",{fontCharacter:"\\eb93"}),l.menu=new l("menu",{fontCharacter:"\\eb94"}),l.expandAll=new l("expand-all",{fontCharacter:"\\eb95"}),l.feedback=new l("feedback",{fontCharacter:"\\eb96"}),l.groupByRefType=new l("group-by-ref-type",{fontCharacter:"\\eb97"}),l.ungroupByRefType=new l("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),l.account=new l("account",{fontCharacter:"\\eb99"}),l.bellDot=new l("bell-dot",{fontCharacter:"\\eb9a"}),l.debugConsole=new l("debug-console",{fontCharacter:"\\eb9b"}),l.library=new l("library",{fontCharacter:"\\eb9c"}),l.output=new l("output",{fontCharacter:"\\eb9d"}),l.runAll=new l("run-all",{fontCharacter:"\\eb9e"}),l.syncIgnored=new l("sync-ignored",{fontCharacter:"\\eb9f"}),l.pinned=new l("pinned",{fontCharacter:"\\eba0"}),l.githubInverted=new l("github-inverted",{fontCharacter:"\\eba1"}),l.debugAlt=new l("debug-alt",{fontCharacter:"\\eb91"}),l.serverProcess=new l("server-process",{fontCharacter:"\\eba2"}),l.serverEnvironment=new l("server-environment",{fontCharacter:"\\eba3"}),l.pass=new l("pass",{fontCharacter:"\\eba4"}),l.stopCircle=new l("stop-circle",{fontCharacter:"\\eba5"}),l.playCircle=new l("play-circle",{fontCharacter:"\\eba6"}),l.record=new l("record",{fontCharacter:"\\eba7"}),l.debugAltSmall=new l("debug-alt-small",{fontCharacter:"\\eba8"}),l.vmConnect=new l("vm-connect",{fontCharacter:"\\eba9"}),l.cloud=new l("cloud",{fontCharacter:"\\ebaa"}),l.merge=new l("merge",{fontCharacter:"\\ebab"}),l.exportIcon=new l("export",{fontCharacter:"\\ebac"}),l.graphLeft=new l("graph-left",{fontCharacter:"\\ebad"}),l.magnet=new l("magnet",{fontCharacter:"\\ebae"}),l.notebook=new l("notebook",{fontCharacter:"\\ebaf"}),l.redo=new l("redo",{fontCharacter:"\\ebb0"}),l.checkAll=new l("check-all",{fontCharacter:"\\ebb1"}),l.pinnedDirty=new l("pinned-dirty",{fontCharacter:"\\ebb2"}),l.passFilled=new l("pass-filled",{fontCharacter:"\\ebb3"}),l.circleLargeFilled=new l("circle-large-filled",{fontCharacter:"\\ebb4"}),l.circleLargeOutline=new l("circle-large-outline",{fontCharacter:"\\ebb5"}),l.combine=new l("combine",{fontCharacter:"\\ebb6"}),l.gather=new l("gather",{fontCharacter:"\\ebb6"}),l.table=new l("table",{fontCharacter:"\\ebb7"}),l.variableGroup=new l("variable-group",{fontCharacter:"\\ebb8"}),l.typeHierarchy=new l("type-hierarchy",{fontCharacter:"\\ebb9"}),l.typeHierarchySub=new l("type-hierarchy-sub",{fontCharacter:"\\ebba"}),l.typeHierarchySuper=new l("type-hierarchy-super",{fontCharacter:"\\ebbb"}),l.gitPullRequestCreate=new l("git-pull-request-create",{fontCharacter:"\\ebbc"}),l.runAbove=new l("run-above",{fontCharacter:"\\ebbd"}),l.runBelow=new l("run-below",{fontCharacter:"\\ebbe"}),l.notebookTemplate=new l("notebook-template",{fontCharacter:"\\ebbf"}),l.debugRerun=new l("debug-rerun",{fontCharacter:"\\ebc0"}),l.workspaceTrusted=new l("workspace-trusted",{fontCharacter:"\\ebc1"}),l.workspaceUntrusted=new l("workspace-untrusted",{fontCharacter:"\\ebc2"}),l.workspaceUnspecified=new l("workspace-unspecified",{fontCharacter:"\\ebc3"}),l.terminalCmd=new l("terminal-cmd",{fontCharacter:"\\ebc4"}),l.terminalDebian=new l("terminal-debian",{fontCharacter:"\\ebc5"}),l.terminalLinux=new l("terminal-linux",{fontCharacter:"\\ebc6"}),l.terminalPowershell=new l("terminal-powershell",{fontCharacter:"\\ebc7"}),l.terminalTmux=new l("terminal-tmux",{fontCharacter:"\\ebc8"}),l.terminalUbuntu=new l("terminal-ubuntu",{fontCharacter:"\\ebc9"}),l.terminalBash=new l("terminal-bash",{fontCharacter:"\\ebca"}),l.arrowSwap=new l("arrow-swap",{fontCharacter:"\\ebcb"}),l.copy=new l("copy",{fontCharacter:"\\ebcc"}),l.personAdd=new l("person-add",{fontCharacter:"\\ebcd"}),l.filterFilled=new l("filter-filled",{fontCharacter:"\\ebce"}),l.wand=new l("wand",{fontCharacter:"\\ebcf"}),l.debugLineByLine=new l("debug-line-by-line",{fontCharacter:"\\ebd0"}),l.inspect=new l("inspect",{fontCharacter:"\\ebd1"}),l.layers=new l("layers",{fontCharacter:"\\ebd2"}),l.layersDot=new l("layers-dot",{fontCharacter:"\\ebd3"}),l.layersActive=new l("layers-active",{fontCharacter:"\\ebd4"}),l.compass=new l("compass",{fontCharacter:"\\ebd5"}),l.compassDot=new l("compass-dot",{fontCharacter:"\\ebd6"}),l.compassActive=new l("compass-active",{fontCharacter:"\\ebd7"}),l.azure=new l("azure",{fontCharacter:"\\ebd8"}),l.issueDraft=new l("issue-draft",{fontCharacter:"\\ebd9"}),l.gitPullRequestClosed=new l("git-pull-request-closed",{fontCharacter:"\\ebda"}),l.gitPullRequestDraft=new l("git-pull-request-draft",{fontCharacter:"\\ebdb"}),l.debugAll=new l("debug-all",{fontCharacter:"\\ebdc"}),l.debugCoverage=new l("debug-coverage",{fontCharacter:"\\ebdd"}),l.runErrors=new l("run-errors",{fontCharacter:"\\ebde"}),l.folderLibrary=new l("folder-library",{fontCharacter:"\\ebdf"}),l.debugContinueSmall=new l("debug-continue-small",{fontCharacter:"\\ebe0"}),l.beakerStop=new l("beaker-stop",{fontCharacter:"\\ebe1"}),l.graphLine=new l("graph-line",{fontCharacter:"\\ebe2"}),l.graphScatter=new l("graph-scatter",{fontCharacter:"\\ebe3"}),l.pieChart=new l("pie-chart",{fontCharacter:"\\ebe4"}),l.bracket=new l("bracket",l.json.definition),l.bracketDot=new l("bracket-dot",{fontCharacter:"\\ebe5"}),l.bracketError=new l("bracket-error",{fontCharacter:"\\ebe6"}),l.lockSmall=new l("lock-small",{fontCharacter:"\\ebe7"}),l.azureDevops=new l("azure-devops",{fontCharacter:"\\ebe8"}),l.verifiedFilled=new l("verified-filled",{fontCharacter:"\\ebe9"})}(ge||(ge={}))},79881:function(fn,ut,b){"use strict";b.d(ut,{B8:function(){return F},Cp:function(){return de},F0:function(){return le},L6:function(){return A},VV:function(){return ge},b1:function(){return l},dL:function(){return Y},ri:function(){return $}});class y{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(E){setTimeout(()=>{throw E.stack?new Error(E.message+`
|
|
|
|
|
|
`+E.stack):E},0)}}emit(E){this.listeners.forEach(w=>{w(E)})}onUnexpectedError(E){this.unexpectedErrorHandler(E),this.emit(E)}onUnexpectedExternalError(E){this.unexpectedErrorHandler(E)}}const ce=new y;function Y(_){ge(_)||ce.onUnexpectedError(_)}function de(_){ge(_)||ce.onUnexpectedExternalError(_)}function $(_){if(_ instanceof Error){let{name:E,message:w}=_;const O=_.stacktrace||_.stack;return{$isError:!0,name:E,message:w,stack:O}}return _}const p="Canceled";function ge(_){return _ instanceof Error&&_.name===p&&_.message===p}function le(){const _=new Error(p);return _.name=_.message,_}function l(_){return _?new Error(`Illegal argument: ${_}`):new Error("Illegal argument")}function A(_){return _?new Error(`Illegal state: ${_}`):new Error("Illegal state")}class F extends Error{constructor(E){super("NotSupported"),E&&(this.message=E)}}},4348:function(fn,ut,b){"use strict";b.d(ut,{D0:function(){return F},E7:function(){return _},K3:function(){return A},Q5:function(){return l},ZD:function(){return E},ju:function(){return $}});var y=b(79881),ce=b(69323),Y=b(34502),de=b(95830),$;(function(w){w.None=()=>ce.JT.None;function O(I){return(ee,V=null,he)=>{let S=!1,C;return C=I(Z=>{if(!S)return C?C.dispose():S=!0,ee.call(V,Z)},null,he),S&&C.dispose(),C}}w.once=O;function X(I,ee){return N((V,he=null,S)=>I(C=>V.call(he,ee(C)),null,S))}w.map=X;function J(I,ee){return N((V,he=null,S)=>I(C=>{ee(C),V.call(he,C)},null,S))}w.forEach=J;function U(I,ee){return N((V,he=null,S)=>I(C=>ee(C)&&V.call(he,C),null,S))}w.filter=U;function R(I){return I}w.signal=R;function z(...I){return(ee,V=null,he)=>(0,ce.F8)(...I.map(S=>S(C=>ee.call(V,C),null,he)))}w.any=z;function P(I,ee,V){let he=V;return X(I,S=>(he=ee(he,S),he))}w.reduce=P;function N(I){let ee;const V=new l({onFirstListenerAdd(){ee=I(V.fire,V)},onLastListenerRemove(){ee.dispose()}});return V.event}function re(I,ee,V=100,he=!1,S){let C,Z,ye,Ve=0;const qe=new l({leakWarningThreshold:S,onFirstListenerAdd(){C=I(gt=>{Ve++,Z=ee(Z,gt),he&&!ye&&(qe.fire(Z),Z=void 0),clearTimeout(ye),ye=setTimeout(()=>{const yt=Z;Z=void 0,ye=void 0,(!he||Ve>1)&&qe.fire(yt),Ve=0},V)})},onLastListenerRemove(){C.dispose()}});return qe.event}w.debounce=re;function ue(I,ee=(V,he)=>V===he){let V=!0,he;return U(I,S=>{const C=V||!ee(S,he);return V=!1,he=S,C})}w.latch=ue;function me(I,ee){return[w.filter(I,ee),w.filter(I,V=>!ee(V))]}w.split=me;function Te(I,ee=!1,V=[]){let he=V.slice(),S=I(ye=>{he?he.push(ye):Z.fire(ye)});const C=()=>{he&&he.forEach(ye=>Z.fire(ye)),he=null},Z=new l({onFirstListenerAdd(){S||(S=I(ye=>Z.fire(ye)))},onFirstListenerDidAdd(){he&&(ee?setTimeout(C):C())},onLastListenerRemove(){S&&S.dispose(),S=null}});return Z.event}w.buffer=Te;class Be{constructor(ee){this.event=ee}map(ee){return new Be(X(this.event,ee))}forEach(ee){return new Be(J(this.event,ee))}filter(ee){return new Be(U(this.event,ee))}reduce(ee,V){return new Be(P(this.event,ee,V))}latch(){return new Be(ue(this.event))}debounce(ee,V=100,he=!1,S){return new Be(re(this.event,ee,V,he,S))}on(ee,V,he){return this.event(ee,V,he)}once(ee,V,he){return O(this.event)(ee,V,he)}}function Le(I){return new Be(I)}w.chain=Le;function at(I,ee,V=he=>he){const he=(...ye)=>Z.fire(V(...ye)),S=()=>I.on(ee,he),C=()=>I.removeListener(ee,he),Z=new l({onFirstListenerAdd:S,onLastListenerRemove:C});return Z.event}w.fromNodeEventEmitter=at;function ie(I,ee,V=he=>he){const he=(...ye)=>Z.fire(V(...ye)),S=()=>I.addEventListener(ee,he),C=()=>I.removeEventListener(ee,he),Z=new l({onFirstListenerAdd:S,onLastListenerRemove:C});return Z.event}w.fromDOMEventEmitter=ie;function K(I){return new Promise(ee=>O(I)(ee))}w.toPromise=K})($||($={}));class p{constructor(O){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${O}_${p._idPool++}`}start(O){this._stopWatch=new de.G(!0),this._listenerCount=O}stop(){if(this._stopWatch){const O=this._stopWatch.elapsed();this._elapsedOverall+=O,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${O.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}p._idPool=0;let ge=-1;class le{constructor(O,X=Math.random().toString(18).slice(2,5)){this.customThreshold=O,this.name=X,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(O){let X=ge;if(typeof this.customThreshold=="number"&&(X=this.customThreshold),X<=0||O<X)return;this._stacks||(this._stacks=new Map);const J=new Error().stack.split(`
|
|
|
`).slice(3).join(`
|
|
|
`),U=this._stacks.get(J)||0;if(this._stacks.set(J,U+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=X*.5;let R,z=0;for(const[P,N]of this._stacks)(!R||z<N)&&(R=P,z=N);console.warn(`[${this.name}] potential listener LEAK detected, having ${O} listeners already. MOST frequent listener (${z}):`),console.warn(R)}return()=>{const R=this._stacks.get(J)||0;this._stacks.set(J,R-1)}}}class l{constructor(O){var X;this._disposed=!1,this._options=O,this._leakageMon=ge>0?new le(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((X=this._options)===null||X===void 0)&&X._profName?new p(this._options._profName):void 0}get event(){return this._event||(this._event=(O,X,J)=>{var U;this._listeners||(this._listeners=new Y.S);const R=this._listeners.isEmpty();R&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const z=this._listeners.push(X?[O,X]:O);R&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,O,X);const P=(U=this._leakageMon)===null||U===void 0?void 0:U.check(this._listeners.size),N=(0,ce.OF)(()=>{P&&P(),this._disposed||(z(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return J instanceof ce.SL?J.add(N):Array.isArray(J)&&J.push(N),N}),this._event}fire(O){var X,J;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Y.S);for(let U of this._listeners)this._deliveryQueue.push([U,O]);for((X=this._perfMon)===null||X===void 0||X.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[U,R]=this._deliveryQueue.shift();try{typeof U=="function"?U.call(void 0,R):U[0].call(U[1],R)}catch(z){(0,y.dL)(z)}}(J=this._perfMon)===null||J===void 0||J.stop()}}dispose(){var O,X,J,U,R;this._disposed||(this._disposed=!0,(O=this._listeners)===null||O===void 0||O.clear(),(X=this._deliveryQueue)===null||X===void 0||X.clear(),(U=(J=this._options)===null||J===void 0?void 0:J.onLastListenerRemove)===null||U===void 0||U.call(J),(R=this._leakageMon)===null||R===void 0||R.dispose())}}class A extends l{constructor(O){super(O),this._isPaused=0,this._eventQueue=new Y.S,this._mergeFn=O==null?void 0:O.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const O=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(O))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(O){this._listeners&&(this._isPaused!==0?this._eventQueue.push(O):super.fire(O))}}class F extends A{constructor(O){var X;super(O),this._delay=(X=O.delay)!==null&&X!==void 0?X:100}fire(O){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(O)}}class _{constructor(){this.buffers=[]}wrapEvent(O){return(X,J,U)=>O(R=>{const z=this.buffers[this.buffers.length-1];z?z.push(()=>X.call(J,R)):X.call(J,R)},void 0,U)}bufferEvents(O){const X=[];this.buffers.push(X);const J=O();return this.buffers.pop(),X.forEach(U=>U()),J}}class E{constructor(){this.listening=!1,this.inputEvent=$.None,this.inputEventListener=ce.JT.None,this.emitter=new l({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(O){this.inputEvent=O,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=O(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(fn,ut,b){"use strict";b.d(ut,{I:function(){return y}});function y(ce){const Y=this;let de=!1,$;return function(){return de||(de=!0,$=ce.apply(Y,arguments)),$}}},88226:function(fn,ut,b){"use strict";b.d(ut,{$:function(){return y}});var y;(function(ce){function Y(z){return z&&typeof z=="object"&&typeof z[Symbol.iterator]=="function"}ce.is=Y;const de=Object.freeze([]);function $(){return de}ce.empty=$;function*p(z){yield z}ce.single=p;function ge(z){return z||de}ce.from=ge;function le(z){return!z||z[Symbol.iterator]().next().done===!0}ce.isEmpty=le;function l(z){return z[Symbol.iterator]().next().value}ce.first=l;function A(z,P){for(const N of z)if(P(N))return!0;return!1}ce.some=A;function F(z,P){for(const N of z)if(P(N))return N}ce.find=F;function*_(z,P){for(const N of z)P(N)&&(yield N)}ce.filter=_;function*E(z,P){let N=0;for(const re of z)yield P(re,N++)}ce.map=E;function*w(...z){for(const P of z)for(const N of P)yield N}ce.concat=w;function*O(z){for(const P of z)for(const N of P)yield N}ce.concatNested=O;function X(z,P,N){let re=N;for(const ue of z)re=P(re,ue);return re}ce.reduce=X;function*J(z,P,N=z.length){for(P<0&&(P+=z.length),N<0?N+=z.length:N>z.length&&(N=z.length);P<N;P++)yield z[P]}ce.slice=J;function U(z,P=Number.POSITIVE_INFINITY){const N=[];if(P===0)return[N,z];const re=z[Symbol.iterator]();for(let ue=0;ue<P;ue++){const me=re.next();if(me.done)return[N,ce.empty()];N.push(me.value)}return[N,{[Symbol.iterator](){return re}}]}ce.consume=U;function R(z,P,N=(re,ue)=>re===ue){const re=z[Symbol.iterator](),ue=P[Symbol.iterator]();for(;;){const me=re.next(),Te=ue.next();if(me.done!==Te.done)return!1;if(me.done)return!0;if(!N(me.value,Te.value))return!1}}ce.equals=R})(y||(y={}))},69323:function(fn,ut,b){"use strict";b.d(ut,{B9:function(){return E},F8:function(){return w},JT:function(){return J},Jz:function(){return R},OF:function(){return O},SL:function(){return X},Wf:function(){return _},XK:function(){return U},dk:function(){return A}});var y=b(17845),ce=b(88226);const Y=!1;let de=null;function $(z){de=z}if(Y){const z="__is_disposable_tracked__";$(new class{trackDisposable(P){const N=new Error("Potentially leaked disposable").stack;setTimeout(()=>{P[z]||console.log(N)},3e3)}setParent(P,N){if(P&&P!==J.None)try{P[z]=!0}catch(re){}}markAsDisposed(P){if(P&&P!==J.None)try{P[z]=!0}catch(N){}}markAsSingleton(P){}})}function p(z){return de==null||de.trackDisposable(z),z}function ge(z){de==null||de.markAsDisposed(z)}function le(z,P){de==null||de.setParent(z,P)}function l(z,P){if(de)for(const N of z)de.setParent(N,P)}function A(z){return de==null||de.markAsSingleton(z),z}class F extends Error{constructor(P){super(`Encountered errors while disposing of store. Errors: [${P.join(", ")}]`),this.errors=P}}function _(z){return typeof z.dispose=="function"&&z.dispose.length===0}function E(z){if(ce.$.is(z)){let P=[];for(const N of z)if(N)try{N.dispose()}catch(re){P.push(re)}if(P.length===1)throw P[0];if(P.length>1)throw new F(P);return Array.isArray(z)?[]:z}else if(z)return z.dispose(),z}function w(...z){const P=O(()=>E(z));return l(z,P),P}function O(z){const P=p({dispose:(0,y.I)(()=>{ge(P),z()})});return P}class X{constructor(){this._toDispose=new Set,this._isDisposed=!1,p(this)}dispose(){this._isDisposed||(ge(this),this._isDisposed=!0,this.clear())}clear(){try{E(this._toDispose.values())}finally{this._toDispose.clear()}}add(P){if(!P)return P;if(P===this)throw new Error("Cannot register a disposable on itself!");return le(P,this),this._isDisposed?X.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(P),P}}X.DISABLE_DISPOSED_WARNING=!1;class J{constructor(){this._store=new X,p(this),le(this._store,this)}dispose(){ge(this),this._store.dispose()}_register(P){if(P===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(P)}}J.None=Object.freeze({dispose(){}});class U{constructor(){this._isDisposed=!1,p(this)}get value(){return this._isDisposed?void 0:this._value}set value(P){var N;this._isDisposed||P===this._value||((N=this._value)===null||N===void 0||N.dispose(),P&&le(P,this),this._value=P)}clear(){this.value=void 0}dispose(){var P;this._isDisposed=!0,ge(this),(P=this._value)===null||P===void 0||P.dispose(),this._value=void 0}clearAndLeak(){const P=this._value;return this._value=void 0,P&&le(P,null),P}}class R{constructor(P){this.object=P}dispose(){}}},34502:function(fn,ut,b){"use strict";b.d(ut,{S:function(){return ce}});class y{constructor(de){this.element=de,this.next=y.Undefined,this.prev=y.Undefined}}y.Undefined=new y(void 0);class ce{constructor(){this._first=y.Undefined,this._last=y.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===y.Undefined}clear(){let de=this._first;for(;de!==y.Undefined;){const $=de.next;de.prev=y.Undefined,de.next=y.Undefined,de=$}this._first=y.Undefined,this._last=y.Undefined,this._size=0}unshift(de){return this._insert(de,!1)}push(de){return this._insert(de,!0)}_insert(de,$){const p=new y(de);if(this._first===y.Undefined)this._first=p,this._last=p;else if($){const le=this._last;this._last=p,p.prev=le,le.next=p}else{const le=this._first;this._first=p,p.next=le,le.prev=p}this._size+=1;let ge=!1;return()=>{ge||(ge=!0,this._remove(p))}}shift(){if(this._first!==y.Undefined){const de=this._first.element;return this._remove(this._first),de}}pop(){if(this._last!==y.Undefined){const de=this._last.element;return this._remove(this._last),de}}_remove(de){if(de.prev!==y.Undefined&&de.next!==y.Undefined){const $=de.prev;$.next=de.next,de.next.prev=$}else de.prev===y.Undefined&&de.next===y.Undefined?(this._first=y.Undefined,this._last=y.Undefined):de.next===y.Undefined?(this._last=this._last.prev,this._last.next=y.Undefined):de.prev===y.Undefined&&(this._first=this._first.next,this._first.prev=y.Undefined);this._size-=1}*[Symbol.iterator](){let de=this._first;for(;de!==y.Undefined;)yield de.element,de=de.next}}},23345:function(fn,ut,b){"use strict";b.d(ut,{$L:function(){return re},ED:function(){return R},IJ:function(){return P},OS:function(){return Be},WE:function(){return me},dz:function(){return z},gn:function(){return ue},li:function(){return O},r:function(){return ie},tY:function(){return N},xS:function(){return Te}});var y=b(97671),ce;const Y="en";let de=!1,$=!1,p=!1,ge=!1,le=!1,l=!1,A=!1,F,_=null,E=null,w;const O=typeof self=="object"?self:typeof b.g=="object"?b.g:{};let X;typeof O.vscode!="undefined"&&typeof O.vscode.process!="undefined"?X=O.vscode.process:typeof y!="undefined"&&(X=y);const J=typeof((ce=X==null?void 0:X.versions)===null||ce===void 0?void 0:ce.electron)=="string"&&X.type==="renderer";if(typeof navigator=="object"&&!J)w=navigator.userAgent,de=w.indexOf("Windows")>=0,$=w.indexOf("Macintosh")>=0,A=(w.indexOf("Macintosh")>=0||w.indexOf("iPad")>=0||w.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,p=w.indexOf("Linux")>=0,l=!0,F=navigator.language,_=F;else if(typeof X=="object"){de=X.platform==="win32",$=X.platform==="darwin",p=X.platform==="linux",ge=p&&!!X.env.SNAP&&!!X.env.SNAP_REVISION,F=Y,_=Y;const K=X.env.VSCODE_NLS_CONFIG;if(K)try{const I=JSON.parse(K),ee=I.availableLanguages["*"];F=I.locale,_=ee||Y,E=I._translationsConfigFile}catch(I){}le=!0}else console.error("Unable to resolve platform.");let U=0;$?U=1:de?U=3:p&&(U=2);const R=de,z=$,P=p,N=le,re=l,ue=A,me=w,Te=function(){if(O.setImmediate)return O.setImmediate.bind(O);if(typeof O.postMessage=="function"&&!O.importScripts){let ee=[];O.addEventListener("message",he=>{if(he.data&&he.data.vscodeSetImmediateId)for(let S=0,C=ee.length;S<C;S++){const Z=ee[S];if(Z.id===he.data.vscodeSetImmediateId){ee.splice(S,1),Z.callback();return}}});let V=0;return he=>{const S=++V;ee.push({id:S,callback:he}),O.postMessage({vscodeSetImmediateId:S},"*")}}if(typeof(X==null?void 0:X.nextTick)=="function")return X.nextTick.bind(X);const I=Promise.resolve();return ee=>I.then(ee)}(),Be=$||A?2:de?1:3;let Le=!0,at=!1;function ie(){if(!at){at=!0;const K=new Uint8Array(2);K[0]=1,K[1]=2,Le=new Uint16Array(K.buffer)[0]===513}return Le}},95830:function(fn,ut,b){"use strict";b.d(ut,{G:function(){return Y}});var y=b(23345);const ce=y.li.performance&&typeof y.li.performance.now=="function";class Y{constructor($){this._highResolution=ce&&$,this._startTime=this._now(),this._stopTime=-1}static create($=!0){return new Y($)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?y.li.performance.now():Date.now()}}},82983:function(fn,ut,b){"use strict";b.d(ut,{$i:function(){return Ve},C8:function(){return Ut},GF:function(){return F},HO:function(){return V},IO:function(){return _},K7:function(){return Dt},Kw:function(){return tt},LC:function(){return O},Mh:function(){return Te},P1:function(){return Be},PJ:function(){return Gt},Qe:function(){return qe},R1:function(){return A},RP:function(){return Z},S6:function(){return Xe},TT:function(){return R},Ut:function(){return S},V8:function(){return X},WU:function(){return Y},YK:function(){return at},YU:function(){return de},ZG:function(){return Le},ZH:function(){return K},ab:function(){return gt},c1:function(){return ot},df:function(){return re},ec:function(){return $},fi:function(){return Ke},fy:function(){return p},j3:function(){return ge},j_:function(){return P},m5:function(){return y},mK:function(){return N},mr:function(){return E},oH:function(){return se},oL:function(){return le},ok:function(){return me},ow:function(){return J},qq:function(){return ue},qu:function(){return U},rL:function(){return ie},uS:function(){return kt},un:function(){return l},uq:function(){return w},vH:function(){return ee},xe:function(){return yt},zY:function(){return z}});function y(M){return!M||typeof M!="string"?!0:M.trim().length===0}const ce=/{(\d+)}/g;function Y(M,...fe){return fe.length===0?M:M.replace(ce,function(_e,Re){const $e=parseInt(Re,10);return isNaN($e)||$e<0||$e>=fe.length?_e:fe[$e]})}function de(M){return M.replace(/[<>&]/g,function(fe){switch(fe){case"<":return"<";case">":return">";case"&":return"&";default:return fe}})}function $(M){return M.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function p(M,fe=" "){const _e=ge(M,fe);return le(_e,fe)}function ge(M,fe){if(!M||!fe)return M;const _e=fe.length;if(_e===0||M.length===0)return M;let Re=0;for(;M.indexOf(fe,Re)===Re;)Re=Re+_e;return M.substring(Re)}function le(M,fe){if(!M||!fe)return M;const _e=fe.length,Re=M.length;if(_e===0||Re===0)return M;let $e=Re,rt=-1;for(;rt=M.lastIndexOf(fe,$e-1),!(rt===-1||rt+_e!==$e);){if(rt===0)return"";$e=rt}return M.substring(0,$e)}function l(M){return M.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function A(M){return M.replace(/\*/g,"")}function F(M,fe,_e={}){if(!M)throw new Error("Cannot create regex from empty string");fe||(M=$(M)),_e.wholeWord&&(/\B/.test(M.charAt(0))||(M="\\b"+M),/\B/.test(M.charAt(M.length-1))||(M=M+"\\b"));let Re="";return _e.global&&(Re+="g"),_e.matchCase||(Re+="i"),_e.multiline&&(Re+="m"),_e.unicode&&(Re+="u"),new RegExp(M,Re)}function _(M){return M.source==="^"||M.source==="^$"||M.source==="$"||M.source==="^\\s*$"?!1:!!(M.exec("")&&M.lastIndex===0)}function E(M){return(M.global?"g":"")+(M.ignoreCase?"i":"")+(M.multiline?"m":"")+(M.unicode?"u":"")}function w(M){return M.split(/\r\n|\r|\n/)}function O(M){for(let fe=0,_e=M.length;fe<_e;fe++){const Re=M.charCodeAt(fe);if(Re!==32&&Re!==9)return fe}return-1}function X(M,fe=0,_e=M.length){for(let Re=fe;Re<_e;Re++){const $e=M.charCodeAt(Re);if($e!==32&&$e!==9)return M.substring(fe,Re)}return M.substring(fe,_e)}function J(M,fe=M.length-1){for(let _e=fe;_e>=0;_e--){const Re=M.charCodeAt(_e);if(Re!==32&&Re!==9)return _e}return-1}function U(M,fe){return M<fe?-1:M>fe?1:0}function R(M,fe,_e=0,Re=M.length,$e=0,rt=fe.length){for(;_e<Re&&$e<rt;_e++,$e++){let Q=M.charCodeAt(_e),lt=fe.charCodeAt($e);if(Q<lt)return-1;if(Q>lt)return 1}const it=Re-_e,te=rt-$e;return it<te?-1:it>te?1:0}function z(M,fe){return P(M,fe,0,M.length,0,fe.length)}function P(M,fe,_e=0,Re=M.length,$e=0,rt=fe.length){for(;_e<Re&&$e<rt;_e++,$e++){let Q=M.charCodeAt(_e),lt=fe.charCodeAt($e);if(Q===lt)continue;if(Q>=128||lt>=128)return R(M.toLowerCase(),fe.toLowerCase(),_e,Re,$e,rt);N(Q)&&(Q-=32),N(lt)&&(lt-=32);const st=Q-lt;if(st!==0)return st}const it=Re-_e,te=rt-$e;return it<te?-1:it>te?1:0}function N(M){return M>=97&&M<=122}function re(M){return M>=65&&M<=90}function ue(M,fe){return M.length===fe.length&&P(M,fe)===0}function me(M,fe){const _e=fe.length;return fe.length>M.length?!1:P(M,fe,0,_e)===0}function Te(M,fe){let _e,Re=Math.min(M.length,fe.length);for(_e=0;_e<Re;_e++)if(M.charCodeAt(_e)!==fe.charCodeAt(_e))return _e;return Re}function Be(M,fe){let _e,Re=Math.min(M.length,fe.length);const $e=M.length-1,rt=fe.length-1;for(_e=0;_e<Re;_e++)if(M.charCodeAt($e-_e)!==fe.charCodeAt(rt-_e))return _e;return Re}function Le(M){return 55296<=M&&M<=56319}function at(M){return 56320<=M&&M<=57343}function ie(M,fe){return(M-55296<<10)+(fe-56320)+65536}function K(M,fe,_e){const Re=M.charCodeAt(_e);if(Le(Re)&&_e+1<fe){const $e=M.charCodeAt(_e+1);if(at($e))return ie(Re,$e)}return Re}function I(M,fe){const _e=M.charCodeAt(fe-1);if(at(_e)&&fe>1){const Re=M.charCodeAt(fe-2);if(Le(Re))return ie(Re,_e)}return _e}function ee(M,fe){const _e=Ae.getInstance(),Re=fe,$e=M.length,rt=K(M,$e,fe);fe+=rt>=65536?2:1;let it=_e.getGraphemeBreakType(rt);for(;fe<$e;){const te=K(M,$e,fe),Q=_e.getGraphemeBreakType(te);if(Ke(it,Q))break;fe+=te>=65536?2:1,it=Q}return fe-Re}function V(M,fe){const _e=Ae.getInstance(),Re=fe,$e=I(M,fe);fe-=$e>=65536?2:1;let rt=_e.getGraphemeBreakType($e);for(;fe>0;){const it=I(M,fe),te=_e.getGraphemeBreakType(it);if(Ke(te,rt))break;fe-=it>=65536?2:1,rt=te}return Re-fe}const he=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function S(M){return he.test(M)}const C=/(?:[\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 Z(M){return C.test(M)}const ye=/^[\t\n\r\x20-\x7E]*$/;function Ve(M){return ye.test(M)}const qe=/[\u2028\u2029]/;function gt(M){return qe.test(M)}function yt(M){for(let fe=0,_e=M.length;fe<_e;fe++)if(Dt(M.charCodeAt(fe)))return!0;return!1}function Dt(M){return M=+M,M>=11904&&M<=55215||M>=63744&&M<=64255||M>=65281&&M<=65374}function Ut(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 ot="\uFEFF";function kt(M){return!!(M&&M.length>0&&M.charCodeAt(0)===65279)}function tt(M,fe=!1){return M?(fe&&(M=M.replace(/\\./g,"")),M.toLowerCase()!==M):!1}function Gt(M){return M=M%(2*26),M<26?String.fromCharCode(97+M):String.fromCharCode(65+M-26)}function Xe(M){return Ae.getInstance().getGraphemeBreakType(M)}function Ke(M,fe){return M===0?fe!==5&&fe!==7:M===2&&fe===3?!1:M===4||M===2||M===3||fe===4||fe===2||fe===3?!0:!(M===8&&(fe===8||fe===9||fe===11||fe===12)||(M===11||M===9)&&(fe===9||fe===10)||(M===12||M===10)&&fe===10||fe===5||fe===13||fe===7||M===1||M===13&&fe===14||M===6&&fe===6)}class Ae{constructor(){this._data=xe()}static getInstance(){return Ae._INSTANCE||(Ae._INSTANCE=new Ae),Ae._INSTANCE}getGraphemeBreakType(fe){if(fe<32)return fe===10?3:fe===13?2:4;if(fe<127)return 0;const _e=this._data,Re=_e.length/3;let $e=1;for(;$e<=Re;)if(fe<_e[3*$e])$e=2*$e;else if(fe>_e[3*$e+1])$e=2*$e+1;else return _e[3*$e+2];return 0}}Ae._INSTANCE=null;function xe(){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 se(M,fe){if(M===0)return 0;const _e=Ne(M,fe);if(_e!==void 0)return _e;const Re=I(fe,M);return M-=Ce(Re),M}function Ne(M,fe){let _e=I(fe,M);for(M-=Ce(_e);Se(_e)||_e===65039||_e===8419;){if(M===0)return;_e=I(fe,M),M-=Ce(_e)}if(Ut(_e)){if(M>=0){const Re=I(fe,M);Re===8205&&(M-=Ce(Re))}return M}}function Ce(M){return M>=65536?2:1}function Se(M){return 127995<=M&&M<=127999}},72999:function(fn,ut,b){"use strict";b.d(ut,{$E:function(){return O},$K:function(){return ge},D8:function(){return _},HD:function(){return ce},IU:function(){return X},Jp:function(){return le},Kn:function(){return Y},cW:function(){return A},f6:function(){return J},hj:function(){return de},jn:function(){return $},kJ:function(){return y},mf:function(){return F},o8:function(){return p},p_:function(){return l},vE:function(){return U}});function y(R){return Array.isArray(R)}function ce(R){return typeof R=="string"}function Y(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&!(R instanceof RegExp)&&!(R instanceof Date)}function de(R){return typeof R=="number"&&!isNaN(R)}function $(R){return R===!0||R===!1}function p(R){return typeof R=="undefined"}function ge(R){return!le(R)}function le(R){return p(R)||R===null}function l(R,z){if(!R)throw new Error(z?`Unexpected type, expected '${z}'`:"Unexpected type")}function A(R){if(le(R))throw new Error("Assertion Failed: argument is undefined or null");return R}function F(R){return typeof R=="function"}function _(R,z){const P=Math.min(R.length,z.length);for(let N=0;N<P;N++)E(R[N],z[N])}function E(R,z){if(ce(z)){if(typeof R!==z)throw new Error(`argument does not match constraint: typeof ${z}`)}else if(F(z)){try{if(R instanceof z)return}catch(P){}if(!le(R)&&R.constructor===z||z.length===1&&z.call(void 0,R)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function w(R){let z=[],P=Object.getPrototypeOf(R);for(;Object.prototype!==P;)z=z.concat(Object.getOwnPropertyNames(P)),P=Object.getPrototypeOf(P);return z}function O(R){const z=[];for(const P of w(R))typeof R[P]=="function"&&z.push(P);return z}function X(R,z){const P=re=>function(){const ue=Array.prototype.slice.call(arguments,0);return z(re,ue)};let N={};for(const re of R)N[re]=P(re);return N}function J(R){return R===null?void 0:R}function U(R,z="Unreachable"){throw new Error(z)}},13268:function(fn,ut,b){"use strict";b.d(ut,{N:function(){return ce}});function y(Y,de){let $;return de.length===0?$=Y:$=Y.replace(/\{(\d+)\}/g,function(p,ge){const le=ge[0];return typeof de[le]!="undefined"?de[le]:p}),$}function ce(Y,de,...$){return y(de,$)}},96236:function(fn,ut,b){"use strict";b.d(ut,{BH:function(){return X},NZ:function(){return J},U8:function(){return U},co:function(){return O},eH:function(){return w},vr:function(){return E}});var y=b(75918),ce=b(52615),Y=b(4348),de=b(88226),$=b(69323),p=b(34502),ge=b(35884),le=b(90689),l=b(16925),A=b(49055),F=function(R,z,P,N){var re=arguments.length,ue=re<3?z:N===null?N=Object.getOwnPropertyDescriptor(z,P):N,me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ue=Reflect.decorate(R,z,P,N);else for(var Te=R.length-1;Te>=0;Te--)(me=R[Te])&&(ue=(re<3?me(ue):re>3?me(z,P,ue):me(z,P))||ue);return re>3&&ue&&Object.defineProperty(z,P,ue),ue},_=function(R,z){return function(P,N){z(P,N,R)}};function E(R){return R.command!==void 0}class w{constructor(z){this.id=w._idPool++,this._debugName=z}}w._idPool=0,w.CommandPalette=new w("CommandPalette"),w.EditorContext=new w("EditorContext"),w.SimpleEditorContext=new w("SimpleEditorContext"),w.EditorContextCopy=new w("EditorContextCopy"),w.EditorContextPeek=new w("EditorContextPeek"),w.MenubarEditMenu=new w("MenubarEditMenu"),w.MenubarCopy=new w("MenubarCopy"),w.MenubarGoMenu=new w("MenubarGoMenu"),w.MenubarSelectionMenu=new w("MenubarSelectionMenu"),w.InlineCompletionsActions=new w("InlineCompletionsActions");const O=(0,l.yh)("menuService"),X=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Y.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:R=>R===w.CommandPalette}}addCommand(R){return this.addCommands(de.$.single(R))}addCommands(R){for(const z of R)this._commands.set(z.id,z);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,$.OF)(()=>{let z=!1;for(const P of R)z=this._commands.delete(P.id)||z;z&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(R){return this._commands.get(R)}getCommands(){const R=new Map;return this._commands.forEach((z,P)=>R.set(P,z)),R}appendMenuItem(R,z){return this.appendMenuItems(de.$.single({id:R,item:z}))}appendMenuItems(R){const z=new Set,P=new p.S;for(const{id:N,item:re}of R){let ue=this._menuItems.get(N);ue||(ue=new p.S,this._menuItems.set(N,ue)),P.push(ue.push(re)),z.add(N)}return this._onDidChangeMenu.fire(z),(0,$.OF)(()=>{if(P.size>0){for(let N of P)N();this._onDidChangeMenu.fire(z),P.clear()}})}getMenuItems(R){let z;return this._menuItems.has(R)?z=[...this._menuItems.get(R)]:z=[],R===w.CommandPalette&&this._appendImplicitItems(z),z}_appendImplicitItems(R){const z=new Set;for(const P of R)E(P)&&(z.add(P.command.id),P.alt&&z.add(P.alt.id));this._commands.forEach((P,N)=>{z.has(N)||R.push({command:P})})}};class J extends y.wY{constructor(z,P,N,re){super(`submenuitem.${z.submenu.id}`,typeof z.title=="string"?z.title:z.title.value,[],"submenu"),this.item=z,this._menuService=P,this._contextKeyService=N,this._options=re}get actions(){const z=[],P=this._menuService.createMenu(this.item.submenu,this._contextKeyService),N=P.getActions(this._options);P.dispose();for(const[,re]of N)re.length>0&&(z.push(...re),z.push(new y.Z0));return z.length&&z.pop(),z}}let U=class Eu{constructor(z,P,N,re,ue){var me,Te;if(this._commandService=ue,this.id=z.id,this.label=N!=null&&N.renderShortTitle&&z.shortTitle?typeof z.shortTitle=="string"?z.shortTitle:z.shortTitle.value:typeof z.title=="string"?z.title:z.title.value,this.tooltip=(Te=typeof z.tooltip=="string"?z.tooltip:(me=z.tooltip)===null||me===void 0?void 0:me.value)!==null&&Te!==void 0?Te:"",this.enabled=!z.precondition||re.contextMatchesRules(z.precondition),this.checked=void 0,z.toggled){const Be=z.toggled.condition?z.toggled:{condition:z.toggled};this.checked=re.contextMatchesRules(Be.condition),this.checked&&Be.tooltip&&(this.tooltip=typeof Be.tooltip=="string"?Be.tooltip:Be.tooltip.value),Be.title&&(this.label=typeof Be.title=="string"?Be.title:Be.title.value)}this.item=z,this.alt=P?new Eu(P,void 0,N,re,ue):void 0,this._options=N,A.kS.isThemeIcon(z.icon)&&(this.class=ce.dT.asClassName(z.icon))}dispose(){}run(...z){var P,N;let re=[];return!((P=this._options)===null||P===void 0)&&P.arg&&(re=[...re,this._options.arg]),!((N=this._options)===null||N===void 0)&&N.shouldForwardArgs&&(re=[...re,...z]),this._commandService.executeCommand(this.id,...re)}};U=F([_(3,le.i6),_(4,ge.H)],U)},35884:function(fn,ut,b){"use strict";b.d(ut,{H:function(){return ge},P:function(){return le}});var y=b(4348),ce=b(88226),Y=b(69323),de=b(34502),$=b(72999),p=b(16925);const ge=(0,p.yh)("commandService"),le=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new y.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(l,A){if(!l)throw new Error("invalid command");if(typeof l=="string"){if(!A)throw new Error("invalid command");return this.registerCommand({id:l,handler:A})}if(l.description){const O=[];for(let J of l.description.args)O.push(J.constraint);const X=l.handler;l.handler=function(J,...U){return(0,$.D8)(U,O),X(J,...U)}}const{id:F}=l;let _=this._commands.get(F);_||(_=new de.S,this._commands.set(F,_));let E=_.unshift(l),w=(0,Y.OF)(()=>{E();const O=this._commands.get(F);O!=null&&O.isEmpty()&&this._commands.delete(F)});return this._onDidRegisterCommand.fire(F),w}registerCommandAlias(l,A){return le.registerCommand(l,(F,..._)=>F.get(ge).executeCommand(A,..._))}getCommand(l){const A=this._commands.get(l);if(!(!A||A.isEmpty()))return ce.$.first(A)}getCommands(){const l=new Map;for(const A of this._commands.keys()){const F=this.getCommand(A);F&&l.set(A,F)}return l}};le.registerCommand("noop",()=>{})},90689:function(fn,ut,b){"use strict";b.d(ut,{Ao:function(){return ge},Eq:function(){return ie},Fb:function(){return le},K8:function(){return ee},i6:function(){return at},uy:function(){return Le}});var y=b(23345),ce=b(82983),Y=b(16925);let de=y.WE||"";const $=new Map;$.set("false",!1),$.set("true",!0),$.set("isMac",y.dz),$.set("isLinux",y.IJ),$.set("isWindows",y.ED),$.set("isWeb",y.$L),$.set("isMacNative",y.dz&&!y.$L),$.set("isEdge",de.indexOf("Edg/")>=0),$.set("isFirefox",de.indexOf("Firefox")>=0),$.set("isChrome",de.indexOf("Chrome")>=0),$.set("isSafari",de.indexOf("Safari")>=0);const p=Object.prototype.hasOwnProperty;class ge{static has(S){return _.create(S)}static equals(S,C){return E.create(S,C)}static regex(S,C){return re.create(S,C)}static not(S){return J.create(S)}static and(...S){return Te.create(S,null)}static or(...S){return Be.create(S,null,!0)}static deserialize(S,C=!1){if(S)return this._deserializeOrExpression(S,C)}static _deserializeOrExpression(S,C){let Z=S.split("||");return Be.create(Z.map(ye=>this._deserializeAndExpression(ye,C)),null,!0)}static _deserializeAndExpression(S,C){let Z=S.split("&&");return Te.create(Z.map(ye=>this._deserializeOne(ye,C)),null)}static _deserializeOne(S,C){if(S=S.trim(),S.indexOf("!=")>=0){let Z=S.split("!=");return X.create(Z[0].trim(),this._deserializeValue(Z[1],C))}if(S.indexOf("==")>=0){let Z=S.split("==");return E.create(Z[0].trim(),this._deserializeValue(Z[1],C))}if(S.indexOf("=~")>=0){let Z=S.split("=~");return re.create(Z[0].trim(),this._deserializeRegexValue(Z[1],C))}if(S.indexOf(" in ")>=0){let Z=S.split(" in ");return w.create(Z[0].trim(),Z[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(S)){const Z=S.split(">=");return z.create(Z[0].trim(),Z[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(S)){const Z=S.split(">");return R.create(Z[0].trim(),Z[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(S)){const Z=S.split("<=");return N.create(Z[0].trim(),Z[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(S)){const Z=S.split("<");return P.create(Z[0].trim(),Z[1].trim())}return/^\!\s*/.test(S)?J.create(S.substr(1).trim()):_.create(S)}static _deserializeValue(S,C){if(S=S.trim(),S==="true")return!0;if(S==="false")return!1;let Z=/^'([^']*)'$/.exec(S);return Z?Z[1].trim():S}static _deserializeRegexValue(S,C){if((0,ce.m5)(S)){if(C)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let Z=S.indexOf("/"),ye=S.lastIndexOf("/");if(Z===ye||Z<0){if(C)throw new Error(`bad regexp-value '${S}', missing /-enclosure`);return console.warn(`bad regexp-value '${S}', missing /-enclosure`),null}let Ve=S.slice(Z+1,ye),qe=S[ye+1]==="i"?"i":"";try{return new RegExp(Ve,qe)}catch(gt){if(C)throw new Error(`bad regexp-value '${S}', parse error: ${gt}`);return console.warn(`bad regexp-value '${S}', parse error: ${gt}`),null}}}function le(he,S){const C=he?he.substituteConstants():void 0,Z=S?S.substituteConstants():void 0;return!C&&!Z?!0:!C||!Z?!1:C.equals(Z)}function l(he,S){return he.cmp(S)}class A{constructor(){this.type=0}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!1}serialize(){return"false"}keys(){return[]}negate(){return F.INSTANCE}}A.INSTANCE=new A;class F{constructor(){this.type=1}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!0}serialize(){return"true"}keys(){return[]}negate(){return A.INSTANCE}}F.INSTANCE=new F;class _{constructor(S,C){this.key=S,this.negated=C,this.type=2}static create(S,C=null){const Z=$.get(S);return typeof Z=="boolean"?Z?F.INSTANCE:A.INSTANCE:new _(S,C)}cmp(S){return S.type!==this.type?this.type-S.type:K(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=$.get(this.key);return typeof S=="boolean"?S?F.INSTANCE:A.INSTANCE:this}evaluate(S){return!!S.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=J.create(this.key,this)),this.negated}}class E{constructor(S,C,Z){this.key=S,this.value=C,this.negated=Z,this.type=4}static create(S,C,Z=null){if(typeof C=="boolean")return C?_.create(S,Z):J.create(S,Z);const ye=$.get(S);return typeof ye=="boolean"?C===(ye?"true":"false")?F.INSTANCE:A.INSTANCE:new E(S,C,Z)}cmp(S){return S.type!==this.type?this.type-S.type:I(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=$.get(this.key);if(typeof S=="boolean"){const C=S?"true":"false";return this.value===C?F.INSTANCE:A.INSTANCE}return this}evaluate(S){return S.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=X.create(this.key,this.value,this)),this.negated}}class w{constructor(S,C){this.key=S,this.valueKey=C,this.type=10,this.negated=null}static create(S,C){return new w(S,C)}cmp(S){return S.type!==this.type?this.type-S.type:I(this.key,this.valueKey,S.key,S.valueKey)}equals(S){return S.type===this.type?this.key===S.key&&this.valueKey===S.valueKey:!1}substituteConstants(){return this}evaluate(S){const C=S.getValue(this.valueKey),Z=S.getValue(this.key);return Array.isArray(C)?C.indexOf(Z)>=0:typeof Z=="string"&&typeof C=="object"&&C!==null?p.call(C,Z):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=O.create(this)),this.negated}}class O{constructor(S){this._actual=S,this.type=11}static create(S){return new O(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class X{constructor(S,C,Z){this.key=S,this.value=C,this.negated=Z,this.type=5}static create(S,C,Z=null){if(typeof C=="boolean")return C?J.create(S,Z):_.create(S,Z);const ye=$.get(S);return typeof ye=="boolean"?C===(ye?"true":"false")?A.INSTANCE:F.INSTANCE:new X(S,C,Z)}cmp(S){return S.type!==this.type?this.type-S.type:I(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=$.get(this.key);if(typeof S=="boolean"){const C=S?"true":"false";return this.value===C?A.INSTANCE:F.INSTANCE}return this}evaluate(S){return S.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class J{constructor(S,C){this.key=S,this.negated=C,this.type=3}static create(S,C=null){const Z=$.get(S);return typeof Z=="boolean"?Z?A.INSTANCE:F.INSTANCE:new J(S,C)}cmp(S){return S.type!==this.type?this.type-S.type:K(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=$.get(this.key);return typeof S=="boolean"?S?A.INSTANCE:F.INSTANCE:this}evaluate(S){return!S.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_.create(this.key,this)),this.negated}}function U(he,S){if(typeof he=="string"){const C=parseFloat(he);isNaN(C)||(he=C)}return typeof he=="string"||typeof he=="number"?S(he):A.INSTANCE}class R{constructor(S,C,Z){this.key=S,this.value=C,this.negated=Z,this.type=12}static create(S,C,Z=null){return U(C,ye=>new R(S,ye,Z))}cmp(S){return S.type!==this.type?this.type-S.type:I(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}class z{constructor(S,C,Z){this.key=S,this.value=C,this.negated=Z,this.type=13}static create(S,C,Z=null){return U(C,ye=>new z(S,ye,Z))}cmp(S){return S.type!==this.type?this.type-S.type:I(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}class P{constructor(S,C,Z){this.key=S,this.value=C,this.negated=Z,this.type=14}static create(S,C,Z=null){return U(C,ye=>new P(S,ye,Z))}cmp(S){return S.type!==this.type?this.type-S.type:I(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=z.create(this.key,this.value,this)),this.negated}}class N{constructor(S,C,Z){this.key=S,this.value=C,this.negated=Z,this.type=15}static create(S,C,Z=null){return U(C,ye=>new N(S,ye,Z))}cmp(S){return S.type!==this.type?this.type-S.type:I(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class re{constructor(S,C){this.key=S,this.regexp=C,this.type=7,this.negated=null}static create(S,C){return new re(S,C)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.key<S.key)return-1;if(this.key>S.key)return 1;const C=this.regexp?this.regexp.source:"",Z=S.regexp?S.regexp.source:"";return C<Z?-1:C>Z?1:0}equals(S){if(S.type===this.type){const C=this.regexp?this.regexp.source:"",Z=S.regexp?S.regexp.source:"";return this.key===S.key&&C===Z}return!1}substituteConstants(){return this}evaluate(S){let C=S.getValue(this.key);return this.regexp?this.regexp.test(C):!1}serialize(){const S=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${S}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ue.create(this)),this.negated}}class ue{constructor(S){this._actual=S,this.type=8}static create(S){return new ue(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function me(he){let S=null;for(let C=0,Z=he.length;C<Z;C++){const ye=he[C].substituteConstants();if(he[C]!==ye&&S===null){S=[];for(let Ve=0;Ve<C;Ve++)S[Ve]=he[Ve]}S!==null&&(S[C]=ye)}return S===null?he:S}class Te{constructor(S,C){this.expr=S,this.negated=C,this.type=6}static create(S,C){return Te._normalizeArr(S,C)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let C=0,Z=this.expr.length;C<Z;C++){const ye=l(this.expr[C],S.expr[C]);if(ye!==0)return ye}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let C=0,Z=this.expr.length;C<Z;C++)if(!this.expr[C].equals(S.expr[C]))return!1;return!0}return!1}substituteConstants(){const S=me(this.expr);return S===this.expr?this:Te.create(S,this.negated)}evaluate(S){for(let C=0,Z=this.expr.length;C<Z;C++)if(!this.expr[C].evaluate(S))return!1;return!0}static _normalizeArr(S,C){const Z=[];let ye=!1;for(const Ve of S)if(Ve){if(Ve.type===1){ye=!0;continue}if(Ve.type===0)return A.INSTANCE;if(Ve.type===6){Z.push(...Ve.expr);continue}Z.push(Ve)}if(Z.length===0&&ye)return F.INSTANCE;if(Z.length!==0){if(Z.length===1)return Z[0];Z.sort(l);for(let Ve=1;Ve<Z.length;Ve++)Z[Ve-1].equals(Z[Ve])&&(Z.splice(Ve,1),Ve--);if(Z.length===1)return Z[0];for(;Z.length>1;){const Ve=Z[Z.length-1];if(Ve.type!==9)break;Z.pop();const qe=Z.pop(),gt=Z.length===0,yt=Be.create(Ve.expr.map(Dt=>Te.create([Dt,qe],null)),null,gt);yt&&(Z.push(yt),Z.sort(l))}return Z.length===1?Z[0]:new Te(Z,C)}}serialize(){return this.expr.map(S=>S.serialize()).join(" && ")}keys(){const S=[];for(let C of this.expr)S.push(...C.keys());return S}negate(){if(!this.negated){const S=[];for(let C of this.expr)S.push(C.negate());this.negated=Be.create(S,this,!0)}return this.negated}}class Be{constructor(S,C){this.expr=S,this.negated=C,this.type=9}static create(S,C,Z){return Be._normalizeArr(S,C,Z)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let C=0,Z=this.expr.length;C<Z;C++){const ye=l(this.expr[C],S.expr[C]);if(ye!==0)return ye}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let C=0,Z=this.expr.length;C<Z;C++)if(!this.expr[C].equals(S.expr[C]))return!1;return!0}return!1}substituteConstants(){const S=me(this.expr);return S===this.expr?this:Be.create(S,this.negated,!1)}evaluate(S){for(let C=0,Z=this.expr.length;C<Z;C++)if(this.expr[C].evaluate(S))return!0;return!1}static _normalizeArr(S,C,Z){let ye=[],Ve=!1;if(S){for(let qe=0,gt=S.length;qe<gt;qe++){const yt=S[qe];if(yt){if(yt.type===0){Ve=!0;continue}if(yt.type===1)return F.INSTANCE;if(yt.type===9){ye=ye.concat(yt.expr);continue}ye.push(yt)}}if(ye.length===0&&Ve)return A.INSTANCE;ye.sort(l)}if(ye.length!==0){if(ye.length===1)return ye[0];for(let qe=1;qe<ye.length;qe++)ye[qe-1].equals(ye[qe])&&(ye.splice(qe,1),qe--);if(ye.length===1)return ye[0];if(Z){for(let qe=0;qe<ye.length;qe++)for(let gt=qe+1;gt<ye.length;gt++)ee(ye[qe],ye[gt])&&(ye.splice(gt,1),gt--);if(ye.length===1)return ye[0]}return new Be(ye,C)}}serialize(){return this.expr.map(S=>S.serialize()).join(" || ")}keys(){const S=[];for(let C of this.expr)S.push(...C.keys());return S}negate(){if(!this.negated){let S=[];for(let C of this.expr)S.push(C.negate());for(;S.length>1;){const C=S.shift(),Z=S.shift(),ye=[];for(const qe of V(C))for(const gt of V(Z))ye.push(Te.create([qe,gt],null));const Ve=S.length===0;S.unshift(Be.create(ye,null,Ve))}this.negated=S[0]}return this.negated}}class Le extends _{constructor(S,C,Z){super(S,null),this._defaultValue=C,typeof Z=="object"?Le._info.push(Object.assign(Object.assign({},Z),{key:S})):Z!==!0&&Le._info.push({key:S,description:Z,type:C!=null?typeof C:void 0})}static all(){return Le._info.values()}bindTo(S){return S.createKey(this.key,this._defaultValue)}getValue(S){return S.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(S){return E.create(this.key,S)}}Le._info=[];const at=(0,Y.yh)("contextKeyService"),ie="setContext";function K(he,S){return he<S?-1:he>S?1:0}function I(he,S,C,Z){return he<C?-1:he>C?1:S<Z?-1:S>Z?1:0}function ee(he,S){if(S.type===6&&he.type!==9&&he.type!==6){for(const ye of S.expr)if(he.equals(ye))return!0}const C=he.negate(),Z=V(C).concat(V(S));Z.sort(l);for(let ye=0;ye<Z.length;ye++){const qe=Z[ye].negate();for(let gt=ye+1;gt<Z.length;gt++){const yt=Z[gt];if(qe.equals(yt))return!0}}return!1}function V(he){return he.type===9?he.expr:[he]}},16925:function(fn,ut,b){"use strict";b.d(ut,{I8:function(){return y},TG:function(){return ce},jt:function(){return $},yh:function(){return de}});var y;(function(p){p.serviceIds=new Map,p.DI_TARGET="$di$target",p.DI_DEPENDENCIES="$di$dependencies";function ge(le){return le[p.DI_DEPENDENCIES]||[]}p.getServiceDependencies=ge})(y||(y={}));const ce=de("instantiationService");function Y(p,ge,le,l){ge[y.DI_TARGET]===ge?ge[y.DI_DEPENDENCIES].push({id:p,index:le,optional:l}):(ge[y.DI_DEPENDENCIES]=[{id:p,index:le,optional:l}],ge[y.DI_TARGET]=ge)}function de(p){if(y.serviceIds.has(p))return y.serviceIds.get(p);const ge=function(le,l,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Y(ge,le,A,!1)};return ge.toString=()=>p,y.serviceIds.set(p,ge),ge}function $(p){return function(ge,le,l){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Y(p,ge,l,!0)}}},44650:function(fn,ut,b){"use strict";b.d(ut,{B:function(){return de}});var y=b(76068),ce=b(72999);class Y{constructor(){this.data=new Map}add(p,ge){y.ok(ce.HD(p)),y.ok(ce.Kn(ge)),y.ok(!this.data.has(p),"There is already an extension with this id"),this.data.set(p,ge)}as(p){return this.data.get(p)||null}}const de=new Y},66213:function(fn,ut,b){"use strict";b.d(ut,{e:function(){return y}});var y;(function(ce){ce.DARK="dark",ce.LIGHT="light",ce.HIGH_CONTRAST="hc"})(y||(y={}))},49055:function(fn,ut,b){"use strict";b.d(ut,{EN:function(){return l},IP:function(){return _},Ic:function(){return O},XE:function(){return ge},bB:function(){return X},kS:function(){return A},m6:function(){return F}});var y=b(52615),ce=b(4348),Y=b(69323),de=b(16925),$=b(44650),p=b(66213);const ge=(0,de.yh)("themeService");var le;(function(J){function U(R){return R&&typeof R=="object"&&typeof R.id=="string"}J.isThemeColor=U})(le||(le={}));function l(J){return{id:J}}var A;(function(J){function U(ue){return ue&&typeof ue=="object"&&typeof ue.id=="string"&&(typeof ue.color=="undefined"||le.isThemeColor(ue.color))}J.isThemeIcon=U;const R=new RegExp(`^\\$\\((${y.dT.iconNameExpression}(?:${y.dT.iconModifierExpression})?)\\)$`);function z(ue){const me=R.exec(ue);if(!me)return;let[,Te]=me;return{id:Te}}J.fromString=z;function P(ue,me){let Te=ue.id;const Be=Te.lastIndexOf("~");return Be!==-1&&(Te=Te.substring(0,Be)),me&&(Te=`${Te}~${me}`),{id:Te}}J.modify=P;function N(ue,me){var Te,Be;return ue.id===me.id&&((Te=ue.color)===null||Te===void 0?void 0:Te.id)===((Be=me.color)===null||Be===void 0?void 0:Be.id)}J.isEqual=N;function re(ue,me){return{id:ue.id,color:me?l(me):void 0}}J.asThemeIcon=re,J.asClassNameArray=y.dT.asClassNameArray,J.asClassName=y.dT.asClassName,J.asCSSSelector=y.dT.asCSSSelector})(A||(A={}));function F(J){switch(J){case p.e.DARK:return"vs-dark";case p.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const _={ThemingContribution:"base.contributions.theming"};class E{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ce.Q5}onColorThemeChange(U){return this.themingParticipants.push(U),this.onThemingParticipantAddedEmitter.fire(U),(0,Y.OF)(()=>{const R=this.themingParticipants.indexOf(U);this.themingParticipants.splice(R,1)})}getThemingParticipants(){return this.themingParticipants}}let w=new E;$.B.add(_.ThemingContribution,w);function O(J){return w.onColorThemeChange(J)}class X extends Y.JT{constructor(U){super(),this.themeService=U,this.theme=U.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(R=>this.onThemeChange(R)))}onThemeChange(U){this.theme=U,this.updateStyles()}updateStyles(){}}},66003:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return ge}});var y=b(42244),ce=b(85899),Y=b(43749),de=b(59301),$=["show"];function p(le,l){if(!l.max)return!0;var A=l.strategy(le);return A<=l.max}function ge(le,l){return de.useMemo(function(){var A={};l&&(A.show=(0,Y.Z)(l)==="object"&&l.formatter?l.formatter:!!l),A=(0,ce.Z)((0,ce.Z)({},A),le);var F=A,_=F.show,E=(0,y.Z)(F,$);return(0,ce.Z)((0,ce.Z)({},E),{},{show:!!_,showFormatter:typeof _=="function"?_:void 0,strategy:E.strategy||function(w){return w.length}})},[le,l])}},36901:function(fn,ut,b){"use strict";b.r(ut),b.d(ut,{BaseInput:function(){return A},default:function(){return z}});var y=b(85899),ce=b(60499),Y=b(18642),de=b(43749),$=b(92310),p=b.n($),ge=b(59301),le=b(30292),l=ge.forwardRef(function(P,N){var re,ue,me,Te=P.inputElement,Be=P.children,Le=P.prefixCls,at=P.prefix,ie=P.suffix,K=P.addonBefore,I=P.addonAfter,ee=P.className,V=P.style,he=P.disabled,S=P.readOnly,C=P.focused,Z=P.triggerFocus,ye=P.allowClear,Ve=P.value,qe=P.handleReset,gt=P.hidden,yt=P.classes,Dt=P.classNames,Ut=P.dataAttrs,ot=P.styles,kt=P.components,tt=P.onClear,Gt=Be!=null?Be:Te,Xe=(kt==null?void 0:kt.affixWrapper)||"span",Ke=(kt==null?void 0:kt.groupWrapper)||"span",Ae=(kt==null?void 0:kt.wrapper)||"span",xe=(kt==null?void 0:kt.groupAddon)||"span",se=(0,ge.useRef)(null),Ne=function(Et){var pt;(pt=se.current)!==null&&pt!==void 0&&pt.contains(Et.target)&&(Z==null||Z())},Ce=(0,le.X3)(P),Se=(0,ge.cloneElement)(Gt,{value:Ve,className:p()((re=Gt.props)===null||re===void 0?void 0:re.className,!Ce&&(Dt==null?void 0:Dt.variant))||null}),M=(0,ge.useRef)(null);if(ge.useImperativeHandle(N,function(){return{nativeElement:M.current||se.current}}),Ce){var fe=null;if(ye){var _e=!he&&!S&&Ve,Re="".concat(Le,"-clear-icon"),$e=(0,de.Z)(ye)==="object"&&ye!==null&&ye!==void 0&&ye.clearIcon?ye.clearIcon:"\u2716";fe=ge.createElement("button",{type:"button",tabIndex:-1,onClick:function(Et){qe==null||qe(Et),tt==null||tt()},onMouseDown:function(Et){return Et.preventDefault()},className:p()(Re,(0,Y.Z)((0,Y.Z)({},"".concat(Re,"-hidden"),!_e),"".concat(Re,"-has-suffix"),!!ie))},$e)}var rt="".concat(Le,"-affix-wrapper"),it=p()(rt,(0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)({},"".concat(Le,"-disabled"),he),"".concat(rt,"-disabled"),he),"".concat(rt,"-focused"),C),"".concat(rt,"-readonly"),S),"".concat(rt,"-input-with-clear-btn"),ie&&ye&&Ve),yt==null?void 0:yt.affixWrapper,Dt==null?void 0:Dt.affixWrapper,Dt==null?void 0:Dt.variant),te=(ie||ye)&&ge.createElement("span",{className:p()("".concat(Le,"-suffix"),Dt==null?void 0:Dt.suffix),style:ot==null?void 0:ot.suffix},fe,ie);Se=ge.createElement(Xe,(0,ce.Z)({className:it,style:ot==null?void 0:ot.affixWrapper,onClick:Ne},Ut==null?void 0:Ut.affixWrapper,{ref:se}),at&&ge.createElement("span",{className:p()("".concat(Le,"-prefix"),Dt==null?void 0:Dt.prefix),style:ot==null?void 0:ot.prefix},at),Se,te)}if((0,le.He)(P)){var Q="".concat(Le,"-group"),lt="".concat(Q,"-addon"),st="".concat(Q,"-wrapper"),ht=p()("".concat(Le,"-wrapper"),Q,yt==null?void 0:yt.wrapper,Dt==null?void 0:Dt.wrapper),bt=p()(st,(0,Y.Z)({},"".concat(st,"-disabled"),he),yt==null?void 0:yt.group,Dt==null?void 0:Dt.groupWrapper);Se=ge.createElement(Ke,{className:bt,ref:M},ge.createElement(Ae,{className:ht},K&&ge.createElement(xe,{className:lt},K),Se,I&&ge.createElement(xe,{className:lt},I)))}return ge.cloneElement(Se,{className:p()((ue=Se.props)===null||ue===void 0?void 0:ue.className,ee)||null,style:(0,y.Z)((0,y.Z)({},(me=Se.props)===null||me===void 0?void 0:me.style),V),hidden:gt})}),A=l,F=b(77654),_=b(72190),E=b(42244),w=b(18929),O=b(2738),X=b(66003),J=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],U=(0,ge.forwardRef)(function(P,N){var re=P.autoComplete,ue=P.onChange,me=P.onFocus,Te=P.onBlur,Be=P.onPressEnter,Le=P.onKeyDown,at=P.onKeyUp,ie=P.prefixCls,K=ie===void 0?"rc-input":ie,I=P.disabled,ee=P.htmlSize,V=P.className,he=P.maxLength,S=P.suffix,C=P.showCount,Z=P.count,ye=P.type,Ve=ye===void 0?"text":ye,qe=P.classes,gt=P.classNames,yt=P.styles,Dt=P.onCompositionStart,Ut=P.onCompositionEnd,ot=(0,E.Z)(P,J),kt=(0,ge.useState)(!1),tt=(0,_.Z)(kt,2),Gt=tt[0],Xe=tt[1],Ke=(0,ge.useRef)(!1),Ae=(0,ge.useRef)(!1),xe=(0,ge.useRef)(null),se=(0,ge.useRef)(null),Ne=function(Bt){xe.current&&(0,le.nH)(xe.current,Bt)},Ce=(0,w.Z)(P.defaultValue,{value:P.value}),Se=(0,_.Z)(Ce,2),M=Se[0],fe=Se[1],_e=M==null?"":String(M),Re=(0,ge.useState)(null),$e=(0,_.Z)(Re,2),rt=$e[0],it=$e[1],te=(0,X.Z)(Z,C),Q=te.max||he,lt=te.strategy(_e),st=!!Q&<>Q;(0,ge.useImperativeHandle)(N,function(){var pe;return{focus:Ne,blur:function(){var Oe;(Oe=xe.current)===null||Oe===void 0||Oe.blur()},setSelectionRange:function(Oe,Ue,et){var q;(q=xe.current)===null||q===void 0||q.setSelectionRange(Oe,Ue,et)},select:function(){var Oe;(Oe=xe.current)===null||Oe===void 0||Oe.select()},input:xe.current,nativeElement:((pe=se.current)===null||pe===void 0?void 0:pe.nativeElement)||xe.current}}),(0,ge.useEffect)(function(){Ae.current&&(Ae.current=!1),Xe(function(pe){return pe&&I?!1:pe})},[I]);var ht=function(Bt,Oe,Ue){var et=Oe;if(!Ke.current&&te.exceedFormatter&&te.max&&te.strategy(Oe)>te.max){if(et=te.exceedFormatter(Oe,{max:te.max}),Oe!==et){var q,ne;it([((q=xe.current)===null||q===void 0?void 0:q.selectionStart)||0,((ne=xe.current)===null||ne===void 0?void 0:ne.selectionEnd)||0])}}else if(Ue.source==="compositionEnd")return;fe(et),xe.current&&(0,le.rJ)(xe.current,Bt,ue,et)};(0,ge.useEffect)(function(){if(rt){var pe;(pe=xe.current)===null||pe===void 0||pe.setSelectionRange.apply(pe,(0,F.Z)(rt))}},[rt]);var bt=function(Bt){ht(Bt,Bt.target.value,{source:"change"})},He=function(Bt){Ke.current=!1,ht(Bt,Bt.currentTarget.value,{source:"compositionEnd"}),Ut==null||Ut(Bt)},Et=function(Bt){Be&&Bt.key==="Enter"&&!Ae.current&&(Ae.current=!0,Be(Bt)),Le==null||Le(Bt)},pt=function(Bt){Bt.key==="Enter"&&(Ae.current=!1),at==null||at(Bt)},ft=function(Bt){Xe(!0),me==null||me(Bt)},Pt=function(Bt){Ae.current&&(Ae.current=!1),Xe(!1),Te==null||Te(Bt)},x=function(Bt){fe(""),Ne(),xe.current&&(0,le.rJ)(xe.current,Bt,ue)},D=st&&"".concat(K,"-out-of-range"),Ye=function(){var Bt=(0,O.Z)(P,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ge.createElement("input",(0,ce.Z)({autoComplete:re},Bt,{onChange:bt,onFocus:ft,onBlur:Pt,onKeyDown:Et,onKeyUp:pt,className:p()(K,(0,Y.Z)({},"".concat(K,"-disabled"),I),gt==null?void 0:gt.input),style:yt==null?void 0:yt.input,ref:xe,size:ee,type:Ve,onCompositionStart:function(Ue){Ke.current=!0,Dt==null||Dt(Ue)},onCompositionEnd:He}))},W=function(){var Bt=Number(Q)>0;if(S||te.show){var Oe=te.showFormatter?te.showFormatter({value:_e,count:lt,maxLength:Q}):"".concat(lt).concat(Bt?" / ".concat(Q):"");return ge.createElement(ge.Fragment,null,te.show&&ge.createElement("span",{className:p()("".concat(K,"-show-count-suffix"),(0,Y.Z)({},"".concat(K,"-show-count-has-suffix"),!!S),gt==null?void 0:gt.count),style:(0,y.Z)({},yt==null?void 0:yt.count)},Oe),S)}return null};return ge.createElement(A,(0,ce.Z)({},ot,{prefixCls:K,className:p()(V,D),handleReset:x,value:_e,focused:Gt,triggerFocus:Ne,suffix:W(),disabled:I,classes:qe,classNames:gt,styles:yt}),Ye())}),R=U,z=R},30292:function(fn,ut,b){"use strict";b.d(ut,{He:function(){return y},X3:function(){return ce},nH:function(){return $},rJ:function(){return de}});function y(p){return!!(p.addonBefore||p.addonAfter)}function ce(p){return!!(p.prefix||p.suffix||p.allowClear)}function Y(p,ge,le){var l=ge.cloneNode(!0),A=Object.create(p,{target:{value:l},currentTarget:{value:l}});return l.value=le,typeof ge.selectionStart=="number"&&typeof ge.selectionEnd=="number"&&(l.selectionStart=ge.selectionStart,l.selectionEnd=ge.selectionEnd),l.setSelectionRange=function(){ge.setSelectionRange.apply(ge,arguments)},A}function de(p,ge,le,l){if(le){var A=ge;if(ge.type==="click"){A=Y(ge,p,""),le(A);return}if(p.type!=="file"&&l!==void 0){A=Y(ge,p,l),le(A);return}le(A)}}function $(p,ge){if(p){p.focus(ge);var le=ge||{},l=le.cursor;if(l){var A=p.value.length;switch(l){case"start":p.setSelectionRange(0,0);break;case"end":p.setSelectionRange(A,A);break;default:p.setSelectionRange(0,A)}}}}},28321:function(fn,ut,b){"use strict";b.d(ut,{iz:function(){return Qe},ck:function(){return et},BW:function(){return Ge},sN:function(){return et},Wd:function(){return An},ZP:function(){return Jt},Xl:function(){return Be}});var y=b(60499),ce=b(18642),Y=b(85899),de=b(77654),$=b(72190),p=b(42244),ge=b(92310),le=b.n(ge),l=b(83836),A=b(18929),F=b(13697),_=b(48736),E=b(59301),w=b(4676),O=E.createContext(null);function X(je,nt){return je===void 0?null:"".concat(je,"-").concat(nt)}function J(je){var nt=E.useContext(O);return X(nt,je)}var U=b(80547),R=["children","locked"],z=E.createContext(null);function P(je,nt){var Ct=(0,Y.Z)({},je);return Object.keys(nt).forEach(function(mt){var xt=nt[mt];xt!==void 0&&(Ct[mt]=xt)}),Ct}function N(je){var nt=je.children,Ct=je.locked,mt=(0,p.Z)(je,R),xt=E.useContext(z),It=(0,U.Z)(function(){return P(xt,mt)},[xt,mt],function(Nt,zt){return!Ct&&(Nt[0]!==zt[0]||!(0,F.Z)(Nt[1],zt[1],!0))});return E.createElement(z.Provider,{value:It},nt)}var re=[],ue=E.createContext(null);function me(){return E.useContext(ue)}var Te=E.createContext(re);function Be(je){var nt=E.useContext(Te);return E.useMemo(function(){return je!==void 0?[].concat((0,de.Z)(nt),[je]):nt},[nt,je])}var Le=E.createContext(null),at=E.createContext({}),ie=at,K=b(29194);function I(je){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,K.Z)(je)){var Ct=je.nodeName.toLowerCase(),mt=["input","select","textarea","button"].includes(Ct)||je.isContentEditable||Ct==="a"&&!!je.getAttribute("href"),xt=je.getAttribute("tabindex"),It=Number(xt),Nt=null;return xt&&!Number.isNaN(It)?Nt=It:mt&&Nt===null&&(Nt=0),mt&&je.disabled&&(Nt=null),Nt!==null&&(Nt>=0||nt&&Nt<0)}return!1}function ee(je){var nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ct=(0,de.Z)(je.querySelectorAll("*")).filter(function(mt){return I(mt,nt)});return I(je,nt)&&Ct.unshift(je),Ct}var V=null;function he(){V=document.activeElement}function S(){V=null}function C(){if(V)try{V.focus()}catch(je){}}function Z(je,nt){if(nt.keyCode===9){var Ct=ee(je),mt=Ct[nt.shiftKey?0:Ct.length-1],xt=mt===document.activeElement||je===document.activeElement;if(xt){var It=Ct[nt.shiftKey?Ct.length-1:0];It.focus(),nt.preventDefault()}}}var ye=b(10228),Ve=b(16089),qe=ye.Z.LEFT,gt=ye.Z.RIGHT,yt=ye.Z.UP,Dt=ye.Z.DOWN,Ut=ye.Z.ENTER,ot=ye.Z.ESC,kt=ye.Z.HOME,tt=ye.Z.END,Gt=[yt,Dt,qe,gt];function Xe(je,nt,Ct,mt){var xt,It="prev",Nt="next",zt="children",nn="parent";if(je==="inline"&&mt===Ut)return{inlineTrigger:!0};var cn=(0,ce.Z)((0,ce.Z)({},yt,It),Dt,Nt),zn=(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},qe,Ct?Nt:It),gt,Ct?It:Nt),Dt,zt),Ut,zt),gn=(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},yt,It),Dt,Nt),Ut,zt),ot,nn),qe,Ct?zt:nn),gt,Ct?nn:zt),dn={inline:cn,horizontal:zn,vertical:gn,inlineSub:cn,horizontalSub:gn,verticalSub:gn},wn=(xt=dn["".concat(je).concat(nt?"":"Sub")])===null||xt===void 0?void 0:xt[mt];switch(wn){case It:return{offset:-1,sibling:!0};case Nt:return{offset:1,sibling:!0};case nn:return{offset:-1,sibling:!1};case zt:return{offset:1,sibling:!1};default:return null}}function Ke(je){for(var nt=je;nt;){if(nt.getAttribute("data-menu-list"))return nt;nt=nt.parentElement}return null}function Ae(je,nt){for(var Ct=je||document.activeElement;Ct;){if(nt.has(Ct))return Ct;Ct=Ct.parentElement}return null}function xe(je,nt){var Ct=ee(je,!0);return Ct.filter(function(mt){return nt.has(mt)})}function se(je,nt,Ct){var mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!je)return null;var xt=xe(je,nt),It=xt.length,Nt=xt.findIndex(function(zt){return Ct===zt});return mt<0?Nt===-1?Nt=It-1:Nt-=1:mt>0&&(Nt+=1),Nt=(Nt+It)%It,xt[Nt]}var Ne=function(nt,Ct){var mt=new Set,xt=new Map,It=new Map;return nt.forEach(function(Nt){var zt=document.querySelector("[data-menu-id='".concat(X(Ct,Nt),"']"));zt&&(mt.add(zt),It.set(zt,Nt),xt.set(Nt,zt))}),{elements:mt,key2element:xt,element2key:It}};function Ce(je,nt,Ct,mt,xt,It,Nt,zt,nn,cn){var zn=E.useRef(),gn=E.useRef();gn.current=nt;var dn=function(){Ve.Z.cancel(zn.current)};return E.useEffect(function(){return function(){dn()}},[]),function(wn){var En=wn.which;if([].concat(Gt,[Ut,ot,kt,tt]).includes(En)){var Ln=It(),_n=Ne(Ln,mt),Tn=_n,kn=Tn.elements,Nn=Tn.key2element,On=Tn.element2key,In=Nn.get(nt),Dn=Ae(In,kn),yn=On.get(Dn),fr=Xe(je,Nt(yn,!0).length===1,Ct,En);if(!fr&&En!==kt&&En!==tt)return;(Gt.includes(En)||[kt,tt].includes(En))&&wn.preventDefault();var _t=function(sn){if(sn){var Mt=sn,jt=sn.querySelector("a");jt!=null&&jt.getAttribute("href")&&(Mt=jt);var un=On.get(sn);zt(un),dn(),zn.current=(0,Ve.Z)(function(){gn.current===un&&Mt.focus()})}};if([kt,tt].includes(En)||fr.sibling||!Dn){var Pn;!Dn||je==="inline"?Pn=xt.current:Pn=Ke(Dn);var jn,xr=xe(Pn,kn);En===kt?jn=xr[0]:En===tt?jn=xr[xr.length-1]:jn=se(Pn,kn,Dn,fr.offset),_t(jn)}else if(fr.inlineTrigger)nn(yn);else if(fr.offset>0)nn(yn,!0),dn(),zn.current=(0,Ve.Z)(function(){_n=Ne(Ln,mt);var vn=Dn.getAttribute("aria-controls"),sn=document.getElementById(vn),Mt=se(sn,_n.elements);_t(Mt)},5);else if(fr.offset<0){var pr=Nt(yn,!0),Rr=pr[pr.length-2],Er=Nn.get(Rr);nn(Rr,!1),_t(Er)}}cn==null||cn(wn)}}function Se(je){Promise.resolve().then(je)}var M="__RC_UTIL_PATH_SPLIT__",fe=function(nt){return nt.join(M)},_e=function(nt){return nt.split(M)},Re="rc-menu-more";function $e(){var je=E.useState({}),nt=(0,$.Z)(je,2),Ct=nt[1],mt=(0,E.useRef)(new Map),xt=(0,E.useRef)(new Map),It=E.useState([]),Nt=(0,$.Z)(It,2),zt=Nt[0],nn=Nt[1],cn=(0,E.useRef)(0),zn=(0,E.useRef)(!1),gn=function(){zn.current||Ct({})},dn=(0,E.useCallback)(function(Nn,On){var In=fe(On);xt.current.set(In,Nn),mt.current.set(Nn,In),cn.current+=1;var Dn=cn.current;Se(function(){Dn===cn.current&&gn()})},[]),wn=(0,E.useCallback)(function(Nn,On){var In=fe(On);xt.current.delete(In),mt.current.delete(Nn)},[]),En=(0,E.useCallback)(function(Nn){nn(Nn)},[]),Ln=(0,E.useCallback)(function(Nn,On){var In=mt.current.get(Nn)||"",Dn=_e(In);return On&&zt.includes(Dn[0])&&Dn.unshift(Re),Dn},[zt]),_n=(0,E.useCallback)(function(Nn,On){return Nn.filter(function(In){return In!==void 0}).some(function(In){var Dn=Ln(In,!0);return Dn.includes(On)})},[Ln]),Tn=function(){var On=(0,de.Z)(mt.current.keys());return zt.length&&On.push(Re),On},kn=(0,E.useCallback)(function(Nn){var On="".concat(mt.current.get(Nn)).concat(M),In=new Set;return(0,de.Z)(xt.current.keys()).forEach(function(Dn){Dn.startsWith(On)&&In.add(xt.current.get(Dn))}),In},[]);return E.useEffect(function(){return function(){zn.current=!0}},[]),{registerPath:dn,unregisterPath:wn,refreshOverflowKeys:En,isSubPathKey:_n,getKeyPath:Ln,getKeys:Tn,getSubPathKeys:kn}}function rt(je){var nt=E.useRef(je);nt.current=je;var Ct=E.useCallback(function(){for(var mt,xt=arguments.length,It=new Array(xt),Nt=0;Nt<xt;Nt++)It[Nt]=arguments[Nt];return(mt=nt.current)===null||mt===void 0?void 0:mt.call.apply(mt,[nt].concat(It))},[]);return je?Ct:void 0}var it=Math.random().toFixed(5).toString().slice(2),te=0;function Q(je){var nt=(0,A.Z)(je,{value:je}),Ct=(0,$.Z)(nt,2),mt=Ct[0],xt=Ct[1];return E.useEffect(function(){te+=1;var It="".concat(it,"-").concat(te);xt("rc-menu-uuid-".concat(It))},[]),mt}var lt=b(38705),st=b(17212),ht=b(39153),bt=b(55401),He=b(2738),Et=b(8654);function pt(je,nt,Ct,mt){var xt=E.useContext(z),It=xt.activeKey,Nt=xt.onActive,zt=xt.onInactive,nn={active:It===je};return nt||(nn.onMouseEnter=function(cn){Ct==null||Ct({key:je,domEvent:cn}),Nt(je)},nn.onMouseLeave=function(cn){mt==null||mt({key:je,domEvent:cn}),zt(je)}),nn}function ft(je){var nt=E.useContext(z),Ct=nt.mode,mt=nt.rtl,xt=nt.inlineIndent;if(Ct!=="inline")return null;var It=je;return mt?{paddingRight:It*xt}:{paddingLeft:It*xt}}function Pt(je){var nt=je.icon,Ct=je.props,mt=je.children,xt;return nt===null||nt===!1?null:(typeof nt=="function"?xt=E.createElement(nt,(0,Y.Z)({},Ct)):typeof nt!="boolean"&&(xt=nt),xt||mt||null)}var x=["item"];function D(je){var nt=je.item,Ct=(0,p.Z)(je,x);return Object.defineProperty(Ct,"item",{get:function(){return(0,_.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),nt}}),Ct}var Ye=["title","attribute","elementRef"],W=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],pe=["active"],Bt=function(je){(0,ht.Z)(Ct,je);var nt=(0,bt.Z)(Ct);function Ct(){return(0,lt.Z)(this,Ct),nt.apply(this,arguments)}return(0,st.Z)(Ct,[{key:"render",value:function(){var xt=this.props,It=xt.title,Nt=xt.attribute,zt=xt.elementRef,nn=(0,p.Z)(xt,Ye),cn=(0,He.Z)(nn,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,_.ZP)(!Nt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),E.createElement(l.Z.Item,(0,y.Z)({},Nt,{title:typeof It=="string"?It:void 0},cn,{ref:zt}))}}]),Ct}(E.Component),Oe=E.forwardRef(function(je,nt){var Ct=je.style,mt=je.className,xt=je.eventKey,It=je.warnKey,Nt=je.disabled,zt=je.itemIcon,nn=je.children,cn=je.role,zn=je.onMouseEnter,gn=je.onMouseLeave,dn=je.onClick,wn=je.onKeyDown,En=je.onFocus,Ln=(0,p.Z)(je,W),_n=J(xt),Tn=E.useContext(z),kn=Tn.prefixCls,Nn=Tn.onItemClick,On=Tn.disabled,In=Tn.overflowDisabled,Dn=Tn.itemIcon,yn=Tn.selectedKeys,fr=Tn.onActive,_t=E.useContext(ie),Pn=_t._internalRenderMenuItem,jn="".concat(kn,"-item"),xr=E.useRef(),pr=E.useRef(),Rr=On||Nt,Er=(0,Et.x1)(nt,pr),vn=Be(xt),sn=function(br){return{key:xt,keyPath:(0,de.Z)(vn).reverse(),item:xr.current,domEvent:br}},Mt=zt||Dn,jt=pt(xt,Rr,zn,gn),un=jt.active,bn=(0,p.Z)(jt,pe),Mn=yn.includes(xt),Jn=ft(vn.length),tn=function(br){if(!Rr){var Kr=sn(br);dn==null||dn(D(Kr)),Nn(Kr)}},Hn=function(br){if(wn==null||wn(br),br.which===ye.Z.ENTER){var Kr=sn(br);dn==null||dn(D(Kr)),Nn(Kr)}},er=function(br){fr(xt),En==null||En(br)},Tr={};je.role==="option"&&(Tr["aria-selected"]=Mn);var $r=E.createElement(Bt,(0,y.Z)({ref:xr,elementRef:Er,role:cn===null?"none":cn||"menuitem",tabIndex:Nt?null:-1,"data-menu-id":In&&_n?null:_n},(0,He.Z)(Ln,["extra"]),bn,Tr,{component:"li","aria-disabled":Nt,style:(0,Y.Z)((0,Y.Z)({},Jn),Ct),className:le()(jn,(0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(jn,"-active"),un),"".concat(jn,"-selected"),Mn),"".concat(jn,"-disabled"),Rr),mt),onClick:tn,onKeyDown:Hn,onFocus:er}),nn,E.createElement(Pt,{props:(0,Y.Z)((0,Y.Z)({},je),{},{isSelected:Mn}),icon:Mt}));return Pn&&($r=Pn($r,je,{selected:Mn})),$r});function Ue(je,nt){var Ct=je.eventKey,mt=me(),xt=Be(Ct);return E.useEffect(function(){if(mt)return mt.registerPath(Ct,xt),function(){mt.unregisterPath(Ct,xt)}},[xt]),mt?null:E.createElement(Oe,(0,y.Z)({},je,{ref:nt}))}var et=E.forwardRef(Ue),q=["className","children"],ne=function(nt,Ct){var mt=nt.className,xt=nt.children,It=(0,p.Z)(nt,q),Nt=E.useContext(z),zt=Nt.prefixCls,nn=Nt.mode,cn=Nt.rtl;return E.createElement("ul",(0,y.Z)({className:le()(zt,cn&&"".concat(zt,"-rtl"),"".concat(zt,"-sub"),"".concat(zt,"-").concat(nn==="inline"?"inline":"vertical"),mt),role:"menu"},It,{"data-menu-list":!0,ref:Ct}),xt)},we=E.forwardRef(ne);we.displayName="SubMenuList";var Fe=we,G=b(11592);function St(je,nt){return(0,G.Z)(je).map(function(Ct,mt){if(E.isValidElement(Ct)){var xt,It,Nt=Ct.key,zt=(xt=(It=Ct.props)===null||It===void 0?void 0:It.eventKey)!==null&&xt!==void 0?xt:Nt,nn=zt==null;nn&&(zt="tmp_key-".concat([].concat((0,de.Z)(nt),[mt]).join("-")));var cn={key:zt,eventKey:zt};return E.cloneElement(Ct,cn)}return Ct})}var Ee=b(68196),Wt={adjustX:1,adjustY:1},en={topLeft:{points:["bl","tl"],overflow:Wt},topRight:{points:["br","tr"],overflow:Wt},bottomLeft:{points:["tl","bl"],overflow:Wt},bottomRight:{points:["tr","br"],overflow:Wt},leftTop:{points:["tr","tl"],overflow:Wt},leftBottom:{points:["br","bl"],overflow:Wt},rightTop:{points:["tl","tr"],overflow:Wt},rightBottom:{points:["bl","br"],overflow:Wt}},an={topLeft:{points:["bl","tl"],overflow:Wt},topRight:{points:["br","tr"],overflow:Wt},bottomLeft:{points:["tl","bl"],overflow:Wt},bottomRight:{points:["tr","br"],overflow:Wt},rightTop:{points:["tr","tl"],overflow:Wt},rightBottom:{points:["br","bl"],overflow:Wt},leftTop:{points:["tl","tr"],overflow:Wt},leftBottom:{points:["bl","br"],overflow:Wt}},Zn=null;function Rn(je,nt,Ct){if(nt)return nt;if(Ct)return Ct[je]||Ct.other}var Cn={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function sr(je){var nt=je.prefixCls,Ct=je.visible,mt=je.children,xt=je.popup,It=je.popupStyle,Nt=je.popupClassName,zt=je.popupOffset,nn=je.disabled,cn=je.mode,zn=je.onVisibleChange,gn=E.useContext(z),dn=gn.getPopupContainer,wn=gn.rtl,En=gn.subMenuOpenDelay,Ln=gn.subMenuCloseDelay,_n=gn.builtinPlacements,Tn=gn.triggerSubMenuAction,kn=gn.forceSubMenuRender,Nn=gn.rootClassName,On=gn.motion,In=gn.defaultMotions,Dn=E.useState(!1),yn=(0,$.Z)(Dn,2),fr=yn[0],_t=yn[1],Pn=wn?(0,Y.Z)((0,Y.Z)({},an),_n):(0,Y.Z)((0,Y.Z)({},en),_n),jn=Cn[cn],xr=Rn(cn,On,In),pr=E.useRef(xr);cn!=="inline"&&(pr.current=xr);var Rr=(0,Y.Z)((0,Y.Z)({},pr.current),{},{leavedClassName:"".concat(nt,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Er=E.useRef();return E.useEffect(function(){return Er.current=(0,Ve.Z)(function(){_t(Ct)}),function(){Ve.Z.cancel(Er.current)}},[Ct]),E.createElement(Ee.Z,{prefixCls:nt,popupClassName:le()("".concat(nt,"-popup"),(0,ce.Z)({},"".concat(nt,"-rtl"),wn),Nt,Nn),stretch:cn==="horizontal"?"minWidth":null,getPopupContainer:dn,builtinPlacements:Pn,popupPlacement:jn,popupVisible:fr,popup:xt,popupStyle:It,popupAlign:zt&&{offset:zt},action:nn?[]:[Tn],mouseEnterDelay:En,mouseLeaveDelay:Ln,onPopupVisibleChange:zn,forceRender:kn,popupMotion:Rr,fresh:!0},mt)}var dr=b(77900);function $n(je){var nt=je.id,Ct=je.open,mt=je.keyPath,xt=je.children,It="inline",Nt=E.useContext(z),zt=Nt.prefixCls,nn=Nt.forceSubMenuRender,cn=Nt.motion,zn=Nt.defaultMotions,gn=Nt.mode,dn=E.useRef(!1);dn.current=gn===It;var wn=E.useState(!dn.current),En=(0,$.Z)(wn,2),Ln=En[0],_n=En[1],Tn=dn.current?Ct:!1;E.useEffect(function(){dn.current&&_n(!1)},[gn]);var kn=(0,Y.Z)({},Rn(It,cn,zn));mt.length>1&&(kn.motionAppear=!1);var Nn=kn.onVisibleChanged;return kn.onVisibleChanged=function(On){return!dn.current&&!On&&_n(!0),Nn==null?void 0:Nn(On)},Ln?null:E.createElement(N,{mode:It,locked:!dn.current},E.createElement(dr.default,(0,y.Z)({visible:Tn},kn,{forceRender:nn,removeOnLeave:!1,leavedClassName:"".concat(zt,"-hidden")}),function(On){var In=On.className,Dn=On.style;return E.createElement(Fe,{id:nt,className:In,style:Dn},xt)}))}var qn=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],ln=["active"],$t=E.forwardRef(function(je,nt){var Ct=je.style,mt=je.className,xt=je.title,It=je.eventKey,Nt=je.warnKey,zt=je.disabled,nn=je.internalPopupClose,cn=je.children,zn=je.itemIcon,gn=je.expandIcon,dn=je.popupClassName,wn=je.popupOffset,En=je.popupStyle,Ln=je.onClick,_n=je.onMouseEnter,Tn=je.onMouseLeave,kn=je.onTitleClick,Nn=je.onTitleMouseEnter,On=je.onTitleMouseLeave,In=(0,p.Z)(je,qn),Dn=J(It),yn=E.useContext(z),fr=yn.prefixCls,_t=yn.mode,Pn=yn.openKeys,jn=yn.disabled,xr=yn.overflowDisabled,pr=yn.activeKey,Rr=yn.selectedKeys,Er=yn.itemIcon,vn=yn.expandIcon,sn=yn.onItemClick,Mt=yn.onOpenChange,jt=yn.onActive,un=E.useContext(ie),bn=un._internalRenderSubMenuItem,Mn=E.useContext(Le),Jn=Mn.isSubPathKey,tn=Be(),Hn="".concat(fr,"-submenu"),er=jn||zt,Tr=E.useRef(),$r=E.useRef(),Wr=zn!=null?zn:Er,br=gn!=null?gn:vn,Kr=Pn.includes(It),Cr=!xr&&Kr,Hr=Jn(Rr,It),Ir=pt(It,er,Nn,On),Pr=Ir.active,Mr=(0,p.Z)(Ir,ln),Yr=E.useState(!1),ur=(0,$.Z)(Yr,2),ei=ur[0],Xr=ur[1],Qr=function(oi){er||Xr(oi)},Vn=function(oi){Qr(!0),_n==null||_n({key:It,domEvent:oi})},xn=function(oi){Qr(!1),Tn==null||Tn({key:It,domEvent:oi})},Fr=E.useMemo(function(){return Pr||(_t!=="inline"?ei||Jn([pr],It):!1)},[_t,Pr,pr,ei,It,Jn]),rn=ft(tn.length),qr=function(oi){er||(kn==null||kn({key:It,domEvent:oi}),_t==="inline"&&Mt(It,!Kr))},Ii=rt(function(Jr){Ln==null||Ln(D(Jr)),sn(Jr)}),Si=function(oi){_t!=="inline"&&Mt(It,oi)},di=function(){jt(It)},pi=Dn&&"".concat(Dn,"-popup"),or=E.useMemo(function(){return E.createElement(Pt,{icon:_t!=="horizontal"?br:void 0,props:(0,Y.Z)((0,Y.Z)({},je),{},{isOpen:Cr,isSubMenu:!0})},E.createElement("i",{className:"".concat(Hn,"-arrow")}))},[_t,br,je,Cr,Hn]),ni=E.createElement("div",(0,y.Z)({role:"menuitem",style:rn,className:"".concat(Hn,"-title"),tabIndex:er?null:-1,ref:Tr,title:typeof xt=="string"?xt:null,"data-menu-id":xr&&Dn?null:Dn,"aria-expanded":Cr,"aria-haspopup":!0,"aria-controls":pi,"aria-disabled":er,onClick:qr,onFocus:di},Mr),xt,or),vi=E.useRef(_t);if(_t!=="inline"&&tn.length>1?vi.current="vertical":vi.current=_t,!xr){var wi=vi.current;ni=E.createElement(sr,{mode:wi,prefixCls:Hn,visible:!nn&&Cr&&_t!=="inline",popupClassName:dn,popupOffset:wn,popupStyle:En,popup:E.createElement(N,{mode:wi==="horizontal"?"vertical":wi},E.createElement(Fe,{id:pi,ref:$r},cn)),disabled:er,onVisibleChange:Si},ni)}var Lr=E.createElement(l.Z.Item,(0,y.Z)({ref:nt,role:"none"},In,{component:"li",style:Ct,className:le()(Hn,"".concat(Hn,"-").concat(_t),mt,(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(Hn,"-open"),Cr),"".concat(Hn,"-active"),Fr),"".concat(Hn,"-selected"),Hr),"".concat(Hn,"-disabled"),er)),onMouseEnter:Vn,onMouseLeave:xn}),ni,!xr&&E.createElement($n,{id:pi,open:Cr,keyPath:tn},cn));return bn&&(Lr=bn(Lr,je,{selected:Hr,active:Fr,open:Cr,disabled:er})),E.createElement(N,{onItemClick:Ii,mode:_t==="horizontal"?"vertical":_t,itemIcon:Wr,expandIcon:br},Lr)}),Vt=E.forwardRef(function(je,nt){var Ct=je.eventKey,mt=je.children,xt=Be(Ct),It=St(mt,xt),Nt=me();E.useEffect(function(){if(Nt)return Nt.registerPath(Ct,xt),function(){Nt.unregisterPath(Ct,xt)}},[xt]);var zt;return Nt?zt=It:zt=E.createElement($t,(0,y.Z)({ref:nt},je),It),E.createElement(Te.Provider,{value:xt},zt)}),An=Vt,Xn=b(43749);function Qe(je){var nt=je.className,Ct=je.style,mt=E.useContext(z),xt=mt.prefixCls,It=me();return It?null:E.createElement("li",{role:"separator",className:le()("".concat(xt,"-item-divider"),nt),style:Ct})}var Je=["className","title","eventKey","children"],ve=E.forwardRef(function(je,nt){var Ct=je.className,mt=je.title,xt=je.eventKey,It=je.children,Nt=(0,p.Z)(je,Je),zt=E.useContext(z),nn=zt.prefixCls,cn="".concat(nn,"-item-group");return E.createElement("li",(0,y.Z)({ref:nt,role:"presentation"},Nt,{onClick:function(gn){return gn.stopPropagation()},className:le()(cn,Ct)}),E.createElement("div",{role:"presentation",className:"".concat(cn,"-title"),title:typeof mt=="string"?mt:void 0},mt),E.createElement("ul",{role:"group",className:"".concat(cn,"-list")},It))}),Pe=E.forwardRef(function(je,nt){var Ct=je.eventKey,mt=je.children,xt=Be(Ct),It=St(mt,xt),Nt=me();return Nt?It:E.createElement(ve,(0,y.Z)({ref:nt},(0,He.Z)(je,["warnKey"])),It)}),Ge=Pe,Ze=["label","children","key","type","extra"];function ct(je,nt,Ct){var mt=nt.item,xt=nt.group,It=nt.submenu,Nt=nt.divider;return(je||[]).map(function(zt,nn){if(zt&&(0,Xn.Z)(zt)==="object"){var cn=zt,zn=cn.label,gn=cn.children,dn=cn.key,wn=cn.type,En=cn.extra,Ln=(0,p.Z)(cn,Ze),_n=dn!=null?dn:"tmp-".concat(nn);return gn||wn==="group"?wn==="group"?E.createElement(xt,(0,y.Z)({key:_n},Ln,{title:zn}),ct(gn,nt,Ct)):E.createElement(It,(0,y.Z)({key:_n},Ln,{title:zn}),ct(gn,nt,Ct)):wn==="divider"?E.createElement(Nt,(0,y.Z)({key:_n},Ln)):E.createElement(mt,(0,y.Z)({key:_n},Ln,{extra:En}),zn,(!!En||En===0)&&E.createElement("span",{className:"".concat(Ct,"-item-extra")},En))}return null}).filter(function(zt){return zt})}function Ft(je,nt,Ct,mt,xt){var It=je,Nt=(0,Y.Z)({divider:Qe,item:et,group:Ge,submenu:An},mt);return nt&&(It=ct(nt,Nt,xt)),St(It,Ct)}var Xt=["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"],qt=[],Rt=E.forwardRef(function(je,nt){var Ct,mt=je,xt=mt.prefixCls,It=xt===void 0?"rc-menu":xt,Nt=mt.rootClassName,zt=mt.style,nn=mt.className,cn=mt.tabIndex,zn=cn===void 0?0:cn,gn=mt.items,dn=mt.children,wn=mt.direction,En=mt.id,Ln=mt.mode,_n=Ln===void 0?"vertical":Ln,Tn=mt.inlineCollapsed,kn=mt.disabled,Nn=mt.disabledOverflow,On=mt.subMenuOpenDelay,In=On===void 0?.1:On,Dn=mt.subMenuCloseDelay,yn=Dn===void 0?.1:Dn,fr=mt.forceSubMenuRender,_t=mt.defaultOpenKeys,Pn=mt.openKeys,jn=mt.activeKey,xr=mt.defaultActiveFirst,pr=mt.selectable,Rr=pr===void 0?!0:pr,Er=mt.multiple,vn=Er===void 0?!1:Er,sn=mt.defaultSelectedKeys,Mt=mt.selectedKeys,jt=mt.onSelect,un=mt.onDeselect,bn=mt.inlineIndent,Mn=bn===void 0?24:bn,Jn=mt.motion,tn=mt.defaultMotions,Hn=mt.triggerSubMenuAction,er=Hn===void 0?"hover":Hn,Tr=mt.builtinPlacements,$r=mt.itemIcon,Wr=mt.expandIcon,br=mt.overflowedIndicator,Kr=br===void 0?"...":br,Cr=mt.overflowedIndicatorPopupClassName,Hr=mt.getPopupContainer,Ir=mt.onClick,Pr=mt.onOpenChange,Mr=mt.onKeyDown,Yr=mt.openAnimation,ur=mt.openTransitionName,ei=mt._internalRenderMenuItem,Xr=mt._internalRenderSubMenuItem,Qr=mt._internalComponents,Vn=(0,p.Z)(mt,Xt),xn=E.useMemo(function(){return[Ft(dn,gn,qt,Qr,It),Ft(dn,gn,qt,{},It)]},[dn,gn,Qr]),Fr=(0,$.Z)(xn,2),rn=Fr[0],qr=Fr[1],Ii=E.useState(!1),Si=(0,$.Z)(Ii,2),di=Si[0],pi=Si[1],or=E.useRef(),ni=Q(En),vi=wn==="rtl",wi=(0,A.Z)(_t,{value:Pn,postState:function(Zr){return Zr||qt}}),Lr=(0,$.Z)(wi,2),Jr=Lr[0],oi=Lr[1],Yn=function(Zr){var si=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Oi(){oi(Zr),Pr==null||Pr(Zr)}si?(0,w.flushSync)(Oi):Oi()},gr=E.useState(Jr),tr=(0,$.Z)(gr,2),mr=tr[0],kr=tr[1],zr=E.useRef(!1),hi=E.useMemo(function(){return(_n==="inline"||_n==="vertical")&&Tn?["vertical",Tn]:[_n,!1]},[_n,Tn]),Bn=(0,$.Z)(hi,2),nr=Bn[0],Sr=Bn[1],vr=nr==="inline",wr=E.useState(nr),Di=(0,$.Z)(wr,2),gi=Di[0],Ti=Di[1],yi=E.useState(Sr),gs=(0,$.Z)(yi,2),Xs=gs[0],Ps=gs[1];E.useEffect(function(){Ti(nr),Ps(Sr),zr.current&&(vr?oi(mr):Yn(qt))},[nr,Sr]);var Ci=E.useState(0),$i=(0,$.Z)(Ci,2),Pi=$i[0],Cs=$i[1],rs=Pi>=rn.length-1||gi!=="horizontal"||Nn;E.useEffect(function(){vr&&kr(Jr)},[Jr]),E.useEffect(function(){return zr.current=!0,function(){zr.current=!1}},[]);var Gi=$e(),vs=Gi.registerPath,ys=Gi.unregisterPath,Ms=Gi.refreshOverflowKeys,is=Gi.isSubPathKey,_s=Gi.getKeyPath,Mi=Gi.getKeys,ks=Gi.getSubPathKeys,Qs=E.useMemo(function(){return{registerPath:vs,unregisterPath:ys}},[vs,ys]),As=E.useMemo(function(){return{isSubPathKey:is}},[is]);E.useEffect(function(){Ms(rs?qt:rn.slice(Pi+1).map(function(Vr){return Vr.key}))},[Pi,rs]);var Bs=(0,A.Z)(jn||xr&&((Ct=rn[0])===null||Ct===void 0?void 0:Ct.key),{value:jn}),cs=(0,$.Z)(Bs,2),Wi=cs[0],Br=cs[1],_r=rt(function(Vr){Br(Vr)}),_i=rt(function(){Br(void 0)});(0,E.useImperativeHandle)(nt,function(){return{list:or.current,focus:function(Zr){var si,Oi=Mi(),ki=Ne(Oi,ni),Is=ki.elements,Ds=ki.key2element,ds=ki.element2key,Js=xe(or.current,Is),Fs=Wi!=null?Wi:Js[0]?ds.get(Js[0]):(si=rn.find(function($s){return!$s.props.disabled}))===null||si===void 0?void 0:si.key,hs=Ds.get(Fs);if(Fs&&hs){var Ns;hs==null||(Ns=hs.focus)===null||Ns===void 0||Ns.call(hs,Zr)}}}});var Ei=(0,A.Z)(sn||[],{value:Mt,postState:function(Zr){return Array.isArray(Zr)?Zr:Zr==null?qt:[Zr]}}),jr=(0,$.Z)(Ei,2),fi=jr[0],Ri=jr[1],Li=function(Zr){if(Rr){var si=Zr.key,Oi=fi.includes(si),ki;vn?Oi?ki=fi.filter(function(Ds){return Ds!==si}):ki=[].concat((0,de.Z)(fi),[si]):ki=[si],Ri(ki);var Is=(0,Y.Z)((0,Y.Z)({},Zr),{},{selectedKeys:ki});Oi?un==null||un(Is):jt==null||jt(Is)}!vn&&Jr.length&&gi!=="inline"&&Yn(qt)},Yi=rt(function(Vr){Ir==null||Ir(D(Vr)),Li(Vr)}),Ai=rt(function(Vr,Zr){var si=Jr.filter(function(ki){return ki!==Vr});if(Zr)si.push(Vr);else if(gi!=="inline"){var Oi=ks(Vr);si=si.filter(function(ki){return!Oi.has(ki)})}(0,F.Z)(Jr,si,!0)||Yn(si,!0)}),Xi=function(Zr,si){var Oi=si!=null?si:!Jr.includes(Zr);Ai(Zr,Oi)},ji=Ce(gi,Wi,vi,ni,or,Mi,_s,Br,Xi,Mr);E.useEffect(function(){pi(!0)},[]);var qi=E.useMemo(function(){return{_internalRenderMenuItem:ei,_internalRenderSubMenuItem:Xr}},[ei,Xr]),Ji=gi!=="horizontal"||Nn?rn:rn.map(function(Vr,Zr){return E.createElement(N,{key:Vr.key,overflowDisabled:Zr>Pi},Vr)}),qs=E.createElement(l.Z,(0,y.Z)({id:En,ref:or,prefixCls:"".concat(It,"-overflow"),component:"ul",itemComponent:et,className:le()(It,"".concat(It,"-root"),"".concat(It,"-").concat(gi),nn,(0,ce.Z)((0,ce.Z)({},"".concat(It,"-inline-collapsed"),Xs),"".concat(It,"-rtl"),vi),Nt),dir:wn,style:zt,role:"menu",tabIndex:zn,data:Ji,renderRawItem:function(Zr){return Zr},renderRawRest:function(Zr){var si=Zr.length,Oi=si?rn.slice(-si):null;return E.createElement(An,{eventKey:Re,title:Kr,disabled:rs,internalPopupClose:si===0,popupClassName:Cr},Oi)},maxCount:gi!=="horizontal"||Nn?l.Z.INVALIDATE:l.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Zr){Cs(Zr)},onKeyDown:ji},Vn));return E.createElement(ie.Provider,{value:qi},E.createElement(O.Provider,{value:ni},E.createElement(N,{prefixCls:It,rootClassName:Nt,mode:gi,openKeys:Jr,rtl:vi,disabled:kn,motion:di?Jn:null,defaultMotions:di?tn:null,activeKey:Wi,onActive:_r,onInactive:_i,selectedKeys:fi,inlineIndent:Mn,subMenuOpenDelay:In,subMenuCloseDelay:yn,forceSubMenuRender:fr,builtinPlacements:Tr,triggerSubMenuAction:er,getPopupContainer:Hr,itemIcon:$r,expandIcon:Wr,onItemClick:Yi,onOpenChange:Ai},E.createElement(Le.Provider,{value:As},qs),E.createElement("div",{style:{display:"none"},"aria-hidden":!0},E.createElement(ue.Provider,{value:Qs},qr)))))}),Zt=Rt,mn=Zt;mn.Item=et,mn.SubMenu=An,mn.ItemGroup=Ge,mn.Divider=Qe;var Jt=mn},83836:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return he}});var y=b(60499),ce=b(85899),Y=b(72190),de=b(42244),$=b(59301),p=b(92310),ge=b.n(p),le=b(29301),l=b(34280),A=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],F=void 0;function _(S,C){var Z=S.prefixCls,ye=S.invalidate,Ve=S.item,qe=S.renderItem,gt=S.responsive,yt=S.responsiveDisabled,Dt=S.registerSize,Ut=S.itemKey,ot=S.className,kt=S.style,tt=S.children,Gt=S.display,Xe=S.order,Ke=S.component,Ae=Ke===void 0?"div":Ke,xe=(0,de.Z)(S,A),se=gt&&!Gt;function Ne(_e){Dt(Ut,_e)}$.useEffect(function(){return function(){Ne(null)}},[]);var Ce=qe&&Ve!==F?qe(Ve,{index:Xe}):tt,Se;ye||(Se={opacity:se?0:1,height:se?0:F,overflowY:se?"hidden":F,order:gt?Xe:F,pointerEvents:se?"none":F,position:se?"absolute":F});var M={};se&&(M["aria-hidden"]=!0);var fe=$.createElement(Ae,(0,y.Z)({className:ge()(!ye&&Z,ot),style:(0,ce.Z)((0,ce.Z)({},Se),kt)},M,xe,{ref:C}),Ce);return gt&&(fe=$.createElement(le.Z,{onResize:function(Re){var $e=Re.offsetWidth;Ne($e)},disabled:yt},fe)),fe}var E=$.forwardRef(_);E.displayName="Item";var w=E,O=b(6089),X=b(4676),J=b(16089);function U(S){if(typeof MessageChannel=="undefined")(0,J.Z)(S);else{var C=new MessageChannel;C.port1.onmessage=function(){return S()},C.port2.postMessage(void 0)}}function R(){var S=$.useRef(null),C=function(ye){S.current||(S.current=[],U(function(){(0,X.unstable_batchedUpdates)(function(){S.current.forEach(function(Ve){Ve()}),S.current=null})})),S.current.push(ye)};return C}function z(S,C){var Z=$.useState(C),ye=(0,Y.Z)(Z,2),Ve=ye[0],qe=ye[1],gt=(0,O.Z)(function(yt){S(function(){qe(yt)})});return[Ve,gt]}var P=$.createContext(null),N=["component"],re=["className"],ue=["className"],me=function(C,Z){var ye=$.useContext(P);if(!ye){var Ve=C.component,qe=Ve===void 0?"div":Ve,gt=(0,de.Z)(C,N);return $.createElement(qe,(0,y.Z)({},gt,{ref:Z}))}var yt=ye.className,Dt=(0,de.Z)(ye,re),Ut=C.className,ot=(0,de.Z)(C,ue);return $.createElement(P.Provider,{value:null},$.createElement(w,(0,y.Z)({ref:Z,className:ge()(yt,Ut)},Dt,ot)))},Te=$.forwardRef(me);Te.displayName="RawItem";var Be=Te,Le=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],at="responsive",ie="invalidate";function K(S){return"+ ".concat(S.length," ...")}function I(S,C){var Z=S.prefixCls,ye=Z===void 0?"rc-overflow":Z,Ve=S.data,qe=Ve===void 0?[]:Ve,gt=S.renderItem,yt=S.renderRawItem,Dt=S.itemKey,Ut=S.itemWidth,ot=Ut===void 0?10:Ut,kt=S.ssr,tt=S.style,Gt=S.className,Xe=S.maxCount,Ke=S.renderRest,Ae=S.renderRawRest,xe=S.prefix,se=S.suffix,Ne=S.component,Ce=Ne===void 0?"div":Ne,Se=S.itemComponent,M=S.onVisibleChange,fe=(0,de.Z)(S,Le),_e=kt==="full",Re=R(),$e=z(Re,null),rt=(0,Y.Z)($e,2),it=rt[0],te=rt[1],Q=it||0,lt=z(Re,new Map),st=(0,Y.Z)(lt,2),ht=st[0],bt=st[1],He=z(Re,0),Et=(0,Y.Z)(He,2),pt=Et[0],ft=Et[1],Pt=z(Re,0),x=(0,Y.Z)(Pt,2),D=x[0],Ye=x[1],W=z(Re,0),pe=(0,Y.Z)(W,2),Bt=pe[0],Oe=pe[1],Ue=z(Re,0),et=(0,Y.Z)(Ue,2),q=et[0],ne=et[1],we=(0,$.useState)(null),Fe=(0,Y.Z)(we,2),G=Fe[0],St=Fe[1],Ee=(0,$.useState)(null),Wt=(0,Y.Z)(Ee,2),en=Wt[0],an=Wt[1],Zn=$.useMemo(function(){return en===null&&_e?Number.MAX_SAFE_INTEGER:en||0},[en,it]),Rn=(0,$.useState)(!1),Cn=(0,Y.Z)(Rn,2),sr=Cn[0],dr=Cn[1],$n="".concat(ye,"-item"),qn=Math.max(pt,D),ln=Xe===at,$t=qe.length&&ln,Vt=Xe===ie,An=$t||typeof Xe=="number"&&qe.length>Xe,Xn=(0,$.useMemo)(function(){var xt=qe;return $t?it===null&&_e?xt=qe:xt=qe.slice(0,Math.min(qe.length,Q/ot)):typeof Xe=="number"&&(xt=qe.slice(0,Xe)),xt},[qe,ot,it,Xe,$t]),Qe=(0,$.useMemo)(function(){return $t?qe.slice(Zn+1):qe.slice(Xn.length)},[qe,Xn,$t,Zn]),Je=(0,$.useCallback)(function(xt,It){var Nt;return typeof Dt=="function"?Dt(xt):(Nt=Dt&&(xt==null?void 0:xt[Dt]))!==null&&Nt!==void 0?Nt:It},[Dt]),ve=(0,$.useCallback)(gt||function(xt){return xt},[gt]);function Pe(xt,It,Nt){en===xt&&(It===void 0||It===G)||(an(xt),Nt||(dr(xt<qe.length-1),M==null||M(xt)),It!==void 0&&St(It))}function Ge(xt,It){te(It.clientWidth)}function Ze(xt,It){bt(function(Nt){var zt=new Map(Nt);return It===null?zt.delete(xt):zt.set(xt,It),zt})}function ct(xt,It){Ye(It),ft(D)}function Ft(xt,It){Oe(It)}function Xt(xt,It){ne(It)}function qt(xt){return ht.get(Je(Xn[xt],xt))}(0,l.Z)(function(){if(Q&&typeof qn=="number"&&Xn){var xt=Bt+q,It=Xn.length,Nt=It-1;if(!It){Pe(0,null);return}for(var zt=0;zt<It;zt+=1){var nn=qt(zt);if(_e&&(nn=nn||0),nn===void 0){Pe(zt-1,void 0,!0);break}if(xt+=nn,Nt===0&&xt<=Q||zt===Nt-1&&xt+qt(Nt)<=Q){Pe(Nt,null);break}else if(xt+qn>Q){Pe(zt-1,xt-nn-q+D);break}}se&&qt(0)+q>Q&&St(null)}},[Q,ht,D,Bt,q,Je,Xn]);var Rt=sr&&!!Qe.length,Zt={};G!==null&&$t&&(Zt={position:"absolute",left:G,top:0});var mn={prefixCls:$n,responsive:$t,component:Se,invalidate:Vt},Jt=yt?function(xt,It){var Nt=Je(xt,It);return $.createElement(P.Provider,{key:Nt,value:(0,ce.Z)((0,ce.Z)({},mn),{},{order:It,item:xt,itemKey:Nt,registerSize:Ze,display:It<=Zn})},yt(xt,It))}:function(xt,It){var Nt=Je(xt,It);return $.createElement(w,(0,y.Z)({},mn,{order:It,key:Nt,item:xt,renderItem:ve,itemKey:Nt,registerSize:Ze,display:It<=Zn}))},je={order:Rt?Zn:Number.MAX_SAFE_INTEGER,className:"".concat($n,"-rest"),registerSize:ct,display:Rt},nt=Ke||K,Ct=Ae?$.createElement(P.Provider,{value:(0,ce.Z)((0,ce.Z)({},mn),je)},Ae(Qe)):$.createElement(w,(0,y.Z)({},mn,je),typeof nt=="function"?nt(Qe):nt),mt=$.createElement(Ce,(0,y.Z)({className:ge()(!Vt&&ye,Gt),style:tt,ref:C},fe),xe&&$.createElement(w,(0,y.Z)({},mn,{responsive:ln,responsiveDisabled:!$t,order:-1,className:"".concat($n,"-prefix"),registerSize:Ft,display:!0}),xe),Xn.map(Jt),An?Ct:null,se&&$.createElement(w,(0,y.Z)({},mn,{responsive:ln,responsiveDisabled:!$t,order:Zn,className:"".concat($n,"-suffix"),registerSize:Xt,display:!0,style:Zt}),se));return ln?$.createElement(le.Z,{onResize:Ge,disabled:!$t},mt):mt}var ee=$.forwardRef(I);ee.displayName="Overflow",ee.Item=Be,ee.RESPONSIVE=at,ee.INVALIDATE=ie;var V=ee,he=V},29301:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return ie}});var y=b(60499),ce=b(59301),Y=b(11592),de=b(48736),$=b(85899),p=b(43749),ge=b(76846),le=b(8654),l=ce.createContext(null);function A(K){var I=K.children,ee=K.onBatchResize,V=ce.useRef(0),he=ce.useRef([]),S=ce.useContext(l),C=ce.useCallback(function(Z,ye,Ve){V.current+=1;var qe=V.current;he.current.push({size:Z,element:ye,data:Ve}),Promise.resolve().then(function(){qe===V.current&&(ee==null||ee(he.current),he.current=[])}),S==null||S(Z,ye,Ve)},[ee,S]);return ce.createElement(l.Provider,{value:C},I)}var F=b(76374),_=new Map;function E(K){K.forEach(function(I){var ee,V=I.target;(ee=_.get(V))===null||ee===void 0||ee.forEach(function(he){return he(V)})})}var w=new F.Z(E),O=null,X=null;function J(K,I){_.has(K)||(_.set(K,new Set),w.observe(K)),_.get(K).add(I)}function U(K,I){_.has(K)&&(_.get(K).delete(I),_.get(K).size||(w.unobserve(K),_.delete(K)))}var R=b(38705),z=b(17212),P=b(39153),N=b(55401),re=function(K){(0,P.Z)(ee,K);var I=(0,N.Z)(ee);function ee(){return(0,R.Z)(this,ee),I.apply(this,arguments)}return(0,z.Z)(ee,[{key:"render",value:function(){return this.props.children}}]),ee}(ce.Component);function ue(K,I){var ee=K.children,V=K.disabled,he=ce.useRef(null),S=ce.useRef(null),C=ce.useContext(l),Z=typeof ee=="function",ye=Z?ee(he):ee,Ve=ce.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),qe=!Z&&ce.isValidElement(ye)&&(0,le.Yr)(ye),gt=qe?(0,le.C4)(ye):null,yt=(0,le.x1)(gt,he),Dt=function(){var tt;return(0,ge.ZP)(he.current)||(he.current&&(0,p.Z)(he.current)==="object"?(0,ge.ZP)((tt=he.current)===null||tt===void 0?void 0:tt.nativeElement):null)||(0,ge.ZP)(S.current)};ce.useImperativeHandle(I,function(){return Dt()});var Ut=ce.useRef(K);Ut.current=K;var ot=ce.useCallback(function(kt){var tt=Ut.current,Gt=tt.onResize,Xe=tt.data,Ke=kt.getBoundingClientRect(),Ae=Ke.width,xe=Ke.height,se=kt.offsetWidth,Ne=kt.offsetHeight,Ce=Math.floor(Ae),Se=Math.floor(xe);if(Ve.current.width!==Ce||Ve.current.height!==Se||Ve.current.offsetWidth!==se||Ve.current.offsetHeight!==Ne){var M={width:Ce,height:Se,offsetWidth:se,offsetHeight:Ne};Ve.current=M;var fe=se===Math.round(Ae)?Ae:se,_e=Ne===Math.round(xe)?xe:Ne,Re=(0,$.Z)((0,$.Z)({},M),{},{offsetWidth:fe,offsetHeight:_e});C==null||C(Re,kt,Xe),Gt&&Promise.resolve().then(function(){Gt(Re,kt)})}},[]);return ce.useEffect(function(){var kt=Dt();return kt&&!V&&J(kt,ot),function(){return U(kt,ot)}},[he.current,V]),ce.createElement(re,{ref:S},qe?ce.cloneElement(ye,{ref:yt}):ye)}var me=ce.forwardRef(ue),Te=me,Be="rc-observer-key";function Le(K,I){var ee=K.children,V=typeof ee=="function"?[ee]:(0,Y.Z)(ee);return V.map(function(he,S){var C=(he==null?void 0:he.key)||"".concat(Be,"-").concat(S);return ce.createElement(Te,(0,y.Z)({},K,{key:C,ref:S===0?I:void 0}),he)})}var at=ce.forwardRef(Le);at.Collection=A;var ie=at},6551:function(fn,ut,b){"use strict";b.d(ut,{ZP:function(){return ge}});var y=b(72190),ce=b(59301),Y=b(47273),de=0,$=(0,Y.Z)();function p(){var le;return $?(le=de,de+=1):le="TEST_OR_SSR",le}function ge(le){var l=ce.useState(),A=(0,y.Z)(l,2),F=A[0],_=A[1];return ce.useEffect(function(){_("rc_select_".concat(p()))},[]),le||F}},37463:function(fn,ut,b){"use strict";b.d(ut,{Ac:function(){return He},Xo:function(){return pt},Wx:function(){return Pt},ZP:function(){return Xn},lk:function(){return z}});var y=b(60499),ce=b(77654),Y=b(18642),de=b(85899),$=b(72190),p=b(42244),ge=b(43749),le=b(18929),l=b(48736),A=b(59301),F=b(92310),_=b.n(F),E=b(34280),w=b(49658),O=b(8654),X=function(Je){var ve=Je.className,Pe=Je.customizeIcon,Ge=Je.customizeIconProps,Ze=Je.children,ct=Je.onMouseDown,Ft=Je.onClick,Xt=typeof Pe=="function"?Pe(Ge):Pe;return A.createElement("span",{className:ve,onMouseDown:function(Rt){Rt.preventDefault(),ct==null||ct(Rt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ft,"aria-hidden":!0},Xt!==void 0?Xt:A.createElement("span",{className:_()(ve.split(/\s+/).map(function(qt){return"".concat(qt,"-icon")}))},Ze))},J=X,U=function(Je,ve,Pe,Ge,Ze){var ct=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ft=arguments.length>6?arguments[6]:void 0,Xt=arguments.length>7?arguments[7]:void 0,qt=A.useMemo(function(){if((0,ge.Z)(Ge)==="object")return Ge.clearIcon;if(Ze)return Ze},[Ge,Ze]),Rt=A.useMemo(function(){return!!(!ct&&Ge&&(Pe.length||Ft)&&!(Xt==="combobox"&&Ft===""))},[Ge,ct,Pe.length,Ft,Xt]);return{allowClear:Rt,clearIcon:A.createElement(J,{className:"".concat(Je,"-clear"),onMouseDown:ve,customizeIcon:qt},"\xD7")}},R=A.createContext(null);function z(){return A.useContext(R)}function P(){var Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Je=A.useState(!1),ve=(0,$.Z)(Je,2),Pe=ve[0],Ge=ve[1],Ze=A.useRef(null),ct=function(){window.clearTimeout(Ze.current)};A.useEffect(function(){return ct},[]);var Ft=function(qt,Rt){ct(),Ze.current=window.setTimeout(function(){Ge(qt),Rt&&Rt()},Qe)};return[Pe,Ft,ct]}function N(){var Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Je=A.useRef(null),ve=A.useRef(null);A.useEffect(function(){return function(){window.clearTimeout(ve.current)}},[]);function Pe(Ge){(Ge||Je.current===null)&&(Je.current=Ge),window.clearTimeout(ve.current),ve.current=window.setTimeout(function(){Je.current=null},Qe)}return[function(){return Je.current},Pe]}function re(Qe,Je,ve,Pe){var Ge=A.useRef(null);Ge.current={open:Je,triggerOpen:ve,customizedTrigger:Pe},A.useEffect(function(){function Ze(ct){var Ft;if(!((Ft=Ge.current)!==null&&Ft!==void 0&&Ft.customizedTrigger)){var Xt=ct.target;Xt.shadowRoot&&ct.composed&&(Xt=ct.composedPath()[0]||Xt),Ge.current.open&&Qe().filter(function(qt){return qt}).every(function(qt){return!qt.contains(Xt)&&qt!==Xt})&&Ge.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ze),function(){return window.removeEventListener("mousedown",Ze)}},[])}var ue=b(10228);function me(Qe){return Qe&&![ue.Z.ESC,ue.Z.SHIFT,ue.Z.BACKSPACE,ue.Z.TAB,ue.Z.WIN_KEY,ue.Z.ALT,ue.Z.META,ue.Z.WIN_KEY_RIGHT,ue.Z.CTRL,ue.Z.SEMICOLON,ue.Z.EQUALS,ue.Z.CAPS_LOCK,ue.Z.CONTEXT_MENU,ue.Z.F1,ue.Z.F2,ue.Z.F3,ue.Z.F4,ue.Z.F5,ue.Z.F6,ue.Z.F7,ue.Z.F8,ue.Z.F9,ue.Z.F10,ue.Z.F11,ue.Z.F12].includes(Qe)}var Te=b(26112),Be=b(83836);function Le(Qe,Je,ve){var Pe=(0,de.Z)((0,de.Z)({},Qe),ve?Je:{});return Object.keys(Je).forEach(function(Ge){var Ze=Je[Ge];typeof Ze=="function"&&(Pe[Ge]=function(){for(var ct,Ft=arguments.length,Xt=new Array(Ft),qt=0;qt<Ft;qt++)Xt[qt]=arguments[qt];return Ze.apply(void 0,Xt),(ct=Qe[Ge])===null||ct===void 0?void 0:ct.call.apply(ct,[Qe].concat(Xt))})}),Pe}var at=Le,ie=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],K=function(Je,ve){var Pe=Je.prefixCls,Ge=Je.id,Ze=Je.inputElement,ct=Je.autoFocus,Ft=Je.autoComplete,Xt=Je.editable,qt=Je.activeDescendantId,Rt=Je.value,Zt=Je.open,mn=Je.attrs,Jt=(0,p.Z)(Je,ie),je=Ze||A.createElement("input",null),nt=je,Ct=nt.ref,mt=nt.props;return(0,l.Kp)(!("maxLength"in je.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),je=A.cloneElement(je,(0,de.Z)((0,de.Z)((0,de.Z)({type:"search"},at(Jt,mt,!0)),{},{id:Ge,ref:(0,O.sQ)(ve,Ct),autoComplete:Ft||"off",autoFocus:ct,className:_()("".concat(Pe,"-selection-search-input"),mt==null?void 0:mt.className),role:"combobox","aria-expanded":Zt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ge,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ge,"_list"),"aria-activedescendant":Zt?qt:void 0},mn),{},{value:Xt?Rt:"",readOnly:!Xt,unselectable:Xt?null:"on",style:(0,de.Z)((0,de.Z)({},mt.style),{},{opacity:Xt?null:0})})),je},I=A.forwardRef(K),ee=I;function V(Qe){return Array.isArray(Qe)?Qe:Qe!==void 0?[Qe]:[]}var he=typeof window!="undefined"&&window.document&&window.document.documentElement,S=he;function C(Qe){return Qe!=null}function Z(Qe){return!Qe&&Qe!==0}function ye(Qe){return["string","number"].includes((0,ge.Z)(Qe))}function Ve(Qe){var Je=void 0;return Qe&&(ye(Qe.title)?Je=Qe.title.toString():ye(Qe.label)&&(Je=Qe.label.toString())),Je}function qe(Qe,Je){S?A.useLayoutEffect(Qe,Je):A.useEffect(Qe,Je)}function gt(Qe){var Je;return(Je=Qe.key)!==null&&Je!==void 0?Je:Qe.value}var yt=function(Je){Je.preventDefault(),Je.stopPropagation()},Dt=function(Je){var ve=Je.id,Pe=Je.prefixCls,Ge=Je.values,Ze=Je.open,ct=Je.searchValue,Ft=Je.autoClearSearchValue,Xt=Je.inputRef,qt=Je.placeholder,Rt=Je.disabled,Zt=Je.mode,mn=Je.showSearch,Jt=Je.autoFocus,je=Je.autoComplete,nt=Je.activeDescendantId,Ct=Je.tabIndex,mt=Je.removeIcon,xt=Je.maxTagCount,It=Je.maxTagTextLength,Nt=Je.maxTagPlaceholder,zt=Nt===void 0?function(un){return"+ ".concat(un.length," ...")}:Nt,nn=Je.tagRender,cn=Je.onToggleOpen,zn=Je.onRemove,gn=Je.onInputChange,dn=Je.onInputPaste,wn=Je.onInputKeyDown,En=Je.onInputMouseDown,Ln=Je.onInputCompositionStart,_n=Je.onInputCompositionEnd,Tn=Je.onInputBlur,kn=A.useRef(null),Nn=(0,A.useState)(0),On=(0,$.Z)(Nn,2),In=On[0],Dn=On[1],yn=(0,A.useState)(!1),fr=(0,$.Z)(yn,2),_t=fr[0],Pn=fr[1],jn="".concat(Pe,"-selection"),xr=Ze||Zt==="multiple"&&Ft===!1||Zt==="tags"?ct:"",pr=Zt==="tags"||Zt==="multiple"&&Ft===!1||mn&&(Ze||_t);qe(function(){Dn(kn.current.scrollWidth)},[xr]);var Rr=function(bn,Mn,Jn,tn,Hn){return A.createElement("span",{title:Ve(bn),className:_()("".concat(jn,"-item"),(0,Y.Z)({},"".concat(jn,"-item-disabled"),Jn))},A.createElement("span",{className:"".concat(jn,"-item-content")},Mn),tn&&A.createElement(J,{className:"".concat(jn,"-item-remove"),onMouseDown:yt,onClick:Hn,customizeIcon:mt},"\xD7"))},Er=function(bn,Mn,Jn,tn,Hn,er){var Tr=function(Wr){yt(Wr),cn(!Ze)};return A.createElement("span",{onMouseDown:Tr},nn({label:Mn,value:bn,disabled:Jn,closable:tn,onClose:Hn,isMaxTag:!!er}))},vn=function(bn){var Mn=bn.disabled,Jn=bn.label,tn=bn.value,Hn=!Rt&&!Mn,er=Jn;if(typeof It=="number"&&(typeof Jn=="string"||typeof Jn=="number")){var Tr=String(er);Tr.length>It&&(er="".concat(Tr.slice(0,It),"..."))}var $r=function(br){br&&br.stopPropagation(),zn(bn)};return typeof nn=="function"?Er(tn,er,Mn,Hn,$r):Rr(bn,er,Mn,Hn,$r)},sn=function(bn){if(!Ge.length)return null;var Mn=typeof zt=="function"?zt(bn):zt;return typeof nn=="function"?Er(void 0,Mn,!1,!1,void 0,!0):Rr({title:Mn},Mn,!1)},Mt=A.createElement("div",{className:"".concat(jn,"-search"),style:{width:In},onFocus:function(){Pn(!0)},onBlur:function(){Pn(!1)}},A.createElement(ee,{ref:Xt,open:Ze,prefixCls:Pe,id:ve,inputElement:null,disabled:Rt,autoFocus:Jt,autoComplete:je,editable:pr,activeDescendantId:nt,value:xr,onKeyDown:wn,onMouseDown:En,onChange:gn,onPaste:dn,onCompositionStart:Ln,onCompositionEnd:_n,onBlur:Tn,tabIndex:Ct,attrs:(0,Te.Z)(Je,!0)}),A.createElement("span",{ref:kn,className:"".concat(jn,"-search-mirror"),"aria-hidden":!0},xr,"\xA0")),jt=A.createElement(Be.Z,{prefixCls:"".concat(jn,"-overflow"),data:Ge,renderItem:vn,renderRest:sn,suffix:Mt,itemKey:gt,maxCount:xt});return A.createElement("span",{className:"".concat(jn,"-wrap")},jt,!Ge.length&&!xr&&A.createElement("span",{className:"".concat(jn,"-placeholder")},qt))},Ut=Dt,ot=function(Je){var ve=Je.inputElement,Pe=Je.prefixCls,Ge=Je.id,Ze=Je.inputRef,ct=Je.disabled,Ft=Je.autoFocus,Xt=Je.autoComplete,qt=Je.activeDescendantId,Rt=Je.mode,Zt=Je.open,mn=Je.values,Jt=Je.placeholder,je=Je.tabIndex,nt=Je.showSearch,Ct=Je.searchValue,mt=Je.activeValue,xt=Je.maxLength,It=Je.onInputKeyDown,Nt=Je.onInputMouseDown,zt=Je.onInputChange,nn=Je.onInputPaste,cn=Je.onInputCompositionStart,zn=Je.onInputCompositionEnd,gn=Je.onInputBlur,dn=Je.title,wn=A.useState(!1),En=(0,$.Z)(wn,2),Ln=En[0],_n=En[1],Tn=Rt==="combobox",kn=Tn||nt,Nn=mn[0],On=Ct||"";Tn&&mt&&!Ln&&(On=mt),A.useEffect(function(){Tn&&_n(!1)},[Tn,mt]);var In=Rt!=="combobox"&&!Zt&&!nt?!1:!!On,Dn=dn===void 0?Ve(Nn):dn,yn=A.useMemo(function(){return Nn?null:A.createElement("span",{className:"".concat(Pe,"-selection-placeholder"),style:In?{visibility:"hidden"}:void 0},Jt)},[Nn,In,Jt,Pe]);return A.createElement("span",{className:"".concat(Pe,"-selection-wrap")},A.createElement("span",{className:"".concat(Pe,"-selection-search")},A.createElement(ee,{ref:Ze,prefixCls:Pe,id:Ge,open:Zt,inputElement:ve,disabled:ct,autoFocus:Ft,autoComplete:Xt,editable:kn,activeDescendantId:qt,value:On,onKeyDown:It,onMouseDown:Nt,onChange:function(_t){_n(!0),zt(_t)},onPaste:nn,onCompositionStart:cn,onCompositionEnd:zn,onBlur:gn,tabIndex:je,attrs:(0,Te.Z)(Je,!0),maxLength:Tn?xt:void 0})),!Tn&&Nn?A.createElement("span",{className:"".concat(Pe,"-selection-item"),title:Dn,style:In?{visibility:"hidden"}:void 0},Nn.label):null,yn)},kt=ot,tt=function(Je,ve){var Pe=(0,A.useRef)(null),Ge=(0,A.useRef)(!1),Ze=Je.prefixCls,ct=Je.open,Ft=Je.mode,Xt=Je.showSearch,qt=Je.tokenWithEnter,Rt=Je.disabled,Zt=Je.prefix,mn=Je.autoClearSearchValue,Jt=Je.onSearch,je=Je.onSearchSubmit,nt=Je.onToggleOpen,Ct=Je.onInputKeyDown,mt=Je.onInputBlur,xt=Je.domRef;A.useImperativeHandle(ve,function(){return{focus:function(Dn){Pe.current.focus(Dn)},blur:function(){Pe.current.blur()}}});var It=N(0),Nt=(0,$.Z)(It,2),zt=Nt[0],nn=Nt[1],cn=function(Dn){var yn=Dn.which,fr=Pe.current instanceof HTMLTextAreaElement;!fr&&ct&&(yn===ue.Z.UP||yn===ue.Z.DOWN)&&Dn.preventDefault(),Ct&&Ct(Dn),yn===ue.Z.ENTER&&Ft==="tags"&&!Ge.current&&!ct&&(je==null||je(Dn.target.value)),!(fr&&!ct&&~[ue.Z.UP,ue.Z.DOWN,ue.Z.LEFT,ue.Z.RIGHT].indexOf(yn))&&me(yn)&&nt(!0)},zn=function(){nn(!0)},gn=(0,A.useRef)(null),dn=function(Dn){Jt(Dn,!0,Ge.current)!==!1&&nt(!0)},wn=function(){Ge.current=!0},En=function(Dn){Ge.current=!1,Ft!=="combobox"&&dn(Dn.target.value)},Ln=function(Dn){var yn=Dn.target.value;if(qt&&gn.current&&/[\r\n]/.test(gn.current)){var fr=gn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");yn=yn.replace(fr,gn.current)}gn.current=null,dn(yn)},_n=function(Dn){var yn=Dn.clipboardData,fr=yn==null?void 0:yn.getData("text");gn.current=fr||""},Tn=function(Dn){var yn=Dn.target;if(yn!==Pe.current){var fr=document.body.style.msTouchAction!==void 0;fr?setTimeout(function(){Pe.current.focus()}):Pe.current.focus()}},kn=function(Dn){var yn=zt();Dn.target!==Pe.current&&!yn&&!(Ft==="combobox"&&Rt)&&Dn.preventDefault(),(Ft!=="combobox"&&(!Xt||!yn)||!ct)&&(ct&&mn!==!1&&Jt("",!0,!1),nt())},Nn={inputRef:Pe,onInputKeyDown:cn,onInputMouseDown:zn,onInputChange:Ln,onInputPaste:_n,onInputCompositionStart:wn,onInputCompositionEnd:En,onInputBlur:mt},On=Ft==="multiple"||Ft==="tags"?A.createElement(Ut,(0,y.Z)({},Je,Nn)):A.createElement(kt,(0,y.Z)({},Je,Nn));return A.createElement("div",{ref:xt,className:"".concat(Ze,"-selector"),onClick:Tn,onMouseDown:kn},Zt&&A.createElement("div",{className:"".concat(Ze,"-prefix")},Zt),On)},Gt=A.forwardRef(tt),Xe=Gt,Ke=b(68196),Ae=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],xe=function(Je){var ve=Je===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:ve,adjustY:1},htmlRegion:"scroll"}}},se=function(Je,ve){var Pe=Je.prefixCls,Ge=Je.disabled,Ze=Je.visible,ct=Je.children,Ft=Je.popupElement,Xt=Je.animation,qt=Je.transitionName,Rt=Je.dropdownStyle,Zt=Je.dropdownClassName,mn=Je.direction,Jt=mn===void 0?"ltr":mn,je=Je.placement,nt=Je.builtinPlacements,Ct=Je.dropdownMatchSelectWidth,mt=Je.dropdownRender,xt=Je.dropdownAlign,It=Je.getPopupContainer,Nt=Je.empty,zt=Je.getTriggerDOMNode,nn=Je.onPopupVisibleChange,cn=Je.onPopupMouseEnter,zn=(0,p.Z)(Je,Ae),gn="".concat(Pe,"-dropdown"),dn=Ft;mt&&(dn=mt(Ft));var wn=A.useMemo(function(){return nt||xe(Ct)},[nt,Ct]),En=Xt?"".concat(gn,"-").concat(Xt):qt,Ln=typeof Ct=="number",_n=A.useMemo(function(){return Ln?null:Ct===!1?"minWidth":"width"},[Ct,Ln]),Tn=Rt;Ln&&(Tn=(0,de.Z)((0,de.Z)({},Tn),{},{width:Ct}));var kn=A.useRef(null);return A.useImperativeHandle(ve,function(){return{getPopupElement:function(){var On;return(On=kn.current)===null||On===void 0?void 0:On.popupElement}}}),A.createElement(Ke.Z,(0,y.Z)({},zn,{showAction:nn?["click"]:[],hideAction:nn?["click"]:[],popupPlacement:je||(Jt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:wn,prefixCls:gn,popupTransitionName:En,popup:A.createElement("div",{onMouseEnter:cn},dn),ref:kn,stretch:_n,popupAlign:xt,popupVisible:Ze,getPopupContainer:It,popupClassName:_()(Zt,(0,Y.Z)({},"".concat(gn,"-empty"),Nt)),popupStyle:Tn,getTriggerDOMNode:zt,onPopupVisibleChange:nn}),ct)},Ne=A.forwardRef(se),Ce=Ne,Se=b(48745);function M(Qe,Je){var ve=Qe.key,Pe;return"value"in Qe&&(Pe=Qe.value),ve!=null?ve:Pe!==void 0?Pe:"rc-index-key-".concat(Je)}function fe(Qe){return typeof Qe!="undefined"&&!Number.isNaN(Qe)}function _e(Qe,Je){var ve=Qe||{},Pe=ve.label,Ge=ve.value,Ze=ve.options,ct=ve.groupLabel,Ft=Pe||(Je?"children":"label");return{label:Ft,value:Ge||"value",options:Ze||"options",groupLabel:ct||Ft}}function Re(Qe){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=Je.fieldNames,Pe=Je.childrenAsData,Ge=[],Ze=_e(ve,!1),ct=Ze.label,Ft=Ze.value,Xt=Ze.options,qt=Ze.groupLabel;function Rt(Zt,mn){Array.isArray(Zt)&&Zt.forEach(function(Jt){if(mn||!(Xt in Jt)){var je=Jt[Ft];Ge.push({key:M(Jt,Ge.length),groupOption:mn,data:Jt,label:Jt[ct],value:je})}else{var nt=Jt[qt];nt===void 0&&Pe&&(nt=Jt.label),Ge.push({key:M(Jt,Ge.length),group:!0,data:Jt,label:nt}),Rt(Jt[Xt],!0)}})}return Rt(Qe,!1),Ge}function $e(Qe){var Je=(0,de.Z)({},Qe);return"props"in Je||Object.defineProperty(Je,"props",{get:function(){return(0,l.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Je}}),Je}var rt=function(Je,ve,Pe){if(!ve||!ve.length)return null;var Ge=!1,Ze=function Ft(Xt,qt){var Rt=(0,Se.Z)(qt),Zt=Rt[0],mn=Rt.slice(1);if(!Zt)return[Xt];var Jt=Xt.split(Zt);return Ge=Ge||Jt.length>1,Jt.reduce(function(je,nt){return[].concat((0,ce.Z)(je),(0,ce.Z)(Ft(nt,mn)))},[]).filter(Boolean)},ct=Ze(Je,ve);return Ge?typeof Pe!="undefined"?ct.slice(0,Pe):ct:null},it=A.createContext(null),te=it;function Q(Qe){var Je=Qe.visible,ve=Qe.values;if(!Je)return null;var Pe=50;return A.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(ve.slice(0,Pe).map(function(Ge){var Ze=Ge.label,ct=Ge.value;return["number","string"].includes((0,ge.Z)(Ze))?Ze:ct}).join(", ")),ve.length>Pe?", ...":null)}var lt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],st=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ht=function(Je){return Je==="tags"||Je==="multiple"},bt=A.forwardRef(function(Qe,Je){var ve,Pe=Qe.id,Ge=Qe.prefixCls,Ze=Qe.className,ct=Qe.showSearch,Ft=Qe.tagRender,Xt=Qe.direction,qt=Qe.omitDomProps,Rt=Qe.displayValues,Zt=Qe.onDisplayValuesChange,mn=Qe.emptyOptions,Jt=Qe.notFoundContent,je=Jt===void 0?"Not Found":Jt,nt=Qe.onClear,Ct=Qe.mode,mt=Qe.disabled,xt=Qe.loading,It=Qe.getInputElement,Nt=Qe.getRawInputElement,zt=Qe.open,nn=Qe.defaultOpen,cn=Qe.onDropdownVisibleChange,zn=Qe.activeValue,gn=Qe.onActiveValueChange,dn=Qe.activeDescendantId,wn=Qe.searchValue,En=Qe.autoClearSearchValue,Ln=Qe.onSearch,_n=Qe.onSearchSplit,Tn=Qe.tokenSeparators,kn=Qe.allowClear,Nn=Qe.prefix,On=Qe.suffixIcon,In=Qe.clearIcon,Dn=Qe.OptionList,yn=Qe.animation,fr=Qe.transitionName,_t=Qe.dropdownStyle,Pn=Qe.dropdownClassName,jn=Qe.dropdownMatchSelectWidth,xr=Qe.dropdownRender,pr=Qe.dropdownAlign,Rr=Qe.placement,Er=Qe.builtinPlacements,vn=Qe.getPopupContainer,sn=Qe.showAction,Mt=sn===void 0?[]:sn,jt=Qe.onFocus,un=Qe.onBlur,bn=Qe.onKeyUp,Mn=Qe.onKeyDown,Jn=Qe.onMouseDown,tn=(0,p.Z)(Qe,lt),Hn=ht(Ct),er=(ct!==void 0?ct:Hn)||Ct==="combobox",Tr=(0,de.Z)({},tn);st.forEach(function(Br){delete Tr[Br]}),qt==null||qt.forEach(function(Br){delete Tr[Br]});var $r=A.useState(!1),Wr=(0,$.Z)($r,2),br=Wr[0],Kr=Wr[1];A.useEffect(function(){Kr((0,w.Z)())},[]);var Cr=A.useRef(null),Hr=A.useRef(null),Ir=A.useRef(null),Pr=A.useRef(null),Mr=A.useRef(null),Yr=A.useRef(!1),ur=P(),ei=(0,$.Z)(ur,3),Xr=ei[0],Qr=ei[1],Vn=ei[2];A.useImperativeHandle(Je,function(){var Br,_r;return{focus:(Br=Pr.current)===null||Br===void 0?void 0:Br.focus,blur:(_r=Pr.current)===null||_r===void 0?void 0:_r.blur,scrollTo:function(Ei){var jr;return(jr=Mr.current)===null||jr===void 0?void 0:jr.scrollTo(Ei)},nativeElement:Cr.current||Hr.current}});var xn=A.useMemo(function(){var Br;if(Ct!=="combobox")return wn;var _r=(Br=Rt[0])===null||Br===void 0?void 0:Br.value;return typeof _r=="string"||typeof _r=="number"?String(_r):""},[wn,Ct,Rt]),Fr=Ct==="combobox"&&typeof It=="function"&&It()||null,rn=typeof Nt=="function"&&Nt(),qr=(0,O.x1)(Hr,rn==null||(ve=rn.props)===null||ve===void 0?void 0:ve.ref),Ii=A.useState(!1),Si=(0,$.Z)(Ii,2),di=Si[0],pi=Si[1];(0,E.Z)(function(){pi(!0)},[]);var or=(0,le.Z)(!1,{defaultValue:nn,value:zt}),ni=(0,$.Z)(or,2),vi=ni[0],wi=ni[1],Lr=di?vi:!1,Jr=!je&&mn;(mt||Jr&&Lr&&Ct==="combobox")&&(Lr=!1);var oi=Jr?!1:Lr,Yn=A.useCallback(function(Br){var _r=Br!==void 0?Br:!Lr;mt||(wi(_r),Lr!==_r&&(cn==null||cn(_r)))},[mt,Lr,wi,cn]),gr=A.useMemo(function(){return(Tn||[]).some(function(Br){return[`
|
|
|
`,`\r
|
|
|
`].includes(Br)})},[Tn]),tr=A.useContext(te)||{},mr=tr.maxCount,kr=tr.rawValues,zr=function(_r,_i,Ei){if(!(Hn&&fe(mr)&&(kr==null?void 0:kr.size)>=mr)){var jr=!0,fi=_r;gn==null||gn(null);var Ri=rt(_r,Tn,fe(mr)?mr-kr.size:void 0),Li=Ei?null:Ri;return Ct!=="combobox"&&Li&&(fi="",_n==null||_n(Li),Yn(!1),jr=!1),Ln&&xn!==fi&&Ln(fi,{source:_i?"typing":"effect"}),jr}},hi=function(_r){!_r||!_r.trim()||Ln(_r,{source:"submit"})};A.useEffect(function(){!Lr&&!Hn&&Ct!=="combobox"&&zr("",!1,!1)},[Lr]),A.useEffect(function(){vi&&mt&&wi(!1),mt&&!Yr.current&&Qr(!1)},[mt]);var Bn=N(),nr=(0,$.Z)(Bn,2),Sr=nr[0],vr=nr[1],wr=A.useRef(!1),Di=function(_r){var _i=Sr(),Ei=_r.key,jr=Ei==="Enter";if(jr&&(Ct!=="combobox"&&_r.preventDefault(),Lr||Yn(!0)),vr(!!xn),Ei==="Backspace"&&!_i&&Hn&&!xn&&Rt.length){for(var fi=(0,ce.Z)(Rt),Ri=null,Li=fi.length-1;Li>=0;Li-=1){var Yi=fi[Li];if(!Yi.disabled){fi.splice(Li,1),Ri=Yi;break}}Ri&&Zt(fi,{type:"remove",values:[Ri]})}for(var Ai=arguments.length,Xi=new Array(Ai>1?Ai-1:0),ji=1;ji<Ai;ji++)Xi[ji-1]=arguments[ji];if(Lr&&(!jr||!wr.current)){var qi;jr&&(wr.current=!0),(qi=Mr.current)===null||qi===void 0||qi.onKeyDown.apply(qi,[_r].concat(Xi))}Mn==null||Mn.apply(void 0,[_r].concat(Xi))},gi=function(_r){for(var _i=arguments.length,Ei=new Array(_i>1?_i-1:0),jr=1;jr<_i;jr++)Ei[jr-1]=arguments[jr];if(Lr){var fi;(fi=Mr.current)===null||fi===void 0||fi.onKeyUp.apply(fi,[_r].concat(Ei))}_r.key==="Enter"&&(wr.current=!1),bn==null||bn.apply(void 0,[_r].concat(Ei))},Ti=function(_r){var _i=Rt.filter(function(Ei){return Ei!==_r});Zt(_i,{type:"remove",values:[_r]})},yi=function(){wr.current=!1},gs=A.useRef(!1),Xs=function(){Qr(!0),mt||(jt&&!gs.current&&jt.apply(void 0,arguments),Mt.includes("focus")&&Yn(!0)),gs.current=!0},Ps=function(){Yr.current=!0,Qr(!1,function(){gs.current=!1,Yr.current=!1,Yn(!1)}),!mt&&(xn&&(Ct==="tags"?Ln(xn,{source:"submit"}):Ct==="multiple"&&Ln("",{source:"blur"})),un&&un.apply(void 0,arguments))},Ci=[];A.useEffect(function(){return function(){Ci.forEach(function(Br){return clearTimeout(Br)}),Ci.splice(0,Ci.length)}},[]);var $i=function(_r){var _i,Ei=_r.target,jr=(_i=Ir.current)===null||_i===void 0?void 0:_i.getPopupElement();if(jr&&jr.contains(Ei)){var fi=setTimeout(function(){var Ai=Ci.indexOf(fi);if(Ai!==-1&&Ci.splice(Ai,1),Vn(),!br&&!jr.contains(document.activeElement)){var Xi;(Xi=Pr.current)===null||Xi===void 0||Xi.focus()}});Ci.push(fi)}for(var Ri=arguments.length,Li=new Array(Ri>1?Ri-1:0),Yi=1;Yi<Ri;Yi++)Li[Yi-1]=arguments[Yi];Jn==null||Jn.apply(void 0,[_r].concat(Li))},Pi=A.useState({}),Cs=(0,$.Z)(Pi,2),rs=Cs[1];function Gi(){rs({})}var vs;rn&&(vs=function(_r){Yn(_r)}),re(function(){var Br;return[Cr.current,(Br=Ir.current)===null||Br===void 0?void 0:Br.getPopupElement()]},oi,Yn,!!rn);var ys=A.useMemo(function(){return(0,de.Z)((0,de.Z)({},Qe),{},{notFoundContent:je,open:Lr,triggerOpen:oi,id:Pe,showSearch:er,multiple:Hn,toggleOpen:Yn})},[Qe,je,oi,Lr,Pe,er,Hn,Yn]),Ms=!!On||xt,is;Ms&&(is=A.createElement(J,{className:_()("".concat(Ge,"-arrow"),(0,Y.Z)({},"".concat(Ge,"-arrow-loading"),xt)),customizeIcon:On,customizeIconProps:{loading:xt,searchValue:xn,open:Lr,focused:Xr,showSearch:er}}));var _s=function(){var _r;nt==null||nt(),(_r=Pr.current)===null||_r===void 0||_r.focus(),Zt([],{type:"clear",values:Rt}),zr("",!1,!1)},Mi=U(Ge,_s,Rt,kn,In,mt,xn,Ct),ks=Mi.allowClear,Qs=Mi.clearIcon,As=A.createElement(Dn,{ref:Mr}),Bs=_()(Ge,Ze,(0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)({},"".concat(Ge,"-focused"),Xr),"".concat(Ge,"-multiple"),Hn),"".concat(Ge,"-single"),!Hn),"".concat(Ge,"-allow-clear"),kn),"".concat(Ge,"-show-arrow"),Ms),"".concat(Ge,"-disabled"),mt),"".concat(Ge,"-loading"),xt),"".concat(Ge,"-open"),Lr),"".concat(Ge,"-customize-input"),Fr),"".concat(Ge,"-show-search"),er)),cs=A.createElement(Ce,{ref:Ir,disabled:mt,prefixCls:Ge,visible:oi,popupElement:As,animation:yn,transitionName:fr,dropdownStyle:_t,dropdownClassName:Pn,direction:Xt,dropdownMatchSelectWidth:jn,dropdownRender:xr,dropdownAlign:pr,placement:Rr,builtinPlacements:Er,getPopupContainer:vn,empty:mn,getTriggerDOMNode:function(_r){return Hr.current||_r},onPopupVisibleChange:vs,onPopupMouseEnter:Gi},rn?A.cloneElement(rn,{ref:qr}):A.createElement(Xe,(0,y.Z)({},Qe,{domRef:Hr,prefixCls:Ge,inputElement:Fr,ref:Pr,id:Pe,prefix:Nn,showSearch:er,autoClearSearchValue:En,mode:Ct,activeDescendantId:dn,tagRender:Ft,values:Rt,open:Lr,onToggleOpen:Yn,activeValue:zn,searchValue:xn,onSearch:zr,onSearchSubmit:hi,onRemove:Ti,tokenWithEnter:gr,onInputBlur:yi}))),Wi;return rn?Wi=cs:Wi=A.createElement("div",(0,y.Z)({className:Bs},Tr,{ref:Cr,onMouseDown:$i,onKeyDown:Di,onKeyUp:gi,onFocus:Xs,onBlur:Ps}),A.createElement(Q,{visible:Xr&&!Lr,values:Rt}),cs,is,ks&&Qs),A.createElement(R.Provider,{value:ys},Wi)}),He=bt,Et=function(){return null};Et.isSelectOptGroup=!0;var pt=Et,ft=function(){return null};ft.isSelectOption=!0;var Pt=ft,x=b(80547),D=b(2738),Ye=b(48911);function W(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var pe=["disabled","title","children","style","className"];function Bt(Qe){return typeof Qe=="string"||typeof Qe=="number"}var Oe=function(Je,ve){var Pe=z(),Ge=Pe.prefixCls,Ze=Pe.id,ct=Pe.open,Ft=Pe.multiple,Xt=Pe.mode,qt=Pe.searchValue,Rt=Pe.toggleOpen,Zt=Pe.notFoundContent,mn=Pe.onPopupScroll,Jt=A.useContext(te),je=Jt.maxCount,nt=Jt.flattenOptions,Ct=Jt.onActiveValue,mt=Jt.defaultActiveFirstOption,xt=Jt.onSelect,It=Jt.menuItemSelectedIcon,Nt=Jt.rawValues,zt=Jt.fieldNames,nn=Jt.virtual,cn=Jt.direction,zn=Jt.listHeight,gn=Jt.listItemHeight,dn=Jt.optionRender,wn="".concat(Ge,"-item"),En=(0,x.Z)(function(){return nt},[ct,nt],function(sn,Mt){return Mt[0]&&sn[1]!==Mt[1]}),Ln=A.useRef(null),_n=A.useMemo(function(){return Ft&&fe(je)&&(Nt==null?void 0:Nt.size)>=je},[Ft,je,Nt==null?void 0:Nt.size]),Tn=function(Mt){Mt.preventDefault()},kn=function(Mt){var jt;(jt=Ln.current)===null||jt===void 0||jt.scrollTo(typeof Mt=="number"?{index:Mt}:Mt)},Nn=A.useCallback(function(sn){return Xt==="combobox"?!1:Nt.has(sn)},[Xt,(0,ce.Z)(Nt).toString(),Nt.size]),On=function(Mt){for(var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,un=En.length,bn=0;bn<un;bn+=1){var Mn=(Mt+bn*jt+un)%un,Jn=En[Mn]||{},tn=Jn.group,Hn=Jn.data;if(!tn&&!(Hn!=null&&Hn.disabled)&&(Nn(Hn.value)||!_n))return Mn}return-1},In=A.useState(function(){return On(0)}),Dn=(0,$.Z)(In,2),yn=Dn[0],fr=Dn[1],_t=function(Mt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;fr(Mt);var un={source:jt?"keyboard":"mouse"},bn=En[Mt];if(!bn){Ct(null,-1,un);return}Ct(bn.value,Mt,un)};(0,A.useEffect)(function(){_t(mt!==!1?On(0):-1)},[En.length,qt]);var Pn=A.useCallback(function(sn){return Xt==="combobox"?String(sn).toLowerCase()===qt.toLowerCase():Nt.has(sn)},[Xt,qt,(0,ce.Z)(Nt).toString(),Nt.size]);(0,A.useEffect)(function(){var sn=setTimeout(function(){if(!Ft&&ct&&Nt.size===1){var jt=Array.from(Nt)[0],un=En.findIndex(function(bn){var Mn=bn.data;return qt?String(Mn.value).startsWith(qt):Mn.value===jt});un!==-1&&(_t(un),kn(un))}});if(ct){var Mt;(Mt=Ln.current)===null||Mt===void 0||Mt.scrollTo(void 0)}return function(){return clearTimeout(sn)}},[ct,qt]);var jn=function(Mt){Mt!==void 0&&xt(Mt,{selected:!Nt.has(Mt)}),Ft||Rt(!1)};if(A.useImperativeHandle(ve,function(){return{onKeyDown:function(Mt){var jt=Mt.which,un=Mt.ctrlKey;switch(jt){case ue.Z.N:case ue.Z.P:case ue.Z.UP:case ue.Z.DOWN:{var bn=0;if(jt===ue.Z.UP?bn=-1:jt===ue.Z.DOWN?bn=1:W()&&un&&(jt===ue.Z.N?bn=1:jt===ue.Z.P&&(bn=-1)),bn!==0){var Mn=On(yn+bn,bn);kn(Mn),_t(Mn,!0)}break}case ue.Z.TAB:case ue.Z.ENTER:{var Jn,tn=En[yn];tn&&!(tn!=null&&(Jn=tn.data)!==null&&Jn!==void 0&&Jn.disabled)&&!_n?jn(tn.value):jn(void 0),ct&&Mt.preventDefault();break}case ue.Z.ESC:Rt(!1),ct&&Mt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Mt){kn(Mt)}}}),En.length===0)return A.createElement("div",{role:"listbox",id:"".concat(Ze,"_list"),className:"".concat(wn,"-empty"),onMouseDown:Tn},Zt);var xr=Object.keys(zt).map(function(sn){return zt[sn]}),pr=function(Mt){return Mt.label};function Rr(sn,Mt){var jt=sn.group;return{role:jt?"presentation":"option",id:"".concat(Ze,"_list_").concat(Mt)}}var Er=function(Mt){var jt=En[Mt];if(!jt)return null;var un=jt.data||{},bn=un.value,Mn=jt.group,Jn=(0,Te.Z)(un,!0),tn=pr(jt);return jt?A.createElement("div",(0,y.Z)({"aria-label":typeof tn=="string"&&!Mn?tn:null},Jn,{key:Mt},Rr(jt,Mt),{"aria-selected":Pn(bn)}),bn):null},vn={role:"listbox",id:"".concat(Ze,"_list")};return A.createElement(A.Fragment,null,nn&&A.createElement("div",(0,y.Z)({},vn,{style:{height:0,width:0,overflow:"hidden"}}),Er(yn-1),Er(yn),Er(yn+1)),A.createElement(Ye.Z,{itemKey:"key",ref:Ln,data:En,height:zn,itemHeight:gn,fullHeight:!1,onMouseDown:Tn,onScroll:mn,virtual:nn,direction:cn,innerProps:nn?null:vn},function(sn,Mt){var jt=sn.group,un=sn.groupOption,bn=sn.data,Mn=sn.label,Jn=sn.value,tn=bn.key;if(jt){var Hn,er=(Hn=bn.title)!==null&&Hn!==void 0?Hn:Bt(Mn)?Mn.toString():void 0;return A.createElement("div",{className:_()(wn,"".concat(wn,"-group"),bn.className),title:er},Mn!==void 0?Mn:tn)}var Tr=bn.disabled,$r=bn.title,Wr=bn.children,br=bn.style,Kr=bn.className,Cr=(0,p.Z)(bn,pe),Hr=(0,D.Z)(Cr,xr),Ir=Nn(Jn),Pr=Tr||!Ir&&_n,Mr="".concat(wn,"-option"),Yr=_()(wn,Mr,Kr,(0,Y.Z)((0,Y.Z)((0,Y.Z)((0,Y.Z)({},"".concat(Mr,"-grouped"),un),"".concat(Mr,"-active"),yn===Mt&&!Pr),"".concat(Mr,"-disabled"),Pr),"".concat(Mr,"-selected"),Ir)),ur=pr(sn),ei=!It||typeof It=="function"||Ir,Xr=typeof ur=="number"?ur:ur||Jn,Qr=Bt(Xr)?Xr.toString():void 0;return $r!==void 0&&(Qr=$r),A.createElement("div",(0,y.Z)({},(0,Te.Z)(Hr),nn?{}:Rr(sn,Mt),{"aria-selected":Pn(Jn),className:Yr,title:Qr,onMouseMove:function(){yn===Mt||Pr||_t(Mt)},onClick:function(){Pr||jn(Jn)},style:br}),A.createElement("div",{className:"".concat(Mr,"-content")},typeof dn=="function"?dn(sn,{index:Mt}):Xr),A.isValidElement(It)||Ir,ei&&A.createElement(J,{className:"".concat(wn,"-option-state"),customizeIcon:It,customizeIconProps:{value:Jn,disabled:Pr,isSelected:Ir}},Ir?"\u2713":null))}))},Ue=A.forwardRef(Oe),et=Ue,q=function(Qe,Je){var ve=A.useRef({values:new Map,options:new Map}),Pe=A.useMemo(function(){var Ze=ve.current,ct=Ze.values,Ft=Ze.options,Xt=Qe.map(function(Zt){if(Zt.label===void 0){var mn;return(0,de.Z)((0,de.Z)({},Zt),{},{label:(mn=ct.get(Zt.value))===null||mn===void 0?void 0:mn.label})}return Zt}),qt=new Map,Rt=new Map;return Xt.forEach(function(Zt){qt.set(Zt.value,Zt),Rt.set(Zt.value,Je.get(Zt.value)||Ft.get(Zt.value))}),ve.current.values=qt,ve.current.options=Rt,Xt},[Qe,Je]),Ge=A.useCallback(function(Ze){return Je.get(Ze)||ve.current.options.get(Ze)},[Je]);return[Pe,Ge]};function ne(Qe,Je){return V(Qe).join("").toUpperCase().includes(Je)}var we=function(Qe,Je,ve,Pe,Ge){return A.useMemo(function(){if(!ve||Pe===!1)return Qe;var Ze=Je.options,ct=Je.label,Ft=Je.value,Xt=[],qt=typeof Pe=="function",Rt=ve.toUpperCase(),Zt=qt?Pe:function(Jt,je){return Ge?ne(je[Ge],Rt):je[Ze]?ne(je[ct!=="children"?ct:"label"],Rt):ne(je[Ft],Rt)},mn=qt?function(Jt){return $e(Jt)}:function(Jt){return Jt};return Qe.forEach(function(Jt){if(Jt[Ze]){var je=Zt(ve,mn(Jt));if(je)Xt.push(Jt);else{var nt=Jt[Ze].filter(function(Ct){return Zt(ve,mn(Ct))});nt.length&&Xt.push((0,de.Z)((0,de.Z)({},Jt),{},(0,Y.Z)({},Ze,nt)))}return}Zt(ve,mn(Jt))&&Xt.push(Jt)}),Xt},[Qe,Pe,Ge,ve,Je])},Fe=b(6551),G=b(11592),St=["children","value"],Ee=["children"];function Wt(Qe){var Je=Qe,ve=Je.key,Pe=Je.props,Ge=Pe.children,Ze=Pe.value,ct=(0,p.Z)(Pe,St);return(0,de.Z)({key:ve,value:Ze!==void 0?Ze:ve,children:Ge},ct)}function en(Qe){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,G.Z)(Qe).map(function(ve,Pe){if(!A.isValidElement(ve)||!ve.type)return null;var Ge=ve,Ze=Ge.type.isSelectOptGroup,ct=Ge.key,Ft=Ge.props,Xt=Ft.children,qt=(0,p.Z)(Ft,Ee);return Je||!Ze?Wt(ve):(0,de.Z)((0,de.Z)({key:"__RC_SELECT_GRP__".concat(ct===null?Pe:ct,"__"),label:ct},qt),{},{options:en(Xt)})}).filter(function(ve){return ve})}var an=function(Je,ve,Pe,Ge,Ze){return A.useMemo(function(){var ct=Je,Ft=!Je;Ft&&(ct=en(ve));var Xt=new Map,qt=new Map,Rt=function(Jt,je,nt){nt&&typeof nt=="string"&&Jt.set(je[nt],je)},Zt=function mn(Jt){for(var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nt=0;nt<Jt.length;nt+=1){var Ct=Jt[nt];!Ct[Pe.options]||je?(Xt.set(Ct[Pe.value],Ct),Rt(qt,Ct,Pe.label),Rt(qt,Ct,Ge),Rt(qt,Ct,Ze)):mn(Ct[Pe.options],!0)}};return Zt(ct),{options:ct,valueOptions:Xt,labelOptions:qt}},[Je,ve,Pe,Ge,Ze])},Zn=an;function Rn(Qe){var Je=A.useRef();Je.current=Qe;var ve=A.useCallback(function(){return Je.current.apply(Je,arguments)},[]);return ve}function Cn(Qe){var Je=Qe.mode,ve=Qe.options,Pe=Qe.children,Ge=Qe.backfill,Ze=Qe.allowClear,ct=Qe.placeholder,Ft=Qe.getInputElement,Xt=Qe.showSearch,qt=Qe.onSearch,Rt=Qe.defaultOpen,Zt=Qe.autoFocus,mn=Qe.labelInValue,Jt=Qe.value,je=Qe.inputValue,nt=Qe.optionLabelProp,Ct=isMultiple(Je),mt=Xt!==void 0?Xt:Ct||Je==="combobox",xt=ve||convertChildrenToData(Pe);if(warning(Je!=="tags"||xt.every(function(nn){return!nn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Je==="tags"||Je==="combobox"){var It=xt.some(function(nn){return nn.options?nn.options.some(function(cn){return typeof("value"in cn?cn.value:cn.key)=="number"}):typeof("value"in nn?nn.value:nn.key)=="number"});warning(!It,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Je!=="combobox"||!nt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Je==="combobox"||!Ge,"`backfill` only works with `combobox` mode."),warning(Je==="combobox"||!Ft,"`getInputElement` only work with `combobox` mode."),noteOnce(Je!=="combobox"||!Ft||!Ze||!ct,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),qt&&!mt&&Je!=="combobox"&&Je!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Rt||Zt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Jt!=null){var Nt=toArray(Jt);warning(!mn||Nt.every(function(nn){return _typeof(nn)==="object"&&("key"in nn||"value"in nn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Ct||Array.isArray(Jt),"`value` should be array when `mode` is `multiple` or `tags`")}if(Pe){var zt=null;toNodeArray(Pe).some(function(nn){if(!React.isValidElement(nn)||!nn.type)return!1;var cn=nn,zn=cn.type;if(zn.isSelectOption)return!1;if(zn.isSelectOptGroup){var gn=toNodeArray(nn.props.children).every(function(dn){return!React.isValidElement(dn)||!nn.type||dn.type.isSelectOption?!0:(zt=dn.type,!1)});return!gn}return zt=zn,!0}),zt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(zt.displayName||zt.name||zt,"`.")),warning(je===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function sr(Qe,Je){if(Qe){var ve=function Pe(Ge){for(var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=0;ct<Ge.length;ct++){var Ft=Ge[ct];if(Ft[Je==null?void 0:Je.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ze&&Array.isArray(Ft[Je==null?void 0:Je.options])&&Pe(Ft[Je==null?void 0:Je.options],!0))break}};ve(Qe)}}var dr=null,$n=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],qn=["inputValue"];function ln(Qe){return!Qe||(0,ge.Z)(Qe)!=="object"}var $t=A.forwardRef(function(Qe,Je){var ve=Qe.id,Pe=Qe.mode,Ge=Qe.prefixCls,Ze=Ge===void 0?"rc-select":Ge,ct=Qe.backfill,Ft=Qe.fieldNames,Xt=Qe.inputValue,qt=Qe.searchValue,Rt=Qe.onSearch,Zt=Qe.autoClearSearchValue,mn=Zt===void 0?!0:Zt,Jt=Qe.onSelect,je=Qe.onDeselect,nt=Qe.dropdownMatchSelectWidth,Ct=nt===void 0?!0:nt,mt=Qe.filterOption,xt=Qe.filterSort,It=Qe.optionFilterProp,Nt=Qe.optionLabelProp,zt=Qe.options,nn=Qe.optionRender,cn=Qe.children,zn=Qe.defaultActiveFirstOption,gn=Qe.menuItemSelectedIcon,dn=Qe.virtual,wn=Qe.direction,En=Qe.listHeight,Ln=En===void 0?200:En,_n=Qe.listItemHeight,Tn=_n===void 0?20:_n,kn=Qe.labelRender,Nn=Qe.value,On=Qe.defaultValue,In=Qe.labelInValue,Dn=Qe.onChange,yn=Qe.maxCount,fr=(0,p.Z)(Qe,$n),_t=(0,Fe.ZP)(ve),Pn=ht(Pe),jn=!!(!zt&&cn),xr=A.useMemo(function(){return mt===void 0&&Pe==="combobox"?!1:mt},[mt,Pe]),pr=A.useMemo(function(){return _e(Ft,jn)},[JSON.stringify(Ft),jn]),Rr=(0,le.Z)("",{value:qt!==void 0?qt:Xt,postState:function(gr){return gr||""}}),Er=(0,$.Z)(Rr,2),vn=Er[0],sn=Er[1],Mt=Zn(zt,cn,pr,It,Nt),jt=Mt.valueOptions,un=Mt.labelOptions,bn=Mt.options,Mn=A.useCallback(function(Yn){var gr=V(Yn);return gr.map(function(tr){var mr,kr,zr,hi,Bn;if(ln(tr))mr=tr;else{var nr;zr=tr.key,kr=tr.label,mr=(nr=tr.value)!==null&&nr!==void 0?nr:zr}var Sr=jt.get(mr);if(Sr){var vr;if(kr===void 0&&(kr=Sr==null?void 0:Sr[Nt||pr.label]),zr===void 0&&(zr=(vr=Sr==null?void 0:Sr.key)!==null&&vr!==void 0?vr:mr),hi=Sr==null?void 0:Sr.disabled,Bn=Sr==null?void 0:Sr.title,0)var wr}return{label:kr,value:mr,key:zr,disabled:hi,title:Bn}})},[pr,Nt,jt]),Jn=(0,le.Z)(On,{value:Nn}),tn=(0,$.Z)(Jn,2),Hn=tn[0],er=tn[1],Tr=A.useMemo(function(){var Yn,gr=Pn&&Hn===null?[]:Hn,tr=Mn(gr);return Pe==="combobox"&&Z((Yn=tr[0])===null||Yn===void 0?void 0:Yn.value)?[]:tr},[Hn,Mn,Pe,Pn]),$r=q(Tr,jt),Wr=(0,$.Z)($r,2),br=Wr[0],Kr=Wr[1],Cr=A.useMemo(function(){if(!Pe&&br.length===1){var Yn=br[0];if(Yn.value===null&&(Yn.label===null||Yn.label===void 0))return[]}return br.map(function(gr){var tr;return(0,de.Z)((0,de.Z)({},gr),{},{label:(tr=typeof kn=="function"?kn(gr):gr.label)!==null&&tr!==void 0?tr:gr.value})})},[Pe,br,kn]),Hr=A.useMemo(function(){return new Set(br.map(function(Yn){return Yn.value}))},[br]);A.useEffect(function(){if(Pe==="combobox"){var Yn,gr=(Yn=br[0])===null||Yn===void 0?void 0:Yn.value;sn(C(gr)?String(gr):"")}},[br]);var Ir=Rn(function(Yn,gr){var tr=gr!=null?gr:Yn;return(0,Y.Z)((0,Y.Z)({},pr.value,Yn),pr.label,tr)}),Pr=A.useMemo(function(){if(Pe!=="tags")return bn;var Yn=(0,ce.Z)(bn),gr=function(mr){return jt.has(mr)};return(0,ce.Z)(br).sort(function(tr,mr){return tr.value<mr.value?-1:1}).forEach(function(tr){var mr=tr.value;gr(mr)||Yn.push(Ir(mr,tr.label))}),Yn},[Ir,bn,jt,br,Pe]),Mr=we(Pr,pr,vn,xr,It),Yr=A.useMemo(function(){return Pe!=="tags"||!vn||Mr.some(function(Yn){return Yn[It||"value"]===vn})||Mr.some(function(Yn){return Yn[pr.value]===vn})?Mr:[Ir(vn)].concat((0,ce.Z)(Mr))},[Ir,It,Pe,Mr,vn,pr]),ur=function Yn(gr){var tr=(0,ce.Z)(gr).sort(function(mr,kr){return xt(mr,kr,{searchValue:vn})});return tr.map(function(mr){return Array.isArray(mr.options)?(0,de.Z)((0,de.Z)({},mr),{},{options:mr.options.length>0?Yn(mr.options):mr.options}):mr})},ei=A.useMemo(function(){return xt?ur(Yr):Yr},[Yr,xt,vn]),Xr=A.useMemo(function(){return Re(ei,{fieldNames:pr,childrenAsData:jn})},[ei,pr,jn]),Qr=function(gr){var tr=Mn(gr);if(er(tr),Dn&&(tr.length!==br.length||tr.some(function(zr,hi){var Bn;return((Bn=br[hi])===null||Bn===void 0?void 0:Bn.value)!==(zr==null?void 0:zr.value)}))){var mr=In?tr:tr.map(function(zr){return zr.value}),kr=tr.map(function(zr){return $e(Kr(zr.value))});Dn(Pn?mr:mr[0],Pn?kr:kr[0])}},Vn=A.useState(null),xn=(0,$.Z)(Vn,2),Fr=xn[0],rn=xn[1],qr=A.useState(0),Ii=(0,$.Z)(qr,2),Si=Ii[0],di=Ii[1],pi=zn!==void 0?zn:Pe!=="combobox",or=A.useCallback(function(Yn,gr){var tr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},mr=tr.source,kr=mr===void 0?"keyboard":mr;di(gr),ct&&Pe==="combobox"&&Yn!==null&&kr==="keyboard"&&rn(String(Yn))},[ct,Pe]),ni=function(gr,tr,mr){var kr=function(){var Ti,yi=Kr(gr);return[In?{label:yi==null?void 0:yi[pr.label],value:gr,key:(Ti=yi==null?void 0:yi.key)!==null&&Ti!==void 0?Ti:gr}:gr,$e(yi)]};if(tr&&Jt){var zr=kr(),hi=(0,$.Z)(zr,2),Bn=hi[0],nr=hi[1];Jt(Bn,nr)}else if(!tr&&je&&mr!=="clear"){var Sr=kr(),vr=(0,$.Z)(Sr,2),wr=vr[0],Di=vr[1];je(wr,Di)}},vi=Rn(function(Yn,gr){var tr,mr=Pn?gr.selected:!0;mr?tr=Pn?[].concat((0,ce.Z)(br),[Yn]):[Yn]:tr=br.filter(function(kr){return kr.value!==Yn}),Qr(tr),ni(Yn,mr),Pe==="combobox"?rn(""):(!ht||mn)&&(sn(""),rn(""))}),wi=function(gr,tr){Qr(gr);var mr=tr.type,kr=tr.values;(mr==="remove"||mr==="clear")&&kr.forEach(function(zr){ni(zr.value,!1,mr)})},Lr=function(gr,tr){if(sn(gr),rn(null),tr.source==="submit"){var mr=(gr||"").trim();if(mr){var kr=Array.from(new Set([].concat((0,ce.Z)(Hr),[mr])));Qr(kr),ni(mr,!0),sn("")}return}tr.source!=="blur"&&(Pe==="combobox"&&Qr(gr),Rt==null||Rt(gr))},Jr=function(gr){var tr=gr;Pe!=="tags"&&(tr=gr.map(function(kr){var zr=un.get(kr);return zr==null?void 0:zr.value}).filter(function(kr){return kr!==void 0}));var mr=Array.from(new Set([].concat((0,ce.Z)(Hr),(0,ce.Z)(tr))));Qr(mr),mr.forEach(function(kr){ni(kr,!0)})},oi=A.useMemo(function(){var Yn=dn!==!1&&Ct!==!1;return(0,de.Z)((0,de.Z)({},Mt),{},{flattenOptions:Xr,onActiveValue:or,defaultActiveFirstOption:pi,onSelect:vi,menuItemSelectedIcon:gn,rawValues:Hr,fieldNames:pr,virtual:Yn,direction:wn,listHeight:Ln,listItemHeight:Tn,childrenAsData:jn,maxCount:yn,optionRender:nn})},[yn,Mt,Xr,or,pi,vi,gn,Hr,pr,dn,Ct,wn,Ln,Tn,jn,nn]);return A.createElement(te.Provider,{value:oi},A.createElement(He,(0,y.Z)({},fr,{id:_t,prefixCls:Ze,ref:Je,omitDomProps:qn,mode:Pe,displayValues:Cr,onDisplayValuesChange:wi,direction:wn,searchValue:vn,onSearch:Lr,autoClearSearchValue:mn,onSearchSplit:Jr,dropdownMatchSelectWidth:Ct,OptionList:et,emptyOptions:!Xr.length,activeValue:Fr,activeDescendantId:"".concat(_t,"_list_").concat(Si)})))}),Vt=$t;Vt.Option=Pt,Vt.OptGroup=pt;var An=Vt,Xn=An},22711:function(fn,ut,b){"use strict";b.r(ut),b.d(ut,{ResizableTextArea:function(){return at},default:function(){return ee}});var y=b(60499),ce=b(18642),Y=b(85899),de=b(77654),$=b(72190),p=b(42244),ge=b(92310),le=b.n(ge),l=b(36901),A=b(66003),F=b(30292),_=b(18929),E=b(59301),w=b(43749),O=b(29301),X=b(34280),J=b(16089),U=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,R=["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={},P;function N(V){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=V.getAttribute("id")||V.getAttribute("data-reactid")||V.getAttribute("name");if(he&&z[S])return z[S];var C=window.getComputedStyle(V),Z=C.getPropertyValue("box-sizing")||C.getPropertyValue("-moz-box-sizing")||C.getPropertyValue("-webkit-box-sizing"),ye=parseFloat(C.getPropertyValue("padding-bottom"))+parseFloat(C.getPropertyValue("padding-top")),Ve=parseFloat(C.getPropertyValue("border-bottom-width"))+parseFloat(C.getPropertyValue("border-top-width")),qe=R.map(function(yt){return"".concat(yt,":").concat(C.getPropertyValue(yt))}).join(";"),gt={sizingStyle:qe,paddingSize:ye,borderSize:Ve,boxSizing:Z};return he&&S&&(z[S]=gt),gt}function re(V){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;P||(P=document.createElement("textarea"),P.setAttribute("tab-index","-1"),P.setAttribute("aria-hidden","true"),P.setAttribute("name","hiddenTextarea"),document.body.appendChild(P)),V.getAttribute("wrap")?P.setAttribute("wrap",V.getAttribute("wrap")):P.removeAttribute("wrap");var Z=N(V,he),ye=Z.paddingSize,Ve=Z.borderSize,qe=Z.boxSizing,gt=Z.sizingStyle;P.setAttribute("style","".concat(gt,";").concat(U)),P.value=V.value||V.placeholder||"";var yt=void 0,Dt=void 0,Ut,ot=P.scrollHeight;if(qe==="border-box"?ot+=Ve:qe==="content-box"&&(ot-=ye),S!==null||C!==null){P.value=" ";var kt=P.scrollHeight-ye;S!==null&&(yt=kt*S,qe==="border-box"&&(yt=yt+ye+Ve),ot=Math.max(yt,ot)),C!==null&&(Dt=kt*C,qe==="border-box"&&(Dt=Dt+ye+Ve),Ut=ot>Dt?"":"hidden",ot=Math.min(Dt,ot))}var tt={height:ot,overflowY:Ut,resize:"none"};return yt&&(tt.minHeight=yt),Dt&&(tt.maxHeight=Dt),tt}var ue=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],me=0,Te=1,Be=2,Le=E.forwardRef(function(V,he){var S=V,C=S.prefixCls,Z=S.defaultValue,ye=S.value,Ve=S.autoSize,qe=S.onResize,gt=S.className,yt=S.style,Dt=S.disabled,Ut=S.onChange,ot=S.onInternalAutoSize,kt=(0,p.Z)(S,ue),tt=(0,_.Z)(Z,{value:ye,postState:function(Pt){return Pt!=null?Pt:""}}),Gt=(0,$.Z)(tt,2),Xe=Gt[0],Ke=Gt[1],Ae=function(Pt){Ke(Pt.target.value),Ut==null||Ut(Pt)},xe=E.useRef();E.useImperativeHandle(he,function(){return{textArea:xe.current}});var se=E.useMemo(function(){return Ve&&(0,w.Z)(Ve)==="object"?[Ve.minRows,Ve.maxRows]:[]},[Ve]),Ne=(0,$.Z)(se,2),Ce=Ne[0],Se=Ne[1],M=!!Ve,fe=function(){try{if(document.activeElement===xe.current){var Pt=xe.current,x=Pt.selectionStart,D=Pt.selectionEnd,Ye=Pt.scrollTop;xe.current.setSelectionRange(x,D),xe.current.scrollTop=Ye}}catch(W){}},_e=E.useState(Be),Re=(0,$.Z)(_e,2),$e=Re[0],rt=Re[1],it=E.useState(),te=(0,$.Z)(it,2),Q=te[0],lt=te[1],st=function(){rt(me)};(0,X.Z)(function(){M&&st()},[ye,Ce,Se,M]),(0,X.Z)(function(){if($e===me)rt(Te);else if($e===Te){var ft=re(xe.current,!1,Ce,Se);rt(Be),lt(ft)}else fe()},[$e]);var ht=E.useRef(),bt=function(){J.Z.cancel(ht.current)},He=function(Pt){$e===Be&&(qe==null||qe(Pt),Ve&&(bt(),ht.current=(0,J.Z)(function(){st()})))};E.useEffect(function(){return bt},[]);var Et=M?Q:null,pt=(0,Y.Z)((0,Y.Z)({},yt),Et);return($e===me||$e===Te)&&(pt.overflowY="hidden",pt.overflowX="hidden"),E.createElement(O.Z,{onResize:He,disabled:!(Ve||qe)},E.createElement("textarea",(0,y.Z)({},kt,{ref:xe,style:pt,className:le()(C,gt,(0,ce.Z)({},"".concat(C,"-disabled"),Dt)),disabled:Dt,value:Xe,onChange:Ae})))}),at=Le,ie=["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"],K=E.forwardRef(function(V,he){var S,C=V.defaultValue,Z=V.value,ye=V.onFocus,Ve=V.onBlur,qe=V.onChange,gt=V.allowClear,yt=V.maxLength,Dt=V.onCompositionStart,Ut=V.onCompositionEnd,ot=V.suffix,kt=V.prefixCls,tt=kt===void 0?"rc-textarea":kt,Gt=V.showCount,Xe=V.count,Ke=V.className,Ae=V.style,xe=V.disabled,se=V.hidden,Ne=V.classNames,Ce=V.styles,Se=V.onResize,M=V.onClear,fe=V.onPressEnter,_e=V.readOnly,Re=V.autoSize,$e=V.onKeyDown,rt=(0,p.Z)(V,ie),it=(0,_.Z)(C,{value:Z,defaultValue:C}),te=(0,$.Z)(it,2),Q=te[0],lt=te[1],st=Q==null?"":String(Q),ht=E.useState(!1),bt=(0,$.Z)(ht,2),He=bt[0],Et=bt[1],pt=E.useRef(!1),ft=E.useState(null),Pt=(0,$.Z)(ft,2),x=Pt[0],D=Pt[1],Ye=(0,E.useRef)(null),W=(0,E.useRef)(null),pe=function(){var Vt;return(Vt=W.current)===null||Vt===void 0?void 0:Vt.textArea},Bt=function(){pe().focus()};(0,E.useImperativeHandle)(he,function(){var $t;return{resizableTextArea:W.current,focus:Bt,blur:function(){pe().blur()},nativeElement:(($t=Ye.current)===null||$t===void 0?void 0:$t.nativeElement)||pe()}}),(0,E.useEffect)(function(){Et(function($t){return!xe&&$t})},[xe]);var Oe=E.useState(null),Ue=(0,$.Z)(Oe,2),et=Ue[0],q=Ue[1];E.useEffect(function(){if(et){var $t;($t=pe()).setSelectionRange.apply($t,(0,de.Z)(et))}},[et]);var ne=(0,A.Z)(Xe,Gt),we=(S=ne.max)!==null&&S!==void 0?S:yt,Fe=Number(we)>0,G=ne.strategy(st),St=!!we&&G>we,Ee=function(Vt,An){var Xn=An;!pt.current&&ne.exceedFormatter&&ne.max&&ne.strategy(An)>ne.max&&(Xn=ne.exceedFormatter(An,{max:ne.max}),An!==Xn&&q([pe().selectionStart||0,pe().selectionEnd||0])),lt(Xn),(0,F.rJ)(Vt.currentTarget,Vt,qe,Xn)},Wt=function(Vt){pt.current=!0,Dt==null||Dt(Vt)},en=function(Vt){pt.current=!1,Ee(Vt,Vt.currentTarget.value),Ut==null||Ut(Vt)},an=function(Vt){Ee(Vt,Vt.target.value)},Zn=function(Vt){Vt.key==="Enter"&&fe&&fe(Vt),$e==null||$e(Vt)},Rn=function(Vt){Et(!0),ye==null||ye(Vt)},Cn=function(Vt){Et(!1),Ve==null||Ve(Vt)},sr=function(Vt){lt(""),Bt(),(0,F.rJ)(pe(),Vt,qe)},dr=ot,$n;ne.show&&(ne.showFormatter?$n=ne.showFormatter({value:st,count:G,maxLength:we}):$n="".concat(G).concat(Fe?" / ".concat(we):""),dr=E.createElement(E.Fragment,null,dr,E.createElement("span",{className:le()("".concat(tt,"-data-count"),Ne==null?void 0:Ne.count),style:Ce==null?void 0:Ce.count},$n)));var qn=function(Vt){var An;Se==null||Se(Vt),(An=pe())!==null&&An!==void 0&&An.style.height&&D(!0)},ln=!Re&&!Gt&&!gt;return E.createElement(l.BaseInput,{ref:Ye,value:st,allowClear:gt,handleReset:sr,suffix:dr,prefixCls:tt,classNames:(0,Y.Z)((0,Y.Z)({},Ne),{},{affixWrapper:le()(Ne==null?void 0:Ne.affixWrapper,(0,ce.Z)((0,ce.Z)({},"".concat(tt,"-show-count"),Gt),"".concat(tt,"-textarea-allow-clear"),gt))}),disabled:xe,focused:He,className:le()(Ke,St&&"".concat(tt,"-out-of-range")),style:(0,Y.Z)((0,Y.Z)({},Ae),x&&!ln?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof $n=="string"?$n:void 0}},hidden:se,readOnly:_e,onClear:M},E.createElement(at,(0,y.Z)({},rt,{autoSize:Re,maxLength:yt,onKeyDown:Zn,onChange:an,onFocus:Rn,onBlur:Cn,onCompositionStart:Wt,onCompositionEnd:en,className:le()(Ne==null?void 0:Ne.textarea),style:(0,Y.Z)((0,Y.Z)({},Ce==null?void 0:Ce.textarea),{},{resize:Ae==null?void 0:Ae.resize}),disabled:xe,prefixCls:tt,onResize:qn,ref:W,readOnly:_e})))}),I=K,ee=I},29125:function(fn,ut,b){"use strict";b.d(ut,{G:function(){return de},Z:function(){return U}});var y=b(92310),ce=b.n(y),Y=b(59301);function de(R){var z=R.children,P=R.prefixCls,N=R.id,re=R.overlayInnerStyle,ue=R.bodyClassName,me=R.className,Te=R.style;return Y.createElement("div",{className:ce()("".concat(P,"-content"),me),style:Te},Y.createElement("div",{className:ce()("".concat(P,"-inner"),ue),id:N,role:"tooltip",style:re},typeof z=="function"?z():z))}var $=b(60499),p=b(85899),ge=b(42244),le=b(68196),l={shiftX:64,adjustY:1},A={adjustX:1,shiftY:!0},F=[0,0],_={left:{points:["cr","cl"],overflow:A,offset:[-4,0],targetOffset:F},right:{points:["cl","cr"],overflow:A,offset:[4,0],targetOffset:F},top:{points:["bc","tc"],overflow:l,offset:[0,-4],targetOffset:F},bottom:{points:["tc","bc"],overflow:l,offset:[0,4],targetOffset:F},topLeft:{points:["bl","tl"],overflow:l,offset:[0,-4],targetOffset:F},leftTop:{points:["tr","tl"],overflow:A,offset:[-4,0],targetOffset:F},topRight:{points:["br","tr"],overflow:l,offset:[0,-4],targetOffset:F},rightTop:{points:["tl","tr"],overflow:A,offset:[4,0],targetOffset:F},bottomRight:{points:["tr","br"],overflow:l,offset:[0,4],targetOffset:F},rightBottom:{points:["bl","br"],overflow:A,offset:[4,0],targetOffset:F},bottomLeft:{points:["tl","bl"],overflow:l,offset:[0,4],targetOffset:F},leftBottom:{points:["br","bl"],overflow:A,offset:[-4,0],targetOffset:F}},E=null,w=b(80402),O=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],X=function(z,P){var N=z.overlayClassName,re=z.trigger,ue=re===void 0?["hover"]:re,me=z.mouseEnterDelay,Te=me===void 0?0:me,Be=z.mouseLeaveDelay,Le=Be===void 0?.1:Be,at=z.overlayStyle,ie=z.prefixCls,K=ie===void 0?"rc-tooltip":ie,I=z.children,ee=z.onVisibleChange,V=z.afterVisibleChange,he=z.transitionName,S=z.animation,C=z.motion,Z=z.placement,ye=Z===void 0?"right":Z,Ve=z.align,qe=Ve===void 0?{}:Ve,gt=z.destroyTooltipOnHide,yt=gt===void 0?!1:gt,Dt=z.defaultVisible,Ut=z.getTooltipContainer,ot=z.overlayInnerStyle,kt=z.arrowContent,tt=z.overlay,Gt=z.id,Xe=z.showArrow,Ke=Xe===void 0?!0:Xe,Ae=z.classNames,xe=z.styles,se=(0,ge.Z)(z,O),Ne=(0,w.Z)(Gt),Ce=(0,Y.useRef)(null);(0,Y.useImperativeHandle)(P,function(){return Ce.current});var Se=(0,p.Z)({},se);"visible"in z&&(Se.popupVisible=z.visible);var M=function(){return Y.createElement(de,{key:"content",prefixCls:K,id:Ne,bodyClassName:Ae==null?void 0:Ae.body,overlayInnerStyle:(0,p.Z)((0,p.Z)({},ot),xe==null?void 0:xe.body)},tt)},fe=function(){var Re=Y.Children.only(I),$e=(Re==null?void 0:Re.props)||{},rt=(0,p.Z)((0,p.Z)({},$e),{},{"aria-describedby":tt?Ne:null});return Y.cloneElement(I,rt)};return Y.createElement(le.Z,(0,$.Z)({popupClassName:ce()(N,Ae==null?void 0:Ae.root),prefixCls:K,popup:M,action:ue,builtinPlacements:_,popupPlacement:ye,ref:Ce,popupAlign:qe,getPopupContainer:Ut,onPopupVisibleChange:ee,afterPopupVisibleChange:V,popupTransitionName:he,popupAnimation:S,popupMotion:C,defaultPopupVisible:Dt,autoDestroy:yt,mouseLeaveDelay:Le,popupStyle:(0,p.Z)((0,p.Z)({},at),xe==null?void 0:xe.root),mouseEnterDelay:Te,arrow:Ke},Se),fe())},J=(0,Y.forwardRef)(X),U=J},49658:function(fn,ut){"use strict";ut.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var b=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(b)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(b==null?void 0:b.substr(0,4))}},48911:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return Xe}});var y=b(60499),ce=b(43749),Y=b(85899),de=b(18642),$=b(72190),p=b(42244),ge=b(92310),le=b.n(ge),l=b(29301),A=b(70425),F=b(34280),_=b(59301),E=b(4676),w=_.forwardRef(function(Ke,Ae){var xe=Ke.height,se=Ke.offsetY,Ne=Ke.offsetX,Ce=Ke.children,Se=Ke.prefixCls,M=Ke.onInnerResize,fe=Ke.innerProps,_e=Ke.rtl,Re=Ke.extra,$e={},rt={display:"flex",flexDirection:"column"};return se!==void 0&&($e={height:xe,position:"relative",overflow:"hidden"},rt=(0,Y.Z)((0,Y.Z)({},rt),{},(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({transform:"translateY(".concat(se,"px)")},_e?"marginRight":"marginLeft",-Ne),"position","absolute"),"left",0),"right",0),"top",0))),_.createElement("div",{style:$e},_.createElement(l.Z,{onResize:function(te){var Q=te.offsetHeight;Q&&M&&M()}},_.createElement("div",(0,y.Z)({style:rt,className:le()((0,de.Z)({},"".concat(Se,"-holder-inner"),Se)),ref:Ae},fe),Ce,Re)))});w.displayName="Filler";var O=w;function X(Ke){var Ae=Ke.children,xe=Ke.setRef,se=_.useCallback(function(Ne){xe(Ne)},[]);return _.cloneElement(Ae,{ref:se})}function J(Ke,Ae,xe,se,Ne,Ce,Se,M){var fe=M.getKey;return Ke.slice(Ae,xe+1).map(function(_e,Re){var $e=Ae+Re,rt=Se(_e,$e,{style:{width:se},offsetX:Ne}),it=fe(_e);return _.createElement(X,{key:it,setRef:function(Q){return Ce(_e,Q)}},rt)})}function U(Ke,Ae,xe,se){var Ne=xe-Ke,Ce=Ae-xe,Se=Math.min(Ne,Ce)*2;if(se<=Se){var M=Math.floor(se/2);return se%2?xe+M+1:xe-M}return Ne>Ce?xe-(se-Ce):xe+(se-Ne)}function R(Ke,Ae,xe){var se=Ke.length,Ne=Ae.length,Ce,Se;if(se===0&&Ne===0)return null;se<Ne?(Ce=Ke,Se=Ae):(Ce=Ae,Se=Ke);var M={__EMPTY_ITEM__:!0};function fe(te){return te!==void 0?xe(te):M}for(var _e=null,Re=Math.abs(se-Ne)!==1,$e=0;$e<Se.length;$e+=1){var rt=fe(Ce[$e]),it=fe(Se[$e]);if(rt!==it){_e=$e,Re=Re||rt!==fe(Se[$e+1]);break}}return _e===null?null:{index:_e,multiple:Re}}function z(Ke,Ae,xe){var se=_.useState(Ke),Ne=(0,$.Z)(se,2),Ce=Ne[0],Se=Ne[1],M=_.useState(null),fe=(0,$.Z)(M,2),_e=fe[0],Re=fe[1];return _.useEffect(function(){var $e=R(Ce||[],Ke||[],Ae);($e==null?void 0:$e.index)!==void 0&&(xe==null||xe($e.index),Re(Ke[$e.index])),Se(Ke)},[Ke]),[_e]}var P=b(16089),N=(typeof navigator=="undefined"?"undefined":(0,ce.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),re=N,ue=function(Ke,Ae,xe,se){var Ne=(0,_.useRef)(!1),Ce=(0,_.useRef)(null);function Se(){clearTimeout(Ce.current),Ne.current=!0,Ce.current=setTimeout(function(){Ne.current=!1},50)}var M=(0,_.useRef)({top:Ke,bottom:Ae,left:xe,right:se});return M.current.top=Ke,M.current.bottom=Ae,M.current.left=xe,M.current.right=se,function(fe,_e){var Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$e=fe?_e<0&&M.current.left||_e>0&&M.current.right:_e<0&&M.current.top||_e>0&&M.current.bottom;return Re&&$e?(clearTimeout(Ce.current),Ne.current=!1):(!$e||Ne.current)&&Se(),!Ne.current&&$e}};function me(Ke,Ae,xe,se,Ne,Ce,Se){var M=(0,_.useRef)(0),fe=(0,_.useRef)(null),_e=(0,_.useRef)(null),Re=(0,_.useRef)(!1),$e=ue(Ae,xe,se,Ne);function rt(ht,bt){if(P.Z.cancel(fe.current),!$e(!1,bt)){var He=ht;if(!He._virtualHandled)He._virtualHandled=!0;else return;M.current+=bt,_e.current=bt,re||He.preventDefault(),fe.current=(0,P.Z)(function(){var Et=Re.current?10:1;Se(M.current*Et,!1),M.current=0})}}function it(ht,bt){Se(bt,!0),re||ht.preventDefault()}var te=(0,_.useRef)(null),Q=(0,_.useRef)(null);function lt(ht){if(Ke){P.Z.cancel(Q.current),Q.current=(0,P.Z)(function(){te.current=null},2);var bt=ht.deltaX,He=ht.deltaY,Et=ht.shiftKey,pt=bt,ft=He;(te.current==="sx"||!te.current&&Et&&He&&!bt)&&(pt=He,ft=0,te.current="sx");var Pt=Math.abs(pt),x=Math.abs(ft);te.current===null&&(te.current=Ce&&Pt>x?"x":"y"),te.current==="y"?rt(ht,ft):it(ht,pt)}}function st(ht){Ke&&(Re.current=ht.detail===_e.current)}return[lt,st]}function Te(Ke,Ae,xe,se){var Ne=_.useMemo(function(){return[new Map,[]]},[Ke,xe.id,se]),Ce=(0,$.Z)(Ne,2),Se=Ce[0],M=Ce[1],fe=function(Re){var $e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Re,rt=Se.get(Re),it=Se.get($e);if(rt===void 0||it===void 0)for(var te=Ke.length,Q=M.length;Q<te;Q+=1){var lt,st=Ke[Q],ht=Ae(st);Se.set(ht,Q);var bt=(lt=xe.get(ht))!==null&<!==void 0?lt:se;if(M[Q]=(M[Q-1]||0)+bt,ht===Re&&(rt=Q),ht===$e&&(it=Q),rt!==void 0&&it!==void 0)break}return{top:M[rt-1]||0,bottom:M[it]}};return fe}var Be=b(38705),Le=b(17212),at=function(){function Ke(){(0,Be.Z)(this,Ke),(0,de.Z)(this,"maps",void 0),(0,de.Z)(this,"id",0),(0,de.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Le.Z)(Ke,[{key:"set",value:function(xe,se){this.diffRecords.set(xe,this.maps[xe]),this.maps[xe]=se,this.id+=1}},{key:"get",value:function(xe){return this.maps[xe]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),Ke}(),ie=at;function K(Ke){var Ae=parseFloat(Ke);return isNaN(Ae)?0:Ae}function I(Ke,Ae,xe){var se=_.useState(0),Ne=(0,$.Z)(se,2),Ce=Ne[0],Se=Ne[1],M=(0,_.useRef)(new Map),fe=(0,_.useRef)(new ie),_e=(0,_.useRef)(0);function Re(){_e.current+=1}function $e(){var it=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Re();var te=function(){var st=!1;M.current.forEach(function(ht,bt){if(ht&&ht.offsetParent){var He=ht.offsetHeight,Et=getComputedStyle(ht),pt=Et.marginTop,ft=Et.marginBottom,Pt=K(pt),x=K(ft),D=He+Pt+x;fe.current.get(bt)!==D&&(fe.current.set(bt,D),st=!0)}}),st&&Se(function(ht){return ht+1})};if(it)te();else{_e.current+=1;var Q=_e.current;Promise.resolve().then(function(){Q===_e.current&&te()})}}function rt(it,te){var Q=Ke(it),lt=M.current.get(Q);te?(M.current.set(Q,te),$e()):M.current.delete(Q),!lt!=!te&&(te?Ae==null||Ae(it):xe==null||xe(it))}return(0,_.useEffect)(function(){return Re},[]),[rt,$e,fe.current,Ce]}var ee=14/15;function V(Ke,Ae,xe){var se=(0,_.useRef)(!1),Ne=(0,_.useRef)(0),Ce=(0,_.useRef)(0),Se=(0,_.useRef)(null),M=(0,_.useRef)(null),fe,_e=function(it){if(se.current){var te=Math.ceil(it.touches[0].pageX),Q=Math.ceil(it.touches[0].pageY),lt=Ne.current-te,st=Ce.current-Q,ht=Math.abs(lt)>Math.abs(st);ht?Ne.current=te:Ce.current=Q;var bt=xe(ht,ht?lt:st,!1,it);bt&&it.preventDefault(),clearInterval(M.current),bt&&(M.current=setInterval(function(){ht?lt*=ee:st*=ee;var He=Math.floor(ht?lt:st);(!xe(ht,He,!0)||Math.abs(He)<=.1)&&clearInterval(M.current)},16))}},Re=function(){se.current=!1,fe()},$e=function(it){fe(),it.touches.length===1&&!se.current&&(se.current=!0,Ne.current=Math.ceil(it.touches[0].pageX),Ce.current=Math.ceil(it.touches[0].pageY),Se.current=it.target,Se.current.addEventListener("touchmove",_e,{passive:!1}),Se.current.addEventListener("touchend",Re,{passive:!0}))};fe=function(){Se.current&&(Se.current.removeEventListener("touchmove",_e),Se.current.removeEventListener("touchend",Re))},(0,F.Z)(function(){return Ke&&Ae.current.addEventListener("touchstart",$e,{passive:!0}),function(){var rt;(rt=Ae.current)===null||rt===void 0||rt.removeEventListener("touchstart",$e),fe(),clearInterval(M.current)}},[Ke])}function he(Ke){return Math.floor(Math.pow(Ke,.5))}function S(Ke,Ae){var xe="touches"in Ke?Ke.touches[0]:Ke;return xe[Ae?"pageX":"pageY"]-window[Ae?"scrollX":"scrollY"]}function C(Ke,Ae,xe){_.useEffect(function(){var se=Ae.current;if(Ke&&se){var Ne=!1,Ce,Se,M=function(){P.Z.cancel(Ce)},fe=function rt(){M(),Ce=(0,P.Z)(function(){xe(Se),rt()})},_e=function(){Ne=!1,M()},Re=function(it){if(!(it.target.draggable||it.button!==0)){var te=it;te._virtualHandled||(te._virtualHandled=!0,Ne=!0)}},$e=function(it){if(Ne){var te=S(it,!1),Q=se.getBoundingClientRect(),lt=Q.top,st=Q.bottom;if(te<=lt){var ht=lt-te;Se=-he(ht),fe()}else if(te>=st){var bt=te-st;Se=he(bt),fe()}else M()}};return se.addEventListener("mousedown",Re),se.ownerDocument.addEventListener("mouseup",_e),se.ownerDocument.addEventListener("mousemove",$e),se.ownerDocument.addEventListener("dragend",_e),function(){se.removeEventListener("mousedown",Re),se.ownerDocument.removeEventListener("mouseup",_e),se.ownerDocument.removeEventListener("mousemove",$e),se.ownerDocument.removeEventListener("dragend",_e),M()}}},[Ke])}var Z=10;function ye(Ke,Ae,xe,se,Ne,Ce,Se,M){var fe=_.useRef(),_e=_.useState(null),Re=(0,$.Z)(_e,2),$e=Re[0],rt=Re[1];return(0,F.Z)(function(){if($e&&$e.times<Z){if(!Ke.current){rt(function(ne){return(0,Y.Z)({},ne)});return}Ce();var it=$e.targetAlign,te=$e.originAlign,Q=$e.index,lt=$e.offset,st=Ke.current.clientHeight,ht=!1,bt=it,He=null;if(st){for(var Et=it||te,pt=0,ft=0,Pt=0,x=Math.min(Ae.length-1,Q),D=0;D<=x;D+=1){var Ye=Ne(Ae[D]);ft=pt;var W=xe.get(Ye);Pt=ft+(W===void 0?se:W),pt=Pt}for(var pe=Et==="top"?lt:st-lt,Bt=x;Bt>=0;Bt-=1){var Oe=Ne(Ae[Bt]),Ue=xe.get(Oe);if(Ue===void 0){ht=!0;break}if(pe-=Ue,pe<=0)break}switch(Et){case"top":He=ft-lt;break;case"bottom":He=Pt-st+lt;break;default:{var et=Ke.current.scrollTop,q=et+st;ft<et?bt="top":Pt>q&&(bt="bottom")}}He!==null&&Se(He),He!==$e.lastTop&&(ht=!0)}ht&&rt((0,Y.Z)((0,Y.Z)({},$e),{},{times:$e.times+1,targetAlign:bt,lastTop:He}))}},[$e,Ke.current]),function(it){if(it==null){M();return}if(P.Z.cancel(fe.current),typeof it=="number")Se(it);else if(it&&(0,ce.Z)(it)==="object"){var te,Q=it.align;"index"in it?te=it.index:te=Ae.findIndex(function(ht){return Ne(ht)===it.key});var lt=it.offset,st=lt===void 0?0:lt;rt({times:0,index:te,offset:st,originAlign:Q})}}}var Ve=_.forwardRef(function(Ke,Ae){var xe=Ke.prefixCls,se=Ke.rtl,Ne=Ke.scrollOffset,Ce=Ke.scrollRange,Se=Ke.onStartMove,M=Ke.onStopMove,fe=Ke.onScroll,_e=Ke.horizontal,Re=Ke.spinSize,$e=Ke.containerSize,rt=Ke.style,it=Ke.thumbStyle,te=Ke.showScrollBar,Q=_.useState(!1),lt=(0,$.Z)(Q,2),st=lt[0],ht=lt[1],bt=_.useState(null),He=(0,$.Z)(bt,2),Et=He[0],pt=He[1],ft=_.useState(null),Pt=(0,$.Z)(ft,2),x=Pt[0],D=Pt[1],Ye=!se,W=_.useRef(),pe=_.useRef(),Bt=_.useState(te),Oe=(0,$.Z)(Bt,2),Ue=Oe[0],et=Oe[1],q=_.useRef(),ne=function(){te===!0||te===!1||(clearTimeout(q.current),et(!0),q.current=setTimeout(function(){et(!1)},3e3))},we=Ce-$e||0,Fe=$e-Re||0,G=_.useMemo(function(){if(Ne===0||we===0)return 0;var sr=Ne/we;return sr*Fe},[Ne,we,Fe]),St=function(dr){dr.stopPropagation(),dr.preventDefault()},Ee=_.useRef({top:G,dragging:st,pageY:Et,startTop:x});Ee.current={top:G,dragging:st,pageY:Et,startTop:x};var Wt=function(dr){ht(!0),pt(S(dr,_e)),D(Ee.current.top),Se(),dr.stopPropagation(),dr.preventDefault()};_.useEffect(function(){var sr=function(ln){ln.preventDefault()},dr=W.current,$n=pe.current;return dr.addEventListener("touchstart",sr,{passive:!1}),$n.addEventListener("touchstart",Wt,{passive:!1}),function(){dr.removeEventListener("touchstart",sr),$n.removeEventListener("touchstart",Wt)}},[]);var en=_.useRef();en.current=we;var an=_.useRef();an.current=Fe,_.useEffect(function(){if(st){var sr,dr=function(ln){var $t=Ee.current,Vt=$t.dragging,An=$t.pageY,Xn=$t.startTop;P.Z.cancel(sr);var Qe=W.current.getBoundingClientRect(),Je=$e/(_e?Qe.width:Qe.height);if(Vt){var ve=(S(ln,_e)-An)*Je,Pe=Xn;!Ye&&_e?Pe-=ve:Pe+=ve;var Ge=en.current,Ze=an.current,ct=Ze?Pe/Ze:0,Ft=Math.ceil(ct*Ge);Ft=Math.max(Ft,0),Ft=Math.min(Ft,Ge),sr=(0,P.Z)(function(){fe(Ft,_e)})}},$n=function(){ht(!1),M()};return window.addEventListener("mousemove",dr,{passive:!0}),window.addEventListener("touchmove",dr,{passive:!0}),window.addEventListener("mouseup",$n,{passive:!0}),window.addEventListener("touchend",$n,{passive:!0}),function(){window.removeEventListener("mousemove",dr),window.removeEventListener("touchmove",dr),window.removeEventListener("mouseup",$n),window.removeEventListener("touchend",$n),P.Z.cancel(sr)}}},[st]),_.useEffect(function(){return ne(),function(){clearTimeout(q.current)}},[Ne]),_.useImperativeHandle(Ae,function(){return{delayHidden:ne}});var Zn="".concat(xe,"-scrollbar"),Rn={position:"absolute",visibility:Ue?null:"hidden"},Cn={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return _e?(Object.assign(Rn,{height:8,left:0,right:0,bottom:0}),Object.assign(Cn,(0,de.Z)({height:"100%",width:Re},Ye?"left":"right",G))):(Object.assign(Rn,(0,de.Z)({width:8,top:0,bottom:0},Ye?"right":"left",0)),Object.assign(Cn,{width:"100%",height:Re,top:G})),_.createElement("div",{ref:W,className:le()(Zn,(0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(Zn,"-horizontal"),_e),"".concat(Zn,"-vertical"),!_e),"".concat(Zn,"-visible"),Ue)),style:(0,Y.Z)((0,Y.Z)({},Rn),rt),onMouseDown:St,onMouseMove:ne},_.createElement("div",{ref:pe,className:le()("".concat(Zn,"-thumb"),(0,de.Z)({},"".concat(Zn,"-thumb-moving"),st)),style:(0,Y.Z)((0,Y.Z)({},Cn),it),onMouseDown:Wt}))}),qe=Ve,gt=20;function yt(){var Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,xe=Ke/Ae*Ke;return isNaN(xe)&&(xe=0),xe=Math.max(xe,gt),Math.floor(xe)}var Dt=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ut=[],ot={overflowY:"auto",overflowAnchor:"none"};function kt(Ke,Ae){var xe=Ke.prefixCls,se=xe===void 0?"rc-virtual-list":xe,Ne=Ke.className,Ce=Ke.height,Se=Ke.itemHeight,M=Ke.fullHeight,fe=M===void 0?!0:M,_e=Ke.style,Re=Ke.data,$e=Ke.children,rt=Ke.itemKey,it=Ke.virtual,te=Ke.direction,Q=Ke.scrollWidth,lt=Ke.component,st=lt===void 0?"div":lt,ht=Ke.onScroll,bt=Ke.onVirtualScroll,He=Ke.onVisibleChange,Et=Ke.innerProps,pt=Ke.extraRender,ft=Ke.styles,Pt=Ke.showScrollBar,x=Pt===void 0?"optional":Pt,D=(0,p.Z)(Ke,Dt),Ye=_.useCallback(function(Mt){return typeof rt=="function"?rt(Mt):Mt==null?void 0:Mt[rt]},[rt]),W=I(Ye,null,null),pe=(0,$.Z)(W,4),Bt=pe[0],Oe=pe[1],Ue=pe[2],et=pe[3],q=!!(it!==!1&&Ce&&Se),ne=_.useMemo(function(){return Object.values(Ue.maps).reduce(function(Mt,jt){return Mt+jt},0)},[Ue.id,Ue.maps]),we=q&&Re&&(Math.max(Se*Re.length,ne)>Ce||!!Q),Fe=te==="rtl",G=le()(se,(0,de.Z)({},"".concat(se,"-rtl"),Fe),Ne),St=Re||Ut,Ee=(0,_.useRef)(),Wt=(0,_.useRef)(),en=(0,_.useRef)(),an=(0,_.useState)(0),Zn=(0,$.Z)(an,2),Rn=Zn[0],Cn=Zn[1],sr=(0,_.useState)(0),dr=(0,$.Z)(sr,2),$n=dr[0],qn=dr[1],ln=(0,_.useState)(!1),$t=(0,$.Z)(ln,2),Vt=$t[0],An=$t[1],Xn=function(){An(!0)},Qe=function(){An(!1)},Je={getKey:Ye};function ve(Mt){Cn(function(jt){var un;typeof Mt=="function"?un=Mt(jt):un=Mt;var bn=zn(un);return Ee.current.scrollTop=bn,bn})}var Pe=(0,_.useRef)({start:0,end:St.length}),Ge=(0,_.useRef)(),Ze=z(St,Ye),ct=(0,$.Z)(Ze,1),Ft=ct[0];Ge.current=Ft;var Xt=_.useMemo(function(){if(!q)return{scrollHeight:void 0,start:0,end:St.length-1,offset:void 0};if(!we){var Mt;return{scrollHeight:((Mt=Wt.current)===null||Mt===void 0?void 0:Mt.offsetHeight)||0,start:0,end:St.length-1,offset:void 0}}for(var jt=0,un,bn,Mn,Jn=St.length,tn=0;tn<Jn;tn+=1){var Hn=St[tn],er=Ye(Hn),Tr=Ue.get(er),$r=jt+(Tr===void 0?Se:Tr);$r>=Rn&&un===void 0&&(un=tn,bn=jt),$r>Rn+Ce&&Mn===void 0&&(Mn=tn),jt=$r}return un===void 0&&(un=0,bn=0,Mn=Math.ceil(Ce/Se)),Mn===void 0&&(Mn=St.length-1),Mn=Math.min(Mn+1,St.length-1),{scrollHeight:jt,start:un,end:Mn,offset:bn}},[we,q,Rn,St,et,Ce]),qt=Xt.scrollHeight,Rt=Xt.start,Zt=Xt.end,mn=Xt.offset;Pe.current.start=Rt,Pe.current.end=Zt,_.useLayoutEffect(function(){var Mt=Ue.getRecord();if(Mt.size===1){var jt=Array.from(Mt.keys())[0],un=Mt.get(jt),bn=St[Rt];if(bn&&un===void 0){var Mn=Ye(bn);if(Mn===jt){var Jn=Ue.get(jt),tn=Jn-Se;ve(function(Hn){return Hn+tn})}}}Ue.resetRecord()},[qt]);var Jt=_.useState({width:0,height:Ce}),je=(0,$.Z)(Jt,2),nt=je[0],Ct=je[1],mt=function(jt){Ct({width:jt.offsetWidth,height:jt.offsetHeight})},xt=(0,_.useRef)(),It=(0,_.useRef)(),Nt=_.useMemo(function(){return yt(nt.width,Q)},[nt.width,Q]),zt=_.useMemo(function(){return yt(nt.height,qt)},[nt.height,qt]),nn=qt-Ce,cn=(0,_.useRef)(nn);cn.current=nn;function zn(Mt){var jt=Mt;return Number.isNaN(cn.current)||(jt=Math.min(jt,cn.current)),jt=Math.max(jt,0),jt}var gn=Rn<=0,dn=Rn>=nn,wn=$n<=0,En=$n>=Q,Ln=ue(gn,dn,wn,En),_n=function(){return{x:Fe?-$n:$n,y:Rn}},Tn=(0,_.useRef)(_n()),kn=(0,A.zX)(function(Mt){if(bt){var jt=(0,Y.Z)((0,Y.Z)({},_n()),Mt);(Tn.current.x!==jt.x||Tn.current.y!==jt.y)&&(bt(jt),Tn.current=jt)}});function Nn(Mt,jt){var un=Mt;jt?((0,E.flushSync)(function(){qn(un)}),kn()):ve(un)}function On(Mt){var jt=Mt.currentTarget.scrollTop;jt!==Rn&&ve(jt),ht==null||ht(Mt),kn()}var In=function(jt){var un=jt,bn=Q?Q-nt.width:0;return un=Math.max(un,0),un=Math.min(un,bn),un},Dn=(0,A.zX)(function(Mt,jt){jt?((0,E.flushSync)(function(){qn(function(un){var bn=un+(Fe?-Mt:Mt);return In(bn)})}),kn()):ve(function(un){var bn=un+Mt;return bn})}),yn=me(q,gn,dn,wn,En,!!Q,Dn),fr=(0,$.Z)(yn,2),_t=fr[0],Pn=fr[1];V(q,Ee,function(Mt,jt,un,bn){var Mn=bn;return Ln(Mt,jt,un)?!1:!Mn||!Mn._virtualHandled?(Mn&&(Mn._virtualHandled=!0),_t({preventDefault:function(){},deltaX:Mt?jt:0,deltaY:Mt?0:jt}),!0):!1}),C(we,Ee,function(Mt){ve(function(jt){return jt+Mt})}),(0,F.Z)(function(){function Mt(un){var bn=gn&&un.detail<0,Mn=dn&&un.detail>0;q&&!bn&&!Mn&&un.preventDefault()}var jt=Ee.current;return jt.addEventListener("wheel",_t,{passive:!1}),jt.addEventListener("DOMMouseScroll",Pn,{passive:!0}),jt.addEventListener("MozMousePixelScroll",Mt,{passive:!1}),function(){jt.removeEventListener("wheel",_t),jt.removeEventListener("DOMMouseScroll",Pn),jt.removeEventListener("MozMousePixelScroll",Mt)}},[q,gn,dn]),(0,F.Z)(function(){if(Q){var Mt=In($n);qn(Mt),kn({x:Mt})}},[nt.width,Q]);var jn=function(){var jt,un;(jt=xt.current)===null||jt===void 0||jt.delayHidden(),(un=It.current)===null||un===void 0||un.delayHidden()},xr=ye(Ee,St,Ue,Se,Ye,function(){return Oe(!0)},ve,jn);_.useImperativeHandle(Ae,function(){return{nativeElement:en.current,getScrollInfo:_n,scrollTo:function(jt){function un(bn){return bn&&(0,ce.Z)(bn)==="object"&&("left"in bn||"top"in bn)}un(jt)?(jt.left!==void 0&&qn(In(jt.left)),xr(jt.top)):xr(jt)}}}),(0,F.Z)(function(){if(He){var Mt=St.slice(Rt,Zt+1);He(Mt,St)}},[Rt,Zt,St]);var pr=Te(St,Ye,Ue,Se),Rr=pt==null?void 0:pt({start:Rt,end:Zt,virtual:we,offsetX:$n,offsetY:mn,rtl:Fe,getSize:pr}),Er=J(St,Rt,Zt,Q,$n,Bt,$e,Je),vn=null;Ce&&(vn=(0,Y.Z)((0,de.Z)({},fe?"height":"maxHeight",Ce),ot),q&&(vn.overflowY="hidden",Q&&(vn.overflowX="hidden"),Vt&&(vn.pointerEvents="none")));var sn={};return Fe&&(sn.dir="rtl"),_.createElement("div",(0,y.Z)({ref:en,style:(0,Y.Z)((0,Y.Z)({},_e),{},{position:"relative"}),className:G},sn,D),_.createElement(l.Z,{onResize:mt},_.createElement(st,{className:"".concat(se,"-holder"),style:vn,ref:Ee,onScroll:On,onMouseEnter:jn},_.createElement(O,{prefixCls:se,height:qt,offsetX:$n,offsetY:mn,scrollWidth:Q,onInnerResize:Oe,ref:Wt,innerProps:Et,rtl:Fe,extra:Rr},Er))),we&&qt>Ce&&_.createElement(qe,{ref:xt,prefixCls:se,scrollOffset:Rn,scrollRange:qt,rtl:Fe,onScroll:Nn,onStartMove:Xn,onStopMove:Qe,spinSize:zt,containerSize:nt.height,style:ft==null?void 0:ft.verticalScrollBar,thumbStyle:ft==null?void 0:ft.verticalScrollBarThumb,showScrollBar:x}),we&&Q>nt.width&&_.createElement(qe,{ref:It,prefixCls:se,scrollOffset:$n,scrollRange:Q,rtl:Fe,onScroll:Nn,onStartMove:Xn,onStopMove:Qe,spinSize:Nt,containerSize:nt.width,horizontal:!0,style:ft==null?void 0:ft.horizontalScrollBar,thumbStyle:ft==null?void 0:ft.horizontalScrollBarThumb,showScrollBar:x}))}var tt=_.forwardRef(kt);tt.displayName="List";var Gt=tt,Xe=Gt},83145:function(fn,ut,b){"use strict";Object.defineProperty(ut,"__esModule",{value:!0}),ut.CopyToClipboard=void 0;var y=Y(b(59301)),ce=Y(b(25769));function Y(R){return R&&R.__esModule?R:{default:R}}function de(R){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?de=function(P){return typeof P}:de=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},de(R)}function $(R,z){var P=Object.keys(R);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(R);z&&(N=N.filter(function(re){return Object.getOwnPropertyDescriptor(R,re).enumerable})),P.push.apply(P,N)}return P}function p(R){for(var z=1;z<arguments.length;z++){var P=arguments[z]!=null?arguments[z]:{};z%2?$(P,!0).forEach(function(N){J(R,N,P[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(P)):$(P).forEach(function(N){Object.defineProperty(R,N,Object.getOwnPropertyDescriptor(P,N))})}return R}function ge(R,z){if(R==null)return{};var P=le(R,z),N,re;if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(R);for(re=0;re<ue.length;re++)N=ue[re],!(z.indexOf(N)>=0)&&Object.prototype.propertyIsEnumerable.call(R,N)&&(P[N]=R[N])}return P}function le(R,z){if(R==null)return{};var P={},N=Object.keys(R),re,ue;for(ue=0;ue<N.length;ue++)re=N[ue],!(z.indexOf(re)>=0)&&(P[re]=R[re]);return P}function l(R,z){if(!(R instanceof z))throw new TypeError("Cannot call a class as a function")}function A(R,z){for(var P=0;P<z.length;P++){var N=z[P];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(R,N.key,N)}}function F(R,z,P){return z&&A(R.prototype,z),P&&A(R,P),R}function _(R,z){return z&&(de(z)==="object"||typeof z=="function")?z:w(R)}function E(R){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},E(R)}function w(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function O(R,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(z&&z.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),z&&X(R,z)}function X(R,z){return X=Object.setPrototypeOf||function(N,re){return N.__proto__=re,N},X(R,z)}function J(R,z,P){return z in R?Object.defineProperty(R,z,{value:P,enumerable:!0,configurable:!0,writable:!0}):R[z]=P,R}var U=function(R){O(z,R);function z(){var P,N;l(this,z);for(var re=arguments.length,ue=new Array(re),me=0;me<re;me++)ue[me]=arguments[me];return N=_(this,(P=E(z)).call.apply(P,[this].concat(ue))),J(w(N),"onClick",function(Te){var Be=N.props,Le=Be.text,at=Be.onCopy,ie=Be.children,K=Be.options,I=y.default.Children.only(ie),ee=(0,ce.default)(Le,K);at&&at(Le,ee),I&&I.props&&typeof I.props.onClick=="function"&&I.props.onClick(Te)}),N}return F(z,[{key:"render",value:function(){var N=this.props,re=N.text,ue=N.onCopy,me=N.options,Te=N.children,Be=ge(N,["text","onCopy","options","children"]),Le=y.default.Children.only(Te);return y.default.cloneElement(Le,p({},Be,{onClick:this.onClick}))}}]),z}(y.default.PureComponent);ut.CopyToClipboard=U,J(U,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(fn,ut,b){"use strict";var y=b(83145),ce=y.CopyToClipboard;ce.CopyToClipboard=ce,fn.exports=ce},76374:function(fn,ut,b){"use strict";var y=function(){if(typeof Map!="undefined")return Map;function ie(K,I){var ee=-1;return K.some(function(V,he){return V[0]===I?(ee=he,!0):!1}),ee}return function(){function K(){this.__entries__=[]}return Object.defineProperty(K.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),K.prototype.get=function(I){var ee=ie(this.__entries__,I),V=this.__entries__[ee];return V&&V[1]},K.prototype.set=function(I,ee){var V=ie(this.__entries__,I);~V?this.__entries__[V][1]=ee:this.__entries__.push([I,ee])},K.prototype.delete=function(I){var ee=this.__entries__,V=ie(ee,I);~V&&ee.splice(V,1)},K.prototype.has=function(I){return!!~ie(this.__entries__,I)},K.prototype.clear=function(){this.__entries__.splice(0)},K.prototype.forEach=function(I,ee){ee===void 0&&(ee=null);for(var V=0,he=this.__entries__;V<he.length;V++){var S=he[V];I.call(ee,S[1],S[0])}},K}()}(),ce=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Y=function(){return typeof b.g!="undefined"&&b.g.Math===Math?b.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),de=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Y):function(ie){return setTimeout(function(){return ie(Date.now())},1e3/60)}}(),$=2;function p(ie,K){var I=!1,ee=!1,V=0;function he(){I&&(I=!1,ie()),ee&&C()}function S(){de(he)}function C(){var Z=Date.now();if(I){if(Z-V<$)return;ee=!0}else I=!0,ee=!1,setTimeout(S,K);V=Z}return C}var ge=20,le=["top","right","bottom","left","width","height","size","weight"],l=typeof MutationObserver!="undefined",A=function(){function ie(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=p(this.refresh.bind(this),ge)}return ie.prototype.addObserver=function(K){~this.observers_.indexOf(K)||this.observers_.push(K),this.connected_||this.connect_()},ie.prototype.removeObserver=function(K){var I=this.observers_,ee=I.indexOf(K);~ee&&I.splice(ee,1),!I.length&&this.connected_&&this.disconnect_()},ie.prototype.refresh=function(){var K=this.updateObservers_();K&&this.refresh()},ie.prototype.updateObservers_=function(){var K=this.observers_.filter(function(I){return I.gatherActive(),I.hasActive()});return K.forEach(function(I){return I.broadcastActive()}),K.length>0},ie.prototype.connect_=function(){!ce||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},ie.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)},ie.prototype.onTransitionEnd_=function(K){var I=K.propertyName,ee=I===void 0?"":I,V=le.some(function(he){return!!~ee.indexOf(he)});V&&this.refresh()},ie.getInstance=function(){return this.instance_||(this.instance_=new ie),this.instance_},ie.instance_=null,ie}(),F=function(ie,K){for(var I=0,ee=Object.keys(K);I<ee.length;I++){var V=ee[I];Object.defineProperty(ie,V,{value:K[V],enumerable:!1,writable:!1,configurable:!0})}return ie},_=function(ie){var K=ie&&ie.ownerDocument&&ie.ownerDocument.defaultView;return K||Y},E=re(0,0,0,0);function w(ie){return parseFloat(ie)||0}function O(ie){for(var K=[],I=1;I<arguments.length;I++)K[I-1]=arguments[I];return K.reduce(function(ee,V){var he=ie["border-"+V+"-width"];return ee+w(he)},0)}function X(ie){for(var K=["top","right","bottom","left"],I={},ee=0,V=K;ee<V.length;ee++){var he=V[ee],S=ie["padding-"+he];I[he]=w(S)}return I}function J(ie){var K=ie.getBBox();return re(0,0,K.width,K.height)}function U(ie){var K=ie.clientWidth,I=ie.clientHeight;if(!K&&!I)return E;var ee=_(ie).getComputedStyle(ie),V=X(ee),he=V.left+V.right,S=V.top+V.bottom,C=w(ee.width),Z=w(ee.height);if(ee.boxSizing==="border-box"&&(Math.round(C+he)!==K&&(C-=O(ee,"left","right")+he),Math.round(Z+S)!==I&&(Z-=O(ee,"top","bottom")+S)),!z(ie)){var ye=Math.round(C+he)-K,Ve=Math.round(Z+S)-I;Math.abs(ye)!==1&&(C-=ye),Math.abs(Ve)!==1&&(Z-=Ve)}return re(V.left,V.top,C,Z)}var R=function(){return typeof SVGGraphicsElement!="undefined"?function(ie){return ie instanceof _(ie).SVGGraphicsElement}:function(ie){return ie instanceof _(ie).SVGElement&&typeof ie.getBBox=="function"}}();function z(ie){return ie===_(ie).document.documentElement}function P(ie){return ce?R(ie)?J(ie):U(ie):E}function N(ie){var K=ie.x,I=ie.y,ee=ie.width,V=ie.height,he=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,S=Object.create(he.prototype);return F(S,{x:K,y:I,width:ee,height:V,top:I,right:K+ee,bottom:V+I,left:K}),S}function re(ie,K,I,ee){return{x:ie,y:K,width:I,height:ee}}var ue=function(){function ie(K){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=re(0,0,0,0),this.target=K}return ie.prototype.isActive=function(){var K=P(this.target);return this.contentRect_=K,K.width!==this.broadcastWidth||K.height!==this.broadcastHeight},ie.prototype.broadcastRect=function(){var K=this.contentRect_;return this.broadcastWidth=K.width,this.broadcastHeight=K.height,K},ie}(),me=function(){function ie(K,I){var ee=N(I);F(this,{target:K,contentRect:ee})}return ie}(),Te=function(){function ie(K,I,ee){if(this.activeObservations_=[],this.observations_=new y,typeof K!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=K,this.controller_=I,this.callbackCtx_=ee}return ie.prototype.observe=function(K){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(K instanceof _(K).Element))throw new TypeError('parameter 1 is not of type "Element".');var I=this.observations_;I.has(K)||(I.set(K,new ue(K)),this.controller_.addObserver(this),this.controller_.refresh())}},ie.prototype.unobserve=function(K){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(K instanceof _(K).Element))throw new TypeError('parameter 1 is not of type "Element".');var I=this.observations_;I.has(K)&&(I.delete(K),I.size||this.controller_.removeObserver(this))}},ie.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ie.prototype.gatherActive=function(){var K=this;this.clearActive(),this.observations_.forEach(function(I){I.isActive()&&K.activeObservations_.push(I)})},ie.prototype.broadcastActive=function(){if(this.hasActive()){var K=this.callbackCtx_,I=this.activeObservations_.map(function(ee){return new me(ee.target,ee.broadcastRect())});this.callback_.call(K,I,K),this.clearActive()}},ie.prototype.clearActive=function(){this.activeObservations_.splice(0)},ie.prototype.hasActive=function(){return this.activeObservations_.length>0},ie}(),Be=typeof WeakMap!="undefined"?new WeakMap:new y,Le=function(){function ie(K){if(!(this instanceof ie))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var I=A.getInstance(),ee=new Te(K,I,this);Be.set(this,ee)}return ie}();["observe","unobserve","disconnect"].forEach(function(ie){Le.prototype[ie]=function(){var K;return(K=Be.get(this))[ie].apply(K,arguments)}});var at=function(){return typeof Y.ResizeObserver!="undefined"?Y.ResizeObserver:Le}();ut.Z=at},98040:function(fn){fn.exports=function(){var ut=document.getSelection();if(!ut.rangeCount)return function(){};for(var b=document.activeElement,y=[],ce=0;ce<ut.rangeCount;ce++)y.push(ut.getRangeAt(ce));switch(b.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":b.blur();break;default:b=null;break}return ut.removeAllRanges(),function(){ut.type==="Caret"&&ut.removeAllRanges(),ut.rangeCount||y.forEach(function(Y){ut.addRange(Y)}),b&&b.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,ut,b){"use strict";b.d(ut,{ZP:function(){return Ys}});const y=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ce=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=Y},Y=Number.MAX_SAFE_INTEGER||9007199254740991;let de=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}({}),$=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}({}),p=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 ge={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},le={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class l{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 A{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 l(e),this.fast_=new l(t),this.defaultTTFB_=r,this.ttfb_=new l(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new l(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new l(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new l(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 F(a,e,t){return(e=X(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _(){return _=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},_.apply(null,arguments)}function E(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 w(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?E(Object(t),!0).forEach(function(n){F(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function O(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 X(a){var e=O(a,"string");return typeof e=="symbol"?e:e+""}class J{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=U,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 U=function(){},R={trace:U,debug:U,log:U,warn:U,info:U,error:U};function z(){return _({},R)}function P(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):U}function N(a,e,t){return e[a]?e[a].bind(e):P(a,t)}const re=z();function ue(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]=N(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=>{re[i]=N(i,a)})}else _(re,n);return n}const me=re;function Te(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Be(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function Le(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 at(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const m=c.indexOf("\0");return m!==-1?c.substring(0,m):c}return c.replace(/\0/g,"")}const t=a.length;let n,r,i,s="",o=0;for(;o<t;){if(n=a[o++],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[o++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[o++],i=a[o++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}function ie(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 K(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}function I(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var ee={exports:{}},V;function he(){return V||(V=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(d,c,m){if(m=m||{},d=d.trim(),c=c.trim(),!c){if(!m.alwaysNormalize)return d;var g=o.parseURL(d);if(!g)throw new Error("Error trying to parse base URL.");return g.path=o.normalizePath(g.path),o.buildURLFromParts(g)}var T=o.parseURL(c);if(!T)throw new Error("Error trying to parse relative URL.");if(T.scheme)return m.alwaysNormalize?(T.path=o.normalizePath(T.path),o.buildURLFromParts(T)):c;var k=o.parseURL(d);if(!k)throw new Error("Error trying to parse base URL.");if(!k.netLoc&&k.path&&k.path[0]!=="/"){var B=r.exec(k.path);k.netLoc=B[1],k.path=B[2]}k.netLoc&&!k.path&&(k.path="/");var oe={scheme:k.scheme,netLoc:T.netLoc,path:null,params:T.params,query:T.query,fragment:T.fragment};if(!T.netLoc&&(oe.netLoc=k.netLoc,T.path[0]!=="/"))if(!T.path)oe.path=k.path,T.params||(oe.params=k.params,T.query||(oe.query=k.query));else{var ae=k.path,De=ae.substring(0,ae.lastIndexOf("/")+1)+T.path;oe.path=o.normalizePath(De)}return oe.path===null&&(oe.path=m.alwaysNormalize?o.normalizePath(T.path):T.path),o.buildURLFromParts(oe)},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=o})()}(ee)),ee.exports}var S=he();class C{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 Z={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ye{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,Dt(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={[Z.AUDIO]:null,[Z.VIDEO]:null,[Z.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 C),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=S.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Z.AUDIO]=null,e[Z.VIDEO]=null,e[Z.AUDIOVIDEO]=null}}function Ve(a){return a.sn!=="initSegment"}class qe extends ye{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange.length){const e=this.byteRange[0],t=this.byteRange[1];if(y(e)&&y(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){var e;const{levelkeys:t}=this;if(!t||t.NONE)return null;if(t.identity)this._decryptdata||(this._decryptdata=t.identity.getDecryptData(this.sn));else if(!((e=this._decryptdata)!=null&&e.keyId)){const 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=y(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){var t;const 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(!y(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return Ve(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:o}=this,d=o[e];if(!d){o[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 gt extends ye{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 yt(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||yt(t,e)}}function Dt(a,e){const t=yt(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const Ut=Math.pow(2,32)-1,ot=[].push,kt={video:1,audio:2,id3:3,text:4};function tt(a){return String.fromCharCode.apply(null,a)}function Gt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Xe(a,e){const t=Ae(a,e);return t<0?4294967296+t:t}function Ke(a,e){let t=Xe(a,e);return t*=Math.pow(2,32),t+=Xe(a,e+4),t}function Ae(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function xe(a){const e=a.byteLength;for(let t=0;t<e;){const n=Xe(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 se(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Xe(a,r),s=tt(a.subarray(r+4,r+8)),o=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,o));else{const d=se(a.subarray(r+8,o),e.slice(1));d.length&&ot.apply(t,d)}r=o}return t}function Ne(a){const e=[],t=a[0];let n=8;const r=Xe(a,n);n+=4;let i=0,s=0;t===0?(i=Xe(a,n),s=Xe(a,n+4),n+=8):(i=Ke(a,n),s=Ke(a,n+8),n+=16),n+=2;let o=a.length+s;const d=Gt(a,n);n+=2;for(let c=0;c<d;c++){let m=n;const g=Xe(a,m);m+=4;const T=g&2147483647;if((g&2147483648)>>>31===1)return me.warn("SIDX has hierarchical references (not supported)"),null;const B=Xe(a,m);m+=4,e.push({referenceSize:T,subsegmentDuration:B,info:{duration:B/r,start:o,end:o+T-1}}),o+=T,m+=4,n=m}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:d,references:e}}function Ce(a){const e=[],t=se(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=se(i,["tkhd"])[0];if(s){let o=s[0];const d=Xe(s,o===0?12:20),c=se(i,["mdia","mdhd"])[0];if(c){o=c[0];const m=Xe(c,o===0?12:20),g=se(i,["mdia","hdlr"])[0];if(g){const T=tt(g.subarray(8,12)),k={soun:Z.AUDIO,vide:Z.VIDEO}[T],B=se(i,["mdia","minf","stbl","stsd"])[0],oe=Se(B);k?(e[d]={timescale:m,type:k,stsd:oe},e[k]=w({timescale:m,id:d},oe)):e[d]={timescale:m,type:T,stsd:oe}}}}}return se(a,["moov","mvex","trex"]).forEach(r=>{const i=Xe(r,4),s=e[i];s&&(s.default={duration:Xe(r,12),flags:Xe(r,20)})}),e}function Se(a){const e=a.subarray(8),t=e.subarray(86),n=tt(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const c=se(e,[n])[0].subarray(n==="enca"?28:78);se(c,["sinf"]).forEach(g=>{const T=se(g,["schm"])[0];if(T){const k=tt(T.subarray(4,8));if(k==="cbcs"||k==="cenc"){const B=se(g,["frma"])[0];B&&(r=tt(B))}}})}const o=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const d=se(t,["avcC"])[0];d&&d.length>3&&(r+="."+Re(d[1])+Re(d[2])+Re(d[3]),i=M(o==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const d=se(e,[n])[0],c=se(d.subarray(28),["esds"])[0];if(c&&c.length>7){let m=4;if(c[m++]!==3)break;m=_e(c,m),m+=2;const g=c[m++];if(g&128&&(m+=2),g&64&&(m+=c[m++]),c[m++]!==4)break;m=_e(c,m);const T=c[m++];if(T===64)r+="."+Re(T);else break;if(m+=12,c[m++]!==5)break;m=_e(c,m);const k=c[m++];let B=(k&248)>>3;B===31&&(B+=1+((k&7)<<3)+((c[m]&224)>>5)),r+="."+B}break}case"hvc1":case"hev1":{const d=se(t,["hvcC"])[0];if(d&&d.length>12){const c=d[1],m=["","A","B","C"][c>>6],g=c&31,T=Xe(d,2),k=(c&32)>>5?"H":"L",B=d[12],oe=d.subarray(6,12);r+="."+m+g,r+="."+fe(T).toString(16).toUpperCase(),r+="."+k+B;let ae="";for(let De=oe.length;De--;){const Me=oe[De];(Me||ae)&&(ae="."+Me.toString(16).toUpperCase()+ae)}r+=ae}i=M(o=="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=se(t,["vpcC"])[0];if(d&&d.length>6){const c=d[4],m=d[5],g=d[6]>>4&15;r+="."+$e(c)+"."+$e(m)+"."+$e(g)}break}case"av01":{const d=se(t,["av1C"])[0];if(d&&d.length>2){const c=d[1]>>>5,m=d[1]&31,g=d[2]>>>7?"H":"M",T=(d[2]&64)>>6,k=(d[2]&32)>>5,B=c===2&&T?k?12:10:T?10:8,oe=(d[2]&16)>>4,ae=(d[2]&8)>>3,De=(d[2]&4)>>2,Me=d[2]&3;r+="."+c+"."+$e(m)+g+"."+$e(B)+"."+oe+"."+ae+De+Me+"."+$e(1)+"."+$e(1)+"."+$e(1)+"."+0,i=M("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function M(a,e){const t=se(e,["dvvC"]),n=t.length?t[0]:se(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+$e(r)+"."+$e(i)}}function fe(a){let e=0;for(let t=0;t<32;t++)e|=(a>>t&1)<<31-t;return e>>>0}function _e(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function Re(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function $e(a){return(a<10?"0":"")+a}function rt(a,e){if(!a||!e)return;const t=e.keyId;t&&e.isCommonEncryption&&te(a,(n,r)=>{const i=n.subarray(8,24);i.some(s=>s!==0)||(me.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${ie(i)} -> ${ie(t)}`),n.set(t,8))})}function it(a){const e=[];return te(a,t=>e.push(t.subarray(8,24))),e}function te(a,e){se(a,["moov","trak"]).forEach(n=>{const r=se(n,["mdia","minf","stbl","stsd"])[0];if(!r)return;const i=r.subarray(8);let s=se(i,["enca"]);const o=s.length>0;o||(s=se(i,["encv"])),s.forEach(d=>{const c=o?d.subarray(28):d.subarray(78);se(c,["sinf"]).forEach(g=>{const T=Q(g);T&&e(T,o)})})})}function Q(a){const e=se(a,["schm"])[0];if(e){const t=tt(e.subarray(4,8));if(t==="cbcs"||t==="cenc"){const n=se(a,["schi","tenc"])[0];if(n)return n}}}function lt(a,e,t){const n={},r=se(a,["moof","traf"]);for(let i=0;i<r.length;i++){const s=r[i],o=se(s,["tfhd"])[0],d=Xe(o,4),c=e[d];if(!c)continue;n[d]||(n[d]={start:NaN,duration:0,sampleCount:0,timescale:c.timescale,type:c.type});const m=n[d],g=se(s,["tfdt"])[0];if(g){const ze=g[0];let dt=Xe(g,4);ze===1&&(dt===Ut?t.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"):(dt*=Ut+1,dt+=Xe(g,8))),y(dt)&&(!y(m.start)||dt<m.start)&&(m.start=dt)}const T=c.default,k=Xe(o,0)|(T==null?void 0:T.flags);let B=(T==null?void 0:T.duration)||0;k&8&&(k&2?B=Xe(o,12):B=Xe(o,8));const oe=se(s,["trun"]);let ae=m.start||0,De=0,Me=B;for(let ze=0;ze<oe.length;ze++){const dt=oe[ze],Tt=Xe(dt,4),Yt=m.sampleCount;m.sampleCount+=Tt;const At=dt[3]&1,Kt=dt[3]&4,Ht=dt[2]&1,Lt=dt[2]&2,hn=dt[2]&4,Wn=dt[2]&8;let rr=8,yr=Tt;for(At&&(rr+=4),Kt&&Tt&&(!(dt[rr+1]&1)&&m.keyFrameIndex===void 0&&(m.keyFrameIndex=Yt),rr+=4,Ht?(Me=Xe(dt,rr),rr+=4):Me=B,Lt&&(rr+=4),Wn&&(rr+=4),ae+=Me,De+=Me,yr--);yr--;)Ht?(Me=Xe(dt,rr),rr+=4):Me=B,Lt&&(rr+=4),hn&&(dt[rr+1]&1||m.keyFrameIndex===void 0&&(m.keyFrameIndex=m.sampleCount-(yr+1),m.keyFrameStart=ae),rr+=4),Wn&&(rr+=4),ae+=Me,De+=Me;!De&&B&&(De+=B*Tt)}m.duration+=De}if(!Object.keys(n).some(i=>n[i].duration)){let i=1/0,s=0;const o=se(a,["sidx"]);for(let d=0;d<o.length;d++){const c=Ne(o[d]);if(c!=null&&c.references){i=Math.min(i,c.earliestPresentationTime/c.timescale);const m=c.references.reduce((g,T)=>g+T.info.duration||0,0);s=Math.max(s,m+c.earliestPresentationTime/c.timescale)}}s&&y(s)&&Object.keys(n).forEach(d=>{n[d].duration||(n[d].duration=s*n[d].timescale-n[d].start)})}return n}function st(a){const e={valid:null,remainder:null},t=se(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 ht(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function bt(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return se(n,["moof"]).map(d=>{const c=d.byteOffset-8;se(d,["traf"]).map(g=>{const T=se(g,["tfdt"]).map(k=>{const B=k[0];let oe=Xe(k,4);return B===1&&(oe*=Math.pow(2,32),oe+=Xe(k,8)),oe/r})[0];return T!==void 0&&(a=T),se(g,["tfhd"]).map(k=>{const B=Xe(k,4),oe=Xe(k,0)&16777215,ae=(oe&1)!==0,De=(oe&2)!==0,Me=(oe&8)!==0;let ze=0;const dt=(oe&16)!==0;let Tt=0;const Yt=(oe&32)!==0;let At=8;B===i&&(ae&&(At+=8),De&&(At+=4),Me&&(ze=Xe(k,At),At+=4),dt&&(Tt=Xe(k,At),At+=4),Yt&&(At+=4),e.type==="video"&&(s=He(e.codec)),se(g,["trun"]).map(Kt=>{const Ht=Kt[0],Lt=Xe(Kt,0)&16777215,hn=(Lt&1)!==0;let Wn=0;const rr=(Lt&4)!==0,yr=(Lt&256)!==0;let ir=0;const Fn=(Lt&512)!==0;let lr=0;const Qn=(Lt&1024)!==0,hr=(Lt&2048)!==0;let Dr=0;const Kn=Xe(Kt,4);let Gn=8;hn&&(Wn=Xe(Kt,Gn),Gn+=4),rr&&(Gn+=4);let Nr=Wn+c;for(let ii=0;ii<Kn;ii++){if(yr?(ir=Xe(Kt,Gn),Gn+=4):ir=ze,Fn?(lr=Xe(Kt,Gn),Gn+=4):lr=Tt,Qn&&(Gn+=4),hr&&(Ht===0?Dr=Xe(Kt,Gn):Dr=Ae(Kt,Gn),Gn+=4),e.type===Z.VIDEO){let Ur=0;for(;Ur<lr;){const Gr=Xe(n,Nr);if(Nr+=4,Et(s,n[Nr])){const Hi=n.subarray(Nr,Nr+Gr);pt(Hi,s?2:1,a+Dr/r,t)}Nr+=Gr,Ur+=Gr+4}}a+=ir/r}}))})})}),t}function He(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Et(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function pt(a,e,t,n){const r=ft(a);let i=0;i+=e;let s=0,o=0,d=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;d=r[i++],s+=d}while(d===255);o=0;do{if(i>=r.length)break;d=r[i++],o+=d}while(d===255);const c=r.length-i;let m=i;if(o<c)i+=o;else if(o>c){me.error(`Malformed SEI payload. ${o} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(r[m++]===181){const T=Gt(r,m);if(m+=2,T===49){const k=Xe(r,m);if(m+=4,k===1195456820){const B=r[m++];if(B===3){const oe=r[m++],ae=31&oe,De=64&oe,Me=De?2+ae*3:0,ze=new Uint8Array(Me);if(De){ze[0]=oe;for(let dt=1;dt<Me;dt++)ze[dt]=r[m++]}n.push({type:B,payloadType:s,pts:t,bytes:ze})}}}}}else if(s===5&&o>16){const g=[];for(let B=0;B<16;B++){const oe=r[m++].toString(16);g.push(oe.length==1?"0"+oe:oe),(B===3||B===5||B===7||B===9)&&g.push("-")}const T=o-16,k=new Uint8Array(T);for(let B=0;B<T;B++)k[B]=r[m++];n.push({payloadType:s,pts:t,uuid:g.join(""),userData:at(k),userDataBytes:k})}}}function ft(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 Pt(a){const e=a[0];let t="",n="",r=0,i=0,s=0,o=0,d=0,c=0;if(e===0){for(;tt(a.subarray(c,c+1))!=="\0";)t+=tt(a.subarray(c,c+1)),c+=1;for(t+=tt(a.subarray(c,c+1)),c+=1;tt(a.subarray(c,c+1))!=="\0";)n+=tt(a.subarray(c,c+1)),c+=1;n+=tt(a.subarray(c,c+1)),c+=1,r=Xe(a,12),i=Xe(a,16),o=Xe(a,20),d=Xe(a,24),c=28}else if(e===1){c+=4,r=Xe(a,c),c+=4;const g=Xe(a,c);c+=4;const T=Xe(a,c);for(c+=4,s=bu(2,32)*g+T,ce(s)||(s=Number.MAX_SAFE_INTEGER,me.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=Xe(a,c),c+=4,d=Xe(a,c),c+=4;tt(a.subarray(c,c+1))!=="\0";)t+=tt(a.subarray(c,c+1)),c+=1;for(t+=tt(a.subarray(c,c+1)),c+=1;tt(a.subarray(c,c+1))!=="\0";)n+=tt(a.subarray(c,c+1)),c+=1;n+=tt(a.subarray(c,c+1)),c+=1}const m=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:o,id:d,payload:m}}function x(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function D(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),x([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t)}function Ye(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=W(r);e.push(i),n+=i.size}}return e}function W(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,o=ie(new Uint8Array(s,t+12,16));let d=null,c=null,m=0;if(i===0)m=28;else{const T=a.getUint32(28);if(!T||n<32+T*16)return{offset:t,size:e};d=[];for(let k=0;k<T;k++)d.push(new Uint8Array(s,t+32+k*16,16));m=32+T*16}if(!m)return{offset:t,size:e};const g=a.getUint32(m);return e-32<g?{offset:t,size:e}:(c=new Uint8Array(s,t+m+4,g),{version:i,systemId:o,kids:d,data:c,offset:t,size:e})}const pe=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Bt={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 Oe(a,e){const t=Bt[e];return!!t&&!!t[a.slice(0,4)]}function Ue(a,e,t=!0){return!a.split(",").some(n=>!et(n,e,t))}function et(a,e,t=!0){var n;const r=Te(t);return(n=r==null?void 0:r.isTypeSupported(q(a,e)))!=null?n:!1}function q(a,e){return`${e}/mp4;codecs=${a}`}function ne(a){if(a){const e=a.substring(0,4);return Bt.video[e]}return 2}function we(a){const e=pe();return a.split(",").reduce((t,n)=>{const i=e&&He(n)?9:Bt.video[n];return i?(i*2+t)/(t?3:2):(Bt.audio[n]+t)/(t?2:1)},0)}const Fe={};function G(a,e=!0){if(Fe[a])return Fe[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(et(t[r],"audio",e))return Fe[a]=t[r],t[r];if(t[r]==="mp3"&&(n=Te(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const St=/flac|opus|mp4a\.40\.34/i;function Ee(a,e=!0){return a.replace(St,t=>G(t.toLowerCase(),e))}function Wt(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Oe(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function en(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1)&&(an(a,"audio")||an(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 an(a,e){return Oe(a,e)&&et(a,e)}function Zn(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");n.length>2&&n[0]==="avc1"&&(e[t]=`avc1.${parseInt(n[1]).toString(16)}${("000"+parseInt(n[2]).toString(16)).slice(-4)}`)}return e.join(",")}function Rn(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function Cn(a){const e=Te(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 sr(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const dr={supported:!0,powerEfficient:!0,smooth:!0},$n={supported:!1,smooth:!1,powerEfficient:!1},qn={supported:!0,configurations:[],decodingInfoResults:[dr]};function ln(a,e){return{supported:!1,configurations:e,decodingInfoResults:[$n],error:a}}function $t(a,e,t,n,r,i){const s=a.videoCodec,o=a.audioCodec?a.audioGroups:null,d=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,m=c?parseInt(c):d?1/0:2;let g=null;if(o!=null&&o.length)try{o.length===1&&o[0]?g=e.groups[o[0]].channels:g=o.reduce((T,k)=>{if(k){const B=e.groups[k];if(!B)throw new Error(`Audio track group ${k} not found`);Object.keys(B.channels).forEach(oe=>{T[oe]=(T[oe]||0)+B.channels[oe]})}return T},{2:0})}catch(T){return!0}return s!==void 0&&(s.split(",").some(T=>He(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))||!!g&&y(m)&&Object.keys(g).some(T=>parseInt(T)>m)}function Vt(a,e,t,n={}){const r=a.videoCodec;if(!r&&!a.audioCodec||!t)return Promise.resolve(qn);const i=[],s=An(a),o=s.length,d=Xn(a,e,o>0),c=d.length;for(let m=o||1*c||1;m--;){const g={type:"media-source"};if(o&&(g.video=s[m%o]),c){g.audio=d[m%c];const T=g.audio.bitrate;g.video&&T&&(g.video.bitrate-=T)}i.push(g)}if(r){const m=navigator.userAgent;if(r.split(",").some(g=>He(g))&&pe())return Promise.resolve(ln(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent string: (${m})`),i))}return Promise.all(i.map(m=>{const g=ve(m);return n[g]||(n[g]=t.decodingInfo(m))})).then(m=>({supported:!m.some(g=>!g.supported),configurations:i,decodingInfoResults:m})).catch(m=>({supported:!1,configurations:i,decodingInfoResults:[],error:m}))}function An(a){var e;const t=(e=a.videoCodec)==null?void 0:e.split(","),n=Je(a),r=a.width||640,i=a.height||480,s=a.frameRate||30,o=a.videoRange.toLowerCase();return t?t.map(d=>{const c={contentType:q(Rn(d),"video"),width:r,height:i,bitrate:n,framerate:s};return o!=="sdr"&&(c.transferFunction=o),c}):[]}function Xn(a,e,t){var n;const r=(n=a.audioCodec)==null?void 0:n.split(","),i=Je(a);return r&&a.audioGroups?a.audioGroups.reduce((s,o)=>{var d;const c=o?(d=e.groups[o])==null?void 0:d.tracks:null;return c?c.reduce((m,g)=>{if(g.groupId===o){const T=parseFloat(g.channels||"");r.forEach(k=>{const B={contentType:q(k,"audio"),bitrate:t?Qe(k,i):i};T&&(B.channels=""+T),m.push(B)})}return m},s):s},[]):[]}function Qe(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 Je(a){return Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)/1e3)*1e3||1}function ve(a){let e="";const{audio:t,video:n}=a;if(n){const r=sr(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=sr(t.contentType);e+=`${n?"_":""}${r}_c${t.channels}`}return e}const Pe=["NONE","TYPE-0","TYPE-1",null];function Ge(a){return Pe.indexOf(a)>-1}const Ze=["SDR","PQ","HLG"];function ct(a){return!!a&&Ze.indexOf(a)>-1}var Ft={No:"",Yes:"YES",v2:"v2"};function Xt(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?Ft.v2:Ft.Yes:Ft.No}class qt{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 Rt{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 Zt(this._audioGroups,e)}hasSubtitleGroup(e){return Zt(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 Zt(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function mn(){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 Jt(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||Ze.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&mn(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const je=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}},nt=(a,e)=>JSON.stringify(a,je(e));function Ct(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,o=n==null?void 0:n.audioCodec,d=r==null?void 0:r.videoCodec,c=s&&parseInt(s)===2;let m=!1,g=!1,T=1/0,k=1/0,B=1/0,oe=1/0,ae=0,De=[];const{preferHDR:Me,allowedVideoRanges:ze}=Jt(e,r);for(let Kt=i.length;Kt--;){const Ht=a[i[Kt]];m||(m=Ht.channels[2]>0),T=Math.min(T,Ht.minHeight),k=Math.min(k,Ht.minFramerate),B=Math.min(B,Ht.minBitrate),ze.filter(hn=>Ht.videoRanges[hn]>0).length>0&&(g=!0)}T=y(T)?T:0,k=y(k)?k:0;const dt=Math.max(1080,T),Tt=Math.max(30,k);B=y(B)?B:t,t=Math.max(B,t),g||(e=void 0);const Yt=i.length>1;return{codecSet:i.reduce((Kt,Ht)=>{const Lt=a[Ht];if(Ht===Kt)return Kt;if(De=g?ze.filter(hn=>Lt.videoRanges[hn]>0):[],Yt){if(Lt.minBitrate>t)return mt(Ht,`min bitrate of ${Lt.minBitrate} > current estimate of ${t}`),Kt;if(!Lt.hasDefaultAudio)return mt(Ht,"no renditions with default or auto-select sound found"),Kt;if(o&&Ht.indexOf(o.substring(0,4))%5!==0)return mt(Ht,`audio codec preference "${o}" not found`),Kt;if(s&&!c){if(!Lt.channels[s])return mt(Ht,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Lt.channels)})`),Kt}else if((!o||c)&&m&&Lt.channels[2]===0)return mt(Ht,"no renditions with stereo sound found"),Kt;if(Lt.minHeight>dt)return mt(Ht,`min resolution of ${Lt.minHeight} > maximum of ${dt}`),Kt;if(Lt.minFramerate>Tt)return mt(Ht,`min framerate of ${Lt.minFramerate} > maximum of ${Tt}`),Kt;if(!De.some(hn=>Lt.videoRanges[hn]>0))return mt(Ht,`no variants with VIDEO-RANGE of ${nt(De)} found`),Kt;if(d&&Ht.indexOf(d.substring(0,4))%5!==0)return mt(Ht,`video codec preference "${d}" not found`),Kt;if(Lt.maxScore<ae)return mt(Ht,`max score of ${Lt.maxScore} < selected max of ${ae}`),Kt}return Kt&&(we(Ht)>=we(Kt)||Lt.fragmentError>a[Kt].fragmentError)?Kt:(oe=Lt.minIndex,ae=Lt.maxScore,Ht)},void 0),videoRanges:De,preferHDR:Me,minFramerate:k,minBitrate:B,minIndex:oe}}function mt(a,e){me.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function xt(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 It(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const o=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:!o,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,o&&o.forEach(m=>{if(!m)return;const g=e.groups[m];g&&(d.hasDefaultAudio=d.hasDefaultAudio||e.hasDefaultAudio?g.hasDefault:g.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(g.channels).forEach(T=>{d.channels[T]=(d.channels[T]||0)+g.channels[T]}))}),r},{})}function Nt(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 zt(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(nn(a,r,t))return n}return-1}function nn(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:o}=a,d=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||cn(i,e.lang))&&(i===void 0||e.assocLang===s)&&(o===void 0||e.default===o)&&(d===void 0||e.forced===d)&&(!("characteristics"in a)||zn(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function cn(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function zn(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function gn(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 dn(a,e,t,n,r){const i=e[n],o=e.reduce((T,k,B)=>{const oe=k.uri;return(T[oe]||(T[oe]=[])).push(B),T},{})[i.uri];o.length>1&&(n=Math.max.apply(Math,o));const d=i.videoRange,c=i.frameRate,m=i.codecSet.substring(0,4),g=wn(e,n,T=>{if(T.videoRange!==d||T.frameRate!==c||T.codecSet.substring(0,4)!==m)return!1;const k=T.audioGroups,B=t.filter(oe=>!k||k.indexOf(oe.groupId)!==-1);return zt(a,B,r)>-1});return g>-1?g:wn(e,n,T=>{const k=T.audioGroups,B=t.filter(oe=>!k||k.indexOf(oe.groupId)!==-1);return zt(a,B,r)>-1})}function wn(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 En(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Ln extends J{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.supportedCache={},this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:o,media:d}=s;if(!r||!d)return;const c=performance.now(),m=i?i.stats:r.stats,g=i?i.duration:r.duration,T=c-m.loading.start,k=s.minAutoLevel,B=r.level,oe=this._nextAutoLevel;if(m.aborted||m.loaded&&m.loaded===m.total||B<=k){this.clearTimer(),this._nextAutoLevel=-1;return}if(!o)return;const ae=oe>-1&&oe!==B,De=!!t||ae;if(!De&&(d.paused||!d.playbackRate||!d.readyState))return;const Me=s.mainForwardBufferInfo;if(!De&&Me===null)return;const ze=this.bwEstimator.getEstimateTTFB(),dt=Math.abs(d.playbackRate);if(T<=Math.max(ze,1e3*(g/(dt*2))))return;const Tt=Me?Me.len/dt:0,Yt=m.loading.first?m.loading.first-m.loading.start:-1,At=m.loaded&&Yt>-1,Kt=this.getBwEstimate(),Ht=s.levels,Lt=Ht[B],hn=Math.max(m.loaded,Math.round(g*(r.bitrate||Lt.averageBitrate)/8));let Wn=At?T-Yt:T;Wn<1&&At&&(Wn=Math.min(T,m.loaded*8/Kt));const rr=At?m.loaded*1e3/Wn:0,yr=ze/1e3,ir=rr?(hn-m.loaded)/rr:hn*8/Kt+yr;if(ir<=Tt)return;const Fn=rr?rr*8:Kt,lr=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,Qn=this.hls.config.abrBandWidthUpFactor;let hr=Number.POSITIVE_INFINITY,Dr;for(Dr=B-1;Dr>k;Dr--){const ii=Ht[Dr].maxBitrate,Ur=!Ht[Dr].details||lr;if(hr=this.getTimeToLoadFrag(yr,Fn,g*ii,Ur),hr<Math.min(Tt,g+yr))break}if(hr>=ir||hr>g*10)return;At?this.bwEstimator.sample(T-Math.min(ze,Yt),m.loaded):this.bwEstimator.sampleTTFB(T);const Kn=Ht[Dr].maxBitrate;this.getBwEstimate()*Qn>Kn&&this.resetEstimator(Kn);const Gn=this.findBestLevel(Kn,k,Dr,0,Tt,1,1);Gn>-1&&(Dr=Gn),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${B} is loading too slowly;
|
|
|
Fragment duration: ${r.duration.toFixed(3)}
|
|
|
Time to underbuffer: ${Tt.toFixed(3)} s
|
|
|
Estimated load time for current fragment: ${ir.toFixed(3)} s
|
|
|
Estimated load time for down switch fragment: ${hr.toFixed(3)} s
|
|
|
TTFB estimate: ${Yt|0} ms
|
|
|
Current BW estimate: ${y(Kt)?Kt|0:"Unknown"} bps
|
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
|
Switching to level ${Dr} @ ${Kn|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Dr,this.clearTimer();const Nr=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===Dr&&Dr>0){const ii=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Dr>0?"and switching down":""}
|
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
|
Time to underbuffer: ${ii.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,Dr>k){let Ur=this.findBestLevel(this.hls.levels[k].bitrate,k,Dr,0,ii,1,1);Ur===-1&&(Ur=k),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Ur,this.resetEstimator(this.hls.levels[Ur].bitrate)}}};ae||ir>hr*2?Nr():this.timer=self.setInterval(Nr,hr*1e3),s.trigger(p.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:m})},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 A(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.FRAG_LOADING,this.onFragLoading,this),e.on(p.FRAG_LOADED,this.onFragLoaded,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this),e.on(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.FRAG_LOADING,this.onFragLoading,this),e.off(p.FRAG_LOADED,this.onFragLoaded,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this),e.off(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(p.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 $.BUFFER_ADD_CODEC_ERROR:case $.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case $.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(),o=i?i.stats:n.stats,d=s-o.loading.start,c=o.loading.first?o.loading.first-o.loading.start:-1;if(o.loaded&&c>-1){const g=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(d-Math.min(g,c),o.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;y(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===le.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],o=(s.loaded?s.loaded.bytes:0)+r.loaded,d=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:o,duration:d},s.realBitrate=Math.round(8*o/d)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(p.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!==le.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,o=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,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,o=t?t.duration:e?e.duration:0,d=this.getBwEstimate(),c=this.getStarvationDelay();let m=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(c){const ae=this.findBestLevel(d,s,r,c,0,m,g);if(ae>=0)return this.rebufferNotice=-1,ae}let T=o?Math.min(o,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const ae=this.bitrateTestDelay;ae&&(T=(o?Math.min(o,i.maxLoadingDelay):i.maxLoadingDelay)-ae,this.info(`bitrate test took ${Math.round(1e3*ae)}ms, set first fragment max fetchDuration to ${Math.round(1e3*T)} ms`),m=g=1)}const k=this.findBestLevel(d,s,r,c,T,m,g);if(this.rebufferNotice!==k&&(this.rebufferNotice=k,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${k}`)),k>-1)return k;const B=n.levels[s],oe=n.loadLevelObj;return oe&&(B==null?void 0:B.bitrate)<oe.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,o){var d;const c=r+i,m=this.lastLoadedFragLevel,g=m===-1?this.hls.firstLevel:m,{fragCurrent:T,partCurrent:k}=this,{levels:B,allAudioTracks:oe,loadLevel:ae,config:De}=this.hls;if(B.length===1)return 0;const Me=B[g],ze=!!((d=this.hls.latestLevelDetails)!=null&&d.live),dt=ae===-1||m===-1;let Tt,Yt="SDR",At=(Me==null?void 0:Me.frameRate)||0;const{audioPreference:Kt,videoPreference:Ht}=De,Lt=this.audioTracksByGroup||(this.audioTracksByGroup=xt(oe));let hn=-1;if(dt){if(this.firstSelection!==-1)return this.firstSelection;const Fn=this.codecTiers||(this.codecTiers=It(B,Lt,t,n)),lr=Ct(Fn,Yt,e,Kt,Ht),{codecSet:Qn,videoRanges:hr,minFramerate:Dr,minBitrate:Kn,minIndex:Gn,preferHDR:Nr}=lr;hn=Gn,Tt=Qn,Yt=Nr?hr[hr.length-1]:hr[0],At=Dr,e=Math.max(e,Kn),this.log(`picked start tier ${nt(lr)}`)}else Tt=Me==null?void 0:Me.codecSet,Yt=Me==null?void 0:Me.videoRange;const Wn=k?k.duration:T?T.duration:0,rr=this.bwEstimator.getEstimateTTFB()/1e3,yr=[];for(let Fn=n;Fn>=t;Fn--){var ir;const lr=B[Fn],Qn=Fn>g;if(!lr)continue;if(De.useMediaCapabilities&&!lr.supportedResult&&!lr.supportedPromise){const Ur=navigator.mediaCapabilities;typeof(Ur==null?void 0:Ur.decodingInfo)=="function"&&$t(lr,Lt,Yt,At,e,Kt)?(lr.supportedPromise=Vt(lr,Lt,Ur,this.supportedCache),lr.supportedPromise.then(Gr=>{if(!this.hls)return;lr.supportedResult=Gr;const Hi=this.hls.levels,Ui=Hi.indexOf(lr);Gr.error?this.warn(`MediaCapabilities decodingInfo error: "${Gr.error}" for level ${Ui} ${nt(Gr)}`):Gr.supported?Gr.decodingInfoResults.some(ls=>ls.smooth===!1||ls.powerEfficient===!1)&&this.log(`MediaCapabilities decodingInfo for level ${Ui} not smooth or powerEfficient: ${nt(Gr)}`):(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Ui} ${nt(Gr)}`),Ui>-1&&Hi.length>1&&(this.log(`Removing unsupported level ${Ui}`),this.hls.removeLevel(Ui),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))}).catch(Gr=>{this.warn(`Error handling MediaCapabilities decodingInfo: ${Gr}`)})):lr.supportedResult=qn}if((Tt&&lr.codecSet!==Tt||Yt&&lr.videoRange!==Yt||Qn&&At>lr.frameRate||!Qn&&At>0&&At<lr.frameRate||(ir=lr.supportedResult)!=null&&(ir=ir.decodingInfoResults)!=null&&ir.some(Ur=>Ur.smooth===!1))&&(!dt||Fn!==hn)){yr.push(Fn);continue}const hr=lr.details,Dr=(k?hr==null?void 0:hr.partTarget:hr==null?void 0:hr.averagetargetduration)||Wn;let Kn;Qn?Kn=o*e:Kn=s*e;const Gn=Wn&&r>=Wn*2&&i===0?lr.averageBitrate:lr.maxBitrate,Nr=this.getTimeToLoadFrag(rr,Kn,Gn*Dr,hr===void 0);if(Kn>=Gn&&(Fn===m||lr.loadError===0&&lr.fragmentError===0)&&(Nr<=rr||!y(Nr)||ze&&!this.bitrateTestDelay||Nr<c)){const Ur=this.forcedAutoLevel;return Fn!==ae&&(Ur===-1||Ur!==ae)&&(yr.length&&this.trace(`Skipped level(s) ${yr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${B[yr[0]].codecs}" ${B[yr[0]].videoRange}; not compatible with "${Tt}" ${Yt}`),this.info(`switch candidate:${g}->${Fn} adjustedbw(${Math.round(Kn)})-bitrate=${Math.round(Kn-Gn)} ttfb:${rr.toFixed(1)} avgDuration:${Dr.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${Nr.toFixed(1)} firstSelection:${dt} codecSet:${lr.codecSet} videoRange:${lr.videoRange} hls.loadLevel:${ae}`)),dt&&(this.firstSelection=Fn),Fn}}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 _n={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 Tn(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!y(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(In(e,t,s))return s}return null}function kn(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const o=a.endDTS-t;o>0&&o<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&On(t,n,i)===0||Nn(i,a,Math.min(r,n))))return i;const s=_n.search(e,On.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 On(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 In(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function Dn(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 _n.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 yn(a){switch(a.details){case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_TIMEOUT:case $.LEVEL_LOAD_TIMEOUT:case $.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function fr(a){return a.details.startsWith("key")}function _t(a){return fr(a)&&!!a.frag&&!a.frag.decryptdata}function Pn(a,e){const t=yn(e);return a.default[`${t?"timeout":"error"}Retry`]}function jn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function xr(a){return w(w({},a),{errorRetry:null,timeoutRetry:null})}function pr(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(Rr(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function Rr(a){return Er(a)||!!a&&(a<400||a>499)}function Er(a){return a===0&&navigator.onLine===!1}var vn={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},sn={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,MoveAllAlternatesMatchingKey:4,SwitchToSDR:8};class Mt extends J{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(p.ERROR,this.onError,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(p.ERROR,this.onError,this),e.off(p.ERROR,this.onErrorOut,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.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)===le.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 o;return(o=s.details)==null?void 0:o.hasKey(t)})}return!1}onManifestLoading(){this.playlistError=0}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case $.FRAG_LOAD_ERROR:case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_ERROR:case $.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case $.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=jt();return}case $.FRAG_GAP:case $.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=vn.SendAlternateToPenaltyBox;return}case $.LEVEL_EMPTY_ERROR:case $.LEVEL_PARSING_ERROR:{var s;const d=t.parent===le.MAIN?t.level:r.loadLevel;t.details===$.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 $.LEVEL_LOAD_ERROR:case $.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case $.AUDIO_TRACK_LOAD_ERROR:case $.AUDIO_TRACK_LOAD_TIMEOUT:case $.SUBTITLE_LOAD_ERROR:case $.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const d=r.loadLevelObj;if(d&&(i.type===ge.AUDIO_TRACK&&d.hasAudioGroup(i.groupId)||i.type===ge.SUBTITLE_TRACK&&d.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=vn.SendAlternateToPenaltyBox,t.errorAction.flags=sn.MoveAllAlternatesMatchingHost;return}}return;case $.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:t.errorAction={action:vn.SendAlternateToPenaltyBox,flags:sn.MoveAllAlternatesMatchingHDCP};return;case $.KEY_SYSTEM_SESSION_UPDATE_FAILED:case $.KEY_SYSTEM_STATUS_INTERNAL_ERROR:case $.KEY_SYSTEM_NO_SESSION:t.errorAction={action:vn.SendAlternateToPenaltyBox,flags:sn.MoveAllAlternatesMatchingKey};return;case $.BUFFER_ADD_CODEC_ERROR:case $.REMUX_ALLOC_ERROR:case $.BUFFER_APPEND_ERROR:if(!t.errorAction){var o;t.errorAction=this.getLevelSwitchAction(t,(o=t.level)!=null?o:r.loadLevel)}return;case $.INTERNAL_EXCEPTION:case $.BUFFER_APPENDING_ERROR:case $.BUFFER_FULL_ERROR:case $.LEVEL_SWITCH_ERROR:case $.BUFFER_STALLED_ERROR:case $.BUFFER_SEEK_OVER_HOLE:case $.BUFFER_NUDGE_ON_STALL:t.errorAction=jt();return}t.type===de.KEY_SYSTEM_ERROR&&(t.levelRetry=!1,t.errorAction=jt())}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=Pn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(pr(r,i,yn(e),e.response))return{action:vn.RetryRequest,flags:sn.None,retryConfig:r,retryCount:i};const o=this.getLevelSwitchAction(e,t);return r&&(o.retryConfig=r,o.retryCount=i),o}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,o=Pn(fr(e)?s:i,e),d=t.levels.reduce((m,g)=>m+g.fragmentError,0);if(r&&(e.details!==$.FRAG_GAP&&r.fragmentError++,!_t(e)&&pr(o,d,yn(e),e.response)))return{action:vn.RetryRequest,flags:sn.None,retryConfig:o,retryCount:d};const c=this.getLevelSwitchAction(e,n);return o&&(c.retryConfig=o,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===$.BUFFER_APPEND_ERROR&&r.fragmentError++;let m=-1;const{levels:g,loadLevel:T,minAutoLevel:k,maxAutoLevel:B}=n;!n.autoLevelEnabled&&!n.config.preserveManualLevelOnError&&(n.loadLevel=-1);const oe=(i=e.frag)==null?void 0:i.type,De=(oe===le.AUDIO&&c===$.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===$.BUFFER_ADD_CODEC_ERROR||c===$.BUFFER_APPEND_ERROR))&&g.some(({audioCodec:Yt})=>r.audioCodec!==Yt),ze=e.sourceBufferName==="video"&&(c===$.BUFFER_ADD_CODEC_ERROR||c===$.BUFFER_APPEND_ERROR)&&g.some(({codecSet:Yt,audioCodec:At})=>r.codecSet!==Yt&&r.audioCodec===At),{type:dt,groupId:Tt}=(s=e.context)!=null?s:{};for(let Yt=g.length;Yt--;){const At=(Yt+T)%g.length;if(At!==T&&At>=k&&At<=B&&g[At].loadError===0){var o,d;const Kt=g[At];if(c===$.FRAG_GAP&&oe===le.MAIN&&e.frag){const Ht=g[At].details;if(Ht){const Lt=kn(e.frag,Ht.fragments,e.frag.start);if(Lt!=null&&Lt.gap)continue}}else{if(dt===ge.AUDIO_TRACK&&Kt.hasAudioGroup(Tt)||dt===ge.SUBTITLE_TRACK&&Kt.hasSubtitleGroup(Tt))continue;if(oe===le.AUDIO&&(o=r.audioGroups)!=null&&o.some(Ht=>Kt.hasAudioGroup(Ht))||oe===le.SUBTITLE&&(d=r.subtitleGroups)!=null&&d.some(Ht=>Kt.hasSubtitleGroup(Ht))||De&&r.audioCodec===Kt.audioCodec||ze&&r.codecSet===Kt.codecSet||!De&&r.codecSet!==Kt.codecSet)continue}m=At;break}}if(m>-1&&n.loadLevel!==m)return e.levelRetry=!0,this.playlistError=0,{action:vn.SendAlternateToPenaltyBox,flags:sn.None,nextAutoLevel:m}}return{action:vn.SendAlternateToPenaltyBox,flags:sn.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case vn.DoNothing:break;case vn.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==$.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 vn.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 sn.None:this.switchLevel(e,i);break;case sn.MoveAllAlternatesMatchingHDCP:{const d=this.getVariantLevelIndex(e.frag),c=t.levels[d],m=c==null?void 0:c.attrs["HDCP-LEVEL"];if(n.hdcpLevel=m,m==="NONE")this.warn("HDCP policy resticted output with HDCP-LEVEL=NONE");else if(m){t.maxHdcpLevel=Pe[Pe.indexOf(m)-1],n.resolved=!0,this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}}case sn.MoveAllAlternatesMatchingKey:{const d=e.decryptdata;if(d){const c=this.hls.levels,m=c.length;for(let T=m;T--;)if(this.variantHasKey(c[T],d)){var s,o;this.log(`Banned key found in level ${T} (${c[T].bitrate}bps) or audio group "${(s=c[T].audioGroups)==null?void 0:s.join(",")}" (${(o=e.frag)==null?void 0:o.type} fragment) ${ie(d.keyId||[])}`),c[T].fragmentError++,c[T].loadError++,this.log(`Removing level ${T} with key error (${e.error})`),this.hls.removeLevel(T)}const g=e.frag;if(this.hls.levels.length<m)n.resolved=!0;else if(g&&g.type!==le.MAIN){const T=g.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===$.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=sr(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 jt(a){const e={action:vn.DoNothing,flags:sn.None};return a&&(e.resolved=!0),e}var un={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class bn{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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.BUFFER_APPENDED,this.onBufferAppended,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this),e.on(p.FRAG_LOADED,this.onFragLoaded,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.BUFFER_APPENDED,this.onBufferAppended,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this),e.off(p.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 o=r[i[s]];if((o==null?void 0:o.body.type)===t&&(!n||o.buffered)){const d=o.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(o=>{const d=this.fragments[o];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(m=>{const g=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return g&&this.removeFragment(d.body),g})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Jn(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(o=>{const d=n.elementaryStreams[o];if(!d)return;const c=t[o],m=s||d.partial===!0;i.range[o]=this.getBufferedTimes(n,e.part,m,c)}),i.loaded=null,Object.keys(i.range).length?(this.bufferedEnd(i,n),Mn(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]=tn(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Jn(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,o=e.end,d=e.minEndPTS||o,c=e.maxStartPTS||s;for(let m=0;m<r.length;m++){const g=r.start(m)-this.bufferPadding,T=r.end(m)+this.bufferPadding;if(c>=g&&d<=T){i.time.push({startPTS:Math.max(s,r.start(m)),endPTS:Math.min(o,r.end(m))});break}else if(s<T&&o>g){const k=Math.max(s,r.start(m)),B=Math.min(o,r.end(m));B>k&&(i.partial=!0,i.time.push({startPTS:k,endPTS:B}))}else if(o<=g)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:o,fragments:d}=this;return Object.keys(d).forEach(c=>{const m=d[c];m&&Mn(m)&&(r=m.body.start-o,i=m.body.end+o,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=m.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Mn(t))}getState(e){const t=Jn(e),n=this.fragments[t];return n?n.buffered?Mn(n)?un.PARTIAL:un.OK:un.APPENDING:un.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=Jn(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 o=n.type;if(r){let c=this.activePartLists[o];c||(this.activePartLists[o]=c=[]),c.push(r)}this.timeRanges=i;const d=i[s];this.detectEvictedFragments(s,d,o,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Jn(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 o=this.fragments[s];if(!o)return;const d=o.body;d.type!==n||r&&!d.gap||d.start<t&&d.end>e&&(o.buffered||i)&&this.removeFragment(d)})}removeFragment(e){const t=Jn(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=tn(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 Mn(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 Jn(a){return`${a.type}_${a.level}_${a.sn}`}function tn(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var Hn={cbc:0,ctr:1};class er{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 Hn.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case Hn.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 Tr(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class $r{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],o=n[3],d=this.invSubMix,c=d[0],m=d[1],g=d[2],T=d[3],k=new Uint32Array(256);let B=0,oe=0,ae=0;for(ae=0;ae<256;ae++)ae<128?k[ae]=ae<<1:k[ae]=ae<<1^283;for(ae=0;ae<256;ae++){let De=oe^oe<<1^oe<<2^oe<<3^oe<<4;De=De>>>8^De&255^99,e[B]=De,t[De]=B;const Me=k[B],ze=k[Me],dt=k[ze];let Tt=k[De]*257^De*16843008;r[B]=Tt<<24|Tt>>>8,i[B]=Tt<<16|Tt>>>16,s[B]=Tt<<8|Tt>>>24,o[B]=Tt,Tt=dt*16843009^ze*65537^Me*257^B*16843008,c[De]=Tt<<24|Tt>>>8,m[De]=Tt<<16|Tt>>>16,g[De]=Tt<<8|Tt>>>24,T[De]=Tt,B?(B=Me^k[k[k[dt^Me]]],oe^=k[k[oe]]):B=oe=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 o,d;const c=this.keySchedule=new Uint32Array(s),m=this.invKeySchedule=new Uint32Array(s),g=this.sBox,T=this.rcon,k=this.invSubMix,B=k[0],oe=k[1],ae=k[2],De=k[3];let Me,ze;for(o=0;o<s;o++){if(o<i){Me=c[o]=t[o];continue}ze=Me,o%i===0?(ze=ze<<8|ze>>>24,ze=g[ze>>>24]<<24|g[ze>>>16&255]<<16|g[ze>>>8&255]<<8|g[ze&255],ze^=T[o/i|0]<<24):i>6&&o%i===4&&(ze=g[ze>>>24]<<24|g[ze>>>16&255]<<16|g[ze>>>8&255]<<8|g[ze&255]),c[o]=Me=(c[o-i]^ze)>>>0}for(d=0;d<s;d++)o=s-d,d&3?ze=c[o]:ze=c[o-4],d<4||o<=4?m[d]=ze:m[d]=B[g[ze>>>24]]^oe[g[ze>>>16&255]]^ae[g[ze>>>8&255]]^De[g[ze&255]],m[d]=m[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,o=this.invSubMix,d=o[0],c=o[1],m=o[2],g=o[3],T=this.uint8ArrayToUint32Array_(n);let k=T[0],B=T[1],oe=T[2],ae=T[3];const De=new Int32Array(e),Me=new Int32Array(De.length);let ze,dt,Tt,Yt,At,Kt,Ht,Lt,hn,Wn,rr,yr,ir,Fn;const lr=this.networkToHostOrderSwap;for(;t<De.length;){for(hn=lr(De[t]),Wn=lr(De[t+1]),rr=lr(De[t+2]),yr=lr(De[t+3]),At=hn^i[0],Kt=yr^i[1],Ht=rr^i[2],Lt=Wn^i[3],ir=4,Fn=1;Fn<r;Fn++)ze=d[At>>>24]^c[Kt>>16&255]^m[Ht>>8&255]^g[Lt&255]^i[ir],dt=d[Kt>>>24]^c[Ht>>16&255]^m[Lt>>8&255]^g[At&255]^i[ir+1],Tt=d[Ht>>>24]^c[Lt>>16&255]^m[At>>8&255]^g[Kt&255]^i[ir+2],Yt=d[Lt>>>24]^c[At>>16&255]^m[Kt>>8&255]^g[Ht&255]^i[ir+3],At=ze,Kt=dt,Ht=Tt,Lt=Yt,ir=ir+4;ze=s[At>>>24]<<24^s[Kt>>16&255]<<16^s[Ht>>8&255]<<8^s[Lt&255]^i[ir],dt=s[Kt>>>24]<<24^s[Ht>>16&255]<<16^s[Lt>>8&255]<<8^s[At&255]^i[ir+1],Tt=s[Ht>>>24]<<24^s[Lt>>16&255]<<16^s[At>>8&255]<<8^s[Kt&255]^i[ir+2],Yt=s[Lt>>>24]<<24^s[At>>16&255]<<16^s[Kt>>8&255]<<8^s[Ht&255]^i[ir+3],Me[t]=lr(ze^k),Me[t+1]=lr(Yt^B),Me[t+2]=lr(Tt^oe),Me[t+3]=lr(dt^ae),k=hn,B=Wn,oe=rr,ae=yr,t=t+4}return Me.buffer}}class Wr{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=br(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function br(a){switch(a){case Hn.cbc:return"AES-CBC";case Hn.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Kr=16;class Cr{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?Tr(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 o=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(o,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:o}=this;if(r!==Hn.cbc||t.byteLength!==16)return me.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),o&&(e=ht(o,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 $r),c.expandKey(t);const m=s;return this.currentResult=c.decrypt(d.buffer,0,n),this.currentIV=d.slice(-16).buffer,m||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 Wr(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new er(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(me.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%Kr;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(me.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Hr=Math.pow(2,17);class Ir{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 ur({type:de.NETWORK_ERROR,details:$.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((o,d)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(B=>B[0]==="GAP")){d(Mr(e));return}else e.gap=!1;const c=this.loader=i?new i(r):new s(r),m=Pr(e);e.loader=c;const g=xr(r.fragLoadPolicy.default),T={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Hr};e.stats=c.stats;const k={onSuccess:(B,oe,ae,De)=>{this.resetLoader(e,c);let Me=B.data;ae.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Me.slice(0,16)),Me=Me.slice(16)),o({frag:e,part:null,payload:Me,networkDetails:De})},onError:(B,oe,ae,De)=>{this.resetLoader(e,c),d(new ur({type:de.NETWORK_ERROR,details:$.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:w({url:n,data:void 0},B),error:new Error(`HTTP Error ${B.code} ${B.text}`),networkDetails:ae,stats:De}))},onAbort:(B,oe,ae)=>{this.resetLoader(e,c),d(new ur({type:de.NETWORK_ERROR,details:$.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:ae,stats:B}))},onTimeout:(B,oe,ae)=>{this.resetLoader(e,c),d(new ur({type:de.NETWORK_ERROR,details:$.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:ae,stats:B}))}};t&&(k.onProgress=(B,oe,ae,De)=>t({frag:e,part:null,payload:ae,networkDetails:De})),c.load(m,T,k)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((o,d)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){d(Mr(e,t));return}const c=this.loader=i?new i(r):new s(r),m=Pr(e,t);e.loader=c;const g=xr(r.fragLoadPolicy.default),T={loadPolicy:g,timeout:g.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Hr};t.stats=c.stats,c.load(m,T,{onSuccess:(k,B,oe,ae)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const De={frag:e,part:t,payload:k.data,networkDetails:ae};n(De),o(De)},onError:(k,B,oe,ae)=>{this.resetLoader(e,c),d(new ur({type:de.NETWORK_ERROR,details:$.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:w({url:m.url,data:void 0},k),error:new Error(`HTTP Error ${k.code} ${k.text}`),networkDetails:oe,stats:ae}))},onAbort:(k,B,oe)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),d(new ur({type:de.NETWORK_ERROR,details:$.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:oe,stats:k}))},onTimeout:(k,B,oe)=>{this.resetLoader(e,c),d(new ur({type:de.NETWORK_ERROR,details:$.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${T.timeout}ms`),networkDetails:oe,stats:k}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const d=Math.round(e.duration/t.duration),c=Math.min(Math.round(n.loaded/i),d),g=(d-c)*Math.round(n.loaded/c);n.total=n.loaded+g}else n.total=Math.max(n.loaded,n.total);const s=n.loading,o=r.loading;s.start?s.first+=o.first-o.start:(s.start=o.start,s.first=o.first),s.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Pr(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(y(r)&&y(i)){var s;let o=r,d=i;if(a.sn==="initSegment"&&Yr((s=a.decryptdata)==null?void 0:s.method)){const c=i-r;c%16&&(d=i+(16-c%16)),r!==0&&(n.resetIV=!0,o=r-16)}n.rangeStart=o,n.rangeEnd=d}return n}function Mr(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:de.MEDIA_ERROR,details:$.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new ur(n)}function Yr(a){return a==="AES-128"||a==="AES-256"}class ur extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class ei extends J{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class Xr{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=Qr(),this.buffering={audio:Qr(),video:Qr(),audiovideo:Qr()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function Qr(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Vn={length:0,start:()=>0,end:()=>0};class xn{static isBuffered(e,t){if(e){const n=xn.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=xn.getBuffered(e);return xn.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=xn.bufferedRanges(e);if(r.length)return xn.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((m,g)=>m.start-g.start||g.end-m.end);let r=-1,i=[];if(n)for(let m=0;m<e.length;m++){t>=e[m].start&&t<=e[m].end&&(r=m);const g=i.length;if(g){const T=i[g-1].end;e[m].start-T<n?e[m].end>T&&(i[g-1].end=e[m].end):i.push(e[m])}else i.push(e[m])}else i=e;let s=0,o,d=t,c=t;for(let m=0;m<i.length;m++){const g=i[m].start,T=i[m].end;if(r===-1&&t>=g&&t<=T&&(r=m),t+n>=g&&t<T)d=g,c=T,s=c-t;else if(t+n<g){o=g;break}}return{len:s,start:d||0,end:c||0,nextStart:o,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Vn}catch(t){return me.log("failed to get media.buffered",t),Vn}}}const Fr=/\{\$([a-zA-Z0-9-_]+)\}/g;function rn(a){return Fr.test(a)}function qr(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(Fr,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 Ii(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 Si(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 di=/^(\d+)x(\d+)$/,pi=/(.+?)=(".*?"|.*?)(?:,|$)/g;class or{constructor(e,t){typeof e=="string"&&(e=or.parseAttrList(e,t)),_(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=di.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(pi.lastIndex=0;(n=pi.exec(e))!==null;){const s=n[1].trim();let o=n[2];const d=o.indexOf(i)===0&&o.lastIndexOf(i)===o.length-1;let c=!1;if(d)o=o.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(d||c))o=qr(t,o);else if(!c&&!d)switch(s){case"CLOSED-CAPTIONS":if(o==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":me.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=o}return r}}const ni="com.apple.hls.interstitial";function vi(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function wi(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Lr{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]){me.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=_(new or({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);y(i.getTime())&&(this._endDate=i)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(me.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(y(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===ni}get isValid(){return!!this.id&&!this._badValueForSameId&&y(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const Jr=10;class oi{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?y(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Jr}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 Yn(a,e){return a.length===e.length?!a.some((t,n)=>t!==e[n]):!1}function gr(a,e){return!a&&!e?!0:!a||!e?!1:Yn(a,e)}function tr(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function mr(a){switch(a){case"AES-128":case"AES-256":return Hn.cbc;case"AES-256-CTR":return Hn.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function kr(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function zr(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function hi(a){const e=zr(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Bn(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 nr(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=kr(s)):t=hi(s)}}return t}const Sr=typeof self!="undefined"?self:void 0;var vr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},wr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Di(a){switch(a){case wr.FAIRPLAY:return vr.FAIRPLAY;case wr.PLAYREADY:return vr.PLAYREADY;case wr.WIDEVINE:return vr.WIDEVINE;case wr.CLEARKEY:return vr.CLEARKEY}}function gi(a){switch(a){case vr.FAIRPLAY:return wr.FAIRPLAY;case vr.PLAYREADY:return wr.PLAYREADY;case vr.WIDEVINE:return wr.WIDEVINE;case vr.CLEARKEY:return wr.CLEARKEY}}function Ti(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[vr.FAIRPLAY,vr.WIDEVINE,vr.PLAYREADY,vr.CLEARKEY].filter(r=>!!e[r]):[];return!n[vr.WIDEVINE]&&t&&n.push(vr.WIDEVINE),n}const yi=function(a){return Sr!=null&&(a=Sr.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function gs(a,e,t,n){let r;switch(a){case vr.FAIRPLAY:r=["cenc","sinf"];break;case vr.WIDEVINE:case vr.PLAYREADY:r=["cenc"];break;case vr.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Xs(r,e,t,n)}function Xs(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 Ps(a){var e;return!!a&&(a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license")))}function Ci(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 o=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(o){const d=kr(o).subarray(0,16);return Bn(d),d}}return null}let $i={};class Pi{static clearKeyUriToKeyIdMap(){$i={}}static setKeyIdForUri(e,t){$i[e]=t}static addKeyIdForUri(e){const t=Object.keys($i).length%Number.MAX_SAFE_INTEGER,n=new Uint8Array(16);return new DataView(n.buffer,12,4).setUint32(0,t),$i[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&&!tr(e),s!=null&&s.startsWith("0x")&&(this.keyId=new Uint8Array(K(s)))}matches(e){return e.uri===this.uri&&e.method===this.method&&e.encrypted===this.encrypted&&e.keyFormat===this.keyFormat&&Yn(e.keyFormatVersions,this.keyFormatVersions)&&gr(e.iv,this.iv)&&gr(e.keyId,this.keyId)}isSupported(){if(this.method){if(tr(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case wr.FAIRPLAY:case wr.WIDEVINE:case wr.PLAYREADY:case wr.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(tr(this.method)){let i=this.iv;return i||(typeof e!="number"&&(me.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0),i=Gi(e)),new Pi(this.method,this.uri,"identity",this.keyFormatVersions,i)}if(this.keyId){const i=$i[this.uri];if(i&&!Yn(this.keyId,i)&&Pi.setKeyIdForUri(this.uri,this.keyId),this.pssh)return this}const n=nr(this.uri);if(n)switch(this.keyFormat){case wr.WIDEVINE:if(this.pssh=n,!this.keyId){const i=Ye(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=rs(t));break;case wr.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=D(i,null,n),this.keyId=Ci(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=Cs(t),i||(i=rs(t),i||(i=$i[this.uri])),i&&(this.keyId=i,Pi.setKeyIdForUri(this.uri,i))}return this}}function Cs(a){const e=a==null?void 0:a[wr.WIDEVINE];return e?e.keyId:null}function rs(a){const e=a==null?void 0:a[wr.PLAYREADY];if(e){const t=nr(e.uri);if(t)return Ci(t)}return null}function Gi(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const vs=/#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,ys=/#EXT-X-MEDIA:(.*)/g,Ms=/^#EXT(?:INF|-X-TARGETDURATION):/m,is=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),_s=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 Mi{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 S.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Ms.test(e)}static parseMasterPlaylist(e,t){const n=rn(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];if(vs.lastIndex=0,!e.startsWith("#EXTM3U"))return r.playlistParsingError=new Error("no EXTM3U delimiter"),r;let s;for(;(s=vs.exec(e))!=null;)if(s[1]){var o;const c=new or(s[1],r),m=qr(r,s[2]),g={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:Mi.resolve(m,t)},T=c.decimalResolution("RESOLUTION");T&&(g.width=T.width,g.height=T.height),cs(c.CODECS,g);const k=c["SUPPLEMENTAL-CODECS"];k&&(g.supplemental={},cs(k,g.supplemental)),(o=g.unknownCodecs)!=null&&o.length||i.push(g),r.levels.push(g)}else if(s[3]){const c=s[3],m=s[4];switch(c){case"SESSION-DATA":{const g=new or(m,r),T=g["DATA-ID"];T&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[T]=g);break}case"SESSION-KEY":{const g=As(m,t,r);g.encrypted&&g.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(g)):me.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${m}"`);break}case"DEFINE":{{const g=new or(m,r);Ii(r,g,t)}break}case"CONTENT-STEERING":{const g=new or(m,r);r.contentSteering={uri:Mi.resolve(g["SERVER-URI"],t),pathwayId:g["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=Bs(m);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,o={AUDIO:s.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:s.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let d=0;for(ys.lastIndex=0;(r=ys.exec(e))!==null;){const c=new or(r[1],n),m=c.TYPE;if(m){const g=o[m],T=i[m]||[];i[m]=T;const k=c.LANGUAGE,B=c["ASSOC-LANGUAGE"],oe=c.CHANNELS,ae=c.CHARACTERISTICS,De=c["INSTREAM-ID"],Me={attrs:c,bitrate:0,id:d++,groupId:c["GROUP-ID"]||"",name:c.NAME||k||"",type:m,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:k,url:c.URI?Mi.resolve(c.URI,t):""};if(B&&(Me.assocLang=B),oe&&(Me.channels=oe),ae&&(Me.characteristics=ae),De&&(Me.instreamId=De),g!=null&&g.length){const ze=Mi.findGroup(g,Me.groupId)||g[0];Wi(Me,ze,"audioCodec"),Wi(Me,ze,"textCodec")}T.push(Me)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var o;const d={url:t},c=new oi(t),m=c.fragments,g=[];let T=null,k=0,B=0,oe=0,ae=0,De=0,Me=null,ze=new qe(r,d),dt,Tt,Yt,At=-1,Kt=!1,Ht=null,Lt;if(is.lastIndex=0,c.m3u8=e,c.hasVariableRefs=rn(e),((o=is.exec(e))==null?void 0:o[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(dt=is.exec(e))!==null;){Kt&&(Kt=!1,ze=new qe(r,d),ze.playlistOffset=oe,ze.setStart(oe),ze.sn=k,ze.cc=ae,De&&(ze.bitrate=De),ze.level=n,T&&(ze.initSegment=T,T.rawProgramDateTime&&(ze.rawProgramDateTime=T.rawProgramDateTime,T.rawProgramDateTime=null),Ht&&(ze.setByteRange(Ht),Ht=null)));const yr=dt[1];if(yr){ze.duration=parseFloat(yr);const ir=(" "+dt[2]).slice(1);ze.title=ir||null,ze.tagList.push(ir?["INF",yr,ir]:["INF",yr])}else if(dt[3]){if(y(ze.duration)){ze.playlistOffset=oe,ze.setStart(oe),Yt&&Ei(ze,Yt,c),ze.sn=k,ze.level=n,ze.cc=ae,m.push(ze);const ir=(" "+dt[3]).slice(1);ze.relurl=qr(c,ir),_r(ze,Me,g),Me=ze,oe+=ze.duration,k++,B=0,Kt=!0}}else{if(dt=dt[0].match(_s),!dt){me.warn("No matches on slow regex match for level playlist!");continue}for(Tt=1;Tt<dt.length&&dt[Tt]===void 0;Tt++);const ir=(" "+dt[Tt]).slice(1),Fn=(" "+dt[Tt+1]).slice(1),lr=dt[Tt+2]?(" "+dt[Tt+2]).slice(1):null;switch(ir){case"BYTERANGE":Me?ze.setByteRange(Fn,Me):ze.setByteRange(Fn);break;case"PROGRAM-DATE-TIME":ze.rawProgramDateTime=Fn,ze.tagList.push(["PROGRAM-DATE-TIME",Fn]),At===-1&&(At=m.length);break;case"PLAYLIST-TYPE":c.type&&jr(c,ir,dt),c.type=Fn.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?jr(c,ir,dt):m.length>0&&fi(c,ir,dt),k=c.startSN=parseInt(Fn);break;case"SKIP":{c.skippedSegments&&jr(c,ir,dt);const Qn=new or(Fn,c),hr=Qn.decimalInteger("SKIPPED-SEGMENTS");if(y(hr)){c.skippedSegments+=hr;for(let Kn=hr;Kn--;)m.push(null);k+=hr}const Dr=Qn.enumeratedString("RECENTLY-REMOVED-DATERANGES");Dr&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(Dr.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&jr(c,ir,dt),c.targetduration=Math.max(parseInt(Fn),1);break;case"VERSION":c.version!==null&&jr(c,ir,dt),c.version=parseInt(Fn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||jr(c,ir,dt),c.live=!1;break;case"#":(Fn||lr)&&ze.tagList.push(lr?[Fn,lr]:[Fn]);break;case"DISCONTINUITY":ae++,ze.tagList.push(["DIS"]);break;case"GAP":ze.gap=!0,ze.tagList.push([ir]);break;case"BITRATE":ze.tagList.push([ir,Fn]),De=parseInt(Fn)*1e3,y(De)?ze.bitrate=De:De=0;break;case"DATERANGE":{const Qn=new or(Fn,c),hr=new Lr(Qn,c.dateRanges[Qn.ID],c.dateRangeTagCount);c.dateRangeTagCount++,hr.isValid||c.skippedSegments?c.dateRanges[hr.id]=hr:me.warn(`Ignoring invalid DATERANGE tag: "${Fn}"`),ze.tagList.push(["EXT-X-DATERANGE",Fn]);break}case"DEFINE":{{const Qn=new or(Fn,c);"IMPORT"in Qn?Si(c,Qn,s):Ii(c,Qn,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?jr(c,ir,dt):m.length>0&&fi(c,ir,dt),c.startCC=ae=parseInt(Fn);break;case"KEY":{const Qn=As(Fn,t,c);if(Qn.isSupported()){if(Qn.method==="NONE"){Yt=void 0;break}Yt||(Yt={});const hr=Yt[Qn.keyFormat];hr!=null&&hr.matches(Qn)||(hr&&(Yt=_({},Yt)),Yt[Qn.keyFormat]=Qn)}else me.warn(`[Keys] Ignoring unsupported EXT-X-KEY tag: "${Fn}"`);break}case"START":c.startTimeOffset=Bs(Fn);break;case"MAP":{const Qn=new or(Fn,c);if(ze.duration){const hr=new qe(r,d);_i(hr,Qn,n,Yt),T=hr,ze.initSegment=T,T.rawProgramDateTime&&!ze.rawProgramDateTime&&(ze.rawProgramDateTime=T.rawProgramDateTime)}else{const hr=ze.byteRangeEndOffset;if(hr){const Dr=ze.byteRangeStartOffset;Ht=`${hr-Dr}@${Dr}`}else Ht=null;_i(ze,Qn,n,Yt),T=ze,Kt=!0}T.cc=ae;break}case"SERVER-CONTROL":{Lt&&jr(c,ir,dt),Lt=new or(Fn),c.canBlockReload=Lt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=Lt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&Lt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=Lt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=Lt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&jr(c,ir,dt);const Qn=new or(Fn);c.partTarget=Qn.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Qn=c.partList;Qn||(Qn=c.partList=[]);const hr=B>0?Qn[Qn.length-1]:void 0,Dr=B++,Kn=new or(Fn,c),Gn=new gt(Kn,ze,d,Dr,hr);Qn.push(Gn),ze.duration+=Gn.duration;break}case"PRELOAD-HINT":{const Qn=new or(Fn,c);c.preloadHint=Qn;break}case"RENDITION-REPORT":{const Qn=new or(Fn,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(Qn);break}default:me.warn(`line parsed but not handled: ${dt}`);break}}}Me&&!Me.relurl?(m.pop(),oe-=Me.duration,c.partList&&(c.fragmentHint=Me)):c.partList&&(_r(ze,Me,g),ze.cc=ae,c.fragmentHint=ze,Yt&&Ei(ze,Yt,c)),c.targetduration||(c.playlistParsingError=new Error("Missing Target Duration"));const hn=m.length,Wn=m[0],rr=m[hn-1];if(oe+=c.skippedSegments*c.targetduration,oe>0&&hn&&rr){c.averagetargetduration=oe/hn;const yr=rr.sn;c.endSN=yr!=="initSegment"?yr:0,c.live||(rr.endList=!0),At>0&&(Br(m,At),Wn&&g.unshift(Wn))}return c.fragmentHint&&(oe+=c.fragmentHint.duration),c.totalduration=oe,g.length&&c.dateRangeTagCount&&Wn&&ks(g,c),c.endCC=ae,c}}function ks(a,e){let t=a.length;if(!t)if(e.hasProgramDateTime){const o=e.fragments[e.fragments.length-1];a.push(o),t++}else return;const n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let o=i.length;o--;){const d=e.dateRanges[i[o]],c=d.startDate.getTime();d.tagAnchor=n.ref;for(let m=t;m--;){var s;if(((s=a[m])==null?void 0:s.sn)<e.startSN)break;const g=Qs(e,c,a,m,r);if(g!==-1){d.tagAnchor=e.fragments[g].ref;break}}}}function Qs(a,e,t,n,r){const i=t[n];if(i){const o=i.programDateTime;if(e>=o||n===0){var s;const d=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=o+d*1e3){const c=t[n].sn-a.startSN;if(c<0)return-1;const m=a.fragments;if(m.length>t.length){const T=(t[n+1]||m[m.length-1]).sn-a.startSN;for(let k=T;k>c;k--){const B=m[k].programDateTime;if(e>=B&&e<B+m[k].duration*1e3)return k}}return c}}}return-1}function As(a,e,t){var n,r;const i=new or(a,t),s=(n=i.METHOD)!=null?n:"",o=i.URI,d=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,m=(r=i.KEYFORMAT)!=null?r:"identity";o&&i.IV&&!d&&me.error(`Invalid IV: ${i.IV}`);const g=o?Mi.resolve(o,e):"",T=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Pi(s,g,m,T,d,i.KEYID)}function Bs(a){const t=new or(a).decimalFloatingPoint("TIME-OFFSET");return y(t)?t:null}function cs(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Oe(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 Wi(a,e,t){const n=e[t];n&&(a[t]=n)}function Br(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 _r(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function _i(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 Ei(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 jr(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function fi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Ri(a,e){const t=e.startPTS;if(y(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 Li(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 m=e.startPTS,g=e.endPTS;if(y(m)){const De=Math.abs(m-t);a&&De>a.totalduration?s.warn(`media timestamps and playlist times differ by ${De}s for level ${e.level} ${a.url}`):y(e.deltaPTS)?e.deltaPTS=Math.max(De,e.deltaPTS):e.deltaPTS=De,d=Math.max(t,m),t=Math.min(t,m),r=e.startDTS!==void 0?Math.min(r,e.startDTS):r,c=Math.min(n,g),n=Math.max(n,g),i=e.endDTS!==void 0?Math.max(i,e.endDTS):i}const 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 k=e.sn;if(!a||k<a.startSN||k>a.endSN)return 0;let B;const oe=k-a.startSN,ae=a.fragments;for(ae[oe]=e,B=oe;B>0;B--)Ri(ae[B],ae[B-1]);for(B=oe;B<ae.length-1;B++)Ri(ae[B],ae[B+1]);return a.fragmentHint&&Ri(ae[ae.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,T}function Yi(a,e,t){if(a===e)return;let n=null;const r=a.fragments;for(let m=r.length-1;m>=0;m--){const g=r[m].initSegment;if(g){n=g;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let i;ji(a,e,(m,g,T,k)=>{if((!e.startCC||e.skippedSegments)&&g.cc!==m.cc){const B=m.cc-g.cc;for(let oe=T;oe<k.length;oe++)k[oe].cc+=B;e.endCC=k[k.length-1].cc}y(m.startPTS)&&y(m.endPTS)&&(g.setStart(g.startPTS=m.startPTS),g.startDTS=m.startDTS,g.maxStartPTS=m.maxStartPTS,g.endPTS=m.endPTS,g.endDTS=m.endDTS,g.minEndPTS=m.minEndPTS,g.setDuration(m.endPTS-m.startPTS),g.duration&&(i=g),e.PTSKnown=e.alignedSliding=!0),m.hasStreams&&(g.elementaryStreams=m.elementaryStreams),g.loader=m.loader,m.hasStats&&(g.stats=m.stats),m.initSegment&&(g.initSegment=m.initSegment,n=m.initSegment)});const s=e.fragments,o=e.fragmentHint?s.concat(e.fragmentHint):s;if(n&&o.forEach(m=>{var g;m&&(!m.initSegment||m.initSegment.relurl===((g=n)==null?void 0:g.relurl))&&(m.initSegment=n)}),e.skippedSegments){if(e.deltaUpdateFailed=s.some(m=>!m),e.deltaUpdateFailed){t.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let m=e.skippedSegments;m--;)s.shift();e.startSN=s[0].sn}else{e.canSkipDateRanges&&(e.dateRanges=Ai(a.dateRanges,e,t));const m=a.fragments.filter(g=>g.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let g=1;g<o.length;g++)o[g].programDateTime===null&&_r(o[g],o[g-1],m);ks(m,e)}e.endCC=s[s.length-1].cc}if(!e.startCC){var d;const m=Zr(a,e.startSN-1);e.startCC=(d=m==null?void 0:m.cc)!=null?d:s[0].cc}Xi(a.partList,e.partList,(m,g)=>{g.elementaryStreams=m.elementaryStreams,g.stats=m.stats}),i?Li(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS,t):Ji(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 m=e.edge;e.driftStart||(e.driftStartTime=c,e.driftStart=m),e.driftEndTime=c,e.driftEnd=m}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function Ai(a,e,t){const{dateRanges:n,recentlyRemovedDateranges:r}=e,i=_({},a);r&&r.forEach(d=>{delete i[d]});const o=Object.keys(i).length;return o?(Object.keys(n).forEach(d=>{const c=i[d],m=new Lr(n[d].attr,c);m.isValid?(i[d]=m,c||(m.tagOrder+=o)):t.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${nt(n[d].attr)}"`)}),i):n}function Xi(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],o=e[r+n];s&&o&&s.index===o.index&&s.fragment.sn===o.fragment.sn?t(s,o):n--}}}function ji(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,o=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 m=d[s+c];let g=o[c];if(n&&!g&&m&&(g=e.fragments[c]=m),m&&g){t(m,g,c,o);const T=m.relurl,k=g.relurl;if(T&&Is(T,k)){e.playlistParsingError=qi(`media sequence mismatch ${g.sn}:`,a,e,m,g);return}else if(m.cc!==g.cc){e.playlistParsingError=qi(`discontinuity sequence mismatch (${m.cc}!=${g.cc})`,a,e,m,g);return}}}}function qi(a,e,t,n,r){return new Error(`${a} ${r.url}
|
|
|
Playlist starting @${e.startSN}
|
|
|
${e.m3u8}
|
|
|
|
|
|
Playlist starting @${t.startSN}
|
|
|
${t.m3u8}`)}function Ji(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;qs(e,s)}function qs(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 Vr(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 Zr(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 si(a,e,t){return a?Oi(a.partList,e,t):null}function Oi(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 ki(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 Is(a,e){return a!==e&&e?Ds(a)!==Ds(e):!1}function Ds(a){return a.replace(/\?[^?]*$/,"")}function ds(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 Js(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Fs(a,e){const t=a.start+e;a.startPTS=t,a.setStart(t),a.endPTS=t+a.duration}function hs(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)Fs(t[n],a);e.fragmentHint&&Fs(e.fragmentHint,a),e.alignedSliding=!0}function Ns(a,e){a&&($s(e,a),e.alignedSliding||zs(e,a),!e.alignedSliding&&!e.skippedSegments&&Ji(a,e,!1))}function $s(a,e){if(!Js(e,a))return;const t=Math.min(e.endCC,a.endCC),n=ds(e.fragments,t),r=ds(a.fragments,t);if(!n||!r)return;me.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;hs(i,a)}function zs(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=ds(n,s),i=ds(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=ds(t,r.cc)||t[Math.floor(t.length/2)]);const o=r.programDateTime,d=i.programDateTime;if(!o||!d)return;const c=(d-o)/1e3-(i.start-r.start);hs(c,a)}function Bi(a,e,t){zi(a,e,t),a.addEventListener(e,t)}function zi(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}},on={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 ea extends ei{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=on.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:o,media:d,mediaBuffer:c,state:m}=this,g=d?d.currentTime:0,T=xn.bufferInfo(c||d,g,s.maxBufferHole),k=!T.len;if(this.log(`Media seeking to ${y(g)?g.toFixed(3):g}, state: ${m}, ${k?"out of":"in"} buffer`),this.state===on.ENDED)this.resetLoadingState();else if(o){const B=s.maxFragLookUpTolerance,oe=o.start-B,ae=o.start+o.duration+B;if(k||ae<T.start||oe>T.end){const De=g>ae;(g<oe||De)&&(De&&o.loader&&(this.log(`Cancelling fragment load for seek (sn: ${o.sn})`),o.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(d){this.fragmentTracker.removeFragmentsInRange(g,1/0,this.playlistType,!0);const B=this.lastCurrentTime;if(g>B&&(this.lastCurrentTime=g),!this.loadingParts){const oe=Math.max(T.end,g),ae=this.shouldLoadParts(this.getLevelDetails(),oe);ae&&(this.log(`LL-Part loading ON after seeking to ${g.toFixed(2)} with buffer @${oe.toFixed(2)}`),this.loadingParts=ae)}}this.hls.hasEnoughToStart||(this.log(`Setting ${k?"startPosition":"nextLoadPosition"} to ${g} for seek without enough to start`),this.nextLoadPosition=g,k&&(this.startPosition=g)),k&&this.state===on.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 Ir(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Cr(e.config)}registerListeners(){const{hls:e}=this;e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===on.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=on.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=xn.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 m=d[d.length-1];return xn.isBuffered(this.media,m.start+m.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;Bi(n,"seeking",this.onMediaSeeking),Bi(n,"ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===on.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),zi(r,"seeking",this.onMediaSeeking),zi(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=on.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,o=i.frag;if(this.fragContextChanged(o)){(s===on.FRAG_LOADING||!this.fragCurrent&&s===on.PARSING)&&(this.fragmentTracker.removeFragment(o),this.state=on.IDLE);return}"payload"in i&&(this.log(`Loaded ${o.type} sn: ${o.sn} of ${this.playlistLabel()} ${o.level}`),this.hls.trigger(p.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===on.STOPPED||this.state===on.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)===un.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),o=Math.max(e.duration,s?s.len:this.config.maxBufferLength),d=this.backtrackFragment;((d?e.sn-d.sn:0)===1||this.reduceMaxBufferLength(o,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===un.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(p.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,o=i.decryptdata;if(s&&s.byteLength>0&&o!=null&&o.key&&o.iv&&tr(o.method)){const d=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),o.key.buffer,o.iv.buffer,mr(o.method)).catch(c=>{throw r.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const m=self.performance.now();return r.trigger(p.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:d,tdecrypt:m}}),n.payload=c,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===on.STOPPED||this.state===on.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!==on.STOPPED&&(this.state=on.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,o=new Error(`Encrypted track with no key in ${this.fragInfo(t)} (media ${s?"attached mediaKeys: "+s.mediaKeys:"detached"})`);return this.warn(o.message),!s||s.mediaKeys?!1:(this.hls.trigger(p.ERROR,{type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_KEYS,fatal:!1,error:o,frag:t}),this.resetTransmuxer(),!0)}return!1}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const 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(xn.getBuffered(n)):"(detached)"})`),Ve(e)){var r;if(e.type!==le.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(o=>!!s[o])){this.state=on.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=on.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),o=new Xr(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(o)}_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 o=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)){if(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=on.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(T=>{if(!this.fragContextChanged(T.frag))return this.hls.trigger(p.KEY_LOADED,T),this.state===on.KEY_LOADING&&(this.state=on.IDLE),T}),this.hls.trigger(p.KEY_LOADING,{frag:e}),this.fragCurrent===null)return this.log("context changed in KEY_LOADING"),Promise.resolve(null)}else e.encrypted||(o=this.keyLoader.loadClear(e,s.encryptedFragments,this.startFragRequested),o&&this.log("[eme] blocking frag load until media-keys acquired"));const d=this.fragPrevious;if(Ve(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&&Ve(e)){const T=s.partList;if(T&&r){n>s.fragmentEnd&&s.fragmentHint&&(e=s.fragmentHint);const k=this.getNextPart(T,e,n);if(k>-1){const B=T[k];e=this.fragCurrent=B.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${B.index} (${k}/${T.length-1}) of ${this.fragInfo(e,!1,B)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=B.start+B.duration,this.state=on.FRAG_LOADING;let oe;return o?oe=o.then(ae=>!ae||this.fragContextChanged(ae.frag)?null:this.doFragPartsLoad(e,B,t,r)).catch(ae=>this.handleFragLoadError(ae)):oe=this.doFragPartsLoad(e,B,t,r).catch(ae=>this.handleFragLoadError(ae)),this.hls.trigger(p.FRAG_LOADING,{frag:e,part:B,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):oe}else if(!e.url||this.loadedEndOfParts(T,n))return Promise.resolve(null)}}if(Ve(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))}`),y(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=on.FRAG_LOADING;const m=this.config.progressive&&e.type!==le.SUBTITLE;let g;return m&&o?g=o.then(T=>!T||this.fragContextChanged(T.frag)?null:this.fragmentLoader.load(e,r)).catch(T=>this.handleFragLoadError(T)):g=Promise.all([this.fragmentLoader.load(e,m?r:void 0),o]).then(([T])=>(!m&&r&&r(T),T)).catch(T=>this.handleFragLoadError(T)),this.hls.trigger(p.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):g}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var o;const d=[],c=(o=n.details)==null?void 0:o.partList,m=g=>{this.fragmentLoader.loadPart(e,g,r).then(T=>{d[g.index]=T;const k=T.part;this.hls.trigger(p.FRAG_LOADED,T);const B=si(n.details,e.sn,g.index+1)||Oi(c,e.sn,g.index+1);if(B)m(B);else return i({frag:e,part:k,partsLoaded:d})}).catch(s)};m(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;t.frag&&t.details===$.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):t.frag&&t.type===de.KEY_SYSTEM_ERROR?(t.frag.abortRequests(),this.resetStartWhenNotLoaded(),this.resetFragmentLoading(t.frag)):this.hls.trigger(p.ERROR,t)}else this.hls.trigger(p.ERROR,{type:de.OTHER_ERROR,details:$.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==on.PARSING){!this.fragCurrent&&this.state!==on.STOPPED&&this.state!==on.ERROR&&(this.state=on.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 o=this.getLevelDetails(),c=o&&n.sn>o.endSN||this.shouldLoadParts(o,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===le.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 o=t[r],d=o.details,c=s>-1?si(d,i,s):null,m=c?c.fragment:Zr(d,i,n);return m?(n&&n!==m&&(m.stats=n.stats),{frag:m,part:c,level:o}):null}bufferFragmentData(e,t,n,r,i){if(this.state!==on.PARSING)return;const{data1:s,data2:o}=e;let d=s;if(o&&(d=ht(s,o)),!d.length)return;const c=this.initPTS[t.cc],m=c?-c.baseTime/c.timescale:void 0,g={type:e.type,frag:t,part:n,chunkMeta:r,offset:m,parent:t.type,data:d};if(this.hls.trigger(p.BUFFER_APPENDING,g),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!xn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=xn.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),o=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-o>s&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!y(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=xn.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 o=Math.max(Math.min(i.nextStart,s.end)-t,r);return xn.bufferInfo(e,t,o)}}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=le.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,o=i.lowLatencyMode&&!!t.partList;let d=null;if(t.live){const g=i.initialLiveManifestSize;if(r<g)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${g})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var c;o&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),d=this.getInitialLiveFragment(t);const T=this.hls.startPosition,k=this.hls.liveSyncPosition,B=d?(T!==-1&&T>=s?T:k)||d.start:e;this.log(`Setting startPosition to ${B} to match start frag at live edge. mainStart: ${T} liveSyncPosition: ${k} frag.start: ${(c=d)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=B}}else e<=s&&(d=n[0]);if(!d){const g=this.loadingParts?t.partEnd:t.fragmentEnd;d=this.getFragmentAtPosition(e,g,t)}let m=this.filterReplacedPrimary(d,t);if(!m&&d){const g=d.sn-t.startSN;m=this.filterReplacedPrimary(n[g+1]||null,t)}return this.mapToInitFragWhenRequired(m)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===un.OK||n===un.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 o=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(o!==null&&n.len+o.len>=i){const d=s.sn;return this.loopSn!==d&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${d}`),this.loopSn=d),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Ta(this.config)){var e;if((e=this.hls.interstitialsManager)==null||(e=e.playingItem)==null?void 0:e.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Ta(this.config)&&e.type!==le.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 o=i[s].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!e.initSegment.data&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let o=0,d=e.length;o<d;o++){const c=e[o];if(s=s&&!c.independent,r>-1&&n<c.start)break;const m=c.loaded;m?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=o),i=m}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=Tn(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=Dn(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:o}=n;const{fragmentHint:d}=n,{maxFragLookUpTolerance:c}=r,m=n.partList,g=!!(this.loadingParts&&m!=null&&m.length&&d);g&&!this.bitrateTest&&m[m.length-1].fragment.sn===d.sn&&(s=s.concat(d),o=d.sn);let T;if(e<t){var k;const oe=e<this.lastCurrentTime||e>t-c||(k=this.media)!=null&&k.paused||!this.startFragRequested?0:c;T=kn(i,s,e,oe)}else T=s[s.length-1];if(T){const B=T.sn-n.startSN,oe=this.fragmentTracker.getState(T);if((oe===un.OK||oe===un.PARTIAL&&T.gap)&&(i=T),i&&T.sn===i.sn&&(!g||m[0].fragment.sn>T.sn||!n.live)&&T.level===i.level){const De=s[B+1];T.sn<o&&this.fragmentTracker.getState(De)!==un.OK?T=De: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,o=e.alignedSliding&&y(i);if(s||!o&&!i){Ns(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&&y(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&&Ve(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!==on.FRAG_LOADING_WAITING_RETRY)&&(this.state=on.IDLE)}onFragmentOrKeyLoadError(e,t){var n;if(t.chunkMeta&&!t.frag){const De=this.getCurrentContext(t.chunkMeta);De&&(t.frag=De.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===$.FRAG_GAP;s&&this.fragmentTracker.fragBuffered(r,!0);const o=t.errorAction;if(!o){this.state=on.ERROR;return}const{action:d,flags:c,retryCount:m=0,retryConfig:g}=o,T=!!g,k=T&&d===vn.RetryRequest,B=T&&!o.resolved&&c===sn.MoveAllAlternatesMatchingHost,oe=(n=this.hls.latestLevelDetails)==null?void 0:n.live;if(!k&&B&&Ve(r)&&!r.endList&&oe&&!_t(t))this.resetFragmentErrors(e),this.treatAsGap(r),o.resolved=!0;else if((k||B)&&m<g.maxNumRetry){var ae;const De=Er((ae=t.response)==null?void 0:ae.code),Me=jn(g,m);if(this.resetStartWhenNotLoaded(),this.retryDate=self.performance.now()+Me,this.state=on.FRAG_LOADING_WAITING_RETRY,o.resolved=!0,De){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 ${m+1}/${g.maxNumRetry} in ${Me}ms`)}else if(g)if(this.resetFragmentErrors(e),m<g.maxNumRetry)!s&&d!==vn.RemoveAlternatePermanently&&(o.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${m})`);return}else d===vn.SendAlternateToPenaltyBox?this.state=on.WAITING_LEVEL:this.state=on.ERROR;this.tickImmediate()}checkRetryDate(){const e=self.performance.now(),t=this.retryDate,n=t===1/0;(!t||e>=t||n&&!Er(0))&&(n&&this.log("Connection restored (online)"),this.resetStartWhenNotLoaded(),this.state=on.IDLE)}reduceLengthAndFlushBuffer(e){if(this.state===on.PARSING||this.state===on.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===le.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==on.STOPPED&&(this.state=on.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=xn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===on.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==on.STOPPED&&(this.state=on.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 m=e.elementaryStreams[c];if(m){const g=m.endPTS-m.startPTS;if(g<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${g})`),d||!1;const T=r?0:Li(i,e,m.startPTS,m.endPTS,m.startDTS,m.endDTS,this);return this.hls.trigger(p.LEVEL_PTS_UPDATED,{details:i,level:n,drift:T,type:c,frag:e,start:m.startPTS,end:m.endPTS}),!0}return d},!1)){var o;const d=((o=this.transmuxer)==null?void 0:o.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(p.ERROR,{type:de.MEDIA_ERROR,details:$.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=on.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(p.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===le.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Ta(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Ca{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 bs={exports:{}},Us;function Co(){return Us||(Us=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,m){this.fn=d,this.context=c,this.once=m||!1}function i(d,c,m,g,T){if(typeof m!="function")throw new TypeError("The listener must be a function");var k=new r(m,g||d,T),B=t?t+c:c;return d._events[B]?d._events[B].fn?d._events[B]=[d._events[B],k]:d._events[B].push(k):(d._events[B]=k,d._eventsCount++),d}function s(d,c){--d._eventsCount===0?d._events=new n:delete d._events[c]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],m,g;if(this._eventsCount===0)return c;for(g in m=this._events)e.call(m,g)&&c.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(m)):c},o.prototype.listeners=function(c){var m=t?t+c:c,g=this._events[m];if(!g)return[];if(g.fn)return[g.fn];for(var T=0,k=g.length,B=new Array(k);T<k;T++)B[T]=g[T].fn;return B},o.prototype.listenerCount=function(c){var m=t?t+c:c,g=this._events[m];return g?g.fn?1:g.length:0},o.prototype.emit=function(c,m,g,T,k,B){var oe=t?t+c:c;if(!this._events[oe])return!1;var ae=this._events[oe],De=arguments.length,Me,ze;if(ae.fn){switch(ae.once&&this.removeListener(c,ae.fn,void 0,!0),De){case 1:return ae.fn.call(ae.context),!0;case 2:return ae.fn.call(ae.context,m),!0;case 3:return ae.fn.call(ae.context,m,g),!0;case 4:return ae.fn.call(ae.context,m,g,T),!0;case 5:return ae.fn.call(ae.context,m,g,T,k),!0;case 6:return ae.fn.call(ae.context,m,g,T,k,B),!0}for(ze=1,Me=new Array(De-1);ze<De;ze++)Me[ze-1]=arguments[ze];ae.fn.apply(ae.context,Me)}else{var dt=ae.length,Tt;for(ze=0;ze<dt;ze++)switch(ae[ze].once&&this.removeListener(c,ae[ze].fn,void 0,!0),De){case 1:ae[ze].fn.call(ae[ze].context);break;case 2:ae[ze].fn.call(ae[ze].context,m);break;case 3:ae[ze].fn.call(ae[ze].context,m,g);break;case 4:ae[ze].fn.call(ae[ze].context,m,g,T);break;default:if(!Me)for(Tt=1,Me=new Array(De-1);Tt<De;Tt++)Me[Tt-1]=arguments[Tt];ae[ze].fn.apply(ae[ze].context,Me)}}return!0},o.prototype.on=function(c,m,g){return i(this,c,m,g,!1)},o.prototype.once=function(c,m,g){return i(this,c,m,g,!0)},o.prototype.removeListener=function(c,m,g,T){var k=t?t+c:c;if(!this._events[k])return this;if(!m)return s(this,k),this;var B=this._events[k];if(B.fn)B.fn===m&&(!T||B.once)&&(!g||B.context===g)&&s(this,k);else{for(var oe=0,ae=[],De=B.length;oe<De;oe++)(B[oe].fn!==m||T&&!B[oe].once||g&&B[oe].context!==g)&&ae.push(B[oe]);ae.length?this._events[k]=ae.length===1?ae[0]:ae:s(this,k)}return this},o.prototype.removeAllListeners=function(c){var m;return c?(m=t?t+c:c,this._events[m]&&s(this,m)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,a.exports=o}(bs)),bs.exports}var Ao=Co(),ha=I(Ao);const ta="1.6.15",Rs={};function Ga(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Io(){const a=Rs[ta];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 Rs[ta]=r,r}function Wa(a){const e=Rs[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 Rs[a]=r,r}function Do(a){const e=Rs[a||ta];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete Rs[a||ta],r&&self.URL.revokeObjectURL(r),n.terminate()}}function Aa(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 na(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 js(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 Hs(a,e){const t=e;let n=0;for(;na(a,e);){n+=10;const r=js(a,e+6);n+=r,Aa(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function Va(a,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const k=new Error(`invalid ADTS sampling index:${s}`);a.emit(p.ERROR,p.ERROR,{type:de.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!0,error:k,reason:k.message});return}const o=(i>>6&3)+1,d=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+o,m=r[s];let g=s;(o===5||o===29)&&(g-=3);const T=[o<<3|(g&14)>>1,(g&1)<<7|d<<3];return me.log(`manifest codec:${n}, parsed codec:${c}, channels:${d}, rate:${m} (ADTS object type:${o} sampling index:${s})`),{config:T,samplerate:m,channelCount:d,codec:c,parsedCodec:c,manifestCodec:n}}function Ia(a,e){return a[e]===255&&(a[e+1]&246)===240}function Za(a,e){return a[e+1]&1?7:9}function fa(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 ma(a,e){return e+1<a.length&&Ia(a,e)}function ra(a,e){return Ya(a,e)&&Ia(a,e)&&fa(a,e)<=a.length-e}function Da(a,e){if(ma(a,e)){const t=Za(a,e);if(e+t>=a.length)return!1;const n=fa(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||ma(a,r)}return!1}function Ra(a,e,t,n,r){if(!a.samplerate){const i=Va(e,t,n,r);if(!i)return;_(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=fa(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,o=Ro(e,t);let d;if(o){const{frameLength:g,headerLength:T}=o,k=T+g,B=Math.max(0,t+k-e.length);B?(d=new Uint8Array(k-T),d.set(e.subarray(t+T,e.length),0)):d=e.subarray(t+T,t+k);const oe={unit:d,pts:s};return B||a.samples.push(oe),{sample:oe,length:k,missing:B}}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 na(a,e)&&js(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,o=(s+a.byteLength)/i,d=(s+e)/i,c=Math.floor(Math.max(0,Math.min(d,o))),m=Math.floor(Math.min(c+Math.max(t,0),o));return new n(r,c,m-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=at(Oa(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const o=at(Oa(a.data,3+n,s));let d;return r==="-->"?d=at(Oa(a.data,4+n+s)):d=Lo(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=o,e.data=d,e}function ke(a){if(a.size<2)return;const e=at(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=at(a.data.subarray(t),!0);t+=n.length+1;const r=at(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=at(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=at(a.data.subarray(t),!0);t+=n.length+1;const r=at(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=at(a.data);return{key:a.type,info:"",data:e}}function Ma(a){return a.type==="PRIV"?ke(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=js(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const Ks=10,no=10;function ka(a){let e=0;const t=[];for(;na(a,e);){const n=js(a,e+6);a[e+5]>>6&1&&(e+=Ks),e+=Ks;const r=e+n;for(;e+no<r;){const i=to(a.subarray(e)),s=Ma(i);s&&t.push(s),e+=i.size+Ks}Aa(a,e)&&(e+=Ks)}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 pa(a){const e=ka(a);for(let t=0;t<e.length;t++){const n=e[t];if(ro(n))return io(n)}}let Fi=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 ss(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class ia{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=ht(this.cachedData,e),this.cachedData=null);let n=Hs(e,0),r=n?n.length:0,i;const s=this._audioTrack,o=this._id3Track,d=n?pa(n):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&y(d))&&(this.basePTS=so(d,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Fi.audioId3,duration:Number.POSITIVE_INFINITY});r<c;){if(this.canParse(e,r)){const m=this.appendFrame(s,e,r);m?(this.frameIndex++,this.lastPTS=m.sample.pts,r+=m.length,i=r):r=c}else La(e,r)?(n=Hs(e,r),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Fi.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===c&&i!==c){const m=e.slice(i);this.cachedData?this.cachedData=ht(this.cachedData,m):this.cachedData=m}}return{audioTrack:s,videoTrack:ss(),id3Track:o,textTrack:ss()}}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:ss(),id3Track:this._id3Track,textTrack:ss()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const so=(a,e,t)=>{if(y(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let ga=null;const Mo=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ao=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Ba=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ko=[0,1,1,4];function oo(a,e,t,n,r){if(t+24>e.length)return;const i=Bo(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,o=n+r*s,d={unit:e.subarray(t,t+i.frameLength),pts:o,dts:o};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(d),{sample:d,length:i.frameLength,missing:0}}}function Bo(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,o=a[e+3]>>6,d=t===3?3-n:n===3?3:4,c=Mo[d*14+r-1]*1e3,g=ao[(t===3?0:t===2?1:2)*3+i],T=o===3?1:2,k=Ba[t][n],B=ko[n],oe=k*8*B,ae=Math.floor(k*c/g+s)*B;if(ga===null){const ze=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ga=ze?parseInt(ze[1]):0}return!!ga&&ga<=87&&n===2&&c>=224e3&&o===0&&(a[e+3]=a[e+3]|128),{sampleRate:g,channelCount:T,frameLength:ae,samplesPerFrame:oe}}}function H(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&&H(a,e)}function h(a,e){return H(a,e)&&4<=a.length-e}function f(a,e){if(e+1<a.length&&H(a,e)){const n=Bo(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||u(a,i)}return!1}class v extends ia{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=Hs(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(Da(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return ra(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 L=(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 o=Math.min(n,8),d=8-o;i[0]=4278190080>>>24+d<<d,r[0]=(s[0]&i[0])>>d,t=t?t<<o|r[0]:r[0],e+=1,n-=o}return t};class j extends ia{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=be(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=Hs(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&pa(t)!==void 0&&L(e,n)<16}}function be(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 o=[48e3,44100,32e3][i],d=e[t+4]&63,m=[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+m>e.length)return-1;const g=e[t+6]>>5;let T=0;g===2?T+=2:(g&1&&g!==1&&(T+=2),g&4&&(T+=2));const k=(e[t+6]<<8|e[t+7])>>12-T&1,oe=[2,1,2,3,3,4,4,5][g]+k,ae=e[t+5]>>3,De=e[t+5]&7,Me=new Uint8Array([i<<6|ae<<1|De>>2,(De&3)<<6|g<<3|k<<2|d>>4,d<<4&224]),ze=1536/o*9e4,dt=n+r*ze,Tt=e.subarray(t,t+m);return a.config=Me,a.channelCount=oe,a.samplerate=o,a.samples.push({unit:Tt,pts:dt}),m}class Ie extends ia{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=Hs(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&pa(t)!==void 0&&L(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(f(e,n))return me.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 We=/\/emsg[-/]ID3/i;class vt{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=ss("video",1),s=this.audioTrack=ss("audio",1),o=this.txtTrack=ss("text",1);if(this.id3Track=ss("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const d=Ce(e);if(d.video){const{id:c,timescale:m,codec:g,supplemental:T}=d.video;i.id=c,i.timescale=o.timescale=m,i.codec=g,i.supplemental=T}if(d.audio){const{id:c,timescale:m,codec:g}=d.audio;s.id=c,s.timescale=m,s.codec=g}o.id=kt.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return xe(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=ht(this.remainderData,e));const o=st(n);this.remainderData=o.remainder,r.samples=o.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=bt(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=bt(e,t),{videoTrack:t,audioTrack:ss(),id3Track:r,textTrack:ss()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=se(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Pt(i);if(We.test(s.schemeIdUri)){const o=Ot(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:o,pts:o,type:Fi.emsg,duration:d})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const o=Ot(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:o,pts:o,type:Fi.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 Ot(a,e){return y(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 Cr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Hn.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(o=>{const d=new Uint8Array(o);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=ft(i.data),o=this.getAvcEncryptedData(s);this.decryptBuffer(o.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 pn{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,o=[];let d=0,c,m,g,T=-1,k=0;for(i===-1&&(T=0,k=this.getNALuType(t,0),i=0,d=1);d<r;){if(c=t[d++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(m=d-i-1,T>=0){const B={data:t.subarray(T,m),type:k};o.push(B)}else{const B=this.getLastNalUnit(e.samples);B&&(s&&d<=4-s&&B.state&&(B.data=B.data.subarray(0,B.data.byteLength-s)),m>0&&(B.data=ht(B.data,t.subarray(0,m)),B.state=0))}d<r?(g=this.getNALuType(t,d),T=d,k=g,i=0):i=-1}else i=0}if(T>=0&&i>=0){const B={data:t.subarray(T,r),type:k,state:i};o.push(B)}if(o.length===0){const B=this.getLastNalUnit(e.samples);B&&(B.data=ht(B.data,t))}return e.naluState=i,o}}class Sn{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&&me.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 Un extends pn{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,o,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 m,g;switch(c.type){case 1:{let oe=!1;o=!0;const ae=c.data;if(d&&ae.length>4){const De=this.readSliceType(ae);(De===2||De===4||De===7||De===9)&&(oe=!0)}if(oe){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=oe;break}case 5:o=!0,(m=s)!=null&&m.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:{o=!0,pt(c.data,1,n.pts,t.samples);break}case 7:{var k,B;o=!0,d=!0;const oe=c.data,ae=this.readSPS(oe);if(!e.sps||e.width!==ae.width||e.height!==ae.height||((k=e.pixelRatio)==null?void 0:k[0])!==ae.pixelRatio[0]||((B=e.pixelRatio)==null?void 0:B[1])!==ae.pixelRatio[1]){e.width=ae.width,e.height=ae.height,e.pixelRatio=ae.pixelRatio,e.sps=[oe];const De=oe.subarray(1,4);let Me="avc1.";for(let ze=0;ze<3;ze++){let dt=De[ze].toString(16);dt.length<2&&(dt="0"+dt),Me+=dt}e.codec=Me}break}case 8:o=!0,e.pps=[c.data];break;case 9:o=!0,e.audFound=!0,(g=s)!=null&&g.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:o=!0;break;default:o=!1;break}s&&o&&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 Sn(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 Sn(e);let n=0,r=0,i=0,s=0,o,d,c;const m=t.readUByte.bind(t),g=t.readBits.bind(t),T=t.readUEG.bind(t),k=t.readBoolean.bind(t),B=t.skipBits.bind(t),oe=t.skipEG.bind(t),ae=t.skipUEG.bind(t),De=this.skipScalingList.bind(this);m();const Me=m();if(g(5),B(3),m(),ae(),Me===100||Me===110||Me===122||Me===244||Me===44||Me===83||Me===86||Me===118||Me===128){const Kt=T();if(Kt===3&&B(1),ae(),ae(),B(1),k())for(d=Kt!==3?8:12,c=0;c<d;c++)k()&&(c<6?De(16,t):De(64,t))}ae();const ze=T();if(ze===0)T();else if(ze===1)for(B(1),oe(),oe(),o=T(),c=0;c<o;c++)oe();ae(),B(1);const dt=T(),Tt=T(),Yt=g(1);Yt===0&&B(1),B(1),k()&&(n=T(),r=T(),i=T(),s=T());let At=[1,1];if(k()&&k())switch(m()){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=[m()<<8|m(),m()<<8|m()];break}}return{width:Math.ceil((dt+1)*16-n*2-r*2),height:(2-Yt)*(Tt+1)*16-(Yt?2:4)*(i+s),pixelRatio:At}}}class ar extends pn{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,o,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 m,g;switch(c.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.frame=!0,o=!0;break;case 16:case 17:case 18:case 21:if(o=!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:o=!0,(m=s)!=null&&m.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:o=!0,pt(c.data,2,n.pts,t.samples);break;case 32:o=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=_(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(o=!0,d=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],c.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const k=this.readSPS(c.data);e.width=k.width,e.height=k.height,e.pixelRatio=k.pixelRatio,e.codec=k.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const B in k.params)e.params[B]=k.params[B]}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(o=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const k=this.readPPS(c.data);for(const B in k)e.params[B]=k[B]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:o=!0,e.audFound=!0,(g=s)!=null&&g.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:o=!1;break}s&&o&&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 Sn(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 Sn(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),o=t.readUByte(),d=t.readUByte(),c=t.readUByte(),m=t.readUByte(),g=t.readUByte(),T=t.readUByte(),k=t.readUByte(),B=t.readUByte(),oe=t.readUByte(),ae=t.readUByte(),De=t.readUByte(),Me=[],ze=[];for(let ti=0;ti<n;ti++)Me.push(t.readBoolean()),ze.push(t.readBoolean());if(n>0)for(let ti=n;ti<8;ti++)t.readBits(2);for(let ti=0;ti<n;ti++)Me[ti]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),ze[ti]&&t.readUByte();t.readUEG();const dt=t.readUEG();dt==3&&t.skipBits(1);const Tt=t.readUEG(),Yt=t.readUEG(),At=t.readBoolean();let Kt=0,Ht=0,Lt=0,hn=0;At&&(Kt+=t.readUEG(),Ht+=t.readUEG(),Lt+=t.readUEG(),hn+=t.readUEG());const Wn=t.readUEG(),rr=t.readUEG(),yr=t.readUEG(),ir=t.readBoolean();for(let ti=ir?0:n;ti<=n;ti++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let Ki=0;Ki<4;Ki++)for(let us=0;us<(Ki===3?2:6);us++)if(!t.readBoolean())t.readUEG();else{const ps=Math.min(64,1<<4+(Ki<<1));Ki>1&&t.readEG();for(let wa=0;wa<ps;wa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Qn=t.readUEG();let hr=0;for(let ti=0;ti<Qn;ti++){let Ki=!1;if(ti!==0&&(Ki=t.readBoolean()),Ki){ti===Qn&&t.readUEG(),t.readBoolean(),t.readUEG();let us=0;for(let ca=0;ca<=hr;ca++){const ps=t.readBoolean();let wa=!1;ps||(wa=t.readBoolean()),(ps||wa)&&us++}hr=us}else{const us=t.readUEG(),ca=t.readUEG();hr=us+ca;for(let ps=0;ps<us;ps++)t.readUEG(),t.readBoolean();for(let ps=0;ps<ca;ps++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const ti=t.readUEG();for(let Ki=0;Ki<ti;Ki++){for(let us=0;us<yr+4;us++)t.readBits(1);t.readBits(1)}}let Kn=0,Gn=1,Nr=1,ii=!0,Ur=1,Gr=0;t.readBoolean(),t.readBoolean();let Hi=!1;if(t.readBoolean()){if(t.readBoolean()){const da=t.readUByte(),pu=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],To=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];da>0&&da<16?(Gn=pu[da-1],Nr=To[da-1]):da===255&&(Gn=t.readBits(16),Nr=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(),Hi=t.readBoolean(),Hi&&(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG()),t.readBoolean()&&(Ur=t.readBits(32),Gr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const To=t.readBoolean(),gu=t.readBoolean();let Ua=!1;(To||gu)&&(Ua=t.readBoolean(),Ua&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Ua&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let vu=0;vu<=n;vu++){ii=t.readBoolean();const K0=ii||t.readBoolean();let yu=!1;K0?t.readEG():yu=t.readBoolean();const _u=yu?1:t.readUEG()+1;if(To)for(let ja=0;ja<_u;ja++)t.readUEG(),t.readUEG(),Ua&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(gu)for(let ja=0;ja<_u;ja++)t.readUEG(),t.readUEG(),Ua&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Kn=t.readUEG())}let ls=Tt,Ts=Yt;if(At){let ti=1,Ki=1;dt===1?ti=Ki=2:dt==2&&(ti=2),ls=Tt-ti*Ht-ti*Kt,Ts=Yt-Ki*hn-Ki*Lt}const ua=r?["A","B","C"][r]:"",H0=o<<24|d<<16|c<<8|m;let hl=0;for(let ti=0;ti<32;ti++)hl=(hl|(H0>>ti&1)<<31-ti)>>>0;let fl=hl.toString(16);return s===1&&fl==="2"&&(fl="6"),{codecString:`hvc1.${ua}${s}.${fl}.${i?"H":"L"}${De}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[o,d,c,m],general_constraint_indicator_flags:[g,T,k,B,oe,ae],general_level_idc:De,bit_depth:Wn+8,bit_depth_luma_minus8:Wn,bit_depth_chroma_minus8:rr,min_spatial_segmentation_idc:Kn,chroma_format_idc:dt,frame_rate:{fixed:ii,fps:Gr/Ur}},width:ls,height:Ts,pixelRatio:[Gn,Nr]}}readPPS(e){const t=new Sn(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 cr=188;class Ar{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=Ar.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(cr*5,t-cr)+1,r=0;for(;r<n;){let i=!1,s=-1,o=0;for(let d=r;d<t;d+=cr)if(e[d]===71&&(t-d===cr||e[d+cr]===71)){if(o++,s===-1&&(s=d,s!==0&&(n=Math.min(s+cr*99,e.length-cr)+1)),i||(i=Or(e,d)===0),i&&o>1&&(s===0&&o>2||d+cr>n))return s}else{if(o)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:kt[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=Ar.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=Ar.createTrack("audio",r),this._id3Track=Ar.createTrack("id3"),this._txtTrack=Ar.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,o=this._audioTrack,d=this._id3Track,c=this._txtTrack;let m=s.pid,g=s.pesData,T=o.pid,k=d.pid,B=o.pesData,oe=d.pesData,ae=null,De=this.pmtParsed,Me=this._pmtId,ze=e.length;if(this.remainderData&&(e=ht(this.remainderData,e),ze=e.length,this.remainderData=null),ze<cr&&!r)return this.remainderData=e,{audioTrack:o,videoTrack:s,id3Track:d,textTrack:c};const dt=Math.max(0,Ar.syncOffset(e));ze-=(ze-dt)%cr,ze<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,ze,e.buffer.byteLength-ze));let Tt=0;for(let At=dt;At<ze;At+=cr)if(e[At]===71){const Kt=!!(e[At+1]&64),Ht=Or(e,At),Lt=(e[At+3]&48)>>4;let hn;if(Lt>1){if(hn=At+5+e[At+4],hn===At+cr)continue}else hn=At+4;switch(Ht){case m:Kt&&(g&&(i=ai(g,this.logger))&&(this.readyVideoParser(s.segmentCodec),this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)),g={data:[],size:0}),g&&(g.data.push(e.subarray(hn,At+cr)),g.size+=At+cr-hn);break;case T:if(Kt){if(B&&(i=ai(B,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,i);break;case"mp3":this.parseMPEGPES(o,i);break;case"ac3":this.parseAC3PES(o,i);break}B={data:[],size:0}}B&&(B.data.push(e.subarray(hn,At+cr)),B.size+=At+cr-hn);break;case k:Kt&&(oe&&(i=ai(oe,this.logger))&&this.parseID3PES(d,i),oe={data:[],size:0}),oe&&(oe.data.push(e.subarray(hn,At+cr)),oe.size+=At+cr-hn);break;case 0:Kt&&(hn+=e[hn]+1),Me=this._pmtId=li(e,hn);break;case Me:{Kt&&(hn+=e[hn]+1);const Wn=ri(e,hn,this.typeSupported,n,this.observer,this.logger);m=Wn.videoPid,m>0&&(s.pid=m,s.segmentCodec=Wn.segmentVideoCodec),T=Wn.audioPid,T>0&&(o.pid=T,o.segmentCodec=Wn.segmentAudioCodec),k=Wn.id3Pid,k>0&&(d.pid=k),ae!==null&&!De&&(this.logger.warn(`MPEG-TS PMT found at ${At} after unknown PID '${ae}'. Backtracking to sync byte @${dt} to parse all TS packets.`),ae=null,At=dt-188),De=this.pmtParsed=!0;break}case 17:case 8191:break;default:ae=Ht;break}}else Tt++;Tt>0&&ui(this.observer,new Error(`Found ${Tt} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=g,o.pesData=B,d.pesData=oe;const Yt={audioTrack:o,videoTrack:s,id3Track:d,textTrack:c};return r&&this.extractRemainingSamples(Yt),Yt}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,o=t.pesData,d=r.pesData;let c;if(s&&(c=ai(s,this.logger))?(this.readyVideoParser(n.segmentCodec),this.videoParser!==null&&(this.videoParser.parsePES(n,i,c,!0),n.pesData=null)):n.pesData=s,o&&(c=ai(o,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);break}t.pesData=null}else o!=null&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;d&&(c=ai(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 Un:e==="hevc"&&(this.videoParser=new ar))}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const g=r.missing,T=r.sample.unit.byteLength;if(g===-1)i=ht(r.sample.unit,i);else{const k=T-g;r.sample.unit.set(i.subarray(0,g),k),e.samples.push(r.sample),n=r.missing}}let s,o;for(s=n,o=i.length;s<o-1&&!ma(i,s);s++);if(s!==n){let g;const T=s<o-1;if(T?g=`AAC PES did not start with ADTS header,offset:${s}`:g="No ADTS header found in AAC PES",ui(this.observer,new Error(g),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 g=Xa(e.samplerate);d=r.sample.pts+g}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,m;for(;s<o;)if(m=Qa(e,i,s,d,c),s+=m.length,m.missing){this.aacOverFlow=m;break}else for(c++;s<o-1&&!ma(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const o=t.pts;if(o===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(u(n,s)){const d=oo(e,n,s,o,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,o=0,d;for(;o<i&&(d=be(e,n,o,r,s++))>0;)o+=d}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=_({},t,{type:this._videoTrack?Fi.emsg:Fi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function Or(a,e){return((a[e+1]&31)<<8)+a[e+2]}function li(a,e){return(a[e+10]&31)<<8|a[e+11]}function ri(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=(a[e+1]&15)<<8|a[e+2],d=e+3+o-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<d;){const m=Or(a,e),g=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){ci("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=m);break;case 21:s.id3Pid===-1&&(s.id3Pid=m);break;case 219:if(!n){ci("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=m);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=m,s.segmentAudioCodec="mp3");break;case 193:if(!n){ci("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=m,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&g>0){let T=e+5,k=g;for(;k>2;){switch(a[T]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=m,s.segmentAudioCodec="ac3");break}const oe=a[T+1]+2;T+=oe,k-=oe}}break;case 194:case 135:return ui(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=m,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=g+5}return s}function ui(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(p.ERROR,p.ERROR,{type:de.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function ci(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function ai(a,e){let t=0,n,r,i,s,o;const d=a.data;if(!a||a.size===0)return null;for(;d[0].length<19&&d.length>1;)d[0]=ht(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 m=n[7];m&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,m&64?(o=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-o>60*9e4&&(e.warn(`${Math.round((s-o)/9e4)}s delta between PTS and DTS, align them`),s=o)):o=s),i=n[8];let g=i+9;if(a.size<=g)return null;a.size-=g;const T=new Uint8Array(a.size);for(let k=0,B=d.length;k<B;k++){n=d[k];let oe=n.byteLength;if(g)if(g>oe){g-=oe;continue}else n=n.subarray(g),oe-=g,g=0;T.set(n,t),t+=oe}return r&&(r-=i+3),{data:T,pts:s,dts:o,len:r}}return null}class Ni{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 mi=Math.pow(2,32)-1;class wt{static init(){wt.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 wt.types)wt.types.hasOwnProperty(e)&&(wt.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]);wt.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]);wt.STTS=wt.STSC=wt.STCO=i,wt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),wt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),wt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),wt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);wt.FTYP=wt.box(wt.types.ftyp,s,d,s,o),wt.DINF=wt.box(wt.types.dinf,wt.box(wt.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 wt.box(wt.types.hdlr,wt.HDLR_TYPES[e])}static mdat(e){return wt.box(wt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(mi+1)),r=Math.floor(t%(mi+1));return wt.box(wt.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 wt.box(wt.types.mdia,wt.mdhd(e.timescale||0,e.duration||0),wt.hdlr(e.type),wt.minf(e))}static mfhd(e){return wt.box(wt.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"?wt.box(wt.types.minf,wt.box(wt.types.smhd,wt.SMHD),wt.DINF,wt.stbl(e)):wt.box(wt.types.minf,wt.box(wt.types.vmhd,wt.VMHD),wt.DINF,wt.stbl(e))}static moof(e,t,n){return wt.box(wt.types.moof,wt.mfhd(e),wt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=wt.trak(e[t]);return wt.box.apply(null,[wt.types.moov,wt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(wt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=wt.trex(e[t]);return wt.box.apply(null,[wt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(mi+1)),r=Math.floor(t%(mi+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 wt.box(wt.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 wt.box(wt.types.sdtp,n)}static stbl(e){return wt.box(wt.types.stbl,wt.stsd(e),wt.box(wt.types.stts,wt.STTS),wt.box(wt.types.stsc,wt.STSC),wt.box(wt.types.stsz,wt.STSZ),wt.box(wt.types.stco,wt.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 o=wt.box(wt.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,m=e.pixelRatio[0],g=e.pixelRatio[1];return wt.box(wt.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]),o,wt.box(wt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),wt.box(wt.types.pasp,new Uint8Array([m>>24,m>>16&255,m>>8&255,m&255,g>>24,g>>16&255,g>>8&255,g&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return wt.box(wt.types.mp4a,wt.audioStsd(e),wt.box(wt.types.esds,wt.esds(e)))}static mp3(e){return wt.box(wt.types[".mp3"],wt.audioStsd(e))}static ac3(e){return wt.box(wt.types["ac-3"],wt.audioStsd(e),wt.box(wt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return wt.box(wt.types.stsd,wt.STSD,wt.mp4a(e));if(t==="ac3"&&e.config)return wt.box(wt.types.stsd,wt.STSD,wt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return wt.box(wt.types.stsd,wt.STSD,wt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return wt.box(wt.types.stsd,wt.STSD,wt.avc1(e));if(t==="hevc"&&e.vps)return wt.box(wt.types.stsd,wt.STSD,wt.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/(mi+1)),o=Math.floor(n%(mi+1));return wt.box(wt.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=wt.sdtp(e),r=e.id,i=Math.floor(t/(mi+1)),s=Math.floor(t%(mi+1));return wt.box(wt.types.traf,wt.box(wt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),wt.box(wt.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])),wt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,wt.box(wt.types.trak,wt.tkhd(e),wt.mdia(e))}static trex(e){const t=e.id;return wt.box(wt.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 o,d,c,m,g,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),o=0;o<r;o++)d=n[o],c=d.duration,m=d.size,g=d.flags,T=d.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,m>>>24&255,m>>>16&255,m>>>8&255,m&255,g.isLeading<<2|g.dependsOn,g.isDependedOn<<6|g.hasRedundancy<<4|g.paddingValue<<1|g.isNonSync,g.degradPrio&61440,g.degradPrio&15,T>>>24&255,T>>>16&255,T>>>8&255,T&255],12+16*o);return wt.box(wt.types.trun,s)}static initSegment(e){wt.types||wt.init();const t=wt.moov(e);return ht(wt.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 B=0;B<n.length;B+=1){s+=3;for(let oe=0;oe<n[B].length;oe+=1)s+=2+n[B][oe].length}const o=new Uint8Array(s);o.set(i,0),s=i.length;const d=n.length-1;for(let B=0;B<n.length;B+=1){o.set(new Uint8Array([32+B|(B===d?128:0),0,n[B].length]),s),s+=3;for(let oe=0;oe<n[B].length;oe+=1)o.set(new Uint8Array([n[B][oe].length>>8,n[B][oe].length&255]),s),s+=2,o.set(n[B][oe],s),s+=n[B][oe].length}const c=wt.box(wt.types.hvcC,o),m=e.width,g=e.height,T=e.pixelRatio[0],k=e.pixelRatio[1];return wt.box(wt.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,m>>8&255,m&255,g>>8&255,g&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,wt.box(wt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),wt.box(wt.types.pasp,new Uint8Array([T>>24,T>>16&255,T>>8&255,T&255,k>>24,k>>16&255,k>>8&255,k&255])))}}wt.types=void 0,wt.HDLR_TYPES=void 0,wt.STTS=void 0,wt.STSC=void 0,wt.STCO=void 0,wt.STSZ=void 0,wt.VMHD=void 0,wt.SMHD=void 0,wt.STSD=void 0,wt.FTYP=void 0,wt.DINF=void 0;const Vi=9e4;function as(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function es(a,e,t=1,n=!1){return as(a,e,1/t,n)}function bi(a,e=!1){return as(a,1e3,1/Vi,e)}function xs(a,e=1){return as(a,Vi,1/e)}function os(a){const{baseTime:e,timescale:t,trackId:n}=a;return`${e/t} (${e}/${t}) trackId: ${n}`}const lo=10*1e3,Fo=1024,Gs=1152,Ws=1536;let ts=null,Vs=null;function sa(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 va extends J{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,ts===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ts=s?parseInt(s[1]):0}if(Vs===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Vs=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&&os(t)} > ${e&&os(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 o=s.pts,d=o-i;return d<-4294967296&&(t=!0,o=Zi(o,n),d=o-i),d>0?i:o},n);return t&&this.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,o,d){let c,m,g,T,k,B,oe=i,ae=i;const De=e.pid>-1,Me=t.pid>-1,ze=t.samples.length,dt=e.samples.length>0,Tt=o&&ze>0||ze>1;if((!De||dt)&&(!Me||Tt)||this.ISGenerated||o){if(this.ISGenerated){var At,Kt,Ht,Lt;const yr=this.videoTrackConfig;(yr&&(t.width!==yr.width||t.height!==yr.height||((At=t.pixelRatio)==null?void 0:At[0])!==((Kt=yr.pixelRatio)==null?void 0:Kt[0])||((Ht=t.pixelRatio)==null?void 0:Ht[1])!==((Lt=yr.pixelRatio)==null?void 0:Lt[1]))||!yr&&Tt||this.nextAudioTs===null&&dt)&&this.resetInitSegment()}this.ISGenerated||(g=this.generateIS(e,t,i,s));const hn=this.isVideoContiguous;let Wn=-1,rr;if(Tt&&(Wn=No(t.samples),!hn&&this.config.forceKeyFrameOnDiscontinuity))if(B=!0,Wn>0){this.warn(`Dropped ${Wn} out of ${ze} video samples due to a missing keyframe`);const yr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Wn),t.dropped+=Wn,ae+=(t.samples[0].pts-yr)/t.inputTimeScale,rr=ae}else Wn===-1&&(this.warn(`No keyframe found out of ${ze} video samples`),B=!1);if(this.ISGenerated){if(dt&&Tt){const yr=this.getVideoStartPts(t.samples),Fn=(Zi(e.samples[0].pts,yr)-yr)/t.inputTimeScale;oe+=Math.max(0,Fn),ae+=Math.max(0,-Fn)}if(dt){if(e.samplerate||(this.warn("regenerate InitSegment as audio detected"),g=this.generateIS(e,t,i,s)),m=this.remuxAudio(e,oe,this.isAudioContiguous,s,Me||Tt||d===le.AUDIO?ae:void 0),Tt){const yr=m?m.endPTS-m.startPTS:0;t.inputTimeScale||(this.warn("regenerate InitSegment as video detected"),g=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,ae,hn,yr)}}else Tt&&(c=this.remuxVideo(t,ae,hn,0));c&&(c.firstKeyFrame=Wn,c.independent=Wn!==-1,c.firstKeyFramePTS=rr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(k=ya(n,i,this._initPTS,this._initDTS)),r.samples.length&&(T=Fa(r,i,this._initPTS))),{audio:m,video:c,initSegment:g,independent:B,text:T,id3:k}}computeInitPts(e,t,n,r){const i=Math.round(n*t);let s=Zi(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,o=this.typeSupported,d={},c=this._initPTS;let m=!c||r,g="audio/mp4",T,k,B,oe=-1;if(m&&(T=k=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(g="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}d.audio={id:"audio",container:g,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):wt.initSegment([e]),metadata:{channelCount:e.channelCount}},m&&(oe=e.id,B=e.inputTimeScale,!c||B!==c.timescale?T=k=this.computeInitPts(i[0].pts,B,n,"audio"):m=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:wt.initSegment([t]),metadata:{width:t.width,height:t.height}},m)if(oe=t.id,B=t.inputTimeScale,!c||B!==c.timescale){const ae=this.getVideoStartPts(s),De=Zi(s[0].dts,ae),Me=this.computeInitPts(De,B,n,"video"),ze=this.computeInitPts(ae,B,n,"video");k=Math.min(k,Me),T=Math.min(T,ze)}else m=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(d).length)return this.ISGenerated=!0,m?(c&&this.warn(`Timestamps at playlist time: ${r?"":"~"}${n} ${T/B} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${n} offset: ${T/B} (${T}/${B}) trackId: ${oe}`),this._initPTS={baseTime:T,timescale:B,trackId:oe},this._initDTS={baseTime:k,timescale:B,trackId:oe}):T=B=void 0,{tracks:d,initPTS:T,timescale:B,trackId:oe}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,o=[],d=s.length,c=this._initPTS,m=c.baseTime*i/c.timescale;let g=this.nextVideoTs,T=8,k=this.videoSampleDuration,B,oe,ae=Number.POSITIVE_INFINITY,De=Number.NEGATIVE_INFINITY,Me=!1;if(!n||g===null){const Kn=m+t*i,Gn=s[0].pts-Zi(s[0].dts,s[0].pts);ts&&g!==null&&Math.abs(Kn-Gn-(g+m))<15e3?n=!0:g=Kn-Gn-m}const ze=g+m;for(let Kn=0;Kn<d;Kn++){const Gn=s[Kn];Gn.pts=Zi(Gn.pts,ze),Gn.dts=Zi(Gn.dts,ze),Gn.dts<s[Kn>0?Kn-1:Kn].dts&&(Me=!0)}Me&&s.sort(function(Kn,Gn){const Nr=Kn.dts-Gn.dts,ii=Kn.pts-Gn.pts;return Nr||ii}),B=s[0].dts,oe=s[s.length-1].dts;const dt=oe-B,Tt=dt?Math.round(dt/(d-1)):k||e.inputTimeScale/30;if(n){const Kn=B-ze,Gn=Kn>Tt,Nr=Kn<-1;if((Gn||Nr)&&(Gn?this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${bi(Kn,!0)} ms (${Kn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.warn(`${(e.segmentCodec||"").toUpperCase()}: ${bi(-Kn,!0)} ms (${Kn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Nr||ze>=s[0].pts||ts)){B=ze;const ii=s[0].pts-Kn;if(Gn)s[0].dts=B,s[0].pts=ii;else{let Ur=!0;for(let Gr=0;Gr<s.length&&!(s[Gr].dts>ii&&Ur);Gr++){const Hi=s[Gr].pts;if(s[Gr].dts-=Kn,s[Gr].pts-=Kn,Gr<s.length-1){const Ui=s[Gr+1].pts,ls=s[Gr].pts,Ts=Ui<=ls,ua=Ui<=Hi;Ur=Ts==ua}}}this.log(`Video: Initial PTS/DTS adjusted: ${bi(ii,!0)}/${bi(B,!0)}, delta: ${bi(Kn,!0)} ms`)}}B=Math.max(0,B);let Yt=0,At=0,Kt=B;for(let Kn=0;Kn<d;Kn++){const Gn=s[Kn],Nr=Gn.units,ii=Nr.length;let Ur=0;for(let Gr=0;Gr<ii;Gr++)Ur+=Nr[Gr].data.length;At+=Ur,Yt+=ii,Gn.length=Ur,Gn.dts<Kt?(Gn.dts=Kt,Kt+=Tt/4|0||1):Kt=Gn.dts,ae=Math.min(Gn.pts,ae),De=Math.max(Gn.pts,De)}oe=s[d-1].dts;const Ht=At+4*Yt+8;let Lt;try{Lt=new Uint8Array(Ht)}catch(Kn){this.observer.emit(p.ERROR,p.ERROR,{type:de.MUX_ERROR,details:$.REMUX_ALLOC_ERROR,fatal:!1,error:Kn,bytes:Ht,reason:`fail allocating video mdat ${Ht}`});return}const hn=new DataView(Lt.buffer);hn.setUint32(0,Ht),Lt.set(wt.types.mdat,4);let Wn=!1,rr=Number.POSITIVE_INFINITY,yr=Number.POSITIVE_INFINITY,ir=Number.NEGATIVE_INFINITY,Fn=Number.NEGATIVE_INFINITY;for(let Kn=0;Kn<d;Kn++){const Gn=s[Kn],Nr=Gn.units;let ii=0;for(let Hi=0,Ui=Nr.length;Hi<Ui;Hi++){const ls=Nr[Hi],Ts=ls.data,ua=ls.data.byteLength;hn.setUint32(T,ua),T+=4,Lt.set(Ts,T),T+=ua,ii+=4+ua}let Ur;if(Kn<d-1)k=s[Kn+1].dts-Gn.dts,Ur=s[Kn+1].pts-Gn.pts;else{const Hi=this.config,Ui=Kn>0?Gn.dts-s[Kn-1].dts:Tt;if(Ur=Kn>0?Gn.pts-s[Kn-1].pts:Tt,Hi.stretchShortVideoTrack&&this.nextAudioTs!==null){const ls=Math.floor(Hi.maxBufferHole*i),Ts=(r?ae+r*i:this.nextAudioTs+m)-Gn.pts;Ts>ls?(k=Ts-Ui,k<0?k=Ui:Wn=!0,this.log(`It is approximately ${Ts/90} ms to the next segment; using duration ${k/90} ms for the last video frame.`)):k=Ui}else k=Ui}const Gr=Math.round(Gn.pts-Gn.dts);rr=Math.min(rr,k),ir=Math.max(ir,k),yr=Math.min(yr,Ur),Fn=Math.max(Fn,Ur),o.push(sa(Gn.key,k,ii,Gr))}if(o.length){if(ts){if(ts<70){const Kn=o[0].flags;Kn.dependsOn=2,Kn.isNonSync=0}}else if(Vs&&Fn-yr<ir-rr&&Tt/ir<.025&&o[0].cts===0){this.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Kn=B;for(let Gn=0,Nr=o.length;Gn<Nr;Gn++){const ii=Kn+o[Gn].duration,Ur=Kn+o[Gn].cts;if(Gn<Nr-1){const Gr=ii+o[Gn+1].cts;o[Gn].duration=Gr-Ur}else o[Gn].duration=Gn?o[Gn-1].duration:Tt;o[Gn].cts=0,Kn=ii}}}k=Wn||!k?Tt:k;const lr=oe+k;this.nextVideoTs=g=lr-m,this.videoSampleDuration=k,this.isVideoContiguous=!0;const Dr={data1:wt.moof(e.sequenceNumber++,B,_(e,{samples:o})),data2:Lt,startPTS:(ae-m)/i,endPTS:(De+k-m)/i,startDTS:(B-m)/i,endDTS:g/i,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Dr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Gs;case"ac3":return Ws;default:return Fo}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,o=e.samplerate?e.samplerate:s,d=s/o,c=this.getSamplesPerFrame(e),m=c*d,g=this._initPTS,T=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,k=[],B=i!==void 0;let oe=e.samples,ae=T?0:8,De=this.nextAudioTs||-1;const Me=g.baseTime*s/g.timescale,ze=Me+t*s;if(this.isAudioContiguous=n=n||oe.length&&De>0&&(r&&Math.abs(ze-(De+Me))<9e3||Math.abs(Zi(oe[0].pts,ze)-(De+Me))<20*m),oe.forEach(function(Fn){Fn.pts=Zi(Fn.pts,ze)}),!n||De<0){const Fn=oe.length;if(oe=oe.filter(lr=>lr.pts>=0),Fn!==oe.length&&this.warn(`Removed ${oe.length-Fn} of ${Fn} samples (initPTS ${Me} / ${s})`),!oe.length)return;i===0?De=0:r&&!B?De=Math.max(0,ze-Me):De=oe[0].pts-Me}if(e.segmentCodec==="aac"){const Fn=this.config.maxAudioFramesDrift;for(let lr=0,Qn=De+Me;lr<oe.length;lr++){const hr=oe[lr],Dr=hr.pts,Kn=Dr-Qn,Gn=Math.abs(1e3*Kn/s);if(Kn<=-Fn*m&&B)lr===0&&(this.warn(`Audio frame @ ${(Dr/s).toFixed(3)}s overlaps marker by ${Math.round(1e3*Kn/s)} ms.`),this.nextAudioTs=De=Dr-Me,Qn=Dr);else if(Kn>=Fn*m&&Gn<lo&&B){let Nr=Math.round(Kn/m);for(Qn=Dr-Nr*m;Qn<0&&Nr&&m;)Nr--,Qn+=m;lr===0&&(this.nextAudioTs=De=Qn-Me),this.warn(`Injecting ${Nr} audio frames @ ${((Qn-Me)/s).toFixed(3)}s due to ${Math.round(1e3*Kn/s)} ms gap.`);for(let ii=0;ii<Nr;ii++){let Ur=Ni.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);Ur||(this.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),Ur=hr.unit.subarray()),oe.splice(lr,0,{unit:Ur,pts:Qn}),Qn+=m,lr++}}hr.pts=Qn,Qn+=m}}let dt=null,Tt=null,Yt,At=0,Kt=oe.length;for(;Kt--;)At+=oe[Kt].unit.byteLength;for(let Fn=0,lr=oe.length;Fn<lr;Fn++){const Qn=oe[Fn],hr=Qn.unit;let Dr=Qn.pts;if(Tt!==null){const Gn=k[Fn-1];Gn.duration=Math.round((Dr-Tt)/d)}else if(n&&e.segmentCodec==="aac"&&(Dr=De+Me),dt=Dr,At>0){At+=ae;try{Yt=new Uint8Array(At)}catch(Gn){this.observer.emit(p.ERROR,p.ERROR,{type:de.MUX_ERROR,details:$.REMUX_ALLOC_ERROR,fatal:!1,error:Gn,bytes:At,reason:`fail allocating audio mdat ${At}`});return}T||(new DataView(Yt.buffer).setUint32(0,At),Yt.set(wt.types.mdat,4))}else return;Yt.set(hr,ae);const Kn=hr.byteLength;ae+=Kn,k.push(sa(!0,c,Kn,0)),Tt=Dr}const Ht=k.length;if(!Ht)return;const Lt=k[k.length-1];De=Tt-Me,this.nextAudioTs=De+d*Lt.duration;const hn=T?new Uint8Array(0):wt.moof(e.sequenceNumber++,dt/d,_({},e,{samples:k}));e.samples=[];const Wn=(dt-Me)/s,rr=this.nextAudioTs/s,ir={data1:hn,data2:Yt,startPTS:Wn,endPTS:rr,startDTS:Wn,endDTS:rr,type:"audio",hasAudio:!0,hasVideo:!1,nb:Ht};return this.isAudioContiguous=!0,ir}}function Zi(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 ya(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let o=0;o<r;o++){const d=a.samples[o];d.pts=Zi(d.pts-t.baseTime*i/t.timescale,e*i)/i,d.dts=Zi(d.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function Fa(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const o=a.samples[s];o.pts=Zi(o.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,o)=>s.pts-o.pts);const i=a.samples;return a.samples=[],{samples:i}}class uo extends J{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=Ce(e);if(t)rt(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,Z.AUDIO,this)),s&&(r=ml(s,Z.VIDEO,this));const o={};i&&s?o.audiovideo={container:"video/mp4",codec:n+","+r,supplemental:s.supplemental,encrypted:s.encrypted,initSegment:e,id:"main"}:i?o.audio={container:"audio/mp4",codec:n,encrypted:i.encrypted,initSegment:e,id:"audio"}:s?o.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=o}remux(e,t,n,r,i,s){var o,d;let{initPTS:c,lastEndTime:m}=this;const g={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};y(m)||(m=this.lastEndTime=i||0);const T=t.samples;if(!T.length)return g;const k={initPTS:void 0,timescale:void 0,trackId:void 0};let B=this.initData;if((o=B)!=null&&o.length||(this.generateInitSegment(T),B=this.initData),!((d=B)!=null&&d.length))return this.warn("Failed to generate initSegment."),g;this.emitInitSegment&&(k.tracks=this.initTracks,this.emitInitSegment=!1);const oe=lt(T,B,this),ae=B.audio?oe[B.audio.id]:null,De=B.video?oe[B.video.id]:null,Me=aa(De,1/0),ze=aa(ae,1/0),dt=aa(De,0,!0),Tt=aa(ae,0,!0);let Yt=i,At=0;const Kt=ae&&(!De||!c&&ze<Me||c&&c.trackId===B.audio.id),Ht=Kt?ae:De;if(Ht){const Qn=Ht.timescale,hr=Ht.start-i*Qn,Dr=Kt?B.audio.id:B.video.id;Yt=Ht.start/Qn,At=Kt?Tt-ze:dt-Me,(s||!c)&&(_a(c,Yt,i,At)||Qn!==c.timescale)&&(c&&this.warn(`Timestamps at playlist time: ${s?"":"~"}${i} ${hr/Qn} != initPTS: ${c.baseTime/c.timescale} (${c.baseTime}/${c.timescale}) trackId: ${c.trackId}`),this.log(`Found initPTS at playlist time: ${i} offset: ${Yt-i} (${hr}/${Qn}) trackId: ${Dr}`),c=null,k.initPTS=hr,k.timescale=Qn,k.trackId=Dr)}else this.warn(`No audio or video samples found for initPTS at playlist time: ${i}`);c?(k.initPTS=c.baseTime,k.timescale=c.timescale,k.trackId=c.trackId):((!k.timescale||k.trackId===void 0||k.initPTS===void 0)&&(this.warn("Could not set initPTS"),k.initPTS=Yt,k.timescale=1,k.trackId=-1),this.initPTS=c={baseTime:k.initPTS,timescale:k.timescale,trackId:k.trackId});const Lt=Yt-c.baseTime/c.timescale,hn=Lt+At;At>0?this.lastEndTime=hn:(this.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const Wn=!!B.audio,rr=!!B.video;let yr="";Wn&&(yr+="audio"),rr&&(yr+="video");const ir=(B.audio?B.audio.encrypted:!1)||(B.video?B.video.encrypted:!1),Fn={data1:T,startPTS:Lt,startDTS:Lt,endPTS:hn,endDTS:hn,type:yr,hasAudio:Wn,hasVideo:rr,nb:1,dropped:0,encrypted:ir};g.audio=Wn&&!rr?Fn:void 0,g.video=rr?Fn:void 0;const lr=De==null?void 0:De.sampleCount;if(lr){const Qn=De.keyFrameIndex,hr=Qn!==-1;Fn.nb=lr,Fn.dropped=Qn===0||this.isVideoContiguous?0:hr?Qn:lr,Fn.independent=hr,Fn.firstKeyFrame=Qn,hr&&De.keyFrameStart&&(Fn.firstKeyFramePTS=(De.keyFrameStart-c.baseTime)/c.timescale),this.isVideoContiguous||(g.independent=hr),this.isVideoContiguous||(this.isVideoContiguous=hr),Fn.dropped&&this.warn(`fmp4 does not start with IDR: firstIDR ${Qn}/${lr} dropped: ${Fn.dropped} start: ${Fn.firstKeyFramePTS||"NA"}`)}return g.initSegment=k,g.id3=ya(n,i,c,c),r.samples.length&&(g.text=Fa(r,i,c)),g}}function aa(a,e,t=!1){return(a==null?void 0:a.start)!==void 0?(a.start+(t?a.duration:0))/a.timescale:e}function _a(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===Z.AUDIO?n==="ec-3"||n==="ac-3"||n==="alac"?n:n==="fLaC"||n==="Opus"?Ee(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 Ls;try{Ls=self.performance.now.bind(self.performance)}catch(a){Ls=Date.now}const co=[{demux:vt,remux:uo},{demux:Ar,remux:va},{demux:v,remux:va},{demux:Ie,remux:va}];co.splice(2,0,{demux:j,remux:va});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=Ls();let s=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:d}=this;r&&(this.currentTransmuxState=r);const{contiguous:c,discontinuity:m,trackSwitch:g,accurateTimeOffset:T,timeOffset:k,initSegmentChange:B}=r||o,{audioCodec:oe,videoCodec:ae,defaultInitPts:De,duration:Me,initSegmentData:ze}=d,dt=Su(s,t);if(dt&&tr(dt.method)){const Kt=this.getDecrypter(),Ht=mr(dt.method);if(Kt.isSync()){let Lt=Kt.softwareDecrypt(s,dt.key.buffer,dt.iv.buffer,Ht);if(n.part>-1){const Wn=Kt.flush();Lt=Wn&&Wn.buffer}if(!Lt)return i.executeEnd=Ls(),$o(n);s=new Uint8Array(Lt)}else return this.asyncResult=!0,this.decryptionPromise=Kt.webCryptoDecrypt(s,dt.key.buffer,dt.iv.buffer,Ht).then(Lt=>{const hn=this.push(Lt,null,n);return this.decryptionPromise=null,hn}),this.decryptionPromise}const Tt=this.needsProbing(m,g);if(Tt){const Kt=this.configureTransmuxer(s);if(Kt)return this.logger.warn(`[transmuxer] ${Kt.message}`),this.observer.emit(p.ERROR,p.ERROR,{type:de.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!1,error:Kt,reason:Kt.message}),i.executeEnd=Ls(),$o(n)}(m||g||B||Tt)&&this.resetInitSegment(ze,oe,ae,Me,t),(m||B||Tt)&&this.resetInitialTimestamp(De),c||this.resetContiguity();const Yt=this.transmux(s,dt,k,T,n);this.asyncResult=Na(Yt);const At=this.currentTransmuxState;return At.contiguous=!0,At.discontinuity=!1,At.trackSwitch=!1,i.executeEnd=Ls(),Yt}flush(e){const t=e.transmuxing;t.executeStart=Ls();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:o}=r;if(n){const g=n.flush();g&&s.push(this.push(g.buffer,null,e))}const{demuxer:d,remuxer:c}=this;if(!d||!c){t.executeEnd=Ls();const g=[$o(e)];return this.asyncResult?Promise.resolve(g):g}const m=d.flush(o);return Na(m)?(this.asyncResult=!0,m.then(g=>(this.flushRemux(s,g,e),s))):(this.flushRemux(s,m,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:o}=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===le.MAIN?"level":"track"} ${n.level}`);const m=this.remuxer.remux(r,i,s,o,c,d,!0,this.id);e.push({remuxResult:m,chunkMeta:n}),n.transmuxing.executeEnd=Ls()}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:o}=this;!s||!o||(s.resetInitSegment(e,t,n,r),o.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:o,textTrack:d}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,o,d,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let g=0,T=co.length;g<T;g++){var s;if((s=co[g].demux)!=null&&s.probe(e,this.logger)){i=co[g];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,d=this.remuxer,c=i.remux,m=i.demux;(!d||!(d instanceof c))&&(this.remuxer=new c(n,t,r,this.logger)),(!o||!(o instanceof m))&&(this.demuxer=new m(n,t,r,this.logger),this.probe=m.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Cr(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 Tu{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let gl=0;class vl{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=gl++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=d=>{const c=d.data,m=this.hls;if(!(!m||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var g;const T=(g=this.workerContext)==null?void 0:g.objectURL;T&&self.URL.revokeObjectURL(T);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{m.logger[c.data.logType]&&m.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,m.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(p.ERROR,{type:de.OTHER_ERROR,details:$.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===p.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(d,c)};this.observer=new ha,this.observer.on(p.FRAG_DECRYPTED,s),this.observer.on(p.ERROR,s);const o=Cn(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=Io());const{worker:m}=this.workerContext;m.addEventListener("message",this.onWorkerMessage),m.addEventListener("error",this.onWorkerError),m.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:o,id:t,config:nt(i)})}catch(m){d.warn(`Error setting up "${t}" Web Worker, fallback to inline`,m),this.terminateWorker(),this.error=null,this.transmuxer=new pl(this.observer,o,i,"",t,e.logger)}return}}this.transmuxer=new pl(this.observer,o,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=gl++;const t=this.hls.config,n=Cn(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:nt(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Do(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,o,d,c,m){var g,T;c.transmuxing.start=self.performance.now();const{instanceNo:k,transmuxer:B}=this,oe=s?s.start:i.start,ae=i.decryptdata,De=this.frag,Me=!(De&&i.cc===De.cc),ze=!(De&&c.level===De.level),dt=De?c.sn-De.sn:-1,Tt=this.part?c.part-this.part.index:-1,Yt=dt===0&&c.id>1&&c.id===(De==null?void 0:De.stats.chunkCount),At=!ze&&(dt===1||dt===0&&(Tt===1||Yt&&Tt<=0)),Kt=self.performance.now();(ze||dt||i.stats.parsing.start===0)&&(i.stats.parsing.start=Kt),s&&(Tt||!At)&&(s.stats.parsing.start=Kt);const Ht=!(De&&((g=i.initSegment)==null?void 0:g.url)===((T=De.initSegment)==null?void 0:T.url)),Lt=new Tu(Me,At,d,ze,oe,Ht);if(!At||Me||Ht){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===le.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
|
discontinuity: ${Me}
|
|
|
trackSwitch: ${ze}
|
|
|
contiguous: ${At}
|
|
|
accurateTimeOffset: ${d}
|
|
|
timeOffset: ${oe}
|
|
|
initSegmentChange: ${Ht}`);const hn=new wu(n,r,t,o,m);this.configureTransmuxer(hn)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:k,cmd:"demux",data:e,decryptdata:ae,chunkMeta:c,state:Lt},e instanceof ArrayBuffer?[e]:[]);else if(B){const hn=B.push(e,ae,c,Lt);Na(hn)?hn.then(Wn=>{this.handleTransmuxComplete(Wn)}).catch(Wn=>{this.transmuxerError(Wn,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(hn)}}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(p.ERROR,{type:de.MEDIA_ERROR,details:$.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 Cu extends ea{constructor(e,t,n){super(e,t,n,"audio-stream-controller",le.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(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(p.BUFFER_RESET,this.onBufferReset,this),e.on(p.BUFFER_CREATED,this.onBufferCreated,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(p.FRAG_LOADING,this.onFragLoading,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(p.BUFFER_RESET,this.onBufferReset,this),e.off(p.BUFFER_CREATED,this.onBufferCreated,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(p.FRAG_LOADING,this.onFragLoading,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){if(n===le.MAIN){const o=t.cc,d=this.fragCurrent;if(this.initPTS[o]={baseTime:r,timescale:i,trackId:s},this.log(`InitPTS for cc: ${o} found from main: ${r/i} (${r}/${i}) trackId: ${s}`),this.mainAnchor=t,this.state===on.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==o)&&this.syncWithAnchor(t,c==null?void 0:c.frag)}else!this.hls.hasEnoughToStart&&d&&d.cc!==o?(d.abortRequests(),this.syncWithAnchor(t,d)):this.state===on.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(),o=this.getLoadPosition(),d=Dn(s,i,o);d&&(this.log(`Syncing with main frag at ${d.start} cc ${d.cc}`),this.startFragRequested=!1,this.nextLoadPosition=d.start,this.resetLoadingState(),this.state===on.IDLE&&this.doTickIdle())}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=on.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=on.IDLE):this.state=on.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case on.IDLE:this.doTickIdle();break;case on.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=on.WAITING_INIT_PTS}break}case on.FRAG_LOADING_WAITING_RETRY:{this.checkRetryDate();break}case on.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=on.FRAG_LOADING;const o=r.flush().buffer,d={frag:t,part:n,payload:o,networkDetails:null};this._handleFragmentLoadProgress(d),i&&super._handleFragmentLoadComplete(d)}else s&&s.cc!==e.frag.cc&&this.syncWithAnchor(s,e.frag)}else this.state=on.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 o=n[i],d=o.details;if(!d||this.waitForLive(o)||this.waitForCdnTuneIn(d)){this.state=on.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,Z.AUDIO,le.AUDIO));const m=this.getFwdBufferInfo(c,le.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,d)){t.trigger(p.BUFFER_EOS,{type:"audio"}),this.state=on.ENDED;return}const g=m.len,T=t.maxBufferLength,k=d.fragments,B=k[0].start,oe=this.getLoadPosition(),ae=this.flushing?oe:m.end;if(this.switchingTrack&&r){const ze=oe;d.PTSKnown&&ze<B&&(m.end>B||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=B+.05)}if(g>=T&&!this.switchingTrack&&ae<k[k.length-1].start)return;let De=this.getNextFragment(ae,d);if(De&&this.isLoopLoading(De,ae)&&(De=this.getNextFragmentLoopLoading(De,d,m,le.MAIN,T)),!De){this.bufferFlushed=!0;return}let Me=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Me&&Ve(De)&&!De.endList&&(!d.live||!this.loadingParts&&ae<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Me)===un.OK&&(this.mainFragLoading=Me=null),Me&&Ve(Me))){if(De.start>Me.end){const dt=this.fragmentTracker.getFragAtPos(ae,le.MAIN);dt&&dt.end>Me.end&&(Me=dt,this.mainFragLoading={frag:dt,targetBufferTime:null})}if(De.start>Me.end)return}this.loadFragment(De,o,ae)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new Rt(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!==on.STOPPED&&(this.setInterval(yl),this.state=on.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(p.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:o,track:d}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${d.name}" of "${o}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==on.STOPPED&&(this.state=on.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${d.name}" of "${o}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const m=r[s];let g=0;if(i.live||(n=m.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(m.details){var T;g=this.alignPlaylists(i,m.details,(T=this.levelLastLoaded)==null?void 0:T.details)}i.alignedSliding||($s(i,c),i.alignedSliding||zs(i,c),g=i.fragmentStart)}m.details=i,this.levelLastLoaded=m,this.startFragRequested||this.setStartPosition(c,g),this.hls.trigger(p.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===on.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=on.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:o,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[o];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const m=c.details;if(!m){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const g=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let T=this.transmuxer;T||(T=this.transmuxer=new vl(this.hls,le.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const k=this.initPTS[n.cc],B=(t=n.initSegment)==null?void 0:t.data;if(k!==void 0){const ae=r?r.index:-1,De=ae!==-1,Me=new Xr(n.level,n.sn,n.stats.chunkCount,i.byteLength,ae,De);T.push(i,B,g,"",n,r,m.totalduration,!1,Me,k)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${m.startSN} ,${m.endSN}],track ${o}`);const{cache:oe}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new Ca,complete:!1};oe.push(new Uint8Array(i)),this.state!==on.STOPPED&&(this.state=on.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===le.MAIN&&Ve(t.frag)&&(this.mainFragLoading=t,this.state===on.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==le.AUDIO){!this.audioOnly&&n.type===le.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(Ve(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(p.AUDIO_TRACK_SWITCHED,w({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=on.ERROR;return}switch(t.details){case $.FRAG_GAP:case $.FRAG_PARSING_ERROR:case $.FRAG_DECRYPT_ERROR:case $.FRAG_LOAD_ERROR:case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_ERROR:case $.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.AUDIO,t);break;case $.AUDIO_TRACK_LOAD_ERROR:case $.AUDIO_TRACK_LOAD_TIMEOUT:case $.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===on.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===ge.AUDIO_TRACK&&(this.state=on.IDLE);break;case $.BUFFER_ADD_CODEC_ERROR:case $.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)||this.resetLoadingState();break;case $.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case $.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==Z.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==Z.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===on.ENDED&&(this.state=on.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,le.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,o=this.getCurrentContext(s);if(!o){this.resetWhenMissingContext(s);return}const{frag:d,part:c,level:m}=o,{details:g}=m,{audio:T,text:k,id3:B,initSegment:oe}=i;if(this.fragContextChanged(d)||!g){this.fragmentTracker.removeFragment(d);return}if(this.state=on.PARSING,this.switchingTrack&&T&&this.completeAudioSwitch(this.switchingTrack),oe!=null&&oe.tracks){const ae=d.initSegment||d;if(this.unhandledEncryptionError(oe,d))return;this._bufferInitSegment(m,oe.tracks,ae,s),r.trigger(p.FRAG_PARSING_INIT_SEGMENT,{frag:ae,id:n,tracks:oe.tracks})}if(T){const{startPTS:ae,endPTS:De,startDTS:Me,endDTS:ze}=T;c&&(c.elementaryStreams[Z.AUDIO]={startPTS:ae,endPTS:De,startDTS:Me,endDTS:ze}),d.setElementaryStreamInfo(Z.AUDIO,ae,De,Me,ze),this.bufferFragmentData(T,d,c,s)}if(B!=null&&(t=B.samples)!=null&&t.length){const ae=_({id:n,frag:d,details:g},B);r.trigger(p.FRAG_PARSING_METADATA,ae)}if(k){const ae=_({id:n,frag:d,details:g},k);r.trigger(p.FRAG_PARSING_USERDATA,ae)}}_bufferInitSegment(e,t,n,r){if(this.state!==on.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=le.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(p.BUFFER_CODECS,t);const o=i.initSegment;if(o!=null&&o.byteLength){const d={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:o};this.hls.trigger(p.BUFFER_APPENDING,d)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===un.NOT_LOADED||r===un.PARTIAL){var i;if(!Ve(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=on.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&zs(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:o}=this.bufferedTrack;nn({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:o},e,gn)||(En(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(p.AUDIO_TRACK_SWITCHED,w({},e))}}class zo extends J{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const o=r[s];let d;try{d=new self.URL(o.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),d=o.URI||""}if(d===e){i=s;break}else d===e.substring(0,d.length)&&(i=s)}if(i!==-1){const s=r[i],o=parseInt(s["LAST-MSN"])||t.lastPartSn;let d=parseInt(s["LAST-PART"])||t.lastPartIndex;if(this.hls.config.lowLatencyMode){const m=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&m>t.partTarget&&(d+=1)}const c=n&&Xt(n);return new qt(o,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(),o=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-o;const d=this.hls.config.timelineOffset;if(d!==r.appliedTimelineOffset){const m=Math.max(d||0,0);r.appliedTimelineOffset=m,r.fragments.forEach(g=>{g.setStart(g.playlistOffset+m)})}if(r.live||n!=null&&n.live){const m="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){Yi(n,r,this);const Me=r.playlistParsingError;if(Me){this.warn(Me);const ze=this.hls;if(!ze.config.ignorePlaylistParsingErrors){var c;const{networkDetails:dt}=t;ze.trigger(p.ERROR,{type:de.NETWORK_ERROR,details:$.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:dt,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const g=this.hls.mainForwardBufferInfo,T=g?g.end-g.len:0,k=(r.edge-T)*1e3,B=Vr(r,k);if(r.requestScheduled+B<s?r.requestScheduled=s:r.requestScheduled+=B,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let oe,ae,De;if(r.canBlockReload&&r.endSN&&r.advanced){const Me=this.hls.config.lowLatencyMode,ze=r.lastPartSn,dt=r.endSN,Tt=r.lastPartIndex,Yt=Tt!==-1,At=ze===dt;Yt?At?(ae=dt+1,De=Me?0:Tt):(ae=ze,De=Me?Tt+1:r.maxPartIndex):ae=dt+1;const Kt=r.age,Ht=Kt+r.ageHeader;let Lt=Math.min(Ht-r.partTarget,r.targetduration*1.5);if(Lt>0){if(Ht>r.targetduration*3)this.log(`Playlist last advanced ${Kt.toFixed(2)}s ago. Omitting segment and part directives.`),ae=void 0,De=void 0;else if(n!=null&&n.tuneInGoal&&Ht-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${Lt} with playlist age: ${r.age}`),Lt=0;else{const hn=Math.floor(Lt/r.targetduration);if(ae+=hn,De!==void 0){const Wn=Math.round(Lt%r.targetduration/r.partTarget);De+=Wn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${Kt.toFixed(2)}s goal: ${Lt} skip sn ${hn} to part ${De}`)}r.tuneInGoal=Lt}if(oe=this.getDeliveryDirectives(r,t.deliveryDirectives,ae,De),Me||!At){r.requestScheduled=s,this.loadingPlaylist(m,oe);return}}else(r.canBlockReload||r.canSkipUntil)&&(oe=this.getDeliveryDirectives(r,t.deliveryDirectives,ae,De));oe&&ae!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(B-o*2,B/2)),this.scheduleLoading(m,oe,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 o=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(o)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),o)}getDeliveryDirectives(e,t,n,r){let i=Xt(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=Ft.No),new qt(n,r,i)}checkRetry(e){const t=e.details,n=yn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:o}=r||{},d=!!r&&!!o&&(i===vn.RetryRequest||!r.resolved&&i===vn.SendAlternateToPenaltyBox);if(d){var c;if(s>=o.maxNumRetry)return!1;if(n&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const m=jn(o,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),m),this.warn(`Retrying playlist loading ${s+1}/${o.maxNumRetry} after "${t}" in ${m}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 Uo(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Au extends zo{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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVEL_LOADING,this.onLevelLoading,this),e.off(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(p.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(p.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 o=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,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,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(o=>(r==null?void 0:r.indexOf(o))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(T=>!n||n.indexOf(T.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(T=>T.default)&&(this.selectDefaultTrack=!1),o.forEach((T,k)=>{T.id=k});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const d=this.hls.config.audioPreference;if(!i&&d){const T=zt(d,o,gn);if(T>-1)i=o[T];else{const k=zt(d,this.tracks);i=this.tracks[k]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const m={audioTracks:o};this.log(`Updating audio tracks, ${o.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(p.AUDIO_TRACKS_UPDATED,m);const g=this.trackId;if(c!==-1&&g===-1)this.setAudioTrack(c);else if(o.length&&g===-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: ${o.length}`);this.warn(T.message),this.hls.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:T})}}}onError(e,t){t.fatal||!t.context||t.context.type===ge.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&nn(e,r,gn))return r;const i=zt(e,this.tracksInGroup,gn);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 o=dn(e,t.levels,n,s,gn);if(o===-1)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){const s=zt(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(p.AUDIO_TRACK_SWITCHING,w({},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||nn(e,r,gn)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:o,channels:d}=e;for(let c=0;c<t.length;c++){const m=t[c];if(nn({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:o,channels:d},m,gn))return c}for(let c=0;c<t.length;c++){const m=t[c];if($a(e.attrs,m.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const m=t[c];if($a(e.attrs,m.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&En(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,o=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:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(p.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class Iu{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 Du extends Error{constructor(e){super(e),this.name=xl}}class Ru extends J{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var 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(p.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=Be(Te(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(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.BUFFER_RESET,this.onBufferReset,this),e.on(p.BUFFER_APPENDING,this.onBufferAppending,this),e.on(p.BUFFER_CODECS,this.onBufferCodecs,this),e.on(p.BUFFER_EOS,this.onBufferEos,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.FRAG_PARSED,this.onFragParsed,this),e.on(p.FRAG_CHANGED,this.onFragChanged,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.BUFFER_RESET,this.onBufferReset,this),e.off(p.BUFFER_APPENDING,this.onBufferAppending,this),e.off(p.BUFFER_CODECS,this.onBufferCodecs,this),e.off(p.BUFFER_EOS,this.onBufferEos,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.FRAG_PARSED,this.onFragParsed,this),e.off(p.FRAG_CHANGED,this.onFragChanged,this),e.off(p.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?_(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=_({},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=Te(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 o=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,o),n.load()}catch(d){n.src=o}else n.src=o}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,o=()=>{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: ${nt(n,(d,c)=>d==="initSegment"?void 0:c)};
|
|
|
transfer tracks: ${nt(r,(d,c)=>d==="initSegment"?void 0:c)}}`),!Le(r,n)){t.mediaSource=null,t.tracks=void 0;const d=e.currentTime,c=this.details,m=Math.max(d,(c==null?void 0:c.fragments[0].start)||0);if(m-d>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${d} -> ${m}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${m} currentTime: ${d}`),this.onMediaDetaching(p.MEDIA_DETACHING,{}),this.onMediaAttaching(p.MEDIA_ATTACHING,t),e.currentTime=m;return}this.transferData=void 0,i.forEach(d=>{const c=d,m=r[c];if(m){const g=m.buffer;if(g){const T=this.fragmentTracker,k=m.id;if(T.hasFragments(k)||T.hasParts(k)){const ae=xn.getBuffered(g);T.detectEvictedFragments(c,ae,k,null,!0)}const B=jo(c),oe=[c,g];this.sourceBuffers[B]=oe,g.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,m)}}}),o(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),o()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([o])=>{o&&this.removeBuffer(o)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const o=i.readyState==="open";try{const d=i.sourceBuffers;for(let c=d.length;c--;)o&&d[c].abort(),i.removeSourceBuffer(d[c]);o&&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(p.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 Iu(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),o=!s&&this.sourceBufferCount&&this.media&&i.some(d=>!r[d]);if(s||o){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${i}" SourceBuffers`);return}i.forEach(d=>{var c,m;const g=t[d],{id:T,codec:k,levelCodec:B,container:oe,metadata:ae,supplemental:De}=g;let Me=r[d];const ze=(c=this.transferData)==null||(c=c.tracks)==null?void 0:c[d],dt=ze!=null&&ze.buffer?ze:Me,Tt=(dt==null?void 0:dt.pendingCodec)||(dt==null?void 0:dt.codec),Yt=dt==null?void 0:dt.levelCodec;Me||(Me=r[d]={buffer:void 0,listeners:[],codec:k,supplemental:De,container:oe,levelCodec:B,metadata:ae,id:T});const At=en(Tt,Yt),Kt=At==null?void 0:At.replace(bl,"$1");let Ht=en(k,B);const Lt=(m=Ht)==null?void 0:m.replace(bl,"$1");Ht&&At&&Kt!==Lt&&(d.slice(0,5)==="audio"&&(Ht=Ee(Ht,this.appendSource)),this.log(`switching codec ${Tt} to ${Ht}`),Ht!==(Me.pendingCodec||Me.codec)&&(Me.pendingCodec=Ht),Me.container=oe,this.appendChangeType(d,oe,Ht))}),(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 o=s.buffer;o!=null&&o.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),o.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,le.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var o;const d=this.tracks.video;(this.lastVideoAppendEnd>r||d!=null&&d.buffer&&xn.isBuffered(d.buffer,r)||((o=this.fragmentTracker.getAppendedFrag(r,le.MAIN))==null?void 0:o.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:o=>{this.warn("Error executing block-audio operation",o)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:o,part:d,chunkMeta:c,offset:m}=t,g=c.buffering[i],{sn:T,cc:k}=o,B=self.performance.now();g.start=B;const oe=o.stats.buffering,ae=d?d.stats.buffering:null;oe.start===0&&(oe.start=B),ae&&ae.start===0&&(ae.start=B);const De=n.audio;let Me=!1;i==="audio"&&(De==null?void 0:De.container)==="audio/mpeg"&&(Me=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const ze=n.video,dt=ze==null?void 0:ze.buffer;if(dt&&T!=="initSegment"){const At=d||o,Kt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend&&!(ze.ending||ze.ended)){const Lt=At.start+At.duration*.05,hn=dt.buffered,Wn=this.currentOp("video");!hn.length&&!Wn?this.blockAudio(At):!Wn&&!xn.isBuffered(dt,Lt)&&this.lastVideoAppendEnd<Lt&&this.blockAudio(At)}else if(i==="video"){const Ht=At.end;if(Kt){const Lt=Kt.frag.start;(Ht>Lt||Ht<this.lastVideoAppendEnd||xn.isBuffered(dt,Lt))&&this.unblockAudio()}this.lastVideoAppendEnd=Ht}}const Tt=(d||o).start,Yt={label:`append-${i}`,execute:()=>{var At;g.executeStart=self.performance.now();const Kt=(At=this.tracks[i])==null?void 0:At.buffer;Kt&&(Me?this.updateTimestampOffset(Kt,Tt,.1,i,T,k):m!==void 0&&y(m)&&this.updateTimestampOffset(Kt,m,1e-6,i,T,k)),this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const At=self.performance.now();g.executeEnd=g.end=At,oe.first===0&&(oe.first=At),ae&&ae.first===0&&(ae.first=At);const Kt={};this.sourceBuffers.forEach(([Ht,Lt])=>{Ht&&(Kt[Ht]=xn.getBuffered(Lt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(p.BUFFER_APPENDED,{type:i,frag:o,part:d,chunkMeta:c,parent:o.type,timeRanges:Kt})},onError:At=>{var Kt;const Ht={type:de.MEDIA_ERROR,parent:o.type,details:$.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:o,part:d,chunkMeta:c,error:At,err:At,fatal:!1},Lt=(Kt=this.media)==null?void 0:Kt.error;if(At.code===DOMException.QUOTA_EXCEEDED_ERR||At.name=="QuotaExceededError"||"quota"in At)Ht.details=$.BUFFER_FULL_ERROR;else if(At.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!Lt)Ht.errorAction=jt(!0);else if(At.name===xl&&this.sourceBufferCount===0)Ht.errorAction=jt(!0);else{const hn=++this.appendErrors[i];this.warn(`Failed ${hn}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${Lt||"no media error"})`),(hn>=this.hls.config.appendErrorMaxRetry||Lt)&&(Ht.fatal=!0)}this.hls.trigger(p.ERROR,Ht)}};this.log(`queuing "${i}" append sn: ${T}${d?" p: "+d.index:""} of ${o.type===le.MAIN?"level":"track"} ${o.level} cc: ${k}`),this.append(Yt,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(p.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[Z.AUDIOVIDEO]?i.push("audiovideo"):(s[Z.AUDIO]&&i.push("audio"),s[Z.VIDEO]&&i.push("video"));const o=()=>{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(p.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(o,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 o=this.tracks[s];(!t.type||t.type===s)&&(o.ending=!0,o.ended||(o.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 o;return s&&!((o=this.tracks[s])!=null&&o.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(p.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(p.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===$.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;y(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,o=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(y(o)&&o>=0){const c=Math.max(o,s),m=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,m)}const d=r.frontBufferFlushThreshold;if(y(d)&&d>0){const c=Math.max(r.maxBufferLength,d),m=Math.max(c,s),g=Math.floor(i/s)*s+m;this.flushFrontBuffer(i,s,g)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const o=xn.getBuffered(i);if(o.length>0&&n>o.start(0)){var s;this.hls.trigger(p.BACK_BUFFER_REACHED,{bufferEnd:n});const d=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(p.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(p.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=xn.getBuffered(i),o=s.length;if(o<2)return;const d=s.start(o-1),c=s.end(o-1);if(n>d||e>=d&&e<=c)return;this.hls.trigger(p.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),m=Math.max(c,r);return{duration:1/0,start:c,end:m}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return y(i)?{duration:i}:null;const s=this.media.duration,o=y(n.duration)?n.duration:0;return r>o&&r>s||!y(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(y(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}) ${nt(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(p.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(p.ERROR,{type:de.MEDIA_ERROR,details:$.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,o=e[s];if(this.isPending(o)){const d=this.getTrackCodec(o,s),c=`${o.container};codecs=${d}`;o.codec=d,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${nt(o)}`);try{const m=n.addSourceBuffer(c),g=jo(s),T=[s,m];t[g]=T,o.buffer=m}catch(m){var r;this.error(`error while trying to add sourceBuffer: ${m.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:s,mimeType:c,parent:o.id});return}this.trackSourceBuffer(s,o)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&Ue(n,"video")&&(r=Wt(r,n));const i=en(r,e.levelCodec);return i?t.slice(0,5)==="audio"?Ee(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 o=s.removedRanges;o!=null&&o.length&&this.hls.trigger(p.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(p.ERROR,{type:de.MEDIA_ERROR,details:$.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 o=t-e.timestampOffset;Math.abs(o)>=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],o=s==null?void 0:s.buffer;if(!r||!i||!o){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const d=y(r.duration)?r.duration:1/0,c=y(i.duration)?i.duration:1/0,m=Math.max(0,t),g=Math.min(n,d,c);g>m&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${m},${g}] from the ${e} SourceBuffer`),o.remove(m,g)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new Du(`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(p.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.BUFFER_CODECS,this.onBufferCodecs,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(p.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.BUFFER_CODECS,this.onBufferCodecs,this),e.off(p.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&&y(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,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=(o,d)=>d?o.width!==d.width||o.height!==d.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let o=0;o<e.length;o+=1){const d=e[o];if((d.width>=s||d.height>=s)&&r(d,e[o+1])){i=o;break}}return i}}const Qi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Ou={HLS:"h"};class Es{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof Es?n:new Es(n))),this.value=e,this.params=t}}const Pu="Dict";function Mu(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 ku(a,e,t,n){return new Error(`failed to ${a} "${Mu(e)}" as ${t}`,{cause:n})}function Ss(a,e,t){return ku("serialize",a,e,t)}class Sl{constructor(e){this.description=e}}const wl="Bare Item",Bu="Boolean";function Fu(a){if(typeof a!="boolean")throw Ss(a,Bu);return a?"?1":"?0"}function Nu(a){return btoa(String.fromCharCode(...a))}const $u="Byte Sequence";function zu(a){if(ArrayBuffer.isView(a)===!1)throw Ss(a,$u);return`:${Nu(a)}:`}const Uu="Integer";function ju(a){return a<-999999999999999||999999999999999<a}function Tl(a){if(ju(a))throw Ss(a,Uu);return a.toString()}function Hu(a){return`@${Tl(a.getTime()/1e3)}`}function Cl(a,e){if(a<0)return-Cl(-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=Cl(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Ss(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 Ss(a,Wu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Yu(a){return a.description||a.toString().slice(7,-1)}const Xu="Token";function Al(a){const e=Yu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Ss(e,Xu);return e}function Ko(a){switch(typeof a){case"number":if(!y(a))throw Ss(a,wl);return Number.isInteger(a)?Tl(a):Gu(a);case"string":return Zu(a);case"symbol":return Al(a);case"boolean":return Fu(a);case"object":if(a instanceof Date)return Hu(a);if(a instanceof Uint8Array)return zu(a);if(a instanceof Sl)return Al(a);default:throw Ss(a,wl)}}const Qu="Key";function Go(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Ss(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 Il(a){return a instanceof Es?`${Ko(a.value)}${Wo(a.params)}`:Ko(a)}function qu(a){return`(${a.value.map(Il).join(" ")})${Wo(a.params)}`}function Ju(a,e={whitespace:!0}){if(typeof a!="object"||a==null)throw Ss(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 Es||(i=new Es(i));let s=Go(r);return i.value===!0?s+=Wo(i.params):(s+="=",Array.isArray(i.value)?s+=qu(i):s+=Il(i)),s}).join(`,${n}`)}function Dl(a,e){return Ju(a,e)}const ws="CMCD-Object",xi="CMCD-Request",oa="CMCD-Session",Zs="CMCD-Status",ec={br:ws,ab:ws,d:ws,ot:ws,tb:ws,tpb:ws,lb:ws,tab:ws,lab:ws,url:ws,pb:xi,bl:xi,tbl:xi,dl:xi,ltc:xi,mtp:xi,nor:xi,nrr:xi,rc:xi,sn:xi,sta:xi,su:xi,ttfb:xi,ttfbb:xi,ttlb:xi,cmsdd:xi,cmsds:xi,smrt:xi,df:xi,cs:xi,ts:xi,cid:oa,pr:oa,sf:oa,sid:oa,st:oa,v:oa,msd:oa,bs:Zs,bsd:Zs,cdn:Zs,rtp:Zs,bg:Zs,pt:Zs,ec:Zs,e:Zs},tc={REQUEST:xi};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 o;const d=ec[s]||r[s]||tc.REQUEST,c=(o=i[d])!==null&&o!==void 0?o: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"?y(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 Es&&typeof a.value=="string"?new Es(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 Es&&typeof a.value=="string"?t=new Es([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 Ml(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 o=e.filter;typeof o=="function"&&(s=s.filter(o));const d=r===Ol||r===Rl;d&&!s.includes("ts")&&s.push("ts"),n>1&&!s.includes("v")&&s.push("v");const c=_({},oc,e.formatters),m={version:n,reportingMode:r,baseUrl:e.baseUrl};return s.sort().forEach(g=>{let T=a[g];const k=c[g];if(typeof k=="function"&&(T=k(T,m)),g==="v"){if(n===1)return;T=n}g=="pr"&&T===1||(d&&g==="ts"&&!y(T)&&(T=Date.now()),sc(T)&&(ic(g)&&typeof T=="string"&&(T=new Sl(T)),t[g]=T))}),t}function vc(a,e={}){const t={};if(!a)return t;const n=Ml(a,e),r=rc(n,e==null?void 0:e.customHeaderMap);return Object.entries(r).reduce((i,[s,o])=>{const d=Dl(o,{whitespace:!1});return d&&(i[s]=d),i},t)}function yc(a,e,t){return _(a,vc(e,t))}const _c="CMCD";function bc(a,e={}){return a?Dl(Ml(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 kl=/CMCD=[^&#]+/;function Sc(a,e,t){const n=Ec(e,t);if(!n)return a;if(kl.test(a))return a.replace(kl,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:Qi.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,o=this.hls.levels[i.level],d=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:d};(d===Qi.VIDEO||d===Qi.AUDIO||d==Qi.MUXED)&&(c.br=o.bitrate/1e3,c.tb=this.getTopBandwidth(d)/1e3,c.bl=this.getBufferLength(d));const m=s?this.getNextPart(s):this.getNextFrag(i);m!=null&&m.url&&m.url!==i.url&&(c.nor=m.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(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHED,this.onMediaDetached,this),e.on(p.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHED,this.onMediaDetached,this),e.off(p.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={}){_(t,this.createData());const n=t.ot===Qi.INIT||t.ot===Qi.VIDEO||t.ot===Qi.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,o)=>(r.includes(o)&&(s[o]=t[o]),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 o=i.length-1;o>=0;o--){const d=i[o];if(d.index===n&&d.fragment.sn===s)return i[o+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Qi.TIMED_TEXT;if(e.sn==="initSegment")return Qi.INIT;if(t==="audio")return Qi.AUDIO;if(t==="main")return this.hls.audioTracks.length?Qi.VIDEO:Qi.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===Qi.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===Qi.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:xn.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,o){t(i),this.loader.load(i,s,o)}}}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,o){t(i),this.loader.load(i,s,o)}}}}const Tc=3e5;class Cc extends J{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.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)===vn.SendAlternateToPenaltyBox&&n.flags===sn.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:o,pathwayId:d,type:c}=t.context;o&&r?s=this.getPathwayForGroupId(o,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===$.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: ${nt(i)} penalized: ${nt(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]>Tc&&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 o=this.hls.nextLoadLevel,d=this.hls.levels[o];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,ki(t),this.hls.trigger(p.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[o];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=o);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===ge.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===ge.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":o,"URI-REPLACEMENT":d}=i;if(t.some(m=>m.pathwayId===s))return;const c=this.getLevelsForPathway(o).map(m=>{const g=new or(m.attrs);g["PATHWAY-ID"]=s;const T=g.AUDIO&&`${g.AUDIO}_clone_${s}`,k=g.SUBTITLES&&`${g.SUBTITLES}_clone_${s}`;T&&(n[g.AUDIO]=T,g.AUDIO=T),k&&(r[g.SUBTITLES]=k,g.SUBTITLES=k);const B=Fl(m.uri,g["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),oe=new Rt({attrs:g,audioCodec:m.audioCodec,bitrate:m.bitrate,height:m.height,name:m.name,url:B,videoCodec:m.videoCodec,width:m.width});if(m.audioGroups)for(let ae=1;ae<m.audioGroups.length;ae++)oe.addGroupId("audio",`${m.audioGroups[ae]}_clone_${s}`);if(m.subtitleGroups)for(let ae=1;ae<m.subtitleGroups.length;ae++)oe.addGroupId("text",`${m.subtitleGroups[ae]}_clone_${s}`);return oe});t.push(...c),Bl(this.audioTracks,n,d,s),Bl(this.subtitleTracks,r,d,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(m){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const m=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+m)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,o=s.errorRetry||s.timeoutRetry||{},d={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},c={onSuccess:(m,g,T,k)=>{this.log(`Loaded steering manifest: "${r}"`);const B=m.data;if((B==null?void 0:B.VERSION)!==1){this.log(`Steering VERSION ${B.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=B.TTL;const{"RELOAD-URI":oe,"PATHWAY-CLONES":ae,"PATHWAY-PRIORITY":De}=B;if(oe)try{this.uri=new self.URL(oe,r).href}catch(ze){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${oe}`);return}this.scheduleRefresh(this.uri||T.url),ae&&this.clonePathways(ae);const Me={steeringManifest:B,url:r.toString()};this.hls.trigger(p.STEERING_MANIFEST_LOADED,Me),De&&this.updatePathwayPriority(De)},onError:(m,g,T,k)=>{if(this.log(`Error loading steering manifest: ${m.code} ${m.text} (${g.url})`),this.stopLoad(),m.code===410){this.enabled=!1,this.log(`Steering manifest ${g.url} no longer available`);return}let B=this.timeToLoad*1e3;if(m.code===429){const oe=this.loader;if(typeof(oe==null?void 0:oe.getResponseHeader)=="function"){const ae=oe.getResponseHeader("Retry-After");ae&&(B=parseFloat(ae)*1e3)}this.log(`Steering manifest ${g.url} rate limited`);return}this.scheduleRefresh(this.uri||g.url,B)},onTimeout:(m,g,T)=>{this.log(`Timeout loading steering manifest (${g.url})`),this.scheduleRefresh(this.uri||g.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Bl(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const o=_({},s);return o.details=void 0,o.attrs=new or(o.attrs),o.url=o.attrs.URI=Fl(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[r],o.attrs["PATHWAY-ID"]=n,o});a.push(...i)})}function Fl(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let o;e&&(o=s==null?void 0:s[e],o&&(a=o));const d=new self.URL(a);return r&&!o&&(d.host=r),i&&Object.keys(i).sort().forEach(c=>{c&&d.searchParams.set(c,i[c])}),d.href}class ba extends J{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=ba.CDMCleanupPromise?[ba.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=Ti(this.config));const o=s.map(gi).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(o)}this.keyFormatPromise.then(s=>{const o=Di(s);if(n!=="sinf"||o!==vr.FAIRPLAY){this.log(`Ignoring "${t.type}" event with init data type: "${n}" for selected key-system ${o}`);return}let d;try{const k=tt(new Uint8Array(r)),B=kr(JSON.parse(k).sinf),oe=Q(B);if(!oe)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=new Uint8Array(oe.subarray(8,24))}catch(k){this.warn(`${i} Failed to parse sinf: ${k}`);return}const c=ie(d),{keyIdToKeySessionPromise:m,mediaKeySessions:g}=this;let T=m[c];for(let k=0;k<g.length;k++){const B=g[k],oe=B.decryptdata;if(!oe.keyId)continue;const ae=ie(oe.keyId);if(Yn(d,oe.keyId)||oe.uri.replace(/-/g,"").indexOf(c)!==-1){if(T=m[ae],!T)continue;if(oe.pssh)break;delete m[ae],oe.pssh=new Uint8Array(r),oe.keyId=d,T=m[c]=T.then(()=>this.generateRequestWithPreferredKeySession(B,n,r,"encrypted-event-key-match")),T.catch(De=>this.handleError(De));break}}T||this.handleError(new Error(`Key ID ${c} not encountered in playlist. Key-system sessions ${g.length}.`))}).catch(s=>this.handleError(s))}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.onDestroying(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(p.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(p.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.on(p.DESTROYING,this.onDestroying,this)}unregisterListeners(){this.hls.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(p.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(p.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),this.hls.off(p.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===vr.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,o,d)=>!!s&&d.indexOf(s)===o,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,o)=>{const d=c=>{const m=c.shift();this.getMediaKeysPromise(m,r,i).then(g=>s({keySystem:m,mediaKeys:g})).catch(g=>{c.length?d(c):g instanceof ns?o(g):o(new ns({type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_ACCESS,error:g,fatal:!0},g.message))})};d(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return yi===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=gs(e,t,n,this.config.drmSystemOptions||{});let s=this.keySystemAccessPromises[e],o=(r=s)==null?void 0:r.keySystemAccess;if(!o){this.log(`Requesting encrypted media "${e}" key-system access with config: ${nt(i)}`),o=this.requestMediaKeySystemAccess(e,i);const d=s=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),o.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const m=this.fetchServerCertificate(e);this.log(`Create media-keys for "${e}"`);const g=d.mediaKeys=c.createMediaKeys().then(T=>(this.log(`Media-keys created for "${e}"`),d.hasMediaKeys=!0,m.then(k=>k?this.setMediaKeysServerCertificate(T,e,k):T)));return g.catch(T=>{this.error(`Failed to create media-keys for "${e}"}: ${T}`)}),g})}return o.then(()=>s.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${ie(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 ${ie(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})=>gi(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=gi(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=Ti(this.config),n=e.map(Di).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=Ac(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 o=Nl(r||"internal-error",t);return this.handleError(o,e.frag),Promise.reject(o)}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 o=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",m=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(d,c,m,"playlist-key")});return o.catch(d=>this.handleError(d,e.frag)),this.keyIdToKeySessionPromise[n]=o,o}return s.catch(o=>{if(o instanceof ns){const d=w({},o.data);this.getKeyStatus(t)==="internal-error"&&(d.decryptdata=t);const c=new ns(d,o.message);this.handleError(c,e.frag)}}),s}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e,t){if(this.hls)if(e instanceof ns){t&&(e.data.frag=t);const n=e.data.decryptdata;this.error(`${e.message}${n?` (${ie(n.keyId||[])})`:""}`),this.hls.trigger(p.ERROR,e.data)}else this.error(e.message),this.hls.trigger(p.ERROR,{type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0})}getKeySystemForKeyPromise(e){const t=po(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Di(e.keyFormat),i=r?[r]:Ti(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Ti(this.config)),e.length===0)throw new ns({type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${nt({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 B=s.call(this.hls,t,n,e);if(!B)throw new Error("Invalid response from configured generateRequest filter");t=B.initDataType,n=B.initData?B.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(B){if(this.warn(B.message),this.hls&&this.hls.config.debug)throw B}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const o=po(e.decryptdata),d=e.decryptdata.uri;this.log(`Generating key-session request for "${r}" keyId: ${o} URI: ${d} (init data type: ${t} length: ${n.byteLength})`);const c=new ha,m=e._onmessage=B=>{const oe=e.mediaKeysSession;if(!oe){c.emit("error",new Error("invalid state"));return}const{messageType:ae,message:De}=B;this.log(`"${ae}" message event for session "${oe.sessionId}" message size: ${De.byteLength}`),ae==="license-request"||ae==="license-renewal"?this.renewLicense(e,De).catch(Me=>{c.eventNames().length?c.emit("error",Me):this.handleError(Me)}):ae==="license-release"?e.keySystem===vr.FAIRPLAY&&this.updateKeySession(e,zr("acknowledged")).then(()=>this.removeSession(e)).catch(Me=>this.handleError(Me)):this.warn(`unhandled media key message type "${ae}"`)},g=(B,oe)=>{oe.keyStatus=B;let ae;B.startsWith("usable")?c.emit("resolved"):B==="internal-error"||B==="output-restricted"||B==="output-downscaled"?ae=Nl(B,oe.decryptdata):B==="expired"?ae=new Error(`key expired (keyId: ${o})`):B==="released"?ae=new Error("key released"):B==="status-pending"||this.warn(`unhandled key status change "${B}" (keyId: ${o})`),ae&&(c.eventNames().length?c.emit("error",ae):this.handleError(ae))},T=e._onkeystatuseschange=B=>{if(!e.mediaKeysSession){c.emit("error",new Error("invalid state"));return}const ae=this.getKeyStatuses(e);if(!Object.keys(ae).some(dt=>ae[dt]!=="status-pending"))return;if(ae[o]==="expired"){this.log(`Expired key ${nt(ae)} in key-session "${e.mediaKeysSession.sessionId}"`),this.renewKeySession(e);return}let Me=ae[o];if(Me)g(Me,e);else{var ze;e.keyStatusTimeouts||(e.keyStatusTimeouts={}),(ze=e.keyStatusTimeouts)[o]||(ze[o]=self.setTimeout(()=>{if(!e.mediaKeysSession||!this.mediaKeys)return;const Tt=this.getKeyStatus(e.decryptdata);if(Tt&&Tt!=="status-pending")return this.log(`No status for keyId ${o} in key-session "${e.mediaKeysSession.sessionId}". Using session key-status ${Tt} from other session.`),g(Tt,e);this.log(`key status for ${o} in key-session "${e.mediaKeysSession.sessionId}" timed out after 1000ms`),Me="internal-error",g(Me,e)},1e3)),this.log(`No status for keyId ${o} (${nt(ae)}).`)}};Bi(e.mediaKeysSession,"message",m),Bi(e.mediaKeysSession,"keystatuseschange",T);const k=new Promise((B,oe)=>{c.on("error",oe),c.on("resolved",B)});return e.mediaKeysSession.generateRequest(t,n).then(()=>{this.log(`Request generated for key-session "${e.mediaKeysSession.sessionId}" keyId: ${o} URI: ${d}`)}).catch(B=>{throw new ns({type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_SESSION,error:B,decryptdata:e.decryptdata,fatal:!1},`Error generating key-session request: ${B}`)}).then(()=>k).catch(B=>(c.removeAllListeners(),this.removeSession(e).then(()=>{throw B}))).then(()=>(c.removeAllListeners(),e))}getKeyStatuses(e){const t={};return e.mediaKeysSession.keyStatuses.forEach((n,r)=>{if(typeof r=="string"&&typeof n=="object"){const o=r;r=n,n=o}const i="buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r);if(e.keySystem===vr.PLAYREADY&&i.length===16){const o=ie(i);t[o]=n,Bn(i)}const s=ie(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,o)=>{const d={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,m={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(T,k,B,oe)=>{s(T.data)},onError:(T,k,B,oe)=>{o(new ns({type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:B,response:w({url:d.url,data:void 0},T)},`"${e}" certificate request failed (${i}). Status: ${T.code} (${T.text})`))},onTimeout:(T,k,B)=>{o(new ns({type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:B,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(T,k,B)=>{o(new Error("aborted"))}};r.load(d,m,g)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new ns({type:de.KEY_SYSTEM_ERROR,details:$.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 ns({type:de.KEY_SYSTEM_ERROR,details:$.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 m;for(let g=0,T=i.length;g<T;g++){var s,o;m=i[g];const k=(s=m.querySelector("name"))==null?void 0:s.textContent,B=(o=m.querySelector("value"))==null?void 0:o.textContent;k&&B&&e.setRequestHeader(k,B)}}const d=r.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return zr(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 o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let d=o.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,o,s,e)}catch(m){this.error(m)}r(d)}else{const d=n.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||o.status>=400&&o.status<500)i(new ns({type:de.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_LICENSE_REQUEST_FAILED,decryptdata:e.decryptdata,fatal:!0,networkDetails:o,response:{url:s,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${s}). Status: ${o.status} (${o.statusText})`));else{const m=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${m} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,s,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==vr.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,Bi(n,"encrypted",this.onMediaEncrypted),Bi(n,"waitingforkey",this.onWaitingForKey);const r=this.mediaResolved;r?r():this.mediaKeys=n.mediaKeys}onMediaDetached(){const e=this.media;e&&(zi(e,"encrypted",this.onMediaEncrypted),zi(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,Pi.clearKeyUriToKeyIdMap();const i=r.length;ba.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(p.ERROR,{type:de.OTHER_ERROR,details:$.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(p.ERROR,{type:de.OTHER_ERROR,details:$.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: ${ie((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:o}=this.config;return(Ps(o)?new Promise((c,m)=>{self.setTimeout(()=>m(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(c).catch(m)}):Promise.resolve()).catch(c=>{this.log(`Could not remove session: ${c}`),this.hls&&this.hls.trigger(p.ERROR,{type:de.OTHER_ERROR,details:$.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(p.ERROR,{type:de.OTHER_ERROR,details:$.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${c}`)})})}return Promise.resolve()}}ba.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 ie(a.keyId)}function Ac(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 ns 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?$.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:$.KEY_SYSTEM_STATUS_INTERNAL_ERROR;return new ns({type:de.KEY_SYSTEM_ERROR,details:n,fatal:!1,decryptdata:e},t?"HDCP level output restricted":`key status changed to "${a}"`)}class Ic{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(p.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(p.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(p.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,o=t-this.lastDecodedFrames,d=1e3*s/i,c=this.hls;if(c.trigger(p.FPS_DROP,{currentDropped:s,currentDecoded:o,totalDroppedFrames:n}),d>0&&s>c.config.fpsDroppedMonitoringThreshold*o){let m=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+m),m>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=m)&&(m=m-1,c.trigger(p.FPS_DROP_LEVEL_CAPPING,{level:m,droppedLevel:c.currentLevel}),c.autoLevelCapping=m,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 zl(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){me.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){me.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function xa(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 Dc(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=Dc(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const o=a[i];if(o.startTime>=e&&o.endTime<=t)n.push(o);else if(o.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 zo{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(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(p.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVEL_LOADING,this.onLevelLoading,this),e.off(p.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(p.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=>{xa(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 o=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,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,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(m=>!n||n.indexOf(m.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(m=>m.default)&&(this.selectDefaultTrack=!1),s.forEach((m,g)=>{m.id=g});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const o=this.hls.config.subtitlePreference;if(!i&&o){this.selectDefaultTrack=!1;const m=zt(o,s);if(m>-1)i=s[m];else{const g=zt(o,this.tracks);i=this.tracks[g]}}let d=this.findTrackId(i);d===-1&&i&&(d=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(p.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||nn(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(Uo(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ge.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&nn(e,n))return n;const r=zt(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=zt(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,o=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:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(p.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=>Uo(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||!y(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(p.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:o="",name:d,type:c,url:m}=r;this.hls.trigger(p.SUBTITLE_TRACK_SWITCH,{id:s,groupId:o,name:d,type:c,url:m});const g=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(g)}}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 za(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const Ea=.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}-${za(e)}`}class Mc{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=y(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return 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)<Ea))}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 kc(this)}}function Xo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<Ea)?e.start:e.start+e.duration}function Ul(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 kc(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function Sa(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Bc{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(p.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;const s=()=>{this.hasDetails=!0};i.once(p.LEVEL_LOADED,s),i.once(p.AUDIO_TRACK_LOADED,s),i.once(p.SUBTITLE_TRACK_LOADED,s),i.on(p.MEDIA_ATTACHING,(o,{media:d})=>{this.removeMediaListeners(),this.mediaAttached=d,this.interstitial.playoutLimit&&(d.addEventListener("timeupdate",this.checkPlayout),this.appendInPlace&&i.on(p.BUFFER_APPENDED,()=>{const m=this.bufferedEnd;this.reachedPlayout(m)&&(this._bufferedEosTime=m,i.trigger(p.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=Ul(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=xn.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=xn.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: ${Sa(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${this.appendInPlace?"append-in-place":""}`}}const jl=.033;class Fc extends J{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,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 o=s.timelineStart;if(t===o||t>o&&(t<o+(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),o=Object.keys(r),d=i?i.filter(c=>!o.includes(c.identifier)):[];s.length&&s.sort((c,m)=>{const g=c.cue.pre,T=c.cue.post,k=m.cue.pre,B=m.cue.post;if(g&&!k)return-1;if(k&&!g||T&&!B)return 1;if(B&&!T)return-1;if(!g&&!k&&!T&&!B){const oe=c.startTime,ae=m.startTime;if(oe!==ae)return oe-ae}return c.dateRange.tagOrder-m.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 o=i[s],d=e[o];if(d.isInterstitial){let c=this.eventMap[o];c?c.setDateRange(d):(c=new Mc(d,t),this.eventMap[o]=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((m,g)=>{const T=m.cue.pre,k=m.cue.post,B=e[g-1]||null,oe=m.appendInPlace,ae=k?i:m.startOffset,De=m.duration,Me=m.timelineOccupancy===vo.Range?De:0,ze=m.resumptionOffset,dt=(B==null?void 0:B.startTime)===ae,Tt=ae+m.cumulativeDuration;let Yt=oe?Tt+De:ae+ze;if(T||!k&&ae<=0){const Kt=c;c+=Me,m.timelineStart=Tt;const Ht=s;s+=De,n.push({event:m,start:Tt,end:Yt,playout:{start:Ht,end:s},integrated:{start:Kt,end:c}})}else if(ae<=i){if(!dt){const Lt=ae-d;if(Lt>jl){const hn=d,Wn=c;c+=Lt;const rr=s;s+=Lt;const yr={previousEvent:e[g-1]||null,nextEvent:m,start:hn,end:hn+Lt,playout:{start:rr,end:s},integrated:{start:Wn,end:c}};n.push(yr)}else Lt>0&&B&&(B.cumulativeDuration+=Lt,n[n.length-1].end=ae)}k&&(Yt=Tt),m.timelineStart=Tt;const Kt=c;c+=Me;const Ht=s;s+=De,n.push({event:m,start:Tt,end:Yt,playout:{start:Ht,end:s},integrated:{start:Kt,end:c}})}else return;const At=m.resumeTime;k||At>i?d=i:d=At}),d<i){var o;const m=d,g=c,T=i-d;c+=T;const k=s;s+=T,n.push({previousEvent:((o=n[n.length-1])==null?void 0:o.event)||null,nextEvent:null,start:d,end:m+T,playout:{start:k,end:s},integrated:{start:g,end:c}})}this.setDurations(i,s,c)}else n.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((o,d)=>{const c=o.cue.pre,m=o.cue.post,g=c?0:m?r:o.startTime;this.updateAssetDurations(o),s===g?o.cumulativeDuration=i:(i=0,s=g),!m&&o.snapOptions.in&&(o.resumeAnchor=kn(null,n.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.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 ${o}`));const k=y(o.resumeOffset)?o.resumeOffset:o.duration;i+=k})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>Ea?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):!Object.keys(t).some(s=>{const o=t[s].details,d=o.edge;if(n>=d)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${d}`),!1;const c=kn(null,o.fragments,n);if(!c)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${o.fragStart}-${o.fragmentEnd})`),!0;const m=s==="audio"?.175:0;return Math.abs(c.start-n)<Ea+m||Math.abs(c.end-n)<Ea+m?!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 o=e.assetList[s],d=t+n;o.startOffset=n,o.timelineStart=d,r||(r=o.duration===null),i||(i=!!o.error);const c=o.error?0:o.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 fs(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=Ul(n,this.hls.sessionId,e.baseUrl)}catch(T){const k=this.assignAssetListError(e,$.ASSET_LIST_LOAD_ERROR,T,n);this.hls.trigger(p.ERROR,k);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,o=new s(i),d={responseType:"json",url:r.href},c=i.interstitialAssetListLoadPolicy.default,m={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(T,k,B,oe)=>{const ae=T.data,De=ae==null?void 0:ae.ASSETS;if(!Array.isArray(De)){const Me=this.assignAssetListError(e,$.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),B.url,k,oe);this.hls.trigger(p.ERROR,Me);return}e.assetListResponse=ae,this.hls.trigger(p.ASSET_LIST_LOADED,{event:e,assetListResponse:ae,networkDetails:oe})},onError:(T,k,B,oe)=>{const ae=this.assignAssetListError(e,$.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${T.code} ${T.text} (${k.url})`),k.url,oe,B);this.hls.trigger(p.ERROR,ae)},onTimeout:(T,k,B)=>{const oe=this.assignAssetListError(e,$.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${k.url})`),k.url,T,B);this.hls.trigger(p.ERROR,oe)}};return o.load(d,m,g),this.hls.trigger(p.ASSET_LIST_LOADING,{event:e}),o}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:de.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 J{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled||!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 o=this.playingItem;if(!o){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(!0),this.checkBuffer(),s&&n<o.start||n>=o.end){var d;const k=this.findItemIndex(o);let B=this.schedule.findItemIndexAtTime(n);if(B===-1&&(B=k+(s?-1:1),this.log(`seeked ${s?"back ":""}to position not covered by schedule ${n} (resolving from ${k} to ${B})`)),!this.isInterstitial(o)&&(d=this.media)!=null&&d.paused&&(this.shouldPlay=!1),!s&&B>k){const oe=this.schedule.findJumpRestrictedIndex(k+1,B);if(oe>k){this.setSchedulePosition(oe);return}}this.setSchedulePosition(B);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(o)){const k=o.event.assetList[0];k&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,k))}return}const m=c.timelineStart,g=c.duration||0;if(s&&n<m||n>=m+g){var T;(T=o.event)!=null&&T.appendInPlace&&(this.clearAssetPlayers(o.event,o),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 o=this.findItemIndex(r);this.setSchedulePosition(o+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,o=i.events||[],d=i.items||[],c=i.durations,m=n.map(oe=>oe.identifier),g=!!(o.length||m.length);(g||r)&&this.log(`INTERSTITIALS_UPDATED (${o.length}): ${o}
|
|
|
Schedule: ${d.map(oe=>fs(oe))} pos: ${this.timelinePos}`),m.length&&this.log(`Removed events ${m}`);let T=null,k=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 B=this.bufferingItem;if(B&&(k=this.updateItem(B,this.bufferedPos),this.itemsMatch(B,k)?this.bufferingItem=k:B.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(B.event,null))),n.forEach(oe=>{oe.assetList.forEach(ae=>{this.clearAssetPlayer(ae.identifier,null)})}),this.playerQueue.forEach(oe=>{if(oe.interstitial.appendInPlace){const ae=oe.assetItem.timelineStart,De=oe.timelineOffset-ae;if(De)try{oe.timelineOffset=ae}catch(Me){Math.abs(De)>Ea&&this.warn(`${Me} ("${oe.assetId}" ${oe.timelineOffset}->${ae})`)}}}),g||r){if(this.hls.trigger(p.INTERSTITIALS_UPDATED,{events:o.slice(0),schedule:d.slice(0),durations:c,removedIds:m}),this.isInterstitial(s)&&m.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}s&&this.trimInPlace(T,s),B&&k!==T&&this.trimInPlace(k,B),this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Nc(e),this.schedule=new Fc(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e&&(e.on(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(p.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(p.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(p.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(p.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(p.BUFFER_APPENDED,this.onBufferAppended,this),e.on(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(p.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(p.MEDIA_ENDED,this.onMediaEnded,this),e.on(p.ERROR,this.onError,this),e.on(p.DESTROYING,this.onDestroying,this))}unregisterListeners(){const e=this.hls;e&&(e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(p.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(p.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(p.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(p.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(p.BUFFER_CODECS,this.onBufferCodecs,this),e.off(p.BUFFER_APPENDED,this.onBufferAppended,this),e.off(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(p.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(p.MEDIA_ENDED,this.onMediaEnded,this),e.off(p.ERROR,this.onError,this),e.off(p.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){zi(e,"play",this.onPlay),zi(e,"pause",this.onPause),zi(e,"seeking",this.onSeeking),zi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;Bi(n,"seeking",this.onSeeking),Bi(n,"timeupdate",this.onTimeupdate),Bi(n,"play",this.onPlay),Bi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.log("clear schedule state"),this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.log(`Removing schedule state for detachedData and ${i}`),this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.hls)return null;if(this.manager)return this.manager;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=g=>g&&e.getAssetPlayer(g.identifier),r=(g,T,k,B,oe)=>{if(g){let ae=g[T].start;const De=g.event;if(De){if(T==="playout"||De.timelineOccupancy!==vo.Point){const Me=n(k);(Me==null?void 0:Me.interstitial)===De&&(ae+=Me.assetItem.startOffset+Me[oe])}}else{const Me=B==="bufferedPos"?s():e[B];ae+=Me-g.start}return ae}return 0},i=(g,T)=>{var k;if(g!==0&&T!=="primary"&&(k=e.schedule)!=null&&k.length){var B;const oe=e.schedule.findItemIndexAtTime(g),ae=(B=e.schedule.items)==null?void 0:B[oe];if(ae){const De=ae[T].start-ae.start;return g+De}}return g},s=()=>{const g=e.bufferedPos;return g===Number.MAX_VALUE?o("primary"):Math.max(g,0)},o=g=>{var T,k;return(T=e.primaryDetails)!=null&&T.live?e.primaryDetails.edge:((k=e.schedule)==null?void 0:k.durations[g])||0},d=(g,T)=>{var k,B;const oe=e.effectivePlayingItem;if(oe!=null&&(k=oe.event)!=null&&k.restrictions.skip||!e.schedule)return;e.log(`seek to ${g} "${T}"`);const ae=e.effectivePlayingItem,De=e.schedule.findItemIndexAtTime(g,T),Me=(B=e.schedule.items)==null?void 0:B[De],ze=e.getBufferingPlayer(),dt=ze==null?void 0:ze.interstitial,Tt=dt==null?void 0:dt.appendInPlace,Yt=ae&&e.itemsMatch(ae,Me);if(ae&&(Tt||Yt)){const At=n(e.playingAsset),Kt=(At==null?void 0:At.media)||e.primaryMedia;if(Kt){const Ht=T==="primary"?Kt.currentTime:r(ae,T,e.playingAsset,"timelinePos","currentTime"),Lt=g-Ht,hn=(Tt?Ht:Kt.currentTime)+Lt;if(hn>=0&&(!At||Tt||hn<=At.duration)){Kt.currentTime=hn;return}}}if(Me){let At=g;if(T!=="primary"){const Ht=Me[T].start,Lt=g-Ht;At=Me.start+Lt}const Kt=!e.isInterstitial(Me);if((!e.isInterstitial(ae)||ae.event.appendInPlace)&&(Kt||Me.event.appendInPlace)){const Ht=e.media||(Tt?ze==null?void 0:ze.media:null);Ht&&(Ht.currentTime=At)}else if(ae){const Ht=e.findItemIndex(ae);if(De>Ht){const hn=e.schedule.findJumpRestrictedIndex(Ht+1,De);if(hn>Ht){e.setSchedulePosition(hn);return}}let Lt=0;if(Kt)e.timelinePos=At,e.checkBuffer();else{const hn=Me.event.assetList,Wn=g-(Me[T]||Me).start;for(let rr=hn.length;rr--;){const yr=hn[rr];if(yr.duration&&Wn>=yr.startOffset&&Wn<yr.startOffset+yr.duration){Lt=rr;break}}}e.setSchedulePosition(De,Lt)}}},c=()=>{const g=e.effectivePlayingItem;if(e.isInterstitial(g))return g;const T=t();return e.isInterstitial(T)?T:null},m={get bufferedEnd(){const g=t(),T=e.bufferingItem;if(T&&T===g){var k;return r(T,"playout",e.bufferingAsset,"bufferedPos","bufferedEnd")-T.playout.start||((k=e.bufferingAsset)==null?void 0:k.startOffset)||0}return 0},get currentTime(){const g=c(),T=e.effectivePlayingItem;return T&&T===g?r(T,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-T.playout.start:0},set currentTime(g){const T=c(),k=e.effectivePlayingItem;k&&k===T&&d(g+k.playout.start,"playout")},get duration(){const g=c();return g?g.playout.end-g.playout.start:0},get assetPlayers(){var g;const T=(g=c())==null?void 0:g.event.assetList;return T?T.map(k=>e.getAssetPlayer(k.identifier)):[]},get playingIndex(){var g;const T=(g=c())==null?void 0:g.event;return T&&e.effectivePlayingAsset?T.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};return this.manager={get events(){var g;return((g=e.schedule)==null||(g=g.events)==null?void 0:g.slice(0))||[]},get schedule(){var g;return((g=e.schedule)==null||(g=g.items)==null?void 0:g.slice(0))||[]},get interstitialPlayer(){return c()?m:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const g=t();return e.findItemIndex(g)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const g=e.effectivePlayingItem;return e.findItemIndex(g)},primary:{get bufferedEnd(){return s()},get currentTime(){const g=e.timelinePos;return g>0?g:0},set currentTime(g){d(g,"primary")},get duration(){return o("primary")},get seekableStart(){var g;return((g=e.primaryDetails)==null?void 0:g.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(g){d(g,"integrated")},get duration(){return o("integrated")},get seekableStart(){var g;return i(((g=e.primaryDetails)==null?void 0:g.fragmentStart)||0,"integrated")}},skip:()=>{const g=e.effectivePlayingItem,T=g==null?void 0:g.event;if(T&&!T.restrictions.skip){const k=e.findItemIndex(g);if(T.appendInPlace){const B=g.playout.start+g.event.duration;d(B+.001,"playout")}else e.advanceAfterAssetEnded(T,k,1/0)}}}}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let r=this.media;!r&&(e=this.bufferingItem)!=null&&(e=e.event)!=null&&e.appendInPlace&&(r=this.primaryMedia);const i=(t=r)==null?void 0:t.currentTime;if(!(i===void 0||!y(i)))return i}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const 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} ${nt(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,o=e!==s,d=o&&e.interstitial.appendInPlace,c=(n=this.detachedData)==null?void 0:n.mediaSource;let m;if(s.media)d&&(i=s.transferMedia(),this.detachedData=i),m="Primary";else if(c){const B=this.getBufferingPlayer();B?(i=B.transferMedia(),m=`${B}`):m="detached MediaSource"}else m="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${nt(i)}`);else if(!this.detachedData||s.media===t){const B=this.playerQueue;B.length>1&&B.forEach(oe=>{if(o&&oe.interstitial.appendInPlace!==d){const ae=oe.interstitial;this.clearInterstitial(oe.interstitial,null),ae.appendInPlace=!1,ae.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${ae}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const g=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",T=g&&i?i:t;this.log(`${g?"transfering MediaSource":"attaching media"} to ${o?e:"Primary"} from ${m} (media.currentTime: ${t.currentTime})`);const k=this.schedule;if(T===i&&k){const B=o&&e.assetId===k.assetIdAtEnd;T.overrides={duration:k.duration,endOfStream:!o||B,cueRemoval:!o}}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,o=e.findItemIndexAtTime(s);this.setSchedulePosition(o)}}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 o=(s=this.schedule.items)==null?void 0:s[this.findItemIndex(e)+1];o&&this.bufferedToItem(o)}}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,o=i.length;if(s>=o){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),o=n.findAssetIndex(i,e);this.advanceAfterAssetEnded(i,s,o-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&&fs(i)}) pos: ${this.timelinePos}`);const s=this.waitingItem||this.playingItem,o=this.playingLastItem;if(this.isInterstitial(s)){const m=s.event,g=this.playingAsset,T=g==null?void 0:g.identifier,k=T?this.getAssetPlayer(T):null;if(k&&T&&(!this.eventItemsMatch(s,i)||t!==void 0&&T!==m.assetList[t].identifier)){var d;const B=m.findAssetIndex(g);if(this.log(`INTERSTITIAL_ASSET_ENDED ${B+1}/${m.assetList.length} ${Sa(g)}`),this.endedAsset=g,this.playingAsset=null,this.hls.trigger(p.INTERSTITIAL_ASSET_ENDED,{asset:g,assetListIndex:B,event:m,schedule:r.slice(0),scheduleIndex:e,player:k}),s!==this.playingItem){this.itemsMatch(s,this.playingItem)&&!this.playingAsset&&this.advanceAfterAssetEnded(m,this.findItemIndex(this.playingItem),B);return}this.retreiveMediaSource(T,i),k.media&&!((d=this.detachedData)!=null&&d.mediaSource)&&k.detachMedia()}if(!this.eventItemsMatch(s,i)&&(this.endedItem=s,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${m} ${fs(s)}`),m.hasPlayed=!0,this.hls.trigger(p.INTERSTITIAL_ENDED,{event:m,schedule:r.slice(0),scheduleIndex:e}),m.cue.once)){var c;this.updateSchedule();const B=(c=this.schedule)==null?void 0:c.items;if(i&&B){const oe=this.findItemIndex(i);this.advanceSchedule(oe,B,t,s,o)}return}}this.advanceSchedule(e,r,t,s,o)}advanceSchedule(e,t,n,r,i){const s=this.schedule;if(!s)return;const o=t[e]||null,d=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(m=>{const g=m.interstitial,T=s.findEventIndex(g.identifier);(T<e||T>e+1)&&this.clearInterstitial(g,o)}),this.isInterstitial(o)){this.timelinePos=Math.min(Math.max(this.timelinePos,o.start),o.end);const m=o.event;if(n===void 0){n=s.findAssetIndex(m,this.timelinePos);const B=Qo(m,n-1);if(m.isAssetPastPlayoutLimit(B)||m.appendInPlace&&this.timelinePos===o.end){this.advanceAfterAssetEnded(m,e,n);return}n=B}const g=this.waitingItem;this.assetsBuffered(o,d)||this.setBufferingItem(o);let T=this.preloadAssets(m,n);if(this.eventItemsMatch(o,g||r)||(this.waitingItem=o,this.log(`INTERSTITIAL_STARTED ${fs(o)} ${m.appendInPlace?"append in place":""}`),this.hls.trigger(p.INTERSTITIAL_STARTED,{event:m,schedule:t.slice(0),scheduleIndex:e})),!m.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${m}`);return}if(m.assetListLoader&&(m.assetListLoader.destroy(),m.assetListLoader=void 0),!d){this.log(`Waiting for attachMedia to start Interstitial ${m}`);return}this.waitingItem=this.endedItem=null,this.playingItem=o;const k=m.assetList[n];if(!k){this.advanceAfterAssetEnded(m,e,n||0);return}if(T||(T=this.getAssetPlayer(k.identifier)),T===null||T.destroyed){const B=m.assetList.length;this.warn(`asset ${n+1}/${B} player destroyed ${m}`),T=this.createAssetPlayer(m,k,n),T.loadSource()}if(!this.eventItemsMatch(o,this.bufferingItem)&&m.appendInPlace&&this.isAssetBuffered(k))return;this.startAssetPlayer(T,n,t,e,d),this.shouldPlay&&Hl(T.media)}else o?(this.resumePrimary(o,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 ${fs(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let o=this.timelinePos;(o<e.start||o>=e.end)&&(o=this.getPrimaryResumption(e,t),this.log(yo("resumePrimary",o)),this.timelinePos=o),this.attachPrimary(o,e)}if(!n)return;const s=(i=this.schedule)==null?void 0:i.items;s&&(this.log(`INTERSTITIALS_PRIMARY_RESUMED ${fs(e)}`),this.hls.trigger(p.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:xn.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(p.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(p.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=w(w({},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=w(w({},this.altSelection),{},{audio:n});return}const i=w(w({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=w(w({},this.altSelection),{},{subtitles:n});return}const i=w(w({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=Nt(t);this.playerQueue.forEach(({hls:r})=>r&&(r.setAudioOption(t)||r.setAudioOption(n)))}onSubtitleTrackSwitch(e,t){const n=Nt(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),o=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(o)&&this.eventItemsMatch(o,this.bufferingItem)&&this.bufferedToItem(o,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const 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=xn.bufferInfo(this.primaryMedia,n,0);(r.end>n||(r.nextStart||0)>n)&&(this.log(`trim buffered interstitial ${fs(e)} (was ${fs(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=xn.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,o=this.findItemIndex(s);let d=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var c;const m=this.findItemIndex(i),g=Math.min(m+1,t.length-1),T=t[g];if((d===-1&&i&&e>=i.end||(c=T.event)!=null&&c.appendInPlace&&e+.01>=T.start)&&(d=g),this.isInterstitial(i)){const k=i.event;if(g-o>1&&k.appendInPlace===!1||k.assetList.length===0&&k.assetListLoader)return}if(this.bufferedPos=e,d>m&&d>o)this.bufferedToItem(T);else{const k=this.primaryDetails;this.primaryLive&&k&&e>k.edge-k.targetduration&&T.start<k.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(T)&&this.preloadAssets(T.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(d===o?this.bufferedToItem(s):d===o+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),o=this.getBufferingPlayer();this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos));const d=o?o.remaining:t?t.end-this.timelinePos:0;if(this.log(`INTERSTITIALS_BUFFERED_TO_BOUNDARY ${fs(e)}`+(t?` (${d.toFixed(2)} remaining)`:"")),!this.playbackDisabled)if(s){const c=n.findAssetIndex(e.event,this.bufferedPos);e.event.assetList.forEach((m,g)=>{const T=this.getAssetPlayer(m.identifier);T&&(g===c&&T.loadSource(),T.resumeBuffering())})}else this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering());this.hls.trigger(p.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 o=this.primaryMedia;o&&this.bufferAssetPlayer(s,o)}}}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 o;const T=this.playingItem;!this.isInterstitial(T)&&(T==null||(o=T.nextEvent)==null?void 0:o.identifier)===e.identifier&&this.flushFrontBuffer(d+.25)}let c,m=0;if(!this.playingItem&&this.primaryLive&&(m=this.hls.startPosition,m===-1&&(m=this.hls.liveSyncPosition||0)),m&&!(e.cue.pre||e.cue.post)){const T=m-d;T>0&&(c=Math.round(T*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${c?` live-start: ${m} start-offset: ${c}`:""}`),n)return this.createAsset(e,0,0,d,e.duration,n);const g=this.assetListLoader.loadAssetList(e,c);g&&(e.assetListLoader=g)}else if(!s&&r){for(let c=t;c<r;c++){const m=e.assetList[c],g=this.getAssetPlayerQueueIndex(m.identifier);(g===-1||this.playerQueue[g].destroyed)&&!m.error&&this.createAssetPlayer(e,m,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(p.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 o={parentIdentifier:e.identifier,identifier:Pc(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,o,t)}createAssetPlayer(e,t,n){const r=this.hls,i=r.userConfig;let s=i.videoPreference;const o=r.loadLevelObj||r.levels[r.currentLevel];(s||o)&&(s=_({},s),o.videoCodec&&(s.videoCodec=o.videoCodec),o.videoRange&&(s.allowedVideoRanges=[o.videoRange]));const d=r.audioTracks[r.audioTrack],c=r.subtitleTracks[r.subtitleTrack];let m=0;if(this.primaryLive||e.appendInPlace){const dt=this.timelinePos-t.timelineStart;if(dt>1){const Tt=t.duration;Tt&&dt<Tt&&(m=dt)}}const g=t.identifier,T=w(w({},i),{},{maxMaxBufferLength:Math.min(180,r.config.maxMaxBufferLength),autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:g,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:m,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 k=T.cmcd;k!=null&&k.sessionId&&k.contentId&&(T.cmcd=_({},k,{contentId:za(t.uri)})),this.getAssetPlayer(g)&&this.warn(`Duplicate date range identifier ${e} and asset ${g}`);const B=new Bc(this.HlsPlayerClass,T,e,t);this.playerQueue.push(B),e.assetList[n]=t;let oe=!0;const ae=dt=>{if(dt.live){var Tt;const Kt=new Error(`Interstitials MUST be VOD assets ${e}`),Ht={fatal:!0,type:de.OTHER_ERROR,details:$.INTERSTITIAL_ASSET_ITEM_ERROR,error:Kt},Lt=((Tt=this.schedule)==null?void 0:Tt.findEventIndex(e.identifier))||-1;this.handleAssetItemError(Ht,e,Lt,n,Kt.message);return}const Yt=dt.edge-dt.fragmentStart,At=t.duration;(oe||At===null||Yt>At)&&(oe=!1,this.log(`Interstitial asset "${g}" duration change ${At} > ${Yt}`),t.duration=Yt,this.updateSchedule())};B.on(p.LEVEL_UPDATED,(dt,{details:Tt})=>ae(Tt)),B.on(p.LEVEL_PTS_UPDATED,(dt,{details:Tt})=>ae(Tt)),B.on(p.EVENT_CUE_ENTER,()=>this.onInterstitialCueEnter());const De=(dt,Tt)=>{const Yt=this.getAssetPlayer(g);if(Yt&&Tt.tracks){Yt.off(p.BUFFER_CODECS,De),Yt.tracks=Tt.tracks;const At=this.primaryMedia;this.bufferingAsset===Yt.assetItem&&At&&!Yt.media&&this.bufferAssetPlayer(Yt,At)}};B.on(p.BUFFER_CODECS,De);const Me=()=>{var dt;const Tt=this.getAssetPlayer(g);if(this.log(`buffered to end of asset ${Tt}`),!Tt||!this.schedule)return;const Yt=this.schedule.findEventIndex(e.identifier),At=(dt=this.schedule.items)==null?void 0:dt[Yt];this.isInterstitial(At)&&this.advanceAssetBuffering(At,t)};B.on(p.BUFFERED_TO_END,Me);const ze=dt=>()=>{if(!this.getAssetPlayer(g)||!this.schedule)return;this.shouldPlay=!0;const Yt=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,Yt,dt)};return B.once(p.MEDIA_ENDED,ze(n)),B.once(p.PLAYOUT_LIMIT_REACHED,ze(1/0)),B.on(p.ERROR,(dt,Tt)=>{if(!this.schedule)return;const Yt=this.getAssetPlayer(g);if(Tt.details===$.BUFFER_STALLED_ERROR){if(Yt!=null&&Yt.appendInPlace){this.handleInPlaceStall(e);return}this.onTimeupdate(),this.checkBuffer(!0);return}this.handleAssetItemError(Tt,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${Tt.error} ${e}`)}),B.on(p.DESTROYING,()=>{if(!this.getAssetPlayer(g)||!this.schedule)return;const Tt=new Error(`Asset player destroyed unexpectedly ${g}`),Yt={fatal:!0,type:de.OTHER_ERROR,details:$.INTERSTITIAL_ASSET_ITEM_ERROR,error:Tt};this.handleAssetItemError(Yt,e,this.schedule.findEventIndex(e.identifier),n,Tt.message)}),this.log(`INTERSTITIAL_ASSET_PLAYER_CREATED ${Sa(t)}`),this.hls.trigger(p.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:B}),B}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&&fs(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:o,assetId:d}=e,c=s.assetList.length,m=this.playingAsset;this.endedAsset=null,this.playingAsset=o,(!m||m.identifier!==d)&&(m&&(this.clearAssetPlayer(m.identifier,n[r]),delete m.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${Sa(o)}`),this.hls.trigger(p.INTERSTITIAL_ASSET_STARTED,{asset:o,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,o=this.schedule.findEventIndex(i.identifier),d=(n=this.schedule.items)==null?void 0:n[o];if(!d)return;e.loadSource(),this.setBufferingItem(d),this.bufferingAsset=s;const c=this.getBufferingPlayer();if(c===e)return;const m=i.appendInPlace;if(m&&(c==null?void 0:c.interstitial.appendInPlace)===!1)return;const g=(c==null?void 0:c.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(m&&s!==this.playingAsset){if(!e.tracks){this.log(`Waiting for track info before buffering ${e}`);return}if(g&&!Le(g,e.tracks)){const T=new Error(`Asset ${Sa(s)} SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(g)}')`),k={fatal:!0,type:de.OTHER_ERROR,details:$.INTERSTITIAL_ASSET_ITEM_ERROR,error:T},B=i.findAssetIndex(s);this.handleAssetItemError(k,i,o,B,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 o=this.getAssetPlayer(s.identifier);if(o){const d=o.currentTime||r-s.timelineStart,c=o.duration-d;if(this.warn(`Stalled at ${d} of ${d+c} in ${o} ${e} (media.currentTime: ${r})`),d&&(c/n.playbackRate<.5||o.bufferedInPlaceToEnd(n))&&o.hls){const m=t.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,m,i)}}}}advanceInPlace(e){const t=this.primaryMedia;t&&t.currentTime<e&&(t.currentTime=e)}handleAssetItemError(e,t,n,r,i){if(e.details===$.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;if(this.warn(`INTERSTITIAL_ASSET_ERROR ${s&&Sa(s)} ${e.error}`),!this.schedule)return;const o=(s==null?void 0:s.identifier)||"",d=this.getAssetPlayerQueueIndex(o),c=this.playerQueue[d]||null,m=this.schedule.items,g=_({},e,{fatal:!1,errorAction:jt(!0),asset:s,assetListIndex:r,event:t,schedule:m,scheduleIndex:n,player:c});if(this.hls.trigger(p.INTERSTITIAL_ASSET_ERROR,g),!e.fatal)return;const T=this.playingAsset,k=this.bufferingAsset,B=new Error(i);if(s&&(this.clearAssetPlayer(o,null),s.error=B),!t.assetList.some(oe=>!oe.error))t.error=B;else for(let oe=r;oe<t.assetList.length;oe++)this.resetAssetPlayer(t.assetList[oe].identifier);this.updateSchedule(!0),t.error?this.primaryFallback(t):T&&T.identifier===o?this.advanceAfterAssetEnded(t,n,r):k&&k.identifier===o&&this.isInterstitial(this.bufferingItem)&&this.advanceAssetBuffering(this.bufferingItem,k)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;let r=this.timelinePos;if(n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${r} playing: ${fs(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,o=t.assetListResponse.ASSETS;if(!((n=this.schedule)!=null&&n.hasEvent(s)))return;const d=i.timelineStart,c=i.duration;let m=0;o.forEach((oe,ae)=>{const De=parseFloat(oe.DURATION);this.createAsset(i,ae,m,d+m,De,oe.URI),m+=De}),i.duration=m,this.log(`Loaded asset-list with duration: ${m} (was: ${c}) ${i}`);const g=this.waitingItem,T=(g==null?void 0:g.event.identifier)===s;this.updateSchedule();const k=(r=this.bufferingItem)==null?void 0:r.event;if(T){var B;const oe=this.schedule.findEventIndex(s),ae=(B=this.schedule.items)==null?void 0:B[oe];if(ae){if(!this.playingItem&&this.timelinePos>ae.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==oe){i.error=new Error(`Interstitial ${o.length?"no longer within playback range":"asset-list is empty"} ${this.timelinePos} ${i}`),this.log(i.error.message),this.updateSchedule(!0),this.primaryFallback(i);return}this.setBufferingItem(ae)}this.setSchedulePosition(oe)}else if((k==null?void 0:k.identifier)===s){const oe=i.assetList[0];if(oe){const ae=this.getAssetPlayer(oe.identifier);if(k.appendInPlace){const De=this.primaryMedia;ae&&De&&this.bufferAssetPlayer(ae,De)}else ae&&ae.loadSource()}}}onError(e,t){if(this.schedule)switch(t.details){case $.ASSET_LIST_PARSING_ERROR:case $.ASSET_LIST_LOAD_ERROR:case $.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&(this.updateSchedule(!0),this.primaryFallback(n));break}case $.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 zc extends ea{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",le.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(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(p.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(p.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(p.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(p.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=on.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)||(Ve(n)&&(this.fragPrevious=n),this.state=on.IDLE),!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const o=n.start;for(let c=0;c<i.length;c++)if(o>=i[c].start&&o<=i[c].end){s=i[c];break}const d=n.start+n.duration;s?s.end=d:(s={start:o,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 o=0;o<s.length;){if(s[o].end<=i){s.shift();continue}else if(s[o].start<i)s[o].start=i;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(n,i,le.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===le.SUBTITLE&&(t.details===$.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==on.STOPPED&&(this.state=on.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&_l(this.levels,t)){this.levels=t.map(n=>new Rt(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new Rt(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,le.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!==on.STOPPED&&this.setInterval(Kl)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:o}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${o}`);return}const d=i[o];if(o>=i.length||!d)return;this.log(`Subtitle track ${o} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(n=d.details)!=null&&n.live){if(s.deltaUpdateFailed)return;const g=this.mainDetails;if(!g){this.startFragRequested=!1;return}const T=g.fragments[0];if(!d.details)s.hasProgramDateTime&&g.hasProgramDateTime?(zs(s,g),c=s.fragmentStart):T&&(c=T.start,qs(s,c));else{var m;c=this.alignPlaylists(s,d.details,(m=this.levelLastLoaded)==null?void 0:m.details),c===0&&T&&(c=T.start,qs(s,c))}g&&!this.startFragRequested&&this.setStartPosition(g,c)}d.details=s,this.levelLastLoaded=d,o===r&&(this.hls.trigger(p.SUBTITLE_TRACK_UPDATED,{details:s,id:o,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===on.IDLE&&(kn(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&&tr(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,mr(r.method)).catch(o=>{throw i.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const d=performance.now();i.trigger(p.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:s,tdecrypt:d}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=on.IDLE})}}doTick(){if(!this.media){this.state=on.IDLE;return}if(this.state===on.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=xn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:o,len:d}=s,c=n.details,m=this.hls.maxBufferLength+c.levelTargetDuration;if(d>m)return;const g=c.fragments,T=g.length,k=c.edge;let B=null;const oe=this.fragPrevious;if(o<k){const Me=r.maxFragLookUpTolerance,ze=o>k-Me?0:Me;B=kn(oe,g,Math.max(g[0].start,o),ze),!B&&oe&&oe.start<g[0].start&&(B=g[0])}else B=g[T-1];if(B=this.filterReplacedPrimary(B,n.details),!B)return;const ae=B.sn-c.startSN,De=g[ae-1];if(De&&De.cc===B.cc&&this.fragmentTracker.getState(De)===un.NOT_LOADED&&(B=De),this.fragmentTracker.getState(B)===un.NOT_LOADED){const Me=this.mapToInitFragWhenRequired(B);Me&&this.loadFragment(Me,n,o)}}}loadFragment(e,t,n){Ve(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new Uc(this.tracksBuffered[this.currentTrackId]||[])}}class Uc{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),ms=15,Os=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;me.log(`${this.time} [${e}] ${n}`)}}}const la=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<Os;t++)this.chars.push(new Yc);this.logger=e}equals(e){for(let t=0;t<Os;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Os;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Os;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>Os&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Os)}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>=Os){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<Os;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<Os;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=ms-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<ms;t++)this.rows.push(new Xc(e));this.logger=e}reset(){for(let e=0;e<ms;e++)this.rows[e].clear();this.currRow=ms-1}equals(e){let t=!0;for(let n=0;n<ms;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<ms;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ms;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 = "+nt(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let o=0;o<ms;o++)this.rows[o].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const o=s.rows[i].cueStartTime,d=this.logger.time;if(o!==null&&d!==null&&o<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 = "+nt(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<ms;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[ms-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[ms-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: "+nt(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,o=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+la([t[n],t[n+1]])+"] -> ("+la([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 ("+la([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&&(o=this.parseChars(r,i),o)){const m=this.currentChannel;m&&m>0?this.channels[m].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!o&&this.logger.log(2,()=>"Couldn't parse cleaned data "+la([r,i])+" orig: "+la([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 ("+la([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 o=this.channels[s];return o?(o.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 = "+la(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 o=e<=23?1:2;return this.channels[o].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}_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(Sr!=null&&Sr.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,d){if(typeof d!="string"||!Array.isArray(o))return!1;const c=d.toLowerCase();return~o.indexOf(c)?c:!1}function n(o){return t(a,o)}function r(o){return t(e,o)}function i(o,...d){let c=1;for(;c<arguments.length;c++){const m=arguments[c];for(const g in m)o[g]=m[g]}return o}function s(o,d,c){const m=this,g={enumerable:!0};m.hasBeenReset=!1;let T="",k=!1,B=o,oe=d,ae=c,De=null,Me="",ze=!0,dt="auto",Tt="start",Yt=50,At="middle",Kt=50,Ht="middle";Object.defineProperty(m,"id",i({},g,{get:function(){return T},set:function(Lt){T=""+Lt}})),Object.defineProperty(m,"pauseOnExit",i({},g,{get:function(){return k},set:function(Lt){k=!!Lt}})),Object.defineProperty(m,"startTime",i({},g,{get:function(){return B},set:function(Lt){if(typeof Lt!="number")throw new TypeError("Start time must be set to a number.");B=Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"endTime",i({},g,{get:function(){return oe},set:function(Lt){if(typeof Lt!="number")throw new TypeError("End time must be set to a number.");oe=Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"text",i({},g,{get:function(){return ae},set:function(Lt){ae=""+Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"region",i({},g,{get:function(){return De},set:function(Lt){De=Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"vertical",i({},g,{get:function(){return Me},set:function(Lt){const hn=n(Lt);if(hn===!1)throw new SyntaxError("An invalid or illegal string was specified.");Me=hn,this.hasBeenReset=!0}})),Object.defineProperty(m,"snapToLines",i({},g,{get:function(){return ze},set:function(Lt){ze=!!Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"line",i({},g,{get:function(){return dt},set:function(Lt){if(typeof Lt!="number"&&Lt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");dt=Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"lineAlign",i({},g,{get:function(){return Tt},set:function(Lt){const hn=r(Lt);if(!hn)throw new SyntaxError("An invalid or illegal string was specified.");Tt=hn,this.hasBeenReset=!0}})),Object.defineProperty(m,"position",i({},g,{get:function(){return Yt},set:function(Lt){if(Lt<0||Lt>100)throw new Error("Position must be between 0 and 100.");Yt=Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"positionAlign",i({},g,{get:function(){return At},set:function(Lt){const hn=r(Lt);if(!hn)throw new SyntaxError("An invalid or illegal string was specified.");At=hn,this.hasBeenReset=!0}})),Object.defineProperty(m,"size",i({},g,{get:function(){return Kt},set:function(Lt){if(Lt<0||Lt>100)throw new Error("Size must be between 0 and 100.");Kt=Lt,this.hasBeenReset=!0}})),Object.defineProperty(m,"align",i({},g,{get:function(){return Ht},set:function(Lt){const hn=r(Lt);if(!hn)throw new SyntaxError("An invalid or illegal string was specified.");Ht=hn,this.hasBeenReset=!0}})),m.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 o=s[0],d=s[1];e(o,d)}}const el=new Jo(0,0,""),bo=el.align==="middle"?"middle":"center";function t0(a,e,t){const n=a;function r(){const o=Yl(a);if(o===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),o}function i(o,d){const c=new e0;Xl(o,function(T,k){let B;switch(T){case"region":for(let oe=t.length-1;oe>=0;oe--)if(t[oe].id===k){c.set(T,t[oe].region);break}break;case"vertical":c.alt(T,k,["rl","lr"]);break;case"line":B=k.split(","),c.integer(T,B[0]),c.percent(T,B[0])&&c.set("snapToLines",!1),c.alt(T,B[0],["auto"]),B.length===2&&c.alt("lineAlign",B[1],["start",bo,"end"]);break;case"position":B=k.split(","),c.percent(T,B[0]),B.length===2&&c.alt("positionAlign",B[1],["start",bo,"end","line-left","line-right","auto"]);break;case"size":c.percent(T,k);break;case"align":c.alt(T,k,["start",bo,"end","left","right"]);break}},/:/,/\s/),d.region=c.get("region",null),d.vertical=c.get("vertical","");let m=c.get("line","auto");m==="auto"&&el.line===-1&&(m=-1),d.line=m,d.lineAlign=c.get("lineAlign","start"),d.snapToLines=c.get("snapToLines",!0),d.size=c.get("size",100),d.align=c.get("align",bo);let g=c.get("position","auto");g==="auto"&&el.position===50&&(g=d.align==="start"||d.align==="left"?0:d.align==="end"||d.align==="right"?100:50),d.position=g}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function Ql(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}class 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 o=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
|
`&&++s,t.buffer=i.slice(s),o}function r(i){Xl(i,function(s,o){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const o=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=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(o){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=i.indexOf("-->")!==-1;if(!i||o&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
|
|
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
|
|
|
|
|
|
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const 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(!y(t)||!y(n)||!y(r)||!y(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 za(a.toString())+za(e.toString())+za(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 o=new n0,d=at(new Uint8Array(a)).trim().replace(r0,`
|
|
|
`).split(`
|
|
|
`),c=[],m=e?xs(e.baseTime,e.timescale):0;let g="00:00.000",T=0,k=0,B,oe=!0;o.oncue=function(ae){const De=t[n];let Me=t.ccOffset;const ze=(T-m)/9e4;if(De!=null&&De.new&&(k!==void 0?Me=t.ccOffset=De.start:s0(t,n,ze)),ze){if(!e){B=new Error("Missing initPTS for VTT MPEGTS");return}Me=ze-t.presentationOffset}const dt=ae.endTime-ae.startTime,Tt=Zi((ae.startTime+Me-k)*9e4,r*9e4)/9e4;ae.startTime=Math.max(Tt,0),ae.endTime=Math.max(Tt+dt,0);const Yt=ae.text.trim();ae.text=decodeURIComponent(encodeURIComponent(Yt)),ae.id||(ae.id=nl(ae.startTime,ae.endTime,Yt)),ae.endTime>0&&c.push(ae)},o.onparsingerror=function(ae){B=ae},o.onflush=function(){if(B){s(B);return}i(c)},d.forEach(ae=>{if(oe)if(tl(ae,"X-TIMESTAMP-MAP=")){oe=!1,ae.slice(16).split(",").forEach(De=>{tl(De,"LOCAL:")?g=De.slice(6):tl(De,"MPEGTS:")&&(T=parseInt(De.slice(7)))});try{k=i0(g)/1e3}catch(De){B=De}return}else ae===""&&(oe=!1);o.parse(ae+`
|
|
|
`)}),o.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=se(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(o=>at(o)),s=es(e.baseTime,1,e.timescale);try{i.forEach(o=>t(l0(o,s)))}catch(o){n(o)}}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((g,T)=>(g[T]=r.getAttribute(`ttp:${T}`)||i[T],g),{}),o=r.getAttribute("xml:space")!=="preserve",d=tu(il(r,"styling","style")),c=tu(il(r,"layout","region")),m=il(r,"body","[begin]");return[].map.call(m,g=>{const T=nu(g,o);if(!T||!g.hasAttribute("begin"))return null;const k=al(g.getAttribute("begin"),s),B=al(g.getAttribute("dur"),s);let oe=al(g.getAttribute("end"),s);if(k===null)throw ru(g);if(oe===null){if(B===null)throw ru(g);oe=k+B}const ae=new Jo(k-e,oe-e,T);ae.id=nl(ae.startTime,ae.endTime,ae.text);const De=c[g.getAttribute("region")],Me=d[g.getAttribute("style")],ze=u0(De,Me,d),{textAlign:dt}=ze;if(dt){const Tt=o0[dt];Tt&&(ae.lineAlign=Tt),ae.align=dt}return _(ae,ze),ae}).filter(g=>g!==null)}function il(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function tu(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function nu(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
|
|
|
`:(i=n.childNodes)!=null&&i.length?nu(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function 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((o,d)=>{const c=sl(e,n,d)||sl(a,n,d)||sl(r,n,d);return c&&(o[d]=c),o},{})}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(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(p.FRAG_LOADING,this.onFragLoading,this),e.on(p.FRAG_LOADED,this.onFragLoaded,this),e.on(p.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(p.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(p.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(p.FRAG_LOADING,this.onFragLoading,this),e.off(p.FRAG_LOADED,this.onFragLoaded,this),e.off(p.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(p.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(p.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(p.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(p.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 o=i.length;o--;){const d=i[o],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 o=this.captionsTracks[e];this.Cues.newCue(o,t,n,r)}else{const o=this.Cues.newCue(null,t,n,r);this.hls.trigger(p.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i,trackId:s}){const{unparsedVttFrags:o}=this;n===le.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i,trackId:s}),o.length&&(this.unparsedVttFrags=[],o.forEach(d=>{this.initPTS[d.frag.cc]?this.onFragLoaded(p.FRAG_LOADED,d):this.hls.trigger(p.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],o=this.getExistingTrack(i,s);if(o)n[e]=o,xa(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(p.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=>{xa(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++)xa(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,o=s?go(s.textTracks):null;if(this.tracks.forEach((d,c)=>{let m;if(o){let g=null;for(let T=0;T<o.length;T++)if(o[T]&&su(o[T],d)){g=o[T],o[T]=null;break}g&&(m=g)}if(m)xa(m);else{const g=iu(d);m=this.createTextTrack(g,d.name,d.lang),m&&(m.mode="disabled")}m&&this.textTracks.push(m)}),o!=null&&o.length){const d=o.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(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(p.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===le.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:o}=this,{cc:d,sn:c}=t.frag,m=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(c!==o+1||c===o&&m!==this.lastPartIndex+1||d!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=d,this.lastSn=c,this.lastPartIndex=m}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===le.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const o=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),o&&o.textCodec===rl?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(p.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(p.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(p.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,o=i.length-1;if(!i[n.cc]&&o===-1){s.push(e);return}const d=this.hls,c=(t=n.initSegment)!=null&&t.data?ht(n.initSegment.data,new Uint8Array(r)).buffer:r;a0(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,m=>{this._appendCues(m,n.level),d.trigger(p.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},m=>{const g=m.message==="Missing initPTS for VTT MPEGTS";g?s.push(e):this._fallbackToIMSC1(n,r),d.logger.log(`Failed to parse VTT cue: ${m}`),!(g&&o>n.cc)&&d.trigger(p.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:m})})}_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=>zl(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(p.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===le.SUBTITLE&&this.onFragLoaded(p.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===le.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 o=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,o[0]),this.cea608Parser2.addData(r[i].pts,o[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:o}=this;Object.keys(o).forEach(d=>Yo(o[d],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(d=>Yo(o[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++],o=127&e[r++],d=127&e[r++];if(o===0&&d===0)continue;if((4&s)!==0){const m=3&s;(m===0||m===1)&&(t[m].push(o),t[m].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)&&Uo(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,o,d,c;const m=self.VTTCue||self.TextTrackCue;for(let T=0;T<n.rows.length;T++)if(i=n.rows[T],o=!0,d=0,c="",!i.isEmpty()){var g;for(let oe=0;oe<i.chars.length;oe++)m0.test(i.chars[oe].uchar)&&o?d++:(c+=i.chars[oe].uchar,o=!1);i.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const k=Ql(c.trim()),B=nl(e,t,k);a!=null&&(g=a.cues)!=null&&g.getCueById(B)||(s=new m(e,t,k),s.id=B,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,k)=>T.line==="auto"||k.line==="auto"?0:T.line>8&&k.line>8?k.line-T.line:T.line-k.line),r.forEach(T=>zl(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 C}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",o=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&&y(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(g=>{var T;this.response=this.loader=g;const k=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},c-(k-r.loading.start)),!g.ok){const{status:oe,statusText:ae}=g;throw new E0(ae||"fetch, bad network response",oe,g)}r.loading.first=k,r.total=b0(g.headers)||r.total;const B=(T=this.callbacks)==null?void 0:T.onProgress;return B&&y(t.highWaterMark)?this.loadProgressively(g,r,e,t.highWaterMark,B):s?g.arrayBuffer():e.responseType==="json"?g.json():g.text()}).then(g=>{var T,k;const B=this.response;if(!B)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const oe=g[o];oe&&(r.loaded=r.total=oe);const ae={url:B.url,data:g,code:B.status},De=(T=this.callbacks)==null?void 0:T.onProgress;De&&!y(t.highWaterMark)&&De(r,e,g,B),(k=this.callbacks)==null||k.onSuccess(ae,r,e,B)}).catch(g=>{var T;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const k=g&&g.code||0,B=g?g.message:null;(T=this.callbacks)==null||T.onError({code:k,text:B},e,g?g.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new Ca,o=e.body.getReader(),d=()=>o.read().then(c=>{if(c.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const m=c.value,g=m.length;return t.loaded+=g,g<r||s.dataLength?(s.push(m),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,m.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(_({},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(y(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 C,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 o;(o=this.callbacks)==null||o.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 o in r)e.setRequestHeader(o,r[o]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=i&&y(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,m=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const B=m!=null?m:t.response;if(B!=null){var s,o;n.loading.end=Math.max(self.performance.now(),n.loading.first);const oe=t.responseType==="arraybuffer"?B.byteLength:B.length;n.loaded=n.total=oe,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const ae=(s=this.callbacks)==null?void 0:s.onProgress;ae&&ae(n,e,B,t);const De={url:t.responseURL,data:B,code:c};(o=this.callbacks)==null||o.onSuccess(De,n,e,t);return}}const g=i.loadPolicy.errorRetry,T=n.retry,k={url:e.url,data:void 0,code:c};if(pr(g,T,!1,k))this.retry(g);else{var d;me.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(pr(e,t,!0))this.retry(e);else{var n;me.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=jn(e,n.retry),n.retry++,me.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},T0=w(w({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,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:Ln,bufferController:Ru,capLevelController:Ho,errorController:Mt,fpsController:Ic,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:yi,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},C0()),{},{subtitleStreamController:zc,subtitleTrackController:Lc,timelineController:h0,audioStreamController:Cu,audioTrackController:Au,emeController:ba,cmcdController:wc,contentSteeringController:Cc,interstitialsController:$c});function C0(){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 A0(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 o=`${s==="level"?"playlist":s}LoadPolicy`,d=e[o]===void 0,c=[];i.forEach(m=>{const g=`${s}Loading${m}`,T=e[g];if(T!==void 0&&d){c.push(g);const k=n[o].default;switch(e[o]={default:k},m){case"TimeOut":k.maxLoadTimeMs=T,k.maxTimeToFirstByteMs=T;break;case"MaxRetry":k.errorRetry.maxNumRetry=T,k.timeoutRetry.maxNumRetry=T;break;case"RetryDelay":k.errorRetry.retryDelayMs=T,k.timeoutRetry.retryDelayMs=T;break;case"MaxRetryTimeout":k.errorRetry.maxRetryDelayMs=T,k.timeoutRetry.maxRetryDelayMs=T;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${o}": ${nt(e[o])}`)}),w(w({},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 I0(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,D0=.1,R0=.05,L0=100;class O0 extends ei{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(p.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.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;Bi(n,"playing",this.onMediaPlaying),Bi(n,"waiting",this.onMediaWaiting),Bi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(zi(n,"playing",this.onMediaPlaying),zi(n,"waiting",this.onMediaWaiting),zi(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:o}=s,d=this.seeking&&!o,c=!this.seeking&&o,m=s.paused&&!o||s.ended||s.playbackRate===0;if(this.seeking=o,e!==t){t&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!m&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(c||d){d&&this.stallResolved(e);return}if(m){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(p.MEDIA_ENDED,{stalled:!1}));return}if(!xn.getBuffered(s).length){this.nudgeRetry=0;return}const g=xn.bufferInfo(s,e,0),T=g.nextStart||0,k=this.fragmentTracker;if(o&&k&&this.hls){const Yt=uu(this.hls.inFlightFragments,e),At=g.len>Eo,Kt=!T||Yt||T-e>Eo&&!k.getPartialFragment(e);if(At||Kt)return;this.moved=!1}const B=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&k){if(!(g.len>0)&&!T)return;const At=Math.max(T,g.start||0)-e,Ht=!!(B!=null&&B.live)?B.targetduration*2:Eo,Lt=So(e,k);if(At>0&&(At<=Ht||Lt)){s.paused||this._trySkipBufferHole(Lt);return}}const oe=i.detectStallWithCurrentTimeMs,ae=self.performance.now(),De=this.waiting;let Me=this.stalled;if(Me===null)if(De>0&&ae-De<oe)Me=this.stalled=De;else{this.stalled=ae;return}const ze=ae-Me;if(!o&&(ze>=oe||De)&&this.hls){var dt;if(((dt=this.mediaSource)==null?void 0:dt.readyState)==="ended"&&!(B!=null&&B.live)&&Math.abs(e-((B==null?void 0:B.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(p.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(g),!this.media||!this.hls)return}const Tt=xn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(Tt,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(p.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=xn.bufferedInfo(xn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=xn.timeRangesToArray(r),o=xn.bufferedInfo(s,t,0).bufferedIndex;if(o>-1&&o<s.length-1){const d=xn.bufferedInfo(s,e,0).bufferedIndex,c=s[o].end,m=s[o+1].start;if((d===-1||d>o)&&m-c<1&&e-c<2){const g=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${m} buffered index: ${d}`);this.warn(g.message),this.media.currentTime+=1e-6;let T=So(e,this.fragmentTracker);T&&"fragment"in T?T=T.fragment:T||(T=void 0);const k=xn.bufferInfo(this.media,e,0);this.hls.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:g,reason:g.message,frag:T,buffer:k.len,bufferInfo:k})}}}}}_tryFixBufferStall(e,t,n){var r,i;const{fragmentTracker:s,media:o}=this,d=(r=this.hls)==null?void 0:r.config;if(!o||!s||!d)return;const c=(i=this.hls)==null?void 0:i.latestLevelDetails,m=So(n,s);if((m||c!=null&&c.live&&n<c.fragmentStart)&&(this._trySkipBufferHole(m)||!this.media))return;const g=e.buffered,T=this.adjacentTraversal(e,n);(g&&g.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,le.MAIN),s=n.getFragAtPos(r,le.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 (${nt(e)})`);this.warn(s.message),t.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.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,o=xn.bufferInfo(r,s,0),d=s<o.start?o.start:o.nextStart;if(d&&this.hls){const m=o.len<=i.maxBufferHole,g=o.len>0&&o.len<1&&r.readyState<3,T=d-s;if(T>0&&(m||g)){if(T>i.maxBufferHole){let B=!1;if(s===0){const oe=n.getAppendedFrag(0,le.MAIN);oe&&d<oe.end&&(B=!0)}if(!B&&e){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||uu(this.hls.inFlightFragments,d))return 0;let ae=!1,De=e.end;for(;De<d;){const Me=So(De,n);if(Me)De+=Me.duration;else{ae=!0;break}}if(ae)return 0}}const k=Math.max(d+R0,s+D0);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${k}`),this.moved=!0,r.currentTime=k,!(e!=null&&e.gap)){const B=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${k}`),oe={type:de.MEDIA_ERROR,details:$.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:B,reason:B.message,buffer:o.len,bufferInfo:o};e&&("fragment"in e?oe.part=e:oe.frag=e),this.hls.trigger(p.ERROR,oe)}return k}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const o=s+(r+1)*i.nudgeOffset,d=new Error(`Nudging 'currentTime' from ${s} to ${o}`);this.warn(d.message),n.currentTime=o,t.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.BUFFER_NUDGE_ON_STALL,error:d,fatal:!1,buffer:e.len,bufferInfo:e})}else{const o=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(o.message),t.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.BUFFER_STALLED_ERROR,error:o,fatal:!0,buffer:e.len,bufferInfo:e})}}}function uu(a,e){const t=cu(a.main);if(t&&t.start<=e)return t;const n=cu(a.audio);return n&&n.start<=e?n:null}function cu(a){if(!a)return null;switch(a.state){case on.IDLE:case on.STOPPED:case on.ENDED:case on.ERROR:return null}return a.frag}function So(a,e){return e.getAppendedFrag(a,le.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,nt(r?w({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 M0{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(p.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(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this))}_unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(p.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.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&&xa(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 o=0;o<i.length;o++){const d=i[o].type;if(d===Fi.emsg&&!n||!r)continue;const c=ka(i[o].data),m=i[o].pts;let g=m+i[o].duration;g>wo&&(g=wo),g-m<=0&&(g=m+P0);for(let k=0;k<c.length;k++){const B=c[k];if(!ro(B)){this.updateId3CueEnds(m,d);const oe=ul(s,m,g,B,d);oe&&this.id3Track.addCue(oe)}}}}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:o,enableID3MetadataCues:d}}=s;if(i&&(o||d)){let c;r==="audio"?c=m=>m.type===Fi.audioId3&&d:r==="video"?c=m=>m.type===Fi.emsg&&o:c=m=>m.type===Fi.audioId3&&d||m.type===Fi.emsg&&o,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 o=ll();if(n&&r&&!s){const{fragmentStart:oe,fragmentEnd:ae}=e;let De=this.assetCue;De?(De.startTime=oe,De.endTime=ae):o&&(De=this.assetCue=ul(o,oe,ae,{assetPlayerId:this.hls.config.assetPlayerId},"hlsjs.interstitial.asset"),De&&(De.id=n,this.id3Track||(this.id3Track=this.createTrack(this.media)),this.id3Track.addCue(De),De.addEventListener("enter",this.onEventCueEnter)))}if(!e.hasProgramDateTime)return;const{id3Track:d}=this,{dateRanges:c}=e,m=Object.keys(c);let g=this.dateRangeCuesAppended;if(d&&t){var T;if((T=d.cues)!=null&&T.length){const oe=Object.keys(g).filter(ae=>!m.includes(ae));for(let ae=oe.length;ae--;){var k;const De=oe[ae],Me=(k=g[De])==null?void 0:k.cues;delete g[De],Me&&Object.keys(Me).forEach(ze=>{const dt=Me[ze];if(dt){dt.removeEventListener("enter",this.onEventCueEnter);try{d.removeCue(dt)}catch(Tt){}}})}}else g=this.dateRangeCuesAppended={}}const B=e.fragments[e.fragments.length-1];if(!(m.length===0||!y(B==null?void 0:B.programDateTime))){this.id3Track||(this.id3Track=this.createTrack(this.media));for(let oe=0;oe<m.length;oe++){const ae=m[oe],De=c[ae],Me=De.startTime,ze=g[ae],dt=(ze==null?void 0:ze.cues)||{};let Tt=(ze==null?void 0:ze.durationKnown)||!1,Yt=wo;const{duration:At,endDate:Kt}=De;if(Kt&&At!==null)Yt=Me+At,Tt=!0;else if(De.endOnNext&&!Tt){const Lt=m.reduce((hn,Wn)=>{if(Wn!==De.id){const rr=c[Wn];if(rr.class===De.class&&rr.startDate>De.startDate&&(!hn||De.startDate<hn.startDate))return rr}return hn},null);Lt&&(Yt=Lt.startTime,Tt=!0)}const Ht=Object.keys(De.attr);for(let Lt=0;Lt<Ht.length;Lt++){const hn=Ht[Lt];if(!vi(hn))continue;const Wn=dt[hn];if(Wn)Tt&&!(ze!=null&&ze.durationKnown)?Wn.endTime=Yt:Math.abs(Wn.startTime-Me)>.01&&(Wn.startTime=Me,Wn.endTime=Yt);else if(o){let rr=De.attr[hn];wi(hn)&&(rr=K(rr));const ir=ul(o,Me,Yt,{key:hn,data:rr},Fi.dateRange);ir&&(ir.id=ae,this.id3Track.addCue(ir),dt[hn]=ir,s&&(hn==="X-ASSET-LIST"||hn==="X-ASSET-URL")&&ir.addEventListener("enter",this.onEventCueEnter))}}g[ae]={cues:dt,dateRange:De,durationKnown:Tt}}}}}class k0{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 o=this.targetLatency;if(o===null)return;const d=r-o,c=Math.min(this.maxLatency,o+n.targetduration);if(d<c&&d>.05&&this.forwardBufferLength>1){const g=Math.min(2,Math.max(1,s)),T=Math.round(2/(1+Math.exp(-.75*d-this.edgeStalled))*20)/20,k=Math.min(g,Math.max(1,T));this.changeMediaPlaybackRate(t,k)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:o}=this.config,d=this.hls.userConfig;let c=o&&n||t;(this._targetLatencyUpdated||d.liveSyncDuration||d.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*r);const m=r;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,m)}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,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),o)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const 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(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(p.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(p.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(p.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(p.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===$.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 B0 extends zo{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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this),e.on(p.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.FRAG_BUFFERED,this.onFragBuffered,this),e.off(p.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 o=!1,d=!1,c=!1;t.levels.forEach(m=>{const g=m.attrs;let{audioCodec:T,videoCodec:k}=m;T&&(m.audioCodec=T=Ee(T,n)||void 0),k&&(k=m.videoCodec=Zn(k));const{width:B,height:oe,unknownCodecs:ae}=m,De=(ae==null?void 0:ae.length)||0;if(o||(o=!!(B&&oe)),d||(d=!!k),c||(c=!!T),De||T&&!this.isAudioSupported(T)||k&&!this.isVideoSupported(k)){this.log(`Some or all CODECS not supported "${g.CODECS}"`);return}const{CODECS:Me,"FRAME-RATE":ze,"HDCP-LEVEL":dt,"PATHWAY-ID":Tt,RESOLUTION:Yt,"VIDEO-RANGE":At}=g,Ht=`${`${Tt||"."}-`}${m.bitrate}-${Yt}-${ze}-${Me}-${At}-${dt}`;if(i[Ht])if(i[Ht].uri!==m.url&&!m.attrs["PATHWAY-ID"]){const Lt=s[Ht]+=1;m.attrs["PATHWAY-ID"]=new Array(Lt+1).join(".");const hn=this.createLevel(m);i[Ht]=hn,r.push(hn)}else i[Ht].addGroupId("audio",g.AUDIO),i[Ht].addGroupId("text",g.SUBTITLES);else{const Lt=this.createLevel(m);i[Ht]=Lt,s[Ht]=1,r.push(Lt)}}),this.filterAndSortMediaOptions(r,t,o,d,c)}createLevel(e){const t=new Rt(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=ln(r,[])}return t}isAudioSupported(e){return Ue(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return Ue(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){var s;let o=[],d=[],c=e;const m=((s=t.stats)==null?void 0:s.parsing)||{};if((n||r)&&i&&(c=c.filter(({videoCodec:Me,videoRange:ze,width:dt,height:Tt})=>(!!Me||!!(dt&&Tt))&&ct(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: ${nt(t.levels.map(Tt=>Tt.attrs.CODECS).filter((Tt,Yt,At)=>At.indexOf(Tt)===Yt))}`,this.warn(ze),Me+=` (${ze})`);const dt=new Error(Me);this.hls.trigger(p.ERROR,{type:de.MEDIA_ERROR,details:$.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:dt,reason:ze})}}),m.end=performance.now();return}t.audioTracks&&(o=t.audioTracks.filter(Me=>!Me.audioCodec||this.isAudioSupported(Me.audioCodec)),du(o)),t.subtitles&&(d=t.subtitles,du(d));const g=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 Ze.indexOf(Me.videoRange)-Ze.indexOf(ze.videoRange);if(Me.videoCodec!==ze.videoCodec){const dt=ne(Me.videoCodec),Tt=ne(ze.videoCodec);if(dt!==Tt)return Tt-dt}if(Me.uri===ze.uri&&Me.codecSet!==ze.codecSet){const dt=we(Me.codecSet),Tt=we(ze.codecSet);if(dt!==Tt)return Tt-dt}return Me.averageBitrate!==ze.averageBitrate?Me.averageBitrate-ze.averageBitrate:0});let T=g[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==g.length)){for(let Me=0;Me<g.length;Me++)if(g[Me].pathwayId===c[0].pathwayId){T=g[Me];break}}this._levels=c;for(let Me=0;Me<c.length;Me++)if(c[Me]===T){var k;this._firstLevel=Me;const ze=T.bitrate,dt=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${ze}`),((k=this.hls.userConfig)==null?void 0:k.abrEwmaDefaultEstimate)===void 0){const Tt=Math.min(ze,this.hls.config.abrEwmaDefaultEstimateMax);Tt>dt&&dt===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=Tt)}break}const B=i&&!r,oe=this.hls.config,ae=!!(oe.audioStreamController&&oe.audioTrackController),De={levels:c,audioTracks:o,subtitleTracks:d,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:ae&&!B&&o.some(Me=>!!Me.url)};m.end=performance.now(),this.hls.trigger(p.MANIFEST_PARSED,De)}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 m=new Error("invalid level idx"),g=e<0;if(this.hls.trigger(p.ERROR,{type:de.OTHER_ERROR,details:$.LEVEL_SWITCH_ERROR,level:e,fatal:g,error:m,reason:m.message}),g)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],o=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===o)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${o?" with Pathway "+o:""} from level ${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(p.LEVEL_SWITCHING,d);const c=s.details;if(!c||c.live){const m=this.switchParams(s.uri,r==null?void 0:r.details,c);this.loadPlaylist(m)}}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===ge.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===le.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 o;this.warn(`Invalid level index ${r}`),(o=t.deliveryDirectives)!=null&&o.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,o=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:""}${o&&s.live?" age "+o.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(p.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(o=>o.level=-1)),!1));ki(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(p.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(p.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(!Te())return!1;const e=hu();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function F0(){if(!fu())return!1;const a=Te();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(q(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(q(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 z0 extends ea{constructor(e,t,n){super(e,t,n,"stream-controller",le.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||!y(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,le.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(p.MANIFEST_PARSED,this.onManifestParsed,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.LEVEL_LOADED,this.onLevelLoaded,this),e.on(p.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(p.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(p.BUFFER_CREATED,this.onBufferCreated,this),e.on(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(p.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(p.MANIFEST_PARSED,this.onManifestParsed,this),e.off(p.LEVEL_LOADED,this.onLevelLoaded,this),e.off(p.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(p.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(p.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(p.BUFFER_CREATED,this.onBufferCreated,this),e.off(p.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(p.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(p.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=on.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=on.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case on.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=on.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=on.IDLE;break}break}case on.FRAG_LOADING_WAITING_RETRY:this.checkRetryDate();break}this.state===on.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],o=this.getMainFwdBufferInfo();if(o===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(o,d)){const oe={};this.altAudio===2&&(oe.type="video"),this.hls.trigger(p.BUFFER_EOS,oe),this.state=on.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===on.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=on.WAITING_LEVEL,this.startFragRequested=!1;return}const m=o.len,g=this.getMaxBufferLength(s.maxBitrate);if(m>=g)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const T=this.backtrackFragment?this.backtrackFragment.start:o.end;let k=this.getNextFragment(T,c);if(this.couldBacktrack&&!this.fragPrevious&&k&&Ve(k)&&this.fragmentTracker.getState(k)!==un.OK){var B;const ae=((B=this.backtrackFragment)!=null?B:k).sn-c.startSN,De=c.fragments[ae-1];De&&k.cc===De.cc&&(k=De,this.fragmentTracker.removeFragment(De))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(k&&this.isLoopLoading(k,T)){if(!k.gap){const ae=this.audioOnly&&!this.altAudio?Z.AUDIO:Z.VIDEO,De=(ae===Z.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;De&&this.afterBufferFlushed(De,ae,le.MAIN)}k=this.getNextFragmentLoopLoading(k,c,o,le.MAIN,g)}k&&(k.initSegment&&!k.initSegment.data&&!this.bitrateTest&&(k=k.initSegment),this.loadFragment(k,s,T))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===un.NOT_LOADED||r===un.PARTIAL?Ve(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,le.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 o=this.getMainFwdBufferInfo();if(!o||o.len<i.targetduration*2)return}if(!t.paused&&e){const o=this.hls.nextLoadLevel,d=e[o],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 o=this.followingBufferedFrag(s);if(o){this.abortCurrentFrag();const d=o.maxStartPTS?o.maxStartPTS:o.start,c=o.duration,m=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(m,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 on.KEY_LOADING:case on.FRAG_LOADING:case on.FRAG_LOADING_WAITING_RETRY:case on.PARSING:case on.PARSED:this.state=on.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;Bi(n,"playing",this.onMediaPlaying),Bi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(zi(n,"playing",this.onMediaPlaying),zi(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(p.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!==on.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=on.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,o=t.details,d=o.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${d}`);const c=t.levelInfo,m=this.fragCurrent;m&&(this.state===on.FRAG_LOADING||this.state===on.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let g=0;if(o.live||(n=c.details)!=null&&n.live){var T;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;g=this.alignPlaylists(o,c.details,(T=this.levelLastLoaded)==null?void 0:T.details)}if(c.details=o,this.levelLastLoaded=c,i||this.setStartPosition(o,g),this.hls.trigger(p.LEVEL_UPDATED,{details:o,level:s}),this.state===on.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=on.IDLE}i&&o.live&&this.synchronizeToLiveEdge(o),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,o=e.edge,d=i>=s-t.maxFragLookUpTolerance&&i<=o;if(r!==null&&n.duration>r&&(i<r||!d)){const m=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;if((!d&&n.readyState<4||i<o-m)&&(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: ${o}, reset currentTime to : ${r.toFixed(3)}`),this.config.liveSyncMode==="buffered"){var c;const g=xn.bufferInfo(n,r,0);if(!((c=g.buffered)!=null&&c.length)){n.currentTime=r;return}if(g.start<=i){n.currentTime=r;return}const{nextStart:k}=xn.bufferedInfo(g.buffered,i,0);k&&(n.currentTime=k)}else n.currentTime=r}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const o=s[n.level];if(!o){this.warn(`Level ${n.level} not found on progress`);return}const d=o.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=o.videoCodec,m=d.PTSKnown||!d.live,g=(t=n.initSegment)==null?void 0:t.data,T=this._getAudioCodec(o),k=this.transmuxer=this.transmuxer||new vl(this.hls,le.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),B=r?r.index:-1,oe=B!==-1,ae=new Xr(n.level,n.sn,n.stats.chunkCount,i.byteLength,B,oe),De=this.initPTS[n.cc];k.push(i,g,T,c,n,r,d.totalduration,m,ae,De)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio!==0;if(En(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(p.BUFFER_FLUSHED,()=>{this.hls&&this.hls.trigger(p.AUDIO_TRACK_SWITCHED,t)}),n.trigger(p.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(p.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=En(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 o in n){const d=n[o];if(d.id==="main"){if(i=o,r=d,o==="video"){const c=n[o];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===le.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===on.PARSED&&(this.state=on.IDLE);return}const o=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),Ve(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&xn.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=on.ERROR;return}switch(t.details){case $.FRAG_GAP:case $.FRAG_PARSING_ERROR:case $.FRAG_DECRYPT_ERROR:case $.FRAG_LOAD_ERROR:case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_ERROR:case $.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.MAIN,t);break;case $.LEVEL_LOAD_ERROR:case $.LEVEL_LOAD_TIMEOUT:case $.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===on.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===ge.LEVEL&&(this.state=on.IDLE);break;case $.BUFFER_ADD_CODEC_ERROR:case $.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.resetLoadingState();break;case $.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 $.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=on.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Z.AUDIO||!this.altAudio){const n=(t===Z.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,le.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=xn.getBuffered(e),o=s.length?s.start(0):0,d=o-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 ${o}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=on.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(p.FRAG_LOADED,n),i.bitrateTest=!1}).catch(n=>{this.state===on.STOPPED||this.state===on.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:o,part:d,level:c}=s,{video:m,text:g,id3:T,initSegment:k}=r,{details:B}=c,oe=this.altAudio?void 0:r.audio;if(this.fragContextChanged(o)){this.fragmentTracker.removeFragment(o);return}if(this.state=on.PARSING,k){const ae=k.tracks;if(ae){const dt=o.initSegment||o;if(this.unhandledEncryptionError(k,o))return;this._bufferInitSegment(c,ae,dt,i),n.trigger(p.FRAG_PARSING_INIT_SEGMENT,{frag:dt,id:t,tracks:ae})}const De=k.initPTS,Me=k.timescale,ze=this.initPTS[o.cc];if(y(De)&&(!ze||ze.baseTime!==De||ze.timescale!==Me)){const dt=k.trackId;this.initPTS[o.cc]={baseTime:De,timescale:Me,trackId:dt},n.trigger(p.INIT_PTS_FOUND,{frag:o,id:t,initPTS:De,timescale:Me,trackId:dt})}}if(m&&B){oe&&m.type==="audiovideo"&&this.logMuxedErr(o);const ae=B.fragments[o.sn-1-B.startSN],De=o.sn===B.startSN,Me=!ae||o.cc>ae.cc;if(r.independent!==!1){const{startPTS:ze,endPTS:dt,startDTS:Tt,endDTS:Yt}=m;if(d)d.elementaryStreams[m.type]={startPTS:ze,endPTS:dt,startDTS:Tt,endDTS:Yt};else if(m.firstKeyFrame&&m.independent&&i.id===1&&!Me&&(this.couldBacktrack=!0),m.dropped&&m.independent){const At=this.getMainFwdBufferInfo(),Kt=(At?At.end:this.getLoadPosition())+this.config.maxBufferHole,Ht=m.firstKeyFramePTS?m.firstKeyFramePTS:ze;if(!De&&Kt<Ht-this.config.maxBufferHole&&!Me){this.backtrack(o);return}else Me&&(o.gap=!0);o.setElementaryStreamInfo(m.type,o.start,dt,o.start,Yt,!0)}else De&&ze-(B.appliedTimelineOffset||0)>Eo&&(o.gap=!0);o.setElementaryStreamInfo(m.type,ze,dt,Tt,Yt),this.backtrackFragment&&(this.backtrackFragment=o),this.bufferFragmentData(m,o,d,i,De||Me)}else if(De||Me)o.gap=!0;else{this.backtrack(o);return}}if(oe){const{startPTS:ae,endPTS:De,startDTS:Me,endDTS:ze}=oe;d&&(d.elementaryStreams[Z.AUDIO]={startPTS:ae,endPTS:De,startDTS:Me,endDTS:ze}),o.setElementaryStreamInfo(Z.AUDIO,ae,De,Me,ze),this.bufferFragmentData(oe,o,d,i)}if(B&&T!=null&&T.samples.length){const ae={id:t,frag:o,details:B,samples:T.samples};n.trigger(p.FRAG_PARSING_METADATA,ae)}if(B&&g){const ae={id:t,frag:o,details:B,samples:g.samples};n.trigger(p.FRAG_PARSING_USERDATA,ae)}}logMuxedErr(e){this.warn(`${Ve(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==on.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:o}=t;if(i){const c=e.audioCodec;let m=en(i.codec,c);m==="mp4a"&&(m="mp4a.40.5");const g=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){m&&(m.indexOf("mp4a.40.5")!==-1?m="mp4a.40.2":m="mp4a.40.5");const T=i.metadata;T&&"channelCount"in T&&(T.channelCount||1)!==1&&g.indexOf("firefox")===-1&&(m="mp4a.40.5")}m&&m.indexOf("mp4a.40.5")!==-1&&g.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(m="mp4a.40.2",this.log(`Android: force audio codec to ${m}`)),c&&c!==m&&this.log(`Swapping manifest audio codec "${c}" for "${m}"`),i.levelCodec=m,i.id=le.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${m||""}/${c||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=le.MAIN;const c=s.codec;if((c==null?void 0:c.length)===4)switch(c){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${c}]${s.codec!==c?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}o&&(this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),delete t.video,delete t.audio);const d=Object.keys(t);if(d.length){if(this.hls.trigger(p.BUFFER_CODECS,t),!this.hls)return;d.forEach(c=>{const g=t[c].initSegment;g!=null&&g.byteLength&&this.hls.trigger(p.BUFFER_APPENDING,{type:c,data:g,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,le.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=on.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(xn.isBuffered(e,n)?t=this.getAppendedFrag(n):xn.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(p.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(p.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return y(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(y(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?kn(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 U0 extends J{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=$.KEY_LOAD_ERROR,n,r,i){return new ur({type:de.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&&(!Ve(e)||!Ve(s)||e.sn<s.sn)||!n&&r==i-1)return this.emeController.selectKeySystemFormat(s).then(o=>{if(!this.emeController)return;s.setKeyFormat(o);const d=Di(o);if(d)return this.emeController.getKeySystemAccess([d])})}if(this.config.requireKeySystemAccessOnStart){const r=Ti(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,$.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,$.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));const o=cl(i);let d=this.keyIdToKeyInfo[o];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(m=>{const{keyInfo:g}=m;return i.key=g.decryptdata.key,{frag:e,keyInfo:g}})}switch(this.log(`${this.keyIdToKeyInfo[o]?"Rel":"L"}oading${i.keyId?" keyId: "+ie(i.keyId):""} URI: ${i.uri} from ${e.type} ${e.level}`),d=this.keyIdToKeyInfo[o]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(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,$.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=it(t.initSegment.data);if(s.length){let o=s[0];o.some(d=>d!==0)?(this.log(`Using keyId found in init segment ${ie(o)}`),Pi.setKeyIdForUri(e.decryptdata.uri,o)):(o=Pi.addKeyIdForUri(e.decryptdata.uri),this.log(`Generating keyId to patch media ${ie(o)}`)),e.decryptdata.keyId=o}}if(!e.decryptdata.keyId&&!Ve(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,o)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,m={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},g={onSuccess:(T,k,B,oe)=>{const{frag:ae,keyInfo:De}=B,Me=cl(De.decryptdata);if(!ae.decryptdata||De!==this.keyIdToKeyInfo[Me])return o(this.createKeyLoadError(ae,$.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),oe));De.decryptdata.key=ae.decryptdata.key=new Uint8Array(T.data),ae.keyLoader=null,De.loader=null,s({frag:ae,keyInfo:De})},onError:(T,k,B,oe)=>{this.resetLoader(k),o(this.createKeyLoadError(t,$.KEY_LOAD_ERROR,new Error(`HTTP Error ${T.code} loading key ${T.text}`),B,w({url:d.url,data:void 0},T)))},onTimeout:(T,k,B)=>{this.resetLoader(k),o(this.createKeyLoadError(t,$.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),B))},onAbort:(T,k,B)=>{this.resetLoader(k),o(this.createKeyLoadError(t,$.INTERNAL_ABORTED,new Error("key loading aborted"),B))}};i.load(d,m,g)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null);const s=cl(n.decryptdata)||r;delete this.keyIdToKeyInfo[s],i&&i.destroy()}}function cl(a){if(a.keyFormat!==wr.FAIRPLAY){const e=a.keyId;if(e)return ie(e)}return a.uri}function mu(a){const{type:e}=a;switch(e){case ge.AUDIO_TRACK:return le.AUDIO;case ge.SUBTITLE_TRACK:return le.SUBTITLE;default:return le.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(p.MANIFEST_LOADING,this.onManifestLoading,this),e.on(p.LEVEL_LOADING,this.onLevelLoading,this),e.on(p.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(p.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(p.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(p.MANIFEST_LOADING,this.onManifestLoading,this),e.off(p.LEVEL_LOADING,this.onLevelLoading,this),e.off(p.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(p.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(p.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:ge.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:o,levelInfo:d}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:ge.LEVEL,url:s,deliveryDirectives:o,levelOrTrack:d})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:o}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ge.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:o})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:o}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ge.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:o})}onLevelsUpdated(e,t){const n=this.loaders[ge.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[ge.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const c=this.hls.logger,m=r.context;if(m&&m.levelOrTrack===e.levelOrTrack&&(m.url===e.url||m.deliveryDirectives&&!e.deliveryDirectives)){m.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${m.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===ge.MANIFEST?i=n.manifestLoadPolicy.default:i=_({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),y((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===ge.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===ge.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===ge.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const m=c.partTarget,g=c.targetduration;if(m&&g){const T=Math.max(m*3,g*.8)*1e3;i=_({},i,{maxTimeToFirstByteMs:Math.min(T,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(T,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},o={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},d={onSuccess:(c,m,g,T)=>{const k=this.getInternalLoader(g);this.resetInternalLoader(g.type);const B=c.data;m.parsing.start=performance.now(),Mi.isMediaPlaylist(B)||g.type!==ge.MANIFEST?this.handleTrackOrLevelPlaylist(c,m,g,T||null,k):this.handleMasterPlaylist(c,m,g,T)},onError:(c,m,g,T)=>{this.handleNetworkError(m,g,!1,c,T)},onTimeout:(c,m,g)=>{this.handleNetworkError(m,g,!0,void 0,c)}};r.load(e,o,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,o=dl(e,n),d=Mi.parseMasterPlaylist(s,o);if(d.playlistParsingError){t.parsing.end=performance.now(),this.handleManifestParsingError(e,n,d.playlistParsingError,r,t);return}const{contentSteering:c,levels:m,sessionData:g,sessionKeys:T,startTimeOffset:k,variableList:B}=d;this.variableList=B,m.forEach(Me=>{const{unknownCodecs:ze}=Me;if(ze){const{preferManagedMediaSource:dt}=this.hls.config;let{audioCodec:Tt,videoCodec:Yt}=Me;for(let At=ze.length;At--;){const Kt=ze[At];Ue(Kt,"audio",dt)?(Me.audioCodec=Tt=Tt?`${Tt},${Kt}`:Kt,Bt.audio[Tt.substring(0,4)]=2,ze.splice(At,1)):Ue(Kt,"video",dt)&&(Me.videoCodec=Yt=Yt?`${Yt},${Kt}`:Kt,Bt.video[Yt.substring(0,4)]=2,ze.splice(At,1))}}});const{AUDIO:oe=[],SUBTITLES:ae,"CLOSED-CAPTIONS":De}=Mi.parseMasterPlaylistMedia(s,o,d);oe.length&&!oe.some(ze=>!ze.url)&&m[0].audioCodec&&!m[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),oe.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new or({}),bitrate:0,url:""})),i.trigger(p.MANIFEST_LOADED,{levels:m,audioTracks:oe,subtitles:ae,captions:De,contentSteering:c,url:o,stats:t,networkDetails:r,sessionData:g,sessionKeys:T,startTimeOffset:k,variableList:B})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:o,level:d,type:c}=n,m=dl(e,n),g=y(d)?d:y(o)?o:0,T=mu(n),k=Mi.parseLevelPlaylist(e.data,m,g,T,0,this.variableList);if(c===ge.MANIFEST){const B={attrs:new or({}),bitrate:0,details:k,name:"",url:m};k.requestScheduled=t.loading.start+Vr(k,0),s.trigger(p.MANIFEST_LOADED,{levels:[B],audioTracks:[],url:m,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=k,this.handlePlaylistLoaded(k,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(p.ERROR,{type:de.NETWORK_ERROR,details:$.MANIFEST_PARSING_ERROR,fatal:t.type===ge.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===ge.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===ge.AUDIO_TRACK||e.type===ge.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let d=$.UNKNOWN,c=!1;const m=this.getInternalLoader(e);switch(e.type){case ge.MANIFEST:d=n?$.MANIFEST_LOAD_TIMEOUT:$.MANIFEST_LOAD_ERROR,c=!0;break;case ge.LEVEL:d=n?$.LEVEL_LOAD_TIMEOUT:$.LEVEL_LOAD_ERROR,c=!1;break;case ge.AUDIO_TRACK:d=n?$.AUDIO_TRACK_LOAD_TIMEOUT:$.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case ge.SUBTITLE_TRACK:d=n?$.SUBTITLE_TRACK_LOAD_TIMEOUT:$.SUBTITLE_LOAD_ERROR,c=!1;break}m&&this.resetInternalLoader(e.type);const g={type:de.NETWORK_ERROR,details:d,fatal:c,url:e.url,loader:m,context:e,error:o,networkDetails:t,stats:i};if(r){const T=(t==null?void 0:t.url)||e.url;g.response=w({url:T,data:void 0},r)}this.hls.trigger(p.ERROR,g)}handlePlaylistLoaded(e,t,n,r,i,s){const o=this.hls,{type:d,level:c,levelOrTrack:m,id:g,groupId:T,deliveryDirectives:k}=r,B=dl(t,r),oe=mu(r);let ae=typeof r.level=="number"&&oe===le.MAIN?c:void 0;const De=e.playlistParsingError;if(De){if(this.hls.logger.warn(`${De} ${e.url}`),!o.config.ignorePlaylistParsingErrors){o.trigger(p.ERROR,{type:de.NETWORK_ERROR,details:$.LEVEL_PARSING_ERROR,fatal:!1,url:B,error:De,reason:De.message,response:t,context:r,level:ae,parent:oe,networkDetails:i,stats:n});return}e.playlistParsingError=null}if(!e.fragments.length){const Me=e.playlistParsingError=new Error("No Segments found in Playlist");o.trigger(p.ERROR,{type:de.NETWORK_ERROR,details:$.LEVEL_EMPTY_ERROR,fatal:!1,url:B,error:Me,reason:Me.message,response:t,context:r,level:ae,parent:oe,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 ge.MANIFEST:case ge.LEVEL:if(ae){if(!m)ae=0;else if(m!==o.levels[ae]){const Me=o.levels.indexOf(m);Me>-1&&(ae=Me)}}o.trigger(p.LEVEL_LOADED,{details:e,levelInfo:m||o.levels[0],level:ae||0,id:g||0,stats:n,networkDetails:i,deliveryDirectives:k,withoutMultiVariant:d===ge.MANIFEST});break;case ge.AUDIO_TRACK:o.trigger(p.AUDIO_TRACK_LOADED,{details:e,track:m,id:g||0,groupId:T||"",stats:n,networkDetails:i,deliveryDirectives:k});break;case ge.SUBTITLE_TRACK:o.trigger(p.SUBTITLE_TRACK_LOADED,{details:e,track:m,id:g||0,groupId:T||"",stats:n,networkDetails:i,deliveryDirectives:k});break}}}class Ys{static get version(){return ta}static isMSESupported(){return fu()}static isSupported(){return F0()}static getMediaSource(){return Te()}static get Events(){return p}static get MetadataSchema(){return Fi}static get ErrorTypes(){return de}static get ErrorDetails(){return $}static get DefaultConfig(){return Ys.defaultConfig?Ys.defaultConfig:T0}static set DefaultConfig(e){Ys.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 ha,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=ue(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=A0(Ys.DefaultConfig,e,t);this.userConfig=e,n.progressive&&I0(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:o,fpsController:d}=n,c=new o(this),m=this.abrController=new r(this),g=new bn(this),T=n.interstitialsController,k=T?this.interstitialsController=new T(this,Ys):null,B=this.bufferController=new i(this,g),oe=this.capLevelController=new s(this),ae=new d(this),De=new j0(this),Me=n.contentSteeringController,ze=Me?new Me(this):null,dt=this.levelController=new B0(this,ze),Tt=new M0(this),Yt=new U0(this.config,this.logger),At=this.streamController=new z0(this,g,Yt),Kt=this.gapController=new O0(this,g);oe.setStreamController(At),ae.setStreamController(At);const Ht=[De,dt,At];k&&Ht.splice(1,0,k),ze&&Ht.splice(1,0,ze),this.networkControllers=Ht;const Lt=[m,B,Kt,oe,ae,Tt,g];this.audioTrackController=this.createController(n.audioTrackController,Ht);const hn=n.audioStreamController;hn&&Ht.push(this.audioStreamController=new hn(this,g,Yt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Ht);const Wn=n.subtitleStreamController;Wn&&Ht.push(this.subtititleStreamController=new Wn(this,g,Yt)),this.createController(n.timelineController,Lt),Yt.emeController=this.emeController=this.createController(n.emeController,Lt),this.cmcdController=this.createController(n.cmcdController,Lt),this.latencyController=this.createController(k0,Lt),this.coreComponents=Lt,Ht.push(c);const rr=c.onErrorOut;typeof rr=="function"&&this.on(p.ERROR,rr,c),this.on(p.MANIFEST_LOADED,De.onManifestLoaded,De)}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===p.ERROR;this.trigger(p.ERROR,{type:de.OTHER_ERROR,details:$.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(p.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(p.ERROR,{type:de.OTHER_ERROR,details:$.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(p.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(p.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(p.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=S.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(p.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={[le.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[le.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[le.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){Ge(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=xt(t);return Vt(e,n,navigator.mediaCapabilities)}}Ys.defaultConfig=void 0},16722:function(fn,ut,b){"use strict";b.d(ut,{Z:function(){return le}});const y=l=>typeof l=="object"&&l!=null&&l.nodeType===1,ce=(l,A)=>(!A||l!=="hidden")&&l!=="visible"&&l!=="clip",Y=(l,A)=>{if(l.clientHeight<l.scrollHeight||l.clientWidth<l.scrollWidth){const F=getComputedStyle(l,null);return ce(F.overflowY,A)||ce(F.overflowX,A)||(_=>{const E=(w=>{if(!w.ownerDocument||!w.ownerDocument.defaultView)return null;try{return w.ownerDocument.defaultView.frameElement}catch(O){return null}})(_);return!!E&&(E.clientHeight<_.scrollHeight||E.clientWidth<_.scrollWidth)})(l)}return!1},de=(l,A,F,_,E,w,O,X)=>w<l&&O>A||w>l&&O<A?0:w<=l&&X<=F||O>=A&&X>=F?w-l-_:O>A&&X<F||w<l&&X>F?O-A+E:0,$=l=>{const A=l.parentElement;return A==null?l.getRootNode().host||null:A},p=(l,A)=>{var F,_,E,w;if(typeof document=="undefined")return[];const{scrollMode:O,block:X,inline:J,boundary:U,skipOverflowHiddenElements:R}=A,z=typeof U=="function"?U:qe=>qe!==U;if(!y(l))throw new TypeError("Invalid target");const P=document.scrollingElement||document.documentElement,N=[];let re=l;for(;y(re)&&z(re);){if(re=$(re),re===P){N.push(re);break}re!=null&&re===document.body&&Y(re)&&!Y(document.documentElement)||re!=null&&Y(re,R)&&N.push(re)}const ue=(_=(F=window.visualViewport)==null?void 0:F.width)!=null?_:innerWidth,me=(w=(E=window.visualViewport)==null?void 0:E.height)!=null?w:innerHeight,{scrollX:Te,scrollY:Be}=window,{height:Le,width:at,top:ie,right:K,bottom:I,left:ee}=l.getBoundingClientRect(),{top:V,right:he,bottom:S,left:C}=(qe=>{const gt=window.getComputedStyle(qe);return{top:parseFloat(gt.scrollMarginTop)||0,right:parseFloat(gt.scrollMarginRight)||0,bottom:parseFloat(gt.scrollMarginBottom)||0,left:parseFloat(gt.scrollMarginLeft)||0}})(l);let Z=X==="start"||X==="nearest"?ie-V:X==="end"?I+S:ie+Le/2-V+S,ye=J==="center"?ee+at/2-C+he:J==="end"?K+he:ee-C;const Ve=[];for(let qe=0;qe<N.length;qe++){const gt=N[qe],{height:yt,width:Dt,top:Ut,right:ot,bottom:kt,left:tt}=gt.getBoundingClientRect();if(O==="if-needed"&&ie>=0&&ee>=0&&I<=me&&K<=ue&&(gt===P&&!Y(gt)||ie>=Ut&&I<=kt&&ee>=tt&&K<=ot))return Ve;const Gt=getComputedStyle(gt),Xe=parseInt(Gt.borderLeftWidth,10),Ke=parseInt(Gt.borderTopWidth,10),Ae=parseInt(Gt.borderRightWidth,10),xe=parseInt(Gt.borderBottomWidth,10);let se=0,Ne=0;const Ce="offsetWidth"in gt?gt.offsetWidth-gt.clientWidth-Xe-Ae:0,Se="offsetHeight"in gt?gt.offsetHeight-gt.clientHeight-Ke-xe:0,M="offsetWidth"in gt?gt.offsetWidth===0?0:Dt/gt.offsetWidth:0,fe="offsetHeight"in gt?gt.offsetHeight===0?0:yt/gt.offsetHeight:0;if(P===gt)se=X==="start"?Z:X==="end"?Z-me:X==="nearest"?de(Be,Be+me,me,Ke,xe,Be+Z,Be+Z+Le,Le):Z-me/2,Ne=J==="start"?ye:J==="center"?ye-ue/2:J==="end"?ye-ue:de(Te,Te+ue,ue,Xe,Ae,Te+ye,Te+ye+at,at),se=Math.max(0,se+Be),Ne=Math.max(0,Ne+Te);else{se=X==="start"?Z-Ut-Ke:X==="end"?Z-kt+xe+Se:X==="nearest"?de(Ut,kt,yt,Ke,xe+Se,Z,Z+Le,Le):Z-(Ut+yt/2)+Se/2,Ne=J==="start"?ye-tt-Xe:J==="center"?ye-(tt+Dt/2)+Ce/2:J==="end"?ye-ot+Ae+Ce:de(tt,ot,Dt,Xe,Ae+Ce,ye,ye+at,at);const{scrollLeft:_e,scrollTop:Re}=gt;se=fe===0?0:Math.max(0,Math.min(Re+se/fe,gt.scrollHeight-yt/fe+Se)),Ne=M===0?0:Math.max(0,Math.min(_e+Ne/M,gt.scrollWidth-Dt/M+Ce)),Z+=Re-se,ye+=_e-Ne}Ve.push({el:gt,top:se,left:Ne})}return Ve},ge=l=>l===!1?{block:"end",inline:"nearest"}:(A=>A===Object(A)&&Object.keys(A).length!==0)(l)?l:{block:"start",inline:"nearest"};function le(l,A){if(!l.isConnected||!(E=>{let w=E;for(;w&&w.parentNode;){if(w.parentNode===document)return!0;w=w.parentNode instanceof ShadowRoot?w.parentNode.host:w.parentNode}return!1})(l))return;const F=(E=>{const w=window.getComputedStyle(E);return{top:parseFloat(w.scrollMarginTop)||0,right:parseFloat(w.scrollMarginRight)||0,bottom:parseFloat(w.scrollMarginBottom)||0,left:parseFloat(w.scrollMarginLeft)||0}})(l);if((E=>typeof E=="object"&&typeof E.behavior=="function")(A))return A.behavior(p(l,A));const _=typeof A=="boolean"||A==null?void 0:A.behavior;for(const{el:E,top:w,left:O}of p(l,ge(A))){const X=w-F.top+F.bottom,J=O-F.left+F.right;E.scroll({top:X,left:J,behavior:_})}}}}]);
|
|
|
}()); |