(window.webpackJsonp=window.webpackJsonp||[]).push([[187,3,5,7,8,20],{"++UQ":function($e,We,z){},"+NIl":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.defineMode("stex",function(Z,U){"use strict";function w(u,s){u.cmdState.push(s)}function P(u){return u.cmdState.length>0?u.cmdState[u.cmdState.length-1]:null}function S(u){var s=u.cmdState.pop();s&&s.closeBracket()}function O(u){for(var s=u.cmdState,f=s.length-1;f>=0;f--){var i=s[f];if(i.name=="DEFAULT")continue;return i}return{styleIdentifier:function(){return null}}}function T(u,s,f){return function(){this.name=u,this.bracketNo=0,this.style=s,this.styles=f,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};l.importmodule=T("importmodule","tag",["string","builtin"]),l.documentclass=T("documentclass","tag",["","atom"]),l.usepackage=T("usepackage","tag",["atom"]),l.begin=T("begin","tag",["atom"]),l.end=T("end","tag",["atom"]),l.label=T("label","tag",["atom"]),l.ref=T("ref","tag",["atom"]),l.eqref=T("eqref","tag",["atom"]),l.cite=T("cite","tag",["atom"]),l.bibitem=T("bibitem","tag",["atom"]),l.Bibitem=T("Bibitem","tag",["atom"]),l.RBibitem=T("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function p(u,s){u.f=s}function h(u,s){var f;if(u.match(/^\\[a-zA-Z@]+/)){var i=u.current().slice(1);return f=l.hasOwnProperty(i)?l[i]:l.DEFAULT,f=new f,w(s,f),p(s,a),f.style}if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/\\]/))return"tag";if(u.match("\\["))return p(s,function(t,c){return d(t,c,"\\]")}),"keyword";if(u.match("\\("))return p(s,function(t,c){return d(t,c,"\\)")}),"keyword";if(u.match("$$"))return p(s,function(t,c){return d(t,c,"$$")}),"keyword";if(u.match("$"))return p(s,function(t,c){return d(t,c,"$")}),"keyword";var n=u.next();if(n=="%")return u.skipToEnd(),"comment";if(n=="}"||n=="]"){if(f=P(s),f)f.closeBracket(n),p(s,a);else return"error";return"bracket"}else return n=="{"||n=="["?(f=l.DEFAULT,f=new f,w(s,f),"bracket"):/\d/.test(n)?(u.eatWhile(/[\w.%]/),"atom"):(u.eatWhile(/[\w\-_]/),f=O(s),f.name=="begin"&&(f.argument=u.current()),f.styleIdentifier())}function d(u,s,f){if(u.eatSpace())return null;if(f&&u.match(f))return p(s,h),"keyword";if(u.match(/^\\[a-zA-Z@]+/))return"tag";if(u.match(/^[a-zA-Z]+/))return"variable-2";if(u.match(/^\\[$&%#{}_]/))return"tag";if(u.match(/^\\[,;!\/]/))return"tag";if(u.match(/^[\^_&]/))return"tag";if(u.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(u.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=u.next();return i=="{"||i=="}"||i=="["||i=="]"||i=="("||i==")"?"bracket":i=="%"?(u.skipToEnd(),"comment"):"error"}function a(u,s){var f=u.peek(),i;return f=="{"||f=="["?(i=P(s),i.openBracket(f),u.eat(f),p(s,h),"bracket"):/[ \t\r]/.test(f)?(u.eat(f),null):(p(s,h),S(s),h(u,s))}return{startState:function(){var u=U.inMathMode?function(s,f){return d(s,f)}:h;return{cmdState:[],f:u}},copyState:function(u){return{cmdState:u.cmdState.slice(),f:u.f}},token:function(u,s){return s.f(u,s)},blankLine:function(u){u.f=h,u.cmdState.length=0},lineComment:"%"}}),ae.defineMIME("text/x-stex","stex"),ae.defineMIME("text/x-latex","stex")})},"+QRC":function($e,We,z){"use strict";var ae=z("E9nw"),Z={"text/plain":"Text","text/html":"Url",default:"Text"},U="Copy to clipboard: #{key}, Enter";function w(S){var O=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return S.replace(/#{\s*key\s*}/g,O)}function P(S,O){var T,l,p,h,d,a,u=!1;O||(O={}),T=O.debug||!1;try{p=ae(),h=document.createRange(),d=document.getSelection(),a=document.createElement("span"),a.textContent=S,a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(f){if(f.stopPropagation(),O.format)if(f.preventDefault(),typeof f.clipboardData=="undefined"){T&&console.warn("unable to use e.clipboardData"),T&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=Z[O.format]||Z.default;window.clipboardData.setData(i,S)}else f.clipboardData.clearData(),f.clipboardData.setData(O.format,S);O.onCopy&&(f.preventDefault(),O.onCopy(f.clipboardData))}),document.body.appendChild(a),h.selectNodeContents(a),d.addRange(h);var s=document.execCommand("copy");if(!s)throw new Error("copy command was unsuccessful");u=!0}catch(f){T&&console.error("unable to copy using execCommand: ",f),T&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(O.format||"text",S),O.onCopy&&O.onCopy(window.clipboardData),u=!0}catch(i){T&&console.error("unable to copy using clipboardData: ",i),T&&console.error("falling back to prompt"),l=w("message"in O?O.message:U),window.prompt(l,S)}}finally{d&&(typeof d.removeRange=="function"?d.removeRange(h):d.removeAllRanges()),a&&document.body.removeChild(a),p()}return u}$e.exports=P},"07cG":function($e,We,z){$e.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":function($e,We){var z=arguments[3],ae=arguments[4],Z=arguments[5],U=JSON.stringify;$e.exports=function(w,P){for(var S,O=Object.keys(Z),T=0,l=O.length;T")):null:x.match("--")?A(s("comment","-->")):x.match("DOCTYPE",!0,!0)?(x.eatWhile(/[\w\._\-]/),A(f(1))):null:x.eat("?")?(x.eatWhile(/[\w\._\-]/),C.tokenize=s("meta","?>"),"meta"):(p=x.eat("/")?"closeTag":"openTag",C.tokenize=a,"tag bracket");if(D=="&"){var I;return x.eat("#")?x.eat("x")?I=x.eatWhile(/[a-fA-F\d]/)&&x.eat(";"):I=x.eatWhile(/[\d]/)&&x.eat(";"):I=x.eatWhile(/[\w\.\-:]/)&&x.eat(";"),I?"atom":"error"}else return x.eatWhile(/[^&<]/),null}d.isInText=!0;function a(x,C){var A=x.next();if(A==">"||A=="/"&&x.eat(">"))return C.tokenize=d,p=A==">"?"endTag":"selfcloseTag","tag bracket";if(A=="=")return p="equals",null;if(A=="<"){C.tokenize=d,C.state=c,C.tagName=C.tagStart=null;var D=C.tokenize(x,C);return D?D+" tag error":"tag error"}else return/[\'\"]/.test(A)?(C.tokenize=u(A),C.stringStartCol=x.column(),C.tokenize(x,C)):(x.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function u(x){var C=function(A,D){for(;!A.eol();)if(A.next()==x){D.tokenize=a;break}return"string"};return C.isInAttribute=!0,C}function s(x,C){return function(A,D){for(;!A.eol();){if(A.match(C)){D.tokenize=d;break}A.next()}return x}}function f(x){return function(C,A){for(var D;(D=C.next())!=null;){if(D=="<")return A.tokenize=f(x+1),A.tokenize(C,A);if(D==">")if(x==1){A.tokenize=d;break}else return A.tokenize=f(x-1),A.tokenize(C,A)}return"meta"}}function i(x,C,A){this.prev=x.context,this.tagName=C,this.indent=x.indented,this.startOfLine=A,(O.doNotIndent.hasOwnProperty(C)||x.context&&x.context.noIndent)&&(this.noIndent=!0)}function n(x){x.context&&(x.context=x.context.prev)}function t(x,C){for(var A;;){if(!x.context)return;if(A=x.context.tagName,!O.contextGrabbers.hasOwnProperty(A)||!O.contextGrabbers[A].hasOwnProperty(C))return;n(x)}}function c(x,C,A){return x=="openTag"?(A.tagStart=C.column(),y):x=="closeTag"?v:c}function y(x,C,A){return x=="word"?(A.tagName=C.current(),h="tag",m):O.allowMissingTagName&&x=="endTag"?(h="tag bracket",m(x,C,A)):(h="error",y)}function v(x,C,A){if(x=="word"){var D=C.current();return A.context&&A.context.tagName!=D&&O.implicitlyClosed.hasOwnProperty(A.context.tagName)&&n(A),A.context&&A.context.tagName==D||O.matchClosing===!1?(h="tag",_):(h="tag error",b)}else return O.allowMissingTagName&&x=="endTag"?(h="tag bracket",_(x,C,A)):(h="error",b)}function _(x,C,A){return x!="endTag"?(h="error",_):(n(A),c)}function b(x,C,A){return h="error",_(x,C,A)}function m(x,C,A){if(x=="word")return h="attribute",g;if(x=="endTag"||x=="selfcloseTag"){var D=A.tagName,I=A.tagStart;return A.tagName=A.tagStart=null,x=="selfcloseTag"||O.autoSelfClosers.hasOwnProperty(D)?t(A,D):(t(A,D),A.context=new i(A,D,I==A.indented)),c}return h="error",m}function g(x,C,A){return x=="equals"?E:(O.allowMissing||(h="error"),m(x,C,A))}function E(x,C,A){return x=="string"?o:x=="word"&&O.allowUnquoted?(h="string",m):(h="error",m(x,C,A))}function o(x,C,A){return x=="string"?o:m(x,C,A)}return{startState:function(x){var C={tokenize:d,state:c,indented:x||0,tagName:null,tagStart:null,context:null};return x!=null&&(C.baseIndent=x),C},token:function(x,C){if(!C.tagName&&x.sol()&&(C.indented=x.indentation()),x.eatSpace())return null;p=null;var A=C.tokenize(x,C);return(A||p)&&A!="comment"&&(h=null,C.state=C.state(p||A,x,C),h&&(A=h=="error"?A+" error":h)),A},indent:function(x,C,A){var D=x.context;if(x.tokenize.isInAttribute)return x.tagStart==x.indented?x.stringStartCol+1:x.indented+S;if(D&&D.noIndent)return ae.Pass;if(x.tokenize!=a&&x.tokenize!=d)return A?A.match(/^(\s*)/)[0].length:0;if(x.tagName)return O.multilineTagIndentPastTag!==!1?x.tagStart+x.tagName.length+2:x.tagStart+S*(O.multilineTagIndentFactor||1);if(O.alignCDATA&&/$/,blockCommentStart:"",configuration:O.htmlMode?"html":"xml",helperType:O.htmlMode?"html":"xml",skipAttribute:function(x){x.state==E&&(x.state=m)},xmlCurrentTag:function(x){return x.tagName?{name:x.tagName,close:x.type=="closeTag"}:null},xmlCurrentContext:function(x){for(var C=[],A=x.context;A;A=A.prev)A.tagName&&C.push(A.tagName);return C.reverse()}}}),ae.defineMIME("text/xml","xml"),ae.defineMIME("application/xml","xml"),ae.mimeModes.hasOwnProperty("text/html")||ae.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function($e,We,z){"use strict";z.d(We,"d",function(){return $}),z.d(We,"b",function(){return Ge}),z.d(We,"c",function(){return pt}),z.d(We,"a",function(){return jt});var ae=z("VTBJ"),Z=z("1OyB"),U=z("vuIU"),w=z("JX7q"),P=z("Ji7U"),S=z("LK+K"),O=z("q1tI"),T=z("I8Z2"),l=z("BGR+"),p=z("wx14"),h=z("rePB"),d=z("4IlW"),a=z("2GS6"),u=z("Gytx"),s=z.n(u),f=z("TSYQ"),i=z.n(f),n=z("U8pU"),t=z("ODXe"),c=/iPhone/i,y=/iPod/i,v=/iPad/i,_=/\bAndroid(?:.+)Mobile\b/i,b=/Android/i,m=/\bAndroid(?:.+)SD4930UR\b/i,g=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,E=/Windows Phone/i,o=/\bWindows(?:.+)ARM\b/i,x=/BlackBerry/i,C=/BB10/i,A=/Opera Mini/i,D=/\b(CriOS|Chrome)(?:.+)Mobile/i,I=/Mobile(?:.+)Firefox\b/i;function F(Lt,lt){return Lt.test(lt)}function H(Lt){var lt=Lt||(typeof navigator!="undefined"?navigator.userAgent:""),ft=lt.split("[FBAN");if(typeof ft[1]!="undefined"){var Qe=ft,Te=Object(t.a)(Qe,1);lt=Te[0]}if(ft=lt.split("Twitter"),typeof ft[1]!="undefined"){var je=ft,dt=Object(t.a)(je,1);lt=dt[0]}var Ze={apple:{phone:F(c,lt)&&!F(E,lt),ipod:F(y,lt),tablet:!F(c,lt)&&F(v,lt)&&!F(E,lt),device:(F(c,lt)||F(y,lt)||F(v,lt))&&!F(E,lt)},amazon:{phone:F(m,lt),tablet:!F(m,lt)&&F(g,lt),device:F(m,lt)||F(g,lt)},android:{phone:!F(E,lt)&&F(m,lt)||!F(E,lt)&&F(_,lt),tablet:!F(E,lt)&&!F(m,lt)&&!F(_,lt)&&(F(g,lt)||F(b,lt)),device:!F(E,lt)&&(F(m,lt)||F(g,lt)||F(_,lt)||F(b,lt))||F(/\bokhttp\b/i,lt)},windows:{phone:F(E,lt),tablet:F(o,lt),device:F(E,lt)||F(o,lt)},other:{blackberry:F(x,lt),blackberry10:F(C,lt),opera:F(A,lt),firefox:F(I,lt),chrome:F(D,lt),device:F(x,lt)||F(C,lt)||F(A,lt)||F(I,lt)||F(D,lt)},any:null,phone:null,tablet:null};return Ze.any=Ze.apple.device||Ze.android.device||Ze.windows.device||Ze.other.device,Ze.phone=Ze.apple.phone||Ze.android.phone||Ze.windows.phone,Ze.tablet=Ze.apple.tablet||Ze.android.tablet||Ze.windows.tablet,Ze}var te=Object(ae.a)(Object(ae.a)({},H()),{},{isMobile:H}),j=te;function G(){}function X(Lt,lt,ft){var Qe=lt||"";return Lt.key||"".concat(Qe,"item_").concat(ft)}function J(Lt){return"".concat(Lt,"-menu-")}function B(Lt,lt){var ft=-1;O.Children.forEach(Lt,function(Qe){ft+=1,Qe&&Qe.type&&Qe.type.isMenuItemGroup?O.Children.forEach(Qe.props.children,function(Te){ft+=1,lt(Te,ft)}):lt(Qe,ft)})}function Q(Lt,lt,ft){if(!Lt||ft.find)return;O.Children.forEach(Lt,function(Qe){if(Qe){var Te=Qe.type;if(!Te||!(Te.isSubMenu||Te.isMenuItem||Te.isMenuItemGroup))return;lt.indexOf(Qe.key)!==-1?ft.find=!0:Qe.props.children&&Q(Qe.props.children,lt,ft)}})}var ie=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],oe=function(lt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Qe=lt&&typeof lt.getBoundingClientRect=="function"&<.getBoundingClientRect().width;if(Qe){if(ft){var Te=getComputedStyle(lt),je=Te.marginLeft,dt=Te.marginRight;Qe+=+je.replace("px","")+ +dt.replace("px","")}Qe=+Qe.toFixed(6)}return Qe||0},Ee=function(lt,ft,Qe){lt&&Object(n.a)(lt.style)==="object"&&(lt.style[ft]=Qe)},ye=function(){return j.any},Le=z("KQm4"),pe=z("Ff2n"),Ce=z("i8i4"),Be=z("bdgK"),Pe=z("uciX"),ke=z("8XRh"),Ne={adjustX:1,adjustY:1},he={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},ue={topLeft:{points:["bl","tl"],overflow:Ne,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Ne,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Ne,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Ne,offset:[4,0]}},Ie=he,Ue=0,Ye={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ee=function(lt,ft,Qe){var Te=J(ft),je=lt.getState();lt.setState({defaultActiveFirst:Object(ae.a)(Object(ae.a)({},je.defaultActiveFirst),{},Object(h.a)({},Te,Qe))})},M=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onDestroy=function(ot){Te.props.onDestroy(ot)},Te.onKeyDown=function(ot){var gt=ot.keyCode,kt=Te.menuInstance,Kt=Te.props,Gt=Kt.isOpen,Se=Kt.store;if(gt===d.a.ENTER)return Te.onTitleClick(ot),ee(Se,Te.props.eventKey,!0),!0;if(gt===d.a.RIGHT)return Gt?kt.onKeyDown(ot):(Te.triggerOpenChange(!0),ee(Se,Te.props.eventKey,!0)),!0;if(gt===d.a.LEFT){var de;if(Gt)de=kt.onKeyDown(ot);else return;return de||(Te.triggerOpenChange(!1),de=!0),de}return Gt&&(gt===d.a.UP||gt===d.a.DOWN)?kt.onKeyDown(ot):void 0},Te.onOpenChange=function(ot){Te.props.onOpenChange(ot)},Te.onPopupVisibleChange=function(ot){Te.triggerOpenChange(ot,ot?"mouseenter":"mouseleave")},Te.onMouseEnter=function(ot){var gt=Te.props,kt=gt.eventKey,Kt=gt.onMouseEnter,Gt=gt.store;ee(Gt,Te.props.eventKey,!1),Kt({key:kt,domEvent:ot})},Te.onMouseLeave=function(ot){var gt=Te.props,kt=gt.parentMenu,Kt=gt.eventKey,Gt=gt.onMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Gt({key:Kt,domEvent:ot})},Te.onTitleMouseEnter=function(ot){var gt=Te.props,kt=gt.eventKey,Kt=gt.onItemHover,Gt=gt.onTitleMouseEnter;Kt({key:kt,hover:!0}),Gt({key:kt,domEvent:ot})},Te.onTitleMouseLeave=function(ot){var gt=Te.props,kt=gt.parentMenu,Kt=gt.eventKey,Gt=gt.onItemHover,Se=gt.onTitleMouseLeave;kt.subMenuInstance=Object(w.a)(Te),Gt({key:Kt,hover:!1}),Se({key:Kt,domEvent:ot})},Te.onTitleClick=function(ot){var gt=Object(w.a)(Te),kt=gt.props;if(kt.onTitleClick({key:kt.eventKey,domEvent:ot}),kt.triggerSubMenuAction==="hover")return;Te.triggerOpenChange(!kt.isOpen,"click"),ee(kt.store,Te.props.eventKey,!1)},Te.onSubMenuClick=function(ot){typeof Te.props.onClick=="function"&&Te.props.onClick(Te.addKeyPath(ot))},Te.onSelect=function(ot){Te.props.onSelect(ot)},Te.onDeselect=function(ot){Te.props.onDeselect(ot)},Te.getPrefixCls=function(){return"".concat(Te.props.rootPrefixCls,"-submenu")},Te.getActiveClassName=function(){return"".concat(Te.getPrefixCls(),"-active")},Te.getDisabledClassName=function(){return"".concat(Te.getPrefixCls(),"-disabled")},Te.getSelectedClassName=function(){return"".concat(Te.getPrefixCls(),"-selected")},Te.getOpenClassName=function(){return"".concat(Te.props.rootPrefixCls,"-submenu-open")},Te.saveMenuInstance=function(ot){Te.menuInstance=ot},Te.addKeyPath=function(ot){return Object(ae.a)(Object(ae.a)({},ot),{},{keyPath:(ot.keyPath||[]).concat(Te.props.eventKey)})},Te.triggerOpenChange=function(ot,gt){var kt=Te.props.eventKey,Kt=function(){Te.onOpenChange({key:kt,item:Object(w.a)(Te),trigger:gt,open:ot})};gt==="mouseenter"?Te.mouseenterTimeout=setTimeout(function(){Kt()},0):Kt()},Te.isChildrenSelected=function(){var ot={find:!1};return Q(Te.props.children,Te.props.selectedKeys,ot),ot.find},Te.isOpen=function(){return Te.props.openKeys.indexOf(Te.props.eventKey)!==-1},Te.adjustWidth=function(){if(!Te.subMenuTitle||!Te.menuInstance)return;var ot=Ce.findDOMNode(Te.menuInstance);if(ot.offsetWidth>=Te.subMenuTitle.offsetWidth)return;ot.style.minWidth="".concat(Te.subMenuTitle.offsetWidth,"px")},Te.saveSubMenuTitle=function(ot){Te.subMenuTitle=ot},Te.getBaseProps=function(){var ot=Object(w.a)(Te),gt=ot.props;return{mode:gt.mode==="horizontal"?"vertical":gt.mode,visible:Te.props.isOpen,level:gt.level+1,inlineIndent:gt.inlineIndent,focusable:!1,onClick:Te.onSubMenuClick,onSelect:Te.onSelect,onDeselect:Te.onDeselect,onDestroy:Te.onDestroy,selectedKeys:gt.selectedKeys,eventKey:"".concat(gt.eventKey,"-menu-"),openKeys:gt.openKeys,motion:gt.motion,onOpenChange:Te.onOpenChange,subMenuOpenDelay:gt.subMenuOpenDelay,parentMenu:Object(w.a)(Te),subMenuCloseDelay:gt.subMenuCloseDelay,forceSubMenuRender:gt.forceSubMenuRender,triggerSubMenuAction:gt.triggerSubMenuAction,builtinPlacements:gt.builtinPlacements,defaultActiveFirst:gt.store.getState().defaultActiveFirst[J(gt.eventKey)],multiple:gt.multiple,prefixCls:gt.rootPrefixCls,id:Te.internalMenuId,manualRef:Te.saveMenuInstance,itemIcon:gt.itemIcon,expandIcon:gt.expandIcon,direction:gt.direction}},Te.getMotion=function(ot,gt){var kt=Object(w.a)(Te),Kt=kt.haveRendered,Gt=Te.props,Se=Gt.motion,de=Gt.rootPrefixCls,W=Object(ae.a)(Object(ae.a)({},Se),{},{leavedClassName:"".concat(de,"-hidden"),removeOnLeave:!1,motionAppear:Kt||!gt||ot!=="inline"});return W};var je=Qe.store,dt=Qe.eventKey,Ze=je.getState(),Tt=Ze.defaultActiveFirst;Te.isRootMenu=!1;var Ct=!1;return Tt&&(Ct=Tt[dt]),ee(je,dt,Ct),Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Te=this,je=this.props,dt=je.mode,Ze=je.parentMenu,Tt=je.manualRef;if(Tt&&Tt(this),dt!=="horizontal"||!Ze.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Te.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Te=this.props,je=Te.onDestroy,dt=Te.eventKey;je&&je(dt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Te){var je=this,dt=this.getBaseProps(),Ze=this.getMotion(dt.mode,dt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||dt.visible||dt.forceSubMenuRender,!this.haveOpened)return O.createElement("div",null);var Tt=dt.direction;return O.createElement(ke.default,Object.assign({visible:dt.visible},Ze),function(Ct){var ot=Ct.className,gt=Ct.style,kt=i()("".concat(dt.prefixCls,"-sub"),ot,Object(h.a)({},"".concat(dt.prefixCls,"-rtl"),Tt==="rtl"));return O.createElement(we,Object.assign({},dt,{id:je.internalMenuId,className:kt,style:gt}),Te)})}},{key:"render",value:function(){var Te,je=Object(ae.a)({},this.props),dt=je.isOpen,Ze=this.getPrefixCls(),Tt=je.mode==="inline",Ct=i()(Ze,"".concat(Ze,"-").concat(je.mode),(Te={},Object(h.a)(Te,je.className,!!je.className),Object(h.a)(Te,this.getOpenClassName(),dt),Object(h.a)(Te,this.getActiveClassName(),je.active||dt&&!Tt),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Object(h.a)(Te,this.getSelectedClassName(),this.isChildrenSelected()),Te));this.internalMenuId||(je.eventKey?this.internalMenuId="".concat(je.eventKey,"$Menu"):(Ue+=1,this.internalMenuId="$__$".concat(Ue,"$Menu")));var ot={},gt={},kt={};je.disabled||(ot={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},gt={onClick:this.onTitleClick},kt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Kt={},Gt=je.direction;Tt&&(Gt==="rtl"?Kt.paddingRight=je.inlineIndent*je.level:Kt.paddingLeft=je.inlineIndent*je.level);var Se={};this.props.isOpen&&(Se={"aria-owns":this.internalMenuId});var de=null;je.mode!=="horizontal"&&(de=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(de=O.createElement(this.props.expandIcon,Object(ae.a)({},this.props))));var W=O.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Kt,className:"".concat(Ze,"-title"),role:"button"},kt,gt,{"aria-expanded":dt},Se,{"aria-haspopup":"true",title:typeof je.title=="string"?je.title:void 0}),je.title,de||O.createElement("i",{className:"".concat(Ze,"-arrow")})),q=this.renderChildren(je.children),ne=je.parentMenu.isRootMenu?je.parentMenu.props.getPopupContainer:function(Qt){return Qt.parentNode},se=Ye[je.mode],xe=je.popupOffset?{offset:je.popupOffset}:{},He=je.mode==="inline"?"":je.popupClassName;He+=Gt==="rtl"?" ".concat(Ze,"-rtl"):"";var Je=je.disabled,Et=je.triggerSubMenuAction,St=je.subMenuOpenDelay,nt=je.forceSubMenuRender,xt=je.subMenuCloseDelay,ut=je.builtinPlacements;ie.forEach(function(Qt){return delete je[Qt]}),delete je.onClick;var _t=Gt==="rtl"?Object.assign({},ue,ut):Object.assign({},he,ut);return delete je.direction,O.createElement("li",Object.assign({},je,ot,{className:Ct,role:"menuitem"}),Tt&&W,Tt&&q,!Tt&&O.createElement(Pe.a,{prefixCls:Ze,popupClassName:i()("".concat(Ze,"-popup"),He),getPopupContainer:ne,builtinPlacements:_t,popupPlacement:se,popupVisible:dt,popupAlign:xe,popup:q,action:Je?[]:[Et],mouseEnterDelay:St,mouseLeaveDelay:xt,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:nt},W))}}]),ft}(O.Component);M.defaultProps={onMouseEnter:G,onMouseLeave:G,onTitleMouseEnter:G,onTitleMouseLeave:G,onTitleClick:G,manualRef:G,mode:"vertical",title:""};var N=Object(T.b)(function(Lt,lt){var ft=Lt.openKeys,Qe=Lt.activeKey,Te=Lt.selectedKeys,je=lt.eventKey,dt=lt.subMenuKey;return{isOpen:ft.indexOf(je)>-1,active:Qe[dt]===je,selectedKeys:Te}})(M);N.isSubMenu=!0;var $=N,V="menuitem-overflowed",Y=.5,me=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.resizeObserver=null,Qe.mutationObserver=null,Qe.originalTotalWidth=0,Qe.overflowedItems=[],Qe.menuItemSizes=[],Qe.cancelFrameId=null,Qe.state={lastVisibleIndex:void 0},Qe.getMenuItemNodes=function(){var Te=Qe.props.prefixCls,je=Ce.findDOMNode(Object(w.a)(Qe));return je?[].slice.call(je.children).filter(function(dt){return dt.className.split(" ").indexOf("".concat(Te,"-overflowed-submenu"))<0}):[]},Qe.getOverflowedSubMenuItem=function(Te,je,dt){var Ze=Qe.props,Tt=Ze.overflowedIndicator,Ct=Ze.level,ot=Ze.mode,gt=Ze.prefixCls,kt=Ze.theme;if(Ct!==1||ot!=="horizontal")return null;var Kt=Qe.props.children[0],Gt=Kt.props,Se=Gt.children,de=Gt.title,W=Gt.style,q=Object(pe.a)(Gt,["children","title","style"]),ne=Object(ae.a)({},W),se="".concat(Te,"-overflowed-indicator"),xe="".concat(Te,"-overflowed-indicator");je.length===0&&dt!==!0?ne=Object(ae.a)(Object(ae.a)({},ne),{},{display:"none"}):dt&&(ne=Object(ae.a)(Object(ae.a)({},ne),{},{visibility:"hidden",position:"absolute"}),se="".concat(se,"-placeholder"),xe="".concat(xe,"-placeholder"));var He=kt?"".concat(gt,"-").concat(kt):"",Je={};return ie.forEach(function(Et){q[Et]!==void 0&&(Je[Et]=q[Et])}),O.createElement($,Object.assign({title:Tt,className:"".concat(gt,"-overflowed-submenu"),popupClassName:He},Je,{key:se,eventKey:xe,disabled:!1,style:ne}),je)},Qe.setChildrenWidthAndResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Ce.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=Te.children;if(!je||je.length===0)return;var dt=Te.children[je.length-1];Ee(dt,"display","inline-block");var Ze=Qe.getMenuItemNodes(),Tt=Ze.filter(function(Ct){return Ct.className.split(" ").indexOf(V)>=0});Tt.forEach(function(Ct){Ee(Ct,"display","inline-block")}),Qe.menuItemSizes=Ze.map(function(Ct){return oe(Ct,!0)}),Tt.forEach(function(Ct){Ee(Ct,"display","none")}),Qe.overflowedIndicatorWidth=oe(Te.children[Te.children.length-1],!0),Qe.originalTotalWidth=Qe.menuItemSizes.reduce(function(Ct,ot){return Ct+ot},0),Qe.handleResize(),Ee(dt,"display","none")},Qe.handleResize=function(){if(Qe.props.mode!=="horizontal")return;var Te=Ce.findDOMNode(Object(w.a)(Qe));if(!Te)return;var je=oe(Te);Qe.overflowedItems=[];var dt=0,Ze;Qe.originalTotalWidth>je+Y&&(Ze=-1,Qe.menuItemSizes.forEach(function(Tt){dt+=Tt,dt+Qe.overflowedIndicatorWidth<=je&&(Ze+=1)})),Qe.setState({lastVisibleIndex:Ze})},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){var Te=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var je=Ce.findDOMNode(this);if(!je)return;this.resizeObserver=new Be.default(function(dt){dt.forEach(function(){var Ze=Te.cancelFrameId;cancelAnimationFrame(Ze),Te.cancelFrameId=requestAnimationFrame(Te.setChildrenWidthAndResize)})}),[].slice.call(je.children).concat(je).forEach(function(dt){Te.resizeObserver.observe(dt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Te.resizeObserver.disconnect(),[].slice.call(je.children).concat(je).forEach(function(dt){Te.resizeObserver.observe(dt)}),Te.setChildrenWidthAndResize()}),this.mutationObserver.observe(je,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Te){var je=this,dt=this.state.lastVisibleIndex;return(Te||[]).reduce(function(Ze,Tt,Ct){var ot=Tt;if(je.props.mode==="horizontal"){var gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,[]);dt!==void 0&&je.props.className.indexOf("".concat(je.props.prefixCls,"-root"))!==-1&&(Ct>dt&&(ot=O.cloneElement(Tt,{style:{display:"none"},eventKey:"".concat(Tt.props.eventKey,"-hidden"),className:"".concat(V)})),Ct===dt+1&&(je.overflowedItems=Te.slice(dt+1).map(function(Kt){return O.cloneElement(Kt,{key:Kt.props.eventKey,mode:"vertical-left"})}),gt=je.getOverflowedSubMenuItem(Tt.props.eventKey,je.overflowedItems)));var kt=[].concat(Object(Le.a)(Ze),[gt,ot]);return Ct===Te.length-1&&kt.push(je.getOverflowedSubMenuItem(Tt.props.eventKey,[],!0)),kt}return[].concat(Object(Le.a)(Ze),[ot])},[])}},{key:"render",value:function(){var Te=this.props,je=Te.visible,dt=Te.prefixCls,Ze=Te.overflowedIndicator,Tt=Te.mode,Ct=Te.level,ot=Te.tag,gt=Te.children,kt=Te.theme,Kt=Object(pe.a)(Te,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Gt=ot;return O.createElement(Gt,Object.assign({},Kt),this.renderChildren(gt))}}]),ft}(O.Component);me.defaultProps={tag:"div",className:""};var Re=me;function rt(Lt){return Lt.length?Lt.every(function(lt){return!!lt.props.disabled}):!0}function De(Lt,lt,ft){var Qe=Lt.getState();Lt.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.activeKey),{},Object(h.a)({},lt,ft))})}function Me(Lt){return Lt.eventKey||"0-menu-"}function Xe(Lt,lt){var ft=lt,Qe=Lt.children,Te=Lt.eventKey;if(ft){var je;if(B(Qe,function(dt,Ze){dt&&dt.props&&!dt.props.disabled&&ft===X(dt,Te,Ze)&&(je=!0)}),je)return ft}return ft=null,Lt.defaultActiveFirst&&B(Qe,function(dt,Ze){!ft&&dt&&!dt.props.disabled&&(ft=X(dt,Te,Ze))}),ft}function tt(Lt){if(Lt){var lt=this.instanceArray.indexOf(Lt);lt!==-1?this.instanceArray[lt]=Lt:this.instanceArray.push(Lt)}}var Ve=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;return Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.onKeyDown=function(je,dt){var Ze=je.keyCode,Tt;if(Te.getFlatInstanceArray().forEach(function(ot){ot&&ot.props.active&&ot.onKeyDown&&(Tt=ot.onKeyDown(je))}),Tt)return 1;var Ct=null;return(Ze===d.a.UP||Ze===d.a.DOWN)&&(Ct=Te.step(Ze===d.a.UP?-1:1)),Ct?(je.preventDefault(),De(Te.props.store,Me(Te.props),Ct.props.eventKey),typeof dt=="function"&&dt(Ct),1):void 0},Te.onItemHover=function(je){var dt=je.key,Ze=je.hover;De(Te.props.store,Me(Te.props),Ze?dt:null)},Te.onDeselect=function(je){Te.props.onDeselect(je)},Te.onSelect=function(je){Te.props.onSelect(je)},Te.onClick=function(je){Te.props.onClick(je)},Te.onOpenChange=function(je){Te.props.onOpenChange(je)},Te.onDestroy=function(je){Te.props.onDestroy(je)},Te.getFlatInstanceArray=function(){return Te.instanceArray},Te.step=function(je){var dt=Te.getFlatInstanceArray(),Ze=Te.props.store.getState().activeKey[Me(Te.props)],Tt=dt.length;if(!Tt)return null;je<0&&(dt=dt.concat().reverse());var Ct=-1;if(dt.every(function(Kt,Gt){return Kt&&Kt.props.eventKey===Ze?(Ct=Gt,!1):!0}),!Te.props.defaultActiveFirst&&Ct!==-1&&rt(dt.slice(Ct,Tt-1)))return;var ot=(Ct+1)%Tt,gt=ot;do{var kt=dt[gt];if(!kt||kt.props.disabled)gt=(gt+1)%Tt;else return kt}while(gt!==ot);return null},Te.renderCommonMenuItem=function(je,dt,Ze){var Tt=Te.props.store.getState(),Ct=Object(w.a)(Te),ot=Ct.props,gt=X(je,ot.eventKey,dt),kt=je.props;if(!kt||typeof je.type=="string")return je;var Kt=gt===Tt.activeKey,Gt=Object(ae.a)(Object(ae.a)({mode:kt.mode||ot.mode,level:ot.level,inlineIndent:ot.inlineIndent,renderMenuItem:Te.renderMenuItem,rootPrefixCls:ot.prefixCls,index:dt,parentMenu:ot.parentMenu,manualRef:kt.disabled?void 0:Object(a.a)(je.ref,tt.bind(Object(w.a)(Te))),eventKey:gt,active:!kt.disabled&&Kt,multiple:ot.multiple,onClick:function(de){(kt.onClick||G)(de),Te.onClick(de)},onItemHover:Te.onItemHover,motion:ot.motion,subMenuOpenDelay:ot.subMenuOpenDelay,subMenuCloseDelay:ot.subMenuCloseDelay,forceSubMenuRender:ot.forceSubMenuRender,onOpenChange:Te.onOpenChange,onDeselect:Te.onDeselect,onSelect:Te.onSelect,builtinPlacements:ot.builtinPlacements,itemIcon:kt.itemIcon||Te.props.itemIcon,expandIcon:kt.expandIcon||Te.props.expandIcon},Ze),{},{direction:ot.direction});return(ot.mode==="inline"||ye())&&(Gt.triggerSubMenuAction="click"),O.cloneElement(je,Gt)},Te.renderMenuItem=function(je,dt,Ze){if(!je)return null;var Tt=Te.props.store.getState(),Ct={openKeys:Tt.openKeys,selectedKeys:Tt.selectedKeys,triggerSubMenuAction:Te.props.triggerSubMenuAction,subMenuKey:Ze};return Te.renderCommonMenuItem(je,dt,Ct)},Qe.store.setState({activeKey:Object(ae.a)(Object(ae.a)({},Qe.store.getState().activeKey),{},Object(h.a)({},Qe.eventKey,Xe(Qe,Qe.activeKey)))}),Te.instanceArray=[],Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Te){return this.props.visible||Te.visible||this.props.className!==Te.className||!s()(this.props.style,Te.style)}},{key:"componentDidUpdate",value:function(Te){var je=this.props,dt="activeKey"in je?je.activeKey:je.store.getState().activeKey[Me(je)],Ze=Xe(je,dt);if(Ze!==dt)De(je.store,Me(je),Ze);else if("activeKey"in Te){var Tt=Xe(Te,Te.activeKey);Ze!==Tt&&De(je.store,Me(je),Ze)}}},{key:"render",value:function(){var Te=this,je=Object(p.a)({},this.props);this.instanceArray=[];var dt=i()(je.prefixCls,je.className,"".concat(je.prefixCls,"-").concat(je.mode)),Ze={className:dt,role:je.role||"menu"};je.id&&(Ze.id=je.id),je.focusable&&(Ze.tabIndex=0,Ze.onKeyDown=this.onKeyDown);var Tt=je.prefixCls,Ct=je.eventKey,ot=je.visible,gt=je.level,kt=je.mode,Kt=je.overflowedIndicator,Gt=je.theme;return ie.forEach(function(Se){return delete je[Se]}),delete je.onClick,O.createElement(Re,Object.assign({},je,{prefixCls:Tt,mode:kt,tag:"ul",level:gt,theme:Gt,visible:ot,overflowedIndicator:Kt},Ze),O.Children.map(je.children,function(Se,de){return Te.renderMenuItem(Se,de,Ct||"0-menu-")}))}}]),ft}(O.Component);Ve.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:G};var Ke=Object(T.b)()(Ve),we=Ke,Ae=z("Kwbf");function Oe(Lt,lt,ft){var Qe=Lt.prefixCls,Te=Lt.motion,je=Lt.defaultMotions,dt=je===void 0?{}:je,Ze=Lt.openAnimation,Tt=Lt.openTransitionName,Ct=lt.switchingModeFromInline;if(Te)return Te;if(Object(n.a)(Ze)==="object"&&Ze)Object(Ae.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof Ze=="string")return{motionName:"".concat(Qe,"-open-").concat(Ze)};if(Tt)return{motionName:Tt};var ot=dt[ft];return ot||(Ct?null:dt.other)}var fe=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(Qe){var Te;Object(Z.a)(this,ft),Te=lt.call(this,Qe),Te.inlineOpenKeys=[],Te.onSelect=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props;if(Ct.selectable){var ot=Te.store.getState(),gt=ot.selectedKeys,kt=Ze.key;Ct.multiple?gt=gt.concat([kt]):gt=[kt],"selectedKeys"in Ct||Te.store.setState({selectedKeys:gt}),Ct.onSelect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:gt}))}},Te.onClick=function(Ze){var Tt=Te.getRealMenuMode(),Ct=Object(w.a)(Te),ot=Ct.store,gt=Ct.props.onOpenChange;Tt!=="inline"&&!("openKeys"in Te.props)&&(ot.setState({openKeys:[]}),gt([])),Te.props.onClick(Ze)},Te.onKeyDown=function(Ze,Tt){Te.innerMenu.getWrappedInstance().onKeyDown(Ze,Tt)},Te.onOpenChange=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props,ot=Te.store.getState().openKeys.concat(),gt=!1,kt=function(Gt){var Se=!1;if(Gt.open)Se=ot.indexOf(Gt.key)===-1,Se&&ot.push(Gt.key);else{var de=ot.indexOf(Gt.key);Se=de!==-1,Se&&ot.splice(de,1)}gt=gt||Se};Array.isArray(Ze)?Ze.forEach(kt):kt(Ze),gt&&("openKeys"in Te.props||Te.store.setState({openKeys:ot}),Ct.onOpenChange(ot))},Te.onDeselect=function(Ze){var Tt=Object(w.a)(Te),Ct=Tt.props;if(Ct.selectable){var ot=Te.store.getState().selectedKeys.concat(),gt=Ze.key,kt=ot.indexOf(gt);kt!==-1&&ot.splice(kt,1),"selectedKeys"in Ct||Te.store.setState({selectedKeys:ot}),Ct.onDeselect(Object(ae.a)(Object(ae.a)({},Ze),{},{selectedKeys:ot}))}},Te.onMouseEnter=function(Ze){Te.restoreModeVerticalFromInline();var Tt=Te.props.onMouseEnter;Tt&&Tt(Ze)},Te.onTransitionEnd=function(Ze){var Tt=Ze.propertyName==="width"&&Ze.target===Ze.currentTarget,Ct=Ze.target.className,ot=Object.prototype.toString.call(Ct)==="[object SVGAnimatedString]"?Ct.animVal:Ct,gt=Ze.propertyName==="font-size"&&ot.indexOf("anticon")>=0;(Tt||gt)&&Te.restoreModeVerticalFromInline()},Te.setInnerMenu=function(Ze){Te.innerMenu=Ze},Te.isRootMenu=!0;var je=Qe.defaultSelectedKeys,dt=Qe.defaultOpenKeys;return"selectedKeys"in Qe&&(je=Qe.selectedKeys||[]),"openKeys"in Qe&&(dt=Qe.openKeys||[]),Te.store=Object(T.c)({selectedKeys:je,openKeys:dt,activeKey:{"0-menu-":Xe(Qe,Qe.activeKey)}}),Te.state={switchingModeFromInline:!1},Te}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Te){this.updateOpentKeysWhenSwitchMode(Te),this.updateMiniStore();var je=this.props,dt=je.siderCollapsed,Ze=je.inlineCollapsed,Tt=je.onOpenChange;(!Te.inlineCollapsed&&Ze||!Te.siderCollapsed&&dt)&&Tt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Te){var je=this.props,dt=this.store,Ze=this.inlineOpenKeys,Tt=dt.getState(),Ct={};Te.mode==="inline"&&je.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in je||((je.inlineCollapsed&&!Te.inlineCollapsed||je.siderCollapsed&&!Te.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Tt.openKeys.concat(),Ct.openKeys=[]),(!je.inlineCollapsed&&Te.inlineCollapsed||!je.siderCollapsed&&Te.siderCollapsed)&&(Ct.openKeys=Ze,this.inlineOpenKeys=[])),Object.keys(Ct).length&&dt.setState(Ct)}},{key:"updateMenuDisplay",value:function(){var Te=this.props.collapsedWidth,je=this.store,dt=this.prevOpenKeys,Ze=this.getInlineCollapsed()&&(Te===0||Te==="0"||Te==="0px");Ze?(this.prevOpenKeys=je.getState().openKeys.concat(),this.store.setState({openKeys:[]})):dt&&(this.store.setState({openKeys:dt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Te=this.props.mode,je=this.state.switchingModeFromInline,dt=this.getInlineCollapsed();return je&&dt?"inline":dt?"vertical":Te}},{key:"getInlineCollapsed",value:function(){var Te=this.props,je=Te.inlineCollapsed,dt=Te.siderCollapsed;return dt!==void 0?dt:je}},{key:"restoreModeVerticalFromInline",value:function(){var Te=this.state.switchingModeFromInline;Te&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Te=Object(ae.a)({},Object(l.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),je=this.getRealMenuMode();return Te.className+=" ".concat(Te.prefixCls,"-root"),Te.direction==="rtl"&&(Te.className+=" ".concat(Te.prefixCls,"-rtl")),Te=Object(ae.a)(Object(ae.a)({},Te),{},{mode:je,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Oe(this.props,this.state,je)}),delete Te.openAnimation,delete Te.openTransitionName,O.createElement(T.a,{store:this.store},O.createElement(we,Object.assign({},Te,{ref:this.setInnerMenu}),this.props.children))}}]),ft}(O.Component);fe.defaultProps={selectable:!0,onClick:G,onSelect:G,onOpenChange:G,onDeselect:G,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:O.createElement("span",null,"\xB7\xB7\xB7")};var ge=fe,_e=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.onKeyDown=function(Te){var je=Te.keyCode;return je===d.a.ENTER?(Qe.onClick(Te),!0):void 0},Qe.onMouseLeave=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseLeave;Ze({key:dt,hover:!1}),Tt({key:dt,domEvent:Te})},Qe.onMouseEnter=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.onItemHover,Tt=je.onMouseEnter;Ze({key:dt,hover:!0}),Tt({key:dt,domEvent:Te})},Qe.onClick=function(Te){var je=Qe.props,dt=je.eventKey,Ze=je.multiple,Tt=je.onClick,Ct=je.onSelect,ot=je.onDeselect,gt=je.isSelected,kt={key:dt,keyPath:[dt],item:Object(w.a)(Qe),domEvent:Te};Tt(kt),Ze?gt?ot(kt):Ct(kt):gt||Ct(kt)},Qe.saveNode=function(Te){Qe.node=Te},Qe}return Object(U.a)(ft,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Te=this.props;Te.onDestroy&&Te.onDestroy(Te.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Te,je=Object(ae.a)({},this.props),dt=i()(this.getPrefixCls(),je.className,(Te={},Object(h.a)(Te,this.getActiveClassName(),!je.disabled&&je.active),Object(h.a)(Te,this.getSelectedClassName(),je.isSelected),Object(h.a)(Te,this.getDisabledClassName(),je.disabled),Te)),Ze=Object(ae.a)(Object(ae.a)({},je.attribute),{},{title:typeof je.title=="string"?je.title:void 0,className:dt,role:je.role||"menuitem","aria-disabled":je.disabled});je.role==="option"?Ze=Object(ae.a)(Object(ae.a)({},Ze),{},{role:"option","aria-selected":je.isSelected}):(je.role===null||je.role==="none")&&(Ze.role="none");var Tt={onClick:je.disabled?null:this.onClick,onMouseLeave:je.disabled?null:this.onMouseLeave,onMouseEnter:je.disabled?null:this.onMouseEnter},Ct=Object(ae.a)({},je.style);je.mode==="inline"&&(je.direction==="rtl"?Ct.paddingRight=je.inlineIndent*je.level:Ct.paddingLeft=je.inlineIndent*je.level),ie.forEach(function(gt){return delete je[gt]}),delete je.direction;var ot=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(ot=O.createElement(this.props.itemIcon,this.props)),O.createElement("li",Object.assign({},Object(l.default)(je,["onClick","onMouseEnter","onMouseLeave","onSelect"]),Ze,Tt,{style:Ct,ref:this.saveNode}),je.children,ot)}}]),ft}(O.Component);_e.isMenuItem=!0,_e.defaultProps={onSelect:G,onMouseEnter:G,onMouseLeave:G,manualRef:G};var be=Object(T.b)(function(Lt,lt){var ft=Lt.activeKey,Qe=Lt.selectedKeys,Te=lt.eventKey,je=lt.subMenuKey;return{active:ft[je]===Te,isSelected:Qe.indexOf(Te)!==-1}})(_e),Ge=be,qe=function(Lt){Object(P.a)(ft,Lt);var lt=Object(S.a)(ft);function ft(){var Qe;return Object(Z.a)(this,ft),Qe=lt.apply(this,arguments),Qe.renderInnerMenuItem=function(Te){var je=Qe.props,dt=je.renderMenuItem,Ze=je.index;return dt(Te,Ze,Qe.props.subMenuKey)},Qe}return Object(U.a)(ft,[{key:"render",value:function(){var Te=Object(p.a)({},this.props),je=Te.className,dt=je===void 0?"":je,Ze=Te.rootPrefixCls,Tt="".concat(Ze,"-item-group-title"),Ct="".concat(Ze,"-item-group-list"),ot=Te.title,gt=Te.children;return ie.forEach(function(kt){return delete Te[kt]}),delete Te.onClick,delete Te.direction,O.createElement("li",Object.assign({},Te,{className:"".concat(dt," ").concat(Ze,"-item-group")}),O.createElement("div",{className:Tt,title:typeof ot=="string"?ot:void 0},ot),O.createElement("ul",{className:Ct},O.Children.map(gt,this.renderInnerMenuItem)))}}]),ft}(O.Component);qe.isMenuItemGroup=!0,qe.defaultProps={disabled:!0};var pt=qe,Dt=function(lt){var ft=lt.className,Qe=lt.rootPrefixCls,Te=lt.style;return O.createElement("li",{className:"".concat(ft," ").concat(Qe,"-item-divider"),style:Te})};Dt.defaultProps={disabled:!0,className:"",style:{}};var jt=Dt,Rt=We.e=ge},"3tLw":function($e,We,z){$e.exports=z.p+"static/a.39070d50.svg"},"4xil":function($e,We,z){$e.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function($e,We,z){"use strict";z.d(We,"a",function(){return t});var ae=z("Ty5D"),Z=z("dI71"),U=z("q1tI"),w=z.n(U),P=z("YS25"),S=z("17x9"),O=z.n(S),T=z("wx14"),l=z("zLVn"),p=z("9R94"),h=function(E){Object(Z.a)(o,E);function o(){for(var C,A=arguments.length,D=new Array(A),I=0;I=0||A.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;E.setState({goInputText:""}),F(E.getValidValue())},E.go=function(A){var D=E.state.goInputText;if(D==="")return;(A.keyCode===u.ENTER||A.type==="click")&&(E.setState({goInputText:""}),E.props.quickGo(E.getValidValue()))},E}return Object(P.a)(g,[{key:"getValidValue",value:function(){var o=this.state,x=o.goInputText,C=o.current;return!x||isNaN(x)?C:Number(x)}},{key:"getPageSizeOptions",value:function(){var o=this.props,x=o.pageSize,C=o.pageSizeOptions;return C.some(function(A){return A.toString()===x.toString()})?C:C.concat([x.toString()]).sort(function(A,D){var I=isNaN(Number(A))?0:Number(A),F=isNaN(Number(D))?0:Number(D);return I-F})}},{key:"render",value:function(){var o=this,x=this.props,C=x.pageSize,A=x.locale,D=x.rootPrefixCls,I=x.changeSize,F=x.quickGo,H=x.goButton,te=x.selectComponentClass,j=x.buildOptionText,G=x.selectPrefixCls,X=x.disabled,J=this.state.goInputText,B="".concat(D,"-options"),Q=te,ie=null,oe=null,Ee=null;if(!I&&!F)return null;var ye=this.getPageSizeOptions();if(I&&Q){var Le=ye.map(function(pe,Ce){return l.a.createElement(Q.Option,{key:Ce,value:pe.toString()},(j||o.buildOptionText)(pe))});ie=l.a.createElement(Q,{disabled:X,prefixCls:G,showSearch:!1,className:"".concat(B,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(C||ye[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ce){return Ce.parentNode}},Le)}return F&&(H&&(Ee=typeof H=="boolean"?l.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:X,className:"".concat(B,"-quick-jumper-button")},A.jump_to_confirm):l.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),oe=l.a.createElement("div",{className:"".concat(B,"-quick-jumper")},A.jump_to,l.a.createElement("input",{disabled:X,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),A.page,Ee)),l.a.createElement("li",{className:"".concat(B)},ie,oe)}}]),g}(l.a.Component);s.defaultProps={pageSizeOptions:["10","20","50","100"]};var f=s,i=z("N2Kk");function n(){}function t(b){return typeof b=="number"&&isFinite(b)&&Math.floor(b)===b}function c(b,m,g){return g}function y(b,m,g){var E=typeof b=="undefined"?m.pageSize:b;return Math.floor((g.total-1)/E)+1}var v=function(b){Object(S.a)(g,b);var m=Object(O.a)(g);function g(E){var o;Object(w.a)(this,g),o=m.call(this,E),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(y(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(I,F){var H=o.props.prefixCls,te=I||l.a.createElement("button",{type:"button","aria-label":F,className:"".concat(H,"-item-link")});return typeof I=="function"&&(te=l.a.createElement(I,Object(U.a)({},o.props))),te},o.savePaginationNode=function(I){o.paginationNode=I},o.isValid=function(I){return t(I)&&I!==o.state.current},o.shouldDisplayQuickJumper=function(){var I=o.props,F=I.showQuickJumper,H=I.pageSize,te=I.total;return te<=H?!1:F},o.handleKeyDown=function(I){(I.keyCode===u.ARROW_UP||I.keyCode===u.ARROW_DOWN)&&I.preventDefault()},o.handleKeyUp=function(I){var F=o.getValidValue(I),H=o.state.currentInputValue;F!==H&&o.setState({currentInputValue:F}),I.keyCode===u.ENTER?o.handleChange(F):I.keyCode===u.ARROW_UP?o.handleChange(F-1):I.keyCode===u.ARROW_DOWN&&o.handleChange(F+1)},o.changePageSize=function(I){var F=o.state.current,H=y(I,o.state,o.props);F=F>H?H:F,H===0&&(F=o.state.current),typeof I=="number"&&("pageSize"in o.props||o.setState({pageSize:I}),"current"in o.props||o.setState({current:F,currentInputValue:F})),o.props.onShowSizeChange(F,I),"onChange"in o.props&&o.props.onChange&&o.props.onChange(F,I)},o.handleChange=function(I){var F=o.props.disabled,H=I;if(o.isValid(H)&&!F){var te=y(void 0,o.state,o.props);H>te?H=te:H<1&&(H=1),"current"in o.props||o.setState({current:H,currentInputValue:H});var j=o.state.pageSize;return o.props.onChange(H,j),H}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current2?H-2:0),j=2;j=C?D=C:D=Number(x),D}},{key:"getShowSizeChanger",value:function(){var o=this.props,x=o.showSizeChanger,C=o.total,A=o.totalBoundaryShowSizeChanger;return typeof x!="undefined"?x:C>A}},{key:"renderPrev",value:function(o){var x=this.props,C=x.prevIcon,A=x.itemRender,D=A(o,"prev",this.getItemIcon(C,"prev page")),I=!this.hasPrev();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"renderNext",value:function(o){var x=this.props,C=x.nextIcon,A=x.itemRender,D=A(o,"next",this.getItemIcon(C,"next page")),I=!this.hasNext();return Object(T.isValidElement)(D)?Object(T.cloneElement)(D,{disabled:I}):D}},{key:"render",value:function(){var o=this,x=this.props,C=x.prefixCls,A=x.className,D=x.style,I=x.disabled,F=x.hideOnSinglePage,H=x.total,te=x.locale,j=x.showQuickJumper,G=x.showLessItems,X=x.showTitle,J=x.showTotal,B=x.simple,Q=x.itemRender,ie=x.showPrevNextJumpers,oe=x.jumpPrevIcon,Ee=x.jumpNextIcon,ye=x.selectComponentClass,Le=x.selectPrefixCls,pe=x.pageSizeOptions,Ce=this.state,Be=Ce.current,Pe=Ce.pageSize,ke=Ce.currentInputValue;if(F===!0&&H<=Pe)return null;var Ne=y(void 0,this.state,this.props),he=[],ue=null,Ie=null,Ue=null,Ye=null,ee=null,M=j&&j.goButton,N=G?1:2,$=Be-1>0?Be-1:0,V=Be+1=N*2&&Be!==1+2&&(he[0]=Object(T.cloneElement)(he[0],{className:"".concat(C,"-item-after-jump-prev")}),he.unshift(ue)),Ne-Be>=N*2&&Be!==Ne-2&&(he[he.length-1]=Object(T.cloneElement)(he[he.length-1],{className:"".concat(C,"-item-before-jump-next")}),he.push(Ie)),Xe!==1&&he.unshift(Ue),tt!==Ne&&he.push(Ye)}var we=null;J&&(we=l.a.createElement("li",{className:"".concat(C,"-total-text")},J(H,[H===0?0:(Be-1)*Pe+1,Be*Pe>H?H:Be*Pe])));var Ae=!this.hasPrev()||!Ne,Oe=!this.hasNext()||!Ne;return l.a.createElement("ul",Object(ae.a)({className:h()(C,A,Object(Z.a)({},"".concat(C,"-disabled"),I)),style:D,unselectable:"unselectable",ref:this.savePaginationNode},Y),we,l.a.createElement("li",{title:X?te.prev_page:null,onClick:this.prev,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(C,"-prev"),Object(Z.a)({},"".concat(C,"-disabled"),Ae)),"aria-disabled":Ae},this.renderPrev($)),he,l.a.createElement("li",{title:X?te.next_page:null,onClick:this.next,tabIndex:Oe?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(C,"-next"),Object(Z.a)({},"".concat(C,"-disabled"),Oe)),"aria-disabled":Oe},this.renderNext(V)),l.a.createElement(f,{disabled:I,locale:te,rootPrefixCls:C,selectComponentClass:ye,selectPrefixCls:Le,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Be,pageSize:Pe,pageSizeOptions:pe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:M}))}}],[{key:"getDerivedStateFromProps",value:function(o,x){var C={};if("current"in o&&(C.current=o.current,o.current!==x.current&&(C.currentInputValue=C.current)),"pageSize"in o&&o.pageSize!==x.pageSize){var A=x.current,D=y(o.pageSize,x,o);A=A>D?D:A,"current"in o||(C.current=A,C.currentInputValue=A),C.pageSize=o.pageSize}return C}}]),g}(l.a.Component);v.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:i.a,style:{},itemRender:c,totalBoundaryShowSizeChanger:50};var _=v},"6RRn":function($e,We,z){"use strict";var ae=z("wCXF"),Z=z("n6Qo");z.d(We,"b",function(){return Z.a});var U=z("IBYe"),w=z("6eGT"),P=z("hW8S");z.d(We,"a",function(){return P.a}),We.c=ae.b},"6eGT":function($e,We,z){"use strict";function ae(Z){return null}We.a=ae},"7+5b":function($e,We,z){$e.exports=z.p+"static/v.e7f297d6.svg"},"7ahc":function($e,We,z){"use strict";z.d(We,"a",function(){return y});var ae=z("k1fw"),Z=z("0Owb"),U=z("+L6B"),w=z("2/Rp"),P=z("y8nQ"),S=z("Vl3Y"),O=z("tJVT"),T=z("OaEy"),l=z("2fM7"),p=z("q1tI"),h=z.n(p),d=z("VrN/"),a=z.n(d),u=z("p77/"),s=z.n(u),f=z("c5Ni"),i=z.n(f),n=l.a.Option,t={labelCol:{span:4},wrapperCol:{span:20}},c={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};We.b=function(v){var _=v.callback,b=v.onCancel,m=Object(p.useState)("python"),g=Object(O.a)(m,2),E=g[0],o=g[1];function x(A){o(c[A][1])}function C(A){_(A)}return h.a.createElement(S.a,Object(Z.a)({},t,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:C}),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},h.a.createElement(l.a,{onChange:x},Object.keys(c).map(function(A){return h.a.createElement(n,{key:A,value:A},c[A][0])}))),h.a.createElement(S.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},h.a.createElement(y,{mode:E})),h.a.createElement("div",{className:"flex-container flex-end"},h.a.createElement(w.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),h.a.createElement(w.a,{type:"ghost",onClick:b},"\u53D6\u6D88")))};function y(v){var _=v.value,b=v.onChange,m=v.mode,g=v.options,E=g===void 0?{}:g,o=Object(p.useRef)(),x=Object(p.useState)(),C=Object(O.a)(x,2),A=C[0],D=C[1];return Object(p.useEffect)(function(){if(A){function I(F){var H=F.getValue();b&&b(H)}return A.on("change",I),function(){A.off("change",I)}}},[A,b]),Object(p.useEffect)(function(){A&&A.setOption("mode",m)},[A,m]),Object(p.useEffect)(function(){A&&((_!==A.getValue()||_==="")&&setTimeout(function(){A.setValue(_||" ")},300))},[A,_]),Object(p.useEffect)(function(){if(o.current&&!A){var I=a.a.fromTextArea(o.current,Object(ae.a)({mode:m,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},E));D(I)}},[o.current,A]),h.a.createElement("div",{className:"my-codemirror-container"},h.a.createElement("textarea",{ref:o}))}},"7ixt":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae={adjustX:1,adjustY:1},Z=[0,0],U={left:{points:["cr","cl"],overflow:ae,offset:[-4,0],targetOffset:Z},right:{points:["cl","cr"],overflow:ae,offset:[4,0],targetOffset:Z},top:{points:["bc","tc"],overflow:ae,offset:[0,-4],targetOffset:Z},bottom:{points:["tc","bc"],overflow:ae,offset:[0,4],targetOffset:Z},topLeft:{points:["bl","tl"],overflow:ae,offset:[0,-4],targetOffset:Z},leftTop:{points:["tr","tl"],overflow:ae,offset:[-4,0],targetOffset:Z},topRight:{points:["br","tr"],overflow:ae,offset:[0,-4],targetOffset:Z},rightTop:{points:["tl","tr"],overflow:ae,offset:[4,0],targetOffset:Z},bottomRight:{points:["tr","br"],overflow:ae,offset:[0,4],targetOffset:Z},rightBottom:{points:["bl","br"],overflow:ae,offset:[4,0],targetOffset:Z},bottomLeft:{points:["tl","bl"],overflow:ae,offset:[0,4],targetOffset:Z},leftBottom:{points:["br","bl"],overflow:ae,offset:[-4,0],targetOffset:Z}},w=U},"7qur":function($e,We,z){"use strict";z.d(We,"m",function(){return Z}),z.d(We,"s",function(){return U}),z.d(We,"h",function(){return w}),z.d(We,"o",function(){return P}),z.d(We,"n",function(){return S}),z.d(We,"l",function(){return O}),z.d(We,"b",function(){return T}),z.d(We,"q",function(){return l}),z.d(We,"t",function(){return p}),z.d(We,"v",function(){return h}),z.d(We,"w",function(){return d}),z.d(We,"u",function(){return a}),z.d(We,"p",function(){return u}),z.d(We,"f",function(){return s}),z.d(We,"a",function(){return f}),z.d(We,"j",function(){return i}),z.d(We,"k",function(){return n}),z.d(We,"d",function(){return t}),z.d(We,"g",function(){return c}),z.d(We,"c",function(){return y}),z.d(We,"e",function(){return v}),z.d(We,"i",function(){return _}),z.d(We,"r",function(){return b});var ae=z("ErOA");function Z(m){return Object(ae.c)("mypractices/".concat(m,".json"),{hidePopLogin:!0})}function U(m,g){return Object(ae.f)("mypractices/".concat(m,"/code_submit.json"),g)}function w(m,g){return Object(ae.c)("mypractices/".concat(m,"/code_debug.json"),g)}function P(m,g){return Object(ae.c)("mypractices/".concat(m,"/submit_records.json"),g)}function S(m){return Object(ae.c)("mypractices/record_detail.json",{id:m})}function O(m,g){return Object(ae.c)("mypractices/".concat(m,"/result.json"),{mode:g})}function T(m,g){return Object(ae.f)("mypractices/".concat(m,"/add_notes.json"),g)}function l(m,g){return Object(ae.f)("mypractices/".concat(m,"/restore_initial_code.json"),g)}function p(m,g){return Object(ae.f)("mypractices/".concat(m,"/sync_code.json"),g)}function h(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_code.json"),g)}function d(m){return Object(ae.f)("mypractices/".concat(m,"/initial_codes.json"))}function a(m,g){return Object(ae.f)("discusses/".concat(m,"/plus.json"),g)}function u(m){return Object(ae.c)("practices/practices_list.json",m)}function s(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles"),g)}function f(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles"),g)}function i(m,g){return Object(ae.g)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function n(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/edit"),g)}function t(m,g){return Object(ae.c)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function c(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/set_authority_or_excellent"),g)}function y(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/praise_or_treads"),g)}function v(m,g){return Object(ae.f)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active,"/hide"))}function _(m,g){return Object(ae.b)("practices/".concat(m,"/question_solution_articles/").concat(g==null?void 0:g.active),g)}function b(m,g){return Object(ae.f)("mypractices/".concat(m,"/update_practice_time_sum"),g)}},"815F":function($e,We,z){"use strict";z.d(We,"e",function(){return O}),z.d(We,"c",function(){return l}),z.d(We,"d",function(){return p}),z.d(We,"a",function(){return d}),z.d(We,"f",function(){return a}),z.d(We,"b",function(){return u});var ae=z("KQm4"),Z=z("VTBJ"),U=z("Ff2n"),w=z("Zm9Q"),P=z("Kwbf"),S=z("OZM5");function O(s,f){return s!=null?s:f}function T(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=new Map;function i(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(c){var y=c.key,v=c.children;Object(P.a)(y!=null,"Tree node must have a certain key: [".concat(t).concat(y,"]"));var _=String(y);Object(P.a)(!f.has(_)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(_)),f.set(_,!0),i(v,"".concat(t).concat(_," > "))})}i(s)}function l(s){function f(i){var n=Object(w.a)(i);return n.map(function(t){if(!Object(S.i)(t))return Object(P.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var c=t.key,y=t.props,v=y.children,_=Object(U.a)(y,["children"]),b=Object(Z.a)({key:c},_),m=f(v);return m.length&&(b.children=m),b}).filter(function(t){return t})}return f(s)}function p(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(f===!0?[]:f),n=[];function t(c){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(v,_){var b=Object(S.h)(y?y.pos:"0",_),m=O(v.key,b),g=Object(Z.a)(Object(Z.a)({},v),{},{parent:y,pos:b,children:null,data:v,isStart:[].concat(Object(ae.a)(y?y.isStart:[]),[_===0]),isEnd:[].concat(Object(ae.a)(y?y.isEnd:[]),[_===c.length-1])});return n.push(g),f===!0||i.has(m)?g.children=t(v.children||[],g):g.children=[],g})}return t(s),n}function h(s,f,i){var n;i?typeof i=="string"?n=function(y){return y[i]}:typeof i=="function"&&(n=function(y){return i(y)}):n=function(y,v){return O(y.key,v)};function t(c,y,v){var _=c?c.children:s,b=c?Object(S.h)(v.pos,y):"0";if(c){var m=n(c,b),g={node:c,index:y,pos:b,key:m,parentPos:v.node?v.pos:null,level:v.level+1};f(g)}_&&_.forEach(function(E,o){t(E,o,{node:c,pos:b,level:v?v.level+1:-1})})}t(null)}function d(s){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=f.initWrapper,n=f.processEntity,t=f.onProcessFinished,c=arguments.length>2?arguments[2]:void 0,y={},v={},_={posEntities:y,keyEntities:v};return i&&(_=i(_)||_),h(s,function(b){var m=b.node,g=b.index,E=b.pos,o=b.key,x=b.parentPos,C=b.level,A={node:m,index:g,key:o,pos:E,level:C},D=O(o,E);y[E]=A,v[D]=A,A.parent=y[x],A.parent&&(A.parent.children=A.parent.children||[],A.parent.children.push(A)),n&&n(A,_)},c),t&&t(_),_}function a(s,f){var i=f.expandedKeys,n=f.selectedKeys,t=f.loadedKeys,c=f.loadingKeys,y=f.checkedKeys,v=f.halfCheckedKeys,_=f.dragOverNodeKey,b=f.dropPosition,m=f.keyEntities,g=m[s],E={eventKey:s,expanded:i.indexOf(s)!==-1,selected:n.indexOf(s)!==-1,loaded:t.indexOf(s)!==-1,loading:c.indexOf(s)!==-1,checked:y.indexOf(s)!==-1,halfChecked:v.indexOf(s)!==-1,pos:String(g?g.pos:""),dragOver:_===s&&b===0,dragOverGapTop:_===s&&b===-1,dragOverGapBottom:_===s&&b===1};return E}function u(s){var f=s.data,i=s.expanded,n=s.selected,t=s.checked,c=s.loaded,y=s.loading,v=s.halfChecked,_=s.dragOver,b=s.dragOverGapTop,m=s.dragOverGapBottom,g=s.pos,E=s.active,o=Object(Z.a)(Object(Z.a)({},f),{},{expanded:i,selected:n,checked:t,loaded:c,loading:y,halfChecked:v,dragOver:_,dragOverGapTop:b,dragOverGapBottom:m,pos:g,active:E});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(P.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),s}}),o}},"8EBN":function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";ae.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Z=0;Z-1&&w.substring(O+1,w.length);if(T)return ae.findModeByExtension(T)},ae.findModeByName=function(w){w=w.toLowerCase();for(var P=0;P=Q.length?ie.slice(Q.length):ie}).join(` `)}var p=[],h=["
    "],d=new O.a.Renderer,a=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function u(){p.length=0,h=["
      "]}var s={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function f(X,J,B,Q){if(J>=X.length||X[J].level<=B)return J;var ie=X[J];Q.push("
    • "+ie.text+""),J++;var oe=[];return J=f(X,J,ie.level,oe),oe.length>0&&(Q.push("
        "),oe.forEach(function(Ee){Q.push(Ee)}),Q.push("
      ")),Q.push("
    • "),J=f(X,J,B,Q),J}function i(){return f(p,0,0,h),h.push("
    "),h.join("")}var n={heading:function(J){var B=a.exec(J);if(B)return{type:"heading",raw:B[0],depth:B[1].length,text:B[2]}},fences:function(J){var B=this.rules.block.fences.exec(J);if(B){var Q=B[0],ie=l(Q,B[3]||""),oe=B[2]?B[2].trim():B[2];if(["latex","katex","math"].indexOf(oe)>=0){var Ee=y(),ye=ie;ie=Ee,v[Ee]={type:"block",expression:ye}}return{type:"code",raw:Q,lang:oe,text:ie}}}},t=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,y=function(){return"__special_katext_id_".concat(c++,"__")},v={};function _(){return v}function b(){c=0,v={}}function m(X){return X=X.replace(t,function(J,B){var Q=y();return v[Q]={type:"inline",expression:B},Q}),X}var g=d.listitem;d.listitem=function(X){return g(m(X))};var E=d.paragraph;d.paragraph=function(X){return E(m(X))};var o=d.tablecell;d.tablecell=function(X,J){return o(m(X),J)},d.code=function(X,J,B){var Q=(J||"").match(/\S*/)[0];return Q?["latex","katex","math"].indexOf(Q)>=0?"

    ".concat(X,"

    "):'
    ').concat(B?X:Object(T.escape)(X,!0),`
    `):'
    '+(B?X:Object(T.escape)(X,!0))+"
    "},d.heading=function(X,J,B){var Q=this.options.headerPrefix+B.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return p.push({anchor:Q,level:J,text:X}),"'+X+""},O.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),O.a.use({tokenizer:n,renderer:d});var x=O.a,C=z("SJMd"),A=z("ulZh"),D=z.n(A),I=z("m3rI"),F=z("Oy/b"),H=z("p5ED"),te=/]*>/g;function j(X){var J=document.createElement("div");return J.innerHTML=X,J.childNodes.length===0?"":J.childNodes[0].nodeValue}var G=We.a=function(X){var J=X.value,B=J===void 0?"":J,Q=X.className,ie=X.showTextOnly,oe=X.showLines,Ee=X.style,ye=Ee===void 0?{}:Ee,Le=X.stylesPrev,pe=Le===void 0?{}:Le,Ce=String(B),Be=Object(U.useState)(""),Pe=Object(Z.a)(Be,2),ke=Pe[0],Ne=Pe[1],he=Object(U.useMemo)(function(){try{var Ye=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,ee=/\"\/api\/attachments\/|\"\/attachments\/download\//g,M=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ce=Ce.replace(Ye,"("+I.a.API_SERVER+"/api/attachments/").replace(ee,'"'+I.a.API_SERVER+"/api/attachments/").replace(M,'"'+I.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,` `),Ce=Ce.replace(new RegExp("(?[TOC]

    ",i()),u()),N=N.replace(/(__special_katext_id_\d+__)/g,function(Y,me){var Re=$[me],rt=Re.type,De=Re.expression;return Object(F.renderToString)(j(De)||"",{displayMode:rt==="block",throwOnError:!1,output:"html"})}),N=N.replace(/▁/g,"\u2581\u2581\u2581"),b(),ie){var V=document.createElement("div");return V.innerHTML=N,V.innerText}return setTimeout(function(){return Ue()},500),N},[Ce]),ue=Object(U.useRef)();s.WebkitLineClamp=oe,oe&&(ye=Object(ae.a)(Object(ae.a)({},ye),s));function Ie(Ye){var ee=Ye.target;if(ee.tagName.toUpperCase()==="A"){var M=ee.getAttribute("href");if(M.indexOf("office")>-1)Ye.preventDefault(),Ne(M);else if(M.startsWith("#")){Ye.preventDefault();var N=document.getElementById(M.replace("#",""));N&&N.scrollIntoView(!0)}}}var Ue=function(){var ee,M=(ee=ue.current)===null||ee===void 0?void 0:ee.querySelectorAll("video");M==null||M.forEach(function(N){if(N.oncontextmenu=function(){return!1},N.src.indexOf(".m3u8")>-1&&!N.canPlayType("application/vnd.apple.mpegurl")){if(D.a.isSupported()){var $=new D.a;$.loadSource(N.src),$.attachMedia(N)}}})};return Object(U.useEffect)(function(){if(ue.current&&he&&(he.match(te)&&window.PR.prettyPrint()),ue.current)return ue.current.addEventListener("click",Ie),function(){ue.current.removeEventListener("click",Ie),b(),u()}},[he,ue.current,Ie]),w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{ref:ue,style:Object(ae.a)({},ye),className:"".concat(Q||""," markdown-body "),dangerouslySetInnerHTML:{__html:he}}),w.a.createElement(H.a,{close:!0,data:ke,type:ke!=null&&ke.length?"office":"",style:Object(ae.a)({},pe),onClose:function(){return Ne("")}}))}},"9VGf":function($e,We,z){"use strict";z.d(We,"a",function(){return U});var ae=z("q1tI"),Z=z.n(ae);function U(w,P){var S=Object(ae.useRef)();Object(ae.useEffect)(function(){S.current=w}),Object(ae.useEffect)(function(){function O(){S.current()}if(P!==null){var T=setInterval(O,P);return function(){return clearInterval(T)}}},[P])}},AMnG:function($e,We,z){"use strict";var ae=z("miYZ"),Z=z("tsqr"),U=z("tJVT"),w=z("q1tI"),P=z.n(w),S=z("nWbc"),O=z.n(S),T=z("Ot1p");We.a=function(l){var p=l.id,h=l.activeDiscussIndex,d=l.onReplyDiscuss,a=Object(w.useState)(""),u=Object(U.a)(a,2),s=u[0],f=u[1];function i(t){f(t)}function n(){if(!s){Z.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}d(p,s),f("")}return P.a.createElement("div",{key:p,className:"discuss-item-editor",style:{display:h===p?"block":"none",width:"100%"}},P.a.createElement(T.a,{miniToolbar:!0,startInit:h===p,defaultValue:s,id:p,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:i}),P.a.createElement("a",{onClick:n,className:"btn-send"},"\u53D1\u9001"))}},Aky1:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("ErOA"),Z=z("ppsT"),U=z.n(Z),w="",P,S="";function O(p){T(p)}function T(p){P=new U.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(d){console.log("addFileSuccess: "+d.file.name),p.addFileSuccess&&p.addFileSuccess(d),P.startUpload()},onUploadstarted:function(d){var a=d.file.name;if(d.videoId){var f="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(f,{method:"put",body:{video_id:d.videoId,title:a,file_name:a,virtual_classroom_id:S}}).then(function(i){if(i.status==-1){p.onUploadError&&p.onUploadError(d);return}var n=i.data,t=n.UploadAuth,c=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,c)}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)})}else{var u="/api/users/".concat(w,"/video_auths.json"),s="";Object(ae.a)(u,{method:"Post",body:{title:s+a,file_name:s+a,virtual_classroom_id:S}}).then(function(i){if(i){var n=i.data,t=n.UploadAuth,c=n.UploadAddress,y=n.VideoId;P.setUploadAuthAndAddress(d,t,c,y)}}).catch(function(i){P.deleteFile(P._curIndex),P.nextUpload(),console.log(i)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(d){p.onUploadSucceed&&p.onUploadSucceed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(d,a,u){p.onUploadFailed&&p.onUploadFailed(d),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(d,a,u){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(d,a,u){p.onUploadProgress&&p.onUploadProgress(d,a,u);var s=Math.ceil(u*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(d){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var a="/api/users/".concat(w,"/video_auths.json");Object(ae.a)(a,{method:"put",body:{video_id:d.videoId}}).then(function(u){var s=u.data,f=s.UploadAuth;P.resumeUploadWithAuth(f)}).catch(function(u){console.log(u)})},onUploadEnd:function(d){p.onUploadEnd&&p.onUploadEnd(d),console.log("onUploadEnd: uploaded all the files")}}),p.gotUploader&&p.gotUploader(P)}function l(p,h,d){p&&(w=p),h&&(S=h),O(d)}},BU3w:function($e,We,z){"use strict";z.d(We,"a",function(){return S});var ae=z("MNnm"),Z="rc-util-key";function U(O){if(O.attachTo)return O.attachTo;var T=document.querySelector("head");return T||document.body}function w(O){var T,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ae.a)())return null;var p=document.createElement("style");if((T=l.csp)===null||T===void 0?void 0:T.nonce){var h;p.nonce=(h=l.csp)===null||h===void 0?void 0:h.nonce}p.innerHTML=O;var d=U(l),a=d.firstChild;return l.prepend&&d.prepend?d.prepend(p):l.prepend&&a?d.insertBefore(p,a):d.appendChild(p),p}var P=new Map;function S(O,T){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=U(l);if(!P.has(p)){var h=w("",l),d=h.parentNode;P.set(p,d),d.removeChild(h)}var a=Array.from(P.get(p).children).find(function(n){return n.tagName==="STYLE"&&n[Z]===T});if(a){var u,s;if(((u=l.csp)===null||u===void 0?void 0:u.nonce)&&a.nonce!==((s=l.csp)===null||s===void 0?void 0:s.nonce)){var f;a.nonce=(f=l.csp)===null||f===void 0?void 0:f.nonce}return a.innerHTML!==O&&(a.innerHTML=O),a}var i=w(O,l);return i[Z]=T,i}},Bd2K:function($e,We,z){(function(ae){ae(z("VrN/"),z("osHv"))})(function(ae){ae.defineOption("autoCloseTags",!1,function(l,p,h){if(h!=ae.Init&&h&&l.removeKeyMap("autoCloseTags"),!p)return;var d={name:"autoCloseTags"};(typeof p!="object"||p.whenClosing!==!1)&&(d["'/'"]=function(a){return S(a)}),(typeof p!="object"||p.whenOpening!==!1)&&(d["'>'"]=function(a){return w(a)}),l.addKeyMap(d)});var Z=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function w(l){if(l.getOption("disableInput"))return ae.Pass;for(var p=l.listSelections(),h=[],d=l.getOption("autoCloseTags"),a=0;au.ch&&(t=t.slice(0,t.length-s.end+u.ch));var _=t.toLowerCase();if(!t||s.type=="string"&&(s.end!=u.ch||!/[\"\']/.test(s.string.charAt(s.string.length-1))||s.string.length==1)||s.type=="tag"&&n.close||s.string.indexOf("/")==u.ch-s.start-1||y&&O(y,_)>-1||T(l,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(i)||[],t,u,!0))return ae.Pass;var b=typeof d=="object"&&d.emptyTags;if(b&&O(b,t)>-1){h[a]={text:"/>",newPos:ae.Pos(u.line,u.ch+2)};continue}var m=v&&O(v,_)>-1;h[a]={indent:m,text:">"+(m?` `:"")+"",newPos:m?ae.Pos(u.line+1,0):ae.Pos(u.line,u.ch+1)}}for(var g=typeof d=="object"&&d.dontIndentOnAutoClose,a=p.length-1;a>=0;a--){var E=h[a];l.replaceRange(E.text,p[a].head,p[a].anchor,"+insert");var o=l.listSelections().slice(0);o[a]={head:E.newPos,anchor:E.newPos},l.setSelections(o),!g&&E.indent&&(l.indentLine(E.newPos.line,null,!0),l.indentLine(E.newPos.line+1,null,!0))}}function P(l,p){for(var h=l.listSelections(),d=[],a=p?"/":""&&(y+=">"),d[f]=y}if(l.replaceSelections(d),h=l.listSelections(),!s)for(var f=0;f=0&&p[i]==h;i--)++f;d=s.to;for(var i=1;i0){for(var p=0;p1&&arguments[1]!==void 0?arguments[1]:"",p=[],h=0;h=0;p--){var h=U().key(p);l(w(h),h)}}function O(l){return U().removeItem(l)}function T(){return U().clear()}},DlQD:function($e,We,z){(function(ae,Z){$e.exports=Z()})(this,function(){"use strict";function ae(we,Ae){for(var Oe=0;Oewe.length)&&(Ae=we.length);for(var Oe=0,fe=new Array(Ae);Oe=we.length?{done:!0}:{done:!1,value:we[fe++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Oe=we[Symbol.iterator](),Oe.next.bind(Oe)}function S(we,Ae){return Ae={exports:{}},we(Ae,Ae.exports),Ae.exports}var O=S(function(we){function Ae(){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 Oe(fe){we.exports.defaults=fe}we.exports={defaults:Ae(),getDefaults:Ae,changeDefaults:Oe}}),T=O.defaults,l=O.getDefaults,p=O.changeDefaults,h=/[&<>"']/,d=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,u=/[<>"']|&(?!#?\w+;)/g,s={"&":"&","<":"<",">":">",'"':""","'":"'"},f=function(Ae){return s[Ae]};function i(we,Ae){if(Ae){if(h.test(we))return we.replace(d,f)}else if(a.test(we))return we.replace(u,f);return we}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function t(we){return we.replace(n,function(Ae,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var c=/(^|[^\[])\^/g;function y(we,Ae){we=we.source||we,Ae=Ae||"";var Oe={replace:function(ge,_e){return _e=_e.source||_e,_e=_e.replace(c,"$1"),we=we.replace(ge,_e),Oe},getRegex:function(){return new RegExp(we,Ae)}};return Oe}var v=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(we,Ae,Oe){if(we){var fe;try{fe=decodeURIComponent(t(Oe)).replace(v,"").toLowerCase()}catch(ge){return null}if(fe.indexOf("javascript:")===0||fe.indexOf("vbscript:")===0||fe.indexOf("data:")===0)return null}Ae&&!_.test(Oe)&&(Oe=x(Ae,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ge){return null}return Oe}var m={},g=/^[^:]+:\/*[^/]*$/,E=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function x(we,Ae){m[" "+we]||(g.test(we)?m[" "+we]=we+"/":m[" "+we]=I(we,"/",!0)),we=m[" "+we];var Oe=we.indexOf(":")===-1;return Ae.substring(0,2)==="//"?Oe?Ae:we.replace(E,"$1")+Ae:Ae.charAt(0)==="/"?Oe?Ae:we.replace(o,"$1")+Ae:we+Ae}var C={exec:function(){}};function A(we){for(var Ae=1,Oe,fe;Ae=0&&Ge[pt]==="\\";)qe=!qe;return qe?"|":" |"}),fe=Oe.split(/ \|/),ge=0;if(fe.length>Ae)fe.splice(Ae);else for(;fe.length=fe.length?ge.slice(fe.length):ge}).join(` `)}var oe=function(){function we(Oe){this.options=Oe||j}var Ae=we.prototype;return Ae.space=function(fe){var ge=this.rules.block.newline.exec(fe);if(ge)return ge[0].length>1?{type:"space",raw:ge[0]}:{raw:` `}},Ae.code=function(fe,ge){var _e=this.rules.block.code.exec(fe);if(_e){var be=ge[ge.length-1];if(be&&be.type==="paragraph")return{raw:_e[0],text:_e[0].trimRight()};var Ge=_e[0].replace(/^ {4}/gm,"");return{type:"code",raw:_e[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:G(Ge,` `)}}},Ae.fences=function(fe){var ge=this.rules.block.fences.exec(fe);if(ge){var _e=ge[0],be=ie(_e,ge[3]||"");return{type:"code",raw:_e,lang:ge[2]?ge[2].trim():ge[2],text:be}}},Ae.heading=function(fe){var ge=this.rules.block.heading.exec(fe);if(ge)return{type:"heading",raw:ge[0],depth:ge[1].length,text:ge[2]}},Ae.nptable=function(fe){var ge=this.rules.block.nptable.exec(fe);if(ge){var _e={type:"table",header:X(ge[1].replace(/^ *| *\| *$/g,"")),align:ge[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ge[3]?ge[3].replace(/\n$/,"").split(` `):[],raw:ge[0]};if(_e.header.length===_e.align.length){var be=_e.align.length,Ge;for(Ge=0;Ge ?/gm,"");return{type:"blockquote",raw:ge[0],text:_e}}},Ae.list=function(fe){var ge=this.rules.block.list.exec(fe);if(ge){for(var _e=ge[0],be=ge[2],Ge=be.length>1,qe=be[be.length-1]===")",pt={type:"list",raw:_e,ordered:Ge,start:Ge?+be.slice(0,-1):"",loose:!1,items:[]},Dt=ge[0].match(this.rules.block.item),jt=!1,Rt,Lt,lt,ft,Qe,Te,je,dt=Dt.length,Ze=0;Ze1||this.options.smartLists&<!==be)&&(ft=Dt.slice(Ze+1).join(` `),pt.raw=pt.raw.substring(0,pt.raw.length-ft.length),Ze=dt-1)),Qe=jt||/\n\n(?!\s*$)/.test(Rt),Ze!==dt-1&&(jt=Rt.charAt(Rt.length-1)===` `,Qe||(Qe=jt)),Qe&&(pt.loose=!0),Te=/^\[[ xX]\] /.test(Rt),je=void 0,Te&&(je=Rt[1]!==" ",Rt=Rt.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:_e,task:Te,checked:je,loose:Qe,text:Rt});return pt}},Ae.html=function(fe){var ge=this.rules.block.html.exec(fe);if(ge)return{type:this.options.sanitize?"paragraph":"html",raw:ge[0],pre:!this.options.sanitizer&&(ge[1]==="pre"||ge[1]==="script"||ge[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ge[0]):J(ge[0]):ge[0]}},Ae.def=function(fe){var ge=this.rules.block.def.exec(fe);if(ge){ge[3]&&(ge[3]=ge[3].substring(1,ge[3].length-1));var _e=ge[1].toLowerCase().replace(/\s+/g," ");return{tag:_e,raw:ge[0],href:ge[2],title:ge[3]}}},Ae.table=function(fe){var ge=this.rules.block.table.exec(fe);if(ge){var _e={type:"table",header:X(ge[1].replace(/^ *| *\| *$/g,"")),align:ge[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ge[3]?ge[3].replace(/\n$/,"").split(` `):[]};if(_e.header.length===_e.align.length){_e.raw=ge[0];var be=_e.align.length,Ge;for(Ge=0;Ge/i.test(be[0])&&(ge=!1),!_e&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?_e=!0:_e&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(_e=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:ge,inRawBlock:_e,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]}},Ae.link=function(fe){var ge=this.rules.inline.link.exec(fe);if(ge){var _e=B(ge[2],"()");if(_e>-1){var be=ge[0].indexOf("!")===0?5:4,Ge=be+ge[1].length+_e;ge[2]=ge[2].substring(0,_e),ge[0]=ge[0].substring(0,Ge).trim(),ge[3]=""}var qe=ge[2],pt="";if(this.options.pedantic){var Dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(qe);Dt?(qe=Dt[1],pt=Dt[3]):pt=""}else pt=ge[3]?ge[3].slice(1,-1):"";qe=qe.trim().replace(/^<([\s\S]*)>$/,"$1");var jt=Q(ge,{href:qe&&qe.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},ge[0]);return jt}},Ae.reflink=function(fe,ge){var _e;if((_e=this.rules.inline.reflink.exec(fe))||(_e=this.rules.inline.nolink.exec(fe))){var be=(_e[2]||_e[1]).replace(/\s+/g," ");if(be=ge[be.toLowerCase()],!be||!be.href){var Ge=_e[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var qe=Q(_e,be,_e[0]);return qe}},Ae.strong=function(fe,ge,_e){_e===void 0&&(_e="");var be=this.rules.inline.strong.start.exec(fe);if(be&&(!be[1]||be[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ge=ge.slice(-1*fe.length);var Ge=be[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ge))!=null;)if(qe=this.rules.inline.strong.middle.exec(ge.slice(0,be.index+3)),qe)return{type:"strong",raw:fe.slice(0,qe[0].length),text:fe.slice(2,qe[0].length-2)}}},Ae.em=function(fe,ge,_e){_e===void 0&&(_e="");var be=this.rules.inline.em.start.exec(fe);if(be&&(!be[1]||be[1]&&(_e===""||this.rules.inline.punctuation.exec(_e)))){ge=ge.slice(-1*fe.length);var Ge=be[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var qe;(be=Ge.exec(ge))!=null;)if(qe=this.rules.inline.em.middle.exec(ge.slice(0,be.index+2)),qe)return{type:"em",raw:fe.slice(0,qe[0].length),text:fe.slice(1,qe[0].length-1)}}},Ae.codespan=function(fe){var ge=this.rules.inline.code.exec(fe);if(ge){var _e=ge[2].replace(/\n/g," "),be=/[^ ]/.test(_e),Ge=_e.startsWith(" ")&&_e.endsWith(" ");return be&&Ge&&(_e=_e.substring(1,_e.length-1)),_e=J(_e,!0),{type:"codespan",raw:ge[0],text:_e}}},Ae.br=function(fe){var ge=this.rules.inline.br.exec(fe);if(ge)return{type:"br",raw:ge[0]}},Ae.del=function(fe){var ge=this.rules.inline.del.exec(fe);if(ge)return{type:"del",raw:ge[0],text:ge[1]}},Ae.autolink=function(fe,ge){var _e=this.rules.inline.autolink.exec(fe);if(_e){var be,Ge;return _e[2]==="@"?(be=J(this.options.mangle?ge(_e[1]):_e[1]),Ge="mailto:"+be):(be=J(_e[1]),Ge=be),{type:"link",raw:_e[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},Ae.url=function(fe,ge){var _e;if(_e=this.rules.inline.url.exec(fe)){var be,Ge;if(_e[2]==="@")be=J(this.options.mangle?ge(_e[0]):_e[0]),Ge="mailto:"+be;else{var qe;do qe=_e[0],_e[0]=this.rules.inline._backpedal.exec(_e[0])[0];while(qe!==_e[0]);be=J(_e[0]),_e[1]==="www."?Ge="http://"+be:Ge=be}return{type:"link",raw:_e[0],text:be,href:Ge,tokens:[{type:"text",raw:be,text:be}]}}},Ae.inlineText=function(fe,ge,_e){var be=this.rules.inline.text.exec(fe);if(be){var Ge;return ge?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):J(be[0]):be[0]:Ge=J(this.options.smartypants?_e(be[0]):be[0]),{type:"text",raw:be[0],text:Ge}}},we}(),Ee=te.noopTest,ye=te.edit,Le=te.merge,pe={newline:/^\n+/,code:/^( {4}[^\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}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:Ee,table:Ee,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=ye(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=ye(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=ye(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._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",pe._comment=//,pe.html=ye(pe.html,"i").replace("comment",pe._comment).replace("tag",pe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe.paragraph=ye(pe._paragraph).replace("hr",pe.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",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.blockquote=ye(pe.blockquote).replace("paragraph",pe.paragraph).getRegex(),pe.normal=Le({},pe),pe.gfm=Le({},pe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),pe.gfm.nptable=ye(pe.gfm.nptable).replace("hr",pe.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",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.gfm.table=ye(pe.gfm.table).replace("hr",pe.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",")|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.pedantic=Le({},pe.normal,{html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pe._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:Ee,paragraph:ye(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",pe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Ce={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ee,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ee,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Ce.punctuation=ye(Ce.punctuation).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Ce._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Ce.em.start=ye(Ce.em.start).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.em.middle=ye(Ce.em.middle).replace(/punctuation/g,Ce._punctuation).replace(/overlapSkip/g,Ce._overlapSkip).getRegex(),Ce.em.endAst=ye(Ce.em.endAst,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.em.endUnd=ye(Ce.em.endUnd,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.start=ye(Ce.strong.start).replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.middle=ye(Ce.strong.middle).replace(/punctuation/g,Ce._punctuation).replace(/blockSkip/g,Ce._blockSkip).getRegex(),Ce.strong.endAst=ye(Ce.strong.endAst,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.strong.endUnd=ye(Ce.strong.endUnd,"g").replace(/punctuation/g,Ce._punctuation).getRegex(),Ce.blockSkip=ye(Ce._blockSkip,"g").getRegex(),Ce.overlapSkip=ye(Ce._overlapSkip,"g").getRegex(),Ce._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ce._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ce._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])?)+(?![-_])/,Ce.autolink=ye(Ce.autolink).replace("scheme",Ce._scheme).replace("email",Ce._email).getRegex(),Ce._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ce.tag=ye(Ce.tag).replace("comment",pe._comment).replace("attribute",Ce._attribute).getRegex(),Ce._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ce._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Ce._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ce.link=ye(Ce.link).replace("label",Ce._label).replace("href",Ce._href).replace("title",Ce._title).getRegex(),Ce.reflink=ye(Ce.reflink).replace("label",Ce._label).getRegex(),Ce.reflinkSearch=ye(Ce.reflinkSearch,"g").replace("reflink",Ce.reflink).replace("nolink",Ce.nolink).getRegex(),Ce.normal=Le({},Ce),Ce.pedantic=Le({},Ce.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:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",Ce._label).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ce._label).getRegex()}),Ce.gfm=Le({},Ce.normal,{escape:ye(Ce.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)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(fe="x"+fe.toString(16)),Ae+="&#"+fe+";";return Ae}var Ie=function(){function we(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||Pe,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var fe={block:ke.normal,inline:Ne.normal};this.options.pedantic?(fe.block=ke.pedantic,fe.inline=Ne.pedantic):this.options.gfm&&(fe.block=ke.gfm,this.options.breaks?fe.inline=Ne.breaks:fe.inline=Ne.gfm),this.tokenizer.rules=fe}we.lex=function(fe,ge){var _e=new we(ge);return _e.lex(fe)};var Ae=we.prototype;return Ae.lex=function(fe){return fe=fe.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(fe,this.tokens,!0),this.inline(this.tokens),this.tokens},Ae.blockTokens=function(fe,ge,_e){ge===void 0&&(ge=[]),_e===void 0&&(_e=!0),fe=fe.replace(/^ +$/gm,"");for(var be,Ge,qe,pt;fe;){if(be=this.tokenizer.space(fe)){fe=fe.substring(be.raw.length),be.type&&ge.push(be);continue}if(be=this.tokenizer.code(fe,ge)){fe=fe.substring(be.raw.length),be.type?ge.push(be):(pt=ge[ge.length-1],pt.raw+=` `+be.raw,pt.text+=` `+be.text);continue}if(be=this.tokenizer.fences(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.heading(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.nptable(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.hr(fe)){fe=fe.substring(be.raw.length),ge.push(be);continue}if(be=this.tokenizer.blockquote(fe)){fe=fe.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],_e),ge.push(be);continue}if(be=this.tokenizer.list(fe)){for(fe=fe.substring(be.raw.length),qe=be.items.length,Ge=0;Ge0)for(;(Dt=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)jt.includes(Dt[0].slice(Dt[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Dt=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Dt.index)+"["+"a".repeat(Dt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;fe;){if(qe=this.tokenizer.escape(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.tag(fe,_e,be)){fe=fe.substring(qe.raw.length),_e=qe.inLink,be=qe.inRawBlock,ge.push(qe);continue}if(qe=this.tokenizer.link(fe)){fe=fe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ge.push(qe);continue}if(qe=this.tokenizer.reflink(fe,this.tokens.links)){fe=fe.substring(qe.raw.length),qe.type==="link"&&(qe.tokens=this.inlineTokens(qe.text,[],!0,be)),ge.push(qe);continue}if(qe=this.tokenizer.strong(fe,pt,Ge)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.em(fe,pt,Ge)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.codespan(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.br(fe)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.del(fe)){fe=fe.substring(qe.raw.length),qe.tokens=this.inlineTokens(qe.text,[],_e,be),ge.push(qe);continue}if(qe=this.tokenizer.autolink(fe,ue)){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(!_e&&(qe=this.tokenizer.url(fe,ue))){fe=fe.substring(qe.raw.length),ge.push(qe);continue}if(qe=this.tokenizer.inlineText(fe,be,he)){fe=fe.substring(qe.raw.length),Ge=qe.raw.slice(-1),ge.push(qe);continue}if(fe){var Rt="Infinite loop on byte: "+fe.charCodeAt(0);if(this.options.silent){console.error(Rt);break}else throw new Error(Rt)}}return ge},Z(we,null,[{key:"rules",get:function(){return{block:ke,inline:Ne}}}]),we}(),Ue=O.defaults,Ye=te.cleanUrl,ee=te.escape,M=function(){function we(Oe){this.options=Oe||Ue}var Ae=we.prototype;return Ae.code=function(fe,ge,_e){var be=(ge||"").match(/\S*/)[0];if(this.options.highlight){var Ge=this.options.highlight(fe,be);Ge!=null&&Ge!==fe&&(_e=!0,fe=Ge)}return be?'
    '+(_e?fe:ee(fe,!0))+`
    `:"
    "+(_e?fe:ee(fe,!0))+`
    `},Ae.blockquote=function(fe){return`
    `+fe+`
    `},Ae.html=function(fe){return fe},Ae.heading=function(fe,ge,_e,be){return this.options.headerIds?"'+fe+" `:""+fe+" `},Ae.hr=function(){return this.options.xhtml?`
    `:`
    `},Ae.list=function(fe,ge,_e){var be=ge?"ol":"ul",Ge=ge&&_e!==1?' start="'+_e+'"':"";return"<"+be+Ge+`> `+fe+" `},Ae.listitem=function(fe){return"
  • "+fe+`
  • `},Ae.checkbox=function(fe){return" "},Ae.paragraph=function(fe){return"

    "+fe+`

    `},Ae.table=function(fe,ge){return ge&&(ge=""+ge+""),` `+fe+` `+ge+`
    `},Ae.tablerow=function(fe){return` `+fe+` `},Ae.tablecell=function(fe,ge){var _e=ge.header?"th":"td",be=ge.align?"<"+_e+' align="'+ge.align+'">':"<"+_e+">";return be+fe+" `},Ae.strong=function(fe){return""+fe+""},Ae.em=function(fe){return""+fe+""},Ae.codespan=function(fe){return""+fe+""},Ae.br=function(){return this.options.xhtml?"
    ":"
    "},Ae.del=function(fe){return""+fe+""},Ae.link=function(fe,ge,_e){if(fe=Ye(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var be='",be},Ae.image=function(fe,ge,_e){if(fe=Ye(this.options.sanitize,this.options.baseUrl,fe),fe===null)return _e;var be=''+_e+'":">",be},Ae.text=function(fe){return fe},we}(),N=function(){function we(){}var Ae=we.prototype;return Ae.strong=function(fe){return fe},Ae.em=function(fe){return fe},Ae.codespan=function(fe){return fe},Ae.del=function(fe){return fe},Ae.html=function(fe){return fe},Ae.text=function(fe){return fe},Ae.link=function(fe,ge,_e){return""+_e},Ae.image=function(fe,ge,_e){return""+_e},Ae.br=function(){return""},we}(),$=function(){function we(){this.seen={}}var Ae=we.prototype;return Ae.slug=function(fe){var ge=fe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ge)){var _e=ge;do this.seen[_e]++,ge=_e+"-"+this.seen[_e];while(this.seen.hasOwnProperty(ge))}return this.seen[ge]=0,ge},we}(),V=O.defaults,Y=te.unescape,me=function(){function we(Oe){this.options=Oe||V,this.options.renderer=this.options.renderer||new M,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new N,this.slugger=new $}we.parse=function(fe,ge){var _e=new we(ge);return _e.parse(fe)};var Ae=we.prototype;return Ae.parse=function(fe,ge){ge===void 0&&(ge=!0);var _e="",be,Ge,qe,pt,Dt,jt,Rt,Lt,lt,ft,Qe,Te,je,dt,Ze,Tt,Ct,ot,gt=fe.length;for(be=0;be0&&Ze.tokens[0].type==="text"?(Ze.tokens[0].text=ot+" "+Ze.tokens[0].text,Ze.tokens[0].tokens&&Ze.tokens[0].tokens.length>0&&Ze.tokens[0].tokens[0].type==="text"&&(Ze.tokens[0].tokens[0].text=ot+" "+Ze.tokens[0].tokens[0].text)):Ze.tokens.unshift({type:"text",text:ot}):dt+=ot),dt+=this.parse(Ze.tokens,je),lt+=this.renderer.listitem(dt,Ct,Tt);_e+=this.renderer.list(lt,Qe,Te);continue}case"html":{_e+=this.renderer.html(ft.text);continue}case"paragraph":{_e+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(lt=ft.tokens?this.parseInline(ft.tokens):ft.text;be+1An error occurred:

    "+De(qe.message+"",!0)+"
    ";throw qe}}Ve.options=Ve.setOptions=function(we){return Re(Ve.defaults,we),Xe(Ve.defaults),Ve},Ve.getDefaults=Me,Ve.defaults=tt,Ve.use=function(we){var Ae=Re({},we);if(we.renderer&&function(){var fe=Ve.defaults.renderer||new M,ge=function(Ge){var qe=fe[Ge];fe[Ge]=function(){for(var pt=arguments.length,Dt=new Array(pt),jt=0;jt=0;a--){if(!U(d[a]))continue;var u=d[a].split("="),s=unescape(u[0]),f=unescape(u[1]);h(f,s)}}function O(h,d){if(!h)return;w.cookie=escape(h)+"="+escape(d)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function T(h){if(!h||!p(h))return;w.cookie=escape(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function l(){S(function(h,d){T(d)})}function p(h){return new RegExp("(?:^|;\\s*)"+escape(h).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(w.cookie)}},E2g8:function($e,We,z){(function(ae,Z){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version v4.2.8+1e68dce6 */(function(U,w){$e.exports=w()})(this,function(){"use strict";function U(M){var N=typeof M;return M!==null&&(N==="object"||N==="function")}function w(M){return typeof M=="function"}var P=void 0;Array.isArray?P=Array.isArray:P=function(M){return Object.prototype.toString.call(M)==="[object Array]"};var S=P,O=0,T=void 0,l=void 0,p=function(N,$){_[O]=N,_[O+1]=$,O+=2,O===2&&(l?l(b):g())};function h(M){l=M}function d(M){p=M}var a=typeof window!="undefined"?window:void 0,u=a||{},s=u.MutationObserver||u.WebKitMutationObserver,f=typeof self=="undefined"&&typeof ae!="undefined"&&{}.toString.call(ae)==="[object process]",i=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function n(){return function(){return ae.nextTick(b)}}function t(){return typeof T!="undefined"?function(){T(b)}:v()}function c(){var M=0,N=new s(b),$=document.createTextNode("");return N.observe($,{characterData:!0}),function(){$.data=M=++M%2}}function y(){var M=new MessageChannel;return M.port1.onmessage=b,function(){return M.port2.postMessage(0)}}function v(){var M=setTimeout;return function(){return M(b,1)}}var _=new Array(1e3);function b(){for(var M=0;M`,triples:"",explode:"[]{}"},U=ae.Pos;ae.defineOption("autoCloseBrackets",!1,function(s,f,i){i&&i!=ae.Init&&(s.removeKeyMap(P),s.state.closeBrackets=null),f&&(S(w(f,"pairs")),s.state.closeBrackets=f,s.addKeyMap(P))});function w(s,f){return f=="pairs"&&typeof s=="string"?s:typeof s=="object"&&s[f]!=null?s[f]:Z[f]}var P={Backspace:l,Enter:p};function S(s){for(var f=0;f=0;t--){var y=n[t].head;s.replaceRange("",U(y.line,y.ch-1),U(y.line,y.ch+1),"+delete")}}function p(s){var f=T(s),i=f&&w(f,"explode");if(!i||s.getOption("disableInput"))return ae.Pass;for(var n=s.listSelections(),t=0;t0;return{anchor:new U(s.anchor.line,s.anchor.ch+(f?-1:1)),head:new U(s.head.line,s.head.ch+(f?1:-1))}}function d(s,f){var i=T(s);if(!i||s.getOption("disableInput"))return ae.Pass;var n=w(i,"pairs"),t=n.indexOf(f);if(t==-1)return ae.Pass;for(var c=w(i,"closeBefore"),y=w(i,"triples"),v=n.charAt(t+1)==f,_=s.listSelections(),b=t%2==0,m,g=0;g<_.length;g++){var E=_[g],o=E.head,x,C=s.getRange(o,U(o.line,o.ch+1));if(b&&!E.empty())x="surround";else if((v||!b)&&C==f)v&&u(s,o)?x="both":y.indexOf(f)>=0&&s.getRange(o,U(o.line,o.ch+3))==f+f+f?x="skipThree":x="skip";else if(v&&o.ch>1&&y.indexOf(f)>=0&&s.getRange(U(o.line,o.ch-2),o)==f+f){if(o.ch>2&&/\bstring/.test(s.getTokenTypeAt(U(o.line,o.ch-2))))return ae.Pass;x="addFour"}else if(v){var A=o.ch==0?" ":s.getRange(U(o.line,o.ch-1),o);if(!ae.isWordChar(C)&&A!=f&&!ae.isWordChar(A))x="both";else return ae.Pass}else if(b&&(C.length===0||/\s/.test(C)||c.indexOf(C)>-1))x="both";else return ae.Pass;if(!m)m=x;else if(m!=x)return ae.Pass}var D=t%2?n.charAt(t-1):f,I=t%2?f:n.charAt(t+1);s.operation(function(){if(m=="skip")s.execCommand("goCharRight");else if(m=="skipThree")for(var F=0;F<3;F++)s.execCommand("goCharRight");else if(m=="surround"){for(var H=s.getSelections(),F=0;F ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","error",ne),!Se.ENABLE_ERROR)return;console.error?console.error(ne):console.warn?console.warn(ne):console.log(ne)}},{key:"i",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","info",ne),!Se.ENABLE_INFO)return;console.info?console.info(ne):console.log(ne)}},{key:"w",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","warn",ne),!Se.ENABLE_WARN)return;console.warn?console.warn(ne):console.log(ne)}},{key:"d",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","debug",ne),!Se.ENABLE_DEBUG)return;console.debug?console.debug(ne):console.log(ne)}},{key:"v",value:function(W,q){(!W||Se.FORCE_GLOBAL_TAG)&&(W=Se.GLOBAL_TAG);var ne="[".concat(W,"] > ").concat(q);if(Se.ENABLE_CALLBACK&&Se.emitter.emit("log","verbose",ne),!Se.ENABLE_VERBOSE)return;console.log(ne)}}]),Se}();O.GLOBAL_TAG="flv.js",O.FORCE_GLOBAL_TAG=!1,O.ENABLE_ERROR=!0,O.ENABLE_INFO=!0,O.ENABLE_WARN=!0,O.ENABLE_DEBUG=!0,O.ENABLE_VERBOSE=!0,O.ENABLE_CALLBACK=!1,O.emitter=new S.a;var T=O,l=function(){function Se(){Object(ae.a)(this,Se),this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return Object(Z.a)(Se,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(W){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=W,this._totalBytes+=W):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=W,this._totalBytes+=W):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=W,this._totalBytes+=W,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var W=(this._now()-this._lastCheckpoint)/1e3;return W==0&&(W=1),this._intervalBytes/W/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var W=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/W/1024}}]),Se}(),p=l,h=z("yKVA"),d=z("879j"),a=function(){function Se(de){Object(ae.a)(this,Se),this._message=de}return Object(Z.a)(Se,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),Se}(),u=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"IllegalStateException"}}]),W}(a),s=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"InvalidArgumentException"}}]),W}(a),f=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q){return Object(ae.a)(this,W),de.call(this,q)}return Object(Z.a)(W,[{key:"name",get:function(){return"NotImplementedException"}}]),W}(a),i={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},n={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},t=function(){function Se(de){Object(ae.a)(this,Se),this._type=de||"undefined",this._status=i.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._status=i.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===i.kConnecting||this._status===i.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(W){this._onContentLengthKnown=W}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(W){this._onURLRedirect=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"open",value:function(W,q){throw new f("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new f("Unimplemented abstract function!")}}]),Se}(),c=z("oZsa");function y(Se,de){for(;!Object.prototype.hasOwnProperty.call(Se,de)&&!(Se=Object(c.a)(Se),Se===null););return Se}function v(Se,de,W){return typeof Reflect!="undefined"&&Reflect.get?v=Reflect.get:v=function(ne,se,xe){var He=y(ne,se);if(!He)return;var Je=Object.getOwnPropertyDescriptor(He,se);return Je.get?Je.get.call(xe):Je.value},v(Se,de,W||Se)}var _={};function b(){var Se=self.navigator.userAgent.toLowerCase(),de=/(edge)\/([\w.]+)/.exec(Se)||/(opr)[\/]([\w.]+)/.exec(Se)||/(chrome)[ \/]([\w.]+)/.exec(Se)||/(iemobile)[\/]([\w.]+)/.exec(Se)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Se)||/(webkit)[ \/]([\w.]+)/.exec(Se)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Se)||/(msie) ([\w.]+)/.exec(Se)||Se.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Se)||Se.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Se)||[],W=/(ipad)/.exec(Se)||/(ipod)/.exec(Se)||/(windows phone)/.exec(Se)||/(iphone)/.exec(Se)||/(kindle)/.exec(Se)||/(android)/.exec(Se)||/(windows)/.exec(Se)||/(mac)/.exec(Se)||/(linux)/.exec(Se)||/(cros)/.exec(Se)||[],q={browser:de[5]||de[3]||de[1]||"",version:de[2]||de[4]||"0",majorVersion:de[4]||de[2]||"0",platform:W[0]||""},ne={};if(q.browser){ne[q.browser]=!0;var se=q.majorVersion.split(".");ne.version={major:parseInt(q.majorVersion,10),string:q.version},se.length>1&&(ne.version.minor=parseInt(se[1],10)),se.length>2&&(ne.version.build=parseInt(se[2],10))}if(q.platform&&(ne[q.platform]=!0),(ne.chrome||ne.opr||ne.safari)&&(ne.webkit=!0),ne.rv||ne.iemobile){ne.rv&&delete ne.rv;var xe="msie";q.browser=xe,ne[xe]=!0}if(ne.edge){delete ne.edge;var He="msedge";q.browser=He,ne[He]=!0}if(ne.opr){var Je="opera";q.browser=Je,ne[Je]=!0}if(ne.safari&&ne.android){var Et="android";q.browser=Et,ne[Et]=!0}ne.name=q.browser,ne.platform=q.platform;for(var St in _)_.hasOwnProperty(St)&&delete _[St];Object.assign(_,ne)}b();var m=_,g=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"fetch-stream-loader"),se.TAG="FetchStreamLoader",se._seekHandler=q,se._config=ne,se._needStash=!0,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){var xe=this;this._dataSource=ne,this._range=se;var He=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(He=ne.redirectedURL);var Je=this._seekHandler.getConfig(He,se),Et=new self.Headers;if(typeof Je.headers=="object"){var St=Je.headers;for(var nt in St)St.hasOwnProperty(nt)&&Et.append(nt,St[nt])}var xt={method:"GET",headers:Et,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var ut in this._config.headers)Et.append(ut,this._config.headers[ut]);ne.cors===!1&&(xt.mode="same-origin"),ne.withCredentials&&(xt.credentials="include"),ne.referrerPolicy&&(xt.referrerPolicy=ne.referrerPolicy),this._status=i.kConnecting,self.fetch(Je.url,xt).then(function(_t){if(xe._requestAbort){xe._requestAbort=!1,xe._status=i.kIdle;return}if(_t.ok&&_t.status>=200&&_t.status<=299){if(_t.url!==Je.url&&xe._onURLRedirect){var Qt=xe._seekHandler.removeURLParameters(_t.url);xe._onURLRedirect(Qt)}var Xt=_t.headers.get("Content-Length");return Xt!=null&&(xe._contentLength=parseInt(Xt),xe._contentLength!==0&&(xe._onContentLengthKnown&&xe._onContentLengthKnown(xe._contentLength))),xe._pump.call(xe,_t.body.getReader())}else if(xe._status=i.kError,xe._onError)xe._onError(n.HTTP_STATUS_CODE_INVALID,{code:_t.status,msg:_t.statusText});else throw new a("FetchStreamLoader: Http code invalid, "+_t.status+" "+_t.statusText)}).catch(function(_t){if(xe._status=i.kError,xe._onError)xe._onError(n.EXCEPTION,{code:-1,msg:_t.message});else throw _t})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(ne){var se=this;return ne.read().then(function(xe){if(xe.done)if(se._contentLength!==null&&se._receivedLength=15048,se=m.msedge?ne:!0;return self.fetch&&self.ReadableStream&&se}catch(xe){return!1}}}]),W}(t),E=g,o=function(Se){Object(h.a)(W,Se);var de=Object(d.a)(W);function W(q,ne){var se;return Object(ae.a)(this,W),se=de.call(this,"xhr-moz-chunked-loader"),se.TAG="MozChunkedLoader",se._seekHandler=q,se._config=ne,se._needStash=!0,se._xhr=null,se._requestAbort=!1,se._contentLength=null,se._receivedLength=0,se}return Object(Z.a)(W,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),v(Object(c.a)(W.prototype),"destroy",this).call(this)}},{key:"open",value:function(ne,se){this._dataSource=ne,this._range=se;var xe=ne.url;this._config.reuseRedirectedURL&&ne.redirectedURL!=null&&(xe=ne.redirectedURL);var He=this._seekHandler.getConfig(xe,se);this._requestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="moz-chunked-arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onloadend=this._onLoadEnd.bind(this),Je.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var Et=He.headers;for(var St in Et)Et.hasOwnProperty(St)&&Je.setRequestHeader(St,Et[St])}if(typeof this._config.headers=="object"){var nt=this._config.headers;for(var xt in nt)nt.hasOwnProperty(xt)&&Je.setRequestHeader(xt,nt[xt])}this._status=i.kConnecting,Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=i.kComplete}},{key:"_onReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null&&se.responseURL!==this._requestURL&&this._onURLRedirect){var xe=this._seekHandler.removeURLParameters(se.responseURL);this._onURLRedirect(xe)}if(se.status!==0&&(se.status<200||se.status>299))if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MozChunkedLoader: Http code invalid, "+se.status+" "+se.statusText);else this._status=i.kBuffering}}},{key:"_onProgress",value:function(ne){if(this._status===i.kError)return;this._contentLength===null&&(ne.total!==null&&ne.total!==0&&(this._contentLength=ne.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var se=ne.target.response,xe=this._range.from+this._receivedLength;this._receivedLength+=se.byteLength,this._onDataArrival&&this._onDataArrival(se,xe,this._receivedLength)}},{key:"_onLoadEnd",value:function(ne){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===i.kError)return;this._status=i.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(ne){this._status=i.kError;var se=0,xe=null;if(this._contentLength&&ne.loaded=200&&se.status<=299){if(this._status=i.kBuffering,se.responseURL!=null){var xe=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&xe!==this._currentRedirectedURL&&(this._currentRedirectedURL=xe,this._onURLRedirect&&this._onURLRedirect(xe))}var He=se.getResponseHeader("Content-Length");if(He!=null&&this._contentLength==null){var Je=parseInt(He);Je>0&&(this._contentLength=Je,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("MSStreamLoader: Http code invalid, "+se.status+" "+se.statusText);else if(se.readyState===3&&(se.status>=200&&se.status<=299)){this._status=i.kBuffering;var Et=se.response;this._reader.readAsArrayBuffer(Et)}}},{key:"_xhrOnError",value:function(ne){this._status=i.kError;var se=n.EXCEPTION,xe={code:-1,msg:ne.constructor.name+" "+ne.type};if(this._onError)this._onError(se,xe);else throw new a(xe.msg)}},{key:"_msrOnProgress",value:function(ne){var se=ne.target,xe=se.result;if(xe==null){this._doReconnectIfNeeded();return}var He=xe.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=xe.byteLength;var Je=this._totalRange.from+this._receivedLength;this._receivedLength+=He.byteLength,this._onDataArrival&&this._onDataArrival(He,Je,this._receivedLength),xe.byteLength>=this._bufferLimit&&(T.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Je+He.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength=this._contentLength&&(xe=this._range.from+this._contentLength-1)),this._currentRequestRange={from:se,to:xe},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(ne,se){this._lastTimeLoaded=0;var xe=ne.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?xe=this._currentRedirectedURL:ne.redirectedURL!=null&&(xe=ne.redirectedURL));var He=this._seekHandler.getConfig(xe,se);this._currentRequestURL=He.url;var Je=this._xhr=new XMLHttpRequest;if(Je.open("GET",He.url,!0),Je.responseType="arraybuffer",Je.onreadystatechange=this._onReadyStateChange.bind(this),Je.onprogress=this._onProgress.bind(this),Je.onload=this._onLoad.bind(this),Je.onerror=this._onXhrError.bind(this),ne.withCredentials&&(Je.withCredentials=!0),typeof He.headers=="object"){var Et=He.headers;for(var St in Et)Et.hasOwnProperty(St)&&Je.setRequestHeader(St,Et[St])}if(typeof this._config.headers=="object"){var nt=this._config.headers;for(var xt in nt)nt.hasOwnProperty(xt)&&Je.setRequestHeader(xt,nt[xt])}Je.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=i.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(ne){var se=ne.target;if(se.readyState===2){if(se.responseURL!=null){var xe=this._seekHandler.removeURLParameters(se.responseURL);se.responseURL!==this._currentRequestURL&&xe!==this._currentRedirectedURL&&(this._currentRedirectedURL=xe,this._onURLRedirect&&this._onURLRedirect(xe))}if(se.status>=200&&se.status<=299){if(this._waitForTotalLength)return;this._status=i.kBuffering}else if(this._status=i.kError,this._onError)this._onError(n.HTTP_STATUS_CODE_INVALID,{code:se.status,msg:se.statusText});else throw new a("RangeLoader: Http code invalid, "+se.status+" "+se.statusText)}}},{key:"_onProgress",value:function(ne){if(this._status===i.kError)return;if(this._contentLength===null){var se=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,se=!0;var xe=ne.total;this._internalAbort(),xe!=null&xe!==0&&(this._totalLength=xe)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,se){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var He=ne.loaded-this._lastTimeLoaded;this._lastTimeLoaded=ne.loaded,this._speedSampler.addBytes(He)}},{key:"_normalizeSpeed",value:function(ne){var se=this._chunkSizeKBList,xe=se.length-1,He=0,Je=0,Et=xe;if(ne=se[He]&&ne=3&&(se=this._speedSampler.currentKBps)),se!==0){var xe=this._normalizeSpeed(se);this._currentSpeedNormalized!==xe&&(this._currentSpeedNormalized=xe,this._currentChunkSizeKB=xe)}var He=ne.target.response,Je=this._range.from+this._receivedLength;this._receivedLength+=He.byteLength;var Et=!1;this._contentLength!=null&&this._receivedLength0&&this._receivedLength0)for(var He=ne.split("&"),Je=0;Je0;Et[0]!==this._startName&&Et[0]!==this._endName&&(St&&(xe+="&"),xe+=He[Je])}return xe.length===0?q:q+"?"+xe}}]),Se}(),X=G,J=function(){function Se(de,W,q){Object(ae.a)(this,Se),this.TAG="IOController",this._config=W,this._extraData=q,this._stashInitialSize=1024*384,W.stashInitialSize!=null&&W.stashInitialSize>0&&(this._stashInitialSize=W.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,W.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=de,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(de.url),this._refTotalLength=de.filesize?de.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new p,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(W){this._extraData=W}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(W){this._onDataArrival=W}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(W){this._onSeeked=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onComplete",get:function(){return this._onComplete},set:function(W){this._onComplete=W}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(W){this._onRedirect=W}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(W){this._onRecoveredEarlyEof=W}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===I?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var W=this._config;if(W.seekType==="range")this._seekHandler=new j(this._config.rangeLoadZeroStart);else if(W.seekType==="param"){var q=W.seekParamStart||"bstart",ne=W.seekParamEnd||"bend";this._seekHandler=new X(q,ne)}else if(W.seekType==="custom"){if(typeof W.customSeekHandler!="function")throw new s("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new W.customSeekHandler}else throw new s("Invalid seekType in config: ".concat(W.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=H;else if(E.isSupported())this._loaderClass=E;else if(x.isSupported())this._loaderClass=x;else if(I.isSupported())this._loaderClass=I;else throw new a("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(W){this._currentRange={from:0,to:-1},W&&(this._currentRange.from=W),this._speedSampler.reset(),W||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var W=this._resumeFrom;this._resumeFrom=0,this._internalSeek(W,!0)}}},{key:"seek",value:function(W){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(W,!0)}},{key:"_internalSeek",value:function(W,q){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(q),this._loader.destroy(),this._loader=null;var ne={from:W,to:-1};this._currentRange={from:ne.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,ne),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(W){if(!W||typeof W!="string"||W.length===0)throw new s("Url must be a non-empty string!");this._dataSource.url=W}},{key:"_expandBuffer",value:function(W){for(var q=this._stashSize;q+1024*1024*10){var se=new Uint8Array(this._stashBuffer,0,this._stashUsed),xe=new Uint8Array(ne,0,q);xe.set(se,0)}this._stashBuffer=ne,this._bufferSize=q}},{key:"_normalizeSpeed",value:function(W){var q=this._speedNormalizeList,ne=q.length-1,se=0,xe=0,He=ne;if(W=q[se]&&W=512&&W<=1024?q=Math.floor(W*1.5):q=W*2,q>8192&&(q=8192);var ne=q*1024+1024*1024*1;this._bufferSize0){var Qt=this._stashBuffer.slice(0,this._stashUsed),Xt=this._dispatchChunks(Qt,this._stashByteStart);if(Xt0){var Mt=new Uint8Array(Qt,Xt);_t.set(Mt,0),this._stashUsed=Mt.byteLength,this._stashByteStart+=Xt}}else this._stashUsed=0,this._stashByteStart+=Xt;this._stashUsed+W.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+W.byteLength),_t=new Uint8Array(this._stashBuffer,0,this._bufferSize)),_t.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength}else{var mt=this._dispatchChunks(W,q);if(mtthis._bufferSize&&(this._expandBuffer(Cn),_t=new Uint8Array(this._stashBuffer,0,this._bufferSize)),_t.set(new Uint8Array(W,mt),0),this._stashUsed+=Cn,this._stashByteStart=q+mt}}}else if(this._stashUsed===0){var He=this._dispatchChunks(W,q);if(Hethis._bufferSize&&this._expandBuffer(Je);var Et=new Uint8Array(this._stashBuffer,0,this._bufferSize);Et.set(new Uint8Array(W,He),0),this._stashUsed+=Je,this._stashByteStart=q+He}}else{this._stashUsed+W.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+W.byteLength);var St=new Uint8Array(this._stashBuffer,0,this._bufferSize);St.set(new Uint8Array(W),this._stashUsed),this._stashUsed+=W.byteLength;var nt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(nt0){var xt=new Uint8Array(this._stashBuffer,nt);St.set(xt,0)}this._stashUsed-=nt,this._stashByteStart+=nt}}},{key:"_flushStashBuffer",value:function(W){if(this._stashUsed>0){var q=this._stashBuffer.slice(0,this._stashUsed),ne=this._dispatchChunks(q,this._stashByteStart),se=q.byteLength-ne;if(ne0){var xe=new Uint8Array(this._stashBuffer,0,this._bufferSize),He=new Uint8Array(q,ne);xe.set(He,0),this._stashUsed=He.byteLength,this._stashByteStart+=ne}return 0}return this._stashUsed=0,this._stashByteStart=0,se}return 0}},{key:"_onLoaderComplete",value:function(W,q){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(W,q){T.e(this.TAG,"Loader error, code = ".concat(q.code,", msg = ").concat(q.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,W=n.UNRECOVERABLE_EARLY_EOF);switch(W){case n.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var ne=this._currentRange.to+1;ne0){var q=Se.getConfig();W.emit("change",q)}}},{key:"registerListener",value:function(W){Se.emitter.addListener("change",W)}},{key:"removeListener",value:function(W){Se.emitter.removeListener("change",W)}},{key:"addLogListener",value:function(W){T.emitter.addListener("log",W),T.emitter.listenerCount("log")>0&&(T.ENABLE_CALLBACK=!0,Se._notifyChange())}},{key:"removeLogListener",value:function(W){T.emitter.removeListener("log",W),T.emitter.listenerCount("log")===0&&(T.ENABLE_CALLBACK=!1,Se._notifyChange())}}]),Se}();pe.emitter=new S.a;var Ce=pe,Be=function(){function Se(){Object(ae.a)(this,Se),this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return Object(Z.a)(Se,[{key:"isComplete",value:function(){var W=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,q=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&W&&q}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(W){if(this.keyframesIndex==null)return null;var q=this.keyframesIndex,ne=this._search(q.times,W);return{index:ne,milliseconds:q.times[ne],fileposition:q.filepositions[ne]}}},{key:"_search",value:function(W,q){var ne=0,se=W.length-1,xe=0,He=0,Je=se;for(q=W[xe]&&q=128){de.push(String.fromCharCode(se&65535)),q+=2;continue}}}else if(W[q]<240){if(ke(W,q,2)){var xe=(W[q]&15)<<12|(W[q+1]&63)<<6|W[q+2]&63;if(xe>=2048&&(xe&63488)!==55296){de.push(String.fromCharCode(xe&65535)),q+=3;continue}}}else if(W[q]<248&&ke(W,q,3)){var He=(W[q]&7)<<18|(W[q+1]&63)<<12|(W[q+2]&63)<<6|W[q+3]&63;if(He>65536&&He<1114112){He-=65536,de.push(String.fromCharCode(He>>>10|55296)),de.push(String.fromCharCode(He&1023|56320)),q+=4;continue}}}de.push(String.fromCharCode(65533)),++q}return de.join("")}var he=Ne,ue=function(){var Se=new ArrayBuffer(2);return new DataView(Se).setInt16(0,256,!0),new Int16Array(Se)[0]===256}(),Ie=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"parseScriptData",value:function(W,q,ne){var se={};try{var xe=Se.parseValue(W,q,ne),He=Se.parseValue(W,q+xe.size,ne-xe.size);se[xe.data]=He.data}catch(Je){T.e("AMF",Je.toString())}return se}},{key:"parseObject",value:function(W,q,ne){if(ne<3)throw new u("Data not enough when parse ScriptDataObject");var se=Se.parseString(W,q,ne),xe=Se.parseValue(W,q+se.size,ne-se.size),He=xe.objectEnd;return{data:{name:se.data,value:xe.data},size:se.size+xe.size,objectEnd:He}}},{key:"parseVariable",value:function(W,q,ne){return Se.parseObject(W,q,ne)}},{key:"parseString",value:function(W,q,ne){if(ne<2)throw new u("Data not enough when parse String");var se=new DataView(W,q,ne),xe=se.getUint16(0,!ue),He;return xe>0?He=he(new Uint8Array(W,q+2,xe)):He="",{data:He,size:2+xe}}},{key:"parseLongString",value:function(W,q,ne){if(ne<4)throw new u("Data not enough when parse LongString");var se=new DataView(W,q,ne),xe=se.getUint32(0,!ue),He;return xe>0?He=he(new Uint8Array(W,q+4,xe)):He="",{data:He,size:4+xe}}},{key:"parseDate",value:function(W,q,ne){if(ne<10)throw new u("Data size invalid when parse Date");var se=new DataView(W,q,ne),xe=se.getFloat64(0,!ue),He=se.getInt16(8,!ue);return xe+=He*60*1e3,{data:new Date(xe),size:8+2}}},{key:"parseValue",value:function(W,q,ne){if(ne<1)throw new u("Data not enough when parse Value");var se=new DataView(W,q,ne),xe=1,He=se.getUint8(0),Je,Et=!1;try{switch(He){case 0:Je=se.getFloat64(1,!ue),xe+=8;break;case 1:{var St=se.getUint8(1);Je=!!St,xe+=1;break}case 2:{var nt=Se.parseString(W,q+1,ne-1);Je=nt.data,xe+=nt.size;break}case 3:{Je={};var xt=0;for((se.getUint32(ne-4,!ue)&16777215)===9&&(xt=3);xe32)throw new s("ExpGolomb: readBits() bits exceeded max 32bits!");if(W<=this._current_word_bits_left){var q=this._current_word>>>32-W;return this._current_word<<=W,this._current_word_bits_left-=W,q}var ne=this._current_word_bits_left?this._current_word:0;ne=ne>>>32-this._current_word_bits_left;var se=W-this._current_word_bits_left;this._fillCurrentWord();var xe=Math.min(se,this._current_word_bits_left),He=this._current_word>>>32-xe;return this._current_word<<=xe,this._current_word_bits_left-=xe,ne=ne<>>W)!==0)return this._current_word<<=W,this._current_word_bits_left-=W,W;return this._fillCurrentWord(),W+this._skipLeadingZero()}},{key:"readUEG",value:function(){var W=this._skipLeadingZero();return this.readBits(W+1)-1}},{key:"readSEG",value:function(){var W=this.readUEG();return W&1?W+1>>>1:-1*(W>>>1)}}]),Se}(),ee=Ye,M=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"_ebsp2rbsp",value:function(W){for(var q=W,ne=q.byteLength,se=new Uint8Array(ne),xe=0,He=0;He=2&&(q[He]===3&&q[He-1]===0&&q[He-2]===0))continue;se[xe]=q[He],xe++}return new Uint8Array(se.buffer,0,xe)}},{key:"parseSPS",value:function(W){var q=Se._ebsp2rbsp(W),ne=new ee(q);ne.readByte();var se=ne.readByte();ne.readByte();var xe=ne.readByte();ne.readUEG();var He=Se.getProfileString(se),Je=Se.getLevelString(xe),Et=1,St=420,nt=[0,420,422,444],xt=8;if((se===100||se===110||se===122||se===244||se===44||se===83||se===86||se===118||se===128||se===138||se===144)&&(Et=ne.readUEG(),Et===3&&ne.readBits(1),Et<=3&&(St=nt[Et]),xt=ne.readUEG()+8,ne.readUEG(),ne.readBits(1),ne.readBool()))for(var ut=Et!==3?8:12,_t=0;_t0&&ur<16?(Rr=yi[ur-1],vn=xr[ur-1]):ur===255&&(Rr=ne.readByte()<<8|ne.readByte(),vn=ne.readByte()<<8|ne.readByte())}if(ne.readBool()&&ne.readBool(),ne.readBool()&&(ne.readBits(4),ne.readBool()&&ne.readBits(24)),ne.readBool()&&(ne.readUEG(),ne.readUEG()),ne.readBool()){var Cr=ne.readBits(32),Sr=ne.readBits(32);_r=ne.readBool(),Zr=Sr,jr=Cr*2,An=Zr/jr}}var Vr=1;(Rr!==1||vn!==1)&&(Vr=Rr/vn);var Mr=0,Si=0;if(Et===0)Mr=1,Si=2-Jt;else{var Or=Et===3?1:2,ei=Et===1?2:1;Mr=Or,Si=ei*(2-Jt)}var ri=(Cn+1)*16,Xr=(2-Jt)*((En+1)*16);ri-=(un+Jn)*Mr,Xr-=(ar+mn)*Si;var ui=Math.ceil(ri*Vr);return ne.destroy(),ne=null,{profile_string:He,level_string:Je,bit_depth:xt,ref_frames:mt,chroma_format:St,chroma_format_string:Se.getChromaFormatString(St),frame_rate:{fixed:_r,fps:An,fps_den:jr,fps_num:Zr},sar_ratio:{width:Rr,height:vn},codec_size:{width:ri,height:Xr},present_size:{width:ui,height:Xr}}}},{key:"_skipScalingList",value:function(W,q){for(var ne=8,se=8,xe=0,He=0;He>>8&255|(Se&255)<<8}function me(Se){return(Se&4278190080)>>>24|(Se&16711680)>>>8|(Se&65280)<<8|(Se&255)<<24}function Re(Se,de){return Se[de]<<24|Se[de+1]<<16|Se[de+2]<<8|Se[de+3]}var rt=function(){function Se(de,W){Object(ae.a)(this,Se),this.TAG="FLVDemuxer",this._config=W,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=de.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=de.hasAudioTrack,this._hasVideo=de.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Pe,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var q=new ArrayBuffer(2);return new DataView(q).setInt16(0,256,!0),new Int16Array(q)[0]===256}()}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}},{key:"bindDataSource",value:function(W){return W.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(W){this._onTrackMetadata=W}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(W){this._onMediaInfo=W}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(W){this._onMetaDataArrived=W}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(W){this._onScriptDataArrived=W}},{key:"onError",get:function(){return this._onError},set:function(W){this._onError=W}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(W){this._onDataAvailable=W}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(W){this._timestampBase=W}},{key:"overridedDuration",get:function(){return this._duration},set:function(W){this._durationOverrided=!0,this._duration=W,this._mediaInfo.duration=W}},{key:"overridedHasAudio",set:function(W){this._hasAudioFlagOverrided=!0,this._hasAudio=W,this._mediaInfo.hasAudio=W}},{key:"overridedHasVideo",set:function(W){this._hasVideoFlagOverrided=!0,this._hasVideo=W,this._mediaInfo.hasVideo=W}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new Pe}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(W,q){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new u("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var ne=0,se=this._littleEndian;if(q===0)if(W.byteLength>13){var xe=Se.probe(W);ne=xe.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,q+ne!==this._dataOffset&&T.w(this.TAG,"First time parsing but chunk byteStart invalid!");var He=new DataView(W,ne),Je=He.getUint32(0,!se);Je!==0&&T.w(this.TAG,"PrevTagSize0 !== 0 !!!"),ne+=4}for(;neW.byteLength)break;var St=Et.getUint8(0),nt=Et.getUint32(0,!se)&16777215;if(ne+11+nt+4>W.byteLength)break;if(St!==8&&St!==9&&St!==18){T.w(this.TAG,"Unsupported tag type ".concat(St,", skipped")),ne+=11+nt+4;continue}var xt=Et.getUint8(4),ut=Et.getUint8(5),_t=Et.getUint8(6),Qt=Et.getUint8(7),Xt=_t|ut<<8|xt<<16|Qt<<24,Mt=Et.getUint32(7,!se)&16777215;Mt!==0&&T.w(this.TAG,"Meet tag which has StreamID != 0!");var mt=ne+11;switch(St){case 8:this._parseAudioData(W,mt,nt,Xt);break;case 9:this._parseVideoData(W,mt,nt,Xt,q+ne);break;case 18:this._parseScriptData(W,mt,nt);break}var Cn=Et.getUint32(11+nt,!se);Cn!==11+nt&&T.w(this.TAG,"Invalid PrevTagSize ".concat(Cn)),ne+=11+nt+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),ne}},{key:"_parseScriptData",value:function(W,q,ne){var se=Ue.parseScriptData(W,q,ne);if(se.hasOwnProperty("onMetaData")){if(se.onMetaData==null||typeof se.onMetaData!="object"){T.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&T.w(this.TAG,"Found another onMetaData tag!"),this._metadata=se;var xe=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},xe)),typeof xe.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=xe.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof xe.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=xe.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof xe.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=xe.audiodatarate),typeof xe.videodatarate=="number"&&(this._mediaInfo.videoDataRate=xe.videodatarate),typeof xe.width=="number"&&(this._mediaInfo.width=xe.width),typeof xe.height=="number"&&(this._mediaInfo.height=xe.height),typeof xe.duration=="number"){if(!this._durationOverrided){var He=Math.floor(xe.duration*this._timescale);this._duration=He,this._mediaInfo.duration=He}}else this._mediaInfo.duration=0;if(typeof xe.framerate=="number"){var Je=Math.floor(xe.framerate*1e3);if(Je>0){var Et=Je/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Et,this._referenceFrameRate.fps_num=Je,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Et}}if(typeof xe.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var St=xe.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(St),xe.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=xe,T.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(se).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},se)))}},{key:"_parseKeyframesIndex",value:function(W){for(var q=[],ne=[],se=1;se>>4;if(Et!==2&&Et!==10){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Et);return}var St=0,nt=(Je&12)>>>2;if(nt>=0&&nt<=4)St=this._flvSoundRateTable[nt];else{this._onError(V.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+nt);return}var xt=(Je&2)>>>1,ut=Je&1,_t=this._audioMetadata,Qt=this._audioTrack;if(_t||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),_t=this._audioMetadata={},_t.type="audio",_t.id=Qt.id,_t.timescale=this._timescale,_t.duration=this._duration,_t.audioSampleRate=St,_t.channelCount=ut===0?1:2),Et===10){var Xt=this._parseAACAudioData(W,q+1,ne-1);if(Xt==null)return;if(Xt.packetType===0){_t.config&&T.w(this.TAG,"Found another AudioSpecificConfig!");var Mt=Xt.data;_t.audioSampleRate=Mt.samplingRate,_t.channelCount=Mt.channelCount,_t.codec=Mt.codec,_t.originalCodec=Mt.originalCodec,_t.config=Mt.config,_t.refSampleDuration=1024/_t.audioSampleRate*_t.timescale,T.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",_t);var mt=this._mediaInfo;mt.audioCodec=_t.originalCodec,mt.audioSampleRate=_t.audioSampleRate,mt.audioChannelCount=_t.channelCount,mt.hasVideo?mt.videoCodec!=null&&(mt.mimeType='video/x-flv; codecs="'+mt.videoCodec+","+mt.audioCodec+'"'):mt.mimeType='video/x-flv; codecs="'+mt.audioCodec+'"',mt.isComplete()&&this._onMediaInfo(mt)}else if(Xt.packetType===1){var Cn=this._timestampBase+se,En={unit:Xt.data,length:Xt.data.byteLength,dts:Cn,pts:Cn};Qt.samples.push(En),Qt.length+=Xt.data.length}else T.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Xt.packetType))}else if(Et===2){if(!_t.codec){var Jt=this._parseMP3AudioData(W,q+1,ne-1,!0);if(Jt==null)return;_t.audioSampleRate=Jt.samplingRate,_t.channelCount=Jt.channelCount,_t.codec=Jt.codec,_t.originalCodec=Jt.originalCodec,_t.refSampleDuration=1152/_t.audioSampleRate*_t.timescale,T.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",_t);var un=this._mediaInfo;un.audioCodec=_t.codec,un.audioSampleRate=_t.audioSampleRate,un.audioChannelCount=_t.channelCount,un.audioDataRate=Jt.bitRate,un.hasVideo?un.videoCodec!=null&&(un.mimeType='video/x-flv; codecs="'+un.videoCodec+","+un.audioCodec+'"'):un.mimeType='video/x-flv; codecs="'+un.audioCodec+'"',un.isComplete()&&this._onMediaInfo(un)}var Jn=this._parseMP3AudioData(W,q+1,ne-1,!1);if(Jn==null)return;var ar=this._timestampBase+se,mn={unit:Jn,length:Jn.byteLength,dts:ar,pts:ar};Qt.samples.push(mn),Qt.length+=Jn.length}}},{key:"_parseAACAudioData",value:function(W,q,ne){if(ne<=1){T.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var se={},xe=new Uint8Array(W,q,ne);return se.packetType=xe[0],xe[0]===0?se.data=this._parseAACAudioSpecificConfig(W,q+1,ne-1):se.data=xe.subarray(1),se}},{key:"_parseAACAudioSpecificConfig",value:function(W,q,ne){var se=new Uint8Array(W,q,ne),xe=null,He=0,Je=0,Et=null,St=0,nt=null;if(He=Je=se[0]>>>3,St=(se[0]&7)<<1|se[1]>>>7,St<0||St>=this._mpegSamplingRates.length){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var xt=this._mpegSamplingRates[St],ut=(se[1]&120)>>>3;if(ut<0||ut>=8){this._onError(V.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}He===5&&(nt=(se[1]&7)<<1|se[2]>>>7,Et=(se[2]&124)>>>2);var _t=self.navigator.userAgent.toLowerCase();return _t.indexOf("firefox")!==-1?St>=6?(He=5,xe=new Array(4),nt=St-3):(He=2,xe=new Array(2),nt=St):_t.indexOf("android")!==-1?(He=2,xe=new Array(2),nt=St):(He=5,nt=St,xe=new Array(4),St>=6?nt=St-3:ut===1&&(He=2,xe=new Array(2),nt=St)),xe[0]=He<<3,xe[0]|=(St&15)>>>1,xe[1]=(St&15)<<7,xe[1]|=(ut&15)<<3,He===5&&(xe[1]|=(nt&15)>>>1,xe[2]=(nt&1)<<7,xe[2]|=2<<2,xe[3]=0),{config:xe,samplingRate:xt,channelCount:ut,codec:"mp4a.40."+He,originalCodec:"mp4a.40."+Je}}},{key:"_parseMP3AudioData",value:function(W,q,ne,se){if(ne<4){T.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var xe=this._littleEndian,He=new Uint8Array(W,q,ne),Je=null;if(se){if(He[0]!==255)return;var Et=He[1]>>>3&3,St=(He[1]&6)>>1,nt=(He[2]&240)>>>4,xt=(He[2]&12)>>>2,ut=He[3]>>>6&3,_t=ut!==3?2:1,Qt=0,Xt=0,Mt=34,mt="mp3";switch(Et){case 0:Qt=this._mpegAudioV25SampleRateTable[xt];break;case 2:Qt=this._mpegAudioV20SampleRateTable[xt];break;case 3:Qt=this._mpegAudioV10SampleRateTable[xt];break}switch(St){case 1:Mt=34,nt>>4,Et=He&15;if(Et!==7){this._onError(V.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(Et));return}this._parseAVCVideoPacket(W,q+1,ne-1,se,xe,Je)}},{key:"_parseAVCVideoPacket",value:function(W,q,ne,se,xe,He){if(ne<4){T.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Je=this._littleEndian,Et=new DataView(W,q,ne),St=Et.getUint8(0),nt=Et.getUint32(0,!Je)&16777215,xt=nt<<8>>8;if(St===0)this._parseAVCDecoderConfigurationRecord(W,q+4,ne-4);else if(St===1)this._parseAVCVideoData(W,q+4,ne-4,se,xe,He,xt);else if(!(St===2)){this._onError(V.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(St));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(W,q,ne){if(ne<7){T.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var se=this._videoMetadata,xe=this._videoTrack,He=this._littleEndian,Je=new DataView(W,q,ne);se?typeof se.avcc!="undefined"&&T.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),se=this._videoMetadata={},se.type="video",se.id=xe.id,se.timescale=this._timescale,se.duration=this._duration);var Et=Je.getUint8(0),St=Je.getUint8(1),nt=Je.getUint8(2),xt=Je.getUint8(3);if(Et!==1||St===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Je.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(V.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var ut=Je.getUint8(5)&31;if(ut===0){this._onError(V.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else ut>1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(ut));for(var _t=6,Qt=0;Qt1&&T.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(gr));_t++;for(var Rr=0;Rr=ne){T.w(this.TAG,"Malformed Nalu near timestamp ".concat(Qt,", offset = ").concat(ut,", dataSize = ").concat(ne));break}var Mt=St.getUint32(ut,!Et);if(_t===3&&(Mt>>>=8),Mt>ne-_t){T.w(this.TAG,"Malformed Nalus near timestamp ".concat(Qt,", NaluSize > DataSize!"));return}var mt=St.getUint8(ut+_t)&31;mt===5&&(Xt=!0);var Cn=new Uint8Array(W,q+ut,_t+Mt),En={type:mt,data:Cn};nt.push(En),xt+=Cn.byteLength,ut+=_t+Mt}if(nt.length){var Jt=this._videoTrack,un={units:nt,length:xt,isKeyframe:Xt,dts:Qt,cts:Je,pts:Qt+Je};Xt&&(un.fileposition=xe),Jt.samples.push(un),Jt.length+=xt}}}],[{key:"probe",value:function(W){var q=new Uint8Array(W),ne={match:!1};if(q[0]!==70||q[1]!==76||q[2]!==86||q[3]!==1)return ne;var se=(q[4]&4)>>>2!==0,xe=(q[4]&1)!==0,He=Re(q,5);return He<9?ne:{match:!0,consumed:He,dataOffset:He,hasAudioTrack:se,hasVideoTrack:xe}}}]),Se}(),De=rt,Me=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"init",value:function(){Se.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var W in Se.types)Se.types.hasOwnProperty(W)&&(Se.types[W]=[W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2),W.charCodeAt(3)]);var q=Se.constants={};q.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),q.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),q.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),q.STSC=q.STCO=q.STTS,q.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),q.HDLR_VIDEO=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]),q.HDLR_AUDIO=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]),q.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),q.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),q.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(W){for(var q=8,ne=null,se=Array.prototype.slice.call(arguments,1),xe=se.length,He=0;He>>24&255,ne[1]=q>>>16&255,ne[2]=q>>>8&255,ne[3]=q&255,ne.set(W,4);for(var Je=8,Et=0;Et>>24&255,W>>>16&255,W>>>8&255,W&255,q>>>24&255,q>>>16&255,q>>>8&255,q&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]))}},{key:"trak",value:function(W){return Se.box(Se.types.trak,Se.tkhd(W),Se.mdia(W))}},{key:"tkhd",value:function(W){var q=W.id,ne=W.duration,se=W.presentWidth,xe=W.presentHeight;return Se.box(Se.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&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,se>>>8&255,se&255,0,0,xe>>>8&255,xe&255,0,0]))}},{key:"mdia",value:function(W){return Se.box(Se.types.mdia,Se.mdhd(W),Se.hdlr(W),Se.minf(W))}},{key:"mdhd",value:function(W){var q=W.timescale,ne=W.duration;return Se.box(Se.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255,85,196,0,0]))}},{key:"hdlr",value:function(W){var q=null;return W.type==="audio"?q=Se.constants.HDLR_AUDIO:q=Se.constants.HDLR_VIDEO,Se.box(Se.types.hdlr,q)}},{key:"minf",value:function(W){var q=null;return W.type==="audio"?q=Se.box(Se.types.smhd,Se.constants.SMHD):q=Se.box(Se.types.vmhd,Se.constants.VMHD),Se.box(Se.types.minf,q,Se.dinf(),Se.stbl(W))}},{key:"dinf",value:function(){var W=Se.box(Se.types.dinf,Se.box(Se.types.dref,Se.constants.DREF));return W}},{key:"stbl",value:function(W){var q=Se.box(Se.types.stbl,Se.stsd(W),Se.box(Se.types.stts,Se.constants.STTS),Se.box(Se.types.stsc,Se.constants.STSC),Se.box(Se.types.stsz,Se.constants.STSZ),Se.box(Se.types.stco,Se.constants.STCO));return q}},{key:"stsd",value:function(W){return W.type==="audio"?W.codec==="mp3"?Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp3(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.mp4a(W)):Se.box(Se.types.stsd,Se.constants.STSD_PREFIX,Se.avc1(W))}},{key:"mp3",value:function(W){var q=W.channelCount,ne=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types[".mp3"],se)}},{key:"mp4a",value:function(W){var q=W.channelCount,ne=W.audioSampleRate,se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,q,0,16,0,0,0,0,ne>>>8&255,ne&255,0,0]);return Se.box(Se.types.mp4a,se,Se.esds(W))}},{key:"esds",value:function(W){var q=W.config||[],ne=q.length,se=new Uint8Array([0,0,0,0,3,23+ne,0,1,0,4,15+ne,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([ne]).concat(q).concat([6,1,2]));return Se.box(Se.types.esds,se)}},{key:"avc1",value:function(W){var q=W.avcc,ne=W.codecWidth,se=W.codecHeight,xe=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,ne>>>8&255,ne&255,se>>>8&255,se&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Se.box(Se.types.avc1,xe,Se.box(Se.types.avcC,q))}},{key:"mvex",value:function(W){return Se.box(Se.types.mvex,Se.trex(W))}},{key:"trex",value:function(W){var q=W.id,ne=new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Se.box(Se.types.trex,ne)}},{key:"moof",value:function(W,q){return Se.box(Se.types.moof,Se.mfhd(W.sequenceNumber),Se.traf(W,q))}},{key:"mfhd",value:function(W){var q=new Uint8Array([0,0,0,0,W>>>24&255,W>>>16&255,W>>>8&255,W&255]);return Se.box(Se.types.mfhd,q)}},{key:"traf",value:function(W,q){var ne=W.id,se=Se.box(Se.types.tfhd,new Uint8Array([0,0,0,0,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne&255])),xe=Se.box(Se.types.tfdt,new Uint8Array([0,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255])),He=Se.sdtp(W),Je=Se.trun(W,He.byteLength+16+16+8+16+8+8);return Se.box(Se.types.traf,se,xe,Je,He)}},{key:"sdtp",value:function(W){for(var q=W.samples||[],ne=q.length,se=new Uint8Array(4+ne),xe=0;xe>>24&255,se>>>16&255,se>>>8&255,se&255,q>>>24&255,q>>>16&255,q>>>8&255,q&255],0);for(var Je=0;Je>>24&255,Et>>>16&255,Et>>>8&255,Et&255,St>>>24&255,St>>>16&255,St>>>8&255,St&255,nt.isLeading<<2|nt.dependsOn,nt.isDependedOn<<6|nt.hasRedundancy<<4|nt.isNonSync,0,0,xt>>>24&255,xt>>>16&255,xt>>>8&255,xt&255],12+16*Je)}return Se.box(Se.types.trun,He)}},{key:"mdat",value:function(W){return Se.box(Se.types.mdat,W)}}]),Se}();Me.init();var Xe=Me,tt=function(){function Se(){Object(ae.a)(this,Se)}return Object(Z.a)(Se,null,[{key:"getSilentFrame",value:function(W,q){if(W==="mp4a.40.2"){if(q===1)return new Uint8Array([0,200,0,128,35,128]);if(q===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(q===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(q===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(q===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(q===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])}else{if(q===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(q===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(q===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])}return null}}]),Se}(),Ve=tt,Ke=function Se(de,W,q,ne,se){Object(ae.a)(this,Se),this.dts=de,this.pts=W,this.duration=q,this.originalDts=ne,this.isSyncPoint=se,this.fileposition=null},we=function(){function Se(){Object(ae.a)(this,Se),this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return Object(Z.a)(Se,[{key:"appendSyncPoint",value:function(W){W.isSyncPoint=!0,this.syncPoints.push(W)}}]),Se}(),Ae=function(){function Se(){Object(ae.a)(this,Se),this._list=[]}return Object(Z.a)(Se,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(W){var q=this._list;if(W.length===0)return;q.length>0&&W[0].originalDts=q[xe].dts&&Wq[se].lastSample.originalDts&&W=q[se].lastSample.originalDts&&(se===q.length-1||se0&&(xe=this._searchNearestSegmentBefore(ne.originalBeginDts)+1),this._lastAppendLocation=xe,this._list.splice(xe,0,ne)}},{key:"getLastSegmentBefore",value:function(W){var q=this._searchNearestSegmentBefore(W);return q>=0?this._list[q]:null}},{key:"getLastSampleBefore",value:function(W){var q=this.getLastSegmentBefore(W);return q!=null?q.lastSample:null}},{key:"getLastSyncPointBefore",value:function(W){for(var q=this._searchNearestSegmentBefore(W),ne=this._list[q].syncPoints;ne.length===0&&q>0;)q--,ne=this._list[q].syncPoints;return ne.length>0?ne[ne.length-1]:null}}]),Se}(),fe=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MP4Remuxer",this._config=de,this._isLive=de.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Oe("audio"),this._videoSegmentInfoList=new Oe("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661)),this._fillSilentAfterSeek=m.msedge||m.msie,this._mp3UseMpegAudio=!m.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}},{key:"bindDataSource",value:function(W){return W.onDataAvailable=this.remux.bind(this),W.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(W){this._onInitSegment=W}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(W){this._onMediaSegment=W}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(W){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(W,q){if(!this._onMediaSegment)throw new u("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(W,q),this._remuxVideo(q),this._remuxAudio(W)}},{key:"_onTrackMetadataReceived",value:function(W,q){var ne=null,se="mp4",xe=q.codec;if(W==="audio")this._audioMeta=q,q.codec==="mp3"&&this._mp3UseMpegAudio?(se="mpeg",xe="",ne=new Uint8Array):ne=Xe.generateInitSegment(q);else if(W==="video")this._videoMeta=q,ne=Xe.generateInitSegment(q);else return;if(!this._onInitSegment)throw new u("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(W,{type:W,data:ne.buffer,codec:xe,container:"".concat(W,"/").concat(se),mediaDuration:q.duration})}},{key:"_calculateDtsBase",value:function(W,q){if(this._dtsBaseInited)return;W.samples&&W.samples.length&&(this._audioDtsBase=W.samples[0].dts),q.samples&&q.samples.length&&(this._videoDtsBase=q.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var W=this._videoStashedLastSample,q=this._audioStashedLastSample,ne={type:"video",id:1,sequenceNumber:0,samples:[],length:0};W!=null&&(ne.samples.push(W),ne.length=W.length);var se={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};q!=null&&(se.samples.push(q),se.length=q.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(ne,!0),this._remuxAudio(se,!0)}},{key:"_remuxAudio",value:function(W,q){if(this._audioMeta==null)return;var ne=W,se=ne.samples,xe=void 0,He=-1,Je=-1,Et=-1,St=this._audioMeta.refSampleDuration,nt=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,xt=this._dtsBaseInited&&this._audioNextDts===void 0,ut=!1;if(!se||se.length===0)return;if(se.length===1&&!q)return;var _t=0,Qt=null,Xt=0;nt?(_t=0,Xt=ne.length):(_t=8,Xt=8+ne.length);var Mt=null;if(se.length>1&&(Mt=se.pop(),Xt-=Mt.length),this._audioStashedLastSample!=null){var mt=this._audioStashedLastSample;this._audioStashedLastSample=null,se.unshift(mt),Xt+=mt.length}Mt!=null&&(this._audioStashedLastSample=Mt);var Cn=se[0].dts-this._dtsBase;if(this._audioNextDts)xe=Cn-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())xe=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(ut=!0));else{var En=this._audioSegmentInfoList.getLastSampleBefore(Cn);if(En!=null){var Jt=Cn-(En.originalDts+En.duration);Jt<=3&&(Jt=0);var un=En.dts+En.duration+Jt;xe=Cn-un}else xe=0}if(ut){var Jn=Cn-xe,ar=this._videoSegmentInfoList.getLastSegmentBefore(Cn);if(ar!=null&&ar.beginDts=1?ur=vn[vn.length-1].duration:ur=Math.floor(St);var Cr=!1,Sr=null;if(ur>St*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!m.safari){Cr=!0;var Vr=Math.abs(ur-St),Mr=Math.ceil(Vr/St),Si=tr+St;T.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync. `+"dts: ".concat(tr+ur," ms, expected: ").concat(tr+Math.round(St)," ms, ")+"delta: ".concat(Math.round(Vr)," ms, generate: ").concat(Mr," frames"));var Or=Ve.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Or==null&&(T.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Or=Zr),Sr=[];for(var ei=0;ei0){var Xr=Sr[Sr.length-1];Xr.duration=ri-Xr.dts}var ui={dts:ri,pts:ri,cts:0,unit:Or,size:Or.byteLength,duration:0,originalDts:jr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Sr.push(ui),Xt+=ui.size,Si+=St}var Ri=Sr[Sr.length-1];Ri.duration=tr+ur-Ri.dts,ur=Math.round(St)}vn.push({dts:tr,pts:tr,cts:0,unit:_r.unit,size:_r.unit.byteLength,duration:ur,originalDts:jr,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Cr&&vn.push.apply(vn,Sr)}nt?Qt=new Uint8Array(Xt):(Qt=new Uint8Array(Xt),Qt[0]=Xt>>>24&255,Qt[1]=Xt>>>16&255,Qt[2]=Xt>>>8&255,Qt[3]=Xt&255,Qt.set(Xe.types.mdat,4));for(var bi=0;bi1&&(_t=se.pop(),ut-=_t.length),this._videoStashedLastSample!=null){var Qt=this._videoStashedLastSample;this._videoStashedLastSample=null,se.unshift(Qt),ut+=Qt.length}_t!=null&&(this._videoStashedLastSample=_t);var Xt=se[0].dts-this._dtsBase;if(this._videoNextDts)xe=Xt-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())xe=0;else{var Mt=this._videoSegmentInfoList.getLastSampleBefore(Xt);if(Mt!=null){var mt=Xt-(Mt.originalDts+Mt.duration);mt<=3&&(mt=0);var Cn=Mt.dts+Mt.duration+mt;xe=Xt-Cn}else xe=0}for(var En=new we,Jt=[],un=0;un=1?An=Jt[Jt.length-1].duration:An=Math.floor(this._videoMeta.refSampleDuration);if(mn){var jr=new Ke(gr,vn,An,Jn.dts,!0);jr.fileposition=Jn.fileposition,En.appendSyncPoint(jr)}Jt.push({dts:gr,pts:vn,cts:Rr,units:Jn.units,size:Jn.length,isKeyframe:mn,duration:An,originalDts:ar,flags:{isLeading:0,dependsOn:mn?2:1,isDependedOn:mn?1:0,hasRedundancy:0,isNonSync:mn?0:1}})}xt=new Uint8Array(ut),xt[0]=ut>>>24&255,xt[1]=ut>>>16&255,xt[2]=ut>>>8&255,xt[3]=ut&255,xt.set(Xe.types.mdat,4);for(var tr=0;tr0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,xe=this._demuxer.parseChunks(W,q);else if((se=De.probe(W)).match){this._demuxer=new De(se,this._config),this._remuxer||(this._remuxer=new ge(this._config));var He=this._mediaDataSource;He.duration!=null&&!isNaN(He.duration)&&(this._demuxer.overridedDuration=He.duration),typeof He.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=He.hasAudio),typeof He.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=He.hasVideo),this._demuxer.timestampBase=He.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),xe=this._demuxer.parseChunks(W,q)}else se=null,T.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){ne._internalAbort()}),this._emitter.emit(be.DEMUX_ERROR,V.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),xe=0;return xe}},{key:"_onMediaInfo",value:function(W){var q=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},W),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Pe.prototype));var ne=Object.assign({},W);Object.setPrototypeOf(ne,Pe.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=ne,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var se=q._pendingSeekTime;q._pendingSeekTime=null,q.seek(se)})}},{key:"_onMetaDataArrived",value:function(W){this._emitter.emit(be.METADATA_ARRIVED,W)}},{key:"_onScriptDataArrived",value:function(W){this._emitter.emit(be.SCRIPTDATA_ARRIVED,W)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(W){var q=W,ne=q+1;ne0&&ne[0].originalDts===se&&(se=ne[0].pts),this._emitter.emit(be.RECOMMEND_SEEKPOINT,se)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(W){var q=this._mediaInfo.segments[W],ne=Object.assign({},q);ne.duration=this._mediaInfo.duration,ne.segmentCount=this._mediaInfo.segmentCount,delete ne.segments,delete ne.keyframesIndex,this._emitter.emit(be.MEDIA_INFO,ne)}},{key:"_reportStatisticsInfo",value:function(){var W={};W.url=this._ioctl.currentURL,W.hasRedirect=this._ioctl.hasRedirect,W.hasRedirect&&(W.redirectedURL=this._ioctl.currentRedirectedURL),W.speed=this._ioctl.currentSpeed,W.loaderType=this._ioctl.loaderType,W.currentSegmentIndex=this._currentSegmentIndex,W.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(be.STATISTICS_INFO,W)}}]),Se}(),qe=Ge,pt=function(de){var W="TransmuxingWorker",q=null,ne=Xt.bind(this);w.install(),de.addEventListener("message",function(Mt){switch(Mt.data.cmd){case"init":q=new qe(Mt.data.param[0],Mt.data.param[1]),q.on(be.IO_ERROR,ut.bind(this)),q.on(be.DEMUX_ERROR,_t.bind(this)),q.on(be.INIT_SEGMENT,se.bind(this)),q.on(be.MEDIA_SEGMENT,xe.bind(this)),q.on(be.LOADING_COMPLETE,He.bind(this)),q.on(be.RECOVERED_EARLY_EOF,Je.bind(this)),q.on(be.MEDIA_INFO,Et.bind(this)),q.on(be.METADATA_ARRIVED,St.bind(this)),q.on(be.SCRIPTDATA_ARRIVED,nt.bind(this)),q.on(be.STATISTICS_INFO,xt.bind(this)),q.on(be.RECOMMEND_SEEKPOINT,Qt.bind(this));break;case"destroy":q&&(q.destroy(),q=null),de.postMessage({msg:"destroyed"});break;case"start":q.start();break;case"stop":q.stop();break;case"seek":q.seek(Mt.data.param);break;case"pause":q.pause();break;case"resume":q.resume();break;case"logging_config":{var mt=Mt.data.param;Ce.applyConfig(mt),mt.enableCallback===!0?Ce.addLogListener(ne):Ce.removeLogListener(ne);break}}});function se(Mt,mt){var Cn={msg:be.INIT_SEGMENT,data:{type:Mt,data:mt}};de.postMessage(Cn,[mt.data])}function xe(Mt,mt){var Cn={msg:be.MEDIA_SEGMENT,data:{type:Mt,data:mt}};de.postMessage(Cn,[mt.data])}function He(){var Mt={msg:be.LOADING_COMPLETE};de.postMessage(Mt)}function Je(){var Mt={msg:be.RECOVERED_EARLY_EOF};de.postMessage(Mt)}function Et(Mt){var mt={msg:be.MEDIA_INFO,data:Mt};de.postMessage(mt)}function St(Mt){var mt={msg:be.METADATA_ARRIVED,data:Mt};de.postMessage(mt)}function nt(Mt){var mt={msg:be.SCRIPTDATA_ARRIVED,data:Mt};de.postMessage(mt)}function xt(Mt){var mt={msg:be.STATISTICS_INFO,data:Mt};de.postMessage(mt)}function ut(Mt,mt){de.postMessage({msg:be.IO_ERROR,data:{type:Mt,info:mt}})}function _t(Mt,mt){de.postMessage({msg:be.DEMUX_ERROR,data:{type:Mt,info:mt}})}function Qt(Mt){de.postMessage({msg:be.RECOMMEND_SEEKPOINT,data:Mt})}function Xt(Mt,mt){de.postMessage({msg:"logcat_callback",data:{type:Mt,logcat:mt}})}},Dt=pt,jt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="Transmuxer",this._emitter=new S.a,W.enableWorker&&typeof Worker!="undefined")try{var q=z("0r65");this._worker=q(Dt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[de,W]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Ce.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Ce.getConfig()})}catch(se){T.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new qe(de,W)}else this._controller=new qe(de,W);if(this._controller){var ne=this._controller;ne.on(be.IO_ERROR,this._onIOError.bind(this)),ne.on(be.DEMUX_ERROR,this._onDemuxError.bind(this)),ne.on(be.INIT_SEGMENT,this._onInitSegment.bind(this)),ne.on(be.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),ne.on(be.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),ne.on(be.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),ne.on(be.MEDIA_INFO,this._onMediaInfo.bind(this)),ne.on(be.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),ne.on(be.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),ne.on(be.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),ne.on(be.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Ce.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(W){this._worker?this._worker.postMessage({cmd:"seek",param:W}):this._controller.seek(W)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.INIT_SEGMENT,W,q)})}},{key:"_onMediaSegment",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.MEDIA_SEGMENT,W,q)})}},{key:"_onLoadingComplete",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var W=this;Promise.resolve().then(function(){W._emitter.emit(be.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.MEDIA_INFO,W)})}},{key:"_onMetaDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.METADATA_ARRIVED,W)})}},{key:"_onScriptDataArrived",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.SCRIPTDATA_ARRIVED,W)})}},{key:"_onStatisticsInfo",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.STATISTICS_INFO,W)})}},{key:"_onIOError",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.IO_ERROR,W,q)})}},{key:"_onDemuxError",value:function(W,q){var ne=this;Promise.resolve().then(function(){ne._emitter.emit(be.DEMUX_ERROR,W,q)})}},{key:"_onRecommendSeekpoint",value:function(W){var q=this;Promise.resolve().then(function(){q._emitter.emit(be.RECOMMEND_SEEKPOINT,W)})}},{key:"_onLoggingConfigChanged",value:function(W){this._worker&&this._worker.postMessage({cmd:"logging_config",param:W})}},{key:"_onWorkerMessage",value:function(W){var q=W.data,ne=q.data;if(q.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(q.msg){case be.INIT_SEGMENT:case be.MEDIA_SEGMENT:this._emitter.emit(q.msg,ne.type,ne.data);break;case be.LOADING_COMPLETE:case be.RECOVERED_EARLY_EOF:this._emitter.emit(q.msg);break;case be.MEDIA_INFO:Object.setPrototypeOf(ne,Pe.prototype),this._emitter.emit(q.msg,ne);break;case be.METADATA_ARRIVED:case be.SCRIPTDATA_ARRIVED:case be.STATISTICS_INFO:this._emitter.emit(q.msg,ne);break;case be.IO_ERROR:case be.DEMUX_ERROR:this._emitter.emit(q.msg,ne.type,ne.info);break;case be.RECOMMEND_SEEKPOINT:this._emitter.emit(q.msg,ne);break;case"logcat_callback":T.emitter.emit("log",ne.type,ne.logcat);break;default:break}}}]),Se}(),Rt=jt,Lt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},lt=Lt,ft=function(){function Se(de){Object(ae.a)(this,Se),this.TAG="MSEController",this._config=de,this._emitter=new S.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Ae}return Object(Z.a)(Se,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){if(this._mediaSource)throw new u("MediaSource has been attached to an HTMLMediaElement!");var q=this._mediaSource=new window.MediaSource;q.addEventListener("sourceopen",this.e.onSourceOpen),q.addEventListener("sourceended",this.e.onSourceEnded),q.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=W,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),W.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var W=this._mediaSource;for(var q in this._sourceBuffers){var ne=this._pendingSegments[q];ne.splice(0,ne.length),this._pendingSegments[q]=null,this._pendingRemoveRanges[q]=null,this._lastInitSegments[q]=null;var se=this._sourceBuffers[q];if(se){if(W.readyState!=="closed"){try{W.removeSourceBuffer(se)}catch(xe){T.e(this.TAG,xe.message)}se.removeEventListener("error",this.e.onSourceBufferError),se.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[q]=null,this._sourceBuffers[q]=null}}if(W.readyState==="open")try{W.endOfStream()}catch(xe){T.e(this.TAG,xe.message)}W.removeEventListener("sourceopen",this.e.onSourceOpen),W.removeEventListener("sourceended",this.e.onSourceEnded),W.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}},{key:"appendInitSegment",value:function(W,q){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(W),this._pendingSegments[W.type].push(W);return}var ne=W,se="".concat(ne.container);ne.codec&&ne.codec.length>0&&(se+=";codecs=".concat(ne.codec));var xe=!1;if(T.v(this.TAG,"Received Initialization Segment, mimeType: "+se),this._lastInitSegments[ne.type]=ne,se!==this._mimeTypes[ne.type]){if(this._mimeTypes[ne.type])T.v(this.TAG,"Notice: ".concat(ne.type," mimeType changed, origin: ").concat(this._mimeTypes[ne.type],", target: ").concat(se));else{xe=!0;try{var He=this._sourceBuffers[ne.type]=this._mediaSource.addSourceBuffer(se);He.addEventListener("error",this.e.onSourceBufferError),He.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Je){T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message});return}}this._mimeTypes[ne.type]=se}q||this._pendingSegments[ne.type].push(ne),xe||this._sourceBuffers[ne.type]&&!this._sourceBuffers[ne.type].updating&&this._doAppendSegments(),m.safari&&ne.container==="audio/mpeg"&&ne.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=ne.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(W){var q=W;this._pendingSegments[q.type].push(q),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var ne=this._sourceBuffers[q.type];ne&&!ne.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(W){for(var q in this._sourceBuffers){if(!this._sourceBuffers[q])continue;var ne=this._sourceBuffers[q];if(this._mediaSource.readyState==="open")try{ne.abort()}catch(St){T.e(this.TAG,St.message)}this._idrList.clear();var se=this._pendingSegments[q];if(se.splice(0,se.length),this._mediaSource.readyState==="closed")continue;for(var xe=0;xe=1&&W-se.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var W=this._mediaElement.currentTime;for(var q in this._sourceBuffers){var ne=this._sourceBuffers[q];if(ne){for(var se=ne.buffered,xe=!1,He=0;He=this._config.autoCleanupMaxBackwardDuration){xe=!0;var St=W-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[q].push({start:Je,end:St})}}else Et0&&(isNaN(q)||ne>q)&&(T.v(this.TAG,"Update MediaSource duration from ".concat(q," to ").concat(ne)),this._mediaSource.duration=ne),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var W in this._pendingRemoveRanges){if(!this._sourceBuffers[W]||this._sourceBuffers[W].updating)continue;for(var q=this._sourceBuffers[W],ne=this._pendingRemoveRanges[W];ne.length&&!q.updating;){var se=ne.shift();q.remove(se.start,se.end)}}}},{key:"_doAppendSegments",value:function(){var W=this._pendingSegments;for(var q in W){if(!this._sourceBuffers[q]||this._sourceBuffers[q].updating)continue;if(W[q].length>0){var ne=W[q].shift();if(ne.timestampOffset){var se=this._sourceBuffers[q].timestampOffset,xe=ne.timestampOffset/1e3,He=Math.abs(se-xe);He>.1&&(T.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(se," to ").concat(xe)),this._sourceBuffers[q].timestampOffset=xe),delete ne.timestampOffset}if(!ne.data||ne.data.byteLength===0)continue;try{this._sourceBuffers[q].appendBuffer(ne.data),this._isBufferFull=!1,q==="video"&&ne.hasOwnProperty("info")&&this._idrList.appendArray(ne.info.syncPoints)}catch(Je){this._pendingSegments[q].unshift(ne),Je.code===22?(this._isBufferFull||this._emitter.emit(lt.BUFFER_FULL),this._isBufferFull=!0):(T.e(this.TAG,Je.message),this._emitter.emit(lt.ERROR,{code:Je.code,msg:Je.message}))}}}}},{key:"_onSourceOpen",value:function(){if(T.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var W=this._pendingSourceBufferInit;W.length;){var q=W.shift();this.appendInitSegment(q,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(lt.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){T.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){T.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var W=this._pendingSegments;return W.video.length>0||W.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var W=this._pendingRemoveRanges;return W.video.length>0||W.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(lt.UPDATE_END)}},{key:"_onSourceBufferError",value:function(W){T.e(this.TAG,"SourceBuffer Error: ".concat(W))}}]),Se}(),Qe=ft,Te={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},je={NETWORK_EXCEPTION:n.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:V.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:V.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:V.CODEC_UNSUPPORTED},dt=function(){function Se(de,W){if(Object(ae.a)(this,Se),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new S.a,this._config=ie(),typeof W=="object"&&Object.assign(this._config,W),de.type.toLowerCase()!=="flv")throw new s("FlvPlayer requires an flv MediaDataSource input!");de.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=de,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var q=m.chrome&&(m.version.major<50||m.version.major===50&&m.version.build<2661);this._alwaysSeekKeyframe=!!(q||m.msedge||m.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Z.a)(Se,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(W,q){var ne=this;W===Le.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Le.MEDIA_INFO,ne.mediaInfo)}):W===Le.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){ne._emitter.emit(Le.STATISTICS_INFO,ne.statisticsInfo)})),this._emitter.addListener(W,q)}},{key:"off",value:function(W,q){this._emitter.removeListener(W,q)}},{key:"attachMediaElement",value:function(W){var q=this;if(this._mediaElement=W,W.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),W.addEventListener("seeking",this.e.onvSeeking),W.addEventListener("canplay",this.e.onvCanPlay),W.addEventListener("stalled",this.e.onvStalled),W.addEventListener("progress",this.e.onvProgress),this._msectl=new Qe(this._config),this._msectl.on(lt.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(lt.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(lt.SOURCE_OPEN,function(){q._mseSourceOpened=!0,q._hasPendingLoad&&(q._hasPendingLoad=!1,q.load())}),this._msectl.on(lt.ERROR,function(ne){q._emitter.emit(Le.ERROR,Te.MEDIA_ERROR,je.MEDIA_MSE_ERROR,ne)}),this._msectl.attachMediaElement(W),this._pendingSeekTime!=null)try{W.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(ne){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}},{key:"load",value:function(){var W=this;if(!this._mediaElement)throw new u("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new u("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Rt(this._mediaDataSource,this._config),this._transmuxer.on(be.INIT_SEGMENT,function(q,ne){W._msectl.appendInitSegment(ne)}),this._transmuxer.on(be.MEDIA_SEGMENT,function(q,ne){if(W._msectl.appendMediaSegment(ne),W._config.lazyLoad&&!W._config.isLive){var se=W._mediaElement.currentTime;ne.info.endDts>=(se+W._config.lazyLoadMaxDuration)*1e3&&(W._progressChecker==null&&(T.v(W.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),W._suspendTransmuxer()))}}),this._transmuxer.on(be.LOADING_COMPLETE,function(){W._msectl.endOfStream(),W._emitter.emit(Le.LOADING_COMPLETE)}),this._transmuxer.on(be.RECOVERED_EARLY_EOF,function(){W._emitter.emit(Le.RECOVERED_EARLY_EOF)}),this._transmuxer.on(be.IO_ERROR,function(q,ne){W._emitter.emit(Le.ERROR,Te.NETWORK_ERROR,q,ne)}),this._transmuxer.on(be.DEMUX_ERROR,function(q,ne){W._emitter.emit(Le.ERROR,Te.MEDIA_ERROR,q,{code:-1,msg:ne})}),this._transmuxer.on(be.MEDIA_INFO,function(q){W._mediaInfo=q,W._emitter.emit(Le.MEDIA_INFO,Object.assign({},q))}),this._transmuxer.on(be.METADATA_ARRIVED,function(q){W._emitter.emit(Le.METADATA_ARRIVED,q)}),this._transmuxer.on(be.SCRIPTDATA_ARRIVED,function(q){W._emitter.emit(Le.SCRIPTDATA_ARRIVED,q)}),this._transmuxer.on(be.STATISTICS_INFO,function(q){W._statisticsInfo=W._fillStatisticsInfo(q),W._emitter.emit(Le.STATISTICS_INFO,Object.assign({},W._statisticsInfo))}),this._transmuxer.on(be.RECOMMEND_SEEKPOINT,function(q){W._mediaElement&&!W._config.accurateSeek&&(W._requestSetTime=!0,W._mediaElement.currentTime=q/1e3)}),this._transmuxer.open()}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._internalSeek(W):this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(W){if(W.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return W;var q=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var xe=this._mediaElement.getVideoPlaybackQuality();ne=xe.totalVideoFrames,se=xe.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=ne,W.droppedFrames=se),W}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var W=this._mediaElement.buffered,q=this._mediaElement.currentTime,ne=0,se=0,xe=0;xe=q+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(T.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){T.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var W=this._mediaElement.currentTime,q=this._mediaElement.buffered,ne=!1,se=0;se=xe&&W=He-this._config.lazyLoadRecoverDuration&&(ne=!0);break}}ne&&(window.clearInterval(this._progressChecker),this._progressChecker=null,ne&&(T.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(W){for(var q=this._mediaElement.buffered,ne=0;ne=se&&W0){var xe=this._mediaElement.buffered.start(0);(xe<1&&W0&&q.currentTime0){var se=ne.start(0);if(se<1&&q0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(W){this._mediaElement.volume=W}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(W){this._mediaElement.muted=W}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(W){this._mediaElement?this._mediaElement.currentTime=W:this._pendingSeekTime=W}},{key:"mediaInfo",get:function(){var W=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",q={mimeType:W+this._mediaDataSource.type};return this._mediaElement&&(q.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(q.width=this._mediaElement.videoWidth,q.height=this._mediaElement.videoHeight)),q}},{key:"statisticsInfo",get:function(){var W={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return W;var q=!0,ne=0,se=0;if(this._mediaElement.getVideoPlaybackQuality){var xe=this._mediaElement.getVideoPlaybackQuality();ne=xe.totalVideoFrames,se=xe.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(ne=this._mediaElement.webkitDecodedFrameCount,se=this._mediaElement.webkitDroppedFrameCount):q=!1;return q&&(W.decodedFrames=ne,W.droppedFrames=se),W}},{key:"_onvLoadedMetadata",value:function(W){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Le.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Le.STATISTICS_INFO,this.statisticsInfo)}}]),Se}(),Ct=Tt;w.install();function ot(Se,de){var W=Se;if(W==null||typeof W!="object")throw new s("MediaDataSource must be an javascript object!");if(!W.hasOwnProperty("type"))throw new s("MediaDataSource must has type field to indicate video file type!");switch(W.type){case"flv":return new Ze(W,de);default:return new Ct(W,de)}}function gt(){return Ee.supportMSEH264Playback()}function kt(){return Ee.getFeatureList()}var Kt={};Kt.createPlayer=ot,Kt.isSupported=gt,Kt.getFeatureList=kt,Kt.BaseLoader=t,Kt.LoaderStatus=i,Kt.LoaderErrors=n,Kt.Events=Le,Kt.ErrorTypes=Te,Kt.ErrorDetails=je,Kt.FlvPlayer=Ze,Kt.NativePlayer=Ct,Kt.LoggingControl=Ce,Object.defineProperty(Kt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Gt=We.a=Kt},GgEA:function($e,We,z){},Gytx:function($e,We){$e.exports=function(ae,Z,U,w){var P=U?U.call(w,ae,Z):void 0;if(P!==void 0)return!!P;if(ae===Z)return!0;if(typeof ae!="object"||!ae||typeof Z!="object"||!Z)return!1;var S=Object.keys(ae),O=Object.keys(Z);if(S.length!==O.length)return!1;for(var T=Object.prototype.hasOwnProperty.bind(Z),l=0;l>>6)+l(128|I&63):l(224|I>>>12&15)+l(128|I>>>6&63)+l(128|I&63)}else{var I=65536+(D.charCodeAt(0)-55296)*1024+(D.charCodeAt(1)-56320);return l(240|I>>>18&7)+l(128|I>>>12&63)+l(128|I>>>6&63)+l(128|I&63)}},h=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(D){return D.replace(h,p)},a=function(D){var I=[0,2,1][D.length%3],F=D.charCodeAt(0)<<16|(D.length>1?D.charCodeAt(1):0)<<8|(D.length>2?D.charCodeAt(2):0),H=[O.charAt(F>>>18),O.charAt(F>>>12&63),I>=2?"=":O.charAt(F>>>6&63),I>=1?"=":O.charAt(F&63)];return H.join("")},u=w.btoa&&typeof w.btoa=="function"?function(D){return w.btoa(D)}:function(D){if(D.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return D.replace(/[\s\S]{1,3}/g,a)},s=function(D){return u(d(String(D)))},f=function(D){return D.replace(/[+\/]/g,function(I){return I=="+"?"-":"_"}).replace(/=/g,"")},i=function(D,I){return I?f(s(D)):s(D)},n=function(D){return i(D,!0)},t;w.Uint8Array&&(t=function(D,I){for(var F="",H=0,te=D.length;H>>18)+O.charAt(J>>>12&63)+(typeof G!="undefined"?O.charAt(J>>>6&63):"=")+(typeof X!="undefined"?O.charAt(J&63):"=")}return I?f(F):F});var c=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(D){switch(D.length){case 4:var I=(7&D.charCodeAt(0))<<18|(63&D.charCodeAt(1))<<12|(63&D.charCodeAt(2))<<6|63&D.charCodeAt(3),F=I-65536;return l((F>>>10)+55296)+l((F&1023)+56320);case 3:return l((15&D.charCodeAt(0))<<12|(63&D.charCodeAt(1))<<6|63&D.charCodeAt(2));default:return l((31&D.charCodeAt(0))<<6|63&D.charCodeAt(1))}},v=function(D){return D.replace(c,y)},_=function(D){var I=D.length,F=I%4,H=(I>0?T[D.charAt(0)]<<18:0)|(I>1?T[D.charAt(1)]<<12:0)|(I>2?T[D.charAt(2)]<<6:0)|(I>3?T[D.charAt(3)]:0),te=[l(H>>>16),l(H>>>8&255),l(H&255)];return te.length-=[0,0,2,1][F],te.join("")},b=w.atob&&typeof w.atob=="function"?function(D){return w.atob(D)}:function(D){return D.replace(/\S{1,4}/g,_)},m=function(D){return b(String(D).replace(/[^A-Za-z0-9\+\/]/g,""))},g=function(D){return v(b(D))},E=function(D){return String(D).replace(/[-_]/g,function(I){return I=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(D){return g(E(D))},x;w.Uint8Array&&(x=function(D){return Uint8Array.from(m(E(D)),function(I){return I.charCodeAt(0)})});var C=function(){var D=w.Base64;return w.Base64=P,D};if(w.Base64={VERSION:S,atob:m,btoa:u,fromBase64:o,toBase64:i,utob:d,encode:i,encodeURI:n,btou:v,decode:o,noConflict:C,fromUint8Array:t,toUint8Array:x},typeof Object.defineProperty=="function"){var A=function(D){return{value:D,enumerable:!1,writable:!0,configurable:!0}};w.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",A(function(D){return i(this,D)})),Object.defineProperty(String.prototype,"toBase64URI",A(function(){return i(this,!0)}))}}return w.Meteor&&(Base64=w.Base64),$e.exports?$e.exports.Base64=w.Base64:!(Z=[],U=function(){return w.Base64}.apply(We,Z),U!==void 0&&($e.exports=U)),{Base64:w.Base64}})}).call(this,z("IyRk"))},JOrW:function($e,We,z){$e.exports=z.p+"static/gf.09d89ab3.svg"},LdHM:function($e,We,z){"use strict";z.d(We,"b",function(){return c}),z.d(We,"a",function(){return v});var ae=z("1OyB"),Z=z("vuIU"),U=z("Ji7U"),w=z("LK+K"),P=z("q1tI"),S=z("rePB"),O=z("Ff2n"),T=z("ODXe"),l=z("4IlW"),p=z("bX4T"),h=z("YrtM"),d=z("TSYQ"),a=z.n(d),u=z("+nKL"),s=z("8OUc"),f=function(X,J){var B=X.prefixCls,Q=X.id,ie=X.flattenOptions,oe=X.childrenAsData,Ee=X.values,ye=X.searchValue,Le=X.multiple,pe=X.defaultActiveFirstOption,Ce=X.height,Be=X.itemHeight,Pe=X.notFoundContent,ke=X.open,Ne=X.menuItemSelectedIcon,he=X.virtual,ue=X.onSelect,Ie=X.onToggleOpen,Ue=X.onActiveValue,Ye=X.onScroll,ee=X.onMouseEnter,M="".concat(B,"-item"),N=Object(h.a)(function(){return ie},[ke,ie],function(Ke,we){return we[0]&&Ke[1]!==we[1]}),$=P.useRef(null),V=function(we){we.preventDefault()},Y=function(we){$.current&&$.current.scrollTo({index:we})},me=function(we){for(var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=N.length,fe=0;fe1&&arguments[1]!==void 0?arguments[1]:!1;return Object(b.a)(G).map(function(J,B){if(!P.isValidElement(J)||!J.type)return null;var Q=J.type.isSelectOptGroup,ie=J.key,oe=J.props,Ee=oe.children,ye=Object(O.a)(oe,["children"]);return X||!Q?m(J):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(ie===null?B:ie,"__"),label:ie},ye),{},{options:g(Ee)})}).filter(function(J){return J})}var E=z("2Qr1"),o=z("qNPg"),x=z("U8pU"),C=z("Kwbf"),A=z("WKfj");function D(G){var X=G.mode,J=G.options,B=G.children,Q=G.backfill,ie=G.allowClear,oe=G.placeholder,Ee=G.getInputElement,ye=G.showSearch,Le=G.onSearch,pe=G.defaultOpen,Ce=G.autoFocus,Be=G.labelInValue,Pe=G.value,ke=G.inputValue,Ne=G.optionLabelProp,he=X==="multiple"||X==="tags",ue=ye!==void 0?ye:he||X==="combobox",Ie=J||g(B);if(Object(C.a)(X!=="tags"||Ie.every(function(M){return!M.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),X==="tags"||X==="combobox"){var Ue=Ie.some(function(M){return M.options?M.options.some(function(N){return typeof("value"in N?N.value:N.key)=="number"}):typeof("value"in M?M.value:M.key)=="number"});Object(C.a)(!Ue,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(C.a)(X!=="combobox"||!Ne,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(C.a)(X==="combobox"||!Q,"`backfill` only works with `combobox` mode."),Object(C.a)(X==="combobox"||!Ee,"`getInputElement` only work with `combobox` mode."),Object(C.b)(X!=="combobox"||!Ee||!ie||!oe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Le&&!ue&&X!=="combobox"&&X!=="tags"&&Object(C.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(C.b)(!pe||Ce,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Pe!=null){var Ye=Object(A.d)(Pe);Object(C.a)(!Be||Ye.every(function(M){return Object(x.a)(M)==="object"&&("key"in M||"value"in M)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(C.a)(!he||Array.isArray(Pe),"`value` should be array when `mode` is `multiple` or `tags`")}if(B){var ee=null;Object(b.a)(B).some(function(M){if(!P.isValidElement(M)||!M.type)return!1;var N=M.type;if(N.isSelectOption)return!1;if(N.isSelectOptGroup){var $=Object(b.a)(M.props.children).every(function(V){return!P.isValidElement(V)||!M.type||V.type.isSelectOption?!0:(ee=V.type,!1)});return!$}return ee=N,!0}),ee&&Object(C.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ee.displayName||ee.name||ee,"`.")),Object(C.a)(ke===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var I=D,F=Object(o.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:g,flattenOptions:E.d,getLabeledValue:E.e,filterOptions:E.b,isValueDisabled:E.g,findValueOption:E.c,warningProps:I,fillOptionsWithMissingValue:E.a}),H=function(G){Object(U.a)(J,G);var X=Object(w.a)(J);function J(){var B;return Object(ae.a)(this,J),B=X.apply(this,arguments),B.selectRef=P.createRef(),B.focus=function(){B.selectRef.current.focus()},B.blur=function(){B.selectRef.current.blur()},B}return Object(Z.a)(J,[{key:"render",value:function(){return P.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),J}(P.Component);H.Option=c,H.OptGroup=v;var te=H,j=We.c=te},M8RZ:function($e,We,z){"use strict";z.d(We,"a",function(){return l});var ae=z("fWQN"),Z=z("mtLc"),U=z("yKVA"),w=z("879j"),P=z("q1tI"),S=z.n(P),O=z("i8i4"),T=z.n(O),l=function(p){Object(U.a)(d,p);var h=Object(w.a)(d);function d(a){var u;Object(ae.a)(this,d),u=h.call(this,a);var s=window.document;return u.node=s.createElement("div"),s.body.appendChild(u.node),u}return Object(Z.a)(d,[{key:"render",value:function(){var u=this.props.children;return Object(O.createPortal)(u,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),d}(S.a.Component)},MFOe:function($e,We,z){(function(ae){var Z=S(),U=O(),w=T(),P=typeof window!="undefined"?window:ae;$e.exports={assign:Z,create:U,trim:w,bind:l,slice:p,each:h,map:d,pluck:a,isList:u,isFunction:s,isObject:f,Global:P};function S(){return Object.assign?Object.assign:function(n,t,c,y){for(var v=1;v=0;f-=1){var i=T.get(f)||new Set;i.forEach(function(n){var t=n.parent,c=n.node;if(p(c)||!n.parent||s.has(n.parent.key))return;if(p(n.parent.node)){s.add(t.key);return}var y=!0,v=!1;(t.children||[]).filter(function(_){return!p(_.node)}).forEach(function(_){var b=_.key,m=h.has(b);y&&!m&&(y=!1),!v&&(m||d.has(b))&&(v=!0)}),y&&h.add(t.key),v&&d.add(t.key),s.add(t.key)})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(Z(d,h))}}function P(O,T,l,p,h){for(var d=new Set(O),a=new Set(T),u=0;u<=p;u+=1){var s=l.get(u)||new Set;s.forEach(function(t){var c=t.key,y=t.node,v=t.children,_=v===void 0?[]:v;!d.has(c)&&!a.has(c)&&!h(y)&&_.filter(function(b){return!h(b.node)}).forEach(function(b){d.delete(b.key)})})}a=new Set;for(var f=new Set,i=p;i>=0;i-=1){var n=l.get(i)||new Set;n.forEach(function(t){var c=t.parent,y=t.node;if(h(y)||!t.parent||f.has(t.parent.key))return;if(h(t.parent.node)){f.add(c.key);return}var v=!0,_=!1;(c.children||[]).filter(function(b){return!h(b.node)}).forEach(function(b){var m=b.key,g=d.has(m);v&&!g&&(v=!1),!_&&(g||a.has(m))&&(_=!0)}),v||d.delete(c.key),_&&a.add(c.key),f.add(c.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(Z(a,d))}}function S(O,T,l,p){var h=[],d;p?d=p:d=U;var a=new Set(O.filter(function(i){var n=!!l[i];return n||h.push(i),n})),u=new Map,s=0;Object.keys(l).forEach(function(i){var n=l[i],t=n.level,c=u.get(t);c||(c=new Set,u.set(t,c)),c.add(n),s=Math.max(s,t)}),Object(ae.a)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var f;return T===!0?f=w(a,u,s,d):f=P(a,T.halfCheckedKeys,u,s,d),f}},OLES:function($e,We,z){"use strict";var ae=z("U8pU"),Z=z("VTBJ"),U=z("Ff2n"),w=z("q1tI"),P=z("uciX"),S=z("7ixt"),O=function(a){var u=a.overlay,s=a.prefixCls,f=a.id,i=a.overlayInnerStyle;return w.createElement("div",{className:"".concat(s,"-inner"),id:f,role:"tooltip",style:i},typeof u=="function"?u():u)},T=O,l=function(a,u){var s=a.overlayClassName,f=a.trigger,i=f===void 0?["hover"]:f,n=a.mouseEnterDelay,t=n===void 0?0:n,c=a.mouseLeaveDelay,y=c===void 0?.1:c,v=a.overlayStyle,_=a.prefixCls,b=_===void 0?"rc-tooltip":_,m=a.children,g=a.onVisibleChange,E=a.afterVisibleChange,o=a.transitionName,x=a.animation,C=a.placement,A=C===void 0?"right":C,D=a.align,I=D===void 0?{}:D,F=a.destroyTooltipOnHide,H=F===void 0?!1:F,te=a.defaultVisible,j=a.getTooltipContainer,G=a.overlayInnerStyle,X=Object(U.a)(a,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(w.useRef)(null);Object(w.useImperativeHandle)(u,function(){return J.current});var B=Object(Z.a)({},X);"visible"in a&&(B.popupVisible=a.visible);var Q=function(){var Le=a.arrowContent,pe=Le===void 0?null:Le,Ce=a.overlay,Be=a.id;return[w.createElement("div",{className:"".concat(b,"-arrow"),key:"arrow"},pe),w.createElement(T,{key:"content",prefixCls:b,id:Be,overlay:Ce,overlayInnerStyle:G})]},ie=!1,oe=!1;if(typeof H=="boolean")ie=H;else if(H&&Object(ae.a)(H)==="object"){var Ee=H.keepParent;ie=Ee===!0,oe=Ee===!1}return w.createElement(P.a,Object.assign({popupClassName:s,prefixCls:b,popup:Q,action:i,builtinPlacements:S.a,popupPlacement:A,ref:J,popupAlign:I,getPopupContainer:j,onPopupVisibleChange:g,afterPopupVisibleChange:E,popupTransitionName:o,popupAnimation:x,defaultPopupVisible:te,destroyPopupOnHide:ie,autoDestroy:oe,mouseLeaveDelay:y,popupStyle:v,mouseEnterDelay:t},B),m)},p=Object(w.forwardRef)(l),h=We.a=p},OZM5:function($e,We,z){"use strict";z.d(We,"b",function(){return p}),z.d(We,"a",function(){return h}),z.d(We,"k",function(){return d}),z.d(We,"h",function(){return a}),z.d(We,"i",function(){return u}),z.d(We,"g",function(){return s}),z.d(We,"c",function(){return f}),z.d(We,"d",function(){return i}),z.d(We,"j",function(){return c}),z.d(We,"e",function(){return y}),z.d(We,"f",function(){return v});var ae=z("KQm4"),Z=z("U8pU"),U=z("Ff2n"),w=z("q1tI"),P=z.n(w),S=z("Kwbf"),O=z("WaYH"),T=.25,l=2;function p(_,b){var m=_.slice(),g=m.indexOf(b);return g>=0&&m.splice(g,1),m}function h(_,b){var m=_.slice();return m.indexOf(b)===-1&&m.push(b),m}function d(_){return _.split("-")}function a(_,b){return"".concat(_,"-").concat(b)}function u(_){return _&&_.type&&_.type.isTreeNode}function s(_,b){var m=[_],g=b[_];function E(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(x){var C=x.key,A=x.children;m.push(C),E(A)})}return E(g.children),m}function f(_,b){var m=_.clientY,g=b.selectHandle.getBoundingClientRect(),E=g.top,o=g.bottom,x=g.height,C=Math.max(x*T,l);return m<=E+C?-1:m>=o-C?1:0}function i(_,b){if(!_)return;var m=b.multiple;return m?_.slice():_.length?[_[0]]:_}var n=function(b){return b};function t(_,b){if(!_)return[];var m=b||{},g=m.processProps,E=g===void 0?n:g,o=Array.isArray(_)?_:[_];return o.map(function(x){var C=x.children,A=Object(U.a)(x,["children"]),D=t(C,b);return P.a.createElement(O.a,Object.assign({},E(A)),D)})}function c(_){if(!_)return null;var b;if(Array.isArray(_))b={checkedKeys:_,halfCheckedKeys:void 0};else if(Object(Z.a)(_)==="object")b={checkedKeys:_.checked||void 0,halfCheckedKeys:_.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return b}function y(_,b){var m=new Set;function g(E){if(m.has(E))return;var o=b[E];if(!o)return;m.add(E);var x=o.parent,C=o.node;if(C.disabled)return;x&&g(x.key)}return(_||[]).forEach(function(E){g(E)}),Object(ae.a)(m)}function v(_){var b={};return Object.keys(_).forEach(function(m){(m.startsWith("data-")||m.startsWith("aria-"))&&(b[m]=_[m])}),b}},"OkW/":function($e,We,z){},Ot1p:function($e,We,z){"use strict";var ae=z("2qtc"),Z=z("kLXV"),U=z("rAM+"),w=z("miYZ"),P=z("tsqr"),S=z("tJVT"),O=z("jrin"),T=z("q1tI"),l=z.n(T),p=z("VrN/"),h=z.n(p),d=z("bdgK"),a=z("p77/"),u=z("Bd2K"),s=z("ELLl"),f=z("19Vz"),i=z("lZu9"),n=z("+NIl"),t=z("kSUc"),c=z("9Bee"),y=function(we){var Ae=we.value,Oe=Ae===void 0?"":Ae,fe=we.className,ge=we.showTextOnly,_e=we.showLines,be=we.style,Ge=be===void 0?{}:be,qe=Object(T.useMemo)(function(){return""},[Oe]);return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{dangerouslySetInnerHTML:{__html:qe}}))},v=z("0Owb"),_=z("dejd"),b=z("C+DQ"),m=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function g(we){var Ae=we.onActionCallback,Oe=we.title,fe=we.icon,ge=we.actionName,_e=we.className,be=_e===void 0?"":_e,Ge=we.children;function qe(){Ae(ge)}return l.a.createElement("a",{title:Oe,className:be,onClick:qe},l.a.createElement("i",{className:"md-iconfont ".concat(fe)}),Ge)}var E=function(we){var Ae=we.watch,Oe=we.showNullButton,fe=we.onActionCallback,ge=we.fullScreen,_e=we.insertTemp,be=we.hidetoolBar,Ge=[].concat(m,[{title:"".concat(Ae?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(Ae?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return l.a.createElement("ul",{className:"markdown-toolbar-container"},!be&&Ge.map(function(qe,pt){return l.a.createElement("li",{key:pt},qe.actionName?l.a.createElement(g,Object(v.a)({},qe,{onActionCallback:fe})):l.a.createElement("span",{className:"v-line"}))}),Oe?l.a.createElement("li",null,l.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:fe},l.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,_e&&l.a.createElement("li",null,l.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(_e),onActionCallback:fe},l.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),l.a.createElement("li",{className:"btn-full-screen"},l.a.createElement(g,{icon:"".concat(ge?"icon-shrink":"icon-enlarge"),title:ge?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:fe})))},o=z("M8RZ"),x=z("+L6B"),C=z("2/Rp"),A=z("y8nQ"),D=z("Vl3Y"),I=z("5NDa"),F=z("5rEg"),H={labelCol:{span:4},wrapperCol:{span:20}},te=function(we){var Ae=we.callback,Oe=we.onCancel;function fe(ge){Ae(ge)}return l.a.createElement(D.a,Object(v.a)({},H,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:fe}),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},l.a.createElement(F.a,null)),l.a.createElement(D.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},l.a.createElement(F.a,null)),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},j=z("7ahc"),G=z("HmJG"),X=z("BjJ7"),J=D.a.useForm,B={width:280,marginRight:10},Q={labelCol:{span:5},wrapperCol:{span:19}},ie=function(we){var Ae=we.callback,Oe=we.onCancel,fe=J(),ge=Object(S.a)(fe,1),_e=ge[0];function be(pt){Ae(pt)}function Ge(pt,Dt){_e.setFieldsValue({src:"/api/attachments/".concat(pt.id),type:Dt.type})}function qe(pt){var Dt=pt.target.files[0];Ee(Dt,Ge)}return l.a.createElement(D.a,Object(v.a)({form:_e},Q,{className:"upload-image-panel",onFinish:be}),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},l.a.createElement("div",{className:"flex-container"},l.a.createElement(D.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},l.a.createElement(F.a,{style:B})),l.a.createElement(oe,{onFileChange:qe}))),l.a.createElement(D.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},l.a.createElement(F.a,{style:{width:264}})),l.a.createElement(D.a.Item,{style:{textAlign:"right"}},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))};function oe(we){var Ae=we.onFileChange;return l.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",l.a.createElement("input",{type:"file",onChange:Ae}))}function Ee(we,Ae){if(!we)throw new String("\u6CA1\u6709\u6587\u4EF6");var Oe=new FormData;Oe.append("editormd-image-file",we),Oe.append("file_param_name","editormd-image-file"),Oe.append("byxhr","true");var fe=new window.XMLHttpRequest;fe.withCredentials=!0,fe.addEventListener("load",function(ge){Ae(JSON.parse(ge.target.responseText),we)},!1),fe.addEventListener("error",function(ge){console.error(ge)},!1),fe.open("POST","".concat(X.a,"/api/attachments.json")),fe.send(Oe)}var ye=z("giR+"),Le=z("fyUT"),pe=z("7Kak"),Ce=z("9yH6"),Be=Ce.a.Group,Pe={margin:"0 8px"},ke=function(we){var Ae=we.callback,Oe=we.onCancel;function fe(ge){Ae(ge)}return l.a.createElement(D.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:fe},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{style:Pe},"\u5355\u5143\u683C\u6570\uFF1A"),l.a.createElement("span",{style:Pe},"\u884C\u6570"),l.a.createElement(D.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},l.a.createElement(Le.a,null)),l.a.createElement("span",{style:Pe},"\u5217\u6570"),l.a.createElement(D.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},l.a.createElement(Le.a,null))),l.a.createElement("div",{className:"flex-container",style:{marginTop:12}},l.a.createElement("span",{style:Pe},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),l.a.createElement(D.a.Item,{name:"align"},l.a.createElement(Be,null,l.a.createElement(Ce.a,{value:"default"},l.a.createElement("i",{className:"fa fa-align-justify"})),l.a.createElement(Ce.a,{value:"left"},l.a.createElement("i",{className:"fa fa-align-left"})),l.a.createElement(Ce.a,{value:"center"},l.a.createElement("i",{className:"fa fa-align-center"})),l.a.createElement(Ce.a,{value:"right"},l.a.createElement("i",{className:"fa fa-align-right"}))))),l.a.createElement("div",{className:"flex-container flex-end"},l.a.createElement(C.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),l.a.createElement(C.a,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))},Ne=z("m3rI"),he="link",ue="upload-image",Ie="code-block",Ue="add-table",Ye="------------",ee={default:Ye,left:":".concat(Ye),center:":".concat(Ye,":"),right:"".concat(Ye,":")},M=z("9VGf"),N,$;function V(){}var Y=0,me=1e4,Re="\u2581",rt=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function De(we){return/^\d+$/.test(we)?"".concat(we,"px"):we}var Me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Xe=Me?"Cmd":"Ctrl",tt=(N={},Object(O.a)(N,Xe+"-B","bold"),Object(O.a)(N,Xe+"-I","italic"),N),Ve=($={},Object(O.a)($,he,"\u6DFB\u52A0\u94FE\u63A5"),Object(O.a)($,Ie,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(O.a)($,ue,"\u6DFB\u52A0\u56FE\u7247"),Object(O.a)($,Ue,"\u6DFB\u52A0\u8868\u683C"),$),Ke=We.a=function(we){var Ae=we.defaultValue,Oe=Ae===void 0?"":Ae,fe=we.onChange,ge=we.width,_e=ge===void 0?"100%":ge,be=we.height,Ge=be===void 0?400:be,qe=we.miniToolbar,pt=qe===void 0?!1:qe,Dt=we.isFocus,jt=Dt===void 0?!1:Dt,Rt=we.watch,Lt=we.insertTemp,lt=we.mode,ft=lt===void 0?"markdown":lt,Qe=we.id,Te=Qe===void 0?"markdown-editor-id":Qe,je=we.showResizeBar,dt=je===void 0?!1:je,Ze=we.noStorage,Tt=Ze===void 0?!1:Ze,Ct=we.showNullButton,ot=Ct===void 0?!1:Ct,gt=we.hidetoolBar,kt=gt===void 0?!1:gt,Kt=we.fullScreen,Gt=Kt===void 0?!1:Kt,Se=we.onBlur,de=we.onCMBeforeChange,W=we.onFullScreen,q=we.className,ne=q===void 0?"":q,se=we.disablePaste,xe=se===void 0?!1:se,He=we.placeholder,Je=He===void 0?"":He,Et=we.values,St=Et===void 0?"":Et,nt=Object(T.useState)(null),xt=Object(S.a)(nt,2),ut=xt[0],_t=xt[1],Qt=Object(T.useState)(Oe),Xt=Object(S.a)(Qt,2),Mt=Xt[0],mt=Xt[1],Cn=Object(T.useState)(Rt),En=Object(S.a)(Cn,2),Jt=En[0],un=En[1],Jn=Object(T.useState)(Gt),ar=Object(S.a)(Jn,2),mn=ar[0],gr=ar[1],Rr=Object(T.useState)(""),vn=Object(S.a)(Rr,2),An=vn[0],_r=vn[1],Zr=Object(T.useState)(0),jr=Object(S.a)(Zr,2),tr=jr[0],ur=jr[1],yi=Object(T.useState)(Ge),xr=Object(S.a)(yi,2),Cr=xr[0],Sr=xr[1],Vr=Object(T.useState)(!1),Mr=Object(S.a)(Vr,2),Si=Mr[0],Or=Mr[1],ei=Object(T.useRef)(),ri=Object(T.useRef)(),Xr=Object(T.useRef)(),ui=Object(T.useRef)();Object(T.useEffect)(function(){mt(St),ut==null||ut.setValue(St)},[St]),Object(T.useEffect)(function(){W==null||W(mn)},[mn]),Object(T.useEffect)(function(){if(ei.current){var tn=h.a.fromTextArea(ei.current,{mode:ft,lineNumbers:!pt,lineWrapping:!0,value:Oe,autoCloseTags:!0,autoCloseBrackets:!0});jt&&tn.focus();function xn(fn,Zn){if(xe){Zn.preventDefault();return}var nr=Zn.clipboardData;if(nr){var cr=nr.types.toString(),hr=nr.items,pr=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];if(cr==="Files"||nr.types.indexOf("Files")>-1){if(Zn.preventDefault(),ft=="stex")return;try{var kr,oi=hr[1];((kr=hr[0])===null||kr===void 0?void 0:kr.kind)==="file"&&(oi=hr[0]);var er=oi.getAsFile(),_i=er.name.split(".").pop();Ee(er,function(Fr){if(Fr.id){var Ti,fi,Pi;(er==null||((Ti=er.type)===null||Ti===void 0)?void 0:Ti.indexOf("image"))>-1?tn.replaceSelection("![,](/api/attachments/".concat(Fr.id,"?type=").concat(Fr.content_type,")")):(er==null||((fi=er.type)===null||fi===void 0)?void 0:fi.indexOf("video"))>-1?tn.replaceSelection('')):(er==null||((Pi=er.type)===null||Pi===void 0)?void 0:Pi.indexOf("pdf"))>-1?tn.replaceSelection('
    ').concat(er.name,"")):pr.includes(_i)?tn.replaceSelection('').concat(er.name,"")):tn.replaceSelection("[".concat(er.name,"](").concat(Ne.a.API_SERVER,"/api/attachments/").concat(Fr.id,"?type=").concat(Fr.content_type,")"))}else(Fr==null?void 0:Fr.status)===401&&(document.location.href="/user/login")})}catch(Fr){P.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tn.on("paste",xn),_t(tn),function(){tn.off("paste",xn)}}},[]);var Ri=Object(T.useCallback)(function(){if(ri.current)try{}catch(tn){console.log(tn,"---- to set md editor body height")}},[Cr,ri,mn]);Object(T.useEffect)(function(){function tn(){var fn=new d.default(function(Zn){var nr=Object(U.a)(Zn),cr;try{for(nr.s();!(cr=nr.n()).done;){var hr=cr.value;(hr.target.offsetHeight>0||hr.target.offsetWidth>0)&&(Ri(),ut.setSize("100%","100%"),ut.refresh())}}catch(pr){nr.e(pr)}finally{nr.f()}});return fn.observe(ei.current.parentElement),fn}if(ut){var xn=tn();return function(){xn.unobserve(ei.current.parentElement)}}},[ut,Ri]),Object(T.useEffect)(function(){if(ut){for(var tn=[],xn=function(){var hr=Zn[fn];nr=Object(S.a)(hr,2);var pr=nr[0],kr=nr[1],oi=Object(O.a)({},pr,function(){bi(kr)});tn.push(oi),ut.addKeyMap(oi)},fn=0,Zn=Object.entries(tt);fn0){var tn=new Date().getTime(),xn=window.sessionStorage.getItem(Te);tn>=tr+me&&(!xn||xn!==Mt)&&(window.sessionStorage.setItem(Te,Mt),Or(!0))}},me),Object(T.useEffect)(function(){un(Rt)},[ut,Rt]),Object(T.useEffect)(function(){ut&&(jt&&ut.focus())},[ut,jt]),Object(T.useEffect)(function(){if(Jt&&ut){var tn=ut.getScrollerElement();function xn(fn){var Zn=fn.target;if(ui.current){var nr=Zn.scrollTop/Zn.scrollHeight;ui.current.scrollTop=ui.current.scrollHeight*nr}}return tn.addEventListener("scroll",xn),function(){tn.removeEventListener("scroll",xn)}}},[ut,Jt]),Object(T.useEffect)(function(){if(ut&&de){function tn(xn,fn){de(xn,fn)}return ut.on("beforeChange",tn),function(){ut.off("beforeChange",tn)}}},[ut,de]),Object(T.useEffect)(function(){if(ut&&Se){function tn(){Se(ut.getValue())}return ut.on("blur",tn),function(){ut.off("blur",tn)}}},[ut,Se]),Object(T.useEffect)(function(){if(ut){function tn(xn){var fn=xn.getValue();mt(fn),ur(new Date().getTime()),xn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),fe&&fe(fn)}return ut.on("change",tn),function(){ut.off("change",tn)}}},[ut,fe]),Object(T.useEffect)(function(){ut&&(Oe==null?(ut.setValue(""),mt("")):Oe!==ut.getValue()&&(ut.setValue(Oe),mt(Oe),ut.setCursor(ut.lineCount(),0)))},[ut,Oe]);var bi=Object(T.useCallback)(function(tn){var xn=ut.getCursor(),fn=ut.getSelection(),Zn=fn.split(` `);switch(tn){case"bold":return ut.replaceSelection("**"+fn+"**"),fn===""&&ut.setCursor(xn.line,xn.ch+2),ut.focus();case"italic":return ut.replaceSelection("*"+fn+"*"),fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.focus();case"code":return ut.replaceSelection("`"+fn+"`"),fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.focus();case"inline-latex":return ut.replaceSelection("`$$"+fn+"$$`"),fn===""&&ut.setCursor(xn.line,xn.ch+3),ut.focus();case"latex":return ut.replaceSelection("```latex\n"+fn+"\n```"),ut.setCursor(xn.line+1,fn.length+1),ut.focus();case"line-break":return ut.replaceSelection(`
    `),ut.focus();case"list-ul":return fn===""?ut.replaceSelection("- "+fn):ut.replaceSelection(Zn.map(function(nr){return nr===""?"":"- ".concat(nr)}).join(` `)),ut.focus();case"list-ol":return fn===""?ut.replaceSelection("1. "+fn):ut.replaceSelection(Zn.map(function(nr,cr){return nr===""?"":"".concat(cr+1,". ").concat(nr)}).join(` `)),ut.focus();case"add-null-ch":return fn===""&&ut.setCursor(xn.line,xn.ch+1),ut.replaceSelection(Re),ut.focus();case"inster-template-1":return fn===""&&ut.setCursor(xn.line,xn.ch),ut.replaceSelection(rt),ut.focus();case"eraser":return ut.setValue(""),ut.focus();case"trigger-watch":return un(!Jt),ut.focus();case"trigger-full-screen":return gr(!mn),ut.focus();case he:_r(he);return;case Ie:_r(Ie);return;case ue:_r(ue);return;case Ue:_r(Ue);return;default:throw new Error}},[ut,Jt,mn]),ii=Object(T.useCallback)(function(tn){_r("");switch(An){case he:var xn=tn.title,fn=tn.link;return ut.replaceSelection("[".concat(xn,"](").concat(fn,")")),ut.focus();case Ie:var Zn=tn.language,nr=tn.content;return ut.replaceSelection(["```"+Zn,nr,"```"].join(` `)),ut.focus();case ue:var cr=tn.src,hr=tn.alt;return ut.replaceSelection("![ ".concat(hr," ]( ").concat(cr,' "').concat(hr,'" )')),ut.focus();case Ue:for(var pr=tn.row,kr=tn.col,oi=tn.align,er=` `,_i=0;_i300&&(pr=300);var kr=Ge+pr+"px";Sr(kr)}}return tn.addEventListener("mousedown",Zn),document.addEventListener("mousemove",cr),document.addEventListener("mouseup",nr),function(){tn.removeEventListener("mousedown",Zn),document.removeEventListener("mousemove",cr),document.removeEventListener("mouseup",nr)}}},[ut,Xr]),Object(T.useEffect)(function(){Sr(Ge)},[Ge]);var ai=De(_e),Di=De(Cr),Ni={width:ai,height:Di},wi=Object(T.useMemo)(function(){if(tr){var tn=new Date(tr),xn=tn.getHours(),fn=tn.getMinutes(),Zn=tn.getSeconds();return xn=xn<10?"0"+xn:xn,fn=fn<10?"0"+fn:fn,Zn=Zn<10?"0"+Zn:Zn,"".concat(xn,":").concat(fn,":").concat(Zn)}return 0},[tr]);function ga(){window.sessionStorage.removeItem(Te),Or(!1),ur(0)}function la(){Or(!1),ur(0),ut.setValue(window.sessionStorage.getItem(Te))}return l.a.createElement(T.Fragment,null,l.a.createElement("div",{className:"markdown-editor-wrapper",ref:ri},l.a.createElement("div",{className:"markdown-editor-container ".concat(ne," ").concat(Jt?"on-preview":""," ").concat(pt?"mini":""," ").concat(mn?"full-screen":""),style:Ni},l.a.createElement(E,{insertTemp:Lt,watch:Jt,fullScreen:mn,showNullButton:ot,onActionCallback:bi,hidetoolBar:kt}),l.a.createElement("div",{className:"markdown-editor-body"},l.a.createElement("div",{className:"codemirror-container"},l.a.createElement("textarea",{ref:ei,placeholder:Je})),Jt?l.a.createElement("div",{ref:ui,className:"preview-container"},ft==="stex"&&l.a.createElement(y,{value:Mt}),ft!=="stex"&&l.a.createElement(c.a,{value:Mt})):null))),dt?l.a.createElement("a",{ref:Xr,className:"editor-resize"}):null,l.a.createElement(o.a,null,Ve[An]?l.a.createElement(Z.a,{centered:!0,title:Ve[An],visible:!0,onCancel:or,footer:null},yr):null))}},P5Jw:function($e,We,z){"use strict";var ae=z("rHrb"),Z=ae.CopyToClipboard;Z.CopyToClipboard=Z,$e.exports=Z},PD8m:function($e,We){$e.exports={name:"memoryStorage",read:ae,write:Z,each:U,remove:w,clearAll:P};var z={};function ae(S){return z[S]}function Z(S,O){z[S]=O}function U(S){for(var O in z)z.hasOwnProperty(O)&&S(z[O],O)}function w(S){delete z[S]}function P(S){z={}}},RELg:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"oldIE-userDataStorage",write:O,read:T,each:l,remove:p,clearAll:h};var U="storejs",w=Z.document,P=u(),S=(Z.navigator?Z.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function O(s,f){if(S)return;var i=a(s);P(function(n){n.setAttribute(i,f),n.save(U)})}function T(s){if(S)return;var f=a(s),i=null;return P(function(n){i=n.getAttribute(f)}),i}function l(s){P(function(f){for(var i=f.XMLDocument.documentElement.attributes,n=i.length-1;n>=0;n--){var t=i[n];s(f.getAttribute(t.name),t.name)}})}function p(s){var f=a(s);P(function(i){i.removeAttribute(f),i.save(U)})}function h(){P(function(s){var f=s.XMLDocument.documentElement.attributes;s.load(U);for(var i=f.length-1;i>=0;i--)s.removeAttribute(f[i].name);s.save(U)})}var d=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function a(s){return s.replace(/^\d/,"___$&").replace(d,"___")}function u(){if(!w||!w.documentElement||!w.documentElement.addBehavior)return null;var s="script",f,i,n;try{i=new ActiveXObject("htmlfile"),i.open(),i.write("<"+s+">document.w=window'),i.close(),f=i.w.frames[0].document,n=f.createElement("div")}catch(t){n=w.createElement("div"),f=w.body}return function(t){var c=[].slice.call(arguments,0);c.unshift(n),f.appendChild(n),n.addBehavior("#default#userData"),n.load(U),t.apply(this,c),f.removeChild(n);return}}},RpDr:function($e,We,z){"use strict";z.d(We,"a",function(){return _}),z.d(We,"c",function(){return g});var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("k1fw"),P=z("jrin"),S=z("5NDa"),O=z("5rEg"),T=z("q1tI"),l=z.n(T),p=z("8Skl"),h=z("y3Kf"),d=z("bdLU"),a=z("J66h"),u=z.n(a),s=z("++UQ"),f=z.n(s),i=z("IxHN"),n=z("9Bee"),t=z("1vsH"),c,y=O.a.TextArea,v={visible:!1,tabIndex:"0"},_=(c={},Object(P.a)(c,d.a.NOMATCH,"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D"),Object(P.a)(c,d.a.OK,"\u8C03\u8BD5\u901A\u8FC7"),Object(P.a)(c,2,"\u8C03\u8BD5\u8D85\u65F6"),Object(P.a)(c,3,"\u8C03\u8BD5pod\u5931\u8D25"),Object(P.a)(c,4,"\u7F16\u8BD1\u5931\u8D25"),Object(P.a)(c,5,"\u6267\u884C\u5931\u8D25"),c),b;(function(o){o[o.SET_VISIBLE=0]="SET_VISIBLE",o[o.SET_TABINDEX=1]="SET_TABINDEX"})(b||(b={}));function m(o,x){switch(x.type){case b.SET_VISIBLE:return Object(w.a)(Object(w.a)({},o),{},{visible:x.payload});case b.SET_TABINDEX:return Object(w.a)(Object(w.a)({},o),{},{tabIndex:x.payload});default:throw new Error}}function g(o){var x=o.status,C=o.error_msg,A=o.output,D=o.input,I=o.expected_output,F=o.is_file,H=o.input_file_url,te=o.output_file_url,j=o.expected_output_file_url,G=null,X={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(x){case d.a.NOMATCH:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:A&&a.Base64.decode(A)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(te,A)}},A)),l.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!F&&l.a.createElement(n.a,{value:I&&a.Base64.decode(I)||"",style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(j,I)}},I)));break;case d.a.EXECUTEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.COMPILEFAILURE:G=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!F&&l.a.createElement(n.a,{value:D,style:X}),F&&l.a.createElement("div",{style:X},l.a.createElement("a",{onClick:function(){return Object(t.w)(H,D)}},D)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.PODFAILURE:G=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:G=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",G," ")}function E(o){var x=o.status,C=o.error_msg,A=o.execute_time,D=o.output,I=o.input,F=o.expected_output,H=o.is_file,te=o.input_file_url,j=o.output_file_url,G=o.expected_output_file_url,X=null;switch(x){case d.a.OK:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",A),l.a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),l.a.createElement("pre",null,a.Base64.decode(D)));break;case d.a.NOMATCH:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u8F93\u51FA\uFF1A",D&&a.Base64.decode(D)),l.a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",F&&a.Base64.decode(F)));break;case d.a.EXECUTEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.COMPILEFAILURE:X=l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",l.a.createElement("pre",null,I)),l.a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),l.a.createElement("pre",{className:"error"},a.Base64.decode(C)));break;case d.a.PODFAILURE:X=l.a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case d.a.TIMEOUT:X=l.a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return l.a.createElement(l.a.Fragment,null," ",X," ")}We.b=function(o){var x=o.id,C=o.input,A=o.debuging,D=o.submitting,I=o.executingMessage,F=o.debugResult,H=o.onChangeInput,te=o.onDebugCode,j=o.onSubmitCode,G=Object(T.useReducer)(m,v),X=Object(U.a)(G,2),J=X[0],B=X[1],Q=J.visible,ie=J.tabIndex;Object(T.useEffect)(function(){B({type:b.SET_VISIBLE,payload:!1})},[x]);function oe(pe){var Ce=pe.target.id;B({type:b.SET_TABINDEX,payload:Ce})}function Ee(){B({type:b.SET_VISIBLE,payload:!Q})}var ye=Object(T.useMemo)(function(){if(F){var pe=F.status;return l.a.createElement(l.a.Fragment,null,E(F))}return null},[F]);function Le(){B({type:b.SET_VISIBLE,payload:!0}),B({type:b.SET_TABINDEX,payload:"1"}),te()}return l.a.createElement("div",{className:"test-case-panel"},l.a.createElement("div",{className:"test-case-panel-body ".concat(Q?"active":"")},l.a.createElement("ul",{className:"s-navs"},l.a.createElement("li",null,l.a.createElement("a",{className:ie==="0"?"active":"",id:"0",onClick:oe},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),l.a.createElement("li",null,l.a.createElement("a",{className:ie==="1"?"active":"",id:"1",onClick:oe},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"))),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="0"?"":"hide")},l.a.createElement(y,{placeholder:"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D",value:C,onChange:H})),l.a.createElement("div",{className:"tab-panel-body ".concat(ie==="1"?"":"hide")},A?l.a.createElement(i.a,{message:I}):F?l.a.createElement("section",{style:{height:200}}," ",ye," "):l.a.createElement("p",{className:"tip"},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D"))),l.a.createElement("a",{className:"btn-collapse ".concat(Q?"up":""),onClick:Ee},Q?l.a.createElement(p.a,null):l.a.createElement(h.a,null)),l.a.createElement("footer",{className:"footer"},l.a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),l.a.createElement("div",{className:"flex-container"},l.a.createElement(Z.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),l.a.createElement(Z.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),l.a.createElement(Z.a,{className:"btn-green",type:"ghost",loading:A,onClick:Le},"\u8C03\u8BD5\u4EE3\u7801"),l.a.createElement(Z.a,{type:"primary",loading:D,disabled:D,onClick:function(){B({type:b.SET_VISIBLE,payload:!1}),j()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},"S/kP":function($e,We,z){$e.exports=z.p+"static/time.a3dc82f3.svg"},"SA+Z":function($e,We,z){var ae=z("wTVA"),Z=z("EbDI"),U=z("ZhPi"),w=z("wkBT");function P(S){return ae(S)||Z(S)||U(S)||w()}$e.exports=P,$e.exports.__esModule=!0,$e.exports.default=$e.exports},SJMd:function($e,We){/** * @license * Copyright (C) 2006 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var z,ae,Z,U=!1,w,P;window.PR_SHOULD_USE_CONTINUATION=!0;var S,O;(function(){var T=window,l=["break,continue,do,else,for,if,return,while"],p=[l,"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"],h=[p,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[h,"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"],a=[h,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],u=[h,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",f=[h,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="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",n=[l,"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"],t=[l,"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"],c=[l,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[d,u,a,f,i,n,t,c],v=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_="str",b="kwd",m="com",g="typ",E="lit",o="pun",x="pln",C="tag",A="dec",D="src",I="atn",F="atv",H="nocode",te="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function j(ue){for(var Ie=0,Ue=!1,Ye=!1,ee=0,M=ue.length;ee122||(fe<65||Oe>90||Xe.push([Math.max(65,Oe)|32,Math.min(fe,90)|32]),fe<97||Oe>122||Xe.push([Math.max(97,Oe)&~32,Math.min(fe,122)&~32]))}}Xe.sort(function(Ge,qe){return Ge[0]-qe[0]||qe[1]-Ge[1]});for(var ge=[],_e=[],Ke=0;Kebe[0]&&(be[1]+1>be[0]&&Ve.push("-"),Ve.push(Y(be[1])))}return Ve.push("]"),Ve.join("")}function Re(De){for(var Me=De.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")),Xe=Me.length,tt=[],Ve=0,Ke=0;Ve=2&&Oe==="["?Me[Ve]=me(we):Oe!=="\\"&&(Me[Ve]=we.replace(/[a-zA-Z]/g,function(_e){var be=_e.charCodeAt(0);return"["+String.fromCharCode(be&~32,be|32)+"]"}))}return Me.join("")}for(var rt=[],ee=0,M=ue.length;ee=0;)Ue[rt.charAt(De)]=Re;var Me=Re[1],Xe=""+Me;V.hasOwnProperty(Xe)||($.push(Me),V[Xe]=null)}$.push(/[\0-\uffff]/),Ye=j($)})();var ee=Ie.length,M=function(N){for(var $=N.sourceCode,V=N.basePos,Y=N.sourceNode,me=[V,x],Re=0,rt=$.match(Ye)||[],De={},Me=0,Xe=rt.length;Me=5&&Ve.substring(0,5)==="lang-",we&&!(Ke&&typeof Ke[1]=="string")&&(we=!1,Ve=D),we||(De[tt]=Ve)}var fe=Re;if(Re+=tt.length,!we)me.push(V+fe,Ve);else{var ge=Ke[1],_e=tt.indexOf(ge),be=_e+ge.length;Ke[2]&&(be=tt.length-Ke[2].length,_e=be-ge.length);var Ge=Ve.substring(5);X(Y,V+fe,tt.substring(0,_e),M,me),X(Y,V+fe+_e,ge,Ce(Ge,ge),me),X(Y,V+fe+be,tt.substring(be),M,me)}}N.decorations=me};return M}function ie(ue){var Ie=[],Ue=[];ue.tripleQuotedStrings?Ie.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ue.multiLineStrings?Ie.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ie.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ue.verbatimStrings&&Ue.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ye=ue.hashComments;Ye&&(ue.cStyleComments?(Ye>1?Ie.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ie.push([m,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ue.push([_,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ie.push([m,/^#[^\r\n]*/,null,"#"])),ue.cStyleComments&&(Ue.push([m,/^\/\/[^\r\n]*/,null]),Ue.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ee=ue.regexLiterals;if(ee){var M=ee>1?"":` \r`,N=M?".":"[\\S\\s]",$="/(?=[^/*"+M+"])(?:[^/\\x5B\\x5C"+M+"]|\\x5C"+N+"|\\x5B(?:[^\\x5C\\x5D"+M+"]|\\x5C"+N+")*(?:\\x5D|$))+/";Ue.push(["lang-regex",RegExp("^"+te+"("+$+")")])}var V=ue.types;V&&Ue.push([g,V]);var Y=(""+ue.keywords).replace(/^ | $/g,"");Y.length&&Ue.push([b,new RegExp("^(?:"+Y.replace(/[\s,]+/g,"|")+")\\b"),null]),Ie.push([x,/^\s+/,null,` \r \xA0`]);var me="^.[^\\s\\w.$@'\"`/\\\\]*";return ue.regexLiterals&&(me+="(?!s*/)"),Ue.push([E,/^@[a-z_$][a-z_$@0-9]*/i,null],[g,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[x,/^[a-z_$][a-z_$@0-9]*/i,null],[E,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[x,/^\\[\s\S]?/,null],[o,new RegExp(me),null]),Q(Ie,Ue)}var oe=ie({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ee(ue,Ie,Ue){for(var Ye=/(?:^|\s)nocode(?:\s|$)/,ee=/\r\n?|\n/,M=ue.ownerDocument,N=M.createElement("li");ue.firstChild;)N.appendChild(ue.firstChild);var $=[N];function V(Me){var Xe=Me.nodeType;if(Xe==1&&!Ye.test(Me.className))if(Me.nodeName==="br")Y(Me),Me.parentNode&&Me.parentNode.removeChild(Me);else for(var tt=Me.firstChild;tt;tt=tt.nextSibling)V(tt);else if((Xe==3||Xe==4)&&Ue){var Ve=Me.nodeValue,Ke=Ve.match(ee);if(Ke){var we=Ve.substring(0,Ke.index);Me.nodeValue=we;var Ae=Ve.substring(Ke.index+Ke[0].length);if(Ae){var Oe=Me.parentNode;Oe.insertBefore(M.createTextNode(Ae),Me.nextSibling)}Y(Me),we||Me.parentNode.removeChild(Me)}}}function Y(Me){for(;!Me.nextSibling;)if(Me=Me.parentNode,!Me)return;function Xe(Ke,we){var Ae=we?Ke.cloneNode(!1):Ke,Oe=Ke.parentNode;if(Oe){var fe=Xe(Oe,1),ge=Ke.nextSibling;fe.appendChild(Ae);for(var _e=ge;_e;_e=ge)ge=_e.nextSibling,fe.appendChild(_e)}return Ae}for(var tt=Xe(Me.nextSibling,0),Ve;(Ve=tt.parentNode)&&Ve.nodeType===1;)tt=Ve;$.push(tt)}for(var me=0;me<$.length;++me)V($[me]);Ie===(Ie|0)&&$[0].setAttribute("value",Ie);var Re=M.createElement("ol");Re.className="linenums";for(var rt=Math.max(0,Ie-1|0)||0,me=0,De=$.length;me=Oe&&(V+=2),M>=fe&&(Re+=2)}}finally{Ve&&(Ve.style.display=Ke)}}var Le={};function pe(ue,Ie){for(var Ue=Ie.length;--Ue>=0;){var Ye=Ie[Ue];Le.hasOwnProperty(Ye)?T.console&&console.warn("cannot override language handler %s",Ye):Le[Ye]=ue}}function Ce(ue,Ie){return ue&&Le.hasOwnProperty(ue)||(ue=/^\s*]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),pe(Q([[x,/^[\s]+/,null,` \r `],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[C,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[I,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[o,/^[=<>\/]+/],["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"]),pe(Q([],[[F,/^[\s\S]+/]]),["uq.val"]),pe(ie({keywords:d,hashComments:!0,cStyleComments:!0,types:v}),["c","cc","cpp","cxx","cyc","m"]),pe(ie({keywords:"null,true,false"}),["json"]),pe(ie({keywords:u,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:v}),["cs"]),pe(ie({keywords:a,cStyleComments:!0}),["java"]),pe(ie({keywords:c,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),pe(ie({keywords:n,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),pe(ie({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),pe(ie({keywords:t,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),pe(ie({keywords:f,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),pe(ie({keywords:s,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),pe(Q([],[[_,/^[\s\S]+/]]),["regex"]);function Be(ue){var Ie=ue.langExtension;try{var Ue=G(ue.sourceNode,ue.pre),Ye=Ue.sourceCode;ue.sourceCode=Ye,ue.spans=Ue.spans,ue.basePos=0,Ce(Ie,Ye)(ue),ye(ue)}catch(ee){T.console&&console.log(ee&&ee.stack||ee)}}function Pe(ue,Ie,Ue){var Ye=Ue||!1,ee=Ie||null,M=document.createElement("div");M.innerHTML="
    "+ue+"
    ",M=M.firstChild,Ye&&Ee(M,Ye,!0);var N={langExtension:ee,numberLines:Ye,sourceNode:M,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Be(N),M.innerHTML}function ke(ue,Ie){var Ue=Ie||document.body,Ye=Ue.ownerDocument||document;function ee(Ae){return Ue.getElementsByTagName(Ae)}for(var M=[ee("pre"),ee("code"),ee("xmp")],N=[],$=0;$=15&&(d=!1,l=!0);var _=t&&(p||d&&(v==null||v<12.11)),b=U||O&&T>=9;function m(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var g=function(e,r){var R=e.className,L=m(r).exec(R);if(L){var k=R.slice(L.index+L[0].length);e.className=R.slice(0,L.index)+(k?L[1]+k:"")}};function E(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function o(e,r){return E(e).appendChild(r)}function x(e,r,R,L){var k=document.createElement(e);if(R&&(k.className=R),L&&(k.style.cssText=L),typeof r=="string")k.appendChild(document.createTextNode(r));else if(r)for(var K=0;K=r)return re+(r-K);re+=le-K,re+=R-re%R,K=le+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.prototype.set=function(e,r){this.f=r;var R=+new Date+e;(!this.id||R=r)return L+Math.min(re,r-k);if(k+=K-L,k+=R-k%R,L=K+1,k>=r)return L}}var pe=[""];function Ce(e){for(;pe.length<=e;)pe.push(Be(pe)+" ");return pe[e]}function Be(e){return e[e.length-1]}function Pe(e,r){for(var R=[],L=0;L"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ue.test(e))}function Ue(e,r){return r?r.source.indexOf("\\w")>-1&&Ie(e)?!0:r.test(e):Ie(e)}function Ye(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ee=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function M(e){return e.charCodeAt(0)>=768&&ee.test(e)}function N(e,r,R){for(;(R<0?r>0:rR?-1:1;;){if(r==R)return r;var k=(r+R)/2,K=L<0?Math.ceil(k):Math.floor(k);if(K==r)return e(K)?r:R;e(K)?R=K:r=K+L}}function V(e,r,R,L){if(!e)return L(r,R,"ltr",0);for(var k=!1,K=0;Kr||r==R&&re.to==r)&&(L(Math.max(re.from,r),Math.min(re.to,R),re.level==1?"rtl":"ltr",K),k=!0)}k||L(r,R,"ltr")}var Y=null;function me(e,r,R){var L;Y=null;for(var k=0;kr)return k;K.to==r&&(K.from!=K.to&&R=="before"?L=k:Y=k),K.from==r&&(K.from!=K.to&&R!="before"?L=k:Y=k)}return L!=null?L:Y}var Re=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function R(ve){return ve<=247?e.charAt(ve):1424<=ve&&ve<=1524?"R":1536<=ve&&ve<=1785?r.charAt(ve-1536):1774<=ve&&ve<=2220?"r":8192<=ve&&ve<=8203?"w":ve==8204?"b":"L"}var L=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,k=/[stwN]/,K=/[LRr]/,re=/[Lb1n]/,le=/[1n]/;function ce(ve,Fe,ze){this.level=ve,this.from=Fe,this.to=ze}return function(ve,Fe){var ze=Fe=="ltr"?"L":"R";if(ve.length==0||Fe=="ltr"&&!L.test(ve))return!1;for(var it=ve.length,et=[],yt=0;yt-1&&(L[r]=k.slice(0,K).concat(k.slice(K+1)))}}}function Ve(e,r){var R=Xe(e,r);if(!R.length)return;for(var L=Array.prototype.slice.call(arguments,2),k=0;k0}function Oe(e){e.prototype.on=function(r,R){Me(this,r,R)},e.prototype.off=function(r,R){tt(this,r,R)}}function fe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ge(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function _e(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function be(e){fe(e),ge(e)}function Ge(e){return e.target||e.srcElement}function qe(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),t&&e.ctrlKey&&r==1&&(r=3),r}var pt=function(){if(O&&T<9)return!1;var e=x("div");return"draggable"in e||"dragDrop"in e}(),Dt;function jt(e){if(Dt==null){var r=x("span","\u200B");o(e,x("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Dt=r.offsetWidth<=1&&r.offsetHeight>2&&!(O&&T<8))}var R=Dt?x("span","\u200B"):x("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return R.setAttribute("cm-text",""),R}var Rt;function Lt(e){if(Rt!=null)return Rt;var r=o(e,document.createTextNode("A\u062EA")),R=A(r,0,1).getBoundingClientRect(),L=A(r,1,2).getBoundingClientRect();return E(e),!R||R.left==R.right?!1:Rt=L.right-R.right<3}var lt=` b`.split(/\n/).length!=3?function(e){for(var r=0,R=[],L=e.length;r<=L;){var k=e.indexOf(` `,r);k==-1&&(k=e.length);var K=e.slice(r,e.charAt(k-1)=="\r"?k-1:k),re=K.indexOf("\r");re!=-1?(R.push(K.slice(0,re)),r+=re+1):(R.push(K),r=k+1)}return R}:function(e){return e.split(/\r\n?|\n/)},ft=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(R){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Qe=function(){var e=x("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Te=null;function je(e){if(Te!=null)return Te;var r=o(e,x("span","x")),R=r.getBoundingClientRect(),L=A(r,0,1).getBoundingClientRect();return Te=Math.abs(R.left-L.left)>1}var dt={},Ze={};function Tt(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),dt[e]=r}function Ct(e,r){Ze[e]=r}function ot(e){if(typeof e=="string"&&Ze.hasOwnProperty(e))e=Ze[e];else if(e&&typeof e.name=="string"&&Ze.hasOwnProperty(e.name)){var r=Ze[e.name];typeof r=="string"&&(r={name:r}),e=he(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ot("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ot("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function gt(e,r){r=ot(r);var R=dt[r.name];if(!R)return gt(e,"text/plain");var L=R(e,r);if(kt.hasOwnProperty(r.name)){var k=kt[r.name];for(var K in k){if(!k.hasOwnProperty(K))continue;L.hasOwnProperty(K)&&(L["_"+K]=L[K]),L[K]=k[K]}}if(L.name=r.name,r.helperType&&(L.helperType=r.helperType),r.modeProps)for(var re in r.modeProps)L[re]=r.modeProps[re];return L}var kt={};function Kt(e,r){var R=kt.hasOwnProperty(e)?kt[e]:kt[e]={};G(r,R)}function Gt(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var R={};for(var L in r){var k=r[L];k instanceof Array&&(k=k.concat([])),R[L]=k}return R}function Se(e,r){for(var R;e.innerMode&&!(R=e.innerMode(r),!R||R.mode==e);)r=R.state,e=R.mode;return R||{mode:e,state:r}}function de(e,r,R){return e.startState?e.startState(r,R):!0}var W=function(e,r,R){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=R};W.prototype.eol=function(){return this.pos>=this.string.length},W.prototype.sol=function(){return this.pos==this.lineStart},W.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},W.prototype.next=function(){if(this.posr},W.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},W.prototype.skipToEnd=function(){this.pos=this.string.length},W.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},W.prototype.backUp=function(e){this.pos-=e},W.prototype.column=function(){return this.lastColumnPos0?null:(K&&r!==!1&&(this.pos+=K[0].length),K)}},W.prototype.current=function(){return this.string.slice(this.start,this.pos)},W.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},W.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},W.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function q(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var R=e;!R.lines;)for(var L=0;;++L){var k=R.children[L],K=k.chunkSize();if(r=e.first&&rR?nt(R,q(e,R).text.length):Cn(r,q(e,r.line).text.length)}function Cn(e,r){var R=e.ch;return R==null||R>r?nt(e.line,r):R<0?nt(e.line,0):e}function En(e,r){for(var R=[],L=0;Lthis.maxLookAhead&&(this.maxLookAhead=e),r},un.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(e,r,R){return r instanceof Jt?new un(e,Gt(e.mode,r.state),R,r.lookAhead):new un(e,Gt(e.mode,r),R)},un.prototype.save=function(e){var r=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Jt(r,this.maxLookAhead):r};function Jn(e,r,R,L){var k=[e.state.modeGen],K={};jr(e,r.text,e.doc.mode,R,function(ve,Fe){return k.push(ve,Fe)},K,L);for(var re=R.state,le=function(ve){R.baseTokens=k;var Fe=e.state.overlays[ve],ze=1,it=0;R.state=!0,jr(e,r.text,Fe.mode,R,function(et,yt){for(var wt=ze;itet&&k.splice(ze,1,et,k[ze+1],Pt),ze+=2,it=Math.min(et,Pt)}if(!yt)return;if(Fe.opaque)k.splice(wt,ze-wt,et,"overlay "+yt),ze=wt+2;else for(;wte.options.maxHighlightLength&&Gt(e.doc.mode,L.state),K=Jn(e,r,L);k&&(L.state=k),r.stateAfter=L.save(!k),r.styles=K.styles,K.classes?r.styleClasses=K.classes:r.styleClasses&&(r.styleClasses=null),R===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function mn(e,r,R){var L=e.doc,k=e.display;if(!L.mode.startState)return new un(L,!0,r);var K=tr(e,r,R),re=K>L.first&&q(L,K-1).stateAfter,le=re?un.fromSaved(L,re,K):new un(L,de(L.mode),K);return L.iter(K,r,function(ce){gr(e,ce.text,le);var ve=le.line;ce.stateAfter=ve==r-1||ve%5==0||ve>=k.viewFrom&&ver.start)return K}throw new Error("Mode "+e.name+" failed to advance stream.")}var An=function(e,r,R){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=R};function _r(e,r,R,L){var k=e.doc,K=k.mode,re;r=mt(k,r);var le=q(k,r.line),ce=mn(e,r.line,R),ve=new W(le.text,e.options.tabSize,ce),Fe;for(L&&(Fe=[]);(L||ve.pose.options.maxHighlightLength?(le=!1,re&&gr(e,r,L,Fe.pos),Fe.pos=r.length,ze=null):ze=Zr(vn(R,Fe,L.state,it),K),it){var et=it[0].name;et&&(ze="m-"+(ze?et+" "+ze:et))}if(!le||ve!=ze){for(;cere;--le){if(le<=K.first)return K.first;var ce=q(K,le-1),ve=ce.stateAfter;if(ve&&(!R||le+(ve instanceof Jt?ve.lookAhead:0)<=K.modeFrontier))return le;var Fe=X(ce.text,null,e.options.tabSize);(k==null||L>Fe)&&(k=le-1,L=Fe)}return k}function ur(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontierR;L--){var k=q(e,L).stateAfter;if(k&&(!(k instanceof Jt)||L+k.lookAhead=r:K.to>r);(L||(L=[])).push(new Vr(re,K.from,ce?null:K.to))}}return L}function ri(e,r,R){var L;if(e)for(var k=0;k=r:K.to>r);if(le||K.from==r&&re.type=="bookmark"&&(!R||K.marker.insertLeft)){var ce=K.from==null||(re.inclusiveLeft?K.from<=r:K.from0&&le)for(var $t=0;$t0)continue;var Fe=[ce,1],ze=xt(ve.from,le.from),it=xt(ve.to,le.to);(ze<0||!re.inclusiveLeft&&!ze)&&Fe.push({from:ve.from,to:le.from}),(it>0||!re.inclusiveRight&&!it)&&Fe.push({from:le.to,to:ve.to}),k.splice.apply(k,Fe),ce+=Fe.length-3}return k}function bi(e){var r=e.markedSpans;if(!r)return;for(var R=0;Rr)&&(!L||ai(L,K.marker)<0)&&(L=K.marker)}return L}function la(e,r,R,L,k){var K=q(e,r),re=xr&&K.markedSpans;if(re)for(var le=0;le=0&&ze<=0||Fe<=0&&ze>=0)continue;if(Fe<=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?xt(ve.to,R)>=0:xt(ve.to,R)>0)||Fe>=0&&(ce.marker.inclusiveRight&&k.inclusiveLeft?xt(ve.from,L)<=0:xt(ve.from,L)<0))return!0}}function tn(e){for(var r;r=Ni(e);)e=r.find(-1,!0).line;return e}function xn(e){for(var r;r=wi(e);)e=r.find(1,!0).line;return e}function fn(e){for(var r,R;r=wi(e);)e=r.find(1,!0).line,(R||(R=[])).push(e);return R}function Zn(e,r){var R=q(e,r),L=tn(R);return R==L?r:He(L)}function nr(e,r){if(r>e.lastLine())return r;var R=q(e,r),L;if(!cr(e,R))return r;for(;L=wi(R);)R=L.find(1,!0).line;return He(R)+1}function cr(e,r){var R=xr&&r.markedSpans;if(R)for(var L=void 0,k=0;kr.maxLineLength&&(r.maxLineLength=k,r.maxLine=L)})}var er=function(e,r,R){this.text=e,ii(this,r),this.height=R?R(this):1};er.prototype.lineNo=function(){return He(this)},Oe(er);function _i(e,r,R,L){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),bi(e),ii(e,R);var k=L?L(e):1;k!=e.height&&xe(e,k)}function Fr(e){e.parent=null,bi(e)}var Ti={},fi={};function Pi(e,r){if(!e||/^\s*$/.test(e))return null;var R=r.addModeClass?fi:Ti;return R[e]||(R[e]=e.replace(/\S+/g,"cm-$&"))}function Ji(e,r){var R=C("span",null,null,l?"padding-right: .1px":null),L={pre:C("pre",[R],"CodeMirror-line"),content:R,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var k=0;k<=(r.rest?r.rest.length:0);k++){var K=k?r.rest[k-1]:r.line,re=void 0;L.pos=0,L.addToken=Ma,Lt(e.display.measure)&&(re=rt(K,e.doc.direction))&&(L.addToken=Rn(L.addToken,re)),L.map=[];var le=r!=e.display.externalMeasured&&He(K);ua(K,L,ar(e,K,le)),K.styleClasses&&(K.styleClasses.bgClass&&(L.bgClass=H(K.styleClasses.bgClass,L.bgClass||"")),K.styleClasses.textClass&&(L.textClass=H(K.styleClasses.textClass,L.textClass||""))),L.map.length==0&&L.map.push(0,0,L.content.appendChild(jt(e.display.measure))),k==0?(r.measure.map=L.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(L.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(l){var ce=L.content.lastChild;(/\bcm-tab\b/.test(ce.className)||ce.querySelector&&ce.querySelector(".cm-tab"))&&(L.content.className="cm-tab-wrap-hack")}return Ve(e,"renderLine",e,r.line,L.pre),L.pre.className&&(L.textClass=H(L.pre.className,L.textClass||"")),L}function Pa(e){var r=x("span","\u2022","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Ma(e,r,R,L,k,K,re){if(!r)return;var le=e.splitSpaces?ya(r,e.trailingSpace):r,ce=e.cm.state.specialChars,ve=!1,Fe;if(!ce.test(r))e.col+=r.length,Fe=document.createTextNode(le),e.map.push(e.pos,e.pos+r.length,Fe),O&&T<9&&(ve=!0),e.pos+=r.length;else{Fe=document.createDocumentFragment();for(var ze=0;;){ce.lastIndex=ze;var it=ce.exec(r),et=it?it.index-ze:r.length-ze;if(et){var yt=document.createTextNode(le.slice(ze,ze+et));O&&T<9?Fe.appendChild(x("span",[yt])):Fe.appendChild(yt),e.map.push(e.pos,e.pos+et,yt),e.col+=et,e.pos+=et}if(!it)break;ze+=et+1;var wt=void 0;if(it[0]==" "){var Pt=e.cm.options.tabSize,Bt=Pt-e.col%Pt;wt=Fe.appendChild(x("span",Ce(Bt),"cm-tab")),wt.setAttribute("role","presentation"),wt.setAttribute("cm-text"," "),e.col+=Bt}else it[0]=="\r"||it[0]==` `?(wt=Fe.appendChild(x("span",it[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),wt.setAttribute("cm-text",it[0]),e.col+=1):(wt=e.cm.options.specialCharPlaceholder(it[0]),wt.setAttribute("cm-text",it[0]),O&&T<9?Fe.appendChild(x("span",[wt])):Fe.appendChild(wt),e.col+=1);e.map.push(e.pos,e.pos+1,wt),e.pos++}}if(e.trailingSpace=le.charCodeAt(r.length-1)==32,R||L||k||ve||K||re){var Vt=R||"";L&&(Vt+=L),k&&(Vt+=k);var Wt=x("span",[Fe],Vt,K);if(re)for(var $t in re)re.hasOwnProperty($t)&&$t!="style"&&$t!="class"&&Wt.setAttribute($t,re[$t]);return e.content.appendChild(Wt)}e.content.appendChild(Fe)}function ya(e,r){if(e.length>1&&!/ /.test(e))return e;for(var R=r,L="",k=0;kve&&ze.from<=ve);it++);if(ze.to>=Fe)return e(R,L,k,K,re,le,ce);e(R,L.slice(0,ze.to-ve),k,K,null,le,ce),K=null,L=L.slice(ze.to-ve),ve=ze.to}}}function zi(e,r,R,L){var k=!L&&R.widgetNode;k&&e.map.push(e.pos,e.pos+r,k),!L&&e.cm.display.input.needsContentAttribute&&(k||(k=e.content.appendChild(document.createElement("span"))),k.setAttribute("cm-marker",R.id)),k&&(e.cm.display.input.setUneditable(k),e.content.appendChild(k)),e.pos+=r,e.trailingSpace=!1}function ua(e,r,R){var L=e.markedSpans,k=e.text,K=0;if(!L){for(var re=1;rece||Wn.collapsed&&ln.to==ce&&ln.from==ce)){if(ln.to!=null&&ln.to!=ce&&et>ln.to&&(et=ln.to,wt=""),Wn.className&&(yt+=" "+Wn.className),Wn.css&&(it=(it?it+";":"")+Wn.css),Wn.startStyle&&ln.from==ce&&(Pt+=" "+Wn.startStyle),Wn.endStyle&&ln.to==et&&($t||($t=[])).push(Wn.endStyle,ln.to),Wn.title&&((Vt||(Vt={})).title=Wn.title),Wn.attributes)for(var br in Wn.attributes)(Vt||(Vt={}))[br]=Wn.attributes[br];Wn.collapsed&&(!Bt||ai(Bt.marker,Wn)<0)&&(Bt=ln)}else ln.from>ce&&et>ln.from&&(et=ln.from)}if($t)for(var Qr=0;Qr<$t.length;Qr+=2)$t[Qr+1]==et&&(wt+=" "+$t[Qr]);if(!Bt||Bt.from==ce)for(var Lr=0;Lr=le)break;for(var xi=Math.min(le,et);;){if(Fe){var mi=ce+Fe.length;if(!Bt){var Kr=mi>xi?Fe.slice(0,xi-ce):Fe;r.addToken(r,Kr,ze?ze+yt:yt,Pt,ce+Kr.length==et?wt:"",it,Vt)}if(mi>=xi){Fe=Fe.slice(xi-ce),ce=xi;break}ce=mi,Pt=""}Fe=k.slice(K,K=R[ve++]),ze=Pi(R[ve++],r.cm.options)}}}function ba(e,r,R){this.line=r,this.rest=fn(r),this.size=this.rest?He(Be(this.rest))-R+1:1,this.node=this.text=null,this.hidden=cr(e,r)}function Yi(e,r,R){for(var L=[],k,K=r;K2&&K.push((ce.bottom+ve.top)/2-R.top)}}K.push(R.bottom-R.top)}}function Qn(e,r,R){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var L=0;LR)return{map:e.measure.maps[k],cache:e.measure.caches[k],before:!0}}function Dn(e,r){r=tn(r);var R=He(r),L=e.display.externalMeasured=new ba(e.doc,r,R);L.lineN=R;var k=L.built=Ji(e,L);return L.text=k.pre,o(e.display.lineMeasure,k.pre),L}function Nt(e,r,R,L){return Xn(e,Hn(e,r),R,L)}function an(e,r){if(r>=e.display.viewFrom&&r=R.lineN&&rr)&&(K=ce-le,k=K-1,r>=ce&&(re="right")),k!=null){if(L=e[ve+2],le==ce&&R==(L.insertLeft?"left":"right")&&(re=R),R=="left"&&k==0)for(;ve&&e[ve-2]==e[ve-3]&&e[ve-1].insertLeft;)L=e[(ve-=3)+2],re="left";if(R=="right"&&k==ce-le)for(;ve=0&&!((R=e[k]).left!=R.right);k--);return R}function on(e,r,R,L){var k=Fn(r.map,R,L),K=k.node,re=k.start,le=k.end,ce=k.collapse,ve;if(K.nodeType==3){for(var Fe=0;Fe<4;Fe++){for(;re&&M(r.line.text.charAt(k.coverStart+re));)--re;for(;k.coverStart+le0&&(ce=L="right");var ze;e.options.lineWrapping&&(ze=K.getClientRects()).length>1?ve=ze[L=="right"?ze.length-1:0]:ve=K.getBoundingClientRect()}if(O&&T<9&&!re&&(!ve||!ve.left&&!ve.right)){var it=K.parentNode.getClientRects()[0];it?ve={left:it.left,right:it.left+Nn(e.display),top:it.top,bottom:it.bottom}:ve=ir}for(var et=ve.top-r.rect.top,yt=ve.bottom-r.rect.top,wt=(et+yt)/2,Pt=r.view.measure.heights,Bt=0;Bt=L.text.length?(ce=L.text.length,ve="before"):ce<=0&&(ce=0,ve="after"),!le)return re(ve=="before"?ce-1:ce,ve=="before");function Fe(yt,wt,Pt){var Bt=le[wt],Vt=Bt.level==1;return re(Pt?yt-1:yt,Vt!=Pt)}var ze=me(le,ce,ve),it=Y,et=Fe(ce,ze,ve=="before");return it!=null&&(et.other=Fe(ce,it,ve!="before")),et}function Yn(e,r){var R=0;r=mt(e.doc,r),e.options.lineWrapping||(R=Nn(e.display)*r.ch);var L=q(e.doc,r.line),k=pr(L)+kn(e.display);return{left:R,right:R,top:k,bottom:k+L.height}}function sr(e,r,R,L,k){var K=nt(e,r,R);return K.xRel=k,L&&(K.outside=L),K}function Er(e,r,R){var L=e.doc;if(R+=e.display.viewOffset,R<0)return sr(L.first,0,null,-1,-1);var k=Je(L,R),K=L.first+L.size-1;if(k>K)return sr(L.first+L.size-1,q(L,K).text.length,null,1,1);r<0&&(r=0);for(var re=q(L,k);;){var le=Mi(e,re,k,r,R),ce=ga(re,le.ch+(le.xRel>0||le.outside>0?1:0));if(!ce)return le;var ve=ce.find(1);if(ve.line==k)return ve;re=q(L,k=ve.line)}}function zr(e,r,R,L){L-=Pn(r);var k=r.text.length,K=$(function(re){return Xn(e,R,re-1).bottom<=L},k,0);return k=$(function(re){return Xn(e,R,re).top>L},K,k),{begin:K,end:k}}function Ci(e,r,R,L){R||(R=Hn(e,r));var k=sn(e,r,Xn(e,R,L),"line").top;return zr(e,r,R,k)}function Br(e,r,R,L){return e.bottom<=R?!1:e.top>R?!0:(L?e.left:e.right)>r}function Mi(e,r,R,L,k){k-=pr(r);var K=Hn(e,r),re=Pn(r),le=0,ce=r.text.length,ve=!0,Fe=rt(r,e.doc.direction);if(Fe){var ze=(e.options.lineWrapping?Ui:$i)(e,r,R,K,Fe,L,k);ve=ze.level!=1,le=ve?ze.from:ze.to-1,ce=ve?ze.to:ze.from-1}var it=null,et=null,yt=$(function(yn){var ln=Xn(e,K,yn);return ln.top+=re,ln.bottom+=re,Br(ln,L,k,!1)?(ln.top<=k&&ln.left<=L&&(it=yn,et=ln),!0):!1},le,ce),wt,Pt,Bt=!1;if(et){var Vt=L-et.left=$t.bottom?1:0}return yt=N(r.text,yt,1),sr(R,yt,Pt,Bt,L-wt)}function $i(e,r,R,L,k,K,re){var le=$(function(ze){var it=k[ze],et=it.level!=1;return Br(In(e,nt(R,et?it.to:it.from,et?"before":"after"),"line",r,L),K,re,!0)},0,k.length-1),ce=k[le];if(le>0){var ve=ce.level!=1,Fe=In(e,nt(R,ve?ce.from:ce.to,ve?"after":"before"),"line",r,L);Br(Fe,K,re,!0)&&Fe.top>re&&(ce=k[le-1])}return ce}function Ui(e,r,R,L,k,K,re){var le=zr(e,r,L,re),ce=le.begin,ve=le.end;/\s/.test(r.text.charAt(ve-1))&&ve--;for(var Fe=null,ze=null,it=0;it=ve||et.to<=ce)continue;var yt=et.level!=1,wt=Xn(e,L,yt?Math.min(ve,et.to)-1:Math.max(ce,et.from)).right,Pt=wtPt)&&(Fe=et,ze=Pt)}return Fe||(Fe=k[k.length-1]),Fe.fromve&&(Fe={from:Fe.from,to:ve,level:Fe.level}),Fe}var ti;function ji(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ti==null){ti=x("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)ti.appendChild(document.createTextNode("x")),ti.appendChild(x("br"));ti.appendChild(document.createTextNode("x"))}o(e.measure,ti);var R=ti.offsetHeight/50;return R>3&&(e.cachedTextHeight=R),E(e.measure),R||1}function Nn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=x("span","xxxxxxxxxx"),R=x("pre",[r],"CodeMirror-line-like");o(e.measure,R);var L=r.getBoundingClientRect(),k=(L.right-L.left)/10;return k>2&&(e.cachedCharWidth=k),k||10}function gn(e){for(var r=e.display,R={},L={},k=r.gutters.clientLeft,K=r.gutters.firstChild,re=0;K;K=K.nextSibling,++re){var le=e.display.gutterSpecs[re].className;R[le]=K.offsetLeft+K.clientLeft+k,L[le]=K.clientWidth}return{fixedPos:zn(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:R,gutterWidth:L,wrapperWidth:r.wrapper.clientWidth}}function zn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function $n(e){var r=ji(e.display),R=e.options.lineWrapping,L=R&&Math.max(5,e.display.scroller.clientWidth/Nn(e.display)-3);return function(k){if(cr(e.doc,k))return 0;var K=0;if(k.widgets)for(var re=0;re0&&(ve=q(e.doc,ce.line).text).length==ce.ch){var Fe=X(ve,ve.length,e.options.tabSize)-ve.length;ce=nt(ce.line,Math.max(0,Math.round((K-Gn(e.display).left)/Nn(e.display))-Fe))}return ce}function Yr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var R=e.display.view,L=0;Lr)&&(k.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=k.viewTo)xr&&Zn(e.doc,r)k.viewFrom?hi(e):(k.viewFrom+=L,k.viewTo+=L);else if(r<=k.viewFrom&&R>=k.viewTo)hi(e);else if(r<=k.viewFrom){var K=Oi(e,R,R+L,1);K?(k.view=k.view.slice(K.index),k.viewFrom=K.lineN,k.viewTo+=L):hi(e)}else if(R>=k.viewTo){var re=Oi(e,r,r,-1);re?(k.view=k.view.slice(0,re.index),k.viewTo=re.lineN):hi(e)}else{var le=Oi(e,r,r,-1),ce=Oi(e,R,R+L,1);le&&ce?(k.view=k.view.slice(0,le.index).concat(Yi(e,le.lineN,ce.lineN)).concat(k.view.slice(ce.index)),k.viewTo+=L):hi(e)}var ve=k.externalMeasured;ve&&(R=k.lineN&&r=L.viewTo)return;var K=L.view[Yr(e,r)];if(K.node==null)return;var re=K.changes||(K.changes=[]);B(re,R)==-1&&re.push(R)}function hi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Oi(e,r,R,L){var k=Yr(e,r),K,re=e.display.view;if(!xr||R==e.doc.first+e.doc.size)return{index:k,lineN:R};for(var le=e.display.viewFrom,ce=0;ce0){if(k==re.length-1)return null;K=le+re[k].size-r,k++}else K=le-r;r+=K,R+=K}for(;Zn(e.doc,R)!=R;){if(k==(L<0?0:re.length-1))return null;R+=L*re[k-(L<0?1:0)].size,k+=L}return{index:k,lineN:R}}function Fi(e,r,R){var L=e.display,k=L.view;k.length==0||r>=L.viewTo||R<=L.viewFrom?(L.view=Yi(e,r,R),L.viewFrom=r):(L.viewFrom>r?L.view=Yi(e,r,L.viewFrom).concat(L.view):L.viewFromR&&(L.view=L.view.slice(0,Yr(e,R)))),L.viewTo=R}function Mn(e){for(var r=e.display.view,R=0,L=0;L=e.display.viewTo||le.to().line0?r.blinker=setInterval(function(){e.hasFocus()||ki(e),r.cursorDiv.style.visibility=(R=!R)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Nr(e){e.state.focused||(e.display.input.focus(),rn(e))}function ca(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,ki(e))},100)}function rn(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(Ve(e,"focus",e,r),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ir(e)}function ki(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(Ve(e,"blur",e,r),e.state.focused=!1,g(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Zi(e){for(var r=e.display,R=r.lineDiv.offsetTop,L=0;L.005||Fe<-.005)&&(xe(k.line,re),Bi(k.line),k.rest))for(var ze=0;zee.display.sizerWidth){var it=Math.ceil(le/Nn(e.display));it>e.display.maxLineLength&&(e.display.maxLineLength=it,e.display.maxLine=k.line,e.display.maxLineChanged=!0)}}}function Bi(e){if(e.widgets)for(var r=0;r=re&&(K=Je(r,pr(q(r,ce))-e.wrapper.clientHeight),re=ce)}return{from:K,to:Math.max(re,K+1)}}function Wi(e,r){if(Ke(e,"scrollCursorIntoView"))return;var R=e.display,L=R.sizer.getBoundingClientRect(),k=null;if(r.top+L.top<0?k=!0:r.bottom+L.top>(window.innerHeight||document.documentElement.clientHeight)&&(k=!1),k!=null&&!s){var K=x("div","\u200B",null,`position: absolute; top: `+(r.top-R.viewOffset-kn(e.display))+`px; height: `+(r.bottom-r.top+qn(e)+R.barHeight)+`px; left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(K),K.scrollIntoView(k),e.display.lineSpace.removeChild(K)}}function ea(e,r,R,L){L==null&&(L=0);var k;!e.options.lineWrapping&&r==R&&(r=r.ch?nt(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,R=r.sticky=="before"?nt(r.line,r.ch+1,"before"):r);for(var K=0;K<5;K++){var re=!1,le=In(e,r),ce=!R||R==r?le:In(e,R);k={left:Math.min(le.left,ce.left),top:Math.min(le.top,ce.top)-L,right:Math.max(le.left,ce.left),bottom:Math.max(le.bottom,ce.bottom)+L};var ve=Vi(e,k),Fe=e.doc.scrollTop,ze=e.doc.scrollLeft;if(ve.scrollTop!=null&&(Ua(e,ve.scrollTop),Math.abs(e.doc.scrollTop-Fe)>1&&(re=!0)),ve.scrollLeft!=null&&(da(e,ve.scrollLeft),Math.abs(e.doc.scrollLeft-ze)>1&&(re=!0)),!re)break}return k}function ta(e,r){var R=Vi(e,r);R.scrollTop!=null&&Ua(e,R.scrollTop),R.scrollLeft!=null&&da(e,R.scrollLeft)}function Vi(e,r){var R=e.display,L=ji(e.display);r.top<0&&(r.top=0);var k=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:R.scroller.scrollTop,K=dr(e),re={};r.bottom-r.top>K&&(r.bottom=r.top+K);var le=e.doc.height+mr(R),ce=r.tople-L;if(r.topk+K){var Fe=Math.min(r.top,(ve?le:r.bottom)-K);Fe!=k&&(re.scrollTop=Fe)}var ze=e.options.fixedGutter?0:R.gutters.offsetWidth,it=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:R.scroller.scrollLeft-ze,et=rr(e)-R.gutters.offsetWidth,yt=r.right-r.left>et;return yt&&(r.right=r.left+et),r.left<10?re.scrollLeft=0:r.leftet+it-3&&(re.scrollLeft=r.right+(yt?0:10)-et),re}function Ia(e,r){if(r==null)return;no(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function wr(e){no(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Na(e,r,R){(r!=null||R!=null)&&no(e),r!=null&&(e.curOp.scrollLeft=r),R!=null&&(e.curOp.scrollTop=R)}function Js(e,r){no(e),e.curOp.scrollToPos=r}function no(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var R=Yn(e,r.from),L=Yn(e,r.to);Wo(e,R,L,r.margin)}}function Wo(e,r,R,L){var k=Vi(e,{left:Math.min(r.left,R.left),top:Math.min(r.top,R.top)-L,right:Math.max(r.right,R.right),bottom:Math.max(r.bottom,R.bottom)+L});Na(e,k.scrollLeft,k.scrollTop)}function Ua(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;U||_o(e,{top:r}),Ko(e,r,!0),U&&_o(e),Ba(e,100)}function Ko(e,r,R){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!R)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function da(e,r,R,L){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(R?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!L)return;e.doc.scrollLeft=r,Xo(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function ja(e){var r=e.display,R=r.gutters.offsetWidth,L=Math.round(e.doc.height+mr(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?R:0,docHeight:L,scrollHeight:L+qn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:R}}var fa=function(e,r,R){this.cm=R;var L=this.vert=x("div",[x("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),k=this.horiz=x("div",[x("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");L.tabIndex=k.tabIndex=-1,e(L),e(k),Me(L,"scroll",function(){L.clientHeight&&r(L.scrollTop,"vertical")}),Me(k,"scroll",function(){k.clientWidth&&r(k.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,O&&T<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};fa.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,R=e.scrollHeight>e.clientHeight+1,L=e.nativeBarWidth;if(R){this.vert.style.display="block",this.vert.style.bottom=r?L+"px":"0";var k=e.viewHeight-(r?L:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+k)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=R?L+"px":"0",this.horiz.style.left=e.barLeft+"px";var K=e.viewWidth-e.barLeft-(R?L:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+K)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(L==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:R?L:0,bottom:r?L:0}},fa.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},fa.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},fa.prototype.zeroWidthHack=function(){var e=t&&!u?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},fa.prototype.enableZeroWidthBar=function(e,r,R){e.style.pointerEvents="auto";function L(){var k=e.getBoundingClientRect(),K=R=="vert"?document.elementFromPoint(k.right-1,(k.top+k.bottom)/2):document.elementFromPoint((k.right+k.left)/2,k.bottom-1);K!=e?e.style.pointerEvents="none":r.set(1e3,L)}r.set(1e3,L)},fa.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fa=function(){};Fa.prototype.update=function(){return{bottom:0,right:0}},Fa.prototype.setScrollLeft=function(){},Fa.prototype.setScrollTop=function(){},Fa.prototype.clear=function(){};function _a(e,r){r||(r=ja(e));var R=e.display.barWidth,L=e.display.barHeight;Ho(e,r);for(var k=0;k<4&&R!=e.display.barWidth||L!=e.display.barHeight;k++)R!=e.display.barWidth&&e.options.lineWrapping&&Zi(e),Ho(e,ja(e)),R=e.display.barWidth,L=e.display.barHeight}function Ho(e,r){var R=e.display,L=R.scrollbars.update(r);R.sizer.style.paddingRight=(R.barWidth=L.right)+"px",R.sizer.style.paddingBottom=(R.barHeight=L.bottom)+"px",R.heightForcer.style.borderBottom=L.bottom+"px solid transparent",L.right&&L.bottom?(R.scrollbarFiller.style.display="block",R.scrollbarFiller.style.height=L.bottom+"px",R.scrollbarFiller.style.width=L.right+"px"):R.scrollbarFiller.style.display="",L.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(R.gutterFiller.style.display="block",R.gutterFiller.style.height=L.bottom+"px",R.gutterFiller.style.width=r.gutterWidth+"px"):R.gutterFiller.style.display=""}var zo={native:fa,null:Fa};function Go(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&g(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zo[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Me(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,R){R=="horizontal"?da(e,r):Ua(e,r)},e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function ha(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},ka(e.curOp)}function pa(e){var r=e.curOp;r&&st(r,function(R){for(var L=0;L=R.viewTo)||R.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new ro(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function nl(e){e.updatedDisplay=e.mustUpdate&&bo(e.cm,e.update)}function rl(e){var r=e.cm,R=r.display;e.updatedDisplay&&Zi(r),e.barMeasure=ja(r),R.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Nt(r,R.maxLine,R.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(R.scroller.clientWidth,R.sizer.offsetLeft+e.adjustWidthTo+qn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,R.sizer.offsetLeft+e.adjustWidthTo-rr(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=R.input.prepareSelection())}function il(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var R=+new Date+e.options.workTime,L=mn(e,r.highlightFrontier),k=[];r.iter(L.line,Math.min(r.first+r.size,e.display.viewTo+500),function(K){if(L.line>=e.display.viewFrom){var re=K.styles,le=K.text.length>e.options.maxHighlightLength?Gt(r.mode,L.state):null,ce=Jn(e,K,L,!0);le&&(L.state=le),K.styles=ce.styles;var ve=K.styleClasses,Fe=ce.classes;Fe?K.styleClasses=Fe:ve&&(K.styleClasses=null);for(var ze=!re||re.length!=K.styles.length||ve!=Fe&&(!ve||!Fe||ve.bgClass!=Fe.bgClass||ve.textClass!=Fe.textClass),it=0;!ze&&itR)return Ba(e,e.options.workDelay),!0}),r.highlightFrontier=L.line,r.modeFrontier=Math.max(r.modeFrontier,L.line),k.length&&Ei(e,function(){for(var K=0;K=R.viewFrom&&r.visible.to<=R.viewTo&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo)&&R.renderedView==R.view&&Mn(e)==0)return!1;Yo(e)&&(hi(e),r.dims=gn(e));var k=L.first+L.size,K=Math.max(r.visible.from-e.options.viewportMargin,L.first),re=Math.min(k,r.visible.to+e.options.viewportMargin);R.viewFromre&&R.viewTo-re<20&&(re=Math.min(k,R.viewTo)),xr&&(K=Zn(e.doc,K),re=nr(e.doc,re));var le=K!=R.viewFrom||re!=R.viewTo||R.lastWrapHeight!=r.wrapperHeight||R.lastWrapWidth!=r.wrapperWidth;Fi(e,K,re),R.viewOffset=pr(q(e.doc,R.viewFrom)),e.display.mover.style.top=R.viewOffset+"px";var ce=Mn(e);if(!le&&ce==0&&!r.force&&R.renderedView==R.view&&(R.updateLineNumbers==null||R.updateLineNumbers>=R.viewTo))return!1;var ve=ll(e);return ce>4&&(R.lineDiv.style.display="none"),cl(e,R.updateLineNumbers,r.dims),ce>4&&(R.lineDiv.style.display=""),R.renderedView=R.view,ul(ve),E(R.cursorDiv),E(R.selectionDiv),R.gutters.style.height=R.sizer.style.minHeight=0,le&&(R.lastWrapHeight=r.wrapperHeight,R.lastWrapWidth=r.wrapperWidth,Ba(e,400)),R.updateLineNumbers=null,!0}function Vo(e,r){for(var R=r.viewport,L=!0;;L=!1){if(!L||!e.options.lineWrapping||r.oldDisplayWidth==rr(e)){if(R&&R.top!=null&&(R={top:Math.min(e.doc.height+mr(e.display)-dr(e),R.top)}),r.visible=Ii(e.display,e.doc,R),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else L&&(r.visible=Ii(e.display,e.doc,R));if(!bo(e,r))break;Zi(e);var k=ja(e);hn(e),_a(e,k),xo(e,k),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _o(e,r){var R=new ro(e,r);if(bo(e,R)){Zi(e),Vo(e,R);var L=ja(e);hn(e),_a(e,L),xo(e,L),R.finish()}}function cl(e,r,R){var L=e.display,k=e.options.lineNumbers,K=L.lineDiv,re=K.firstChild;function le(yt){var wt=yt.nextSibling;return l&&t&&e.display.currentWheelTarget==yt?yt.style.display="none":yt.parentNode.removeChild(yt),wt}for(var ce=L.view,ve=L.viewFrom,Fe=0;Fe-1&&(et=!1),en(e,ze,ve,R)),et&&(E(ze.lineNumber),ze.lineNumber.appendChild(document.createTextNode(St(e.options,ve)))),re=ze.node.nextSibling}ve+=ze.size}for(;re;)re=le(re)}function Eo(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function xo(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+qn(e)+"px"}function Xo(e){var r=e.display,R=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var L=zn(r)-r.scroller.scrollLeft+e.doc.scrollLeft,k=r.gutters.offsetWidth,K=L+"px",re=0;rere.clientWidth,ce=re.scrollHeight>re.clientHeight;if(!(L&&le||k&&ce))return;if(k&&t&&l){e:for(var ve=r.target,Fe=K.view;ve!=re;ve=ve.parentNode)for(var ze=0;ze=0&&xt(e,L.to())<=0)return R}return-1};var lr=function(e,r){this.anchor=e,this.head=r};lr.prototype.from=function(){return Xt(this.anchor,this.head)},lr.prototype.to=function(){return Qt(this.anchor,this.head)},lr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ki(e,r,R){var L=e&&e.options.selectionsMayTouch,k=r[R];r.sort(function(it,et){return xt(it.from(),et.from())}),R=B(r,k);for(var K=1;K0:ce>=0){var ve=Xt(le.from(),re.from()),Fe=Qt(le.to(),re.to()),ze=le.empty()?re.from()==re.head:le.from()==le.head;K<=R&&--R,r.splice(--K,2,new lr(ze?Fe:ve,ze?ve:Fe))}}return new Li(r,R)}function na(e,r){return new Li([new lr(e,r||e)],0)}function ra(e){return e.text?nt(e.from.line+e.text.length-1,Be(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Jo(e,r){if(xt(e,r.from)<0)return e;if(xt(e,r.to)<=0)return ra(r);var R=e.line+r.text.length-(r.to.line-r.from.line)-1,L=e.ch;return e.line==r.to.line&&(L+=ra(r).ch-r.to.ch),nt(R,L)}function wo(e,r){for(var R=[],L=0;L1&&e.remove(le.line+1,yt-1),e.insert(le.line+1,Bt)}At(e,"change",e,r)}function ia(e,r,R){function L(k,K,re){if(k.linked)for(var le=0;le1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Be(e.done)}function is(e,r,R,L){var k=e.history;k.undone.length=0;var K=+new Date,re,le;if((k.lastOp==L||k.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&k.lastModTime>K-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(re=ml(k,k.lastOp==L)))le=Be(re.changes),xt(r.from,r.to)==0&&xt(r.from,le.to)==0?le.to=ra(r):re.changes.push(Oo(e,r));else{var ce=Be(k.done);for((!ce||!ce.ranges)&&oo(e.sel,k.done),re={changes:[Oo(e,r)],generation:k.generation},k.done.push(re);k.done.length>k.undoDepth;)k.done.shift(),k.done[0].ranges||k.done.shift()}k.done.push(R),k.generation=++k.maxGeneration,k.lastModTime=k.lastSelTime=K,k.lastOp=k.lastSelOp=L,k.lastOrigin=k.lastSelOrigin=r.origin,le||Ve(e,"historyAdded")}function vl(e,r,R,L){var k=r.charAt(0);return k=="*"||k=="+"&&R.ranges.length==L.ranges.length&&R.somethingSelected()==L.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,r,R,L){var k=e.history,K=L&&L.origin;R==k.lastSelOp||K&&k.lastSelOrigin==K&&(k.lastModTime==k.lastSelTime&&k.lastOrigin==K||vl(e,K,Be(k.done),r))?k.done[k.done.length-1]=r:oo(r,k.done),k.lastSelTime=+new Date,k.lastSelOrigin=K,k.lastSelOp=R,L&&L.clearRedo!==!1&&rs(k.undone)}function oo(e,r){var R=Be(r);R&&R.ranges&&R.equals(e)||r.push(e)}function as(e,r,R,L){var k=r["spans_"+e.id],K=0;e.iter(Math.max(e.first,R),Math.min(e.first+e.size,L),function(re){re.markedSpans&&((k||(k=r["spans_"+e.id]={}))[K]=re.markedSpans),++K})}function yl(e){if(!e)return null;for(var r,R=0;R-1&&(Be(le)[ze]=ve[ze],delete ve[ze]))}}return L}function Ao(e,r,R,L){if(L){var k=e.anchor;if(R){var K=xt(r,k)<0;K!=xt(R,k)<0?(k=r,r=R):K!=xt(r,R)<0&&(r=R)}return new lr(k,r)}else return new lr(R||r,r)}function so(e,r,R,L,k){k==null&&(k=e.cm&&(e.cm.display.shift||e.extend)),si(e,new Li([Ao(e.sel.primary(),r,R,k)],0),L)}function ss(e,r,R){for(var L=[],k=e.cm&&(e.cm.display.shift||e.extend),K=0;K=r.ch:le.to>r.ch))){if(k&&(Ve(ce,"beforeCursorEnter"),ce.explicitlyCleared))if(K.markedSpans){--re;continue}else break;if(!ce.atomic)continue;if(R){var ze=ce.find(L<0?1:-1),it=void 0;if((L<0?Fe:ve)&&(ze=hs(e,ze,-L,ze&&ze.line==r.line?K:null)),ze&&ze.line==r.line&&(it=xt(ze,R))&&(L<0?it<0:it>0))return xa(e,ze,r,L,k)}var et=ce.find(L<0?-1:1);return(L<0?ve:Fe)&&(et=hs(e,et,L,et.line==r.line?K:null)),et?xa(e,et,r,L,k):null}}return r}function uo(e,r,R,L,k){var K=L||1,re=xa(e,r,R,K,k)||!k&&xa(e,r,R,K,!0)||xa(e,r,R,-K,k)||!k&&xa(e,r,R,-K,!0);return re||(e.cantEdit=!0,nt(e.first,0))}function hs(e,r,R,L){return R<0&&r.ch==0?r.line>e.first?mt(e,nt(r.line-1)):null:R>0&&r.ch==(L||q(e,r.line)).text.length?r.line=0;--k)vs(e,{from:L[k].from,to:L[k].to,text:k?[""]:r.text,origin:r.origin});else vs(e,r)}function vs(e,r){if(r.text.length==1&&r.text[0]==""&&xt(r.from,r.to)==0)return;var R=wo(e,r);is(e,r,R,e.cm?e.cm.curOp.id:NaN),Ha(e,r,R,Xr(e,r));var L=[];ia(e,function(k,K){!K&&B(L,k.history)==-1&&(_s(k.history,r),L.push(k.history)),Ha(k,r,null,Xr(k,r))})}function co(e,r,R){var L=e.cm&&e.cm.state.suppressEdits;if(L&&!R)return;for(var k=e.history,K,re=e.sel,le=r=="undo"?k.done:k.undone,ce=r=="undo"?k.undone:k.done,ve=0;ve=0;--et){var yt=it(et);if(yt)return yt.v}}function gs(e,r){if(r==0)return;if(e.first+=r,e.sel=new Li(Pe(e.sel.ranges,function(k){return new lr(nt(k.anchor.line+r,k.anchor.ch),nt(k.head.line+r,k.head.ch))}),e.sel.primIndex),e.cm){Ar(e.cm,e.first,e.first-r,r);for(var R=e.cm.display,L=R.viewFrom;Le.lastLine())return;if(r.from.lineK&&(r={from:r.from,to:nt(K,q(e,K).text.length),text:[r.text[0]],origin:r.origin}),r.removed=ne(e,r.from,r.to),R||(R=wo(e,r)),e.cm?El(e.cm,r,L):Co(e,r,L),lo(e,R,oe),e.cantEdit&&uo(e,nt(e.firstLine(),0))&&(e.cantEdit=!1)}function El(e,r,R){var L=e.doc,k=e.display,K=r.from,re=r.to,le=!1,ce=K.line;e.options.lineWrapping||(ce=He(tn(q(L,K.line))),L.iter(ce,re.line+1,function(et){if(et==k.maxLine)return le=!0,!0})),L.sel.contains(r.from,r.to)>-1&&we(e),Co(L,r,R,$n(e)),e.options.lineWrapping||(L.iter(ce,K.line+r.text.length,function(et){var yt=kr(et);yt>k.maxLineLength&&(k.maxLine=et,k.maxLineLength=yt,k.maxLineChanged=!0,le=!1)}),le&&(e.curOp.updateMaxLine=!0)),ur(L,K.line),Ba(e,400);var ve=r.text.length-(re.line-K.line)-1;r.full?Ar(e):K.line==re.line&&r.text.length==1&&!es(e.doc,r)?Wr(e,K.line,"text"):Ar(e,K.line,re.line+1,ve);var Fe=Ae(e,"changes"),ze=Ae(e,"change");if(ze||Fe){var it={from:K,to:re,text:r.text,removed:r.removed,origin:r.origin};ze&&At(e,"change",e,it),Fe&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(it)}e.display.selForContextMenu=null}function wa(e,r,R,L,k){var K;L||(L=R),xt(L,R)<0&&(K=[L,R],R=K[0],L=K[1]),typeof r=="string"&&(r=e.splitLines(r)),Sa(e,{from:R,to:L,text:r,origin:k})}function ys(e,r,R,L){R1||!(this.children[0]instanceof Ga))){var le=[];this.collapse(le),this.children=[new Ga(le)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r50){for(var re=k.lines.length%25+25,le=re;le10);e.parent.maybeSpill()},iterN:function(e,r,R){for(var L=0;Le.display.maxLineLength&&(e.display.maxLine=ve,e.display.maxLineLength=Fe,e.display.maxLineChanged=!0)}L!=null&&e&&this.collapsed&&Ar(e,L,k+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ds(e.doc)),e&&At(e,"markerCleared",e,this,L,k),r&&pa(e),this.parent&&this.parent.clear()},aa.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var R,L,k=0;k0||re==0&&K.clearWhenEmpty!==!1)return K;if(K.replacedWith&&(K.collapsed=!0,K.widgetNode=C("span",[K.replacedWith],"CodeMirror-widget"),L.handleMouseEvents||K.widgetNode.setAttribute("cm-ignore-events","true"),L.insertLeft&&(K.widgetNode.insertLeft=!0)),K.collapsed){if(la(e,r.line,r,R,K)||r.line!=R.line&&la(e,R.line,r,R,K))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sr()}K.addToHistory&&is(e,{from:r,to:R,origin:"markText"},e.sel,NaN);var le=r.line,ce=e.cm,ve;if(e.iter(le,R.line+1,function(ze){ce&&K.collapsed&&!ce.options.lineWrapping&&tn(ze)==ce.display.maxLine&&(ve=!0),K.collapsed&&le!=r.line&&xe(ze,0),Or(ze,new Vr(K,le==r.line?r.ch:null,le==R.line?R.ch:null)),++le}),K.collapsed&&e.iter(r.line,R.line+1,function(ze){cr(e,ze)&&xe(ze,0)}),K.clearOnEnter&&Me(K,"beforeCursorEnter",function(){return K.clear()}),K.readOnly&&(Cr(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),K.collapsed&&(K.id=++xs,K.atomic=!0),ce){if(ve&&(ce.curOp.updateMaxLine=!0),K.collapsed)Ar(ce,r.line,R.line+1);else if(K.className||K.startStyle||K.endStyle||K.css||K.attributes||K.title)for(var Fe=r.line;Fe<=R.line;Fe++)Wr(ce,Fe,"text");K.atomic&&ds(ce.doc),At(ce,"markerAdded",ce,K)}return K}var Ya=function(e,r){this.markers=e,this.primary=r;for(var R=0;R=0;ce--)Sa(this,L[ce]);le?us(this,le):this.cm&&wr(this.cm)}),undo:qr(function(){co(this,"undo")}),redo:qr(function(){co(this,"redo")}),undoSelection:qr(function(){co(this,"undo",!0)}),redoSelection:qr(function(){co(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,R=0,L=0;L=e.ch)&&r.push(k.marker.parent||k.marker)}return r},findMarks:function(e,r,R){e=mt(this,e),r=mt(this,r);var L=[],k=e.line;return this.iter(e.line,r.line+1,function(K){var re=K.markedSpans;if(re)for(var le=0;le=ce.to||ce.from==null&&k!=e.line||ce.from!=null&&k==r.line&&ce.from>=r.ch)&&(!R||R(ce.marker))&&L.push(ce.marker.parent||ce.marker)}++k}),L},getAllMarks:function(){var e=[];return this.iter(function(r){var R=r.markedSpans;if(R)for(var L=0;Le)return r=e,!0;e-=K,++R}),mt(this,nt(R,r))},indexFromPos:function(e){e=mt(this,e);var r=e.ch;if(e.liner&&(r=e.from),e.to!=null&&e.to-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var Fe=e.dataTransfer.getData("Text");if(Fe){var ze;if(r.state.draggingText&&!r.state.draggingText.copy&&(ze=r.listSelections()),lo(r.doc,na(R,R)),ze)for(var it=0;it=0;le--)wa(e.doc,"",L[le].from,L[le].to,"+delete");wr(e)})}function Ro(e,r,R){var L=N(e.text,r+R,R);return L<0||L>e.text.length?null:L}function Do(e,r,R){var L=Ro(e,r.ch,R);return L==null?null:new nt(r.line,L,R<0?"after":"before")}function Po(e,r,R,L,k){if(e){r.doc.direction=="rtl"&&(k=-k);var K=rt(R,r.doc.direction);if(K){var re=k<0?Be(K):K[0],le=k<0==(re.level==1),ce=le?"after":"before",ve;if(re.level>0||r.doc.direction=="rtl"){var Fe=Hn(r,R);ve=k<0?R.text.length-1:0;var ze=Xn(r,Fe,ve).top;ve=$(function(it){return Xn(r,Fe,it).top==ze},k<0==(re.level==1)?re.from:re.to-1,ve),ce=="before"&&(ve=Ro(R,ve,1))}else ve=k<0?re.to:re.from;return new nt(L,ve,ce)}}return new nt(L,k<0?R.text.length:0,k<0?"before":"after")}function Il(e,r,R,L){var k=rt(r,e.doc.direction);if(!k)return Do(r,R,L);R.ch>=r.text.length?(R.ch=r.text.length,R.sticky="before"):R.ch<=0&&(R.ch=0,R.sticky="after");var K=me(k,R.ch,R.sticky),re=k[K];if(e.doc.direction=="ltr"&&re.level%2==0&&(L>0?re.to>R.ch:re.from=re.from&&it>=Fe.begin)){var et=ze?"before":"after";return new nt(R.line,it,et)}}var yt=function(Bt,Vt,Wt){for(var $t=function(br,Qr){return Qr?new nt(R.line,le(br,1),"before"):new nt(R.line,br,"after")};Bt>=0&&Bt0==(yn.level!=1),Wn=ln?Wt.begin:le(Wt.end,-1);if(yn.from<=Wn&&Wn0?Fe.end:le(Fe.begin,-1);return Pt!=null&&!(L>0&&Pt==r.text.length)&&(wt=yt(L>0?0:k.length-1,L,ve(Pt)),wt)?wt:null}var Qa={selectAll:ps,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),oe)},killLine:function(e){return Oa(e,function(r){if(r.empty()){var R=q(e.doc,r.head.line).text.length;return r.head.ch==R&&r.head.line0)k=new nt(k.line,k.ch+1),e.replaceRange(K.charAt(k.ch-1)+K.charAt(k.ch-2),nt(k.line,k.ch-2),k,"+transpose");else if(k.line>e.doc.first){var re=q(e.doc,k.line-1).text;re&&(k=new nt(k.line,1),e.replaceRange(K.charAt(0)+e.doc.lineSeparator()+re.charAt(re.length-1),nt(k.line-1,re.length-1),k,"+transpose"))}}R.push(new lr(k,k))}e.setSelections(R)})},newlineAndIndent:function(e){return Ei(e,function(){for(var r=e.listSelections(),R=r.length-1;R>=0;R--)e.replaceRange(e.doc.lineSeparator(),r[R].anchor,r[R].head,"+input");r=e.listSelections();for(var L=0;Le&&xt(r,this.pos)==0&&R==this.button};var Za,eo;function Kl(e,r){var R=+new Date;return eo&&eo.compare(R,e,r)?(Za=eo=null,"triple"):Za&&Za.compare(R,e,r)?(eo=new ko(R,e,r),Za=null,"double"):(Za=new ko(R,e,r),eo=null,"single")}function js(e){var r=this,R=r.display;if(Ke(r,e)||R.activeTouch&&R.input.supportsTouch())return;if(R.input.ensurePolled(),R.shift=e.shiftKey,wn(R,e)){l||(R.scroller.draggable=!1,setTimeout(function(){return R.scroller.draggable=!0},100));return}if(Io(r,e))return;var L=Ln(r,e),k=qe(e),K=L?Kl(L,k):"single";if(window.focus(),k==1&&r.state.selectingText&&r.state.selectingText(e),L&&Hl(r,k,L,K,e))return;k==1?L?Gl(r,L,K,e):Ge(e)==R.scroller&&fe(e):k==2?(L&&so(r.doc,L),setTimeout(function(){return R.input.focus()},20)):k==3&&(b?r.display.input.onContextMenu(e):ca(r))}function Hl(e,r,R,L,k){var K="Click";return L=="double"?K="Double"+K:L=="triple"&&(K="Triple"+K),K=(r==1?"Left":r==2?"Middle":"Right")+K,Ja(e,Ls(K,k),k,function(re){if(typeof re=="string"&&(re=Qa[re]),!re)return!1;var le=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),le=re(e,R)!=ie}finally{e.state.suppressEdits=!1}return le})}function zl(e,r,R){var L=e.getOption("configureMouse"),k=L?L(e,r,R):{};if(k.unit==null){var K=c?R.shiftKey&&R.metaKey:R.altKey;k.unit=K?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(k.extend==null||e.doc.extend)&&(k.extend=e.doc.extend||R.shiftKey),k.addNew==null&&(k.addNew=t?R.metaKey:R.ctrlKey),k.moveOnDrag==null&&(k.moveOnDrag=!(t?R.altKey:R.ctrlKey)),k}function Gl(e,r,R,L){O?setTimeout(j(Nr,e),0):e.curOp.focus=I();var k=zl(e,R,L),K=e.doc.sel,re;e.options.dragDrop&&pt&&!e.isReadOnly()&&R=="single"&&(re=K.contains(r))>-1&&(xt((re=K.ranges[re]).from(),r)<0||r.xRel>0)&&(xt(re.to(),r)>0||r.xRel<0)?Vl(e,L,r,k):Xl(e,L,r,k)}function Vl(e,r,R,L){var k=e.display,K=!1,re=$r(e,function(ve){l&&(k.scroller.draggable=!1),e.state.draggingText=!1,tt(k.wrapper.ownerDocument,"mouseup",re),tt(k.wrapper.ownerDocument,"mousemove",le),tt(k.scroller,"dragstart",ce),tt(k.scroller,"drop",re),K||(fe(ve),L.addNew||so(e.doc,R,null,null,L.extend),l&&!a||O&&T==9?setTimeout(function(){k.wrapper.ownerDocument.body.focus({preventScroll:!0}),k.input.focus()},20):k.input.focus())}),le=function(ve){K=K||Math.abs(r.clientX-ve.clientX)+Math.abs(r.clientY-ve.clientY)>=10},ce=function(){return K=!0};l&&(k.scroller.draggable=!0),e.state.draggingText=re,re.copy=!L.moveOnDrag,k.scroller.dragDrop&&k.scroller.dragDrop(),Me(k.wrapper.ownerDocument,"mouseup",re),Me(k.wrapper.ownerDocument,"mousemove",le),Me(k.scroller,"dragstart",ce),Me(k.scroller,"drop",re),ca(e),setTimeout(function(){return k.input.focus()},20)}function Fs(e,r,R){if(R=="char")return new lr(r,r);if(R=="word")return e.findWordAt(r);if(R=="line")return new lr(nt(r.line,0),mt(e.doc,nt(r.line+1,0)));var L=R(e,r);return new lr(L.from,L.to)}function Xl(e,r,R,L){var k=e.display,K=e.doc;fe(r);var re,le,ce=K.sel,ve=ce.ranges;if(L.addNew&&!L.extend?(le=K.sel.contains(R),le>-1?re=ve[le]:re=new lr(R,R)):(re=K.sel.primary(),le=K.sel.primIndex),L.unit=="rectangle")L.addNew||(re=new lr(R,R)),R=Ln(e,r,!0,!0),le=-1;else{var Fe=Fs(e,R,L.unit);L.extend?re=Ao(re,Fe.anchor,Fe.head,L.extend):re=Fe}L.addNew?le==-1?(le=ve.length,si(K,Ki(e,ve.concat([re]),le),{scroll:!1,origin:"*mouse"})):ve.length>1&&ve[le].empty()&&L.unit=="char"&&!L.extend?(si(K,Ki(e,ve.slice(0,le).concat(ve.slice(le+1)),0),{scroll:!1,origin:"*mouse"}),ce=K.sel):Lo(K,le,re,Ee):(le=0,si(K,new Li([re],0),Ee),ce=K.sel);var ze=R;function it(Wt){if(xt(ze,Wt)==0)return;if(ze=Wt,L.unit=="rectangle"){for(var $t=[],yn=e.options.tabSize,ln=X(q(K,R.line).text,R.ch,yn),Wn=X(q(K,Wt.line).text,Wt.ch,yn),br=Math.min(ln,Wn),Qr=Math.max(ln,Wn),Lr=Math.min(R.line,Wt.line),xi=Math.min(e.lastLine(),Math.max(R.line,Wt.line));Lr<=xi;Lr++){var mi=q(K,Lr).text,Kr=Le(mi,br,yn);br==Qr?$t.push(new lr(nt(Lr,Kr),nt(Lr,Kr))):mi.length>Kr&&$t.push(new lr(nt(Lr,Kr),nt(Lr,Le(mi,Qr,yn))))}$t.length||$t.push(new lr(R,R)),si(K,Ki(e,ce.ranges.slice(0,le).concat($t),le),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Wt)}else{var vi=re,ni=Fs(e,Wt,L.unit),Gr=vi.anchor,Hr;xt(ni.anchor,Gr)>0?(Hr=ni.head,Gr=Xt(vi.from(),ni.anchor)):(Hr=ni.anchor,Gr=Qt(vi.to(),ni.head));var Pr=ce.ranges.slice(0);Pr[le]=Yl(e,new lr(mt(K,Gr),Hr)),si(K,Ki(e,Pr,le),Ee)}}var et=k.wrapper.getBoundingClientRect(),yt=0;function wt(Wt){var $t=++yt,yn=Ln(e,Wt,!0,L.unit=="rectangle");if(!yn)return;if(xt(yn,ze)!=0){e.curOp.focus=I(),it(yn);var ln=Ii(k,K);(yn.line>=ln.to||yn.lineet.bottom?20:0;Wn&&setTimeout($r(e,function(){if(yt!=$t)return;k.scroller.scrollTop+=Wn,wt(Wt)}),50)}}function Pt(Wt){e.state.selectingText=!1,yt=Infinity,Wt&&(fe(Wt),k.input.focus()),tt(k.wrapper.ownerDocument,"mousemove",Bt),tt(k.wrapper.ownerDocument,"mouseup",Vt),K.history.lastSelOrigin=null}var Bt=$r(e,function(Wt){Wt.buttons===0||!qe(Wt)?Pt(Wt):wt(Wt)}),Vt=$r(e,Pt);e.state.selectingText=Vt,Me(k.wrapper.ownerDocument,"mousemove",Bt),Me(k.wrapper.ownerDocument,"mouseup",Vt)}function Yl(e,r){var R=r.anchor,L=r.head,k=q(e.doc,R.line);if(xt(R,L)==0&&R.sticky==L.sticky)return r;var K=rt(k);if(!K)return r;var re=me(K,R.ch,R.sticky),le=K[re];if(le.from!=R.ch&&le.to!=R.ch)return r;var ce=re+(le.from==R.ch==(le.level!=1)?0:1);if(ce==0||ce==K.length)return r;var ve;if(L.line!=R.line)ve=(L.line-R.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var Fe=me(K,L.ch,L.sticky),ze=Fe-re||(L.ch-R.ch)*(le.level==1?-1:1);Fe==ce-1||Fe==ce?ve=ze<0:ve=ze>0}var it=K[ce+(ve?-1:0)],et=ve==(it.level==1),yt=et?it.from:it.to,wt=et?"after":"before";return R.ch==yt&&R.sticky==wt?r:new lr(new nt(R.line,yt,wt),L)}function Bs(e,r,R,L){var k,K;if(r.touches)k=r.touches[0].clientX,K=r.touches[0].clientY;else try{k=r.clientX,K=r.clientY}catch(it){return!1}if(k>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;L&&fe(r);var re=e.display,le=re.lineDiv.getBoundingClientRect();if(K>le.bottom||!Ae(e,R))return _e(r);K-=le.top-re.viewOffset;for(var ce=0;ce=k){var Fe=Je(e.doc,K),ze=e.display.gutterSpecs[ce];return Ve(e,R,e,Fe,ze.className,r),_e(r)}}}function Io(e,r){return Bs(e,r,"gutterClick",!0)}function Ws(e,r){if(wn(e.display,r)||$l(e,r))return;if(Ke(e,r,"contextmenu"))return;b||e.display.input.onContextMenu(r)}function $l(e,r){return Ae(e,"gutterContextMenu")?Bs(e,r,"gutterContextMenu",!1):!1}function Ks(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ht(e)}var Aa={toString:function(){return"CodeMirror.Init"}},Hs={},mo={};function ql(e){var r=e.optionHandlers;function R(L,k,K,re){e.defaults[L]=k,K&&(r[L]=re?function(le,ce,ve){ve!=Aa&&K(le,ce,ve)}:K)}e.defineOption=R,e.Init=Aa,R("value","",function(L,k){return L.setValue(k)},!0),R("mode",null,function(L,k){L.doc.modeOption=k,To(L)},!0),R("indentUnit",2,To,!0),R("indentWithTabs",!1),R("smartIndent",!0),R("tabSize",4,function(L){Ka(L),Ht(L),Ar(L)},!0),R("lineSeparator",null,function(L,k){if(L.doc.lineSep=k,!k)return;var K=[],re=L.doc.first;L.doc.iter(function(ce){for(var ve=0;;){var Fe=ce.text.indexOf(k,ve);if(Fe==-1)break;ve=Fe+k.length,K.push(nt(re,Fe))}re++});for(var le=K.length-1;le>=0;le--)wa(L.doc,k,K[le],nt(K[le].line,K[le].ch+k.length))}),R("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(L,k,K){L.state.specialChars=new RegExp(k.source+(k.test(" ")?"":"| "),"g"),K!=Aa&&L.refresh()}),R("specialCharPlaceholder",Pa,function(L){return L.refresh()},!0),R("electricChars",!0),R("inputStyle",n?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),R("spellcheck",!1,function(L,k){return L.getInputField().spellcheck=k},!0),R("autocorrect",!1,function(L,k){return L.getInputField().autocorrect=k},!0),R("autocapitalize",!1,function(L,k){return L.getInputField().autocapitalize=k},!0),R("rtlMoveVisually",!y),R("wholeLineUpdateBefore",!0),R("theme","default",function(L){Ks(L),Wa(L)},!0),R("keyMap","default",function(L,k,K){var re=ho(k),le=K!=Aa&&ho(K);le&&le.detach&&le.detach(L,re),re.attach&&re.attach(L,le||null)}),R("extraKeys",null),R("configureMouse",null),R("lineWrapping",!1,Jl,!0),R("gutters",[],function(L,k){L.display.gutterSpecs=So(k,L.options.lineNumbers),Wa(L)},!0),R("fixedGutter",!0,function(L,k){L.display.gutters.style.left=k?zn(L.display)+"px":"0",L.refresh()},!0),R("coverGutterNextToScrollbar",!1,function(L){return _a(L)},!0),R("scrollbarStyle","native",function(L){Go(L),_a(L),L.display.scrollbars.setScrollTop(L.doc.scrollTop),L.display.scrollbars.setScrollLeft(L.doc.scrollLeft)},!0),R("lineNumbers",!1,function(L,k){L.display.gutterSpecs=So(L.options.gutters,k),Wa(L)},!0),R("firstLineNumber",1,Wa,!0),R("lineNumberFormatter",function(L){return L},Wa,!0),R("showCursorWhenSelecting",!1,hn,!0),R("resetSelectionOnContextMenu",!0),R("lineWiseCopyCut",!0),R("pasteLinesPerSelection",!0),R("selectionsMayTouch",!1),R("readOnly",!1,function(L,k){k=="nocursor"&&(ki(L),L.display.input.blur()),L.display.input.readOnlyChanged(k)}),R("screenReaderLabel",null,function(L,k){k=k===""?null:k,L.display.input.screenReaderLabelChanged(k)}),R("disableInput",!1,function(L,k){k||L.display.input.reset()},!0),R("dragDrop",!0,Ql),R("allowDropFileTypes",null),R("cursorBlinkRate",530),R("cursorScrollMargin",0),R("cursorHeight",1,hn,!0),R("singleCursorHeightPerLine",!0,hn,!0),R("workTime",100),R("workDelay",100),R("flattenSpans",!0,Ka,!0),R("addModeClass",!1,Ka,!0),R("pollInterval",100),R("undoDepth",200,function(L,k){return L.doc.history.undoDepth=k}),R("historyEventDelay",1250),R("viewportMargin",10,function(L){return L.refresh()},!0),R("maxHighlightLength",1e4,Ka,!0),R("moveInputWithCursor",!0,function(L,k){k||L.display.input.resetPosition()}),R("tabindex",null,function(L,k){return L.display.input.getField().tabIndex=k||""}),R("autofocus",null),R("direction","ltr",function(L,k){return L.doc.setDirection(k)},!0),R("phrases",null)}function Ql(e,r,R){var L=R&&R!=Aa;if(!r!=!L){var k=e.display.dragFunctions,K=r?Me:tt;K(e.display.scroller,"dragstart",k.start),K(e.display.scroller,"dragenter",k.enter),K(e.display.scroller,"dragover",k.over),K(e.display.scroller,"dragleave",k.leave),K(e.display.scroller,"drop",k.drop)}}function Jl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(g(e.display.wrapper,"CodeMirror-wrap"),oi(e)),Dr(e),Ar(e),Ht(e),setTimeout(function(){return _a(e)},100)}function Tr(e,r){var R=this;if(!(this instanceof Tr))return new Tr(e,r);this.options=r=r?G(r):{},G(Hs,r,!1);var L=r.value;typeof L=="string"?L=new pi(L,r.mode,null,r.lineSeparator,r.direction):r.mode&&(L.modeOption=r.mode),this.doc=L;var k=new Tr.inputStyles[r.inputStyle](this),K=this.display=new dl(e,L,k,r);K.wrapper.CodeMirror=this,Ks(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Go(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new J,keySeq:null,specialChars:null},r.autofocus&&!n&&K.input.focus(),O&&T<11&&setTimeout(function(){return R.display.input.reset(!0)},20),Zl(this),Rl(),ha(this),this.curOp.forceUpdate=!0,ts(this,L),r.autofocus&&!n||this.hasFocus()?setTimeout(function(){R.hasFocus()&&!R.state.focused&&rn(R)},20):ki(this);for(var re in mo)mo.hasOwnProperty(re)&&mo[re](this,r[re],Aa);Yo(this),r.finishInit&&r.finishInit(this);for(var le=0;le20*20}Me(r.scroller,"touchstart",function(ce){if(!Ke(e,ce)&&!K(ce)&&!Io(e,ce)){r.input.ensurePolled(),clearTimeout(R);var ve=+new Date;r.activeTouch={start:ve,moved:!1,prev:ve-L.end<=300?L:null},ce.touches.length==1&&(r.activeTouch.left=ce.touches[0].pageX,r.activeTouch.top=ce.touches[0].pageY)}}),Me(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Me(r.scroller,"touchend",function(ce){var ve=r.activeTouch;if(ve&&!wn(r,ce)&&ve.left!=null&&!ve.moved&&new Date-ve.start<300){var Fe=e.coordsChar(r.activeTouch,"page"),ze;!ve.prev||re(ve,ve.prev)?ze=new lr(Fe,Fe):!ve.prev.prev||re(ve,ve.prev.prev)?ze=e.findWordAt(Fe):ze=new lr(nt(Fe.line,0),mt(e.doc,nt(Fe.line+1,0))),e.setSelection(ze.anchor,ze.head),e.focus(),fe(ce)}k()}),Me(r.scroller,"touchcancel",k),Me(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ua(e,r.scroller.scrollTop),da(e,r.scroller.scrollLeft,!0),Ve(e,"scroll",e))}),Me(r.scroller,"mousewheel",function(ce){return Qo(e,ce)}),Me(r.scroller,"DOMMouseScroll",function(ce){return Qo(e,ce)}),Me(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(ce){Ke(e,ce)||be(ce)},over:function(ce){Ke(e,ce)||(Ll(e,ce),be(ce))},start:function(ce){return Al(e,ce)},drop:$r(e,Ol),leave:function(ce){Ke(e,ce)||Ts(e)}};var le=r.input.getField();Me(le,"keyup",function(ce){return Ns.call(e,ce)}),Me(le,"keydown",$r(e,Is)),Me(le,"keypress",$r(e,Us)),Me(le,"focus",function(ce){return rn(e,ce)}),Me(le,"blur",function(ce){return ki(e,ce)})}var No=[];Tr.defineInitHook=function(e){return No.push(e)};function to(e,r,R,L){var k=e.doc,K;R==null&&(R="add"),R=="smart"&&(k.mode.indent?K=mn(e,r).state:R="prev");var re=e.options.tabSize,le=q(k,r),ce=X(le.text,null,re);le.stateAfter&&(le.stateAfter=null);var ve=le.text.match(/^\s*/)[0],Fe;if(!L&&!/\S/.test(le.text))Fe=0,R="not";else if(R=="smart"&&(Fe=k.mode.indent(K,le.text.slice(ve.length),le.text),Fe==ie||Fe>150)){if(!L)return;R="prev"}R=="prev"?r>k.first?Fe=X(q(k,r-1).text,null,re):Fe=0:R=="add"?Fe=ce+e.options.indentUnit:R=="subtract"?Fe=ce-e.options.indentUnit:typeof R=="number"&&(Fe=ce+R),Fe=Math.max(0,Fe);var ze="",it=0;if(e.options.indentWithTabs)for(var et=Math.floor(Fe/re);et;--et)it+=re,ze+=" ";if(itre,ce=lt(r),ve=null;if(le&&L.ranges.length>1)if(Hi&&Hi.text.join(` `)==r){if(L.ranges.length%Hi.text.length==0){ve=[];for(var Fe=0;Fe=0;it--){var et=L.ranges[it],yt=et.from(),wt=et.to();et.empty()&&(R&&R>0?yt=nt(yt.line,yt.ch-R):e.state.overwrite&&!le?wt=nt(wt.line,Math.min(q(K,wt.line).text.length,wt.ch+Be(ce).length)):le&&Hi&&Hi.lineWise&&Hi.text.join(` `)==ce.join(` `)&&(yt=wt=nt(yt.line,0)));var Pt={from:yt,to:wt,text:ve?ve[it%ve.length]:ce,origin:k||(le?"paste":e.state.cutIncoming>re?"cut":"+input")};Sa(e.doc,Pt),At(e,"inputRead",e,Pt)}r&&!le&&Gs(e,r),wr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ze),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zs(e,r){var R=e.clipboardData&&e.clipboardData.getData("Text");if(R)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ei(r,function(){return Uo(r,R,0,null,"paste")}),!0}function Gs(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var R=e.doc.sel,L=R.ranges.length-1;L>=0;L--){var k=R.ranges[L];if(k.head.ch>100||L&&R.ranges[L-1].head.line==k.head.line)continue;var K=e.getModeAt(k.head),re=!1;if(K.electricChars){for(var le=0;le-1){re=to(e,k.head.line,"smart");break}}else K.electricInput&&(K.electricInput.test(q(e.doc,k.head.line).text.slice(0,k.head.ch))&&(re=to(e,k.head.line,"smart")));re&&At(e,"electricInput",e,k.head.line)}}function Vs(e){for(var r=[],R=[],L=0;LK&&(to(this,le.head.line,L,!0),K=le.head.line,re==this.doc.sel.primIndex&&wr(this));else{var ce=le.from(),ve=le.to(),Fe=Math.max(K,ce.line);K=Math.min(this.lastLine(),ve.line-(ve.ch?0:1))+1;for(var ze=Fe;ze0&&Lo(this.doc,re,new lr(ce,it[re].to()),oe)}}}),getTokenAt:function(L,k){return _r(this,L,k)},getLineTokens:function(L,k){return _r(this,nt(L),k,!0)},getTokenTypeAt:function(L){L=mt(this.doc,L);var k=ar(this,q(this.doc,L.line)),K=0,re=(k.length-1)/2,le=L.ch,ce;if(le==0)ce=k[2];else for(;;){var ve=K+re>>1;if((ve?k[ve*2-1]:0)>=le)re=ve;else if(k[ve*2+1]ce&&(L=ce,re=!0),le=q(this.doc,L)}else le=L;return sn(this,le,{top:0,left:0},k||"page",K||re).top+(re?this.doc.height-pr(le):0)},defaultTextHeight:function(){return ji(this.display)},defaultCharWidth:function(){return Nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(L,k,K,re,le){var ce=this.display;L=In(this,mt(this.doc,L));var ve=L.bottom,Fe=L.left;if(k.style.position="absolute",k.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(k),ce.sizer.appendChild(k),re=="over")ve=L.top;else if(re=="above"||re=="near"){var ze=Math.max(ce.wrapper.clientHeight,this.doc.height),it=Math.max(ce.sizer.clientWidth,ce.lineSpace.clientWidth);(re=="above"||L.bottom+k.offsetHeight>ze)&&L.top>k.offsetHeight?ve=L.top-k.offsetHeight:L.bottom+k.offsetHeight<=ze&&(ve=L.bottom),Fe+k.offsetWidth>it&&(Fe=it-k.offsetWidth)}k.style.top=ve+"px",k.style.left=k.style.right="",le=="right"?(Fe=ce.sizer.clientWidth-k.offsetWidth,k.style.right="0px"):(le=="left"?Fe=0:le=="middle"&&(Fe=(ce.sizer.clientWidth-k.offsetWidth)/2),k.style.left=Fe+"px"),K&&ta(this,{left:Fe,top:ve,right:Fe+k.offsetWidth,bottom:ve+k.offsetHeight})},triggerOnKeyDown:ci(Is),triggerOnKeyPress:ci(Us),triggerOnKeyUp:Ns,triggerOnMouseDown:ci(js),execCommand:function(L){if(Qa.hasOwnProperty(L))return Qa[L].call(null,this)},triggerElectric:ci(function(L){Gs(this,L)}),findPosH:function(L,k,K,re){var le=1;k<0&&(le=-1,k=-k);for(var ce=mt(this.doc,L),ve=0;ve0&&Fe(K.charAt(re-1));)--re;for(;le.5||this.options.lineWrapping)&&Dr(this),Ve(this,"refresh",this)}),swapDoc:ci(function(L){var k=this.doc;return k.cm=null,this.state.selectingText&&this.state.selectingText(),ts(this,L),Ht(this),this.display.input.reset(),Na(this,L.scrollLeft,L.scrollTop),this.curOp.forceScroll=!0,At(this,"swapDoc",this,k),k}),phrase:function(L){var k=this.options.phrases;return k&&Object.prototype.hasOwnProperty.call(k,L)?k[L]:L},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Oe(e),e.registerHelper=function(L,k,K){R.hasOwnProperty(L)||(R[L]=e[L]={_global:[]}),R[L][k]=K},e.registerGlobalHelper=function(L,k,K,re){e.registerHelper(L,k,re),R[L]._global.push({pred:K,val:re})}}function jo(e,r,R,L,k){var K=r,re=R,le=q(e,r.line),ce=k&&e.direction=="rtl"?-R:R;function ve(){var Vt=r.line+ce;return Vt=e.first+e.size?!1:(r=new nt(Vt,r.ch,r.sticky),le=q(e,Vt))}function Fe(Vt){var Wt;if(L=="codepoint"){var $t=le.text.charCodeAt(r.ch+(L>0?0:-1));isNaN($t)?Wt=null:Wt=new nt(r.line,Math.max(0,Math.min(le.text.length,r.ch+R*($t>=55296&&$t<56320?2:1))),-R)}else k?Wt=Il(e.cm,le,r,R):Wt=Do(le,r,R);if(Wt==null)if(!Vt&&ve())r=Po(k,e.cm,le,r.line,ce);else return!1;else r=Wt;return!0}if(L=="char"||L=="codepoint")Fe();else if(L=="column")Fe(!0);else if(L=="word"||L=="group")for(var ze=null,it=L=="group",et=e.cm&&e.cm.getHelper(r,"wordChars"),yt=!0;!(R<0&&!Fe(!yt));yt=!1){var wt=le.text.charAt(r.ch)||` `,Pt=Ue(wt,et)?"w":it&&wt==` `?"n":!it||/\s/.test(wt)?null:"p";if(it&&!yt&&!Pt&&(Pt="s"),ze&&ze!=Pt){R<0&&(R=1,Fe(),r.sticky="after");break}if(Pt&&(ze=Pt),R>0&&!Fe(!yt))break}var Bt=uo(e,r,K,re,!0);return ut(K,Bt)&&(Bt.hitSide=!0),Bt}function $s(e,r,R,L){var k=e.doc,K=r.left,re;if(L=="page"){var le=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ce=Math.max(le-.5*ji(e.display),3);re=(R>0?r.bottom:r.top)+R*ce}else L=="line"&&(re=R>0?r.bottom+3:r.top-3);for(var ve;!(ve=Er(e,K,re),!ve.outside);){if(R<0?re<=0:re>=k.height){ve.hitSide=!0;break}re+=R*5}return ve}var fr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};fr.prototype.init=function(e){var r=this,R=this,L=R.cm,k=R.div=e.lineDiv;Xs(k,L.options.spellcheck,L.options.autocorrect,L.options.autocapitalize);function K(le){for(var ce=le.target;ce;ce=ce.parentNode){if(ce==k)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ce.className))break}return!1}Me(k,"paste",function(le){if(!K(le)||Ke(L,le)||zs(le,L))return;T<=11&&setTimeout($r(L,function(){return r.updateFromDOM()}),20)}),Me(k,"compositionstart",function(le){r.composing={data:le.data,done:!1}}),Me(k,"compositionupdate",function(le){r.composing||(r.composing={data:le.data,done:!1})}),Me(k,"compositionend",function(le){r.composing&&(le.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Me(k,"touchstart",function(){return R.forceCompositionEnd()}),Me(k,"input",function(){r.composing||r.readFromDOMSoon()});function re(le){if(!K(le)||Ke(L,le))return;if(L.somethingSelected())vo({lineWise:!1,text:L.getSelections()}),le.type=="cut"&&L.replaceSelection("",null,"cut");else if(L.options.lineWiseCopyCut){var ce=Vs(L);vo({lineWise:!0,text:ce.text}),le.type=="cut"&&L.operation(function(){L.setSelections(ce.ranges,0,oe),L.replaceSelection("",null,"cut")})}else return;if(le.clipboardData){le.clipboardData.clearData();var ve=Hi.text.join(` `);if(le.clipboardData.setData("Text",ve),le.clipboardData.getData("Text")==ve){le.preventDefault();return}}var Fe=Ys(),ze=Fe.firstChild;L.display.lineSpace.insertBefore(Fe,L.display.lineSpace.firstChild),ze.value=Hi.text.join(` `);var it=document.activeElement;te(ze),setTimeout(function(){L.display.lineSpace.removeChild(Fe),it.focus(),it==k&&R.showPrimarySelection()},50)}Me(k,"copy",re),Me(k,"cut",re)},fr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},fr.prototype.prepareSelection=function(){var e=Un(this.cm,!1);return e.focus=document.activeElement==this.div,e},fr.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},fr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},fr.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,R=r.doc.sel.primary(),L=R.from(),k=R.to();if(r.display.viewTo==r.display.viewFrom||L.line>=r.display.viewTo||k.line=r.display.viewFrom&&Qs(r,L)||{node:le[0].measure.map[2],offset:0},ve=k.linee.firstLine()&&(L=nt(L.line-1,q(e.doc,L.line-1).length)),k.ch==q(e.doc,k.line).text.length&&k.liner.viewTo-1)return!1;var K,re,le;L.line==r.viewFrom||(K=Yr(e,L.line))==0?(re=He(r.view[0].line),le=r.view[0].node):(re=He(r.view[K].line),le=r.view[K-1].node.nextSibling);var ce=Yr(e,k.line),ve,Fe;if(ce==r.view.length-1?(ve=r.viewTo-1,Fe=r.lineDiv.lastChild):(ve=He(r.view[ce+1].line)-1,Fe=r.view[ce+1].node.previousSibling),!le)return!1;for(var ze=e.doc.splitLines(nu(e,le,Fe,re,ve)),it=ne(e.doc,nt(re,0),nt(ve,q(e.doc,ve).text.length));ze.length>1&&it.length>1;)if(Be(ze)==Be(it))ze.pop(),it.pop(),ve--;else if(ze[0]==it[0])ze.shift(),it.shift(),re++;else break;for(var et=0,yt=0,wt=ze[0],Pt=it[0],Bt=Math.min(wt.length,Pt.length);etL.ch&&Vt.charCodeAt(Vt.length-yt-1)==Wt.charCodeAt(Wt.length-yt-1);)et--,yt++;ze[ze.length-1]=Vt.slice(0,Vt.length-yt).replace(/^\u200b+/,""),ze[0]=ze[0].slice(et).replace(/\u200b+$/,"");var yn=nt(re,et),ln=nt(ve,it.length?Be(it).length-yt:0);if(ze.length>1||ze[0]||xt(yn,ln))return wa(e.doc,ze,yn,ln,"+input"),!0},fr.prototype.ensurePolled=function(){this.forceCompositionEnd()},fr.prototype.reset=function(){this.forceCompositionEnd()},fr.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},fr.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},fr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ei(this.cm,function(){return Ar(e.cm)})},fr.prototype.setUneditable=function(e){e.contentEditable="false"},fr.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||$r(this.cm,Uo)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},fr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},fr.prototype.onContextMenu=function(){},fr.prototype.resetPosition=function(){},fr.prototype.needsContentAttribute=!0;function Qs(e,r){var R=an(e,r.line);if(!R||R.hidden)return null;var L=q(e.doc,r.line),k=Qn(R,L,r.line),K=rt(L,e.doc.direction),re="left";if(K){var le=me(K,r.ch);re=le%2?"right":"left"}var ce=Fn(k.map,r.ch,re);return ce.offset=ce.collapse=="right"?ce.end:ce.start,ce}function tu(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function La(e,r){return r&&(e.bad=!0),e}function nu(e,r,R,L,k){var K="",re=!1,le=e.doc.lineSeparator(),ce=!1;function ve(et){return function(yt){return yt.id==et}}function Fe(){re&&(K+=le,ce&&(K+=le),re=ce=!1)}function ze(et){et&&(Fe(),K+=et)}function it(et){if(et.nodeType==1){var yt=et.getAttribute("cm-text");if(yt){ze(yt);return}var wt=et.getAttribute("cm-marker"),Pt;if(wt){var Bt=e.findMarks(nt(L,0),nt(k+1,0),ve(+wt));Bt.length&&(Pt=Bt[0].find(0))&&ze(ne(e.doc,Pt.from,Pt.to).join(le));return}if(et.getAttribute("contenteditable")=="false")return;var Vt=/^(pre|div|p|li|table|br)$/i.test(et.nodeName);if(!/^br$/i.test(et.nodeName)&&et.textContent.length==0)return;Vt&&Fe();for(var Wt=0;Wt=9&&r.hasSelection&&(r.hasSelection=null),R.poll()}),Me(k,"paste",function(re){if(Ke(L,re)||zs(re,L))return;L.state.pasteIncoming=+new Date,R.fastPoll()});function K(re){if(Ke(L,re))return;if(L.somethingSelected())vo({lineWise:!1,text:L.getSelections()});else if(L.options.lineWiseCopyCut){var le=Vs(L);vo({lineWise:!0,text:le.text}),re.type=="cut"?L.setSelections(le.ranges,null,oe):(R.prevInput="",k.value=le.text.join(` `),te(k))}else return;re.type=="cut"&&(L.state.cutIncoming=+new Date)}Me(k,"cut",K),Me(k,"copy",K),Me(e.scroller,"paste",function(re){if(wn(e,re)||Ke(L,re))return;if(!k.dispatchEvent){L.state.pasteIncoming=+new Date,R.focus();return}var le=new Event("paste");le.clipboardData=re.clipboardData,k.dispatchEvent(le)}),Me(e.lineSpace,"selectstart",function(re){wn(e,re)||fe(re)}),Me(k,"compositionstart",function(){var re=L.getCursor("from");R.composing&&R.composing.range.clear(),R.composing={start:re,range:L.markText(re,L.getCursor("to"),{className:"CodeMirror-composing"})}}),Me(k,"compositionend",function(){R.composing&&(R.poll(),R.composing.range.clear(),R.composing=null)})},Ur.prototype.createField=function(e){this.wrapper=Ys(),this.textarea=this.wrapper.firstChild},Ur.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ur.prototype.prepareSelection=function(){var e=this.cm,r=e.display,R=e.doc,L=Un(e);if(e.options.moveInputWithCursor){var k=In(e,R.sel.primary().head,"div"),K=r.wrapper.getBoundingClientRect(),re=r.lineDiv.getBoundingClientRect();L.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,k.top+re.top-K.top)),L.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,k.left+re.left-K.left))}return L},Ur.prototype.showSelection=function(e){var r=this.cm,R=r.display;o(R.cursorDiv,e.cursors),o(R.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ur.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var R=r.getSelection();this.textarea.value=R,r.state.focused&&te(this.textarea),O&&T>=9&&(this.hasSelection=R)}else e||(this.prevInput=this.textarea.value="",O&&T>=9&&(this.hasSelection=null))},Ur.prototype.getField=function(){return this.textarea},Ur.prototype.supportsTouch=function(){return!1},Ur.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!n||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ur.prototype.blur=function(){this.textarea.blur()},Ur.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ur.prototype.receivedFocus=function(){this.slowPoll()},Ur.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ur.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function R(){var L=r.poll();!L&&!e?(e=!0,r.polling.set(60,R)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,R)},Ur.prototype.poll=function(){var e=this,r=this.cm,R=this.textarea,L=this.prevInput;if(this.contextMenuPending||!r.state.focused||ft(R)&&!L&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var k=R.value;if(k==L&&!r.somethingSelected())return!1;if(O&&T>=9&&this.hasSelection===k||t&&/[\uf700-\uf7ff]/.test(k))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var K=k.charCodeAt(0);if(K==8203&&!L&&(L="\u200B"),K==8666)return this.reset(),this.cm.execCommand("undo")}for(var re=0,le=Math.min(L.length,k.length);re1e3||k.indexOf(` `)>-1?R.value=e.prevInput="":e.prevInput=k,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ur.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ur.prototype.onKeyPress=function(){O&&T>=9&&(this.hasSelection=null),this.fastPoll()},Ur.prototype.onContextMenu=function(e){var r=this,R=r.cm,L=R.display,k=r.textarea;r.contextMenuPending&&r.contextMenuPending();var K=Ln(R,e),re=L.scroller.scrollTop;if(!K||d)return;var le=R.options.resetSelectionOnContextMenu;le&&R.doc.sel.contains(K)==-1&&$r(R,si)(R.doc,na(K),oe);var ce=k.style.cssText,ve=r.wrapper.style.cssText,Fe=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",k.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-Fe.top-5)+"px; left: "+(e.clientX-Fe.left-5)+`px; z-index: 1000; background: `+(O?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ze;l&&(ze=window.scrollY),L.input.focus(),l&&window.scrollTo(null,ze),L.input.reset(),R.somethingSelected()||(k.value=r.prevInput=" "),r.contextMenuPending=et,L.selForContextMenu=R.doc.sel,clearTimeout(L.detectingSelectAll);function it(){if(k.selectionStart!=null){var wt=R.somethingSelected(),Pt="\u200B"+(wt?k.value:"");k.value="\u21DA",k.value=Pt,r.prevInput=wt?"":"\u200B",k.selectionStart=1,k.selectionEnd=Pt.length,L.selForContextMenu=R.doc.sel}}function et(){if(r.contextMenuPending!=et)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=ve,k.style.cssText=ce,O&&T<9&&L.scrollbars.setScrollTop(L.scroller.scrollTop=re),k.selectionStart!=null){(!O||O&&T<9)&&it();var wt=0,Pt=function(){L.selForContextMenu==R.doc.sel&&k.selectionStart==0&&k.selectionEnd>0&&r.prevInput=="\u200B"?$r(R,ps)(R):wt++<10?L.detectingSelectAll=setTimeout(Pt,500):(L.selForContextMenu=null,L.input.reset())};L.detectingSelectAll=setTimeout(Pt,200)}}if(O&&T>=9&&it(),b){be(e);var yt=function(){tt(window,"mouseup",yt),setTimeout(et,20)};Me(window,"mouseup",yt)}else setTimeout(et,50)},Ur.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ur.prototype.setUneditable=function(){},Ur.prototype.needsContentAttribute=!1;function iu(e,r){if(r=r?G(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var R=I();r.autofocus=R==e||e.getAttribute("autofocus")!=null&&R==document.body}function L(){e.value=le.getValue()}var k;if(e.form&&(Me(e.form,"submit",L),!r.leaveSubmitMethodAlone)){var K=e.form;k=K.submit;try{var re=K.submit=function(){L(),K.submit=k,K.submit(),K.submit=re}}catch(ce){}}r.finishInit=function(ce){ce.save=L,ce.getTextArea=function(){return e},ce.toTextArea=function(){ce.toTextArea=isNaN,L(),e.parentNode.removeChild(ce.getWrapperElement()),e.style.display="",e.form&&(tt(e.form,"submit",L),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=k))}},e.style.display="none";var le=Tr(function(ce){return e.parentNode.insertBefore(ce,e.nextSibling)},r);return le}function au(e){e.off=tt,e.on=Me,e.wheelEventPixels=fl,e.Doc=pi,e.splitLines=lt,e.countColumn=X,e.findColumn=Le,e.isWordChar=Ie,e.Pass=ie,e.signal=Ve,e.Line=er,e.changeEnd=ra,e.scrollbarModel=zo,e.Pos=nt,e.cmpPos=xt,e.modes=dt,e.mimeModes=Ze,e.resolveMode=ot,e.getMode=gt,e.modeExtensions=kt,e.extendMode=Kt,e.copyState=Gt,e.startState=de,e.innerMode=Se,e.commands=Qa,e.keyMap=qi,e.keyName=Rs,e.isModifierKey=As,e.lookupKey=Ca,e.normalizeKeyMap=kl,e.StringStream=W,e.SharedTextMarker=Ya,e.TextMarker=aa,e.LineWidget=Xa,e.e_preventDefault=fe,e.e_stopPropagation=ge,e.e_stop=be,e.addClass=F,e.contains=D,e.rmClass=g,e.keyNames=oa}ql(Tr),eu(Tr);var ou="iter insert remove copy getEditor constructor".split(" ");for(var yo in pi.prototype)pi.prototype.hasOwnProperty(yo)&&B(ou,yo)<0&&(Tr.prototype[yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(pi.prototype[yo]));return Oe(pi),Tr.inputStyles={textarea:Ur,contenteditable:fr},Tr.defineMode=function(e){!Tr.defaults.mode&&e!="null"&&(Tr.defaults.mode=e),Tt.apply(this,arguments)},Tr.defineMIME=Ct,Tr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Tr.defineMIME("text/plain","null"),Tr.defineExtension=function(e,r){Tr.prototype[e]=r},Tr.defineDocExtension=function(e,r){pi.prototype[e]=r},Tr.fromTextArea=iu,au(Tr),Tr.version="5.58.2",Tr})},W7jJ:function($e,We,z){"use strict";z.r(We);var ae=z("0Owb"),Z=z("PpiC"),U=z("OaEy"),w=z("2fM7"),P=z("T2oS"),S=z("W9HT"),O=z("miYZ"),T=z("tsqr"),l=z("2qtc"),p=z("kLXV"),h=z("9og8"),d=z("tJVT"),a=z("k1fw"),u=z("aHsQ"),s=z("sGsY"),f=z("WmNS"),i=z.n(f),n=z("q1tI"),t=z.n(n),c=z("Fvcw"),y=z("GIiI"),v=z("Ty5D"),_=z("9kvl"),b=z("55Ip"),m=z("7qur"),g=z("cDPC"),E=z("m3rI"),o=z("RCxd"),x=z("EHPI"),C=z("J66h"),A=z("uMZB"),D=z.n(A),I=z("sNtx"),F=z("RpDr"),H=z("+L6B"),te=z("2/Rp"),j=z("y8nQ"),G=z("Vl3Y"),X=z("5NDa"),J=z("5rEg"),B=J.a.TextArea,Q=5e3,ie=function(at){var st=at.callback,bt=at.onCancel,At=at.notes;function nn(en){st(en)}return t.a.createElement(G.a,{className:"note-form-panel",onFinish:nn,initialValues:{notes:At}},t.a.createElement(G.a.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:Q,message:"\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A".concat(Q)}]},t.a.createElement(B,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),t.a.createElement(G.a.Item,{style:{textAlign:"right"}},t.a.createElement(te.a,{type:"ghost",onClick:bt,style:{marginRight:10}}," \u53D6\u6D88 "),t.a.createElement(te.a,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},oe=z("ZsLC"),Ee=z.n(oe),ye=z("DjyN"),Le=z("NUBc"),pe=z("g9YV"),Ce=z("wCAj"),Be=z("Hw79"),Pe=z.n(Be),ke=z("ye1Q"),Ne=z("lfch"),he=z("bdLU"),ue=z("1vsH"),Ie=z("wd/R"),Ue=z.n(Ie),Ye=Ce.a.Column,ee=function(at){var st=at.submitResult,bt=at.submitting,At=at.submitRecords,nn=at.page,en=at.onPageChange,ht=at.topicId,ct=st||{},Ft=ct.status,vt=ct.id,Yt=ct.input,Ot=ct.output,Zt=ct.expected_output,jn=ct.is_file,Sn=ct.input_file_url,cn=ct.output_file_url,Kn=ct.expected_output_file_url,_n=ct.error_msg,wn=At||{},kn=wn.records,mr=wn.records_count,Gn=Object(v.i)();function qn(){jn?navigator.clipboard.writeText(C.Base64.decode(_n)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(C.Base64.decode(Ot)).then(function(){T.b.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return t.a.createElement(S.a,{spinning:bt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:t.a.createElement(ke.a,{style:{fontSize:24},spin:!0})},vt?t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Pe.a.info},t.a.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",t.a.createElement("span",{className:Ft===he.a.OK?"c-green":"c-red"},F.a[Ft])),t.a.createElement("li",{className:Pe.a.error},t.a.createElement("a",{onClick:qn},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",t.a.createElement(Ne.a,null)," ")),t.a.createElement("li",null,t.a.createElement(b.a,{to:"/problems/".concat(ht,"/record-detail/").concat(vt,"?backId=").concat(Gn==null?void 0:Gn.save_identifier)},"\u663E\u793A\u8BE6\u60C5 > "))),Ft!==he.a.OK?t.a.createElement(t.a.Fragment,null,t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),t.a.createElement("pre",null,!jn&&Yt,jn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.w)(Sn,Yt)}},Yt)),t.a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,(Ft===4||Ft===5)&&C.Base64.decode(_n),Ft!=4&&Ft!=5&&(jn?t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.w)(cn,Ot)}},Ot):C.Base64.decode(Ot))),t.a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),t.a.createElement("pre",null,!jn&&C.Base64.decode(Zt),jn&&t.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(ue.w)(Kn,Zt)}},Zt))):null):null,(kn==null?void 0:kn.length)>0?t.a.createElement(Ce.a,{dataSource:kn,rowKey:"id",pagination:!1},t.a.createElement(Ye,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(dr,Vn){return t.a.createElement("span",null," ",Ue()(dr).format("YYYY-MM-DD HH:mm:ss"))}}),t.a.createElement(Ye,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:function(dr,Vn){var Qn;return t.a.createElement(b.a,{className:dr===0?"c-green":"c-red",to:"/problems/".concat(ht,"/record-detail/").concat(Vn.id,"?backId=").concat(Gn==null?void 0:Gn.save_identifier)},(Qn=F.a[dr])===null||Qn===void 0?void 0:Qn.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),t.a.createElement(Ye,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),t.a.createElement(Ye,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),t.a.createElement(Ye,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,mr>15?t.a.createElement(Le.a,{className:Pe.a.pagination,current:nn,pageSize:15,total:mr,onChange:en}):null)},M=z("BdwD"),N=z("DYRE"),$=z("zeV3"),V=z("+BJd"),Y=z("mr32"),me=z("TcMa"),Re=z.n(me),rt=z("9Bee"),De={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}},Me=function(at){var st=at.hack,bt=at.onTriggerPraise,At=at.toDiscuss,nn=st.language,en=st.difficulty,ht=st.time_limit,ct=st.username,Ft=st.user_path,vt=st.user_praise,Yt=st.comments_count,Ot=st.praises_count,Zt=st.description,jn=st.pass_count,Sn=st.submit_count,cn=Object(v.h)();console.log(st.language,"language");var Kn=De[en];return t.a.createElement(t.a.Fragment,null,t.a.createElement("ul",{className:Re.a.info},t.a.createElement("li",null,"\u96BE\u5EA6\uFF1A",t.a.createElement(Y.a,{color:Kn.color},Kn.name)),t.a.createElement("li",null,"\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",t.a.createElement("b",null,ht,"\u79D2"))),t.a.createElement(rt.a,{value:Zt,className:Re.a.desc}),t.a.createElement("ul",{className:Re.a["commit-info"]},t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",t.a.createElement("b",null,jn))),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",t.a.createElement("b",null,Sn))," "),t.a.createElement("li",{style:{flex:"1 0 0"}}),t.a.createElement("li",null,t.a.createElement($.a,{size:4},t.a.createElement("i",{className:"iconfont icon-huifu1",onClick:At})," ",t.a.createElement("b",null,Yt))," ")))},Xe=z("dhSg"),tt=z("ps8w"),Ve=z.n(tt),Ke=z("oBTY"),we=z("M8RZ"),Ae=z("OkW/"),Oe=z("ErOA");function fe(at){return Object(Oe.c)("comments.json",at)}function ge(at){return Object(Oe.f)("/discusses/".concat(at,"/plus.json"),{container_type:"Discuss",type:1})}function _e(at){return Object(Oe.f)("comments/reply.json",at)}function be(at){return Object(Oe.f)("comments.json",at)}function Ge(at){return Object(Oe.f)("comments/".concat(at==null?void 0:at.id,"/hidden.json"),at)}function qe(at){return Object(Oe.b)("comments/".concat(at==null?void 0:at.id,".json"))}var pt=z("GgEA"),Dt=z("AMnG"),jt=z("xKgJ");function Rt(at){var st=at.author;return t.a.createElement("a",{href:"/users/".concat(st.login),target:"_blank"},t.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:"".concat(E.a.IMG_SERVER,"/images/").concat(st.image_url),width:"50"}))}function Lt(at){var st=at.data,bt=at.index,At=at.parentDiscussIndex,nn=at.user,en=at.onSetActionType,ht=st.author,ct=st.can_delete,Ft=st.content,vt=st.id,Yt=st.time;function Ot(){en({id:vt,index:bt,type:"delete-discuss",parentDiscussIndex:At,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var Zt=nn.admin||ct||ht.user_id===nn.user_id;return t.a.createElement("div",{className:"discuss-item-container second-discuss "},t.a.createElement(Rt,{author:ht}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(ht.login),target:"_blank"},ht.name),t.a.createElement("span",{className:"grey"},Yt),t.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},Zt?t.a.createElement("a",{onClick:Ot,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),t.a.createElement(rt.a,{className:"discuss-content",value:Ft})))}var lt=function(at){var st=at.user,bt=at.data,At=at.index,nn=at.onPlusDiscuss,en=at.onSetActionType,ht=at.activeDiscussIndex,ct=at.onReplyDiscuss,Ft=at.onSetActiveDiscussIndex,vt=bt.content,Yt=bt.children,Ot=bt.hidden,Zt=bt.id,jn=bt.praise_count,Sn=bt.time,cn=bt.user_praise,Kn=bt.can_delete,_n=bt.author;console.log(Kn&&(!Yt||Yt.length==0),"children22");function wn(){Ft(Zt)}function kn(){nn(Zt,!cn,At)}function mr(){en({id:Zt,index:At,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Gn(){en({id:Zt,index:At,params:{hidden:Ot?"0":"1"},type:"hidden-discuss",message:Ot?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}var qn=st.admin||st.user_id===_n.user_id;return t.a.createElement("div",{className:"discuss-item-container",key:Zt},t.a.createElement(Rt,{author:_n}),t.a.createElement("section",null,t.a.createElement("div",{className:"discuss-info"},t.a.createElement("a",{href:"/users/".concat(_n.login),target:"_blank"}," ",_n.name," "),t.a.createElement("span",{className:"grey"},Sn)),t.a.createElement(rt.a,{className:"discuss-content",value:vt}),Yt&&Yt.length>0?t.a.createElement("div",{className:"reply-discuss-container"},Yt.map(function(rr,dr){return t.a.createElement(Lt,{key:rr.id,data:rr,index:dr,user:st,onSetActionType:en,parentDiscussIndex:At})})):null,t.a.createElement("div",{className:"btn-group"},Object(jt.v)()?t.a.createElement("a",{onClick:Gn,title:Ot?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},t.a.createElement("i",{className:Ot?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Kn&&(!Yt||Yt.length==0)?t.a.createElement("a",{onClick:mr,title:"\u5220\u9664"},t.a.createElement("i",{className:"iconfont icon-shanchu"})):null,t.a.createElement("a",{onClick:wn,title:"\u56DE\u590D"}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," "),t.a.createElement("a",{onClick:kn,className:cn?"c-orange":""},t.a.createElement("i",{className:cn?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),t.a.createElement("span",null,jn||""))),t.a.createElement(Dt.a,{id:Zt,activeDiscussIndex:ht,onReplyDiscuss:ct})))},ft=z("kaH+"),Qe=z("Wx9E"),Te=z("Ot1p"),je=function(at){var st=at.user_praise,bt=at.praise_count,At=at.praisePlus,nn=at.onCreateDiscuss,en=at.discuss_count,ht=Object(n.useState)(!1),ct=Object(d.a)(ht,2),Ft=ct[0],vt=ct[1],Yt=Object(n.useState)(""),Ot=Object(d.a)(Yt,2),Zt=Ot[0],jn=Ot[1];function Sn(kn){jn(kn)}function cn(){vt(!0)}function Kn(){vt(!1)}function _n(){return wn.apply(this,arguments)}function wn(){return wn=Object(h.a)(i.a.mark(function kn(){return i.a.wrap(function(Gn){for(;;)switch(Gn.prev=Gn.next){case 0:nn(Zt),jn(""),vt(!1);case 3:case"end":return Gn.stop()}},kn)})),wn.apply(this,arguments)}return t.a.createElement("div",{className:"dis-input-editor-container ".concat(Ft?"active":""," ")},t.a.createElement("div",{className:Ft?"text-area hide":"text-area"},t.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:cn}),t.a.createElement("a",{style:{alignItems:"center"}}," ",t.a.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",en," "),t.a.createElement("a",{className:"c-light-black",onClick:At,style:{alignItems:"center"},title:st?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},t.a.createElement("i",{className:"mr3 ".concat(st?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),bt?t.a.createElement("span",null,bt):"")),Ft?t.a.createElement("div",{className:"input-mask",onClick:Kn}):null,t.a.createElement("div",{className:Ft?"md-container":"md-container hide"},t.a.createElement(Te.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Zt,height:240,onChange:Sn}),t.a.createElement("div",{className:"tip-container",onClick:Kn},t.a.createElement("a",{className:"btn-send",onClick:_n}," \u53D1\u9001 "))))},dt={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Ze;(function(at){at[at.GET_DISCUSSES=0]="GET_DISCUSSES",at[at.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",at[at.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",at[at.PLUS_DISCUSS=3]="PLUS_DISCUSS",at[at.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",at[at.SET_PAGE=5]="SET_PAGE",at[at.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"})(Ze||(Ze={}));function Tt(at,st){switch(st.type){case Ze.SHOW_DISCUSSES_LOADING:return Object(a.a)(Object(a.a)({},at),{},{loading:!0});case Ze.GET_DISCUSSES:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.TOP_OR_DOWN_DISCUSS:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.SET_ACTION_TYPE:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.PLUS_DISCUSS:return Object(a.a)(Object(a.a)({},at),st.payload);case Ze.SET_PAGE:return Object(a.a)(Object(a.a)({},at),{},{page:st.payload});case Ze.ACTIVE_DISCUSS_INDEX:return Object(a.a)(Object(a.a)({},at),st.payload);default:throw new Error}}var Ct=function(at){var st=at.user,bt=at.identifier,At=at.hack,nn=at.onTriggerPraise,en=at.setDiscussTotal,ht=Object(n.useReducer)(Tt,dt),ct=Object(d.a)(ht,2),Ft=ct[0],vt=ct[1],Yt=Ft.loading,Ot=Ft.page,Zt=Ft.data,jn=Ft.count,Sn=Ft.actionType,cn=Ft.activeDiscussIndex,Kn=Object(n.useCallback)(Object(h.a)(i.a.mark(function an(){var Hn,Xn,ir;return i.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return vt({type:Ze.SHOW_DISCUSSES_LOADING}),Bn.next=3,fe({container_type:"Practice",container_identifier:bt,limit:10,page:Ot});case 3:Hn=Bn.sent,Xn=Hn.comments,ir=Hn.disscuss_count,vt({type:Ze.GET_DISCUSSES,payload:{data:Xn,count:ir,loading:!1}}),en(ir);case 7:case"end":return Bn.stop()}},an)})),[Ot,bt]);Object(n.useEffect)(function(){Kn()},[bt,Ot]);function _n(an){vt({type:Ze.SET_PAGE,page:an})}function wn(an){vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:an}})}function kn(an){cn===an?vt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}):vt({type:Ze.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:an}})}function mr(an,Hn,Xn){return Gn.apply(this,arguments)}function Gn(){return Gn=Object(h.a)(i.a.mark(function an(Hn,Xn,ir){var Fn;return i.a.wrap(function(on){for(;;)switch(on.prev=on.next){case 0:return on.prev=0,on.next=3,ge(Hn);case 3:Fn=on.sent,Zt[ir].user_praise=Xn,Zt[ir].praise_count=Fn.praise_count,vt({type:Ze.PLUS_DISCUSS,payload:{data:Object(Ke.a)(Zt)}}),on.next=12;break;case 9:on.prev=9,on.t0=on.catch(0),console.log(on.t0);case 12:case"end":return on.stop()}},an,null,[[0,9]])})),Gn.apply(this,arguments)}function qn(){return rr.apply(this,arguments)}function rr(){return rr=Object(h.a)(i.a.mark(function an(){var Hn,Xn,ir,Fn,Bn;return i.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:if(Hn=Sn.id,Xn=Sn.params,ir=Sn.type,Fn=Sn.index,Bn=Sn.parentDiscussIndex,!(ir==="hidden-discuss")){bn.next=7;break}return console.log(Xn,"params"),bn.next=5,Ge(Object(a.a)({id:Hn,container_type:"Practice",container_identifier:bt},Xn));case 5:Bn?Zt[Bn].children[Fn].hidden=Xn.hidden==1:Zt[Fn].hidden=Xn.hidden==1,vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null,data:Object(Ke.a)(Zt)}});case 7:if(!(ir==="delete-discuss")){bn.next=13;break}return bn.next=10,qe({id:Hn,container_type:"Practice",container_identifier:bt});case 10:return vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}}),bn.next=13,Kn();case 13:case"end":return bn.stop()}},an)})),rr.apply(this,arguments)}function dr(){vt({type:Ze.SET_ACTION_TYPE,payload:{actionType:null}})}function Vn(an,Hn){return Qn.apply(this,arguments)}function Qn(){return Qn=Object(h.a)(i.a.mark(function an(Hn,Xn){return i.a.wrap(function(Fn){for(;;)switch(Fn.prev=Fn.next){case 0:return Fn.prev=0,Fn.next=3,_e({container_type:"Practice",container_identifier:bt,comments:{content:Xn,parent_id:Hn}});case 3:Kn(),Fn.next=9;break;case 6:Fn.prev=6,Fn.t0=Fn.catch(0),console.log(Fn.t0);case 9:case"end":return Fn.stop()}},an,null,[[0,6]])})),Qn.apply(this,arguments)}function Dn(an){return Nt.apply(this,arguments)}function Nt(){return Nt=Object(h.a)(i.a.mark(function an(Hn){return i.a.wrap(function(ir){for(;;)switch(ir.prev=ir.next){case 0:return vt({type:Ze.SHOW_DISCUSSES_LOADING}),ir.next=3,be({comments:{content:Hn},container_type:"Practice",container_identifier:bt});case 3:Kn();case 4:case"end":return ir.stop()}},an)})),Nt.apply(this,arguments)}return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:"discuss-panel"},Zt.length===0?t.a.createElement(M.a,null):Zt.map(function(an,Hn){return t.a.createElement(lt,{onReplyDiscuss:Vn,onPlusDiscuss:mr,onSetActiveDiscussIndex:kn,onSetActionType:wn,data:an,index:Hn,user:st,activeDiscussIndex:cn})}),jn>10?t.a.createElement("div",{className:"pagination-container"},t.a.createElement(Le.a,{showQuickJumper:!0,onChange:_n,current:Ot,total:jn})):null),t.a.createElement(je,{user_praise:At.user_praise,praise_count:At.praises_count,praisePlus:nn,discuss_count:At.comments_count,onCreateDiscuss:Dn}),t.a.createElement(we.a,null,t.a.createElement(p.a,{centered:!0,title:"\u63D0\u793A",visible:!!Sn,onOk:qn,onCancel:dr},t.a.createElement("p",null,Sn?Sn.message:"")),t.a.createElement(ft.a,null)))},ot=z("1FX+"),gt=z.n(ot),kt=z("pYxM"),Kt=z.n(kt),Gt=z("sB/4"),Se=z.n(Gt),de=z("Wtmd"),W=z.n(de),q=z("CNDd"),ne=z.n(q),se=z("nCk5"),xe=z.n(se),He=z("kovY"),Je=z.n(He),Et=function(st){var bt=st.style,At=bt===void 0?{}:bt,nn=st.onClick,en=st.onAssist,ht=st.onHide,ct=st.data,Ft=st.active,vt=st.showLine;return t.a.createElement(t.a.Fragment,null,t.a.createElement("div",{className:Ft===(ct==null?void 0:ct.id)?"".concat(Kt.a.list," ").concat(Kt.a.active):Kt.a.list,style:At,onClick:function(){return nn(ct)}},(ct==null?void 0:ct.video)&&t.a.createElement("div",{className:Kt.a.left},t.a.createElement("img",{src:ct==null?void 0:ct.video_cover}),t.a.createElement("div",null,t.a.createElement("img",{src:Se.a}),t.a.createElement("span",null,ct==null?void 0:ct.video_duration)),t.a.createElement("div",{className:Kt.a.mask})),t.a.createElement("div",{className:Kt.a.right},t.a.createElement("div",{className:Kt.a.name},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ct==null?void 0:ct.image_url),width:30,height:30}),t.a.createElement("div",{title:ct==null?void 0:ct.name,className:Kt.a.title},ct==null?void 0:ct.name),(ct==null?void 0:ct.is_authority)&&t.a.createElement("div",{className:Kt.a.b},"\u5B98\u65B9"),(ct==null?void 0:ct.is_excellent)&&t.a.createElement("div",{className:Kt.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:Kt.a.des},t.a.createElement(rt.a,{showLines:2,showTextOnly:!0,value:(ct==null?void 0:ct.content)||"\u6682\u65E0\u5185\u5BB9"})),t.a.createElement("div",{className:Kt.a.tag},t.a.createElement("span",{className:"current",onClick:function(Ot){Ot.stopPropagation(),en(ct)}},t.a.createElement("img",{src:ct!=null&&ct.user_liker?ne.a:W.a}),t.a.createElement("span",{style:{color:ct!=null&&ct.user_liker?"#0152d9":"#656f87"}},ct==null?void 0:ct.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:xe.a}),t.a.createElement("span",null,ct==null?void 0:ct.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,ct==null?void 0:ct.viewed_count)),Object(jt.v)()&&t.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(Ot){Ot.stopPropagation(),ht(ct)}},ct!=null&&ct.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),vt&&t.a.createElement("div",{className:Kt.a.line}))},St=Et,nt=z("5Dmo"),xt=z("3S7+"),ut=z("Z8dc"),_t=z.n(ut),Qt=z("Aky1"),Xt=z("7+5b"),Mt=z.n(Xt),mt=z("twBr"),Cn=z.n(mt),En=z("oE5q"),Jt=z.n(En),un=function(st,bt){var At,nn,en,ht=bt.payload.uploadInfo,ct=ht===void 0?{}:ht;switch(bt.type){case"addVideo":return{videoList:[].concat(Object(Ke.a)(st.videoList),[{name:ct.file.name,size:ct.file.size,type:ct.file.type,fileHash:ct.fileHash,state:ct.state,video_id:ct.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:st.videoList.filter(function(Ft){return Ft.name!==bt.payload.name})};case"replaceVideo":return{videoList:bt.payload};case"removeAll":return[];case"updateProgress":return{videoList:st.videoList.map(function(Ft){return Ft.name===bt.payload.uploadInfo.file.name?Object(a.a)(Object(a.a)({},Ft),{loaded:bt.payload.progressPercent,video_id:ct.videoId,fileHash:ct.fileHash}):Ft})};case"updateTitle":return{videoList:(At=st.videoList)===null||At===void 0?void 0:At.map(function(Ft){return Ft.name===bt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{title:bt.payload.title}):Ft})};case"updateImg":return{videoList:(nn=st.videoList)===null||nn===void 0?void 0:nn.map(function(Ft){return Ft.name===bt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{attachment_id:bt.payload.attachment_id}):Ft})};case"updateImg":return{videoList:(en=st.videoList)===null||en===void 0?void 0:en.map(function(Ft){return Ft.name===bt.payload.item.name?Object(a.a)(Object(a.a)({},Ft),{attachment_id:bt.payload.attachment_id}):Ft})};default:return[]}},Jn=function(st){var bt,At,nn=st.onClose,en=st.onOk,ht=st.identifier,ct=st.active,Ft=G.a.useForm(),vt=Object(d.a)(Ft,1),Yt=vt[0],Ot=Object(n.useState)({}),Zt=Object(d.a)(Ot,2),jn=Zt[0],Sn=Zt[1],cn=Object(n.useState)(!1),Kn=Object(d.a)(cn,2),_n=Kn[0],wn=Kn[1],kn=Object(n.useState)(!1),mr=Object(d.a)(kn,2),Gn=mr[0],qn=mr[1],rr=Object(n.useReducer)(un,{videoList:[]}),dr=Object(d.a)(rr,2),Vn=dr[0],Qn=dr[1],Dn=Object(jt.x)(),Nt=Object(v.i)(),an=Object(n.useRef)();Object(n.useEffect)(function(){ct&&Hn()},[ct]);var Hn=function(){var sn=Object(h.a)(i.a.mark(function On(){var pn,In,Yn,sr,Er,zr,Ci,Br,Mi,$i,Ui,ti;return i.a.wrap(function(Nn){for(;;)switch(Nn.prev=Nn.next){case 0:return Nn.next=2,Object(m.k)(ht,{active:ct});case 2:pn=Nn.sent,(pn==null?void 0:pn.status)===0&&(zr={name:pn==null||((In=pn.data)===null||In===void 0)?void 0:In.name,content:pn==null||((Yn=pn.data)===null||Yn===void 0)?void 0:Yn.content},Yt.setFieldsValue(zr),Sn(zr),pn!=null&&(sr=pn.data)!==null&&sr!==void 0&&(Er=sr.videos)!==null&&Er!==void 0&&Er[0]&&Qn({type:"replaceVideo",payload:[{video_id:pn==null||((Ci=pn.data)===null||Ci===void 0||((Br=Ci.videos)===null||Br===void 0||((Mi=Br[0])===null||Mi===void 0)))?void 0:Mi.video_id,name:pn==null||(($i=pn.data)===null||$i===void 0||((Ui=$i.videos)===null||Ui===void 0||((ti=Ui[0])===null||ti===void 0)))?void 0:ti.title,loaded:100}]}));case 4:case"end":return Nn.stop()}},On)}));return function(){return sn.apply(this,arguments)}}(),Xn=function(On,pn){Sn(Object(a.a)({},pn))},ir=function(){var sn=Object(h.a)(i.a.mark(function On(pn){var In,Yn,sr,Er,zr;return i.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:if(Yn={videos:Vn.videoList,articles:pn},qn(!0),!ct){Br.next=9;break}return Yn.active=ct,Br.next=6,Object(m.j)(ht,Yn);case 6:sr=Br.sent,Br.next=12;break;case 9:return Br.next=11,Object(m.a)(ht,Yn);case 11:sr=Br.sent;case 12:((In=sr)===null||In===void 0?void 0:In.status)===0&&(console.log(ct||((Er=sr)===null||Er===void 0?void 0:Er.id),44),en(ct||((zr=sr)===null||zr===void 0?void 0:zr.id))),qn(!1);case 14:case"end":return Br.stop()}},On)}));return function(pn){return sn.apply(this,arguments)}}(),Fn=function(){var On=document.getElementById("fileUpload");On.value=""},Bn=function(On){var pn='{"Vod":{}}';if(wn(!0),an.current){an.current.addFile(On,null,null,null,pn);return}Object(Qt.a)(Dn==null?void 0:Dn.login,"",{create:!an,addFileSuccess:function(Yn){Qn({type:"addVideo",payload:{uploadInfo:Yn}})},onUploadProgress:function(Yn,sr,Er){var zr=Math.ceil(Er*100);Qn({type:"updateProgress",payload:{uploadInfo:Yn,progressPercent:zr}}),Fn()},onUploadFailed:function(Yn){T.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(Yn){wn(!1)},onUploadSucceed:function(Yn){wn(!1)},onUploadError:function(Yn){wn(!1)},gotUploader:function(Yn){Yn.addFile(On,null,null,null,pn),an.current=Yn}})},on=function(On){var pn,In=1024,Yn=On.target.files[0];if(!Yn){Fn();return}var sr=Yn.name.toLowerCase();if(sr&&sr.indexOf(".avi")==-1&&sr.indexOf(".flv")==-1&&sr.indexOf(".f4v")==-1&&sr.indexOf(".m4v")==-1&&sr.indexOf(".mov")==-1&&sr.indexOf(".mp4")==-1&&sr.indexOf(".rmvb")==-1&&sr.indexOf(".swf")==-1&&sr.indexOf(".webm")==-1&&sr.indexOf(".wmv")==-1){T.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Fn();return}if(Yn.size>In*1024*1024){T.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7".concat(In,"M")),Fn();return}if((pn=Vn.videoList)!==null&&pn!==void 0&&pn.find(function(Er){return Er.name===Yn.name})){T.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Fn();return}Bn(Yn)},bn=function(On,pn){p.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:t.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",pn?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){Fn(),Qn({type:"removeVideo",payload:{name:On}})}})},It=function(){return t.a.createElement("label",{htmlFor:"fileUpload",className:_t.a.main},t.a.createElement("img",{src:Mt.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891"))},Ut=function(On){return t.a.createElement("div",{className:_t.a.mainLoading},t.a.createElement("div",{className:_t.a.proWarp},t.a.createElement("div",{className:_t.a.pro},t.a.createElement("div",{style:{width:On}})),t.a.createElement("span",null,On||0,"%")),t.a.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),t.a.createElement("div",{className:_t.a.tip},t.a.createElement(xt.a,{getPopupContainer:function(In){return In.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:Jt.a,alt:""}))))},Ht=function(On){return t.a.createElement("div",{className:_t.a.mainSucceed},t.a.createElement("img",{src:Cn.a,alt:""}),t.a.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),t.a.createElement("div",{className:_t.a.tip},t.a.createElement(xt.a,{getPopupContainer:function(In){return In.parentNode},title:t.a.createElement("div",null,t.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",t.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),t.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),t.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},t.a.createElement("img",{src:Jt.a,alt:""}))),t.a.createElement("div",{className:_t.a.del,onClick:function(){return bn(On.name,On.loaded==100)}},t.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891"))},dn=function(){var On;return t.a.createElement(t.a.Fragment,null,(On=Vn.videoList)===null||On===void 0?void 0:On.map(function(pn,In){return t.a.createElement(t.a.Fragment,{key:In},pn.loaded==100?Ht(pn):Ut(pn.loaded))}))},qt=function(){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:nn})},Pn=(bt=Vn.videoList)===null||bt===void 0?void 0:bt.length;return t.a.createElement("div",{className:_t.a.listForm},t.a.createElement("header",null,ct?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),t.a.createElement("section",{className:_t.a.scroll,id:"sss"},t.a.createElement("div",{className:_t.a.formWrap}," ",t.a.createElement(G.a,{form:Yt,scrollToFirstError:!0,layout:"vertical",onValuesChange:Xn,onFinish:ir},t.a.createElement(G.a.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},t.a.createElement(J.a,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:"".concat(((At=jn.name)===null||At===void 0?void 0:At.length)||0,"/60")})),t.a.createElement(G.a.Item,{name:"content",label:"\u5185\u5BB9:"},t.a.createElement(Te.a,{defaultValue:jn.content||"",watch:!0})))),t.a.createElement("div",{className:_t.a.upload},Pn?dn():It(),t.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:on,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),t.a.createElement("div",{className:_t.a.btns},t.a.createElement(te.a,{onClick:qt,type:"primary",ghost:!0},"\u5173\u95ED"),t.a.createElement(te.a,{loading:Gn,disabled:_n,onClick:function(){return Yt.submit()},type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},ar=Jn,mn=z("cWXX"),gr=z("/ezw"),Rr=z("CaVn"),vn=z.n(Rr),An=z("s8/Y"),_r=z.n(An),Zr=z("JOrW"),jr=z.n(Zr),tr=z("gqXR"),ur=z.n(tr),yi=z("14J3"),xr=z("BMrR"),Cr=z("jCWc"),Sr=z("kPKH"),Vr=z("wW8i"),Mr=z.n(Vr),Si=z("MVJL"),Or=z.n(Si),ei=function(st){var bt=st.id,At=st.cb,nn=Object(n.useState)(""),en=Object(d.a)(nn,2),ht=en[0],ct=en[1];return t.a.createElement("aside",{className:"mt10"},t.a.createElement(Te.a,{defaultValue:ht,id:"writeForumsReviewId",onChange:function(vt){ct(vt)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(xr.a,null,t.a.createElement(Sr.a,{flex:"1"}),t.a.createElement(Sr.a,null,t.a.createElement(te.a,{type:"primary",size:"large",onClick:Object(h.a)(i.a.mark(function Ft(){return i.a.wrap(function(Yt){for(;;)switch(Yt.prev=Yt.next){case 0:ht===""?T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):At(bt,ht);case 1:case"end":return Yt.stop()}},Ft)}))},"\u53D1\u9001"))))},ri=function(st){var bt,At=st.data;return t.a.createElement("div",{className:Or.a.thirdlyLevelDiscuss},t.a.createElement("span",{className:"c-grey-333"},t.a.createElement("span",{className:"font 14 c-light-primary"},At==null||((bt=At.author)===null||bt===void 0)?void 0:bt.name),"@",t.a.createElement("span",{className:"font 14 c-light-primary"},At==null?void 0:At.parent_name),":"),t.a.createElement(rt.a,{value:At==null?void 0:At.content}))},Xr=function(st){var bt,At,nn,en,ht=st.data,ct=st.onReplyDiscuss,Ft=st.thirdlyReply,vt=st.setThirdlyReply,Yt=Object(jt.x)();return console.log(Yt,"user"),t.a.createElement("div",{className:Or.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ht==null||((bt=ht.author)===null||bt===void 0)?void 0:bt.image_url)}),t.a.createElement("div",{className:Or.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333"},ht==null||((At=ht.author)===null||At===void 0)?void 0:At.name),(Yt==null?void 0:Yt.login)!==(ht==null||((nn=ht.author)===null||nn===void 0)?void 0:nn.login)&&t.a.createElement("span",{onClick:function(){return vt(ht==null?void 0:ht.id)},className:"c-grey-999 current",style:{float:"right"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),t.a.createElement("span",null,"\u56DE\u590D"))),t.a.createElement(rt.a,{value:ht==null?void 0:ht.content}),ht==null||((en=ht.children)===null||en===void 0)?void 0:en.map(function(Ot){return t.a.createElement(ri,{key:Ot.id,data:Ot})}),Ft===(ht==null?void 0:ht.id)&&t.a.createElement("div",null,t.a.createElement(ei,{id:ht==null?void 0:ht.id,cb:ct}),t.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return vt(null)},className:"c-light-primary current"},t.a.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),t.a.createElement("div",{className:Or.a.line})))},ui=function(st){var bt,At,nn,en,ht=st.data,ct=st.onReplyDiscuss,Ft=st.secondReply,vt=st.setSecondReply,Yt=st.thirdlyReply,Ot=st.setThirdlyReply,Zt=st.onPlusDiscuss,jn=Object(n.useState)(!1),Sn=Object(d.a)(jn,2),cn=Sn[0],Kn=Sn[1];return console.log(ht,"data"),t.a.createElement("div",{className:Or.a.discussItem},t.a.createElement("div",{className:Or.a.list},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(ht==null||((bt=ht.author)===null||bt===void 0)?void 0:bt.image_url)}),t.a.createElement("div",{className:Or.a.wrap},t.a.createElement("div",{className:"font14",style:{marginBottom:6}},t.a.createElement("span",{className:"c-grey-333 mr30"},ht==null||((At=ht.author)===null||At===void 0)?void 0:At.name),t.a.createElement("span",{className:"c-grey-999"},ht==null?void 0:ht.time)),t.a.createElement(rt.a,{value:ht==null?void 0:ht.content}),t.a.createElement("div",{className:Or.a.btns},t.a.createElement("div",{onClick:function(){return Zt(ht==null?void 0:ht.id)},className:ht!=null&&ht.user_praise?"c-light-primary":"c-grey-999"},t.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),t.a.createElement("span",null,ht==null?void 0:ht.praise_count)),t.a.createElement("div",{onClick:function(){var wn;if((ht==null||((wn=ht.children)===null||wn===void 0)?void 0:wn.length)===0)return;vt(null),Kn(!cn)},style:{color:cn?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),t.a.createElement("span",null,cn?"\u6536\u8D77\u8BC4\u8BBA":ht==null||((nn=ht.children)===null||nn===void 0)?void 0:nn.length)),t.a.createElement("div",{onClick:function(){Kn(!1),vt(Ft===(ht==null?void 0:ht.id)?null:ht==null?void 0:ht.id)},style:{color:Ft===(ht==null?void 0:ht.id)?"#0152d9":"#999999"}},t.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),t.a.createElement("span",null,Ft===(ht==null?void 0:ht.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),Ft===(ht==null?void 0:ht.id)&&t.a.createElement(ei,{id:ht==null?void 0:ht.id,cb:function(wn,kn){ct(wn,kn),Kn(!0)}}),cn&&t.a.createElement("div",{className:Or.a.secondLevelDiscuss},ht==null||((en=ht.children)===null||en===void 0)?void 0:en.map(function(_n){return t.a.createElement(Xr,{thirdlyReply:Yt,setThirdlyReply:Ot,key:_n.id,data:_n,onReplyDiscuss:ct})})))))},Ri=ui,bi=function(st){var bt=st.identifier,At=st.active,nn=st.onOk,en=Object(n.useState)(""),ht=Object(d.a)(en,2),ct=ht[0],Ft=ht[1],vt=Object(n.useState)(1),Yt=Object(d.a)(vt,2),Ot=Yt[0],Zt=Yt[1],jn=Object(n.useState)([]),Sn=Object(d.a)(jn,2),cn=Sn[0],Kn=Sn[1],_n=Object(n.useState)(0),wn=Object(d.a)(_n,2),kn=wn[0],mr=wn[1],Gn=Object(n.useState)(null),qn=Object(d.a)(Gn,2),rr=qn[0],dr=qn[1],Vn=Object(n.useState)(null),Qn=Object(d.a)(Vn,2),Dn=Qn[0],Nt=Qn[1];Object(n.useEffect)(function(){an(1),Zt(1)},[At]);var an=function(){var Bn=Object(h.a)(i.a.mark(function on(bn){var It;return i.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,fe({container_type:"QuestionSolutionArticle",container_identifier:At,limit:5,page:bn});case 2:It=Ht.sent,It!=null&&It.comments&&(Kn((It==null?void 0:It.comments)||[]),Zt(bn),mr(It==null?void 0:It.disscuss_count));case 4:case"end":return Ht.stop()}},on)}));return function(bn){return Bn.apply(this,arguments)}}(),Hn=function(){var Bn=Object(h.a)(i.a.mark(function on(){var bn;return i.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(!(ct==="")){Ut.next=3;break}return T.b.error("\u8BF7\u8F93\u5165\u5185\u5BB9"),Ut.abrupt("return");case 3:return Ut.next=5,be({comments:{content:ct},container_type:"QuestionSolutionArticle",container_identifier:At});case 5:bn=Ut.sent,bn!=null&&bn.discuss&&(Ft(""),an(Ot),nn());case 7:case"end":return Ut.stop()}},on)}));return function(){return Bn.apply(this,arguments)}}(),Xn=function(){var Bn=Object(h.a)(i.a.mark(function on(bn,It,Ut){var Ht;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,_e({container_type:"QuestionSolutionArticle",container_identifier:At,comments:{content:It,parent_id:bn}});case 2:Ht=qt.sent,dr(null),Nt(null),an(Ot);case 6:case"end":return qt.stop()}},on)}));return function(bn,It,Ut){return Bn.apply(this,arguments)}}(),ir=function(){var Bn=Object(h.a)(i.a.mark(function on(bn){var It;return i.a.wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return Ht.next=2,ge(bn);case 2:It=Ht.sent,an(Ot);case 4:case"end":return Ht.stop()}},on)}));return function(bn){return Bn.apply(this,arguments)}}(),Fn=function(on){Zt(on),an(on)};return t.a.createElement("div",{className:Mr.a.discuss},t.a.createElement("aside",{className:Mr.a.reply,style:{borderWidth:kn?1:0}},t.a.createElement(Te.a,{defaultValue:ct,id:"writeForumsReviewId",onChange:function(on){Ft(on)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),t.a.createElement(xr.a,null,t.a.createElement(Sr.a,{flex:"1"}),t.a.createElement(Sr.a,null,t.a.createElement(te.a,{type:"primary",size:"large",onClick:function(){return Hn()}},"\u53D1\u9001")))),cn==null?void 0:cn.map(function(Bn){return t.a.createElement(Ri,{secondReply:rr,setSecondReply:dr,thirdlyReply:Dn,setThirdlyReply:Nt,key:Bn.id,data:Bn,onReplyDiscuss:Xn,onPlusDiscuss:ir})}),t.a.createElement(Le.a,{className:Mr.a.pagination,showTotal:function(on){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},on),"\u6761\u6570\u636E")},current:Ot,onChange:Fn,total:kn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},ii=bi,yr=z("hgre"),or=function(st){var bt,At,nn,en,ht,ct,Ft,vt,Yt,Ot,Zt=st.active,jn=st.identifier,Sn=st.onAssist,cn=st.onEdit,Kn=st.onArticlesSkip,_n=st.onClose,wn=st.onOk,kn=st.onDelete,mr=st.detailsIndex,Gn=st.btnShowStatus,qn=Object(n.useState)(!0),rr=Object(d.a)(qn,2),dr=rr[0],Vn=rr[1],Qn=Object(n.useState)({}),Dn=Object(d.a)(Qn,2),Nt=Dn[0],an=Dn[1];Object(n.useEffect)(function(){Zt&&Hn()},[Zt,mr]);var Hn=function(){var on=Object(h.a)(i.a.mark(function bn(){var It,Ut,Ht=arguments;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return It=Ht.length>0&&Ht[0]!==void 0?Ht[0]:!0,It&&Vn(!0),qt.next=4,Object(m.d)(jn,{active:Zt});case 4:Ut=qt.sent,(Ut==null?void 0:Ut.status)===0&&an((Ut==null?void 0:Ut.data)||{}),Vn(!1);case 7:case"end":return qt.stop()}},bn)}));return function(){return on.apply(this,arguments)}}(),Xn=function(){var on=Object(h.a)(i.a.mark(function bn(It){var Ut;return i.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(m.g)(jn,Object(a.a)({active:Zt},It));case 2:Ut=dn.sent,(Ut==null?void 0:Ut.status)===0&&(Hn(!1),wn());case 4:case"end":return dn.stop()}},bn)}));return function(It){return on.apply(this,arguments)}}(),ir=function(){var on=Object(h.a)(i.a.mark(function bn(It){var Ut;return i.a.wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:return dn.next=2,Object(m.c)(jn,{active:It==null?void 0:It.id});case 2:Ut=dn.sent,Ut.status===0&&(Hn(!1),wn());case 4:case"end":return dn.stop()}},bn)}));return function(It){return on.apply(this,arguments)}}(),Fn=function(bn){p.a.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:function(){return kn(bn)}})},Bn=function(){Hn(!1),wn()};return t.a.createElement("div",{className:vn.a.listDetails},t.a.createElement(gr.a,{className:"pt20 pl20 pr20",loading:dr,active:!0,paragraph:{rows:5}},t.a.createElement("div",{className:vn.a.head},t.a.createElement("div",{className:vn.a.name},t.a.createElement("div",{title:Nt==null?void 0:Nt.name,className:vn.a.title},Nt==null?void 0:Nt.name),(Nt==null?void 0:Nt.is_authority)&&t.a.createElement("div",{className:vn.a.b},"\u5B98\u65B9"),(Nt==null?void 0:Nt.is_excellent)&&t.a.createElement("div",{className:vn.a.a},"\u7CBE\u9009")),t.a.createElement("div",{className:vn.a.tag},t.a.createElement("img",{src:E.a.IMG_SERVER+"/images/"+(Nt==null?void 0:Nt.image_url)}),t.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Nt==null?void 0:Nt.username),t.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ue()(Nt==null?void 0:Nt.created_at).format("YYYY-MM-DD")),t.a.createElement("span",null,t.a.createElement("img",{src:W.a}),t.a.createElement("span",null,Nt==null?void 0:Nt.praises_count)),t.a.createElement("span",null,t.a.createElement("img",{src:xe.a}),t.a.createElement("span",null,Nt==null?void 0:Nt.discusses_count)),t.a.createElement("span",null,t.a.createElement("img",{src:Je.a}),t.a.createElement("span",null,Nt==null?void 0:Nt.viewed_count)),t.a.createElement("div",{className:vn.a.btn},(Object(jt.v)()||(Nt==null?void 0:Nt.is_self))&&t.a.createElement(t.a.Fragment,null,t.a.createElement(te.a,{onClick:function(){return Fn(Nt)},type:"primary",ghost:!0},"\u5220\u9664"),t.a.createElement(te.a,{onClick:function(){return cn(Nt)},type:"primary",ghost:!0},"\u7F16\u8F91")),Object(jt.v)()&&t.a.createElement(te.a,{onClick:function(){return Xn({is_authority:!(Nt!=null&&Nt.is_authority)})},type:"primary"},t.a.createElement("img",{src:jr.a}),Nt!=null&&Nt.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),Object(jt.v)()&&t.a.createElement(te.a,{onClick:function(){return Xn({is_excellent:!(Nt!=null&&Nt.is_excellent)})},type:"primary"},t.a.createElement("img",{src:_r.a}),Nt!=null&&Nt.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),t.a.createElement("div",{className:vn.a.scroll},(Nt==null||((bt=Nt.videos)===null||bt===void 0||((At=bt[0])===null||At===void 0))?void 0:At.id)&&t.a.createElement("div",{className:vn.a.video},t.a.createElement(S.a,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!(Nt!=null&&(nn=Nt.videos)!==null&&nn!==void 0&&(en=nn[0])!==null&&en!==void 0&&en.transcoded)},t.a.createElement(yr.a,{poster:Nt==null||((ht=Nt.videos)===null||ht===void 0||((ct=ht[0])===null||ct===void 0))?void 0:ct.cover_url,src:(Nt==null||((Ft=Nt.videos)===null||Ft===void 0||((vt=Ft[0])===null||vt===void 0))?void 0:vt.play_url)||"",videoId:Nt==null||((Yt=Nt.videos)===null||Yt===void 0||((Ot=Yt[0])===null||Ot===void 0))?void 0:Ot.id,logWatchHistory:function(){}}))),t.a.createElement(rt.a,{className:vn.a.html,value:(Nt==null?void 0:Nt.content)||""}),t.a.createElement("div",{onClick:function(){return ir(Nt)},className:vn.a.g},t.a.createElement("img",{className:"mr10",src:(Nt!=null&&Nt.user_liker,ur.a)}),t.a.createElement("span",null,Nt==null?void 0:Nt.praises_count)),t.a.createElement(ii,{onOk:Bn,active:Zt,identifier:jn})),t.a.createElement("div",{className:vn.a.btns},t.a.createElement(te.a,{onClick:function(){return _n()},type:"primary",ghost:!0},"\u5173\u95ED"),Gn[0]&&t.a.createElement(te.a,{onClick:function(bn){return Kn(bn,"prev")},style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Gn[1]&&t.a.createElement(te.a,{onClick:function(bn){return Kn(bn,"next")},style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},ai=or,Di=z("3tLw"),Ni=z.n(Di),wi=z("ek7X"),ga=z("0NbB"),la=function(st){var bt=st.identifier,At=st.tabStatus,nn=st.setFilterListTotal,en=st.setListStatus,ht={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},ct=Object(n.useState)(Object(a.a)({},ht)),Ft=Object(d.a)(ct,2),vt=Ft[0],Yt=Ft[1],Ot=Object(n.useState)(!1),Zt=Object(d.a)(Ot,2),jn=Zt[0],Sn=Zt[1],cn=Object(n.useState)(0),Kn=Object(d.a)(cn,2),_n=Kn[0],wn=Kn[1],kn=Object(n.useState)(1),mr=Object(d.a)(kn,2),Gn=mr[0],qn=mr[1],rr=Object(n.useState)(null),dr=Object(d.a)(rr,2),Vn=dr[0],Qn=dr[1],Dn=Object(n.useState)([]),Nt=Object(d.a)(Dn,2),an=Nt[0],Hn=Nt[1],Xn=Object(n.useState)([!0,!0]),ir=Object(d.a)(Xn,2),Fn=ir[0],Bn=ir[1],on=Object(n.useState)(0),bn=Object(d.a)(on,2),It=bn[0],Ut=bn[1],Ht=Object(n.useRef)(null);Object(n.useEffect)(function(){Er()},[At]),Object(n.useEffect)(function(){dn()},[Vn]),Object(n.useEffect)(function(){Pn(Object(a.a)({},ht)),Er()},[bt]),Object(n.useEffect)(function(){return window.addEventListener("resize",qt),en(It),function(){window.removeEventListener("resize",qt)}},[It]);var dn=function(){var Nn=Object(h.a)(i.a.mark(function gn(){var zn,$n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:if(Vn){Ln.next=3;break}return Bn([!0,!0]),Ln.abrupt("return");case 3:zn=[!0,!0],$n=an==null?void 0:an.findIndex(function(Yr){return Yr.id===Vn}),$n===0&&vt.page===1&&(zn[0]=!1),(vt.page-1)*vt.limit+($n+1)===vt.total&&(zn[1]=!1),Bn(zn);case 8:case"end":return Ln.stop()}},gn)}));return function(){return Nn.apply(this,arguments)}}(),qt=function(){if(It){var gn,zn=window.innerWidth-((gn=Ht.current)===null||gn===void 0?void 0:gn.clientWidth);wn(zn)}},Pn=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n,Dr,Ln,Yr;return i.a.wrap(function(Wr){for(;;)switch(Wr.prev=Wr.next){case 0:return Sn(!0),Wr.next=3,Object(m.f)(bt,zn);case 3:return $n=Wr.sent,($n==null?void 0:$n.status)===0&&(Hn(($n==null||((Dr=$n.data)===null||Dr===void 0)?void 0:Dr.articles)||[]),Yt(Object(a.a)(Object(a.a)({},zn),{},{total:$n==null||((Ln=$n.data)===null||Ln===void 0)?void 0:Ln.articles_count})),nn($n==null||((Yr=$n.data)===null||Yr===void 0)?void 0:Yr.articles_count)),Sn(!1),Wr.abrupt("return",$n);case 7:case"end":return Wr.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),sn=function(){(vt==null?void 0:vt.sort_direction)===null?vt.sort_direction="asc":(vt==null?void 0:vt.sort_direction)==="asc"?vt.sort_direction="desc":(vt==null?void 0:vt.sort_direction)==="desc"&&(vt.sort_direction=null),vt.page=1,Er(),Yt(Object(a.a)({},vt)),Pn(vt)},On=function(){vt.page=1,vt.search=vt==null?void 0:vt.save_search,Er(),Yt(Object(a.a)({},vt)),Pn(vt)},pn=function(){var gn,zn=document.getElementsByClassName("btn-resize");zn[0].style.visibility="hidden";var $n=window.innerWidth-((gn=Ht.current)===null||gn===void 0?void 0:gn.clientWidth);wn($n)},In=function(){pn(),Ut(1)},Yn=function(gn){pn(),Qn(gn==null?void 0:gn.id),Ut(3)},sr=function(gn){pn(),Qn(gn==null?void 0:gn.id),Ut(2)},Er=function(){var gn=document.getElementsByClassName("btn-resize");gn[0].style.visibility="visible",wn(0),Ut(0),Qn(null)},zr=function(gn){Ut(3),Qn(gn),vt.page=1,Yt(Object(a.a)({},vt)),Pn(vt)},Ci=function(gn){Ut(3),Qn(gn),Yt(Object(a.a)({},vt)),Pn(vt)},Br=function(gn){Yt(Object(a.a)({},vt)),Pn(vt)},Mi=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(m.c)(bt,{active:zn==null?void 0:zn.id});case 2:$n=Ln.sent,$n.status===0&&(Pn(vt),qn(Gn+1));case 4:case"end":return Ln.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),$i=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(m.e)(bt,{active:zn==null?void 0:zn.id});case 2:$n=Ln.sent,$n.status===0&&(Pn(vt),qn(Gn+1));case 4:case"end":return Ln.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),Ui=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn){var $n;return i.a.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return Ln.next=2,Object(m.i)(bt,{active:zn==null?void 0:zn.id});case 2:$n=Ln.sent,$n.status===0&&(Er(),Pn(vt));case 4:case"end":return Ln.stop()}},gn)}));return function(zn){return Nn.apply(this,arguments)}}(),ti=function(gn){vt.page=gn,Yt(Object(a.a)({},vt)),Pn(vt)},ji=function(){var Nn=Object(h.a)(i.a.mark(function gn(zn,$n){var Dr,Ln,Yr,Ar,Wr,hi,Oi,Fi,Mn,hn,Un;return i.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:if(Dr=an==null?void 0:an.findIndex(function(vr){return vr.id===Vn}),console.log(Dr,$n,22),!($n==="prev")){Tn.next=21;break}if(!(Dr===void 0)){Tn.next=6;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 6:if(!(Dr===0)){Tn.next=19;break}if(!(vt.page===1)){Tn.next=10;break}return T.b.warn("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 10:if(!(vt.page!==1)){Tn.next=17;break}return vt.page=vt.page-1,Yt(Object(a.a)({},vt)),Tn.next=15,Pn(vt);case 15:Ln=Tn.sent,(Ln==null?void 0:Ln.status)===0&&(hi=Ln==null||((Yr=Ln.data)===null||Yr===void 0)?void 0:Yr.articles[(Ln==null||((Ar=Ln.data)===null||Ar===void 0||((Wr=Ar.articles)===null||Wr===void 0))?void 0:Wr.length)-1],Qn(hi==null?void 0:hi.id),console.log(zn.target,555));case 17:Tn.next=21;break;case 19:Oi=an[Dr-1],Qn(Oi==null?void 0:Oi.id);case 21:if(!($n==="next")){Tn.next=39;break}if(!(Dr===void 0)){Tn.next=25;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 25:if(!((vt.page-1)*vt.limit+(Dr+1)===vt.total)){Tn.next=28;break}return T.b.warn("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728"),Tn.abrupt("return");case 28:if(!(Dr+1===vt.limit)){Tn.next=37;break}return vt.page=vt.page+1,Yt(Object(a.a)({},vt)),Tn.next=33,Pn(vt);case 33:Fi=Tn.sent,(Fi==null?void 0:Fi.status)===0&&(hn=Fi==null||((Mn=Fi.data)===null||Mn===void 0)?void 0:Mn.articles[0],Qn(hn==null?void 0:hn.id)),Tn.next=39;break;case 37:Un=an[Dr+1],Qn(Un==null?void 0:Un.id);case 39:case"end":return Tn.stop()}},gn)}));return function(zn,$n){return Nn.apply(this,arguments)}}();return t.a.createElement("div",{className:gt.a.wrap,ref:Ht},t.a.createElement("div",{className:gt.a.head},t.a.createElement("div",{className:gt.a.sort,onClick:sn},t.a.createElement("span",null,"\u6700\u65B0"),t.a.createElement("aside",null,t.a.createElement(wi.a,{style:{color:(vt==null?void 0:vt.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),t.a.createElement(ga.a,{style:{color:(vt==null?void 0:vt.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),t.a.createElement(J.a.Search,{value:vt.save_search,className:gt.a["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:function(gn){vt.save_search=gn.target.value,Yt(Object(a.a)({},vt))},onSearch:On}),t.a.createElement("div",{onClick:In,className:gt.a.btn},t.a.createElement("img",{src:Ni.a}),"\u5199\u9898\u89E3")),t.a.createElement("div",{className:gt.a.listWarp},t.a.createElement(S.a,{spinning:jn,className:"mt20"},an==null?void 0:an.map(function(Nn,gn){var zn=!0;return gn+1===an.length&&gn!==0&&(zn=!1),t.a.createElement(St,{active:Vn,key:Nn.id,data:Nn,showLine:zn,onClick:Yn,onAssist:Mi,onHide:$i})}),(an==null?void 0:an.length)===0&&t.a.createElement(M.a,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),t.a.createElement(Le.a,{className:gt.a.pagination,showTotal:function(gn){return t.a.createElement("span",{style:{color:"#656F87"}},"\u5171",t.a.createElement("span",{className:"c-light-primary"},gn),"\u6761\u6570\u636E")},total:vt.total,showSizeChanger:!1,current:vt==null?void 0:vt.page,onChange:ti,hideOnSinglePage:!0,showQuickJumper:!0}),It>0&&t.a.createElement("div",{className:gt.a.fixedRight,style:{width:_n}},It===1&&t.a.createElement(ar,{identifier:bt,onClose:Er,onOk:zr}),It===2&&t.a.createElement(ar,{active:Vn,identifier:bt,onClose:Er,onOk:Ci}),It===3&&t.a.createElement(ai,{btnShowStatus:Fn,onArticlesSkip:ji,detailsIndex:Gn,active:Vn,identifier:bt,onClose:Er,onOk:Br,onEdit:sr,onAssist:Mi,onDelete:Ui})))},tn=la,xn=z("VEzc"),fn=z.n(xn),Zn=function(st){var bt,At=st.visible,nn=st.onVisible,en=st.value,ht=st.onChange,ct=st.setIndex,Ft={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null},vt=Object(n.useState)(Ft),Yt=Object(d.a)(vt,2),Ot=Yt[0],Zt=Yt[1],jn=Object(n.useState)([]),Sn=Object(d.a)(jn,2),cn=Sn[0],Kn=Sn[1],_n=Object(n.useState)([]),wn=Object(d.a)(_n,2),kn=wn[0],mr=wn[1],Gn=Object(n.useState)(!1),qn=Object(d.a)(Gn,2),rr=qn[0],dr=qn[1],Vn=Object(n.useRef)([]),Qn=Object(n.useRef)(null),Dn=Object(v.i)();Object(n.useEffect)(function(){return Dn!=null&&Dn.id&&(Qn.current=setInterval(function(){Nt(30)},3e4)),function(){clearInterval(Qn.current)}},[]);var Nt=function(){var It=Object(h.a)(i.a.mark(function Ut(Ht){var dn;return i.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,Object(m.r)(Dn==null?void 0:Dn.id,{practice_time:Ht});case 2:dn=Pn.sent;case 3:case"end":return Pn.stop()}},Ut)}));return function(Ht){return It.apply(this,arguments)}}();Object(n.useEffect)(function(){Bn(Ot),ir()},[]),Object(n.useEffect)(function(){return window.addEventListener("click",Hn),function(){window.removeEventListener("click",Hn)}},[Dn==null?void 0:Dn.save_identifier,At]),Object(n.useEffect)(function(){var It=Vn.current.findIndex(function(Pn){return Pn.identifier===(Dn==null?void 0:Dn.save_identifier)}),Ut=Vn.current[It-1],Ht=Vn.current[It+1],dn=document.getElementById("oj-prev"),qt=document.getElementById("oj-next");Ut?dn.style.display="block":dn.style.display="none",Ht?qt.style.display="block":qt.style.display="none"},[Dn==null?void 0:Dn.save_identifier,Vn.current]);var an=function(Ut,Ht){if(Ut.id===Ht)return Ut;for(var dn=0,qt=Ut;qt=qt.parentNode;dn++){if(qt.id===Ht)return qt;if(qt==document.documentElement)return!1}},Hn=function(){var It=Object(h.a)(i.a.mark(function Ut(Ht){var dn,qt,Pn;return i.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(!an(Ht.target,"oj-drawer")&&At&&nn(!1),dn=Vn.current.findIndex(function(pn){return pn.identifier===(Dn==null?void 0:Dn.save_identifier)}),qt=Vn.current[dn-1],Pn=Vn.current[dn+1],!(Ht.target.id==="oj-prev")){On.next=14;break}if(!(!qt||dn===-1)){On.next=8;break}return T.b.warn("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728"),On.abrupt("return");case 8:return Ht.target.style.pointerEvents="none",Ht.target.style.cursor="not-allowed",On.next=12,on(qt==null?void 0:qt.identifier);case 12:ct("0"),setTimeout(function(){Ht.target.style.pointerEvents="auto",Ht.target.style.cursor="pointer"},400);case 14:if(!(Ht.target.id==="oj-next"||Ht.target.id==="oj-modal-next")){On.next=24;break}if(!(!Pn||dn===-1)){On.next=18;break}return T.b.warn("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728"),On.abrupt("return");case 18:return Ht.target.style.pointerEvents="none",Ht.target.style.cursor="not-allowed",On.next=22,on(Pn==null?void 0:Pn.identifier);case 22:ct("0"),setTimeout(function(){Ht.target.style.pointerEvents="auto",Ht.target.style.cursor="pointer"},400);case 24:case"end":return On.stop()}},Ut)}));return function(Ht){return It.apply(this,arguments)}}();Object(n.useEffect)(function(){ht(Dn==null?void 0:Dn.save_identifier);var It=kn.findIndex(function(Ut){return Ut.some(function(Ht){return Ht.identifier===(Dn==null?void 0:Dn.save_identifier)})});It===-1?Zt(Object(a.a)(Object(a.a)({},Ot),{},{page:1})):Zt(Object(a.a)(Object(a.a)({},Ot),{},{page:It+1}))},[Dn==null?void 0:Dn.save_identifier,kn]);var Xn=function(Ut){Ot.page=1,Ot.tag_discipline_id=Ut,Zt(Object(a.a)({},Ot)),Bn(Ot)},ir=function(){var It=Object(h.a)(i.a.mark(function Ut(){var Ht;return i.a.wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:return qt.next=2,Object(Oe.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:Ht=qt.sent,Kn(Ht.tag_disciplines||[]);case 4:case"end":return qt.stop()}},Ut)}));return function(){return It.apply(this,arguments)}}(),Fn=function(Ut){Ot.page=1,Ot.difficulty=typeof Ut=="number"?Ut:null,Zt(Object(a.a)({},Ot)),Bn(Ot)},Bn=function(){var It=Object(h.a)(i.a.mark(function Ut(Ht){var dn,qt,Pn,sn,On,pn;return i.a.wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return dr(!0),Yn.next=3,Object(m.p)(Ht);case 3:if(dn=Yn.sent,dn!=null&&dn.practices_list){for(Pn=dn==null||((qt=dn.practices_list)===null||qt===void 0)?void 0:qt.length,sn=[],On=0;On(Tn+3)*1e3,Ii!==0&&!ta&&setTimeout(Ir,1e3),!ta){wr.next=12;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),ct({type:Rn.SET_SUBMITING,payload:!1}),wr.abrupt("return");case 12:if(!(Ii===0)){wr.next=19;break}return Wi.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),wr.next=16,Object(m.o)(vt,{limit:15,page:kn});case 16:Vi=wr.sent,ct({type:Rn.SET_SUBMIT_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{submitResult:Wi,submitting:!1,submitRecords:Vi})}),(Wi==null?void 0:Wi.status)===0&&Ht(!0);case 19:case"end":return wr.stop()}},Zi)})),Nr.apply(this,arguments)},Ir=function(){return Nr.apply(this,arguments)},Un={},rn.next=14,Object(m.s)(vt,Un);case 14:if(zt=rn.sent,!(zt.status===-1)){rn.next=18;break}return window.parent.location.href="/classrooms/".concat(Ot.query.coursesId,"/exercise/").concat(Ot.query.exercisesId,"/detail"),rn.abrupt("return");case 18:Tn=sn.time_limit,vr=zi(),Ir();case 21:rn.next=26;break;case 23:rn.prev=23,rn.t0=rn.catch(3),ct({type:Rn.SET_SUBMITING,payload:!1});case 26:case"end":return rn.stop()}},Mn,null,[[3,23]])})),Mi.apply(this,arguments)}function $i(){return Ui.apply(this,arguments)}function Ui(){return Ui=Object(h.a)(i.a.mark(function Mn(){var hn,Un,zt,Tn,vr,Ir,Nr;return i.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return ht.debuging=!0,ct({type:Rn.SET_DEBUGING,payload:!0}),rn.prev=2,rn.next=5,zr();case 5:if(hn=rn.sent,!(hn.status===0)){rn.next=21;break}return Nr=function(){return Nr=Object(h.a)(i.a.mark(function Zi(){var Bi,Ii,Wi,ea,ta,Vi;return i.a.wrap(function(wr){for(;;)switch(wr.prev=wr.next){case 0:return wr.next=2,Object(m.l)(vt,"debug");case 2:if(Bi=wr.sent,Ii=Bi.status,Wi=Bi.message,ea=Bi.data,ta=zi(),Vi=ta-vr>(Un+3)*1e3,Ii!==0&&!Vi&&(ct({type:Rn.SET_EXECUTE_MESSAGE,payload:Wi}),setTimeout(Ir,1e3)),!Vi){wr.next=13;break}return p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ct({type:Rn.SET_DEBUGING,payload:!1}),wr.abrupt("return");case 13:Ii===0&&(ct({type:Rn.SET_DEBUGING,payload:!1}),ea.status===2&&p.a.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),ct({type:Rn.SET_EXECUTE_RESULT,payload:Object(a.a)(Object(a.a)({},ht),{},{debugResult:ea,debuging:!1})}));case 14:case"end":return wr.stop()}},Zi)})),Nr.apply(this,arguments)},Ir=function(){return Nr.apply(this,arguments)},Un=sn.time_limit,zt={input:encodeURIComponent(cn.test_case.input)},rn.next=13,Object(m.h)(vt,zt);case 13:if(Tn=rn.sent,!(Tn.status===-1)){rn.next=17;break}return window.parent.location.href="/classrooms/".concat(Ot.query.coursesId,"/exercise/").concat(Ot.query.exercisesId,"/detail"),rn.abrupt("return");case 17:vr=zi(),Ir(),rn.next=22;break;case 21:ct({type:Rn.SET_DEBUGING,payload:!1});case 22:rn.next=27;break;case 24:rn.prev=24,rn.t0=rn.catch(2),console.log(rn.t0);case 27:return rn.prev=27,rn.finish(27);case 29:case"end":return rn.stop()}},Mn,null,[[2,24,27,29]])})),Ui.apply(this,arguments)}function ti(Mn){var hn;clearTimeout(dn.current),dn.current=setTimeout(function(){var Un;zr({code:C.Base64.encode(Mn),language:qt==null||((Un=qt.current)===null||Un===void 0)?void 0:Un.language})},2e3),ct({type:Rn.SET_DATA,payload:Object(a.a)(Object(a.a)({},qt==null?void 0:qt.current),{},{hack:Object(a.a)(Object(a.a)({},qt==null||((hn=qt.current)===null||hn===void 0)?void 0:hn.hack),{},{code:Mn})})})}function ji(Mn){var hn=Mn.target.value;ct({type:Rn.SET_DATA,payload:Object(a.a)(Object(a.a)({},cn),{},{test_case:{input:hn}})})}var Nn=function(){var Mn=Object(h.a)(i.a.mark(function hn(Un){var zt,Tn,vr,Ir,Nr;return i.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return ct({type:Rn.SET_LOADING,payload:!0}),rn.next=3,zr();case 3:if(zt=rn.sent,!(zt.status===0)){rn.next=14;break}return ct({type:Rn.SET_SUBMIT_RESULT,payload:{languageValue:Un}}),qt.current.language=Un,Tn="".concat(Pn==null?void 0:Pn.login,"-language"),localStorage.setItem(Tn,Un),rn.next=11,Object(m.w)(vt);case 11:vr=rn.sent,vr.status===0&&(Nr=vr==null||((Ir=vr.data)===null||Ir===void 0)?void 0:Ir.find(function(ki){return ki.language===Un}),ti(C.Base64.decode(Nr.code))),setTimeout(function(){ct({type:Rn.SET_LOADING,payload:!1})},300);case 14:case"end":return rn.stop()}},hn)}));return function(Un){return Mn.apply(this,arguments)}}();function gn(){return zn.apply(this,arguments)}function zn(){return zn=Object(h.a)(i.a.mark(function Mn(){var hn;return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.prev=0,zt.next=3,Object(m.q)(vt,{language:Zt});case 3:hn=zt.sent,hn.status===401?Yt.replace("/login",{from:Ot.pathname}):(ti(C.Base64.decode(hn.code)),Yn()),zt.next=10;break;case 7:zt.prev=7,zt.t0=zt.catch(0),console.log(zt.t0);case 10:case"end":return zt.stop()}},Mn,null,[[0,7]])})),zn.apply(this,arguments)}function $n(){p.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:t.a.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",t.a.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk:function(){return Object(h.a)(i.a.mark(function hn(){var Un;return i.a.wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.next=2,Object(m.t)(vt,{language:Zt});case 2:Un=Tn.sent,Un.status===401?Yt.replace("/login",{from:Ot.pathname}):ti(C.Base64.decode(Un.code));case 4:case"end":return Tn.stop()}},hn)}))()}})}function Dr(){ct({type:Rn.SET_SHOW_NOTE,payload:!0})}function Ln(){ct({type:Rn.SET_SHOW_NOTE,payload:!1})}function Yr(Mn){return Ar.apply(this,arguments)}function Ar(){return Ar=Object(h.a)(i.a.mark(function Mn(hn){return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return zt.next=2,Object(m.b)(vt,hn);case 2:ct({type:Rn.GET_DATA,payload:{showNote:!1,data:Object(a.a)(Object(a.a)({},cn),{},{hack:Object(a.a)(Object(a.a)({},sn),{},{notes:hn.notes})})}});case 3:case"end":return zt.stop()}},Mn)})),Ar.apply(this,arguments)}var Wr={input:cn==null||((st=cn.test_case)===null||st===void 0)?void 0:st.input,language:sn==null?void 0:sn.language,code:sn==null?void 0:sn.code,title:"main."+ya[sn==null?void 0:sn.language],modify_code:sn==null?void 0:sn.modify_code,notes:sn==null?void 0:sn.notes,debugResult:Kn,debuging:Gn,submitting:qn,executingMessage:rr,id:vt,languageValue:Zt,languageList:jn,onChangeLanguage:Nn,onCancelNote:Ln,onAddNote:Yr,showNote:mr,onShowNote:Dr,onSubmitCode:Br,onChangeCode:ti,onChangeInput:ji,onDebugCode:$i,onResetCode:gn,onSyncCode:$n,onUpdateCode:zr};function hi(){return Oi.apply(this,arguments)}function Oi(){return Oi=Object(h.a)(i.a.mark(function Mn(){var hn,Un,zt;return i.a.wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.next=2,Object(m.u)(sn.id,{container_type:"Hack",type:1});case 2:hn=vr.sent,Un=hn.praise_count,zt=Object(a.a)(Object(a.a)({},cn),{},{hack:Object(a.a)(Object(a.a)({},sn),{},{praises_count:Un,user_praise:!sn.user_praise})}),ct({type:Rn.SET_DATA,payload:zt});case 6:case"end":return vr.stop()}},Mn)})),Oi.apply(this,arguments)}var Fi={topicId:vt,submitResult:_n,submitRecords:wn,submitting:qn,page:kn,onPageChange:Er,hack:sn,user:cn==null?void 0:cn.user,onTriggerPraise:hi};return console.log(cn,qt==null?void 0:qt.current,"data--------"),t.a.createElement(t.a.Fragment,null,t.a.createElement(S.a,{className:"oj-custom-large-spin",size:"large",spinning:Sn},cn?t.a.createElement("div",{className:"oj-custom-warp"},t.a.createElement("header",{className:D.a.header,style:{minWidth:1200}},t.a.createElement("div",null,t.a.createElement("img",{src:"".concat(E.a.IMG_SERVER,"/images/").concat(Pn.image_url),alt:"user",width:30}),t.a.createElement("span",null,Pn.name)),t.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},t.a.createElement("div",null,sn.name),t.a.createElement(kr,{onChange:function(hn){},className:"font12 c-grey-999"})),t.a.createElement(Pa.CopyToClipboard,{text:"".concat((bt=window.location)===null||bt===void 0?void 0:bt.origin,"/problems/").concat(sn.identifier,"/share"),onCopy:function(){return T.b.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")}},t.a.createElement("span",{className:D.a.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",t.a.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),sn.edit_privilege?t.a.createElement(b.a,{className:D.a.btn_back,to:"/problems/".concat(sn.identifier,"/ojedit"),style:{marginRight:10}}," ",t.a.createElement(c.a,null)," \u7F16\u8F91"):null,t.a.createElement(b.a,{className:D.a.btn_back,to:"/problems"}," ",t.a.createElement(y.a,null),"\u9000\u51FA")),t.a.createElement(g.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:t.a.createElement(cr,Fi),rightChild:t.a.createElement(ka,Wr)})):null),t.a.createElement(p.a,{centered:!0,closable:!1,width:680,footer:null,visible:Ut,className:"oj-modal"},t.a.createElement("section",{className:"oj-modal-content"},t.a.createElement("div",{className:"oj-modal-head"},t.a.createElement("img",{src:er.a,alt:""}),t.a.createElement("i",{onClick:function(){return Ht(!1)},className:"iconfont icon-guanbi1"})),t.a.createElement("aside",null,t.a.createElement("img",{className:"mr30",src:fi.a}),"\u8FD0\u884C\u65F6\u95F4:\xA0",t.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},_n==null?void 0:_n.execute_time,"s"),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(_n==null?void 0:_n.time_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("aside",{className:"mb50"},t.a.createElement("img",{src:Fr.a,className:"mr30"}),t.a.createElement("span",{className:"oj-modal-tt"},t.a.createElement("span",null,t.a.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),t.a.createElement("span",{className:"c-light-primary"},_n==null?void 0:_n.execute_memory,"kb")),t.a.createElement("span",null,t.a.createElement("span",null))),"\u4F18\u4E8E",t.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(_n==null?void 0:_n.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),t.a.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function Gi(at){var st=at.languageValue,bt=at.languageList,At=at.onChangeLanguage,nn=at.title,en=at.modify_code,ht=at.onSyncCode,ct=at.onShowCodeSetting,Ft=at.onResetCode,vt=Object(v.h)(),Yt=function(){p.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:t.a.createElement(o.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Ft})};return t.a.createElement("div",{className:"action-bar"},t.a.createElement(w.a,{className:"oj-select",value:st,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:At},bt==null?void 0:bt.map(function(Ot){return t.a.createElement(w.a.Option,{key:Ot.language,value:Ot.language},Ot.language)})),t.a.createElement("span",null),t.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Yt},t.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),t.a.createElement("a",{onClick:ct},t.a.createElement("i",{className:"iconfont icon-shezhi"})))}function ka(at){var st=at.id,bt=at.input,At=at.showNote,nn=at.onShowNote,en=at.notes,ht=at.onCancelNote,ct=at.onAddNote,Ft=at.debugResult,vt=at.language,Yt=at.debuging,Ot=at.submitting,Zt=at.executingMessage,jn=at.code,Sn=at.onSubmitCode,cn=at.onDebugCode,Kn=at.onChangeCode,_n=at.onChangeInput,wn=at.onUpdateCode,kn=Object(Z.a)(at,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function mr(qn){return t.a.createElement(Gi,Object(ae.a)({},kn,{onShowCodeSetting:qn}))}var Gn={id:st,input:bt,debugResult:Ft,debuging:Yt,submitting:Ot,executingMessage:Zt,onDebugCode:cn,onChangeCode:Kn,onSubmitCode:Sn,onChangeInput:_n};return t.a.createElement("div",{className:"right-panel"},t.a.createElement(x.a,{language:vt,value:jn,onChange:Kn,ActionBarRender:mr}),t.a.createElement("div",{className:"note-form-area ".concat(At?"active":"")},t.a.createElement(ie,{onCancel:ht,notes:en,callback:ct})),t.a.createElement(F.b,Gn))}},WaYH:function($e,We,z){"use strict";var ae=z("rePB"),Z=z("Ff2n"),U=z("VTBJ"),w=z("1OyB"),P=z("vuIU"),S=z("JX7q"),O=z("Ji7U"),T=z("LK+K"),l=z("q1tI"),p=z("TSYQ"),h=z.n(p),d=z("sboe"),a=z("OZM5"),u=function(b){var m=b.prefixCls,g=b.level,E=b.isStart,o=b.isEnd;if(!g)return null;for(var x="".concat(m,"-indent-unit"),C=[],A=0;A1&&arguments[1]!==void 0?arguments[1]:!1,ye=oe.getAttribute("id")||oe.getAttribute("data-reactid")||oe.getAttribute("name");if(Ee&&I[ye])return I[ye];var Le=window.getComputedStyle(oe),pe=Le.getPropertyValue("box-sizing")||Le.getPropertyValue("-moz-box-sizing")||Le.getPropertyValue("-webkit-box-sizing"),Ce=parseFloat(Le.getPropertyValue("padding-bottom"))+parseFloat(Le.getPropertyValue("padding-top")),Be=parseFloat(Le.getPropertyValue("border-bottom-width"))+parseFloat(Le.getPropertyValue("border-top-width")),Pe=D.map(function(Ne){return"".concat(Ne,":").concat(Le.getPropertyValue(Ne))}).join(";"),ke={sizingStyle:Pe,paddingSize:Ce,borderSize:Be,boxSizing:pe};return Ee&&ye&&(I[ye]=ke),ke}function te(oe){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),oe.getAttribute("wrap")?F.setAttribute("wrap",oe.getAttribute("wrap")):F.removeAttribute("wrap");var pe=H(oe,Ee),Ce=pe.paddingSize,Be=pe.borderSize,Pe=pe.boxSizing,ke=pe.sizingStyle;F.setAttribute("style","".concat(ke,";").concat(A)),F.value=oe.value||oe.placeholder||"";var Ne=Number.MIN_SAFE_INTEGER,he=Number.MAX_SAFE_INTEGER,ue=F.scrollHeight,Ie;if(Pe==="border-box"?ue+=Be:Pe==="content-box"&&(ue-=Ce),ye!==null||Le!==null){F.value=" ";var Ue=F.scrollHeight-Ce;ye!==null&&(Ne=Ue*ye,Pe==="border-box"&&(Ne=Ne+Ce+Be),ue=Math.max(Ne,ue)),Le!==null&&(he=Ue*Le,Pe==="border-box"&&(he=he+Ce+Be),Ie=ue>he?"":"hidden",ue=Math.min(he,ue))}return{height:ue,minHeight:Ne,maxHeight:he,overflowY:Ie,resize:"none"}}var j=z("Gytx"),G=z.n(j),X;(function(oe){oe[oe.NONE=0]="NONE",oe[oe.RESIZING=1]="RESIZING",oe[oe.RESIZED=2]="RESIZED"})(X||(X={}));var J=function(oe){Object(w.a)(ye,oe);var Ee=Object(P.a)(ye);function ye(Le){var pe;return Object(Z.a)(this,ye),pe=Ee.call(this,Le),pe.nextFrameActionId=void 0,pe.resizeFrameId=void 0,pe.textArea=void 0,pe.saveTextArea=function(Ce){pe.textArea=Ce},pe.handleResize=function(Ce){var Be=pe.state.resizeStatus,Pe=pe.props,ke=Pe.autoSize,Ne=Pe.onResize;if(Be!==X.NONE)return;typeof Ne=="function"&&Ne(Ce),ke&&pe.resizeOnNextFrame()},pe.resizeOnNextFrame=function(){cancelAnimationFrame(pe.nextFrameActionId),pe.nextFrameActionId=requestAnimationFrame(pe.resizeTextarea)},pe.resizeTextarea=function(){var Ce=pe.props.autoSize;if(!Ce||!pe.textArea)return;var Be=Ce.minRows,Pe=Ce.maxRows,ke=te(pe.textArea,!1,Be,Pe);pe.setState({textareaStyles:ke,resizeStatus:X.RESIZING},function(){cancelAnimationFrame(pe.resizeFrameId),pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:X.RESIZED},function(){pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:X.NONE}),pe.fixFirefoxAutoScroll()})})})})},pe.renderTextArea=function(){var Ce=pe.props,Be=Ce.prefixCls,Pe=Be===void 0?"rc-textarea":Be,ke=Ce.autoSize,Ne=Ce.onResize,he=Ce.className,ue=Ce.disabled,Ie=pe.state,Ue=Ie.textareaStyles,Ye=Ie.resizeStatus,ee=Object(o.a)(pe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),M=C()(Pe,he,Object(T.a)({},"".concat(Pe,"-disabled"),ue));"value"in ee&&(ee.value=ee.value||"");var N=Object(O.a)(Object(O.a)(Object(O.a)({},pe.props.style),Ue),Ye===X.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(E,{onResize:pe.handleResize,disabled:!(ke||Ne)},S.createElement("textarea",Object(ae.a)({},ee,{className:M,style:N,ref:pe.saveTextArea})))},pe.state={textareaStyles:{},resizeStatus:X.NONE},pe}return Object(U.a)(ye,[{key:"componentDidUpdate",value:function(pe){(pe.value!==this.props.value||!G()(pe.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var pe=this.textArea.selectionStart,Ce=this.textArea.selectionEnd;this.textArea.setSelectionRange(pe,Ce)}}catch(Be){}}},{key:"render",value:function(){return this.renderTextArea()}}]),ye}(S.Component),B=J,Q=function(oe){Object(w.a)(ye,oe);var Ee=Object(P.a)(ye);function ye(Le){var pe;Object(Z.a)(this,ye),pe=Ee.call(this,Le),pe.resizableTextArea=void 0,pe.focus=function(){pe.resizableTextArea.textArea.focus()},pe.saveTextArea=function(Be){pe.resizableTextArea=Be},pe.handleChange=function(Be){var Pe=pe.props.onChange;pe.setValue(Be.target.value,function(){pe.resizableTextArea.resizeTextarea()}),Pe&&Pe(Be)},pe.handleKeyDown=function(Be){var Pe=pe.props,ke=Pe.onPressEnter,Ne=Pe.onKeyDown;Be.keyCode===13&&ke&&ke(Be),Ne&&Ne(Be)};var Ce=typeof Le.value=="undefined"||Le.value===null?Le.defaultValue:Le.value;return pe.state={value:Ce},pe}return Object(U.a)(ye,[{key:"setValue",value:function(pe,Ce){"value"in this.props||this.setState({value:pe},Ce)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(B,Object(ae.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(pe){return"value"in pe?{value:pe.value}:null}}]),ye}(S.Component),ie=We.default=Q},Z8dc:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___3U5jH",flex_space_between:"flex_space_between___10tgP",flex_box_vertical_center:"flex_box_vertical_center___1e5pu",flex_box_center_end:"flex_box_center_end___WDBuM",flex_box_column:"flex_box_column___3TSEG",listForm:"listForm___264Pu",scroll:"scroll___CK9uS",formWrap:"formWrap___2n6e2",btns:"btns___2wuct",main:"main___1WFqr",mainLoading:"mainLoading___1kJWi",tip:"tip___10JaH",proWarp:"proWarp___TMP84",pro:"pro___1CLLm",mainSucceed:"mainSucceed___3NYgf",del:"del___34rdE"}},ZD9Y:function($e,We,z){"use strict";var ae=z("BoS7"),Z=z("Sdc0"),U=z("OaEy"),w=z("2fM7"),P=z("q1tI"),S=z.n(P),O=z("lOMy"),T=z.n(O),l=w.a.Option;We.a=function(p){var h=p.onFontSizeChange,d=p.cmFontSize,a=p.cmCodeMode,u=p.onCodeModeChange,s=p.onTabToSpace,f=p.className,i=f===void 0?"":f,n=p.tabToSpace,t=p.children;return S.a.createElement("div",{className:"tpi-code-setting ".concat(i)},S.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:a,onChange:u},S.a.createElement(l,{value:"vs"},"\u767D\u8272\u80CC\u666F"),S.a.createElement(l,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),S.a.createElement(w.a,{bordered:!1,size:"small",value:d,onChange:h},S.a.createElement(l,{value:12},"12px"),S.a.createElement(l,{value:14},"14px"),S.a.createElement(l,{value:16},"16px"),S.a.createElement(l,{value:18},"18px"),S.a.createElement(l,{value:20},"20px"),S.a.createElement(l,{value:22},"22px"))),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"Tab\u8F6C\u6362"),S.a.createElement(Z.a,{checked:n,onChange:s}))),S.a.createElement("h3",null,"\u5FEB\u6377\u952E"),S.a.createElement("section",null,S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),S.a.createElement("span",null,"Ctrl + S")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),S.a.createElement("span",null,"F1 / Alt + F1")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),S.a.createElement("span",null,"Ctrl + ]/[")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),S.a.createElement("span",null,"Ctrl + Shift + \\")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),S.a.createElement("span",null,"Home")),S.a.createElement("div",{className:"file-item"},S.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),S.a.createElement("span",null,"End"))),t)}},ZW9T:function($e,We,z){"use strict";z.d(We,"a",function(){return y});var ae=z("k1fw"),Z=z("miYZ"),U=z("tsqr"),w=z("rAM+"),P=z("tJVT"),S=z("PpiC"),O=z("q1tI"),T=z.n(O),l=z("bdgK");function p(v,_,b,m,g){var E=_.getWordUntilPosition(b),o={startLineNumber:b.lineNumber,endLineNumber:b.lineNumber,startColumn:E.startColumn,endColumn:E.endColumn},x=m.map(function(C){return{label:C,kind:v.languages.CompletionItemKind.Keyword,insertText:C,insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:o}});return g.map(function(C){x.push(Object(ae.a)(Object(ae.a)({},C),{},{range:o}))}),x}var h=function(v){var _={label:"ifelse",kind:v.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet},b=["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","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];v.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(o,x){var C=p(v,o,x,b,[_]);return{suggestions:C}}});var m=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];v.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(o,x){var C=[{label:"print",kind:v.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(v,o,x,m,C);return{suggestions:A}}});var g=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];v.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(o,x){var C=[_,{label:"main",kind:v.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:v.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(` `),insertTextRules:v.languages.CompletionItemInsertTextRule.InsertAsSnippet}],A=p(v,o,x,g,C);return{suggestions:A}}})},d="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",a=z("LvDl");function u(v){return/^\d+$/.test(v)?"".concat(v,"px"):v}function s(){}var f=!1,i={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function n(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_=v;if(Array.isArray(v)){for(var b=0;b0||pt.target.offsetWidth>0)&&he.current.instance.layout()}}catch(Dt){Ge.e(Dt)}finally{Ge.f()}}),_e.observe(Ne.current)),_e}function V(){U.b.warn(decodeURIComponent(d))}var Y=function(){var be=he.current.instance;if(E!=null&&be&&M){var Ge=be.getModel();Ge&&E!==Ge.getValue()&&(f=!0,Ge.setValue(E),be.layout(),f=!1)}};Object(O.useEffect)(function(){ue.current&&clearTimeout(ue.current),ue.current=setTimeout(function(){Y()},500)},[E,M,he.current]);function me(){var _e=he.current.instance;if(_e){var be=_e.getSelection(),Ge=he.current.pastePos||{},qe=new t.Range(Ge.startLineNumber||be.endLineNumber,Ge.startColumn||be.endColumn,Ge.endLineNumber||be.endLineNumber,Ge.endColumn||be.endColumn);setTimeout(function(){_e.executeEdits("",[{range:qe,text:""}])},300)}}function Re(_e){(window.navigator.platform.match("Mac")?_e.metaKey:_e.ctrlKey)&&_e.keyCode==83&&(_e.preventDefault(),X())}var rt=function(){if(B&&he.current.instance){var be=he.current.instance.getContentHeight();fe(be0||ye.target.offsetWidth>0)&&B.layout()}}catch(Le){oe.e(Le)}finally{oe.f()}}),Q.observe(D.current)),Q}Object(O.useEffect)(function(){D.current&&z.e(27).then(z.t.bind(null,"M/lh",7)).then(function(B){t=B;var Q=t.editor.createDiffEditor(D.current,Object(ae.a)(Object(ae.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},A),{},{wordWrap:!0}));te(Q);var ie=j(Q);return function(){Q.dispose();var oe=Q.getModel();oe&&oe.dispose(),ie.unobserve(D.current)}})},[]),Object(O.useEffect)(function(){H&&H.setModel({original:t.editor.createModel(E,x),modified:t.editor.createModel(o,x)})},[E,o,x,H]);var G=u(b),X=u(g),J={width:G,height:X};return T.a.createElement("div",{className:"my-diff-editor",ref:D,style:J})}},ZpRC:function($e,We,z){"use strict";function ae(h){return typeof h=="object"&&h!=null&&h.nodeType===1}function Z(h,d){return(!d||h!=="hidden")&&h!=="visible"&&h!=="clip"}function U(h,d){if(h.clientHeightd||f>h&&i=d&&n>=a?f-h-u:i>d&&na?i-d+s:0}var P=function(h,d){var a=window,u=d.scrollMode,s=d.block,f=d.inline,i=d.boundary,n=d.skipOverflowHiddenElements,t=typeof i=="function"?i:function(Ue){return Ue!==i};if(!ae(h))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,y=[],v=h;ae(v)&&t(v);){if((v=v.parentElement)===c){y.push(v);break}v!=null&&v===document.body&&U(v)&&!U(document.documentElement)||v!=null&&U(v,n)&&y.push(v)}for(var _=a.visualViewport?a.visualViewport.width:innerWidth,b=a.visualViewport?a.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,E=h.getBoundingClientRect(),o=E.height,x=E.width,C=E.top,A=E.right,D=E.bottom,I=E.left,F=s==="start"||s==="nearest"?C:s==="end"?D:C+o/2,H=f==="center"?I+x/2:f==="end"?A:I,te=[],j=0;j=0&&I>=0&&D<=b&&A<=_&&C>=Q&&D<=oe&&I>=Ee&&A<=ie)return te;var ye=getComputedStyle(G),Le=parseInt(ye.borderLeftWidth,10),pe=parseInt(ye.borderTopWidth,10),Ce=parseInt(ye.borderRightWidth,10),Be=parseInt(ye.borderBottomWidth,10),Pe=0,ke=0,Ne="offsetWidth"in G?G.offsetWidth-G.clientWidth-Le-Ce:0,he="offsetHeight"in G?G.offsetHeight-G.clientHeight-pe-Be:0;if(c===G)Pe=s==="start"?F:s==="end"?F-b:s==="nearest"?w(g,g+b,b,pe,Be,g+F,g+F+o,o):F-b/2,ke=f==="start"?H:f==="center"?H-_/2:f==="end"?H-_:w(m,m+_,_,Le,Ce,m+H,m+H+x,x),Pe=Math.max(0,Pe+g),ke=Math.max(0,ke+m);else{Pe=s==="start"?F-Q-pe:s==="end"?F-oe+Be+he:s==="nearest"?w(Q,oe,J,pe,Be+he,F,F+o,o):F-(Q+J/2)+he/2,ke=f==="start"?H-Ee-Le:f==="center"?H-(Ee+B/2)+Ne/2:f==="end"?H-ie+Ce+Ne:w(Ee,ie,B,Le,Ce+Ne,H,H+x,x);var ue=G.scrollLeft,Ie=G.scrollTop;F+=Ie-(Pe=Math.max(0,Math.min(Ie+Pe,G.scrollHeight-J+he))),H+=ue-(ke=Math.max(0,Math.min(ue+ke,G.scrollWidth-B+Ne)))}te.push({el:G,top:Pe,left:ke})}return te};function S(h){return h===Object(h)&&Object.keys(h).length!==0}function O(h,d){d===void 0&&(d="auto");var a="scrollBehavior"in document.body.style;h.forEach(function(u){var s=u.el,f=u.top,i=u.left;s.scroll&&a?s.scroll({top:f,left:i,behavior:d}):(s.scrollTop=f,s.scrollLeft=i)})}function T(h){return h===!1?{block:"end",inline:"nearest"}:S(h)?h:{block:"start",inline:"nearest"}}function l(h,d){var a=!h.ownerDocument.documentElement.contains(h);if(S(d)&&typeof d.behavior=="function")return d.behavior(a?[]:P(h,d));if(a)return;var u=T(d);return O(P(h,u),u.behavior)}var p=We.a=l},ZsLC:function($e,We,z){$e.exports={"left-panel":"left-panel___FTwwW","tab-panel-body":"tab-panel-body___2YSOx",b1:"b1___3qx3o","oj-mr":"oj-mr___1GA9N","oj-width-input":"oj-width-input___3GkyP","s-navs":"s-navs___1fGGf","bg-white":"bg-white___1ZAy0",active:"active___39N6D"}},bCnd:function($e,We,z){"use strict";z.d(We,"b",function(){return w}),z.d(We,"a",function(){return P});var ae=z("je13"),Z=z.n(ae),U=!1;function w(S,O){var T=Z.a.get("__ec");T||(T={}),T[S]=O,Z.a.set("__ec",T)}function P(S,O){var T=Z.a.get("__ec");return T?T[S]===void 0?O:T[S]:O}},bT9E:function($e,We,z){"use strict";z.d(We,"a",function(){return Z});var ae=z("VTBJ");function Z(U,w){var P=Object(ae.a)({},U);return Array.isArray(w)&&w.forEach(function(S){delete P[S]}),P}},bdLU:function($e,We,z){"use strict";z.d(We,"a",function(){return ae});var ae;(function(Z){Z[Z.NOMATCH=-1]="NOMATCH",Z[Z.OK=0]="OK",Z[Z.TIMEOUT=2]="TIMEOUT",Z[Z.PODFAILURE=3]="PODFAILURE",Z[Z.COMPILEFAILURE=4]="COMPILEFAILURE",Z[Z.EXECUTEFAILURE=5]="EXECUTEFAILURE"})(ae||(ae={}))},biw7:function($e,We,z){"use strict";var ae=z("q1tI"),Z=z.n(ae),U=ae.createContext(null);We.a=U},c5Ni:function($e,We,z){},cDPC:function($e,We,z){"use strict";var ae=z("tJVT"),Z=z("q1tI"),U=z.n(Z),w=z("i3hx"),P=z.n(w);We.a=function(S){var O=S.defaultX,T=O===void 0?"40%":O,l=S.leftChild,p=S.rightChild,h=S.className,d=S.hideResize,a=d===void 0?!1:d,u=Object(Z.useState)(T),s=Object(ae.a)(u,2),f=s[0],i=s[1],n=Object(Z.useRef)();function t(){n.current=!0}Object(Z.useEffect)(function(){function v(b){n.current&&i(b.pageX)}function _(){n.current=!1}return window.addEventListener("mousemove",v),window.addEventListener("mouseup",_),function(){window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",_)}},[]);var c=typeof f=="number"&&f!==.01?"".concat(f,"px"):T,y="calc(100% - ".concat(a?"0px":"4px"," - ").concat(c,")");return U.a.createElement("div",{className:"split-panel-container ".concat(h)},U.a.createElement("section",{style:{width:c,display:f===.01?"none":""}},l),U.a.createElement("section",{className:"resize-x-bar",onMouseDown:t},U.a.createElement("a",{className:"btn-resize"},U.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},U.a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),U.a.createElement("section",{style:{width:y}},p))}},dejd:function($e,We,z){},dmUQ:function($e,We,z){"use strict";var ae=z("Ff2n"),Z=z("rePB"),U=z("1OyB"),w=z("vuIU"),P=z("Ji7U"),S=z("md7G"),O=z("foSv"),T=z("q1tI"),l=z.n(T),p=z("TSYQ"),h=z.n(p),d=z("4IlW");function a(o,x){var C=Object.keys(o);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(o);x&&(A=A.filter(function(D){return Object.getOwnPropertyDescriptor(o,D).enumerable})),C.push.apply(C,A)}return C}function u(o){for(var x=1;x1?B-1:0),ie=1;ie1?j-1:0),X=1;X=0)return parseInt(te.slice(te.indexOf("e-")+2),10);var j=0;return te.indexOf(".")>=0&&(j=te.length-te.indexOf(".")-1),j},D.getInputDisplayValue=function(H){var te=H||D.state,j=te.focused,G=te.inputValue,X=te.value,J;j?J=G:J=D.toPrecisionAsStep(X),J==null&&(J="");var B=D.formatWrapper(J);return _(D.props.decimalSeparator)&&(B=B.toString().replace(".",D.props.decimalSeparator)),B},D.recordCursorPosition=function(){try{D.cursorStart=D.input.selectionStart,D.cursorEnd=D.input.selectionEnd,D.currentValue=D.input.value,D.cursorBefore=D.input.value.substring(0,D.cursorStart),D.cursorAfter=D.input.value.substring(D.cursorEnd)}catch(H){}},D.restoreByAfter=function(H){if(H===void 0)return!1;var te=D.input.value,j=te.lastIndexOf(H);if(j===-1)return!1;var G=D.cursorBefore.length;return D.lastKeyCode===d.a.DELETE&&D.cursorBefore.charAt(G-1)===H[0]?(D.fixCaret(G,G),!0):j+H.length===te.length?(D.fixCaret(j,j),!0):!1},D.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(te,j){var G=H.substring(j);return D.restoreByAfter(G)})},D.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},D.stop=function(){D.autoStepTimer&&clearTimeout(D.autoStepTimer)},D.down=function(H,te,j){D.pressingUpOrDown=!0,D.step("down",H,te,j)},D.up=function(H,te,j){D.pressingUpOrDown=!0,D.step("up",H,te,j)},D.saveInput=function(H){D.input=H};var I=A.value;I===void 0&&(I=A.defaultValue),D.state={focused:A.autoFocus};var F=D.getValidValue(D.toNumber(I));return D.state=u(u({},D.state),{},{inputValue:D.toPrecisionAsStep(F),value:F}),D}return Object(w.a)(C,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(D){var I=this.props,F=I.value,H=I.onChange,te=I.max,j=I.min,G=this.state.focused;if(D){if(!b(D.value,F)||!b(D.max,te)||!b(D.min,j)){var X=G?F:this.getValidValue(F),J;this.pressingUpOrDown?J=X:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(X),this.setState({value:X,inputValue:J})}var B="value"in this.props?F:this.state.value;"max"in this.props&&D.max!==te&&typeof B=="number"&&B>te&&H&&H(te),"min"in this.props&&D.min!==j&&typeof B=="number"&&B1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(D);return isNaN(H)?D:(HF&&(H=F),H)}},{key:"setValue",value:function(D,I){var F=this.props.precision,H=this.isNotCompleteNumber(parseFloat(D))?null:parseFloat(D),te=this.state.value,j=te===void 0?null:te,G=this.state.inputValue,X=G===void 0?null:G,J=typeof H=="number"?H.toFixed(F):"".concat(H),B=H!==j||J!=="".concat(X);return"value"in this.props?(X=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:X},I)):this.setState({value:H,inputValue:this.toPrecisionAsStep(D)},I),B&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,H=F.precision,te=F.step;if(_(H))return H;var j=this.getPrecision(I),G=this.getPrecision(te),X=this.getPrecision(D);return D?Math.max(X,j+G):j+G}},{key:"getPrecisionFactor",value:function(D){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(D,I);return Math.pow(10,F)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(D){return this.props.formatter?this.props.formatter(D):D}},{key:"toPrecisionAsStep",value:function(D){if(this.isNotCompleteNumber(D)||D==="")return D;var I=Math.abs(this.getMaxPrecision(D));return isNaN(I)?D.toString():Number(D).toFixed(I)}},{key:"toNumber",value:function(D){var I=this.props.precision,F=this.state.focused,H=D&&D.length>16&&F;return this.isNotCompleteNumber(D)||H?D:_(I)?Math.round(D*Math.pow(10,I))/Math.pow(10,I):Number(D)}},{key:"upStep",value:function(D,I){var F=this.props.step,H=this.getPrecisionFactor(D,I),te=Math.abs(this.getMaxPrecision(D,I)),j=((H*D+H*F*I)/H).toFixed(te);return this.toNumber(j)}},{key:"downStep",value:function(D,I){var F=this.props.step,H=this.getPrecisionFactor(D,I),te=Math.abs(this.getMaxPrecision(D,I)),j=((H*D-H*F*I)/H).toFixed(te);return this.toNumber(j)}},{key:"step",value:function(D,I){var F=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,te=arguments.length>3?arguments[3]:void 0;this.stop(),I&&(I.persist(),I.preventDefault());var j=this.props;if(j.disabled)return;var G=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(G))return;var X=this["".concat(D,"Step")](G,H),J=X>j.max||Xj.max?X=j.max:X=Q),Ke=(Re||Re===0)&&(isNaN(Re)||Number(Re)<=ie),we=Ve||H||te,Ae=Ke||H||te,Oe=h()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(Z.a)({},"".concat(F,"-handler-up-disabled"),we)),fe=h()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(Z.a)({},"".concat(F,"-handler-down-disabled"),Ae)),ge=j?{onTouchStart:we?i:this.up,onTouchEnd:this.stop}:{onMouseDown:we?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},_e=j?{onTouchStart:Ae?i:this.down,onTouchEnd:this.stop}:{onMouseDown:Ae?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return l.a.createElement("div",{className:De,style:oe,title:Ee,onMouseEnter:ye,onMouseLeave:Le,onMouseOver:pe,onMouseOut:Ce,onFocus:function(){return null},onBlur:function(){return null}},l.a.createElement("div",{className:"".concat(F,"-handler-wrap")},l.a.createElement("span",Object.assign({unselectable:"on"},ge,{role:"button","aria-label":"Increase Value","aria-disabled":we,className:Oe}),X||l.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:n})),l.a.createElement("span",Object.assign({unselectable:"on"},_e,{role:"button","aria-label":"Decrease Value","aria-disabled":Ae,className:fe}),J||l.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:n}))),l.a.createElement("div",{className:"".concat(F,"-input-wrap")},l.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":ie,"aria-valuemax":Q,"aria-valuenow":Re,required:Be,type:Ne,placeholder:he,onPaste:$,onClick:Pe,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:ke,autoComplete:G,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Xe?this.onKeyDown:i,onKeyUp:Xe?this.onKeyUp:i,autoFocus:M,maxLength:ee,readOnly:te,disabled:H,max:Q,min:ie,step:Ye,name:N,title:Ee,id:ue,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(tt),pattern:Ue,inputMode:Ie,onInput:V},Me))))}}]),C}(l.a.Component);m.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:v,min:-v,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:t,required:!1,autoComplete:"off"};var g=m,E=We.a=g},fcSX:function($e,We,z){"use strict";var ae=z("Ff2n"),Z=z("1OyB"),U=z("vuIU"),w=z("Ji7U"),P=z("md7G"),S=z("foSv"),O=z("1W/9"),T=z("q1tI"),l=z("rePB"),p=z("JX7q"),h=z("TSYQ"),d=z.n(h),a=z("qx4F"),u=z("4IlW");function s(H){return Array.isArray(H)?H:[H]}var f={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},i=Object.keys(f).filter(function(H){if(typeof document=="undefined")return!1;var te=document.getElementsByTagName("html")[0];return H in(te?te.style:{})})[0],n=f[i];function t(H,te,j,G){H.addEventListener?H.addEventListener(te,j,G):H.attachEvent&&H.attachEvent("on".concat(te),j)}function c(H,te,j,G){H.removeEventListener?H.removeEventListener(te,j,G):H.attachEvent&&H.detachEvent("on".concat(te),j)}function y(H,te){var j=typeof H=="function"?H(te):H;return Array.isArray(j)?j.length===2?j:[j[0],j[1]]:[j]}var v=function(te){return!isNaN(parseFloat(te))&&isFinite(te)},_=!(typeof window!="undefined"&&window.document&&window.document.createElement),b=function H(te,j,G,X){if(!j||j===document||j instanceof Document)return!1;if(j===te.parentNode)return!0;var J=Math.max(Math.abs(G),Math.abs(X))===Math.abs(X),B=Math.max(Math.abs(G),Math.abs(X))===Math.abs(G),Q=j.scrollHeight-j.clientHeight,ie=j.scrollWidth-j.clientWidth,oe=document.defaultView.getComputedStyle(j),Ee=oe.overflowY==="auto"||oe.overflowY==="scroll",ye=oe.overflowX==="auto"||oe.overflowX==="scroll",Le=Q&&Ee,pe=ie&&ye;return J&&(!Le||Le&&(j.scrollTop>=Q&&X<0||j.scrollTop<=0&&X>0))||B&&(!pe||pe&&(j.scrollLeft>=ie&&G<0||j.scrollLeft<=0&&G>0))?H(te,j.parentNode,G,X):!1};function m(H){var te=g();return function(){var G=Object(S.a)(H),X;if(te){var J=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,J)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function g(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(H){return!1}}var E={},o=function(H){Object(w.a)(j,H);var te=m(j);function j(G){var X;return Object(Z.a)(this,j),X=te.call(this,G),X.domFocus=function(){X.dom&&X.dom.focus()},X.removeStartHandler=function(J){if(J.touches.length>1)return;X.startPos={x:J.touches[0].clientX,y:J.touches[0].clientY}},X.removeMoveHandler=function(J){if(J.changedTouches.length>1)return;var B=J.currentTarget,Q=J.changedTouches[0].clientX-X.startPos.x,ie=J.changedTouches[0].clientY-X.startPos.y;(B===X.maskDom||B===X.handlerDom||B===X.contentDom&&b(B,J.target,Q,ie))&&J.cancelable&&J.preventDefault()},X.transitionEnd=function(J){var B=J.target;c(B,n,X.transitionEnd),B.style.transition=""},X.onKeyDown=function(J){if(J.keyCode===u.a.ESC){var B=X.props.onClose;J.stopPropagation(),B&&B(J)}},X.onWrapperTransitionEnd=function(J){var B=X.props,Q=B.open,ie=B.afterVisibleChange;J.target===X.contentWrapper&&J.propertyName.match(/transform$/)&&(X.dom.style.transition="",!Q&&X.getCurrentDrawerSome()&&(document.body.style.overflowX="",X.maskDom&&(X.maskDom.style.left="",X.maskDom.style.width="")),ie&&ie(!!Q))},X.openLevelTransition=function(){var J=X.props,B=J.open,Q=J.width,ie=J.height,oe=X.getHorizontalBoolAndPlacementName(),Ee=oe.isHorizontal,ye=oe.placementName,Le=X.contentDom?X.contentDom.getBoundingClientRect()[Ee?"width":"height"]:0,pe=(Ee?Q:ie)||Le;X.setLevelAndScrolling(B,ye,pe)},X.setLevelTransform=function(J,B,Q,ie){var oe=X.props,Ee=oe.placement,ye=oe.levelMove,Le=oe.duration,pe=oe.ease,Ce=oe.showMask;X.levelDom.forEach(function(Be){Be.style.transition="transform ".concat(Le," ").concat(pe),t(Be,n,X.transitionEnd);var Pe=J?Q:0;if(ye){var ke=y(ye,{target:Be,open:J});Pe=J?ke[0]:ke[1]||0}var Ne=typeof Pe=="number"?"".concat(Pe,"px"):Pe,he=Ee==="left"||Ee==="top"?Ne:"-".concat(Ne);he=Ce&&Ee==="right"&&ie?"calc(".concat(he," + ").concat(ie,"px)"):he,Be.style.transform=Pe?"".concat(B,"(").concat(he,")"):""})},X.setLevelAndScrolling=function(J,B,Q){var ie=X.props.onChange;if(!_){var oe=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(a.a)(!0):0;X.setLevelTransform(J,B,Q,oe),X.toggleScrollingToDrawerAndBody(oe)}ie&&ie(J)},X.toggleScrollingToDrawerAndBody=function(J){var B=X.props,Q=B.getOpenCount,ie=B.getContainer,oe=B.showMask,Ee=B.open,ye=ie&&ie(),Le=Q&&Q();if(ye&&ye.parentNode===document.body&&oe){var pe=["touchstart"],Ce=[document.body,X.maskDom,X.handlerDom,X.contentDom];Ee&&document.body.style.overflow!=="hidden"?(J&&X.addScrollingEffect(J),Le===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",Ce.forEach(function(Be,Pe){if(!Be)return;t(Be,pe[Pe]||"touchmove",Pe?X.removeMoveHandler:X.removeStartHandler,X.passive)})):X.getCurrentDrawerSome()&&(Le||(document.body.style.overflow=""),document.body.style.touchAction="",J&&X.remScrollingEffect(J),Ce.forEach(function(Be,Pe){if(!Be)return;c(Be,pe[Pe]||"touchmove",Pe?X.removeMoveHandler:X.removeStartHandler,X.passive)}))}},X.addScrollingEffect=function(J){var B=X.props,Q=B.placement,ie=B.duration,oe=B.ease,Ee=B.getOpenCount,ye=B.switchScrollingEffect,Le=Ee&&Ee();Le===1&&ye();var pe="width ".concat(ie," ").concat(oe),Ce="transform ".concat(ie," ").concat(oe);X.dom.style.transition="none";switch(Q){case"right":X.dom.style.transform="translateX(-".concat(J,"px)");break;case"top":case"bottom":X.dom.style.width="calc(100% - ".concat(J,"px)"),X.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Ce,",").concat(pe),X.dom.style.width="",X.dom.style.transform="")})},X.remScrollingEffect=function(J){var B=X.props,Q=B.placement,ie=B.duration,oe=B.ease,Ee=B.getOpenCount,ye=B.switchScrollingEffect,Le=Ee&&Ee();Le||ye(!0),i&&(document.body.style.overflowX="hidden"),X.dom.style.transition="none";var pe,Ce="width ".concat(ie," ").concat(oe),Be="transform ".concat(ie," ").concat(oe);switch(Q){case"left":{X.dom.style.width="100%",Ce="width 0s ".concat(oe," ").concat(ie);break}case"right":{X.dom.style.transform="translateX(".concat(J,"px)"),X.dom.style.width="100%",Ce="width 0s ".concat(oe," ").concat(ie),X.maskDom&&(X.maskDom.style.left="-".concat(J,"px"),X.maskDom.style.width="calc(100% + ".concat(J,"px)"));break}case"top":case"bottom":{X.dom.style.width="calc(100% + ".concat(J,"px)"),X.dom.style.height="100%",X.dom.style.transform="translateZ(0)",pe="height 0s ".concat(oe," ").concat(ie);break}default:break}clearTimeout(X.timeout),X.timeout=setTimeout(function(){X.dom&&(X.dom.style.transition="".concat(Be,",").concat(pe?"".concat(pe,","):"").concat(Ce),X.dom.style.transform="",X.dom.style.width="",X.dom.style.height="")})},X.getCurrentDrawerSome=function(){return!Object.keys(E).some(function(J){return E[J]})},X.getLevelDom=function(J){var B=J.level,Q=J.getContainer;if(_)return;var ie=Q&&Q(),oe=ie?ie.parentNode:null;if(X.levelDom=[],B==="all"){var Ee=oe?Array.prototype.slice.call(oe.children):[];Ee.forEach(function(ye){ye.nodeName!=="SCRIPT"&&ye.nodeName!=="STYLE"&&ye.nodeName!=="LINK"&&ye!==ie&&X.levelDom.push(ye)})}else B&&s(B).forEach(function(ye){document.querySelectorAll(ye).forEach(function(Le){X.levelDom.push(Le)})})},X.getHorizontalBoolAndPlacementName=function(){var J=X.props.placement,B=J==="left"||J==="right",Q="translate".concat(B?"X":"Y");return{isHorizontal:B,placementName:Q}},X.state={_self:Object(p.a)(X)},X}return Object(U.a)(j,[{key:"componentDidMount",value:function(){var X=this;if(!_){var J=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return J=!0,null}}))}catch(Ee){}this.passive=J?{passive:!1}:!1}var B=this.props,Q=B.open,ie=B.getContainer,oe=ie&&ie();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),Q&&(oe&&oe.parentNode===document.body&&(E[this.drawerId]=Q),this.openLevelTransition(),this.forceUpdate(function(){X.domFocus()}))}},{key:"componentDidUpdate",value:function(X){var J=this.props,B=J.open,Q=J.getContainer,ie=Q&&Q();B!==X.open&&(B&&this.domFocus(),ie&&ie.parentNode===document.body&&(E[this.drawerId]=!!B),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var X=this.props,J=X.getOpenCount,B=X.open,Q=X.switchScrollingEffect,ie=typeof J=="function"&&J();delete E[this.drawerId],B&&(this.setLevelTransform(!1),document.body.style.touchAction=""),ie||(document.body.style.overflow="",Q(!0))}},{key:"render",value:function(){var X,J=this,B=this.props,Q=B.className,ie=B.children,oe=B.style,Ee=B.width,ye=B.height,Le=B.defaultOpen,pe=B.open,Ce=B.prefixCls,Be=B.placement,Pe=B.level,ke=B.levelMove,Ne=B.ease,he=B.duration,ue=B.getContainer,Ie=B.handler,Ue=B.onChange,Ye=B.afterVisibleChange,ee=B.showMask,M=B.maskClosable,N=B.maskStyle,$=B.onClose,V=B.onHandleClick,Y=B.keyboard,me=B.getOpenCount,Re=B.switchScrollingEffect,rt=Object(ae.a)(B,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),De=this.dom?pe:!1,Me=d()(Ce,(X={},Object(l.a)(X,"".concat(Ce,"-").concat(Be),!0),Object(l.a)(X,"".concat(Ce,"-open"),De),Object(l.a)(X,Q||"",!!Q),Object(l.a)(X,"no-mask",!ee),X)),Xe=this.getHorizontalBoolAndPlacementName(),tt=Xe.placementName,Ve=Be==="left"||Be==="top"?"-100%":"100%",Ke=De?"":"".concat(tt,"(").concat(Ve,")"),we=Ie&&T.cloneElement(Ie,{onClick:function(Oe){Ie.props.onClick&&Ie.props.onClick(),V&&V(Oe)},ref:function(Oe){J.handlerDom=Oe}});return T.createElement("div",Object.assign({},rt,{tabIndex:-1,className:Me,style:oe,ref:function(Oe){J.dom=Oe},onKeyDown:De&&Y?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),ee&&T.createElement("div",{className:"".concat(Ce,"-mask"),onClick:M?$:void 0,style:N,ref:function(Oe){J.maskDom=Oe}}),T.createElement("div",{className:"".concat(Ce,"-content-wrapper"),style:{transform:Ke,msTransform:Ke,width:v(Ee)?"".concat(Ee,"px"):Ee,height:v(ye)?"".concat(ye,"px"):ye},ref:function(Oe){J.contentWrapper=Oe}},T.createElement("div",{className:"".concat(Ce,"-content"),ref:function(Oe){J.contentDom=Oe},onTouchStart:De&&ee?this.removeStartHandler:void 0,onTouchMove:De&&ee?this.removeMoveHandler:void 0},ie),we))}}],[{key:"getDerivedStateFromProps",value:function(X,J){var B=J.prevProps,Q=J._self,ie={prevProps:X};if(B!==void 0){var oe=X.placement,Ee=X.level;oe!==B.placement&&(Q.contentDom=null),Ee!==B.level&&Q.getLevelDom(X)}return ie}}]),j}(T.Component);o.defaultProps={switchScrollingEffect:function(){}};var x=o;function C(H){var te=A();return function(){var G=Object(S.a)(H),X;if(te){var J=Object(S.a)(this).constructor;X=Reflect.construct(G,arguments,J)}else X=G.apply(this,arguments);return Object(P.a)(this,X)}}function A(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(H){return!1}}var D=function(H){Object(w.a)(j,H);var te=C(j);function j(G){var X;Object(Z.a)(this,j),X=te.call(this,G),X.onHandleClick=function(B){var Q=X.props,ie=Q.onHandleClick,oe=Q.open;if(ie&&ie(B),typeof oe=="undefined"){var Ee=X.state.open;X.setState({open:!Ee})}},X.onClose=function(B){var Q=X.props,ie=Q.onClose,oe=Q.open;ie&&ie(B),typeof oe=="undefined"&&X.setState({open:!1})};var J=typeof G.open!="undefined"?G.open:!!G.defaultOpen;return X.state={open:J},"onMaskClick"in G&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),X}return Object(U.a)(j,[{key:"render",value:function(){var X=this,J=this.props,B=J.defaultOpen,Q=J.getContainer,ie=J.wrapperClassName,oe=J.forceRender,Ee=J.handler,ye=Object(ae.a)(J,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Le=this.state.open;if(!Q)return T.createElement("div",{className:ie,ref:function(Be){X.dom=Be}},T.createElement(x,Object.assign({},ye,{open:Le,handler:Ee,getContainer:function(){return X.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var pe=!!Ee||oe;return T.createElement(O.a,{visible:Le,forceRender:pe,getContainer:Q,wrapperClassName:ie},function(Ce){var Be=Ce.visible,Pe=Ce.afterClose,ke=Object(ae.a)(Ce,["visible","afterClose"]);return T.createElement(x,Object.assign({},ye,ke,{open:Be!==void 0?Be:Le,afterVisibleChange:Pe!==void 0?Pe:ye.afterVisibleChange,handler:Ee,onClose:X.onClose,onHandleClick:X.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(X,J){var B=J.prevProps,Q={prevProps:X};return typeof B!="undefined"&&X.open!==B.open&&(Q.open=X.open),Q}}]),j}(T.Component);D.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:T.createElement("div",{className:"drawer-handle"},T.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var I=D,F=We.a=I},fcyK:function($e,We,z){},fyJ8:function($e,We,z){"use strict";var ae=z("rePB"),Z=z("VTBJ"),U=z("Ff2n"),w=z("U8pU"),P=z("q1tI"),S=z.n(P),O=z("TSYQ"),T=z.n(O),l=z("c+Xe"),p=z("sR1s");function h(f){return f&&Object(w.a)(f)==="object"&&!Array.isArray(f)&&!P.isValidElement(f)}function d(f){return typeof f=="string"?!0:Object(l.c)(f)}function a(f,i){var n,t=f.prefixCls,c=f.className,y=f.record,v=f.index,_=f.dataIndex,b=f.render,m=f.children,g=f.component,E=g===void 0?"td":g,o=f.colSpan,x=f.rowSpan,C=f.fixLeft,A=f.fixRight,D=f.firstFixLeft,I=f.lastFixLeft,F=f.firstFixRight,H=f.lastFixRight,te=f.appendNode,j=f.additionalProps,G=j===void 0?{}:j,X=f.ellipsis,J=f.align,B=f.rowType,Q=f.isSticky,ie="".concat(t,"-cell"),oe,Ee;if(m)Ee=m;else{var ye=Object(p.b)(y,_);if(Ee=ye,b){var Le=b(ye,y,v);h(Le)?(Ee=Le.children,oe=Le.props):Ee=Le}}Object(w.a)(Ee)==="object"&&!Array.isArray(Ee)&&!P.isValidElement(Ee)&&(Ee=null),X&&(I||F)&&(Ee=P.createElement("span",{className:"".concat(ie,"-content")},Ee));var pe=oe||{},Ce=pe.colSpan,Be=pe.rowSpan,Pe=pe.style,ke=pe.className,Ne=Object(U.a)(pe,["colSpan","rowSpan","style","className"]),he=Ce!==void 0?Ce:o,ue=Be!==void 0?Be:x;if(he===0||ue===0)return null;var Ie={},Ue=typeof C=="number",Ye=typeof A=="number";Ue&&(Ie.position="sticky",Ie.left=C),Ye&&(Ie.position="sticky",Ie.right=A);var ee={};J&&(ee.textAlign=J);var M,N=X===!0?{showTitle:!0}:X;N&&(N.showTitle||B==="header")&&(typeof Ee=="string"||typeof Ee=="number"?M=Ee.toString():P.isValidElement(Ee)&&typeof Ee.props.children=="string"&&(M=Ee.props.children));var $=Object(Z.a)(Object(Z.a)(Object(Z.a)({title:M},Ne),G),{},{colSpan:he&&he!==1?he:null,rowSpan:ue&&ue!==1?ue:null,className:T()(ie,c,(n={},Object(ae.a)(n,"".concat(ie,"-fix-left"),Ue),Object(ae.a)(n,"".concat(ie,"-fix-left-first"),D),Object(ae.a)(n,"".concat(ie,"-fix-left-last"),I),Object(ae.a)(n,"".concat(ie,"-fix-right"),Ye),Object(ae.a)(n,"".concat(ie,"-fix-right-first"),F),Object(ae.a)(n,"".concat(ie,"-fix-right-last"),H),Object(ae.a)(n,"".concat(ie,"-ellipsis"),X),Object(ae.a)(n,"".concat(ie,"-with-append"),te),Object(ae.a)(n,"".concat(ie,"-fix-sticky"),(Ue||Ye)&&Q),n),G.className,ke),style:Object(Z.a)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},G.style),ee),Ie),Pe),ref:d(E)?i:null});return P.createElement(E,Object.assign({},$),te,Ee)}var u=P.forwardRef(a);u.displayName="Cell";var s=P.memo(u,function(f,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,f.record):!1});We.a=s},gRFJ:function($e,We,z){$e.exports=[z("rdUC"),z("ynwM"),z("RELg"),z("DlR+"),z("CrYA"),z("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f($e){return $e<10?"0"+$e:$e}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote($e){return rx_escapable.lastIndex=0,rx_escapable.test($e)?'"'+$e.replace(rx_escapable,function(We){var z=meta[We];return typeof z=="string"?z:"\\u"+("0000"+We.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+$e+'"'}function str($e,We){var z,ae,Z,U,w=gap,P,S=We[$e];S&&typeof S=="object"&&typeof S.toJSON=="function"&&(S=S.toJSON($e)),typeof rep=="function"&&(S=rep.call(We,$e,S));switch(typeof S){case"string":return quote(S);case"number":return isFinite(S)?String(S):"null";case"boolean":case"null":return String(S);case"object":if(!S)return"null";if(gap+=indent,P=[],Object.prototype.toString.apply(S)==="[object Array]"){for(U=S.length,z=0;z0&&!this.paused&&!this.ended&&this.readyState>2}});function f(t,c){return t-c}function i(t){t.sort(f);for(var c=0,y=0;y1&&arguments[1]!==void 0?arguments[1]:!1,Oe={point:B.current.currentTime};$?(Oe.log_id=$,Oe.watch_duration=i(De),Oe.total_duration=M):(x?(Oe.video_id=parseInt(g,10),Oe.course_id=x):Oe.video_id=g,Oe.duration=ee,Oe.device=Ie),Ae&&(Oe.ed="1");function fe(){return ge.apply(this,arguments)}function ge(){return ge=Object(U.a)(P.a.mark(function _e(){var be;return P.a.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return Re=!0,qe.next=3,E(Oe);case 3:be=qe.sent,$=be,Re=!1,we&&we();case 7:case"end":return qe.stop()}},_e)})),ge.apply(this,arguments)}fe()},[g,x]);Object(S.useEffect)(function(){var we;Z.b.destroy();var Ae=null;return T.a.isSupported&&J&&b&&((we=b)===null||we===void 0?void 0:we.indexOf(".m3u8"))<0?(Ae=T.a.createPlayer({type:"flv",volume:.8,cors:!0,url:b,muted:!1}),B.current&&(Ae.attachMediaElement(B.current),Ae.load())):B.current.setAttribute("src",b),tt(),function(){Ae&&(Ae.unload(),Ae.pause(),Ae.destroy(),Ae=null)}},[B,J,b]);function Xe(){B.current.paused?(oe.current.style.display="none",Ee.current.style.display="block"):(oe.current.style.display="block",Ee.current.style.display="none")}function tt(){Pe.current.style.display="none",Ne.current.style.display="none",ke.current.style.display="none",B.current.muted||B.current.volume===0?Pe.current.style.display="block":B.current.volume>0&&B.current.volume<=.5?Ne.current.style.display="block":ke.current.style.display="block"}Object(S.useEffect)(function(){var we=document.getElementById("play"),Ae=document.querySelectorAll(".playback-icons use");function Oe(){F(),C&&!Ue.current&&(B.current.currentTime=C),Ue.current=!0,De.push(B.current.currentTime),V||(V=!0,m&&Me())}function fe(){return ge.apply(this,arguments)}function ge(){return ge=Object(U.a)(P.a.mark(function Qe(){return P.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:Xe(),De.push(B.current.currentTime),m&&Me(function(){$=null,N=0,V=!1,Re=!1,rt=!1,De=[],M=0,me=1},!0);case 3:case"end":return je.stop()}},Qe)})),ge.apply(this,arguments)}function _e(){ye.current.value=Math.floor(B.current.currentTime),Le.current.value=Math.floor(B.current.currentTime)}function be(){var Qe=s(Math.round(B.current.currentTime));Ce.current.innerText="".concat(Qe.minutes,":").concat(Qe.seconds),Ce.current.setAttribute("datetime","".concat(Qe.minutes,"m ").concat(Qe.seconds,"s"))}function Ge(){var Qe=Math.round(B.current.duration);ye.current.setAttribute("max",Qe),Le.current.setAttribute("max",Qe);var Te=s(Qe);pe.current.innerText="".concat(Te.minutes,":").concat(Te.seconds),pe.current.setAttribute("datetime","".concat(Te.minutes,"m ").concat(Te.seconds,"s"))}function qe(){var Qe=Math.round(B.current.duration);ye.current.setAttribute("max",Qe),Le.current.setAttribute("max",Qe);var Te=s(Qe);pe.current.innerText="".concat(Te.minutes,":").concat(Te.seconds),pe.current.setAttribute("datetime","".concat(Te.minutes,"m ").concat(Te.seconds,"s")),_e(),be();var je=Q.current.getBoundingClientRect(),dt=je.width,Ze=je.height,Tt=je.x,Ct=je.y;if(Tt<0||Ct<0||!dt)return;if(!rt){var ot=B.current.currentTime,gt=ot-N;Math.abs(gt)<10?(M+=Math.abs(gt),N=ot,Re||M-me*Y>=0&&(me++,De.push(N),m&&Me())):(N=ot,m&&Me())}}function pt(){rt=!0}function Dt(){B.current.playing&&De.push(B.current.currentTime,N),N=B.current.currentTime,rt=!1}function jt(){ee=B.current.duration,ee<=20&&(Y=ee/3),B.current.addEventListener("play",Oe)}function Rt(Qe){Qe.preventDefault(),Object(d.a)()?(B.current.style.width="100%",B.current.style.height="100%"):B.current.style.cssText=""}function Lt(){D()}function lt(Qe){var Te=Qe.target.dataset.seek?Qe.target.dataset.seek:Qe.target.value;B.current.currentTime=Te,Le.current.value=Te,ye.current.value=Te}function ft(Qe){var Te=Math.round(Qe.offsetX/Qe.target.clientWidth*parseInt(Qe.target.getAttribute("max"),10));ye.current.setAttribute("data-seek",Te);var je=s(Te);Be.current.textContent="".concat(je.minutes,":").concat(je.seconds);var dt=B.current.getBoundingClientRect();Be.current.style.left="".concat(Qe.pageX-dt.left,"px")}return ie.current.addEventListener(Object(d.c)(),Rt),B.current.addEventListener("canplay",jt),B.current.addEventListener("ended",fe),B.current.addEventListener("seeking",pt),B.current.addEventListener("seeked",Dt),B.current.addEventListener("loadedmetadata",Ge),ye.current.addEventListener("mousemove",ft),ye.current.addEventListener("input",lt),B.current.addEventListener("timeupdate",qe),B.current.addEventListener("pause",Lt),B.current.addEventListener("volumechange",tt),function(){B.current.removeEventListener("canplay",jt),B.current.removeEventListener("play",Oe),B.current.removeEventListener("ended",fe),B.current.removeEventListener("seeking",pt),B.current.removeEventListener("seeked",Dt),ye.current.removeEventListener("mousemove",ft),ye.current.removeEventListener("input",lt),B.current.removeEventListener("timeupdate",qe),B.current.removeEventListener("pause",Lt),B.current.removeEventListener("loadedmetadata",Ge),B.current.removeEventListener("volumechange",tt),B.current.playing&&(De.push(N,B.current.currentTime),m&&Me())}},[B,b]),Object(S.useEffect)(function(){var we;if(B.current.onended=function(){te(B)},B.current.oncontextmenu=function(){return!1},((we=b)===null||we===void 0?void 0:we.indexOf(".m3u8"))>-1){if(B.current.canPlayType("application/vnd.apple.mpegurl"))B.current.src=b;else if(p.a.isSupported()){var Ae=new p.a;Ae.loadSource(b),Ae.attachMedia(B.current)}}},[b]),Object(S.useEffect)(function(){B.current.playbackRate=G},[G]);var Ve=function(){B.current.paused||B.current.ended?B.current.play():B.current.pause(),Xe()};function Ke(){B.current.muted=!B.current.muted,B.current.muted?(he.current.setAttribute("data-volume",volume.value),he.current.value=0):he.current.value=he.current.dataset.volume}return O.a.createElement("div",{style:{position:"relative"},ref:ie},O.a.createElement("div",{ref:Q,className:"".concat(u.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(u.a.animate__loop)},Ye?Ye.login:" "),O.a.createElement("div",{className:u.a.container},O.a.createElement("div",{className:u.a["video-container"],id:"video-container"},O.a.createElement("div",{className:u.a["playback-animation"],id:"playback-animation"},O.a.createElement("svg",{className:u.a["playback-icons"]},O.a.createElement("use",{className:"hidden",href:"#play-icon"}),O.a.createElement("use",{href:"#pause"}))),O.a.createElement("video",{className:u.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:B,autoPlay:!1}),O.a.createElement("div",{className:"".concat(u.a["video-controls"]," "),id:"video-controls"},O.a.createElement("div",{className:u.a["bottom-controls"]},O.a.createElement("div",{className:u.a["left-controls"]},O.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ve},O.a.createElement("svg",{className:u.a["playback-icons"]},O.a.createElement("use",{ref:Ee,href:"#play-icon"}),O.a.createElement("use",{ref:oe,style:{display:"none"},href:"#pause"}))),O.a.createElement("div",{className:u.a.time},O.a.createElement("time",{id:"time-elapsed",ref:Ce},"00:00"),O.a.createElement("span",null," / "),O.a.createElement("time",{id:"duration",ref:pe},"00:00"))),O.a.createElement("div",{className:u.a["right-controls"]},O.a.createElement("div",{className:u.a["volume-controls"]},O.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:u.a["volume-button"],id:"volume-button",onClick:Ke},O.a.createElement("svg",null,O.a.createElement("use",{ref:Pe,href:"#volume-mute"}),O.a.createElement("use",{ref:Ne,href:"#volume-low"}),O.a.createElement("use",{ref:ke,href:"#volume-high"}))),O.a.createElement("input",{className:u.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:he,style:{display:"none"},onClick:tt})),O.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:u.a["fullscreen-button"],onClick:function(){Object(d.a)()?Object(d.b)():Object(d.d)(ie.current)}},O.a.createElement("svg",null,O.a.createElement("use",{href:"#fullscreen"}),O.a.createElement("use",{href:"#fullscreen-exit",className:"hidden"}))))),O.a.createElement("div",{className:u.a["video-progress"]},O.a.createElement("progress",{ref:Le,value:"0",min:"0"}),O.a.createElement("input",{className:u.a.seek,ref:ye,value:"0",min:"0",type:"range",step:"1"}),O.a.createElement("div",{className:u.a["seek-tooltip"],ref:Be,id:"seek-tooltip"},"00:00"))))),O.a.createElement("svg",{style:{display:"none"}},O.a.createElement("defs",null,O.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),O.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),O.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),O.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),O.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),O.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),O.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),O.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},O.a.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},i3hx:function($e,We,z){},je13:function($e,We,z){var ae=z("5nXd"),Z=z("gRFJ"),U=[z("uQRt")];$e.exports=ae.createStore(Z,U)},kSUc:function($e,We,z){},"kaH+":function($e,We,z){"use strict";var ae=z("+L6B"),Z=z("2/Rp"),U=z("tJVT"),w=z("q1tI"),P=z.n(w),S=z("UZu5"),O=z.n(S),T=z("dhSg"),l=z("rLCj"),p=z("dF/Y"),h=z("4i/N");We.a=function(){var d=Object(w.useState)(""),a=Object(U.a)(d,2),u=a[0],s=a[1],f=Object(w.useState)(0),i=Object(U.a)(f,2),n=i[0],t=i[1],c=Object(w.useRef)("");Object(w.useEffect)(function(){var b=T.a.subscribe("preview-image",function(m){s(m),document.body.style.overflow="hidden"});return b},[]),Object(w.useEffect)(function(){return document.addEventListener("keydown",y),function(){document.removeEventListener("keydown",y)}},[]),Object(w.useEffect)(function(){c.current=u},[u]);function y(b){b.keyCode==27&&c.current&&v()}function v(){document.body.style.overflow="auto",s("")}function _(){t(n+90)}return P.a.createElement(w.Fragment,null,u?P.a.createElement("div",{className:"image-preview-container"},P.a.createElement("div",{className:"button-group"},P.a.createElement(Z.a,{onClick:_},"\u65CB\u8F6C",P.a.createElement(l.a,null)),P.a.createElement(Z.a,{href:u},"\u4E0B\u8F7D",P.a.createElement(p.a,null)),P.a.createElement(Z.a,{onClick:v},"\u5173\u95ED",P.a.createElement(h.a,null))),P.a.createElement("div",{className:"preview-wrp-group"},P.a.createElement("img",{className:"image-preview",src:u,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(n,"deg)")}}))):null)}},kovY:function($e,We,z){$e.exports=z.p+"static/e.eabfa286.svg"},lOMy:function($e,We,z){},lZu9:function($e,We,z){(function(ae){ae(z("VrN/"),z("1eCo"),z("8EBN"))})(function(ae){"use strict";ae.defineMode("markdown",function(Z,U){var w=ae.getMode(Z,"text/html"),P=w.name=="null";function S(j){if(ae.findModeByName){var G=ae.findModeByName(j);G&&(j=G.mime||G.mimes[0])}var X=ae.getMode(Z,j);return X.name=="null"?null:X}U.highlightFormatting===void 0&&(U.highlightFormatting=!1),U.maxBlockquoteDepth===void 0&&(U.maxBlockquoteDepth=0),U.taskLists===void 0&&(U.taskLists=!1),U.strikethrough===void 0&&(U.strikethrough=!1),U.emoji===void 0&&(U.emoji=!1),U.fencedCodeBlockHighlighting===void 0&&(U.fencedCodeBlockHighlighting=!0),U.fencedCodeBlockDefaultMode===void 0&&(U.fencedCodeBlockDefaultMode="text/plain"),U.xml===void 0&&(U.xml=!0),U.tokenTypeOverrides===void 0&&(U.tokenTypeOverrides={});var O={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var T in O)O.hasOwnProperty(T)&&U.tokenTypeOverrides[T]&&(O[T]=U.tokenTypeOverrides[T]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,h=/^\[(x| )\](?=\s)/i,d=U.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,a=/^ {0,3}(?:\={1,}|-{2,})\s*$/,u=/^[^#!\[\]*_\\<>` "'(~:]+/,s=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,i=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,n=" ";function t(j,G,X){return G.f=G.inline=X,X(j,G)}function c(j,G,X){return G.f=G.block=X,X(j,G)}function y(j){return!j||!/\S/.test(j.string)}function v(j){if(j.linkTitle=!1,j.linkHref=!1,j.linkText=!1,j.em=!1,j.strong=!1,j.strikethrough=!1,j.quote=0,j.indentedCode=!1,j.f==b){var G=P;if(!G){var X=ae.innerMode(w,j.htmlState);G=X.mode.name=="xml"&&X.state.tagStart===null&&!X.state.context&&X.state.tokenize.isInText}G&&(j.f=o,j.block=_,j.htmlState=null)}return j.trailingSpace=0,j.trailingSpaceNewLine=!1,j.prevLine=j.thisLine,j.thisLine={stream:null},null}function _(j,G){var X=j.column()===G.indentation,J=y(G.prevLine.stream),B=G.indentedCode,Q=G.prevLine.hr,ie=G.list!==!1,oe=(G.listStack[G.listStack.length-1]||0)+3;G.indentedCode=!1;var Ee=G.indentation;if(G.indentationDiff===null&&(G.indentationDiff=G.indentation,ie)){for(G.list=null;Ee=4&&(B||G.prevLine.fencedCodeEnd||G.prevLine.header||J))return j.skipToEnd(),G.indentedCode=!0,O.code;if(j.eatSpace())return null;if(X&&G.indentation<=oe&&(pe=j.match(d))&&pe[1].length<=6)return G.quote=0,G.header=pe[1].length,G.thisLine.header=!0,U.highlightFormatting&&(G.formatting="header"),G.f=G.inline,g(G);if(G.indentation<=oe&&j.eat(">"))return G.quote=X?1:G.quote+1,U.highlightFormatting&&(G.formatting="quote"),j.eatSpace(),g(G);if(!Le&&!G.setext&&X&&G.indentation<=oe&&(pe=j.match(p))){var Ce=pe[1]?"ol":"ul";return G.indentation=Ee+j.current().length,G.list=!0,G.quote=0,G.listStack.push(G.indentation),G.em=!1,G.strong=!1,G.code=!1,G.strikethrough=!1,U.taskLists&&j.match(h,!1)&&(G.taskList=!0),G.f=G.inline,U.highlightFormatting&&(G.formatting=["list","list-"+Ce]),g(G)}else{if(X&&G.indentation<=oe&&(pe=j.match(s,!0)))return G.quote=0,G.fencedEndRE=new RegExp(pe[1]+"+ *$"),G.localMode=U.fencedCodeBlockHighlighting&&S(pe[2]||U.fencedCodeBlockDefaultMode),G.localMode&&(G.localState=ae.startState(G.localMode)),G.f=G.block=m,U.highlightFormatting&&(G.formatting="code-block"),G.code=-1,g(G);if(G.setext||(!ye||!ie)&&!G.quote&&G.list===!1&&!G.code&&!Le&&!f.test(j.string)&&(pe=j.lookAhead(1))&&(pe=pe.match(a)))return G.setext?(G.header=G.setext,G.setext=0,j.skipToEnd(),U.highlightFormatting&&(G.formatting="header")):(G.header=pe[0].charAt(0)=="="?1:2,G.setext=G.header),G.thisLine.header=!0,G.f=G.inline,g(G);if(Le)return j.skipToEnd(),G.hr=!0,G.thisLine.hr=!0,O.hr;if(j.peek()==="[")return t(j,G,I)}return t(j,G,G.inline)}function b(j,G){var X=w.token(j,G.htmlState);if(!P){var J=ae.innerMode(w,G.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||G.md_inside&&j.current().indexOf(">")>-1)&&(G.f=o,G.block=_,G.htmlState=null)}return X}function m(j,G){var X=G.listStack[G.listStack.length-1]||0,J=G.indentation=j.quote?G.push(O.formatting+"-"+j.formatting[X]+"-"+j.quote):G.push("error"))}if(j.taskOpen)return G.push("meta"),G.length?G.join(" "):null;if(j.taskClosed)return G.push("property"),G.length?G.join(" "):null;if(j.linkHref?G.push(O.linkHref,"url"):(j.strong&&G.push(O.strong),j.em&&G.push(O.em),j.strikethrough&&G.push(O.strikethrough),j.emoji&&G.push(O.emoji),j.linkText&&G.push(O.linkText),j.code&&G.push(O.code),j.image&&G.push(O.image),j.imageAltText&&G.push(O.imageAltText,"link"),j.imageMarker&&G.push(O.imageMarker)),j.header&&G.push(O.header,O.header+"-"+j.header),j.quote&&(G.push(O.quote),!U.maxBlockquoteDepth||U.maxBlockquoteDepth>=j.quote?G.push(O.quote+"-"+j.quote):G.push(O.quote+"-"+U.maxBlockquoteDepth)),j.list!==!1){var J=(j.listStack.length-1)%3;J?J===1?G.push(O.list2):G.push(O.list3):G.push(O.list1)}return j.trailingSpaceNewLine?G.push("trailing-space-new-line"):j.trailingSpace&&G.push("trailing-space-"+(j.trailingSpace%2?"a":"b")),G.length?G.join(" "):null}function E(j,G){return j.match(u,!0)?g(G):void 0}function o(j,G){var X=G.text(j,G);if(typeof X!="undefined")return X;if(G.list)return G.list=null,g(G);if(G.taskList){var J=j.match(h,!0)[1]===" ";return J?G.taskOpen=!0:G.taskClosed=!0,U.highlightFormatting&&(G.formatting="task"),G.taskList=!1,g(G)}if(G.taskOpen=!1,G.taskClosed=!1,G.header&&j.match(/^#+$/,!0))return U.highlightFormatting&&(G.formatting="header"),g(G);var B=j.next();if(G.linkTitle){G.linkTitle=!1;var Q=B;B==="("&&(Q=")"),Q=(Q+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ie="^\\s*(?:[^"+Q+"\\\\]+|\\\\\\\\|\\\\.)"+Q;if(j.match(new RegExp(ie),!0))return O.linkHref}if(B==="`"){var oe=G.formatting;U.highlightFormatting&&(G.formatting="code"),j.eatWhile("`");var Ee=j.current().length;if(G.code==0&&(!G.quote||Ee==1))return G.code=Ee,g(G);if(Ee==G.code){var ye=g(G);return G.code=0,ye}else return G.formatting=oe,g(G)}else if(G.code)return g(G);if(B==="\\"&&(j.next(),U.highlightFormatting)){var Le=g(G),pe=O.formatting+"-escape";return Le?Le+" "+pe:pe}if(B==="!"&&j.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return G.imageMarker=!0,G.image=!0,U.highlightFormatting&&(G.formatting="image"),g(G);if(B==="["&&G.imageMarker&&j.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return G.imageMarker=!1,G.imageAltText=!0,U.highlightFormatting&&(G.formatting="image"),g(G);if(B==="]"&&G.imageAltText){U.highlightFormatting&&(G.formatting="image");var Le=g(G);return G.imageAltText=!1,G.image=!1,G.inline=G.f=C,Le}if(B==="["&&!G.image)return G.linkText&&j.match(/^.*?\]/)||(G.linkText=!0,U.highlightFormatting&&(G.formatting="link")),g(G);if(B==="]"&&G.linkText){U.highlightFormatting&&(G.formatting="link");var Le=g(G);return G.linkText=!1,G.inline=G.f=j.match(/\(.*?\)| ?\[.*?\]/,!1)?C:o,Le}if(B==="<"&&j.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Le=g(G);return Le?Le+=" ":Le="",Le+O.linkInline}if(B==="<"&&j.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){G.f=G.inline=x,U.highlightFormatting&&(G.formatting="link");var Le=g(G);return Le?Le+=" ":Le="",Le+O.linkEmail}if(U.xml&&B==="<"&&j.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Ce=j.string.indexOf(">",j.pos);if(Ce!=-1){var Be=j.string.substring(j.start,Ce);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Be)&&(G.md_inside=!0)}return j.backUp(1),G.htmlState=ae.startState(w),c(j,G,b)}if(U.xml&&B==="<"&&j.match(/^\/\w*?>/))return G.md_inside=!1,"tag";if(B==="*"||B==="_"){for(var Pe=1,ke=j.pos==1?" ":j.string.charAt(j.pos-2);Pe<3&&j.eat(B);)Pe++;var Ne=j.peek()||" ",he=!/\s/.test(Ne)&&(!i.test(Ne)||/\s/.test(ke)||i.test(ke)),ue=!/\s/.test(ke)&&(!i.test(ke)||/\s/.test(Ne)||i.test(Ne)),Ie=null,Ue=null;if(Pe%2&&(!G.em&&he&&(B==="*"||!ue||i.test(ke))?Ie=!0:G.em==B&&ue&&(B==="*"||!he||i.test(Ne))&&(Ie=!1)),Pe>1&&(!G.strong&&he&&(B==="*"||!ue||i.test(ke))?Ue=!0:G.strong==B&&ue&&(B==="*"||!he||i.test(Ne))&&(Ue=!1)),Ue!=null||Ie!=null){U.highlightFormatting&&(G.formatting=Ie==null?"strong":Ue==null?"em":"strong em"),Ie===!0&&(G.em=B),Ue===!0&&(G.strong=B);var ye=g(G);return Ie===!1&&(G.em=!1),Ue===!1&&(G.strong=!1),ye}}else if(B===" "&&(j.eat("*")||j.eat("_"))){if(j.peek()===" ")return g(G);j.backUp(1)}if(U.strikethrough){if(B==="~"&&j.eatWhile(B)){if(G.strikethrough){U.highlightFormatting&&(G.formatting="strikethrough");var ye=g(G);return G.strikethrough=!1,ye}else if(j.match(/^[^\s]/,!1))return G.strikethrough=!0,U.highlightFormatting&&(G.formatting="strikethrough"),g(G)}else if(B===" "&&j.match(/^~~/,!0)){if(j.peek()===" ")return g(G);j.backUp(2)}}if(U.emoji&&B===":"&&j.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){G.emoji=!0,U.highlightFormatting&&(G.formatting="emoji");var Ye=g(G);return G.emoji=!1,Ye}return B===" "&&(j.match(/^ +$/,!1)?G.trailingSpace++:G.trailingSpace&&(G.trailingSpaceNewLine=!0)),g(G)}function x(j,G){var X=j.next();if(X===">"){G.f=G.inline=o,U.highlightFormatting&&(G.formatting="link");var J=g(G);return J?J+=" ":J="",J+O.linkInline}return j.match(/^[^>]+/,!0),O.linkInline}function C(j,G){if(j.eatSpace())return null;var X=j.next();return X==="("||X==="["?(G.f=G.inline=D(X==="("?")":"]"),U.highlightFormatting&&(G.formatting="link-string"),G.linkHref=!0,g(G)):"error"}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(j){return function(G,X){var J=G.next();if(J===j){X.f=X.inline=o,U.highlightFormatting&&(X.formatting="link-string");var B=g(X);return X.linkHref=!1,B}return G.match(A[j]),X.linkHref=!0,g(X)}}function I(j,G){return j.match(/^([^\]\\]|\\.)*\]:/,!1)?(G.f=F,j.next(),U.highlightFormatting&&(G.formatting="link"),G.linkText=!0,g(G)):t(j,G,o)}function F(j,G){if(j.match(/^\]:/,!0)){G.f=G.inline=H,U.highlightFormatting&&(G.formatting="link");var X=g(G);return G.linkText=!1,X}return j.match(/^([^\]\\]|\\.)+/,!0),O.linkText}function H(j,G){return j.eatSpace()?null:(j.match(/^[^\s]+/,!0),j.peek()===void 0?G.linkTitle=!0:j.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),G.f=G.inline=o,O.linkHref+" url")}var te={startState:function(){return{f:_,prevLine:{stream:null},thisLine:{stream:null},block:_,htmlState:null,indentation:0,inline:o,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(j){return{f:j.f,prevLine:j.prevLine,thisLine:j.thisLine,block:j.block,htmlState:j.htmlState&&ae.copyState(w,j.htmlState),indentation:j.indentation,localMode:j.localMode,localState:j.localMode?ae.copyState(j.localMode,j.localState):null,inline:j.inline,text:j.text,formatting:!1,linkText:j.linkText,linkTitle:j.linkTitle,linkHref:j.linkHref,code:j.code,em:j.em,strong:j.strong,strikethrough:j.strikethrough,emoji:j.emoji,header:j.header,setext:j.setext,hr:j.hr,taskList:j.taskList,list:j.list,listStack:j.listStack.slice(0),quote:j.quote,indentedCode:j.indentedCode,trailingSpace:j.trailingSpace,trailingSpaceNewLine:j.trailingSpaceNewLine,md_inside:j.md_inside,fencedEndRE:j.fencedEndRE}},token:function(j,G){if(G.formatting=!1,j!=G.thisLine.stream){if(G.header=0,G.hr=!1,j.match(/^\s*$/,!0))return v(G),null;if(G.prevLine=G.thisLine,G.thisLine={stream:j},G.taskList=!1,G.trailingSpace=0,G.trailingSpaceNewLine=!1,!G.localState&&(G.f=G.block,G.f!=b)){var X=j.match(/^\s*/,!0)[0].replace(/\t/g,n).length;if(G.indentation=X,G.indentationDiff=null,X>0)return null}}return G.f(j,G)},innerMode:function(j){return j.block==b?{state:j.htmlState,mode:w}:j.localState?{state:j.localState,mode:j.localMode}:{state:j,mode:te}},indent:function(j,G,X){return j.block==b&&w.indent?w.indent(j.htmlState,G,X):j.localState&&j.localMode.indent?j.localMode.indent(j.localState,G,X):ae.Pass},blankLine:v,getType:g,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return te},"xml"),ae.defineMIME("text/markdown","markdown"),ae.defineMIME("text/x-markdown","markdown")})},n6Qo:function($e,We,z){"use strict";z.d(We,"a",function(){return T});var ae=z("q1tI"),Z=z("biw7"),U=z("fyJ8");function w(l){var p=l.className,h=l.index,d=l.children,a=l.colSpan,u=l.rowSpan,s=ae.useContext(Z.a),f=s.prefixCls,i=s.fixedInfoList,n=i[h];return ae.createElement(U.a,Object.assign({className:p,index:h,component:"td",prefixCls:f,record:null,dataIndex:null,render:function(){return{children:d,props:{colSpan:a,rowSpan:u}}}},n))}function P(l){return ae.createElement("tr",Object.assign({},l))}function S(l){var p=l.children,h=ae.useContext(Z.a),d=h.prefixCls;return ae.createElement("tfoot",{className:"".concat(d,"-summary")},p)}var O=We.b=S,T={Cell:w,Row:P}},nCk5:function($e,We,z){$e.exports=z.p+"static/d.53bf6ae3.svg"},nWbc:function($e,We,z){},oE5q:function($e,We,z){$e.exports=z.p+"static/t.0b94c5c3.svg"},oFv4:function($e,We,z){$e.exports=z.p+"static/internal.da228387.png"},osHv:function($e,We,z){(function(ae){ae(z("VrN/"))})(function(ae){"use strict";var Z=ae.Pos;function U(i,n){return i.line-n.line||i.ch-n.ch}var w="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",P=w+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",S=new RegExp("<(/?)(["+w+"]["+P+"]*)","g");function O(i,n,t,c){this.line=n,this.ch=t,this.cm=i,this.text=i.getLine(n),this.min=c?Math.max(c.from,i.firstLine()):i.firstLine(),this.max=c?Math.min(c.to-1,i.lastLine()):i.lastLine()}function T(i,n){var t=i.cm.getTokenTypeAt(Z(i.line,n));return t&&/\btag\b/.test(t)}function l(i){return i.line>=i.max?void 0:(i.ch=0,i.text=i.cm.getLine(++i.line),!0)}function p(i){return i.line<=i.min?void 0:(i.text=i.cm.getLine(--i.line),i.ch=i.text.length,!0)}function h(i){for(;;){var n=i.text.indexOf(">",i.ch);if(n==-1){if(l(i))continue;return}if(!T(i,n+1)){i.ch=n+1;continue}var t=i.text.lastIndexOf("/",n),c=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,c?"selfClose":"regular"}}function d(i){for(;;){var n=i.ch?i.text.lastIndexOf("<",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}S.lastIndex=n,i.ch=n;var t=S.exec(i.text);if(t&&t.index==n)return t}}function a(i){for(;;){S.lastIndex=i.ch;var n=S.exec(i.text);if(!n){if(l(i))continue;return}if(!T(i,n.index+1)){i.ch=n.index+1;continue}return i.ch=n.index+n[0].length,n}}function u(i){for(;;){var n=i.ch?i.text.lastIndexOf(">",i.ch-1):-1;if(n==-1){if(p(i))continue;return}if(!T(i,n+1)){i.ch=n;continue}var t=i.text.lastIndexOf("/",n),c=t>-1&&!/\S/.test(i.text.slice(t+1,n));return i.ch=n+1,c?"selfClose":"regular"}}function s(i,n){for(var t=[];;){var c=a(i),y,v=i.line,_=i.ch-(c?c[0].length:0);if(!c||!(y=h(i)))return;if(y=="selfClose")continue;if(c[1]){for(var b=t.length-1;b>=0;--b)if(t[b]==c[2]){t.length=b;break}if(b<0&&(!n||n==c[2]))return{tag:c[2],from:Z(v,_),to:Z(i.line,i.ch)}}else t.push(c[2])}}function f(i,n){for(var t=[];;){var c=u(i);if(!c)return;if(c=="selfClose"){d(i);continue}var y=i.line,v=i.ch,_=d(i);if(!_)return;if(_[1])t.push(_[2]);else{for(var b=t.length-1;b>=0;--b)if(t[b]==_[2]){t.length=b;break}if(b<0&&(!n||n==_[2]))return{tag:_[2],from:Z(i.line,i.ch),to:Z(y,v)}}}}ae.registerHelper("fold","xml",function(i,n){for(var t=new O(i,n.line,0);;){var c=a(t);if(!c||t.line!=n.line)return;var y=h(t);if(!y)return;if(!c[1]&&y!="selfClose"){var v=Z(t.line,t.ch),_=s(t,c[2]);return _&&U(_.from,v)>0?{from:v,to:_.from}:null}}}),ae.findMatchingTag=function(i,n,t){var c=new O(i,n.line,n.ch,t);if(c.text.indexOf(">")==-1&&c.text.indexOf("<")==-1)return;var y=h(c),v=y&&Z(c.line,c.ch),_=y&&d(c);if(!y||!_||U(c,n)>0)return;var b={from:Z(c.line,c.ch),to:v,tag:_[2]};return y=="selfClose"?{open:b,close:null,at:"open"}:_[1]?{open:f(c,_[2]),close:b,at:"close"}:(c=new O(i,v.line,v.ch,t),{open:b,close:s(c,_[2]),at:"open"})},ae.findEnclosingTag=function(i,n,t,c){for(var y=new O(i,n.line,n.ch,t);;){var v=f(y,c);if(!v)break;var _=new O(i,n.line,n.ch,t),b=s(_,v.tag);if(b)return{open:v,close:b}}},ae.scanForClosingTag=function(i,n,t,c){var y=new O(i,n.line,n.ch,c?{from:0,to:c}:null);return s(y,t)}})},p5ED:function($e,We,z){"use strict";var ae=z("+L6B"),Z=z("2/Rp"),U=z("5Dmo"),w=z("3S7+"),P=z("k1fw"),S=z("tJVT"),O=z("q1tI"),T=z.n(O),l=z("vHTk"),p=z.n(l),h=z("yEEn"),d=z("ZW9T"),a=z("1vsH");We.a=function(u){var s=u.name,f=u.data,i=u.theme,n=u.type,t=u.filename,c=u.monacoEditor,y=u.className,v=u.style,_=u.close,b=u.onClose,m=u.hasMask,g=Object(O.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),E=Object(S.a)(g,2),o=E[0],x=E[1],C=Object(O.useState)(""),A=Object(S.a)(C,2),D=A[0],I=A[1],F=Object(O.useRef)();t&&(c.filename=t),Object(O.useEffect)(function(){var j,G,X=(j=document.cookie)===null||j===void 0||((G=j.replace(/\s/g,""))===null||G===void 0)?void 0:G.split(";");X==null||X.map(function(J){var B=J.split("=");B[0]==="_educoder_session"&&I(B[1])})},[]);var H=function(){if(f.startsWith("http")||f.startsWith("/")){te();return}Object(a.x)(t||"educoder",f,t)},te=function(){Object(a.v)(t||s,f)};return console.log("data:",f,"fileanme:",t," name:",s),T.a.createElement("div",{style:Object(P.a)({},v||{}),className:"".concat(m&&p.a.bgBlack," ").concat(n?p.a.wrp:"hide")},_&&T.a.createElement("div",{className:p.a.close,ref:F},T.a.createElement(w.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},T.a.createElement("span",{onClick:te},T.a.createElement("i",{className:"icon-quxiaozhiding"}))),T.a.createElement(w.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},T.a.createElement("span",{className:"",onClick:b},T.a.createElement("i",{className:"icon-guanbi1"})))),T.a.createElement("div",{className:"".concat(p.a[y]," ").concat(y," ").concat(p.a.monaco," ").concat(n==="txt"?"show":"hide")},n==="txt"&&T.a.createElement(d.b,c)),n==="audio"&&T.a.createElement("audio",{src:"".concat(f!=null&&f.startsWith("/")||(f==null?void 0:f.indexOf("https://"))>-1?f:"data:audio/mp3;base64,").concat(f),autoPlay:!0}),n==="video"&&T.a.createElement(T.a.Fragment,null,f!=null&&f.startsWith("/")?T.a.createElement("video",{controls:!0,src:"".concat(f),autoPlay:!0}):T.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(f),autoPlay:!0})),n==="pdf"&&T.a.createElement("embed",{className:p.a.embed,src:f}),n==="image"&&T.a.createElement(T.a.Fragment,null,T.a.createElement("img",{src:"".concat(f!=null&&f.startsWith("/")||(f==null?void 0:f.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(f)})),n==="other"&&T.a.createElement("div",null,T.a.createElement(Z.a,{type:"primary",size:"large",onClick:H},T.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(n==="download"||n==="office")&&T.a.createElement(Z.a,{type:"primary",size:"large",onClick:H},T.a.createElement(h.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function($e,We,z){},pYxM:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___v-DUT",flex_space_between:"flex_space_between___1bRJc",flex_box_vertical_center:"flex_box_vertical_center___k_OZG",flex_box_center_end:"flex_box_center_end___2lt4j",flex_box_column:"flex_box_column___3fVE5",active:"active___-vjVj",line:"line___3pg8N",list:"list___3yqVJ",left:"left___2dr70",mask:"mask___186YH",right:"right___17A6Y",name:"name___v6M7T",title:"title___1BhMz",a:"a___3T4cN",b:"b___1z1Bk",des:"des___29QAn",tag:"tag___FfUI2"}},ppsT:function($e,We,z){(function(ae){var Z,Z;!function(U){if(!0)window.OSS=U(),$e.exports=U();else var w}(function(){var U;return function(){function w(P,S,O){function T(h,d){if(!S[h]){if(!P[h]){var a=typeof Z=="function"&&Z;if(!d&&a)return Z(h,!0);if(l)return l(h,!0);var u=new Error("Cannot find module '"+h+"'");throw u.code="MODULE_NOT_FOUND",u}var s=S[h]={exports:{}};P[h][0].call(s.exports,function(f){return T(P[h][1][f]||f)},s,s.exports,w,P,S,O)}return S[h].exports}for(var l=typeof Z=="function"&&Z,p=0;p0?B["Content-Type"]=J.mime:B["Content-Type"]=_.getType(J.mime||y.extname(J.object||""))||"application/octet-stream"),J.content&&(B["Content-Md5"]=c.createHash("md5").update(new T(J.content,"utf8")).digest("base64"),B["Content-Length"]||(B["Content-Length"]=J.content.length));var Q=this._getResource(J);B.authorization=this.authorization(J.method,Q,J.subres,B);var ie=this._getReqUrl(J);t("request %s %s, with headers %j, !!stream: %s",J.method,ie,B,!!J.stream);var oe=J.timeout||this.options.timeout;return{url:ie,params:{agent:this.agent,method:J.method,content:J.content,stream:J.stream,headers:B,timeout:oe,writeStream:J.writeStream,customResponse:J.customResponse,ctx:J.ctx||this.ctx}}},X.request=f.default.mark(function J(B){var Q,ie,oe,Ee;return f.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return Q=this.createRequest(B),ie=void 0,oe=void 0,ye.prev=3,ye.next=6,this.urllib.request(Q.url,Q.params);case 6:ie=ye.sent,t("response %s %s, got %s, headers: %j",B.method,Q.url,ie.status,ie.headers),ye.next=13;break;case 10:ye.prev=10,ye.t0=ye.catch(3),oe=ye.t0;case 13:if(Ee=void 0,!ie||!B.successStatuses||B.successStatuses.indexOf(ie.status)!==-1){ye.next=26;break}return ye.next=17,this.requestError(ie);case 17:if(Ee=ye.sent,Ee.code!=="RequestTimeTooSkewed"){ye.next=23;break}return this.options.amendTimeSkewed=+new Date(Ee.serverTime)-new Date,ye.next=22,this.request(B);case 22:return ye.abrupt("return",ye.sent);case 23:Ee.params=B,ye.next=30;break;case 26:if(!oe){ye.next=30;break}return ye.next=29,this.requestError(oe);case 29:Ee=ye.sent;case 30:if(!Ee){ye.next=32;break}throw Ee;case 32:if(!B.xmlResponse){ye.next=36;break}return ye.next=35,this.parseXML(ie.data);case 35:ie.data=ye.sent;case 36:return ye.abrupt("return",ie);case 37:case"end":return ye.stop()}},J,this,[[3,10]])}),X._getResource=function(J){var B="/";return J.bucket&&(B+=J.bucket+"/"),J.object&&(B+=J.object),B},X._isIP=function(J){return j._isIP(J)},X._escape=function(J){return A.encodeURIComponent(J).replace(/%2F/g,"/")},X._getReqUrl=function(J){var B={};v(this.options.endpoint).to(B);var Q=this._isIP(B.hostname),ie=this.options.cname;!J.bucket||ie||Q||(B.host=J.bucket+"."+B.host);var oe="/";J.bucket&&Q&&(oe+=J.bucket+"/"),J.object&&(oe+=this._escape(J.object).replace(/\+/g,"%2B")),B.pathname=oe;var Ee={};if(J.query&&E(Ee,J.query),J.subres){var ye={};x.string(J.subres)?ye[J.subres]="":x.array(J.subres)?J.subres.forEach(function(Le){ye[Le]=""}):ye=J.subres,E(Ee,ye)}return B.query=Ee,o.format(B)},X._getUserAgent=function(){var J=O&&O.browser?"js":"nodejs",B="aliyun-sdk-"+J+"/"+I.version,Q=C.description;return!Q&&O&&(Q="Node.js "+O.version.slice(1)+" on "+O.platform+" "+O.arch),this._checkUserAgent(B+" "+Q)},X._checkUserAgent=function(J){return J.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},X.checkBrowserAndVersion=function(J,B){return H.name===J&&H.version.split(".")[0]===B},X.parseXML=function(J){return function(B){T.isBuffer(J)&&(J=J.toString()),b.parseString(J,{explicitRoot:!1,explicitArray:!1},B)}},X.requestError=f.default.mark(function J(B){var Q,ie,oe,Ee;return f.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(Q=null,B.data&&B.data.length){ye.next=5;break}B.status===-1||B.status===-2?(Q=new Error(B.message),Q.name=B.name,Q.status=B.status,Q.code=B.name):(B.status===404?(Q=new Error("Object not exists"),Q.name="NoSuchKeyError",Q.status=404,Q.code="NoSuchKey"):B.status===412?(Q=new Error("Pre condition failed"),Q.name="PreconditionFailedError",Q.status=412,Q.code="PreconditionFailed"):(Q=new Error("Unknow error, status: "+B.status),Q.name="UnknowError",Q.status=B.status),Q.requestId=B.headers["x-oss-request-id"],Q.host=""),ye.next=30;break;case 5:return ie=String(B.data),t("request response error data: %s",ie),oe=void 0,ye.prev=8,ye.next=11,this.parseXML(ie)||{};case 11:oe=ye.sent,ye.next=21;break;case 14:return ye.prev=14,ye.t0=ye.catch(8),t(ie),ye.t0.message+=` raw xml: `+ie,ye.t0.status=B.status,ye.t0.requestId=B.headers["x-oss-request-id"],ye.abrupt("return",ye.t0);case 21:Ee=oe.Message||"unknow request error, status: "+B.status,oe.Condition&&(Ee+=" (condition: "+oe.Condition+")"),Q=new Error(Ee),Q.name=oe.Code?oe.Code+"Error":"UnknowError",Q.status=B.status,Q.code=oe.Code,Q.requestId=oe.RequestId,Q.hostId=oe.HostId,Q.serverTime=oe.ServerTime;case 30:return t("generate error %j",Q),ye.abrupt("return",Q);case 32:case"end":return ye.stop()}},J,this,[[8,14]])})}).call(this,w("_process"),w("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(w,P,S){(function(O){"use strict";function T(v){return v&&v.__esModule?v:{default:v}}function l(v,_){if(!(this instanceof l))return new l(v,_);y.call(this,_),this.file=v,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var p=w("babel-runtime/core-js/array/from"),h=T(p),d=w("babel-runtime/regenerator"),a=T(d),u=w("is-type-of"),s=w("util"),f=w("path"),i=w("mime"),n=w("copy-to"),t=S;t.multipartUpload=a.default.mark(function v(_,b,m){var g,E,o,x,C,A,D,I,F;return a.default.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(this.resetCancelFlag(),m=m||{},!m.checkpoint||!m.checkpoint.uploadId){H.next=6;break}return H.next=5,this._resumeMultipart(m.checkpoint,m);case 5:return H.abrupt("return",H.sent);case 6:return g=102400,m.mime||(u.file(b)?m.mime=i.getType(f.extname(b.name)):u.blob(b)?m.mime=b.type:m.mime=i.getType(f.extname(b))),m.headers=m.headers||{},this._convertMetaToHeaders(m.meta,m.headers),H.next=12,this._getFileSize(b);case 12:if(!((E=H.sent)0&&n(x).to(A),D=this._divideParts(g,E),I=D.length,F=!1,H=a.default.mark(function Le(pe,Ce){var Be,Pe,ke;return a.default.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(pe.isCancel()){Ne.next=21;break}return Ne.prev=1,Be=D[Ce-1],Pe={stream:pe._createStream(m,Be.start,Be.end),size:Be.end-Be.start},Ne.next=6,pe._uploadPart(C,o,Ce,Pe);case 6:if(ke=Ne.sent,pe.isCancel()||F){Ne.next=13;break}if(_.doneParts.push({number:Ce,etag:ke.res.headers.etag}),A.push({number:Ce,etag:ke.res.headers.etag}),!b||!b.progress){Ne.next=13;break}return Ne.next=13,b.progress(x.length/I,_,ke.res);case 13:Ne.next=21;break;case 15:if(Ne.prev=15,Ne.t0=Ne.catch(1),pe.isCancel()){Ne.next=21;break}throw pe.cancel(),Ne.t0.partNum=Ce,Ne.t0;case 21:case"end":return Ne.stop()}},Le,this,[[1,15]])}),te=(0,h.default)(new Array(I),function(Le,pe){return pe+1}),j=A.map(function(Le){return Le.number}),G=te.filter(function(Le){return j.indexOf(Le)<0}),X=5,J=b.parallel||X,!this.checkBrowserAndVersion("Internet Explorer","10")&&J!==1){ye.next=26;break}B=0;case 16:if(!(B0)){ye.next=37;break}throw this.resetCancelFlag(),Ee=oe[0],Ee.message="Failed to upload some parts with error: "+Ee.toString()+" part_num: "+Ee.partNum,Ee;case 37:if(!this.isCancel()){ye.next=40;break}throw Q=null,this._makeCancelEvent();case 40:return ye.next=42,this.completeMultipartUpload(C,o,A,b);case 42:return ye.abrupt("return",ye.sent);case 43:case"end":return ye.stop()}},v,this)}),u.file=function(v){return typeof File!="undefined"&&v instanceof File},u.blob=function(v){return typeof Blob!="undefined"&&v instanceof Blob},t._getFileSize=a.default.mark(function v(_){var b;return a.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!u.buffer(_)){m.next=4;break}return m.abrupt("return",_.length);case 4:if(!u.blob(_)&&!u.file(_)){m.next=6;break}return m.abrupt("return",_.size);case 6:if(!u.string(_)){m.next=11;break}return m.next=9,this._statFile(_);case 9:return b=m.sent,m.abrupt("return",b.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return m.stop()}},v,this)});var c=w("stream"),y=c.Readable;s.inherits(l,y),l.prototype.readFileAndPush=function(v){if(this.fileBuffer)for(var _=!0;_&&this.fileBuffer&&this.startthis.fileBuffer.length?this.fileBuffer.length:m,this.start=m,_=this.push(this.fileBuffer.slice(b,m))}},l.prototype._read=function(v){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);v=v||16384;var _=this;this.reader.onload=function(b){_.fileBuffer=new O(new Uint8Array(b.target.result)),_.file=null,_.readFileAndPush(v)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(v)},t._createStream=function(v,_,b){if(u.blob(v)||u.file(v))return new l(v.slice(_,b));throw new Error("_createStream requires File/String.")},t._getPartSize=function(v,_){return _?Math.max(Math.ceil(v/1e4),_):1048576},t._divideParts=function(v,_){for(var b=Math.ceil(v/_),m=[],g=0;g `,m.quiet?g+=` true `:g+=` false `,E=0;E"+a.escape(this._objectName(b[E]))+` `;return g+="",d("delete multi objects: %s",g),m.subres="delete",o=this._objectRequestParams("POST","",m),o.mime="xml",o.content=g,o.xmlResponse=!0,o.successStatuses=[200],D.next=14,this.request(o);case 14:return x=D.sent,C=x.data,A=C&&C.Deleted||null,A&&(Array.isArray(A)||(A=[A]),A=A.map(function(I){return I.Key})),D.abrupt("return",{res:x.res,deleted:A});case 19:case"end":return D.stop()}},_,this)}),v.copy=h.default.mark(function _(b,m,g){var E,o,x;return h.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return g=g||{},g.headers=g.headers||{},(0,l.default)(g.headers).forEach(function(A){g.headers["x-oss-copy-source-"+A.toLowerCase()]=g.headers[A]}),g.meta&&(g.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(g.meta,g.headers),m=m[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(m):"/"+encodeURIComponent(m.slice(1)),g.headers["x-oss-copy-source"]=m,E=this._objectRequestParams("PUT",b,g),E.xmlResponse=!0,E.successStatuses=[200,304],C.next=12,this.request(E);case 12:return o=C.sent,x=o.data,x&&(x={etag:x.ETag,lastModified:x.LastModified}),C.abrupt("return",{data:x,res:o.res});case 16:case"end":return C.stop()}},_,this)}),v.putMeta=h.default.mark(function _(b,m,g){return h.default.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,this.copy(b,b,{meta:m||{},timeout:g&&g.timeout,ctx:g&&g.ctx});case 2:return E.abrupt("return",E.sent);case 3:case"end":return E.stop()}},_,this)}),v.list=h.default.mark(function _(b,m){var g,E,o,x,C;return h.default.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return g=this._objectRequestParams("GET","",m),g.query=b,g.xmlResponse=!0,g.successStatuses=[200],A.next=6,this.request(g);case 6:return E=A.sent,o=E.data.Contents,x=this,o&&(Array.isArray(o)||(o=[o]),o=o.map(function(D){return{name:D.Key,url:x._objectUrl(D.Key),lastModified:D.LastModified,etag:D.ETag,type:D.Type,size:Number(D.Size),storageClass:D.StorageClass,owner:{id:D.Owner.ID,displayName:D.Owner.DisplayName}}})),C=E.data.CommonPrefixes||null,C&&(Array.isArray(C)||(C=[C]),C=C.map(function(D){return D.Prefix})),A.abrupt("return",{res:E.res,objects:o,prefixes:C,nextMarker:E.data.NextMarker||null,isTruncated:E.data.IsTruncated==="true"});case 13:case"end":return A.stop()}},_,this)}),v.putACL=h.default.mark(function _(b,m,g){var E,o;return h.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return g=g||{},g.subres="acl",g.headers=g.headers||{},g.headers["x-oss-object-acl"]=m,b=this._objectName(b),E=this._objectRequestParams("PUT",b,g),E.successStatuses=[200],x.next=9,this.request(E);case 9:return o=x.sent,x.abrupt("return",{res:o.res});case 11:case"end":return x.stop()}},_,this)}),v.getACL=h.default.mark(function _(b,m){var g,E;return h.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},m.subres="acl",b=this._objectName(b),g=this._objectRequestParams("GET",b,m),g.successStatuses=[200],g.xmlResponse=!0,o.next=8,this.request(g);case 8:return E=o.sent,o.abrupt("return",{acl:E.data.AccessControlList.Grant,owner:{id:E.data.Owner.ID,displayName:E.data.Owner.DisplayName},res:E.res});case 10:case"end":return o.stop()}},_,this)}),v.restore=h.default.mark(function _(b,m){var g,E;return h.default.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return m=m||{},m.subres="restore",g=this._objectRequestParams("POST",b,m),g.successStatuses=[202],o.next=6,this.request(g);case 6:return E=o.sent,o.abrupt("return",{res:E.res});case 8:case"end":return o.stop()}},_,this)}),v.signatureUrl=function(_,b){b=b||{},_=this._objectName(_),b.method=b.method||"GET";var m=a.timestamp()+(b.expires||1800),g={bucket:this.options.bucket,object:_},E=this._getResource(g);this.options.stsToken&&(b["security-token"]=this.options.stsToken);var o=y._signatureForURL(this.options.accessKeySecret,b,E,m),x=f.parse(this._getReqUrl(g));return x.query={OSSAccessKeyId:this.options.accessKeyId,Expires:m,Signature:o.Signature},i(o.subResource).to(x.query),x.format()},v.getObjectUrl=function(_,b){return b?b[b.length-1]!=="/"&&(b+="/"):b=this.options.endpoint.format(),b+this._escape(this._objectName(_))},v._objectUrl=function(_){return this._getReqUrl({bucket:this.options.bucket,object:_})},v.generateObjectUrl=function(_,b){if(b)b[b.length-1]!=="/"&&(b+="/");else{b=this.options.endpoint.format();var m=f.parse(b),g=this.options.bucket;m.hostname=g+"."+m.hostname,m.host=g+"."+m.host,b=m.format()}return b+this._escape(this._objectName(_))},v._objectRequestParams=function(_,b,m){if(!this.options.bucket)throw new Error("Please create a bucket first");m=m||{},b=this._objectName(b);var g={object:b,bucket:this.options.bucket,method:_,subres:m&&m.subres,timeout:m&&m.timeout,ctx:m&&m.ctx};return m.headers&&(g.headers={},i(m.headers).to(g.headers)),g},v._objectName=function(_){return _.replace(/^\/+/,"")},v._statFile=function(_){return function(b){u.stat(_,b)}},v._convertMetaToHeaders=function(_,b){_&&(0,l.default)(_).forEach(function(m){b["x-oss-meta-"+m]=_[m]})},v._deleteFileSafe=function(_){return function(b){u.exists(_,function(m){m?u.unlink(_,function(g){g&&d("unlink %j error: %s",_,g),b()}):b()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(w,P,S){"use strict";S.version="5.3.1"},{}],6:[function(w,P,S){"use strict";function O(n){return n&&n.__esModule?n:{default:n}}function T(n){return n&&typeof n.next=="function"&&typeof n.throw=="function"}function l(n){if(!n)return!1;var t=n.constructor;return!!t&&(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction"||T(t.prototype)||T(n.prototype))}function p(n,t){var c=new n(t),y=(0,s.default)(c),v=(0,s.default)((0,a.default)(c));y.concat(v).forEach(function(_){l(c[_])?this[_]=f.wrap(c[_]).bind(c):this[_]=c[_]},this)}function h(n){if(!(this instanceof h))return new h(n);p.call(this,i,n)}var d=w("babel-runtime/core-js/object/get-prototype-of"),a=O(d),u=w("babel-runtime/core-js/object/keys"),s=O(u),f=w("co"),i=w("./client");P.exports=h,h.STS=function n(t){if(!(this instanceof n))return new n(t);p.call(this,i.STS,t)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(w,P,S){(function(O){"use strict";function T(a){return a&&a.__esModule?a:{default:a}}var l=w("babel-runtime/core-js/object/keys"),p=T(l),h=w("babel-runtime/core-js/json/stringify"),d=T(h);S.encodeCallback=function(a,u){if(a.headers=a.headers||{},!Object.prototype.hasOwnProperty.call(a.headers,"x-oss-callback")&&u.callback){var s={callbackUrl:encodeURI(u.callback.url),callbackBody:u.callback.body};u.callback.host&&(s.callbackHost=u.callback.host),u.callback.contentType&&(s.callbackBodyType=u.callback.contentType);var f=new O((0,d.default)(s)).toString("base64");if(a.headers["x-oss-callback"]=f,u.callback.customValue){var i={};(0,p.default)(u.callback.customValue).forEach(function(n){i["x:"+n]=u.callback.customValue[n]}),a.headers["x-oss-callback-var"]=new O((0,d.default)(i)).toString("base64")}}}}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(w,P,S){"use strict";var O=w("babel-runtime/regenerator"),T=function(d){return d&&d.__esModule?d:{default:d}}(O),l=w("copy-to"),p=w("./callback"),h=S;h.listUploads=T.default.mark(function d(a,u){var s,f,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return u=u||{},s={},l(u).to(s),s.subres="uploads",f=this._objectRequestParams("GET","",s),f.query=a,f.xmlResponse=!0,f.successStatuses=[200],t.next=10,this.request(f);case 10:return i=t.sent,n=i.data.Upload||[],Array.isArray(n)||(n=[n]),n=n.map(function(c){return{name:c.Key,uploadId:c.UploadId,initiated:c.Initiated}}),t.abrupt("return",{res:i.res,uploads:n,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return t.stop()}},d,this)}),h.listParts=T.default.mark(function d(a,u,s,f){var i,n,t;return T.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return f=f||{},i={},l(f).to(i),i.subres={uploadId:u},n=this._objectRequestParams("GET",a,i),n.query=s,n.xmlResponse=!0,n.successStatuses=[200],c.next=10,this.request(n);case 10:return t=c.sent,c.abrupt("return",{res:t.res,uploadId:t.data.UploadId,bucket:t.data.Bucket,name:t.data.Key,partNumberMarker:t.data.PartNumberMarker,nextPartNumberMarker:t.data.NextPartNumberMarker,maxParts:t.data.MaxParts,isTruncated:t.data.IsTruncated,parts:t.data.Part||[]});case 12:case"end":return c.stop()}},d,this)}),h.abortMultipartUpload=T.default.mark(function d(a,u,s){var f,i,n;return T.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.cancel(),s=s||{},f={},l(s).to(f),f.subres={uploadId:u},i=this._objectRequestParams("DELETE",a,f),i.successStatuses=[204],t.next=9,this.request(i);case 9:return n=t.sent,t.abrupt("return",{res:n.res});case 11:case"end":return t.stop()}},d,this)}),h.initMultipartUpload=T.default.mark(function d(a,u){var s,f,i;return T.default.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return u=u||{},s={},l(u).to(s),s.headers=s.headers||{},this._convertMetaToHeaders(u.meta,s.headers),s.subres="uploads",f=this._objectRequestParams("POST",a,s),f.mime=u.mime,f.xmlResponse=!0,f.successStatuses=[200],n.next=12,this.request(f);case 12:return i=n.sent,n.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return n.stop()}},d,this)}),h.uploadPart=T.default.mark(function d(a,u,s,f,i,n,t){var c;return T.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return c={stream:this._createStream(f,i,n),size:n-i},y.next=3,this._uploadPart(a,u,s,c,t);case 3:return y.abrupt("return",y.sent);case 4:case"end":return y.stop()}},d,this)}),h.completeMultipartUpload=T.default.mark(function d(a,u,s,f){var i,n,t,c,y,v,_,b;return T.default.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:for(i=s.concat().sort(function(g,E){return g.number-E.number}).filter(function(g,E,o){return!E||g.number!==o[E-1].number}),n=` `,t=0;t `,n+=""+c.number+` `,n+=""+c.etag+` `,n+=` `;return n+="",f=f||{},y={},l(f).to(y),y.subres={uploadId:u},v=this._objectRequestParams("POST",a,y),p.encodeCallback(v,y),v.mime="xml",v.content=n,v.headers&&v.headers["x-oss-callback"]||(v.xmlResponse=!0),v.successStatuses=[200],m.next=16,this.request(v);case 16:return _=m.sent,b={res:_.res,bucket:v.bucket,name:a,etag:_.res.headers.etag},v.headers&&v.headers["x-oss-callback"]&&(b.data=JSON.parse(_.data.toString())),m.abrupt("return",b);case 20:case"end":return m.stop()}},d,this)}),h._uploadPart=T.default.mark(function d(a,u,s,f,i){var n,t,c;return T.default.wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return i=i||{},n={},l(i).to(n),n.headers={"Content-Length":f.size},n.subres={partNumber:s,uploadId:u},t=this._objectRequestParams("PUT",a,n),t.mime=n.mime,t.stream=f.stream,t.successStatuses=[200],y.next=11,this.request(t);case 11:return c=y.sent,f.stream=null,t.stream=null,y.abrupt("return",{name:a,etag:c.res.headers.etag,res:c.res});case 15:case"end":return y.stop()}},d,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(w,P,S){(function(O){"use strict";function T(s){return s&&s.__esModule?s:{default:s}}var l=w("babel-runtime/core-js/json/stringify"),p=T(l),h=w("babel-runtime/core-js/object/keys"),d=T(h),a=w("./../../shims/crypto/crypto.js"),u=w("is-type-of");S.buildCanonicalizedResource=function(s,f){var i=""+s,n="?";if(u.string(f)&&f.trim()!=="")i+=n+f;else if(u.array(f))f.sort(),i+=n+f.join("&");else if(f){var t=function(y,v){return y[0]>v[0]?1:y[0]0)throw new Error("Invalid string. Length must be a multiple of 4");var v=c.indexOf("=");return v===-1&&(v=y),[v,v===y?0:4-v%4]}function T(c){var y=O(c),v=y[0],_=y[1];return 3*(v+_)/4-_}function l(c,y,v){return 3*(y+v)/4-v}function p(c){for(var y,v=O(c),_=v[0],b=v[1],m=new f(l(c,_,b)),g=0,E=b>0?_-4:_,o=0;o>16&255,m[g++]=y>>8&255,m[g++]=255&y;return b===2&&(y=s[c.charCodeAt(o)]<<2|s[c.charCodeAt(o+1)]>>4,m[g++]=255&y),b===1&&(y=s[c.charCodeAt(o)]<<10|s[c.charCodeAt(o+1)]<<4|s[c.charCodeAt(o+2)]>>2,m[g++]=y>>8&255,m[g++]=255&y),m}function h(c){return u[c>>18&63]+u[c>>12&63]+u[c>>6&63]+u[63&c]}function d(c,y,v){for(var _,b=[],m=y;mg?g:m+16383));return _===1?(y=c[v-1],b.push(u[y>>2]+u[y<<4&63]+"==")):_===2&&(y=(c[v-2]<<8)+c[v-1],b.push(u[y>>10]+u[y>>4&63]+u[y<<2&63]+"=")),b.join("")}S.byteLength=T,S.toByteArray=p,S.fromByteArray=a;for(var u=[],s=[],f=typeof Uint8Array!="undefined"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,t=i.length;n1&&B[1]||""}function i(J){var B=s.match(J);return B&&B.length>1&&B[2]||""}var n,t=f(/(ipod|iphone|ipad)/i).toLowerCase(),c=/like android/i.test(s),y=!c&&/android/i.test(s),v=/nexus\s*[0-6]\s*/i.test(s),_=!v&&/nexus\s*[0-9]+/i.test(s),b=/CrOS/.test(s),m=/silk/i.test(s),g=/sailfish/i.test(s),E=/tizen/i.test(s),o=/(web|hpw)os/i.test(s),x=/windows phone/i.test(s),C=(/SamsungBrowser/i.test(s),!x&&/windows/i.test(s)),A=!t&&!m&&/macintosh/i.test(s),D=!y&&!g&&!E&&!o&&/linux/i.test(s),I=i(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),F=f(/version\/(\d+(\.\d+)?)/i),H=/tablet/i.test(s)&&!/tablet pc/i.test(s),te=!H&&/[^-]mobi/i.test(s),j=/xbox/i.test(s);/opera/i.test(s)?n={name:"Opera",opera:a,version:F||f(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(s)?n={name:"Opera",opera:a,version:f(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||F}:/SamsungBrowser/i.test(s)?n={name:"Samsung Internet for Android",samsungBrowser:a,version:F||f(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(s)?n={name:"Opera Coast",coast:a,version:F||f(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(s)?n={name:"Yandex Browser",yandexbrowser:a,version:F||f(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(s)?n={name:"UC Browser",ucbrowser:a,version:f(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(s)?n={name:"Maxthon",maxthon:a,version:f(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(s)?n={name:"Epiphany",epiphany:a,version:f(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(s)?n={name:"Puffin",puffin:a,version:f(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(s)?n={name:"Sleipnir",sleipnir:a,version:f(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(s)?n={name:"K-Meleon",kMeleon:a,version:f(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:x?(n={name:"Windows Phone",osname:"Windows Phone",windowsphone:a},I?(n.msedge=a,n.version=I):(n.msie=a,n.version=f(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(s)?n={name:"Internet Explorer",msie:a,version:f(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:b?n={name:"Chrome",osname:"Chrome OS",chromeos:a,chromeBook:a,chrome:a,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(s)?n={name:"Microsoft Edge",msedge:a,version:I}:/vivaldi/i.test(s)?n={name:"Vivaldi",vivaldi:a,version:f(/vivaldi\/(\d+(\.\d+)?)/i)||F}:g?n={name:"Sailfish",osname:"Sailfish OS",sailfish:a,version:f(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(s)?n={name:"SeaMonkey",seamonkey:a,version:f(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(s)?(n={name:"Firefox",firefox:a,version:f(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(s)&&(n.firefoxos=a,n.osname="Firefox OS")):m?n={name:"Amazon Silk",silk:a,version:f(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(s)?n={name:"PhantomJS",phantom:a,version:f(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(s)?n={name:"SlimerJS",slimer:a,version:f(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(s)||/rim\stablet/i.test(s)?n={name:"BlackBerry",osname:"BlackBerry OS",blackberry:a,version:F||f(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:o?(n={name:"WebOS",osname:"WebOS",webos:a,version:F||f(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(s)&&(n.touchpad=a)):/bada/i.test(s)?n={name:"Bada",osname:"Bada",bada:a,version:f(/dolfin\/(\d+(\.\d+)?)/i)}:E?n={name:"Tizen",osname:"Tizen",tizen:a,version:f(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||F}:/qupzilla/i.test(s)?n={name:"QupZilla",qupzilla:a,version:f(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||F}:/chromium/i.test(s)?n={name:"Chromium",chromium:a,version:f(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||F}:/chrome|crios|crmo/i.test(s)?n={name:"Chrome",chrome:a,version:f(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:y?n={name:"Android",version:F}:/safari|applewebkit/i.test(s)?(n={name:"Safari",safari:a},F&&(n.version=F)):t?(n={name:t=="iphone"?"iPhone":t=="ipad"?"iPad":"iPod"},F&&(n.version=F)):n=/googlebot/i.test(s)?{name:"Googlebot",googlebot:a,version:f(/googlebot\/(\d+(\.\d+))/i)||F}:{name:f(/^(.*)\/(.*) /),version:i(/^(.*)\/(.*) /)},!n.msedge&&/(apple)?webkit/i.test(s)?(/(apple)?webkit\/537\.36/i.test(s)?(n.name=n.name||"Blink",n.blink=a):(n.name=n.name||"Webkit",n.webkit=a),!n.version&&F&&(n.version=F)):!n.opera&&/gecko\//i.test(s)&&(n.name=n.name||"Gecko",n.gecko=a,n.version=n.version||f(/gecko\/(\d+(\.\d+)?)/i)),n.windowsphone||!y&&!n.silk?!n.windowsphone&&t?(n[t]=a,n.ios=a,n.osname="iOS"):A?(n.mac=a,n.osname="macOS"):j?(n.xbox=a,n.osname="Xbox"):C?(n.windows=a,n.osname="Windows"):D&&(n.linux=a,n.osname="Linux"):(n.android=a,n.osname="Android");var G="";n.windows?G=function(J){switch(J){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(f(/Windows ((NT|XP)( \d\d?.\d)?)/i)):n.windowsphone?G=f(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):n.mac?(G=f(/Mac OS X (\d+([_\.\s]\d+)*)/i),G=G.replace(/[_\s]/g,".")):t?(G=f(/os (\d+([_\s]\d+)*) like mac os x/i),G=G.replace(/[_\s]/g,".")):y?G=f(/android[ \/-](\d+(\.\d+)*)/i):n.webos?G=f(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):n.blackberry?G=f(/rim\stablet\sos\s(\d+(\.\d+)*)/i):n.bada?G=f(/bada\/(\d+(\.\d+)*)/i):n.tizen&&(G=f(/tizen[\/\s](\d+(\.\d+)*)/i)),G&&(n.osversion=G);var X=!n.windows&&G.split(".")[0];return H||_||t=="ipad"||y&&(X==3||X>=4&&!te)||n.silk?n.tablet=a:(te||t=="iphone"||t=="ipod"||y||v||n.blackberry||n.webos||n.bada)&&(n.mobile=a),n.msedge||n.msie&&n.version>=10||n.yandexbrowser&&n.version>=15||n.vivaldi&&n.version>=1||n.chrome&&n.version>=20||n.samsungBrowser&&n.version>=4||n.firefox&&n.version>=20||n.safari&&n.version>=6||n.opera&&n.version>=10||n.ios&&n.osversion&&n.osversion.split(".")[0]>=6||n.blackberry&&n.version>=10.1||n.chromium&&n.version>=20?n.a=a:n.msie&&n.version<10||n.chrome&&n.version<20||n.firefox&&n.version<20||n.safari&&n.version<6||n.opera&&n.version<10||n.ios&&n.osversion&&n.osversion.split(".")[0]<6||n.chromium&&n.version<20?n.c=a:n.x=a,n}function T(s){return s.split(".").length}function l(s,f){var i,n=[];if(Array.prototype.map)return Array.prototype.map.call(s,f);for(i=0;i=0;){if(i[0][f]>i[1][f])return 1;if(i[0][f]!==i[1][f])return-1;if(f===0)return 0}}function h(s,f,i){var n=u;typeof f=="string"&&(i=f,f=void 0),f===void 0&&(f=!1),i&&(n=O(i));var t=""+n.version;for(var c in s)if(s.hasOwnProperty(c)&&n[c]){if(typeof s[c]!="string")throw new Error("Browser version in the minVersion map should be a string: "+c+": "+String(s));return p([t,s[c]])<0}return f}function d(s,f,i){return!h(s,f,i)}var a=!0,u=O(typeof navigator!="undefined"&&navigator.userAgent||"");return u.test=function(s){for(var f=0;f=this.charLength-this.charReceived?this.charLength-this.charReceived:u.length;if(u.copy(this.charBuffer,this.charReceived,0,f),this.charReceived+=f,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,u.length===0)return s;break}this.charLength+=this.surrogateSize,s=""}this.detectIncompleteChar(u);var i=u.length;this.charLength&&(u.copy(this.charBuffer,0,u.length-this.charReceived,i),i-=this.charReceived),s+=u.toString(this.encoding,0,i);var i=s.length-1,n=s.charCodeAt(i);if(n>=55296&&n<=56319){var t=this.surrogateSize;return this.charLength+=t,this.charReceived+=t,this.charBuffer.copy(this.charBuffer,t,0,t),u.copy(this.charBuffer,0,0,t),s.substring(0,i)}return s},a.prototype.detectIncompleteChar=function(u){for(var s=u.length>=3?3:u.length;s>0;s--){var f=u[u.length-s];if(s==1&&f>>5==6){this.charLength=2;break}if(s<=2&&f>>4==14){this.charLength=3;break}if(s<=3&&f>>3==30){this.charLength=4;break}}this.charReceived=s},a.prototype.end=function(u){var s="";if(u&&u.length&&(s=this.write(u)),this.charReceived){var f=this.charReceived,i=this.charBuffer,n=this.encoding;s+=i.slice(0,f).toString(n)}return s}},{buffer:38}],38:[function(w,P,S){(function(O){"use strict";function T(){return p.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function l(M,N){if(T()=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return 0|M}function c(M){return+M!=M&&(M=0),p.alloc(+M)}function y(M,N){if(p.isBuffer(M))return M.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(M)||M instanceof ArrayBuffer))return M.byteLength;typeof M!="string"&&(M=""+M);var $=M.length;if($===0)return 0;for(var V=!1;;)switch(N){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":case void 0:return Ce(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*$;case"hex":return $>>>1;case"base64":return ke(M).length;default:if(V)return Ce(M).length;N=(""+N).toLowerCase(),V=!0}}function v(M,N,$){var V=!1;if((N===void 0||N<0)&&(N=0),N>this.length)return"";if(($===void 0||$>this.length)&&($=this.length),$<=0)return"";if($>>>=0,N>>>=0,$<=N)return"";for(M||(M="utf8");;)switch(M){case"hex":return j(this,N,$);case"utf8":case"utf-8":return I(this,N,$);case"ascii":return H(this,N,$);case"latin1":case"binary":return te(this,N,$);case"base64":return D(this,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,N,$);default:if(V)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),V=!0}}function _(M,N,$){var V=M[N];M[N]=M[$],M[$]=V}function b(M,N,$,V,Y){if(M.length===0)return-1;if(typeof $=="string"?(V=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,isNaN($)&&($=Y?0:M.length-1),$<0&&($=M.length+$),$>=M.length){if(Y)return-1;$=M.length-1}else if($<0){if(!Y)return-1;$=0}if(typeof N=="string"&&(N=p.from(N,V)),p.isBuffer(N))return N.length===0?-1:m(M,N,$,V,Y);if(typeof N=="number")return N&=255,p.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Y?Uint8Array.prototype.indexOf.call(M,N,$):Uint8Array.prototype.lastIndexOf.call(M,N,$):m(M,[N],$,V,Y);throw new TypeError("val must be string, number or Buffer")}function m(M,N,$,V,Y){function me(Ke,we){return Re===1?Ke[we]:Ke.readUInt16BE(we*Re)}var Re=1,rt=M.length,De=N.length;if(V!==void 0&&((V=String(V).toLowerCase())==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(M.length<2||N.length<2)return-1;Re=2,rt/=2,De/=2,$/=2}var Me;if(Y){var Xe=-1;for(Me=$;Mert&&($=rt-De),Me=$;Me>=0;Me--){for(var tt=!0,Ve=0;VeY&&(V=Y):V=Y;var me=N.length;if(me%2!=0)throw new TypeError("Invalid hex string");V>me/2&&(V=me/2);for(var Re=0;Re239?4:me>223?3:me>191?2:1;if(Y+rt<=$){var De,Me,Xe,tt;switch(rt){case 1:me<128&&(Re=me);break;case 2:De=M[Y+1],(192&De)==128&&(tt=(31&me)<<6|63&De)>127&&(Re=tt);break;case 3:De=M[Y+1],Me=M[Y+2],(192&De)==128&&(192&Me)==128&&(tt=(15&me)<<12|(63&De)<<6|63&Me)>2047&&(tt<55296||tt>57343)&&(Re=tt);break;case 4:De=M[Y+1],Me=M[Y+2],Xe=M[Y+3],(192&De)==128&&(192&Me)==128&&(192&Xe)==128&&(tt=(15&me)<<18|(63&De)<<12|(63&Me)<<6|63&Xe)>65535&&tt<1114112&&(Re=tt)}}Re===null?(Re=65533,rt=1):Re>65535&&(Re-=65536,V.push(Re>>>10&1023|55296),Re=56320|1023&Re),V.push(Re),Y+=rt}return F(V)}function F(M){var N=M.length;if(N<=Ye)return String.fromCharCode.apply(String,M);for(var $="",V=0;VV)&&($=V);for(var Y="",me=N;me<$;++me)Y+=pe(M[me]);return Y}function G(M,N,$){for(var V=M.slice(N,$),Y="",me=0;me$)throw new RangeError("Trying to access beyond buffer length")}function J(M,N,$,V,Y,me){if(!p.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(N>Y||NM.length)throw new RangeError("Index out of range")}function B(M,N,$,V){N<0&&(N=65535+N+1);for(var Y=0,me=Math.min(M.length-$,2);Y>>8*(V?Y:1-Y)}function Q(M,N,$,V){N<0&&(N=4294967295+N+1);for(var Y=0,me=Math.min(M.length-$,4);Y>>8*(V?Y:3-Y)&255}function ie(M,N,$,V,Y,me){if($+V>M.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function oe(M,N,$,V,Y){return Y||ie(M,N,$,4,34028234663852886e22,-34028234663852886e22),Ie.write(M,N,$,V,23,4),$+4}function Ee(M,N,$,V,Y){return Y||ie(M,N,$,8,17976931348623157e292,-17976931348623157e292),Ie.write(M,N,$,V,52,8),$+8}function ye(M){if(M=Le(M).replace(ee,""),M.length<2)return"";for(;M.length%4!=0;)M+="=";return M}function Le(M){return M.trim?M.trim():M.replace(/^\s+|\s+$/g,"")}function pe(M){return M<16?"0"+M.toString(16):M.toString(16)}function Ce(M,N){N=N||1/0;for(var $,V=M.length,Y=null,me=[],Re=0;Re55295&&$<57344){if(!Y){if($>56319){(N-=3)>-1&&me.push(239,191,189);continue}if(Re+1===V){(N-=3)>-1&&me.push(239,191,189);continue}Y=$;continue}if($<56320){(N-=3)>-1&&me.push(239,191,189),Y=$;continue}$=65536+(Y-55296<<10|$-56320)}else Y&&(N-=3)>-1&&me.push(239,191,189);if(Y=null,$<128){if((N-=1)<0)break;me.push($)}else if($<2048){if((N-=2)<0)break;me.push($>>6|192,63&$|128)}else if($<65536){if((N-=3)<0)break;me.push($>>12|224,$>>6&63|128,63&$|128)}else{if(!($<1114112))throw new Error("Invalid code point");if((N-=4)<0)break;me.push($>>18|240,$>>12&63|128,$>>6&63|128,63&$|128)}}return me}function Be(M){for(var N=[],$=0;$>8,Y=$%256,me.push(Y),me.push(V);return me}function ke(M){return ue.toByteArray(ye(M))}function Ne(M,N,$,V){for(var Y=0;Y=N.length||Y>=M.length);++Y)N[Y+$]=M[Y];return Y}function he(M){return M!==M}var ue=w("base64-js"),Ie=w("ieee754"),Ue=w("isarray");S.Buffer=p,S.SlowBuffer=c,S.INSPECT_MAX_BYTES=50,p.TYPED_ARRAY_SUPPORT=O.TYPED_ARRAY_SUPPORT!==void 0?O.TYPED_ARRAY_SUPPORT:function(){try{var M=new Uint8Array(1);return M.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},M.foo()===42&&typeof M.subarray=="function"&&M.subarray(1,1).byteLength===0}catch(N){return!1}}(),S.kMaxLength=T(),p.poolSize=8192,p._augment=function(M){return M.__proto__=p.prototype,M},p.from=function(M,N,$){return h(null,M,N,$)},p.TYPED_ARRAY_SUPPORT&&(p.prototype.__proto__=Uint8Array.prototype,p.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&p[Symbol.species]===p&&Object.defineProperty(p,Symbol.species,{value:null,configurable:!0})),p.alloc=function(M,N,$){return a(null,M,N,$)},p.allocUnsafe=function(M){return u(null,M)},p.allocUnsafeSlow=function(M){return u(null,M)},p.isBuffer=function(M){return!(M==null||!M._isBuffer)},p.compare=function(M,N){if(!p.isBuffer(M)||!p.isBuffer(N))throw new TypeError("Arguments must be Buffers");if(M===N)return 0;for(var $=M.length,V=N.length,Y=0,me=Math.min($,V);Y0&&(M=this.toString("hex",0,N).match(/.{2}/g).join(" "),this.length>N&&(M+=" ... ")),""},p.prototype.compare=function(M,N,$,V,Y){if(!p.isBuffer(M))throw new TypeError("Argument must be a Buffer");if(N===void 0&&(N=0),$===void 0&&($=M?M.length:0),V===void 0&&(V=0),Y===void 0&&(Y=this.length),N<0||$>M.length||V<0||Y>this.length)throw new RangeError("out of range index");if(V>=Y&&N>=$)return 0;if(V>=Y)return-1;if(N>=$)return 1;if(N>>>=0,$>>>=0,V>>>=0,Y>>>=0,this===M)return 0;for(var me=Y-V,Re=$-N,rt=Math.min(me,Re),De=this.slice(V,Y),Me=M.slice(N,$),Xe=0;XeY)&&($=Y),M.length>0&&($<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");for(var me=!1;;)switch(V){case"hex":return g(this,M,N,$);case"utf8":case"utf-8":return E(this,M,N,$);case"ascii":return o(this,M,N,$);case"latin1":case"binary":return x(this,M,N,$);case"base64":return C(this,M,N,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,M,N,$);default:if(me)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),me=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ye=4096;p.prototype.slice=function(M,N){var $=this.length;M=~~M,N=N===void 0?$:~~N,M<0?(M+=$)<0&&(M=0):M>$&&(M=$),N<0?(N+=$)<0&&(N=0):N>$&&(N=$),N0&&(Y*=256);)V+=this[M+--N]*Y;return V},p.prototype.readUInt8=function(M,N){return N||X(M,1,this.length),this[M]},p.prototype.readUInt16LE=function(M,N){return N||X(M,2,this.length),this[M]|this[M+1]<<8},p.prototype.readUInt16BE=function(M,N){return N||X(M,2,this.length),this[M]<<8|this[M+1]},p.prototype.readUInt32LE=function(M,N){return N||X(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+16777216*this[M+3]},p.prototype.readUInt32BE=function(M,N){return N||X(M,4,this.length),16777216*this[M]+(this[M+1]<<16|this[M+2]<<8|this[M+3])},p.prototype.readIntLE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=this[M],Y=1,me=0;++me=Y&&(V-=Math.pow(2,8*N)),V},p.prototype.readIntBE=function(M,N,$){M|=0,N|=0,$||X(M,N,this.length);for(var V=N,Y=1,me=this[M+--V];V>0&&(Y*=256);)me+=this[M+--V]*Y;return Y*=128,me>=Y&&(me-=Math.pow(2,8*N)),me},p.prototype.readInt8=function(M,N){return N||X(M,1,this.length),128&this[M]?-1*(255-this[M]+1):this[M]},p.prototype.readInt16LE=function(M,N){N||X(M,2,this.length);var $=this[M]|this[M+1]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt16BE=function(M,N){N||X(M,2,this.length);var $=this[M+1]|this[M]<<8;return 32768&$?4294901760|$:$},p.prototype.readInt32LE=function(M,N){return N||X(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},p.prototype.readInt32BE=function(M,N){return N||X(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},p.prototype.readFloatLE=function(M,N){return N||X(M,4,this.length),Ie.read(this,M,!0,23,4)},p.prototype.readFloatBE=function(M,N){return N||X(M,4,this.length),Ie.read(this,M,!1,23,4)},p.prototype.readDoubleLE=function(M,N){return N||X(M,8,this.length),Ie.read(this,M,!0,52,8)},p.prototype.readDoubleBE=function(M,N){return N||X(M,8,this.length),Ie.read(this,M,!1,52,8)},p.prototype.writeUIntLE=function(M,N,$,V){(M=+M,N|=0,$|=0,!V)&&J(this,M,N,$,Math.pow(2,8*$)-1,0);var Y=1,me=0;for(this[N]=255&M;++me<$&&(Y*=256);)this[N+me]=M/Y&255;return N+$},p.prototype.writeUIntBE=function(M,N,$,V){(M=+M,N|=0,$|=0,!V)&&J(this,M,N,$,Math.pow(2,8*$)-1,0);var Y=$-1,me=1;for(this[N+Y]=255&M;--Y>=0&&(me*=256);)this[N+Y]=M/me&255;return N+$},p.prototype.writeUInt8=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,1,255,0),p.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),this[N]=255&M,N+1},p.prototype.writeUInt16LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8):B(this,M,N,!0),N+2},p.prototype.writeUInt16BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>8,this[N+1]=255&M):B(this,M,N,!1),N+2},p.prototype.writeUInt32LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N+3]=M>>>24,this[N+2]=M>>>16,this[N+1]=M>>>8,this[N]=255&M):Q(this,M,N,!0),N+4},p.prototype.writeUInt32BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>24,this[N+1]=M>>>16,this[N+2]=M>>>8,this[N+3]=255&M):Q(this,M,N,!1),N+4},p.prototype.writeIntLE=function(M,N,$,V){if(M=+M,N|=0,!V){var Y=Math.pow(2,8*$-1);J(this,M,N,$,Y-1,-Y)}var me=0,Re=1,rt=0;for(this[N]=255&M;++me<$&&(Re*=256);)M<0&&rt===0&&this[N+me-1]!==0&&(rt=1),this[N+me]=(M/Re>>0)-rt&255;return N+$},p.prototype.writeIntBE=function(M,N,$,V){if(M=+M,N|=0,!V){var Y=Math.pow(2,8*$-1);J(this,M,N,$,Y-1,-Y)}var me=$-1,Re=1,rt=0;for(this[N+me]=255&M;--me>=0&&(Re*=256);)M<0&&rt===0&&this[N+me+1]!==0&&(rt=1),this[N+me]=(M/Re>>0)-rt&255;return N+$},p.prototype.writeInt8=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,1,127,-128),p.TYPED_ARRAY_SUPPORT||(M=Math.floor(M)),M<0&&(M=255+M+1),this[N]=255&M,N+1},p.prototype.writeInt16LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8):B(this,M,N,!0),N+2},p.prototype.writeInt16BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>8,this[N+1]=255&M):B(this,M,N,!1),N+2},p.prototype.writeInt32LE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[N]=255&M,this[N+1]=M>>>8,this[N+2]=M>>>16,this[N+3]=M>>>24):Q(this,M,N,!0),N+4},p.prototype.writeInt32BE=function(M,N,$){return M=+M,N|=0,$||J(this,M,N,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),p.TYPED_ARRAY_SUPPORT?(this[N]=M>>>24,this[N+1]=M>>>16,this[N+2]=M>>>8,this[N+3]=255&M):Q(this,M,N,!1),N+4},p.prototype.writeFloatLE=function(M,N,$){return oe(this,M,N,!0,$)},p.prototype.writeFloatBE=function(M,N,$){return oe(this,M,N,!1,$)},p.prototype.writeDoubleLE=function(M,N,$){return Ee(this,M,N,!0,$)},p.prototype.writeDoubleBE=function(M,N,$){return Ee(this,M,N,!1,$)},p.prototype.copy=function(M,N,$,V){if($||($=0),V||V===0||(V=this.length),N>=M.length&&(N=M.length),N||(N=0),V>0&&V<$&&(V=$),V===$)return 0;if(M.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if($<0||$>=this.length)throw new RangeError("sourceStart out of bounds");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),M.length-N=0;--Y)M[Y+N]=this[Y+$];else if(me<1e3||!p.TYPED_ARRAY_SUPPORT)for(Y=0;Y>>=0,$=$===void 0?this.length:$>>>0,M||(M=0);var me;if(typeof M=="number")for(me=N;me<$;++me)this[me]=M;else{var Re=p.isBuffer(M)?M:Ce(new p(M,V).toString()),rt=Re.length;for(me=0;me<$-N;++me)this[me+N]=Re[me%rt]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(w,P,S){P.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(w,P,S){"use strict";var O=function(){this.buffer=[],this.fns=[]};O.prototype.push=function(l,p){if(this.fns.length)return this.fns.shift()(null,l);var h={data:l,priority:p},d=T(this.buffer,h,function(a){return a.priority});this.buffer.splice(d,0,h)},O.prototype.next=function(){var l=this;return function(p){if(l.buffer.length)return p(null,l.buffer.pop().data);l.fns.push(p)}};var T=function(l,p,h){p=h(p);for(var d=0,a=l?l.length:d;d>>1;h(l[u])2&&(v=f.call(arguments,1)),t(v)})})}function p(i){return Promise.all(i.map(T,this))}function h(i){for(var n=new i.constructor,t=Object.keys(i),c=[],y=0;yi;)if((u=s[i++])!=u)return!0}else for(;f>i;i++)if((p||i in s)&&s[i]===d)return p||i||0;return!p&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(w,P,S){var O=w("./_cof"),T=w("./_wks")("toStringTag"),l=O(function(){return arguments}())=="Arguments",p=function(h,d){try{return h[d]}catch(a){}};P.exports=function(h){var d,a,u;return h===void 0?"Undefined":h===null?"Null":typeof(a=p(d=Object(h),T))=="string"?a:l?O(d):(u=O(d))=="Object"&&typeof d.callee=="function"?"Arguments":u}},{"./_cof":64,"./_wks":131}],64:[function(w,P,S){var O={}.toString;P.exports=function(T){return O.call(T).slice(8,-1)}},{}],65:[function(w,P,S){var O=P.exports={version:"2.5.7"};typeof __e=="number"&&(__e=O)},{}],66:[function(w,P,S){"use strict";var O=w("./_object-dp"),T=w("./_property-desc");P.exports=function(l,p,h){p in l?O.f(l,p,T(0,h)):l[p]=h}},{"./_object-dp":98,"./_property-desc":111}],67:[function(w,P,S){var O=w("./_a-function");P.exports=function(T,l,p){if(O(T),l===void 0)return T;switch(p){case 1:return function(h){return T.call(l,h)};case 2:return function(h,d){return T.call(l,h,d)};case 3:return function(h,d,a){return T.call(l,h,d,a)}}return function(){return T.apply(l,arguments)}}},{"./_a-function":58}],68:[function(w,P,S){P.exports=function(O){if(O==null)throw TypeError("Can't call method on "+O);return O}},{}],69:[function(w,P,S){P.exports=!w("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(w,P,S){var O=w("./_is-object"),T=w("./_global").document,l=O(T)&&O(T.createElement);P.exports=function(p){return l?T.createElement(p):{}}},{"./_global":76,"./_is-object":85}],71:[function(w,P,S){P.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(w,P,S){var O=w("./_object-keys"),T=w("./_object-gops"),l=w("./_object-pie");P.exports=function(p){var h=O(p),d=T.f;if(d)for(var a,u=d(p),s=l.f,f=0;u.length>f;)s.call(p,a=u[f++])&&h.push(a);return h}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(w,P,S){var O=w("./_global"),T=w("./_core"),l=w("./_ctx"),p=w("./_hide"),h=w("./_has"),d=function(a,u,s){var f,i,n,t=a&d.F,c=a&d.G,y=a&d.S,v=a&d.P,_=a&d.B,b=a&d.W,m=c?T:T[u]||(T[u]={}),g=m.prototype,E=c?O:y?O[u]:(O[u]||{}).prototype;c&&(s=u);for(f in s)(i=!t&&E&&E[f]!==void 0)&&h(m,f)||(n=i?E[f]:s[f],m[f]=c&&typeof E[f]!="function"?s[f]:_&&i?l(n,O):b&&E[f]==n?function(o){var x=function(C,A,D){if(this instanceof o){switch(arguments.length){case 0:return new o;case 1:return new o(C);case 2:return new o(C,A)}return new o(C,A,D)}return o.apply(this,arguments)};return x.prototype=o.prototype,x}(n):v&&typeof n=="function"?l(Function.call,n):n,v&&((m.virtual||(m.virtual={}))[f]=n,a&d.R&&g&&!g[f]&&p(g,f,n)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,P.exports=d},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(w,P,S){P.exports=function(O){try{return!!O()}catch(T){return!0}}},{}],75:[function(w,P,S){var O=w("./_ctx"),T=w("./_iter-call"),l=w("./_is-array-iter"),p=w("./_an-object"),h=w("./_to-length"),d=w("./core.get-iterator-method"),a={},u={},S=P.exports=function(s,f,i,n,t){var c,y,v,_,b=t?function(){return s}:d(s),m=O(i,n,f?2:1),g=0;if(typeof b!="function")throw TypeError(s+" is not iterable!");if(l(b)){for(c=h(s.length);c>g;g++)if((_=f?m(p(y=s[g])[0],y[1]):m(s[g]))===a||_===u)return _}else for(v=b.call(s);!(y=v.next()).done;)if((_=T(v,m,y.value,f))===a||_===u)return _};S.BREAK=a,S.RETURN=u},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(w,P,S){var O=P.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=O)},{}],77:[function(w,P,S){var O={}.hasOwnProperty;P.exports=function(T,l){return O.call(T,l)}},{}],78:[function(w,P,S){var O=w("./_object-dp"),T=w("./_property-desc");P.exports=w("./_descriptors")?function(l,p,h){return O.f(l,p,T(1,h))}:function(l,p,h){return l[p]=h,l}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(w,P,S){var O=w("./_global").document;P.exports=O&&O.documentElement},{"./_global":76}],80:[function(w,P,S){P.exports=!w("./_descriptors")&&!w("./_fails")(function(){return Object.defineProperty(w("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(w,P,S){P.exports=function(O,T,l){var p=l===void 0;switch(T.length){case 0:return p?O():O.call(l);case 1:return p?O(T[0]):O.call(l,T[0]);case 2:return p?O(T[0],T[1]):O.call(l,T[0],T[1]);case 3:return p?O(T[0],T[1],T[2]):O.call(l,T[0],T[1],T[2]);case 4:return p?O(T[0],T[1],T[2],T[3]):O.call(l,T[0],T[1],T[2],T[3])}return O.apply(l,T)}},{}],82:[function(w,P,S){var O=w("./_cof");P.exports=Object("z").propertyIsEnumerable(0)?Object:function(T){return O(T)=="String"?T.split(""):Object(T)}},{"./_cof":64}],83:[function(w,P,S){var O=w("./_iterators"),T=w("./_wks")("iterator"),l=Array.prototype;P.exports=function(p){return p!==void 0&&(O.Array===p||l[T]===p)}},{"./_iterators":91,"./_wks":131}],84:[function(w,P,S){var O=w("./_cof");P.exports=Array.isArray||function(T){return O(T)=="Array"}},{"./_cof":64}],85:[function(w,P,S){P.exports=function(O){return typeof O=="object"?O!==null:typeof O=="function"}},{}],86:[function(w,P,S){var O=w("./_an-object");P.exports=function(T,l,p,h){try{return h?l(O(p)[0],p[1]):l(p)}catch(a){var d=T.return;throw d!==void 0&&O(d.call(T)),a}}},{"./_an-object":61}],87:[function(w,P,S){"use strict";var O=w("./_object-create"),T=w("./_property-desc"),l=w("./_set-to-string-tag"),p={};w("./_hide")(p,w("./_wks")("iterator"),function(){return this}),P.exports=function(h,d,a){h.prototype=O(p,{next:T(1,a)}),l(h,d+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(w,P,S){"use strict";var O=w("./_library"),T=w("./_export"),l=w("./_redefine"),p=w("./_hide"),h=w("./_iterators"),d=w("./_iter-create"),a=w("./_set-to-string-tag"),u=w("./_object-gpo"),s=w("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),i=function(){return this};P.exports=function(n,t,c,y,v,_,b){d(c,t,y);var m,g,E,o=function(j){if(!f&&j in D)return D[j];switch(j){case"keys":case"values":return function(){return new c(this,j)}}return function(){return new c(this,j)}},x=t+" Iterator",C=v=="values",A=!1,D=n.prototype,I=D[s]||D["@@iterator"]||v&&D[v],F=I||o(v),H=v?C?o("entries"):F:void 0,te=t=="Array"&&D.entries||I;if(te&&(E=u(te.call(new n)))!==Object.prototype&&E.next&&(a(E,x,!0),O||typeof E[s]=="function"||p(E,s,i)),C&&I&&I.name!=="values"&&(A=!0,F=function(){return I.call(this)}),O&&!b||!f&&!A&&D[s]||p(D,s,F),h[t]=F,h[x]=i,v)if(m={values:C?F:o("values"),keys:_?F:o("keys"),entries:H},b)for(g in m)g in D||l(D,g,m[g]);else T(T.P+T.F*(f||A),t,m);return m}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(w,P,S){var O=w("./_wks")("iterator"),T=!1;try{var l=[7][O]();l.return=function(){T=!0},Array.from(l,function(){throw 2})}catch(p){}P.exports=function(p,h){if(!h&&!T)return!1;var d=!1;try{var a=[7],u=a[O]();u.next=function(){return{done:d=!0}},a[O]=function(){return u},p(a)}catch(s){}return d}},{"./_wks":131}],90:[function(w,P,S){P.exports=function(O,T){return{value:T,done:!!O}}},{}],91:[function(w,P,S){P.exports={}},{}],92:[function(w,P,S){P.exports=!0},{}],93:[function(w,P,S){var O=w("./_uid")("meta"),T=w("./_is-object"),l=w("./_has"),p=w("./_object-dp").f,h=0,d=Object.isExtensible||function(){return!0},a=!w("./_fails")(function(){return d(Object.preventExtensions({}))}),u=function(t){p(t,O,{value:{i:"O"+ ++h,w:{}}})},s=function(t,c){if(!T(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!l(t,O)){if(!d(t))return"F";if(!c)return"E";u(t)}return t[O].i},f=function(t,c){if(!l(t,O)){if(!d(t))return!0;if(!c)return!1;u(t)}return t[O].w},i=function(t){return a&&n.NEED&&d(t)&&!l(t,O)&&u(t),t},n=P.exports={KEY:O,NEED:!1,fastKey:s,getWeak:f,onFreeze:i}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(w,P,S){var O=w("./_global"),T=w("./_task").set,l=O.MutationObserver||O.WebKitMutationObserver,p=O.process,h=O.Promise,d=w("./_cof")(p)=="process";P.exports=function(){var a,u,s,f=function(){var c,y;for(d&&(c=p.domain)&&c.exit();a;){y=a.fn,a=a.next;try{y()}catch(v){throw a?s():u=void 0,v}}u=void 0,c&&c.enter()};if(d)s=function(){p.nextTick(f)};else if(!l||O.navigator&&O.navigator.standalone)if(h&&h.resolve){var i=h.resolve(void 0);s=function(){i.then(f)}}else s=function(){T.call(O,f)};else{var n=!0,t=document.createTextNode("");new l(f).observe(t,{characterData:!0}),s=function(){t.data=n=!n}}return function(c){var y={fn:c,next:void 0};u&&(u.next=y),a||(a=y,s()),u=y}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(w,P,S){"use strict";function O(l){var p,h;this.promise=new l(function(d,a){if(p!==void 0||h!==void 0)throw TypeError("Bad Promise constructor");p=d,h=a}),this.resolve=T(p),this.reject=T(h)}var T=w("./_a-function");P.exports.f=function(l){return new O(l)}},{"./_a-function":58}],96:[function(w,P,S){"use strict";var O=w("./_object-keys"),T=w("./_object-gops"),l=w("./_object-pie"),p=w("./_to-object"),h=w("./_iobject"),d=Object.assign;P.exports=!d||w("./_fails")(function(){var a={},u={},s=Symbol(),f="abcdefghijklmnopqrst";return a[s]=7,f.split("").forEach(function(i){u[i]=i}),d({},a)[s]!=7||Object.keys(d({},u)).join("")!=f})?function(a,u){for(var s=p(a),f=arguments.length,i=1,n=T.f,t=l.f;f>i;)for(var c,y=h(arguments[i++]),v=n?O(y).concat(n(y)):O(y),_=v.length,b=0;_>b;)t.call(y,c=v[b++])&&(s[c]=y[c]);return s}:d},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(w,P,S){var O=w("./_an-object"),T=w("./_object-dps"),l=w("./_enum-bug-keys"),p=w("./_shared-key")("IE_PROTO"),h=function(){},d=function(){var a,u=w("./_dom-create")("iframe"),s=l.length;for(u.style.display="none",w("./_html").appendChild(u),u.src="javascript:",a=u.contentWindow.document,a.open(),a.write(""),a.close(),d=a.F;s--;)delete d.prototype[l[s]];return d()};P.exports=Object.create||function(a,u){var s;return a!==null?(h.prototype=O(a),s=new h,h.prototype=null,s[p]=a):s=d(),u===void 0?s:T(s,u)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(w,P,S){var O=w("./_an-object"),T=w("./_ie8-dom-define"),l=w("./_to-primitive"),p=Object.defineProperty;S.f=w("./_descriptors")?Object.defineProperty:function(h,d,a){if(O(h),d=l(d,!0),O(a),T)try{return p(h,d,a)}catch(u){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(h[d]=a.value),h}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(w,P,S){var O=w("./_object-dp"),T=w("./_an-object"),l=w("./_object-keys");P.exports=w("./_descriptors")?Object.defineProperties:function(p,h){T(p);for(var d,a=l(h),u=a.length,s=0;u>s;)O.f(p,d=a[s++],h[d]);return p}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(w,P,S){var O=w("./_object-pie"),T=w("./_property-desc"),l=w("./_to-iobject"),p=w("./_to-primitive"),h=w("./_has"),d=w("./_ie8-dom-define"),a=Object.getOwnPropertyDescriptor;S.f=w("./_descriptors")?a:function(u,s){if(u=l(u),s=p(s,!0),d)try{return a(u,s)}catch(f){}if(h(u,s))return T(!O.f.call(u,s),u[s])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(w,P,S){var O=w("./_to-iobject"),T=w("./_object-gopn").f,l={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(d){try{return T(d)}catch(a){return p.slice()}};P.exports.f=function(d){return p&&l.call(d)=="[object Window]"?h(d):T(O(d))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(w,P,S){var O=w("./_object-keys-internal"),T=w("./_enum-bug-keys").concat("length","prototype");S.f=Object.getOwnPropertyNames||function(l){return O(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(w,P,S){S.f=Object.getOwnPropertySymbols},{}],104:[function(w,P,S){var O=w("./_has"),T=w("./_to-object"),l=w("./_shared-key")("IE_PROTO"),p=Object.prototype;P.exports=Object.getPrototypeOf||function(h){return h=T(h),O(h,l)?h[l]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?p:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(w,P,S){var O=w("./_has"),T=w("./_to-iobject"),l=w("./_array-includes")(!1),p=w("./_shared-key")("IE_PROTO");P.exports=function(h,d){var a,u=T(h),s=0,f=[];for(a in u)a!=p&&O(u,a)&&f.push(a);for(;d.length>s;)O(u,a=d[s++])&&(~l(f,a)||f.push(a));return f}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(w,P,S){var O=w("./_object-keys-internal"),T=w("./_enum-bug-keys");P.exports=Object.keys||function(l){return O(l,T)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(w,P,S){S.f={}.propertyIsEnumerable},{}],108:[function(w,P,S){var O=w("./_export"),T=w("./_core"),l=w("./_fails");P.exports=function(p,h){var d=(T.Object||{})[p]||Object[p],a={};a[p]=h(d),O(O.S+O.F*l(function(){d(1)}),"Object",a)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(w,P,S){P.exports=function(O){try{return{e:!1,v:O()}}catch(T){return{e:!0,v:T}}}},{}],110:[function(w,P,S){var O=w("./_an-object"),T=w("./_is-object"),l=w("./_new-promise-capability");P.exports=function(p,h){if(O(p),T(h)&&h.constructor===p)return h;var d=l.f(p);return(0,d.resolve)(h),d.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(w,P,S){P.exports=function(O,T){return{enumerable:!(1&O),configurable:!(2&O),writable:!(4&O),value:T}}},{}],112:[function(w,P,S){var O=w("./_hide");P.exports=function(T,l,p){for(var h in l)p&&T[h]?T[h]=l[h]:O(T,h,l[h]);return T}},{"./_hide":78}],113:[function(w,P,S){P.exports=w("./_hide")},{"./_hide":78}],114:[function(w,P,S){"use strict";var O=w("./_global"),T=w("./_core"),l=w("./_object-dp"),p=w("./_descriptors"),h=w("./_wks")("species");P.exports=function(d){var a=typeof T[d]=="function"?T[d]:O[d];p&&a&&!a[h]&&l.f(a,h,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(w,P,S){var O=w("./_object-dp").f,T=w("./_has"),l=w("./_wks")("toStringTag");P.exports=function(p,h,d){p&&!T(p=d?p:p.prototype,l)&&O(p,l,{configurable:!0,value:h})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(w,P,S){var O=w("./_shared")("keys"),T=w("./_uid");P.exports=function(l){return O[l]||(O[l]=T(l))}},{"./_shared":117,"./_uid":127}],117:[function(w,P,S){var O=w("./_core"),T=w("./_global"),l=T["__core-js_shared__"]||(T["__core-js_shared__"]={});(P.exports=function(p,h){return l[p]||(l[p]=h!==void 0?h:{})})("versions",[]).push({version:O.version,mode:w("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(w,P,S){var O=w("./_an-object"),T=w("./_a-function"),l=w("./_wks")("species");P.exports=function(p,h){var d,a=O(p).constructor;return a===void 0||(d=O(a)[l])==null?h:T(d)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(w,P,S){var O=w("./_to-integer"),T=w("./_defined");P.exports=function(l){return function(p,h){var d,a,u=String(T(p)),s=O(h),f=u.length;return s<0||s>=f?l?"":void 0:(d=u.charCodeAt(s),d<55296||d>56319||s+1===f||(a=u.charCodeAt(s+1))<56320||a>57343?l?u.charAt(s):d:l?u.slice(s,s+2):a-56320+(d-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(w,P,S){var O,T,l,p=w("./_ctx"),h=w("./_invoke"),d=w("./_html"),a=w("./_dom-create"),u=w("./_global"),s=u.process,f=u.setImmediate,i=u.clearImmediate,n=u.MessageChannel,t=u.Dispatch,c=0,y={},v=function(){var b=+this;if(y.hasOwnProperty(b)){var m=y[b];delete y[b],m()}},_=function(b){v.call(b.data)};f&&i||(f=function(b){for(var m=[],g=1;arguments.length>g;)m.push(arguments[g++]);return y[++c]=function(){h(typeof b=="function"?b:Function(b),m)},O(c),c},i=function(b){delete y[b]},w("./_cof")(s)=="process"?O=function(b){s.nextTick(p(v,b,1))}:t&&t.now?O=function(b){t.now(p(v,b,1))}:n?(T=new n,l=T.port2,T.port1.onmessage=_,O=p(l.postMessage,l,1)):u.addEventListener&&typeof postMessage=="function"&&!u.importScripts?(O=function(b){u.postMessage(b+"","*")},u.addEventListener("message",_,!1)):O="onreadystatechange"in a("script")?function(b){d.appendChild(a("script")).onreadystatechange=function(){d.removeChild(this),v.call(b)}}:function(b){setTimeout(p(v,b,1),0)}),P.exports={set:f,clear:i}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(w,P,S){var O=w("./_to-integer"),T=Math.max,l=Math.min;P.exports=function(p,h){return p=O(p),p<0?T(p+h,0):l(p,h)}},{"./_to-integer":122}],122:[function(w,P,S){var O=Math.ceil,T=Math.floor;P.exports=function(l){return isNaN(l=+l)?0:(l>0?T:O)(l)}},{}],123:[function(w,P,S){var O=w("./_iobject"),T=w("./_defined");P.exports=function(l){return O(T(l))}},{"./_defined":68,"./_iobject":82}],124:[function(w,P,S){var O=w("./_to-integer"),T=Math.min;P.exports=function(l){return l>0?T(O(l),9007199254740991):0}},{"./_to-integer":122}],125:[function(w,P,S){var O=w("./_defined");P.exports=function(T){return Object(O(T))}},{"./_defined":68}],126:[function(w,P,S){var O=w("./_is-object");P.exports=function(T,l){if(!O(T))return T;var p,h;if(l&&typeof(p=T.toString)=="function"&&!O(h=p.call(T)))return h;if(typeof(p=T.valueOf)=="function"&&!O(h=p.call(T)))return h;if(!l&&typeof(p=T.toString)=="function"&&!O(h=p.call(T)))return h;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(w,P,S){var O=0,T=Math.random();P.exports=function(l){return"Symbol(".concat(l===void 0?"":l,")_",(++O+T).toString(36))}},{}],128:[function(w,P,S){var O=w("./_global"),T=O.navigator;P.exports=T&&T.userAgent||""},{"./_global":76}],129:[function(w,P,S){var O=w("./_global"),T=w("./_core"),l=w("./_library"),p=w("./_wks-ext"),h=w("./_object-dp").f;P.exports=function(d){var a=T.Symbol||(T.Symbol=l?{}:O.Symbol||{});d.charAt(0)=="_"||d in a||h(a,d,{value:p.f(d)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(w,P,S){S.f=w("./_wks")},{"./_wks":131}],131:[function(w,P,S){var O=w("./_shared")("wks"),T=w("./_uid"),l=w("./_global").Symbol,p=typeof l=="function";(P.exports=function(h){return O[h]||(O[h]=p&&l[h]||(p?l:T)("Symbol."+h))}).store=O},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(w,P,S){var O=w("./_classof"),T=w("./_wks")("iterator"),l=w("./_iterators");P.exports=w("./_core").getIteratorMethod=function(p){if(p!=null)return p[T]||p["@@iterator"]||l[O(p)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(w,P,S){"use strict";var O=w("./_ctx"),T=w("./_export"),l=w("./_to-object"),p=w("./_iter-call"),h=w("./_is-array-iter"),d=w("./_to-length"),a=w("./_create-property"),u=w("./core.get-iterator-method");T(T.S+T.F*!w("./_iter-detect")(function(s){Array.from(s)}),"Array",{from:function(s){var f,i,n,t,c=l(s),y=typeof this=="function"?this:Array,v=arguments.length,_=v>1?arguments[1]:void 0,b=_!==void 0,m=0,g=u(c);if(b&&(_=O(_,v>2?arguments[2]:void 0,2)),g==null||y==Array&&h(g))for(f=d(c.length),i=new y(f);f>m;m++)a(i,m,b?_(c[m],m):c[m]);else for(t=g.call(c),i=new y;!(n=t.next()).done;m++)a(i,m,b?p(t,_,[n.value,m],!0):n.value);return i.length=m,i}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(w,P,S){"use strict";var O=w("./_add-to-unscopables"),T=w("./_iter-step"),l=w("./_iterators"),p=w("./_to-iobject");P.exports=w("./_iter-define")(Array,"Array",function(h,d){this._t=p(h),this._i=0,this._k=d},function(){var h=this._t,d=this._k,a=this._i++;return!h||a>=h.length?(this._t=void 0,T(1)):d=="keys"?T(0,a):d=="values"?T(0,h[a]):T(0,[a,h[a]])},"values"),l.Arguments=l.Array,O("keys"),O("values"),O("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(w,P,S){"use strict";var O=w("./_is-object"),T=w("./_object-gpo"),l=w("./_wks")("hasInstance"),p=Function.prototype;l in p||w("./_object-dp").f(p,l,{value:function(h){if(typeof this!="function"||!O(h))return!1;if(!O(this.prototype))return h instanceof this;for(;h=T(h);)if(this.prototype===h)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(w,P,S){var O=w("./_export");O(O.S+O.F,"Object",{assign:w("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(w,P,S){var O=w("./_export");O(O.S,"Object",{create:w("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(w,P,S){var O=w("./_export");O(O.S+O.F*!w("./_descriptors"),"Object",{defineProperty:w("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(w,P,S){w("./_object-sap")("getOwnPropertyNames",function(){return w("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(w,P,S){var O=w("./_to-object"),T=w("./_object-gpo");w("./_object-sap")("getPrototypeOf",function(){return function(l){return T(O(l))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(w,P,S){var O=w("./_to-object"),T=w("./_object-keys");w("./_object-sap")("keys",function(){return function(l){return T(O(l))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(w,P,S){arguments[4][36][0].apply(S,arguments)},{dup:36}],143:[function(w,P,S){"use strict";var O,T,l,p,h=w("./_library"),d=w("./_global"),a=w("./_ctx"),u=w("./_classof"),s=w("./_export"),f=w("./_is-object"),i=w("./_a-function"),n=w("./_an-instance"),t=w("./_for-of"),c=w("./_species-constructor"),y=w("./_task").set,v=w("./_microtask")(),_=w("./_new-promise-capability"),b=w("./_perform"),m=w("./_user-agent"),g=w("./_promise-resolve"),E=d.TypeError,o=d.process,x=o&&o.versions,C=x&&x.v8||"",A=d.Promise,D=u(o)=="process",I=function(){},F=T=_.f,H=!!function(){try{var ie=A.resolve(1),oe=(ie.constructor={})[w("./_wks")("species")]=function(Ee){Ee(I,I)};return(D||typeof PromiseRejectionEvent=="function")&&ie.then(I)instanceof oe&&C.indexOf("6.6")!==0&&m.indexOf("Chrome/66")===-1}catch(Ee){}}(),te=function(ie){var oe;return!(!f(ie)||typeof(oe=ie.then)!="function")&&oe},j=function(ie,oe){if(!ie._n){ie._n=!0;var Ee=ie._c;v(function(){for(var ye=ie._v,Le=ie._s==1,pe=0;Ee.length>pe;)!function(Ce){var Be,Pe,ke,Ne=Le?Ce.ok:Ce.fail,he=Ce.resolve,ue=Ce.reject,Ie=Ce.domain;try{Ne?(Le||(ie._h==2&&J(ie),ie._h=1),Ne===!0?Be=ye:(Ie&&Ie.enter(),Be=Ne(ye),Ie&&(Ie.exit(),ke=!0)),Be===Ce.promise?ue(E("Promise-chain cycle")):(Pe=te(Be))?Pe.call(Be,he,ue):he(Be)):ue(ye)}catch(Ue){Ie&&!ke&&Ie.exit(),ue(Ue)}}(Ee[pe++]);ie._c=[],ie._n=!1,oe&&!ie._h&&G(ie)})}},G=function(ie){y.call(d,function(){var oe,Ee,ye,Le=ie._v,pe=X(ie);if(pe&&(oe=b(function(){D?o.emit("unhandledRejection",Le,ie):(Ee=d.onunhandledrejection)?Ee({promise:ie,reason:Le}):(ye=d.console)&&ye.error&&ye.error("Unhandled promise rejection",Le)}),ie._h=D||X(ie)?2:1),ie._a=void 0,pe&&oe.e)throw oe.v})},X=function(ie){return ie._h!==1&&(ie._a||ie._c).length===0},J=function(ie){y.call(d,function(){var oe;D?o.emit("rejectionHandled",ie):(oe=d.onrejectionhandled)&&oe({promise:ie,reason:ie._v})})},B=function(ie){var oe=this;oe._d||(oe._d=!0,oe=oe._w||oe,oe._v=ie,oe._s=2,oe._a||(oe._a=oe._c.slice()),j(oe,!0))},Q=function(ie){var oe,Ee=this;if(!Ee._d){Ee._d=!0,Ee=Ee._w||Ee;try{if(Ee===ie)throw E("Promise can't be resolved itself");(oe=te(ie))?v(function(){var ye={_w:Ee,_d:!1};try{oe.call(ie,a(Q,ye,1),a(B,ye,1))}catch(Le){B.call(ye,Le)}}):(Ee._v=ie,Ee._s=1,j(Ee,!1))}catch(ye){B.call({_w:Ee,_d:!1},ye)}}};H||(A=function(ie){n(this,A,"Promise","_h"),i(ie),O.call(this);try{ie(a(Q,this,1),a(B,this,1))}catch(oe){B.call(this,oe)}},O=function(ie){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},O.prototype=w("./_redefine-all")(A.prototype,{then:function(ie,oe){var Ee=F(c(this,A));return Ee.ok=typeof ie!="function"||ie,Ee.fail=typeof oe=="function"&&oe,Ee.domain=D?o.domain:void 0,this._c.push(Ee),this._a&&this._a.push(Ee),this._s&&j(this,!1),Ee.promise},catch:function(ie){return this.then(void 0,ie)}}),l=function(){var ie=new O;this.promise=ie,this.resolve=a(Q,ie,1),this.reject=a(B,ie,1)},_.f=F=function(ie){return ie===A||ie===p?new l(ie):T(ie)}),s(s.G+s.W+s.F*!H,{Promise:A}),w("./_set-to-string-tag")(A,"Promise"),w("./_set-species")("Promise"),p=w("./_core").Promise,s(s.S+s.F*!H,"Promise",{reject:function(ie){var oe=F(this);return(0,oe.reject)(ie),oe.promise}}),s(s.S+s.F*(h||!H),"Promise",{resolve:function(ie){return g(h&&this===p?A:this,ie)}}),s(s.S+s.F*!(H&&w("./_iter-detect")(function(ie){A.all(ie).catch(I)})),"Promise",{all:function(ie){var oe=this,Ee=F(oe),ye=Ee.resolve,Le=Ee.reject,pe=b(function(){var Ce=[],Be=0,Pe=1;t(ie,!1,function(ke){var Ne=Be++,he=!1;Ce.push(void 0),Pe++,oe.resolve(ke).then(function(ue){he||(he=!0,Ce[Ne]=ue,--Pe||ye(Ce))},Le)}),--Pe||ye(Ce)});return pe.e&&Le(pe.v),Ee.promise},race:function(ie){var oe=this,Ee=F(oe),ye=Ee.reject,Le=b(function(){t(ie,!1,function(pe){oe.resolve(pe).then(Ee.resolve,ye)})});return Le.e&&ye(Le.v),Ee.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(w,P,S){var O=w("./_export"),T=w("./_to-absolute-index"),l=String.fromCharCode,p=String.fromCodePoint;O(O.S+O.F*(!!p&&p.length!=1),"String",{fromCodePoint:function(h){for(var d,a=[],u=arguments.length,s=0;u>s;){if(d=+arguments[s++],T(d,1114111)!==d)throw RangeError(d+" is not a valid code point");a.push(d<65536?l(d):l(55296+((d-=65536)>>10),d%1024+56320))}return a.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(w,P,S){"use strict";var O=w("./_string-at")(!0);w("./_iter-define")(String,"String",function(T){this._t=String(T),this._i=0},function(){var T,l=this._t,p=this._i;return p>=l.length?{value:void 0,done:!0}:(T=O(l,p),this._i+=T.length,{value:T,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(w,P,S){"use strict";var O=w("./_global"),T=w("./_has"),l=w("./_descriptors"),p=w("./_export"),h=w("./_redefine"),d=w("./_meta").KEY,a=w("./_fails"),u=w("./_shared"),s=w("./_set-to-string-tag"),f=w("./_uid"),i=w("./_wks"),n=w("./_wks-ext"),t=w("./_wks-define"),c=w("./_enum-keys"),y=w("./_is-array"),v=w("./_an-object"),_=w("./_is-object"),b=w("./_to-iobject"),m=w("./_to-primitive"),g=w("./_property-desc"),E=w("./_object-create"),o=w("./_object-gopn-ext"),x=w("./_object-gopd"),C=w("./_object-dp"),A=w("./_object-keys"),D=x.f,I=C.f,F=o.f,H=O.Symbol,te=O.JSON,j=te&&te.stringify,G=i("_hidden"),X=i("toPrimitive"),J={}.propertyIsEnumerable,B=u("symbol-registry"),Q=u("symbols"),ie=u("op-symbols"),oe=Object.prototype,Ee=typeof H=="function",ye=O.QObject,Le=!ye||!ye.prototype||!ye.prototype.findChild,pe=l&&a(function(){return E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a!=7})?function($,V,Y){var me=D(oe,V);me&&delete oe[V],I($,V,Y),me&&$!==oe&&I(oe,V,me)}:I,Ce=function($){var V=Q[$]=E(H.prototype);return V._k=$,V},Be=Ee&&typeof H.iterator=="symbol"?function($){return typeof $=="symbol"}:function($){return $ instanceof H},Pe=function($,V,Y){return $===oe&&Pe(ie,V,Y),v($),V=m(V,!0),v(Y),T(Q,V)?(Y.enumerable?(T($,G)&&$[G][V]&&($[G][V]=!1),Y=E(Y,{enumerable:g(0,!1)})):(T($,G)||I($,G,g(1,{})),$[G][V]=!0),pe($,V,Y)):I($,V,Y)},ke=function($,V){v($);for(var Y,me=c(V=b(V)),Re=0,rt=me.length;rt>Re;)Pe($,Y=me[Re++],V[Y]);return $},Ne=function($,V){return V===void 0?E($):ke(E($),V)},he=function($){var V=J.call(this,$=m($,!0));return!(this===oe&&T(Q,$)&&!T(ie,$))&&(!(V||!T(this,$)||!T(Q,$)||T(this,G)&&this[G][$])||V)},ue=function($,V){if($=b($),V=m(V,!0),$!==oe||!T(Q,V)||T(ie,V)){var Y=D($,V);return!Y||!T(Q,V)||T($,G)&&$[G][V]||(Y.enumerable=!0),Y}},Ie=function($){for(var V,Y=F(b($)),me=[],Re=0;Y.length>Re;)T(Q,V=Y[Re++])||V==G||V==d||me.push(V);return me},Ue=function($){for(var V,Y=$===oe,me=F(Y?ie:b($)),Re=[],rt=0;me.length>rt;)!T(Q,V=me[rt++])||Y&&!T(oe,V)||Re.push(Q[V]);return Re};Ee||(H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor!");var $=f(arguments.length>0?arguments[0]:void 0),V=function(Y){this===oe&&V.call(ie,Y),T(this,G)&&T(this[G],$)&&(this[G][$]=!1),pe(this,$,g(1,Y))};return l&&Le&&pe(oe,$,{configurable:!0,set:V}),Ce($)},h(H.prototype,"toString",function(){return this._k}),x.f=ue,C.f=Pe,w("./_object-gopn").f=o.f=Ie,w("./_object-pie").f=he,w("./_object-gops").f=Ue,l&&!w("./_library")&&h(oe,"propertyIsEnumerable",he,!0),n.f=function($){return Ce(i($))}),p(p.G+p.W+p.F*!Ee,{Symbol:H});for(var Ye="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Ye.length>ee;)i(Ye[ee++]);for(var M=A(i.store),N=0;M.length>N;)t(M[N++]);p(p.S+p.F*!Ee,"Symbol",{for:function($){return T(B,$+="")?B[$]:B[$]=H($)},keyFor:function($){if(!Be($))throw TypeError($+" is not a symbol!");for(var V in B)if(B[V]===$)return V},useSetter:function(){Le=!0},useSimple:function(){Le=!1}}),p(p.S+p.F*!Ee,"Object",{create:Ne,defineProperty:Pe,defineProperties:ke,getOwnPropertyDescriptor:ue,getOwnPropertyNames:Ie,getOwnPropertySymbols:Ue}),te&&p(p.S+p.F*(!Ee||a(function(){var $=H();return j([$])!="[null]"||j({a:$})!="{}"||j(Object($))!="{}"})),"JSON",{stringify:function($){for(var V,Y,me=[$],Re=1;arguments.length>Re;)me.push(arguments[Re++]);if(Y=V=me[1],(_(V)||$!==void 0)&&!Be($))return y(V)||(V=function(rt,De){if(typeof Y=="function"&&(De=Y.call(this,rt,De)),!Be(De))return De}),me[1]=V,j.apply(te,me)}}),H.prototype[X]||w("./_hide")(H.prototype,X,H.prototype.valueOf),s(H,"Symbol"),s(Math,"Math",!0),s(O.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(w,P,S){"use strict";var O=w("./_export"),T=w("./_core"),l=w("./_global"),p=w("./_species-constructor"),h=w("./_promise-resolve");O(O.P+O.R,"Promise",{finally:function(d){var a=p(this,T.Promise||l.Promise),u=typeof d=="function";return this.then(u?function(s){return h(a,d()).then(function(){return s})}:d,u?function(s){return h(a,d()).then(function(){throw s})}:d)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(w,P,S){"use strict";var O=w("./_export"),T=w("./_new-promise-capability"),l=w("./_perform");O(O.S,"Promise",{try:function(p){var h=T.f(this),d=l(p);return(d.e?h.reject:h.resolve)(d.v),h.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(w,P,S){w("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(w,P,S){w("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(w,P,S){w("./es6.array.iterator");for(var O=w("./_global"),T=w("./_hide"),l=w("./_iterators"),p=w("./_wks")("toStringTag"),h="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),d=0;d0?"-":"+")+p(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][b%10>3?0:(b%100-b%10!=10)*b%10],W:I,N:F};return t.replace(s,function(te){return te in H?H[te]:te.slice(1,te.length-1)})}}();u.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},u.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof U=="function"&&U.amd?U(function(){return u}):(S===void 0?"undefined":(0,T.default)(S))==="object"?P.exports=u:l.dateFormat=u}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(w,P,S){(function(O){function T(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(a){var u=this.useColors;if(a[0]=(u?"%c":"")+this.namespace+(u?" %c":" ")+a[0]+(u?"%c ":" ")+"+"+S.humanize(this.diff),u){var s="color: "+this.color;a.splice(1,0,s,"color: inherit");var f=0,i=0;a[0].replace(/%[a-zA-Z%]/g,function(n){n!=="%%"&&(f++,n==="%c"&&(i=f))}),a.splice(i,0,s)}}function p(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function h(a){try{a==null?S.storage.removeItem("debug"):S.storage.debug=a}catch(u){}}function d(){var a;try{a=S.storage.debug}catch(u){}return!a&&O!==void 0&&"env"in O&&(a=O.env.DEBUG),a}S=P.exports=w("./debug"),S.log=p,S.formatArgs=l,S.save=h,S.load=d,S.useColors=T,S.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(a){}}(),S.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],S.formatters.j=function(a){try{return JSON.stringify(a)}catch(u){return"[UnexpectedJSONParseError]: "+u.message}},S.enable(d())}).call(this,w("_process"))},{"./debug":156,_process:173}],156:[function(w,P,S){function O(u){var s,f=0;for(s in u)f=(f<<5)-f+u.charCodeAt(s),f|=0;return S.colors[Math.abs(f)%S.colors.length]}function T(u){function s(){if(s.enabled){var f=s,i=+new Date,n=i-(a||i);f.diff=n,f.prev=a,f.curr=i,a=i;for(var t=new Array(arguments.length),c=0;c]/;P.exports=O},{}],158:[function(w,P,S){function O(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function T(d){return typeof d=="function"}function l(d){return typeof d=="number"}function p(d){return typeof d=="object"&&d!==null}function h(d){return d===void 0}P.exports=O,O.EventEmitter=O,O.prototype._events=void 0,O.prototype._maxListeners=void 0,O.defaultMaxListeners=10,O.prototype.setMaxListeners=function(d){if(!l(d)||d<0||isNaN(d))throw TypeError("n must be a positive number");return this._maxListeners=d,this},O.prototype.emit=function(d){var a,u,s,f,i,n;if(this._events||(this._events={}),d==="error"&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if((a=arguments[1])instanceof Error)throw a;var t=new Error('Uncaught, unspecified "error" event. ('+a+")");throw t.context=a,t}if(u=this._events[d],h(u))return!1;if(T(u))switch(arguments.length){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),u.apply(this,f)}else if(p(u))for(f=Array.prototype.slice.call(arguments,1),n=u.slice(),s=n.length,i=0;i0&&this._events[d].length>u&&(this._events[d].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[d].length),typeof console.trace=="function"&&console.trace()),this},O.prototype.on=O.prototype.addListener,O.prototype.once=function(d,a){function u(){this.removeListener(d,u),s||(s=!0,a.apply(this,arguments))}if(!T(a))throw TypeError("listener must be a function");var s=!1;return u.listener=a,this.on(d,u),this},O.prototype.removeListener=function(d,a){var u,s,f,i;if(!T(a))throw TypeError("listener must be a function");if(!this._events||!this._events[d])return this;if(u=this._events[d],f=u.length,s=-1,u===a||T(u.listener)&&u.listener===a)delete this._events[d],this._events.removeListener&&this.emit("removeListener",d,a);else if(p(u)){for(i=f;i-- >0;)if(u[i]===a||u[i].listener&&u[i].listener===a){s=i;break}if(s<0)return this;u.length===1?(u.length=0,delete this._events[d]):u.splice(s,1),this._events.removeListener&&this.emit("removeListener",d,a)}return this},O.prototype.removeAllListeners=function(d){var a,u;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[d]&&delete this._events[d],this;if(arguments.length===0){for(a in this._events)a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events={},this}if(u=this._events[d],T(u))this.removeListener(d,u);else if(u)for(;u.length;)this.removeListener(d,u[u.length-1]);return delete this._events[d],this},O.prototype.listeners=function(d){return this._events&&this._events[d]?T(this._events[d])?[this._events[d]]:this._events[d].slice():[]},O.prototype.listenerCount=function(d){if(this._events){var a=this._events[d];if(T(a))return 1;if(a)return a.length}return 0},O.listenerCount=function(d,a){return d.listenerCount(a)}},{}],159:[function(w,P,S){var O=w("http"),T=P.exports;for(var l in O)O.hasOwnProperty(l)&&(T[l]=O[l]);T.request=function(p,h){return p||(p={}),p.scheme="https",p.protocol="https:",O.request.call(this,p,h)}},{http:196}],160:[function(w,P,S){"use strict";var O=w("util"),T=w("ms");P.exports=function(l){if(typeof l=="number")return l;var p=T(l);if(p===void 0){var h=new Error(O.format("humanize-ms(%j) result undefined",l));console.warn(h.stack)}return p}},{ms:169,util:207}],161:[function(w,P,S){S.read=function(O,T,l,p,h){var d,a,u=8*h-p-1,s=(1<>1,i=-7,n=l?h-1:0,t=l?-1:1,c=O[T+n];for(n+=t,d=c&(1<<-i)-1,c>>=-i,i+=u;i>0;d=256*d+O[T+n],n+=t,i-=8);for(a=d&(1<<-i)-1,d>>=-i,i+=p;i>0;a=256*a+O[T+n],n+=t,i-=8);if(d===0)d=1-f;else{if(d===s)return a?NaN:1/0*(c?-1:1);a+=Math.pow(2,p),d-=f}return(c?-1:1)*a*Math.pow(2,d-p)},S.write=function(O,T,l,p,h,d){var a,u,s,f=8*d-h-1,i=(1<>1,t=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=p?0:d-1,y=p?1:-1,v=T<0||T===0&&1/T<0?1:0;for(T=Math.abs(T),isNaN(T)||T===1/0?(u=isNaN(T)?1:0,a=i):(a=Math.floor(Math.log(T)/Math.LN2),T*(s=Math.pow(2,-a))<1&&(a--,s*=2),T+=a+n>=1?t/s:t*Math.pow(2,1-n),T*s>=2&&(a++,s/=2),a+n>=i?(u=0,a=i):a+n>=1?(u=(T*s-1)*Math.pow(2,h),a+=n):(u=T*Math.pow(2,n-1)*Math.pow(2,h),a=0));h>=8;O[l+c]=255&u,c+=y,u/=256,h-=8);for(a=a<0;O[l+c]=255&a,c+=y,a/=256,f-=8);O[l+c-y]|=128*v}},{}],162:[function(w,P,S){typeof Object.create=="function"?P.exports=function(O,T){O.super_=T,O.prototype=Object.create(T.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}})}:P.exports=function(O,T){O.super_=T;var l=function(){};l.prototype=T.prototype,O.prototype=new l,O.prototype.constructor=O}},{}],163:[function(w,P,S){function O(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function T(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&O(l.slice(0,0))}P.exports=function(l){return l!=null&&(O(l)||T(l)||!!l._isBuffer)}},{}],164:[function(w,P,S){!function(O){function T(h){return p.call(h).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function l(h){return typeof h=="function"&&(/^class(\s|\{\}$)/.test(p.call(h))||/^.*classCallCheck\(/.test(T(h)))}var p=Function.prototype.toString;S!==void 0?(P!==void 0&&P.exports&&(S=P.exports=l),S.isClass=l):typeof U=="function"&&U.amd?U([],function(){return l}):O.isClass=l}(this)},{}],165:[function(w,P,S){"use strict";function O(d){var a=d.slice(2);return a=a[0].toLowerCase()+a.slice(1)}var T=w("core-util-is"),l=w("isstream"),p=w("is-class");Object.keys(T).map(function(d){S[O(d)]=T[d]}),S.stream=l,S.readableStream=l.isReadable,S.writableStream=l.isWritable,S.duplexStream=l.isDuplex,S.class=p,S.finite=function(d){return Number.isFinite(d)},S.NaN=function(d){return Number.isNaN(d)},S.generator=function(d){return d&&typeof d.next=="function"&&typeof d.throw=="function"},S.generatorFunction=function(d){return d&&d.constructor&&d.constructor.name==="GeneratorFunction"},S.asyncFunction=function(d){return d&&d.constructor&&d.constructor.name==="AsyncFunction"},S.promise=function(d){return d&&typeof d.then=="function"};var h=Math.pow(2,31);S.int=function(d){return T.isNumber(d)&&d%1==0},S.int32=function(d){return S.int(d)&&d=-h},S.long=function(d){return S.int(d)&&(d>=h||d<-h)},S.Long=function(d){return S.object(d)&&S.number(d.high)&&S.number(d.low)},S.double=function(d){return T.isNumber(d)&&!isNaN(d)&&d%1!=0},S.date=function(d){return d instanceof Date},S.regExp=function(d){return d instanceof RegExp},S.regexp=S.regExp,S.error=function(d){return d instanceof Error},S.array=function(d){return Array.isArray(d)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(w,P,S){var O={}.toString;P.exports=Array.isArray||function(T){return O.call(T)=="[object Array]"}},{}],167:[function(w,P,S){function O(d){return d instanceof h.Stream}function T(d){return O(d)&&typeof d._read=="function"&&typeof d._readableState=="object"}function l(d){return O(d)&&typeof d._write=="function"&&typeof d._writableState=="object"}function p(d){return T(d)&&l(d)}var h=w("stream");P.exports=O,P.exports.isReadable=T,P.exports.isWritable=l,P.exports.isDuplex=p},{stream:195}],168:[function(w,P,S){"use strict";function O(l,p,h){if(!l)throw new TypeError("argument dest is required");if(!p)throw new TypeError("argument src is required");return h===void 0&&(h=!0),Object.getOwnPropertyNames(p).forEach(function(d){if(h||!T.call(l,d)){var a=Object.getOwnPropertyDescriptor(p,d);Object.defineProperty(l,d,a)}}),l}P.exports=O;var T=Object.prototype.hasOwnProperty},{}],169:[function(w,P,S){function O(f){if(f=String(f),!(f.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(f);if(i){var n=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*s;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"hrs":case"hr":case"h":return n*a;case"minutes":case"minute":case"mins":case"min":case"m":return n*d;case"seconds":case"second":case"secs":case"sec":case"s":return n*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function T(f){return f>=u?Math.round(f/u)+"d":f>=a?Math.round(f/a)+"h":f>=d?Math.round(f/d)+"m":f>=h?Math.round(f/h)+"s":f+"ms"}function l(f){return p(f,u,"day")||p(f,a,"hour")||p(f,d,"minute")||p(f,h,"second")||f+" ms"}function p(f,i,n){if(!(f0)return O(f);if(n==="number"&&isNaN(f)===!1)return i.long?l(f):T(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))}},{}],170:[function(w,P,S){(function(O){function T(d,a){for(var u=0,s=d.length-1;s>=0;s--){var f=d[s];f==="."?d.splice(s,1):f===".."?(d.splice(s,1),u++):u&&(d.splice(s,1),u--)}if(a)for(;u--;u)d.unshift("..");return d}function l(d){typeof d!="string"&&(d+="");var a,u=0,s=-1,f=!0;for(a=d.length-1;a>=0;--a)if(d.charCodeAt(a)===47){if(!f){u=a+1;break}}else s===-1&&(f=!1,s=a+1);return s===-1?"":d.slice(u,s)}function p(d,a){if(d.filter)return d.filter(a);for(var u=[],s=0;s=-1&&!a;u--){var s=u>=0?arguments[u]:O.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");s&&(d=s+"/"+d,a=s.charAt(0)==="/")}return d=T(p(d.split("/"),function(f){return!!f}),!a).join("/"),(a?"/":"")+d||"."},S.normalize=function(d){var a=S.isAbsolute(d),u=h(d,-1)==="/";return d=T(p(d.split("/"),function(s){return!!s}),!a).join("/"),d||a||(d="."),d&&u&&(d+="/"),(a?"/":"")+d},S.isAbsolute=function(d){return d.charAt(0)==="/"},S.join=function(){var d=Array.prototype.slice.call(arguments,0);return S.normalize(p(d,function(a,u){if(typeof a!="string")throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))},S.relative=function(d,a){function u(y){for(var v=0;v=0&&y[_]==="";_--);return v>_?[]:y.slice(v,_-v+1)}d=S.resolve(d).substr(1),a=S.resolve(a).substr(1);for(var s=u(d.split("/")),f=u(a.split("/")),i=Math.min(s.length,f.length),n=i,t=0;t=1;--i)if((a=d.charCodeAt(i))===47){if(!f){s=i;break}}else f=!1;return s===-1?u?"/":".":u&&s===1?"/":d.slice(0,s)},S.basename=function(d,a){var u=l(d);return a&&u.substr(-1*a.length)===a&&(u=u.substr(0,u.length-a.length)),u},S.extname=function(d){typeof d!="string"&&(d+="");for(var a=-1,u=0,s=-1,f=!0,i=0,n=d.length-1;n>=0;--n){var t=d.charCodeAt(n);if(t!==47)s===-1&&(f=!1,s=n+1),t===46?a===-1?a=n:i!==1&&(i=1):a!==-1&&(i=-1);else if(!f){u=n+1;break}}return a===-1||s===-1||i===0||i===1&&a===s-1&&a===u+1?"":d.slice(a,s)};var h="ab".substr(-1)==="b"?function(d,a,u){return d.substr(a,u)}:function(d,a,u){return a<0&&(a=d.length+a),d.substr(a,u)}}).call(this,w("_process"))},{_process:173}],171:[function(w,P,S){(function(O){(function(){"use strict";function T(C){return C=String(C),C.charAt(0).toUpperCase()+C.slice(1)}function l(C,A,D){var I={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return A&&D&&/^Win/i.test(C)&&!/^Windows Phone /i.test(C)&&(I=I[/[\d.]+$/.exec(C)])&&(C="Windows "+I),C=String(C),A&&D&&(C=C.replace(RegExp(A,"i"),D)),C=h(C.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function p(C,A){var D=-1,I=C?C.length:0;if(typeof I=="number"&&I>-1&&I<=b)for(;++D3&&"WebKit"||/\bOpera\b/.test(Ue)&&(/\bOPR\b/.test(C)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(C)&&!/^(?:Trident|EdgeHTML)$/.test(Ie)&&"WebKit"||!Ie&&/\bMSIE\b/i.test(C)&&(M=="Mac OS"?"Tasman":"Trident")||Ie=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ue)&&"NetFront")&&(Ie=[j]),Ue=="IE"&&(j=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(C)||0)[1])?(Ue+=" Mobile",M="Windows Phone "+(/\+$/.test(j)?j:j+".x"),ke.unshift("desktop mode")):/\bWPDesktop\b/i.test(C)?(Ue="IE Mobile",M="Windows Phone 8.x",ke.unshift("desktop mode"),ue||(ue=(/\brv:([\d.]+)/.exec(C)||0)[1])):Ue!="IE"&&Ie=="Trident"&&(j=/\brv:([\d.]+)/.exec(C))&&(Ue&&ke.push("identifying as "+Ue+(ue?" "+ue:"")),Ue="IE",ue=j[1]),he){if(u(I,"global"))if(oe&&(j=oe.lang.System,Pe=j.getProperty("os.arch"),M=M||j.getProperty("os.name")+" "+j.getProperty("os.version")),Ee){try{ue=I.require("ringo/engine").version.join("."),Ue="RingoJS"}catch($){(j=I.system)&&j.global.system==I.system&&(Ue="Narwhal",M||(M=j[0].os||null))}Ue||(Ue="Rhino")}else typeof I.process=="object"&&!I.process.browser&&(j=I.process)&&(typeof j.versions=="object"&&(typeof j.versions.electron=="string"?(ke.push("Node "+j.versions.node),Ue="Electron",ue=j.versions.electron):typeof j.versions.nw=="string"&&(ke.push("Chromium "+ue,"Node "+j.versions.node),Ue="NW.js",ue=j.versions.nw)),Ue||(Ue="Node.js",Pe=j.arch,M=j.platform,ue=/[\d.]+/.exec(j.version),ue=ue?ue[0]:null));else a(j=I.runtime)==J?(Ue="Adobe AIR",M=j.flash.system.Capabilities.os):a(j=I.phantom)==ie?(Ue="PhantomJS",ue=(j=j.version||null)&&j.major+"."+j.minor+"."+j.patch):typeof pe.documentMode=="number"&&(j=/\bTrident\/(\d+)/i.exec(C))?(ue=[ue,pe.documentMode],(j=+j[1]+4)!=ue[1]&&(ke.push("IE "+ue[1]+" mode"),Ie&&(Ie[1]=""),ue[1]=j),ue=Ue=="IE"?String(ue[1].toFixed(1)):ue[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ue)&&(ke.push("masking as "+Ue+" "+ue),Ue="IE",ue="11.0",Ie=["Trident"],M="Windows");M=M&&h(M)}if(ue&&(j=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(ue)||/(?:alpha|beta)(?: ?\d)?/i.exec(C+";"+(he&&H.appMinorVersion))||/\bMinefield\b/i.test(C)&&"a")&&(Ne=/b/i.test(j)?"beta":"alpha",ue=ue.replace(RegExp(j+"\\+?$"),"")+(Ne=="beta"?Le:ye)+(/\d+\+?/.exec(j)||"")),Ue=="Fennec"||Ue=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(M))Ue="Firefox Mobile";else if(Ue=="Maxthon"&&ue)ue=ue.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ye))Ye=="Xbox 360"&&(M=null),Ye=="Xbox 360"&&/\bIEMobile\b/.test(C)&&ke.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ue)&&(!Ue||Ye||/Browser|Mobi/.test(Ue))||M!="Windows CE"&&!/Mobi/i.test(C))if(Ue=="IE"&&he)try{I.external===null&&ke.unshift("platform preview")}catch($){ke.unshift("embedded")}else(/\bBlackBerry\b/.test(Ye)||/\bBB10\b/.test(C))&&(j=(RegExp(Ye.replace(/ +/g," *")+"/([.\\d]+)","i").exec(C)||0)[1]||ue)?(j=[j,/BB10/.test(C)],M=(j[1]?(Ye=null,ee="BlackBerry"):"Device Software")+" "+j[0],ue=null):this!=d&&Ye!="Wii"&&(he&&Ce||/Opera/.test(Ue)&&/\b(?:MSIE|Firefox)\b/i.test(C)||Ue=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(M)||Ue=="IE"&&(M&&!/^Win/.test(M)&&ue>5.5||/\bWindows XP\b/.test(M)&&ue>8||ue==8&&!/\bTrident\b/.test(C)))&&!m.test(j=n.call(d,C.replace(m,"")+";"))&&j.name&&(j="ing as "+j.name+((j=j.version)?" "+j:""),m.test(Ue)?(/\bIE\b/.test(j)&&M=="Mac OS"&&(M=null),j="identify"+j):(j="mask"+j,Ue=Be?h(Be.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(j)&&(M=null),he||(ue=null)),Ie=["Presto"],ke.push(j));else Ue+=" Mobile";(j=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(C)||0)[1])&&(j=[parseFloat(j.replace(/\.(\d)$/,".0$1")),j],Ue=="Safari"&&j[1].slice(-1)=="+"?(Ue="WebKit Nightly",Ne="alpha",ue=j[1].slice(0,-1)):ue!=j[1]&&ue!=(j[2]=(/\bSafari\/([\d.]+\+?)/i.exec(C)||0)[1])||(ue=null),j[1]=(/\bChrome\/([\d.]+)/i.exec(C)||0)[1],j[0]==537.36&&j[2]==537.36&&parseFloat(j[1])>=28&&Ie=="WebKit"&&(Ie=["Blink"]),he&&(X||j[1])?(Ie&&(Ie[1]="like Chrome"),j=j[1]||(j=j[0],j<530?1:j<532?2:j<532.05?3:j<533?4:j<534.03?5:j<534.07?6:j<534.1?7:j<534.13?8:j<534.16?9:j<534.24?10:j<534.3?11:j<535.01?12:j<535.02?"13+":j<535.07?15:j<535.11?16:j<535.19?17:j<536.05?18:j<536.1?19:j<537.01?20:j<537.11?"21+":j<537.13?23:j<537.18?24:j<537.24?25:j<537.36?26:Ie!="Blink"?"27":"28")):(Ie&&(Ie[1]="like Safari"),j=j[0],j=j<400?1:j<500?2:j<526?3:j<533?4:j<534?"4+":j<535?5:j<537?6:j<538?7:j<601?8:"8"),Ie&&(Ie[1]+=" "+(j+=typeof j=="number"?".x":/[.+]/.test(j)?"":"+")),Ue=="Safari"&&(!ue||parseInt(ue)>45)&&(ue=j)),Ue=="Opera"&&(j=/\bzbov|zvav$/.exec(M))?(Ue+=" ",ke.unshift("desktop mode"),j=="zvav"?(Ue+="Mini",ue=null):Ue+="Mobile",M=M.replace(RegExp(" *"+j+"$"),"")):Ue=="Safari"&&/\bChrome\b/.exec(Ie&&Ie[1])&&(ke.unshift("desktop mode"),Ue="Chrome Mobile",ue=null,/\bOS X\b/.test(M)?(ee="Apple",M="iOS 4.3+"):M=null),ue&&ue.indexOf(j=/[\d.]+$/.exec(M))==0&&C.indexOf("/"+j+"-")>-1&&(M=i(M.replace(j,""))),Ie&&!/\b(?:Avant|Nook)\b/.test(Ue)&&(/Browser|Lunascape|Maxthon/.test(Ue)||Ue!="Safari"&&/^iOS/.test(M)&&/\bSafari\b/.test(Ie[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ue)&&Ie[1])&&(j=Ie[Ie.length-1])&&ke.push(j),ke.length&&(ke=["("+ke.join("; ")+")"]),ee&&Ye&&Ye.indexOf(ee)<0&&ke.push("on "+ee),Ye&&ke.push((/^on /.test(ke[ke.length-1])?"":"on ")+Ye),M&&(j=/ ([\d.+]+)$/.exec(M),G=j&&M.charAt(M.length-j[0].length-1)=="/",M={architecture:32,family:j&&!G?M.replace(j[0],""):M,version:j?j[1]:null,toString:function(){var $=this.version;return this.family+($&&!G?" "+$:"")+(this.architecture==64?" 64-bit":"")}}),(j=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Pe))&&!/\bi686\b/i.test(Pe)?(M&&(M.architecture=64,M.family=M.family.replace(RegExp(" *"+j),"")),Ue&&(/\bWOW64\b/i.test(C)||he&&/\w(?:86|32)$/.test(H.cpuClass||H.platform)&&!/\bWin64; x64\b/i.test(C))&&ke.unshift("32-bit")):M&&/^OS X/.test(M.family)&&Ue=="Chrome"&&parseFloat(ue)>=39&&(M.architecture=64),C||(C=null);var N={};return N.description=C,N.layout=Ie&&Ie[0],N.manufacturer=ee,N.name=Ue,N.prerelease=Ne,N.product=Ye,N.ua=C,N.version=Ue&&ue,N.os=M||{architecture:null,family:null,version:null,toString:function(){return"null"}},N.parse=n,N.toString=D,N.version&&ke.unshift(ue),N.name&&ke.unshift(Ue),M&&Ue&&(M!=String(M).split(" ")[0]||M!=Ue.split(" ")[0]&&!Ye)&&ke.push(Ye?"("+M+")":"on "+M),ke.length&&(N.description=ke.join(" ")),N}var t={function:!0,object:!0},c=t[typeof window]&&window||this,y=t[typeof S]&&S,v=t[typeof P]&&P&&!P.nodeType&&P,_=y&&v&&typeof O=="object"&&O;!_||_.global!==_&&_.window!==_&&_.self!==_||(c=_);var b=Math.pow(2,53)-1,m=/\bOpera/,g=Object.prototype,E=g.hasOwnProperty,o=g.toString,x=n();typeof U=="function"&&typeof U.amd=="object"&&U.amd?(c.platform=x,U(function(){return x})):y&&v?d(x,function(C,A){y[A]=C}):c.platform=x}).call(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(w,P,S){(function(O){"use strict";function T(l,p,h,d){if(typeof l!="function")throw new TypeError('"callback" argument must be a function');var a,u,s=arguments.length;switch(s){case 0:case 1:return O.nextTick(l);case 2:return O.nextTick(function(){l.call(null,p)});case 3:return O.nextTick(function(){l.call(null,p,h)});case 4:return O.nextTick(function(){l.call(null,p,h,d)});default:for(a=new Array(s-1),u=0;u1)for(var b=1;b1&&(Ee=oe[0]+"@",Q=oe[1]),Q=Q.replace(j,"."),Ee+p(Q.split("."),ie).join(".")}function d(Q){for(var ie,oe,Ee=[],ye=0,Le=Q.length;ye=55296&&ie<=56319&&ye65535&&(ie-=65536,oe+=B(ie>>>10&1023|55296),ie=56320|1023&ie),oe+=B(ie)}).join("")}function u(Q){return Q-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:E}function s(Q,ie){return Q+22+75*(Q<26)-((ie!=0)<<5)}function f(Q,ie,oe){var Ee=0;for(Q=oe?J(Q/A):Q>>1,Q+=J(Q/ie);Q>X*x>>1;Ee+=E)Q=J(Q/X);return J(Ee+(X+1)*Q/(Q+C))}function i(Q){var ie,oe,Ee,ye,Le,pe,Ce,Be,Pe,ke,Ne=[],he=Q.length,ue=0,Ie=I,Ue=D;for(oe=Q.lastIndexOf(F),oe<0&&(oe=0),Ee=0;Ee=128&&l("not-basic"),Ne.push(Q.charCodeAt(Ee));for(ye=oe>0?oe+1:0;ye=he&&l("invalid-input"),Be=u(Q.charCodeAt(ye++)),(Be>=E||Be>J((g-ue)/pe))&&l("overflow"),ue+=Be*pe,Pe=Ce<=Ue?o:Ce>=Ue+x?x:Ce-Ue,!(BeJ(g/ke)&&l("overflow"),pe*=ke;ie=Ne.length+1,Ue=f(ue-Le,ie,Le==0),J(ue/ie)>g-Ie&&l("overflow"),Ie+=J(ue/ie),ue%=ie,Ne.splice(ue++,0,Ie)}return a(Ne)}function n(Q){var ie,oe,Ee,ye,Le,pe,Ce,Be,Pe,ke,Ne,he,ue,Ie,Ue,Ye=[];for(Q=d(Q),he=Q.length,ie=I,oe=0,Le=D,pe=0;pe=ie&&NeJ((g-oe)/ue)&&l("overflow"),oe+=(Ce-ie)*ue,ie=Ce,pe=0;peg&&l("overflow"),Ne==ie){for(Be=oe,Pe=E;ke=Pe<=Le?o:Pe>=Le+x?x:Pe-Le,!(Be= 0x80 (not a basic code point)","invalid-input":"Invalid input"},X=E-o,J=Math.floor,B=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:d,encode:a},decode:i,encode:n,toASCII:c,toUnicode:t},typeof U=="function"&&typeof U.amd=="object"&&U.amd)U("punycode",function(){return b});else if(y&&v)if(P.exports==y)v.exports=b;else for(m in b)b.hasOwnProperty(m)&&(y[m]=b[m]);else T.punycode=b}(this)}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(w,P,S){"use strict";function O(l,p){return Object.prototype.hasOwnProperty.call(l,p)}P.exports=function(l,p,h,d){p=p||"&",h=h||"=";var a={};if(typeof l!="string"||l.length===0)return a;var u=/\+/g;l=l.split(p);var s=1e3;d&&typeof d.maxKeys=="number"&&(s=d.maxKeys);var f=l.length;s>0&&f>s&&(f=s);for(var i=0;i=0?(n=v.substr(0,_),t=v.substr(_+1)):(n=v,t=""),c=decodeURIComponent(n),y=decodeURIComponent(t),O(a,c)?T(a[c])?a[c].push(y):a[c]=[a[c],y]:a[c]=y}return a};var T=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"}},{}],176:[function(w,P,S){"use strict";function O(h,d){if(h.map)return h.map(d);for(var a=[],u=0;u0?(typeof ue=="string"||ee.objectMode||(0,G.default)(ue)===oe.prototype||(ue=l(ue)),Ue?ee.endEmitted?he.emit("error",new Error("stream.unshift() after end event")):s(he,ee,ue,!0):ee.ended?he.emit("error",new Error("stream.push() after EOF")):(ee.reading=!1,ee.decoder&&!Ie?(ue=ee.decoder.write(ue),ee.objectMode||ue.length!==0?s(he,ee,ue,!1):_(he,ee)):s(he,ee,ue,!1))):Ue||(ee.reading=!1)}return i(ee)}function s(he,ue,Ie,Ue){ue.flowing&&ue.length===0&&!ue.sync?(he.emit("data",Ie),he.read(0)):(ue.length+=ue.objectMode?1:Ie.length,Ue?ue.buffer.unshift(Ie):ue.buffer.push(Ie),ue.needReadable&&y(he)),_(he,ue)}function f(he,ue){var Ie;return p(ue)||typeof ue=="string"||ue===void 0||he.objectMode||(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie}function i(he){return!he.ended&&(he.needReadable||he.length=Ne?he=Ne:(he--,he|=he>>>1,he|=he>>>2,he|=he>>>4,he|=he>>>8,he|=he>>>16,he++),he}function t(he,ue){return he<=0||ue.length===0&&ue.ended?0:ue.objectMode?1:he!==he?ue.flowing&&ue.length?ue.buffer.head.data.length:ue.length:(he>ue.highWaterMark&&(ue.highWaterMark=n(he)),he<=ue.length?he:ue.ended?ue.length:(ue.needReadable=!0,0))}function c(he,ue){if(!ue.ended){if(ue.decoder){var Ie=ue.decoder.end();Ie&&Ie.length&&(ue.buffer.push(Ie),ue.length+=ue.objectMode?1:Ie.length)}ue.ended=!0,y(he)}}function y(he){var ue=he._readableState;ue.needReadable=!1,ue.emittedReadable||(pe("emitReadable",ue.flowing),ue.emittedReadable=!0,ue.sync?X.nextTick(v,he):v(he))}function v(he){pe("emit readable"),he.emit("readable"),x(he)}function _(he,ue){ue.readingMore||(ue.readingMore=!0,X.nextTick(b,he,ue))}function b(he,ue){for(var Ie=ue.length;!ue.reading&&!ue.flowing&&!ue.ended&&ue.length=ue.length?(Ie=ue.decoder?ue.buffer.join(""):ue.buffer.length===1?ue.buffer.head.data:ue.buffer.concat(ue.length),ue.buffer.clear()):Ie=A(he,ue.buffer,ue.decoder),Ie}function A(he,ue,Ie){var Ue;return heee.length?ee.length:he;if(M===ee.length?Ye+=ee:Ye+=ee.slice(0,he),(he-=M)===0){M===ee.length?(++Ue,Ie.next?ue.head=Ie.next:ue.head=ue.tail=null):(ue.head=Ie,Ie.data=ee.slice(M));break}++Ue}return ue.length-=Ue,Ye}function I(he,ue){var Ie=oe.allocUnsafe(he),Ue=ue.head,Ye=1;for(Ue.data.copy(Ie),he-=Ue.data.length;Ue=Ue.next;){var ee=Ue.data,M=he>ee.length?ee.length:he;if(ee.copy(Ie,Ie.length-he,0,M),(he-=M)===0){M===ee.length?(++Ye,Ue.next?ue.head=Ue.next:ue.head=ue.tail=null):(ue.head=Ue,Ue.data=ee.slice(M));break}++Ye}return ue.length-=Ye,Ie}function F(he){var ue=he._readableState;if(ue.length>0)throw new Error('"endReadable()" called on non-empty stream');ue.endEmitted||(ue.ended=!0,X.nextTick(H,ue,he))}function H(he,ue){he.endEmitted||he.length!==0||(he.endEmitted=!0,ue.readable=!1,ue.emit("end"))}function te(he,ue){for(var Ie=0,Ue=he.length;Ie=ue.highWaterMark||ue.ended))return pe("read: emitReadable",ue.length,ue.ended),ue.length===0&&ue.ended?F(this):y(this),null;if((he=t(he,ue))===0&&ue.ended)return ue.length===0&&F(this),null;var Ue=ue.needReadable;pe("need readable",Ue),(ue.length===0||ue.length-he0?C(he,ue):null,Ye===null?(ue.needReadable=!0,he=0):ue.length-=he,ue.length===0&&(ue.ended||(ue.needReadable=!0),Ie!==he&&ue.ended&&F(this)),Ye!==null&&this.emit("data",Ye),Ye},a.prototype._read=function(he){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(he,ue){function Ie(tt,Ve){pe("onunpipe"),tt===Y&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ye())}function Ue(){pe("onend"),he.end()}function Ye(){pe("cleanup"),he.removeListener("close",N),he.removeListener("finish",$),he.removeListener("drain",De),he.removeListener("error",M),he.removeListener("unpipe",Ie),Y.removeListener("end",Ue),Y.removeListener("end",V),Y.removeListener("data",ee),Me=!0,!me.awaitDrain||he._writableState&&!he._writableState.needDrain||De()}function ee(tt){pe("ondata"),Xe=!1,he.write(tt)!==!1||Xe||((me.pipesCount===1&&me.pipes===he||me.pipesCount>1&&te(me.pipes,he)!==-1)&&!Me&&(pe("false write response, pause",Y._readableState.awaitDrain),Y._readableState.awaitDrain++,Xe=!0),Y.pause())}function M(tt){pe("onerror",tt),V(),he.removeListener("error",M),Q(he,"error")===0&&he.emit("error",tt)}function N(){he.removeListener("finish",$),V()}function $(){pe("onfinish"),he.removeListener("close",N),V()}function V(){pe("unpipe"),Y.unpipe(he)}var Y=this,me=this._readableState;switch(me.pipesCount){case 0:me.pipes=he;break;case 1:me.pipes=[me.pipes,he];break;default:me.pipes.push(he)}me.pipesCount+=1,pe("pipe count=%d opts=%j",me.pipesCount,ue);var Re=(!ue||ue.end!==!1)&&he!==O.stdout&&he!==O.stderr,rt=Re?Ue:V;me.endEmitted?X.nextTick(rt):Y.once("end",rt),he.on("unpipe",Ie);var De=m(Y);he.on("drain",De);var Me=!1,Xe=!1;return Y.on("data",ee),h(he,"error",M),he.once("close",N),he.once("finish",$),he.emit("pipe",Y),me.flowing||(pe("pipe resume"),Y.resume()),he},a.prototype.unpipe=function(he){var ue=this._readableState,Ie={hasUnpiped:!1};if(ue.pipesCount===0)return this;if(ue.pipesCount===1)return he&&he!==ue.pipes?this:(he||(he=ue.pipes),ue.pipes=null,ue.pipesCount=0,ue.flowing=!1,he&&he.emit("unpipe",this,Ie),this);if(!he){var Ue=ue.pipes,Ye=ue.pipesCount;ue.pipes=null,ue.pipesCount=0,ue.flowing=!1;for(var ee=0;ee-1?J.default:B.nextTick;s.WritableState=u;var oe=w("core-util-is");oe.inherits=w("inherits");var Ee={deprecate:w("util-deprecate")},ye=w("./internal/streams/stream"),Le=w("safe-buffer").Buffer,pe=T.Uint8Array||function(){},Ce=w("./internal/streams/destroy");oe.inherits(s,ye),u.prototype.getBuffer=function(){for(var Pe=this.bufferedRequest,ke=[];Pe;)ke.push(Pe),Pe=Pe.next;return ke},function(){try{Object.defineProperty(u.prototype,"buffer",{get:Ee.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(Pe){}}();var Be;typeof G.default=="function"&&te.default&&typeof Function.prototype[te.default]=="function"?(Be=Function.prototype[te.default],(0,F.default)(s,te.default,{value:function(Pe){return!!Be.call(this,Pe)||this===s&&Pe&&Pe._writableState instanceof u}})):Be=function(Pe){return Pe instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(Pe,ke,Ne){var he=this._writableState,ue=!1,Ie=!he.objectMode&&d(Pe);return Ie&&!Le.isBuffer(Pe)&&(Pe=h(Pe)),typeof ke=="function"&&(Ne=ke,ke=null),Ie?ke="buffer":ke||(ke=he.defaultEncoding),typeof Ne!="function"&&(Ne=a),he.ended?f(this,Ne):(Ie||i(this,he,Pe,Ne))&&(he.pendingcb++,ue=t(this,he,Ie,Pe,ke,Ne)),ue},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var Pe=this._writableState;Pe.corked&&(Pe.corked--,Pe.writing||Pe.corked||Pe.finished||Pe.bufferProcessing||!Pe.bufferedRequest||g(this,Pe))},s.prototype.setDefaultEncoding=function(Pe){if(typeof Pe=="string"&&(Pe=Pe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Pe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+Pe);return this._writableState.defaultEncoding=Pe,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(Pe,ke,Ne){Ne(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(Pe,ke,Ne){var he=this._writableState;typeof Pe=="function"?(Ne=Pe,Pe=null,ke=null):typeof ke=="function"&&(Ne=ke,ke=null),Pe!=null&&this.write(Pe,ke),he.corked&&(he.corked=1,this.uncork()),he.ending||he.finished||A(this,he,Ne)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(Pe){this._writableState&&(this._writableState.destroyed=Pe)}}),s.prototype.destroy=Ce.destroy,s.prototype._undestroy=Ce.undestroy,s.prototype._destroy=function(Pe,ke){this.end(),ke(Pe)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(w,P,S){"use strict";function O(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}function T(h,d,a){h.copy(d,a)}var l=w("safe-buffer").Buffer,p=w("util");P.exports=function(){function h(){O(this,h),this.head=null,this.tail=null,this.length=0}return h.prototype.push=function(d){var a={data:d,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},h.prototype.unshift=function(d){var a={data:d,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length},h.prototype.shift=function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}},h.prototype.clear=function(){this.head=this.tail=null,this.length=0},h.prototype.join=function(d){if(this.length===0)return"";for(var a=this.head,u=""+a.data;a=a.next;)u+=d+a.data;return u},h.prototype.concat=function(d){if(this.length===0)return l.alloc(0);if(this.length===1)return this.head.data;for(var a=l.allocUnsafe(d>>>0),u=this.head,s=0;u;)T(u.data,a,s),s+=u.data.length,u=u.next;return a},h}(),p&&p.inspect&&p.inspect.custom&&(P.exports.prototype[p.inspect.custom]=function(){var h=p.inspect({length:this.length});return this.constructor.name+" "+h})},{"safe-buffer":193,util:36}],185:[function(w,P,S){"use strict";function O(h,d){var a=this,u=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return u||s?(d?d(h):!h||this._writableState&&this._writableState.errorEmitted||p.nextTick(l,this,h),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(h||null,function(f){!d&&f?(p.nextTick(l,a,f),a._writableState&&(a._writableState.errorEmitted=!0)):d&&d(f)}),this)}function T(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(h,d){h.emit("error",d)}var p=w("process-nextick-args");P.exports={destroy:O,undestroy:T}},{"process-nextick-args":172}],186:[function(w,P,S){"use strict";P.exports=w("events").EventEmitter},{events:158}],187:[function(w,P,S){P.exports=w("./readable").PassThrough},{"./readable":188}],188:[function(w,P,S){S=P.exports=w("./lib/_stream_readable.js"),S.Stream=S,S.Readable=S,S.Writable=w("./lib/_stream_writable.js"),S.Duplex=w("./lib/_stream_duplex.js"),S.Transform=w("./lib/_stream_transform.js"),S.PassThrough=w("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(w,P,S){P.exports=w("./readable").Transform},{"./readable":188}],190:[function(w,P,S){P.exports=w("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(w,P,S){var O=function(){return this}()||Function("return this")(),T=O.regeneratorRuntime&&Object.getOwnPropertyNames(O).indexOf("regeneratorRuntime")>=0,l=T&&O.regeneratorRuntime;if(O.regeneratorRuntime=void 0,P.exports=w("./runtime"),T)O.regeneratorRuntime=l;else try{delete O.regeneratorRuntime}catch(p){O.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(w,P,S){!function(O){"use strict";function T(J,B,Q,ie){var oe=B&&B.prototype instanceof p?B:p,Ee=Object.create(oe.prototype),ye=new t(ie||[]);return Ee._invoke=s(J,Q,ye),Ee}function l(J,B,Q){try{return{type:"normal",arg:J.call(B,Q)}}catch(ie){return{type:"throw",arg:ie}}}function p(){}function h(){}function d(){}function a(J){["next","throw","return"].forEach(function(B){J[B]=function(Q){return this._invoke(B,Q)}})}function u(J){function B(oe,Ee,ye,Le){var pe=l(J[oe],J,Ee);if(pe.type!=="throw"){var Ce=pe.arg,Be=Ce.value;return Be&&typeof Be=="object"&&b.call(Be,"__await")?Promise.resolve(Be.__await).then(function(Pe){B("next",Pe,ye,Le)},function(Pe){B("throw",Pe,ye,Le)}):Promise.resolve(Be).then(function(Pe){Ce.value=Pe,ye(Ce)},Le)}Le(pe.arg)}function Q(oe,Ee){function ye(){return new Promise(function(Le,pe){B(oe,Ee,Le,pe)})}return ie=ie?ie.then(ye,ye):ye()}var ie;this._invoke=Q}function s(J,B,Q){var ie=A;return function(oe,Ee){if(ie===I)throw new Error("Generator is already running");if(ie===F){if(oe==="throw")throw Ee;return y()}for(Q.method=oe,Q.arg=Ee;;){var ye=Q.delegate;if(ye){var Le=f(ye,Q);if(Le){if(Le===H)continue;return Le}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(ie===A)throw ie=F,Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);ie=I;var pe=l(J,B,Q);if(pe.type==="normal"){if(ie=Q.done?F:D,pe.arg===H)continue;return{value:pe.arg,done:Q.done}}pe.type==="throw"&&(ie=F,Q.method="throw",Q.arg=pe.arg)}}}function f(J,B){var Q=J.iterator[B.method];if(Q===v){if(B.delegate=null,B.method==="throw"){if(J.iterator.return&&(B.method="return",B.arg=v,f(J,B),B.method==="throw"))return H;B.method="throw",B.arg=new TypeError("The iterator does not provide a 'throw' method")}return H}var ie=l(Q,J.iterator,B.arg);if(ie.type==="throw")return B.method="throw",B.arg=ie.arg,B.delegate=null,H;var oe=ie.arg;return oe?oe.done?(B[J.resultName]=oe.value,B.next=J.nextLoc,B.method!=="return"&&(B.method="next",B.arg=v),B.delegate=null,H):oe:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,H)}function i(J){var B={tryLoc:J[0]};1 in J&&(B.catchLoc=J[1]),2 in J&&(B.finallyLoc=J[2],B.afterLoc=J[3]),this.tryEntries.push(B)}function n(J){var B=J.completion||{};B.type="normal",delete B.arg,J.completion=B}function t(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(i,this),this.reset(!0)}function c(J){if(J){var B=J[g];if(B)return B.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length)){var Q=-1,ie=function oe(){for(;++Q=0;--ie){var oe=this.tryEntries[ie],Ee=oe.completion;if(oe.tryLoc==="root")return B("end");if(oe.tryLoc<=this.prev){var ye=b.call(oe,"catchLoc"),Le=b.call(oe,"finallyLoc");if(ye&&Le){if(this.prev=0;--Q){var ie=this.tryEntries[Q];if(ie.tryLoc<=this.prev&&b.call(ie,"finallyLoc")&&this.prev=0;--B){var Q=this.tryEntries[B];if(Q.finallyLoc===J)return this.complete(Q.completion,Q.afterLoc),n(Q),H}},catch:function(J){for(var B=this.tryEntries.length-1;B>=0;--B){var Q=this.tryEntries[B];if(Q.tryLoc===J){var ie=Q.completion;if(ie.type==="throw"){var oe=ie.arg;n(Q)}return oe}}throw new Error("illegal catch attempt")},delegateYield:function(J,B,Q){return this.delegate={iterator:c(J),resultName:B,nextLoc:Q},this.method==="next"&&(this.arg=v),H}}}(function(){return this}()||Function("return this")())},{}],193:[function(w,P,S){function O(h,d){for(var a in h)d[a]=h[a]}function T(h,d,a){return p(h,d,a)}var l=w("buffer"),p=l.Buffer;p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?P.exports=l:(O(l,S),S.Buffer=T),O(p,T),T.from=function(h,d,a){if(typeof h=="number")throw new TypeError("Argument must not be a number");return p(h,d,a)},T.alloc=function(h,d,a){if(typeof h!="number")throw new TypeError("Argument must be a number");var u=p(h);return d!==void 0?typeof a=="string"?u.fill(d,a):u.fill(d):u.fill(0),u},T.allocUnsafe=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return p(h)},T.allocUnsafeSlow=function(h){if(typeof h!="number")throw new TypeError("Argument must be a number");return l.SlowBuffer(h)}},{buffer:38}],194:[function(w,P,S){(function(O){"use strict";function T(y){return y&&y.__esModule?y:{default:y}}var l=w("babel-runtime/core-js/string/from-code-point"),p=T(l),h=w("babel-runtime/core-js/json/stringify"),d=T(h),a=w("babel-runtime/helpers/typeof"),u=T(a),s=w("babel-runtime/core-js/object/define-property"),f=T(s),i=w("babel-runtime/core-js/object/keys"),n=T(i),t=w("babel-runtime/core-js/object/create"),c=T(t);!function(y){function v(V,Y){if(!(this instanceof v))return new v(V,Y);var me=this;b(me),me.q=me.c="",me.bufferCheckPosition=y.MAX_BUFFER_LENGTH,me.opt=Y||{},me.opt.lowercase=me.opt.lowercase||me.opt.lowercasetags,me.looseCase=me.opt.lowercase?"toLowerCase":"toUpperCase",me.tags=[],me.closed=me.closedRoot=me.sawRoot=!1,me.tag=me.error=null,me.strict=!!V,me.noscript=!(!V&&!me.opt.noscript),me.state=N.BEGIN,me.strictEntities=me.opt.strictEntities,me.ENTITIES=me.strictEntities?(0,c.default)(y.XML_ENTITIES):(0,c.default)(y.ENTITIES),me.attribList=[],me.opt.xmlns&&(me.ns=(0,c.default)(Ie)),me.trackPosition=me.opt.position!==!1,me.trackPosition&&(me.position=me.line=me.column=0),I(me,"onready")}function _(V){for(var Y=Math.max(y.MAX_BUFFER_LENGTH,10),me=0,Re=0,rt=Ce.length;ReY)switch(Ce[Re]){case"textNode":H(V);break;case"cdata":F(V,"oncdata",V.cdata),V.cdata="";break;case"script":F(V,"onscript",V.script),V.script="";break;default:j(V,"Max buffer length exceeded: "+Ce[Re])}me=Math.max(me,De)}var Me=y.MAX_BUFFER_LENGTH-me;V.bufferCheckPosition=Me+V.position}function b(V){for(var Y=0,me=Ce.length;Y"||o(V)}function A(V,Y){return V.test(Y)}function D(V,Y){return!A(V,Y)}function I(V,Y,me){V[Y]&&V[Y](me)}function F(V,Y,me){V.textNode&&H(V),I(V,Y,me)}function H(V){V.textNode=te(V.opt,V.textNode),V.textNode&&I(V,"ontext",V.textNode),V.textNode=""}function te(V,Y){return V.trim&&(Y=Y.trim()),V.normalize&&(Y=Y.replace(/\s+/g," ")),Y}function j(V,Y){return H(V),V.trackPosition&&(Y+=` Line: `+V.line+` Column: `+V.column+` Char: `+V.c),Y=new Error(Y),V.error=Y,I(V,"onerror",Y),V}function G(V){return V.sawRoot&&!V.closedRoot&&X(V,"Unclosed root tag"),V.state!==N.BEGIN&&V.state!==N.BEGIN_WHITESPACE&&V.state!==N.TEXT&&j(V,"Unexpected end"),H(V),V.c="",V.closed=!0,I(V,"onend"),v.call(V,V.strict,V.opt),V}function X(V,Y){if((V===void 0?"undefined":(0,u.default)(V))!=="object"||!(V instanceof v))throw new Error("bad call to strictFail");V.strict&&j(V,Y)}function J(V){V.strict||(V.tagName=V.tagName[V.looseCase]());var Y=V.tags[V.tags.length-1]||V,me=V.tag={name:V.tagName,attributes:{}};V.opt.xmlns&&(me.ns=Y.ns),V.attribList.length=0,F(V,"onopentagstart",me)}function B(V,Y){var me=V.indexOf(":"),Re=me<0?["",V]:V.split(":"),rt=Re[0],De=Re[1];return Y&&V==="xmlns"&&(rt="xmlns",De=""),{prefix:rt,local:De}}function Q(V){if(V.strict||(V.attribName=V.attribName[V.looseCase]()),V.attribList.indexOf(V.attribName)!==-1||V.tag.attributes.hasOwnProperty(V.attribName))return void(V.attribName=V.attribValue="");if(V.opt.xmlns){var Y=B(V.attribName,!0),me=Y.prefix,Re=Y.local;if(me==="xmlns")if(Re==="xml"&&V.attribValue!==he)X(V,"xml: prefix must be bound to "+he+` Actual: `+V.attribValue);else if(Re==="xmlns"&&V.attribValue!==ue)X(V,"xmlns: prefix must be bound to "+ue+` Actual: `+V.attribValue);else{var rt=V.tag,De=V.tags[V.tags.length-1]||V;rt.ns===De.ns&&(rt.ns=(0,c.default)(De.ns)),rt.ns[Re]=V.attribValue}V.attribList.push([V.attribName,V.attribValue])}else V.tag.attributes[V.attribName]=V.attribValue,F(V,"onattribute",{name:V.attribName,value:V.attribValue});V.attribName=V.attribValue=""}function ie(V,Y){if(V.opt.xmlns){var me=V.tag,Re=B(V.tagName);me.prefix=Re.prefix,me.local=Re.local,me.uri=me.ns[Re.prefix]||"",me.prefix&&!me.uri&&(X(V,"Unbound namespace prefix: "+(0,d.default)(V.tagName)),me.uri=Re.prefix);var rt=V.tags[V.tags.length-1]||V;me.ns&&rt.ns!==me.ns&&(0,n.default)(me.ns).forEach(function(ge){F(V,"onopennamespace",{prefix:ge,uri:me.ns[ge]})});for(var De=0,Me=V.attribList.length;De",V.tagName="",void(V.state=N.SCRIPT);F(V,"onscript",V.script),V.script=""}var Y=V.tags.length,me=V.tagName;V.strict||(me=me[V.looseCase]());for(var Re=me;Y--&&!(V.tags[Y].name===Re);)X(V,"Unexpected close tag");if(Y<0)return X(V,"Unmatched closing tag: "+V.tagName),V.textNode+="",void(V.state=N.TEXT);V.tagName=me;for(var rt=V.tags.length;rt-- >Y;){var De=V.tag=V.tags.pop();V.tagName=V.tag.name,F(V,"onclosetag",V.tagName);var Me={};for(var Xe in De.ns)Me[Xe]=De.ns[Xe];var tt=V.tags[V.tags.length-1]||V;V.opt.xmlns&&De.ns!==tt.ns&&(0,n.default)(De.ns).forEach(function(Ve){var Ke=De.ns[Ve];F(V,"onclosenamespace",{prefix:Ve,uri:Ke})})}Y===0&&(V.closedRoot=!0),V.tagName=V.attribValue=V.attribName="",V.attribList.length=0,V.state=N.TEXT}function Ee(V){var Y,me=V.entity,Re=me.toLowerCase(),rt="";return V.ENTITIES[me]?V.ENTITIES[me]:V.ENTITIES[Re]?V.ENTITIES[Re]:(me=Re,me.charAt(0)==="#"&&(me.charAt(1)==="x"?(me=me.slice(2),Y=parseInt(me,16),rt=Y.toString(16)):(me=me.slice(1),Y=parseInt(me,10),rt=Y.toString(10))),me=me.replace(/^0+/,""),isNaN(Y)||rt.toLowerCase()!==me?(X(V,"Invalid character entity"),"&"+V.entity+";"):(0,p.default)(Y))}function ye(V,Y){Y==="<"?(V.state=N.OPEN_WAKA,V.startTagPosition=V.position):o(Y)||(X(V,"Non-whitespace before first tag."),V.textNode=Y,V.state=N.TEXT)}function Le(V,Y){var me="";return Y"?(F(Y,"onsgmldeclaration",Y.sgmlDecl),Y.sgmlDecl="",Y.state=N.TEXT):(x(Re)&&(Y.state=N.SGML_DECL_QUOTED),Y.sgmlDecl+=Re);continue;case N.SGML_DECL_QUOTED:Re===Y.q&&(Y.state=N.SGML_DECL,Y.q=""),Y.sgmlDecl+=Re;continue;case N.DOCTYPE:Re===">"?(Y.state=N.TEXT,F(Y,"ondoctype",Y.doctype),Y.doctype=!0):(Y.doctype+=Re,Re==="["?Y.state=N.DOCTYPE_DTD:x(Re)&&(Y.state=N.DOCTYPE_QUOTED,Y.q=Re));continue;case N.DOCTYPE_QUOTED:Y.doctype+=Re,Re===Y.q&&(Y.q="",Y.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:Y.doctype+=Re,Re==="]"?Y.state=N.DOCTYPE:x(Re)&&(Y.state=N.DOCTYPE_DTD_QUOTED,Y.q=Re);continue;case N.DOCTYPE_DTD_QUOTED:Y.doctype+=Re,Re===Y.q&&(Y.state=N.DOCTYPE_DTD,Y.q="");continue;case N.COMMENT:Re==="-"?Y.state=N.COMMENT_ENDING:Y.comment+=Re;continue;case N.COMMENT_ENDING:Re==="-"?(Y.state=N.COMMENT_ENDED,Y.comment=te(Y.opt,Y.comment),Y.comment&&F(Y,"oncomment",Y.comment),Y.comment=""):(Y.comment+="-"+Re,Y.state=N.COMMENT);continue;case N.COMMENT_ENDED:Re!==">"?(X(Y,"Malformed comment"),Y.comment+="--"+Re,Y.state=N.COMMENT):Y.state=N.TEXT;continue;case N.CDATA:Re==="]"?Y.state=N.CDATA_ENDING:Y.cdata+=Re;continue;case N.CDATA_ENDING:Re==="]"?Y.state=N.CDATA_ENDING_2:(Y.cdata+="]"+Re,Y.state=N.CDATA);continue;case N.CDATA_ENDING_2:Re===">"?(Y.cdata&&F(Y,"oncdata",Y.cdata),F(Y,"onclosecdata"),Y.cdata="",Y.state=N.TEXT):Re==="]"?Y.cdata+="]":(Y.cdata+="]]"+Re,Y.state=N.CDATA);continue;case N.PROC_INST:Re==="?"?Y.state=N.PROC_INST_ENDING:o(Re)?Y.state=N.PROC_INST_BODY:Y.procInstName+=Re;continue;case N.PROC_INST_BODY:if(!Y.procInstBody&&o(Re))continue;Re==="?"?Y.state=N.PROC_INST_ENDING:Y.procInstBody+=Re;continue;case N.PROC_INST_ENDING:Re===">"?(F(Y,"onprocessinginstruction",{name:Y.procInstName,body:Y.procInstBody}),Y.procInstName=Y.procInstBody="",Y.state=N.TEXT):(Y.procInstBody+="?"+Re,Y.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:A(Ye,Re)?Y.tagName+=Re:(J(Y),Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:(o(Re)||X(Y,"Invalid character in tag name"),Y.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:Re===">"?(ie(Y,!0),oe(Y)):(X(Y,"Forward-slash in opening tag not followed by >"),Y.state=N.ATTRIB);continue;case N.ATTRIB:if(o(Re))continue;Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:A(Ue,Re)?(Y.attribName=Re,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME:Re==="="?Y.state=N.ATTRIB_VALUE:Re===">"?(X(Y,"Attribute without value"),Y.attribValue=Y.attribName,Q(Y),ie(Y)):o(Re)?Y.state=N.ATTRIB_NAME_SAW_WHITE:A(Ye,Re)?Y.attribName+=Re:X(Y,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(Re==="=")Y.state=N.ATTRIB_VALUE;else{if(o(Re))continue;X(Y,"Attribute without value"),Y.tag.attributes[Y.attribName]="",Y.attribValue="",F(Y,"onattribute",{name:Y.attribName,value:""}),Y.attribName="",Re===">"?ie(Y):A(Ue,Re)?(Y.attribName=Re,Y.state=N.ATTRIB_NAME):(X(Y,"Invalid attribute name"),Y.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(o(Re))continue;x(Re)?(Y.q=Re,Y.state=N.ATTRIB_VALUE_QUOTED):(X(Y,"Unquoted attribute value"),Y.state=N.ATTRIB_VALUE_UNQUOTED,Y.attribValue=Re);continue;case N.ATTRIB_VALUE_QUOTED:if(Re!==Y.q){Re==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_Q:Y.attribValue+=Re;continue}Q(Y),Y.q="",Y.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:o(Re)?Y.state=N.ATTRIB:Re===">"?ie(Y):Re==="/"?Y.state=N.OPEN_TAG_SLASH:A(Ue,Re)?(X(Y,"No whitespace between attributes"),Y.attribName=Re,Y.attribValue="",Y.state=N.ATTRIB_NAME):X(Y,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!C(Re)){Re==="&"?Y.state=N.ATTRIB_VALUE_ENTITY_U:Y.attribValue+=Re;continue}Q(Y),Re===">"?ie(Y):Y.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(Y.tagName)Re===">"?oe(Y):A(Ye,Re)?Y.tagName+=Re:Y.script?(Y.script+=""?oe(Y):X(Y,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var Me,Xe;switch(Y.state){case N.TEXT_ENTITY:Me=N.TEXT,Xe="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:Me=N.ATTRIB_VALUE_QUOTED,Xe="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:Me=N.ATTRIB_VALUE_UNQUOTED,Xe="attribValue"}Re===";"?(Y[Xe]+=Ee(Y),Y.entity="",Y.state=Me):A(Y.entity.length?M:ee,Re)?Y.entity+=Re:(X(Y,"Invalid character in entity name"),Y[Xe]+="&"+Y.entity+Re,Y.entity="",Y.state=Me);continue;default:throw new Error(Y,"Unknown state: "+Y.state)}return Y.position>=Y.bufferCheckPosition&&_(Y),Y}y.parser=function(V,Y){return new v(V,Y)},y.SAXParser=v,y.SAXStream=E,y.createStream=g,y.MAX_BUFFER_LENGTH=65536;var Ce=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];y.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],c.default||(Object.create=function(V){function Y(){}return Y.prototype=V,new Y}),n.default||(Object.keys=function(V){var Y=[];for(var me in V)V.hasOwnProperty(me)&&Y.push(me);return Y}),v.prototype={end:function(){G(this)},write:pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){m(this)}};var Be;try{Be=w("stream").Stream}catch(V){Be=function(){}}var Pe=y.EVENTS.filter(function(V){return V!=="error"&&V!=="end"});E.prototype=(0,c.default)(Be.prototype,{constructor:{value:E}}),E.prototype.write=function(V){if(typeof O=="function"&&typeof O.isBuffer=="function"&&O.isBuffer(V)){if(!this._decoder){var Y=w("string_decoder").StringDecoder;this._decoder=new Y("utf8")}V=this._decoder.write(V)}return this._parser.write(V.toString()),this.emit("data",V),!0},E.prototype.end=function(V){return V&&V.length&&this.write(V),this._parser.end(),!0},E.prototype.on=function(V,Y){var me=this;return me._parser["on"+V]||Pe.indexOf(V)===-1||(me._parser["on"+V]=function(){var Re=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Re.splice(0,0,V),me.emit.apply(me,Re)}),Be.prototype.on.call(me,V,Y)};var ke="[CDATA[",Ne="DOCTYPE",he="http://www.w3.org/XML/1998/namespace",ue="http://www.w3.org/2000/xmlns/",Ie={xml:he,xmlns:ue},Ue=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ye=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,ee=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,M=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,N=0;y.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},y.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},y.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,n.default)(y.ENTITIES).forEach(function(V){var Y=y.ENTITIES[V],me=typeof Y=="number"?String.fromCharCode(Y):Y;y.ENTITIES[V]=me});for(var $ in y.STATE)y.STATE[y.STATE[$]]=$;N=y.STATE,p.default||function(){var V=String.fromCharCode,Y=Math.floor,me=function(){var Re,rt,De=[],Me=-1,Xe=arguments.length;if(!Xe)return"";for(var tt="";++Me1114111||Y(Ve)!==Ve)throw RangeError("Invalid code point: "+Ve);Ve<=65535?De.push(Ve):(Ve-=65536,Re=55296+(Ve>>10),rt=Ve%1024+56320,De.push(Re,rt)),(Me+1===Xe||De.length>16384)&&(tt+=V.apply(null,De),De.length=0)}return tt};f.default?Object.defineProperty(String,"fromCodePoint",{value:me,configurable:!0,writable:!0}):String.fromCodePoint=me}()}(S===void 0?(void 0).sax={}:S)}).call(this,w("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(w,P,S){function O(){T.call(this)}P.exports=O;var T=w("events").EventEmitter;w("inherits")(O,T),O.Readable=w("readable-stream/readable.js"),O.Writable=w("readable-stream/writable.js"),O.Duplex=w("readable-stream/duplex.js"),O.Transform=w("readable-stream/transform.js"),O.PassThrough=w("readable-stream/passthrough.js"),O.Stream=O,O.prototype.pipe=function(l,p){function h(t){l.writable&&l.write(t)===!1&&i.pause&&i.pause()}function d(){i.readable&&i.resume&&i.resume()}function a(){n||(n=!0,l.end())}function u(){n||(n=!0,typeof l.destroy=="function"&&l.destroy())}function s(t){if(f(),T.listenerCount(this,"error")===0)throw t}function f(){i.removeListener("data",h),l.removeListener("drain",d),i.removeListener("end",a),i.removeListener("close",u),i.removeListener("error",s),l.removeListener("error",s),i.removeListener("end",f),i.removeListener("close",f),l.removeListener("close",f)}var i=this;i.on("data",h),l.on("drain",d),l._isStdio||p&&p.end===!1||(i.on("end",a),i.on("close",u));var n=!1;return i.on("error",s),l.on("error",s),i.on("end",f),i.on("close",f),l.on("close",f),l.emit("pipe",i),l}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(w,P,S){(function(O){var T=w("./lib/request"),l=w("./lib/response"),p=w("xtend"),h=w("builtin-status-codes"),d=w("url"),a=S;a.request=function(u,s){u=typeof u=="string"?d.parse(u):p(u);var f=O.location.protocol.search(/^https?:$/)===-1?"http:":"",i=u.protocol||f,n=u.hostname||u.host,t=u.port,c=u.path||"/";n&&n.indexOf(":")!==-1&&(n="["+n+"]"),u.url=(n?i+"//"+n:"")+(t?":"+t:"")+c,u.method=(u.method||"GET").toUpperCase(),u.headers=u.headers||{};var y=new T(u);return s&&y.on("response",s),y},a.get=function(u,s){var f=a.request(u,s);return f.end(),f},a.ClientRequest=T,a.IncomingMessage=l.IncomingMessage,a.Agent=function(){},a.Agent.defaultMaxSockets=4,a.globalAgent=new a.Agent,a.STATUS_CODES=h,a.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(w,P,S){(function(O){"use strict";function T(){if(h!==void 0)return h;if(O.XMLHttpRequest){h=new O.XMLHttpRequest;try{h.open("GET",O.XDomainRequest?"/":"https://example.com")}catch(u){h=null}}else h=null;return h}function l(u){var s=T();if(!s)return!1;try{return s.responseType=u,s.responseType===u}catch(f){}return!1}function p(u){return typeof u=="function"}S.fetch=p(O.fetch)&&p(O.ReadableStream),S.writableStream=p(O.WritableStream),S.abortController=p(O.AbortController),S.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),S.blobConstructor=!0}catch(u){}var h,d=O.ArrayBuffer!==void 0,a=d&&p(O.ArrayBuffer.prototype.slice);S.arraybuffer=S.fetch||d&&l("arraybuffer"),S.msstream=!S.fetch&&a&&l("ms-stream"),S.mozchunkedarraybuffer=!S.fetch&&d&&l("moz-chunked-arraybuffer"),S.overrideMimeType=S.fetch||!!T()&&p(T().overrideMimeType),S.vbArray=p(O.VBArray),h=null}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(w,P,S){(function(O,T,l){"use strict";function p(_,b){return u.fetch&&b?"fetch":u.mozchunkedarraybuffer?"moz-chunked-arraybuffer":u.msstream?"ms-stream":u.arraybuffer&&_?"arraybuffer":u.vbArray&&_?"text:vbarray":"text"}function h(_){try{var b=_.status;return b!==null&&b!==0}catch(m){return!1}}var d=w("babel-runtime/core-js/object/keys"),a=function(_){return _&&_.__esModule?_:{default:_}}(d),u=w("./capability"),s=w("inherits"),f=w("./response"),i=w("readable-stream"),n=w("to-arraybuffer"),t=f.IncomingMessage,c=f.readyStates,y=P.exports=function(_){var b=this;i.Writable.call(b),b._opts=_,b._body=[],b._headers={},_.auth&&b.setHeader("Authorization","Basic "+new l(_.auth).toString("base64")),(0,a.default)(_.headers).forEach(function(E){b.setHeader(E,_.headers[E])});var m,g=!0;if(_.mode==="disable-fetch"||"requestTimeout"in _&&!u.abortController)g=!1,m=!0;else if(_.mode==="prefer-streaming")m=!1;else if(_.mode==="allow-wrong-content-type")m=!u.overrideMimeType;else{if(_.mode&&_.mode!=="default"&&_.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");m=!0}b._mode=p(m,g),b._fetchTimer=null,b.on("finish",function(){b._onFinish()})};s(y,i.Writable),y.prototype.setHeader=function(_,b){var m=this,g=_.toLowerCase();v.indexOf(g)===-1&&(m._headers[g]={name:_,value:b})},y.prototype.getHeader=function(_){var b=this._headers[_.toLowerCase()];return b?b.value:null},y.prototype.removeHeader=function(_){delete this._headers[_.toLowerCase()]},y.prototype._onFinish=function(){var _=this;if(!_._destroyed){var b=_._opts,m=_._headers,g=null;b.method!=="GET"&&b.method!=="HEAD"&&(g=u.arraybuffer?n(l.concat(_._body)):u.blobConstructor?new T.Blob(_._body.map(function(A){return n(A)}),{type:(m["content-type"]||{}).value||""}):l.concat(_._body).toString());var E=[];if((0,a.default)(m).forEach(function(A){var D=m[A].name,I=m[A].value;Array.isArray(I)?I.forEach(function(F){E.push([D,F])}):E.push([D,I])}),_._mode==="fetch"){var o=null;if(u.abortController){var x=new AbortController;o=x.signal,_._fetchAbortController=x,"requestTimeout"in b&&b.requestTimeout!==0&&(_._fetchTimer=T.setTimeout(function(){_.emit("requestTimeout"),_._fetchAbortController&&_._fetchAbortController.abort()},b.requestTimeout))}T.fetch(_._opts.url,{method:_._opts.method,headers:E,body:g||void 0,mode:"cors",credentials:b.withCredentials?"include":"same-origin",signal:o}).then(function(A){_._fetchResponse=A,_._connect()},function(A){T.clearTimeout(_._fetchTimer),_._destroyed||_.emit("error",A)})}else{var C=_._xhr=new T.XMLHttpRequest;try{C.open(_._opts.method,_._opts.url,!0)}catch(A){return void O.nextTick(function(){_.emit("error",A)})}"responseType"in C&&(C.responseType=_._mode.split(":")[0]),"withCredentials"in C&&(C.withCredentials=!!b.withCredentials),_._mode==="text"&&"overrideMimeType"in C&&C.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in b&&(C.timeout=b.requestTimeout,C.ontimeout=function(){_.emit("requestTimeout")}),E.forEach(function(A){C.setRequestHeader(A[0],A[1])}),_._response=null,C.onreadystatechange=function(){switch(C.readyState){case c.LOADING:case c.DONE:_._onXHRProgress()}},_._mode==="moz-chunked-arraybuffer"&&(C.onprogress=function(){_._onXHRProgress()}),C.onerror=function(){_._destroyed||_.emit("error",new Error("XHR error"))};try{C.send(g)}catch(A){return void O.nextTick(function(){_.emit("error",A)})}}}},y.prototype._onXHRProgress=function(){var _=this;h(_._xhr)&&!_._destroyed&&(_._response||_._connect(),_._response._onXHRProgress())},y.prototype._connect=function(){var _=this;_._destroyed||(_._response=new t(_._xhr,_._fetchResponse,_._mode,_._fetchTimer),_._response.on("error",function(b){_.emit("error",b)}),_.emit("response",_._response))},y.prototype._write=function(_,b,m){this._body.push(_),m()},y.prototype.abort=y.prototype.destroy=function(){var _=this;_._destroyed=!0,T.clearTimeout(_._fetchTimer),_._response&&(_._response._destroyed=!0),_._xhr?_._xhr.abort():_._fetchAbortController&&_._fetchAbortController.abort()},y.prototype.end=function(_,b,m){var g=this;typeof _=="function"&&(m=_,_=void 0),i.Writable.prototype.end.call(g,_,b,m)},y.prototype.flushHeaders=function(){},y.prototype.setTimeout=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var v=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(w,P,S){(function(O,T,l){"use strict";var p=w("babel-runtime/core-js/promise"),h=function(i){return i&&i.__esModule?i:{default:i}}(p),d=w("./capability"),a=w("inherits"),u=w("readable-stream"),s=S.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=S.IncomingMessage=function(i,n,t,c){var y=this;if(u.Readable.call(y),y._mode=t,y.headers={},y.rawHeaders=[],y.trailers={},y.rawTrailers=[],y.on("end",function(){O.nextTick(function(){y.emit("close")})}),t==="fetch"){if(y._fetchResponse=n,y.url=n.url,y.statusCode=n.status,y.statusMessage=n.statusText,n.headers.forEach(function(g,E){y.headers[E.toLowerCase()]=g,y.rawHeaders.push(E,g)}),d.writableStream){var v=new WritableStream({write:function(g){return new h.default(function(E,o){y._destroyed?o():y.push(new l(g))?E():y._resumeFetch=E})},close:function(){T.clearTimeout(c),y._destroyed||y.push(null)},abort:function(g){y._destroyed||y.emit("error",g)}});try{return void n.body.pipeTo(v).catch(function(g){T.clearTimeout(c),y._destroyed||y.emit("error",g)})}catch(g){}}var _=n.body.getReader();!function g(){_.read().then(function(E){if(!y._destroyed){if(E.done)return T.clearTimeout(c),void y.push(null);y.push(new l(E.value)),g()}}).catch(function(E){T.clearTimeout(c),y._destroyed||y.emit("error",E)})}()}else if(y._xhr=i,y._pos=0,y.url=i.responseURL,y.statusCode=i.status,y.statusMessage=i.statusText,i.getAllResponseHeaders().split(/\r?\n/).forEach(function(g){var E=g.match(/^([^:]+):\s*(.*)/);if(E){var o=E[1].toLowerCase();o==="set-cookie"?(y.headers[o]===void 0&&(y.headers[o]=[]),y.headers[o].push(E[2])):y.headers[o]!==void 0?y.headers[o]+=", "+E[2]:y.headers[o]=E[2],y.rawHeaders.push(E[1],E[2])}}),y._charset="x-user-defined",!d.overrideMimeType){var b=y.rawHeaders["mime-type"];if(b){var m=b.match(/;\s*charset=([^;])(;|$)/);m&&(y._charset=m[1].toLowerCase())}y._charset||(y._charset="utf-8")}};a(f,u.Readable),f.prototype._read=function(){var i=this,n=i._resumeFetch;n&&(i._resumeFetch=null,n())},f.prototype._onXHRProgress=function(){var i=this,n=i._xhr,t=null;switch(i._mode){case"text:vbarray":if(n.readyState!==s.DONE)break;try{t=new T.VBArray(n.responseBody).toArray()}catch(b){}if(t!==null){i.push(new l(t));break}case"text":try{t=n.responseText}catch(b){i._mode="text:vbarray";break}if(t.length>i._pos){var c=t.substr(i._pos);if(i._charset==="x-user-defined"){for(var y=new l(c.length),v=0;vi._pos&&(i.push(new l(new Uint8Array(_.result.slice(i._pos)))),i._pos=_.result.byteLength)},_.onload=function(){i.push(null)},_.readAsArrayBuffer(t)}i._xhr.readyState===s.DONE&&i._mode!=="ms-stream"&&i.push(null)}}).call(this,w("_process"),typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{},w("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(w,P,S){"use strict";function O(b){if(!b)return"utf8";for(var m;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(m)return;b=(""+b).toLowerCase(),m=!0}}function T(b){var m=O(b);if(typeof m!="string"&&(v.isEncoding===_||!_(b)))throw new Error("Unknown encoding: "+b);return m||b}function l(b){this.encoding=T(b);var m;switch(this.encoding){case"utf16le":this.text=f,this.end=i,m=4;break;case"utf8":this.fillLast=a,m=4;break;case"base64":this.text=n,this.end=t,m=3;break;default:return this.write=c,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=v.allocUnsafe(m)}function p(b){return b<=127?0:b>>5==6?2:b>>4==14?3:b>>3==30?4:b>>6==2?-1:-2}function h(b,m,g){var E=m.length-1;if(E=0?(o>0&&(b.lastNeed=o-1),o):--E=0?(o>0&&(b.lastNeed=o-2),o):--E=0?(o>0&&(o===2?o=0:b.lastNeed=o-3),o):0)}function d(b,m,g){if((192&m[0])!=128)return b.lastNeed=0,"\u951F\uFFFD";if(b.lastNeed>1&&m.length>1){if((192&m[1])!=128)return b.lastNeed=1,"\u951F\uFFFD";if(b.lastNeed>2&&m.length>2&&(192&m[2])!=128)return b.lastNeed=2,"\u951F\uFFFD"}}function a(b){var m=this.lastTotal-this.lastNeed,g=d(this,b,m);return g!==void 0?g:this.lastNeed<=b.length?(b.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(b.copy(this.lastChar,m,0,b.length),void(this.lastNeed-=b.length))}function u(b,m){var g=h(this,b,m);if(!this.lastNeed)return b.toString("utf8",m);this.lastTotal=g;var E=b.length-(g-this.lastNeed);return b.copy(this.lastChar,0,E),b.toString("utf8",m,E)}function s(b){var m=b&&b.length?this.write(b):"";return this.lastNeed?m+"\u951F\uFFFD":m}function f(b,m){if((b.length-m)%2==0){var g=b.toString("utf16le",m);if(g){var E=g.charCodeAt(g.length-1);if(E>=55296&&E<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",m,b.length-1)}function i(b){var m=b&&b.length?this.write(b):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,g)}return m}function n(b,m){var g=(b.length-m)%3;return g===0?b.toString("base64",m):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",m,b.length-g))}function t(b){var m=b&&b.length?this.write(b):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function c(b){return b.toString(this.encoding)}function y(b){return b&&b.length?this.write(b):""}var v=w("safe-buffer").Buffer,_=v.isEncoding||function(b){switch((b=""+b)&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};S.StringDecoder=l,l.prototype.write=function(b){if(b.length===0)return"";var m,g;if(this.lastNeed){if((m=this.fillLast(b))===void 0)return"";g=this.lastNeed,this.lastNeed=0}else g=0;return g=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},f))},S.setImmediate=typeof O=="function"?O:function(s){var f=u++,i=!(arguments.length<2)&&d.call(arguments,1);return a[f]=!0,p(function(){a[f]&&(i?s.apply(null,i):s.call(null),S.clearImmediate(f))}),f},S.clearImmediate=typeof T=="function"?T:function(s){delete a[s]}}).call(this,w("timers").setImmediate,w("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(w,P,S){var O=w("buffer").Buffer;P.exports=function(T){if(T instanceof Uint8Array){if(T.byteOffset===0&&T.byteLength===T.buffer.byteLength)return T.buffer;if(typeof T.buffer.slice=="function")return T.buffer.slice(T.byteOffset,T.byteOffset+T.byteLength)}if(O.isBuffer(T)){for(var l=new Uint8Array(T.length),p=T.length,h=0;h",'"',"`"," ","\r",` `," "],n=["{","}","|","\\","^","`"].concat(i),t=["'"].concat(n),c=["%","/","?",";","#"].concat(t),y=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=w("querystring");O.prototype.parse=function(o,x,C){if(!a.isString(o))throw new TypeError("Parameter 'url' must be a string, not "+typeof o);var A=o.indexOf("?"),D=A!==-1&&A127?Ce+="x":Ce+=pe[Be];if(!Ce.match(v)){var ke=ye.slice(0,B),Ne=ye.slice(B+1),he=pe.match(_);he&&(ke.push(he[1]),Ne.unshift(he[2])),Ne.length&&(H="/"+Ne.join(".")+H),this.hostname=ke.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),Ee||(this.hostname=d.toASCII(this.hostname));var ue=this.port?":"+this.port:"",Ie=this.hostname||"";this.host=Ie+ue,this.href+=this.host,Ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),H[0]!=="/"&&(H="/"+H))}if(!b[G])for(var B=0,Le=t.length;B0)&&C.host.split("@");Ce&&(C.auth=Ce.shift(),C.host=C.hostname=Ce.shift())}return C.search=o.search,C.query=o.query,a.isNull(C.pathname)&&a.isNull(C.search)||(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!ye.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var Be=ye.slice(-1)[0],Pe=(C.host||o.host||ye.length>1)&&(Be==="."||Be==="..")||Be==="",ke=0,Ne=ye.length;Ne>=0;Ne--)Be=ye[Ne],Be==="."?ye.splice(Ne,1):Be===".."?(ye.splice(Ne,1),ke++):ke&&(ye.splice(Ne,1),ke--);if(!oe&&!Ee)for(;ke--;ke)ye.unshift("..");!oe||ye[0]===""||ye[0]&&ye[0].charAt(0)==="/"||ye.unshift(""),Pe&&ye.join("/").substr(-1)!=="/"&&ye.push("");var he=ye[0]===""||ye[0]&&ye[0].charAt(0)==="/";if(pe){C.hostname=C.host=he?"":ye.length?ye.shift():"";var Ce=!!(C.host&&C.host.indexOf("@")>0)&&C.host.split("@");Ce&&(C.auth=Ce.shift(),C.host=C.hostname=Ce.shift())}return oe=oe||C.host&&ye.length,oe&&!he&&ye.unshift(""),ye.length?C.pathname=ye.join("/"):(C.pathname=null,C.path=null),a.isNull(C.pathname)&&a.isNull(C.search)||(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=o.auth||C.auth,C.slashes=C.slashes||o.slashes,C.href=C.format(),C},O.prototype.parseHost=function(){var o=this.host,x=s.exec(o);x&&(x=x[0],x!==":"&&(this.port=x.substr(1)),o=o.substr(0,o.length-x.length)),o&&(this.hostname=o)}},{"./util":204,punycode:174,querystring:177}],204:[function(w,P,S){"use strict";P.exports={isString:function(O){return typeof O=="string"},isObject:function(O){return typeof O=="object"&&O!==null},isNull:function(O){return O===null},isNullOrUndefined:function(O){return O==null}}},{}],205:[function(w,P,S){(function(O){function T(p,h){function d(){if(!a){if(l("throwDeprecation"))throw new Error(h);l("traceDeprecation")?console.trace(h):console.warn(h),a=!0}return p.apply(this,arguments)}if(l("noDeprecation"))return p;var a=!1;return d}function l(p){try{if(!O.localStorage)return!1}catch(d){return!1}var h=O.localStorage[p];return h!=null&&String(h).toLowerCase()==="true"}P.exports=T}).call(this,typeof ae!="undefined"?ae:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(w,P,S){P.exports=function(O){return O&&typeof O=="object"&&typeof O.copy=="function"&&typeof O.fill=="function"&&typeof O.readUInt8=="function"}},{}],207:[function(w,P,S){(function(O,T){function l(B,Q){var ie={seen:[],stylize:h};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),c(Q)?ie.showHidden=Q:Q&&S._extend(ie,Q),g(ie.showHidden)&&(ie.showHidden=!1),g(ie.depth)&&(ie.depth=2),g(ie.colors)&&(ie.colors=!1),g(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=p),a(ie,B,ie.depth)}function p(B,Q){var ie=l.styles[Q];return ie?"["+l.colors[ie][0]+"m"+B+"["+l.colors[ie][1]+"m":B}function h(B,Q){return B}function d(B){var Q={};return B.forEach(function(ie,oe){Q[ie]=!0}),Q}function a(B,Q,ie){if(B.customInspect&&Q&&A(Q.inspect)&&Q.inspect!==S.inspect&&(!Q.constructor||Q.constructor.prototype!==Q)){var oe=Q.inspect(ie,B);return b(oe)||(oe=a(B,oe,ie)),oe}var Ee=u(B,Q);if(Ee)return Ee;var ye=Object.keys(Q),Le=d(ye);if(B.showHidden&&(ye=Object.getOwnPropertyNames(Q)),C(Q)&&(ye.indexOf("message")>=0||ye.indexOf("description")>=0))return s(Q);if(ye.length===0){if(A(Q)){var pe=Q.name?": "+Q.name:"";return B.stylize("[Function"+pe+"]","special")}if(E(Q))return B.stylize(RegExp.prototype.toString.call(Q),"regexp");if(x(Q))return B.stylize(Date.prototype.toString.call(Q),"date");if(C(Q))return s(Q)}var Ce="",Be=!1,Pe=["{","}"];if((t(Q)&&(Be=!0,Pe=["[","]"]),A(Q))&&(Ce=" [Function"+(Q.name?": "+Q.name:"")+"]"),E(Q)&&(Ce=" "+RegExp.prototype.toString.call(Q)),x(Q)&&(Ce=" "+Date.prototype.toUTCString.call(Q)),C(Q)&&(Ce=" "+s(Q)),ye.length===0&&(!Be||Q.length==0))return Pe[0]+Ce+Pe[1];if(ie<0)return E(Q)?B.stylize(RegExp.prototype.toString.call(Q),"regexp"):B.stylize("[Object]","special");B.seen.push(Q);var ke;return ke=Be?f(B,Q,ie,Le,ye):ye.map(function(Ne){return i(B,Q,ie,Le,Ne,Be)}),B.seen.pop(),n(ke,Ce,Pe)}function u(B,Q){if(g(Q))return B.stylize("undefined","undefined");if(b(Q)){var ie="'"+JSON.stringify(Q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(ie,"string")}return _(Q)?B.stylize(""+Q,"number"):c(Q)?B.stylize(""+Q,"boolean"):y(Q)?B.stylize("null","null"):void 0}function s(B){return"["+Error.prototype.toString.call(B)+"]"}function f(B,Q,ie,oe,Ee){for(var ye=[],Le=0,pe=Q.length;Le-1&&(pe=ye?pe.split(` `).map(function(Be){return" "+Be}).join(` `).substr(2):` `+pe.split(` `).map(function(Be){return" "+Be}).join(` `))):pe=B.stylize("[Circular]","special")),g(Le)){if(ye&&Ee.match(/^\d+$/))return pe;Le=JSON.stringify(""+Ee),Le.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Le=Le.substr(1,Le.length-2),Le=B.stylize(Le,"name")):(Le=Le.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Le=B.stylize(Le,"string"))}return Le+": "+pe}function n(B,Q,ie){var oe=0;return B.reduce(function(Ee,ye){return oe++,ye.indexOf(` `)>=0&&oe++,Ee+ye.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?ie[0]+(Q===""?"":Q+` `)+" "+B.join(`, `)+" "+ie[1]:ie[0]+Q+" "+B.join(", ")+" "+ie[1]}function t(B){return Array.isArray(B)}function c(B){return typeof B=="boolean"}function y(B){return B===null}function v(B){return B==null}function _(B){return typeof B=="number"}function b(B){return typeof B=="string"}function m(B){return typeof B=="symbol"}function g(B){return B===void 0}function E(B){return o(B)&&I(B)==="[object RegExp]"}function o(B){return typeof B=="object"&&B!==null}function x(B){return o(B)&&I(B)==="[object Date]"}function C(B){return o(B)&&(I(B)==="[object Error]"||B instanceof Error)}function A(B){return typeof B=="function"}function D(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||B===void 0}function I(B){return Object.prototype.toString.call(B)}function F(B){return B<10?"0"+B.toString(10):B.toString(10)}function H(){var B=new Date,Q=[F(B.getHours()),F(B.getMinutes()),F(B.getSeconds())].join(":");return[B.getDate(),J[B.getMonth()],Q].join(" ")}function te(B,Q){return Object.prototype.hasOwnProperty.call(B,Q)}var j=/%[sdj%]/g;S.format=function(B){if(!b(B)){for(var Q=[],ie=0;ie=Ee)return Ce;switch(Ce){case"%s":return String(oe[ie++]);case"%d":return Number(oe[ie++]);case"%j":try{return JSON.stringify(oe[ie++])}catch(Be){return"[Circular]"}default:return Ce}}),Le=oe[ie];ie=0||n.indexOf(">")>=0||n.indexOf("<")>=0)},f=function(n){return""},u=function(n){return n.replace("]]>","]]]]>")},S.Builder=function(){function n(t){var c,y,v;this.options={},y=a[.2];for(c in y)i.call(y,c)&&(v=y[c],this.options[c]=v);for(c in t)i.call(t,c)&&(v=t[c],this.options[c]=v)}return n.prototype.buildObject=function(t){var c,y,v,_,b;return c=this.options.attrkey,y=this.options.charkey,(0,h.default)(t).length===1&&this.options.rootName===a[.2].rootName?(b=(0,h.default)(t)[0],t=t[b]):b=this.options.rootName,v=function(m){return function(g,E){var o,x,C,A,D,I;if((E===void 0?"undefined":(0,l.default)(E))!=="object")m.options.cdata&&s(E)?g.raw(f(E)):g.txt(E);else if(Array.isArray(E)){for(A in E)if(i.call(E,A)){x=E[A];for(D in x)C=x[D],g=v(g.ele(D),C).up()}}else for(D in E)if(i.call(E,D))if(x=E[D],D===c){if((x===void 0?"undefined":(0,l.default)(x))==="object")for(o in x)I=x[o],g=g.att(o,I)}else if(D===y)g=m.options.cdata&&s(x)?g.raw(f(x)):g.txt(x);else if(Array.isArray(x))for(A in x)i.call(x,A)&&(C=x[A],g=typeof C=="string"?m.options.cdata&&s(C)?g.ele(D).raw(f(C)).up():g.ele(D,C).up():v(g.ele(D),C).up());else(x===void 0?"undefined":(0,l.default)(x))==="object"?g=v(g.ele(D),x).up():typeof x=="string"&&m.options.cdata&&s(x)?g=g.ele(D).raw(f(x)).up():(x==null&&(x=""),g=g.ele(D,x.toString()).up());return g}}(this),_=d.create(b,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),v(_,t).end(this.options.renderOpts)},n}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(w,P,S){"use strict";(function(){S.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:` `},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(w,P,S){"use strict";function O(u){return u&&u.__esModule?u:{default:u}}var T=w("babel-runtime/core-js/object/get-own-property-names"),l=O(T),p=w("babel-runtime/core-js/object/keys"),h=O(p),d=w("babel-runtime/helpers/typeof"),a=O(d);(function(){var u,s,f,i,n,t,c,y,v=function(m,g){return function(){return m.apply(g,arguments)}},_=function(m,g){function E(){this.constructor=m}for(var o in g)b.call(g,o)&&(m[o]=g[o]);return E.prototype=g.prototype,m.prototype=new E,m.__super__=g.prototype,m},b={}.hasOwnProperty;c=w("sax"),f=w("events"),u=w("./bom"),t=w("./processors"),y=w("timers").setImmediate,s=w("./defaults").defaults,i=function(m){return(m===void 0?"undefined":(0,a.default)(m))==="object"&&m!=null&&(0,h.default)(m).length===0},n=function(m,g,E){var o,x,C;for(o=0,x=m.length;o0&&(H[A.options.childkey]=j),j=H;return C.length>0?A.assignOrPush(J,te,j):(A.options.explicitRoot&&(X=j,j={},j[te]=X),A.resultObject=j,A.saxParser.ended=!0,A.emit("end",A.resultObject))}}(this),x=function(A){return function(D){var I,F;if(F=C[C.length-1])return F[o]+=D,A.options.explicitChildren&&A.options.preserveChildrenOrder&&A.options.charsAsChildren&&(A.options.includeWhiteChars||D.replace(/\\n/g,"").trim()!=="")&&(F[A.options.childkey]=F[A.options.childkey]||[],I={"#name":"__text__"},I[o]=D,A.options.normalize&&(I[o]=I[o].replace(/\s{2,}/g," ").trim()),F[A.options.childkey].push(I)),F}}(this),this.saxParser.ontext=x,this.saxParser.oncdata=function(A){return function(D){var I;if(I=x(D))return I.cdata=!0}}()},g.prototype.parseString=function(E,o){var x;o!=null&&typeof o=="function"&&(this.on("end",function(C){return this.reset(),o(null,C)}),this.on("error",function(C){return this.reset(),o(C)}));try{return E=E.toString(),E.trim()===""?(this.emit("end",null),!0):(E=u.stripBOM(E),this.options.async?(this.remaining=E,y(this.processAsync),this.saxParser):this.saxParser.write(E).close())}catch(C){if(x=C,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",x),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw x}},g}(f.EventEmitter),S.parseString=function(m,g,E){var o,x,C;return E!=null?(typeof E=="function"&&(o=E),(g===void 0?"undefined":(0,a.default)(g))==="object"&&(x=g)):(typeof g=="function"&&(o=g),x={}),C=new S.Parser(x),C.parseString(m,o)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(w,P,S){"use strict";(function(){var O;O=new RegExp(/(?!xmlns)^.*:/),S.normalize=function(T){return T.toLowerCase()},S.firstCharLowerCase=function(T){return T.charAt(0).toLowerCase()+T.slice(1)},S.stripPrefix=function(T){return T.replace(O,"")},S.parseNumbers=function(T){return isNaN(T)||(T=T%1==0?parseInt(T,10):parseFloat(T)),T},S.parseBooleans=function(T){return/^(?:true|false)$/i.test(T)&&(T=T.toLowerCase()==="true"),T}}).call(void 0)},{}],213:[function(w,P,S){"use strict";(function(){var O,T,l,p,h=function(a,u){function s(){this.constructor=a}for(var f in u)d.call(u,f)&&(a[f]=u[f]);return s.prototype=u.prototype,a.prototype=new s,a.__super__=u.prototype,a},d={}.hasOwnProperty;T=w("./defaults"),O=w("./builder"),l=w("./parser"),p=w("./processors"),S.defaults=T.defaults,S.processors=p,S.ValidationError=function(a){function u(s){this.message=s}return h(u,a),u}(Error),S.Builder=O.Builder,S.Parser=l.Parser,S.parseString=l.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(w,P,S){"use strict";function O(u){return u&&u.__esModule?u:{default:u}}var T=w("babel-runtime/core-js/object/get-prototype-of"),l=O(T),p=w("babel-runtime/helpers/typeof"),h=O(p),d=w("babel-runtime/core-js/object/assign"),a=O(d);(function(){var u,s,f,i,n,t,c=[].slice,y={}.hasOwnProperty;u=function(){var v,_,b,m,g,E;if(E=arguments[0],g=2<=arguments.length?c.call(arguments,1):[],i(a.default))a.default.apply(null,arguments);else for(v=0,b=g.length;v=0;)this.up();return this.onEnd()},E.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},E.prototype.openNode=function(o){if(!o.isOpen)return!this.root&&this.currentLevel===0&&o instanceof f&&(this.root=o),this.onData(this.writer.openNode(o,this.currentLevel)),o.isOpen=!0},E.prototype.closeNode=function(o){if(!o.isClosed)return this.onData(this.writer.closeNode(o,this.currentLevel)),o.isClosed=!0},E.prototype.onData=function(o){return this.documentStarted=!0,this.onDataCallback(o)},E.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},E.prototype.ele=function(){return this.element.apply(this,arguments)},E.prototype.nod=function(o,x,C){return this.node(o,x,C)},E.prototype.txt=function(o){return this.text(o)},E.prototype.dat=function(o){return this.cdata(o)},E.prototype.com=function(o){return this.comment(o)},E.prototype.ins=function(o,x){return this.instruction(o,x)},E.prototype.dec=function(o,x,C){return this.declaration(o,x,C)},E.prototype.dtd=function(o,x,C){return this.doctype(o,x,C)},E.prototype.e=function(o,x,C){return this.element(o,x,C)},E.prototype.n=function(o,x,C){return this.node(o,x,C)},E.prototype.t=function(o){return this.text(o)},E.prototype.d=function(o){return this.cdata(o)},E.prototype.c=function(o){return this.comment(o)},E.prototype.r=function(o){return this.raw(o)},E.prototype.i=function(o,x){return this.instruction(o,x)},E.prototype.att=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.a=function(){return this.currentNode&&this.currentNode instanceof s?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},E.prototype.ent=function(o,x){return this.entity(o,x)},E.prototype.pent=function(o,x){return this.pEntity(o,x)},E.prototype.not=function(o,x){return this.notation(o,x)},E}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(w,P,S){"use strict";var O=w("babel-runtime/core-js/object/create"),T=function(l){return l&&l.__esModule?l:{default:l}}(O);(function(){var l,p,h,d,a,u=function(f,i){function n(){this.constructor=f}for(var t in i)s.call(i,t)&&(f[t]=i[t]);return n.prototype=i.prototype,f.prototype=new n,f.__super__=i.prototype,f},s={}.hasOwnProperty;a=w("./Utility"),d=a.isObject,h=a.isFunction,p=w("./XMLNode"),l=w("./XMLAttribute"),P.exports=function(f){function i(n,t,c){if(i.__super__.constructor.call(this,n),t==null)throw new Error("Missing element name");this.name=this.stringify.eleName(t),this.attributes={},c!=null&&this.attribute(c),n.isDocument&&(this.isRoot=!0,this.documentObject=n,n.rootObject=this)}return u(i,f),i.prototype.clone=function(){var n,t,c,y;c=(0,T.default)(this),c.isRoot&&(c.documentObject=null),c.attributes={},y=this.attributes;for(t in y)s.call(y,t)&&(n=y[t],c.attributes[t]=n.clone());return c.children=[],this.children.forEach(function(v){var _;return _=v.clone(),_.parent=c,c.children.push(_)}),c},i.prototype.attribute=function(n,t){var c,y;if(n!=null&&(n=n.valueOf()),d(n))for(c in n)s.call(n,c)&&(y=n[c],this.attribute(c,y));else h(t)&&(t=t.apply()),this.options.skipNullAttributes&&t==null||(this.attributes[n]=new l(this,n,t));return this},i.prototype.removeAttribute=function(n){var t,c,y;if(n==null)throw new Error("Missing attribute name");if(n=n.valueOf(),Array.isArray(n))for(c=0,y=n.length;c"+this.endline(b))},_.prototype.comment=function(b,m){return this.stream.write(this.space(m)+""+this.endline(b))},_.prototype.declaration=function(b,m){return this.stream.write(this.space(m)),this.stream.write('"),this.stream.write(this.endline(b))},_.prototype.docType=function(b,m){var g,E,o,x;if(m||(m=0),this.stream.write(this.space(m)),this.stream.write("0){for(this.stream.write(" ["),this.stream.write(this.endline(b)),x=b.children,E=0,o=x.length;E"),this.stream.write(this.endline(b))},_.prototype.element=function(b,m){var g,E,o,x,C,A,D,I;m||(m=0),I=this.space(m),this.stream.write(I+"<"+b.name),A=b.attributes;for(C in A)y.call(A,C)&&(g=A[C],this.attribute(g));if(b.children.length===0||b.children.every(function(F){return F.value===""}))this.allowEmpty?this.stream.write(">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&b.children.length===1&&b.children[0].value!=null)this.stream.write(">"),this.stream.write(b.children[0].value),this.stream.write("");else{for(this.stream.write(">"+this.newline),D=b.children,o=0,x=D.length;o")}return this.stream.write(this.endline(b))},_.prototype.processingInstruction=function(b,m){return this.stream.write(this.space(m)+""+this.endline(b))},_.prototype.raw=function(b,m){return this.stream.write(this.space(m)+b.value+this.endline(b))},_.prototype.text=function(b,m){return this.stream.write(this.space(m)+b.value+this.endline(b))},_.prototype.dtdAttList=function(b,m){return this.stream.write(this.space(m)+""+this.endline(b))},_.prototype.dtdElement=function(b,m){return this.stream.write(this.space(m)+""+this.endline(b))},_.prototype.dtdEntity=function(b,m){return this.stream.write(this.space(m)+""+this.endline(b))},_.prototype.dtdNotation=function(b,m){return this.stream.write(this.space(m)+""+this.endline(b))},_.prototype.endline=function(b){return b.isLastRootNode?"":this.newline},_}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(w,P,S){"use strict";(function(){var O,T,l,p,h,d,a,u,s,f,i,n,t,c=function(v,_){function b(){this.constructor=v}for(var m in _)y.call(_,m)&&(v[m]=_[m]);return b.prototype=_.prototype,v.prototype=new b,v.__super__=_.prototype,v},y={}.hasOwnProperty;a=w("./XMLDeclaration"),u=w("./XMLDocType"),O=w("./XMLCData"),T=w("./XMLComment"),s=w("./XMLElement"),i=w("./XMLRaw"),n=w("./XMLText"),f=w("./XMLProcessingInstruction"),l=w("./XMLDTDAttList"),p=w("./XMLDTDElement"),h=w("./XMLDTDEntity"),d=w("./XMLDTDNotation"),t=w("./XMLWriterBase"),P.exports=function(v){function _(b){_.__super__.constructor.call(this,b)}return c(_,v),_.prototype.document=function(b){var m,g,E,o,x;for(this.textispresent=!1,o="",x=b.children,g=0,E=x.length;g"+this.newline},_.prototype.comment=function(b,m){return this.space(m)+""+this.newline},_.prototype.declaration=function(b,m){var g;return g=this.space(m),g+='",g+=this.newline},_.prototype.docType=function(b,m){var g,E,o,x,C;if(m||(m=0),x=this.space(m),x+="0){for(x+=" [",x+=this.newline,C=b.children,E=0,o=C.length;E",x+=this.newline},_.prototype.element=function(b,m){var g,E,o,x,C,A,D,I,F,H,te,j,G;m||(m=0),G=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),j=this.space(m),I="",I+=j+"<"+b.name,F=b.attributes;for(D in F)y.call(F,D)&&(g=F[D],I+=this.attribute(g));if(b.children.length===0||b.children.every(function(X){return X.value===""}))this.allowEmpty?I+=">"+this.newline:I+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&b.children.length===1&&b.children[0].value!=null)I+=">",I+=b.children[0].value,I+=""+this.newline;else{if(this.dontprettytextnodes){for(H=b.children,o=0,C=H.length;o"+this.newline,te=b.children,x=0,A=te.length;x"+this.newline}return I},_.prototype.processingInstruction=function(b,m){var g;return g=this.space(m)+""+this.newline},_.prototype.raw=function(b,m){return this.space(m)+b.value+this.newline},_.prototype.text=function(b,m){return this.space(m)+b.value+this.newline},_.prototype.dtdAttList=function(b,m){var g;return g=this.space(m)+""+this.newline},_.prototype.dtdElement=function(b,m){return this.space(m)+""+this.newline},_.prototype.dtdEntity=function(b,m){var g;return g=this.space(m)+""+this.newline},_.prototype.dtdNotation=function(b,m){var g;return g=this.space(m)+""+this.newline},_.prototype.openNode=function(b,m){var g,E,o,x;if(m||(m=0),b instanceof s){o=this.space(m)+"<"+b.name,x=b.attributes;for(E in x)y.call(x,E)&&(g=x[E],o+=this.attribute(g));return o+=(b.children?">":"/>")+this.newline}return o=this.space(m)+"")+this.newline},_.prototype.closeNode=function(b,m){switch(m||(m=0),!1){case!(b instanceof s):return this.space(m)+""+this.newline;case!(b instanceof u):return this.space(m)+"]>"+this.newline}},_}(t)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(w,P,S){"use strict";(function(){var O=function(l,p){return function(){return l.apply(p,arguments)}},T={}.hasOwnProperty;P.exports=function(){function l(p){this.assertLegalChar=O(this.assertLegalChar,this);var h,d,a;p||(p={}),this.noDoubleEncoding=p.noDoubleEncoding,d=p.stringify||{};for(h in d)T.call(d,h)&&(a=d[h],this[h]=a)}return l.prototype.eleName=function(p){return p=""+p||"",this.assertLegalChar(p)},l.prototype.eleText=function(p){return p=""+p||"",this.assertLegalChar(this.elEscape(p))},l.prototype.cdata=function(p){return p=""+p||"",p=p.replace("]]>","]]]]>"),this.assertLegalChar(p)},l.prototype.comment=function(p){if(p=""+p||"",p.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+p);return this.assertLegalChar(p)},l.prototype.raw=function(p){return""+p||""},l.prototype.attName=function(p){return p=""+p||""},l.prototype.attValue=function(p){return p=""+p||"",this.attEscape(p)},l.prototype.insTarget=function(p){return""+p||""},l.prototype.insValue=function(p){if(p=""+p||"",p.match(/\?>/))throw new Error("Invalid processing instruction value: "+p);return p},l.prototype.xmlVersion=function(p){if(p=""+p||"",!p.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+p);return p},l.prototype.xmlEncoding=function(p){if(p=""+p||"",!p.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+p);return p},l.prototype.xmlStandalone=function(p){return p?"yes":"no"},l.prototype.dtdPubID=function(p){return""+p||""},l.prototype.dtdSysID=function(p){return""+p||""},l.prototype.dtdElementValue=function(p){return""+p||""},l.prototype.dtdAttType=function(p){return""+p||""},l.prototype.dtdAttDefault=function(p){return p!=null?""+p||"":p},l.prototype.dtdEntityValue=function(p){return""+p||""},l.prototype.dtdNData=function(p){return""+p||""},l.prototype.convertAttKey="@",l.prototype.convertPIKey="?",l.prototype.convertTextKey="#text",l.prototype.convertCDataKey="#cdata",l.prototype.convertCommentKey="#comment",l.prototype.convertRawKey="#raw",l.prototype.assertLegalChar=function(p){var h;if(h=p.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+p+" at index "+h.index);return p},l.prototype.elEscape=function(p){var h;return h=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(//g,">").replace(/\r/g," ")},l.prototype.attEscape=function(p){var h;return h=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,p.replace(h,"&").replace(/0?new Array(p).join(this.indent):""):""},T}()}).call(void 0)},{}],235:[function(w,P,S){"use strict";(function(){var O,T,l,p,h,d,a;a=w("./Utility"),h=a.assign,d=a.isFunction,O=w("./XMLDocument"),T=w("./XMLDocumentCB"),p=w("./XMLStringWriter"),l=w("./XMLStreamWriter"),P.exports.create=function(u,s,f,i){var n,t;if(u==null)throw new Error("Root element needs a name");return i=h({},s,f,i),n=new O(i),t=n.element(u),i.headless||(n.declaration(i),i.pubID==null&&i.sysID==null||n.doctype(i)),t},P.exports.begin=function(u,s,f){var i;return d(u)&&(i=[u,s],s=i[0],f=i[1],u={}),s?new T(u,s,f):new O(u)},P.exports.stringWriter=function(u){return new p(u)},P.exports.streamWriter=function(u,s){return new l(u,s)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(w,P,S){function O(){for(var l={},p=0;ps?n=i(n):n.length>5]|=128<>>9<<4)]=i;for(var n=1732584193,t=-271733879,c=-1732584194,y=271733878,v=0;v>16)+(i>>16)+(n>>16)<<16|65535&n}function u(f,i){return f<>>32-i}var s=w("./helpers");P.exports=function(f){return s.hash(f,O,16)}},{"./helpers":238}],240:[function(w,P,S){"use strict";function O(a,u){a[u>>5]|=128<<24-u%32,a[15+(u+64>>9<<4)]=u;for(var s=Array(80),f=1732584193,i=-271733879,n=-1732584194,t=271733878,c=-1009589776,y=0;y>16)+(u>>16)+(s>>16)<<16|65535&s}function h(a,u){return a<>>32-u}var d=w("./helpers");P.exports=function(a){return d.hash(a,O,20,!0)}},{"./helpers":238}],241:[function(w,P,S){"use strict";var O=w("./helpers"),T=function(n,t){var c=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(c>>16)<<16|65535&c},l=function(n,t){return n>>>t|n<<32-t},p=function(n,t){return n>>>t},h=function(n,t,c){return n&t^~n&c},d=function(n,t,c){return n&t^n&c^t&c},a=function(n){return l(n,2)^l(n,13)^l(n,22)},u=function(n){return l(n,6)^l(n,11)^l(n,25)},s=function(n){return l(n,7)^l(n,18)^p(n,3)},f=function(n){return l(n,17)^l(n,19)^p(n,10)},i=function(n,t){var c,y,v,_,b,m,g,E,o,x,C,A,D=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),F=new Array(64);n[t>>5]|=128<<24-t%32,n[15+(t+64>>9<<4)]=t;for(var o=0;o=0)return y("Request#%d %s: got digest auth header WWW-Authenticate: %s",X,E,ge),o.headers=o.headers||{},o.headers.Authorization=digestAuthHeader(pe.method,pe.path,ge,o.digestAuth),y("Request#%d %s: auth with digest header: %s",X,E,o.headers.Authorization),Ae.headers["set-cookie"]&&(o.headers.Cookie=Ae.headers["set-cookie"].join(";")),S.requestWithCallback(E,o,Oe)}var _e=Date.now()-Q;De&&(De.contentDownload=_e),y("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",_e,V,Y,pe.method,pe.host,pe.path,$,De);var be={status:Y,statusCode:Y,headers:fe,size:V,aborted:me,rt:_e,keepAliveSocket:$,data:we,requestUrls:o.requestUrls,timing:De,remoteAddress:Re,remotePort:rt};if(Ke){var Ge="";ye&&typeof ye.getCurrentStatus=="function"&&(Ge=", agent status: "+(0,u.default)(ye.getCurrentStatus())),Ke.message+=", "+pe.method+" "+E+" "+Y+" (connected: "+N+", keepalive socket: "+$+Ge+`) headers: `+(0,u.default)(fe),Ke.data=we,Ke.path=pe.path,Ke.status=Y,Ke.headers=fe,Ke.res=be}Oe(Ke,we,o.streaming?Ae:be),o.emitter&&(J.url=E,J.socket=Ve&&Ve.connection,J.options=pe,J.size=Ie,o.emitter.emit("response",{requestId:X,error:Ke,ctx:o.ctx,req:J,res:be}))}function I(Ke){var we=null;if(o.followRedirect&&statuses.redirect[Ke.statusCode]){o._followRedirectCount=(o._followRedirectCount||0)+1;var Ae=Ke.headers.location;if(Ae){if(!(o._followRedirectCount>o.maxRedirects)){var Oe=o.formatRedirectUrl?o.formatRedirectUrl(E,Ae):n.resolve(E,Ae);y("Request#%d %s: `redirected` from %s to %s",X,pe.path,E,Oe),A(),o.headers&&o.headers.Host&&m.test(Ae)&&(o.headers.Host=null);var fe=x;return x=null,S.requestWithCallback(Oe,o,fe),{redirect:!0,error:null}}we=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),we.name="MaxRedirectError"}else we=new Error("Got statusCode "+Ke.statusCode+" but cannot resolve next location from headers"),we.name="FollowRedirectError"}return{redirect:!1,error:we}}function F(Ke,we,Ae){return Ae(null,we,Ke.headers["content-encoding"])}function H(Ke){if(De&&(De.waiting=Date.now()-Q),y("Request#%d %s `req response` event emit: status %d, headers: %j",X,E,Ke.statusCode,Ke.headers),o.streaming){var we=I(Ke);return we.redirect?void Ke.resume():we.error?(Ke.resume(),D(we.error,null,Ke)):D(null,null,Ke)}if(Ke.on("close",function(){y("Request#%d %s: `res close` event emit, total size %d",X,E,V)}),Ke.on("error",function(){y("Request#%d %s: `res error` event emit, total size %d",X,E,V)}),Ke.on("aborted",function(){me=!0,y("Request#%d %s: `res aborted` event emit, total size %d",X,E,V)}),Me){var we=I(Ke);return we.redirect?void Ke.resume():we.error?(Ke.resume(),Me.end(),D(we.error,null,Ke)):(o.consumeWriteStream===!1?Ke.on("end",D.bind(null,null,null,Ke)):isNode010||isNode012?first([[Me,"close"],[Ke,"aborted"]],function(fe,ge,_e){y("Request#%d %s: writeStream or res %s event emitted",X,E,_e),D(M||null,null,Ke)}):Me.on("close",function(){y("Request#%d %s: writeStream close event emitted",X,E),D(M||null,null,Ke)}),Ke.pipe(Me))}var Ae=[];Ke.on("data",function(Oe){y("Request#%d %s: `res data` event emit, size %d",X,E,Oe.length),V+=Oe.length,Ae.push(Oe)}),Ke.on("end",function(){var Oe=T.concat(Ae,V);if(y("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",X,E,V,Ke._dumped),M)return D(M,Oe,Ke);var fe=I(Ke);if(fe.error)return D(fe.error,Oe,Ke);fe.redirect||F(Ke,Oe,function(ge,_e,be){if(ge)return D(ge,Oe,Ke);if(!be&&g.indexOf(o.dataType)>=0){try{_e=decodeBodyByCharset(_e,Ke)}catch(qe){return y("decodeBodyByCharset error: %s",qe),D(null,_e,Ke)}if(o.dataType==="json")if(V===0)_e=null;else{var Ge=parseJSON(_e,Le);Ge.error?ge=Ge.error:_e=Ge.data}}me&&y("Request#%d %s: Remote socket was terminated before `response.end()` was called",X,E),D(ge,_e,Ke)})})}function te(){y("Response timer ticking, timeout: %d",tt),ee=setTimeout(function(){ee=null;var Ke="Response timeout for "+tt+"ms";M=new Error(Ke),M.name="ResponseTimeoutError",M.requestId=X,y("ResponseTimeout: Request#%d %s %s: %s, connected: %s",X,E,M.name,Ke,N),j()},tt)}function j(){y("Request#%d %s abort, connected: %s",X,E,N),Ve.socket||(M.noSocket=!0,D(M)),Ve.abort()}if(!E||typeof E!="string"&&(E===void 0?"undefined":(0,f.default)(E))!=="object"){var G=i.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(G)}arguments.length===2&&typeof o=="function"&&(x=o,o=null),o=o||{},_>=b&&(_=0);var X=++_;o.requestUrls=o.requestUrls||[];var J={requestId:X,url:E,args:o,ctx:o.ctx};o.emitter&&o.emitter.emit("request",J),o.timeout=o.timeout||S.TIMEOUTS,o.maxRedirects=o.maxRedirects||10,o.streaming=o.streaming||o.customResponse;var B,Q=Date.now();typeof E=="string"?(m.test(E)||(E="http://"+E),B=n.parse(E)):B=E;var ie=(o.type||o.method||B.method||"GET").toUpperCase(),oe=B.port||80,Ee=t,ye=p(o.agent,S.agent),Le=o.fixJSONCtlChars;B.protocol==="https:"&&(Ee=c,ye=p(o.httpsAgent,S.httpsAgent),B.port||(oe=443));var pe={host:B.hostname||B.host||"localhost",path:B.path||"/",method:ie,port:oe,agent:ye,headers:o.headers||{},lookup:o.lookup};Array.isArray(o.timeout)?pe.requestTimeout=o.timeout[o.timeout.length-1]:o.timeout!==void 0&&(pe.requestTimeout=o.timeout);for(var Ce=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],Be=0;Be>>2]>>>24-m%4*8&255;y[_+m>>>2]|=g<<24-(_+m)%4*8}else for(var m=0;m>>2]=v[m>>>2];return this.sigBytes+=b,this},clamp:function(){var c=this.words,y=this.sigBytes;c[y>>>2]&=4294967295<<32-y%4*8,c.length=O.ceil(y/4)},clone:function(){var c=d.clone.call(this);return c.words=this.words.slice(0),c},random:function(c){for(var y,v=[],_=0;_>16)&E,m=18e3*(65535&m)+(m>>16)&E;var o=(g<<16)+m&E;return o/=4294967296,(o+=.5)*(O.random()>.5?1:-1)}}(4294967296*(y||O.random()));y=987654071*b(),v.push(4294967296*b()|0)}return new a.init(v,c)}}),u=p.enc={},s=u.Hex={stringify:function(c){for(var y=c.words,v=c.sigBytes,_=[],b=0;b>>2]>>>24-b%4*8&255;_.push((m>>>4).toString(16)),_.push((15&m).toString(16))}return _.join("")},parse:function(c){for(var y=c.length,v=[],_=0;_>>3]|=parseInt(c.substr(_,2),16)<<24-_%8*4;return new a.init(v,y/2)}},f=u.Latin1={stringify:function(c){for(var y=c.words,v=c.sigBytes,_=[],b=0;b>>2]>>>24-b%4*8&255;_.push(String.fromCharCode(m))}return _.join("")},parse:function(c){for(var y=c.length,v=[],_=0;_>>2]|=(255&c.charCodeAt(_))<<24-_%4*8;return new a.init(v,y)}},i=u.Utf8={stringify:function(c){try{return decodeURIComponent(escape(f.stringify(c)))}catch(y){throw new Error("Malformed UTF-8 data")}},parse:function(c){return f.parse(unescape(encodeURIComponent(c)))}},n=h.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(c){typeof c=="string"&&(c=i.parse(c)),this._data.concat(c),this._nDataBytes+=c.sigBytes},_process:function(c){var y=this._data,v=y.words,_=y.sigBytes,b=this.blockSize,m=4*b,g=_/m;g=c?O.ceil(g):O.max((0|g)-this._minBufferSize,0);var E=g*b,o=O.min(4*E,_);if(E){for(var x=0;x",d[0];)p++;return p>4&&p}},{key:"extend",value:function(p,h){for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&h[d]&&(p[d]=h[d])}},{key:"isArray",value:function(p){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(p){return p=p.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(p)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(p)?"audio":/.bmp|.jpg|.jpeg|.png/.test(p)?"img":"other"}},{key:"isImage",value:function(p){return p=p.toLowerCase(),!!/.jpg|.jpeg|.png/.test(p)}},{key:"ISODateString",value:function(p){function h(d){return d<10?"0"+d:d}return p.getUTCFullYear()+"-"+h(p.getUTCMonth()+1)+"-"+h(p.getUTCDate())+"T"+h(p.getUTCHours())+":"+h(p.getUTCMinutes())+":"+h(p.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(p){return!!/^\d+$/.test(p)}}]),l}();w.default=T},function(U,w,P){!function(S,O){U.exports=w=O(P(0))}(0,function(S){return function(O){function T(t,c,y,v,_,b,m){var g=t+(c&y|~c&v)+_+m;return(g<>>32-b)+c}function l(t,c,y,v,_,b,m){var g=t+(c&v|y&~v)+_+m;return(g<>>32-b)+c}function p(t,c,y,v,_,b,m){var g=t+(c^y^v)+_+m;return(g<>>32-b)+c}function h(t,c,y,v,_,b,m){var g=t+(y^(c|~v))+_+m;return(g<>>32-b)+c}var d=S,a=d.lib,u=a.WordArray,s=a.Hasher,f=d.algo,i=[];!function(){for(var t=0;t<64;t++)i[t]=4294967296*O.abs(O.sin(t+1))|0}();var n=f.MD5=s.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,c){for(var y=0;y<16;y++){var v=c+y,_=t[v];t[v]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8)}var b=this._hash.words,m=t[c+0],g=t[c+1],E=t[c+2],o=t[c+3],x=t[c+4],C=t[c+5],A=t[c+6],D=t[c+7],I=t[c+8],F=t[c+9],H=t[c+10],te=t[c+11],j=t[c+12],G=t[c+13],X=t[c+14],J=t[c+15],B=b[0],Q=b[1],ie=b[2],oe=b[3];B=T(B,Q,ie,oe,m,7,i[0]),oe=T(oe,B,Q,ie,g,12,i[1]),ie=T(ie,oe,B,Q,E,17,i[2]),Q=T(Q,ie,oe,B,o,22,i[3]),B=T(B,Q,ie,oe,x,7,i[4]),oe=T(oe,B,Q,ie,C,12,i[5]),ie=T(ie,oe,B,Q,A,17,i[6]),Q=T(Q,ie,oe,B,D,22,i[7]),B=T(B,Q,ie,oe,I,7,i[8]),oe=T(oe,B,Q,ie,F,12,i[9]),ie=T(ie,oe,B,Q,H,17,i[10]),Q=T(Q,ie,oe,B,te,22,i[11]),B=T(B,Q,ie,oe,j,7,i[12]),oe=T(oe,B,Q,ie,G,12,i[13]),ie=T(ie,oe,B,Q,X,17,i[14]),Q=T(Q,ie,oe,B,J,22,i[15]),B=l(B,Q,ie,oe,g,5,i[16]),oe=l(oe,B,Q,ie,A,9,i[17]),ie=l(ie,oe,B,Q,te,14,i[18]),Q=l(Q,ie,oe,B,m,20,i[19]),B=l(B,Q,ie,oe,C,5,i[20]),oe=l(oe,B,Q,ie,H,9,i[21]),ie=l(ie,oe,B,Q,J,14,i[22]),Q=l(Q,ie,oe,B,x,20,i[23]),B=l(B,Q,ie,oe,F,5,i[24]),oe=l(oe,B,Q,ie,X,9,i[25]),ie=l(ie,oe,B,Q,o,14,i[26]),Q=l(Q,ie,oe,B,I,20,i[27]),B=l(B,Q,ie,oe,G,5,i[28]),oe=l(oe,B,Q,ie,E,9,i[29]),ie=l(ie,oe,B,Q,D,14,i[30]),Q=l(Q,ie,oe,B,j,20,i[31]),B=p(B,Q,ie,oe,C,4,i[32]),oe=p(oe,B,Q,ie,I,11,i[33]),ie=p(ie,oe,B,Q,te,16,i[34]),Q=p(Q,ie,oe,B,X,23,i[35]),B=p(B,Q,ie,oe,g,4,i[36]),oe=p(oe,B,Q,ie,x,11,i[37]),ie=p(ie,oe,B,Q,D,16,i[38]),Q=p(Q,ie,oe,B,H,23,i[39]),B=p(B,Q,ie,oe,G,4,i[40]),oe=p(oe,B,Q,ie,m,11,i[41]),ie=p(ie,oe,B,Q,o,16,i[42]),Q=p(Q,ie,oe,B,A,23,i[43]),B=p(B,Q,ie,oe,F,4,i[44]),oe=p(oe,B,Q,ie,j,11,i[45]),ie=p(ie,oe,B,Q,J,16,i[46]),Q=p(Q,ie,oe,B,E,23,i[47]),B=h(B,Q,ie,oe,m,6,i[48]),oe=h(oe,B,Q,ie,D,10,i[49]),ie=h(ie,oe,B,Q,X,15,i[50]),Q=h(Q,ie,oe,B,C,21,i[51]),B=h(B,Q,ie,oe,j,6,i[52]),oe=h(oe,B,Q,ie,o,10,i[53]),ie=h(ie,oe,B,Q,H,15,i[54]),Q=h(Q,ie,oe,B,g,21,i[55]),B=h(B,Q,ie,oe,I,6,i[56]),oe=h(oe,B,Q,ie,J,10,i[57]),ie=h(ie,oe,B,Q,A,15,i[58]),Q=h(Q,ie,oe,B,G,21,i[59]),B=h(B,Q,ie,oe,x,6,i[60]),oe=h(oe,B,Q,ie,te,10,i[61]),ie=h(ie,oe,B,Q,E,15,i[62]),Q=h(Q,ie,oe,B,F,21,i[63]),b[0]=b[0]+B|0,b[1]=b[1]+Q|0,b[2]=b[2]+ie|0,b[3]=b[3]+oe|0},_doFinalize:function(){var t=this._data,c=t.words,y=8*this._nDataBytes,v=8*t.sigBytes;c[v>>>5]|=128<<24-v%32;var _=O.floor(y/4294967296),b=y;c[15+(v+64>>>9<<4)]=16711935&(_<<8|_>>>24)|4278255360&(_<<24|_>>>8),c[14+(v+64>>>9<<4)]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8),t.sigBytes=4*(c.length+1),this._process();for(var m=this._hash,g=m.words,E=0;E<4;E++){var o=g[E];g[E]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}return m},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}});d.MD5=s._createHelper(n),d.HmacMD5=s._createHmacHelper(n)}(Math),S.MD5})},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},w.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},w.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(U,w,P){"use strict";function S(n){return n&&n.__esModule?n:{default:n}}function O(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function n(t,c){for(var y=0;y-1)return"Baiduspider";if(u.indexOf("PlayStation")>-1)return"PS4";var f=navigator.platform=="Win32"||navigator.platform=="Windows"||u.indexOf("Windows")>-1,i=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return i&&(s="macOS"),navigator.platform=="X11"&&!f&&!i&&(s="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(s="Linux"),f?"windows":s},l=function(){var a=navigator.userAgent,u="";return(a.indexOf("Windows NT 5.0")>-1||a.indexOf("Windows 2000")>-1)&&(u="2000"),(a.indexOf("Windows NT 5.1")>-1||a.indexOf("Windows XP")>-1)&&(u="XP"),(a.indexOf("Windows NT 5.2")>-1||a.indexOf("Windows 2003")>-1)&&(u="2003"),(a.indexOf("Windows NT 6.0")>-1||a.indexOf("Windows Vista")>-1)&&(u="Vista"),(a.indexOf("Windows NT 6.1")>-1||a.indexOf("Windows 7")>-1)&&(u="7"),(a.indexOf("Windows NT 6.2")>-1||a.indexOf("Windows 8")>-1)&&(u="8"),(a.indexOf("Windows NT 6.3")>-1||a.indexOf("Windows 8.1")>-1)&&(u="8.1"),(a.indexOf("Windows NT 10")>-1||a.indexOf("Windows 10")>-1)&&(u="10"),u},p=function(a){var u=navigator.userAgent.toLowerCase();return a.chrome?"Chrome":a.firefox?"Firefox":a.safari?"Safari":a.webview?"webview":a.ie?/edge/.test(u)?"Edge":"IE":/baiduspider/.test(u)?"Baiduspider":/ucweb/.test(u)||/UCBrowser/.test(u)?"UC":/opera/.test(u)?"Opera":/ucweb/.test(u)?"UC":/360se/.test(u)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(u)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(u)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(u)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(u)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(u)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(u)?"PS4\u6D4F\u89C8\u5668":void 0},h=function(){var a={},u={},s=navigator.userAgent,f=navigator.platform,i=s.match(/Web[kK]it[\/]{0,1}([\d.]+)/),n=s.match(/(Android);?[\s\/]+([\d.]+)?/),t=!!s.match(/\(Macintosh\; Intel /),c=s.match(/(iPad).*OS\s([\d_]+)/),y=s.match(/(iPod)(.*OS\s([\d_]+))?/),v=!c&&s.match(/(iPhone\sOS)\s([\d_]+)/),_=s.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),b=/Win\d{2}|Windows/.test(f),m=s.match(/Windows Phone ([\d.]+)/),g=_&&s.match(/TouchPad/),E=s.match(/Kindle\/([\d.]+)/),o=s.match(/Silk\/([\d._]+)/),x=s.match(/(BlackBerry).*Version\/([\d.]+)/),C=s.match(/(BB10).*Version\/([\d.]+)/),A=s.match(/(RIM\sTablet\sOS)\s([\d.]+)/),D=s.match(/PlayBook/),I=s.match(/Chrome\/([\d.]+)/)||s.match(/CriOS\/([\d.]+)/),F=s.match(/Firefox\/([\d.]+)/),H=s.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),te=s.match(/MSIE\s([\d.]+)/)||s.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),j=!I&&s.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),G=j||s.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((u.webkit=!!i)&&(u.version=i[1]),n&&(a.android=!0,a.version=n[2]),v&&!y&&(a.ios=a.iphone=!0,a.version=v[2].replace(/_/g,".")),c&&(a.ios=a.ipad=!0,a.version=c[2].replace(/_/g,".")),y&&(a.ios=a.ipod=!0,a.version=y[3]?y[3].replace(/_/g,"."):null),m&&(a.wp=!0,a.version=m[1]),_&&(a.webos=!0,a.version=_[2]),g&&(a.touchpad=!0),x&&(a.blackberry=!0,a.version=x[2]),C&&(a.bb10=!0,a.version=C[2]),A&&(a.rimtabletos=!0,a.version=A[2]),D&&(u.playbook=!0),E&&(a.kindle=!0,a.version=E[1]),o&&(u.silk=!0,u.version=o[1]),!o&&a.android&&s.match(/Kindle Fire/)&&(u.silk=!0),I&&(u.chrome=!0,u.version=I[1]),F&&(u.firefox=!0,u.version=F[1]),H&&(a.firefoxos=!0,a.version=H[1]),te&&(u.ie=!0,u.version=te[1]),G&&(t||a.ios||b||n)&&(u.safari=!0,a.ios||(u.version=G[1])),j&&(u.webview=!0),t){var X=s.match(/[\d]*_[\d]*_[\d]*/);X&&X.length>0&&X[0]&&(a.version=X[0].replace(/_/g,"."))}return a.tablet=!!(c||D||n&&!s.match(/Mobile/)||F&&s.match(/Tablet/)||te&&!s.match(/Phone/)&&s.match(/Touch/)),a.phone=!(a.tablet||a.ipod||!(n||v||_||x||C||I&&s.match(/Android/)||I&&s.match(/CriOS\/([\d.]+)/)||F&&s.match(/Mobile/)||te&&s.match(/Touch/))),a.pc=!a.tablet&&!a.phone,t?a.name="macOS":b?(a.name="windows",a.version=l()):a.name=T(a),u.name=p(u),{os:a,browser:u}}(),d=function(){function a(){S(this,a)}return O(a,null,[{key:"getHost",value:function(u){var s="";if(u===void 0||u==null||u=="")return"";var f=u.indexOf("//"),i=u;f>-1&&(i=u.substring(f+2));var s=i,n=i.split("/");return n&&n.length>0&&(s=n[0]),n=s.split(":"),n&&n.length>0&&(s=n[0]),s}},{key:"os",get:function(){return h.os}},{key:"browser",get:function(){var u=h.browser;return u.name||(u.name=p()),u}}]),a}();w.default=d},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var O=function(){function l(p,h){for(var d=0;d0){X._invalidUserId=!0;var ie=Q.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(ie)}}catch(oe){console.log(oe)}})})}H&&(G.videoInfo=H?JSON.parse(H).Vod:{},G.userData=u.default.encode(H)),G.ri=v.default.create(),this._uploadList.push(G),this._reportLog("20001",G,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(G)}catch(J){console.log(J)}return!0}},{key:"deleteFile",value:function(A){return!!this.cancelFile(A)&&(this._uploadList.splice(A,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(A){if(this.options,A<0||A>=this._uploadList.length)return!1;var D=this._uploadList[A];if(A==this._curIndex&&D.state==l.UPLOADSTATE.UPLOADING){D.state=l.UPLOADSTATE.CANCELED;var I=this._getCheckoutpoint(D);I&&I.checkpoint&&(I=I.checkpoint),I&&this._ossUpload.abort(D),this._removeCheckoutpoint(D),this.nextUpload()}else D.state!=l.UPLOADSTATE.SUCCESS&&(D.state=l.UPLOADSTATE.CANCELED);return this._reportLog("20008",D),!0}},{key:"resumeFile",value:function(A){if(this.options,A<0||A>=this._uploadList.length)return!1;var D=this._uploadList[A];return D.state==l.UPLOADSTATE.CANCELED&&(D.state=l.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(A){return this._getCheckoutpoint({file:A})}},{key:"startUpload",value:function(A){if(this._retryCount=0,this.options,this._state==l.VODSTATE.START||this._state==l.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=l.VODSTATE.END);var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D),this._state=l.VODSTATE.START}},{key:"nextUpload",value:function(){var A=this.options;if(this._state==l.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var D=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(D)}else{this._state=l.VODSTATE.END;try{A.onUploadEnd&&A.onUploadEnd(D)}catch(I){console.log(I)}}}},{key:"clear",value:function(A){for(var D=this.options,I=0,F=0;Fthis._curIndex&&(H=this._uploadList[this._curIndex]),H&&(this.init(A,D,I,F),this._state=l.VODSTATE.START,this._ossUpload=null,this._uploadCore(H,H.retry),H.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(A,D,I){if(this._curIndex==-1)return!1;if(this._state!=l.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var F=this._uploadList[this._curIndex];F.object?this._refreshSTSTokenUpload(F,A,D,I):this.setSTSToken(F,A,D,I)}}},{key:"setSTSTokenDirectlyUpload",value:function(A,D,I,F,H){if(!(D&&I&&F&&H))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var te=A;this.init(D,I,F,H),te.endpoint=te._endpoint,te.bucket=te._bucket,te.object=te._object,this._ossUpload=null,this._uploadCore(te,A.retry),A.retry=!1}},{key:"setSTSToken",value:function(A,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var H=A.videoInfo,te={accessKeyId:D,securityToken:F,accessKeySecret:I,fileName:A.file.name,title:H.Title,requestId:A.ri,region:this.options.region};H.ImageType&&(te.imageType=H.ImageType),H.ImageExt&&(te.imageExt=H.ImageExt),H.FileSize&&(te.fileSize=H.FileSize),H.Description&&(te.description=H.Description),H.CateId&&(te.cateId=H.CateId),H.Tags&&(te.tags=H.Tags),H.TemplateGroupId&&(te.templateGroupId=H.TemplateGroupId),H.StorageLocation&&(te.storageLocation=H.StorageLocation),H.CoverURL&&(te.coverUrl=H.CoverURL),H.TransCodeMode&&(te.transCodeMode=H.TransCodeMode),H.UserData&&(te.userData=H.UserData);var j=this,G="getUploadAuth";A.videoId?(te.videoId=A.videoId,G="refreshUploadAuth"):A.isImage&&(G="getImageUploadAuth"),b.default[G](te,function(X){A.videoId=X.VideoId?X.VideoId:A.videoId,j.setUploadAuthAndAddress(A,X.UploadAuth,X.UploadAddress),j._state=l.VODSTATE.START},function(X){j._error(A,{name:X.Code,code:X.Code,message:X.Message,requestId:X.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(A,D,I,F){if(!A||!D||!I)return!1;var H=JSON.parse(u.default.decode(D));if(!(H.AccessKeyId&&H.AccessKeySecret&&H.SecurityToken&&H.Expiration))return console.error("uploadauth is invalid"),!1;var te={},j=A;if(I){if(te=JSON.parse(u.default.decode(I)),!te.Endpoint||!te.Bucket||!te.FileName)return console.error("uploadAddress is invalid"),!1}else te.Endpoint=j.endpoint,te.Bucket=j.bucket,te.FileName=j.object;this._ut="vod",this._uploadWay="vod",this.options.region=H.Region||this.options.region,this.init(H.AccessKeyId,H.AccessKeySecret,H.SecurityToken,H.Expiration),j.endpoint=j._endpoint?j._endpoint:te.Endpoint,j.bucket=j._bucket?j._bucket:te.Bucket,j.object=j._object?j._object:te.FileName,j.region=this.options.region,F&&(j.videoId=F),this._ossUpload=null,this._uploadCore(j,A.retry),A.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(A,D,I,F){if(!D||!I||!F)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var H={accessKeyId:D,securityToken:F,accessKeySecret:I,videoId:A.object,requestId:A.ri,region:this.options.region},te=this,j="refreshUploadAuth";A.isImage&&(j="getImageUploadAuth"),b.default[j](H,function(G){te.setUploadAuthAndAddress(A,G.UploadAuth,UploadAddress),te._state=l.VODSTATE.START},function(G){te._error(A,{name:G.Code,code:G.Code,message:G.Message,requestId:G.RequestId})})}},{key:"_upload",value:function(A){var D=arguments.length>1&&arguments[1]!==void 0&&arguments[1],I=this.options;if(A.retry=D,I.onUploadstarted&&!D)try{var F=this._getCheckoutpoint(A);F&&F.state!=l.UPLOADSTATE.UPLOADING&&(A.checkpoint=F,A.videoId=F.videoId),I.onUploadstarted(A)}catch(H){console.log(H)}}},{key:"_uploadCore",value:function(A){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(A.state=l.UPLOADSTATE.UPLOADING,!this._ossUpload){A.endpoint=A.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var D=this;this._ossUpload=new d.default({bucket:A.bucket,endpoint:A.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(X,J){D._error.call(D,X,J)},oncomplete:function(X,J){D._complete.call(D,X,J)},onprogress:function(X,J,B){D._progress.call(D,X,J,B)}})}var I=c.default.getFileType(A.file.name),F=this._getCheckoutpoint(A),H="",te="";F&&F.checkpoint&&(te=F.state,H=F.videoId,F=F.checkpoint),F&&H==A.videoId&&te!=l.UPLOADSTATE.UPLOADING&&(F.file=A.file,A.checkpoint=F,F.uploadId);var j=this._adjustPartSize(A);this._reportLog("20002",A,{ft:I,fs:A.file.size,bu:A.bucket,ok:A.object,vid:A.videoId||"",fn:A.file.name,fw:null,fh:null,ps:j});var G={headers:{"x-oss-notification":A.userData?A.userData:""},partSize:j,parallel:this.options.parallel};this._ossUpload.upload(A,G)}},{key:"_findUploadIndex",value:function(){for(var A=-1,D=0;D0||D.name=="SignatureDoesNotMatchError"||D.code=="SecurityTokenExpired"||D.code=="InvalidSecurityToken.Expired"||D.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=l.VODSTATE.EXPIRE,A.state=l.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(A,D)}catch(F){console.log(F)}}return}if((D.name=="RequestTimeoutError"||D.name=="ConnectionTimeout"||D.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var I=this;return setTimeout(function(){I._uploadCore(A,!0)},1e3*I._retryDuration),void this._retryCount++}D.name=="NoSuchUploadError"&&this._removeCheckoutpoint(A),this._handleError(A,D)}}},{key:"_handleError",value:function(A,D){var I=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],F=l.UPLOADSTATE.FAIlURE;if(A.state!=l.UPLOADSTATE.CANCELED&&(A.state=l.UPLOADSTATE.FAIlURE,this._state=l.VODSTATE.FAILURE,this.options.onUploadFailed&&D&&D.code&&D.message))try{this.options.onUploadFailed(A,D.code,D.message)}catch(te){console.log(te)}if(I&&this._changeState(A,F),this._reportLog("20006",A,{code:D.name,message:D.message,requestId:D.requestId,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),this._reportLog("20004",A,{requestId:D.requestId,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),A.ri=v.default.create(),this._findUploadIndex()!=-1){var H=this;this._state=l.VODSTATE.START,setTimeout(function(){H.nextUpload()},100)}}},{key:"_complete",value:function(A,D){if(A.state=l.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(A)}catch(H){console.log(H)}var I=0;D&&D.res&&D.res.headers&&(I=D.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(A);var F=this;setTimeout(function(){F.nextUpload()},100),this._retryCount=0,this._reportLog("20003",A,{requestId:I})}},{key:"_progress",value:function(A,D,I){if(this.options.onUploadProgress)try{A.loaded=D.loaded,this.options.onUploadProgress(A,D.total,D.loaded)}catch(J){console.log(J)}var F=D.checkpoint,H=0;F&&(A.checkpoint=F,this._saveCheckoutpoint(A,F,l.UPLOADSTATE.UPLOADING),H=F.uploadId),this._retryCount=0;var te=this._getPortNumber(F),j=0;if(I&&I.headers&&(j=I.headers["x-oss-request-id"]),D.loaded!=0&&this._reportLog("20007",A,{pn:te,requestId:j}),D.loaded!=1&&this._reportLog("20005",A,{UploadId:H,pn:te+1,pr:A.retry?1:0,fs:A.file.size,bu:A.bucket,ok:A.object,fn:A.file.name}),!this._invalidUserId&&!A.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var G={file:A.file,checkpoint:D,userId:this.options.userId,videoId:A.videoId,region:this.options.region,fileHash:A.fileHash};try{var X=this;g.default.upload(G,function(){},function(J){if((J=JSON.parse(J))&&J.Code=="InvalidParameter"&&J.Message.indexOf("UserId")>0){X._invalidUserId=!0;var B=J.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(B)}})}catch(J){console.log(J)}}}},{key:"_getPortNumber",value:function(A){if(A){var D=A.doneParts;if(D&&D.length>0)return D[D.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(A){var D=this._getCheckoutpointKey(A);f.default.remove(D)}},{key:"_getCheckoutpoint",value:function(A){var D=this._getCheckoutpointKey(A),I=f.default.get(D);if(I)try{return JSON.parse(I)}catch(F){}return""}},{key:"_saveCheckoutpoint",value:function(A,D,I){if(D){var F=this._getCheckoutpointKey(A),H=A.file,te={fileName:H.name,lastModified:H.lastModified,size:H.size,object:A.object,videoId:A.videoId,bucket:A.bucket,endpoint:A.endpoint,checkpoint:D,loaded:A.loaded,state:I};f.default.set(F,JSON.stringify(te))}}},{key:"_changeState",value:function(A,D){var I=this._getCheckoutpoint(A);I&&((this._onbeforeunload=!0)&&(D=l.UPLOADSTATE.STOPED),this._saveCheckoutpoint(A,I.checkpoint,D))}},{key:"_getCheckoutpointKey",value:function(A){return"upload_"+A.file.lastModified+"_"+A.file.name+"_"+A.file.size}},{key:"_getCheckoutpointFromCloud",value:function(A,D,I){var F={userId:this.options.userId,uploadInfoList:[{FileName:A.file.name,FileSize:A.file.size,FileCreateTime:A.file.lastModified,FileHash:A.fileHash}],region:this.options.region};g.default.get(F,function(H){D(H)},I)}},{key:"_reportLog",value:function(A,D,I){I||(I={}),I.ri=D.ri,this._ut&&(I.ut=this._ut),this._log.log(A,I)}},{key:"_initEvent",value:function(){var A=this;window&&(window.onbeforeunload=function(D){if(A._onbeforeunload=!0,A._curIndex!=-1&&A._uploadList.length>A._curIndex){var I=A._uploadList[A._curIndex];A._changeState(I,l.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var A=0;A1e4?A.file.size/9999:this.options.partSize}}]),C}());w.default=x},function(U,w,P){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},w.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(U,w,P){"use strict";function S(a){return a&&a.__esModule?a:{default:a}}function O(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var T=function(){function a(u,s){for(var f=0;f=O())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O().toString(16)+" bytes");return 0|ee}function t(ee){return+ee!=ee&&(ee=0),l.alloc(+ee)}function c(ee,M){if(l.isBuffer(ee))return ee.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ee)||ee instanceof ArrayBuffer))return ee.byteLength;typeof ee!="string"&&(ee=""+ee);var N=ee.length;if(N===0)return 0;for(var $=!1;;)switch(M){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":case void 0:return pe(ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*N;case"hex":return N>>>1;case"base64":return Pe(ee).length;default:if($)return pe(ee).length;M=(""+M).toLowerCase(),$=!0}}function y(ee,M,N){var $=!1;if((M===void 0||M<0)&&(M=0),M>this.length)return"";if((N===void 0||N>this.length)&&(N=this.length),N<=0)return"";if(N>>>=0,M>>>=0,N<=M)return"";for(ee||(ee="utf8");;)switch(ee){case"hex":return te(this,M,N);case"utf8":case"utf-8":return D(this,M,N);case"ascii":return F(this,M,N);case"latin1":case"binary":return H(this,M,N);case"base64":return A(this,M,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,M,N);default:if($)throw new TypeError("Unknown encoding: "+ee);ee=(ee+"").toLowerCase(),$=!0}}function v(ee,M,N){var $=ee[M];ee[M]=ee[N],ee[N]=$}function _(ee,M,N,$,V){if(ee.length===0)return-1;if(typeof N=="string"?($=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,isNaN(N)&&(N=V?0:ee.length-1),N<0&&(N=ee.length+N),N>=ee.length){if(V)return-1;N=ee.length-1}else if(N<0){if(!V)return-1;N=0}if(typeof M=="string"&&(M=l.from(M,$)),l.isBuffer(M))return M.length===0?-1:b(ee,M,N,$,V);if(typeof M=="number")return M&=255,l.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?V?Uint8Array.prototype.indexOf.call(ee,M,N):Uint8Array.prototype.lastIndexOf.call(ee,M,N):b(ee,[M],N,$,V);throw new TypeError("val must be string, number or Buffer")}function b(ee,M,N,$,V){function Y(Ve,Ke){return me===1?Ve[Ke]:Ve.readUInt16BE(Ke*me)}var me=1,Re=ee.length,rt=M.length;if($!==void 0&&(($=String($).toLowerCase())==="ucs2"||$==="ucs-2"||$==="utf16le"||$==="utf-16le")){if(ee.length<2||M.length<2)return-1;me=2,Re/=2,rt/=2,N/=2}var De;if(V){var Me=-1;for(De=N;DeRe&&(N=Re-rt),De=N;De>=0;De--){for(var Xe=!0,tt=0;ttV&&($=V):$=V;var Y=M.length;if(Y%2!=0)throw new TypeError("Invalid hex string");$>Y/2&&($=Y/2);for(var me=0;me<$;++me){var Re=parseInt(M.substr(2*me,2),16);if(isNaN(Re))return me;ee[N+me]=Re}return me}function g(ee,M,N,$){return ke(pe(M,ee.length-N),ee,N,$)}function E(ee,M,N,$){return ke(Ce(M),ee,N,$)}function o(ee,M,N,$){return E(ee,M,N,$)}function x(ee,M,N,$){return ke(Pe(M),ee,N,$)}function C(ee,M,N,$){return ke(Be(M,ee.length-N),ee,N,$)}function A(ee,M,N){return M===0&&N===ee.length?he.fromByteArray(ee):he.fromByteArray(ee.slice(M,N))}function D(ee,M,N){N=Math.min(ee.length,N);for(var $=[],V=M;V239?4:Y>223?3:Y>191?2:1;if(V+Re<=N){var rt,De,Me,Xe;switch(Re){case 1:Y<128&&(me=Y);break;case 2:rt=ee[V+1],(192&rt)==128&&(Xe=(31&Y)<<6|63&rt)>127&&(me=Xe);break;case 3:rt=ee[V+1],De=ee[V+2],(192&rt)==128&&(192&De)==128&&(Xe=(15&Y)<<12|(63&rt)<<6|63&De)>2047&&(Xe<55296||Xe>57343)&&(me=Xe);break;case 4:rt=ee[V+1],De=ee[V+2],Me=ee[V+3],(192&rt)==128&&(192&De)==128&&(192&Me)==128&&(Xe=(15&Y)<<18|(63&rt)<<12|(63&De)<<6|63&Me)>65535&&Xe<1114112&&(me=Xe)}}me===null?(me=65533,Re=1):me>65535&&(me-=65536,$.push(me>>>10&1023|55296),me=56320|1023&me),$.push(me),V+=Re}return I($)}function I(ee){var M=ee.length;if(M<=Ue)return String.fromCharCode.apply(String,ee);for(var N="",$=0;$$)&&(N=$);for(var V="",Y=M;YN)throw new RangeError("Trying to access beyond buffer length")}function X(ee,M,N,$,V,Y){if(!l.isBuffer(ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>V||Mee.length)throw new RangeError("Index out of range")}function J(ee,M,N,$){M<0&&(M=65535+M+1);for(var V=0,Y=Math.min(ee.length-N,2);V>>8*($?V:1-V)}function B(ee,M,N,$){M<0&&(M=4294967295+M+1);for(var V=0,Y=Math.min(ee.length-N,4);V>>8*($?V:3-V)&255}function Q(ee,M,N,$,V,Y){if(N+$>ee.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function ie(ee,M,N,$,V){return V||Q(ee,M,N,4,34028234663852886e22,-34028234663852886e22),ue.write(ee,M,N,$,23,4),N+4}function oe(ee,M,N,$,V){return V||Q(ee,M,N,8,17976931348623157e292,-17976931348623157e292),ue.write(ee,M,N,$,52,8),N+8}function Ee(ee){if(ee=ye(ee).replace(Ye,""),ee.length<2)return"";for(;ee.length%4!=0;)ee+="=";return ee}function ye(ee){return ee.trim?ee.trim():ee.replace(/^\s+|\s+$/g,"")}function Le(ee){return ee<16?"0"+ee.toString(16):ee.toString(16)}function pe(ee,M){M=M||1/0;for(var N,$=ee.length,V=null,Y=[],me=0;me<$;++me){if((N=ee.charCodeAt(me))>55295&&N<57344){if(!V){if(N>56319){(M-=3)>-1&&Y.push(239,191,189);continue}if(me+1===$){(M-=3)>-1&&Y.push(239,191,189);continue}V=N;continue}if(N<56320){(M-=3)>-1&&Y.push(239,191,189),V=N;continue}N=65536+(V-55296<<10|N-56320)}else V&&(M-=3)>-1&&Y.push(239,191,189);if(V=null,N<128){if((M-=1)<0)break;Y.push(N)}else if(N<2048){if((M-=2)<0)break;Y.push(N>>6|192,63&N|128)}else if(N<65536){if((M-=3)<0)break;Y.push(N>>12|224,N>>6&63|128,63&N|128)}else{if(!(N<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;Y.push(N>>18|240,N>>12&63|128,N>>6&63|128,63&N|128)}}return Y}function Ce(ee){for(var M=[],N=0;N>8,V=N%256,Y.push(V),Y.push($);return Y}function Pe(ee){return he.toByteArray(Ee(ee))}function ke(ee,M,N,$){for(var V=0;V<$&&!(V+N>=M.length||V>=ee.length);++V)M[V+N]=ee[V];return V}function Ne(ee){return ee!==ee}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var he=P(21),ue=P(22),Ie=P(23);w.Buffer=l,w.SlowBuffer=t,w.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=S.TYPED_ARRAY_SUPPORT!==void 0?S.TYPED_ARRAY_SUPPORT:function(){try{var ee=new Uint8Array(1);return ee.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ee.foo()===42&&typeof ee.subarray=="function"&&ee.subarray(1,1).byteLength===0}catch(M){return!1}}(),w.kMaxLength=O(),l.poolSize=8192,l._augment=function(ee){return ee.__proto__=l.prototype,ee},l.from=function(ee,M,N){return p(null,ee,M,N)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(ee,M,N){return d(null,ee,M,N)},l.allocUnsafe=function(ee){return a(null,ee)},l.allocUnsafeSlow=function(ee){return a(null,ee)},l.isBuffer=function(ee){return!(ee==null||!ee._isBuffer)},l.compare=function(ee,M){if(!l.isBuffer(ee)||!l.isBuffer(M))throw new TypeError("Arguments must be Buffers");if(ee===M)return 0;for(var N=ee.length,$=M.length,V=0,Y=Math.min(N,$);V0&&(ee=this.toString("hex",0,M).match(/.{2}/g).join(" "),this.length>M&&(ee+=" ... ")),""},l.prototype.compare=function(ee,M,N,$,V){if(!l.isBuffer(ee))throw new TypeError("Argument must be a Buffer");if(M===void 0&&(M=0),N===void 0&&(N=ee?ee.length:0),$===void 0&&($=0),V===void 0&&(V=this.length),M<0||N>ee.length||$<0||V>this.length)throw new RangeError("out of range index");if($>=V&&M>=N)return 0;if($>=V)return-1;if(M>=N)return 1;if(M>>>=0,N>>>=0,$>>>=0,V>>>=0,this===ee)return 0;for(var Y=V-$,me=N-M,Re=Math.min(Y,me),rt=this.slice($,V),De=ee.slice(M,N),Me=0;MeV)&&(N=V),ee.length>0&&(N<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");$||($="utf8");for(var Y=!1;;)switch($){case"hex":return m(this,ee,M,N);case"utf8":case"utf-8":return g(this,ee,M,N);case"ascii":return E(this,ee,M,N);case"latin1":case"binary":return o(this,ee,M,N);case"base64":return x(this,ee,M,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,ee,M,N);default:if(Y)throw new TypeError("Unknown encoding: "+$);$=(""+$).toLowerCase(),Y=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ue=4096;l.prototype.slice=function(ee,M){var N=this.length;ee=~~ee,M=M===void 0?N:~~M,ee<0?(ee+=N)<0&&(ee=0):ee>N&&(ee=N),M<0?(M+=N)<0&&(M=0):M>N&&(M=N),M0&&(V*=256);)$+=this[ee+--M]*V;return $},l.prototype.readUInt8=function(ee,M){return M||G(ee,1,this.length),this[ee]},l.prototype.readUInt16LE=function(ee,M){return M||G(ee,2,this.length),this[ee]|this[ee+1]<<8},l.prototype.readUInt16BE=function(ee,M){return M||G(ee,2,this.length),this[ee]<<8|this[ee+1]},l.prototype.readUInt32LE=function(ee,M){return M||G(ee,4,this.length),(this[ee]|this[ee+1]<<8|this[ee+2]<<16)+16777216*this[ee+3]},l.prototype.readUInt32BE=function(ee,M){return M||G(ee,4,this.length),16777216*this[ee]+(this[ee+1]<<16|this[ee+2]<<8|this[ee+3])},l.prototype.readIntLE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=this[ee],V=1,Y=0;++Y=V&&($-=Math.pow(2,8*M)),$},l.prototype.readIntBE=function(ee,M,N){ee|=0,M|=0,N||G(ee,M,this.length);for(var $=M,V=1,Y=this[ee+--$];$>0&&(V*=256);)Y+=this[ee+--$]*V;return V*=128,Y>=V&&(Y-=Math.pow(2,8*M)),Y},l.prototype.readInt8=function(ee,M){return M||G(ee,1,this.length),128&this[ee]?-1*(255-this[ee]+1):this[ee]},l.prototype.readInt16LE=function(ee,M){M||G(ee,2,this.length);var N=this[ee]|this[ee+1]<<8;return 32768&N?4294901760|N:N},l.prototype.readInt16BE=function(ee,M){M||G(ee,2,this.length);var N=this[ee+1]|this[ee]<<8;return 32768&N?4294901760|N:N},l.prototype.readInt32LE=function(ee,M){return M||G(ee,4,this.length),this[ee]|this[ee+1]<<8|this[ee+2]<<16|this[ee+3]<<24},l.prototype.readInt32BE=function(ee,M){return M||G(ee,4,this.length),this[ee]<<24|this[ee+1]<<16|this[ee+2]<<8|this[ee+3]},l.prototype.readFloatLE=function(ee,M){return M||G(ee,4,this.length),ue.read(this,ee,!0,23,4)},l.prototype.readFloatBE=function(ee,M){return M||G(ee,4,this.length),ue.read(this,ee,!1,23,4)},l.prototype.readDoubleLE=function(ee,M){return M||G(ee,8,this.length),ue.read(this,ee,!0,52,8)},l.prototype.readDoubleBE=function(ee,M){return M||G(ee,8,this.length),ue.read(this,ee,!1,52,8)},l.prototype.writeUIntLE=function(ee,M,N,$){(ee=+ee,M|=0,N|=0,!$)&&X(this,ee,M,N,Math.pow(2,8*N)-1,0);var V=1,Y=0;for(this[M]=255ⅇ++Y=0&&(Y*=256);)this[M+V]=ee/Y&255;return M+N},l.prototype.writeUInt8=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,1,255,0),l.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),this[M]=255&ee,M+1},l.prototype.writeUInt16LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8):J(this,ee,M,!0),M+2},l.prototype.writeUInt16BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>8,this[M+1]=255&ee):J(this,ee,M,!1),M+2},l.prototype.writeUInt32LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[M+3]=ee>>>24,this[M+2]=ee>>>16,this[M+1]=ee>>>8,this[M]=255&ee):B(this,ee,M,!0),M+4},l.prototype.writeUInt32BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>24,this[M+1]=ee>>>16,this[M+2]=ee>>>8,this[M+3]=255&ee):B(this,ee,M,!1),M+4},l.prototype.writeIntLE=function(ee,M,N,$){if(ee=+ee,M|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,M,N,V-1,-V)}var Y=0,me=1,Re=0;for(this[M]=255ⅇ++Y>0)-Re&255;return M+N},l.prototype.writeIntBE=function(ee,M,N,$){if(ee=+ee,M|=0,!$){var V=Math.pow(2,8*N-1);X(this,ee,M,N,V-1,-V)}var Y=N-1,me=1,Re=0;for(this[M+Y]=255ⅇ--Y>=0&&(me*=256);)ee<0&&Re===0&&this[M+Y+1]!==0&&(Re=1),this[M+Y]=(ee/me>>0)-Re&255;return M+N},l.prototype.writeInt8=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,1,127,-128),l.TYPED_ARRAY_SUPPORT||(ee=Math.floor(ee)),ee<0&&(ee=255+ee+1),this[M]=255&ee,M+1},l.prototype.writeInt16LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8):J(this,ee,M,!0),M+2},l.prototype.writeInt16BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>8,this[M+1]=255&ee):J(this,ee,M,!1),M+2},l.prototype.writeInt32LE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[M]=255&ee,this[M+1]=ee>>>8,this[M+2]=ee>>>16,this[M+3]=ee>>>24):B(this,ee,M,!0),M+4},l.prototype.writeInt32BE=function(ee,M,N){return ee=+ee,M|=0,N||X(this,ee,M,4,2147483647,-2147483648),ee<0&&(ee=4294967295+ee+1),l.TYPED_ARRAY_SUPPORT?(this[M]=ee>>>24,this[M+1]=ee>>>16,this[M+2]=ee>>>8,this[M+3]=255&ee):B(this,ee,M,!1),M+4},l.prototype.writeFloatLE=function(ee,M,N){return ie(this,ee,M,!0,N)},l.prototype.writeFloatBE=function(ee,M,N){return ie(this,ee,M,!1,N)},l.prototype.writeDoubleLE=function(ee,M,N){return oe(this,ee,M,!0,N)},l.prototype.writeDoubleBE=function(ee,M,N){return oe(this,ee,M,!1,N)},l.prototype.copy=function(ee,M,N,$){if(N||(N=0),$||$===0||($=this.length),M>=ee.length&&(M=ee.length),M||(M=0),$>0&&$=this.length)throw new RangeError("sourceStart out of bounds");if($<0)throw new RangeError("sourceEnd out of bounds");$>this.length&&($=this.length),ee.length-M<$-N&&($=ee.length-M+N);var V,Y=$-N;if(this===ee&&N=0;--V)ee[V+M]=this[V+N];else if(Y<1e3||!l.TYPED_ARRAY_SUPPORT)for(V=0;V>>=0,N=N===void 0?this.length:N>>>0,ee||(ee=0);var Y;if(typeof ee=="number")for(Y=M;Y0)throw new Error("Invalid string. Length must be a multiple of 4");return n[t-2]==="="?2:n[t-1]==="="?1:0}function O(n){return 3*n.length/4-S(n)}function T(n){var t,c,y,v,_,b=n.length;v=S(n),_=new u(3*b/4-v),c=v>0?b-4:b;var m=0;for(t=0;t>16&255,_[m++]=y>>8&255,_[m++]=255&y;return v===2?(y=a[n.charCodeAt(t)]<<2|a[n.charCodeAt(t+1)]>>4,_[m++]=255&y):v===1&&(y=a[n.charCodeAt(t)]<<10|a[n.charCodeAt(t+1)]<<4|a[n.charCodeAt(t+2)]>>2,_[m++]=y>>8&255,_[m++]=255&y),_}function l(n){return d[n>>18&63]+d[n>>12&63]+d[n>>6&63]+d[63&n]}function p(n,t,c){for(var y,v=[],_=t;_m?m:b+16383));return y===1?(t=n[c-1],v+=d[t>>2],v+=d[t<<4&63],v+="=="):y===2&&(t=(n[c-2]<<8)+n[c-1],v+=d[t>>10],v+=d[t>>4&63],v+=d[t<<2&63],v+="="),_.push(v),_.join("")}w.byteLength=O,w.toByteArray=T,w.fromByteArray=h;for(var d=[],a=[],u=typeof Uint8Array!="undefined"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,i=s.length;f>1,s=-7,f=O?l-1:0,i=O?-1:1,n=P[S+f];for(f+=i,p=n&(1<<-s)-1,n>>=-s,s+=d;s>0;p=256*p+P[S+f],f+=i,s-=8);for(h=p&(1<<-s)-1,p>>=-s,s+=T;s>0;h=256*h+P[S+f],f+=i,s-=8);if(p===0)p=1-u;else{if(p===a)return h?NaN:1/0*(n?-1:1);h+=Math.pow(2,T),p-=u}return(n?-1:1)*h*Math.pow(2,p-T)},w.write=function(P,S,O,T,l,p){var h,d,a,u=8*p-l-1,s=(1<>1,i=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,n=T?0:p-1,t=T?1:-1,c=S<0||S===0&&1/S<0?1:0;for(S=Math.abs(S),isNaN(S)||S===1/0?(d=isNaN(S)?1:0,h=s):(h=Math.floor(Math.log(S)/Math.LN2),S*(a=Math.pow(2,-h))<1&&(h--,a*=2),S+=h+f>=1?i/a:i*Math.pow(2,1-f),S*a>=2&&(h++,a/=2),h+f>=s?(d=0,h=s):h+f>=1?(d=(S*a-1)*Math.pow(2,l),h+=f):(d=S*Math.pow(2,f-1)*Math.pow(2,l),h=0));l>=8;P[O+n]=255&d,n+=t,d/=256,l-=8);for(h=h<0;P[O+n]=255&h,n+=t,h/=256,u-=8);P[O+n-t]|=128*c}},function(U,w){var P={}.toString;U.exports=Array.isArray||function(S){return P.call(S)=="[object Array]"}},function(U,w,P){"use strict";function S(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var O=function(){function l(p,h){for(var d=0;d>>31}var b=(i<<5|i>>>27)+y+d[v];b+=v<20?1518500249+(n&t|~n&c):v<40?1859775393+(n^t^c):v<60?(n&t|n&c|t&c)-1894007588:(n^t^c)-899497514,y=c,c=t,t=n<<30|n>>>2,n=i,i=b}f[0]=f[0]+i|0,f[1]=f[1]+n|0,f[2]=f[2]+t|0,f[3]=f[3]+c|0,f[4]=f[4]+y|0},_doFinalize:function(){var u=this._data,s=u.words,f=8*this._nDataBytes,i=8*u.sigBytes;return s[i>>>5]|=128<<24-i%32,s[14+(i+64>>>9<<4)]=Math.floor(f/4294967296),s[15+(i+64>>>9<<4)]=f,u.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var u=p.clone.call(this);return u._hash=this._hash.clone(),u}});O.SHA1=p._createHelper(a),O.HmacSHA1=p._createHmacHelper(a)}(),S.SHA1})},function(U,w,P){!function(S,O){U.exports=w=O(P(0))}(0,function(S){!function(){var O=S,T=O.lib,l=T.Base,p=O.enc,h=p.Utf8,d=O.algo;d.HMAC=l.extend({init:function(a,u){a=this._hasher=new a.init,typeof u=="string"&&(u=h.parse(u));var s=a.blockSize,f=4*s;u.sigBytes>f&&(u=a.finalize(u)),u.clamp();for(var i=this._oKey=u.clone(),n=this._iKey=u.clone(),t=i.words,c=n.words,y=0;y>>6-i%4*2;s[f>>>2]|=(n|t)<<24-f%4*8,f++}return p.create(s,f)}var T=S,l=T.lib,p=l.WordArray,h=T.enc;h.Base64={stringify:function(d){var a=d.words,u=d.sigBytes,s=this._map;d.clamp();for(var f=[],i=0;i>>2]>>>24-i%4*8&255,t=a[i+1>>>2]>>>24-(i+1)%4*8&255,c=a[i+2>>>2]>>>24-(i+2)%4*8&255,y=n<<16|t<<8|c,v=0;v<4&&i+.75*v>>6*(3-v)&63));var _=s.charAt(64);if(_)for(;f.length%4;)f.push(_);return f.join("")},parse:function(d){var a=d.length,u=this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var f=0;f0&&(G=j.UploadProgress.UploadProgressList[0],X=G.ClientId),u.default.setClientId(X),E&&E(G)},function(j){j&&(o(j),console.log(j))})}}]),m}();w.default=b},function(U,w,P){"use strict";function S(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(w,"__esModule",{value:!0});var O=function(){function h(d,a){for(var u=0;u=U.length?{done:!0}:{done:!1,value:U[S++]}},e:function(d){throw d},f:O}}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 T=!0,l=!1,p;return{s:function(){P=U[Symbol.iterator]()},n:function(){var d=P.next();return T=d.done,d},e:function(d){l=!0,p=d},f:function(){try{!T&&P.return!=null&&P.return()}finally{if(l)throw p}}}}},rHrb:function($e,We,z){"use strict";Object.defineProperty(We,"__esModule",{value:!0}),We.CopyToClipboard=void 0;var ae=U(z("q1tI")),Z=U(z("+QRC"));function U(t){return t&&t.__esModule?t:{default:t}}function w(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?w=function(y){return typeof y}:w=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},w(t)}function P(t,c){var y=Object.keys(t);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(t);c&&(v=v.filter(function(_){return Object.getOwnPropertyDescriptor(t,_).enumerable})),y.push.apply(y,v)}return y}function S(t){for(var c=1;c=0)continue;if(!Object.prototype.propertyIsEnumerable.call(t,v))continue;y[v]=t[v]}}return y}function T(t,c){if(t==null)return{};var y={},v=Object.keys(t),_,b;for(b=0;b=0)continue;y[_]=t[_]}return y}function l(t,c){if(!(t instanceof c))throw new TypeError("Cannot call a class as a function")}function p(t,c){for(var y=0;y"']/,ae=/[&<>"']/g,Z=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,w={"&":"&","<":"<",">":">",'"':""","'":"'"},P=m=>w[m];function S(m,g){if(g){if(z.test(m))return m.replace(ae,P)}else if(Z.test(m))return m.replace(U,P);return m}const O=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function T(m){return m.replace(O,(g,E)=>(E=E.toLowerCase(),E==="colon"?":":E.charAt(0)==="#"?E.charAt(1)==="x"?String.fromCharCode(parseInt(E.substring(2),16)):String.fromCharCode(+E.substring(1)):""))}const l=/(^|[^\[])\^/g;function p(m,g){m=m.source||m,g=g||"";const E={replace:(o,x)=>(x=x.source||x,x=x.replace(l,"$1"),m=m.replace(o,x),E),getRegex:()=>new RegExp(m,g)};return E}const h=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(m,g,E){if(m){let o;try{o=decodeURIComponent(T(E)).replace(h,"").toLowerCase()}catch(x){return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}g&&!d.test(E)&&(E=n(g,E));try{E=encodeURI(E).replace(/%25/g,"%")}catch(o){return null}return E}const u={},s=/^[^:]+:\/*[^/]*$/,f=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function n(m,g){u[" "+m]||(s.test(m)?u[" "+m]=m+"/":u[" "+m]=v(m,"/",!0)),m=u[" "+m];const E=m.indexOf(":")===-1;return g.substring(0,2)==="//"?E?g:m.replace(f,"$1")+g:g.charAt(0)==="/"?E?g:m.replace(i,"$1")+g:m+g}const t={exec:function(){}};function c(m){let g=1,E,o;for(;g{let I=!1,F=A;for(;--F>=0&&D[F]==="\\";)I=!I;return I?"|":" |"}),o=E.split(/ \|/);let x=0;if(o.length>g)o.splice(g);else for(;o.length=0;p--){var h=U().key(p);l(w(h),h)}}function O(l){return U().removeItem(l)}function T(){return U().clear()}},"s8/Y":function($e,We,z){$e.exports=z.p+"static/jx.6713fc81.svg"},"sB/4":function($e,We,z){$e.exports=z.p+"static/b.7405990c.svg"},sNtx:function($e,We,z){},sR1s:function($e,We,z){"use strict";z.d(We,"b",function(){return w}),z.d(We,"a",function(){return P}),z.d(We,"c",function(){return S}),z.d(We,"d",function(){return O});var ae=z("U8pU"),Z="RC_TABLE_KEY";function U(T){return T==null?[]:Array.isArray(T)?T:[T]}function w(T,l){if(!l&&typeof l!="number")return T;for(var p=U(l),h=T,d=0;d1)Object(p.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(c.length===0)return Object(p.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var y=c[0];if(S.isValidElement(y)&&Object(h.c)(y)){var v=y.ref;c[0]=S.cloneElement(y,{ref:Object(h.a)(v,this.setChildNode)})}return c.length===1?c[0]:c.map(function(_,b){return!S.isValidElement(_)||"key"in _&&_.key!==null?_:S.cloneElement(_,{key:"".concat(a,"-").concat(b)})})}}]),i}(S.Component);u.displayName="ResizeObserver",We.a=u},twBr:function($e,We,z){$e.exports=z.p+"static/s.1f286590.svg"},uMZB:function($e,We,z){$e.exports={header:"header___3a50V",checkboxs:"checkboxs___3TnBC",field:"field___SHW6f","oj-form-container":"oj-form-container___36KBv","oj-left-panel":"oj-left-panel___3Fdj5","oj-form-info":"oj-form-info___dilPb",footer:"footer___1Ie9U","test-case-name":"test-case-name___356US","btn-remove-case":"btn-remove-case___1Z5cd","icon-tag":"icon-tag___3zUaP",btn_back:"btn_back___2UBbR",testJi:"testJi___1dyLk",upBtn:"upBtn___1I0SJ"}},uQRt:function($e,We,z){$e.exports=ae;function ae(){return z("gaXo"),{}}},ulZh:function($e,We,z){typeof window!="undefined"&&function(Z,U){$e.exports=U()}(this,function(){return function(ae){var Z={};function U(w){if(Z[w])return Z[w].exports;var P=Z[w]={i:w,l:!1,exports:{}};return ae[w].call(P.exports,P,P.exports,U),P.l=!0,P.exports}return U.m=ae,U.c=Z,U.d=function(w,P,S){U.o(w,P)||Object.defineProperty(w,P,{enumerable:!0,get:S})},U.r=function(w){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})},U.t=function(w,P){if(P&1&&(w=U(w)),P&8)return w;if(P&4&&typeof w=="object"&&w&&w.__esModule)return w;var S=Object.create(null);if(U.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:w}),P&2&&typeof w!="string")for(var O in w)U.d(S,O,function(T){return w[T]}.bind(null,O));return S},U.n=function(w){var P=w&&w.__esModule?function(){return w.default}:function(){return w};return U.d(P,"a",P),P},U.o=function(w,P){return Object.prototype.hasOwnProperty.call(w,P)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ae,Z,U){"use strict";var w=Object.prototype.hasOwnProperty,P="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__proto__||(P=!1));function O(h,d,a){this.fn=h,this.context=d,this.once=a||!1}function T(h,d,a,u,s){if(typeof a!="function")throw new TypeError("The listener must be a function");var f=new O(a,u||h,s),i=P?P+d:d;return h._events[i]?h._events[i].fn?h._events[i]=[h._events[i],f]:h._events[i].push(f):(h._events[i]=f,h._eventsCount++),h}function l(h,d){--h._eventsCount===0?h._events=new S:delete h._events[d]}function p(){this._events=new S,this._eventsCount=0}p.prototype.eventNames=function(){var d=[],a,u;if(this._eventsCount===0)return d;for(u in a=this._events)w.call(a,u)&&d.push(P?u.slice(1):u);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(a)):d},p.prototype.listeners=function(d){var a=P?P+d:d,u=this._events[a];if(!u)return[];if(u.fn)return[u.fn];for(var s=0,f=u.length,i=new Array(f);s0},!1)}function h(d,a){for(var u={main:[a]},s={main:[]},f={main:{}};p(u);)for(var i=Object.keys(u),n=0;n=2*b/g||D<=F)return;var H=Number.POSITIVE_INFINITY,te;for(te=i.level-1;te>o;te--){var j=E[te].maxBitrate;if(H=b*j/(8*.8*A),H=D)return;var G=this.bwEstimator.getEstimate();p.logger.warn("Fragment "+i.sn+(n?" part "+n.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+te+` Current BW estimate: `+(Object(w.isFiniteNumber)(G)?(G/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+D.toFixed(3)+` s Estimated load time for the next fragment: `+H.toFixed(3)+` s Time to underbuffer: `+F.toFixed(3)+" s"),t.nextLoadLevel=te,this.bwEstimator.sample(m,_.loaded),this.clearTimer(),i.loader&&(this.fragCurrent=this.partCurrent=null,i.loader.abort()),t.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:n,stats:_})},s.onFragLoaded=function(i,n){var t=n.frag,c=n.part;if(t.type===l.PlaylistLevelType.MAIN&&Object(w.isFiniteNumber)(t.sn)){var y=c?c.stats:t.stats,v=c?c.duration:t.duration;if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var _=this.hls.levels[t.level],b=(_.loaded?_.loaded.bytes:0)+y.loaded,m=(_.loaded?_.loaded.duration:0)+v;_.loaded={bytes:b,duration:m},_.realBitrate=Math.round(8*b/m)}if(t.bitrateTest){var g={stats:y,frag:t,part:c,id:t.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,g),t.bitrateTest=!1}}},s.onFragBuffered=function(i,n){var t=n.frag,c=n.part,y=c?c.stats:t.stats;if(y.aborted)return;if(t.type!==l.PlaylistLevelType.MAIN||t.sn==="initSegment")return;var v=y.parsing.end-y.loading.start;this.bwEstimator.sample(v,y.loaded),y.bwEstimate=this.bwEstimator.getEstimate(),t.bitrateTest?this.bitrateTestDelay=v/1e3:this.bitrateTestDelay=0},s.onError=function(i,n){switch(n.details){case T.ErrorDetails.FRAG_LOAD_ERROR:case T.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},s.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},s.getNextABRAutoLevel=function(){var i=this.fragCurrent,n=this.partCurrent,t=this.hls,c=t.maxAutoLevel,y=t.config,v=t.minAutoLevel,_=t.media,b=n?n.duration:i?i.duration:0,m=_?_.currentTime:0,g=_&&_.playbackRate!==0?Math.abs(_.playbackRate):1,E=this.bwEstimator?this.bwEstimator.getEstimate():y.abrEwmaDefaultEstimate,o=(O.BufferHelper.bufferInfo(_,m,y.maxBufferHole).end-m)/g,x=this.findBestLevel(E,v,c,o,y.abrBandWidthFactor,y.abrBandWidthUpFactor);if(x>=0)return x;p.logger.trace((o?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var C=b?Math.min(b,y.maxStarvationDelay):y.maxStarvationDelay,A=y.abrBandWidthFactor,D=y.abrBandWidthUpFactor;if(!o){var I=this.bitrateTestDelay;if(I){var F=b?Math.min(b,y.maxLoadingDelay):y.maxLoadingDelay;C=F-I,p.logger.trace("bitrate test took "+Math.round(1e3*I)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*C)+" ms"),A=D=1}}return x=this.findBestLevel(E,v,c,o+C,A,D),Math.max(x,0)},s.findBestLevel=function(i,n,t,c,y,v){for(var _,b=this.fragCurrent,m=this.partCurrent,g=this.lastLoadedFragLevel,E=this.hls.levels,o=E[g],x=!!(o!=null&&(_=o.details)!==null&&_!==void 0&&_.live),C=o==null?void 0:o.codecSet,A=m?m.duration:b?b.duration:0,D=t;D>=n;D--){var I=E[D];if(!I||C&&I.codecSet!==C)continue;var F=I.details,H=(m?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||A,te=void 0;D<=g?te=y*i:te=v*i;var j=E[D].maxBitrate,G=j*H/te;if(p.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+D+"/"+Math.round(te)+"/"+j+"/"+H+"/"+c+"/"+G),te>j&&(!G||x&&!this.bitrateTestDelay||G0&&o===-1?(this.log("Override startPosition with lastCurrentTime @"+x.toFixed(3)),this.state=P.State.IDLE):(this.loadedmetadata=!1,this.state=P.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()},g.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_TRACK:{var o,x=this.levels,C=this.trackId,A=x==null||((o=x[C])===null||o===void 0)?void 0:o.details;if(A){if(this.waitForCdnTuneIn(A))break;this.state=P.State.WAITING_INIT_PTS}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var D,I=performance.now(),F=this.retryDate;(!F||I>=F||(D=this.media)!==null&&D!==void 0&&D.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=P.State.IDLE);break}case P.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var te=H.frag,j=H.part,G=H.cache,X=H.complete;if(this.initPTS[te.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.FRAG_LOADING;var J=G.flush(),B={frag:te,part:j,payload:J,networkDetails:null};this._handleFragmentLoadProgress(B),X&&b.prototype._handleFragmentLoadComplete.call(this,B)}else if(this.videoTrackCC!==this.waitingVideoCC)n.logger.log("Waiting fragment cc ("+te.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Q=this.getLoadPosition(),ie=O.BufferHelper.bufferInfo(this.mediaBuffer,Q,this.config.maxBufferHole),oe=Object(s.fragmentWithinToleranceTest)(ie.end,this.config.maxFragLookUpTolerance,te);oe<0&&(n.logger.log("Waiting fragment cc ("+te.cc+") @ "+te.start+" cancelled because another fragment at "+ie.end+" is needed"),this.clearWaitingFragment())}}else this.state=P.State.IDLE}}this.onTickEnd()},g.clearWaitingFragment=function(){var o=this.waitingData;o&&(this.fragmentTracker.removeFragment(o.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=P.State.IDLE)},g.onTickEnd=function(){var o=this.media;if(!o||!o.readyState)return;var x=this.mediaBuffer?this.mediaBuffer:o,C=x.buffered;!this.loadedmetadata&&C.length&&(this.loadedmetadata=!0),this.lastCurrentTime=o.currentTime},g.doTickIdle=function(){var o,x,C=this.hls,A=this.levels,D=this.media,I=this.trackId,F=C.config;if(!A||!A[I])return;if(!D&&(this.startFragRequested||!F.startFragPrefetch))return;var H=A[I],te=H.details;if(!te||te.live&&this.levelLastLoaded!==I||this.waitForCdnTuneIn(te)){this.state=P.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,h.ElementaryStreamTypes.AUDIO,p.PlaylistLevelType.AUDIO));var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,p.PlaylistLevelType.AUDIO);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(),J=this.audioSwitch;if(G>=X&&!J)return;if(!J&&this._streamEnded(j,te)){C.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=P.State.ENDED;return}var B=te.fragments,Q=B[0].start,ie=j.end;if(J){var oe=this.getLoadPosition();ie=oe,te.PTSKnown&&oeQ||j.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),D.currentTime=Q+.05))}var Ee=this.getNextFragment(ie,te);if(!Ee){this.bufferFlushed=!0;return}((o=Ee.decryptdata)===null||o===void 0?void 0:o.keyFormat)==="identity"&&!((x=Ee.decryptdata)!==null&&x!==void 0&&x.key)?this.loadKey(Ee,te):this.loadFragment(Ee,te,ie)},g.getMaxBufferLength=function(){var o=b.prototype.getMaxBufferLength.call(this),x=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,p.PlaylistLevelType.MAIN);return x===null?o:Math.max(o,x.len)},g.onMediaDetaching=function(){this.videoBuffer=null,b.prototype.onMediaDetaching.call(this)},g.onAudioTracksUpdated=function(o,x){var C=x.audioTracks;this.resetTransmuxer(),this.levels=C.map(function(A){return new l.Level(A)})},g.onAudioTrackSwitching=function(o,x){var C=!!x.url;this.trackId=x.id;var A=this.fragCurrent;A!=null&&A.loader&&A.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),C?this.setInterval(v):this.resetTransmuxer(),C?(this.audioSwitch=!0,this.state=P.State.IDLE):this.state=P.State.STOPPED,this.tick()},g.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},g.onLevelLoaded=function(o,x){this.mainDetails=x.details},g.onAudioTrackLoaded=function(o,x){var C,A=this.levels,D=x.details,I=x.id;if(!A){this.warn("Audio tracks were reset while loading level "+I);return}this.log("Track "+I+" loaded ["+D.startSN+","+D.endSN+"],duration:"+D.totalduration);var F=A[I],H=0;if(D.live||(C=F.details)!==null&&C!==void 0&&C.live){var te=this.mainDetails;if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed||!te)return;!F.details&&D.hasProgramDateTime&&te.hasProgramDateTime?(Object(f.alignMediaPlaylistByPDT)(D,te),H=D.fragments[0].start):H=this.alignPlaylists(D,F.details)}F.details=D,this.levelLastLoaded=I,!this.startFragRequested&&(this.mainDetails||!D.live)&&this.setStartPosition(F.details,H),this.state===P.State.WAITING_TRACK&&!this.waitForCdnTuneIn(D)&&(this.state=P.State.IDLE),this.tick()},g._handleFragmentLoadProgress=function(o){var x,C=o.frag,A=o.part,D=o.payload,I=this.config,F=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+C.sn+" of level "+C.level+" will not be buffered");return}var te=H[F];console.assert(te,"Audio track is defined on fragment load progress");var j=te.details;console.assert(j,"Audio track details are defined on fragment load progress");var G=I.defaultAudioCodec||te.audioCodec||"mp4a.40.2",X=this.transmuxer;X||(X=this.transmuxer=new a.default(this.hls,p.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[C.cc],B=(x=C.initSegment)===null||x===void 0?void 0:x.data;if(J!==void 0){var Q=!1,ie=A?A.index:-1,oe=ie!==-1,Ee=new u.ChunkMetadata(C.level,C.sn,C.stats.chunkCount,D.byteLength,ie,oe);X.push(D,B,G,"",C,A,j.totalduration,Q,Ee,J)}else{n.logger.log("Unknown video PTS for cc "+C.cc+", waiting for video PTS before demuxing audio frag "+C.sn+" of ["+j.startSN+" ,"+j.endSN+"],track "+F);var ye=this.waitingData=this.waitingData||{frag:C,part:A,cache:new d.default,complete:!1},Le=ye.cache;Le.push(new Uint8Array(D)),this.waitingVideoCC=this.videoTrackCC,this.state=P.State.WAITING_INIT_PTS}},g._handleFragmentLoadComplete=function(o){if(this.waitingData){this.waitingData.complete=!0;return}b.prototype._handleFragmentLoadComplete.call(this,o)},g.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},g.onBufferCreated=function(o,x){var C=x.tracks.audio;C&&(this.mediaBuffer=C.buffer),x.tracks.video&&(this.videoBuffer=x.tracks.video.buffer)},g.onFragBuffered=function(o,x){var C=x.frag,A=x.part;if(C.type!==p.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(C)){this.warn("Fragment "+C.sn+(A?" p: "+A.index:"")+" of level "+C.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}C.sn!=="initSegment"&&(this.fragPrevious=C,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(C,A)},g.onError=function(o,x){switch(x.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.AUDIO,x);break;case i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==P.State.ERROR&&this.state!==P.State.STOPPED&&(this.state=x.fatal?P.State.ERROR:P.State.IDLE,this.warn(x.details+" while loading frag, switching to "+this.state+" state"));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(x.parent==="audio"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var C=!0,A=this.getFwdBufferInfo(this.mediaBuffer,p.PlaylistLevelType.AUDIO);A&&A.len>.5&&(C=!this.reduceMaxBufferLength(A.len)),C&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,b.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},g.onBufferFlushed=function(o,x){var C=x.type;C===h.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},g._handleTransmuxComplete=function(o){var x,C="audio",A=this.hls,D=o.remuxResult,I=o.chunkMeta,F=this.getCurrentContext(I);if(!F){this.warn("The loading context changed while buffering fragment "+I.sn+" of level "+I.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(I.level);return}var H=F.frag,te=F.part,j=D.audio,G=D.text,X=D.id3,J=D.initSegment;if(this.fragContextChanged(H))return;if(this.state=P.State.PARSING,this.audioSwitch&&j&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,H,I),A.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:C,tracks:J.tracks})),j){var B=j.startPTS,Q=j.endPTS,ie=j.startDTS,oe=j.endDTS;te&&(te.elementaryStreams[h.ElementaryStreamTypes.AUDIO]={startPTS:B,endPTS:Q,startDTS:ie,endDTS:oe}),H.setElementaryStreamInfo(h.ElementaryStreamTypes.AUDIO,B,Q,ie,oe),this.bufferFragmentData(j,H,te,I)}if(X!=null&&(x=X.samples)!==null&&x!==void 0&&x.length){var Ee=t({frag:H,id:C},X);A.trigger(S.Events.FRAG_PARSING_METADATA,Ee)}if(G){var ye=t({frag:H,id:C},G);A.trigger(S.Events.FRAG_PARSING_USERDATA,ye)}},g._bufferInitSegment=function(o,x,C){if(this.state!==P.State.PARSING)return;o.video&&delete o.video;var A=o.audio;if(!A)return;A.levelCodec=A.codec,A.id="audio",this.log("Init audio buffer, container:"+A.container+", codecs[parsed]=["+A.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,o);var D=A.initSegment;if(D!=null&&D.byteLength){var I={type:"audio",frag:x,part:null,chunkMeta:C,parent:x.type,data:D};this.hls.trigger(S.Events.BUFFER_APPENDING,I)}this.tick()},g.loadFragment=function(o,x,C){var A=this.fragmentTracker.getState(o);this.fragCurrent=o,(this.audioSwitch||A===T.FragmentState.NOT_LOADED||A===T.FragmentState.PARTIAL)&&(o.sn==="initSegment"?this._loadInitSegment(o):x.live&&!Object(w.isFiniteNumber)(this.initPTS[o.cc])?(this.log("Waiting for video PTS in continuity counter "+o.cc+" of live stream before loading audio fragment "+o.sn+" of level "+this.trackId),this.state=P.State.WAITING_INIT_PTS):(this.startFragRequested=!0,b.prototype.loadFragment.call(this,o,x,C)))},g.completeAudioSwitch=function(){var o=this.hls,x=this.media,C=this.trackId;x&&(this.log("Switching audio track : flushing all audio"),b.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,o.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:C})},m}(P.default);Z.default=_},"./src/controller/audio-track-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/controller/base-playlist-controller.ts"),O=U("./src/types/loader.ts");function T(a,u){for(var s=0;s=n.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var t=n[this.trackId];this.log("Now switching to audio-track index "+i);var c=n[i],y=c.id,v=c.groupId,_=v===void 0?"":v,b=c.name,m=c.type,g=c.url;if(this.trackId=i,this.trackName=b,this.selectDefaultTrack=!1,this.hls.trigger(w.Events.AUDIO_TRACK_SWITCHING,{id:y,groupId:_,name:b,type:m,url:g}),c.details&&!c.details.live)return;var E=this.switchParams(c.url,t==null?void 0:t.details);this.loadPlaylist(E)},s.selectInitialTrack=function(){var i=this.tracksInGroup;console.assert(i.length,"Initial audio track should be selected when tracks are known");var n=this.trackName,t=this.findTrackId(n)||this.findTrackId();t!==-1?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},s.findTrackId=function(i){for(var n=this.tracksInGroup,t=0;tu.partTarget&&(c+=1)}if(Object(w.isFiniteNumber)(t))return new P.HlsUrlParameters(t,Object(w.isFiniteNumber)(c)?c:void 0,P.HlsSkip.No)}}},h.loadPlaylist=function(a){},h.shouldLoadTrack=function(a){return this.canLoad&&a&&!!a.url&&(!a.details||a.details.live)},h.playlistLoaded=function(a,u,s){var f=this,i=u.details,n=u.stats,t=n.loading.end?Math.max(0,self.performance.now()-n.loading.end):0;if(i.advancedDateTime=Date.now()-t,i.live||s!=null&&s.live){if(i.reloaded(s),s&&this.log("live playlist "+a+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),s&&i.fragments.length>0&&Object(S.mergeDetails)(s,i),!this.canLoad||!i.live)return;var c,y=void 0,v=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var _=this.hls.config.lowLatencyMode,b=i.lastPartSn,m=i.endSN,g=i.lastPartIndex,E=g!==-1,o=b===m,x=_?0:g;E?(y=o?m+1:b,v=o?x:g+1):y=m+1;var C=i.age,A=C+i.ageHeader,D=Math.min(A-i.partTarget,i.targetduration*1.5);if(D>0){if(s&&D>s.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+s.tuneInGoal+" to: "+D+" with playlist age: "+i.age),D=0;else{var I=Math.floor(D/i.targetduration);if(y+=I,v!==void 0){var F=Math.round(D%i.targetduration/i.partTarget);v+=F}this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+C.toFixed(2)+"s goal: "+D+" skip sn "+I+" to part "+v)}i.tuneInGoal=D}if(c=this.getDeliveryDirectives(i,u.deliveryDirectives,y,v),_||!o){this.loadPlaylist(c);return}}else c=this.getDeliveryDirectives(i,u.deliveryDirectives,y,v);var H=Object(S.computeReloadInterval)(i,n);y!==void 0&&i.canBlockReload&&(H-=i.partTarget||1),this.log("reload live playlist "+a+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return f.loadPlaylist(c)},H)}else this.clearTimer()},h.getDeliveryDirectives=function(a,u,s,f){var i=Object(P.getSkipValue)(a,s);return u!=null&&u.skip&&a.deltaUpdateFailed&&(s=u.msn,f=u.part,i=P.HlsSkip.No),new P.HlsUrlParameters(s,f,i)},h.retryLoadingOrFail=function(a){var u=this,s=this.hls.config,f=this.retryCount-1&&(i=a.context)!==null&&i!==void 0&&i.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+a.details+'"'),this.loadPlaylist();else{var n=Math.min(Math.pow(2,this.retryCount)*s.levelLoadingRetryDelay,s.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return u.loadPlaylist()},n),this.warn("retry playlist loading #"+this.retryCount+" in "+n+' ms after "'+a.details+'"')}}else this.warn('cannot recover from error "'+a.details+'"'),this.clearTimer(),a.fatal=!0;return f},p}()},"./src/controller/base-stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"State",function(){return m}),U.d(Z,"default",function(){return g});var w=U("./src/polyfills/number.ts"),P=U("./src/task-loop.ts"),S=U("./src/controller/fragment-tracker.ts"),O=U("./src/utils/buffer-helper.ts"),T=U("./src/utils/logger.ts"),l=U("./src/events.ts"),p=U("./src/errors.ts"),h=U("./src/types/transmuxer.ts"),d=U("./src/utils/mp4-tools.ts"),a=U("./src/utils/discontinuities.ts"),u=U("./src/controller/fragment-finders.ts"),s=U("./src/controller/level-helper.ts"),f=U("./src/loader/fragment-loader.ts"),i=U("./src/crypt/decrypter.ts"),n=U("./src/utils/time-ranges.ts"),t=U("./src/types/loader.ts");function c(E,o){for(var x=0;xJ;(te0&&te&&te.key&&te.iv&&te.method==="AES-128"){var j=self.performance.now();return D.decrypter.webCryptoDecrypt(new Uint8Array(H),te.key.buffer,te.iv.buffer).then(function(G){var X=self.performance.now();return F.trigger(l.Events.FRAG_DECRYPTED,{frag:A,payload:G,stats:{tstart:j,tdecrypt:X}}),I.payload=G,I})}return I}).then(function(I){var F=D.fragCurrent,H=D.hls,te=D.levels;if(!te)throw new Error("init load aborted, missing levels");var j=te[A.level].details;console.assert(j,"Level details are defined when init segment is loaded");var G=A.stats;D.state=m.IDLE,D.fragLoadError=0,A.data=new Uint8Array(I.payload),G.parsing.start=G.buffering.start=self.performance.now(),G.parsing.end=G.buffering.end=self.performance.now(),I.frag===F&&H.trigger(l.Events.FRAG_BUFFERED,{stats:G,frag:F,part:null,id:A.type}),D.tick()}).catch(function(I){D.warn(I),D.resetFragmentLoading(A)})},x.fragContextChanged=function(A){var D=this.fragCurrent;return!A||!D||A.level!==D.level||A.sn!==D.sn||A.urlId!==D.urlId},x.fragBufferedComplete=function(A,D){var I=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+A.type+" sn: "+A.sn+(D?" part: "+D.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+A.level+" "+n.default.toString(O.BufferHelper.getBuffered(I))),this.state=m.IDLE,this.tick()},x._handleFragmentLoadComplete=function(A){var D=this.transmuxer;if(!D)return;var I=A.frag,F=A.part,H=A.partsLoaded,te=!H||H.length===0||H.some(function(G){return!G}),j=new h.ChunkMetadata(I.level,I.sn,I.stats.chunkCount+1,0,F?F.index:-1,!te);D.flush(j)},x._handleFragmentLoadProgress=function(A){},x._doFragLoad=function(A,D,I,F){var H=this;if(I===void 0&&(I=null),!this.levels)throw new Error("frag load aborted, missing levels");if(I=Math.max(A.start,I||0),this.config.lowLatencyMode&&D){var te=D.partList;if(te&&F){I>A.end&&D.fragmentHint&&(A=D.fragmentHint);var j=this.getNextPart(te,A,I);if(j>-1){var G=te[j];return this.log("Loading part sn: "+A.sn+" p: "+G.index+" cc: "+A.cc+" of playlist ["+D.startSN+"-"+D.endSN+"] parts [0-"+j+"-"+(te.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+A.level+", target: "+parseFloat(I.toFixed(3))),this.nextLoadPosition=G.start+G.duration,this.state=m.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,part:te[j],targetBufferTime:I}),this.doFragPartsLoad(A,te,j,F).catch(function(X){return H.handleFragLoadError(X)})}else if(!A.url||this.loadedEndOfParts(te,I))return Promise.resolve(null)}}return this.log("Loading fragment "+A.sn+" cc: "+A.cc+" "+(D?"of ["+D.startSN+"-"+D.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+A.level+", target: "+parseFloat(I.toFixed(3))),Object(w.isFiniteNumber)(A.sn)&&!this.bitrateTest&&(this.nextLoadPosition=A.start+A.duration),this.state=m.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:A,targetBufferTime:I}),this.fragmentLoader.load(A,F).catch(function(X){return H.handleFragLoadError(X)})},x.doFragPartsLoad=function(A,D,I,F){var H=this;return new Promise(function(te,j){var G=[],X=function J(B){var Q=D[B];H.fragmentLoader.loadPart(A,Q,F).then(function(ie){G[Q.index]=ie;var oe=ie.part;H.hls.trigger(l.Events.FRAG_LOADED,ie);var Ee=D[B+1];if(Ee&&Ee.fragment===A)J(B+1);else return te({frag:A,part:oe,partsLoaded:G})}).catch(j)};X(I)})},x.handleFragLoadError=function(A){var D=A.data;return D&&D.details===p.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(D.frag,D.part):this.hls.trigger(l.Events.ERROR,D),null},x._handleTransmuxerFlush=function(A){var D=this.getCurrentContext(A);if(!D||this.state!==m.PARSING){this.fragCurrent||(this.state=m.IDLE);return}var I=D.frag,F=D.part,H=D.level,te=self.performance.now();I.stats.parsing.end=te,F&&(F.stats.parsing.end=te),this.updateLevelTiming(I,F,H,A.partial)},x.getCurrentContext=function(A){var D=this.levels,I=A.level,F=A.sn,H=A.part;if(!D||!D[I])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+I+". The current chunk will not be buffered."),null;var te=D[I],j=H>-1?Object(s.getPartWith)(te,F,H):null,G=j?j.fragment:Object(s.getFragmentWithSN)(te,F,this.fragCurrent);return G?{frag:G,part:j,level:te}:null},x.bufferFragmentData=function(A,D,I,F){if(!A||this.state!==m.PARSING)return;var H=A.data1,te=A.data2,j=H;if(H&&te&&(j=Object(d.appendUint8Array)(H,te)),!j||!j.length)return;var G={type:A.type,frag:D,part:I,chunkMeta:F,parent:D.type,data:j};this.hls.trigger(l.Events.BUFFER_APPENDING,G),A.dropped&&A.independent&&!I&&this.flushBufferGap(D)},x.flushBufferGap=function(A){var D=this.media;if(!D)return;if(!O.BufferHelper.isBuffered(D,D.currentTime)){this.flushMainBuffer(0,A.start);return}var I=D.currentTime,F=O.BufferHelper.bufferInfo(D,I,0),H=A.duration,te=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),j=Math.max(Math.min(A.start-te,F.end-te),I+te);A.start-j>te&&this.flushMainBuffer(j,A.start)},x.getFwdBufferInfo=function(A,D){var I=this.config,F=this.getLoadPosition();if(!Object(w.isFiniteNumber)(F))return null;var H=O.BufferHelper.bufferInfo(A,F,I.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var te=this.fragmentTracker.getBufferedFrag(F,D);if(te&&H.nextStart=I?(D.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+D.maxMaxBufferLength+"s"),!0):!1},x.getNextFragment=function(A,D){var I,F,H=D.fragments,te=H.length;if(!te)return null;var j=this.config,G=H[0].start,X;if(D.live){var J=j.initialLiveManifestSize;if(te-1&&II.start&&I.loaded},x.getInitialLiveFragment=function(A,D){var I=this.fragPrevious,F=null;if(I){if(A.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+I.programDateTime),F=Object(u.findFragmentByPDT)(D,I.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var H=I.sn+1;if(H>=A.startSN&&H<=A.endSN){var te=D[H-A.startSN];I.cc===te.cc&&(F=te,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(u.findFragWithCC)(D,I.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var j=this.hls.liveSyncPosition;j!==null&&(F=this.getFragmentAtPosition(j,this.bitrateTest?A.fragmentEnd:A.edge,A))}return F},x.getFragmentAtPosition=function(A,D,I){var F=this.config,H=this.fragPrevious,te=I.fragments,j=I.endSN,G=I.fragmentHint,X=F.maxFragLookUpTolerance,J=!!(F.lowLatencyMode&&I.partList&&G);J&&G&&!this.bitrateTest&&(te=te.concat(G),j=G.sn);var B;if(AD-X?0:X;B=Object(u.findFragmentByPTS)(H,te,A,Q)}else B=te[te.length-1];if(B){var ie=B.sn-I.startSN,oe=H&&B.level===H.level,Ee=te[ie+1],ye=this.fragmentTracker.getState(B);if(ye===S.FragmentState.BACKTRACKED){B=null;for(var Le=ie;te[Le]&&this.fragmentTracker.getState(te[Le])===S.FragmentState.BACKTRACKED;)H?B=te[Le--]:B=te[--Le];B||(B=Ee)}else H&&B.sn===H.sn&&!J&&(oe&&(B.sn=te-D.maxFragLookUpTolerance&&H<=j;if(F!==null&&I.duration>F&&(H"+A.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+j),B}return G},x.waitForCdnTuneIn=function(A){var D=3;return A.live&&A.canBlockReload&&A.tuneInGoal>Math.max(A.partHoldBack,A.partTarget*D)},x.setStartPosition=function(A,D){var I=this.startPosition;if(I"+A))}}]),o}(P.default)},"./src/controller/buffer-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return u});var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),O=U("./src/errors.ts"),T=U("./src/utils/buffer-helper.ts"),l=U("./src/utils/mediasource-helper.ts"),p=U("./src/loader/fragment.ts"),h=U("./src/controller/buffer-operation-queue.ts"),d=Object(l.getMediaSource)(),a=/([ha]vc.)(?:\.[^.,]+)+/,u=function(){function s(i){var n=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=n.hls,c=n.media,y=n.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),c&&(n.updateMediaElementDuration(),t.trigger(P.Events.MEDIA_ATTACHED,{media:c})),y&&y.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},this._onMediaSourceClose=function(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.logger.log("[buffer-controller]: Media source ended")},this.hls=i,this._initSourceBuffer(),this.registerListeners()}var f=s.prototype;return f.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},f.destroy=function(){this.unregisterListeners(),this.details=null},f.registerListeners=function(){var n=this.hls;n.on(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(P.Events.BUFFER_RESET,this.onBufferReset,this),n.on(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.on(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(P.Events.BUFFER_EOS,this.onBufferEos,this),n.on(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.on(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.on(P.Events.FRAG_PARSED,this.onFragParsed,this),n.on(P.Events.FRAG_CHANGED,this.onFragChanged,this)},f.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(P.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.off(P.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(P.Events.BUFFER_RESET,this.onBufferReset,this),n.off(P.Events.BUFFER_APPENDING,this.onBufferAppending,this),n.off(P.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(P.Events.BUFFER_EOS,this.onBufferEos,this),n.off(P.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),n.off(P.Events.LEVEL_UPDATED,this.onLevelUpdated,this),n.off(P.Events.FRAG_PARSED,this.onFragParsed,this),n.off(P.Events.FRAG_CHANGED,this.onFragChanged,this)},f._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new h.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},f.onManifestParsed=function(n,t){var c=2;(t.audio&&!t.video||!t.altAudio)&&(c=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=c,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},f.onMediaAttaching=function(n,t){var c=this.media=t.media;if(c&&d){var y=this.mediaSource=new d;y.addEventListener("sourceopen",this._onMediaSourceOpen),y.addEventListener("sourceended",this._onMediaSourceEnded),y.addEventListener("sourceclose",this._onMediaSourceClose),c.src=self.URL.createObjectURL(y),this._objectUrl=c.src}},f.onMediaDetaching=function(){var n=this.media,t=this.mediaSource,c=this._objectUrl;if(t){if(S.logger.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(y){S.logger.warn("[buffer-controller]: onMediaDetaching: "+y.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),n&&(c&&self.URL.revokeObjectURL(c),n.src===c?(n.removeAttribute("src"),n.load()):S.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(P.Events.MEDIA_DETACHED,void 0)},f.onBufferReset=function(){var n=this;this.getSourceBufferTypes().forEach(function(t){var c=n.sourceBuffer[t];try{c&&(n.removeBufferListeners(t),n.mediaSource&&n.mediaSource.removeSourceBuffer(c),n.sourceBuffer[t]=void 0)}catch(y){S.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",y)}}),this._initSourceBuffer()},f.onBufferCodecs=function(n,t){var c=this,y=this.getSourceBufferTypes().length;if(Object.keys(t).forEach(function(v){if(y){var _=c.tracks[v];if(_&&typeof _.buffer.changeType=="function"){var b=t[v],m=b.codec,g=b.levelCodec,E=b.container,o=(_.levelCodec||_.codec).replace(a,"$1"),x=(g||m).replace(a,"$1");if(o!==x){var C=E+";codecs="+(g||m);c.appendChangeType(v,C)}}}else c.pendingTracks[v]=t[v]}),y)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},f.appendChangeType=function(n,t){var c=this,y=this.operationQueue,v={execute:function(){var b=c.sourceBuffer[n];b&&(S.logger.log("[buffer-controller]: changing "+n+" sourceBuffer type to "+t),b.changeType(t)),y.shiftAndExecuteNext(n)},onStart:function(){},onComplete:function(){},onError:function(b){S.logger.warn("[buffer-controller]: Failed to change "+n+" SourceBuffer type",b)}};y.append(v,n)},f.onBufferAppending=function(n,t){var c=this,y=this.hls,v=this.operationQueue,_=this.tracks,b=t.data,m=t.type,g=t.frag,E=t.part,o=t.chunkMeta,x=o.buffering[m],C=self.performance.now();x.start=C;var A=g.stats.buffering,D=E?E.stats.buffering:null;A.start===0&&(A.start=C),D&&D.start===0&&(D.start=C);var I=_.audio,F=m==="audio"&&o.id===1&&(I==null?void 0:I.container)==="audio/mpeg",H={execute:function(){if(x.executeStart=self.performance.now(),F){var j=c.sourceBuffer[m];if(j){var G=g.start-j.timestampOffset;Math.abs(G)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+g.start+" (delta: "+G+") sn: "+g.sn+")"),j.timestampOffset=g.start)}}c.appendExecutor(b,m)},onStart:function(){},onComplete:function(){var j=self.performance.now();x.executeEnd=x.end=j,A.first===0&&(A.first=j),D&&D.first===0&&(D.first=j);var G=c.sourceBuffer,X={};for(var J in G)X[J]=T.BufferHelper.getBuffered(G[J]);c.appendError=0,c.hls.trigger(P.Events.BUFFER_APPENDED,{type:m,frag:g,part:E,chunkMeta:o,parent:g.type,timeRanges:X})},onError:function(j){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+m+" SourceBuffer",j);var G={type:O.ErrorTypes.MEDIA_ERROR,parent:g.type,details:O.ErrorDetails.BUFFER_APPEND_ERROR,err:j,fatal:!1};j.code===DOMException.QUOTA_EXCEEDED_ERR?G.details=O.ErrorDetails.BUFFER_FULL_ERROR:(c.appendError++,G.details=O.ErrorDetails.BUFFER_APPEND_ERROR,c.appendError>y.config.appendErrorMaxRetry&&(S.logger.error("[buffer-controller]: Failed "+y.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),G.fatal=!0)),y.trigger(P.Events.ERROR,G)}};v.append(H,m)},f.onBufferFlushing=function(n,t){var c=this,y=this.operationQueue,v=function(b){return{execute:c.removeExecutor.bind(c,b,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){c.hls.trigger(P.Events.BUFFER_FLUSHED,{type:b})},onError:function(g){S.logger.warn("[buffer-controller]: Failed to remove from "+b+" SourceBuffer",g)}}};t.type?y.append(v(t.type),t.type):this.getSourceBufferTypes().forEach(function(_){y.append(v(_),_)})},f.onFragParsed=function(n,t){var c=this,y=t.frag,v=t.part,_=[],b=v?v.elementaryStreams:y.elementaryStreams;b[p.ElementaryStreamTypes.AUDIOVIDEO]?_.push("audiovideo"):(b[p.ElementaryStreamTypes.AUDIO]&&_.push("audio"),b[p.ElementaryStreamTypes.VIDEO]&&_.push("video"));var m=function(){var E=self.performance.now();y.stats.buffering.end=E,v&&(v.stats.buffering.end=E);var o=v?v.stats:y.stats;c.hls.trigger(P.Events.FRAG_BUFFERED,{frag:y,part:v,stats:o,id:y.type})};_.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+y.type+" level: "+y.level+" sn: "+y.sn),this.blockBuffers(m,_)},f.onFragChanged=function(n,t){this.flushBackBuffer()},f.onBufferEos=function(n,t){var c=this,y=this.getSourceBufferTypes().reduce(function(v,_){var b=c.sourceBuffer[_];return(!t.type||t.type===_)&&(b&&!b.ended&&(b.ended=!0,S.logger.log("[buffer-controller]: "+_+" sourceBuffer now EOS"))),v&&!!(!b||b.ended)},!0);y&&this.blockBuffers(function(){var v=c.mediaSource;if(!v||v.readyState!=="open")return;v.endOfStream()})},f.onLevelUpdated=function(n,t){var c=t.details;if(!c.fragments.length)return;this.details=c,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},f.flushBackBuffer=function(){var n=this.hls,t=this.details,c=this.media,y=this.sourceBuffer;if(!c||t===null)return;var v=this.getSourceBufferTypes();if(!v.length)return;var _=t.live&&n.config.liveBackBufferLength!==null?n.config.liveBackBufferLength:n.config.backBufferLength;if(!Object(w.isFiniteNumber)(_)||_<0)return;var b=c.currentTime,m=t.levelTargetDuration,g=Math.max(_,m),E=Math.floor(b/m)*m-g;v.forEach(function(o){var x=y[o];if(x){var C=T.BufferHelper.getBuffered(x);C.length>0&&E>C.start(0)&&(n.trigger(P.Events.BACK_BUFFER_REACHED,{bufferEnd:E}),t.live&&n.trigger(P.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:E}),n.trigger(P.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:E,type:o}))}})},f.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var n=this.details,t=this.hls,c=this.media,y=this.mediaSource,v=n.fragments[0].start+n.totalduration,_=c.duration,b=Object(w.isFiniteNumber)(y.duration)?y.duration:0;n.live&&t.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),y.duration=Infinity,this.updateSeekableRange(n)):(v>b&&v>_||!Object(w.isFiniteNumber)(_))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+v.toFixed(3)),y.duration=v)},f.updateSeekableRange=function(n){var t=this.mediaSource,c=n.fragments,y=c.length;if(y&&n.live&&t!==null&&t!==void 0&&t.setLiveSeekableRange){var v=Math.max(0,c[0].start),_=Math.max(v,v+n.totalduration);t.setLiveSeekableRange(v,_)}},f.checkPendingTracks=function(){var n=this.bufferCodecEventsExpected,t=this.operationQueue,c=this.pendingTracks,y=Object.keys(c).length;if(y&&!n||y===2){this.createSourceBuffers(c),this.pendingTracks={};var v=this.getSourceBufferTypes();if(v.length===0){this.hls.trigger(P.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}v.forEach(function(_){t.executeNext(_)})}},f.createSourceBuffers=function(n){var t=this.sourceBuffer,c=this.mediaSource;if(!c)throw Error("createSourceBuffers called when mediaSource was null");var y=0;for(var v in n)if(!t[v]){var _=n[v];if(!_)throw Error("source buffer exists for track "+v+", however track does not");var b=_.levelCodec||_.codec,m=_.container+";codecs="+b;S.logger.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var g=t[v]=c.addSourceBuffer(m),E=v;this.addBufferListener(E,"updatestart",this._onSBUpdateStart),this.addBufferListener(E,"updateend",this._onSBUpdateEnd),this.addBufferListener(E,"error",this._onSBUpdateError),this.tracks[v]={buffer:g,codec:b,container:_.container,levelCodec:_.levelCodec,id:_.id},y++}catch(o){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+o.message),this.hls.trigger(P.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:o,mimeType:m})}}y&&this.hls.trigger(P.Events.BUFFER_CREATED,{tracks:this.tracks})},f._onSBUpdateStart=function(n){var t=this.operationQueue,c=t.current(n);c.onStart()},f._onSBUpdateEnd=function(n){var t=this.operationQueue,c=t.current(n);c.onComplete(),t.shiftAndExecuteNext(n)},f._onSBUpdateError=function(n,t){S.logger.error("[buffer-controller]: "+n+" SourceBuffer error",t),this.hls.trigger(P.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var c=this.operationQueue.current(n);c&&c.onError(t)},f.removeExecutor=function(n,t,c){var y=this.media,v=this.mediaSource,_=this.operationQueue,b=this.sourceBuffer,m=b[n];if(!y||!v||!m){S.logger.warn("[buffer-controller]: Attempting to remove from the "+n+" SourceBuffer, but it does not exist"),_.shiftAndExecuteNext(n);return}var g=Object(w.isFiniteNumber)(y.duration)?y.duration:Infinity,E=Object(w.isFiniteNumber)(v.duration)?v.duration:Infinity,o=Math.max(0,t),x=Math.min(c,g,E);x>o?(S.logger.log("[buffer-controller]: Removing ["+o+","+x+"] from the "+n+" SourceBuffer"),console.assert(!m.updating,n+" sourceBuffer must not be updating"),m.remove(o,x)):_.shiftAndExecuteNext(n)},f.appendExecutor=function(n,t){var c=this.operationQueue,y=this.sourceBuffer,v=y[t];if(!v){S.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),c.shiftAndExecuteNext(t);return}v.ended=!1,console.assert(!v.updating,t+" sourceBuffer must not be updating"),v.appendBuffer(n)},f.blockBuffers=function(n,t){var c=this;if(t===void 0&&(t=this.getSourceBufferTypes()),!t.length){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(n);return}var y=this.operationQueue,v=t.map(function(_){return y.appendBlocker(_)});Promise.all(v).then(function(){n(),t.forEach(function(_){var b=c.sourceBuffer[_];(!b||!b.updating)&&y.shiftAndExecuteNext(_)})})},f.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},f.addBufferListener=function(n,t,c){var y=this.sourceBuffer[n];if(!y)return;var v=c.bind(this,n);this.listeners[n].push({event:t,listener:v}),y.addEventListener(t,v)},f.removeBufferListeners=function(n){var t=this.sourceBuffer[n];if(!t)return;this.listeners[n].forEach(function(c){t.removeEventListener(c.event,c.listener)})},s}()},"./src/controller/buffer-operation-queue.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return P});var w=U("./src/utils/logger.ts"),P=function(){function S(T){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=T}var O=S.prototype;return O.append=function(l,p){var h=this.queues[p];h.push(l),h.length===1&&this.buffers[p]&&this.executeNext(p)},O.insertAbort=function(l,p){var h=this.queues[p];h.unshift(l),this.executeNext(p)},O.appendBlocker=function(l){var p,h=new Promise(function(a){p=a}),d={execute:p,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(d,l),h},O.executeNext=function(l){var p=this.buffers,h=this.queues,d=p[l],a=h[l];if(a.length){var u=a[0];try{u.execute()}catch(s){w.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),u.onError(s),(!d||!d.updating)&&(a.shift(),this.executeNext(l))}}},O.shiftAndExecuteNext=function(l){this.queues[l].shift(),this.executeNext(l)},O.current=function(l){return this.queues[l][0]},S}()},"./src/controller/cap-level-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts");function P(T,l){for(var p=0;p0&&this.mediaWidth>0){var h=this.hls.levels;if(h.length){var d=this.hls;d.autoLevelCapping=this.getMaxLevel(h.length-1),d.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=d.autoLevelCapping}}},l.getMaxLevel=function(h){var d=this,a=this.hls.levels;if(!a.length)return-1;var u=a.filter(function(s,f){return T.isLevelAllowed(f,d.restrictedLevels)&&f<=h});return this.clientRect=null,T.getMaxLevelByMediaSize(u,this.mediaWidth,this.mediaHeight)},l.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},l.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},l.getDimensions=function(){if(this.clientRect)return this.clientRect;var h=this.media,d={width:0,height:0};if(h){var a=h.getBoundingClientRect();d.width=a.width,d.height=a.height,!d.width&&!d.height&&(d.width=a.right-a.left||h.width||0,d.height=a.bottom-a.top||h.height||0)}return this.clientRect=d,d},T.isLevelAllowed=function(h,d){return d===void 0&&(d=[]),d.indexOf(h)===-1},T.getMaxLevelByMediaSize=function(h,d,a){if(!h||!h.length)return-1;for(var u=function(t,c){return c?t.width!==c.width||t.height!==c.height:!0},s=h.length-1,f=0;f=d||i.height>=a)&&u(i,h[f+1])){s=f;break}}return s},S(T,[{key:"mediaWidth",get:function(){return this.getDimensions().width*T.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*T.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var h=1;try{h=self.devicePixelRatio}catch(d){}return h}}]),T}();Z.default=O},"./src/controller/cmcd-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return u});var w=U("./src/events.ts"),P=U("./src/types/cmcd.ts"),S=U("./src/utils/buffer-helper.ts"),O=U("./src/utils/logger.ts");function T(s,f){for(var i=0;i=s.length?{done:!0}:{done:!1,value:s[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(s,f){if(!s)return;if(typeof s=="string")return d(s,f);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return d(s,f)}function d(s,f){(f==null||f>s.length)&&(f=s.length);for(var i=0,n=new Array(f);it&&(t=_.bitrate)}return t>0?t:NaN},f.getBufferLength=function(n){var t=this.hls.media,c=n===P.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!c||!t)return NaN;var y=S.BufferHelper.bufferInfo(c,t.currentTime,this.config.maxBufferHole);return y.len*1e3},f.createPlaylistLoader=function(){var n=this.config.pLoader,t=this.applyPlaylistData,c=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new c(_)}var v=y.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(b,m,g){t(b),this.loader.load(b,m,g)},l(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},f.createFragmentLoader=function(){var n=this.config.fLoader,t=this.applyFragmentData,c=n||this.config.loader;return function(){function y(_){this.loader=void 0,this.loader=new c(_)}var v=y.prototype;return v.destroy=function(){this.loader.destroy()},v.abort=function(){this.loader.abort()},v.load=function(b,m,g){t(b),this.loader.load(b,m,g)},l(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},s.uuid=function(){var n=URL.createObjectURL(new Blob),t=n.toString();return URL.revokeObjectURL(n),t.substr(t.lastIndexOf("/")+1)},s.serialize=function(n){for(var t=[],c=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},y=function(F){return Math.round(F)},v=function(F){return y(F/100)*100},_=function(F){return encodeURIComponent(F)},b={br:y,d:y,bl:v,dl:v,mtp:v,nor:_,rtp:v,tb:y},m=Object.keys(n||{}).sort(),g=p(m),E;!(E=g()).done;){var o=E.value,x=n[o];if(!c(x))continue;if(o==="v"&&x===1)continue;if(o=="pr"&&x===1)continue;var C=b[o];C&&(x=C(x));var A=typeof x,D=void 0;o==="ot"||o==="sf"||o==="st"?D=o+"="+x:A==="boolean"?D=o:A==="number"?D=o+"="+x:D=o+"="+JSON.stringify(x),t.push(D)}return t.join(",")},s.toHeaders=function(n){for(var t=Object.keys(n),c={},y=["Object","Request","Session","Status"],v=[{},{},{},{}],_={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},b=0,m=t;bp){this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var _=p-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+_+" attempts left"),this._requestLicense(t,c)}break}},s._generateLicenseRequestChallenge=function(i,n){switch(i.mediaKeySystemDomain){case O.KeySystems.WIDEVINE:return n}throw new Error("unsupported key-system: "+i.mediaKeySystemDomain)},s._requestLicense=function(i,n){S.logger.log("Requesting content license for key-system");var t=this._mediaKeysList[0];if(!t){S.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var c=this.getLicenseServerUrl(t.mediaKeySystemDomain),y=this._createLicenseXhr(c,i,n);S.logger.log("Sending license request to URL: "+c);var v=this._generateLicenseRequestChallenge(t,i);y.send(v)}catch(_){S.logger.error("Failure requesting DRM license: "+_),this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.KEY_SYSTEM_ERROR,details:P.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},s.onMediaAttached=function(i,n){if(!this._emeEnabled)return;var t=n.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)},s.onMediaDetached=function(){var i=this._media,n=this._mediaKeysList;if(!i)return;i.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(n.map(function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch(function(){})})).then(function(){return i.setMediaKeys(null)}).catch(function(){})},s.onManifestParsed=function(i,n){if(!this._emeEnabled)return;var t=n.levels.map(function(y){return y.audioCodec}).filter(function(y){return!!y}),c=n.levels.map(function(y){return y.videoCodec}).filter(function(y){return!!y});this._attemptKeySystemAccess(O.KeySystems.WIDEVINE,t,c)},l(u,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),u}();Z.default=a},"./src/controller/fps-controller.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=function(){function O(l){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=l,this.registerListeners()}var T=O.prototype;return T.setStreamController=function(p){this.streamController=p},T.registerListeners=function(){this.hls.on(w.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},T.unregisterListeners=function(){this.hls.off(w.Events.MEDIA_ATTACHING,this.onMediaAttaching)},T.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},T.onMediaAttaching=function(p,h){var d=this.hls.config;if(d.capLevelOnFPSDrop){var a=h.media instanceof self.HTMLVideoElement?h.media:null;this.media=a,a&&typeof a.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),d.fpsDroppedMonitoringPeriod)}},T.checkFPS=function(p,h,d){var a=performance.now();if(h){if(this.lastTime){var u=a-this.lastTime,s=d-this.lastDroppedFrames,f=h-this.lastDecodedFrames,i=1e3*s/u,n=this.hls;if(n.trigger(w.Events.FPS_DROP,{currentDropped:s,currentDecoded:f,totalDroppedFrames:d}),i>0&&s>n.config.fpsDroppedMonitoringThreshold*f){var t=n.currentLevel;P.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(n.autoLevelCapping===-1||n.autoLevelCapping>=t)&&(t=t-1,n.trigger(w.Events.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:n.currentLevel}),n.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=d,this.lastDecodedFrames=h}},T.checkFPSInterval=function(){var p=this.media;if(p)if(this.isVideoPlaybackQualityAvailable){var h=p.getVideoPlaybackQuality();this.checkFPS(p,h.totalVideoFrames,h.droppedVideoFrames)}else this.checkFPS(p,p.webkitDecodedFrameCount,p.webkitDroppedFrameCount)},O}();Z.default=S},"./src/controller/fragment-finders.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"findFragmentByPDT",function(){return S}),U.d(Z,"findFragmentByPTS",function(){return O}),U.d(Z,"fragmentWithinToleranceTest",function(){return T}),U.d(Z,"pdtWithinToleranceTest",function(){return l}),U.d(Z,"findFragWithCC",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/binary-search.ts");function S(h,d,a){if(d===null||!Array.isArray(h)||!h.length||!Object(w.isFiniteNumber)(d))return null;var u=h[0].programDateTime;if(d<(u||0))return null;var s=h[h.length-1].endProgramDateTime;if(d>=(s||0))return null;a=a||0;for(var f=0;fh&&a.start?-1:0}function l(h,d,a){var u=Math.min(d,a.duration+(a.deltaPTS?a.deltaPTS:0))*1e3,s=a.endProgramDateTime||0;return s-u>h}function p(h,d){return P.default.search(h,function(a){return a.ccd?-1:0})}},"./src/controller/fragment-tracker.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"FragmentState",function(){return S}),U.d(Z,"FragmentTracker",function(){return O});var w=U("./src/events.ts"),P=U("./src/types/loader.ts"),S;(function(p){p.NOT_LOADED="NOT_LOADED",p.BACKTRACKED="BACKTRACKED",p.APPENDING="APPENDING",p.PARTIAL="PARTIAL",p.OK="OK"})(S||(S={}));var O=function(){function p(d){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=d,this._registerListeners()}var h=p.prototype;return h._registerListeners=function(){var a=this.hls;a.on(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.on(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.on(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h._unregisterListeners=function(){var a=this.hls;a.off(w.Events.BUFFER_APPENDED,this.onBufferAppended,this),a.off(w.Events.FRAG_BUFFERED,this.onFragBuffered,this),a.off(w.Events.FRAG_LOADED,this.onFragLoaded,this)},h.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},h.getAppendedFrag=function(a,u){if(u===P.PlaylistLevelType.MAIN){var s=this.activeFragment,f=this.activeParts;if(!s)return null;if(f)for(var i=f.length;i--;){var n=f[i],t=n?n.end:s.appendedPTS;if(n.start<=a&&t!==void 0&&a<=t)return i>9&&(this.activeParts=f.slice(i-9)),n}else if(s.start<=a&&s.appendedPTS!==void 0&&a<=s.appendedPTS)return s}return this.getBufferedFrag(a,u)},h.getBufferedFrag=function(a,u){for(var s=this.fragments,f=Object.keys(s),i=f.length;i--;){var n=s[f[i]];if((n==null?void 0:n.body.type)===u&&n.buffered){var t=n.body;if(t.start<=a&&a<=t.end)return t}}return null},h.detectEvictedFragments=function(a,u,s){var f=this;Object.keys(this.fragments).forEach(function(i){var n=f.fragments[i];if(!n)return;if(!n.buffered){n.body.type===s&&f.removeFragment(n.body);return}var t=n.range[a];if(!t)return;t.time.some(function(c){var y=!f.isTimeBuffered(c.startPTS,c.endPTS,u);return y&&f.removeFragment(n.body),y})})},h.detectPartialFragments=function(a){var u=this,s=this.timeRanges,f=a.frag,i=a.part;if(!s||f.sn==="initSegment")return;var n=l(f),t=this.fragments[n];if(!t)return;Object.keys(s).forEach(function(c){var y=f.elementaryStreams[c];if(!y)return;var v=s[c],_=i!==null||y.partial===!0;t.range[c]=u.getBufferedTimes(f,i,_,v)}),t.backtrack=t.loaded=null,Object.keys(t.range).length?t.buffered=!0:this.removeFragment(t.body)},h.fragBuffered=function(a){var u=l(a),s=this.fragments[u];s&&(s.backtrack=s.loaded=null,s.buffered=!0)},h.getBufferedTimes=function(a,u,s,f){for(var i={time:[],partial:s},n=u?u.start:a.start,t=u?u.end:a.end,c=a.minEndPTS||t,y=a.maxStartPTS||n,v=0;v=_&&c<=b){i.time.push({startPTS:Math.max(n,f.start(v)),endPTS:Math.min(t,f.end(v))});break}else if(n_)i.partial=!0,i.time.push({startPTS:Math.max(n,f.start(v)),endPTS:Math.min(t,f.end(v))});else if(t<=_)break}return i},h.getPartialFragment=function(a){var u=null,s,f,i,n=0,t=this.bufferPadding,c=this.fragments;return Object.keys(c).forEach(function(y){var v=c[y];if(!v)return;T(v)&&(f=v.body.start-t,i=v.body.end+t,a>=f&&a<=i&&(s=Math.min(a-f,i-a),n<=s&&(u=v.body,n=s)))}),u},h.getState=function(a){var u=l(a),s=this.fragments[u];return s?s.buffered?T(s)?S.PARTIAL:S.OK:s.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},h.backtrack=function(a,u){var s=l(a),f=this.fragments[s];if(!f||f.backtrack)return null;var i=f.backtrack=u||f.loaded;return f.loaded=null,i},h.getBacktrackData=function(a){var u=l(a),s=this.fragments[u];if(s){var f,i=s.backtrack;if(i!=null&&(f=i.payload)!==null&&f!==void 0&&f.byteLength)return i;this.removeFragment(a)}return null},h.isTimeBuffered=function(a,u,s){for(var f,i,n=0;n=f&&u<=i)return!0;if(u<=f)return!1}return!1},h.onFragLoaded=function(a,u){var s=u.frag,f=u.part;if(s.sn==="initSegment"||s.bitrateTest||f)return;var i=l(s);this.fragments[i]={body:s,loaded:u,backtrack:null,buffered:!1,range:Object.create(null)}},h.onBufferAppended=function(a,u){var s=this,f=u.frag,i=u.part,n=u.timeRanges;if(f.type===P.PlaylistLevelType.MAIN)if(this.activeFragment=f,i){var t=this.activeParts;t||(this.activeParts=t=[]),t.push(i)}else this.activeParts=null;this.timeRanges=n,Object.keys(n).forEach(function(c){var y=n[c];if(s.detectEvictedFragments(c,y),!i)for(var v=0;va&&f.removeFragment(t)}})},h.removeFragment=function(a){var u=l(a);a.stats.loaded=0,a.clearElementaryStreamInfo(),delete this.fragments[u]},h.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},p}();function T(p){var h,d;return p.buffered&&(((h=p.range.video)===null||h===void 0?void 0:h.partial)||((d=p.range.audio)===null||d===void 0?void 0:d.partial))}function l(p){return p.type+"_"+p.level+"_"+p.urlId+"_"+p.sn}},"./src/controller/gap-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"STALL_MINIMUM_DURATION_MS",function(){return T}),U.d(Z,"MAX_START_GAP_JUMP",function(){return l}),U.d(Z,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return p}),U.d(Z,"SKIP_BUFFER_RANGE_START",function(){return h}),U.d(Z,"default",function(){return d});var w=U("./src/utils/buffer-helper.ts"),P=U("./src/errors.ts"),S=U("./src/events.ts"),O=U("./src/utils/logger.ts"),T=250,l=2,p=.1,h=.05,d=function(){function a(s,f,i,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=s,this.media=f,this.fragmentTracker=i,this.hls=n}var u=a.prototype;return u.destroy=function(){this.hls=this.fragmentTracker=this.media=null},u.poll=function(f){var i=this.config,n=this.media,t=this.stalled,c=n.currentTime,y=n.seeking,v=this.seeking&&!y,_=!this.seeking&&y;if(this.seeking=y,c!==f){if(this.moved=!0,t!==null){if(this.stallReported){var b=self.performance.now()-t;O.logger.warn("playback not stuck anymore @"+c+", after "+Math.round(b)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||v)&&(this.stalled=null),n.paused||n.ended||n.playbackRate===0||!w.BufferHelper.getBuffered(n).length)return;var m=w.BufferHelper.bufferInfo(n,c,0),g=m.len>0,E=m.nextStart||0;if(!g&&!E)return;if(y){var o=m.len>l,x=!E||E-c>l&&!this.fragmentTracker.getPartialFragment(c);if(o||x)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C,A=Math.max(E,m.start||0)-c,D=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,I=D==null||((C=D.details)===null||C===void 0)?void 0:C.live,F=I?D.details.targetduration*2:l;if(A>0&&A<=F){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(t===null){this.stalled=H;return}var te=H-t;!y&&te>=T&&this._reportStall(m.len);var j=w.BufferHelper.bufferInfo(n,c,i.maxBufferHole);this._tryFixBufferStall(j,te)},u._tryFixBufferStall=function(f,i){var n=this.config,t=this.fragmentTracker,c=this.media,y=c.currentTime,v=t.getPartialFragment(y);if(v){var _=this._trySkipBufferHole(v);if(_)return}f.len>n.maxBufferHole&&i>n.highBufferWatchdogPeriod*1e3&&(O.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},u._reportStall=function(f){var i=this.hls,n=this.media,t=this.stallReported;t||(this.stallReported=!0,O.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+f+")"),i.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:f}))},u._trySkipBufferHole=function(f){for(var i=this.config,n=this.hls,t=this.media,c=t.currentTime,y=0,v=w.BufferHelper.getBuffered(t),_=0;_=y&&c.05&&this.forwardBufferLength>1){var _=Math.min(2,Math.max(1,n)),b=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20;a.playbackRate=Math.min(_,Math.max(1,b))}else a.playbackRate!==1&&a.playbackRate!==0&&(a.playbackRate=1)},h.estimateLiveEdge=function(){var a=this.levelDetails;return a===null?null:a.edge+a.age},h.computeLatency=function(){var a=this.estimateLiveEdge();return a===null?null:a-this.currentTime},T(p,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var a=this.config,u=this.levelDetails;return a.liveMaxLatencyDuration!==void 0?a.liveMaxLatencyDuration:u?a.liveMaxLatencyDurationCount*u.targetduration:0}},{key:"targetLatency",get:function(){var a=this.levelDetails;if(a===null)return null;var u=a.holdBack,s=a.partHoldBack,f=a.targetduration,i=this.config,n=i.liveSyncDuration,t=i.liveSyncDurationCount,c=i.lowLatencyMode,y=this.hls.userConfig,v=c&&s||u;(y.liveSyncDuration||y.liveSyncDurationCount||v===0)&&(v=n!==void 0?n:t*f);var _=f,b=1;return v+Math.min(this.stallCount*b,_)}},{key:"liveSyncPosition",get:function(){var a=this.estimateLiveEdge(),u=this.targetLatency,s=this.levelDetails;if(a===null||u===null||s===null)return null;var f=s.edge,i=a-u-this.edgeStalled,n=f-s.totalduration,t=f-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(n,i),t)}},{key:"drift",get:function(){var a=this.levelDetails;return a===null?1:a.drift}},{key:"edgeStalled",get:function(){var a=this.levelDetails;if(a===null)return 0;var u=(this.config.lowLatencyMode&&a.partTarget||a.targetduration)*3;return Math.max(a.age-u,0)}},{key:"forwardBufferLength",get:function(){var a=this.media,u=this.levelDetails;if(!a||!u)return 0;var s=a.buffered.length;return s?a.buffered.end(s-1):u.edge-this.currentTime}}]),p}()},"./src/controller/level-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return i});var w=U("./src/types/level.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),O=U("./src/utils/codecs.ts"),T=U("./src/controller/level-helper.ts"),l=U("./src/controller/base-playlist-controller.ts"),p=U("./src/types/loader.ts");function h(){return h=Object.assign||function(n){for(var t=1;t0){E=b[0].bitrate,b.sort(function(te,j){return te.bitrate-j.bitrate}),this._levels=b;for(var I=0;Ithis.hls.config.fragLoadingMaxRetry&&(o=_.frag.level)):o=_.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:b&&(b.deliveryDirectives&&(E=!1),o=b.level),g=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:o=_.level,g=!0;break}o!==void 0&&this.recoverLevel(_,o,g,E)},c.recoverLevel=function(v,_,b,m){var g=v.details,E=this._levels[_];if(E.loadError++,b){var o=this.retryLoadingOrFail(v);if(o)v.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(m){var x=E.url.length;if(x>1&&E.loadError1){var m=(_.urlId+1)%b;this.warn("Switching to redundant URL-id "+m),this._levels.forEach(function(g){g.urlId=m}),this.level=v}},c.onFragLoaded=function(v,_){var b=_.frag;if(b!==void 0&&b.type===p.PlaylistLevelType.MAIN){var m=this._levels[b.level];m!==void 0&&(m.fragmentError=0,m.loadError=0)}},c.onLevelLoaded=function(v,_){var b,m=_.level,g=_.details,E=this._levels[m];if(!E){var o;this.warn("Invalid level index "+m),(o=_.deliveryDirectives)!==null&&o!==void 0&&o.skip&&(g.deltaUpdateFailed=!0);return}m===this.currentLevelIndex?(E.fragmentError===0&&(E.loadError=0,this.retryCount=0),this.playlistLoaded(m,_,E.details)):(b=_.deliveryDirectives)!==null&&b!==void 0&&b.skip&&(g.deltaUpdateFailed=!0)},c.onAudioTrackSwitched=function(v,_){var b=this.hls.levels[this.currentLevelIndex];if(!b)return;if(b.audioGroupIds){for(var m=-1,g=this.hls.audioTracks[_.id].groupId,E=0;E0){var m=b.urlId,g=b.url[m];if(v)try{g=v.addDirectives(g)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Attempt loading level index "+_+(v?" at sn "+v.msn+" part "+v.part:"")+" with URL-id "+m+" "+g),this.clearTimer(),this.hls.trigger(P.Events.LEVEL_LOADING,{url:g,level:_,id:m,deliveryDirectives:v||null})}},c.removeLevel=function(v,_){var b=function(E,o){return o!==_},m=this._levels.filter(function(g,E){return E!==v?!0:g.url.length>1&&_!==void 0?(g.url=g.url.filter(b),g.audioGroupIds&&(g.audioGroupIds=g.audioGroupIds.filter(b)),g.textGroupIds&&(g.textGroupIds=g.textGroupIds.filter(b)),g.urlId=0,!0):!1}).map(function(g,E){var o=g.details;return o!=null&&o.fragments&&o.fragments.forEach(function(x){x.level=E}),g});this._levels=m,this.hls.trigger(P.Events.LEVELS_UPDATED,{levels:m})},a(t,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(v){var _,b=this._levels;if(b.length===0)return;if(this.currentLevelIndex===v&&(_=b[v])!==null&&_!==void 0&&_.details)return;if(v<0||v>=b.length){var m=v<0;if(this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:v,fatal:m,reason:"invalid level idx"}),m)return;v=Math.min(v,b.length-1)}this.clearTimer();var g=this.currentLevelIndex,E=b[g],o=b[v];this.log("switching to level "+v+" from "+g),this.currentLevelIndex=v;var x=h({},o,{level:v,maxBitrate:o.maxBitrate,uri:o.uri,urlId:o.urlId});delete x._urlId,this.hls.trigger(P.Events.LEVEL_SWITCHING,x);var C=o.details;if(!C||C.live){var A=this.switchParams(o.uri,E==null?void 0:E.details);this.loadPlaylist(A)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(v){this.manualLevelIndex=v,this._startLevel===void 0&&(this._startLevel=v),v!==-1&&(this.level=v)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(v){this._firstLevel=v}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var v=this.hls.config.startLevel;return v!==void 0?v:this._firstLevel}else return this._startLevel},set:function(v){this._startLevel=v}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(v){this.level=v,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=v)}}]),t}(l.default)},"./src/controller/level-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"addGroupId",function(){return S}),U.d(Z,"assignTrackIdsByGroup",function(){return O}),U.d(Z,"updatePTS",function(){return T}),U.d(Z,"updateFragPTSDTS",function(){return p}),U.d(Z,"mergeDetails",function(){return h}),U.d(Z,"mapPartIntersection",function(){return d}),U.d(Z,"mapFragmentIntersection",function(){return a}),U.d(Z,"adjustSliding",function(){return u}),U.d(Z,"addSliding",function(){return s}),U.d(Z,"computeReloadInterval",function(){return f}),U.d(Z,"getFragmentWithSN",function(){return i}),U.d(Z,"getPartWith",function(){return n});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts");function S(t,c,y){switch(c){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(y);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(y);break}}function O(t){var c={};t.forEach(function(y){var v=y.groupId||"";y.id=c[v]=c[v]||0,c[v]++})}function T(t,c,y){var v=t[c],_=t[y];l(v,_)}function l(t,c){var y=c.startPTS;if(Object(w.isFiniteNumber)(y)){var v=0,_;c.sn>t.sn?(v=y-t.start,_=t):(v=t.start-y,_=c),_.duration!==v&&(_.duration=v)}else if(c.sn>t.sn){var b=t.cc===c.cc;b&&t.minEndPTS?c.start=t.start+(t.minEndPTS-t.start):c.start=t.start+t.duration}else c.start=Math.max(t.start-c.duration,0)}function p(t,c,y,v,_,b){var m=v-y;m<=0&&(P.logger.warn("Fragment should have a positive duration",c),v=y+c.duration,b=_+c.duration);var g=y,E=v,o=c.startPTS,x=c.endPTS;if(Object(w.isFiniteNumber)(o)){var C=Math.abs(o-y);Object(w.isFiniteNumber)(c.deltaPTS)?c.deltaPTS=Math.max(C,c.deltaPTS):c.deltaPTS=C,g=Math.max(y,o),y=Math.min(y,o),_=Math.min(_,c.startDTS),E=Math.min(v,x),v=Math.max(v,x),b=Math.max(b,c.endDTS)}c.duration=v-y;var A=y-c.start;c.appendedPTS=v,c.start=c.startPTS=y,c.maxStartPTS=g,c.startDTS=_,c.endPTS=v,c.minEndPTS=E,c.endDTS=b;var D=c.sn;if(!t||Dt.endSN)return 0;var I,F=D-t.startSN,H=t.fragments;for(H[F]=c,I=F;I>0;I--)l(H[I],H[I-1]);for(I=F;I=0;_--){var b=v[_].initSegment;if(b){y=b;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var m=0,g;if(a(t,c,function(I,F){I.relurl&&(m=I.cc-F.cc),Object(w.isFiniteNumber)(I.startPTS)&&Object(w.isFiniteNumber)(I.endPTS)&&(F.start=F.startPTS=I.startPTS,F.startDTS=I.startDTS,F.appendedPTS=I.appendedPTS,F.maxStartPTS=I.maxStartPTS,F.endPTS=I.endPTS,F.endDTS=I.endDTS,F.minEndPTS=I.minEndPTS,F.duration=I.endPTS-I.startPTS,F.duration&&(g=F),c.PTSKnown=c.alignedSliding=!0),F.elementaryStreams=I.elementaryStreams,F.loader=I.loader,F.stats=I.stats,F.urlId=I.urlId,I.initSegment&&(F.initSegment=I.initSegment,y=I.initSegment)}),y){var E=c.fragmentHint?c.fragments.concat(c.fragmentHint):c.fragments;E.forEach(function(I){var F;(!I.initSegment||I.initSegment.relurl===((F=y)===null||F===void 0?void 0:F.relurl))&&(I.initSegment=y)})}if(c.skippedSegments&&(c.deltaUpdateFailed=c.fragments.some(function(I){return!I}),c.deltaUpdateFailed)){P.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var o=c.skippedSegments;o--;)c.fragments.shift();c.startSN=c.fragments[0].sn,c.startCC=c.fragments[0].cc}var x=c.fragments;if(m){P.logger.warn("discontinuity sliding from playlist, take drift into account");for(var C=0;C=v.length)return;s(c,v[y].start)}function s(t,c){if(c){for(var y=t.fragments,v=t.skippedSegments;v0&&_0&&E===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),E=o),this.state=P.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=E,this.tick()}else this._forceStartLoad=!0,this.state=P.State.STOPPED},m.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},m.doTick=function(){switch(this.state){case P.State.IDLE:this.doTickIdle();break;case P.State.WAITING_LEVEL:{var E,o=this.levels,x=this.level,C=o==null||((E=o[x])===null||E===void 0)?void 0:E.details;if(C&&(!C.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(C))break;this.state=P.State.IDLE;break}break}case P.State.FRAG_LOADING_WAITING_RETRY:{var A,D=self.performance.now(),I=this.retryDate;(!I||D>=I||(A=this.media)!==null&&A!==void 0&&A.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=P.State.IDLE)}break;default:break}this.onTickEnd()},m.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},m.doTickIdle=function(){var E,o,x=this.hls,C=this.levelLastLoaded,A=this.levels,D=this.media,I=x.config,F=x.nextLoadLevel;if(C===null||!D&&(this.startFragRequested||!I.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!A||!A[F])return;var H=A[F];this.level=x.nextLoadLevel=F;var te=H.details;if(!te||this.state===P.State.WAITING_LEVEL||te.live&&this.levelLastLoaded!==F){this.state=P.State.WAITING_LEVEL;return}var j=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:D,p.PlaylistLevelType.MAIN);if(j===null)return;var G=j.len,X=this.getMaxBufferLength(H.maxBitrate);if(G>=X)return;if(this._streamEnded(j,te)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(O.Events.BUFFER_EOS,J),this.state=P.State.ENDED;return}var B=j.end,Q=this.getNextFragment(B,te);if(this.couldBacktrack&&!this.fragPrevious&&Q&&Q.sn!=="initSegment"){var ie=Q.sn-te.startSN;ie>1&&(Q=te.fragments[ie-1],this.fragmentTracker.removeFragment(Q))}if(Q&&this.fragmentTracker.getState(Q)===l.FragmentState.OK&&this.nextLoadPosition>B){var oe=this.audioOnly&&!this.altAudio?h.ElementaryStreamTypes.AUDIO:h.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(D,oe,p.PlaylistLevelType.MAIN),Q=this.getNextFragment(this.nextLoadPosition,te)}if(!Q)return;Q.initSegment&&!Q.initSegment.data&&!this.bitrateTest&&(Q=Q.initSegment),((E=Q.decryptdata)===null||E===void 0?void 0:E.keyFormat)==="identity"&&!((o=Q.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(Q,te):this.loadFragment(Q,te,B)},m.loadFragment=function(E,o,x){var C,A=this.fragmentTracker.getState(E);if(this.fragCurrent=E,A===l.FragmentState.BACKTRACKED){var D=this.fragmentTracker.getBacktrackData(E);if(D){this._handleFragmentLoadProgress(D),this._handleFragmentLoadComplete(D);return}else A=l.FragmentState.NOT_LOADED}A===l.FragmentState.NOT_LOADED||A===l.FragmentState.PARTIAL?E.sn==="initSegment"?this._loadInitSegment(E):this.bitrateTest?(E.bitrateTest=!0,this.log("Fragment "+E.sn+" of level "+E.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(E)):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,E,o,x)):A===l.FragmentState.APPENDING?this.reduceMaxBufferLength(E.duration)&&this.fragmentTracker.removeFragment(E):((C=this.media)===null||C===void 0?void 0:C.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},m.getAppendedFrag=function(E){var o=this.fragmentTracker.getAppendedFrag(E,p.PlaylistLevelType.MAIN);return o&&"fragment"in o?o.fragment:o},m.getBufferedFrag=function(E){return this.fragmentTracker.getBufferedFrag(E,p.PlaylistLevelType.MAIN)},m.followingBufferedFrag=function(E){return E?this.getBufferedFrag(E.end+.5):null},m.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},m.nextLevelSwitch=function(){var E=this.levels,o=this.media;if(o!=null&&o.readyState){var x,C=this.getAppendedFrag(o.currentTime);if(C&&C.start>1&&this.flushMainBuffer(0,C.start-1),!o.paused&&E){var A=this.hls.nextLoadLevel,D=E[A],I=this.fragLastKbps;I&&this.fragCurrent?x=this.fragCurrent.duration*D.maxBitrate/(1e3*I)+1:x=0}else x=0;var F=this.getBufferedFrag(o.currentTime+x);if(F){var H=this.followingBufferedFrag(F);if(H){this.abortCurrentFrag();var te=H.maxStartPTS?H.maxStartPTS:H.start,j=H.duration,G=Math.max(F.end,te+Math.min(Math.max(j-this.config.maxFragLookUpTolerance,j*.5),j*.75));this.flushMainBuffer(G,Number.POSITIVE_INFINITY)}}}},m.abortCurrentFrag=function(){var E=this.fragCurrent;this.fragCurrent=null,E!=null&&E.loader&&E.loader.abort(),this.state===P.State.KEY_LOADING&&(this.state=P.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},m.flushMainBuffer=function(E,o){_.prototype.flushMainBuffer.call(this,E,o,this.altAudio?"video":null)},m.onMediaAttached=function(E,o){_.prototype.onMediaAttached.call(this,E,o);var x=o.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),x.addEventListener("playing",this.onvplaying),x.addEventListener("seeked",this.onvseeked),this.gapController=new u.default(this.config,x,this.fragmentTracker,this.hls)},m.onMediaDetaching=function(){var E=this.media;E&&(E.removeEventListener("playing",this.onvplaying),E.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),_.prototype.onMediaDetaching.call(this)},m.onMediaPlaying=function(){this.tick()},m.onMediaSeeked=function(){var E=this.media,o=E?E.currentTime:null;Object(w.isFiniteNumber)(o)&&this.log("Media seeked to "+o.toFixed(3)),this.tick()},m.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(O.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},m.onManifestParsed=function(E,o){var x=!1,C=!1,A;o.levels.forEach(function(D){A=D.audioCodec,A&&(A.indexOf("mp4a.40.2")!==-1&&(x=!0),A.indexOf("mp4a.40.5")!==-1&&(C=!0))}),this.audioCodecSwitch=x&&C&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},m.onLevelLoading=function(E,o){var x=this.levels;if(!x||this.state!==P.State.IDLE)return;var C=x[o.level];(!C.details||C.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(C.details))&&(this.state=P.State.WAITING_LEVEL)},m.onLevelLoaded=function(E,o){var x,C=this.levels,A=o.level,D=o.details,I=D.totalduration;if(!C){this.warn("Levels were reset while loading level "+A);return}this.log("Level "+A+" loaded ["+D.startSN+","+D.endSN+"], cc ["+D.startCC+", "+D.endCC+"] duration:"+I);var F=this.fragCurrent;F&&(this.state===P.State.FRAG_LOADING||this.state===P.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==o.level&&F.loader&&(this.state=P.State.IDLE,F.loader.abort()));var H=C[A],te=0;if(D.live||(x=H.details)!==null&&x!==void 0&&x.live){if(D.fragments[0]||(D.deltaUpdateFailed=!0),D.deltaUpdateFailed)return;te=this.alignPlaylists(D,H.details)}if(H.details=D,this.levelLastLoaded=A,this.hls.trigger(O.Events.LEVEL_UPDATED,{details:D,level:A}),this.state===P.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(D))return;this.state=P.State.IDLE}this.startFragRequested?D.live&&this.synchronizeToLiveEdge(D):this.setStartPosition(D,te),this.tick()},m._handleFragmentLoadProgress=function(E){var o,x=E.frag,C=E.part,A=E.payload,D=this.levels;if(!D){this.warn("Levels were reset while fragment load was in progress. Fragment "+x.sn+" of level "+x.level+" will not be buffered");return}var I=D[x.level],F=I.details;if(!F){this.warn("Dropping fragment "+x.sn+" of level "+x.level+" after level details were reset");return}var H=I.videoCodec,te=F.PTSKnown||!F.live,j=(o=x.initSegment)===null||o===void 0?void 0:o.data,G=this._getAudioCodec(I),X=this.transmuxer=this.transmuxer||new d.default(this.hls,p.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=C?C.index:-1,B=J!==-1,Q=new a.ChunkMetadata(x.level,x.sn,x.stats.chunkCount,A.byteLength,J,B),ie=this.initPTS[x.cc];X.push(A,j,G,H,x,C,F.totalduration,te,Q,ie)},m.onAudioTrackSwitching=function(E,o){var x=this.altAudio,C=!!o.url,A=o.id;if(!C){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var D=this.fragCurrent;D!=null&&D.loader&&(this.log("Switching to main audio track, cancel main fragment load"),D.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var I=this.hls;x&&I.trigger(O.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),I.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:A})}},m.onAudioTrackSwitched=function(E,o){var x=o.id,C=!!this.hls.audioTracks[x].url;if(C){var A=this.videoBuffer;A&&this.mediaBuffer!==A&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=A)}this.altAudio=C,this.tick()},m.onBufferCreated=function(E,o){var x=o.tracks,C,A,D=!1;for(var I in x){var F=x[I];if(F.id==="main"){if(A=I,C=F,I==="video"){var H=x[I];H&&(this.videoBuffer=H.buffer)}}else D=!0}D&&C?(this.log("Alternate track found, use "+A+".buffered to schedule main fragment loading"),this.mediaBuffer=C.buffer):this.mediaBuffer=this.media},m.onFragBuffered=function(E,o){var x=o.frag,C=o.part;if(x&&x.type!==p.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(x)){this.warn("Fragment "+x.sn+(C?" p: "+C.index:"")+" of level "+x.level+" finished buffering, but was aborted. state: "+this.state),this.state===P.State.PARSED&&(this.state=P.State.IDLE);return}var A=C?C.stats:x.stats;this.fragLastKbps=Math.round(8*A.total/(A.buffering.end-A.loading.first)),x.sn!=="initSegment"&&(this.fragPrevious=x),this.fragBufferedComplete(x,C)},m.onError=function(E,o){switch(o.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(p.PlaylistLevelType.MAIN,o);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==P.State.ERROR&&(o.fatal?(this.warn(""+o.details),this.state=P.State.ERROR):!o.levelRetry&&this.state===P.State.WAITING_LEVEL&&(this.state=P.State.IDLE));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="main"&&(this.state===P.State.PARSING||this.state===P.State.PARSED)){var x=!0,C=this.getFwdBufferInfo(this.media,p.PlaylistLevelType.MAIN);C&&C.len>.5&&(x=!this.reduceMaxBufferLength(C.len)),x&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},m.checkBuffer=function(){var E=this.media,o=this.gapController;if(!E||!o||!E.readyState)return;var x=T.BufferHelper.getBuffered(E);!this.loadedmetadata&&x.length?(this.loadedmetadata=!0,this.seekToStartPos()):o.poll(this.lastCurrentTime),this.lastCurrentTime=E.currentTime},m.onFragLoadEmergencyAborted=function(){this.state=P.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},m.onBufferFlushed=function(E,o){var x=o.type;if(x!==h.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var C=(x===h.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(C,x,p.PlaylistLevelType.MAIN)}},m.onLevelsUpdated=function(E,o){this.levels=o.levels},m.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},m.seekToStartPos=function(){var E=this.media,o=E.currentTime,x=this.startPosition;if(x>=0&&o0&&(D1&&E.seeking===!1){var x=E.currentTime;if(T.BufferHelper.isBuffered(E,x)?o=this.getAppendedFrag(x):T.BufferHelper.isBuffered(E,x+.1)&&(o=this.getAppendedFrag(x+.1)),o){var C=this.fragPlaying,A=o.level;(!C||o.sn!==C.sn||C.level!==A||o.urlId!==C.urlId)&&(this.hls.trigger(O.Events.FRAG_CHANGED,{frag:o}),(!C||C.level!==A)&&this.hls.trigger(O.Events.LEVEL_SWITCHED,{level:A}),this.fragPlaying=o)}}},n(b,[{key:"nextLevel",get:function(){var E=this.nextBufferedFrag;return E?E.level:-1}},{key:"currentLevel",get:function(){var E=this.media;if(E){var o=this.getAppendedFrag(E.currentTime);if(o)return o.level}return-1}},{key:"nextBufferedFrag",get:function(){var E=this.media;if(E){var o=this.getAppendedFrag(E.currentTime);return this.followingBufferedFrag(o)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),b}(P.default)},"./src/controller/subtitle-stream-controller.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"SubtitleStreamController",function(){return t});var w=U("./src/events.ts"),P=U("./src/utils/logger.ts"),S=U("./src/utils/buffer-helper.ts"),O=U("./src/controller/fragment-finders.ts"),T=U("./src/utils/discontinuities.ts"),l=U("./src/controller/level-helper.ts"),p=U("./src/controller/fragment-tracker.ts"),h=U("./src/controller/base-stream-controller.ts"),d=U("./src/types/loader.ts"),a=U("./src/types/level.ts");function u(c,y){for(var v=0;v=o[A].start&&C<=o[A].end){x=o[A];break}var D=g.start+g.duration;x?x.end=D:(x={start:C,end:D},o.push(x)),this.fragmentTracker.fragBuffered(g)},v.onBufferFlushing=function(b,m){var g=m.startOffset,E=m.endOffset;if(g===0&&E!==Number.POSITIVE_INFINITY){var o=this.currentTrackId,x=this.levels;if(!x.length||!x[o]||!x[o].details)return;var C=x[o].details,A=C.targetduration,D=E-A;if(D<=0)return;m.endOffsetSubtitles=Math.max(0,D),this.tracksBuffered.forEach(function(I){for(var F=0;F=C.length||o!==x||!A)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,E.live||(g=A.details)!==null&&g!==void 0&&g.live){var D=this.mainDetails;if(E.deltaUpdateFailed||!D)return;var I=D.fragments[0];if(!A.details)E.hasProgramDateTime&&D.hasProgramDateTime?Object(T.alignMediaPlaylistByPDT)(E,D):I&&Object(l.addSliding)(E,I.start);else{var F=this.alignPlaylists(E,A.details);F===0&&I&&Object(l.addSliding)(E,I.start)}}if(A.details=E,this.levelLastLoaded=o,this.tick(),E.live&&!this.fragCurrent&&this.media&&this.state===h.State.IDLE){var H=Object(O.findFragmentByPTS)(null,E.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),A.details=void 0)}},v._handleFragmentLoadComplete=function(b){var m=b.frag,g=b.payload,E=m.decryptdata,o=this.hls;if(this.fragContextChanged(m))return;if(g&&g.byteLength>0&&E&&E.key&&E.iv&&E.method==="AES-128"){var x=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(g),E.key.buffer,E.iv.buffer).then(function(C){var A=performance.now();o.trigger(w.Events.FRAG_DECRYPTED,{frag:m,payload:C,stats:{tstart:x,tdecrypt:A}})})}},v.doTick=function(){if(!this.media){this.state=h.State.IDLE;return}if(this.state===h.State.IDLE){var b,m=this.currentTrackId,g=this.levels;if(!g.length||!g[m]||!g[m].details)return;var E=g[m].details,o=E.targetduration,x=this.config,C=this.media,A=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,C.currentTime-o,x.maxBufferHole),D=A.end,I=A.len,F=this.getMaxBufferLength()+o;if(I>F)return;console.assert(E,"Subtitle track details are defined on idle subtitle stream controller tick");var H=E.fragments,te=H.length,j=E.edge,G,X=this.fragPrevious;if(D-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)},f.pollTrackChange=function(n){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,n)},f.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var n=a(this.media.textTracks);n.forEach(function(t){Object(P.clearCurrentCues)(t)}),this.subtitleTrack=-1,this.media=null},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},f.onManifestParsed=function(n,t){this.tracks=t.subtitleTracks},f.onSubtitleTrackLoaded=function(n,t){var c=t.id,y=t.details,v=this.trackId,_=this.tracksInGroup[v];if(!_){this.warn("Invalid subtitle track id "+c);return}var b=_.details;_.details=t.details,this.log("subtitle track "+c+" loaded ["+y.startSN+"-"+y.endSN+"]"),c===this.trackId&&(this.retryCount=0,this.playlistLoaded(c,t,b))},f.onLevelLoading=function(n,t){this.switchLevel(t.level)},f.onLevelSwitching=function(n,t){this.switchLevel(t.level)},f.switchLevel=function(n){var t=this.hls.levels[n];if(!(t!=null&&t.textGroupIds))return;var c=t.textGroupIds[t.urlId];if(this.groupId!==c){var y=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,v=this.tracks.filter(function(m){return!c||m.groupId===c});this.tracksInGroup=v;var _=this.findTrackId(y==null?void 0:y.name)||this.findTrackId();this.groupId=c;var b={subtitleTracks:v};this.log("Updating subtitle tracks, "+v.length+' track(s) found in "'+c+'" group-id'),this.hls.trigger(w.Events.SUBTITLE_TRACKS_UPDATED,b),_!==-1&&this.setSubtitleTrack(_,y)}},f.findTrackId=function(n){for(var t=this.tracksInGroup,c=0;c=y.length)return;this.clearTimer();var v=y[n];if(this.log("Switching to subtitle track "+n),this.trackId=n,v){var _=v.id,b=v.groupId,m=b===void 0?"":b,g=v.name,E=v.type,o=v.url;this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:_,groupId:m,name:g,type:E,url:o});var x=this.switchParams(v.url,t==null?void 0:t.details);this.loadPlaylist(x)}else this.hls.trigger(w.Events.SUBTITLE_TRACK_SWITCH,{id:n})},f.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var n=-1,t=a(this.media.textTracks),c=0;c=0&&(E[0]=Math.min(E[0],y),E[1]=Math.max(E[1],v),m=!0,o/(v-y)>.5))return}if(m||b.push([y,v]),this.config.renderTextTracksNatively){var x=this.captionsTracks[c];this.Cues.newCue(x,y,v,_)}else{var C=this.Cues.newCue(null,y,v,_);this.hls.trigger(P.Events.CUES_PARSED,{type:"captions",cues:C,track:c})}},n.onInitPtsFound=function(c,y){var v=this,_=y.frag,b=y.id,m=y.initPTS,g=y.timescale,E=this.unparsedVttFrags;b==="main"&&(this.initPTS[_.cc]=m,this.timescale[_.cc]=g),E.length&&(this.unparsedVttFrags=[],E.forEach(function(o){v.onFragLoaded(P.Events.FRAG_LOADED,o)}))},n.getExistingTrack=function(c){var y=this.media;if(y)for(var v=0;v>>8^g&255^99,p[_]=g,h[g]=_;var E=v[_],o=v[E],x=v[o],C=v[g]*257^g*16843008;a[_]=C<<24|C>>>8,u[_]=C<<16|C>>>16,s[_]=C<<8|C>>>24,f[_]=C,C=x*16843009^o*65537^E*257^_*16843008,n[g]=C<<24|C>>>8,t[g]=C<<16|C>>>16,c[g]=C<<8|C>>>24,y[g]=C,_?(_=E^v[v[v[x^E]]],b^=v[v[b]]):_=b=1}},T.expandKey=function(p){for(var h=this.uint8ArrayToUint32Array_(p),d=!0,a=0;a>>6)+1;var C=(c[y+2]&60)>>>2;if(C>x.length-1){t.trigger(S.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+C});return}return m=(c[y+2]&1)<<2,m|=(c[y+3]&192)>>>6,w.logger.log("manifest codec:"+v+", ADTS type:"+_+", samplingIndex:"+C),/firefox/i.test(E)?C>=6?(_=5,g=new Array(4),b=C-3):(_=2,g=new Array(2),b=C):E.indexOf("android")!==-1?(_=2,g=new Array(2),b=C):(_=5,g=new Array(4),v&&(v.indexOf("mp4a.40.29")!==-1||v.indexOf("mp4a.40.5")!==-1)||!v&&C>=6?b=C-3:((v&&v.indexOf("mp4a.40.2")!==-1&&(C>=6&&m===1||/vivaldi/i.test(E))||!v&&m===1)&&(_=2,g=new Array(2)),b=C)),g[0]=_<<3,g[0]|=(C&14)>>1,g[1]|=(C&1)<<7,g[1]|=m<<3,_===5&&(g[1]|=(b&14)>>1,g[2]=(b&1)<<7,g[2]|=2<<2,g[3]=0),{config:g,samplerate:x[C],channelCount:m,codec:"mp4a.40."+_,manifestCodec:o}}function T(t,c){return t[c]===255&&(t[c+1]&246)===240}function l(t,c){return t[c+1]&1?7:9}function p(t,c){return(t[c+3]&3)<<11|t[c+4]<<3|(t[c+5]&224)>>>5}function h(t,c){return c+5=t.length)return!1;var v=p(t,c);if(v<=y)return!1;var _=c+v;return _===t.length||d(t,_)}return!1}function s(t,c,y,v,_){if(!t.samplerate){var b=O(c,y,v,_);if(!b)return;t.config=b.config,t.samplerate=b.samplerate,t.channelCount=b.channelCount,t.codec=b.codec,t.manifestCodec=b.manifestCodec,w.logger.log("parsed codec:"+t.codec+", rate:"+b.samplerate+", channels:"+b.channelCount)}}function f(t){return 1024*9e4/t}function i(t,c,y,v,_){var b=l(t,c),m=p(t,c);if(m-=b,m>0){var g=y+v*_;return{headerLength:b,frameLength:m,stamp:g}}}function n(t,c,y,v,_){var b=f(t.samplerate),m=i(c,y,v,_,b);if(m){var g=m.frameLength,E=m.headerLength,o=m.stamp,x=E+g,C=Math.max(0,y+x-c.length),A;C?(A=new Uint8Array(x-E),A.set(c.subarray(y+E,c.length),0)):A=c.subarray(y+E,y+x);var D={unit:A,pts:o};return C||t.samples.push(D),{sample:D,length:x,missing:C}}}},"./src/demux/base-audio-demuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"initPTSFn",function(){return p});var w=U("./src/polyfills/number.ts"),P=U("./src/demux/id3.ts"),S=U("./src/demux/dummy-demuxed-track.ts"),O=U("./src/utils/mp4-tools.ts"),T=U("./src/utils/typed-array.ts"),l=function(){function h(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var d=h.prototype;return d.resetInitSegment=function(u,s,f){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},d.resetTimeStamp=function(){},d.resetContiguity=function(){},d.canParse=function(u,s){return!1},d.appendFrame=function(u,s,f){},d.demux=function(u,s){this.cachedData&&(u=Object(O.appendUint8Array)(this.cachedData,u),this.cachedData=null);var f=P.getID3Data(u,0),i=f?f.length:0,n,t,c=this._audioTrack,y=this._id3Track,v=f?P.getTimeStamp(f):void 0,_=u.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=p(v,s)),f&&f.length>0&&y.samples.push({pts:this.initPTS,dts:this.initPTS,data:f}),t=this.initPTS;i<_;){if(this.canParse(u,i)){var b=this.appendFrame(c,u,i);b?(this.frameIndex++,t=b.sample.pts,i+=b.length,n=i):i=_}else P.canParse(u,i)?(f=P.getID3Data(u,i),y.samples.push({pts:t,dts:t,data:f}),i+=f.length,n=i):i++;if(i===_&&n!==_){var m=Object(T.sliceUint8)(u,n);this.cachedData?this.cachedData=Object(O.appendUint8Array)(this.cachedData,m):this.cachedData=m}}return{audioTrack:c,avcTrack:Object(S.dummyTrack)(),id3Track:y,textTrack:Object(S.dummyTrack)()}},d.demuxSampleAes=function(u,s,f){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},d.flush=function(u){var s=this.cachedData;return s&&(this.cachedData=null,this.demux(s,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},d.destroy=function(){},h}(),p=function(d,a){return Object(w.isFiniteNumber)(d)?d*90:a*9e4};Z.default=l},"./src/demux/chunk-cache.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function S(){this.chunks=[],this.dataLength=0}var O=S.prototype;return O.push=function(l){this.chunks.push(l),this.dataLength+=l.length},O.flush=function(){var l=this.chunks,p=this.dataLength,h;if(l.length)l.length===1?h=l[0]:h=P(l,p);else return new Uint8Array(0);return this.reset(),h},O.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function P(S,O){for(var T=new Uint8Array(O),l=0,p=0;pl?(this.word<<=l,this.bitsAvailable-=l):(l-=this.bitsAvailable,p=l>>3,l-=p>>3,this.bytesAvailable-=p,this.loadWord(),this.word<<=l,this.bitsAvailable-=l)},O.readBits=function(l){var p=Math.min(this.bitsAvailable,l),h=this.word>>>32-p;return l>32&&w.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=p,this.bitsAvailable>0?this.word<<=p:this.bytesAvailable>0&&this.loadWord(),p=l-p,p>0&&this.bitsAvailable?h<>>l)!==0)return this.word<<=l,this.bitsAvailable-=l,l;return this.loadWord(),l+this.skipLZ()},O.skipUEG=function(){this.skipBits(1+this.skipLZ())},O.skipEG=function(){this.skipBits(1+this.skipLZ())},O.readUEG=function(){var l=this.skipLZ();return this.readBits(l+1)-1},O.readEG=function(){var l=this.readUEG();return 1&l?1+l>>>1:-1*(l>>>1)},O.readBoolean=function(){return this.readBits(1)===1},O.readUByte=function(){return this.readBits(8)},O.readUShort=function(){return this.readBits(16)},O.readUInt=function(){return this.readBits(32)},O.skipScalingList=function(l){for(var p=8,h=8,d,a=0;a0?_.subarray(m,m+g):void 0},O=function(_,b){var m=0;return m=(_[b]&127)<<21,m|=(_[b+1]&127)<<14,m|=(_[b+2]&127)<<7,m|=_[b+3]&127,m},T=function(_,b){return w(_,b)&&O(_,b+6)+10<=_.length-b},l=function(_){for(var b=d(_),m=0;m>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:D+=String.fromCharCode(x);break;case 12:case 13:C=_[I++],D+=String.fromCharCode((x&31)<<6|C&63);break;case 14:C=_[I++],A=_[I++],D+=String.fromCharCode((x&15)<<12|(C&63)<<6|(A&63)<<0);break;default:}}return D},t={decodeTextFrame:s},c;function y(){return!c&&typeof self.TextDecoder!="undefined"&&(c=new self.TextDecoder("utf-8")),c}},"./src/demux/mp3demuxer.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/demux/base-audio-demuxer.ts"),P=U("./src/demux/id3.ts"),S=U("./src/utils/logger.ts"),O=U("./src/demux/mpegaudio.ts");function T(h,d){h.prototype=Object.create(d.prototype),h.prototype.constructor=h,l(h,d)}function l(h,d){return l=Object.setPrototypeOf||function(u,s){return u.__proto__=s,u},l(h,d)}var p=function(h){T(d,h);function d(){return h.apply(this,arguments)||this}var a=d.prototype;return a.resetInitSegment=function(s,f,i){h.prototype.resetInitSegment.call(this,s,f,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:s,duration:i,inputTimeScale:9e4,dropped:0}},d.probe=function(s){if(!s)return!1;for(var f=P.getID3Data(s,0)||[],i=f.length,n=s.length;i0},T.demux=function(p){var h=p,d=Object(P.dummyTrack)();if(this.config.progressive){this.remainderData&&(h=Object(w.appendUint8Array)(this.remainderData,p));var a=Object(w.segmentValidRange)(h);this.remainderData=a.remainder,d.samples=a.valid||new Uint8Array}else d.samples=h;return{audioTrack:Object(P.dummyTrack)(),avcTrack:d,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.flush=function(){var p=Object(P.dummyTrack)();return p.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(P.dummyTrack)(),avcTrack:p,id3Track:Object(P.dummyTrack)(),textTrack:Object(P.dummyTrack)()}},T.demuxSampleAes=function(p,h,d){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},T.destroy=function(){},O}();S.minProbeByteLength=1024,Z.default=S},"./src/demux/mpegaudio.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"appendFrame",function(){return l}),U.d(Z,"parseHeader",function(){return p}),U.d(Z,"isHeaderPattern",function(){return h}),U.d(Z,"isHeader",function(){return d}),U.d(Z,"canParse",function(){return a}),U.d(Z,"probe",function(){return u});var w=null,P=[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],S=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],O=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],T=[0,1,1,4];function l(s,f,i,n,t){if(i+24>f.length)return;var c=p(f,i);if(c&&i+c.frameLength<=f.length){var y=c.samplesPerFrame*9e4/c.sampleRate,v=n+t*y,_={unit:f.subarray(i,i+c.frameLength),pts:v,dts:v};return s.config=[],s.channelCount=c.channelCount,s.samplerate=c.sampleRate,s.samples.push(_),{sample:_,length:c.frameLength,missing:0}}}function p(s,f){var i=s[f+1]>>3&3,n=s[f+1]>>1&3,t=s[f+2]>>4&15,c=s[f+2]>>2&3;if(i!==1&&t!==0&&t!==15&&c!==3){var y=s[f+2]>>1&1,v=s[f+3]>>6,_=i===3?3-n:n===3?3:4,b=P[_*14+t-1]*1e3,m=i===3?0:i===2?1:2,g=S[m*3+c],E=v===3?1:2,o=O[i][n],x=T[n],C=o*8*x,A=Math.floor(o*b/g+y)*x;if(w===null){var D=navigator.userAgent||"",I=D.match(/Chrome\/(\d+)/i);w=I?parseInt(I[1]):0}var F=!!w&&w<=87;return F&&n===2&&b>=224e3&&v===0&&(s[f+3]=s[f+3]|128),{sampleRate:g,channelCount:E,frameLength:A,samplesPerFrame:C}}}function h(s,f){return s[f]===255&&(s[f+1]&224)===224&&(s[f+1]&6)!==0}function d(s,f){return f+1=p.length){d();return}if(p[h].unit.length<32)continue;var a=this.decrypter.isSync();if(this.decryptAacSample(p,h,d,a),!a)return}},T.getAvcEncryptedData=function(p){for(var h=Math.floor((p.length-48)/160)*16+16,d=new Int8Array(h),a=0,u=32;u<=p.length-16;u+=160,a+=16)d.set(p.subarray(u,u+16),a);return d},T.getAvcDecryptedUnit=function(p,h){for(var d=new Uint8Array(h),a=0,u=32;u<=p.length-16;u+=160,a+=16)p.set(d.subarray(a,a+16),u);return p},T.decryptAvcSample=function(p,h,d,a,u,s){var f=Object(P.discardEPB)(u.data),i=this.getAvcEncryptedData(f),n=this;this.decryptBuffer(i.buffer,function(t){u.data=n.getAvcDecryptedUnit(f,t),s||n.decryptAvcSamples(p,h,d+1,a)})},T.decryptAvcSamples=function(p,h,d,a){if(p instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;h++,d=0){if(h>=p.length){a();return}for(var u=p[h].units;!(d>=u.length);d++){var s=u[d];if(s.data.length<=48||s.type!==1&&s.type!==5)continue;var f=this.decrypter.isSync();if(this.decryptAvcSample(p,h,d,a,s,f),!f)return}}},O}();Z.default=S},"./src/demux/transmuxer-interface.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return u});var w=U("./node_modules/webworkify-webpack/index.js"),P=U.n(w),S=U("./src/events.ts"),O=U("./src/demux/transmuxer.ts"),T=U("./src/utils/logger.ts"),l=U("./src/errors.ts"),p=U("./src/utils/mediasource-helper.ts"),h=U("./node_modules/eventemitter3/index.js"),d=U.n(h),a=Object(p.getMediaSource)()||{isTypeSupported:function(){return!1}},u=function(){function s(i,n,t,c){var y=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=i,this.id=n,this.onTransmuxComplete=t,this.onFlush=c;var v=i.config,_=function(o,x){x=x||{},x.frag=y.frag,x.id=y.id,i.trigger(o,x)};this.observer=new h.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,_),this.observer.on(S.Events.ERROR,_);var b={mp4:a.isTypeSupported("video/mp4"),mpeg:a.isTypeSupported("audio/mpeg"),mp3:a.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(v.enableWorker&&typeof Worker!="undefined"){T.logger.log("demuxing in webworker");var g;try{g=this.worker=w("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(E){i.trigger(S.Events.ERROR,{type:l.ErrorTypes.OTHER_ERROR,details:l.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(E.message+" ("+E.filename+":"+E.lineno+")")})},g.postMessage({cmd:"init",typeSupported:b,vendor:m,id:n,config:JSON.stringify(v)})}catch(E){T.logger.warn("Error in worker:",E),T.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new O.default(this.observer,b,v,m,n),this.worker=null}}else this.transmuxer=new O.default(this.observer,b,v,m,n)}var f=s.prototype;return f.destroy=function(){var n=this.worker;if(n)n.removeEventListener("message",this.onwmsg),n.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var c=this.observer;c&&c.removeAllListeners(),this.observer=null},f.push=function(n,t,c,y,v,_,b,m,g,E){var o=this;g.transmuxing.start=self.performance.now();var x=this.transmuxer,C=this.worker,A=_?_.start:v.start,D=v.decryptdata,I=this.frag,F=!(I&&v.cc===I.cc),H=!(I&&g.level===I.level),te=I?g.sn-I.sn:-1,j=this.part?g.part-this.part.index:1,G=!H&&(te===1||te===0&&j===1),X=self.performance.now();(H||te||v.stats.parsing.start===0)&&(v.stats.parsing.start=X),_&&(j||!G)&&(_.stats.parsing.start=X);var J=new O.TransmuxState(F,G,m,H,A);if(!G||F){T.logger.log("[transmuxer-interface, "+v.type+"]: Starting new transmux session for sn: "+g.sn+" p: "+g.part+" level: "+g.level+" id: "+g.id+` discontinuity: `+F+` trackSwitch: `+H+` contiguous: `+G+` accurateTimeOffset: `+m+` timeOffset: `+A);var B=new O.TransmuxConfig(c,y,t,b,E);this.configureTransmuxer(B)}if(this.frag=v,this.part=_,C)C.postMessage({cmd:"demux",data:n,decryptdata:D,chunkMeta:g,state:J},n instanceof ArrayBuffer?[n]:[]);else if(x){var Q=x.push(n,D,g,J);Object(O.isPromise)(Q)?Q.then(function(ie){o.handleTransmuxComplete(ie)}):this.handleTransmuxComplete(Q)}},f.flush=function(n){var t=this;n.transmuxing.start=self.performance.now();var c=this.transmuxer,y=this.worker;if(y)y.postMessage({cmd:"flush",chunkMeta:n});else if(c){var v=c.flush(n);Object(O.isPromise)(v)?v.then(function(_){t.handleFlushResult(_,n)}):this.handleFlushResult(v,n)}},f.handleFlushResult=function(n,t){var c=this;n.forEach(function(y){c.handleTransmuxComplete(y)}),this.onFlush(t)},f.onWorkerMessage=function(n){var t=n.data,c=this.hls;switch(t.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,c.trigger(t.event,t.data);break}}},f.configureTransmuxer=function(n){var t=this.worker,c=this.transmuxer;t?t.postMessage({cmd:"configure",config:n}):c&&c.configure(n)},f.handleTransmuxComplete=function(n){n.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(n)},s}()},"./src/demux/transmuxer-worker.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return l});var w=U("./src/demux/transmuxer.ts"),P=U("./src/events.ts"),S=U("./src/utils/logger.ts"),O=U("./node_modules/eventemitter3/index.js"),T=U.n(O);function l(u){var s=new O.EventEmitter,f=function(n,t){u.postMessage({event:n,data:t})};s.on(P.Events.FRAG_DECRYPTED,f),s.on(P.Events.ERROR,f),u.addEventListener("message",function(i){var n=i.data;switch(n.cmd){case"init":{var t=JSON.parse(n.config);u.transmuxer=new w.default(s,n.typeSupported,t,n.vendor,n.id),Object(S.enableLogs)(t.debug),f("init",null);break}case"configure":{u.transmuxer.configure(n.config);break}case"demux":{var c=u.transmuxer.push(n.data,n.decryptdata,n.chunkMeta,n.state);Object(w.isPromise)(c)?c.then(function(_){p(u,_)}):p(u,c);break}case"flush":{var y=n.chunkMeta,v=u.transmuxer.flush(y);Object(w.isPromise)(v)?v.then(function(_){d(u,_,y)}):d(u,v,y);break}default:break}})}function p(u,s){if(a(s.remuxResult))return;var f=[],i=s.remuxResult,n=i.audio,t=i.video;n&&h(f,n),t&&h(f,t),u.postMessage({event:"transmuxComplete",data:s},f)}function h(u,s){s.data1&&u.push(s.data1.buffer),s.data2&&u.push(s.data2.buffer)}function d(u,s,f){s.forEach(function(i){p(u,i)}),u.postMessage({event:"flush",data:f})}function a(u){return!u.audio&&!u.video&&!u.text&&!u.id3&&!u.initSegment}},"./src/demux/transmuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return t}),U.d(Z,"isPromise",function(){return v}),U.d(Z,"TransmuxConfig",function(){return _}),U.d(Z,"TransmuxState",function(){return b});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/crypt/decrypter.ts"),O=U("./src/demux/aacdemuxer.ts"),T=U("./src/demux/mp4demuxer.ts"),l=U("./src/demux/tsdemuxer.ts"),p=U("./src/demux/mp3demuxer.ts"),h=U("./src/remux/mp4-remuxer.ts"),d=U("./src/remux/passthrough-remuxer.ts"),a=U("./src/demux/chunk-cache.ts"),u=U("./src/utils/mp4-tools.ts"),s=U("./src/utils/logger.ts"),f;try{f=self.performance.now.bind(self.performance)}catch(m){s.logger.debug("Unable to use Performance API on this environment"),f=self.Date.now}var i=[{demux:l.default,remux:h.default},{demux:T.default,remux:d.default},{demux:O.default,remux:h.default},{demux:p.default,remux:h.default}],n=1024;i.forEach(function(m){var g=m.demux;n=Math.max(n,g.minProbeByteLength)});var t=function(){function m(E,o,x,C,A){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=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.cache=new a.default,this.observer=E,this.typeSupported=o,this.config=x,this.vendor=C,this.id=A}var g=m.prototype;return g.configure=function(o){this.transmuxConfig=o,this.decrypter&&this.decrypter.reset()},g.push=function(o,x,C,A){var D=this,I=C.transmuxing;I.executeStart=f();var F=new Uint8Array(o),H=this.cache,te=this.config,j=this.currentTransmuxState,G=this.transmuxConfig;A&&(this.currentTransmuxState=A);var X=c(F,x);if(X&&X.method==="AES-128"){var J=this.getDecrypter();if(te.enableSoftwareAES){var B=J.softwareDecrypt(F,X.key.buffer,X.iv.buffer);if(!B)return I.executeEnd=f(),y(C);F=new Uint8Array(B)}else return this.decryptionPromise=J.webCryptoDecrypt(F,X.key.buffer,X.iv.buffer).then(function(Ie){var Ue=D.push(Ie,null,C);return D.decryptionPromise=null,Ue}),this.decryptionPromise}var Q=A||j,ie=Q.contiguous,oe=Q.discontinuity,Ee=Q.trackSwitch,ye=Q.accurateTimeOffset,Le=Q.timeOffset,pe=G.audioCodec,Ce=G.videoCodec,Be=G.defaultInitPts,Pe=G.duration,ke=G.initSegmentData;if((oe||Ee)&&this.resetInitSegment(ke,pe,Ce,Pe),oe&&this.resetInitialTimestamp(Be),ie||this.resetContiguity(),this.needsProbing(F,oe,Ee)){if(H.dataLength){var Ne=H.flush();F=Object(u.appendUint8Array)(Ne,F)}this.configureTransmuxer(F,G)}var he=this.transmux(F,X,Le,ye,C),ue=this.currentTransmuxState;return ue.contiguous=!0,ue.discontinuity=!1,ue.trackSwitch=!1,I.executeEnd=f(),he},g.flush=function(o){var x=this,C=o.transmuxing;C.executeStart=f();var A=this.decrypter,D=this.cache,I=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return x.flush(o)});var H=[],te=I.timeOffset;if(A){var j=A.flush();j&&H.push(this.push(j,null,o))}var G=D.dataLength;D.reset();var X=this.demuxer,J=this.remuxer;if(!X||!J)return G>=n&&this.observer.emit(w.Events.ERROR,w.Events.ERROR,{type:P.ErrorTypes.MEDIA_ERROR,details:P.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),C.executeEnd=f(),[y(o)];var B=X.flush(te);return v(B)?B.then(function(Q){return x.flushRemux(H,Q,o),H}):(this.flushRemux(H,B,o),H)},g.flushRemux=function(o,x,C){var A=x.audioTrack,D=x.avcTrack,I=x.id3Track,F=x.textTrack,H=this.currentTransmuxState,te=H.accurateTimeOffset,j=H.timeOffset;s.logger.log("[transmuxer.ts]: Flushed fragment "+C.sn+(C.part>-1?" p: "+C.part:"")+" of level "+C.level);var G=this.remuxer.remux(A,D,I,F,j,te,!0,this.id);o.push({remuxResult:G,chunkMeta:C}),C.transmuxing.executeEnd=f()},g.resetInitialTimestamp=function(o){var x=this.demuxer,C=this.remuxer;if(!x||!C)return;x.resetTimeStamp(o),C.resetTimeStamp(o)},g.resetContiguity=function(){var o=this.demuxer,x=this.remuxer;if(!o||!x)return;o.resetContiguity(),x.resetNextTimestamp()},g.resetInitSegment=function(o,x,C,A){var D=this.demuxer,I=this.remuxer;if(!D||!I)return;D.resetInitSegment(x,C,A),I.resetInitSegment(o,x,C)},g.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},g.transmux=function(o,x,C,A,D){var I;return x&&x.method==="SAMPLE-AES"?I=this.transmuxSampleAes(o,x,C,A,D):I=this.transmuxUnencrypted(o,C,A,D),I},g.transmuxUnencrypted=function(o,x,C,A){var D=this.demuxer.demux(o,x,!1,!this.config.progressive),I=D.audioTrack,F=D.avcTrack,H=D.id3Track,te=D.textTrack,j=this.remuxer.remux(I,F,H,te,x,C,!1,this.id);return{remuxResult:j,chunkMeta:A}},g.transmuxSampleAes=function(o,x,C,A,D){var I=this;return this.demuxer.demuxSampleAes(o,x,C).then(function(F){var H=I.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,C,A,!1,I.id);return{remuxResult:H,chunkMeta:D}})},g.configureTransmuxer=function(o,x){for(var C=this.config,A=this.observer,D=this.typeSupported,I=this.vendor,F=x.audioCodec,H=x.defaultInitPts,te=x.duration,j=x.initSegmentData,G=x.videoCodec,X,J=0,B=i.length;J0&&g!=null&&g.key!=null&&g.iv!==null&&g.method!=null&&(E=g),E}var y=function(g){return{remuxResult:{},chunkMeta:g}};function v(m){return"then"in m&&m.then instanceof Function}var _=function(g,E,o,x,C){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=g,this.videoCodec=E,this.initSegmentData=o,this.duration=x,this.defaultInitPts=C},b=function(g,E,o,x,C){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=g,this.contiguous=E,this.accurateTimeOffset=o,this.trackSwitch=x,this.timeOffset=C}},"./src/demux/tsdemuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"discardEPB",function(){return y});var w=U("./src/demux/adts.ts"),P=U("./src/demux/mpegaudio.ts"),S=U("./src/demux/exp-golomb.ts"),O=U("./src/demux/id3.ts"),T=U("./src/demux/sample-aes.ts"),l=U("./src/events.ts"),p=U("./src/utils/mp4-tools.ts"),h=U("./src/utils/logger.ts"),d=U("./src/errors.ts"),a={video:1,audio:2,id3:3,text:4},u=function(){function v(b,m,g){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._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=b,this.config=m,this.typeSupported=g}v.probe=function(m){var g=v.syncOffset(m);return g<0?!1:(g&&h.logger.warn("MPEG2-TS detected but first sync word found @ offset "+g+", junk ahead ?"),!0)},v.syncOffset=function(m){for(var g=Math.min(1e3,m.length-3*188),E=0;E>4,pe=void 0;if(Le>1){if(pe=oe+5+m[oe+4],pe===oe+188)continue}else pe=oe+4;switch(ye){case I:Ee&&(F&&(x=n(F))&&this.parseAVCPES(x,!1),F={data:[],size:0}),F&&(F.data.push(m.subarray(pe,oe+188)),F.size+=oe+188-pe);break;case H:Ee&&(j&&(x=n(j))&&(A.isAAC?this.parseAACPES(x):this.parseMPEGPES(x)),j={data:[],size:0}),j&&(j.data.push(m.subarray(pe,oe+188)),j.size+=oe+188-pe);break;case te:Ee&&(G&&(x=n(G))&&this.parseID3PES(x),G={data:[],size:0}),G&&(G.data.push(m.subarray(pe,oe+188)),G.size+=oe+188-pe);break;case 0:Ee&&(pe+=m[pe]+1),B=this._pmtId=f(m,pe);break;case B:{Ee&&(pe+=m[pe]+1);var Ce=i(m,pe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,E);I=Ce.avc,I>0&&(C.pid=I),H=Ce.audio,H>0&&(A.pid=H,A.isAAC=Ce.isAAC),te=Ce.id3,te>0&&(D.pid=te),X&&!J&&(h.logger.log("reparse from beginning"),X=!1,oe=ie-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=!0;break}}else this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});C.pesData=F,A.pesData=j,D.pesData=G;var Be={audioTrack:A,avcTrack:C,id3Track:D,textTrack:this._txtTrack};return o&&this.extractRemainingSamples(Be),Be},_.flush=function(){var m=this.remainderData;this.remainderData=null;var g;return m?g=this.demux(m,-1,!1,!0):g={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(g),this.sampleAes?this.decrypt(g,this.sampleAes):g},_.extractRemainingSamples=function(m){var g=m.audioTrack,E=m.avcTrack,o=m.id3Track,x=E.pesData,C=g.pesData,A=o.pesData,D;x&&(D=n(x))?(this.parseAVCPES(D,!0),E.pesData=null):E.pesData=x,C&&(D=n(C))?(g.isAAC?this.parseAACPES(D):this.parseMPEGPES(D),g.pesData=null):(C!=null&&C.size&&h.logger.log("last AAC PES packet truncated,might overlap between fragments"),g.pesData=C),A&&(D=n(A))?(this.parseID3PES(D),o.pesData=null):o.pesData=A},_.demuxSampleAes=function(m,g,E){var o=this.demux(m,E,!0,!this.config.progressive),x=this.sampleAes=new T.default(this.observer,this.config,g);return this.decrypt(o,x)},_.decrypt=function(m,g){return new Promise(function(E){var o=m.audioTrack,x=m.avcTrack;o.samples&&o.isAAC?g.decryptAacSamples(o.samples,0,function(){x.samples?g.decryptAvcSamples(x.samples,0,0,function(){E(m)}):E(m)}):x.samples&&g.decryptAvcSamples(x.samples,0,0,function(){E(m)})})},_.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},_.parseAVCPES=function(m,g){var E=this,o=this._avcTrack,x=this.parseAVCNALu(m.data),C=!1,A=this.avcSample,D,I=!1;m.data=null,A&&x.length&&!o.audFound&&(t(A,o),A=this.avcSample=s(!1,m.pts,m.dts,"")),x.forEach(function(F){switch(F.type){case 1:{D=!0,A||(A=E.avcSample=s(!0,m.pts,m.dts,"")),C&&(A.debug+="NDR "),A.frame=!0;var H=F.data;if(I&&H.length>4){var te=new S.default(H).readSliceType();(te===2||te===4||te===7||te===9)&&(A.key=!0)}break}case 5:D=!0,A||(A=E.avcSample=s(!0,m.pts,m.dts,"")),C&&(A.debug+="IDR "),A.key=!0,A.frame=!0;break;case 6:{D=!0,C&&A&&(A.debug+="SEI ");var j=new S.default(y(F.data));j.readUByte();for(var G=0,X=0,J=!1,B=0;!J&&j.bytesAvailable>1;){G=0;do B=j.readUByte(),G+=B;while(B===255);X=0;do B=j.readUByte(),X+=B;while(B===255);if(G===4&&j.bytesAvailable!==0){J=!0;var Q=j.readUByte();if(Q===181){var ie=j.readUShort();if(ie===49){var oe=j.readUInt();if(oe===1195456820){var Ee=j.readUByte();if(Ee===3){for(var ye=j.readUByte(),Le=j.readUByte(),pe=31&ye,Ce=[ye,Le],Be=0;Be16){for(var Pe=[],ke=0;ke<16;ke++)Pe.push(j.readUByte().toString(16)),(ke===3||ke===5||ke===7||ke===9)&&Pe.push("-");for(var Ne=X-16,he=new Uint8Array(Ne),ue=0;ue=0){var j={data:m.subarray(H,A-o-1),type:te};C.push(j)}else{var G=this.getLastNalUnit();if(G&&(x&&A<=4-x&&(G.state&&(G.data=G.data.subarray(0,G.data.byteLength-x))),I=A-o-1,I>0)){var X=new Uint8Array(G.data.byteLength+I);X.set(G.data,0),X.set(m.subarray(0,I),G.data.byteLength),G.data=X,G.state=0}}A=0&&o>=0){var J={data:m.subarray(H,g),type:te,state:o};C.push(J)}if(C.length===0){var B=this.getLastNalUnit();if(B){var Q=new Uint8Array(B.data.byteLength+m.byteLength);Q.set(B.data,0),Q.set(m,B.data.byteLength),B.data=Q}}return E.naluState=o,C},_.parseAACPES=function(m){var g=0,E=this._audioTrack,o=this.aacOverFlow,x=m.data;if(o){this.aacOverFlow=null;var C=o.sample.unit.byteLength,A=Math.min(o.missing,C),D=C-A;o.sample.unit.set(x.subarray(0,A),D),E.samples.push(o.sample),g=o.missing}var I,F;for(I=g,F=x.length;I1;){var C=new Uint8Array(x[0].length+x[1].length);C.set(x[0]),C.set(x[1],x[0].length),x[0]=C,x.splice(1,1)}b=x[0];var A=(b[0]<<16)+(b[1]<<8)+b[2];if(A===1){if(m=(b[4]<<8)+b[5],m&&m>v.size-6)return null;var D=b[7];D&192&&(E=(b[9]&14)*536870912+(b[10]&255)*4194304+(b[11]&254)*16384+(b[12]&255)*128+(b[13]&254)/2,D&64?(o=(b[14]&14)*536870912+(b[15]&255)*4194304+(b[16]&254)*16384+(b[17]&255)*128+(b[18]&254)/2,E-o>60*9e4&&(h.logger.warn(Math.round((E-o)/9e4)+"s delta between PTS and DTS, align them"),E=o)):o=E),g=b[8];var I=g+9;if(v.size<=I)return null;v.size-=I;for(var F=new Uint8Array(v.size),H=0,te=x.length;Hj){I-=j;continue}else b=b.subarray(I),j-=I,I=0;F.set(b,_),_+=j}return m&&(m-=g+3),{data:F,pts:E,dts:o,len:m}}return null}function t(v,_){if(v.units.length&&v.frame){if(v.pts===void 0){var b=_.samples,m=b.length;if(m){var g=b[m-1];v.pts=g.pts,v.dts=g.dts}else{_.dropped++;return}}_.samples.push(v)}v.debug.length&&h.logger.log(v.pts+"/"+v.dts+":"+v.debug)}function c(v,_){var b=v.length;if(b>0){if(_.pts>=v[b-1].pts)v.push(_);else for(var m=b-1;m>=0;m--)if(_.ptsE)return x;return 0}},{key:"maxAutoLevel",get:function(){var g=this.levels,E=this.autoLevelCapping,o;return E===-1&&g&&g.length?o=g.length-1:o=E,o}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(g){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,g)}},{key:"audioTracks",get:function(){var g=this.audioTrackController;return g?g.audioTracks:[]}},{key:"audioTrack",get:function(){var g=this.audioTrackController;return g?g.audioTrack:-1},set:function(g){var E=this.audioTrackController;E&&(E.audioTrack=g)}},{key:"subtitleTracks",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var g=this.subtitleTrackController;return g?g.subtitleTrack:-1},set:function(g){var E=this.subtitleTrackController;E&&(E.subtitleTrack=g)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var g=this.subtitleTrackController;return g?g.subtitleDisplay:!1},set:function(g){var E=this.subtitleTrackController;E&&(E.subtitleDisplay=g)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(g){this.config.lowLatencyMode=g}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return n.Events}},{key:"ErrorTypes",get:function(){return t.ErrorTypes}},{key:"ErrorDetails",get:function(){return t.ErrorDetails}},{key:"DefaultConfig",get:function(){return _.defaultConfig?_.defaultConfig:s.hlsDefaultConfig},set:function(g){_.defaultConfig=g}}]),_}();v.defaultConfig=void 0},"./src/is-supported.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isSupported",function(){return S}),U.d(Z,"changeTypeSupported",function(){return O});var w=U("./src/utils/mediasource-helper.ts");function P(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var T=Object(w.getMediaSource)();if(!T)return!1;var l=P(),p=T&&typeof T.isTypeSupported=="function"&&T.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),h=!l||l.prototype&&typeof l.prototype.appendBuffer=="function"&&typeof l.prototype.remove=="function";return!!p&&!!h}function O(){var T,l=P();return typeof(l==null||((T=l.prototype)===null||T===void 0)?void 0:T.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return u}),U.d(Z,"LoadError",function(){return f});var w=U("./src/polyfills/number.ts"),P=U("./src/errors.ts");function S(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,h(i,n)}function O(i){var n=typeof Map=="function"?new Map:void 0;return O=function(c){if(c===null||!p(c))return c;if(typeof c!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(c))return n.get(c);n.set(c,y)}function y(){return T(c,arguments,d(this).constructor)}return y.prototype=Object.create(c.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),h(y,c)},O(i)}function T(i,n,t){return l()?T=Reflect.construct:T=function(y,v,_){var b=[null];b.push.apply(b,v);var m=Function.bind.apply(y,b),g=new m;return _&&h(g,_.prototype),g},T.apply(null,arguments)}function l(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(i){return!1}}function p(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function h(i,n){return h=Object.setPrototypeOf||function(c,y){return c.__proto__=y,c},h(i,n)}function d(i){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(i)}var a=Math.pow(2,17),u=function(){function i(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var n=i.prototype;return n.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},n.abort=function(){this.loader&&this.loader.abort()},n.load=function(c,y){var v=this,_=c.url;if(!_)return Promise.reject(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,networkDetails:null},"Fragment does not have a "+(_?"part list":"url")));this.abort();var b=this.config,m=b.fLoader,g=b.loader;return new Promise(function(E,o){v.loader&&v.loader.destroy();var x=v.loader=c.loader=m?new m(b):new g(b),C=s(c),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:a};c.stats=x.stats,x.load(C,A,{onSuccess:function(I,F,H,te){v.resetLoader(c,x),E({frag:c,part:null,payload:I.data,networkDetails:te})},onError:function(I,F,H){v.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,response:I,networkDetails:H}))},onAbort:function(I,F,H){v.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,networkDetails:H}))},onTimeout:function(I,F,H){v.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,networkDetails:H}))},onProgress:function(I,F,H,te){y&&y({frag:c,part:null,payload:H,networkDetails:te})}})})},n.loadPart=function(c,y,v){var _=this;this.abort();var b=this.config,m=b.fLoader,g=b.loader;return new Promise(function(E,o){_.loader&&_.loader.destroy();var x=_.loader=c.loader=m?new m(b):new g(b),C=s(c,y),A={timeout:b.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:b.fragLoadingMaxRetryTimeout,highWaterMark:a};y.stats=x.stats,x.load(C,A,{onSuccess:function(I,F,H,te){_.resetLoader(c,x),_.updateStatsFromPart(c,y);var j={frag:c,part:y,payload:I.data,networkDetails:te};v(j),E(j)},onError:function(I,F,H){_.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:c,part:y,response:I,networkDetails:H}))},onAbort:function(I,F,H){c.stats.aborted=y.stats.aborted,_.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:c,part:y,networkDetails:H}))},onTimeout:function(I,F,H){_.resetLoader(c,x),o(new f({type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:c,part:y,networkDetails:H}))}})})},n.updateStatsFromPart=function(c,y){var v=c.stats,_=y.stats,b=_.total;if(v.loaded+=_.loaded,b){var m=Math.round(c.duration/y.duration),g=Math.min(Math.round(v.loaded/b),m),E=m-g,o=E*Math.round(v.loaded/g);v.total=v.loaded+o}else v.total=Math.max(v.loaded,v.total);var x=v.loading,C=_.loading;x.start?x.first+=C.first-C.start:(x.start=C.start,x.first=C.first),x.end=C.end},n.resetLoader=function(c,y){c.loader=null,this.loader===y&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),y.destroy()},i}();function s(i,n){n===void 0&&(n=null);var t=n||i,c={frag:i,part:n,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},y=t.byteRangeStartOffset,v=t.byteRangeEndOffset;return Object(w.isFiniteNumber)(y)&&Object(w.isFiniteNumber)(v)&&(c.rangeStart=y,c.rangeEnd=v),c}var f=function(i){S(n,i);function n(t){for(var c,y=arguments.length,v=new Array(y>1?y-1:0),_=1;_>8*(15-b)&255;return _},c.setDecryptDataFromLevelKey=function(v,_){var b=v;return(v==null?void 0:v.method)==="AES-128"&&v.uri&&!v.iv&&(b=T.LevelKey.fromURI(v.uri),b.method=v.method,b.iv=this.createInitializationVector(_),b.keyFormat="identity"),b},c.setElementaryStreamInfo=function(v,_,b,m,g,E){E===void 0&&(E=!1);var o=this.elementaryStreams,x=o[v];if(!x){o[v]={startPTS:_,endPTS:b,startDTS:m,endDTS:g,partial:E};return}x.startPTS=Math.min(x.startPTS,_),x.endPTS=Math.max(x.endPTS,b),x.startDTS=Math.min(x.startDTS,m),x.endDTS=Math.max(x.endDTS,g)},c.clearElementaryStreamInfo=function(){var v=this.elementaryStreams;v[u.AUDIO]=null,v[u.VIDEO]=null,v[u.AUDIOVIDEO]=null},a(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var v=this.sn;typeof v!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&O.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),v=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,v)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(w.isFiniteNumber)(this.programDateTime))return null;var v=Object(w.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+v*1e3}},{key:"encrypted",get:function(){var v;return!!((v=this.decryptdata)!==null&&v!==void 0&&v.keyFormat&&this.decryptdata.uri)}}]),t}(s),i=function(n){p(t,n);function t(c,y,v,_,b){var m;m=n.call(this,v)||this,m.fragOffset=0,m.duration=0,m.gap=!1,m.independent=!1,m.relurl=void 0,m.fragment=void 0,m.index=void 0,m.stats=new l.LoadStats,m.duration=c.decimalFloatingPoint("DURATION"),m.gap=c.bool("GAP"),m.independent=c.bool("INDEPENDENT"),m.relurl=c.enumeratedString("URI"),m.fragment=y,m.index=_;var g=c.enumeratedString("BYTERANGE");return g&&m.setByteRange(g,b),b&&(m.fragOffset=b.fragOffset+b.duration),m}return a(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var y=this.elementaryStreams;return!!(y.audio||y.video||y.audiovideo)}}]),t}(s)},"./src/loader/key-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return O});var w=U("./src/events.ts"),P=U("./src/errors.ts"),S=U("./src/utils/logger.ts"),O=function(){function T(p){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=p,this._registerListeners()}var l=T.prototype;return l._registerListeners=function(){this.hls.on(w.Events.KEY_LOADING,this.onKeyLoading,this)},l._unregisterListeners=function(){this.hls.off(w.Events.KEY_LOADING,this.onKeyLoading)},l.destroy=function(){this._unregisterListeners();for(var h in this.loaders){var d=this.loaders[h];d&&d.destroy()}this.loaders={}},l.onKeyLoading=function(h,d){var a=d.frag,u=a.type,s=this.loaders[u];if(!a.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var f=a.decryptdata.uri;if(f!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(s&&(S.logger.warn("abort previous key loader for type:"+u),s.abort()),!f){S.logger.warn("key uri is falsy");return}var n=i.loader,t=a.loader=this.loaders[u]=new n(i);this.decrypturl=f,this.decryptkey=null;var c={url:f,frag:a,responseType:"arraybuffer"},y={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.load(c,y,v)}else this.decryptkey&&(a.decryptdata.key=this.decryptkey,this.hls.trigger(w.Events.KEY_LOADED,{frag:a}))},l.loadsuccess=function(h,d,a){var u=a.frag;if(!u.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=u.decryptdata.key=new Uint8Array(h.data),u.loader=null,delete this.loaders[u.type],this.hls.trigger(w.Events.KEY_LOADED,{frag:u})},l.loaderror=function(h,d){var a=d.frag,u=a.loader;u&&u.abort(),delete this.loaders[a.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:a,response:h})},l.loadtimeout=function(h,d){var a=d.frag,u=a.loader;u&&u.abort(),delete this.loaders[a.type],this.hls.trigger(w.Events.ERROR,{type:P.ErrorTypes.NETWORK_ERROR,details:P.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:a})},T}()},"./src/loader/level-details.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"LevelDetails",function(){return T});var w=U("./src/polyfills/number.ts");function P(l,p){for(var h=0;hd.endSN||a>0||a===0&&u>0,this.updated||this.advanced?this.misses=Math.floor(d.misses*.6):this.misses=d.misses+1,this.availabilityDelay=d.availabilityDelay},S(l,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(w.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||O}},{key:"drift",get:function(){var d=this.driftEndTime-this.driftStartTime;if(d>0){var a=this.driftEnd-this.driftStart;return a*1e3/d}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var d;return(d=this.fragments)!==null&&d!==void 0&&d.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var d;return(d=this.partList)!==null&&d!==void 0&&d.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),l}()},"./src/loader/level-key.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"LevelKey",function(){return T});var w=U("./node_modules/url-toolkit/src/url-toolkit.js"),P=U.n(w);function S(l,p){for(var h=0;h2){var o=E.shift()+".";return o+=parseInt(E.shift()).toString(16),o+=("000"+parseInt(E.shift()).toString(16)).substr(-4),o}return g},b.resolve=function(g,E){return P.buildAbsoluteURL(E,g,{alwaysNormalize:!0})},b.parseMasterPlaylist=function(g,E){var o=[],x={},C=!1;a.lastIndex=0;for(var A;(A=a.exec(g))!=null;)if(A[1]){var D=new p.AttrList(A[1]),I={attrs:D,bitrate:D.decimalInteger("AVERAGE-BANDWIDTH")||D.decimalInteger("BANDWIDTH"),name:D.NAME,url:b.resolve(A[2],E)},F=D.decimalResolution("RESOLUTION");F&&(I.width=F.width,I.height=F.height),c((D.CODECS||"").split(/[ ,]+/).filter(function(te){return te}),I),I.videoCodec&&I.videoCodec.indexOf("avc1")!==-1&&(I.videoCodec=b.convertAVC1ToAVCOTI(I.videoCodec)),o.push(I)}else if(A[3]){var H=new p.AttrList(A[3]);H["DATA-ID"]&&(C=!0,x[H["DATA-ID"]]=H)}return{levels:o,sessionData:C?x:null}},b.parseMasterPlaylistMedia=function(g,E,o,x){x===void 0&&(x=[]);var C,A=[],D=0;for(u.lastIndex=0;(C=u.exec(g))!==null;){var I=new p.AttrList(C[1]);if(I.TYPE===o){var F={attrs:I,bitrate:0,id:D++,groupId:I["GROUP-ID"],instreamId:I["INSTREAM-ID"],name:I.NAME||I.LANGUAGE||"",type:o,default:I.bool("DEFAULT"),autoselect:I.bool("AUTOSELECT"),forced:I.bool("FORCED"),lang:I.LANGUAGE,url:I.URI?b.resolve(I.URI,E):""};if(x.length){var H=b.findGroup(x,F.groupId)||x[0];y(F,H,"audioCodec"),y(F,H,"textCodec")}A.push(F)}}return A},b.parseLevelPlaylist=function(g,E,o,x,C){var A=new T.LevelDetails(E),D=A.fragments,I=null,F=0,H=0,te=0,j=0,G=null,X=new O.Fragment(x,E),J,B,Q,ie=-1,oe=!1;for(s.lastIndex=0,A.m3u8=g;(J=s.exec(g))!==null;){oe&&(oe=!1,X=new O.Fragment(x,E),X.start=te,X.sn=F,X.cc=j,X.level=o,I&&(X.initSegment=I,X.rawProgramDateTime=I.rawProgramDateTime));var Ee=J[1];if(Ee){X.duration=parseFloat(Ee);var ye=(" "+J[2]).slice(1);X.title=ye||null,X.tagList.push(ye?["INF",Ee,ye]:["INF",Ee])}else if(J[3])Object(w.isFiniteNumber)(X.duration)&&(X.start=te,Q&&(X.levelkey=Q),X.sn=F,X.level=o,X.cc=j,X.urlId=C,D.push(X),X.relurl=(" "+J[3]).slice(1),_(X,G),G=X,te+=X.duration,F++,H=0,oe=!0);else if(J[4]){var Le=(" "+J[4]).slice(1);G?X.setByteRange(Le,G):X.setByteRange(Le)}else if(J[5])X.rawProgramDateTime=(" "+J[5]).slice(1),X.tagList.push(["PROGRAM-DATE-TIME",X.rawProgramDateTime]),ie===-1&&(ie=D.length);else{if(J=J[0].match(f),!J){h.logger.warn("No matches on slow regex match for level playlist!");continue}for(B=1;B-1){h.logger.warn("Keyformat "+$+" is not supported from the manifest");continue}else if($!=="identity")continue;Ue&&(Q=l.LevelKey.fromURL(E,Ye),Ye&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Ue)>=0&&(Q.method=Ue,Q.keyFormat=$,N&&(Q.keyID=N),M&&(Q.keyFormatVersions=M),Q.iv=ee));break}case"START":{var Y=new p.AttrList(Ce),me=Y.decimalFloatingPoint("TIME-OFFSET");Object(w.isFiniteNumber)(me)&&(A.startTimeOffset=me);break}case"MAP":{var Re=new p.AttrList(Ce);X.relurl=Re.URI,Re.BYTERANGE&&X.setByteRange(Re.BYTERANGE),X.level=o,X.sn="initSegment",Q&&(X.levelkey=Q),X.initSegment=null,I=X,oe=!0;break}case"SERVER-CONTROL":{var rt=new p.AttrList(Ce);A.canBlockReload=rt.bool("CAN-BLOCK-RELOAD"),A.canSkipUntil=rt.optionalFloat("CAN-SKIP-UNTIL",0),A.canSkipDateRanges=A.canSkipUntil>0&&rt.bool("CAN-SKIP-DATERANGES"),A.partHoldBack=rt.optionalFloat("PART-HOLD-BACK",0),A.holdBack=rt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var De=new p.AttrList(Ce);A.partTarget=De.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Me=A.partList;Me||(Me=A.partList=[]);var Xe=H>0?Me[Me.length-1]:void 0,tt=H++,Ve=new O.Part(new p.AttrList(Ce),X,E,tt,Xe);Me.push(Ve),X.duration+=Ve.duration;break}case"PRELOAD-HINT":{var Ke=new p.AttrList(Ce);A.preloadHint=Ke;break}case"RENDITION-REPORT":{var we=new p.AttrList(Ce);A.renditionReports=A.renditionReports||[],A.renditionReports.push(we);break}default:h.logger.warn("line parsed but not handled: "+J);break}}}G&&!G.relurl?(D.pop(),te-=G.duration,A.partList&&(A.fragmentHint=G)):A.partList&&(_(X,G),X.cc=j,A.fragmentHint=X);var Ae=D.length,Oe=D[0],fe=D[Ae-1];if(te+=A.skippedSegments*A.targetduration,te>0&&Ae&&fe){A.averagetargetduration=te/Ae;var ge=fe.sn;A.endSN=ge!=="initSegment"?ge:0,Oe&&(A.startCC=Oe.cc,Oe.initSegment||A.fragments.every(function(_e){return _e.relurl&&n(_e.relurl)})&&(h.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),X=new O.Fragment(x,E),X.relurl=fe.relurl,X.level=o,X.sn="initSegment",Oe.initSegment=X,A.needSidxRanges=!0))}else A.endSN=0,A.startCC=0;return A.fragmentHint&&(te+=A.fragmentHint.duration),A.totalduration=te,A.endCC=j,ie>0&&v(D,ie),A},b}();function c(b,m){["video","audio","text"].forEach(function(g){var E=b.filter(function(x){return Object(d.isCodecType)(x,g)});if(E.length){var o=E.filter(function(x){return x.lastIndexOf("avc1",0)===0||x.lastIndexOf("mp4a",0)===0});m[g+"Codec"]=o.length>0?o[0]:E[0],b=b.filter(function(x){return E.indexOf(x)===-1})}}),m.unknownCodecs=b}function y(b,m,g){var E=m[g];E&&(b[g]=E)}function v(b,m){for(var g=b[m],E=m;E--;){var o=b[E];if(!o)return;o.programDateTime=g.programDateTime-o.duration*1e3,g=o}}function _(b,m){b.rawProgramDateTime?b.programDateTime=Date.parse(b.rawProgramDateTime):m!=null&&m.programDateTime&&(b.programDateTime=m.endProgramDateTime),Object(w.isFiniteNumber)(b.programDateTime)||(b.programDateTime=null,b.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/polyfills/number.ts"),P=U("./src/events.ts"),S=U("./src/errors.ts"),O=U("./src/utils/logger.ts"),T=U("./src/utils/mp4-tools.ts"),l=U("./src/loader/m3u8-parser.ts"),p=U("./src/types/loader.ts"),h=U("./src/utils/attr-list.ts");function d(s){var f=s.type;switch(f){case p.PlaylistContextType.AUDIO_TRACK:return p.PlaylistLevelType.AUDIO;case p.PlaylistContextType.SUBTITLE_TRACK:return p.PlaylistLevelType.SUBTITLE;default:return p.PlaylistLevelType.MAIN}}function a(s,f){var i=s.url;return(i===void 0||i.indexOf("data:")===0)&&(i=f.url),i}var u=function(){function s(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var f=s.prototype;return f.registerListeners=function(){var n=this.hls;n.on(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.on(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.unregisterListeners=function(){var n=this.hls;n.off(P.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(P.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(P.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),n.off(P.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},f.createInternalLoader=function(n){var t=this.hls.config,c=t.pLoader,y=t.loader,v=c||y,_=new v(t);return n.loader=_,this.loaders[n.type]=_,_},f.getInternalLoader=function(n){return this.loaders[n.type]},f.resetInternalLoader=function(n){this.loaders[n]&&delete this.loaders[n]},f.destroyInternalLoaders=function(){for(var n in this.loaders){var t=this.loaders[n];t&&t.destroy(),this.resetInternalLoader(n)}},f.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},f.onManifestLoading=function(n,t){var c=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:p.PlaylistContextType.MANIFEST,url:c,deliveryDirectives:null})},f.onLevelLoading=function(n,t){var c=t.id,y=t.level,v=t.url,_=t.deliveryDirectives;this.load({id:c,groupId:null,level:y,responseType:"text",type:p.PlaylistContextType.LEVEL,url:v,deliveryDirectives:_})},f.onAudioTrackLoading=function(n,t){var c=t.id,y=t.groupId,v=t.url,_=t.deliveryDirectives;this.load({id:c,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.AUDIO_TRACK,url:v,deliveryDirectives:_})},f.onSubtitleTrackLoading=function(n,t){var c=t.id,y=t.groupId,v=t.url,_=t.deliveryDirectives;this.load({id:c,groupId:y,level:null,responseType:"text",type:p.PlaylistContextType.SUBTITLE_TRACK,url:v,deliveryDirectives:_})},f.load=function(n){var t,c=this.hls.config,y=this.getInternalLoader(n);if(y){var v=y.context;if(v&&v.url===n.url){O.logger.trace("[playlist-loader]: playlist request ongoing");return}O.logger.log("[playlist-loader]: aborting previous loader for type: "+n.type),y.abort()}var _,b,m,g;switch(n.type){case p.PlaylistContextType.MANIFEST:_=c.manifestLoadingMaxRetry,b=c.manifestLoadingTimeOut,m=c.manifestLoadingRetryDelay,g=c.manifestLoadingMaxRetryTimeout;break;case p.PlaylistContextType.LEVEL:case p.PlaylistContextType.AUDIO_TRACK:case p.PlaylistContextType.SUBTITLE_TRACK:_=0,b=c.levelLoadingTimeOut;break;default:_=c.levelLoadingMaxRetry,b=c.levelLoadingTimeOut,m=c.levelLoadingRetryDelay,g=c.levelLoadingMaxRetryTimeout;break}if(y=this.createInternalLoader(n),(t=n.deliveryDirectives)!==null&&t!==void 0&&t.part){var E;if(n.type===p.PlaylistContextType.LEVEL&&n.level!==null?E=this.hls.levels[n.level].details:n.type===p.PlaylistContextType.AUDIO_TRACK&&n.id!==null?E=this.hls.audioTracks[n.id].details:n.type===p.PlaylistContextType.SUBTITLE_TRACK&&n.id!==null&&(E=this.hls.subtitleTracks[n.id].details),E){var o=E.partTarget,x=E.targetduration;o&&x&&(b=Math.min(Math.max(o*3,x*.8)*1e3,b))}}var C={timeout:b,maxRetry:_,retryDelay:m,maxRetryDelay:g,highWaterMark:0},A={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};y.load(n,C,A)},f.loadsuccess=function(n,t,c,y){if(y===void 0&&(y=null),c.isSidxRequest){this.handleSidxRequest(n,c),this.handlePlaylistLoaded(n,t,c,y);return}this.resetInternalLoader(c.type);var v=n.data;if(v.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(n,c,"no EXTM3U delimiter",y);return}t.parsing.start=performance.now(),v.indexOf("#EXTINF:")>0||v.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(n,t,c,y):this.handleMasterPlaylist(n,t,c,y)},f.loaderror=function(n,t,c){c===void 0&&(c=null),this.handleNetworkError(t,c,!1,n)},f.loadtimeout=function(n,t,c){c===void 0&&(c=null),this.handleNetworkError(t,c,!0)},f.handleMasterPlaylist=function(n,t,c,y){var v=this.hls,_=n.data,b=a(n,c),m=l.default.parseMasterPlaylist(_,b),g=m.levels,E=m.sessionData;if(!g.length){this.handleManifestParsingError(n,c,"no level found in manifest",y);return}var o=g.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),x=g.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),C=l.default.parseMasterPlaylistMedia(_,b,"AUDIO",o),A=l.default.parseMasterPlaylistMedia(_,b,"SUBTITLES",x),D=l.default.parseMasterPlaylistMedia(_,b,"CLOSED-CAPTIONS");if(C.length){var I=C.some(function(F){return!F.url});!I&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(O.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),C.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new h.AttrList({}),bitrate:0,url:""}))}v.trigger(P.Events.MANIFEST_LOADED,{levels:g,audioTracks:C,subtitles:A,captions:D,url:b,stats:t,networkDetails:y,sessionData:E})},f.handleTrackOrLevelPlaylist=function(n,t,c,y){var v=this.hls,_=c.id,b=c.level,m=c.type,g=a(n,c),E=Object(w.isFiniteNumber)(_)?_:0,o=Object(w.isFiniteNumber)(b)?b:E,x=d(c),C=l.default.parseLevelPlaylist(n.data,g,o,x,E);if(!C.fragments.length){v.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:g,reason:"no fragments found in level",level:typeof c.level=="number"?c.level:void 0});return}if(m===p.PlaylistContextType.MANIFEST){var A={attrs:new h.AttrList({}),bitrate:0,details:C,name:"",url:g};v.trigger(P.Events.MANIFEST_LOADED,{levels:[A],audioTracks:[],url:g,stats:t,networkDetails:y,sessionData:null})}if(t.parsing.end=performance.now(),C.needSidxRanges){var D,I=(D=C.fragments[0].initSegment)===null||D===void 0?void 0:D.url;this.load({url:I,isSidxRequest:!0,type:m,level:b,levelDetails:C,id:_,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}c.levelDetails=C,this.handlePlaylistLoaded(n,t,c,y)},f.handleSidxRequest=function(n,t){var c=Object(T.parseSegmentIndex)(new Uint8Array(n.data));if(!c)return;var y=c.references,v=t.levelDetails;y.forEach(function(_,b){var m=_.info,g=v.fragments[b];g.byteRange.length===0&&g.setByteRange(String(1+m.end-m.start)+"@"+String(m.start)),g.initSegment&&g.initSegment.setByteRange(String(c.moovEndOffset)+"@0")})},f.handleManifestParsingError=function(n,t,c,y){this.hls.trigger(P.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===p.PlaylistContextType.MANIFEST,url:n.url,reason:c,response:n,context:t,networkDetails:y})},f.handleNetworkError=function(n,t,c,y){c===void 0&&(c=!1),O.logger.warn("[playlist-loader]: A network "+(c?"timeout":"error")+" occurred while loading "+n.type+" level: "+n.level+" id: "+n.id+' group-id: "'+n.groupId+'"');var v=S.ErrorDetails.UNKNOWN,_=!1,b=this.getInternalLoader(n);switch(n.type){case p.PlaylistContextType.MANIFEST:v=c?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,_=!0;break;case p.PlaylistContextType.LEVEL:v=c?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.AUDIO_TRACK:v=c?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,_=!1;break;case p.PlaylistContextType.SUBTITLE_TRACK:v=c?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,_=!1;break}b&&this.resetInternalLoader(n.type);var m={type:S.ErrorTypes.NETWORK_ERROR,details:v,fatal:_,url:n.url,loader:b,context:n,networkDetails:t};y&&(m.response=y),this.hls.trigger(P.Events.ERROR,m)},f.handlePlaylistLoaded=function(n,t,c,y){var v=c.type,_=c.level,b=c.id,m=c.groupId,g=c.loader,E=c.levelDetails,o=c.deliveryDirectives;if(!(E!=null&&E.targetduration)){this.handleManifestParsingError(n,c,"invalid target duration",y);return}if(!g)return;E.live&&(g.getCacheAge&&(E.ageHeader=g.getCacheAge()||0),(!g.getCacheAge||isNaN(E.ageHeader))&&(E.ageHeader=0));switch(v){case p.PlaylistContextType.MANIFEST:case p.PlaylistContextType.LEVEL:this.hls.trigger(P.Events.LEVEL_LOADED,{details:E,level:_||0,id:b||0,stats:t,networkDetails:y,deliveryDirectives:o});break;case p.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(P.Events.AUDIO_TRACK_LOADED,{details:E,id:b||0,groupId:m||"",stats:t,networkDetails:y,deliveryDirectives:o});break;case p.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(P.Events.SUBTITLE_TRACK_LOADED,{details:E,id:b||0,groupId:m||"",stats:t,networkDetails:y,deliveryDirectives:o});break}},s}();Z.default=u},"./src/polyfills/number.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"isFiniteNumber",function(){return w}),U.d(Z,"MAX_SAFE_INTEGER",function(){return P});var w=Number.isFinite||function(S){return typeof S=="number"&&isFinite(S)},P=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ae,Z,U){"use strict";U.r(Z);var w=function(){function P(){}return P.getSilentFrame=function(O,T){switch(O){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}return},P}();Z.default=w},"./src/remux/mp4-generator.ts":function(ae,Z,U){"use strict";U.r(Z);var w=Math.pow(2,32)-1,P=function(){function S(){}return S.init=function(){S.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var T;for(T in S.types)S.types.hasOwnProperty(T)&&(S.types[T]=[T.charCodeAt(0),T.charCodeAt(1),T.charCodeAt(2),T.charCodeAt(3)]);var l=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]),p=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]);S.HDLR_TYPES={video:l,audio:p};var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),d=new Uint8Array([0,0,0,0,0,0,0,0]);S.STTS=S.STSC=S.STCO=d,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),u=new Uint8Array([97,118,99,49]),s=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,a,s,a,u),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,h))},S.box=function(T){for(var l=8,p=arguments.length,h=new Array(p>1?p-1:0),d=1;d>24&255,s[1]=l>>16&255,s[2]=l>>8&255,s[3]=l&255,s.set(T,4),a=0,l=8;a>24&255,T>>16&255,T>>8&255,T&255,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&255,85,196,0,0]))},S.mdia=function(T){return S.box(S.types.mdia,S.mdhd(T.timescale,T.duration),S.hdlr(T.type),S.minf(T))},S.mfhd=function(T){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,T>>24,T>>16&255,T>>8&255,T&255]))},S.minf=function(T){return T.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(T)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(T))},S.moof=function(T,l,p){return S.box(S.types.moof,S.mfhd(T),S.traf(p,l))},S.moov=function(T){for(var l=T.length,p=[];l--;)p[l]=S.trak(T[l]);return S.box.apply(null,[S.types.moov,S.mvhd(T[0].timescale,T[0].duration)].concat(p).concat(S.mvex(T)))},S.mvex=function(T){for(var l=T.length,p=[];l--;)p[l]=S.trex(T[l]);return S.box.apply(null,[S.types.mvex].concat(p))},S.mvhd=function(T,l){l*=T;var p=Math.floor(l/(w+1)),h=Math.floor(l%(w+1)),d=new Uint8Array([1,0,0,0,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,p>>24,p>>16&255,p>>8&255,p&255,h>>24,h>>16&255,h>>8&255,h&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 S.box(S.types.mvhd,d)},S.sdtp=function(T){var l=T.samples||[],p=new Uint8Array(4+l.length),h,d;for(h=0;h>>8&255),l.push(a&255),l=l.concat(Array.prototype.slice.call(d));for(h=0;h>>8&255),p.push(a&255),p=p.concat(Array.prototype.slice.call(d));var u=S.box(S.types.avcC,new Uint8Array([1,l[3],l[4],l[5],252|3,224|T.sps.length].concat(l).concat([T.pps.length]).concat(p))),s=T.width,f=T.height,i=T.pixelRatio[0],n=T.pixelRatio[1];return S.box(S.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,s>>8&255,s&255,f>>8&255,f&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]),u,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,n>>24,n>>16&255,n>>8&255,n&255])))},S.esds=function(T){var l=T.config.length;return new Uint8Array([0,0,0,0,3,23+l,0,1,0,4,15+l,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([l]).concat(T.config).concat([6,1,2]))},S.mp4a=function(T){var l=T.samplerate;return S.box(S.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]),S.box(S.types.esds,S.esds(T)))},S.mp3=function(T){var l=T.samplerate;return S.box(S.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,T.channelCount,0,16,0,0,0,0,l>>8&255,l&255,0,0]))},S.stsd=function(T){return T.type==="audio"?!T.isAAC&&T.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(T)):S.box(S.types.stsd,S.STSD,S.mp4a(T)):S.box(S.types.stsd,S.STSD,S.avc1(T))},S.tkhd=function(T){var l=T.id,p=T.duration*T.timescale,h=T.width,d=T.height,a=Math.floor(p/(w+1)),u=Math.floor(p%(w+1));return S.box(S.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,l>>24&255,l>>16&255,l>>8&255,l&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,u>>24,u>>16&255,u>>8&255,u&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,h>>8&255,h&255,0,0,d>>8&255,d&255,0,0]))},S.traf=function(T,l){var p=S.sdtp(T),h=T.id,d=Math.floor(l/(w+1)),a=Math.floor(l%(w+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,h>>24,h>>16&255,h>>8&255,h&255])),S.box(S.types.tfdt,new Uint8Array([1,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,a>>24,a>>16&255,a>>8&255,a&255])),S.trun(T,p.length+16+20+8+16+8+8),p)},S.trak=function(T){return T.duration=T.duration||4294967295,S.box(S.types.trak,S.tkhd(T),S.mdia(T))},S.trex=function(T){var l=T.id;return S.box(S.types.trex,new Uint8Array([0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},S.trun=function(T,l){var p=T.samples||[],h=p.length,d=12+16*h,a=new Uint8Array(d),u,s,f,i,n,t;for(l+=8+d,a.set([0,0,15,1,h>>>24&255,h>>>16&255,h>>>8&255,h&255,l>>>24&255,l>>>16&255,l>>>8&255,l&255],0),u=0;u>>24&255,f>>>16&255,f>>>8&255,f&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,n.isLeading<<2|n.dependsOn,n.isDependedOn<<6|n.hasRedundancy<<4|n.paddingValue<<1|n.isNonSync,n.degradPrio&240<<8,n.degradPrio&15,t>>>24&255,t>>>16&255,t>>>8&255,t&255],12+16*u);return S.box(S.types.trun,a)},S.initSegment=function(T){S.types||S.init();var l=S.moov(T),p=new Uint8Array(S.FTYP.byteLength+l.byteLength);return p.set(S.FTYP),p.set(l,S.FTYP.byteLength),p},S}();P.types=void 0,P.HDLR_TYPES=void 0,P.STTS=void 0,P.STSC=void 0,P.STCO=void 0,P.STSZ=void 0,P.VMHD=void 0,P.SMHD=void 0,P.STSD=void 0,P.FTYP=void 0,P.DINF=void 0,Z.default=P},"./src/remux/mp4-remuxer.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return t}),U.d(Z,"normalizePts",function(){return c});var w=U("./src/polyfills/number.ts"),P=U("./src/remux/aac-helper.ts"),S=U("./src/remux/mp4-generator.ts"),O=U("./src/events.ts"),T=U("./src/errors.ts"),l=U("./src/utils/logger.ts"),p=U("./src/types/loader.ts"),h=U("./src/utils/timescale-conversion.ts");function d(){return d=Object.assign||function(b){for(var m=1;m0?C:A.pts},E[0].pts);return o&&l.logger.debug("PTS rollover detected"),x},m.remux=function(E,o,x,C,A,D,I,F){var H,te,j,G,X,J,B=A,Q=A,ie=E.pid>-1,oe=o.pid>-1,Ee=o.samples.length,ye=E.samples.length>0,Le=Ee>1,pe=(!ie||ye)&&(!oe||Le)||this.ISGenerated||I;if(pe){this.ISGenerated||(j=this.generateIS(E,o,A));var Ce=this.isVideoContiguous,Be=-1;if(Le&&(Be=y(o.samples),!Ce&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,Be>0){l.logger.warn("[mp4-remuxer]: Dropped "+Be+" out of "+Ee+" video samples due to a missing keyframe");var Pe=this.getVideoStartPts(o.samples);o.samples=o.samples.slice(Be),o.dropped+=Be,Q+=(o.samples[0].pts-Pe)/(o.timescale||9e4)}else Be===-1&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ee+" video samples"),J=!1);if(this.ISGenerated){if(ye&&Le){var ke=this.getVideoStartPts(o.samples),Ne=c(E.samples[0].pts,ke)-ke,he=Ne/o.inputTimeScale;B+=Math.max(0,he),Q+=Math.max(0,-he)}if(ye){if(E.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),j=this.generateIS(E,o,A)),te=this.remuxAudio(E,B,this.isAudioContiguous,D,oe||Le||F===p.PlaylistLevelType.AUDIO?Q:void 0),Le){var ue=te?te.endPTS-te.startPTS:0;o.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),j=this.generateIS(E,o,A)),H=this.remuxVideo(o,Q,Ce,ue)}}else Le&&(H=this.remuxVideo(o,Q,Ce,0));H&&(H.firstKeyFrame=Be,H.independent=Be!==-1)}}return this.ISGenerated&&(x.samples.length&&(X=this.remuxID3(x,A)),C.samples.length&&(G=this.remuxText(C,A))),{audio:te,video:H,initSegment:j,independent:J,text:G,id3:X}},m.generateIS=function(E,o,x){var C=E.samples,A=o.samples,D=this.typeSupported,I={},F=!Object(w.isFiniteNumber)(this._initPTS),H="audio/mp4",te,j,G;if(F&&(te=j=Infinity),E.config&&C.length&&(E.timescale=E.samplerate,E.isAAC||(D.mpeg?(H="audio/mpeg",E.codec=""):D.mp3&&(E.codec="mp3")),I.audio={id:"audio",container:H,codec:E.codec,initSegment:!E.isAAC&&D.mpeg?new Uint8Array(0):S.default.initSegment([E]),metadata:{channelCount:E.channelCount}},F&&(G=E.inputTimeScale,te=j=C[0].pts-Math.round(G*x))),o.sps&&o.pps&&A.length&&(o.timescale=o.inputTimeScale,I.video={id:"main",container:"video/mp4",codec:o.codec,initSegment:S.default.initSegment([o]),metadata:{width:o.width,height:o.height}},F)){G=o.inputTimeScale;var X=this.getVideoStartPts(A),J=Math.round(G*x);j=Math.min(j,c(A[0].dts,X)-J),te=Math.min(te,X-J)}if(Object.keys(I).length)return this.ISGenerated=!0,F&&(this._initPTS=te,this._initDTS=j),{tracks:I,initPTS:te,timescale:G}},m.remuxVideo=function(E,o,x,C){var A=E.inputTimeScale,D=E.samples,I=[],F=D.length,H=this._initPTS,te=this.nextAvcDts,j=8,G,X,J,B=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY,ie=0,oe=!1;if(!x||te===null){var Ee=o*A,ye=D[0].pts-c(D[0].dts,D[0].pts);te=Ee-ye}for(var Le=0;Lepe.pts){var Ce=9e4*.2;ie=Math.max(Math.min(ie,pe.pts-pe.dts),-1*Ce)}pe.dts0?Le-1:Le].dts&&(oe=!0)}oe&&D.sort(function(Lt,lt){var ft=Lt.dts-lt.dts,Qe=Lt.pts-lt.pts;return ft||Qe}),X=D[0].dts,J=D[D.length-1].dts;var Be=Math.round((J-X)/(F-1));if(ie<0){if(ieBe,Ie=he<-1;if(ue||Ie){ue?l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(he,!0)+" ms ("+he+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(h.toMsFromMpegTsClock)(-he,!0)+" ms ("+he+"dts) overlapping between fragments detected"),X=te;var Ue=D[0].pts-he;D[0].dts=X,D[0].pts=Ue,l.logger.log("Video: First PTS/DTS adjusted: "+Object(h.toMsFromMpegTsClock)(Ue,!0)+"/"+Object(h.toMsFromMpegTsClock)(X,!0)+", delta: "+Object(h.toMsFromMpegTsClock)(he,!0)+" ms")}}n&&(X=Math.max(0,X));for(var Ye=0,ee=0,M=0;M0?Me-1:Me].dts;if(ge.stretchShortVideoTrack&&this.nextAudioPts!==null){var be=Math.floor(ge.maxBufferHole*A),Ge=(C?B+C*A:this.nextAudioPts)-Xe.pts;Ge>be?(G=Ge-_e,G<0&&(G=_e),l.logger.log("[mp4-remuxer]: It is approximately "+Ge/90+" ms to the next segment; using duration "+G/90+" ms for the last video frame.")):G=_e}else G=_e}var qe=Math.round(Xe.pts-Xe.dts);I.push(new v(Xe.key,G,Ve,qe))}if(I.length&&f&&f<70){var pt=I[0].flags;pt.dependsOn=2,pt.isNonSync=0}console.assert(G!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=te=J+G,this.isVideoContiguous=!0;var Dt=S.default.moof(E.sequenceNumber++,X,d({},E,{samples:I})),jt="video",Rt={data1:Dt,data2:rt,startPTS:B/A,endPTS:(Q+G)/A,startDTS:X/A,endDTS:te/A,type:jt,hasAudio:!1,hasVideo:!0,nb:I.length,dropped:E.dropped};return E.samples=[],E.dropped=0,console.assert(rt.length,"MDAT length must not be zero"),Rt},m.remuxAudio=function(E,o,x,C,A){var D=E.inputTimeScale,I=E.samplerate?E.samplerate:D,F=D/I,H=E.isAAC?u:s,te=H*F,j=this._initPTS,G=!E.isAAC&&this.typeSupported.mpeg,X=[],J=E.samples,B=G?0:8,Q=this.nextAudioPts||-1,ie=o*D;if(this.isAudioContiguous=x=x||J.length&&Q>0&&(C&&Math.abs(ie-Q)<9e3||Math.abs(c(J[0].pts-j,ie)-Q)<20*te),J.forEach(function(Oe){Oe.pts=c(Oe.pts-j,ie)}),!x||Q<0){if(J=J.filter(function(Oe){return Oe.pts>=0}),!J.length)return;A===0?Q=0:C?Q=Math.max(0,ie):Q=J[0].pts}if(E.isAAC)for(var oe=A!==void 0,Ee=this.config.maxAudioFramesDrift,ye=0,Le=Q;ye=Ee*te&&Pe0){ee+=B;try{Ye=new Uint8Array(ee)}catch(Oe){this.observer.emit(O.Events.ERROR,O.Events.ERROR,{type:T.ErrorTypes.MUX_ERROR,details:T.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ee,reason:"fail allocating audio mdat "+ee});return}if(!G){var rt=new DataView(Ye.buffer);rt.setUint32(0,ee),Ye.set(S.default.types.mdat,4)}}else return;Ye.set(Y,B);var De=Y.byteLength;B+=De,X.push(new v(!0,H,De,0)),Ue=me}var Me=X.length;if(!Me)return;var Xe=X[X.length-1];this.nextAudioPts=Q=Ue+F*Xe.duration;var tt=G?new Uint8Array(0):S.default.moof(E.sequenceNumber++,Ie/F,d({},E,{samples:X}));E.samples=[];var Ve=Ie/D,Ke=Q/D,we="audio",Ae={data1:tt,data2:Ye,startPTS:Ve,endPTS:Ke,startDTS:Ve,endDTS:Ke,type:we,hasAudio:!0,hasVideo:!1,nb:Me};return this.isAudioContiguous=!0,console.assert(Ye.length,"MDAT length must not be zero"),Ae},m.remuxEmptyAudio=function(E,o,x,C){var A=E.inputTimeScale,D=E.samplerate?E.samplerate:A,I=A/D,F=this.nextAudioPts,H=(F!==null?F:C.startDTS*A)+this._initDTS,te=C.endDTS*A+this._initDTS,j=I*u,G=Math.ceil((te-H)/j),X=P.default.getSilentFrame(E.manifestCodec||E.codec,E.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),!X){l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],B=0;B4294967296;)b+=g;return b}function y(b){for(var m=0;m0?this.lastEndDTS=E:(O.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var o=!!b.audio,x=!!b.video,C="";o&&(C+="audio"),x&&(C+="video");var A={data1:v,startPTS:g,startDTS:g,endPTS:E,endDTS:E,type:C,hasAudio:o,hasVideo:x,nb:1,dropped:0};return y.audio=A.type==="audio"?A:void 0,y.video=A.type!=="audio"?A:void 0,y.text=i,y.id3=f,y.initSegment=_,y},h}(),l=function(d,a,u){return Object(P.getStartDTS)(d,a)-u};function p(h,d){var a=h==null?void 0:h.codec;return a&&a.length>4?a:a==="hvc1"?"hvc1.1.c.L120.90":a==="av01"?"av01.0.04M.08":a==="avc1"||d===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}Z.default=T},"./src/task-loop.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"default",function(){return w});var w=function(){function P(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var S=P.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(T){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,T),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},P}()},"./src/types/cmcd.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"CMCDVersion",function(){return w}),U.d(Z,"CMCDObjectType",function(){return P}),U.d(Z,"CMCDStreamingFormat",function(){return S}),U.d(Z,"CMCDStreamType",function(){return O});var w=1,P;(function(T){T.MANIFEST="m",T.AUDIO="a",T.VIDEO="v",T.MUXED="av",T.INIT="i",T.CAPTION="c",T.TIMED_TEXT="tt",T.KEY="k",T.OTHER="o"})(P||(P={}));var S;(function(T){T.DASH="d",T.HLS="h",T.SMOOTH="s",T.OTHER="o"})(S||(S={}));var O;(function(T){T.VOD="v",T.LIVE="l"})(O||(O={}))},"./src/types/level.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"HlsSkip",function(){return S}),U.d(Z,"getSkipValue",function(){return O}),U.d(Z,"HlsUrlParameters",function(){return T}),U.d(Z,"Level",function(){return l});function w(p,h){for(var d=0;dNumber.MAX_SAFE_INTEGER?Infinity:h},T.hexadecimalInteger=function(p){if(this[p]){var h=(this[p]||"0x").slice(2);h=(h.length&1?"0":"")+h;for(var d=new Uint8Array(h.length/2),a=0;aNumber.MAX_SAFE_INTEGER?Infinity:h},T.decimalFloatingPoint=function(p){return parseFloat(this[p])},T.optionalFloat=function(p,h){var d=this[p];return d?parseFloat(d):h},T.enumeratedString=function(p){return this[p]},T.bool=function(p){return this[p]==="YES"},T.decimalResolution=function(p){var h=w.exec(this[p]);return h===null?void 0:{width:parseInt(h[1],10),height:parseInt(h[2],10)}},O.parseAttrList=function(p){var h,d={},a='"';for(P.lastIndex=0;(h=P.exec(p))!==null;){var u=h[2];u.indexOf(a)===0&&u.lastIndexOf(a)===u.length-1&&(u=u.slice(1,-1)),d[h[1]]=u}return d},O}()},"./src/utils/binary-search.ts":function(ae,Z,U){"use strict";U.r(Z);var w={search:function(S,O){for(var T=0,l=S.length-1,p=null,h=null;T<=l;){p=(T+l)/2|0,h=S[p];var d=O(h);if(d>0)T=p+1;else if(d<0)l=p-1;else return h}return null}};Z.default=w},"./src/utils/buffer-helper.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"BufferHelper",function(){return S});var w=U("./src/utils/logger.ts"),P={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function O(){}return O.isBuffered=function(l,p){try{if(l){for(var h=O.getBuffered(l),d=0;d=h.start(d)&&p<=h.end(d))return!0}}catch(a){}return!1},O.bufferInfo=function(l,p,h){try{if(l){var d=O.getBuffered(l),a=[],u;for(u=0;us&&(d[u-1].end=l[a].end):d.push(l[a])}else d.push(l[a])}else d=l;for(var f=0,i,n=p,t=p,c=0;c=y&&p=x&&w.logger.log(this.time+" ["+x+"] "+C)},g}(),f=function(E){for(var o=[],x=0;xT&&(this.logger.log(u.DEBUG,"Too large cursor position "+this.pos),this.pos=T)},E.moveCursor=function(x){var C=this.pos+x;if(x>1)for(var A=this.pos+1;A=144&&this.backSpace();var C=S(x);if(this.pos>=T){this.logger.log(u.ERROR,"Cannot insert "+x.toString(16)+" ("+C+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(C,this.currPenState),this.moveCursor(1)},E.clearFromPos=function(x){var C;for(C=x;C0&&(x?A="["+C.join(" | ")+"]":A=C.join(` `)),A},E.getTextAndFormat=function(){return this.rows},g}(),y=function(){function g(o,x,C){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=o,this.outputFilter=x,this.mode=null,this.verbose=0,this.displayedMemory=new c(C),this.nonDisplayedMemory=new c(C),this.lastOutputScreen=new c(C),this.currRollUpRow=this.displayedMemory.rows[O-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=C}var E=g.prototype;return E.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[O-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},E.getHandler=function(){return this.outputFilter},E.setHandler=function(x){this.outputFilter=x},E.setPAC=function(x){this.writeScreen.setPAC(x)},E.setBkgData=function(x){this.writeScreen.setBkgData(x)},E.setMode=function(x){if(x===this.mode)return;this.mode=x,this.logger.log(u.INFO,"MODE="+x),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=x},E.insertChars=function(x){for(var C=0;C=46,C.italics)C.foreground="white";else{var A=Math.floor(x/2)-16,D=["white","green","blue","cyan","red","yellow","magenta"];C.foreground=D[A]}this.logger.log(u.INFO,"MIDROW: "+JSON.stringify(C)),this.writeScreen.setPen(C)},E.outputDataUpdate=function(x){x===void 0&&(x=!1);var C=this.logger.time;if(C===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=C:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,C,this.lastOutputScreen),x&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:C),this.lastOutputScreen.copy(this.displayedMemory))},E.cueSplitAtTime=function(x){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,x,this.displayedMemory),this.cueStartTime=x))},g}(),v=function(){function g(o,x,C){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var A=new s;this.channels=[null,new y(o,x,A),new y(o+1,C,A)],this.cmdHistory=m(),this.logger=A}var E=g.prototype;return E.getHandler=function(x){return this.channels[x].getHandler()},E.setHandler=function(x,C){this.channels[x].setHandler(C)},E.addData=function(x,C){var A,D,I,F=!1;this.logger.time=x;for(var H=0;H ("+f([D,I])+")"),A=this.parseCmd(D,I),A||(A=this.parseMidrow(D,I)),A||(A=this.parsePAC(D,I)),A||(A=this.parseBackgroundAttributes(D,I)),!A&&(F=this.parseChars(D,I),F)){var te=this.currentChannel;if(te&&te>0){var j=this.channels[te];j.insertChars(F)}else this.logger.log(u.WARNING,"No channel found yet. TEXT-MODE?")}!A&&!F&&this.logger.log(u.WARNING,"Couldn't parse cleaned data "+f([D,I])+" orig: "+f([C[H],C[H+1]]))}},E.parseCmd=function(x,C){var A=this.cmdHistory,D=(x===20||x===28||x===21||x===29)&&C>=32&&C<=47,I=(x===23||x===31)&&C>=33&&C<=35;if(!(D||I))return!1;if(b(x,C,A))return _(null,null,A),this.logger.log(u.DEBUG,"Repeated command ("+f([x,C])+") is dropped"),!0;var F=x===20||x===21||x===23?1:2,H=this.channels[F];return x===20||x===21||x===28||x===29?C===32?H.ccRCL():C===33?H.ccBS():C===34?H.ccAOF():C===35?H.ccAON():C===36?H.ccDER():C===37?H.ccRU(2):C===38?H.ccRU(3):C===39?H.ccRU(4):C===40?H.ccFON():C===41?H.ccRDC():C===42?H.ccTR():C===43?H.ccRTD():C===44?H.ccEDM():C===45?H.ccCR():C===46?H.ccENM():C===47&&H.ccEOC():H.ccTO(C-32),_(x,C,A),this.currentChannel=F,!0},E.parseMidrow=function(x,C){var A=0;if((x===17||x===25)&&C>=32&&C<=47){if(x===17?A=1:A=2,A!==this.currentChannel)return this.logger.log(u.ERROR,"Mismatch channel in midrow parsing"),!1;var D=this.channels[A];return D?(D.ccMIDROW(C),this.logger.log(u.DEBUG,"MIDROW ("+f([x,C])+")"),!0):!1}return!1},E.parsePAC=function(x,C){var A,D=this.cmdHistory,I=(x>=17&&x<=23||x>=25&&x<=31)&&C>=64&&C<=127,F=(x===16||x===24)&&C>=64&&C<=95;if(!(I||F))return!1;if(b(x,C,D))return _(null,null,D),!0;var H=x<=23?1:2;C>=64&&C<=95?A=H===1?l[x]:h[x]:A=H===1?p[x]:d[x];var te=this.channels[H];return te?(te.setPAC(this.interpretPAC(A,C)),_(x,C,D),this.currentChannel=H,!0):!1},E.interpretPAC=function(x,C){var A,D={color:null,italics:!1,indent:null,underline:!1,row:x};return C>95?A=C-96:A=C-64,D.underline=(A&1)===1,A<=13?D.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(A/2)]:A<=15?(D.italics=!0,D.color="white"):D.indent=Math.floor((A-16)/2)*4,D},E.parseChars=function(x,C){var A,D=null,I=null;if(x>=25?(A=2,I=x-8):(A=1,I=x),I>=17&&I<=19){var F;I===17?F=C+80:I===18?F=C+112:F=C+144,this.logger.log(u.INFO,"Special char '"+S(F)+"' in channel "+A),D=[F]}else x>=32&&x<=127&&(D=C===0?[x]:[x,C]);if(D){var H=f(D);this.logger.log(u.DEBUG,"Char codes = "+H.join(",")),_(x,C,this.cmdHistory)}return D},E.parseBackgroundAttributes=function(x,C){var A=(x===16||x===24)&&C>=32&&C<=47,D=(x===23||x===31)&&C>=45&&C<=47;if(!(A||D))return!1;var I,F={};x===16||x===24?(I=Math.floor((C-32)/2),F.background=a[I],C%2===1&&(F.background=F.background+"_semi")):C===45?F.background="transparent":(F.foreground="black",C===47&&(F.underline=!0));var H=x<=23?1:2,te=this.channels[H];return te.setBkgData(F),_(x,C,this.cmdHistory),!0},E.reset=function(){for(var x=0;x=16?n--:n++;var _=Object(w.fixLineBreaks)(t.trim()),b=Object(P.generateCueId)(h,d,_);(!p||!p.cues||!p.cues.getCueById(b))&&(f=new c(h,d,_),f.id=b,f.line=y+1,f.align="left",f.position=10+Math.min(80,Math.floor(n*8/32)*10),u.push(f))}return p&&u.length&&(u.sort(function(m,g){return m.line==="auto"||g.line==="auto"?0:m.line>8&&g.line>8?g.line-m.line:m.line-g.line}),u.forEach(function(m){return Object(S.addCueToTrack)(p,m)})),u}};Z.default=T},"./src/utils/discontinuities.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"findFirstFragWithCC",function(){return O}),U.d(Z,"shouldAlignOnDiscontinuities",function(){return T}),U.d(Z,"findDiscontinuousReferenceFrag",function(){return l}),U.d(Z,"adjustSlidingStart",function(){return h}),U.d(Z,"alignStream",function(){return d}),U.d(Z,"alignPDT",function(){return u}),U.d(Z,"alignFragmentByPDTDelta",function(){return s}),U.d(Z,"alignMediaPlaylistByPDT",function(){return f});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/logger.ts"),S=U("./src/controller/level-helper.ts");function O(i,n){for(var t=null,c=0,y=i.length;ct.startCC||i&&i.cc=this.minWeight_},O.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},O.destroy=function(){},S}();Z.default=P},"./src/utils/ewma.ts":function(ae,Z,U){"use strict";U.r(Z);var w=function(){function P(O,T,l){T===void 0&&(T=0),l===void 0&&(l=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=O,this.alpha_=O?Math.exp(Math.log(.5)/O):0,this.estimate_=T,this.totalWeight_=l}var S=P.prototype;return S.sample=function(T,l){var p=Math.pow(this.alpha_,T);this.estimate_=l*(1-p)+p*this.estimate_,this.totalWeight_+=T},S.getTotalWeight=function(){return this.totalWeight_},S.getEstimate=function(){if(this.alpha_){var T=1-Math.pow(this.alpha_,this.totalWeight_);if(T)return this.estimate_/T}return this.estimate_},P}();Z.default=w},"./src/utils/fetch-loader.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"fetchSupported",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/loader/load-stats.ts"),S=U("./src/demux/chunk-cache.ts");function O(c,y){c.prototype=Object.create(y.prototype),c.prototype.constructor=c,d(c,y)}function T(c){var y=typeof Map=="function"?new Map:void 0;return T=function(_){if(_===null||!h(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y!="undefined"){if(y.has(_))return y.get(_);y.set(_,b)}function b(){return l(_,arguments,a(this).constructor)}return b.prototype=Object.create(_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),d(b,_)},T(c)}function l(c,y,v){return p()?l=Reflect.construct:l=function(b,m,g){var E=[null];E.push.apply(E,m);var o=Function.bind.apply(b,E),x=new o;return g&&d(x,g.prototype),x},l.apply(null,arguments)}function p(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function h(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function d(c,y){return d=Object.setPrototypeOf||function(_,b){return _.__proto__=b,_},d(c,y)}function a(c){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},a(c)}function u(){return u=Object.assign||function(c){for(var y=1;y=g&&E(b,m,o.flush(),_)):E(b,m,I,_),A()}).catch(function(){return Promise.reject()})};return C()},c}();function i(c,y){var v={method:"GET",mode:"cors",credentials:"same-origin",signal:y,headers:new self.Headers(u({},c.headers))};return c.rangeEnd&&v.headers.set("Range","bytes="+c.rangeStart+"-"+String(c.rangeEnd-1)),v}function n(c,y){return new self.Request(c.url,y)}var t=function(c){O(y,c);function y(v,_,b){var m;return m=c.call(this,v)||this,m.code=void 0,m.details=void 0,m.code=_,m.details=b,m}return y}(T(Error));Z.default=f},"./src/utils/imsc1-ttml-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"IMSC1_CODEC",function(){return h}),U.d(Z,"parseIMSC1",function(){return s});var w=U("./src/utils/mp4-tools.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/utils/vttcue.ts"),O=U("./src/demux/id3.ts"),T=U("./src/utils/timescale-conversion.ts"),l=U("./src/utils/webvtt-parser.ts");function p(){return p=Object.assign||function(g){for(var E=1;E"):w}function T(h){for(var d=arguments.length,a=new Array(d>1?d-1:0),u=1;u>24,y[v+1]=_>>16&255,y[v+2]=_>>8&255,y[v+3]=_&255}function d(y,v){var _=[];if(!v.length)return _;var b,m,g;"data"in y?(b=y.data,m=y.start,g=y.end):(b=y,m=0,g=b.byteLength);for(var E=m;E1?E+o:g;if(x===v[0])if(v.length===1)_.push({data:b,start:E+8,end:C});else{var A=d({data:b,start:E+8,end:C},v.slice(1));A.length&&O.apply(_,A)}E=C}return _}function a(y){var v=d(y,["moov"]),_=v[0],b=_?_.end:null,m=d(y,["sidx"]);if(!m||!m[0])return null;var g=[],E=m[0],o=E.data[0],x=o===0?8:16,C=p(E,x);x+=4;var A=0,D=0;o===0?x+=8:x+=16,x+=2;var I=E.end+D,F=l(E,x);x+=2;for(var H=0;H>>31;if(X===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=p(E,te);te+=4,g.push({referenceSize:G,subsegmentDuration:J,info:{duration:J/C,start:I,end:I+G-1}}),I+=G,te+=4,x=te}return{earliestPresentationTime:A,timescale:C,version:o,referencesCount:F,references:g,moovEndOffset:b}}function u(y){for(var v=[],_=d(y,["moov","trak"]),b=0;b<_.length;b++){var m=_[b],g=d(m,["tkhd"])[0];if(g){var E=g.data[g.start],o=E===0?12:20,x=p(g,o),C=d(m,["mdia","mdhd"])[0];if(C){E=C.data[C.start],o=E===0?12:20;var A=p(C,o),D=d(m,["mdia","hdlr"])[0];if(D){var I=T(D.data.subarray(D.start+8,D.start+12)),F={soun:P.ElementaryStreamTypes.AUDIO,vide:P.ElementaryStreamTypes.VIDEO}[I];if(F){var H=d(m,["mdia","minf","stbl","stsd"])[0],te=void 0;H&&(te=T(H.data.subarray(H.start+12,H.start+16))),v[x]={timescale:A,type:F},v[F]={timescale:A,id:x,codec:te}}}}}}var j=d(y,["moov","mvex","trex"]);return j.forEach(function(G){var X=p(G,4),J=v[X];J&&(J.default={duration:p(G,12),flags:p(G,20)})}),v}function s(y,v){return d(v,["moof","traf"]).reduce(function(_,b){var m=d(b,["tfdt"])[0],g=m.data[m.start],E=d(b,["tfhd"]).reduce(function(o,x){var C=p(x,4),A=y[C];if(A){var D=p(m,4);g===1&&(D*=Math.pow(2,32),D+=p(m,8));var I=A.timescale||9e4,F=D/I;if(isFinite(F)&&(o===null||FT)&&(this.startTime=T),this.endTime=l,this.screen=p,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},P}()},"./src/utils/texttrack-utils.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"sendAddTrackEvent",function(){return P}),U.d(Z,"addCueToTrack",function(){return S}),U.d(Z,"clearCurrentCues",function(){return O}),U.d(Z,"removeCuesInRange",function(){return T}),U.d(Z,"getCuesInRange",function(){return p});var w=U("./src/utils/logger.ts");function P(h,d){var a;try{a=new Event("addtrack")}catch(u){a=document.createEvent("Event"),a.initEvent("addtrack",!1,!1)}a.track=h,d.dispatchEvent(a)}function S(h,d){var a=h.mode;if(a==="disabled"&&(h.mode="hidden"),h.cues&&!h.cues.getCueById(d.id))try{if(h.addCue(d),!h.cues.getCueById(d.id))throw new Error("addCue is failed for: "+d)}catch(s){w.logger.debug("[texttrack-utils]: "+s);var u=new self.TextTrackCue(d.startTime,d.endTime,d.text);u.id=d.id,h.addCue(u)}a==="disabled"&&(h.mode=a)}function O(h){var d=h.mode;if(d==="disabled"&&(h.mode="hidden"),h.cues)for(var a=h.cues.length;a--;)h.removeCue(h.cues[a]);d==="disabled"&&(h.mode=d)}function T(h,d,a){var u=h.mode;if(u==="disabled"&&(h.mode="hidden"),h.cues&&h.cues.length>0)for(var s=p(h.cues,d,a),f=0;fh[a].endTime)return-1;for(var u=0,s=a;u<=s;){var f=Math.floor((s+u)/2);if(dh[f].startTime&&u-1)for(var f=s,i=h.length;f=d&&n.endTime<=a)u.push(n);else if(n.startTime>a)return u}return u}},"./src/utils/time-ranges.ts":function(ae,Z,U){"use strict";U.r(Z);var w={toString:function(S){for(var O="",T=S.length,l=0;l1?d-1:0),u=1;u100)throw new Error("Position must be between 0 and 100.");g=A,this.hasBeenReset=!0}})),Object.defineProperty(u,"positionAlign",l({},s,{get:function(){return E},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");E=D,this.hasBeenReset=!0}})),Object.defineProperty(u,"size",l({},s,{get:function(){return o},set:function(A){if(A<0||A>100)throw new Error("Size must be between 0 and 100.");o=A,this.hasBeenReset=!0}})),Object.defineProperty(u,"align",l({},s,{get:function(){return x},set:function(A){var D=T(A);if(!D)throw new SyntaxError("An invalid or illegal string was specified.");x=D,this.hasBeenReset=!0}})),u.displayState=void 0}return p.prototype.getCueAsHTML=function(){var h=self.WebVTT;return h.convertCueToDOMTree(self,this.text)},p}()},"./src/utils/vttparser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"parseTimeStamp",function(){return S}),U.d(Z,"fixLineBreaks",function(){return d}),U.d(Z,"VTTParser",function(){return a});var w=U("./src/utils/vttcue.ts"),P=function(){function u(){}var s=u.prototype;return s.decode=function(i,n){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},u}();function S(u){function s(i,n,t,c){return(i|0)*3600+(n|0)*60+(t|0)+parseFloat(c||0)}var f=u.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return f?parseFloat(f[2])>59?s(f[2],f[3],0,f[4]):s(f[1],f[2],f[3],f[4]):null}var O=function(){function u(){this.values=Object.create(null)}var s=u.prototype;return s.set=function(i,n){!this.get(i)&&n!==""&&(this.values[i]=n)},s.get=function(i,n,t){return t?this.has(i)?this.values[i]:n[t]:this.has(i)?this.values[i]:n},s.has=function(i){return i in this.values},s.alt=function(i,n,t){for(var c=0;c=0&&t<=100)return this.set(i,t),!0}return!1},u}();function T(u,s,f,i){var n=i?u.split(i):[u];for(var t in n){if(typeof n[t]!="string")continue;var c=n[t].split(f);if(c.length!==2)continue;var y=c[0],v=c[1];s(y,v)}}var l=new w.default(0,0,""),p=l.align==="middle"?"middle":"center";function h(u,s,f){var i=u;function n(){var y=S(u);if(y===null)throw new Error("Malformed timestamp: "+i);return u=u.replace(/^[^\sa-zA-Z-]+/,""),y}function t(y,v){var _=new O;T(y,function(g,E){var o;switch(g){case"region":for(var x=f.length-1;x>=0;x--)if(f[x].id===E){_.set(g,f[x].region);break}break;case"vertical":_.alt(g,E,["rl","lr"]);break;case"line":o=E.split(","),_.integer(g,o[0]),_.percent(g,o[0])&&_.set("snapToLines",!1),_.alt(g,o[0],["auto"]),o.length===2&&_.alt("lineAlign",o[1],["start",p,"end"]);break;case"position":o=E.split(","),_.percent(g,o[0]),o.length===2&&_.alt("positionAlign",o[1],["start",p,"end","line-left","line-right","auto"]);break;case"size":_.percent(g,E);break;case"align":_.alt(g,E,["start",p,"end","left","right"]);break}},/:/,/\s/),v.region=_.get("region",null),v.vertical=_.get("vertical","");var b=_.get("line","auto");b==="auto"&&l.line===-1&&(b=-1),v.line=b,v.lineAlign=_.get("lineAlign","start"),v.snapToLines=_.get("snapToLines",!0),v.size=_.get("size",100),v.align=_.get("align",p);var m=_.get("position","auto");m==="auto"&&l.position===50&&(m=v.align==="start"||v.align==="left"?0:v.align==="end"||v.align==="right"?100:50),v.position=m}function c(){u=u.replace(/^\s+/,"")}if(c(),s.startTime=n(),c(),u.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);u=u.substr(3),c(),s.endTime=n(),c(),t(u,s)}function d(u){return u.replace(//gi,` `)}var a=function(){function u(){this.state="INITIAL",this.buffer="",this.decoder=new P,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var s=u.prototype;return s.parse=function(i){var n=this;i&&(n.buffer+=n.decoder.decode(i,{stream:!0}));function t(){var m=n.buffer,g=0;for(m=d(m);g")===-1){n.cue.id=y;continue}case"CUE":if(!n.cue){n.state="BADCUE";continue}try{h(y,n.cue,n.regionList)}catch(m){n.cue=null,n.state="BADCUE";continue}n.state="CUETEXT";continue;case"CUETEXT":{var b=y.indexOf("-->")!==-1;if(!y||b&&(_=!0)){n.oncue&&n.cue&&n.oncue(n.cue),n.cue=null,n.state="ID";continue}if(n.cue===null)continue;n.cue.text&&(n.cue.text+=` `),n.cue.text+=y}continue;case"BADCUE":y||(n.state="ID")}}}catch(m){n.state==="CUETEXT"&&n.cue&&n.oncue&&n.oncue(n.cue),n.cue=null,n.state=n.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},s.flush=function(){var i=this;try{if((i.cue||i.state==="HEADER")&&(i.buffer+=` `,i.parse()),i.state==="INITIAL"||i.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(n){i.onparsingerror&&i.onparsingerror(n)}return i.onflush&&i.onflush(),this},u}()},"./src/utils/webvtt-parser.ts":function(ae,Z,U){"use strict";U.r(Z),U.d(Z,"generateCueId",function(){return a}),U.d(Z,"parseWebVTT",function(){return s});var w=U("./src/polyfills/number.ts"),P=U("./src/utils/vttparser.ts"),S=U("./src/demux/id3.ts"),O=U("./src/utils/timescale-conversion.ts"),T=U("./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,p=function(i,n,t){return t===void 0&&(t=0),i.substr(t,n.length)===n},h=function(i){var n=parseInt(i.substr(-3)),t=parseInt(i.substr(-6,2)),c=parseInt(i.substr(-9,2)),y=i.length>9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(w.isFiniteNumber)(n)||!Object(w.isFiniteNumber)(t)||!Object(w.isFiniteNumber)(c)||!Object(w.isFiniteNumber)(y))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return n+=1e3*t,n+=60*1e3*c,n+=60*60*1e3*y,n},d=function(i){for(var n=5381,t=i.length;t;)n=n*33^i.charCodeAt(--t);return(n>>>0).toString()};function a(f,i,n){return d(f.toString())+d(i.toString())+d(n)}var u=function(i,n,t){var c=i[n],y=i[c.prevCC];if(!y||!y.new&&c.new){i.ccOffset=i.presentationOffset=c.start,c.new=!1;return}for(;(v=y)!==null&&v!==void 0&&v.new;){var v;i.ccOffset+=c.start-y.start,c.new=!1,c=y,y=i[c.prevCC]}i.presentationOffset=t};function s(f,i,n,t,c,y,v,_){var b=new P.VTTParser,m=Object(S.utf8ArrayToStr)(new Uint8Array(f)).trim().replace(l,` `).split(` `),g=[],E=Object(O.toMpegTsClockFromTimescale)(i,n),o="00:00.000",x=0,C=0,A,D=!0,I=!1;b.oncue=function(F){var H=t[c],te=t.ccOffset,j=(x-E)/9e4;if(H!=null&&H.new&&(C!==void 0?te=t.ccOffset=H.start:u(t,c,j)),j&&(te=j-t.presentationOffset),I){var G=F.endTime-F.startTime,X=Object(T.normalizePts)((F.startTime+te-C)*9e4,y*9e4)/9e4;F.startTime=X,F.endTime=X+G}var J=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(J)),F.id||(F.id=a(F.startTime,F.endTime,J)),F.endTime>0&&g.push(F)},b.onparsingerror=function(F){A=F},b.onflush=function(){if(A){_(A);return}v(g)},m.forEach(function(F){if(D)if(p(F,"X-TIMESTAMP-MAP=")){D=!1,I=!0,F.substr(16).split(",").forEach(function(H){p(H,"LOCAL:")?o=H.substr(6):p(H,"MPEGTS:")&&(x=parseInt(H.substr(7)))});try{C=h(o)/1e3}catch(H){I=!1,A=H}return}else F===""&&(D=!1);b.parse(F+` `)}),b.flush()}},"./src/utils/xhr-loader.ts":function(ae,Z,U){"use strict";U.r(Z);var w=U("./src/utils/logger.ts"),P=U("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,O=function(){function T(p){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=p?p.xhrSetup:null,this.stats=new P.LoadStats,this.retryDelay=0}var l=T.prototype;return l.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},l.abortInternal=function(){var h=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),h&&(h.onreadystatechange=null,h.onprogress=null,h.readyState!==4&&(this.stats.aborted=!0,h.abort()))},l.abort=function(){var h;this.abortInternal(),(h=this.callbacks)!==null&&h!==void 0&&h.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},l.load=function(h,d,a){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=h,this.config=d,this.callbacks=a,this.retryDelay=d.retryDelay,this.loadInternal()},l.loadInternal=function(){var h=this.config,d=this.context;if(!h)return;var a=this.loader=new self.XMLHttpRequest,u=this.stats;u.loading.first=0,u.loaded=0;var s=this.xhrSetup;try{if(s)try{s(a,d.url)}catch(n){a.open("GET",d.url,!0),s(a,d.url)}a.readyState||a.open("GET",d.url,!0);var f=this.context.headers;if(f)for(var i in f)a.setRequestHeader(i,f[i])}catch(n){this.callbacks.onError({code:a.status,text:n.message},d,a);return}d.rangeEnd&&a.setRequestHeader("Range","bytes="+d.rangeStart+"-"+(d.rangeEnd-1)),a.onreadystatechange=this.readystatechange.bind(this),a.onprogress=this.loadprogress.bind(this),a.responseType=d.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),h.timeout),a.send()},l.readystatechange=function(){var h=this.context,d=this.loader,a=this.stats;if(!h||!d)return;var u=d.readyState,s=this.config;if(a.aborted)return;if(u>=2)if(self.clearTimeout(this.requestTimeout),a.loading.first===0&&(a.loading.first=Math.max(self.performance.now(),a.loading.start)),u===4){d.onreadystatechange=null,d.onprogress=null;var f=d.status;if(f>=200&&f<300){a.loading.end=Math.max(self.performance.now(),a.loading.first);var i,n;if(h.responseType==="arraybuffer"?(i=d.response,n=i.byteLength):(i=d.responseText,n=i.length),a.loaded=a.total=n,!this.callbacks)return;var t=this.callbacks.onProgress;if(t&&t(a,h,i,d),!this.callbacks)return;var c={url:d.responseURL,data:i};this.callbacks.onSuccess(c,a,h,d)}else a.retry>=s.maxRetry||f>=400&&f<499?(w.logger.error(f+" while loading "+h.url),this.callbacks.onError({code:f,text:d.statusText},h,d)):(w.logger.warn(f+" while loading "+h.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),a.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout)},l.loadtimeout=function(){w.logger.warn("timeout while loading "+this.context.url);var h=this.callbacks;h&&(this.abortInternal(),h.onTimeout(this.stats,this.context,this.loader))},l.loadprogress=function(h){var d=this.stats;d.loaded=h.loaded,h.lengthComputable&&(d.total=h.total)},l.getCacheAge=function(){var h=null;if(this.loader&&S.test(this.loader.getAllResponseHeaders())){var d=this.loader.getResponseHeader("age");h=d?parseFloat(d):null}return h},T}();Z.default=O}}).default})},vHTk:function($e,We,z){$e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function($e,We,z){"use strict";z.d(We,"a",function(){return Y});var ae=z("rePB"),Z=z("VTBJ"),U=z("KQm4"),w=z("U8pU"),P=z("ODXe"),S=z("q1tI"),O=z("TSYQ"),T=z.n(O),l=z("Gytx"),p=z.n(l),h=z("Kwbf"),d=z("t23M"),a=z("qx4F"),u=z("6eGT"),s=z("IBYe"),f=z("Ff2n"),i=z("c+Xe"),n=z("fyJ8"),t=z("biw7");function c(De,Me,Xe,tt,Ve){var Ke=Xe[De]||{},we=Xe[Me]||{},Ae,Oe;Ke.fixed==="left"?Ae=tt.left[De]:we.fixed==="right"&&(Oe=tt.right[Me]);var fe=!1,ge=!1,_e=!1,be=!1,Ge=Xe[Me+1],qe=Xe[De-1];if(Ve==="rtl"){if(Ae!==void 0){var pt=qe&&qe.fixed==="left";be=!pt}else if(Oe!==void 0){var Dt=Ge&&Ge.fixed==="right";_e=!Dt}}else if(Ae!==void 0){var jt=Ge&&Ge.fixed==="left";fe=!jt}else if(Oe!==void 0){var Rt=qe&&qe.fixed==="right";ge=!Rt}return{fixLeft:Ae,fixRight:Oe,lastFixLeft:fe,firstFixRight:ge,lastFixRight:_e,firstFixLeft:be,isSticky:tt.isSticky}}var y=z("sR1s");function v(De){var Me=De.cells,Xe=De.stickyOffsets,tt=De.flattenColumns,Ve=De.rowComponent,Ke=De.cellComponent,we=De.onHeaderRow,Ae=De.index,Oe=S.useContext(t.a),fe=Oe.prefixCls,ge=Oe.direction,_e;we&&(_e=we(Me.map(function(Ge){return Ge.column}),Ae));var be=Object(y.a)(Me.map(function(Ge){return Ge.column}));return S.createElement(Ve,Object.assign({},_e),Me.map(function(Ge,qe){var pt=Ge.column,Dt=c(Ge.colStart,Ge.colEnd,tt,Xe,ge),jt;return pt&&pt.onHeaderCell&&(jt=Ge.column.onHeaderCell(pt)),S.createElement(n.a,Object.assign({},Ge,{ellipsis:pt.ellipsis,align:pt.align,component:Ke,prefixCls:fe,key:be[qe]},Dt,{additionalProps:jt,rowType:"header"}))}))}v.displayName="HeaderRow";var _=v;function b(De){var Me=[];function Xe(we,Ae){var Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Me[Oe]=Me[Oe]||[];var fe=Ae,ge=we.filter(Boolean).map(function(_e){var be={key:_e.key,className:_e.className||"",children:_e.title,column:_e,colStart:fe},Ge=1,qe=_e.children;return qe&&qe.length>0&&(Ge=Xe(qe,fe,Oe+1).reduce(function(pt,Dt){return pt+Dt},0),be.hasSubColumns=!0),"colSpan"in _e&&(Ge=_e.colSpan),"rowSpan"in _e&&(be.rowSpan=_e.rowSpan),be.colSpan=Ge,be.colEnd=be.colStart+Ge-1,Me[Oe].push(be),fe+=Ge,Ge});return ge}Xe(De,0);for(var tt=Me.length,Ve=function(Ae){Me[Ae].forEach(function(Oe){!("rowSpan"in Oe)&&!Oe.hasSubColumns&&(Oe.rowSpan=tt-Ae)})},Ke=0;Ke=0;Ae-=1){var Oe=Me[Ae],fe=Xe&&Xe[Ae],ge=fe&&fe[E.a];(Oe||ge||we)&&(Ve.unshift(S.createElement("col",Object.assign({key:Ae,style:{width:Oe,minWidth:Oe}},ge))),we=!0)}return S.createElement("colgroup",null,Ve)}var x=o;function C(De,Me){return Object(S.useMemo)(function(){for(var Xe=[],tt=0;tt1?En-1:0),un=1;un=_e&&(Gt=_e-be),we({scrollLeft:Gt/_e*(ge+2)}),Rt.current.x=ot.pageX},Ze=function(){var ot=Object(Ye.b)(Ke.current).top,gt=ot+Ke.current.offsetHeight,kt=document.documentElement.scrollTop+window.innerHeight;gt-Object(a.a)()<=kt||ot>=kt-Ae?jt(function(Kt){return Object(Z.a)(Object(Z.a)({},Kt),{},{isHiddenScrollBar:!0})}):jt(function(Kt){return Object(Z.a)(Object(Z.a)({},Kt),{},{isHiddenScrollBar:!1})})},Tt=function(ot){jt(function(gt){return Object(Z.a)(Object(Z.a)({},gt),{},{scrollLeft:ot/ge*_e||0})})};return S.useImperativeHandle(Xe,function(){return{setScrollLeft:Tt}}),S.useEffect(function(){var Ct=Object(Ue.a)(document.body,"mouseup",Te,!1),ot=Object(Ue.a)(document.body,"mousemove",dt,!1);return Ze(),function(){Ct.remove(),ot.remove()}},[be,ft]),S.useEffect(function(){var Ct=Object(Ue.a)(window,"scroll",Ze,!1),ot=Object(Ue.a)(window,"resize",Ze,!1);return function(){Ct.remove(),ot.remove()}},[]),S.useEffect(function(){Dt.isHiddenScrollBar||jt(function(Ct){var ot,gt;return Object(Z.a)(Object(Z.a)({},Ct),{},{scrollLeft:Ke.current.scrollLeft/((ot=Ke.current)===null||ot===void 0?void 0:ot.scrollWidth)*((gt=Ke.current)===null||gt===void 0?void 0:gt.clientWidth)})})},[Dt.isHiddenScrollBar]),ge<=_e||!be||Dt.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(a.a)(),width:_e,bottom:Ae},className:"".concat(fe,"-sticky-scroll")},S.createElement("div",{onMouseDown:je,ref:Ge,className:T()("".concat(fe,"-sticky-scroll-bar"),Object(ae.a)({},"".concat(fe,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(be,"px"),transform:"translate3d(".concat(Dt.scrollLeft,"px, 0, 0)")}}))},M=S.forwardRef(ee);function N(De,Me){return S.useMemo(function(){var Xe=!!De;return{isSticky:Xe,stickyClassName:Xe?"".concat(Me,"-sticky-header"):"",offsetHeader:Object(w.a)(De)==="object"&&De.offsetHeader||0,offsetScroll:Object(w.a)(De)==="object"&&De.offsetScroll||0}},[De,Me])}var $=[],V={},Y="rc-table-internal-hook",me=S.memo(function(De){var Me=De.children;return Me},function(De,Me){return p()(De.props,Me.props)?De.pingLeft!==Me.pingLeft||De.pingRight!==Me.pingRight:!1});function Re(De){var Me,Xe=De.prefixCls,tt=De.className,Ve=De.rowClassName,Ke=De.style,we=De.data,Ae=De.rowKey,Oe=De.scroll,fe=De.tableLayout,ge=De.direction,_e=De.title,be=De.footer,Ge=De.summary,qe=De.id,pt=De.showHeader,Dt=De.components,jt=De.emptyText,Rt=De.onRow,Lt=De.onHeaderRow,lt=De.internalHooks,ft=De.transformColumns,Qe=De.internalRefs,Te=De.sticky,je=we||$,dt=!!je.length,Ze=S.useState(0),Tt=Object(P.a)(Ze,2),Ct=Tt[0],ot=Tt[1];S.useEffect(function(){ot(Object(a.a)())});var gt=S.useMemo(function(){return Object(y.c)(Dt,{})},[Dt]),kt=S.useCallback(function(st,bt){return Object(y.b)(gt,st)||bt},[gt]),Kt=S.useMemo(function(){return typeof Ae=="function"?Ae:function(st){var bt=st&&st[Ae];return bt}},[Ae]),Gt=Object(E.c)(De),Se=Gt.expandIcon,de=Gt.expandedRowKeys,W=Gt.defaultExpandedRowKeys,q=Gt.defaultExpandAllRows,ne=Gt.expandedRowRender,se=Gt.onExpand,xe=Gt.onExpandedRowsChange,He=Gt.expandRowByClick,Je=Gt.rowExpandable,Et=Gt.expandIconColumnIndex,St=Gt.expandedRowClassName,nt=Gt.childrenColumnName,xt=Gt.indentSize,ut=Se||ue,_t=nt||"children",Qt=S.useMemo(function(){return ne?"row":De.expandable&<===Y&&De.expandable.__PARENT_RENDER_ICON__||je.some(function(st){return st&&Object(w.a)(st)==="object"&&st[_t]})?"nest":!1},[!!ne,je]),Xt=S.useState(function(){return W||(q?Ie(je,Kt,_t):[])}),Mt=Object(P.a)(Xt,2),mt=Mt[0],Cn=Mt[1],En=S.useMemo(function(){return new Set(de||mt||[])},[de,mt]),Jt=S.useCallback(function(st){var bt=Kt(st,je.indexOf(st)),At,nn=En.has(bt);nn?(En.delete(bt),At=Object(U.a)(En)):At=[].concat(Object(U.a)(En),[bt]),Cn(At),se&&se(!nn,st),xe&&xe(At)},[Kt,En,je,se,xe]),un=S.useState(0),Jn=Object(P.a)(un,2),ar=Jn[0],mn=Jn[1],gr=Object(Ee.b)(Object(Z.a)(Object(Z.a)(Object(Z.a)({},De),Gt),{},{expandable:!!ne,expandedKeys:En,getRowKey:Kt,onTriggerExpand:Jt,expandIcon:ut,expandIconColumnIndex:Et,direction:ge}),lt===Y?ft:null),Rr=Object(P.a)(gr,2),vn=Rr[0],An=Rr[1],_r=S.useMemo(function(){return{columns:vn,flattenColumns:An}},[vn,An]),Zr=S.useRef(),jr=S.useRef(),tr=S.useRef(),ur=S.useState(!1),yi=Object(P.a)(ur,2),xr=yi[0],Cr=yi[1],Sr=S.useState(!1),Vr=Object(P.a)(Sr,2),Mr=Vr[0],Si=Vr[1],Or=pe(new Map),ei=Object(P.a)(Or,2),ri=ei[0],Xr=ei[1],ui=Object(y.a)(An),Ri=ui.map(function(st){return ri.get(st)}),bi=S.useMemo(function(){return Ri},[Ri.join("_")]),ii=Pe(bi,An.length,ge),yr=Oe&&Object(y.d)(Oe.y),or=Oe&&Object(y.d)(Oe.x),ai=or&&An.some(function(st){var bt=st.fixed;return bt}),Di=S.useRef(),Ni=N(Te,Xe),wi=Ni.isSticky,ga=Ni.offsetHeader,la=Ni.offsetScroll,tn=Ni.stickyClassName,xn,fn,Zn;yr&&(fn={overflowY:"scroll",maxHeight:Oe.y}),or&&(xn={overflowX:"auto"},yr||(fn={overflowY:"hidden"}),Zn={width:Oe.x===!0?"auto":Oe.x,minWidth:"100%"});var nr=S.useCallback(function(st,bt){Xr(function(At){var nn=new Map(At);return nn.set(st,bt),nn})},[]),cr=Ce(null),hr=Object(P.a)(cr,2),pr=hr[0],kr=hr[1];function oi(st,bt){if(!bt)return;typeof bt=="function"?bt(st):bt.scrollLeft!==st&&(bt.scrollLeft=st)}var er=function(bt){var At=bt.currentTarget,nn=bt.scrollLeft,en=typeof nn=="number"?nn:At.scrollLeft,ht=At||V;if(!kr()||kr()===ht){var ct;pr(ht),oi(en,jr.current),oi(en,tr.current),oi(en,(ct=Di.current)===null||ct===void 0?void 0:ct.setScrollLeft)}if(At){var Ft=At.scrollWidth,vt=At.clientWidth;Cr(en>0),Si(en0?[].concat(Object(Z.a)(f),Object(Z.a)(h(c).map(function(y){return Object(U.a)({fixed:t},y)}))):[].concat(Object(Z.a)(f),[Object(U.a)(Object(U.a)({},i),{},{fixed:t})])},[])}function d(s){for(var f=!0,i=0;i=0;c-=1){var y=s[c];if(t&&y.fixed!=="right")t=!1;else if(!t&&y.fixed==="right"){Object(O.a)(!1,"Index ".concat(c+1," of `columns` missing `fixed='right'` prop."));break}}}function a(s){return s.map(function(f){var i=f.fixed,n=Object(w.a)(f,["fixed"]),t=i;return i==="left"?t="right":i==="right"&&(t="left"),Object(U.a)({fixed:t},n)})}function u(s,f){var i=s.prefixCls,n=s.columns,t=s.children,c=s.expandable,y=s.expandedKeys,v=s.getRowKey,_=s.onTriggerExpand,b=s.expandIcon,m=s.rowExpandable,g=s.expandIconColumnIndex,E=s.direction,o=s.expandRowByClick,x=P.useMemo(function(){return n||p(t)},[n,t]),C=P.useMemo(function(){if(c){var I,F=g||0,H=x[F],te=(I={},Object(ae.a)(I,l.a,{className:"".concat(i,"-expand-icon-col")}),Object(ae.a)(I,"title",""),Object(ae.a)(I,"fixed",H?H.fixed:null),Object(ae.a)(I,"className","".concat(i,"-row-expand-icon-cell")),Object(ae.a)(I,"render",function(X,J,B){var Q=v(J,B),ie=y.has(Q),oe=m?m(J):!0,Ee=b({prefixCls:i,expanded:ie,expandable:oe,record:J,onExpand:_});return o?P.createElement("span",{onClick:function(Le){return Le.stopPropagation()}},Ee):Ee}),I),j=x.slice();return F>=0&&j.splice(F,0,te),j}return x},[c,x,v,y,b,E]),A=P.useMemo(function(){var I=C;return f&&(I=f(I)),I.length||(I=[{render:function(){return null}}]),I},[f,C,E]),D=P.useMemo(function(){return E==="rtl"?a(h(A)):h(A)},[A,E]);return[A,D]}We.b=u},wW8i:function($e,We,z){$e.exports={flex_box_center:"flex_box_center___3xqQI",flex_space_between:"flex_space_between___1fvHN",flex_box_vertical_center:"flex_box_vertical_center___1Gb4J",flex_box_center_end:"flex_box_center_end___8RbQi",flex_box_column:"flex_box_column___3xL78",discuss:"discuss___ybobd",reply:"reply___3EgHc",pagination:"pagination___2EiMG"}},"y0+3":function($e,We,z){"use strict";z.d(We,"a",function(){return h}),z.d(We,"b",function(){return a});var ae=/margin|padding|width|height|max|min|offset/,Z={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function w(u){return u.nodeType===1?u.ownerDocument.defaultView.getComputedStyle(u,null):{}}function P(u,s,f){if(s=s.toLowerCase(),f==="auto"){if(s==="height")return u.offsetHeight;if(s==="width")return u.offsetWidth}return s in Z||(Z[s]=ae.test(s)),Z[s]?parseFloat(f)||0:f}function S(u,s){var f=arguments.length,i=w(u);return s=U[s]?"cssFloat"in u.style?"cssFloat":"styleFloat":s,f===1?i:P(u,s,i[s]||u.style[s])}function O(u,s,f){var i=arguments.length;if(s=U[s]?"cssFloat"in u.style?"cssFloat":"styleFloat":s,i===3)return typeof f=="number"&&ae.test(s)&&(f="".concat(f,"px")),u.style[s]=f,f;for(var n in s)s.hasOwnProperty(n)&&O(u,n,s[n]);return w(u)}function T(u){return u===document.body?document.documentElement.clientWidth:u.offsetWidth}function l(u){return u===document.body?window.innerHeight||document.documentElement.clientHeight:u.offsetHeight}function p(){var u=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),s=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:u,height:s}}function h(){var u=document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return{width:u,height:s}}function d(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function a(u){var s=u.getBoundingClientRect(),f=document.documentElement;return{left:s.left+(window.pageXOffset||f.scrollLeft)-(f.clientLeft||document.body.clientLeft||0),top:s.top+(window.pageYOffset||f.scrollTop)-(f.clientTop||document.body.clientTop||0)}}},ynwM:function($e,We,z){var ae=z("MFOe"),Z=ae.Global;$e.exports={name:"oldFF-globalStorage",read:w,write:P,each:S,remove:O,clearAll:T};var U=Z.globalStorage;function w(l){return U[l]}function P(l,p){U[l]=p}function S(l){for(var p=U.length-1;p>=0;p--){var h=U.key(p);l(U[h],h)}}function O(l){return U.removeItem(l)}function T(){S(function(l,p){delete U[l]})}}}]);