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

1415 lines
1.5 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

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

(window.webpackJsonp=window.webpackJsonp||[]).push([[184,3,5,7,9,20],{"++UQ":
/*!***************************************************************!*\
!*** ./src/pages/Question/OjProblem/TestCasePanel/index.less ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"+NIl":
/*!***************************************************!*\
!*** ./node_modules/codemirror/mode/stex/stex.js ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function o(e,t){e.f=t}function s(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),o(t,c),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return o(t,(function(e,t){return l(e,t,"\\]")})),"keyword";if(e.match("\\("))return o(t,(function(e,t){return l(e,t,"\\)")})),"keyword";if(e.match("$$"))return o(t,(function(e,t){return l(e,t,"$$")})),"keyword";if(e.match("$"))return o(t,(function(e,t){return l(e,t,"$")})),"keyword";var u=e.next();return"%"==u?(e.skipToEnd(),"comment"):"}"==u||"]"==u?(i=r(t))?(i.closeBracket(u),o(t,c),"bracket"):"error":"{"==u||"["==u?(n(t,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(u)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=function(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function l(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return o(t,s),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function c(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),o(t,s),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(o(t,s),function(e){var t=e.cmdState.pop();t&&t.closeBracket()}(t),s(e,t))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return l(e,t)}:s}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=s,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(/*! ../../lib/codemirror */"VrN/"))},"+QRC":
/*!*************************************************!*\
!*** ./node_modules/copy-to-clipboard/index.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! toggle-selection */"E9nw"),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,o,s,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(o=r(),s=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=i[t.format]||i.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),s.selectNodeContents(c),l.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(s):l.removeAllRanges()),c&&document.body.removeChild(c),o()}return u}},"07cG":
/*!***************************************************!*\
!*** ./src/components/Spinner/index.less?modules ***!
\***************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0r65":
/*!******************************************!*\
!*** ./node_modules/webworkify/index.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){var n=arguments[3],r=arguments[4],i=arguments[5],a=JSON.stringify;e.exports=function(e,t){for(var o,s=Object.keys(i),l=0,c=s.length;l<c;l++){var u=s[l],d=i[u].exports;if(d===e||d&&d.default===e){o=u;break}}if(!o){o=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var f={};for(l=0,c=s.length;l<c;l++){f[u=s[l]]=u}r[o]=["function(require,module,exports){"+e+"(self); }",f]}var h=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[o]=o,r[h]=["function(require,module,exports){var f = require("+a(o)+");(f.default ? f.default : f)(self);}",p];var m={};!function e(t){for(var n in m[t]=!0,r[t][1]){var i=r[t][1][n];m[i]||e(i)}}(h);var v="("+n+")({"+Object.keys(m).map((function(e){return a(e)+":["+r[e][0]+","+a(r[e][1])+"]"})).join(",")+"},{},["+a(h)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([v],{type:"text/javascript"});if(t&&t.bare)return y;var b=g.createObjectURL(y),_=new Worker(b);return _.objectURL=b,_}},"19Vz":
/*!**************************************************************!*\
!*** ./node_modules/codemirror/addon/display/placeholder.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){a(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=a(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(a,o,s){var l=s&&s!=e.Init;if(o&&!l)a.on("blur",r),a.on("change",i),a.on("swapDoc",i),e.on(a.getInputField(),"compositionupdate",a.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}(a)}),i(a);else if(!o&&l){a.off("blur",r),a.off("change",i),a.off("swapDoc",i),e.off(a.getInputField(),"compositionupdate",a.state.placeholderCompose),t(a);var c=a.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}o&&!a.hasFocus()&&r(a)}))}(n(/*! ../../lib/codemirror */"VrN/"))},"1FX+":
/*!******************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/index.less?modules ***!
\******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___t3HuD",flex_space_between:"flex_space_between___3eY6W",flex_box_vertical_center:"flex_box_vertical_center___SMD2f",flex_box_center_end:"flex_box_center_end___1qy96",flex_box_column:"flex_box_column___1iEso",wrap:"wrap___3Vyua",head:"head___HUi2n",sort:"sort___1UPxB",btn:"btn___2b6SJ",listWarp:"listWarp___1pNnP",pagination:"pagination___3I0F3",fixedRight:"fixedRight___527Xj","oj-width-input":"oj-width-input___QQMFK"}},"1eCo":
/*!*************************************************!*\
!*** ./node_modules/codemirror/mode/xml/xml.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=d;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function f(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=d,t.state=g,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function p(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function m(e){e.context&&(e.context=e.context.prev)}function v(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;m(e)}}function g(e,t,n){return"openTag"==e?(n.tagStart=t.column(),y):"closeTag"==e?b:g}function y(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",x):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",x(e,0,n)):(o="error",y)}function b(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",_):(o="tag error",E)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",_(e,0,n)):(o="error",E)}function _(e,t,n){return"endTag"!=e?(o="error",_):(m(n),g)}function E(e,t,n){return o="error",_(e,0,n)}function x(e,t,n){if("word"==e)return o="attribute",S;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?v(n,r):(v(n,r),n.context=new p(n,r,i==n.indented)),g}return o="error",x}function S(e,t,n){return"equals"==e?w:(l.allowMissing||(o="error"),x(e,0,n))}function w(e,t,n){return"string"==e?k:"word"==e&&l.allowUnquoted?(o="string",x):(o="error",x(e,0,n))}function k(e,t,n){return"string"==e?k:x(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:g,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;i;){if(i.tagName==a[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(a)for(;i;){var o=l.contextGrabbers[i.tagName];if(!o||!o.hasOwnProperty(a[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=x)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(/*! ../../lib/codemirror */"VrN/"))},"1j5w":
/*!*******************************************************!*\
!*** ./node_modules/rc-menu/es/index.js + 11 modules ***!
\*******************************************************/
/*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */
/*! exports used: Divider, Item, ItemGroup, SubMenu, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"d",(function(){return oe})),n.d(t,"b",(function(){return _e})),n.d(t,"c",(function(){return xe})),n.d(t,"a",(function(){return we}));var r=n("VTBJ"),i=n("1OyB"),a=n("vuIU"),o=n("JX7q"),s=n("Ji7U"),l=n("LK+K"),c=n("q1tI"),u=n("I8Z2"),d=n("BGR+"),f=n("wx14"),h=n("rePB"),p=n("4IlW"),m=n("2GS6"),v=n("Gytx"),g=n.n(v),y=n("TSYQ"),b=n.n(y),_=n("U8pU"),E=n("ODXe"),x=/iPhone/i,S=/iPod/i,w=/iPad/i,k=/\bAndroid(?:.+)Mobile\b/i,T=/Android/i,O=/\bAndroid(?:.+)SD4930UR\b/i,C=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,A=/Windows Phone/i,L=/\bWindows(?:.+)ARM\b/i,D=/BlackBerry/i,I=/BB10/i,R=/Opera Mini/i,N=/\b(CriOS|Chrome)(?:.+)Mobile/i,M=/Mobile(?:.+)Firefox\b/i;function P(e,t){return e.test(t)}function j(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=t.split("[FBAN");if(void 0!==n[1]){var r=n;t=Object(E.a)(r,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var i=n;t=Object(E.a)(i,1)[0]}var a={apple:{phone:P(x,t)&&!P(A,t),ipod:P(S,t),tablet:!P(x,t)&&P(w,t)&&!P(A,t),device:(P(x,t)||P(S,t)||P(w,t))&&!P(A,t)},amazon:{phone:P(O,t),tablet:!P(O,t)&&P(C,t),device:P(O,t)||P(C,t)},android:{phone:!P(A,t)&&P(O,t)||!P(A,t)&&P(k,t),tablet:!P(A,t)&&!P(O,t)&&!P(k,t)&&(P(C,t)||P(T,t)),device:!P(A,t)&&(P(O,t)||P(C,t)||P(k,t)||P(T,t))||P(/\bokhttp\b/i,t)},windows:{phone:P(A,t),tablet:P(L,t),device:P(A,t)||P(L,t)},other:{blackberry:P(D,t),blackberry10:P(I,t),opera:P(R,t),firefox:P(M,t),chrome:P(N,t),device:P(D,t)||P(I,t)||P(R,t)||P(M,t)||P(N,t)},any:null,phone:null,tablet:null};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var F=Object(r.a)(Object(r.a)({},j()),{},{isMobile:j});function U(){}function B(e,t,n){var r=t||"";return e.key||"".concat(r,"item_").concat(n)}function G(e){return"".concat(e,"-menu-")}function z(e,t){var n=-1;c.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?c.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var H=["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"],K=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var r=getComputedStyle(e),i=r.marginLeft,a=r.marginRight;n+=+i.replace("px","")+ +a.replace("px","")}n=+n.toFixed(6)}return n||0},V=function(e,t,n){e&&"object"===Object(_.a)(e.style)&&(e.style[t]=n)},W=n("KQm4"),q=n("Ff2n"),X=n("i8i4"),Y=n("bdgK"),$=n("uciX"),J=n("8XRh"),Q={adjustX:1,adjustY:1},Z={topLeft:{points:["bl","tl"],overflow:Q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Q,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Q,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Q,offset:[4,0]}},ee={topLeft:{points:["bl","tl"],overflow:Q,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Q,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Q,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Q,offset:[4,0]}},te=0,ne={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},re=function(e,t,n){var i=G(t),a=e.getState();e.setState({defaultActiveFirst:Object(r.a)(Object(r.a)({},a.defaultActiveFirst),{},Object(h.a)({},i,n))})},ie=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).onDestroy=function(e){a.props.onDestroy(e)},a.onKeyDown=function(e){var t=e.keyCode,n=a.menuInstance,r=a.props,i=r.isOpen,o=r.store;if(t===p.a.ENTER)return a.onTitleClick(e),re(o,a.props.eventKey,!0),!0;if(t===p.a.RIGHT)return i?n.onKeyDown(e):(a.triggerOpenChange(!0),re(o,a.props.eventKey,!0)),!0;if(t===p.a.LEFT){var s;if(!i)return;return(s=n.onKeyDown(e))||(a.triggerOpenChange(!1),s=!0),s}return!i||t!==p.a.UP&&t!==p.a.DOWN?void 0:n.onKeyDown(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onPopupVisibleChange=function(e){a.triggerOpenChange(e,e?"mouseenter":"mouseleave")},a.onMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onMouseEnter,i=t.store;re(i,a.props.eventKey,!1),r({key:n,domEvent:e})},a.onMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,domEvent:e})},a.onTitleMouseEnter=function(e){var t=a.props,n=t.eventKey,r=t.onItemHover,i=t.onTitleMouseEnter;r({key:n,hover:!0}),i({key:n,domEvent:e})},a.onTitleMouseLeave=function(e){var t=a.props,n=t.parentMenu,r=t.eventKey,i=t.onItemHover,s=t.onTitleMouseLeave;n.subMenuInstance=Object(o.a)(a),i({key:r,hover:!1}),s({key:r,domEvent:e})},a.onTitleClick=function(e){var t=Object(o.a)(a).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(a.triggerOpenChange(!t.isOpen,"click"),re(t.store,a.props.eventKey,!1))},a.onSubMenuClick=function(e){"function"==typeof a.props.onClick&&a.props.onClick(a.addKeyPath(e))},a.onSelect=function(e){a.props.onSelect(e)},a.onDeselect=function(e){a.props.onDeselect(e)},a.getPrefixCls=function(){return"".concat(a.props.rootPrefixCls,"-submenu")},a.getActiveClassName=function(){return"".concat(a.getPrefixCls(),"-active")},a.getDisabledClassName=function(){return"".concat(a.getPrefixCls(),"-disabled")},a.getSelectedClassName=function(){return"".concat(a.getPrefixCls(),"-selected")},a.getOpenClassName=function(){return"".concat(a.props.rootPrefixCls,"-submenu-open")},a.saveMenuInstance=function(e){a.menuInstance=e},a.addKeyPath=function(e){return Object(r.a)(Object(r.a)({},e),{},{keyPath:(e.keyPath||[]).concat(a.props.eventKey)})},a.triggerOpenChange=function(e,t){var n=a.props.eventKey,r=function(){a.onOpenChange({key:n,item:Object(o.a)(a),trigger:t,open:e})};"mouseenter"===t?a.mouseenterTimeout=setTimeout((function(){r()}),0):r()},a.isChildrenSelected=function(){var e={find:!1};return function e(t,n,r){t&&!r.find&&c.Children.forEach(t,(function(t){if(t){var i=t.type;if(!i||!(i.isSubMenu||i.isMenuItem||i.isMenuItemGroup))return;-1!==n.indexOf(t.key)?r.find=!0:t.props.children&&e(t.props.children,n,r)}}))}(a.props.children,a.props.selectedKeys,e),e.find},a.isOpen=function(){return-1!==a.props.openKeys.indexOf(a.props.eventKey)},a.adjustWidth=function(){if(a.subMenuTitle&&a.menuInstance){var e=X.findDOMNode(a.menuInstance);e.offsetWidth>=a.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(a.subMenuTitle.offsetWidth,"px"))}},a.saveSubMenuTitle=function(e){a.subMenuTitle=e},a.getBaseProps=function(){var e=Object(o.a)(a).props;return{mode:"horizontal"===e.mode?"vertical":e.mode,visible:a.props.isOpen,level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:a.onSubMenuClick,onSelect:a.onSelect,onDeselect:a.onDeselect,onDestroy:a.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:a.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(o.a)(a),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[G(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:a.internalMenuId,manualRef:a.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},a.getMotion=function(e,t){var n=Object(o.a)(a).haveRendered,i=a.props,s=i.motion,l=i.rootPrefixCls;return Object(r.a)(Object(r.a)({},s),{},{leavedClassName:"".concat(l,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var s=e.store,l=e.eventKey,u=s.getState().defaultActiveFirst;a.isRootMenu=!1;var d=!1;return u&&(d=u[l]),re(s,l,d),a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,i=t.manualRef;i&&i(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.getBaseProps(),r=this.getMotion(n.mode,n.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||n.visible||n.forceSubMenuRender,!this.haveOpened)return c.createElement("div",null);var i=n.direction;return c.createElement(J.default,Object.assign({visible:n.visible},r),(function(r){var a=r.className,o=r.style,s=b()("".concat(n.prefixCls,"-sub"),a,Object(h.a)({},"".concat(n.prefixCls,"-rtl"),"rtl"===i));return c.createElement(pe,Object.assign({},n,{id:t.internalMenuId,className:s,style:o}),e)}))}},{key:"render",value:function(){var e,t=Object(r.a)({},this.props),n=t.isOpen,i=this.getPrefixCls(),a="inline"===t.mode,o=b()(i,"".concat(i,"-").concat(t.mode),(e={},Object(h.a)(e,t.className,!!t.className),Object(h.a)(e,this.getOpenClassName(),n),Object(h.a)(e,this.getActiveClassName(),t.active||n&&!a),Object(h.a)(e,this.getDisabledClassName(),t.disabled),Object(h.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(te+=1,this.internalMenuId="$__$".concat(te,"$Menu")));var s={},l={},u={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},l={onClick:this.onTitleClick},u={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var d={},f=t.direction;a&&("rtl"===f?d.paddingRight=t.inlineIndent*t.level:d.paddingLeft=t.inlineIndent*t.level);var p={};this.props.isOpen&&(p={"aria-owns":this.internalMenuId});var m=null;"horizontal"!==t.mode&&(m=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(m=c.createElement(this.props.expandIcon,Object(r.a)({},this.props))));var v=c.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:d,className:"".concat(i,"-title"),role:"button"},u,l,{"aria-expanded":n},p,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,m||c.createElement("i",{className:"".concat(i,"-arrow")})),g=this.renderChildren(t.children),y=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},_=ne[t.mode],E=t.popupOffset?{offset:t.popupOffset}:{},x="inline"===t.mode?"":t.popupClassName;x+="rtl"===f?" ".concat(i,"-rtl"):"";var S=t.disabled,w=t.triggerSubMenuAction,k=t.subMenuOpenDelay,T=t.forceSubMenuRender,O=t.subMenuCloseDelay,C=t.builtinPlacements;H.forEach((function(e){return delete t[e]})),delete t.onClick;var A="rtl"===f?Object.assign({},ee,C):Object.assign({},Z,C);return delete t.direction,c.createElement("li",Object.assign({},t,s,{className:o,role:"menuitem"}),a&&v,a&&g,!a&&c.createElement($.a,{prefixCls:i,popupClassName:b()("".concat(i,"-popup"),x),getPopupContainer:y,builtinPlacements:A,popupPlacement:_,popupVisible:n,popupAlign:E,popup:g,action:S?[]:[w],mouseEnterDelay:k,mouseLeaveDelay:O,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:T},v))}}]),n}(c.Component);ie.defaultProps={onMouseEnter:U,onMouseLeave:U,onTitleMouseEnter:U,onTitleMouseLeave:U,onTitleClick:U,manualRef:U,mode:"vertical",title:""};var ae=Object(u.b)((function(e,t){var n=e.openKeys,r=e.activeKey,i=e.selectedKeys,a=t.eventKey,o=t.subMenuKey;return{isOpen:n.indexOf(a)>-1,active:r[o]===a,selectedKeys:i}}))(ie);ae.isSubMenu=!0;var oe=ae,se=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=X.findDOMNode(Object(o.a)(e));return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,i){var a=e.props,o=a.overflowedIndicator,s=a.level,l=a.mode,u=a.prefixCls,d=a.theme;if(1!==s||"horizontal"!==l)return null;var f=e.props.children[0].props,h=(f.children,f.title,f.style),p=Object(q.a)(f,["children","title","style"]),m=Object(r.a)({},h),v="".concat(t,"-overflowed-indicator"),g="".concat(t,"-overflowed-indicator");0===n.length&&!0!==i?m=Object(r.a)(Object(r.a)({},m),{},{display:"none"}):i&&(m=Object(r.a)(Object(r.a)({},m),{},{visibility:"hidden",position:"absolute"}),v="".concat(v,"-placeholder"),g="".concat(g,"-placeholder"));var y=d?"".concat(u,"-").concat(d):"",b={};return H.forEach((function(e){void 0!==p[e]&&(b[e]=p[e])})),c.createElement(oe,Object.assign({title:o,className:"".concat(u,"-overflowed-submenu"),popupClassName:y},b,{key:v,eventKey:g,disabled:!1,style:m}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=X.findDOMNode(Object(o.a)(e));if(t){var n=t.children;if(n&&0!==n.length){var r=t.children[n.length-1];V(r,"display","inline-block");var i=e.getMenuItemNodes(),a=i.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));a.forEach((function(e){V(e,"display","inline-block")})),e.menuItemSizes=i.map((function(e){return K(e,!0)})),a.forEach((function(e){V(e,"display","none")})),e.overflowedIndicatorWidth=K(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),V(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=X.findDOMNode(Object(o.a)(e));if(t){var n=K(t);e.overflowedItems=[];var r,i=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(i+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=X.findDOMNode(this);if(!t)return;this.resizeObserver=new Y.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{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(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(r,i,a){var o=i;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(o=c.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return c.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var l=[].concat(Object(W.a)(r),[s,o]);return a===e.length-1&&l.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(Object(W.a)(r),[o])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,r=(e.theme,Object(q.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return c.createElement(i,Object.assign({},r),this.renderChildren(n))}}]),n}(c.Component);se.defaultProps={tag:"div",className:""};var le=se;function ce(e,t,n){var i=e.getState();e.setState({activeKey:Object(r.a)(Object(r.a)({},i.activeKey),{},Object(h.a)({},t,n))})}function ue(e){return e.eventKey||"0-menu-"}function de(e,t){var n,r=t,i=e.children,a=e.eventKey;if(r&&(z(i,(function(e,t){e&&e.props&&!e.props.disabled&&r===B(e,a,t)&&(n=!0)})),n))return r;return r=null,e.defaultActiveFirst?(z(i,(function(e,t){r||!e||e.props.disabled||(r=B(e,a,t))})),r):r}function fe(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var he=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).onKeyDown=function(e,t){var n,r=e.keyCode;if(a.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var i=null;return r!==p.a.UP&&r!==p.a.DOWN||(i=a.step(r===p.a.UP?-1:1)),i?(e.preventDefault(),ce(a.props.store,ue(a.props),i.props.eventKey),"function"==typeof t&&t(i),1):void 0},a.onItemHover=function(e){var t=e.key,n=e.hover;ce(a.props.store,ue(a.props),n?t:null)},a.onDeselect=function(e){a.props.onDeselect(e)},a.onSelect=function(e){a.props.onSelect(e)},a.onClick=function(e){a.props.onClick(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onDestroy=function(e){a.props.onDestroy(e)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(e){var t=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[ue(a.props)],r=t.length;if(!r)return null;e<0&&(t=t.concat().reverse());var i=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(i=t,!1)})),a.props.defaultActiveFirst||-1===i||(o=t.slice(i,r-1)).length&&!o.every((function(e){return!!e.props.disabled}))){var o,s=(i+1)%r,l=s;do{var c=t[l];if(c&&!c.props.disabled)return c;l=(l+1)%r}while(l!==s);return null}},a.renderCommonMenuItem=function(e,t,n){var i=a.props.store.getState(),s=Object(o.a)(a).props,l=B(e,s.eventKey,t),u=e.props;if(!u||"string"==typeof e.type)return e;var d=l===i.activeKey,f=Object(r.a)(Object(r.a)({mode:u.mode||s.mode,level:s.level,inlineIndent:s.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:s.prefixCls,index:t,parentMenu:s.parentMenu,manualRef:u.disabled?void 0:Object(m.a)(e.ref,fe.bind(Object(o.a)(a))),eventKey:l,active:!u.disabled&&d,multiple:s.multiple,onClick:function(e){(u.onClick||U)(e),a.onClick(e)},onItemHover:a.onItemHover,motion:s.motion,subMenuOpenDelay:s.subMenuOpenDelay,subMenuCloseDelay:s.subMenuCloseDelay,forceSubMenuRender:s.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:s.builtinPlacements,itemIcon:u.itemIcon||a.props.itemIcon,expandIcon:u.expandIcon||a.props.expandIcon},n),{},{direction:s.direction});return("inline"===s.mode||F.any)&&(f.triggerSubMenuAction="click"),c.cloneElement(e,f)},a.renderMenuItem=function(e,t,n){if(!e)return null;var r=a.props.store.getState(),i={openKeys:r.openKeys,selectedKeys:r.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(e,t,i)},e.store.setState({activeKey:Object(r.a)(Object(r.a)({},e.store.getState().activeKey),{},Object(h.a)({},e.eventKey,de(e,e.activeKey)))}),a.instanceArray=[],a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!g()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[ue(t)],r=de(t,n);if(r!==n)ce(t.store,ue(t),r);else if("activeKey"in e){r!==de(e,e.activeKey)&&ce(t.store,ue(t),r)}}},{key:"render",value:function(){var e=this,t=Object(f.a)({},this.props);this.instanceArray=[];var n={className:b()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var r=t.prefixCls,i=t.eventKey,a=t.visible,o=t.level,s=t.mode,l=t.overflowedIndicator,u=t.theme;return H.forEach((function(e){return delete t[e]})),delete t.onClick,c.createElement(le,Object.assign({},t,{prefixCls:r,mode:s,tag:"ul",level:o,theme:u,visible:a,overflowedIndicator:l},n),c.Children.map(t.children,(function(t,n){return e.renderMenuItem(t,n,i||"0-menu-")})))}}]),n}(c.Component);he.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:U};var pe=Object(u.b)()(he),me=n("Kwbf");function ve(e,t,n){var r=e.prefixCls,i=e.motion,a=e.defaultMotions,o=void 0===a?{}:a,s=e.openAnimation,l=e.openTransitionName,c=t.switchingModeFromInline;if(i)return i;if("object"===Object(_.a)(s)&&s)Object(me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof s)return{motionName:"".concat(r,"-open-").concat(s)};if(l)return{motionName:l};var u=o[n];return u||(c?null:o.other)}var ge=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var a;Object(i.a)(this,n),(a=t.call(this,e)).inlineOpenKeys=[],a.onSelect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys,i=e.key;n=t.multiple?n.concat([i]):[i],"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onSelect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onClick=function(e){var t=a.getRealMenuMode(),n=Object(o.a)(a),r=n.store,i=n.props.onOpenChange;"inline"===t||"openKeys"in a.props||(r.setState({openKeys:[]}),i([])),a.props.onClick(e)},a.onKeyDown=function(e,t){a.innerMenu.getWrappedInstance().onKeyDown(e,t)},a.onOpenChange=function(e){var t=Object(o.a)(a).props,n=a.store.getState().openKeys.concat(),r=!1,i=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var i=n.indexOf(e.key);(t=-1!==i)&&n.splice(i,1)}r=r||t};Array.isArray(e)?e.forEach(i):i(e),r&&("openKeys"in a.props||a.store.setState({openKeys:n}),t.onOpenChange(n))},a.onDeselect=function(e){var t=Object(o.a)(a).props;if(t.selectable){var n=a.store.getState().selectedKeys.concat(),i=e.key,s=n.indexOf(i);-1!==s&&n.splice(s,1),"selectedKeys"in t||a.store.setState({selectedKeys:n}),t.onDeselect(Object(r.a)(Object(r.a)({},e),{},{selectedKeys:n}))}},a.onMouseEnter=function(e){a.restoreModeVerticalFromInline();var t=a.props.onMouseEnter;t&&t(e)},a.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,r="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,i="font-size"===e.propertyName&&r.indexOf("anticon")>=0;(t||i)&&a.restoreModeVerticalFromInline()},a.setInnerMenu=function(e){a.innerMenu=e},a.isRootMenu=!0;var s=e.defaultSelectedKeys,l=e.defaultOpenKeys;return"selectedKeys"in e&&(s=e.selectedKeys||[]),"openKeys"in e&&(l=e.openKeys||[]),a.store=Object(u.c)({selectedKeys:s,openKeys:l,activeKey:{"0-menu-":de(e,e.activeKey)}}),a.state={switchingModeFromInline:!1},a}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){this.updateOpentKeysWhenSwitchMode(e),this.updateMiniStore();var t=this.props,n=t.siderCollapsed,r=t.inlineCollapsed,i=t.onOpenChange;(!e.inlineCollapsed&&r||!e.siderCollapsed&&n)&&i([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(e){var t=this.props,n=this.store,r=this.inlineOpenKeys,i=n.getState(),a={};"inline"===e.mode&&"inline"!==t.mode&&this.setState({switchingModeFromInline:!0}),"openKeys"in t||((t.inlineCollapsed&&!e.inlineCollapsed||t.siderCollapsed&&!e.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=i.openKeys.concat(),a.openKeys=[]),(!t.inlineCollapsed&&e.inlineCollapsed||!t.siderCollapsed&&e.siderCollapsed)&&(a.openKeys=r,this.inlineOpenKeys=[])),Object.keys(a).length&&n.setState(a)}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&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 e=Object(r.a)({},Object(d.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(r.a)(Object(r.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:ve(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,c.createElement(u.a,{store:this.store},c.createElement(pe,Object.assign({},e,{ref:this.setInnerMenu}),this.props.children))}}]),n}(c.Component);ge.defaultProps={selectable:!0,onClick:U,onSelect:U,onOpenChange:U,onDeselect:U,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var ye=ge,be=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===p.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseLeave;i({key:r,hover:!1}),a({key:r,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,r=n.eventKey,i=n.onItemHover,a=n.onMouseEnter;i({key:r,hover:!0}),a({key:r,domEvent:t})},e.onClick=function(t){var n=e.props,r=n.eventKey,i=n.multiple,a=n.onClick,s=n.onSelect,l=n.onDeselect,c=n.isSelected,u={key:r,keyPath:[r],item:Object(o.a)(e),domEvent:t};a(u),i?c?l(u):s(u):c||s(u)},e.saveNode=function(t){e.node=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.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 e,t=Object(r.a)({},this.props),n=b()(this.getPrefixCls(),t.className,(e={},Object(h.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(h.a)(e,this.getSelectedClassName(),t.isSelected),Object(h.a)(e,this.getDisabledClassName(),t.disabled),e)),i=Object(r.a)(Object(r.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?i=Object(r.a)(Object(r.a)({},i),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(i.role="none");var a={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},o=Object(r.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?o.paddingRight=t.inlineIndent*t.level:o.paddingLeft=t.inlineIndent*t.level),H.forEach((function(e){return delete t[e]})),delete t.direction;var s=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(s=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object.assign({},Object(d.default)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),i,a,{style:o,ref:this.saveNode}),t.children,s)}}]),n}(c.Component);be.isMenuItem=!0,be.defaultProps={onSelect:U,onMouseEnter:U,onMouseLeave:U,manualRef:U};var _e=Object(u.b)((function(e,t){var n=e.activeKey,r=e.selectedKeys,i=t.eventKey;return{active:n[t.subMenuKey]===i,isSelected:-1!==r.indexOf(i)}}))(be),Ee=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(a.a)(n,[{key:"render",value:function(){var e=Object(f.a)({},this.props),t=e.className,n=void 0===t?"":t,r=e.rootPrefixCls,i="".concat(r,"-item-group-title"),a="".concat(r,"-item-group-list"),o=e.title,s=e.children;return H.forEach((function(t){return delete e[t]})),delete e.onClick,delete e.direction,c.createElement("li",Object.assign({},e,{className:"".concat(n," ").concat(r,"-item-group")}),c.createElement("div",{className:i,title:"string"==typeof o?o:void 0},o),c.createElement("ul",{className:a},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);Ee.isMenuItemGroup=!0,Ee.defaultProps={disabled:!0};var xe=Ee,Se=function(e){var t=e.className,n=e.rootPrefixCls,r=e.style;return c.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:r})};Se.defaultProps={disabled:!0,className:"",style:{}};var we=Se;t.e=ye},"3tLw":
/*!*********************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/img/a.svg ***!
\*********************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/a.39070d50.svg"},"4xil":
/*!******************************************************!*\
!*** ./src/components/Video/Play/index.less?modules ***!
\******************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){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":
/*!***************************************************************!*\
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
\***************************************************************/
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
/*! exports used: Link, NavLink */function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return b}));var r=n(/*! react-router */"Ty5D"),i=n(/*! @babel/runtime/helpers/esm/inheritsLoose */"dI71"),a=n(/*! react */"q1tI"),o=n.n(a),s=n(/*! history */"YS25"),l=(n(/*! prop-types */"17x9"),n(/*! @babel/runtime/helpers/esm/extends */"wx14")),c=n(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */"zLVn"),u=n(/*! tiny-invariant */"9R94");o.a.Component;o.a.Component;var d=function(e,t){return"function"==typeof e?e(t):e},f=function(e,t){return"string"==typeof e?Object(s.c)(e,null,null,t):e},h=function(e){return e},p=o.a.forwardRef;void 0===p&&(p=h);var m=p((function(e,t){var n=e.innerRef,r=e.navigate,i=e.onClick,a=Object(c.a)(e,["innerRef","navigate","onClick"]),s=a.target,u=Object(l.a)({},a,{onClick:function(e){try{i&&i(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return u.ref=h!==p&&t||n,o.a.createElement("a",u)}));var v=p((function(e,t){var n=e.component,i=void 0===n?m:n,a=e.replace,s=e.to,v=e.innerRef,g=Object(c.a)(e,["component","replace","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=e.history,r=f(d(s,e.location),e.location),c=r?n.createHref(r):"",m=Object(l.a)({},g,{href:c,navigate:function(){var t=d(s,e.location);(a?n.replace:n.push)(t)}});return h!==p?m.ref=t||v:m.innerRef=v,o.a.createElement(i,m)}))})),g=function(e){return e},y=o.a.forwardRef;void 0===y&&(y=g);var b=y((function(e,t){var n=e["aria-current"],i=void 0===n?"page":n,a=e.activeClassName,s=void 0===a?"active":a,h=e.activeStyle,p=e.className,m=e.exact,b=e.isActive,_=e.location,E=e.sensitive,x=e.strict,S=e.style,w=e.to,k=e.innerRef,T=Object(c.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.a.createElement(r.e.Consumer,null,(function(e){e||Object(u.a)(!1);var n=_||e.location,a=f(d(w,n),n),c=a.pathname,O=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=O?Object(r.f)(n.pathname,{path:O,exact:m,sensitive:E,strict:x}):null,A=!!(b?b(C,n):C),L=A?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(p,s):p,D=A?Object(l.a)({},S,{},h):S,I=Object(l.a)({"aria-current":A&&i||null,className:L,style:D,to:a},T);return g!==y?I.ref=t||k:I.innerRef=k,o.a.createElement(v,I)}))}))},"5nXd":
/*!************************************************!*\
!*** ./node_modules/store/src/store-engine.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./util */"MFOe"),i=r.slice,a=r.pluck,o=r.each,s=r.bind,l=r.create,c=r.isList,u=r.isFunction,d=r.isObject;e.exports={createStore:h};var f={version:"2.0.12",enabled:!1,get:function(e,t){var n=this.storage.read(this._namespacePrefix+e);return this._deserialize(n,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(n,r){e.call(t,t._deserialize(n),(r||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return h.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return h(this.storage,this.plugins,e)}};function h(e,t,n){n||(n=""),e&&!c(e)&&(e=[e]),t&&!c(t)&&(t=[t]);var r=n?"__storejs_"+n+"_":"",h=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p=l({_namespacePrefix:r,_namespaceRegexp:h,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var n=e.read(t)===t;return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(e,t){var n=this[t];this[t]=function(){var t=i(arguments,0),r=this;function a(){if(n)return o(arguments,(function(e,n){t[n]=e})),n.apply(r,t)}var s=[a].concat(t);return e.apply(r,s)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var n="";try{n=JSON.parse(e)}catch(t){n=e}return void 0!==n?n:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(c(e))o(e,(function(e){t._addPlugin(e)}));else if(!a(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!u(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!d(n))throw new Error("Plugins must return an object of function properties");o(n,(function(n,r){if(!u(n))throw new Error("Bad plugin property: "+r+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(n,r)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){var t=e.warn?e.warn:e.log;t.apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},f,{plugins:[]});return p.raw={},o(p,(function(e,t){u(e)&&(p.raw[t]=s(p,e))})),o(e,(function(e){p._addStorage(e)})),o(t,(function(e){p._addPlugin(e)})),p}},"6+eU":
/*!************************************************************!*\
!*** ./node_modules/rc-pagination/es/index.js + 4 modules ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n("wx14"),i=n("rePB"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("Ji7U"),c=n("LK+K"),u=n("q1tI"),d=n.n(u),f=n("TSYQ"),h=n.n(f),p=function(e){var t,n="".concat(e.rootPrefixCls,"-item"),r=h()(n,"".concat(n,"-").concat(e.page),(t={},Object(i.a)(t,"".concat(n,"-active"),e.active),Object(i.a)(t,e.className,!!e.className),Object(i.a)(t,"".concat(n,"-disabled"),!e.page),t));return d.a.createElement("li",{title:e.showTitle?e.page:null,className:r,onClick:function(){e.onClick(e.page)},onKeyPress:function(t){e.onKeyPress(t,e.onClick,e.page)},tabIndex:"0"},e.itemRender(e.page,"page",d.a.createElement("a",{rel:"nofollow"},e.page)))},m=13,v=38,g=40,y=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).state={goInputText:""},e.buildOptionText=function(t){return"".concat(t," ").concat(e.props.locale.items_per_page)},e.changeSize=function(t){e.props.changeSize(Number(t))},e.handleChange=function(t){e.setState({goInputText:t.target.value})},e.handleBlur=function(t){var n=e.props,r=n.goButton,i=n.quickGo,a=n.rootPrefixCls,o=e.state.goInputText;r||""===o||t.relatedTarget&&(t.relatedTarget.className.indexOf("".concat(a,"-prev"))>=0||t.relatedTarget.className.indexOf("".concat(a,"-next"))>=0)||(e.setState({goInputText:""}),i(e.getValidValue()))},e.go=function(t){""!==e.state.goInputText&&(t.keyCode!==m&&"click"!==t.type||(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue())))},e}return Object(s.a)(n,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"getPageSizeOptions",value:function(){var e=this.props,t=e.pageSize,n=e.pageSizeOptions;return n.some((function(e){return e.toString()===t.toString()}))?n:n.concat([t.toString()]).sort((function(e,t){return(isNaN(Number(e))?0:Number(e))-(isNaN(Number(t))?0:Number(t))}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.locale,i=t.rootPrefixCls,a=t.changeSize,o=t.quickGo,s=t.goButton,l=t.selectComponentClass,c=t.buildOptionText,u=t.selectPrefixCls,f=t.disabled,h=this.state.goInputText,p="".concat(i,"-options"),m=l,v=null,g=null,y=null;if(!a&&!o)return null;var b=this.getPageSizeOptions();if(a&&m){var _=b.map((function(t,n){return d.a.createElement(m.Option,{key:n,value:t.toString()},(c||e.buildOptionText)(t))}));v=d.a.createElement(m,{disabled:f,prefixCls:u,showSearch:!1,className:"".concat(p,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||b[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},_)}return o&&(s&&(y="boolean"==typeof s?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:f,className:"".concat(p,"-quick-jumper-button")},r.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},s)),g=d.a.createElement("div",{className:"".concat(p,"-quick-jumper")},r.jump_to,d.a.createElement("input",{disabled:f,type:"text",value:h,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),r.page,y)),d.a.createElement("li",{className:"".concat(p)},v,g)}}]),n}(d.a.Component);y.defaultProps={pageSizeOptions:["10","20","50","100"]};var b=y,_=n("N2Kk");function E(){}function x(e,t,n){var r=void 0===e?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var S=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e){var r;Object(o.a)(this,n),(r=t.call(this,e)).getJumpPrevPage=function(){return Math.max(1,r.state.current-(r.props.showLessItems?3:5))},r.getJumpNextPage=function(){return Math.min(x(void 0,r.state,r.props),r.state.current+(r.props.showLessItems?3:5))},r.getItemIcon=function(e,t){var n=r.props.prefixCls,i=e||d.a.createElement("button",{type:"button","aria-label":t,className:"".concat(n,"-item-link")});return"function"==typeof e&&(i=d.a.createElement(e,Object(a.a)({},r.props))),i},r.savePaginationNode=function(e){r.paginationNode=e},r.isValid=function(e){return"number"==typeof(t=e)&&isFinite(t)&&Math.floor(t)===t&&e!==r.state.current;var t},r.shouldDisplayQuickJumper=function(){var e=r.props,t=e.showQuickJumper,n=e.pageSize;return!(e.total<=n)&&t},r.handleKeyDown=function(e){e.keyCode!==v&&e.keyCode!==g||e.preventDefault()},r.handleKeyUp=function(e){var t=r.getValidValue(e);t!==r.state.currentInputValue&&r.setState({currentInputValue:t}),e.keyCode===m?r.handleChange(t):e.keyCode===v?r.handleChange(t-1):e.keyCode===g&&r.handleChange(t+1)},r.changePageSize=function(e){var t=r.state.current,n=x(e,r.state,r.props);t=t>n?n:t,0===n&&(t=r.state.current),"number"==typeof e&&("pageSize"in r.props||r.setState({pageSize:e}),"current"in r.props||r.setState({current:t,currentInputValue:t})),r.props.onShowSizeChange(t,e),"onChange"in r.props&&r.props.onChange&&r.props.onChange(t,e)},r.handleChange=function(e){var t=r.props.disabled,n=e;if(r.isValid(n)&&!t){var i=x(void 0,r.state,r.props);n>i?n=i:n<1&&(n=1),"current"in r.props||r.setState({current:n,currentInputValue:n});var a=r.state.pageSize;return r.props.onChange(n,a),n}return r.state.current},r.prev=function(){r.hasPrev()&&r.handleChange(r.state.current-1)},r.next=function(){r.hasNext()&&r.handleChange(r.state.current+1)},r.jumpPrev=function(){r.handleChange(r.getJumpPrevPage())},r.jumpNext=function(){r.handleChange(r.getJumpNextPage())},r.hasPrev=function(){return r.state.current>1},r.hasNext=function(){return r.state.current<x(void 0,r.state,r.props)},r.runIfEnter=function(e,t){if("Enter"===e.key||13===e.charCode){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];t.apply(void 0,r)}},r.runIfEnterPrev=function(e){r.runIfEnter(e,r.prev)},r.runIfEnterNext=function(e){r.runIfEnter(e,r.next)},r.runIfEnterJumpPrev=function(e){r.runIfEnter(e,r.jumpPrev)},r.runIfEnterJumpNext=function(e){r.runIfEnter(e,r.jumpNext)},r.handleGoTO=function(e){e.keyCode!==m&&"click"!==e.type||r.handleChange(r.state.currentInputValue)};var i=e.onChange!==E;"current"in e&&!i&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var s=e.defaultCurrent;"current"in e&&(s=e.current);var l=e.defaultPageSize;return"pageSize"in e&&(l=e.pageSize),s=Math.min(s,x(l,void 0,e)),r.state={current:s,currentInputValue:s,pageSize:l},r}return Object(s.a)(n,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector(".".concat(n,"-item-").concat(t.current));r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=x(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"getShowSizeChanger",value:function(){var e=this.props,t=e.showSizeChanger,n=e.total,r=e.totalBoundaryShowSizeChanger;return void 0!==t?t:n>r}},{key:"renderPrev",value:function(e){var t=this.props,n=t.prevIcon,r=(0,t.itemRender)(e,"prev",this.getItemIcon(n,"prev page")),i=!this.hasPrev();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"renderNext",value:function(e){var t=this.props,n=t.nextIcon,r=(0,t.itemRender)(e,"next",this.getItemIcon(n,"next page")),i=!this.hasNext();return Object(u.isValidElement)(r)?Object(u.cloneElement)(r,{disabled:i}):r}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,a=t.className,o=t.style,s=t.disabled,l=t.hideOnSinglePage,c=t.total,f=t.locale,m=t.showQuickJumper,v=t.showLessItems,g=t.showTitle,y=t.showTotal,_=t.simple,E=t.itemRender,S=t.showPrevNextJumpers,w=t.jumpPrevIcon,k=t.jumpNextIcon,T=t.selectComponentClass,O=t.selectPrefixCls,C=t.pageSizeOptions,A=this.state,L=A.current,D=A.pageSize,I=A.currentInputValue;if(!0===l&&c<=D)return null;var R=x(void 0,this.state,this.props),N=[],M=null,P=null,j=null,F=null,U=null,B=m&&m.goButton,G=v?1:2,z=L-1>0?L-1:0,H=L+1<R?L+1:R,K=Object.keys(this.props).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||(t[n]=e.props[n]),t}),{});if(_)return B&&(U="boolean"==typeof B?d.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},f.jump_to_confirm):d.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},B),U=d.a.createElement("li",{title:g?"".concat(f.jump_to).concat(L,"/").concat(R):null,className:"".concat(n,"-simple-pager")},U)),d.a.createElement("ul",Object(r.a)({className:h()(n,"".concat(n,"-simple"),Object(i.a)({},"".concat(n,"-disabled"),s),a),style:o,ref:this.savePaginationNode},K),d.a.createElement("li",{title:g?f.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:h()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(z)),d.a.createElement("li",{title:g?"".concat(L,"/").concat(R):null,className:"".concat(n,"-simple-pager")},d.a.createElement("input",{type:"text",value:I,disabled:s,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),d.a.createElement("span",{className:"".concat(n,"-slash")},"/"),R),d.a.createElement("li",{title:g?f.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:h()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(H)),U);if(R<=3+2*G){var V={locale:f,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:g,itemRender:E};R||N.push(d.a.createElement(p,Object(r.a)({},V,{key:"noPager",page:R,className:"".concat(n,"-disabled")})));for(var W=1;W<=R;W+=1){var q=L===W;N.push(d.a.createElement(p,Object(r.a)({},V,{key:W,page:W,active:q})))}}else{var X=v?f.prev_3:f.prev_5,Y=v?f.next_3:f.next_5;S&&(M=d.a.createElement("li",{title:g?X:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:h()("".concat(n,"-jump-prev"),Object(i.a)({},"".concat(n,"-jump-prev-custom-icon"),!!w))},E(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(w,"prev page"))),P=d.a.createElement("li",{title:g?Y:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:h()("".concat(n,"-jump-next"),Object(i.a)({},"".concat(n,"-jump-next-custom-icon"),!!k))},E(this.getJumpNextPage(),"jump-next",this.getItemIcon(k,"next page")))),F=d.a.createElement(p,{locale:f,last:!0,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:R,page:R,active:!1,showTitle:g,itemRender:E}),j=d.a.createElement(p,{locale:f,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:g,itemRender:E});var $=Math.max(1,L-G),J=Math.min(L+G,R);L-1<=G&&(J=1+2*G),R-L<=G&&($=R-2*G);for(var Q=$;Q<=J;Q+=1){var Z=L===Q;N.push(d.a.createElement(p,{locale:f,rootPrefixCls:n,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Q,page:Q,active:Z,showTitle:g,itemRender:E}))}L-1>=2*G&&3!==L&&(N[0]=Object(u.cloneElement)(N[0],{className:"".concat(n,"-item-after-jump-prev")}),N.unshift(M)),R-L>=2*G&&L!==R-2&&(N[N.length-1]=Object(u.cloneElement)(N[N.length-1],{className:"".concat(n,"-item-before-jump-next")}),N.push(P)),1!==$&&N.unshift(j),J!==R&&N.push(F)}var ee=null;y&&(ee=d.a.createElement("li",{className:"".concat(n,"-total-text")},y(c,[0===c?0:(L-1)*D+1,L*D>c?c:L*D])));var te=!this.hasPrev()||!R,ne=!this.hasNext()||!R;return d.a.createElement("ul",Object(r.a)({className:h()(n,a,Object(i.a)({},"".concat(n,"-disabled"),s)),style:o,unselectable:"unselectable",ref:this.savePaginationNode},K),ee,d.a.createElement("li",{title:g?f.prev_page:null,onClick:this.prev,tabIndex:te?null:0,onKeyPress:this.runIfEnterPrev,className:h()("".concat(n,"-prev"),Object(i.a)({},"".concat(n,"-disabled"),te)),"aria-disabled":te},this.renderPrev(z)),N,d.a.createElement("li",{title:g?f.next_page:null,onClick:this.next,tabIndex:ne?null:0,onKeyPress:this.runIfEnterNext,className:h()("".concat(n,"-next"),Object(i.a)({},"".concat(n,"-disabled"),ne)),"aria-disabled":ne},this.renderNext(H)),d.a.createElement(b,{disabled:s,locale:f,rootPrefixCls:n,selectComponentClass:T,selectPrefixCls:O,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:L,pageSize:D,pageSizeOptions:C,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:B}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,i=x(e.pageSize,t,e);r=r>i?i:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),n}(d.a.Component);S.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:E,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:E,locale:_.a,style:{},itemRender:function(e,t,n){return n},totalBoundaryShowSizeChanger:50};var w=S},"6RRn":
/*!*******************************************!*\
!*** ./node_modules/rc-table/es/index.js ***!
\*******************************************/
/*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */
/*! exports used: INTERNAL_COL_DEFINE, Summary, default */function(e,t,n){"use strict";var r=n(/*! ./Table */"wCXF"),i=n(/*! ./Footer */"n6Qo");n.d(t,"b",(function(){return i.a}));n(/*! ./sugar/Column */"IBYe"),n(/*! ./sugar/ColumnGroup */"6eGT");var a=n(/*! ./utils/legacyUtil */"hW8S");n.d(t,"a",(function(){return a.a})),t.c=r.b},"6eGT":
/*!*******************************************************!*\
!*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},"7+5b":
/*!******************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/img/v.svg ***!
\******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/v.e7f297d6.svg"},"7ahc":
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
\*************************************************************/
/*! exports provided: default, MyCodeMirror */
/*! exports used: MyCodeMirror, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=(n(/*! antd/es/button/style */"+L6B"),n(/*! antd/es/button */"2/Rp")),o=(n(/*! antd/es/form/style */"y8nQ"),n(/*! antd/es/form */"Vl3Y")),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),l=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),c=n(/*! react */"q1tI"),u=n.n(c),d=n(/*! codemirror */"VrN/"),f=n.n(d),h=(n(/*! codemirror/lib/codemirror.css */"p77/"),n(/*! codemirror/theme/blackboard.css */"c5Ni"),l.a.Option),p={labelCol:{span:4},wrapperCol:{span:20}},m={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"]};function v(e){var t=e.value,n=e.onChange,i=e.mode,a=e.options,o=void 0===a?{}:a,l=Object(c.useRef)(),d=Object(c.useState)(),h=Object(s.a)(d,2),p=h[0],m=h[1];return Object(c.useEffect)((function(){if(p){function e(e){var t=e.getValue();n&&n(t)}return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),Object(c.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),Object(c.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||" ")}),300))}),[p,t]),Object(c.useEffect)((function(){if(l.current&&!p){var e=f.a.fromTextArea(l.current,Object(r.a)({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},o));m(e)}}),[l.current,p]),u.a.createElement("div",{className:"my-codemirror-container"},u.a.createElement("textarea",{ref:l}))}t.b=function(e){var t=e.callback,n=e.onCancel,r=Object(c.useState)("python"),d=Object(s.a)(r,2),f=d[0],g=d[1];return u.a.createElement(o.a,Object(i.a)({},p,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)}}),u.a.createElement(o.a.Item,{label:"代码语言",name:"language"},u.a.createElement(l.a,{onChange:function(e){g(m[e][1])}},Object.keys(m).map((function(e){return u.a.createElement(h,{key:e,value:e},m[e][0])})))),u.a.createElement(o.a.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}]},u.a.createElement(v,{mode:f})),u.a.createElement("div",{className:"flex-container flex-end"},u.a.createElement(a.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),u.a.createElement(a.a,{type:"ghost",onClick:n},"取消")))}},"7ixt":
/*!**************************************************!*\
!*** ./node_modules/rc-tooltip/es/placements.js ***!
\**************************************************/
/*! exports provided: placements, default */
/*! exports used: placements */function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r={adjustX:1,adjustY:1},i=[0,0],a={left:{points:["cr","cl"],overflow:r,offset:[-4,0],targetOffset:i},right:{points:["cl","cr"],overflow:r,offset:[4,0],targetOffset:i},top:{points:["bc","tc"],overflow:r,offset:[0,-4],targetOffset:i},bottom:{points:["tc","bc"],overflow:r,offset:[0,4],targetOffset:i},topLeft:{points:["bl","tl"],overflow:r,offset:[0,-4],targetOffset:i},leftTop:{points:["tr","tl"],overflow:r,offset:[-4,0],targetOffset:i},topRight:{points:["br","tr"],overflow:r,offset:[0,-4],targetOffset:i},rightTop:{points:["tl","tr"],overflow:r,offset:[4,0],targetOffset:i},bottomRight:{points:["tr","br"],overflow:r,offset:[0,4],targetOffset:i},rightBottom:{points:["bl","br"],overflow:r,offset:[4,0],targetOffset:i},bottomLeft:{points:["tl","bl"],overflow:r,offset:[0,4],targetOffset:i},leftBottom:{points:["br","bl"],overflow:r,offset:[-4,0],targetOffset:i}}},"7qur":
/*!*************************************************!*\
!*** ./src/pages/Question/OjProblem/service.ts ***!
\*************************************************/
/*! exports provided: getProgrammingTopic, sumbitCode, debugCode, getSubmitRecords, getRecordDetail, getOperationResult, addNotes, resetCode, syncCode, updateCode, updateLanguageCode, triggerPlus, practicesList, articlesList, addArticles, editArticles, editArticlesDetails, articlesDetails, articlesStatus, articlesAssist, articlesHide, deleteArticles, setLogTime */
/*! exports used: addArticles, addNotes, articlesAssist, articlesDetails, articlesHide, articlesList, articlesStatus, debugCode, deleteArticles, editArticles, editArticlesDetails, getOperationResult, getProgrammingTopic, getRecordDetail, getSubmitRecords, practicesList, resetCode, setLogTime, sumbitCode, syncCode, triggerPlus, updateCode, updateLanguageCode */function(e,t,n){"use strict";n.d(t,"m",(function(){return i})),n.d(t,"s",(function(){return a})),n.d(t,"h",(function(){return o})),n.d(t,"o",(function(){return s})),n.d(t,"n",(function(){return l})),n.d(t,"l",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"q",(function(){return d})),n.d(t,"t",(function(){return f})),n.d(t,"v",(function(){return h})),n.d(t,"w",(function(){return p})),n.d(t,"u",(function(){return m})),n.d(t,"p",(function(){return v})),n.d(t,"f",(function(){return g})),n.d(t,"a",(function(){return y})),n.d(t,"j",(function(){return b})),n.d(t,"k",(function(){return _})),n.d(t,"d",(function(){return E})),n.d(t,"g",(function(){return x})),n.d(t,"c",(function(){return S})),n.d(t,"e",(function(){return w})),n.d(t,"i",(function(){return k})),n.d(t,"r",(function(){return T}));var r=n(/*! @/utils/fetch */"ErOA");function i(e){return Object(r.c)("mypractices/".concat(e,".json"),{hidePopLogin:!0})}function a(e,t){return Object(r.f)("mypractices/".concat(e,"/code_submit.json"),t)}function o(e,t){return Object(r.c)("mypractices/".concat(e,"/code_debug.json"),t)}function s(e,t){return Object(r.c)("mypractices/".concat(e,"/submit_records.json"),t)}function l(e){return Object(r.c)("mypractices/record_detail.json",{id:e})}function c(e,t){return Object(r.c)("mypractices/".concat(e,"/result.json"),{mode:t})}function u(e,t){return Object(r.f)("mypractices/".concat(e,"/add_notes.json"),t)}function d(e,t){return Object(r.f)("mypractices/".concat(e,"/restore_initial_code.json"),t)}function f(e,t){return Object(r.f)("mypractices/".concat(e,"/sync_code.json"),t)}function h(e,t){return Object(r.f)("mypractices/".concat(e,"/update_code.json"),t)}function p(e){return Object(r.f)("mypractices/".concat(e,"/initial_codes.json"))}function m(e,t){return Object(r.f)("discusses/".concat(e,"/plus.json"),t)}function v(e){return Object(r.c)("practices/practices_list.json",e)}function g(e,t){return Object(r.c)("practices/".concat(e,"/question_solution_articles"),t)}function y(e,t){return Object(r.f)("practices/".concat(e,"/question_solution_articles"),t)}function b(e,t){return Object(r.g)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function _(e,t){return Object(r.c)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/edit"),t)}function E(e,t){return Object(r.c)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function x(e,t){return Object(r.f)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/set_authority_or_excellent"),t)}function S(e,t){return Object(r.f)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/praise_or_treads"),t)}function w(e,t){return Object(r.f)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/hide"))}function k(e,t){return Object(r.b)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function T(e,t){return Object(r.f)("mypractices/".concat(e,"/update_practice_time_sum"),t)}},"815F":
/*!***************************************************!*\
!*** ./node_modules/rc-tree/es/utils/treeUtil.js ***!
\***************************************************/
/*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */
/*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"a",(function(){return h})),n.d(t,"f",(function(){return p})),n.d(t,"b",(function(){return m}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! rc-util/es/Children/toArray */"Zm9Q"),s=n(/*! rc-util/es/warning */"Kwbf"),l=n(/*! ../util */"OZM5");function c(e,t){return null!=e?e:t}function u(e){return function e(t){return Object(o.a)(t).map((function(t){if(!Object(l.i)(t))return Object(s.a)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,o=r.children,c=Object(a.a)(r,["children"]),u=Object(i.a)({key:n},c),d=e(o);return d.length&&(u.children=d),u})).filter((function(e){return e}))}(e)}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Set(!0===t?[]:t),a=[];function o(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return e.map((function(u,d){var f=Object(l.h)(s?s.pos:"0",d),h=c(u.key,f),p=Object(i.a)(Object(i.a)({},u),{},{parent:s,pos:f,children:null,data:u,isStart:[].concat(Object(r.a)(s?s.isStart:[]),[0===d]),isEnd:[].concat(Object(r.a)(s?s.isEnd:[]),[d===e.length-1])});return a.push(p),!0===t||n.has(h)?p.children=o(u.children||[],p):p.children=[],p}))}return o(e),a}function f(e,t,n){var r;n?"string"==typeof n?r=function(e){return e[n]}:"function"==typeof n&&(r=function(e){return n(e)}):r=function(e,t){return c(e.key,t)},function n(i,a,o){var s=i?i.children:e,c=i?Object(l.h)(o.pos,a):"0";if(i){var u=r(i,c),d={node:i,index:a,pos:c,key:u,parentPos:o.node?o.pos:null,level:o.level+1};t(d)}s&&s.forEach((function(e,t){n(e,t,{node:i,pos:c,level:o?o.level+1:-1})}))}(null)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a=arguments.length>2?arguments[2]:void 0,o={},s={},l={posEntities:o,keyEntities:s};return n&&(l=n(l)||l),f(e,(function(e){var t=e.node,n=e.index,i=e.pos,a=e.key,u=e.parentPos,d={node:t,index:n,key:a,pos:i,level:e.level},f=c(a,i);o[i]=d,s[f]=d,d.parent=o[u],d.parent&&(d.parent.children=d.parent.children||[],d.parent.children.push(d)),r&&r(d,l)}),a),i&&i(l),l}function p(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,o=t.checkedKeys,s=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities[e];return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==a.indexOf(e),checked:-1!==o.indexOf(e),halfChecked:-1!==s.indexOf(e),pos:String(u?u.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function m(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,l=e.loading,c=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,f=e.dragOverGapBottom,h=e.pos,p=e.active,m=Object(i.a)(Object(i.a)({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:l,halfChecked:c,dragOver:u,dragOverGapTop:d,dragOverGapBottom:f,pos:h,active:p});return"props"in m||Object.defineProperty(m,"props",{get:function(){return Object(s.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),m}},"8EBN":
/*!**********************************************!*\
!*** ./node_modules/codemirror/mode/meta.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.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 t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),a=i>-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}(n(/*! ../lib/codemirror */"VrN/"))},"9Bee":
/*!*********************************************************!*\
!*** ./src/components/RenderHtml/index.tsx + 1 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("k1fw"),i=n("tJVT"),a=n("q1tI"),o=n.n(a),s=(n("vg9a"),n("DlQD")),l=n.n(s),c=n("rUJ1");var u=[],d=["<ul>"],f=new l.a.Renderer,h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){u.length=0,d=["<ul>"]}var m={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(){return function e(t,n,r,i){if(n>=t.length||t[n].level<=r)return n;var a=t[n];i.push("<li><a href='#"+a.anchor+"'>"+a.text+"</a>");var o=[];return n=e(t,++n,a.level,o),o.length>0&&(i.push("<ul>"),o.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),n=e(t,n,r,i)}(u,0,0,d),d.push("</ul>"),d.join("")}var g={heading:function(e){var t=h.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:Object(i.a)(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),a=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(a)>=0){var o=_(),s=r;r=o,E[o]={type:"block",expression:s}}return{type:"code",raw:n,lang:a,text:r}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,_=function(){return"__special_katext_id_".concat(b++,"__")},E={};function x(){b=0,E={}}function S(e){return e=e.replace(y,(function(e,t){var n=_();return E[n]={type:"inline",expression:t},n}))}var w=f.listitem;f.listitem=function(e){return w(S(e))};var k=f.paragraph;f.paragraph=function(e){return k(S(e))};var T=f.tablecell;f.tablecell=function(e,t){return T(S(e),t)},f.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:Object(c.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:Object(c.escape)(e,!0))+"</code></pre>"},f.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return u.push({anchor:r,level:t,text:e}),"<h"+t+' id="'+r+'">'+e+"</h"+t+">"},l.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),l.a.use({tokenizer:g,renderer:f});var O=l.a,C=(n("SJMd"),n("ulZh")),A=n.n(C),L=n("m3rI"),D=n("Oy/b"),I=n("p5ED"),R=/<pre[^>]*>/g;t.a=function(e){var t=e.value,n=void 0===t?"":t,s=e.className,l=e.showTextOnly,c=e.showLines,u=e.style,d=void 0===u?{}:u,f=e.stylesPrev,h=void 0===f?{}:f,g=String(n),y=Object(a.useState)(""),b=Object(i.a)(y,2),_=b[0],S=b[1],w=Object(a.useMemo)((function(){try{g=(g=g.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+L.a.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+L.a.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+L.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")).replace(new RegExp("(?<!\\n)\\n(?!\\n)","g")," \n")}catch(e){}var e=O(g),t=E;if(g.match(/\[TOC\]/)&&(e=e.replace("<p>[TOC]</p>",v()),p()),e=(e=e.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,a=r.expression;return Object(D.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(a)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})}))).replace(/▁/g,"▁▁▁"),x(),l){var n=document.createElement("div");return n.innerHTML=e,n.innerText}return setTimeout((function(){return C()}),500),e}),[g]),k=Object(a.useRef)();function T(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),S(n);else if(n.startsWith("#")){e.preventDefault();var r=document.getElementById(n.replace("#",""));r&&r.scrollIntoView(!0)}}}m.WebkitLineClamp=c,c&&(d=Object(r.a)(Object(r.a)({},d),m));var C=function(){var e,t=null===(e=k.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(A.a.isSupported()){var t=new A.a;t.loadSource(e.src),t.attachMedia(e)}}))};return Object(a.useEffect)((function(){if(k.current&&w&&w.match(R)&&window.PR.prettyPrint(),k.current)return k.current.addEventListener("click",T),function(){k.current.removeEventListener("click",T),x(),p()}}),[w,k.current,T]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{ref:k,style:Object(r.a)({},d),className:"".concat(s||""," markdown-body "),dangerouslySetInnerHTML:{__html:w}}),o.a.createElement(I.a,{close:!0,data:_,type:null!=_&&_.length?"office":"",style:Object(r.a)({},h),onClose:function(){return S("")}}))}},"9VGf":
/*!****************************************!*\
!*** ./src/components/useInterval.tsx ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI");function i(e,t){var n=Object(r.useRef)();Object(r.useEffect)((function(){n.current=e})),Object(r.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},AMnG:
/*!*********************************************************************!*\
!*** ./src/pages/tasks/left-panel/discuss/discuss-editor/index.tsx ***!
\*********************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=n(/*! react */"q1tI"),o=n.n(a),s=(n(/*! ./index.less */"nWbc"),n(/*! @/components/markdown-editor */"Ot1p"));t.a=function(e){var t=e.id,n=e.activeDiscussIndex,l=e.onReplyDiscuss,c=Object(a.useState)(""),u=Object(i.a)(c,2),d=u[0],f=u[1];return o.a.createElement("div",{key:t,className:"discuss-item-editor",style:{display:n===t?"block":"none",width:"100%"}},o.a.createElement(s.a,{miniToolbar:!0,startInit:n===t,defaultValue:d,id:t,noStorage:!0,watch:!1,height:155,placeholder:"我要回复",showResizeBar:!0,onChange:function(e){f(e)}}),o.a.createElement("a",{onClick:function(){d?(l(t,d),f("")):r.b.info("回复内容不能为空!")},className:"btn-send"},"发送"))}},Aky1:
/*!***********************************!*\
!*** ./src/utils/aliyunUpload.ts ***!
\***********************************/
/*! exports provided: getUploader */
/*! exports used: getUploader */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r,i=n(/*! @/utils/fetch */"ErOA"),a=n(/*! aliyun-vod-upload-ll */"ppsT"),o=n.n(a),s="",l="";function c(e){!function(e){r=new o.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(t){console.log("addFileSuccess: "+t.file.name),e.addFileSuccess&&e.addFileSuccess(t),r.startUpload()},onUploadstarted:function(t){var n=t.file.name;if(t.videoId){var a="/api/users/".concat(s,"/video_auths.json");Object(i.a)(a,{method:"put",body:{video_id:t.videoId,title:n,file_name:n,virtual_classroom_id:l}}).then((function(n){if(-1!=n.status){var i=n.data,a=i.UploadAuth,o=i.UploadAddress;i.VideoId;r.setUploadAuthAndAddress(t,a,o)}else e.onUploadError&&e.onUploadError(t)})).catch((function(e){r.deleteFile(r._curIndex),r.nextUpload(),console.log(e)}))}else{var o="/api/users/".concat(s,"/video_auths.json");Object(i.a)(o,{method:"Post",body:{title:""+n,file_name:""+n,virtual_classroom_id:l}}).then((function(e){if(e){var n=e.data,i=n.UploadAuth,a=n.UploadAddress,o=n.VideoId;r.setUploadAuthAndAddress(t,i,a,o)}})).catch((function(e){r.deleteFile(r._curIndex),r.nextUpload(),console.log(e)})),console.log("文件开始上传...")}},onUploadSucceed:function(t){e.onUploadSucceed&&e.onUploadSucceed(t),console.log("文件上传成功!")},onUploadFailed:function(t,n,r){e.onUploadFailed&&e.onUploadFailed(t),console.log("文件上传失败!")},onUploadCanceled:function(e,t,n){console.log("文件上传已暂停!")},onUploadProgress:function(t,n,r){e.onUploadProgress&&e.onUploadProgress(t,n,r);Math.ceil(100*r);console.log("文件上传中...")},onUploadTokenExpired:function(e){console.log("文件上传超时!");var t="/api/users/".concat(s,"/video_auths.json");Object(i.a)(t,{method:"put",body:{video_id:e.videoId}}).then((function(e){var t=e.data.UploadAuth;r.resumeUploadWithAuth(t)})).catch((function(e){console.log(e)}))},onUploadEnd:function(t){e.onUploadEnd&&e.onUploadEnd(t),console.log("onUploadEnd: uploaded all the files")}}),e.gotUploader&&e.gotUploader(r)}(e)}function u(e,t,n){e&&(s=e),t&&(l=t),c(n)}},BU3w:
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
\***************************************************/
/*! exports provided: injectCSS, updateCSS */
/*! exports used: updateCSS */function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(/*! ./canUseDom */"MNnm");function i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(r.a)())return null;var a,o=document.createElement("style");(null===(t=n.csp)||void 0===t?void 0:t.nonce)&&(o.nonce=null===(a=n.csp)||void 0===a?void 0:a.nonce);o.innerHTML=e;var s=i(n),l=s.firstChild;return n.prepend&&s.prepend?s.prepend(o):n.prepend&&l?s.insertBefore(o,l):s.appendChild(o),o}var o=new Map;function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=i(n);if(!o.has(r)){var s=a("",n),l=s.parentNode;o.set(r,l),l.removeChild(s)}var c=Array.from(o.get(r).children).find((function(e){return"STYLE"===e.tagName&&e["rc-util-key"]===t}));if(c){var u,d,f;if((null===(u=n.csp)||void 0===u?void 0:u.nonce)&&c.nonce!==(null===(d=n.csp)||void 0===d?void 0:d.nonce))c.nonce=null===(f=n.csp)||void 0===f?void 0:f.nonce;return c.innerHTML!==e&&(c.innerHTML=e),c}var h=a(e,n);return h["rc-util-key"]=t,h}},Bd2K:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closetag.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(o,s,l){if(l!=e.Init&&l&&o.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};"object"==typeof s&&!1===s.whenClosing||(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),"object"==typeof s&&!1===s.whenOpening||(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var u=o[c].head,d=r.getTokenAt(u),f=e.innerMode(r.getMode(),d.state),h=f.state,p=f.mode.xmlCurrentTag&&f.mode.xmlCurrentTag(h),m=p&&p.name;if(!m)return e.Pass;var v="html"==f.mode.configuration,g="object"==typeof l&&l.dontCloseTags||v&&t,y="object"==typeof l&&l.indentTags||v&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var b=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&p.close||d.string.indexOf("/")==u.ch-d.start-1||g&&i(g,b)>-1||a(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(h)||[],m,u,!0))return e.Pass;var _="object"==typeof l&&l.emptyTags;if(_&&i(_,m)>-1)s[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var E=y&&i(y,b)>-1;s[c]={indent:E,text:">"+(E?"\n\n":"")+"</"+m+">",newPos:E?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var x="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var S=s[c];r.replaceRange(S.text,o[c].head,o[c].anchor,"+insert");var w=r.listSelections().slice(0);w[c]={head:S.newPos,anchor:S.newPos},r.setSelections(w),!x&&S.indent&&(r.indentLine(S.newPos.line,null,!0),r.indentLine(S.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["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 r(t,n){for(var r=t.listSelections(),i=[],o=n?"/":"</",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=t.getTokenAt(u),f=e.innerMode(t.getMode(),d.state),h=f.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var p,m="xml"!=f.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==f.mode.name)p=o+"script";else if(m&&"css"==f.mode.name)p=o+"style";else{var v=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(h);if(!v||v.length&&a(t,v,v[v.length-1],u))return e.Pass;p=o+v[v.length-1]}">"!=t.getLine(u.line).charAt(d.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function a(t,n,r,i,a){if(!e.scanForClosingTag)return!1;var o=Math.min(t.lastLine()+1,i.line+500),s=e.scanForClosingTag(t,i,null,o);if(!s||s.tag!=r)return!1;for(var l=a?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,i,null,o);if(!u||u.tag!=r)return!1;i=u.to}return!0}e.commands.closeTag=function(e){return r(e)}}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../fold/xml-fold */"osHv"))},BdwD:
/*!*****************************************!*\
!*** ./src/components/NoData/index.tsx ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */"0Owb"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! react */"q1tI"),s=n.n(o),l=n(/*! @/assets/images/icons/nodata.png */"FOrL"),c=n.n(l);t.a=function(e){var t=e.buttonProps,n=void 0===t?{}:t,o=e.styles,l=void 0===o?{}:o,u=e.customText,d=e.ButtonText,f=e.ButtonClick,h=e.Buttonclass,p=e.ButtonTwo;return s.a.createElement("section",{className:"tc animated fadeIn",style:Object(a.a)(Object(a.a)({},{color:"#999",margin:"200px auto"}),l)},s.a.createElement("img",{src:c.a}),s.a.createElement("p",{className:"mt20 font14"},u||"暂时还没有相关数据哦!"),d&&s.a.createElement(r.a,Object(i.a)({className:h,onClick:f},n),d),p&&p)}},BjJ7:
/*!*********************************!*\
!*** ./src/pages/tasks/util.js ***!
\*********************************/
/*! exports provided: isCompileOk, getTreeData, processTreeData, debounce, isProd, apiPref */
/*! exports used: apiPref, debounce, getTreeData, isCompileOk, processTreeData */function(e,t,n){"use strict";function r(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function i(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r<e.length;r++){var i=e[r],a=t?"".concat(t,"/").concat(i.name):"".concat(i.name);n.push({title:i.name,isLeaf:"tree"!==i.type,key:a})}return n}function a(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(i.key===t){i.children=n;break}i.children&&a(i.children,t,n)}return e}function o(e,t,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||e.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,t),s&&e.apply(i,a)}}n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var s=n(/*! @/utils/env */"m3rI").a.API_SERVER},"C+DQ":
/*!*********************************************************!*\
!*** ./src/components/markdown-editor/css/iconfont.css ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},CNDd:
/*!***************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/c1.svg ***!
\***************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/c1.7850f139.svg"},CaVn:
/*!******************************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/index.less?modules ***!
\******************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___2wZ0h",flex_space_between:"flex_space_between___3MVWH",flex_box_vertical_center:"flex_box_vertical_center___O0jNB",flex_box_center_end:"flex_box_center_end___2q4xj",flex_box_column:"flex_box_column___13R-8",listDetails:"listDetails___3lMam",head:"head___2jzWe",name:"name___3xIfG",title:"title___3-ce8",a:"a___1ZME1",b:"b___oiiqU",tag:"tag___32Ulf",btn:"btn___lJ5fA",scroll:"scroll___anvih",video:"video___1gujl",html:"html___z0BU7",g:"g___3sfQf",btns:"btns___OWbut"}},CrYA:
/*!*******************************************************!*\
!*** ./node_modules/store/storages/sessionStorage.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../src/util */"MFOe").Global;function i(){return r.sessionStorage}function a(e){return i().getItem(e)}e.exports={name:"sessionStorage",read:a,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(a(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},DlQD:
/*!*******************************************!*\
!*** ./node_modules/marked/lib/marked.js ***!
\*******************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){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}}e.exports={defaults:{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},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),a=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var f=/(^|[^\[])\^/g,h=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},v=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){m[" "+e]||(v.test(e)?m[" "+e]=e+"/":m[" "+e]=_(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(g,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(y,"$1")+t:e+t}function _(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i<r;){var a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}var E=function(e,t){if(t){if(i.test(e))return e.replace(a,c)}else if(o.test(e))return e.replace(s,c);return e},x=d,S=function(e,t){e=e.source||e,t=t||"";var n={replace:function(t,r){return r=(r=r.source||r).replace(f,"$1"),e=e.replace(t,r),n},getRegex:function(){return new RegExp(e,t)}};return n},w=function(e,t,n){if(e){var r;try{r=decodeURIComponent(d(n)).replace(h,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!p.test(n)&&(n=b(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},k={exec:function(){}},T=function(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},O=function(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var r=!1,i=t;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},C=_,A=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,r=0,i=0;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&--r<0)return i;return-1},L=function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")},D=r.defaults,I=C,R=O,N=E,M=A;function P(e,t,n){var r=t.href,i=t.title?N(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:a}:{type:"image",raw:n,href:r,title:i,text:N(a)}}var j=function(){function e(e){this.options=e||D}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r],n.header.length);return n}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,a,o,s,l,c=t[0],u=t[2],d=u.length>1,f=")"===u[u.length-1],h={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,v=p.length,g=0;g<v;g++)c=n=p[g],r=n.length,~(n=n.replace(/^ *([*+-]|\d+[.)]) */,"")).indexOf("\n ")&&(r-=n.length,n=this.options.pedantic?n.replace(/^ {1,4}/gm,""):n.replace(new RegExp("^ {1,"+r+"}","gm"),"")),g!==v-1&&(i=this.rules.block.bullet.exec(p[g+1])[0],(d?1===i.length||!f&&")"===i[i.length-1]:i.length>1||this.options.smartLists&&i!==u)&&(a=p.slice(g+1).join("\n"),h.raw=h.raw.substring(0,h.raw.length-a.length),g=v-1)),o=m||/\n\n(?!\s*$)/.test(n),g!==v-1&&(m="\n"===n.charAt(n.length-1),o||(o=m)),o&&(h.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),h.items.push({type:"list_item",raw:c,task:s,checked:l,loose:o,text:n});return h}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r<i;r++)/^ *-+: *$/.test(n.align[r])?n.align[r]="right":/^ *:-+: *$/.test(n.align[r])?n.align[r]="center":/^ *:-+ *$/.test(n.align[r])?n.align[r]="left":n.align[r]=null;for(i=n.cells.length,r=0;r<i;r++)n.cells[r]=R(n.cells[r].replace(/^ *\| *| *\| *$/g,""),n.header.length);return n}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var n=this.rules.block.text.exec(e);if(n){var r=t[t.length-1];return r&&"text"===r.type?{raw:n[0],text:n[0]}:{type:"text",raw:n[0],text:n[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:N(t[1])}},t.tag=function(e,t,n){var r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):N(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=M(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],a="";if(this.options.pedantic){var o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o?(i=o[1],a=o[3]):a=""}else a=t[3]?t[3].slice(1,-1):"";return P(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return P(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,a="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(a.lastIndex=0;null!=(r=a.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=N(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=N(this.options.mangle?t(i[1]):i[1])):n=N(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=N(this.options.mangle?t(n[0]):n[0]));else{var a;do{a=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(a!==n[0]);r=N(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):N(i[0]):i[0]:N(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),F=k,U=S,B=T,G={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]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:F,table:F,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};G.def=U(G.def).replace("label",G._label).replace("title",G._title).getRegex(),G.bullet=/(?:[*+-]|\d{1,9}[.)])/,G.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,G.item=U(G.item,"gm").replace(/bull/g,G.bullet).getRegex(),G.list=U(G.list).replace(/bull/g,G.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+G.def.source+")").getRegex(),G._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",G._comment=/<!--(?!-?>)[\s\S]*?-->/,G.html=U(G.html,"i").replace("comment",G._comment).replace("tag",G._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G.paragraph=U(G._paragraph).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.blockquote=U(G.blockquote).replace("paragraph",G.paragraph).getRegex(),G.normal=B({},G),G.gfm=B({},G.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*|$)"}),G.gfm.nptable=U(G.gfm.nptable).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.gfm.table=U(G.gfm.table).replace("hr",G.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.pedantic=B({},G.normal,{html:U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",G._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:F,paragraph:U(G.normal._paragraph).replace("hr",G.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",G.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",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:F,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};z.punctuation=U(z.punctuation).replace(/punctuation/g,z._punctuation).getRegex(),z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",z.em.start=U(z.em.start).replace(/punctuation/g,z._punctuation).getRegex(),z.em.middle=U(z.em.middle).replace(/punctuation/g,z._punctuation).replace(/overlapSkip/g,z._overlapSkip).getRegex(),z.em.endAst=U(z.em.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.em.endUnd=U(z.em.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.start=U(z.strong.start).replace(/punctuation/g,z._punctuation).getRegex(),z.strong.middle=U(z.strong.middle).replace(/punctuation/g,z._punctuation).replace(/blockSkip/g,z._blockSkip).getRegex(),z.strong.endAst=U(z.strong.endAst,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.strong.endUnd=U(z.strong.endUnd,"g").replace(/punctuation/g,z._punctuation).getRegex(),z.blockSkip=U(z._blockSkip,"g").getRegex(),z.overlapSkip=U(z._overlapSkip,"g").getRegex(),z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,z._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])?)+(?![-_])/,z.autolink=U(z.autolink).replace("scheme",z._scheme).replace("email",z._email).getRegex(),z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,z.tag=U(z.tag).replace("comment",G._comment).replace("attribute",z._attribute).getRegex(),z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,z.link=U(z.link).replace("label",z._label).replace("href",z._href).replace("title",z._title).getRegex(),z.reflink=U(z.reflink).replace("label",z._label).getRegex(),z.reflinkSearch=U(z.reflinkSearch,"g").replace("reflink",z.reflink).replace("nolink",z.nolink).getRegex(),z.normal=B({},z),z.pedantic=B({},z.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:U(/^!?\[(label)\]\((.*?)\)/).replace("label",z._label).getRegex(),reflink:U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",z._label).getRegex()}),z.gfm=B({},z.normal,{escape:U(z.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]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),z.gfm.url=U(z.gfm.url,"i").replace("email",z.gfm._extended_email).getRegex(),z.breaks=B({},z.gfm,{br:U(z.br).replace("{2,}","*").getRegex(),text:U(z.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var H={block:G,inline:z},K=r.defaults,V=H.block,W=H.inline;function q(e){return e.replace(/---/g,"—").replace(/--/g,"").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1").replace(/'/g,"").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function X(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var Y=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||K,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:V.normal,inline:W.normal};this.options.pedantic?(t.block=V.pedantic,t.inline=W.pedantic):this.options.gfm&&(t.block=V.gfm,this.options.breaks?t.inline=W.breaks:t.inline=W.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,a=t.prototype;return a.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},a.blockTokens=function(e,t,n){var r,i,a,o;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),a=r.items.length,i=0;i<a;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((o=t[t.length-1]).raw+="\n"+r.raw,o.text+="\n"+r.text);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return t},a.inline=function(e){var t,n,r,i,a,o,s=e.length;for(t=0;t<s;t++)switch((o=e[t]).type){case"paragraph":case"text":case"heading":o.tokens=[],this.inlineTokens(o.text,o.tokens);break;case"table":for(o.tokens={header:[],cells:[]},i=o.header.length,n=0;n<i;n++)o.tokens.header[n]=[],this.inlineTokens(o.header[n],o.tokens.header[n]);for(i=o.cells.length,n=0;n<i;n++)for(a=o.cells[n],o.tokens.cells[n]=[],r=0;r<a.length;r++)o.tokens.cells[n][r]=[],this.inlineTokens(a[r],o.tokens.cells[n][r]);break;case"blockquote":this.inline(o.tokens);break;case"list":for(i=o.items.length,n=0;n<i;n++)this.inline(o.items[n].tokens)}return e},a.inlineTokens=function(e,t,n,r,i){var a;void 0===t&&(t=[]),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===i&&(i="");var o,s=e;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(a=this.tokenizer.escape(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.tag(e,n,r))e=e.substring(a.raw.length),n=a.inLink,r=a.inRawBlock,t.push(a);else if(a=this.tokenizer.link(e))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(a.raw.length),"link"===a.type&&(a.tokens=this.inlineTokens(a.text,[],!0,r)),t.push(a);else if(a=this.tokenizer.strong(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.em(e,s,i))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.codespan(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.br(e))e=e.substring(a.raw.length),t.push(a);else if(a=this.tokenizer.del(e))e=e.substring(a.raw.length),a.tokens=this.inlineTokens(a.text,[],n,r),t.push(a);else if(a=this.tokenizer.autolink(e,X))e=e.substring(a.raw.length),t.push(a);else if(n||!(a=this.tokenizer.url(e,X))){if(a=this.tokenizer.inlineText(e,r,q))e=e.substring(a.raw.length),i=a.raw.slice(-1),t.push(a);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(a.raw.length),t.push(a);return t},n=t,i=[{key:"rules",get:function(){return{block:V,inline:W}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),$=r.defaults,J=w,Q=E,Z=function(){function e(e){this.options=e||$}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'<pre><code class="'+this.options.langPrefix+Q(r,!0)+'">'+(n?e:Q(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:Q(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+Q(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},t.image=function(e,t,n){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=x,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,a,o,s,l,c,u,d,f,h,p,m,v,g,y,b,_="",E=e.length;for(n=0;n<E;n++)switch((d=e[n]).type){case"space":continue;case"hr":_+=this.renderer.hr();continue;case"heading":_+=this.renderer.heading(this.parseInline(d.tokens),d.depth,re(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":_+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",l="",a=d.header.length,r=0;r<a;r++)l+=this.renderer.tablecell(this.parseInline(d.tokens.header[r]),{header:!0,align:d.align[r]});for(c+=this.renderer.tablerow(l),u="",a=d.cells.length,r=0;r<a;r++){for(l="",o=(s=d.tokens.cells[r]).length,i=0;i<o;i++)l+=this.renderer.tablecell(this.parseInline(s[i]),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(l)}_+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),_+=this.renderer.blockquote(u);continue;case"list":for(f=d.ordered,h=d.start,p=d.loose,a=d.items.length,u="",r=0;r<a;r++)g=(v=d.items[r]).checked,y=v.task,m="",v.task&&(b=this.renderer.checkbox(g),p?v.tokens.length>0&&"text"===v.tokens[0].type?(v.tokens[0].text=b+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=b+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(v.tokens,p),u+=this.renderer.listitem(m,y,g);_+=this.renderer.list(u,f,h);continue;case"html":_+=this.renderer.html(d.text);continue;case"paragraph":_+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<E&&"text"===e[n+1].type;)u+="\n"+((d=e[++n]).tokens?this.parseInline(d.tokens):d.text);_+=t?this.renderer.paragraph(u):u;continue;default:var x='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(x);throw new Error(x)}return _},t.parseInline=function(e,t){t=t||this.renderer;var n,r,i="",a=e.length;for(n=0;n<a;n++)switch((r=e[n]).type){case"escape":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;case"text":i+=t.text(r.text);break;default:var o='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(o);throw new Error(o)}return i},e}(),ae=T,oe=L,se=E,le=r.getDefaults,ce=r.changeDefaults,ue=r.defaults;function de(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),t=ae({},de.defaults,t||{}),oe(t),n){var r,i=t.highlight;try{r=Y.lex(e,t)}catch(e){return n(e)}var a=function(e){var a;if(!e)try{a=ie.parse(r,t)}catch(t){e=t}return t.highlight=i,e?n(e):n(null,a)};if(!i||i.length<3)return a();if(delete t.highlight,!r.length)return a();var o=0;return de.walkTokens(r,(function(e){"code"===e.type&&(o++,setTimeout((function(){i(e.text,e.lang,(function(t,n){if(t)return a(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0==--o&&a()}))}),0))})),void(0===o&&a())}try{var s=Y.lex(e,t);return t.walkTokens&&de.walkTokens(s,t.walkTokens),ie.parse(s,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+se(e.message+"",!0)+"</pre>";throw e}}return de.options=de.setOptions=function(e){return ae(de.defaults,e),ce(de.defaults),de},de.getDefaults=le,de.defaults=ue,de.use=function(e){var t=ae({},e);if(e.renderer&&function(){var n=de.defaults.renderer||new Z,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=e.renderer[t].apply(n,a);return!1===s&&(s=r.apply(n,a)),s}};for(var i in e.renderer)r(i);t.renderer=n}(),e.tokenizer&&function(){var n=de.defaults.tokenizer||new j,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=e.tokenizer[t].apply(n,a);return!1===s&&(s=r.apply(n,a)),s}};for(var i in e.tokenizer)r(i);t.tokenizer=n}(),e.walkTokens){var n=de.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),n&&n(t)}}de.setOptions(t)},de.walkTokens=function(e,t){for(var r,i=n(e);!(r=i()).done;){var a=r.value;switch(t(a),a.type){case"table":for(var o,s=n(a.tokens.header);!(o=s()).done;){var l=o.value;de.walkTokens(l,t)}for(var c,u=n(a.tokens.cells);!(c=u()).done;)for(var d,f=n(c.value);!(d=f()).done;){var h=d.value;de.walkTokens(h,t)}break;case"list":de.walkTokens(a.items,t);break;default:a.tokens&&de.walkTokens(a.tokens,t)}}},de.Parser=ie,de.parser=ie.parse,de.Renderer=Z,de.TextRenderer=ee,de.Lexer=Y,de.lexer=Y.lex,de.Tokenizer=j,de.Slugger=te,de.parse=de,de}()},"DlR+":
/*!******************************************************!*\
!*** ./node_modules/store/storages/cookieStorage.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../src/util */"MFOe"),i=r.Global,a=r.trim;e.exports={name:"cookieStorage",read:function(e){if(!e||!c(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(o.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){if(!e)return;o.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:s,remove:l,clearAll:function(){s((function(e,t){l(t)}))}};var o=i.document;function s(e){for(var t=o.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(a(t[n])){var r=t[n].split("="),i=unescape(r[0]);e(unescape(r[1]),i)}}function l(e){e&&c(e)&&(o.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function c(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(o.cookie)}},E2g8:
/*!******************************************************!*\
!*** ./node_modules/es6-promise/dist/es6-promise.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t,n){
/*!
* @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
*/var r;r=function(){"use strict";function e(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,a=void 0,o=void 0,s=function(e,t){p[i]=e,p[i+1]=t,2===(i+=2)&&(o?o(m):_())},l="undefined"!=typeof window?window:void 0,c=l||{},u=c.MutationObserver||c.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var e=setTimeout;return function(){return e(m,1)}}var p=new Array(1e3);function m(){for(var e=0;e<i;e+=2)(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0;i=0}var v,g,y,b,_=void 0;function E(e,t){var n=this,r=new this.constructor(w);void 0===r[S]&&N(r);var i=n._state;if(i){var a=arguments[i-1];s((function(){return I(i,r,a,n._result)}))}else L(n,r,e,t);return r}function x(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(w);return T(t,e),t}d?_=function(){return t.nextTick(m)}:u?(g=0,y=new u(m),b=document.createTextNode(""),y.observe(b,{characterData:!0}),_=function(){b.data=g=++g%2}):f?((v=new MessageChannel).port1.onmessage=m,_=function(){return v.port2.postMessage(0)}):_=void 0===l?function(){try{var e=Function("return this")().require("vertx");return void 0!==(a=e.runOnLoop||e.runOnContext)?function(){a(m)}:h()}catch(e){return h()}}():h();var S=Math.random().toString(36).substring(2);function w(){}function k(t,n,r){n.constructor===t.constructor&&r===E&&n.constructor.resolve===x?function(e,t){1===t._state?C(e,t._result):2===t._state?A(e,t._result):L(t,void 0,(function(t){return T(e,t)}),(function(t){return A(e,t)}))}(t,n):void 0===r?C(t,n):e(r)?function(e,t,n){s((function(e){var r=!1,i=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?T(e,n):C(e,n))}),(function(t){r||(r=!0,A(e,t))}),e._label);!r&&i&&(r=!0,A(e,i))}),e)}(t,n,r):C(t,n)}function T(e,t){if(e===t)A(e,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=t),null===r||"object"!==i&&"function"!==i)C(e,t);else{var n=void 0;try{n=t.then}catch(t){return void A(e,t)}k(e,t,n)}var r,i}function O(e){e._onerror&&e._onerror(e._result),D(e)}function C(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(D,e))}function A(e,t){void 0===e._state&&(e._state=2,e._result=t,s(O,e))}function L(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+1]=n,i[a+2]=r,0===a&&e._state&&s(D,e)}function D(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,a=e._result,o=0;o<t.length;o+=3)r=t[o],i=t[o+n],r?I(n,r,i,a):i(a);e._subscribers.length=0}}function I(t,n,r,i){var a=e(r),o=void 0,s=void 0,l=!0;if(a){try{o=r(i)}catch(e){l=!1,s=e}if(n===o)return void A(n,new TypeError("A promises callback cannot return that same promise."))}else o=i;void 0!==n._state||(a&&l?T(n,o):!1===l?A(n,s):1===t?C(n,o):2===t&&A(n,o))}var R=0;function N(e){e[S]=R++,e._state=void 0,e._result=void 0,e._subscribers=[]}var M=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(w),this.promise[S]||N(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?C(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&C(this.promise,this._result))):A(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===x){var i=void 0,a=void 0,o=!1;try{i=e.then}catch(e){o=!0,a=e}if(i===E&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===P){var s=new n(w);o?A(s,a):k(s,e,i),this._willSettleAt(s,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===e?A(r,n):this._result[t]=n),0===this._remaining&&C(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;L(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}(),P=function(){function t(e){this[S]=R++,this._result=this._state=void 0,this._subscribers=[],w!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){T(e,t)}),(function(t){A(e,t)}))}catch(t){A(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this.constructor;return e(t)?this.then((function(e){return n.resolve(t()).then((function(){return e}))}),(function(e){return n.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return P.prototype.then=E,P.all=function(e){return new M(this,e).promise},P.race=function(e){var t=this;return r(e)?new t((function(n,r){for(var i=e.length,a=0;a<i;a++)t.resolve(e[a]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},P.resolve=x,P.reject=function(e){var t=new this(w);return A(t,e),t},P._setScheduler=function(e){o=e},P._setAsap=function(e){s=e},P._asap=s,P.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=P},P.Promise=P,P},e.exports=r()}).call(this,n(/*! ./../../node-libs-browser/mock/process.js */"Q2Ig"),n(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},E9nw:
/*!************************************************!*\
!*** ./node_modules/toggle-selection/index.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},EHPI:
/*!*******************************************************!*\
!*** ./src/pages/Problems/OjForm/CodePanel/index.tsx ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/drawer/style */"bbsP");var r,i=n(/*! antd/es/drawer */"/wGt"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! @/components/monaco-editor */"ZW9T"),u=n(/*! @/components/tpi-code-setting/CodeSetting */"ZD9Y"),d=n(/*! @/components/modal */"M8RZ"),f=n(/*! @/utils/urlTool */"bCnd"),h=(n(/*! ./index.less */"fcyK"),{theme:Object(f.a)("cmCodeMode","vs-dark"),fontSize:Object(f.a)("cmFontSize",14),showEditorSetting:!1,tabToSpace:Object(f.a)("cmTabToSpace",!0)});function p(e,t){switch(t.type){case r.set_show_editor_setting:return Object(o.a)(Object(o.a)({},e),{},{showEditorSetting:t.payload});case r.set_theme:return Object(o.a)(Object(o.a)({},e),{},{theme:t.payload});case r.set_font_size:return Object(o.a)(Object(o.a)({},e),{},{fontSize:t.payload});case r.on_tab_to_space:return Object(o.a)(Object(o.a)({},e),{},{tabToSpace:t.payload});default:throw new Error}}function m(e){var t=e.onShowCodeSetting;return l.a.createElement("div",{className:"action-bar"},l.a.createElement("span",null,"学员初始代码文件"),l.a.createElement("a",{onClick:t},l.a.createElement("i",{className:"iconfont icon-shezhi"})))}!function(e){e[e.set_font_size=0]="set_font_size",e[e.set_theme=1]="set_theme",e[e.on_tab_to_space=2]="on_tab_to_space",e[e.set_show_editor_setting=3]="set_show_editor_setting"}(r||(r={})),t.a=function(e){var t=e.value,n=e.onChange,o=e.language,v=e.ActionBarRender,g=void 0===v?function(e){return l.a.createElement(m,{onShowCodeSetting:e})}:v,y=Object(s.useReducer)(p,h),b=Object(a.a)(y,2),_=b[0],E=b[1],x=_.theme,S=_.fontSize,w=_.showEditorSetting,k=_.tabToSpace,T={onFontSizeChange:function(e){E({type:r.set_font_size,payload:e}),Object(f.b)("cmFontSize",e)},tabToSpace:k,cmFontSize:S,className:"oj",cmCodeMode:x,onTabToSpace:function(e){E({type:r.on_tab_to_space,payload:e}),Object(f.b)("cmTabToSpace",e)},onCodeModeChange:function(e){E({type:r.set_theme,payload:e}),Object(f.b)("cmCodeMode",e)}};var O={value:t,language:o,onChange:n,theme:x,height:"calc(100% - 56px)",options:{fontSize:S,insertSpaces:k}};return l.a.createElement(s.Fragment,null,l.a.createElement("div",{className:"code-panel-container"},g((function(){E({type:r.set_show_editor_setting,payload:!0})})),l.a.createElement(c.b,O)),l.a.createElement(d.a,null,l.a.createElement(i.a,{className:"oj",title:null,placement:"right",closable:!1,visible:w,onClose:function(){E({type:r.set_show_editor_setting,payload:!1})}},l.a.createElement(u.a,T))))}},ELLl:
/*!*************************************************************!*\
!*** ./node_modules/codemirror/addon/edit/closebrackets.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=t.listSelections(),c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var u=l(t,o[c].head);if(!u||a.indexOf(u)%2!=0)return e.Pass}for(c=o.length-1;c>=0;c--){var d=o[c].head;t.replaceRange("",n(d.line,d.ch-1),n(d.line,d.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o<a.length;o++){if(!a[o].empty())return e.Pass;var c=l(t,a[o].head);if(!c||i.indexOf(c)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),a=t.listSelections();for(var n=0;n<a.length;n++){var r=a[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function a(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=o(n))}}function o(t){return function(i){return function(t,i){var a=s(t);if(!a||t.getOption("disableInput"))return e.Pass;var o=r(a,"pairs"),l=o.indexOf(i);if(-1==l)return e.Pass;for(var u,d=r(a,"closeBefore"),f=r(a,"triples"),h=o.charAt(l+1)==i,p=t.listSelections(),m=l%2==0,v=0;v<p.length;v++){var g,y=p[v],b=y.head,_=t.getRange(b,n(b.line,b.ch+1));if(m&&!y.empty())g="surround";else if(!h&&m||_!=i)if(h&&b.ch>1&&f.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;g="addFour"}else if(h){var E=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(_)||E==i||e.isWordChar(E))return e.Pass;g="both"}else{if(!m||!(0===_.length||/\s/.test(_)||d.indexOf(_)>-1))return e.Pass;g="both"}else g=h&&c(t,b)?"both":f.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=g)return e.Pass}else u=g}var x=l%2?o.charAt(l-1):i,S=l%2?i:o.charAt(l+1);t.operation((function(){if("skip"==u)t.execCommand("goCharRight");else if("skipThree"==u)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==u){var i=t.getSelections();for(r=0;r<i.length;r++)i[r]=x+i[r]+S;for(t.replaceSelections(i,"around"),i=t.listSelections().slice(),r=0;r<i.length;r++)i[r]=(a=i[r],o=void 0,o=e.cmpPos(a.anchor,a.head)>0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==u?(t.replaceSelection(x+S,null),t.triggerElectric(x+S),t.execCommand("goCharLeft")):"addFour"==u&&(t.replaceSelection(x+x+x+x,"before"),t.execCommand("goCharRight"));var a,o}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(/*! ../../lib/codemirror */"VrN/"))},FOrL:
/*!********************************************!*\
!*** ./src/assets/images/icons/nodata.png ***!
\********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/nodata.a6b3f948.png"},GUcZ:
/*!*****************************************************!*\
!*** ./node_modules/flv.js/src/flv.js + 40 modules ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/events/events.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("fWQN"),i=n("mtLc"),a=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},"function"!=typeof self.Promise&&n(/*! es6-promise */"E2g8").polyfill()}}]),e}();a.install();var o=a,s=n("+qE3"),l=n.n(s),c=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"e",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","error",r),e.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","info",r),e.ENABLE_INFO&&(console.info?console.info(r):console.log(r))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",r),e.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",r),e.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",r),e.ENABLE_VERBOSE&&console.log(r)}}]),e}();c.GLOBAL_TAG="flv.js",c.FORCE_GLOBAL_TAG=!1,c.ENABLE_ERROR=!0,c.ENABLE_INFO=!0,c.ENABLE_WARN=!0,c.ENABLE_DEBUG=!0,c.ENABLE_VERBOSE=!0,c.ENABLE_CALLBACK=!1,c.emitter=new l.a;var u=c,d=function(){function e(){Object(r.a)(this,e),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(i.a)(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}(),f=n("yKVA"),h=n("879j"),p=function(){function e(t){Object(r.a)(this,e),this._message=t}return Object(i.a)(e,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),e}(),m=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"IllegalStateException"}}]),n}(p),v=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"InvalidArgumentException"}}]),n}(p),g=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e){return Object(r.a)(this,n),t.call(this,e)}return Object(i.a)(n,[{key:"name",get:function(){return"NotImplementedException"}}]),n}(p),y={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},b={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},_=function(){function e(t){Object(r.a)(this,e),this._type=t||"undefined",this._status=y.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._status=y.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===y.kConnecting||this._status===y.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(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"open",value:function(e,t){throw new g("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new g("Unimplemented abstract function!")}}]),e}(),E=n("oZsa");function x(e,t,n){return(x="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(E.a)(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}var S={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},i={};if(r.browser){i[r.browser]=!0;var a=r.majorVersion.split(".");i.version={major:parseInt(r.majorVersion,10),string:r.version},a.length>1&&(i.version.minor=parseInt(a[1],10)),a.length>2&&(i.version.build=parseInt(a[2],10))}if(r.platform&&(i[r.platform]=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),i.rv||i.iemobile){i.rv&&delete i.rv;r.browser="msie",i.msie=!0}if(i.edge){delete i.edge;r.browser="msedge",i.msedge=!0}if(i.opr){r.browser="opera",i.opera=!0}if(i.safari&&i.android){r.browser="android",i.android=!0}for(var o in i.name=r.browser,i.platform=r.platform,S)S.hasOwnProperty(o)&&delete S[o];Object.assign(S,i)}();var w=S,k=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"fetch-stream-loader")).TAG="FetchStreamLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),x(Object(E.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var i=this._seekHandler.getConfig(r,t),a=new self.Headers;if("object"==typeof i.headers){var o=i.headers;for(var s in o)o.hasOwnProperty(s)&&a.append(s,o[s])}var l={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var c in this._config.headers)a.append(c,this._config.headers[c]);!1===e.cors&&(l.mode="same-origin"),e.withCredentials&&(l.credentials="include"),e.referrerPolicy&&(l.referrerPolicy=e.referrerPolicy),this._status=y.kConnecting,self.fetch(i.url,l).then((function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=y.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==i.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var r=e.headers.get("Content-Length");return null!=r&&(n._contentLength=parseInt(r),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=y.kError,!n._onError)throw new p("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(b.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(n._status=y.kError,!n._onError)throw e;n._onError(b.EXCEPTION,{code:-1,msg:e.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then((function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=y.kError;var r=b.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new p(i.msg);t._onError(r,i)}else t._status=y.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=y.kComplete,e.cancel();t._status=y.kBuffering;var a=n.value.buffer,o=t._range.from+t._receivedLength;t._receivedLength+=a.byteLength,t._onDataArrival&&t._onDataArrival(a,o,t._receivedLength),t._pump(e)}})).catch((function(e){if(11!==e.code||!w.msedge){t._status=y.kError;var n=0,r=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(n=b.EXCEPTION,r={code:e.code,msg:e.message}):(n=b.EARLY_EOF,r={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new p(r.msg);t._onError(n,r)}}))}}],[{key:"isSupported",value:function(){try{var e=w.msedge&&w.version.minor>=15048,t=!w.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),n}(_),T=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"xhr-moz-chunked-loader")).TAG="MozChunkedLoader",a._seekHandler=e,a._config=i,a._needStash=!0,a._xhr=null,a._requestAbort=!1,a._contentLength=null,a._receivedLength=0,a}return Object(i.a)(n,[{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),x(Object(E.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var r=this._seekHandler.getConfig(n,t);this._requestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="moz-chunked-arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onloadend=this._onLoadEnd.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"==typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}this._status=y.kConnecting,i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=y.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=y.kError,!this._onError)throw new p("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(b.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=y.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==y.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==y.kError&&(this._status=y.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=y.kError;var t=0,n=null;if(this._contentLength&&e.loaded<this._contentLength?(t=b.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=b.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new p(n.msg);this._onError(t,n)}}],[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return u.w("MozChunkedLoader",e.message),!1}}}]),n}(_),O=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,"xhr-range-loader")).TAG="RangeLoader",a._seekHandler=e,a._config=i,a._needStash=!1,a._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],a._currentChunkSizeKB=384,a._currentSpeedNormalized=0,a._zeroSpeedChunkCount=0,a._xhr=null,a._speedSampler=new d,a._requestAbort=!1,a._waitForTotalLength=!1,a._totalLengthReceived=!1,a._currentRequestURL=null,a._currentRedirectedURL=null,a._currentRequestRange=null,a._totalLength=null,a._contentLength=null,a._receivedLength=0,a._lastTimeLoaded=0,a}return Object(i.a)(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),x(Object(E.a)(n.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=y.kConnecting;var n=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,n=t+e;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var i=this._xhr=new XMLHttpRequest;if(i.open("GET",r.url,!0),i.responseType="arraybuffer",i.onreadystatechange=this._onReadyStateChange.bind(this),i.onprogress=this._onProgress.bind(this),i.onload=this._onLoad.bind(this),i.onerror=this._onXhrError.bind(this),e.withCredentials&&(i.withCredentials=!0),"object"==typeof r.headers){var a=r.headers;for(var o in a)a.hasOwnProperty(o)&&i.setRequestHeader(o,a[o])}if("object"==typeof this._config.headers){var s=this._config.headers;for(var l in s)s.hasOwnProperty(l)&&i.setRequestHeader(l,s[l])}i.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=y.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(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=y.kBuffering}else{if(this._status=y.kError,!this._onError)throw new p("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(b.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==y.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(r)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,r=0,i=0,a=n;if(e<t[0])return t[0];for(;i<=a;){if((r=i+Math.floor((a-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:a=r-1}}},{key:"_onLoad",value:function(e){if(this._status!==y.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var r=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var a=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():a=!0,this._onDataArrival&&this._onDataArrival(r,i,this._receivedLength),a&&(this._status=y.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){this._status=y.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=b.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=b.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new p(n.msg);this._onError(t,n)}}],[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return u.w("RangeLoader",e.message),!1}}}]),n}(_),C=function(e){Object(f.a)(n,e);var t=Object(h.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.call(this,"websocket-loader")).TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return Object(i.a)(n,[{key:"destroy",value:function(){this._ws&&this.abort(),x(Object(E.a)(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=y.kConnecting}catch(e){this._status=y.kError;var n={code:e.code,msg:e.message};if(!this._onError)throw new p(n.msg);this._onError(b.EXCEPTION,n)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=y.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=y.kBuffering}},{key:"_onWebSocketClose",value:function(e){!0!==this._requestAbort?(this._status=y.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{this._status=y.kError;var r={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new p(r.msg);this._onError(b.EXCEPTION,r)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,n=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=y.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new p(t.msg);this._onError(b.EXCEPTION,t)}}],[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),n}(_),A=function(){function e(t){Object(r.a)(this,e),this._zeroStart=t||!1}return Object(i.a)(e,[{key:"getConfig",value:function(e,t){var n,r={};0!==t.from||-1!==t.to?(n=-1!==t.to?"bytes=".concat(t.from.toString(),"-").concat(t.to.toString()):"bytes=".concat(t.from.toString(),"-"),r.Range=n):this._zeroStart&&(r.Range="bytes=0-");return{url:e,headers:r}}},{key:"removeURLParameters",value:function(e){return e}}]),e}(),L=function(){function e(t,n){Object(r.a)(this,e),this._startName=t,this._endName=n}return Object(i.a)(e,[{key:"getConfig",value:function(e,t){var n=e;if(0!==t.from||-1!==t.to){var r=!0;-1===n.indexOf("?")&&(n+="?",r=!1),r&&(n+="&"),n+="".concat(this._startName,"=").concat(t.from.toString()),-1!==t.to&&(n+="&".concat(this._endName,"=").concat(t.to.toString()))}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],n=void 0,r=e.indexOf("?");-1!==r&&(n=e.substring(r+1));var i="";if(null!=n&&n.length>0)for(var a=n.split("&"),o=0;o<a.length;o++){var s=a[o].split("="),l=o>0;s[0]!==this._startName&&s[0]!==this._endName&&(l&&(i+="&"),i+=a[o])}return 0===i.length?t:t+"?"+i}}]),e}(),D=function(){function e(t,n,i){Object(r.a)(this,e),this.TAG="IOController",this._config=n,this._extraData=i,this._stashInitialSize=393216,null!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new d,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(i.a)(e,[{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(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===O?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new A(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new L(t,n)}else{if("custom"!==e.seekType)throw new v("Invalid seekType in config: ".concat(e.seekType));if("function"!=typeof e.customSeekHandler)throw new v("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=C;else if(k.isSupported())this._loaderClass=k;else if(T.isSupported())this._loaderClass=T;else{if(!O.isSupported())throw new p("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=O}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(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(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(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(),0!==this._stashUsed?(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 e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new v("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(r,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,r=0,i=0,a=n;if(e<t[0])return t[0];for(;i<=a;){if((r=i+Math.floor((a-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:a=r-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,n){if(!this._onDataArrival)throw new m("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var r=this._speedSampler.lastSecondKBps;if(0!==r){var i=this._normalizeSpeed(r);this._speedNormalized!==i&&(this._speedNormalized=i,this._adjustStashSize(i))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var a=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var o=this._stashBuffer.slice(0,this._stashUsed),s=this._dispatchChunks(o,this._stashByteStart);if(s<o.byteLength){if(s>0){var l=new Uint8Array(o,s);a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=s}}else this._stashUsed=0,this._stashByteStart+=s;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var c=this._dispatchChunks(e,t);if(c<e.byteLength){var u=e.byteLength-c;u>this._bufferSize&&(this._expandBuffer(u),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,c),0),this._stashUsed+=u,this._stashByteStart=t+c}}}else if(0===this._stashUsed){var d=this._dispatchChunks(e,t);if(d<e.byteLength){var f=e.byteLength-d;f>this._bufferSize&&this._expandBuffer(f),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,d),0),this._stashUsed+=f,this._stashByteStart=t+d}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var h=new Uint8Array(this._stashBuffer,0,this._bufferSize);h.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p<this._stashUsed&&p>0){var v=new Uint8Array(this._stashBuffer,p);h.set(v,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-n;if(n<t.byteLength){if(!e){if(n>0){var i=new Uint8Array(this._stashBuffer,0,this._bufferSize),a=new Uint8Array(t,n);i.set(a,0),this._stashUsed=a.byteLength,this._stashByteStart+=n}return 0}u.w(this.TAG,"".concat(r," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,r}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){switch(u.e(this.TAG,"Loader error, code = ".concat(t.code,", msg = ").concat(t.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=b.UNRECOVERABLE_EARLY_EOF),e){case b.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(u.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}e=b.UNRECOVERABLE_EARLY_EOF}if(!this._onError)throw new p("IOException: "+t.msg);this._onError(e,t)}}]),e}(),I={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function R(){return Object.assign({},I)}var N=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var e=new D({},R()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new D({},R()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){null==e.videoElement&&(e.videoElement=window.document.createElement("video"));var n=e.videoElement.canPlayType(t);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t}}]),e}(),M={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"},P=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"forceGlobalTag",get:function(){return u.FORCE_GLOBAL_TAG},set:function(t){u.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return u.GLOBAL_TAG},set:function(t){u.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return u.ENABLE_VERBOSE&&u.ENABLE_DEBUG&&u.ENABLE_INFO&&u.ENABLE_WARN&&u.ENABLE_ERROR},set:function(t){u.ENABLE_VERBOSE=t,u.ENABLE_DEBUG=t,u.ENABLE_INFO=t,u.ENABLE_WARN=t,u.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return u.ENABLE_DEBUG},set:function(t){u.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return u.ENABLE_VERBOSE},set:function(t){u.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return u.ENABLE_INFO},set:function(t){u.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return u.ENABLE_WARN},set:function(t){u.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return u.ENABLE_ERROR},set:function(t){u.ENABLE_ERROR=t,e._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:u.GLOBAL_TAG,forceGlobalTag:u.FORCE_GLOBAL_TAG,enableVerbose:u.ENABLE_VERBOSE,enableDebug:u.ENABLE_DEBUG,enableInfo:u.ENABLE_INFO,enableWarn:u.ENABLE_WARN,enableError:u.ENABLE_ERROR,enableCallback:u.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){u.GLOBAL_TAG=e.globalTag,u.FORCE_GLOBAL_TAG=e.forceGlobalTag,u.ENABLE_VERBOSE=e.enableVerbose,u.ENABLE_DEBUG=e.enableDebug,u.ENABLE_INFO=e.enableInfo,u.ENABLE_WARN=e.enableWarn,u.ENABLE_ERROR=e.enableError,u.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){u.emitter.addListener("log",t),u.emitter.listenerCount("log")>0&&(u.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){u.emitter.removeListener("log",t),0===u.emitter.listenerCount("log")&&(u.ENABLE_CALLBACK=!1,e._notifyChange())}}]),e}();P.emitter=new l.a;var j=P,F=function(){function e(){Object(r.a)(this,e),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(i.a)(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=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;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,r=e.length-1,i=0,a=0,o=r;for(t<e[0]&&(n=0,a=o+1);a<=o;){if((i=a+Math.floor((o-a)/2))===r||t>=e[i]&&t<e[i+1]){n=i;break}e[i]<t?a=i+1:o=i-1}return n}}]),e}();function U(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}var B,G=function(e){for(var t=[],n=e,r=0,i=e.length;r<i;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(U(n,r,1)){var a=(31&n[r])<<6|63&n[r+1];if(a>=128){t.push(String.fromCharCode(65535&a)),r+=2;continue}}}else if(n[r]<240){if(U(n,r,2)){var o=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(o>=2048&&55296!=(63488&o)){t.push(String.fromCharCode(65535&o)),r+=3;continue}}}else if(n[r]<248&&U(n,r,3)){var s=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(s>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},z=(B=new ArrayBuffer(2),new DataView(B).setInt16(0,256,!0),256===new Int16Array(B)[0]),H=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"parseScriptData",value:function(t,n,r){var i={};try{var a=e.parseValue(t,n,r),o=e.parseValue(t,n+a.size,r-a.size);i[a.data]=o.data}catch(e){u.e("AMF",e.toString())}return i}},{key:"parseObject",value:function(t,n,r){if(r<3)throw new m("Data not enough when parse ScriptDataObject");var i=e.parseString(t,n,r),a=e.parseValue(t,n+i.size,r-i.size),o=a.objectEnd;return{data:{name:i.data,value:a.data},size:i.size+a.size,objectEnd:o}}},{key:"parseVariable",value:function(t,n,r){return e.parseObject(t,n,r)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new m("Data not enough when parse String");var r=new DataView(e,t,n).getUint16(0,!z);return{data:r>0?G(new Uint8Array(e,t+2,r)):"",size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new m("Data not enough when parse LongString");var r=new DataView(e,t,n).getUint32(0,!z);return{data:r>0?G(new Uint8Array(e,t+4,r)):"",size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new m("Data size invalid when parse Date");var r=new DataView(e,t,n),i=r.getFloat64(0,!z),a=r.getInt16(8,!z);return{data:new Date(i+=60*a*1e3),size:10}}},{key:"parseValue",value:function(t,n,r){if(r<1)throw new m("Data not enough when parse Value");var i,a=new DataView(t,n,r),o=1,s=a.getUint8(0),l=!1;try{switch(s){case 0:i=a.getFloat64(1,!z),o+=8;break;case 1:i=!!a.getUint8(1),o+=1;break;case 2:var c=e.parseString(t,n+1,r-1);i=c.data,o+=c.size;break;case 3:i={};var d=0;for(9==(16777215&a.getUint32(r-4,!z))&&(d=3);o<r-4;){var f=e.parseObject(t,n+o,r-o-d);if(f.objectEnd)break;i[f.data.name]=f.data.value,o+=f.size}if(o<=r-3)9===(16777215&a.getUint32(o-1,!z))&&(o+=3);break;case 8:i={},o+=4;var h=0;for(9==(16777215&a.getUint32(r-4,!z))&&(h=3);o<r-8;){var p=e.parseVariable(t,n+o,r-o-h);if(p.objectEnd)break;i[p.data.name]=p.data.value,o+=p.size}if(o<=r-3)9===(16777215&a.getUint32(o-1,!z))&&(o+=3);break;case 9:i=void 0,o=1,l=!0;break;case 10:i=[];var v=a.getUint32(1,!z);o+=4;for(var g=0;g<v;g++){var y=e.parseValue(t,n+o,r-o);i.push(y.data),o+=y.size}break;case 11:var b=e.parseDate(t,n+1,r-1);i=b.data,o+=b.size;break;case 12:var _=e.parseString(t,n+1,r-1);i=_.data,o+=_.size;break;default:o=r,u.w("AMF","Unsupported AMF value type "+s)}}catch(e){u.e("AMF",e.toString())}return{data:i,size:o,objectEnd:l}}}]),e}(),K=function(){function e(t){Object(r.a)(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return Object(i.a)(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new m("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new v("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(r,this._current_word_bits_left),a=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,n=n<<i|a}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}(),V=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,r=new Uint8Array(n),i=0,a=0;a<n;a++)a>=2&&3===t[a]&&0===t[a-1]&&0===t[a-2]||(r[i]=t[a],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),r=new K(n);r.readByte();var i=r.readByte();r.readByte();var a=r.readByte();r.readUEG();var o=e.getProfileString(i),s=e.getLevelString(a),l=1,c=420,u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(c=[0,420,422,444][l]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var d=3!==l?8:12,f=0;f<d;f++)r.readBool()&&(f<6?e._skipScalingList(r,16):e._skipScalingList(r,64));r.readUEG();var h=r.readUEG();if(0===h)r.readUEG();else if(1===h){r.readBits(1),r.readSEG(),r.readSEG();for(var p=r.readUEG(),m=0;m<p;m++)r.readSEG()}var v=r.readUEG();r.readBits(1);var g=r.readUEG(),y=r.readUEG(),b=r.readBits(1);0===b&&r.readBits(1),r.readBits(1);var _=0,E=0,x=0,S=0;r.readBool()&&(_=r.readUEG(),E=r.readUEG(),x=r.readUEG(),S=r.readUEG());var w=1,k=1,T=0,O=!0,C=0,A=0;if(r.readBool()){if(r.readBool()){var L=r.readByte();L>0&&L<16?(w=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][L-1],k=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][L-1]):255===L&&(w=r.readByte()<<8|r.readByte(),k=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var D=r.readBits(32),I=r.readBits(32);O=r.readBool(),T=(C=I)/(A=2*D)}}var R=1;1===w&&1===k||(R=w/k);var N=0,M=0;0===l?(N=1,M=2-b):(N=3===l?1:2,M=(1===l?2:1)*(2-b));var P=16*(g+1),j=16*(y+1)*(2-b);P-=(_+E)*N,j-=(x+S)*M;var F=Math.ceil(P*R);return r.destroy(),r=null,{profile_string:o,level_string:s,bit_depth:u,ref_frames:v,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:O,fps:T,fps_den:A,fps_num:C},sar_ratio:{width:w,height:k},codec_size:{width:P,height:j},present_size:{width:F,height:j}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,r=8,i=0;i<t;i++)0!==r&&(r=(n+e.readSEG()+256)%256),n=0===r?n:r}},{key:"getProfileString",value:function(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}(),W={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};var q=function(){function e(t,n){Object(r.a)(this,e),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new F,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 e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return Object(i.a)(e,[{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(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new F}},{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}},{key:"parseChunks",value:function(t,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new m("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,i=this._littleEndian;if(0===n){if(!(t.byteLength>13))return 0;r=e.probe(t).dataOffset}this._firstParse&&(this._firstParse=!1,n+r!==this._dataOffset&&u.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,r).getUint32(0,!i)&&u.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);for(;r<t.byteLength;){this._dispatch=!0;var a=new DataView(t,r);if(r+11+4>t.byteLength)break;var o=a.getUint8(0),s=16777215&a.getUint32(0,!i);if(r+11+s+4>t.byteLength)break;if(8===o||9===o||18===o){var l=a.getUint8(4),c=a.getUint8(5),d=a.getUint8(6)|c<<8|l<<16|a.getUint8(7)<<24;0!==(16777215&a.getUint32(7,!i))&&u.w(this.TAG,"Meet tag which has StreamID != 0!");var f=r+11;switch(o){case 8:this._parseAudioData(t,f,s,d);break;case 9:this._parseVideoData(t,f,s,d,n+r);break;case 18:this._parseScriptData(t,f,s)}var h=a.getUint32(11+s,!i);h!==11+s&&u.w(this.TAG,"Invalid PrevTagSize ".concat(h)),r+=11+s+4}else u.w(this.TAG,"Unsupported tag type ".concat(o,", skipped")),r+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r}},{key:"_parseScriptData",value:function(e,t,n){var r=H.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!=typeof r.onMetaData)return void u.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&u.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var i=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},i)),"boolean"==typeof i.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=i.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof i.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=i.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof i.audiodatarate&&(this._mediaInfo.audioDataRate=i.audiodatarate),"number"==typeof i.videodatarate&&(this._mediaInfo.videoDataRate=i.videodatarate),"number"==typeof i.width&&(this._mediaInfo.width=i.width),"number"==typeof i.height&&(this._mediaInfo.height=i.height),"number"==typeof i.duration){if(!this._durationOverrided){var a=Math.floor(i.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof i.framerate){var o=Math.floor(1e3*i.framerate);if(o>0){var s=o/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=s,this._referenceFrameRate.fps_num=o,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=s}}if("object"==typeof i.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var l=i.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(l),i.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=i,u.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],r=1;r<e.times.length;r++){var i=this._timestampBase+Math.floor(1e3*e.times[r]);t.push(i),n.push(e.filepositions[r])}return{times:t,filepositions:n}}},{key:"_parseAudioData",value:function(e,t,n,r){if(n<=1)u.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var i=new DataView(e,t,n).getUint8(0),a=i>>>4;if(2===a||10===a){var o=0,s=(12&i)>>>2;if(s>=0&&s<=4){o=this._flvSoundRateTable[s];var l=1&i,c=this._audioMetadata,d=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(c=this._audioMetadata={}).type="audio",c.id=d.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=o,c.channelCount=0===l?1:2),10===a){var f=this._parseAACAudioData(e,t+1,n-1);if(null==f)return;if(0===f.packetType){c.config&&u.w(this.TAG,"Found another AudioSpecificConfig!");var h=f.data;c.audioSampleRate=h.samplingRate,c.channelCount=h.channelCount,c.codec=h.codec,c.originalCodec=h.originalCodec,c.config=h.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,u.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",c);var p=this._mediaInfo;p.audioCodec=c.originalCodec,p.audioSampleRate=c.audioSampleRate,p.audioChannelCount=c.channelCount,p.hasVideo?null!=p.videoCodec&&(p.mimeType='video/x-flv; codecs="'+p.videoCodec+","+p.audioCodec+'"'):p.mimeType='video/x-flv; codecs="'+p.audioCodec+'"',p.isComplete()&&this._onMediaInfo(p)}else if(1===f.packetType){var m=this._timestampBase+r,v={unit:f.data,length:f.data.byteLength,dts:m,pts:m};d.samples.push(v),d.length+=f.data.length}else u.e(this.TAG,"Flv: Unsupported AAC data type ".concat(f.packetType))}else if(2===a){if(!c.codec){var g=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==g)return;c.audioSampleRate=g.samplingRate,c.channelCount=g.channelCount,c.codec=g.codec,c.originalCodec=g.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,u.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c);var y=this._mediaInfo;y.audioCodec=c.codec,y.audioSampleRate=c.audioSampleRate,y.audioChannelCount=c.channelCount,y.audioDataRate=g.bitRate,y.hasVideo?null!=y.videoCodec&&(y.mimeType='video/x-flv; codecs="'+y.videoCodec+","+y.audioCodec+'"'):y.mimeType='video/x-flv; codecs="'+y.audioCodec+'"',y.isComplete()&&this._onMediaInfo(y)}var b=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==b)return;var _=this._timestampBase+r,E={unit:b,length:b.byteLength,dts:_,pts:_};d.samples.push(E),d.length+=b.length}}else this._onError(W.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+s)}else this._onError(W.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var r={},i=new Uint8Array(e,t,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):r.data=i.subarray(1),r}u.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var r,i,a=new Uint8Array(e,t,n),o=null,s=0,l=null;if(s=r=a[0]>>>3,(i=(7&a[0])<<1|a[1]>>>7)<0||i>=this._mpegSamplingRates.length)this._onError(W.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[i],u=(120&a[1])>>>3;if(!(u<0||u>=8)){5===s&&(l=(7&a[1])<<1|a[2]>>>7,(124&a[2])>>>2);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?i>=6?(s=5,o=new Array(4),l=i-3):(s=2,o=new Array(2),l=i):-1!==d.indexOf("android")?(s=2,o=new Array(2),l=i):(s=5,l=i,o=new Array(4),i>=6?l=i-3:1===u&&(s=2,o=new Array(2),l=i)),o[0]=s<<3,o[0]|=(15&i)>>>1,o[1]=(15&i)<<7,o[1]|=(15&u)<<3,5===s&&(o[1]|=(15&l)>>>1,o[2]=(1&l)<<7,o[2]|=8,o[3]=0),{config:o,samplingRate:c,channelCount:u,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}this._onError(W.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,r){if(!(n<4)){this._littleEndian;var i=new Uint8Array(e,t,n),a=null;if(r){if(255!==i[0])return;var o=i[1]>>>3&3,s=(6&i[1])>>1,l=(240&i[2])>>>4,c=(12&i[2])>>>2,d=3!==(i[3]>>>6&3)?2:1,f=0,h=0;switch(o){case 0:f=this._mpegAudioV25SampleRateTable[c];break;case 2:f=this._mpegAudioV20SampleRateTable[c];break;case 3:f=this._mpegAudioV10SampleRateTable[c]}switch(s){case 1:34,l<this._mpegAudioL3BitRateTable.length&&(h=this._mpegAudioL3BitRateTable[l]);break;case 2:33,l<this._mpegAudioL2BitRateTable.length&&(h=this._mpegAudioL2BitRateTable[l]);break;case 3:32,l<this._mpegAudioL1BitRateTable.length&&(h=this._mpegAudioL1BitRateTable[l])}a={bitRate:h,samplingRate:f,channelCount:d,codec:"mp3",originalCodec:"mp3"}}else a=i;return a}u.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")}},{key:"_parseVideoData",value:function(e,t,n,r,i){if(n<=1)u.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var a=new Uint8Array(e,t,n)[0],o=(240&a)>>>4,s=15&a;7===s?this._parseAVCVideoPacket(e,t+1,n-1,r,i,o):this._onError(W.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(s))}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,r,i,a){if(n<4)u.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var o=this._littleEndian,s=new DataView(e,t,n),l=s.getUint8(0),c=(16777215&s.getUint32(0,!o))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===l)this._parseAVCVideoData(e,t+4,n-4,r,i,a,c);else if(2!==l)return void this._onError(W.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)u.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,i=this._videoTrack,a=this._littleEndian,o=new DataView(e,t,n);r?void 0!==r.avcc&&u.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration);var s=o.getUint8(0),l=o.getUint8(1);o.getUint8(2),o.getUint8(3);if(1===s&&0!==l)if(this._naluLengthSize=1+(3&o.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var c=31&o.getUint8(5);if(0!==c){c>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(c));for(var d=6,f=0;f<c;f++){var h=o.getUint16(d,!a);if(d+=2,0!==h){var p=new Uint8Array(e,t+d,h);d+=h;var m=V.parseSPS(p);if(0===f){r.codecWidth=m.codec_size.width,r.codecHeight=m.codec_size.height,r.presentWidth=m.present_size.width,r.presentHeight=m.present_size.height,r.profile=m.profile_string,r.level=m.level_string,r.bitDepth=m.bit_depth,r.chromaFormat=m.chroma_format,r.sarRatio=m.sar_ratio,r.frameRate=m.frame_rate,!1!==m.frame_rate.fixed&&0!==m.frame_rate.fps_num&&0!==m.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var v=r.frameRate.fps_den,g=r.frameRate.fps_num;r.refSampleDuration=r.timescale*(v/g);for(var y=p.subarray(1,4),b="avc1.",_=0;_<3;_++){var E=y[_].toString(16);E.length<2&&(E="0"+E),b+=E}r.codec=b;var x=this._mediaInfo;x.width=r.codecWidth,x.height=r.codecHeight,x.fps=r.frameRate.fps,x.profile=r.profile,x.level=r.level,x.refFrames=m.ref_frames,x.chromaFormat=m.chroma_format_string,x.sarNum=r.sarRatio.width,x.sarDen=r.sarRatio.height,x.videoCodec=b,x.hasAudio?null!=x.audioCodec&&(x.mimeType='video/x-flv; codecs="'+x.videoCodec+","+x.audioCodec+'"'):x.mimeType='video/x-flv; codecs="'+x.videoCodec+'"',x.isComplete()&&this._onMediaInfo(x)}}}var S=o.getUint8(d);if(0!==S){S>1&&u.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(S)),d++;for(var w=0;w<S;w++){var k=o.getUint16(d,!a);d+=2,0!==k&&(d+=k)}r.avcc=new Uint8Array(n),r.avcc.set(new Uint8Array(e,t,n),0),u.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",r)}else this._onError(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(W.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else this._onError(W.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}}},{key:"_parseAVCVideoData",value:function(e,t,n,r,i,a,o){for(var s=this._littleEndian,l=new DataView(e,t,n),c=[],d=0,f=0,h=this._naluLengthSize,p=this._timestampBase+r,m=1===a;f<n;){if(f+4>=n){u.w(this.TAG,"Malformed Nalu near timestamp ".concat(p,", offset = ").concat(f,", dataSize = ").concat(n));break}var v=l.getUint32(f,!s);if(3===h&&(v>>>=8),v>n-h)return void u.w(this.TAG,"Malformed Nalus near timestamp ".concat(p,", NaluSize > DataSize!"));var g=31&l.getUint8(f+h);5===g&&(m=!0);var y=new Uint8Array(e,t+f,h+v),b={type:g,data:y};c.push(b),d+=y.byteLength,f+=h+v}if(c.length){var _=this._videoTrack,E={units:c,length:d,isKeyframe:m,dts:p,cts:o,pts:p+o};m&&(E.fileposition=i),_.samples.push(E),_.length+=d}}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var r,i,a=(4&t[4])>>>2!=0,o=0!=(1&t[4]),s=(r=t)[i=5]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3];return s<9?n:{match:!0,consumed:s,dataOffset:s,hasAudioTrack:a,hasVideoTrack:o}}}]),e}(),X=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"init",value:function(){for(var t in e.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":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.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]),n.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]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,a=0;a<i;a++)t+=r[a].byteLength;(n=new Uint8Array(t))[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var o=8,s=0;s<i;s++)n.set(r[s],o),o+=r[s].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),r=e.moov(t),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),r=e.trak(t),i=e.mvex(t);return e.box(e.types.moov,n,r,i)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,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(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration,i=t.presentWidth,a=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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,i>>>8&255,255&i,0,0,a>>>8&255,255&a,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types[".mp3"],i)}},{key:"mp4a",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,i,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return e.box(e.types.esds,i)}},{key:"avc1",value:function(t){var n=t.avcc,r=t.codecWidth,i=t.codecHeight,a=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,r>>>8&255,255&r,i>>>8&255,255&i,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 e.box(e.types.avc1,a,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,r)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var r=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),a=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.sdtp(t),s=e.trun(t,o.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,a,s,o)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],r=n.length,i=new Uint8Array(4+r),a=0;a<r;a++){var o=n[a].flags;i[a+4]=o.isLeading<<6|o.dependsOn<<4|o.isDependedOn<<2|o.hasRedundancy}return e.box(e.types.sdtp,i)}},{key:"trun",value:function(t,n){var r=t.samples||[],i=r.length,a=12+16*i,o=new Uint8Array(a);n+=8+a,o.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var s=0;s<i;s++){var l=r[s].duration,c=r[s].size,u=r[s].flags,d=r[s].cts;o.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*s)}return e.box(e.types.trun,o)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();X.init();var Y=X,$=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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(1===t)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(2===t)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(3===t)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}}]),e}(),J=function e(t,n,i,a,o){Object(r.a)(this,e),this.dts=t,this.pts=n,this.duration=i,this.originalDts=a,this.isSyncPoint=o,this.fileposition=null},Q=function(){function e(){Object(r.a)(this,e),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(i.a)(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),Z=function(){function e(){Object(r.a)(this,e),this._list=[]}return Object(i.a)(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,r=t.length-1,i=0,a=0,o=r;for(e<t[0].dts&&(n=0,a=o+1);a<=o;){if((i=a+Math.floor((o-a)/2))===r||e>=t[i].dts&&e<t[i+1].dts){n=i;break}t[i].dts<e?a=i+1:o=i-1}return this._list[n]}}]),e}(),ee=function(){function e(t){Object(r.a)(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return Object(i.a)(e,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,r=0,i=0,a=n,o=0;if(e<t[0].originalBeginDts)return o=-1;for(;i<=a;){if((r=i+Math.floor((a-i)/2))===n||e>t[r].lastSample.originalDts&&e<t[r+1].originalBeginDts){o=r;break}t[r].originalBeginDts<e?i=r+1:a=r-1}return o}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,r=this._lastAppendLocation,i=0;-1!==r&&r<t.length&&n.originalBeginDts>=t[r].lastSample.originalDts&&(r===t.length-1||r<t.length-1&&n.originalBeginDts<t[r+1].originalBeginDts)?i=r+1:t.length>0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}}]),e}(),te=function(){function e(t){Object(r.a)(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new ee("audio"),this._videoSegmentInfoList=new ee("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!w.chrome||!(w.version.major<50||50===w.version.major&&w.version.build<2661)),this._fillSilentAfterSeek=w.msedge||w.msie,this._mp3UseMpegAudio=!w.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(i.a)(e,[{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(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new m("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,r="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=Y.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=Y.generateInitSegment(t)}if(!this._onInitSegment)throw new m("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:i,container:"".concat(e,"/").concat(r),mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(r.samples.push(t),r.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(r,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n,r=e,i=r.samples,a=void 0,o=-1,s=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,c=this._dtsBaseInited&&void 0===this._audioNextDts,d=!1;if(i&&0!==i.length&&(1!==i.length||t)){var f=0,h=null,p=0;l?(f=0,p=r.length):(f=8,p=8+r.length);var m=null;if(i.length>1&&(p-=(m=i.pop()).length),null!=this._audioStashedLastSample){var v=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(v),p+=v.length}null!=m&&(this._audioStashedLastSample=m);var g=i[0].dts-this._dtsBase;if(this._audioNextDts)a=g-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())a=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(d=!0);else{var y=this._audioSegmentInfoList.getLastSampleBefore(g);if(null!=y){var b=g-(y.originalDts+y.duration);b<=3&&(b=0),a=g-(y.dts+y.duration+b)}else a=0}if(d){var _=g-a,E=this._videoSegmentInfoList.getLastSegmentBefore(g);if(null!=E&&E.beginDts<_){var x=$.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(x){var S=E.beginDts,k=_-E.beginDts;u.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(S,", duration: ").concat(k)),i.unshift({unit:x,dts:S,pts:S}),p+=x.byteLength}}else d=!1}for(var T=[],O=0;O<i.length;O++){var C=i[O],A=C.unit,L=C.dts-this._dtsBase,D=L-a;-1===o&&(o=D);var I=0;if(O!==i.length-1)I=i[O+1].dts-this._dtsBase-a-D;else if(null!=m)I=m.dts-this._dtsBase-a-D;else I=T.length>=1?T[T.length-1].duration:Math.floor(s);var R=!1,N=null;if(I>1.5*s&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!w.safari){R=!0;var M=Math.abs(I-s),P=Math.ceil(M/s),j=D+s;u.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"dts: ".concat(D+I," ms, expected: ").concat(D+Math.round(s)," ms, ")+"delta: ".concat(Math.round(M)," ms, generate: ").concat(P," frames"));var F=$.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==F&&(u.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),F=A),N=[];for(var U=0;U<P;U++){var B=Math.round(j);if(N.length>0){var G=N[N.length-1];G.duration=B-G.dts}var z={dts:B,pts:B,cts:0,unit:F,size:F.byteLength,duration:0,originalDts:L,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};N.push(z),p+=z.size,j+=s}var H=N[N.length-1];H.duration=D+I-H.dts,I=Math.round(s)}T.push({dts:D,pts:D,cts:0,unit:C.unit,size:C.unit.byteLength,duration:I,originalDts:L,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),R&&T.push.apply(T,N)}l?h=new Uint8Array(p):((h=new Uint8Array(p))[0]=p>>>24&255,h[1]=p>>>16&255,h[2]=p>>>8&255,h[3]=255&p,h.set(Y.types.mdat,4));for(var K=0;K<T.length;K++){var V=T[K].unit;h.set(V,f),f+=V.byteLength}var W=T[T.length-1];n=W.dts+W.duration,this._audioNextDts=n;var q=new Q;q.beginDts=o,q.endDts=n,q.beginPts=o,q.endPts=n,q.originalBeginDts=T[0].originalDts,q.originalEndDts=W.originalDts+W.duration,q.firstSample=new J(T[0].dts,T[0].pts,T[0].duration,T[0].originalDts,!1),q.lastSample=new J(W.dts,W.pts,W.duration,W.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(q),r.samples=T,r.sequenceNumber++;var X=null;X=l?new Uint8Array:Y.moof(r,o),r.samples=[],r.length=0;var Z={type:"audio",data:this._mergeBoxes(X,h).buffer,sampleCount:T.length,info:q};l&&c&&(Z.timestampOffset=o),this._onMediaSegment("audio",Z)}}}},{key:"_remuxVideo",value:function(e,t){if(null!=this._videoMeta){var n,r,i=e,a=i.samples,o=void 0,s=-1,l=-1;if(a&&0!==a.length&&(1!==a.length||t)){var c=8,u=null,d=8+e.length,f=null;if(a.length>1&&(d-=(f=a.pop()).length),null!=this._videoStashedLastSample){var h=this._videoStashedLastSample;this._videoStashedLastSample=null,a.unshift(h),d+=h.length}null!=f&&(this._videoStashedLastSample=f);var p=a[0].dts-this._dtsBase;if(this._videoNextDts)o=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())o=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=m){var v=p-(m.originalDts+m.duration);v<=3&&(v=0),o=p-(m.dts+m.duration+v)}else o=0}for(var g=new Q,y=[],b=0;b<a.length;b++){var _=a[b],E=_.dts-this._dtsBase,x=_.isKeyframe,S=E-o,w=_.cts,k=S+w;-1===s&&(s=S,l=k);var T=0;if(b!==a.length-1)T=a[b+1].dts-this._dtsBase-o-S;else if(null!=f)T=f.dts-this._dtsBase-o-S;else T=y.length>=1?y[y.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(x){var O=new J(S,k,T,_.dts,!0);O.fileposition=_.fileposition,g.appendSyncPoint(O)}y.push({dts:S,pts:k,cts:w,units:_.units,size:_.length,isKeyframe:x,duration:T,originalDts:E,flags:{isLeading:0,dependsOn:x?2:1,isDependedOn:x?1:0,hasRedundancy:0,isNonSync:x?0:1}})}(u=new Uint8Array(d))[0]=d>>>24&255,u[1]=d>>>16&255,u[2]=d>>>8&255,u[3]=255&d,u.set(Y.types.mdat,4);for(var C=0;C<y.length;C++)for(var A=y[C].units;A.length;){var L=A.shift().data;u.set(L,c),c+=L.byteLength}var D=y[y.length-1];if(n=D.dts+D.duration,r=D.pts+D.duration,this._videoNextDts=n,g.beginDts=s,g.endDts=n,g.beginPts=l,g.endPts=r,g.originalBeginDts=y[0].originalDts,g.originalEndDts=D.originalDts+D.duration,g.firstSample=new J(y[0].dts,y[0].pts,y[0].duration,y[0].originalDts,y[0].isKeyframe),g.lastSample=new J(D.dts,D.pts,D.duration,D.originalDts,D.isKeyframe),this._isLive||this._videoSegmentInfoList.append(g),i.samples=y,i.sequenceNumber++,this._forceFirstIDR){var I=y[0].flags;I.dependsOn=2,I.isNonSync=0}var R=Y.moof(i,s);i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(R,u).buffer,sampleCount:y.length,info:g})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}}]),e}(),ne={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"},re=function(){function e(t,n){Object(r.a)(this,e),this.TAG="TransmuxingController",this._emitter=new l.a,this._config=n,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(e){e.timestampBase=i,i+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,n.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],r=this._ioctl=new D(n,this._config,e);r.onError=this._onIOException.bind(this),r.onSeeked=this._onIOSeeked.bind(this),r.onComplete=this._onIOComplete.bind(this),r.onRedirect=this._onIORedirect.bind(this),r.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):r.onDataArrival=this._onInitChunkArrival.bind(this),r.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var n=this._mediaInfo.segments[t];if(null==n)this._pendingSeekTime=e;else{var r=n.getNearestKeyframe(e);this._remuxer.seek(r.milliseconds),this._ioctl.seek(r.fileposition),this._pendingResolveSeekPoint=r.milliseconds}}else{var i=this._mediaInfo.segments[t];if(null==i)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var a=i.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,a.fileposition),this._pendingResolveSeekPoint=a.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,n=t.length-1,r=0;r<t.length;r++)if(e<t[r].timestampBase){n=r-1;break}return n}},{key:"_onInitChunkArrival",value:function(e,t){var n=this,r=null,i=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,i=this._demuxer.parseChunks(e,t);else if((r=q.probe(e)).match){this._demuxer=new q(r,this._config),this._remuxer||(this._remuxer=new te(this._config));var a=this._mediaDataSource;null==a.duration||isNaN(a.duration)||(this._demuxer.overridedDuration=a.duration),"boolean"==typeof a.hasAudio&&(this._demuxer.overridedHasAudio=a.hasAudio),"boolean"==typeof a.hasVideo&&(this._demuxer.overridedHasVideo=a.hasVideo),this._demuxer.timestampBase=a.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),i=this._demuxer.parseChunks(e,t)}else r=null,u.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(ne.DEMUX_ERROR,W.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),i=0;return i}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,F.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,F.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(ne.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(ne.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer.flushStashedSamples(),this._emitter.emit(ne.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(ne.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){u.e(this.TAG,"IOException: type = ".concat(e,", code = ").concat(t.code,", msg = ").concat(t.msg)),this._emitter.emit(ne.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){u.e(this.TAG,"DemuxException: type = ".concat(e,", info = ").concat(t)),this._emitter.emit(ne.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(ne.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(ne.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var n=t.info.syncPoints,r=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,w.safari&&n.length>0&&n[0].originalDts===r&&(r=n[0].pts),this._emitter.emit(ne.RECOMMEND_SEEKPOINT,r)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(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(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(ne.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(ne.STATISTICS_INFO,e)}}]),e}(),ie=function(e){var t=null,n=function(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}.bind(this);function r(t,n){var r={msg:ne.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function i(t,n){var r={msg:ne.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function a(){var t={msg:ne.LOADING_COMPLETE};e.postMessage(t)}function s(){var t={msg:ne.RECOVERED_EARLY_EOF};e.postMessage(t)}function l(t){var n={msg:ne.MEDIA_INFO,data:t};e.postMessage(n)}function c(t){var n={msg:ne.METADATA_ARRIVED,data:t};e.postMessage(n)}function u(t){var n={msg:ne.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function d(t){var n={msg:ne.STATISTICS_INFO,data:t};e.postMessage(n)}function f(t,n){e.postMessage({msg:ne.IO_ERROR,data:{type:t,info:n}})}function h(t,n){e.postMessage({msg:ne.DEMUX_ERROR,data:{type:t,info:n}})}function p(t){e.postMessage({msg:ne.RECOMMEND_SEEKPOINT,data:t})}o.install(),e.addEventListener("message",(function(o){switch(o.data.cmd){case"init":(t=new re(o.data.param[0],o.data.param[1])).on(ne.IO_ERROR,f.bind(this)),t.on(ne.DEMUX_ERROR,h.bind(this)),t.on(ne.INIT_SEGMENT,r.bind(this)),t.on(ne.MEDIA_SEGMENT,i.bind(this)),t.on(ne.LOADING_COMPLETE,a.bind(this)),t.on(ne.RECOVERED_EARLY_EOF,s.bind(this)),t.on(ne.MEDIA_INFO,l.bind(this)),t.on(ne.METADATA_ARRIVED,c.bind(this)),t.on(ne.SCRIPTDATA_ARRIVED,u.bind(this)),t.on(ne.STATISTICS_INFO,d.bind(this)),t.on(ne.RECOMMEND_SEEKPOINT,p.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(o.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var m=o.data.param;j.applyConfig(m),!0===m.enableCallback?j.addLogListener(n):j.removeLogListener(n)}}))},ae=function(){function e(t,i){if(Object(r.a)(this,e),this.TAG="Transmuxer",this._emitter=new l.a,i.enableWorker&&"undefined"!=typeof Worker)try{var a=n(/*! webworkify */"0r65");this._worker=a(ie),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,i]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},j.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:j.getConfig()})}catch(e){u.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new re(t,i)}else this._controller=new re(t,i);if(this._controller){var o=this._controller;o.on(ne.IO_ERROR,this._onIOError.bind(this)),o.on(ne.DEMUX_ERROR,this._onDemuxError.bind(this)),o.on(ne.INIT_SEGMENT,this._onInitSegment.bind(this)),o.on(ne.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),o.on(ne.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),o.on(ne.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),o.on(ne.MEDIA_INFO,this._onMediaInfo.bind(this)),o.on(ne.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),o.on(ne.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),o.on(ne.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),o.on(ne.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(i.a)(e,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),j.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{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(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{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(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.INIT_SEGMENT,e,t)}))}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.MEDIA_SEGMENT,e,t)}))}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(ne.LOADING_COMPLETE)}))}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(ne.RECOVERED_EARLY_EOF)}))}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.MEDIA_INFO,e)}))}},{key:"_onMetaDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.METADATA_ARRIVED,e)}))}},{key:"_onScriptDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.SCRIPTDATA_ARRIVED,e)}))}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.STATISTICS_INFO,e)}))}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.IO_ERROR,e,t)}))}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(ne.DEMUX_ERROR,e,t)}))}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(ne.RECOMMEND_SEEKPOINT,e)}))}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case ne.INIT_SEGMENT:case ne.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case ne.LOADING_COMPLETE:case ne.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case ne.MEDIA_INFO:Object.setPrototypeOf(n,F.prototype),this._emitter.emit(t.msg,n);break;case ne.METADATA_ARRIVED:case ne.SCRIPTDATA_ARRIVED:case ne.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case ne.IO_ERROR:case ne.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case ne.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":u.emitter.emit("log",n.type,n.logcat)}}}]),e}(),oe={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},se=function(){function e(t){Object(r.a)(this,e),this.TAG="MSEController",this._config=t,this._emitter=new l.a,this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(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 Z}return Object(i.a)(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new m("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var r=this._sourceBuffers[t];if(r){if("closed"!==e.readyState){try{e.removeSourceBuffer(r)}catch(e){u.e(this.TAG,e.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){u.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.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(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,r="".concat(n.container);n.codec&&n.codec.length>0&&(r+=";codecs=".concat(n.codec));var i=!1;if(u.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[n.type]=n,r!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])u.v(this.TAG,"Notice: ".concat(n.type," mimeType changed, origin: ").concat(this._mimeTypes[n.type],", target: ").concat(r));else{i=!0;try{var a=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(r);a.addEventListener("error",this.e.onSourceBufferError),a.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return u.e(this.TAG,e.message),void this._emitter.emit(oe.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=r}t||this._pendingSegments[n.type].push(n),i||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),w.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){u.e(this.TAG,e.message)}this._idrList.clear();var r=this._pendingSegments[t];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var i=0;i<n.buffered.length;i++){var a=n.buffered.start(i),o=n.buffered.end(i);this._pendingRemoveRanges[t].push({start:a,end:o})}if(n.updating||this._doRemoveRanges(),w.safari){var s=this._lastInitSegments[t];s&&(this._pendingSegments[t].push(s),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){var r=n.buffered;if(r.length>=1&&e-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var r=n.buffered,i=!1,a=0;a<r.length;a++){var o=r.start(a),s=r.end(a);if(o<=e&&e<s+3){if(e-o>=this._config.autoCleanupMaxBackwardDuration){i=!0;var l=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:o,end:l})}}else s<e&&(i=!0,this._pendingRemoveRanges[t].push({start:o,end:s}))}i&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(u.v(this.TAG,"Update MediaSource duration from ".concat(t," to ").concat(n)),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var r=n.shift();t.remove(r.start,r.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var r=this._sourceBuffers[t].timestampOffset,i=n.timestampOffset/1e3;Math.abs(r-i)>.1&&(u.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(r," to ").concat(i)),this._sourceBuffers[t].timestampOffset=i),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(oe.BUFFER_FULL),this._isBufferFull=!0):(u.e(this.TAG,e.message),this._emitter.emit(oe.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(u.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(oe.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){u.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){u.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(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 e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.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(oe.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){u.e(this.TAG,"SourceBuffer Error: ".concat(e))}}]),e}(),le={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},ce={NETWORK_EXCEPTION:b.EXCEPTION,NETWORK_STATUS_CODE_INVALID:b.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:b.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:b.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:W.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:W.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:W.CODEC_UNSUPPORTED},ue=function(){function e(t,n){if(Object(r.a)(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new l.a,this._config=R(),"object"==typeof n&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new v("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(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=t,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 i=w.chrome&&(w.version.major<50||50===w.version.major&&w.version.build<2661);this._alwaysSeekKeyframe=!!(i||w.msedge||w.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(i.a)(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(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(e,t){var n=this;e===M.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(M.MEDIA_INFO,n.mediaInfo)})):e===M.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(M.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new se(this._config),this._msectl.on(oe.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(oe.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(oe.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(oe.ERROR,(function(e){t._emitter.emit(M.ERROR,le.MEDIA_ERROR,ce.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{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 e=this;if(!this._mediaElement)throw new m("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new m("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new ae(this._mediaDataSource,this._config),this._transmuxer.on(ne.INIT_SEGMENT,(function(t,n){e._msectl.appendInitSegment(n)})),this._transmuxer.on(ne.MEDIA_SEGMENT,(function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var r=e._mediaElement.currentTime;n.info.endDts>=1e3*(r+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(u.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(ne.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(M.LOADING_COMPLETE)})),this._transmuxer.on(ne.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(M.RECOVERED_EARLY_EOF)})),this._transmuxer.on(ne.IO_ERROR,(function(t,n){e._emitter.emit(M.ERROR,le.NETWORK_ERROR,t,n)})),this._transmuxer.on(ne.DEMUX_ERROR,(function(t,n){e._emitter.emit(M.ERROR,le.MEDIA_ERROR,t,{code:-1,msg:n})})),this._transmuxer.on(ne.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(M.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(ne.METADATA_ARRIVED,(function(t){e._emitter.emit(M.METADATA_ARRIVED,t)})),this._transmuxer.on(ne.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(M.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(ne.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(M.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(ne.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/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(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,r=0;r<e.length;r++){var i=e.start(r),a=e.end(r);if(i<=t&&t<a){i,n=a;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(u.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){u.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,r=0;r<t.length;r++){var i=t.start(r),a=t.end(r);if(e>=i&&e<a){e>=a-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(u.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(e>=r&&e<i)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,r=0;if(e<1&&this._mediaElement.buffered.length>0){var i=this._mediaElement.buffered.start(0);(i<1&&e<i||w.safari)&&(n=!0,r=w.safari?.1:i)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=r;else if(t){if(this._alwaysSeekKeyframe){var a=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=a?a.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;n.length>0&&t.currentTime<n.start(0)&&(u.w(this.TAG,"Playback seems stuck at ".concat(t.currentTime,", seek to ").concat(n.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=n.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&n.length>0){var r=n.start(0);if(r<1&&t<r||w.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=w.safari?.1:r)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var i=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=i&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}}]),e}(),de=function(){function e(t,n){if(Object(r.a)(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new l.a,this._config=R(),"object"==typeof n&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new v("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new v("NativePlayer(".concat(t.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return Object(i.a)(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===M.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(M.MEDIA_INFO,n.mediaInfo)})):e===M.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(M.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new m("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(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")),null!=this._statisticsReporter&&(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(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(M.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(M.STATISTICS_INFO,this.statisticsInfo)}}]),e}();o.install();var fe={createPlayer:function(e,t){var n=e;if(null==n||"object"!=typeof n)throw new v("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new v("MediaDataSource must has type field to indicate video file type!");switch(n.type){case"flv":return new ue(n,t);default:return new de(n,t)}},isSupported:function(){return N.supportMSEH264Playback()},getFeatureList:function(){return N.getFeatureList()}};fe.BaseLoader=_,fe.LoaderStatus=y,fe.LoaderErrors=b,fe.Events=M,fe.ErrorTypes=le,fe.ErrorDetails=ce,fe.FlvPlayer=ue,fe.NativePlayer=de,fe.LoggingControl=j,Object.defineProperty(fe,"version",{enumerable:!0,get:function(){return"__VERSION__"}});t.a=fe},GgEA:
/*!********************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/Discuss/discuss-item/index.less ***!
\********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},Gytx:
/*!********************************************!*\
!*** ./node_modules/shallowequal/index.js ***!
\********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<a.length;l++){var c=a[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(i=n?n.call(r,u,d,c):void 0)||void 0===i&&u!==d)return!1}return!0}},HmJG:
/*!****************************************************************!*\
!*** ./src/components/markdown-editor/upload-image/index.less ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},Hw79:
/*!******************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/SubmitList/index.less?modules ***!
\******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={pagination:"pagination___2VQzP",info:"info___1saw2"}},I8Z2:
/*!**********************************************************!*\
!*** ./node_modules/mini-store/esm/index.js + 3 modules ***!
\**********************************************************/
/*! exports provided: Provider, connect, create */
/*! exports used: Provider, connect, create */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return g}));var r,i=n("q1tI"),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=i.createContext(null),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){return i.createElement(o.Provider,{value:this.props.store},this.props.children)},t}(i.Component),l=n("Gytx"),c=n.n(l),u=n("2mql"),d=n.n(u),f=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};var p=function(){return{}};function m(e,t){void 0===t&&(t={});var n=!!e,r=e||p;return function(a){var s=function(t){function s(e,n){var i=t.call(this,e,n)||this;return i.unsubscribe=null,i.handleChange=function(){if(i.unsubscribe){var e=r(i.store.getState(),i.props);i.setState({subscribed:e})}},i.store=i.context,i.state={subscribed:r(i.store.getState(),e),store:i.store,props:e},i}return f(s,t),s.getDerivedStateFromProps=function(t,n){return e&&2===e.length&&t!==n.props?{subscribed:r(n.store.getState(),t),props:t}:{props:t}},s.prototype.componentDidMount=function(){this.trySubscribe()},s.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},s.prototype.shouldComponentUpdate=function(e,t){return!c()(this.props,e)||!c()(this.state.subscribed,t.subscribed)},s.prototype.trySubscribe=function(){n&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},s.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},s.prototype.render=function(){var e=h(h(h({},this.props),this.state.subscribed),{store:this.store});return i.createElement(a,h({},e,{ref:this.props.miniStoreForwardedRef}))},s.displayName="Connect("+function(e){return e.displayName||e.name||"Component"}(a)+")",s.contextType=o,s}(i.Component);if(t.forwardRef){var l=i.forwardRef((function(e,t){return i.createElement(s,h({},e,{miniStoreForwardedRef:t}))}));return d()(l,a)}return d()(s,a)}}var v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function g(e){var t=e,n=[];return{setState:function(e){t=v(v({},t),e);for(var r=0;r<n.length;r++)n[r]()},getState:function(){return t},subscribe:function(e){return n.push(e),function(){var t=n.indexOf(e);n.splice(t,1)}}}}},IBYe:
/*!**************************************************!*\
!*** ./node_modules/rc-table/es/sugar/Column.js ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";t.a=function(e){return null}},IxHN:
/*!******************************************!*\
!*** ./src/components/Spinner/index.tsx ***!
\******************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),i=n.n(r),a=n(/*! ./index.less?modules */"07cG"),o=n.n(a);t.a=function(e){var t=e.message,n=e.className,r=e.children,a=e.style,s=void 0===a?{}:a;return i.a.createElement("div",{className:"".concat(o.a.idsRingWrapper," ").concat(n)},i.a.createElement("div",{className:o.a.ldsRing},i.a.createElement("div",null),i.a.createElement("div",null),i.a.createElement("div",null),i.a.createElement("div",null)),t?i.a.createElement("p",{style:s},t):null,r)}},J66h:
/*!******************************************!*\
!*** ./node_modules/js-base64/base64.js ***!
\******************************************/
/*! no static exports found */
/*! exports used: Base64 */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(n){var r;!function(n,i){e.exports=function(n){"use strict";var i,a=(n=n||{}).Base64,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(o),l=String.fromCharCode,c=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?l(192|t>>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)},u=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(u,c)},f=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(n>>>18),o.charAt(n>>>12&63),t>=2?"=":o.charAt(n>>>6&63),t>=1?"=":o.charAt(63&n)].join("")},h=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},p=function(e){return h(d(String(e)))},m=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?m(p(e)):p(e)};n.Uint8Array&&(i=function(e,t){for(var n="",r=0,i=e.length;r<i;r+=3){var a=e[r],s=e[r+1],l=e[r+2],c=a<<16|s<<8|l;n+=o.charAt(c>>>18)+o.charAt(c>>>12&63)+(void 0!==s?o.charAt(c>>>6&63):"=")+(void 0!==l?o.charAt(63&c):"=")}return t?m(n):n});var g,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,b=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},_=function(e){return e.replace(y,b)},E=function(e){var t=e.length,n=t%4,r=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),i=[l(r>>>16),l(r>>>8&255),l(255&r)];return i.length-=[0,0,2,1][n],i.join("")},x=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,E)},S=function(e){return x(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},w=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},k=function(e){return function(e){return _(x(e))}(w(e))};n.Uint8Array&&(g=function(e){return Uint8Array.from(S(w(e)),(function(e){return e.charCodeAt(0)}))});var T=function(){var e=n.Base64;return n.Base64=a,e};if(n.Base64={VERSION:"2.6.4",atob:S,btoa:h,fromBase64:k,toBase64:v,utob:d,encode:v,encodeURI:function(e){return v(e,!0)},btou:_,decode:k,noConflict:T,fromUint8Array:i,toUint8Array:g},"function"==typeof Object.defineProperty){var O=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",O((function(){return k(this)}))),Object.defineProperty(String.prototype,"toBase64",O((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",O((function(){return v(this,!0)})))}}n.Meteor&&(Base64=n.Base64);e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(t,[]))||(e.exports=r);return{Base64:n.Base64}}(n)}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:this)}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},JOrW:
/*!**********************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/img/gf.svg ***!
\**********************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/gf.09d89ab3.svg"},LdHM:
/*!********************************************************!*\
!*** ./node_modules/rc-select/es/index.js + 6 modules ***!
\********************************************************/
/*! exports provided: Option, OptGroup, default */
/*! exports used: OptGroup, Option, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/TransBtn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/generate.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/commonUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useMemo.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/pickAttrs.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-virtual-list/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"b",(function(){return E})),n.d(t,"a",(function(){return S}));var r=n("1OyB"),i=n("vuIU"),a=n("Ji7U"),o=n("LK+K"),s=n("q1tI"),l=n("rePB"),c=n("Ff2n"),u=n("ODXe"),d=n("4IlW"),f=n("bX4T"),h=n("YrtM"),p=n("TSYQ"),m=n.n(p),v=n("+nKL"),g=n("8OUc"),y=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.flattenOptions,a=e.childrenAsData,o=e.values,p=e.searchValue,y=e.multiple,b=e.defaultActiveFirstOption,_=e.height,E=e.itemHeight,x=e.notFoundContent,S=e.open,w=e.menuItemSelectedIcon,k=e.virtual,T=e.onSelect,O=e.onToggleOpen,C=e.onActiveValue,A=e.onScroll,L=e.onMouseEnter,D="".concat(n,"-item"),I=Object(h.a)((function(){return i}),[S,i],(function(e,t){return t[0]&&e[1]!==t[1]})),R=s.useRef(null),N=function(e){e.preventDefault()},M=function(e){R.current&&R.current.scrollTo({index:e})},P=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r<n;r+=1){var i=(e+r*t+n)%n,a=I[i],o=a.group,s=a.data;if(!o&&!s.disabled)return i}return-1},j=s.useState((function(){return P(0)})),F=Object(u.a)(j,2),U=F[0],B=F[1],G=function(e){B(e);var t=I[e];t?C(t.data.value,e):C(null,-1)};s.useEffect((function(){G(!1!==b?P(0):-1)}),[I.length,p]),s.useEffect((function(){var e=setTimeout((function(){if(!y&&S&&1===o.size){var e=Array.from(o)[0],t=I.findIndex((function(t){return t.data.value===e}));G(t),M(t)}}));return function(){return clearTimeout(e)}}),[S]);var z=function(e){void 0!==e&&T(e,{selected:!o.has(e)}),y||O(!1)};if(s.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case d.a.UP:case d.a.DOWN:var n=0;if(t===d.a.UP?n=-1:t===d.a.DOWN&&(n=1),0!==n){var r=P(U+n,n);M(r),G(r)}break;case d.a.ENTER:var i=I[U];i&&!i.data.disabled?z(i.data.value):z(void 0),S&&e.preventDefault();break;case d.a.ESC:O(!1)}},onKeyUp:function(){},scrollTo:function(e){M(e)}}})),0===I.length)return s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),className:"".concat(D,"-empty"),onMouseDown:N},x);function H(e){var t=I[e];if(!t)return null;var n=t.data||{},i=n.value,l=n.label,c=n.children,u=Object(f.a)(n,!0),d=a?c:l;return t?s.createElement("div",Object.assign({"aria-label":"string"==typeof d?d:null},u,{key:e,role:"option",id:"".concat(r,"_list_").concat(e),"aria-selected":o.has(i)}),i):null}return s.createElement(s.Fragment,null,s.createElement("div",{role:"listbox",id:"".concat(r,"_list"),style:{height:0,width:0,overflow:"hidden"}},H(U-1),H(U),H(U+1)),s.createElement(v.a,{itemKey:"key",ref:R,data:I,height:_,itemHeight:E,fullHeight:!1,onMouseDown:N,onScroll:A,virtual:k,onMouseEnter:L},(function(e,t){var n,r=e.group,i=e.groupOption,u=e.data,d=u.label,f=u.key;if(r)return s.createElement("div",{className:m()(D,"".concat(D,"-group"))},void 0!==d?d:f);var h=u.disabled,p=u.value,v=u.title,y=u.children,b=u.style,_=u.className,E=Object(c.a)(u,["disabled","value","title","children","style","className"]),x=o.has(p),S="".concat(D,"-option"),k=m()(D,S,_,(n={},Object(l.a)(n,"".concat(S,"-grouped"),i),Object(l.a)(n,"".concat(S,"-active"),U===t&&!h),Object(l.a)(n,"".concat(S,"-disabled"),h),Object(l.a)(n,"".concat(S,"-selected"),x),n)),T=a?y:d,O=!w||"function"==typeof w||x;return s.createElement("div",Object.assign({},E,{"aria-selected":x,className:k,title:v,onMouseMove:function(){U===t||h||G(t)},onClick:function(){h||z(p)},style:b}),s.createElement("div",{className:"".concat(S,"-content")},T||p),s.isValidElement(w)||x,O&&s.createElement(g.a,{className:"".concat(D,"-option-state"),customizeIcon:w,customizeIconProps:{isSelected:x}},x?"✓":null))})))}));y.displayName="OptionList";var b=y,_=function(){return null};_.isSelectOption=!0;var E=_,x=function(){return null};x.isSelectOptGroup=!0;var S=x,w=n("VTBJ"),k=n("Zm9Q");function T(e){var t=e.key,n=e.props,r=n.children,i=n.value,a=Object(c.a)(n,["children","value"]);return Object(w.a)({key:t,value:void 0!==i?i:t,children:r},a)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(k.a)(e).map((function(e,n){if(!s.isValidElement(e)||!e.type)return null;var r=e.type.isSelectOptGroup,i=e.key,a=e.props,o=a.children,l=Object(c.a)(a,["children"]);return t||!r?T(e):Object(w.a)(Object(w.a)({key:"__RC_SELECT_GRP__".concat(null===i?n:i,"__"),label:i},l),{},{options:O(o)})})).filter((function(e){return e}))}var C=n("2Qr1"),A=n("qNPg"),L=n("U8pU"),D=n("Kwbf"),I=n("WKfj");var R=function(e){var t=e.mode,n=e.options,r=e.children,i=e.backfill,a=e.allowClear,o=e.placeholder,l=e.getInputElement,c=e.showSearch,u=e.onSearch,d=e.defaultOpen,f=e.autoFocus,h=e.labelInValue,p=e.value,m=e.inputValue,v=e.optionLabelProp,g="multiple"===t||"tags"===t,y=void 0!==c?c:g||"combobox"===t,b=n||O(r);if(Object(D.a)("tags"!==t||b.every((function(e){return!e.disabled})),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),"tags"===t||"combobox"===t){var _=b.some((function(e){return e.options?e.options.some((function(e){return"number"==typeof("value"in e?e.value:e.key)})):"number"==typeof("value"in e?e.value:e.key)}));Object(D.a)(!_,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(D.a)("combobox"!==t||!v,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(D.a)("combobox"===t||!i,"`backfill` only works with `combobox` mode."),Object(D.a)("combobox"===t||!l,"`getInputElement` only work with `combobox` mode."),Object(D.b)("combobox"!==t||!l||!a||!o,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),u&&!y&&"combobox"!==t&&"tags"!==t&&Object(D.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(D.b)(!d||f,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),null!=p){var E=Object(I.d)(p);Object(D.a)(!h||E.every((function(e){return"object"===Object(L.a)(e)&&("key"in e||"value"in e)})),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(D.a)(!g||Array.isArray(p),"`value` should be array when `mode` is `multiple` or `tags`")}if(r){var x=null;Object(k.a)(r).some((function(e){if(!s.isValidElement(e)||!e.type)return!1;var t=e.type;return!t.isSelectOption&&(t.isSelectOptGroup?!Object(k.a)(e.props.children).every((function(t){return!(s.isValidElement(t)&&e.type&&!t.type.isSelectOption)||(x=t.type,!1)})):(x=t,!0))})),x&&Object(D.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(x.displayName||x.name||x,"`.")),Object(D.a)(void 0===m,"`inputValue` is deprecated, please use `searchValue` instead.")}},N=Object(A.a)({prefixCls:"rc-select",components:{optionList:b},convertChildrenToData:O,flattenOptions:C.d,getLabeledValue:C.e,filterOptions:C.b,isValueDisabled:C.g,findValueOption:C.c,warningProps:R,fillOptionsWithMissingValue:C.a}),M=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).selectRef=s.createRef(),e.focus=function(){e.selectRef.current.focus()},e.blur=function(){e.selectRef.current.blur()},e}return Object(i.a)(n,[{key:"render",value:function(){return s.createElement(N,Object.assign({ref:this.selectRef},this.props))}}]),n}(s.Component);M.Option=E,M.OptGroup=S;var P=M;t.c=P},M8RZ:
/*!**********************************!*\
!*** ./src/components/modal.tsx ***!
\**********************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck */"fWQN"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass */"mtLc"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits */"yKVA"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createSuper */"879j"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! react-dom */"i8i4"),u=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),i=t.call(this,e);var a=window.document;return i.node=a.createElement("div"),a.body.appendChild(i.node),i}return Object(i.a)(n,[{key:"render",value:function(){var e=this.props.children;return Object(c.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(l.a.Component)},MFOe:
/*!****************************************!*\
!*** ./node_modules/store/src/util.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){var n=Object.assign?Object.assign:function(e,t,n,r){for(var i=1;i<arguments.length;i++)s(Object(arguments[i]),(function(t,n){e[n]=t}));return e},r=function(){if(Object.create)return function(e,t,r,i){var a=o(arguments,1);return n.apply(this,[Object.create(e)].concat(a))};{function e(){}return function(t,r,i,a){var s=o(arguments,1);return e.prototype=t,n.apply(this,[new e].concat(s))}}}(),i=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},a="undefined"!=typeof window?window:t;function o(e,t){return Array.prototype.slice.call(e,t||0)}function s(e,t){l(e,(function(e,n){return t(e,n),!1}))}function l(e,t){if(c(e)){for(var n=0;n<e.length;n++)if(t(e[n],n))return e[n]}else for(var r in e)if(e.hasOwnProperty(r)&&t(e[r],r))return e[r]}function c(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}e.exports={assign:n,create:r,trim:i,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:o,each:s,map:function(e,t){var n=c(e)?[]:{};return l(e,(function(e,r){return n[r]=t(e,r),!1})),n},pluck:l,isList:c,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:a}}).call(this,n(/*! ./../../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},MVJL:
/*!********************************************************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/CustomDiscuss/DiscussItem/index.less?modules ***!
\********************************************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___2gBaY",flex_space_between:"flex_space_between___2uD--",flex_box_vertical_center:"flex_box_vertical_center___3Bq-4",flex_box_center_end:"flex_box_center_end___2MOXm",flex_box_column:"flex_box_column___1Sq4x",discussItem:"discussItem___Mk503",wrap:"wrap___VPGVq",list:"list___2zNHf",btns:"btns___1hoB3",secondLevelDiscuss:"secondLevelDiscuss___9Ixoa",line:"line___20Ukm",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___3ZS-s"}},NvD2:
/*!******************************************************!*\
!*** ./node_modules/rc-tree/es/utils/conductUtil.js ***!
\******************************************************/
/*! exports provided: isCheckDisabled, conductCheck */
/*! exports used: conductCheck */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(/*! rc-util/es/warning */"Kwbf");function i(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function a(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function o(e,t,n,o){var s,l=[];s=o||a;var c=new Set(e.filter((function(e){var t=!!n[e];return t||l.push(e),t}))),u=new Map,d=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=u.get(r);i||(i=new Set,u.set(r,i)),i.add(t),d=Math.max(d,r)})),Object(r.a)(!l.length,"Tree missing follow keys: ".concat(l.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),!0===t?function(e,t,n,r){for(var a=new Set(e),o=new Set,s=0;s<=n;s+=1){(t.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,o=void 0===i?[]:i;a.has(t)&&!r(n)&&o.filter((function(e){return!r(e.node)})).forEach((function(e){a.add(e.key)}))}))}for(var l=new Set,c=n;c>=0;c-=1){(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var i=!0,s=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),s||!n&&!o.has(t)||(s=!0)})),i&&a.add(t.key),s&&o.add(t.key),l.add(t.key)}}))}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(i(o,a))}}(c,u,d,s):function(e,t,n,r,a){for(var o=new Set(e),s=new Set(t),l=0;l<=r;l+=1){(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,i=void 0===r?[]:r;o.has(t)||s.has(t)||a(n)||i.filter((function(e){return!a(e.node)})).forEach((function(e){o.delete(e.key)}))}))}s=new Set;for(var c=new Set,u=r;u>=0;u-=1){(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!a(n)&&e.parent&&!c.has(e.parent.key))if(a(e.parent.node))c.add(t.key);else{var r=!0,i=!1;(t.children||[]).filter((function(e){return!a(e.node)})).forEach((function(e){var t=e.key,n=o.has(t);r&&!n&&(r=!1),i||!n&&!s.has(t)||(i=!0)})),r||o.delete(t.key),i&&s.add(t.key),c.add(t.key)}}))}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(i(s,o))}}(c,t.halfCheckedKeys,u,d,s)}},OLES:
/*!*********************************************************!*\
!*** ./node_modules/rc-tooltip/es/index.js + 2 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tooltip/es/placements.js because of ./node_modules/antd/es/tooltip/placements.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("U8pU"),i=n("VTBJ"),a=n("Ff2n"),o=n("q1tI"),s=n("uciX"),l=n("7ixt"),c=function(e){var t=e.overlay,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle;return o.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},"function"==typeof t?t():t)},u=Object(o.forwardRef)((function(e,t){var n=e.overlayClassName,u=e.trigger,d=void 0===u?["hover"]:u,f=e.mouseEnterDelay,h=void 0===f?0:f,p=e.mouseLeaveDelay,m=void 0===p?.1:p,v=e.overlayStyle,g=e.prefixCls,y=void 0===g?"rc-tooltip":g,b=e.children,_=e.onVisibleChange,E=e.afterVisibleChange,x=e.transitionName,S=e.animation,w=e.placement,k=void 0===w?"right":w,T=e.align,O=void 0===T?{}:T,C=e.destroyTooltipOnHide,A=void 0!==C&&C,L=e.defaultVisible,D=e.getTooltipContainer,I=e.overlayInnerStyle,R=Object(a.a)(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),N=Object(o.useRef)(null);Object(o.useImperativeHandle)(t,(function(){return N.current}));var M=Object(i.a)({},R);"visible"in e&&(M.popupVisible=e.visible);var P=!1,j=!1;if("boolean"==typeof A)P=A;else if(A&&"object"===Object(r.a)(A)){var F=A.keepParent;P=!0===F,j=!1===F}return o.createElement(s.a,Object.assign({popupClassName:n,prefixCls:y,popup:function(){var t=e.arrowContent,n=void 0===t?null:t,r=e.overlay,i=e.id;return[o.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),o.createElement(c,{key:"content",prefixCls:y,id:i,overlay:r,overlayInnerStyle:I})]},action:d,builtinPlacements:l.a,popupPlacement:k,ref:N,popupAlign:O,getPopupContainer:D,onPopupVisibleChange:_,afterPopupVisibleChange:E,popupTransitionName:x,popupAnimation:S,defaultPopupVisible:L,destroyPopupOnHide:P,autoDestroy:j,mouseLeaveDelay:m,popupStyle:v,mouseEnterDelay:h},M),b)}));t.a=u},OZM5:
/*!*****************************************!*\
!*** ./node_modules/rc-tree/es/util.js ***!
\*****************************************/
/*! exports provided: arrDel, arrAdd, posToArr, getPosition, isTreeNode, getDragNodesKeys, calcDropPosition, calcSelectedKeys, convertDataToTree, parseCheckedKeys, conductExpandParent, getDataAndAria */
/*! exports used: arrAdd, arrDel, calcDropPosition, calcSelectedKeys, conductExpandParent, getDataAndAria, getDragNodesKeys, getPosition, isTreeNode, parseCheckedKeys, posToArr */function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"i",(function(){return u})),n.d(t,"g",(function(){return d})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return h})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return v}));var r=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),i=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),a=(n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),n(/*! react */"q1tI"),n(/*! rc-util/es/warning */"Kwbf"));n(/*! ./TreeNode */"WaYH");function o(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function s(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function l(e){return e.split("-")}function c(e,t){return"".concat(e,"-").concat(t)}function u(e){return e&&e.type&&e.type.isTreeNode}function d(e,t){var n=[e];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}(t[e].children),n}function f(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),i=r.top,a=r.bottom,o=r.height,s=Math.max(.25*o,2);return n<=i+s?-1:n>=a-s?1:0}function h(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==Object(i.a)(e))return Object(a.a)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;return(e||[]).forEach((function(e){!function e(r){if(!n.has(r)){var i=t[r];if(i){n.add(r);var a=i.parent;i.node.disabled||a&&e(a.key)}}}(e)})),Object(r.a)(n)}function v(e){var t={};return Object.keys(e).forEach((function(n){(n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n])})),t}},"OkW/":
/*!*******************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/Discuss/index.less ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},Ot1p:
/*!**************************************************************!*\
!*** ./src/components/markdown-editor/index.tsx + 6 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/code-block/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/useInterval.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/util.js because of ./src/pages/tasks/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input-number/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/radio/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/codemirror/lib/codemirror.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(e,t,n){"use strict";n("2qtc");var r=n("kLXV"),i=n("rAM+"),a=(n("miYZ"),n("tsqr")),o=n("tJVT"),s=n("jrin"),l=n("q1tI"),c=n.n(l),u=n("VrN/"),d=n.n(u),f=n("bdgK"),h=(n("p77/"),n("Bd2K"),n("ELLl"),n("19Vz"),n("lZu9"),n("+NIl"),n("kSUc"),n("9Bee")),p=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,Object(l.useMemo)((function(){return""}),[n]));return c.a.createElement(c.a.Fragment,null,c.a.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))},m=n("0Owb"),v=(n("dejd"),n("C+DQ"),[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}]);function g(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,a=e.className,o=void 0===a?"":a,s=e.children;return c.a.createElement("a",{title:n,className:o,onClick:function(){t(i)}},c.a.createElement("i",{className:"md-iconfont ".concat(r)}),s)}var y=function(e){var t=e.watch,n=e.showNullButton,r=e.onActionCallback,i=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,s=[].concat(v,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return c.a.createElement("ul",{className:"markdown-toolbar-container"},!o&&s.map((function(e,t){return c.a.createElement("li",{key:t},e.actionName?c.a.createElement(g,Object(m.a)({},e,{onActionCallback:r})):c.a.createElement("span",{className:"v-line"}))})),n?c.a.createElement("li",null,c.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r},c.a.createElement("span",{className:"fill-tip"},"点击插入\b填空项"))):null,a&&c.a.createElement("li",null,c.a.createElement(g,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r},c.a.createElement("span",{className:"fill-tip"},"插入模板"))),c.a.createElement("li",{className:"btn-full-screen"},c.a.createElement(g,{icon:"".concat(i?"icon-shrink":"icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})))},b=n("M8RZ"),_=(n("+L6B"),n("2/Rp")),E=(n("y8nQ"),n("Vl3Y")),x=(n("5NDa"),n("5rEg")),S={labelCol:{span:4},wrapperCol:{span:20}},w=function(e){var t=e.callback,n=e.onCancel;return c.a.createElement(E.a,Object(m.a)({},S,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)}}),c.a.createElement(E.a.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}]},c.a.createElement(x.a,null)),c.a.createElement(E.a.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}]},c.a.createElement(x.a,null)),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(_.a,{type:"ghost",onClick:n},"取消")))},k=n("7ahc"),T=(n("HmJG"),n("BjJ7")),O=E.a.useForm,C={width:280,marginRight:10},A={labelCol:{span:5},wrapperCol:{span:19}},L=function(e){var t=e.callback,n=e.onCancel,r=O(),i=Object(o.a)(r,1)[0];function a(e,t){i.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type})}return c.a.createElement(E.a,Object(m.a)({form:i},A,{className:"upload-image-panel",onFinish:function(e){t(e)}}),c.a.createElement(E.a.Item,{label:"图片地址",required:!0},c.a.createElement("div",{className:"flex-container"},c.a.createElement(E.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}]},c.a.createElement(x.a,{style:C})),c.a.createElement(D,{onFileChange:function(e){I(e.target.files[0],a)}}))),c.a.createElement(E.a.Item,{label:"图片描述",name:"alt",rules:[{required:!0,message:"请输入图片描述"}]},c.a.createElement(x.a,{style:{width:264}})),c.a.createElement(E.a.Item,{style:{textAlign:"right"}},c.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(_.a,{type:"ghost",onClick:n},"取消")))};function D(e){var t=e.onFileChange;return c.a.createElement("a",{className:"upload-button"},"本地上传",c.a.createElement("input",{type:"file",onChange:t}))}function I(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(T.a,"/api/attachments.json")),r.send(n)}n("giR+");var R,N,M=n("fyUT"),P=(n("7Kak"),n("9yH6")),j=P.a.Group,F={margin:"0 8px"},U=function(e){var t=e.callback,n=e.onCancel;return c.a.createElement(E.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)}},c.a.createElement("div",{className:"flex-container"},c.a.createElement("span",{style:F},"单元格数:"),c.a.createElement("span",{style:F},"行数"),c.a.createElement(E.a.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}]},c.a.createElement(M.a,null)),c.a.createElement("span",{style:F},"列数"),c.a.createElement(E.a.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}]},c.a.createElement(M.a,null))),c.a.createElement("div",{className:"flex-container",style:{marginTop:12}},c.a.createElement("span",{style:F},"对齐方式:"),c.a.createElement(E.a.Item,{name:"align"},c.a.createElement(j,null,c.a.createElement(P.a,{value:"default"},c.a.createElement("i",{className:"fa fa-align-justify"})),c.a.createElement(P.a,{value:"left"},c.a.createElement("i",{className:"fa fa-align-left"})),c.a.createElement(P.a,{value:"center"},c.a.createElement("i",{className:"fa fa-align-center"})),c.a.createElement(P.a,{value:"right"},c.a.createElement("i",{className:"fa fa-align-right"}))))),c.a.createElement("div",{className:"flex-container flex-end"},c.a.createElement(_.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"确定"),c.a.createElement(_.a,{type:"ghost",onClick:n},"取消")))},B=n("m3rI"),G="------------",z={default:G,left:":".concat(G),center:":".concat(G,":"),right:"".concat(G,":")},H=n("9VGf");function K(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var V=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",W=(R={},Object(s.a)(R,V+"-B","bold"),Object(s.a)(R,V+"-I","italic"),R),q=(N={},Object(s.a)(N,"link","添加链接"),Object(s.a)(N,"code-block","添加代码块"),Object(s.a)(N,"upload-image","添加图片"),Object(s.a)(N,"add-table","添加表格"),N);t.a=function(e){var t=e.defaultValue,n=void 0===t?"":t,u=e.onChange,m=e.width,v=void 0===m?"100%":m,g=e.height,_=void 0===g?400:g,E=e.miniToolbar,x=void 0!==E&&E,S=e.isFocus,T=void 0!==S&&S,O=e.watch,C=e.insertTemp,A=e.mode,D=void 0===A?"markdown":A,R=e.id,N=void 0===R?"markdown-editor-id":R,M=e.showResizeBar,P=void 0!==M&&M,j=e.noStorage,F=void 0!==j&&j,G=e.showNullButton,V=void 0!==G&&G,X=e.hidetoolBar,Y=void 0!==X&&X,$=e.fullScreen,J=void 0!==$&&$,Q=e.onBlur,Z=e.onCMBeforeChange,ee=e.onFullScreen,te=e.className,ne=void 0===te?"":te,re=e.disablePaste,ie=void 0!==re&&re,ae=e.placeholder,oe=void 0===ae?"":ae,se=e.values,le=void 0===se?"":se,ce=Object(l.useState)(null),ue=Object(o.a)(ce,2),de=ue[0],fe=ue[1],he=Object(l.useState)(n),pe=Object(o.a)(he,2),me=pe[0],ve=pe[1],ge=Object(l.useState)(O),ye=Object(o.a)(ge,2),be=ye[0],_e=ye[1],Ee=Object(l.useState)(J),xe=Object(o.a)(Ee,2),Se=xe[0],we=xe[1],ke=Object(l.useState)(""),Te=Object(o.a)(ke,2),Oe=Te[0],Ce=Te[1],Ae=Object(l.useState)(0),Le=Object(o.a)(Ae,2),De=Le[0],Ie=Le[1],Re=Object(l.useState)(_),Ne=Object(o.a)(Re,2),Me=Ne[0],Pe=Ne[1],je=Object(l.useState)(!1),Fe=Object(o.a)(je,2),Ue=(Fe[0],Fe[1]),Be=Object(l.useRef)(),Ge=Object(l.useRef)(),ze=Object(l.useRef)(),He=Object(l.useRef)();Object(l.useEffect)((function(){ve(le),null==de||de.setValue(le)}),[le]),Object(l.useEffect)((function(){null==ee||ee(Se)}),[Se]),Object(l.useEffect)((function(){if(Be.current){var e=d.a.fromTextArea(Be.current,{mode:D,lineNumbers:!x,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});function t(t,n){if(!ie){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items,s=["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("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var l,c=o[1];"file"===(null===(l=o[0])||void 0===l?void 0:l.kind)&&(c=o[0]);var u=c.getAsFile(),d=u.name.split(".").pop();I(u,(function(t){var n,r,i;t.id?(null==u||null===(n=u.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection("![,](/api/attachments/".concat(t.id,"?type=").concat(t.content_type,")")):(null==u||null===(r=u.type)||void 0===r?void 0:r.indexOf("video"))>-1?e.replaceSelection('<video width="100%" controls src="'.concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,'"></video>')):(null==u||null===(i=u.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?e.replaceSelection('<a href="'.concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(u.type,'&disposition=inline" target="_blank">').concat(u.name,"</a>")):s.includes(d)?e.replaceSelection('<a href="'.concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,'?type=office&disposition=inline" target="_blank">').concat(u.name,"</a>")):e.replaceSelection("[".concat(u.name,"](").concat(B.a.API_SERVER,"/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){a.b.warn("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()}return T&&e.focus(),e.on("paste",t),fe(e),function(){e.off("paste",t)}}}),[]);var Ke=Object(l.useCallback)((function(){Ge.current}),[Me,Ge,Se]);Object(l.useEffect)((function(){if(de){var e=function(){var e=new f.default((function(e){var t,n=Object(i.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&(Ke(),de.setSize("100%","100%"),de.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(Be.current.parentElement),e}();return function(){e.unobserve(Be.current.parentElement)}}}),[de,Ke]),Object(l.useEffect)((function(){if(de){for(var e=[],t=function(){var t=r[n],i=(a=Object(o.a)(t,2))[0],l=a[1],c=Object(s.a)({},i,(function(){Ve(l)}));e.push(c),de.addKeyMap(c)},n=0,r=Object.entries(W);n<r.length;n++){var a;t()}return function(){var t,n=Object(i.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;de.removeKeyMap(r)}}catch(e){n.e(e)}finally{n.f()}}}}),[de]),Object(l.useEffect)((function(){J!==Se&&we(J)}),[J]),Object(H.a)((function(){if(!F&&De>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(N);e>=De+1e4&&(!t||t!==me)&&(window.sessionStorage.setItem(N,me),Ue(!0))}}),1e4),Object(l.useEffect)((function(){_e(O)}),[de,O]),Object(l.useEffect)((function(){de&&T&&de.focus()}),[de,T]),Object(l.useEffect)((function(){if(be&&de){var e=de.getScrollerElement();function t(e){var t=e.target;if(He.current){var n=t.scrollTop/t.scrollHeight;He.current.scrollTop=He.current.scrollHeight*n}}return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[de,be]),Object(l.useEffect)((function(){if(de&&Z){function e(e,t){Z(e,t)}return de.on("beforeChange",e),function(){de.off("beforeChange",e)}}}),[de,Z]),Object(l.useEffect)((function(){if(de&&Q){function e(){Q(de.getValue())}return de.on("blur",e),function(){de.off("blur",e)}}}),[de,Q]),Object(l.useEffect)((function(){if(de){function e(e){var t=e.getValue();ve(t),Ie((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),u&&u(t)}return de.on("change",e),function(){de.off("change",e)}}}),[de,u]),Object(l.useEffect)((function(){de&&(null==n?(de.setValue(""),ve("")):n!==de.getValue()&&(de.setValue(n),ve(n),de.setCursor(de.lineCount(),0)))}),[de,n]);var Ve=Object(l.useCallback)((function(e){var t=de.getCursor(),n=de.getSelection(),r=n.split("\n");switch(e){case"bold":return de.replaceSelection("**"+n+"**"),""===n&&de.setCursor(t.line,t.ch+2),de.focus();case"italic":return de.replaceSelection("*"+n+"*"),""===n&&de.setCursor(t.line,t.ch+1),de.focus();case"code":return de.replaceSelection("`"+n+"`"),""===n&&de.setCursor(t.line,t.ch+1),de.focus();case"inline-latex":return de.replaceSelection("`$$"+n+"$$`"),""===n&&de.setCursor(t.line,t.ch+3),de.focus();case"latex":return de.replaceSelection("```latex\n"+n+"\n```"),de.setCursor(t.line+1,n.length+1),de.focus();case"line-break":return de.replaceSelection("<br/>\n"),de.focus();case"list-ul":return""===n?de.replaceSelection("- "+n):de.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),de.focus();case"list-ol":return""===n?de.replaceSelection("1. "+n):de.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),de.focus();case"add-null-ch":return""===n&&de.setCursor(t.line,t.ch+1),de.replaceSelection("▁"),de.focus();case"inster-template-1":return""===n&&de.setCursor(t.line,t.ch),de.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),de.focus();case"eraser":return de.setValue(""),de.focus();case"trigger-watch":return _e(!be),de.focus();case"trigger-full-screen":return we(!Se),de.focus();case"link":return void Ce("link");case"code-block":return void Ce("code-block");case"upload-image":return void Ce("upload-image");case"add-table":return void Ce("add-table");default:throw new Error}}),[de,be,Se]),We=Object(l.useCallback)((function(e){switch(Ce(""),Oe){case"link":var t=e.title,n=e.link;return de.replaceSelection("[".concat(t,"](").concat(n,")")),de.focus();case"code-block":var r=e.language,i=e.content;return de.replaceSelection(["```"+r,i,"```"].join("\n")),de.focus();case"upload-image":var a=e.src,o=e.alt;return de.replaceSelection("![ ".concat(o," ]( ").concat(a,' "').concat(o,'" )')),de.focus();case"add-table":for(var s=e.row,l=e.col,c=e.align,u="\n",d=0;d<s;d++){for(var f=[],h=[],p=0;p<l;p++)1===d&&h.push(z[c]),f.push(" ");1===d&&(u+="| ".concat(h.join(" | ")," |\n")),u+="| ".concat(f.join(1===l?"":" | ")," |\n")}return de.replaceSelection(u+"\n"),de.focus();default:throw new Error}}),[de,Oe]),qe=Object(l.useMemo)((function(){switch(Oe){case"link":return c.a.createElement(w,{callback:We,onCancel:Xe});case"code-block":return c.a.createElement(k.b,{callback:We,onCancel:Xe});case"upload-image":return c.a.createElement(L,{callback:We,onCancel:Xe});case"add-table":return c.a.createElement(U,{callback:We,onCancel:Xe});default:return null}}),[Oe]);function Xe(){Ce("")}Object(l.useEffect)((function(){if(ze.current){var e=ze.current,t=!1,n=0;function r(e){t=!0,n=e.pageY}function i(){t=!1}function a(e){if(t){var r=e.pageY-n;r<0&&(r=0),r>300&&(r=300),Pe(_+r+"px")}}return e.addEventListener("mousedown",r),document.addEventListener("mousemove",a),document.addEventListener("mouseup",i),function(){e.removeEventListener("mousedown",r),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",i)}}}),[de,ze]),Object(l.useEffect)((function(){Pe(_)}),[_]);var Ye={width:K(v),height:K(Me)};Object(l.useMemo)((function(){if(De){var e=new Date(De),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[De]);return c.a.createElement(l.Fragment,null,c.a.createElement("div",{className:"markdown-editor-wrapper",ref:Ge},c.a.createElement("div",{className:"markdown-editor-container ".concat(ne," ").concat(be?"on-preview":""," ").concat(x?"mini":""," ").concat(Se?"full-screen":""),style:Ye},c.a.createElement(y,{insertTemp:C,watch:be,fullScreen:Se,showNullButton:V,onActionCallback:Ve,hidetoolBar:Y}),c.a.createElement("div",{className:"markdown-editor-body"},c.a.createElement("div",{className:"codemirror-container"},c.a.createElement("textarea",{ref:Be,placeholder:oe})),be?c.a.createElement("div",{ref:He,className:"preview-container"},"stex"===D&&c.a.createElement(p,{value:me}),"stex"!==D&&c.a.createElement(h.a,{value:me})):null))),P?c.a.createElement("a",{ref:ze,className:"editor-resize"}):null,c.a.createElement(b.a,null,q[Oe]?c.a.createElement(r.a,{centered:!0,title:q[Oe],visible:!0,onCancel:Xe,footer:null},qe):null))}},P5Jw:
/*!***********************************************************!*\
!*** ./node_modules/react-copy-to-clipboard/lib/index.js ***!
\***********************************************************/
/*! no static exports found */
/*! exports used: CopyToClipboard */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=n(/*! ./Component */"rHrb").CopyToClipboard;r.CopyToClipboard=r,e.exports=r},PD8m:
/*!******************************************************!*\
!*** ./node_modules/store/storages/memoryStorage.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){e.exports={name:"memoryStorage",read:function(e){return n[e]},write:function(e,t){n[e]=t},each:function(e){for(var t in n)n.hasOwnProperty(t)&&e(n[t],t)},remove:function(e){delete n[e]},clearAll:function(e){n={}}};var n={}},RELg:
/*!**************************************************************!*\
!*** ./node_modules/store/storages/oldIE-userDataStorage.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../src/util */"MFOe").Global;e.exports={name:"oldIE-userDataStorage",write:function(e,t){if(o)return;var n=l(e);a((function(e){e.setAttribute(n,t),e.save("storejs")}))},read:function(e){if(o)return;var t=l(e),n=null;return a((function(e){n=e.getAttribute(t)})),n},each:function(e){a((function(t){for(var n=t.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=l(e);a((function(e){e.removeAttribute(t),e.save("storejs")}))},clearAll:function(){a((function(e){var t=e.XMLDocument.documentElement.attributes;e.load("storejs");for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save("storejs")}))}};var i=r.document,a=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var e,t,n;try{(t=new ActiveXObject("htmlfile")).open(),t.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,n=e.createElement("div")}catch(t){n=i.createElement("div"),e=i.body}return function(t){var r=[].slice.call(arguments,0);r.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load("storejs"),t.apply(this,r),e.removeChild(n)}}(),o=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function l(e){return e.replace(/^\d/,"___$&").replace(s,"___")}},RpDr:
/*!**************************************************************!*\
!*** ./src/pages/Question/OjProblem/TestCasePanel/index.tsx ***!
\**************************************************************/
/*! exports provided: ExecuteDict, getDetailCommitOut, getCommitOut, default */
/*! exports used: ExecuteDict, default, getDetailCommitOut */function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"c",(function(){return S}));n(/*! antd/es/button/style */"+L6B");var r,i,a=n(/*! antd/es/button */"2/Rp"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),l=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */"jrin"),c=(n(/*! antd/es/input/style */"5NDa"),n(/*! antd/es/input */"5rEg")),u=n(/*! react */"q1tI"),d=n.n(u),f=n(/*! @ant-design/icons */"8Skl"),h=n(/*! @ant-design/icons */"y3Kf"),p=n(/*! ../interface */"bdLU"),m=n(/*! js-base64 */"J66h"),v=(n(/*! ./index.less */"++UQ"),n(/*! @/components/Spinner */"IxHN")),g=n(/*! @/components/RenderHtml */"9Bee"),y=n(/*! @/utils/util */"1vsH"),b=c.a.TextArea,_={visible:!1,tabIndex:"0"},E=(r={},Object(l.a)(r,p.a.NOMATCH,"测试用例结果不匹配"),Object(l.a)(r,p.a.OK,"调试通过"),Object(l.a)(r,2,"调试超时"),Object(l.a)(r,3,"调试pod失败"),Object(l.a)(r,4,"编译失败"),Object(l.a)(r,5,"执行失败"),r);function x(e,t){switch(t.type){case i.SET_VISIBLE:return Object(s.a)(Object(s.a)({},e),{},{visible:t.payload});case i.SET_TABINDEX:return Object(s.a)(Object(s.a)({},e),{},{tabIndex:t.payload});default:throw new Error}}function S(e){var t=e.status,n=e.error_msg,r=e.output,i=e.input,a=e.expected_output,o=e.is_file,s=e.input_file_url,l=e.output_file_url,c=e.expected_output_file_url,u=null,f={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(t){case p.a.NOMATCH:u=d.a.createElement(d.a.Fragment,null,d.a.createElement("p",{className:"c-red"},"实际输入:"),!o&&d.a.createElement(g.a,{value:i,style:f}),o&&d.a.createElement("div",{style:f},d.a.createElement("a",{onClick:function(){return Object(y.w)(s,i)}},i)),d.a.createElement("p",{className:"c-red"},"实际输出:"),!o&&d.a.createElement(g.a,{value:r&&m.Base64.decode(r)||"",style:f}),o&&d.a.createElement("div",{style:f},d.a.createElement("a",{onClick:function(){return Object(y.w)(l,r)}},r)),d.a.createElement("p",{className:"c-red"},"预期输出:"),!o&&d.a.createElement(g.a,{value:a&&m.Base64.decode(a)||"",style:f}),o&&d.a.createElement("div",{style:f},d.a.createElement("a",{onClick:function(){return Object(y.w)(c,a)}},a)));break;case p.a.EXECUTEFAILURE:case p.a.COMPILEFAILURE:u=d.a.createElement(d.a.Fragment,null,d.a.createElement("p",null,"最后执行的输入:"),!o&&d.a.createElement(g.a,{value:i,style:f}),o&&d.a.createElement("div",{style:f},d.a.createElement("a",{onClick:function(){return Object(y.w)(s,i)}},i)),d.a.createElement("p",null,"执行出错信息:"),d.a.createElement("pre",{className:"error"},m.Base64.decode(n)));break;case p.a.PODFAILURE:u=d.a.createElement("p",null,"创建pod失败请稍后重试");break;case p.a.TIMEOUT:u=d.a.createElement("p",null,"评测超时,请稍后重试")}return d.a.createElement(d.a.Fragment,null," ",u," ")}!function(e){e[e.SET_VISIBLE=0]="SET_VISIBLE",e[e.SET_TABINDEX=1]="SET_TABINDEX"}(i||(i={})),t.b=function(e){var t=e.id,n=e.input,r=e.debuging,s=e.submitting,l=e.executingMessage,c=e.debugResult,g=e.onChangeInput,y=e.onDebugCode,E=e.onSubmitCode,S=Object(u.useReducer)(x,_),w=Object(o.a)(S,2),k=w[0],T=w[1],O=k.visible,C=k.tabIndex;function A(e){var t=e.target.id;T({type:i.SET_TABINDEX,payload:t})}Object(u.useEffect)((function(){T({type:i.SET_VISIBLE,payload:!1})}),[t]);var L=Object(u.useMemo)((function(){if(c){c.status;return d.a.createElement(d.a.Fragment,null,function(e){var t=e.status,n=e.error_msg,r=e.execute_time,i=e.output,a=e.input,o=e.expected_output,s=(e.is_file,e.input_file_url,e.output_file_url,e.expected_output_file_url,null);switch(t){case p.a.OK:s=d.a.createElement(d.a.Fragment,null,d.a.createElement("p",null,"执行用时:",r),d.a.createElement("p",null,"执行结果:"),d.a.createElement("pre",null,m.Base64.decode(i)));break;case p.a.NOMATCH:s=d.a.createElement(d.a.Fragment,null,d.a.createElement("p",null,"输入:",d.a.createElement("pre",null,a)),d.a.createElement("p",null,"输出:",i&&m.Base64.decode(i)),d.a.createElement("p",null,"预期输出:",o&&m.Base64.decode(o)));break;case p.a.EXECUTEFAILURE:case p.a.COMPILEFAILURE:s=d.a.createElement(d.a.Fragment,null,d.a.createElement("p",null,"最后执行的输入:",d.a.createElement("pre",null,a)),d.a.createElement("p",null,"执行出错信息:"),d.a.createElement("pre",{className:"error"},m.Base64.decode(n)));break;case p.a.PODFAILURE:s=d.a.createElement("p",null,"创建pod失败请稍后重试");break;case p.a.TIMEOUT:s=d.a.createElement("p",null,"评测超时,请稍后重试")}return d.a.createElement(d.a.Fragment,null," ",s," ")}(c))}return null}),[c]);return d.a.createElement("div",{className:"test-case-panel"},d.a.createElement("div",{className:"test-case-panel-body ".concat(O?"active":"")},d.a.createElement("ul",{className:"s-navs"},d.a.createElement("li",null,d.a.createElement("a",{className:"0"===C?"active":"",id:"0",onClick:A},"自定义测试用例")),d.a.createElement("li",null,d.a.createElement("a",{className:"1"===C?"active":"",id:"1",onClick:A},"代码执行结果"))),d.a.createElement("div",{className:"tab-panel-body ".concat("0"===C?"":"hide")},d.a.createElement(b,{placeholder:"请填写测试用例的输入值,点击“调试代码”",value:n,onChange:g})),d.a.createElement("div",{className:"tab-panel-body ".concat("1"===C?"":"hide")},r?d.a.createElement(v.a,{message:l}):c?d.a.createElement("section",{style:{height:200}}," ",L," "):d.a.createElement("p",{className:"tip"},"请填写测试用例的输入值,点击“调试代码”"))),d.a.createElement("a",{className:"btn-collapse ".concat(O?"up":""),onClick:function(){T({type:i.SET_VISIBLE,payload:!O})}},O?d.a.createElement(f.a,null):d.a.createElement(h.a,null)),d.a.createElement("footer",{className:"footer"},d.a.createElement("span",{style:{visibility:"hidden"}},"控制台"),d.a.createElement("div",{className:"flex-container"},d.a.createElement(a.a,{id:"oj-prev",className:"btn-blue",type:"ghost"},"上一题"),d.a.createElement(a.a,{id:"oj-next",className:"btn-blue",type:"ghost"},"下一题"),d.a.createElement(a.a,{className:"btn-green",type:"ghost",loading:r,onClick:function(){T({type:i.SET_VISIBLE,payload:!0}),T({type:i.SET_TABINDEX,payload:"1"}),y()}},"调试代码"),d.a.createElement(a.a,{type:"primary",loading:s,disabled:s,onClick:function(){T({type:i.SET_VISIBLE,payload:!1}),E()}},"评测并提交"))))}},"S/kP":
/*!*********************************************!*\
!*** ./src/assets/images/question/time.svg ***!
\*********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/time.a3dc82f3.svg"},"SA+Z":
/*!********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/toArray.js ***!
\********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ./arrayWithHoles.js */"wTVA"),i=n(/*! ./iterableToArray.js */"EbDI"),a=n(/*! ./unsupportedIterableToArray.js */"ZhPi"),o=n(/*! ./nonIterableRest.js */"wkBT");e.exports=function(e){return r(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},SJMd:
/*!****************************************************!*\
!*** ./node_modules/code-prettify/src/prettify.js ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){window.PR_SHOULD_USE_CONTINUATION=!0,function(){var e=window,t=["break,continue,do,else,for,if,return,while"],n=[[t,"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"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],r=[n,"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"],i=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[n,"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"],o=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="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",l=[t,"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"],c=[t,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],u=[t,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],d=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;function f(e,t,n,r,i){if(n){var a={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null};r(a),i.push.apply(i,a.decorations)}}var h=/\S/;function p(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling){var r=n.nodeType;t=1===r?t?e:n:3===r&&h.test(n.nodeValue)?e:t}return t===e?void 0:t}function m(e,t){var n,r={};!function(){for(var i=e.concat(t),a=[],o={},s=0,l=i.length;s<l;++s){var c=i[s],u=c[3];if(u)for(var d=u.length;--d>=0;)r[u.charAt(d)]=c;var f=c[1],h=""+f;o.hasOwnProperty(h)||(a.push(f),o[h]=null)}a.push(/[\0-\uffff]/),n=function(e){for(var t=0,n=!1,r=!1,i=0,a=e.length;i<a;++i){if((f=e[i]).ignoreCase)r=!0;else if(/[a-z]/i.test(f.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}var o={b:8,t:9,n:10,v:11,f:12,r:13};function s(e){var t=e.charCodeAt(0);if(92!==t)return t;var n=e.charAt(1);return(t=o[n])||("0"<=n&&n<="7"?parseInt(e.substring(1),8):"u"===n||"x"===n?parseInt(e.substring(2),16):e.charCodeAt(1))}function l(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t}function c(e){var t=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],r="^"===t[0],i=["["];r&&i.push("^");for(var a=r?1:0,o=t.length;a<o;++a){var c=t[a];if(/\\[bdsw]/i.test(c))i.push(c);else{var u,d=s(c);a+2<o&&"-"===t[a+1]?(u=s(t[a+2]),a+=2):u=d,n.push([d,u]),u<65||d>122||(u<65||d>90||n.push([32|Math.max(65,d),32|Math.min(u,90)]),u<97||d>122||n.push([-33&Math.max(97,d),-33&Math.min(u,122)]))}}n.sort((function(e,t){return e[0]-t[0]||t[1]-e[1]}));var f=[],h=[];for(a=0;a<n.length;++a){(p=n[a])[0]<=h[1]+1?h[1]=Math.max(h[1],p[1]):f.push(h=p)}for(a=0;a<f.length;++a){var p=f[a];i.push(l(p[0])),p[1]>p[0]&&(p[1]+1>p[0]&&i.push("-"),i.push(l(p[1])))}return i.push("]"),i.join("")}function u(e){for(var r=e.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")),i=r.length,a=[],o=0,s=0;o<i;++o){if("("===(d=r[o]))++s;else if("\\"===d.charAt(0)){(u=+d.substring(1))&&(u<=s?a[u]=-1:r[o]=l(u))}}for(o=1;o<a.length;++o)-1===a[o]&&(a[o]=++t);for(o=0,s=0;o<i;++o){if("("===(d=r[o]))a[++s]||(r[o]="(?:");else if("\\"===d.charAt(0)){var u;(u=+d.substring(1))&&u<=s&&(r[o]="\\"+a[u])}}for(o=0;o<i;++o)"^"===r[o]&&"^"!==r[o+1]&&(r[o]="");if(e.ignoreCase&&n)for(o=0;o<i;++o){var d,f=(d=r[o]).charAt(0);d.length>=2&&"["===f?r[o]=c(d):"\\"!==f&&(r[o]=d.replace(/[a-zA-Z]/g,(function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"})))}return r.join("")}var d=[];for(i=0,a=e.length;i<a;++i){var f;if((f=e[i]).global||f.multiline)throw new Error(""+f);d.push("(?:"+u(f)+")")}return new RegExp(d.join("|"),r?"gi":"g")}(a)}();var i=t.length,a=function(e){for(var o=e.sourceCode,s=e.basePos,l=e.sourceNode,c=[s,"pln"],u=0,d=o.match(n)||[],h={},p=0,m=d.length;p<m;++p){var v,g=d[p],y=h[g],b=void 0;if("string"==typeof y)v=!1;else{var _=r[g.charAt(0)];if(_)b=g.match(_[1]),y=_[0];else{for(var x=0;x<i;++x)if(_=t[x],b=g.match(_[1])){y=_[0];break}b||(y="pln")}!(v=y.length>=5&&"lang-"===y.substring(0,5))||b&&"string"==typeof b[1]||(v=!1,y="src"),v||(h[g]=y)}var S=u;if(u+=g.length,v){var w=b[1],k=g.indexOf(w),T=k+w.length;b[2]&&(k=(T=g.length-b[2].length)-w.length);var O=y.substring(5);f(l,s+S,g.substring(0,k),a,c),f(l,s+S+k,w,E(O,w),c),f(l,s+S+T,g.substring(T),a,c)}else c.push(s+S,y)}e.decorations=c};return a}function v(e){var t=[],n=[];e.tripleQuotedStrings?t.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push(["str",/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var r=e.hashComments;r&&(e.cStyleComments?(r>1?t.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):t.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push(["com",/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push(["com",/^\/\/[^\r\n]*/,null]),n.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var i=e.regexLiterals;if(i){var a=i>1?"":"\n\r",o=a?".":"[\\S\\s]",s="/(?=[^/*"+a+"])(?:[^/\\x5B\\x5C"+a+"]|\\x5C"+o+"|\\x5B(?:[^\\x5C\\x5D"+a+"]|\\x5C"+o+")*(?:\\x5D|$))+/";n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+s+")")])}var l=e.types;l&&n.push(["typ",l]);var c=(""+e.keywords).replace(/^ | $/g,"");c.length&&n.push(["kwd",new RegExp("^(?:"+c.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push(["pln",/^\s+/,null," \r\n\t "]);var u="^.[^\\s\\w.$@'\"`/\\\\]*";return e.regexLiterals&&(u+="(?!s*/)"),n.push(["lit",/^@[a-z_$][a-z_$@0-9]*/i,null],["typ",/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],["pln",/^[a-z_$][a-z_$@0-9]*/i,null],["lit",new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],["pln",/^\\[\s\S]?/,null],["pun",new RegExp(u),null]),m(t,n)}var g=v({keywords:[r,a,i,o,s,l,c,u],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function y(e,t,n){for(var r=/(?:^|\s)nocode(?:\s|$)/,i=/\r\n?|\n/,a=e.ownerDocument,o=a.createElement("li");e.firstChild;)o.appendChild(e.firstChild);var s=[o];function l(e){var t=e.nodeType;if(1!=t||r.test(e.className)){if((3==t||4==t)&&n){var o=e.nodeValue,s=o.match(i);if(s){var u=o.substring(0,s.index);e.nodeValue=u;var d=o.substring(s.index+s[0].length);if(d)e.parentNode.insertBefore(a.createTextNode(d),e.nextSibling);c(e),u||e.parentNode.removeChild(e)}}}else if("br"===e.nodeName)c(e),e.parentNode&&e.parentNode.removeChild(e);else for(var f=e.firstChild;f;f=f.nextSibling)l(f)}function c(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var r=n?t.cloneNode(!1):t,i=t.parentNode;if(i){var a=e(i,1),o=t.nextSibling;a.appendChild(r);for(var s=o;s;s=o)o=s.nextSibling,a.appendChild(s)}return r}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;s.push(n)}for(var u=0;u<s.length;++u)l(s[u]);t===(0|t)&&s[0].setAttribute("value",t);var d=a.createElement("ol");d.className="linenums";for(var f=Math.max(0,t-1|0)||0,h=(u=0,s.length);u<h;++u)(o=s[u]).className="L"+(u+f)%10,o.firstChild||o.appendChild(a.createTextNode(" ")),d.appendChild(o);e.appendChild(d)}var b={};function _(t,n){for(var r=n.length;--r>=0;){var i=n[r];b.hasOwnProperty(i)?e.console&&console.warn("cannot override language handler %s",i):b[i]=t}}function E(e,t){return e&&b.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),b[e]}function x(t){var n,r,i,a,o,s,l,c=t.langExtension;try{var u=(n=t.sourceNode,r=t.pre,i=/(?:^|\s)nocode(?:\s|$)/,a=[],o=0,s=[],l=0,function e(t){var n=t.nodeType;if(1==n){if(i.test(t.className))return;for(var c=t.firstChild;c;c=c.nextSibling)e(c);var u=t.nodeName.toLowerCase();"br"!==u&&"li"!==u||(a[l]="\n",s[l<<1]=o++,s[l++<<1|1]=t)}else if(3==n||4==n){var d=t.nodeValue;d.length&&(d=r?d.replace(/\r\n?/g,"\n"):d.replace(/[ \t\r\n]+/g," "),a[l]=d,s[l<<1]=o,o+=d.length,s[l++<<1|1]=t)}}(n),{sourceCode:a.join("").replace(/\n$/,""),spans:s}),d=u.sourceCode;t.sourceCode=d,t.spans=u.spans,t.basePos=0,E(c,d)(t),function(e){var t=/\bMSIE\s(\d+)/.exec(navigator.userAgent);t=t&&+t[1]<=8;var n,r,i=/\n/g,a=e.sourceCode,o=a.length,s=0,l=e.spans,c=l.length,u=0,d=e.decorations,f=d.length,h=0;for(d[f]=o,r=n=0;r<f;)d[r]!==d[r+2]?(d[n++]=d[r++],d[n++]=d[r++]):r+=2;for(f=n,r=n=0;r<f;){for(var p=d[r],m=d[r+1],v=r+2;v+2<=f&&d[v+1]===m;)v+=2;d[n++]=p,d[n++]=m,r=v}f=d.length=n;var g=e.sourceNode,y="";g&&(y=g.style.display,g.style.display="none");try{for(;u<c;){l[u];var b,_=l[u+2]||o,E=d[h+2]||o,x=(v=Math.min(_,E),l[u+1]);if(1!==x.nodeType&&(b=a.substring(s,v))){t&&(b=b.replace(i,"\r")),x.nodeValue=b;var S=x.ownerDocument,w=S.createElement("span");w.className=d[h+1];var k=x.parentNode;k.replaceChild(w,x),w.appendChild(x),s<_&&(l[u+1]=x=S.createTextNode(a.substring(v,_)),k.insertBefore(x,w.nextSibling))}(s=v)>=_&&(u+=2),s>=E&&(h+=2)}}finally{g&&(g.style.display=y)}}(t)}catch(t){e.console&&console.log(t&&t.stack||t)}}function S(e,t,n){var r=n||!1,i=t||null,a=document.createElement("div");return a.innerHTML="<pre>"+e+"</pre>",a=a.firstChild,r&&y(a,r,!0),x({langExtension:i,numberLines:r,sourceNode:a,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),a.innerHTML}function w(t,n){var r=n||document.body,i=r.ownerDocument||document;function a(e){return r.getElementsByTagName(e)}for(var o=[a("pre"),a("code"),a("xmp")],s=[],l=0;l<o.length;++l)for(var c=0,u=o[l].length;c<u;++c)s.push(o[l][c]);o=null;var d=Date;d.now||(d={now:function(){return+new Date}});var f=0,h=/\blang(?:uage)?-([\w.]+)(?!\S)/,m=/\bprettyprint\b/,v=/\bprettyprinted\b/,g=/pre|xmp/i,b=/^code$/i,_=/^(?:pre|code|xmp)$/i,E={};!function n(){for(var r=e.PR_SHOULD_USE_CONTINUATION?d.now()+250:1/0;f<s.length&&d.now()<r;f++){for(var a=s[f],o=E,l=a;l=l.previousSibling;){var c=l.nodeType,u=(7===c||8===c)&&l.nodeValue;if(u?!/^\??prettify\b/.test(u):3!==c||/\S/.test(l.nodeValue))break;if(u){o={},u.replace(/\b(\w+)=([\w:.%+-]+)/g,(function(e,t,n){o[t]=n}));break}}var S=a.className;if((o!==E||m.test(S))&&!v.test(S)){for(var w=!1,k=a.parentNode;k;k=k.parentNode){var T=k.tagName;if(_.test(T)&&k.className&&m.test(k.className)){w=!0;break}}if(!w){a.className+=" prettyprinted";var O,C,A=o.lang;if(!A)!(A=S.match(h))&&(O=p(a))&&b.test(O.tagName)&&(A=O.className.match(h)),A&&(A=A[1]);if(g.test(a.tagName))C=1;else{var L=a.currentStyle,D=i.defaultView,I=L?L.whiteSpace:D&&D.getComputedStyle?D.getComputedStyle(a,null).getPropertyValue("white-space"):0;C=I&&"pre"===I.substring(0,3)}var R=o.linenums;(R="true"===R||+R)||(R=!!(R=S.match(/\blinenums\b(?::(\d+))?/))&&(!R[1]||!R[1].length||+R[1])),R&&y(a,R,C),x({langExtension:A,sourceNode:a,numberLines:R,pre:C,sourceCode:null,basePos:null,spans:null,decorations:null})}}}f<s.length?e.setTimeout(n,250):"function"==typeof t&&t()}()}_(g,["default-code"]),_(m([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),_(m([["pln",/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],["pun",/^[=<>\/]+/],["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"]),_(m([],[["atv",/^[\s\S]+/]]),["uq.val"]),_(v({keywords:r,hashComments:!0,cStyleComments:!0,types:d}),["c","cc","cpp","cxx","cyc","m"]),_(v({keywords:"null,true,false"}),["json"]),_(v({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:d}),["cs"]),_(v({keywords:i,cStyleComments:!0}),["java"]),_(v({keywords:u,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),_(v({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),_(v({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),_(v({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),_(v({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),_(v({keywords:"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",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),_(m([],[["str",/^[\s\S]+/]]),["regex"]);var k=e.PR={createSimpleLexer:m,registerLangHandler:_,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:S,prettyPrint:w},T=e.define;"function"==typeof T&&T.amd&&T("google-code-prettify",[],(function(){return k}))}()},TcMa:
/*!*******************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/Description/index.less?modules ***!
\*******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={desc:"desc___qlRMF",info:"info___JEaKq","commit-info":"commit-info___3-4e0"}},UZu5:
/*!*************************************************!*\
!*** ./src/components/image-preview/index.less ***!
\*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},VEzc:
/*!**************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/Drawer/index.less?modules ***!
\**************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={flex_box_center:"flex_box_center___z2AYj",flex_space_between:"flex_space_between___2PZH7",flex_box_vertical_center:"flex_box_vertical_center___3Vw8I",flex_box_center_end:"flex_box_center_end___1dJQf",flex_box_column:"flex_box_column___kstqC",wrap:"wrap___wWYG3",head:"head___1xABk",title:"title___yYb50",content:"content___fzoVv",list:"list___2q90P",footer:"footer___3zT-e"}},"VrN/":
/*!***************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),l=!a&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!a&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),_=/win/i.test(t),E=d&&e.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(d=!1,l=!0);var x=y&&(c||d&&(null==E||E<12.11)),S=n||o&&s>=9;function w(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var n=e.className,r=w(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function O(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function C(e,t){return O(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function L(e,t,n,r){var i=A(e,t,n,r);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function I(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function R(e,t){var n=e.className;w(t).test(n)||(e.className+=(n?" ":"")+t)}function N(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!w(n[r]).test(t)&&(t+=" "+n[r]);return t}k=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var M=function(e){e.select()};function P(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function F(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var a=r||0,o=i||0;;){var s=e.indexOf("\t",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}m?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(M=function(e){try{e.select()}catch(e){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}U.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},U.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var G={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},H={origin:"*mouse"},K={origin:"+move"};function V(e,t,n){for(var r=0,i=0;;){var a=e.indexOf("\t",r);-1==a&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=t)return r}}var W=[""];function q(e){for(;W.length<=e;)W.push(X(W)+" ");return W[e]}function X(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function $(){}function J(e,t){var n;return Object.create?n=Object.create(e):($.prototype=e,n=new $),t&&j(t,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Z(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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 re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function ie(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}var oe=null;function se(e,t,n){var r;oe=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&"before"==n?r=i:oe=i),a.from==t&&(a.from!=a.to&&"before"!=n?r=i:oe=i)}return null!=r?r:oe}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function a(e,t,n){this.level=e,this.from=t,this.to=n}return function(o,s){var l="ltr"==s?"L":"R";if(0==o.length||"ltr"==s&&!e.test(o))return!1;for(var c,u=o.length,d=[],f=0;f<u;++f)d.push((c=o.charCodeAt(f))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var h=0,p=l;h<u;++h){var m=d[h];"m"==m?d[h]=p:p=m}for(var v=0,g=l;v<u;++v){var y=d[v];"1"==y&&"r"==g?d[v]="n":n.test(y)&&(g=y,"r"==y&&(d[v]="R"))}for(var b=1,_=d[0];b<u-1;++b){var E=d[b];"+"==E&&"1"==_&&"1"==d[b+1]?d[b]="1":","!=E||_!=d[b+1]||"1"!=_&&"n"!=_||(d[b]=_),_=E}for(var x=0;x<u;++x){var S=d[x];if(","==S)d[x]="N";else if("%"==S){var w=void 0;for(w=x+1;w<u&&"%"==d[w];++w);for(var k=x&&"!"==d[x-1]||w<u&&"1"==d[w]?"1":"N",T=x;T<w;++T)d[T]=k;x=w-1}}for(var O=0,C=l;O<u;++O){var A=d[O];"L"==C&&"1"==A?d[O]="L":n.test(A)&&(C=A)}for(var L=0;L<u;++L)if(t.test(d[L])){var D=void 0;for(D=L+1;D<u&&t.test(d[D]);++D);for(var I="L"==(L?d[L-1]:l),R=I==("L"==(D<u?d[D]:l))?I?"L":"R":l,N=L;N<D;++N)d[N]=R;L=D-1}for(var M,P=[],j=0;j<u;)if(r.test(d[j])){var F=j;for(++j;j<u&&r.test(d[j]);++j);P.push(new a(0,F,j))}else{var U=j,B=P.length,G="rtl"==s?1:0;for(++j;j<u&&"L"!=d[j];++j);for(var z=U;z<j;)if(i.test(d[z])){U<z&&(P.splice(B,0,new a(1,U,z)),B+=G);var H=z;for(++z;z<j&&i.test(d[z]);++z);P.splice(B,0,new a(2,H,z)),B+=G,U=z}else++z;U<j&&P.splice(B,0,new a(1,U,j))}return"ltr"==s&&(1==P[0].level&&(M=o.match(/^\s+/))&&(P[0].from=M[0].length,P.unshift(new a(0,0,M[0].length))),1==X(P).level&&(M=o.match(/\s+$/))&&(X(P).to-=M[0].length,P.push(new a(0,u-M[0].length,u)))),"rtl"==s?P.reverse():P}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=le(e.text,t)),n}var ue=[],de=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function fe(e,t){return e._handlers&&e._handlers[t]||ue}function he(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=B(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function pe(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function me(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),pe(e,n||t.type,e,t),Ee(t)||t.codemirrorIgnore}function ve(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function ge(e,t){return fe(e,t).length>0}function ye(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xe(e){be(e),_e(e)}function Se(e){return e.target||e.srcElement}function we(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var ke,Te,Oe=function(){if(o&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Ce(e){if(null==ke){var t=A("span","");C(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ke=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=ke?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Te)return Te;var t=C(e,document.createTextNode("AخA")),n=k(t,0,1).getBoundingClientRect(),r=k(t,1,2).getBoundingClientRect();return O(e),!(!n||n.left==n.right)&&(Te=r.right-n.right<3)}var Le,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var a=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Re="oncopy"in(Le=A("div"))||(Le.setAttribute("oncopy","return;"),"function"==typeof Le.oncopy),Ne=null,Me={},Pe={};function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Me[e]=t}function Fe(e){if("string"==typeof e&&Pe.hasOwnProperty(e))e=Pe[e];else if(e&&"string"==typeof e.name&&Pe.hasOwnProperty(e.name)){var t=Pe[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Fe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Fe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=Fe(t);var n=Me[t.name];if(!n)return Ue(e,"text/plain");var r=n(e,t);if(Be.hasOwnProperty(t.name)){var i=Be[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var Be={};function Ge(e,t){j(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function He(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}var Ve=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function We(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function qe(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i})),r}function Xe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Ye(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function $e(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Je(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue e}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o].height;if(t<s)break;t-=s}return n+o}function Qe(e,t){return t>=e.first&&t<e.first+e.size}function Ze(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function at(e,t){return tt(e,t)<0?e:t}function ot(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?et(n,We(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,We(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}Ve.prototype.eol=function(){return this.pos>=this.string.length},Ve.prototype.sol=function(){return this.pos==this.lineStart},Ve.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ve.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ve.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ve.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ve.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ve.prototype.skipToEnd=function(){this.pos=this.string.length},Ve.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ve.prototype.backUp=function(e){this.pos-=e},Ve.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=F(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ve.prototype.indentation=function(){return F(this.string,null,this.tabSize)-(this.lineStart?F(this.string,this.lineStart,this.tabSize):0)},Ve.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ve.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ve.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ve.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ve.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],a={};_t(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,_t(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var a=i[n+1];i[n+1]=(a?a+" ":"")+"overlay "+t}}),a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function ft(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ht(e,$e(t)),i=t.text.length>e.options.maxHighlightLength&&ze(e.doc.mode,r.state),a=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ht(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var a=function(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=We(a,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=a.modeFrontier))return s;var u=F(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),o=a>r.first&&We(r,a-1).stateAfter,s=o?ut.fromSaved(r,o,a):new ut(r,Ke(r.mode),a);return r.iter(a,t,(function(n){pt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function pt(e,t,n,r){var i=e.doc.mode,a=new Ve(t,e.options.tabSize,n);for(a.start=a.pos=r||0,""==t&&mt(i,n.state);!a.eol();)vt(i,a,n.state),a.start=a.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=He(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function vt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=He(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,a,o=e.doc,s=o.mode,l=We(o,(t=st(o,t)).line),c=ht(e,t.line,n),u=new Ve(l.text,e.options.tabSize,c);for(r&&(a=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=vt(s,u,c.state),r&&a.push(new gt(u,i,ze(o.mode,c.state)));return r?a:new gt(u,i,c.state)}function bt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function _t(e,t,n,r,i,a,o){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new Ve(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];for(""==t&&bt(mt(n,r.state),a);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,o&&pt(e,t,r,d.pos),d.pos=t.length,l=null):l=bt(vt(n,d,r.state,f),a),f){var h=f[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}var Et=!1,xt=!1;function St(e,t,n){this.marker=e,this.from=t,this.to=n}function wt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function kt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Tt(e,t){if(t.full)return null;var n=Qe(e,t.from.line)&&We(e,t.from.line).markedSpans,r=Qe(e,t.to.line)&&We(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(null==a.from||(o.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&"bookmark"==o.type&&(!n||!a.marker.insertLeft)){var s=null==a.to||(o.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new St(o,a.from,s?null:a.to))}}return r}(n,i,o),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(null==a.to||(o.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new St(o,s?null:a.from-t,null==a.to?null:a.to-t))}}return r}(r,a,o),c=1==t.text.length,u=X(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var h=wt(l,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];null!=m.to&&(m.to+=u),null==m.from?wt(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Ot(s)),l&&l!=s&&(l=Ot(l));var v=[s];if(!c){var g,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(g||(g=[])).push(new St(s[b].marker,null,null));for(var _=0;_<y;++_)v.push(g);v.push(l)}return v}function Ot(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Ct(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function At(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Lt(e){return e.inclusiveLeft?-1:0}function Dt(e){return e.inclusiveRight?1:0}function It(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),a=tt(r.from,i.from)||Lt(e)-Lt(t);if(a)return-a;var o=tt(r.to,i.to)||Dt(e)-Dt(t);return o||t.id-e.id}function Rt(e,t){var n,r=xt&&e.markedSpans;if(r)for(var i=void 0,a=0;a<r.length;++a)(i=r[a]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||It(n,i.marker)<0)&&(n=i.marker);return n}function Nt(e){return Rt(e,!0)}function Mt(e){return Rt(e,!1)}function Pt(e,t){var n,r=xt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(null==a.from||a.from<t)&&(null==a.to||a.to>t)&&(!n||It(n,a.marker)<0)&&(n=a.marker)}return n}function jt(e,t,n,r,i){var a=We(e,t),o=xt&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var l=o[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,n)||Lt(l.marker)-Lt(i),d=tt(c.to,r)||Dt(l.marker)-Dt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Ft(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Ut(e,t){var n=We(e,t),r=Ft(n);return n==r?t:$e(r)}function Bt(e,t){if(t>e.lastLine())return t;var n,r=We(e,t);if(!Gt(e,r))return t;for(;n=Mt(r);)r=n.find(1,!0).line;return $e(r)+1}function Gt(e,t){var n=xt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&zt(e,t,r))return!0}}function zt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return zt(e,r.line,wt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if((i=t.markedSpans[a]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&zt(e,t,i))return!0}function Ht(e){for(var t=0,n=(e=Ft(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;a=(n=a).parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==n)break;t+=s.height}return t}function Kt(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Nt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Mt(r);){var a=t.find(0,!0);n-=r.text.length-a.from.ch,n+=(r=a.to.line).text.length-a.to.ch}return n}function Vt(e){var t=e.display,n=e.doc;t.maxLine=We(n,n.first),t.maxLineLength=Kt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Kt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Wt=function(e,t,n){this.text=e,At(this,t),this.height=n?n(this):1};function qt(e){e.parent=null,Ct(e)}Wt.prototype.lineNo=function(){return $e(this)},ye(Wt);var Xt={},Yt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:Xt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var n=L("span",null,null,l?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Zt,Ae(e.display.measure)&&(o=ce(a,e.doc.direction))&&(r.addToken=en(r.addToken,o)),r.map=[],nn(a,r,ft(e,a,t!=e.display.externalMeasured&&$e(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=N(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=N(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ce(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return pe(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||"")),r}function Qt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,i,a,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var a=e.charAt(i);" "!=a||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(a=" "),r+=a,n=" "==a}return r}(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var h=0;;){d.lastIndex=h;var p=d.exec(t),m=p?p.index-h:t.length-h;if(m){var v=document.createTextNode(u.slice(h,h+m));o&&s<9?c.appendChild(A("span",[v])):c.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!p)break;h+=m+1;var g=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(g=c.appendChild(A("span",q(b),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((g=c.appendChild(A("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),o&&s<9?c.appendChild(A("span",[g])):c.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),o&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||f||a||l){var _=n||"";r&&(_+=r),i&&(_+=i);var E=A("span",[c],_,a);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&E.setAttribute(x,l[x]);return e.content.appendChild(E)}e.content.appendChild(c)}}function en(e,t){return function(n,r,i,a,o,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,r,i,a,o,s,l);e(n,r.slice(0,d.to-c),i,a,null,s,l),a=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(r)for(var o,s,l,c,u,d,f,h=i.length,p=0,m=1,v="",g=0;;){if(g==p){l=c=u=s="",f=null,d=null,g=1/0;for(var y=[],b=void 0,_=0;_<r.length;++_){var E=r[_],x=E.marker;if("bookmark"==x.type&&E.from==p&&x.widgetNode)y.push(x);else if(E.from<=p&&(null==E.to||E.to>p||x.collapsed&&E.to==p&&E.from==p)){if(null!=E.to&&E.to!=p&&g>E.to&&(g=E.to,c=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&E.from==p&&(u+=" "+x.startStyle),x.endStyle&&E.to==g&&(b||(b=[])).push(x.endStyle,E.to),x.title&&((f||(f={})).title=x.title),x.attributes)for(var S in x.attributes)(f||(f={}))[S]=x.attributes[S];x.collapsed&&(!d||It(d.marker,x)<0)&&(d=E)}else E.from>p&&g>E.from&&(g=E.from)}if(b)for(var w=0;w<b.length;w+=2)b[w+1]==g&&(c+=" "+b[w]);if(!d||d.from==p)for(var k=0;k<y.length;++k)tn(t,0,y[k]);if(d&&(d.from||0)==p){if(tn(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=h)break;for(var T=Math.min(h,g);;){if(v){var O=p+v.length;if(!d){var C=O>T?v.slice(0,T-p):v;t.addToken(t,C,o?o+l:l,u,p+C.length==g?c:"",s,f)}if(O>=T){v=v.slice(T-p),p=T;break}p=O,u=""}v=i.slice(a,a=n[m++]),o=$t(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,i.slice(a,a=n[A]),$t(n[A+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Mt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?$e(X(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Gt(e,t)}function an(e,t,n){for(var r,i=[],a=t;a<n;a=r){var o=new rn(e.doc,We(e.doc,a),a);r=a+o.size,i.push(o)}return i}var on=null,sn=null;function ln(e,t){var n=fe(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);on?r=on.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var a=function(e){r.push((function(){return n[e].apply(null,i)}))},o=0;o<n.length;++o)a(o)}}function cn(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];"text"==a?hn(e,t):"gutter"==a?mn(e,t,n,r):"class"==a?pn(e,t):"widget"==a&&vn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function fn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Jt(e,t)}function hn(e,t){var n=t.text.className,r=fn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,pn(e,t)):n&&(t.text.className=n)}function pn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=dn(t);t.background=r.insertBefore(A("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function mn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=dn(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=dn(t),s=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(A("div",Ze(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=a.hasOwnProperty(c)&&a[c];u&&s.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function vn(e,t,n){t.alignable&&(t.alignable=null);for(var r=w("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);yn(e,t,n)}function gn(e,t,n,r){var i=fn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pn(e,t),mn(e,t,n,r),yn(e,t,r),t.node}function yn(e,t,n){if(bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)bn(e,t.rest[r],t,n,!1)}function bn(e,t,n,r,i){if(t.widgets)for(var a=dn(n),o=0,s=t.widgets;o<s.length;++o){var l=s[o],c=A("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),_n(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?a.insertBefore(c,n.gutter||n.text):a.appendChild(c),ln(l,"redraw")}}function _n(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function En(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),C(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function xn(e,t){for(var n=Se(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Sn(e){return e.lineSpace.offsetTop}function wn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function kn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=C(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Tn(e){return 50-e.display.nativeBarWidth}function On(e){return e.display.scroller.clientWidth-Tn(e)-e.display.barWidth}function Cn(e){return e.display.scroller.clientHeight-Tn(e)-e.display.barHeight}function An(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if($e(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Ln(e,t,n,r){return Rn(e,In(e,t),n,r)}function Dn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function In(e,t){var n=$e(t),r=Dn(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,ar(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=$e(t=Ft(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var i=r.built=Jt(e,r);return r.text=i.pre,C(e.display.lineMeasure,i.pre),r}(e,t));var i=An(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Rn(e,t,n,r,i){t.before&&(n=-1);var a,l=n+(r||"");return t.cache.hasOwnProperty(l)?a=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&On(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var l=o[s],c=o[s+1];Math.abs(l.bottom-c.bottom)>2&&a.push((l.bottom+c.top)/2-n.top)}}a.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(a=function(e,t,n,r){var i,a=Pn(t.map,n,r),l=a.node,c=a.start,u=a.end,d=a.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&re(t.line.text.charAt(a.coverStart+c));)--c;for(;a.coverStart+u<a.coverEnd&&re(t.line.text.charAt(a.coverStart+u));)++u;if((i=o&&s<9&&0==c&&u==a.coverEnd-a.coverStart?l.parentNode.getBoundingClientRect():jn(k(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}o&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ne)return Ne;var t=C(e,A("span","x")),n=t.getBoundingClientRect(),r=k(t,0,1).getBoundingClientRect();return Ne=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var h;c>0&&(d=r="right"),i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(o&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+ir(e.display),top:p.top,bottom:p.bottom}:Mn}for(var m=i.top-t.rect.top,v=i.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(g<y[b]);b++);var _=b?y[b-1]:0,E=y[b],x={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:_,bottom:E};return i.left||i.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=m,x.rbottom=v),x}(e,t,n,r)).bogus||(t.cache[l]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var Nn,Mn={left:0,right:0,top:0,bottom:0};function Pn(e,t,n){for(var r,i,a,o,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,a=1,o="left"):t<l?a=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(a=l-s)-1,t>=l&&(o="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],o="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],o="right";break}return{node:r,start:i,end:a,collapse:o,coverStart:s,coverEnd:l}}function jn(e,t){var n=Mn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Fn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Un(e){e.display.externalMeasure=null,O(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Fn(e.display.view[t])}function Bn(e){Un(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Gn(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function zn(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Hn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=En(e.widgets[n]));return t}function Kn(e,t,n,r,i){if(!i){var a=Hn(t);n.top+=a,n.bottom+=a}if("line"==r)return n;r||(r="local");var o=Ht(t);if("local"==r?o+=Sn(e.display):o-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+("window"==r?0:zn());var l=s.left+("window"==r?0:Gn());n.left+=l,n.right+=l}return n.top+=o,n.bottom+=o,n}function Vn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Gn(),i-=zn();else if("local"==n||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function Wn(e,t,n,r,i){return r||(r=We(e.doc,t.line)),Kn(e,r,Ln(e,r,t.ch,i),n)}function qn(e,t,n,r,i,a){function o(t,o){var s=Rn(e,i,t,o?"right":"left",a);return o?s.left=s.right:s.right=s.left,Kn(e,r,s,n)}r=r||We(e.doc,t.line),i||(i=In(e,r));var s=ce(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return o("before"==c?l-1:l,"before"==c);function u(e,t,n){return o(n?e-1:e,1==s[t].level!=n)}var d=se(s,l,c),f=oe,h=u(l,d,"before"==c);return null!=f&&(h.other=u(l,f,"before"!=c)),h}function Xn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=ir(e.display)*t.ch);var r=We(e.doc,t.line),i=Ht(r)+Sn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Yn(e,t,n,r,i){var a=et(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function $n(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var i=Je(r,n),a=r.first+r.size-1;if(i>a)return Yn(r.first+r.size-1,We(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=We(r,i);;){var s=er(e,o,i,t,n),l=Pt(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;o=We(r,i=c.line)}}function Jn(e,t,n,r){r-=Hn(t);var i=t.text.length,a=ae((function(t){return Rn(e,n,t-1).bottom<=r}),i,0);return{begin:a,end:i=ae((function(t){return Rn(e,n,t).top>r}),a,i)}}function Qn(e,t,n,r){return n||(n=In(e,t)),Jn(e,t,n,Kn(e,t,Rn(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Ht(t);var a=In(e,t),o=Hn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?nr:tr)(e,t,n,a,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,h,p=null,m=null,v=ae((function(t){var n=Rn(e,a,t);return n.top+=o,n.bottom+=o,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),s,l),g=!1;if(m){var y=r-m.left<m.right-r,b=y==c;v=p+(b?0:1),h=b?"after":"before",f=y?m.left:m.right}else{c||v!=l&&v!=s||v++,h=0==v?"after":v==t.text.length?"before":Rn(e,a,v-(c?1:0)).bottom+o<=i==c?"after":"before";var _=qn(e,et(n,v,h),"line",t,a);f=_.left,g=i<_.top?-1:i>=_.bottom?1:0}return Yn(n,v=ie(t.text,v,1),h,g,r-f)}function tr(e,t,n,r,i,a,o){var s=ae((function(s){var l=i[s],c=1!=l.level;return Zn(qn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),a,o,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=qn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Zn(u,a,o,!0)&&u.top>o&&(l=i[s-1])}return l}function nr(e,t,n,r,i,a,o){var s=Jn(e,t,r,o),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=l)){var p=Rn(e,r,1!=h.level?Math.min(c,h.to)-1:Math.max(l,h.from)).right,m=p<a?a-p+1e9:p-a;(!u||d>m)&&(u=h,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nn){Nn=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(A("br"));Nn.appendChild(document.createTextNode("x"))}C(e.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),O(e.measure),n||1}function ir(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");C(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:or(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function or(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ir(e.display)-3);return function(i){if(Gt(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function lr(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&Ye(e,t)}))}function cr(e,t,n,r){var i=e.display;if(!n&&"true"==Se(t).getAttribute("cm-not-content"))return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(e){return null}var l,c=$n(e,a,o);if(r&&c.xRel>0&&(l=We(e.doc,c.line).text).length==c.ch){var u=F(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((a-kn(e.display).left)/ir(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)xt&&Ut(e.doc,t)<i.viewTo&&hr(e);else if(n<=i.viewFrom)xt&&Bt(e.doc,n+r)>i.viewFrom?hr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)hr(e);else if(t<=i.viewFrom){var a=pr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):hr(e)}else if(n>=i.viewTo){var o=pr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):hr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):hr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function fr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[ur(e,t)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==B(o,n)&&o.push(n)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,a=ur(e,t),o=e.display.view;if(!xt||n==e.doc.first+e.doc.size)return{index:a,lineN:n};for(var s=e.display.viewFrom,l=0;l<a;l++)s+=o[l].size;if(s!=t){if(r>0){if(a==o.length-1)return null;i=s+o[a].size-t,a++}else i=s-t;t+=i,n+=i}for(;Ut(e.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function mr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function vr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function gr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=0;o<n.sel.ranges.length;o++)if(t||o!=n.sel.primIndex){var s=n.sel.ranges[o];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&yr(e,s.head,i),l||_r(e,s,a)}}return r}function yr(e,t,n){var r=qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var a=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(e,t){return e.top-t.top||e.left-t.left}function _r(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=kn(e.display),s=o.left,l=Math.max(r.sizerWidth,On(e)-r.sizer.offsetLeft)-o.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var a,o,d=We(i,t),f=d.text.length;function h(n,r){return Wn(e,et(t,n),"div",d,r)}function p(t,n,r){var i=Qn(e,d,null,t),a="ltr"==n==("after"==r)?"left":"right";return h("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),a)[a]}var m=ce(d,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,(function(e,t,i,d){var v="ltr"==i,g=h(e,v?"left":"right"),y=h(t-1,v?"right":"left"),b=null==n&&0==e,_=null==r&&t==f,E=0==d,x=!m||d==m.length-1;if(y.top-g.top<=3){var S=(c?_:b)&&x,w=(c?b:_)&&E?s:(v?g:y).left,k=S?l:(v?y:g).right;u(w,g.top,k-w,g.bottom)}else{var T,O,C,A;v?(T=c&&b&&E?s:g.left,O=c?l:p(e,i,"before"),C=c?s:p(t,i,"after"),A=c&&_&&x?l:y.right):(T=c?p(e,i,"before"):s,O=!c&&b&&E?l:g.right,C=!c&&_&&x?s:y.left,A=c?p(t,i,"after"):l),u(T,g.top,O-T,g.bottom),g.bottom<y.top&&u(s,g.bottom,null,y.top),u(C,y.top,A-C,y.bottom)}(!a||br(g,a)<0)&&(a=g),br(y,a)<0&&(a=y),(!o||br(g,o)<0)&&(o=g),br(y,o)<0&&(o=y)})),{start:a,end:o}}var f=t.from(),h=t.to();if(f.line==h.line)d(f.line,f.ch,h.ch);else{var p=We(i,f.line),m=We(i,h.line),v=Ft(p)==Ft(m),g=d(f.line,f.ch,v?p.text.length+1:null).end,y=d(h.line,v?0:null,h.ch).start;v&&(g.top<y.top-2?(u(g.right,g.top,null,g.bottom),u(s,y.top,y.left,y.bottom)):u(g.right,g.top,y.left-g.right,g.bottom)),g.bottom<y.top&&u(s,g.bottom,null,y.top)}n.appendChild(a)}function Er(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||kr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xr(e){e.state.focused||(e.display.input.focus(),wr(e))}function Sr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,kr(e))}),100)}function wr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(pe(e,"focus",e,t),e.state.focused=!0,R(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()),Er(e))}function kr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(pe(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Tr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],a=e.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(o&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-n,n=u}else{var d=i.node.getBoundingClientRect();l=d.bottom-d.top,!a&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=i.line.height-l;if((f>.005||f<-.005)&&(Ye(i.line,l),Or(i.line),i.rest))for(var h=0;h<i.rest.length;h++)Or(i.rest[h]);if(c>e.display.sizerWidth){var p=Math.ceil(c/ir(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Or(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Cr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Sn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,a=Je(t,r),o=Je(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<a?(a=s,o=Je(t,Ht(We(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(a=Je(t,Ht(We(t,l))-e.wrapper.clientHeight),o=l)}return{from:a,to:Math.max(o,a+1)}}function Ar(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,a=Cn(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+wn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)o.scrollTop=l?0:t.top;else if(t.bottom>i+a){var u=Math.min(t.top,(c?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,h=On(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?o.scrollLeft=0:t.left<f?o.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>h+f-3&&(o.scrollLeft=t.right+(p?0:10)-h),o}function Lr(e,t){null!=t&&(Rr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dr(e){Rr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ir(e,t,n){null==t&&null==n||Rr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Rr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Nr(e,Xn(e,t.from),Xn(e,t.to),t.margin))}function Nr(e,t,n,r){var i=Ar(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ir(e,i.scrollLeft,i.scrollTop)}function Mr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||li(e,{top:t}),Pr(e,t,!0),n&&li(e),ri(e,100))}function Pr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function jr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ur=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ur.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ur.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ur.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ur.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new U,this.disableVert=new U},Ur.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Ur.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Br=function(){};function Gr(e,t){t||(t=Fr(e));var n=e.display.barWidth,r=e.display.barHeight;zr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Tr(e),zr(e,Fr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var Hr={native:Ur,null:Br};function Kr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Hr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?jr(e,t):Mr(e,t)}),e),e.display.scrollbars.addClass&&R(e.display.wrapper,e.display.scrollbars.addClass)}var Vr=0;function Wr(e){var t;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:++Vr},t=e.curOp,on?on.ops.push(t):t.ownsGroup=on={ops:[t],delayedCallbacks:[]}}function qr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{on=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Xr(t[n]);for(var r=0;r<t.length;r++)Yr(t[r]);for(var i=0;i<t.length;i++)$r(t[i]);for(var a=0;a<t.length;a++)Jr(t[a]);for(var o=0;o<t.length;o++)Qr(t[o])}(e)}))}function Xr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Tn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Tn(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Vt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&oi(e.cm,e.update)}function $r(e){var t=e.cm,n=t.display;e.updatedDisplay&&Tr(t),e.barMeasure=Fr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ln(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-On(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Jr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&jr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==I();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Gr(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&Er(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&xr(e.cm)}function Qr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&si(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Pr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&jr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var a=A("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Sn(e.display))+"px;\n height: "+(t.bottom-t.top+Tn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=qn(e,t),l=n&&n!=t?qn(e,n):s,c=Ar(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Mr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=c.scrollLeft&&(jr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o<i.length;++o)i[o].lines.length||pe(i[o],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&pe(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&pe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Zr(e,t){if(e.curOp)return t();Wr(e);try{return t()}finally{qr(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Wr(e);try{return t.apply(e,arguments)}finally{qr(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Wr(this);try{return e.apply(this,arguments)}finally{qr(this)}}}function ni(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Wr(t);try{return e.apply(this,arguments)}finally{qr(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,P(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ht(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?ze(t.mode,r.state):null,l=dt(e,a,r,!0);s&&(r.state=s),a.styles=l.styles;var c=a.styleClasses,u=l.classes;u?a.styleClasses=u:c&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<o.length;++f)d=o[f]!=a.styles[f];d&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&pt(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ri(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Zr(e,(function(){for(var t=0;t<i.length;t++)fr(e,i[t],"text")}))}}var ai=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Cr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=On(e),this.force=n,this.dims=ar(e),this.events=[]};function oi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return hr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==mr(e))return!1;fi(e)&&(hr(e),t.dims=ar(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),xt&&(a=Ut(e.doc,a),o=Bt(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(an(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,a,o),n.viewOffset=Ht(We(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=mr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=I();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==a){for(;o!=f.node;)o=s(o);var h=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(h=!1),un(e,f,u,n)),h&&(O(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Ze(e.options,u)))),o=f.node.nextSibling}else{var p=gn(e,f,u,n);a.insertBefore(p,o)}u+=f.size}for(;o;)o=s(o)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=I()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),O(n.cursorDiv),O(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ri(e,400)),n.updateLineNumbers=null,!0}function si(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=On(e))r&&(t.visible=Cr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+wn(e.display)-Cn(e),n.top)}),t.visible=Cr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!oi(e,t))break;Tr(e);var i=Fr(e);vr(e),Gr(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var n=new ai(e,t);if(oi(e,n)){Tr(e),si(e,n);var r=Fr(e);vr(e),Gr(e,r),ui(e,r),n.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tn(e)+"px"}function di(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=or(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var s=n[o].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function fi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Ze(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ci(e.display),!0}return!1}function hi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if("string"!=typeof a&&(o=a.style,a=a.className),"CodeMirror-linenumbers"==a){if(!t)continue;r=!0}n.push({className:a,style:o})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function pi(e){var t=e.gutters,n=e.gutterSpecs;O(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,s=t.appendChild(A("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),"CodeMirror-linenumbers"==a&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ci(e)}function mi(e){pi(e.display),dr(e),di(e)}function vi(e,t,r,i){var a=this;this.input=r,a.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),a.scrollbarFiller.setAttribute("cm-not-content","true"),a.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),a.gutterFiller.setAttribute("cm-not-content","true"),a.lineDiv=L("div",null,"CodeMirror-code"),a.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),a.cursorDiv=A("div",null,"CodeMirror-cursors"),a.measure=A("div",null,"CodeMirror-measure"),a.lineMeasure=A("div",null,"CodeMirror-measure"),a.lineSpace=L("div",[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,"position: relative; outline: none");var c=L("div",[a.lineSpace],"CodeMirror-lines");a.mover=A("div",[c],null,"position: relative"),a.sizer=A("div",[a.mover],"CodeMirror-sizer"),a.sizerWidth=null,a.heightForcer=A("div",null,null,"position: absolute; height: 50px; width: 1px;"),a.gutters=A("div",null,"CodeMirror-gutters"),a.lineGutter=null,a.scroller=A("div",[a.sizer,a.heightForcer,a.gutters],"CodeMirror-scroll"),a.scroller.setAttribute("tabIndex","-1"),a.wrapper=A("div",[a.scrollbarFiller,a.gutterFiller,a.scroller],"CodeMirror"),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),l||n&&g||(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=hi(i.gutters,i.lineNumbers),pi(a),r.init(a)}ai.prototype.signal=function(e,t){ge(e,t)&&this.events.push(arguments)},ai.prototype.finish=function(){for(var e=0;e<this.events.length;e++)pe.apply(null,this.events[e])};var gi=0,yi=null;function bi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function _i(e){var t=bi(e);return t.x*=yi,t.y*=yi,t}function Ei(e,t){var r=bi(t),i=r.x,a=r.y,o=e.display,s=o.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||a&&u){if(a&&y&&l)e:for(var f=t.target,h=o.view;f!=s;f=f.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!n&&!d&&null!=yi)return a&&u&&Mr(e,Math.max(0,s.scrollTop+a*yi)),jr(e,Math.max(0,s.scrollLeft+i*yi)),(!a||a&&u)&&be(t),void(o.wheelStartX=null);if(a&&null!=yi){var m=a*yi,v=e.doc.scrollTop,g=v+o.wrapper.clientHeight;m<0?v=Math.max(0,v+m-50):g=Math.min(e.doc.height,g+m+50),li(e,{top:v,bottom:g})}gi<20&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=i,o.wheelDY=a,setTimeout((function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(yi=(yi*gi+n)/(gi+1),++gi)}}),200)):(o.wheelDX+=i,o.wheelDY+=a))}}o?yi=-.53:n?yi=15:u?yi=-.7:f&&(yi=-1/3);var xi=function(e,t){this.ranges=e,this.primIndex=t};xi.prototype.primary=function(){return this.ranges[this.primIndex]},xi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},xi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Si(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new xi(e,this.primIndex)},xi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},xi.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var Si=function(e,t){this.anchor=e,this.head=t};function wi(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=B(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],l=tt(s.to(),o.from());if(r&&!o.empty()?l>0:l>=0){var c=at(s.from(),o.from()),u=it(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Si(d?u:c,d?c:u))}}return new xi(t,n)}function ki(e,t){return new xi([new Si(e,t||e)],0)}function Ti(e){return e.text?et(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Oi(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ti(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ti(t).ch-t.to.ch),et(n,r)}function Ci(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Si(Oi(i.anchor,t),Oi(i.head,t)))}return wi(e.cm,n,e.sel.primIndex)}function Ai(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Li(e){e.doc.mode=Ue(e.options,e.doc.modeOption),Di(e)}function Di(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&dr(e)}function Ii(e,t){return 0==t.from.ch&&0==t.to.ch&&""==X(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ri(e,t,n,r){function i(e){return n?n[e]:null}function a(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ct(e),At(e,n);var i=r?r(e):1;i!=e.height&&Ye(e,i)}(e,n,i,r),ln(e,"change",e,t)}function o(e,t){for(var n=[],a=e;a<t;++a)n.push(new Wt(c[a],i(a),r));return n}var s=t.from,l=t.to,c=t.text,u=We(e,s.line),d=We(e,l.line),f=X(c),h=i(c.length-1),p=l.line-s.line;if(t.full)e.insert(0,o(0,c.length)),e.remove(c.length,e.size-c.length);else if(Ii(e,t)){var m=o(0,c.length-1);a(d,d.text,h),p&&e.remove(s.line,p),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)a(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),h);else{var v=o(1,c.length-1);v.push(new Wt(f+u.text.slice(l.ch),h,r)),a(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,v)}else if(1==c.length)a(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,p);else{a(u,u.text.slice(0,s.ch)+c[0],i(0)),a(d,f+d.text.slice(l.ch),h);var g=o(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,g)}ln(e,"change",e,t)}function Ni(e,t,n){!function e(r,i,a){if(r.linked)for(var o=0;o<r.linked.length;++o){var s=r.linked[o];if(s.doc!=i){var l=a&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function Mi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Li(e),Pi(e),e.options.lineWrapping||Vt(e),e.options.mode=t.modeOption,dr(e)}function Pi(e){("rtl"==e.doc.direction?R:T)(e.display.lineDiv,"CodeMirror-rtl")}function ji(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Fi(e,t){var n={from:rt(t.from),to:Ti(t),text:qe(e,t.from,t.to)};return Hi(e,n,t.from.line,t.to.line+1),Ni(e,(function(e){return Hi(e,n,t.from.line,t.to.line+1)}),!0),n}function Ui(e){for(;e.length&&X(e).ranges;)e.pop()}function Bi(e,t,n,r){var i=e.history;i.undone.length=0;var a,o,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(a=function(e,t){return t?(Ui(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(i,i.lastOp==r)))o=X(a.changes),0==tt(t.from,t.to)&&0==tt(t.from,o.to)?o.to=Ti(t):a.changes.push(Fi(e,t));else{var l=X(i.done);for(l&&l.ranges||zi(e.sel,i.done),a={changes:[Fi(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,o||pe(e,"historyAdded")}function Gi(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,a,X(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ui(i.undone)}function zi(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Hi(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=n.markedSpans),++a}))}function Ki(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Vi(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Ki(n[i]));return r}(e,t),r=Tt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)e:for(var s=0;s<o.length;++s){for(var l=o[s],c=0;c<a.length;++c)if(a[c].marker==l.marker)continue e;a.push(l)}else o&&(n[i]=o)}return n}function Wi(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges)r.push(n?xi.prototype.deepCopy.call(a):a);else{var o=a.changes,s=[];r.push({changes:s});for(var l=0;l<o.length;++l){var c=o[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&B(t,Number(u[1]))>-1&&(X(s)[d]=c[d],delete c[d])}}}return r}function qi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=tt(t,i)<0;a!=tt(n,i)<0?(i=t,t=n):a!=tt(t,n)<0&&(t=n)}return new Si(i,t)}return new Si(n||t,t)}function Xi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Zi(e,new xi([qi(e.sel.primary(),t,n,i)],0),r)}function Yi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=qi(e.sel.ranges[a],t[a],null,i);Zi(e,wi(e.cm,r,e.sel.primIndex),n)}function $i(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Zi(e,wi(e.cm,i,e.sel.primIndex),r)}function Ji(e,t,n,r){Zi(e,ki(t,n),r)}function Qi(e,t,n){var r=e.history.done,i=X(r);i&&i.ranges?(r[r.length-1]=t,ea(e,t,n)):Zi(e,t,n)}function Zi(e,t,n){ea(e,t,n),Gi(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ea(e,t,n){(ge(e,"beforeSelectionChange")||e.cm&&ge(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Si(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return pe(e,"beforeSelectionChange",e,r),e.cm&&pe(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?wi(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);ta(e,ra(e,t,r,!0)),n&&!1===n.scroll||!e.cm||Dr(e.cm)}function ta(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ve(e.cm)),ln(e,"cursorActivity",e))}function na(e){ta(e,ra(e,e.sel,null,!1))}function ra(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],l=aa(e,o.anchor,s&&s.anchor,n,r),c=aa(e,o.head,s&&s.head,n,r);(i||l!=o.anchor||c!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new Si(l,c))}return i?wi(e.cm,i,t.primIndex):t}function ia(e,t,n,r,i){var a=We(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(pe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=oa(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(f=tt(d,n))&&(r<0?f<0:f>0))return ia(e,d,t,r,i)}var h=l.find(r<0?-1:1);return(r<0?c:u)&&(h=oa(e,h,r,h.line==t.line?a:null)),h?ia(e,h,t,r,i):null}}return t}function aa(e,t,n,r,i){var a=r||1,o=ia(e,t,n,a,i)||!i&&ia(e,t,n,a,!0)||ia(e,t,n,-a,i)||!i&&ia(e,t,n,-a,!0);return o||(e.cantEdit=!0,et(e.first,0))}function oa(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||We(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function sa(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),z)}function la(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,a){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),i&&(r.text=i),void 0!==a&&(r.origin=a)}),pe(e,"beforeChange",e,r),e.cm&&pe(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ca(e,t,n){if(e.cm){if(!e.cm.curOp)return ei(e.cm,ca)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"))||(t=la(e,t,!0))){var r=Et&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=B(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],s=o.find(0),l=0;l<i.length;++l){var c=i[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],d=tt(c.from,s.from),f=tt(c.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ua(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else ua(e,t)}}function ua(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Ci(e,t);Bi(e,t,n,e.cm?e.cm.curOp.id:NaN),ha(e,t,n,Tt(e,t));var r=[];Ni(e,(function(e,n){n||-1!=B(r,e.history)||(ga(e.history,t),r.push(e.history)),ha(e,t,null,Tt(e,t))}))}}function da(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,a=e.history,o=e.sel,s="undo"==t?a.done:a.undone,l="undo"==t?a.undone:a.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(a.lastOrigin=a.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(zi(i,l),n&&!i.equals(e.sel))return void Zi(e,i,{clearRedo:!1});o=i}var u=[];zi(o,l),l.push({changes:u,generation:a.generation}),a.generation=i.generation||++a.maxGeneration;for(var d=ge(e,"beforeChange")||e.cm&&ge(e.cm,"beforeChange"),f=function(n){var r=i.changes[n];if(r.origin=t,d&&!la(e,r,!1))return s.length=0,{};u.push(Fi(e,r));var a=n?Ci(e,r):X(s);ha(e,r,a,Vi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Ti(r)});var o=[];Ni(e,(function(e,t){t||-1!=B(o,e.history)||(ga(e.history,r),o.push(e.history)),ha(e,r,null,Vi(e,r))}))},h=i.changes.length-1;h>=0;--h){var p=f(h);if(p)return p.v}}}}function fa(e,t){if(0!=t&&(e.first+=t,e.sel=new xi(Y(e.sel.ranges,(function(e){return new Si(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)fr(e.cm,r,"gutter")}}function ha(e,t,n,r){if(e.cm&&!e.cm.curOp)return ei(e.cm,ha)(e,t,n,r);if(t.to.line<e.first)fa(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);fa(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[X(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:et(a,We(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=qe(e,t.from,t.to),n||(n=Ci(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=$e(Ft(We(r,a.line))),r.iter(l,o.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ve(e),Ri(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,(function(e){var t=Kt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=We(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,a.line),ri(e,400);var c=t.text.length-(o.line-a.line)-1;t.full?dr(e):a.line!=o.line||1!=t.text.length||Ii(e.doc,t)?dr(e,a.line,o.line+1,c):fr(e,a.line,"text");var u=ge(e,"changes"),d=ge(e,"change");if(d||u){var f={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&ln(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,r):Ri(e,t,r),ea(e,n,z),e.cantEdit&&aa(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function pa(e,t,n,r,i){var a;r||(r=n),tt(r,n)<0&&(n=(a=[r,n])[0],r=a[1]),"string"==typeof t&&(t=e.splitLines(t)),ca(e,{from:n,to:r,text:t,origin:i})}function ma(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function va(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||((a=e[i]=a.deepCopy()).copied=!0);for(var s=0;s<a.ranges.length;s++)ma(a.ranges[s].anchor,t,n,r),ma(a.ranges[s].head,t,n,r)}else{for(var l=0;l<a.changes.length;++l){var c=a.changes[l];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}}function ga(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;va(e.done,n,r,i),va(e.undone,n,r,i)}function ya(e,t,n,r){var i=t,a=t;return"number"==typeof t?a=We(e,ot(e,t)):i=$e(t),null==i?null:(r(a,i)&&e.cm&&fr(e.cm,i,n),a)}function ba(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function _a(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Si.prototype.from=function(){return at(this.anchor,this.head)},Si.prototype.to=function(){return it(this.anchor,this.head)},Si.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ba.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,qt(i),ln(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},_a.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),0==(t-=a))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ba))){var s=[];this.collapse(s),this.children=[new ba(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var l=new ba(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new _a(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=B(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new _a(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if(0==(t-=o))break;e=0}else e-=a}}};var Ea=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function xa(e,t,n){Ht(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Lr(e,n)}Ea.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=$e(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=En(this);Ye(n,Math.max(0,n.height-a)),e&&(Zr(e,(function(){xa(e,n,-a),fr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},Ea.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=En(this)-t;i&&(Gt(this.doc,r)||Ye(r,r.height+i),n&&Zr(n,(function(){n.curOp.forceUpdate=!0,xa(n,r,i),ln(n,"lineWidgetChanged",n,e,$e(r))})))},ye(Ea);var Sa=0,wa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Sa};function ka(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=j(r)).shared=!1;var a=[ka(e,t,n,r,i)],o=a[0],s=r.widgetNode;return Ni(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(ka(e,st(e,t),st(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;o=X(a)})),new Ta(a,o)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,ka)(e,t,n,r,i);var a=new wa(e,i),o=tt(t,n);if(r&&j(r,a,!1),o>0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=L("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(jt(e,t.line,t,n,a)||t.line!=n.line&&jt(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");xt=!0}a.addToHistory&&Bi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&a.collapsed&&!c.options.lineWrapping&&Ft(e)==c.display.maxLine&&(s=!0),a.collapsed&&l!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new St(a,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),a.collapsed&&e.iter(t.line,n.line+1,(function(t){Gt(e,t)&&Ye(t,0)})),a.clearOnEnter&&de(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Et=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Sa,a.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),a.collapsed)dr(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)fr(c,u,"text");a.atomic&&na(c.doc),ln(c,"markerAdded",c,a)}return a}wa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Wr(e),ge(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=wt(o.markedSpans,this);e&&!this.collapsed?fr(e,$e(o),"text"):e&&(null!=s.to&&(i=$e(o)),null!=s.from&&(r=$e(o))),o.markedSpans=kt(o.markedSpans,s),null==s.from&&this.collapsed&&!Gt(this.doc,o)&&e&&Ye(o,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Ft(this.lines[l]),u=Kt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&na(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&qr(e),this.parent&&this.parent.clear()}},wa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var a=this.lines[i],o=wt(a.markedSpans,this);if(null!=o.from&&(n=et(t?a:$e(a),o.from),-1==e))return n;if(null!=o.to&&(r=et(t?a:$e(a),o.to),1==e))return r}return n&&{from:n,to:r}},wa.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Zr(r,(function(){var i=t.line,a=$e(t.line),o=Dn(r,a);if(o&&(Fn(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Gt(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=En(n)-s;l&&Ye(i,i.height+l)}ln(r,"markerChanged",r,e)}))},wa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wa.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(wa);var Ta=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Oa(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Ca(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Ni(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var a=n.markers[i];-1==B(r,a.doc)&&(a.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Ta.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ln(this,"clear")}},Ta.prototype.find=function(e,t){return this.primary.find(e,t)},ye(Ta);var Aa=0,La=function(e,t,n,r,i){if(!(this instanceof La))return new La(e,t,n,r,i);null==n&&(n=0),_a.call(this,[new ba([new Wt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=et(n,0);this.sel=ki(a),this.history=new ji(null),this.id=++Aa,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ri(this,{from:a,to:a,text:e}),Zi(this,ki(a),z)};La.prototype=J(_a.prototype,{constructor:La,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Xe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ni((function(e){var t=et(this.first,0),n=this.first+this.size-1;ca(this,{from:t,to:et(n,We(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ir(this.cm,0,0),Zi(this,ki(t),z)})),replaceRange:function(e,t,n,r){pa(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=qe(this,st(this,e),st(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Qe(this,e))return We(this,e)},getLineNumber:function(e){return $e(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=We(this,e)),Ft(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ni((function(e,t,n){Ji(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:ni((function(e,t,n){Ji(this,st(this,e),st(this,t||e),n)})),extendSelection:ni((function(e,t,n){Xi(this,st(this,e),t&&st(this,t),n)})),extendSelections:ni((function(e,t){Yi(this,lt(this,e),t)})),extendSelectionsBy:ni((function(e,t){Yi(this,lt(this,Y(this.sel.ranges,e)),t)})),setSelections:ni((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Si(st(this,e[i].anchor),st(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Zi(this,wi(this.cm,r,t),n)}})),addSelection:ni((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Si(st(this,e),st(this,t||e))),Zi(this,wi(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=qe(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ni((function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=et(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],l=Ai(s.from,i,a),c=Ai(Ti(s),i,a);if(i=s.to,a=c,"around"==n){var u=e.sel.ranges[o],d=tt(u.head,u.anchor)<0;r[o]=new Si(d?c:l,d?l:c)}else r[o]=new Si(l,l)}return new xi(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)ca(this,r[l]);s?Qi(this,s):this.cm&&Dr(this.cm)})),undo:ni((function(){da(this,"undo")})),redo:ni((function(){da(this,"redo")})),undoSelection:ni((function(){da(this,"undo",!0)})),redoSelection:ni((function(){da(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new ji(this.history.maxGeneration),Ni(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Wi(this.history.done),undone:Wi(this.history.undone)}},setHistory:function(e){var t=this.history=new ji(this.history.maxGeneration);t.done=Wi(e.done.slice(0),null,!0),t.undone=Wi(e.undone.slice(0),null,!0)},setGutterMarker:ni((function(e,t,n){return ya(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ni((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ya(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Qe(this,e))return null;if(t=e,!(e=We(this,e)))return null}else if(null==(t=$e(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ni((function(e,t,n){return ya(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(w(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ni((function(e,t,n){return ya(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var a=i.match(w(n));if(!a)return!1;var o=a.index+a[0].length;e[r]=i.slice(0,a.index)+(a.index&&o!=i.length?" ":"")+i.slice(o)||null}return!0}))})),addLineWidget:ni((function(e,t,n){return function(e,t,n,r){var i=new Ea(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),ya(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,a&&!Gt(e,t)){var r=Ht(t)<e.scrollTop;Ye(t,t.height+En(i)),r&&Lr(a,i.height),a.curOp.forceUpdate=!0}return!0})),a&&ln(a,"lineWidgetAdded",a,i,"number"==typeof t?t:$e(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ka(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ka(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=We(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var l=o[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new La(Xe(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new La(Xe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(tt(a,o)){var s=ka(e,a,o,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,Oa(this)),r},unlinkDoc:function(e){if(e instanceof Oo&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ca(Oa(this));break}if(e.history==this.history){var n=[e.id];Ni(e,(function(e){return n.push(e.id)}),!0),e.history=new ji(null),e.history.done=Wi(this.history.done,n),e.history.undone=Wi(this.history.undone,n)}},iterLinkedDocs:function(e){Ni(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):De(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ni((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Zr(t=this.cm,(function(){Pi(t),dr(t)})))}))}),La.prototype.eachLine=La.prototype.iter;var Da=0;function Ia(e){var t=this;if(Ra(t),!me(t,e)&&!xn(t.display,e)){be(e),o&&(Da=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,l=function(){++s==i&&ei(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(a.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ca(t.doc,e),Qi(t.doc,ki(st(t.doc,n),st(t.doc,Ti(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==B(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(a[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),ea(t.doc,ki(n,n)),f)for(var h=0;h<f.length;++h)pa(t.doc,"",f[h].anchor,f[h].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ra(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Na(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Ma=!1;function Pa(){var e;Ma||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Na(ja)}),100))})),de(window,"blur",(function(){return Na(kr)})),Ma=!0)}function ja(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Fa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ua=0;Ua<10;Ua++)Fa[Ua+48]=Fa[Ua+96]=String(Ua);for(var Ba=65;Ba<=90;Ba++)Fa[Ba]=String.fromCharCode(Ba);for(var Ga=1;Ga<=12;Ga++)Fa[Ga+111]=Fa[Ga+63235]="F"+Ga;var za={};function Ha(e){var t,n,r,i,a=e.split(/-(?!$)/);e=a[a.length-1];for(var o=0;o<a.length-1;o++){var s=a[o];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Ka(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Y(n.split(" "),Ha),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=r):(s=i.slice(0,a+1).join(" "),o="...");var l=t[s];if(l){if(l!=o)throw new Error("Inconsistent bindings for "+s)}else t[s]=o}delete e[n]}for(var c in t)e[c]=t[c];return e}function Va(e,t,n,r){var i=(t=Ya(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Va(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=Va(e,t.fallthrough[a],n,r);if(o)return o}}}function Wa(e){var t="string"==typeof e?e:Fa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function qa(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(x?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(x?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Xa(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Fa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),qa(n,e,t))}function Ya(e){return"string"==typeof e?za[e]:e}function $a(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&tt(a.from,X(r).to)<=0;){var o=r.pop();if(tt(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}Zr(e,(function(){for(var t=r.length-1;t>=0;t--)pa(e.doc,"",r[t].from,r[t].to,"+delete");Dr(e)}))}function Ja(e,t,n){var r=ie(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Qa(e,t,n){var r=Ja(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Za(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var a=ce(n,t.doc.direction);if(a){var o,s=i<0?X(a):a[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=In(t,n);o=i<0?n.text.length-1:0;var u=Rn(t,c,o).top;o=ae((function(e){return Rn(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==l&&(o=Ja(n,o,1))}else o=i<0?s.to:s.from;return new et(r,o,l)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}za.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},za.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},za.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},za.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},za.default=y?za.macDefault:za.pcDefault;var eo={selectAll:sa,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return $a(e,(function(t){if(t.empty()){var n=We(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return $a(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return $a(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return $a(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return $a(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return to(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return no(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=We(e.doc,t),r=function(e){for(var t;t=Mt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=$e(r)),Za(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),K)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),K)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?no(e,t.head):r}),K)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=F(e.getLine(a.line),a.ch,r);t.push(q(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=We(e.doc,i.line).text;if(a)if(i.ch==a.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=We(e.doc,i.line-1).text;o&&(i=new et(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),et(i.line-1,o.length-1),i,"+transpose"))}n.push(new Si(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Dr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function to(e,t){var n=We(e.doc,t),r=Ft(n);return r!=n&&(t=$e(r)),Za(!0,e,r,t,1)}function no(e,t){var n=to(e,t.line),r=We(e.doc,n.line),i=ce(r,e.doc.direction);if(!i||0==i[0].level){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return et(n.line,o?0:a,n.sticky)}return n}function ro(e,t,n){if("string"==typeof t&&!(t=eo[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=G}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var io=new U;function ao(e,t,n,r){var i=e.state.keySeq;if(i){if(Wa(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:io.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),oo(e,i+" "+t,n,r))return!0}return oo(e,t,n,r)}function oo(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Va(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Va(t,e.options.extraKeys,n,e)||Va(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&ln(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(be(n),Er(e)),!!i}function so(e,t){var n=Xa(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ao(e,"Shift-"+n,t,(function(t){return ro(e,t,!0)}))||ao(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ro(e,t)})):ao(e,n,t,(function(t){return ro(e,t)})))}var lo=null;function co(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=I(),me(t,e)))){o&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=so(t,e);d&&(lo=i?r:null,i||88!=r||Re||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),he(document,"keyup",n),he(document,"mouseover",n))}R(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n)}(t)}}function uo(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function fo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||xn(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==lo)return lo=null,void be(e);if(!d||e.which&&!(e.which<10)||!so(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return ao(e,"'"+n+"'",t,(function(t){return ro(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var ho,po,mo=function(e,t,n){this.time=e,this.pos=t,this.button=n};function vo(e){var t=this,n=t.display;if(!(me(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,xn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!bo(t,e)){var r=cr(t,e),i=we(e),a=r?function(e,t){var n=+new Date;return po&&po.compare(n,e,t)?(ho=po=null,"triple"):ho&&ho.compare(n,e,t)?(po=new mo(n,e,t),ho=null,"double"):(ho=new mo(n,e,t),po=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var a="Click";return"double"==r?a="Double"+a:"triple"==r&&(a="Triple"+a),ao(e,qa(a=(1==t?"Left":2==t?"Middle":"Right")+a,i),i,(function(t){if("string"==typeof t&&(t=eo[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=G}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,a,e)||(1==i?r?function(e,t,n,r){o?setTimeout(P(xr,e),0):e.curOp.focus=I();var i,a=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var a=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Oe&&!e.isReadOnly()&&"single"==n&&(i=c.contains(t))>-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,a=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",d),he(i.scroller,"drop",c),a||(be(t),r.addNew||Xi(e.doc,n,null,null,r.extend),l&&!f||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){a=a||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",u),de(i.scroller,"dragstart",d),de(i.scroller,"drop",c),Sr(e),setTimeout((function(){return i.input.focus()}),20)}(e,r,t,a):function(e,t,n,r){var i=e.display,a=e.doc;be(t);var o,s,l=a.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?c[s]:new Si(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new Si(n,n)),n=cr(e,t,!0,!0),s=-1;else{var u=go(e,n,r.unit);o=r.extend?qi(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Zi(a,wi(e,c.concat([o]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Zi(a,wi(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):$i(a,s,o,H):(s=0,Zi(a,new xi([o],0),H),l=a.sel);var d=n;function f(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=F(We(a,n.line).text,n.ch,c),f=F(We(a,t.line).text,t.ch,c),h=Math.min(u,f),p=Math.max(u,f),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=We(a,m).text,y=V(g,h,c);h==p?i.push(new Si(et(m,y),et(m,y))):g.length>y&&i.push(new Si(et(m,y),et(m,V(g,p,c))))}i.length||i.push(new Si(n,n)),Zi(a,wi(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,_=o,E=go(e,t,r.unit),x=_.anchor;tt(E.anchor,x)>0?(b=E.head,x=at(_.from(),E.anchor)):(b=E.anchor,x=it(_.to(),E.head));var S=l.ranges.slice(0);S[s]=function(e,t){var n=t.anchor,r=t.head,i=We(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var a=ce(i);if(!a)return t;var o=se(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==a.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(a,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=a[c+(l?-1:0)],h=l==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new Si(new et(n.line,p,m),r)}(e,new Si(st(a,x),b)),Zi(a,wi(e,S,s),H)}}var h=i.wrapper.getBoundingClientRect(),p=0;function m(t){e.state.selectingText=!1,p=1/0,t&&(be(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",v),he(i.wrapper.ownerDocument,"mouseup",g),a.history.lastSelOrigin=null}var v=ei(e,(function(t){0!==t.buttons&&we(t)?function t(n){var o=++p,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,d)){e.curOp.focus=I(),f(s);var l=Cr(i,a);(s.line>=l.to||s.line<l.from)&&setTimeout(ei(e,(function(){p==o&&t(n)})),150)}else{var c=n.clientY<h.top?-20:n.clientY>h.bottom?20:0;c&&setTimeout(ei(e,(function(){p==o&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):m(t)})),g=ei(e,m);e.state.selectingText=g,de(i.wrapper.ownerDocument,"mousemove",v),de(i.wrapper.ownerDocument,"mouseup",g)}(e,r,t,a)}(t,r,a,e):Se(e)==n.scroller&&be(e):2==i?(r&&Xi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Sr(t)))}}function go(e,t,n){if("char"==n)return new Si(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Si(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Si(r.from,r.to)}function yo(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!ge(e,n))return Ee(t);a-=s.top-o.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=o.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return pe(e,n,e,Je(e.doc,a),e.display.gutterSpecs[l].className,t),Ee(t)}}function bo(e,t){return yo(e,t,"gutterClick",!0)}function _o(e,t){xn(e.display,t)||function(e,t){return!!ge(e,"gutterContextMenu")&&yo(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function Eo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Bn(e)}mo.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var xo={toString:function(){return"CodeMirror.Init"}},So={},wo={};function ko(e,t,n){if(!t!=!(n&&n!=xo)){var r=e.display.dragFunctions,i=t?de:he;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function To(e){e.options.lineWrapping?(R(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Vt(e)),lr(e),dr(e),Bn(e),setTimeout((function(){return Gr(e)}),100)}function Oo(e,t){var n=this;if(!(this instanceof Oo))return new Oo(e,t);this.options=t=t?j(t):{},j(So,t,!1);var r=t.value;"string"==typeof r?r=new La(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Oo.inputStyles[t.inputStyle](this),a=this.display=new vi(e,r,i,t);for(var c in a.wrapper.CodeMirror=this,Eo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Kr(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 U,keySeq:null,specialChars:null},t.autofocus&&!g&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,vo)),de(t.scroller,"dblclick",o&&s<11?ei(e,(function(t){if(!me(e,t)){var n=cr(e,t);if(n&&!bo(e,t)&&!xn(e.display,t)){be(t);var r=e.findWordAt(n);Xi(e.doc,r.anchor,r.head)}}})):function(t){return me(e,t)||be(t)}),de(t.scroller,"contextmenu",(function(t){return _o(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||_o(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!bo(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||a(r,r.prev)?new Si(s,s):!r.prev.prev||a(r,r.prev.prev)?e.findWordAt(s):new Si(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Mr(e,t.scroller.scrollTop),jr(e,t.scroller.scrollLeft,!0),pe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return Ei(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return Ei(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||xe(t)},over:function(t){me(e,t)||(function(e,t){var n=cr(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),C(e.display.dragCursor,r)}}(e,t),xe(t))},start:function(t){return function(e,t){if(o&&(!e.state.draggingText||+new Date-Da<100))xe(t);else if(!me(e,t)&&!xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:ei(e,Ia),leave:function(t){me(e,t)||Ra(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return uo.call(e,t)})),de(l,"keydown",ei(e,co)),de(l,"keypress",ei(e,fo)),de(l,"focus",(function(t){return wr(e,t)})),de(l,"blur",(function(t){return kr(e,t)}))}(this),Pa(),Wr(this),this.curOp.forceUpdate=!0,Mi(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&wr(n)}),20):kr(this),wo)wo.hasOwnProperty(c)&&wo[c](this,t[c],xo);fi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Co.length;++u)Co[u](this);qr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}Oo.defaults=So,Oo.optionHandlers=wo;var Co=[];function Ao(e,t,n,r){var i,a=e.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=ht(e,t).state:n="prev");var o=e.options.tabSize,s=We(a,t),l=F(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=a.mode.indent(i,s.text.slice(u.length),s.text))==G||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>a.first?F(We(a,t-1).text,null,o):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/o);h;--h)f+=o,d+="\t";if(f<c&&(d+=q(c-f)),d!=u)return pa(a,d,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<a.sel.ranges.length;p++){var m=a.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var v=et(t,u.length);$i(a,p,new Si(v,v));break}}}Oo.defineInitHook=function(e){return Co.push(e)};var Lo=null;function Do(e){Lo=e}function Io(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var o=+new Date-200,s="paste"==i||e.state.pasteIncoming>o,l=De(t),c=null;if(s&&r.ranges.length>1)if(Lo&&Lo.text.join("\n")==t){if(r.ranges.length%Lo.text.length==0){c=[];for(var u=0;u<Lo.text.length;u++)c.push(a.splitLines(Lo.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Y(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var h=r.ranges[f],p=h.from(),m=h.to();h.empty()&&(n&&n>0?p=et(p.line,p.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(We(a,m.line).text.length,m.ch+X(l).length)):s&&Lo&&Lo.lineWise&&Lo.text.join("\n")==l.join("\n")&&(p=m=et(p.line,0)));var v={from:p,to:m,text:c?c[f%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};ca(e.doc,v),ln(e,"inputRead",e,v)}t&&!s&&No(e,t),Dr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ro(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Io(t,n,0,null,"paste")})),!0}function No(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=Ao(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(We(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Ao(e,i.head.line,"smart"));o&&ln(e,"electricInput",e,i.head.line)}}}function Mo(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:et(i,0),head:et(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Po(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function jo(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Po(e),t}function Fo(e,t,n,r,i){var a=t,o=n,s=We(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(a){var o,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));o=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?function(e,t,n,r){var i=ce(t,e.doc.direction);if(!i)return Qa(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=se(i,n.ch,n.sticky),o=i[a];if("ltr"==e.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return Qa(t,n,r);var s,l=function(e,n){return Ja(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||In(e,t),Qn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==o.level){var d=1==o.level==r<0,f=l(n,d?1:-1);if(null!=f&&(d?f<=o.to&&f<=u.end:f>=o.from&&f>=u.begin)){var h=d?"before":"after";return new et(n.line,f,h)}}var p=function(e,t,r){for(var a=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<i.length;e+=t){var o=i[e],s=t>0==(1!=o.level),c=s?r.begin:l(r.end,-1);if(o.from<=c&&c<o.to)return a(c,s);if(c=s?o.from:l(o.to,-1),r.begin<=c&&c<r.end)return a(c,s)}},m=p(a+r,r,u);if(m)return m;var v=r>0?u.end:l(u.begin,-1);return null==v||r>0&&v==t.text.length||!(m=p(r>0?0:i.length-1,r,c(v)))?null:m}(e.cm,s,t,n):Qa(s,t,n);if(null==o){if(a||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=We(e,c))))return!1;t=Za(i,e.cm,s,t.line,l)}else t=o;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,d="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var p=s.text.charAt(t.ch)||"\n",m=ee(p,f)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||m||(m="s"),u&&u!=m){n<0&&(n=1,c(),t.sticky="after");break}if(m&&(u=m),n>0&&!c(!h))break}var v=aa(e,t,a,o,!0);return nt(a,v)&&(v.hitSide=!0),v}function Uo(e,t,n,r){var i,a,o=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(a=$n(e,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Bo=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Go(e,t){var n=Dn(e,t.line);if(!n||n.hidden)return null;var r=We(e.doc,t.line),i=An(n,r,t.line),a=ce(r,e.doc.direction),o="left";a&&(o=se(a,t.ch)%2?"right":"left");var s=Pn(i.map,t.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function zo(e,t){return t&&(e.bad=!0),e}function Ho(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return zo(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return Ko(a,t,n)}}function Ko(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!D(r,t))return zo(et($e(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?X(e.rest):e.line;return zo(et($e(a),a.text.length),i)}var o=3==t.nodeType?t:null,s=t;for(o||1!=t.childNodes.length||3!=t.firstChild.nodeType||(o=t.firstChild,n&&(n=o.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var a=i<0?l.map:c[i],o=0;o<a.length;o+=3){var s=a[o+2];if(s==t||s==n){var u=$e(i<0?e.line:e.rest[i]),d=a[o]+r;return(r<0||s!=t)&&(d=a[o+(r?1:0)]),et(u,d)}}}var d=u(o,s,n);if(d)return zo(d,i);for(var f=s.nextSibling,h=o?o.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return zo(et(d.line,d.ch-h),i);h+=f.textContent.length}for(var p=s.previousSibling,m=n;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1))return zo(et(d.line,d.ch+m),i);m+=p.textContent.length}}Bo.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function a(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function o(e){if(a(e)&&!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Mo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var o=Lo.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var s=jo(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Lo.text.join("\n");var c=document.activeElement;M(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}Po(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),de(i,"paste",(function(e){!a(e)||me(r,e)||Ro(e,r)||s<=11&&setTimeout(ei(r,(function(){return t.updateFromDOM()})),20)})),de(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(i,"touchstart",(function(){return n.forceCompositionEnd()})),de(i,"input",(function(){t.composing||t.readFromDOMSoon()})),de(i,"copy",o),de(i,"cut",o)},Bo.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Bo.prototype.prepareSelection=function(){var e=gr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Bo.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Bo.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Bo.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||a.line<t.display.viewFrom)e.removeAllRanges();else{var o=Ho(t,e.anchorNode,e.anchorOffset),s=Ho(t,e.focusNode,e.focusOffset);if(!o||o.bad||!s||s.bad||0!=tt(at(o,s),i)||0!=tt(it(o,s),a)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Go(t,i)||{node:l[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&Go(t,a);if(!u){var d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=k(c.node,c.offset,u.offset,u.node)}catch(e){}h&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Bo.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Bo.prototype.showMultipleSelections=function(e){C(this.cm.display.cursorDiv,e.cursors),C(this.cm.display.selectionDiv,e.selection)},Bo.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Bo.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Bo.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Bo.prototype.blur=function(){this.div.blur()},Bo.prototype.getField=function(){return this.div},Bo.prototype.supportsTouch=function(){return!0},Bo.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Zr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Bo.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Bo.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Ho(t,e.anchorNode,e.anchorOffset),r=Ho(t,e.focusNode,e.focusOffset);n&&r&&Zr(t,(function(){Zi(t.doc,ki(n,r),z),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Bo.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,a=r.doc.sel.primary(),o=a.from(),s=a.to();if(0==o.ch&&o.line>r.firstLine()&&(o=et(o.line-1,We(r.doc,o.line-1).length)),s.ch==We(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),o.line<i.viewFrom||s.line>i.viewTo-1)return!1;o.line==i.viewFrom||0==(e=ur(r,o.line))?(t=$e(i.view[0].line),n=i.view[0].node):(t=$e(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=$e(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function c(){o&&(a+=s,l&&(a+=s),o=l=!1)}function u(e){e&&(c(),a+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var a,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(et(r,0),et(i+1,0),(v=+f,function(e){return e.id==v}));return void(h.length&&(a=h[0].find(0))&&u(qe(e.doc,a.from,a.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),p&&(o=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var v}for(;d(t),t!=n;)t=t.nextSibling,l=!1;return a}(r,n,c,t,l)),f=qe(r.doc,et(t,0),et(l,We(r.doc,l).text.length));d.length>1&&f.length>1;)if(X(d)==X(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var h=0,p=0,m=d[0],v=f[0],g=Math.min(m.length,v.length);h<g&&m.charCodeAt(h)==v.charCodeAt(h);)++h;for(var y=X(d),b=X(f),_=Math.min(y.length-(1==d.length?h:0),b.length-(1==f.length?h:0));p<_&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==d.length&&1==f.length&&t==o.line)for(;h&&h>o.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var E=et(t,h),x=et(l,f.length?X(f).length-p:0);return d.length>1||d[0]||tt(E,x)?(pa(r.doc,d,E,x,"+input"),!0):void 0},Bo.prototype.ensurePolled=function(){this.forceCompositionEnd()},Bo.prototype.reset=function(){this.forceCompositionEnd()},Bo.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Bo.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Bo.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return dr(e.cm)}))},Bo.prototype.setUneditable=function(e){e.contentEditable="false"},Bo.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Io)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Bo.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Bo.prototype.onContextMenu=function(){},Bo.prototype.resetPosition=function(){},Bo.prototype.needsContentAttribute=!0;var Vo=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null};Vo.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function a(e){if(!me(r,e)){if(r.somethingSelected())Do({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Mo(r);Do({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",i.value=t.text.join("\n"),M(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){me(r,e)||Ro(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",a),de(i,"copy",a),de(e.scroller,"paste",(function(t){if(!xn(e,t)&&!me(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=t.clipboardData,i.dispatchEvent(a)}})),de(e.lineSpace,"selectstart",(function(t){xn(e,t)||be(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Vo.prototype.createField=function(e){this.wrapper=jo(),this.textarea=this.wrapper.firstChild},Vo.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Vo.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=gr(e);if(e.options.moveInputWithCursor){var i=qn(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},Vo.prototype.showSelection=function(e){var t=this.cm.display;C(t.cursorDiv,e.cursors),C(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Vo.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&M(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},Vo.prototype.getField=function(){return this.textarea},Vo.prototype.supportsTouch=function(){return!1},Vo.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},Vo.prototype.blur=function(){this.textarea.blur()},Vo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vo.prototype.receivedFocus=function(){this.slowPoll()},Vo.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Vo.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Vo.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r=""),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Zr(t,(function(){Io(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Vo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vo.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},Vo.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=cr(n,e),c=r.scroller.scrollTop;if(a&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&ei(n,Zi)(n.doc,ki(a),z);var u,f=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&v(),S){xe(e);var m=function(){he(window,"mouseup",m),setTimeout(g,20)};de(window,"mouseup",m)}else setTimeout(g,50)}function v(){if(null!=i.selectionStart){var e=n.somethingSelected(),a=""+(e?i.value:"");i.value="⇚",i.value=a,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=f,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!o||o&&s<9)&&v();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ei(n,sa)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},Vo.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Vo.prototype.setUneditable=function(){},Vo.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=xo&&i(e,t,n)}:i)}e.defineOption=n,e.Init=xo,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Li(e)}),!0),n("indentUnit",2,Li,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Di(e),Bn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(-1==a)break;i=a+t.length,n.push(et(r,a))}r++}));for(var i=n.length-1;i>=0;i--)pa(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=xo&&e.refresh()})),n("specialCharPlaceholder",Qt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!_),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Eo(e),mi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Ya(t),i=n!=xo&&Ya(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,To,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=hi(t,e.options.lineNumbers),mi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?or(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Gr(e)}),!0),n("scrollbarStyle","native",(function(e){Kr(e),Gr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=hi(e.options.gutters,t),mi(e)}),!0),n("firstLineNumber",1,mi,!0),n("lineNumberFormatter",(function(e){return e}),mi,!0),n("showCursorWhenSelecting",!1,vr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(kr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,ko),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,vr,!0),n("singleCursorHeightPerLine",!0,vr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Di,!0),n("addModeClass",!1,Di,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Di,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Oo),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ei(this,t[e])(this,n,i),pe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ya(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ti((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,dr(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void dr(this)}})),indentLine:ti((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Qe(this.doc,e)&&Ao(this,e,t,n)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Ao(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Dr(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var l=s;l<n;++l)Ao(this,l,e);var c=this.doc.sel.ranges;0==a.ch&&t.length==c.length&&c[r].from().ch>0&&$i(this.doc,r,new Si(a,c[r].to()),z)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=ft(this,We(this.doc,e.line)),r=0,i=(n.length-1)/2,a=e.ch;if(0==a)t=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]<a)){t=n[2*o+2];break}r=o+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if("string"==typeof a[t])i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var o=0;o<a[t].length;o++){var s=i[a[t][o]];s&&r.push(s)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(a,this)&&-1==B(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return ht(this,(e=ot(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return qn(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Wn(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return $n(this,(e=Vn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Vn(this,{top:e,left:0},t||"page").top,Je(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,i=!0),r=We(this.doc,e)}else r=e;return Kn(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Ht(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a,o,s,l=this.display,c=(e=qn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(a=this,o={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Ar(a,o)).scrollTop&&Mr(a,s.scrollTop),null!=s.scrollLeft&&jr(a,s.scrollLeft))},triggerOnKeyDown:ti(co),triggerOnKeyPress:ti(fo),triggerOnKeyUp:uo,triggerOnMouseDown:ti(vo),execCommand:function(e){if(eo.hasOwnProperty(e))return eo[e].call(null,this)},triggerElectric:ti((function(e){No(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),o=0;o<t&&!(a=Fo(this.doc,a,i,n,r)).hitSide;++o);return a},moveH:ti((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Fo(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),K)})),deleteH:ti((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):$a(this,(function(n){var i=Fo(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,a=r;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),s=0;s<t;++s){var l=qn(this,o,"div");if(null==a?a=l.left:l.left=a,(o=Uo(this,l,i,n)).hitSide)break}return o},moveV:ti((function(e,t){var n=this,r=this.doc,i=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(o){if(a)return e<0?o.from():o.to();var s=qn(n,o.head,"div");null!=o.goalColumn&&(s.left=o.goalColumn),i.push(s.left);var l=Uo(n,s,e,t);return"page"==t&&o==r.sel.primary()&&Lr(n,Wn(n,l,"div").top-s.top),l}),K),i.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=i[o]})),findWordAt:function(e){var t=We(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var a=t.charAt(n),o=ee(a,i)?function(e){return ee(e,i)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&o(t.charAt(n-1));)--n;for(;r<t.length&&o(t.charAt(r));)++r}return new Si(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?R(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),pe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Ir(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Tn(this)-this.display.barHeight,width:e.scrollWidth-Tn(this)-this.display.barWidth,clientHeight:Cn(this),clientWidth:On(this)}},scrollIntoView:ti((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Rr(e),e.curOp.scrollToPos=t}(this,e):Nr(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Un(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){fr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,pe(this,"refresh",this)})),operation:function(e){return Zr(this,e)},startOperation:function(){return Wr(this)},endOperation:function(){return qr(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,Bn(this),Ir(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),pe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Mi(this,e),Bn(this),this.display.input.reset(),Ir(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ye(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}(Oo);var Wo="iter insert remove copy getEditor constructor".split(" ");for(var qo in La.prototype)La.prototype.hasOwnProperty(qo)&&B(Wo,qo)<0&&(Oo.prototype[qo]=function(e){return function(){return e.apply(this.doc,arguments)}}(La.prototype[qo]));return ye(La),Oo.inputStyles={textarea:Vo,contenteditable:Bo},Oo.defineMode=function(e){Oo.defaults.mode||"null"==e||(Oo.defaults.mode=e),je.apply(this,arguments)},Oo.defineMIME=function(e,t){Pe[e]=t},Oo.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Oo.defineMIME("text/plain","null"),Oo.defineExtension=function(e,t){Oo.prototype[e]=t},Oo.defineDocExtension=function(e,t){La.prototype[e]=t},Oo.fromTextArea=function(e,t){if((t=t?j(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=I();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Oo((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=he,e.on=de,e.wheelEventPixels=_i,e.Doc=La,e.splitLines=De,e.countColumn=F,e.findColumn=V,e.isWordChar=Z,e.Pass=G,e.signal=pe,e.Line=Wt,e.changeEnd=Ti,e.scrollbarModel=Hr,e.Pos=et,e.cmpPos=tt,e.modes=Me,e.mimeModes=Pe,e.resolveMode=Fe,e.getMode=Ue,e.modeExtensions=Be,e.extendMode=Ge,e.copyState=ze,e.startState=Ke,e.innerMode=He,e.commands=eo,e.keyMap=za,e.keyName=Xa,e.isModifierKey=Wa,e.lookupKey=Va,e.normalizeKeyMap=Ka,e.StringStream=Ve,e.SharedTextMarker=Ta,e.TextMarker=wa,e.LineWidget=Ea,e.e_preventDefault=be,e.e_stopPropagation=_e,e.e_stop=xe,e.addClass=R,e.contains=D,e.rmClass=T,e.keyNames=Fa}(Oo),Oo.version="5.58.2",Oo}()},W7jJ:
/*!*************************************************************!*\
!*** ./src/pages/Question/OjProblem/index.tsx + 16 modules ***!
\*************************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CaretUpOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/CopyOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/FormOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/LoadingOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/es/icons/PoweroffOutlined.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Problems/OjForm/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/Description/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/Drawer/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/CustomDiscuss/DiscussItem/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/CustomDiscuss/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/SubmitList/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/NoData/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/RenderHtml/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/SplitContainer/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/Video/Play/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/image-preview/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/markdown-editor/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/mediator.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Problems/OjForm/CodePanel/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/TestCasePanel/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/interface.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/service.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/tasks/left-panel/discuss/discuss-editor/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/aliyunUpload.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/question/show.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/question/time.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/question/title.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/b.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/c.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/c1.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/d.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/e.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/img/g.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/img/gf.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/img/jx.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/img/s.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/img/t.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/img/v.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/Question/OjProblem/LeftPanel/FilterList/img/a.svg (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./src/assets/images/question/internal.png (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/form/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/input/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/pagination/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/select/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/skeleton/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/space/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/statistic/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/statistic/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/table/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tag/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/tooltip/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/js-base64/base64.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-copy-to-clipboard/lib/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router-dom/esm/react-router-dom.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);var r=n("0Owb"),i=n("PpiC"),a=(n("OaEy"),n("2fM7")),o=(n("T2oS"),n("W9HT")),s=(n("miYZ"),n("tsqr")),l=(n("2qtc"),n("kLXV")),c=n("9og8"),u=n("tJVT"),d=n("k1fw"),f=(n("aHsQ"),n("sGsY")),h=n("WmNS"),p=n.n(h),m=n("q1tI"),v=n.n(m),g=n("Fvcw"),y=n("GIiI"),b=n("Ty5D"),_=n("9kvl"),E=n("55Ip"),x=n("7qur"),S=n("cDPC"),w=n("m3rI"),k=n("RCxd"),T=n("EHPI"),O=n("J66h"),C=n("uMZB"),A=n.n(C),L=(n("sNtx"),n("RpDr")),D=(n("+L6B"),n("2/Rp")),I=(n("y8nQ"),n("Vl3Y")),R=(n("5NDa"),n("5rEg")),N=R.a.TextArea,M=function(e){var t=e.callback,n=e.onCancel,r=e.notes;return v.a.createElement(I.a,{className:"note-form-panel",onFinish:function(e){t(e)},initialValues:{notes:r}},v.a.createElement(I.a.Item,{name:"notes",rules:[{required:!0,message:"请输入笔记内容"},{max:5e3,message:"笔记最大字数为".concat(5e3)}]},v.a.createElement(N,{placeholder:"请输入笔记内容",rows:5})),v.a.createElement(I.a.Item,{style:{textAlign:"right"}},v.a.createElement(D.a,{type:"ghost",onClick:n,style:{marginRight:10}}," 取消 "),v.a.createElement(D.a,{type:"primary",htmlType:"submit"}," 提交 ")))},P=n("ZsLC"),j=n.n(P),F=(n("DjyN"),n("NUBc")),U=(n("g9YV"),n("wCAj")),B=n("Hw79"),G=n.n(B),z=n("ye1Q"),H=n("lfch"),K=n("bdLU"),V=n("1vsH"),W=n("wd/R"),q=n.n(W),X=U.a.Column,Y=function(e){var t=e.submitResult,n=e.submitting,r=e.submitRecords,i=e.page,a=e.onPageChange,l=e.topicId,c=t||{},u=c.status,d=c.id,f=c.input,h=c.output,p=c.expected_output,m=c.is_file,g=c.input_file_url,y=c.output_file_url,_=c.expected_output_file_url,x=c.error_msg,S=r||{},w=S.records,k=S.records_count,T=Object(b.i)();return v.a.createElement(o.a,{spinning:n,tip:"评测中...",indicator:v.a.createElement(z.a,{style:{fontSize:24},spin:!0})},d?v.a.createElement(v.a.Fragment,null,v.a.createElement("ul",{className:G.a.info},v.a.createElement("li",null,"执行结果:",v.a.createElement("span",{className:u===K.a.OK?"c-green":"c-red"},L.a[u])),v.a.createElement("li",{className:G.a.error},v.a.createElement("a",{onClick:function(){m?navigator.clipboard.writeText(O.Base64.decode(x)).then((function(){s.b.success("复制错误信息成功")})):navigator.clipboard.writeText(O.Base64.decode(h)).then((function(){s.b.success("复制错误信息成功")}))}},"复制错误信息 ",v.a.createElement(H.a,null)," ")),v.a.createElement("li",null,v.a.createElement(E.a,{to:"/problems/".concat(l,"/record-detail/").concat(d,"?backId=").concat(null==T?void 0:T.save_identifier)},"显示详情 > "))),u!==K.a.OK?v.a.createElement(v.a.Fragment,null,v.a.createElement("p",{className:"c-red"},"实际输入:"),v.a.createElement("pre",null,!m&&f,m&&v.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(V.w)(g,f)}},f)),v.a.createElement("p",{className:"c-red"},"实际输出:"),v.a.createElement("pre",null,(4===u||5===u)&&O.Base64.decode(x),4!=u&&5!=u&&(m?v.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(V.w)(y,h)}},h):O.Base64.decode(h))),v.a.createElement("p",{className:"c-red"},"预期输出:"),v.a.createElement("pre",null,!m&&O.Base64.decode(p),m&&v.a.createElement("a",{style:{fontSize:"16px"},onClick:function(){return Object(V.w)(_,p)}},p))):null):null,(null==w?void 0:w.length)>0?v.a.createElement(U.a,{dataSource:w,rowKey:"id",pagination:!1},v.a.createElement(X,{title:"提交时间",dataIndex:"created_at",key:"created_at",render:function(e,t){return v.a.createElement("span",null," ",q()(e).format("YYYY-MM-DD HH:mm:ss"))}}),v.a.createElement(X,{title:"提交结果",dataIndex:"status",key:"status",render:function(e,t){var n;return v.a.createElement(E.a,{className:0===e?"c-green":"c-red",to:"/problems/".concat(l,"/record-detail/").concat(t.id,"?backId=").concat(null==T?void 0:T.save_identifier)},null===(n=L.a[e])||void 0===n?void 0:n.replace("调试","评测"))}}),v.a.createElement(X,{title:"执行用时 (S)",dataIndex:"execute_time",key:"execute_time"}),v.a.createElement(X,{title:"内存消耗MB",dataIndex:"execute_memory",key:"execute_memory"}),v.a.createElement(X,{title:"语言",dataIndex:"language",key:"language"})):null,k>15?v.a.createElement(F.a,{className:G.a.pagination,current:i,pageSize:15,total:k,onChange:a}):null)},$=n("BdwD"),J=(n("DYRE"),n("zeV3")),Q=(n("+BJd"),n("mr32")),Z=n("TcMa"),ee=n.n(Z),te=n("9Bee"),ne={1:{name:"简单",color:"#52c41a"},2:{name:"适中",color:"#faad14"},3:{name:"困难",color:"#f5222d"}},re=function(e){var t=e.hack,n=(e.onTriggerPraise,e.toDiscuss),r=(t.language,t.difficulty),i=t.time_limit,a=(t.username,t.user_path,t.user_praise,t.comments_count),o=(t.praises_count,t.description),s=t.pass_count,l=t.submit_count;Object(b.h)();console.log(t.language,"language");var c=ne[r];return v.a.createElement(v.a.Fragment,null,v.a.createElement("ul",{className:ee.a.info},v.a.createElement("li",null,"难度:",v.a.createElement(Q.a,{color:c.color},c.name)),v.a.createElement("li",null,"评测时长限制:",v.a.createElement("b",null,i,"秒"))),v.a.createElement(te.a,{value:o,className:ee.a.desc}),v.a.createElement("ul",{className:ee.a["commit-info"]},v.a.createElement("li",null,v.a.createElement(J.a,{size:4},v.a.createElement("span",null,"通过次数")," ",v.a.createElement("b",null,s))),v.a.createElement("li",null,v.a.createElement(J.a,{size:4},v.a.createElement("span",null,"提交次数")," ",v.a.createElement("b",null,l))," "),v.a.createElement("li",{style:{flex:"1 0 0"}}),v.a.createElement("li",null,v.a.createElement(J.a,{size:4},v.a.createElement("i",{className:"iconfont icon-huifu1",onClick:n})," ",v.a.createElement("b",null,a))," ")))},ie=n("dhSg"),ae=n("ps8w"),oe=n.n(ae),se=n("oBTY"),le=n("M8RZ"),ce=(n("OkW/"),n("ErOA"));function ue(e){return Object(ce.c)("comments.json",e)}function de(e){return Object(ce.f)("/discusses/".concat(e,"/plus.json"),{container_type:"Discuss",type:1})}function fe(e){return Object(ce.f)("comments/reply.json",e)}function he(e){return Object(ce.f)("comments.json",e)}function pe(e){return Object(ce.f)("comments/".concat(null==e?void 0:e.id,"/hidden.json"),e)}function me(e){return Object(ce.b)("comments/".concat(null==e?void 0:e.id,".json"))}n("GgEA");var ve=n("AMnG"),ge=n("xKgJ");function ye(e){var t=e.author;return v.a.createElement("a",{href:"/users/".concat(t.login),target:"_blank"},v.a.createElement("img",{alt:"用户头像",height:"50",style:{borderRadius:"50%"},src:"".concat(w.a.IMG_SERVER,"/images/").concat(t.image_url),width:"50"}))}function be(e){var t=e.data,n=e.index,r=e.parentDiscussIndex,i=e.user,a=e.onSetActionType,o=t.author,s=t.can_delete,l=t.content,c=t.id,u=t.time;var d=i.admin||s||o.user_id===i.user_id;return v.a.createElement("div",{className:"discuss-item-container second-discuss "},v.a.createElement(ye,{author:o}),v.a.createElement("section",null,v.a.createElement("div",{className:"discuss-info"},v.a.createElement("a",{href:"/users/".concat(o.login),target:"_blank"},o.name),v.a.createElement("span",{className:"grey"},u),v.a.createElement("div",{className:"btn-group",style:{marginBottom:0}},d?v.a.createElement("a",{onClick:function(){a({id:c,index:n,type:"delete-discuss",parentDiscussIndex:r,message:"确定要删除该条回复吗"})},title:"删除"},v.a.createElement("i",{className:"iconfont icon-shanchu"})):null)),v.a.createElement(te.a,{className:"discuss-content",value:l})))}var _e,Ee=function(e){var t=e.user,n=e.data,r=e.index,i=e.onPlusDiscuss,a=e.onSetActionType,o=e.activeDiscussIndex,s=e.onReplyDiscuss,l=e.onSetActiveDiscussIndex,c=n.content,u=n.children,d=n.hidden,f=n.id,h=n.praise_count,p=n.time,m=n.user_praise,g=n.can_delete,y=n.author;console.log(g&&(!u||0==u.length),"children22");t.admin||(t.user_id,y.user_id);return v.a.createElement("div",{className:"discuss-item-container",key:f},v.a.createElement(ye,{author:y}),v.a.createElement("section",null,v.a.createElement("div",{className:"discuss-info"},v.a.createElement("a",{href:"/users/".concat(y.login),target:"_blank"}," ",y.name," "),v.a.createElement("span",{className:"grey"},p)),v.a.createElement(te.a,{className:"discuss-content",value:c}),u&&u.length>0?v.a.createElement("div",{className:"reply-discuss-container"},u.map((function(e,n){return v.a.createElement(be,{key:e.id,data:e,index:n,user:t,onSetActionType:a,parentDiscussIndex:r})}))):null,v.a.createElement("div",{className:"btn-group"},Object(ge.v)()?v.a.createElement("a",{onClick:function(){a({id:f,index:r,params:{hidden:d?"0":"1"},type:"hidden-discuss",message:d?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:d?"取消隐藏":"隐藏评论"},v.a.createElement("i",{className:d?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,!g||u&&0!=u.length?null:v.a.createElement("a",{onClick:function(){a({id:f,index:r,type:"delete-discuss",message:"确定要删除该条回复吗"})},title:"删除"},v.a.createElement("i",{className:"iconfont icon-shanchu"})),v.a.createElement("a",{onClick:function(){l(f)},title:"回复"}," ",v.a.createElement("i",{className:"iconfont icon-huifu1"})," "),v.a.createElement("a",{onClick:function(){i(f,!m,r)},className:m?"c-orange":""},v.a.createElement("i",{className:m?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),v.a.createElement("span",null,h||""))),v.a.createElement(ve.a,{id:f,activeDiscussIndex:o,onReplyDiscuss:s})))},xe=n("kaH+"),Se=(n("Wx9E"),n("Ot1p")),we=function(e){var t=e.user_praise,n=e.praise_count,r=e.praisePlus,i=e.onCreateDiscuss,a=e.discuss_count,o=Object(m.useState)(!1),s=Object(u.a)(o,2),l=s[0],d=s[1],f=Object(m.useState)(""),h=Object(u.a)(f,2),g=h[0],y=h[1];function b(){d(!1)}function _(){return(_=Object(c.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i(g),y(""),d(!1);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return v.a.createElement("div",{className:"dis-input-editor-container ".concat(l?"active":""," ")},v.a.createElement("div",{className:l?"text-area hide":"text-area"},v.a.createElement("input",{placeholder:"说点什么",onClick:function(){d(!0)}}),v.a.createElement("a",{style:{alignItems:"center"}}," ",v.a.createElement("i",{className:"iconfont icon-huifu1"}),"    ",a," "),v.a.createElement("a",{className:"c-light-black",onClick:r,style:{alignItems:"center"},title:t?"取消点赞":"点赞"},v.a.createElement("i",{className:"mr3 ".concat(t?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),n?v.a.createElement("span",null,n):"")),l?v.a.createElement("div",{className:"input-mask",onClick:b}):null,v.a.createElement("div",{className:l?"md-container":"md-container hide"},v.a.createElement(Se.a,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:g,height:240,onChange:function(e){y(e)}}),v.a.createElement("div",{className:"tip-container",onClick:b},v.a.createElement("a",{className:"btn-send",onClick:function(){return _.apply(this,arguments)}}," 发送 "))))},ke={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};function Te(e,t){switch(t.type){case _e.SHOW_DISCUSSES_LOADING:return Object(d.a)(Object(d.a)({},e),{},{loading:!0});case _e.GET_DISCUSSES:case _e.TOP_OR_DOWN_DISCUSS:case _e.SET_ACTION_TYPE:case _e.PLUS_DISCUSS:return Object(d.a)(Object(d.a)({},e),t.payload);case _e.SET_PAGE:return Object(d.a)(Object(d.a)({},e),{},{page:t.payload});case _e.ACTIVE_DISCUSS_INDEX:return Object(d.a)(Object(d.a)({},e),t.payload);default:throw new Error}}!function(e){e[e.GET_DISCUSSES=0]="GET_DISCUSSES",e[e.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",e[e.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",e[e.PLUS_DISCUSS=3]="PLUS_DISCUSS",e[e.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",e[e.SET_PAGE=5]="SET_PAGE",e[e.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING"}(_e||(_e={}));var Oe,Ce=function(e){var t=e.user,n=e.identifier,r=e.hack,i=e.onTriggerPraise,a=e.setDiscussTotal,o=Object(m.useReducer)(Te,ke),s=Object(u.a)(o,2),f=s[0],h=s[1],g=(f.loading,f.page),y=f.data,b=f.count,_=f.actionType,E=f.activeDiscussIndex,x=Object(m.useCallback)(Object(c.a)(p.a.mark((function e(){var t,r,i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h({type:_e.SHOW_DISCUSSES_LOADING}),e.next=3,ue({container_type:"Practice",container_identifier:n,limit:10,page:g});case 3:t=e.sent,r=t.comments,i=t.disscuss_count,h({type:_e.GET_DISCUSSES,payload:{data:r,count:i,loading:!1}}),a(i);case 7:case"end":return e.stop()}}),e)}))),[g,n]);function S(e){h({type:_e.SET_ACTION_TYPE,payload:{actionType:e}})}function w(e){h(E===e?{type:_e.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}:{type:_e.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:e}})}function k(e,t,n){return T.apply(this,arguments)}function T(){return(T=Object(c.a)(p.a.mark((function e(t,n,r){var i;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de(t);case 3:i=e.sent,y[r].user_praise=n,y[r].praise_count=i.praise_count,h({type:_e.PLUS_DISCUSS,payload:{data:Object(se.a)(y)}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function O(){return(O=Object(c.a)(p.a.mark((function e(){var t,r,i,a,o;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=_.id,r=_.params,i=_.type,a=_.index,o=_.parentDiscussIndex,"hidden-discuss"!==i){e.next=7;break}return console.log(r,"params"),e.next=5,pe(Object(d.a)({id:t,container_type:"Practice",container_identifier:n},r));case 5:o?y[o].children[a].hidden=1==r.hidden:y[a].hidden=1==r.hidden,h({type:_e.SET_ACTION_TYPE,payload:{actionType:null,data:Object(se.a)(y)}});case 7:if("delete-discuss"!==i){e.next=13;break}return e.next=10,me({id:t,container_type:"Practice",container_identifier:n});case 10:return h({type:_e.SET_ACTION_TYPE,payload:{actionType:null}}),e.next=13,x();case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e,t){return A.apply(this,arguments)}function A(){return(A=Object(c.a)(p.a.mark((function e(t,r){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fe({container_type:"Practice",container_identifier:n,comments:{content:r,parent_id:t}});case 3:x(),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.log(e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function L(){return(L=Object(c.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h({type:_e.SHOW_DISCUSSES_LOADING}),e.next=3,he({comments:{content:t},container_type:"Practice",container_identifier:n});case 3:x();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return Object(m.useEffect)((function(){x()}),[n,g]),v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:"discuss-panel"},0===y.length?v.a.createElement($.a,null):y.map((function(e,n){return v.a.createElement(Ee,{onReplyDiscuss:C,onPlusDiscuss:k,onSetActiveDiscussIndex:w,onSetActionType:S,data:e,index:n,user:t,activeDiscussIndex:E})})),b>10?v.a.createElement("div",{className:"pagination-container"},v.a.createElement(F.a,{showQuickJumper:!0,onChange:function(e){h({type:_e.SET_PAGE,page:e})},current:g,total:b})):null),v.a.createElement(we,{user_praise:r.user_praise,praise_count:r.praises_count,praisePlus:i,discuss_count:r.comments_count,onCreateDiscuss:function(e){return L.apply(this,arguments)}}),v.a.createElement(le.a,null,v.a.createElement(l.a,{centered:!0,title:"提示",visible:!!_,onOk:function(){return O.apply(this,arguments)},onCancel:function(){h({type:_e.SET_ACTION_TYPE,payload:{actionType:null}})}},v.a.createElement("p",null,_?_.message:"")),v.a.createElement(xe.a,null)))},Ae=n("1FX+"),Le=n.n(Ae),De=n("pYxM"),Ie=n.n(De),Re=n("sB/4"),Ne=n.n(Re),Me=n("Wtmd"),Pe=n.n(Me),je=n("CNDd"),Fe=n.n(je),Ue=n("nCk5"),Be=n.n(Ue),Ge=n("kovY"),ze=n.n(Ge),He=function(e){var t=e.style,n=void 0===t?{}:t,r=e.onClick,i=e.onAssist,a=e.onHide,o=e.data,s=e.active,l=e.showLine;return v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{className:s===(null==o?void 0:o.id)?"".concat(Ie.a.list," ").concat(Ie.a.active):Ie.a.list,style:n,onClick:function(){return r(o)}},(null==o?void 0:o.video)&&v.a.createElement("div",{className:Ie.a.left},v.a.createElement("img",{src:null==o?void 0:o.video_cover}),v.a.createElement("div",null,v.a.createElement("img",{src:Ne.a}),v.a.createElement("span",null,null==o?void 0:o.video_duration)),v.a.createElement("div",{className:Ie.a.mask})),v.a.createElement("div",{className:Ie.a.right},v.a.createElement("div",{className:Ie.a.name},v.a.createElement("img",{src:w.a.IMG_SERVER+"/images/"+(null==o?void 0:o.image_url),width:30,height:30}),v.a.createElement("div",{title:null==o?void 0:o.name,className:Ie.a.title},null==o?void 0:o.name),(null==o?void 0:o.is_authority)&&v.a.createElement("div",{className:Ie.a.b},"官方"),(null==o?void 0:o.is_excellent)&&v.a.createElement("div",{className:Ie.a.a},"精选")),v.a.createElement("div",{className:Ie.a.des},v.a.createElement(te.a,{showLines:2,showTextOnly:!0,value:(null==o?void 0:o.content)||"暂无内容"})),v.a.createElement("div",{className:Ie.a.tag},v.a.createElement("span",{className:"current",onClick:function(e){e.stopPropagation(),i(o)}},v.a.createElement("img",{src:null!=o&&o.user_liker?Fe.a:Pe.a}),v.a.createElement("span",{style:{color:null!=o&&o.user_liker?"#0152d9":"#656f87"}},null==o?void 0:o.praises_count)),v.a.createElement("span",null,v.a.createElement("img",{src:Be.a}),v.a.createElement("span",null,null==o?void 0:o.discusses_count)),v.a.createElement("span",null,v.a.createElement("img",{src:ze.a}),v.a.createElement("span",null,null==o?void 0:o.viewed_count)),Object(ge.v)()&&v.a.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(e){e.stopPropagation(),a(o)}},null!=o&&o.is_hidden?"取消隐藏":"隐藏")))),l&&v.a.createElement("div",{className:Ie.a.line}))},Ke=(n("5Dmo"),n("3S7+")),Ve=n("Z8dc"),We=n.n(Ve),qe=n("Aky1"),Xe=n("7+5b"),Ye=n.n(Xe),$e=n("twBr"),Je=n.n($e),Qe=n("oE5q"),Ze=n.n(Qe),et=function(e,t){var n,r,i,a=t.payload.uploadInfo,o=void 0===a?{}:a;switch(t.type){case"addVideo":return{videoList:[].concat(Object(se.a)(e.videoList),[{name:o.file.name,size:o.file.size,type:o.file.type,fileHash:o.fileHash,state:o.state,video_id:o.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:e.videoList.filter((function(e){return e.name!==t.payload.name}))};case"replaceVideo":return{videoList:t.payload};case"removeAll":return[];case"updateProgress":return{videoList:e.videoList.map((function(e){return e.name===t.payload.uploadInfo.file.name?Object(d.a)(Object(d.a)({},e),{loaded:t.payload.progressPercent,video_id:o.videoId,fileHash:o.fileHash}):e}))};case"updateTitle":return{videoList:null===(n=e.videoList)||void 0===n?void 0:n.map((function(e){return e.name===t.payload.item.name?Object(d.a)(Object(d.a)({},e),{title:t.payload.title}):e}))};case"updateImg":return{videoList:null===(r=e.videoList)||void 0===r?void 0:r.map((function(e){return e.name===t.payload.item.name?Object(d.a)(Object(d.a)({},e),{attachment_id:t.payload.attachment_id}):e}))};case"updateImg":return{videoList:null===(i=e.videoList)||void 0===i?void 0:i.map((function(e){return e.name===t.payload.item.name?Object(d.a)(Object(d.a)({},e),{attachment_id:t.payload.attachment_id}):e}))};default:return[]}},tt=function(e){var t,n,r=e.onClose,i=e.onOk,a=e.identifier,o=e.active,f=I.a.useForm(),h=Object(u.a)(f,1)[0],g=Object(m.useState)({}),y=Object(u.a)(g,2),_=y[0],E=y[1],S=Object(m.useState)(!1),w=Object(u.a)(S,2),k=w[0],T=w[1],O=Object(m.useState)(!1),C=Object(u.a)(O,2),A=C[0],L=C[1],N=Object(m.useReducer)(et,{videoList:[]}),M=Object(u.a)(N,2),P=M[0],j=M[1],F=Object(ge.x)(),U=(Object(b.i)(),Object(m.useRef)());Object(m.useEffect)((function(){o&&G()}),[o]);var B,G=function(){var e=Object(c.a)(p.a.mark((function e(){var t,n,r,i,s,l,c,u,d,f,m,v;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.k)(a,{active:o});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(l={name:null==t||null===(n=t.data)||void 0===n?void 0:n.name,content:null==t||null===(r=t.data)||void 0===r?void 0:r.content},h.setFieldsValue(l),E(l),null!=t&&null!==(i=t.data)&&void 0!==i&&null!==(s=i.videos)&&void 0!==s&&s[0]&&j({type:"replaceVideo",payload:[{video_id:null==t||null===(c=t.data)||void 0===c||null===(u=c.videos)||void 0===u||null===(d=u[0])||void 0===d?void 0:d.video_id,name:null==t||null===(f=t.data)||void 0===f||null===(m=f.videos)||void 0===m||null===(v=m[0])||void 0===v?void 0:v.title,loaded:100}]}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=Object(c.a)(p.a.mark((function e(t){var n,r,s,l,c;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={videos:P.videoList,articles:t},L(!0),!o){e.next=9;break}return r.active=o,e.next=6,Object(x.j)(a,r);case 6:s=e.sent,e.next=12;break;case 9:return e.next=11,Object(x.a)(a,r);case 11:s=e.sent;case 12:0===(null===(n=s)||void 0===n?void 0:n.status)&&(console.log(o||(null===(l=s)||void 0===l?void 0:l.id),44),i(o||(null===(c=s)||void 0===c?void 0:c.id))),L(!1);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(){document.getElementById("fileUpload").value=""},K=function(e){return v.a.createElement("div",{className:We.a.mainSucceed},v.a.createElement("img",{src:Je.a,alt:""}),v.a.createElement("span",null,"上传成功"),v.a.createElement("div",{className:We.a.tip},v.a.createElement(Ke.a,{getPopupContainer:function(e){return e.parentNode},title:v.a.createElement("div",null,v.a.createElement("div",null,"1、上传视频即表示您已同意",v.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"上传内容协议"),",不得上传未经他人授权的作品;"),v.a.createElement("div",null,"2、不支持断点续传文件大小请勿超过1G"),v.a.createElement("div",null,"3、支持文件格式avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm、wmv"))},v.a.createElement("img",{src:Ze.a,alt:""}))),v.a.createElement("div",{className:We.a.del,onClick:function(){return t=e.name,n=100==e.loaded,void l.a.confirm({title:"提示",centered:!0,okText:"确定",cancelText:"取消",content:v.a.createElement("div",{className:"tc"},"您确认要",n?"删除":"取消上传","该视频吗?"),onOk:function(){H(),j({type:"removeVideo",payload:{name:t}})}});var t,n}},v.a.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"删除视频"))},V=null===(t=P.videoList)||void 0===t?void 0:t.length;return v.a.createElement("div",{className:We.a.listForm},v.a.createElement("header",null,o?"编辑":"发布","题解"),v.a.createElement("section",{className:We.a.scroll,id:"sss"},v.a.createElement("div",{className:We.a.formWrap}," ",v.a.createElement(I.a,{form:h,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(e,t){E(Object(d.a)({},t))},onFinish:z},v.a.createElement(I.a.Item,{name:"name",label:"标题:",rules:[{required:!0,message:"请输入名称"},{max:60,message:"请输入名称最大限制60个字符"},{whitespace:!0,message:"请勿输入空格"}]},v.a.createElement(R.a,{bordered:!1,placeholder:"请输入名称最大限制60个字符",suffix:"".concat((null===(n=_.name)||void 0===n?void 0:n.length)||0,"/60")})),v.a.createElement(I.a.Item,{name:"content",label:"内容:"},v.a.createElement(Se.a,{defaultValue:_.content||"",watch:!0})))),v.a.createElement("div",{className:We.a.upload},V?v.a.createElement(v.a.Fragment,null,null===(B=P.videoList)||void 0===B?void 0:B.map((function(e,t){return v.a.createElement(v.a.Fragment,{key:t},100==e.loaded?K(e):(n=e.loaded,v.a.createElement("div",{className:We.a.mainLoading},v.a.createElement("div",{className:We.a.proWarp},v.a.createElement("div",{className:We.a.pro},v.a.createElement("div",{style:{width:n}})),v.a.createElement("span",null,n||0,"%")),v.a.createElement("aside",null,"上传中"),v.a.createElement("div",{className:We.a.tip},v.a.createElement(Ke.a,{getPopupContainer:function(e){return e.parentNode},title:v.a.createElement("div",null,v.a.createElement("div",null,"1、上传视频即表示您已同意",v.a.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"上传内容协议"),",不得上传未经他人授权的作品;"),v.a.createElement("div",null,"2、不支持断点续传文件大小请勿超过1G"),v.a.createElement("div",null,"3、支持文件格式avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm、wmv"))},v.a.createElement("img",{src:Ze.a,alt:""}))))));var n}))):v.a.createElement("label",{htmlFor:"fileUpload",className:We.a.main},v.a.createElement("img",{src:Ye.a,alt:""}),v.a.createElement("span",null,"上传视频")),v.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:function(e){var t,n=e.target.files[0];if(n){var r=n.name.toLowerCase();return r&&-1==r.indexOf(".avi")&&-1==r.indexOf(".flv")&&-1==r.indexOf(".f4v")&&-1==r.indexOf(".m4v")&&-1==r.indexOf(".mov")&&-1==r.indexOf(".mp4")&&-1==r.indexOf(".rmvb")&&-1==r.indexOf(".swf")&&-1==r.indexOf(".webm")&&-1==r.indexOf(".wmv")?(s.b.info("不支持的视频格式"),void H()):n.size>1073741824?(s.b.info("视频大小超过".concat(1024,"M")),void H()):null!==(t=P.videoList)&&void 0!==t&&t.find((function(e){return e.name===n.name}))?(s.b.info("你不能上传同一个视频文件名称,请重新选择。"),void H()):void function(e){T(!0),U.current?U.current.addFile(e,null,null,null,'{"Vod":{}}'):Object(qe.a)(null==F?void 0:F.login,"",{create:!U,addFileSuccess:function(e){j({type:"addVideo",payload:{uploadInfo:e}})},onUploadProgress:function(e,t,n){var r=Math.ceil(100*n);j({type:"updateProgress",payload:{uploadInfo:e,progressPercent:r}}),H()},onUploadFailed:function(e){s.b.info("视频云服务出现异常,请重新上传。")},onUploadEnd:function(e){T(!1)},onUploadSucceed:function(e){T(!1)},onUploadError:function(e){T(!1)},gotUploader:function(t){t.addFile(e,null,null,null,'{"Vod":{}}'),U.current=t}})}(n)}H()},accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),v.a.createElement("div",{className:We.a.btns},v.a.createElement(D.a,{onClick:function(){l.a.confirm({centered:!0,width:500,okText:"确定",cancelText:"取消",title:"注意",icon:null,className:"custom-modal-divider",content:"您正在编写题解,点击关闭后,您的题解内容将不会进行保存。",onOk:r})},type:"primary",ghost:!0},"关闭"),v.a.createElement(D.a,{loading:A,disabled:k,onClick:function(){return h.submit()},type:"primary"},"发布题解")))},nt=(n("cWXX"),n("/ezw")),rt=n("CaVn"),it=n.n(rt),at=n("s8/Y"),ot=n.n(at),st=n("JOrW"),lt=n.n(st),ct=n("gqXR"),ut=n.n(ct),dt=(n("14J3"),n("BMrR")),ft=(n("jCWc"),n("kPKH")),ht=n("wW8i"),pt=n.n(ht),mt=n("MVJL"),vt=n.n(mt),gt=function(e){var t=e.id,n=e.cb,r=Object(m.useState)(""),i=Object(u.a)(r,2),a=i[0],o=i[1];return v.a.createElement("aside",{className:"mt10"},v.a.createElement(Se.a,{defaultValue:a,id:"writeForumsReviewId",onChange:function(e){o(e)},placeholder:"我要回复...",height:240}),v.a.createElement(dt.a,null,v.a.createElement(ft.a,{flex:"1"}),v.a.createElement(ft.a,null,v.a.createElement(D.a,{type:"primary",size:"large",onClick:Object(c.a)(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:""===a?s.b.error("请输入内容"):n(t,a);case 1:case"end":return e.stop()}}),e)})))},"发送"))))},yt=function(e){var t,n=e.data;return v.a.createElement("div",{className:vt.a.thirdlyLevelDiscuss},v.a.createElement("span",{className:"c-grey-333"},v.a.createElement("span",{className:"font 14 c-light-primary"},null==n||null===(t=n.author)||void 0===t?void 0:t.name),"@",v.a.createElement("span",{className:"font 14 c-light-primary"},null==n?void 0:n.parent_name),":"),v.a.createElement(te.a,{value:null==n?void 0:n.content}))},bt=function(e){var t,n,r,i,a=e.data,o=e.onReplyDiscuss,s=e.thirdlyReply,l=e.setThirdlyReply,c=Object(ge.x)();return console.log(c,"user"),v.a.createElement("div",{className:vt.a.list},v.a.createElement("img",{src:w.a.IMG_SERVER+"/images/"+(null==a||null===(t=a.author)||void 0===t?void 0:t.image_url)}),v.a.createElement("div",{className:vt.a.wrap},v.a.createElement("div",{className:"font14",style:{marginBottom:6}},v.a.createElement("span",{className:"c-grey-333"},null==a||null===(n=a.author)||void 0===n?void 0:n.name),(null==c?void 0:c.login)!==(null==a||null===(r=a.author)||void 0===r?void 0:r.login)&&v.a.createElement("span",{onClick:function(){return l(null==a?void 0:a.id)},className:"c-grey-999 current",style:{float:"right"}},v.a.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),v.a.createElement("span",null,"回复"))),v.a.createElement(te.a,{value:null==a?void 0:a.content}),null==a||null===(i=a.children)||void 0===i?void 0:i.map((function(e){return v.a.createElement(yt,{key:e.id,data:e})})),s===(null==a?void 0:a.id)&&v.a.createElement("div",null,v.a.createElement(gt,{id:null==a?void 0:a.id,cb:o}),v.a.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return l(null)},className:"c-light-primary current"},v.a.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"收起回复")),v.a.createElement("div",{className:vt.a.line})))},_t=function(e){var t,n,r,i,a=e.data,o=e.onReplyDiscuss,s=e.secondReply,l=e.setSecondReply,c=e.thirdlyReply,d=e.setThirdlyReply,f=e.onPlusDiscuss,h=Object(m.useState)(!1),p=Object(u.a)(h,2),g=p[0],y=p[1];return console.log(a,"data"),v.a.createElement("div",{className:vt.a.discussItem},v.a.createElement("div",{className:vt.a.list},v.a.createElement("img",{src:w.a.IMG_SERVER+"/images/"+(null==a||null===(t=a.author)||void 0===t?void 0:t.image_url)}),v.a.createElement("div",{className:vt.a.wrap},v.a.createElement("div",{className:"font14",style:{marginBottom:6}},v.a.createElement("span",{className:"c-grey-333 mr30"},null==a||null===(n=a.author)||void 0===n?void 0:n.name),v.a.createElement("span",{className:"c-grey-999"},null==a?void 0:a.time)),v.a.createElement(te.a,{value:null==a?void 0:a.content}),v.a.createElement("div",{className:vt.a.btns},v.a.createElement("div",{onClick:function(){return f(null==a?void 0:a.id)},className:null!=a&&a.user_praise?"c-light-primary":"c-grey-999"},v.a.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),v.a.createElement("span",null,null==a?void 0:a.praise_count)),v.a.createElement("div",{onClick:function(){var e;0!==(null==a||null===(e=a.children)||void 0===e?void 0:e.length)&&(l(null),y(!g))},style:{color:g?"#0152d9":"#999999"}},v.a.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),v.a.createElement("span",null,g?"收起评论":null==a||null===(r=a.children)||void 0===r?void 0:r.length)),v.a.createElement("div",{onClick:function(){y(!1),l(s===(null==a?void 0:a.id)?null:null==a?void 0:a.id)},style:{color:s===(null==a?void 0:a.id)?"#0152d9":"#999999"}},v.a.createElement("i",{className:"iconfont icon-huifu3 mr3"}),v.a.createElement("span",null,s===(null==a?void 0:a.id)?"收起回复":"回复"))),s===(null==a?void 0:a.id)&&v.a.createElement(gt,{id:null==a?void 0:a.id,cb:function(e,t){o(e,t),y(!0)}}),g&&v.a.createElement("div",{className:vt.a.secondLevelDiscuss},null==a||null===(i=a.children)||void 0===i?void 0:i.map((function(e){return v.a.createElement(bt,{thirdlyReply:c,setThirdlyReply:d,key:e.id,data:e,onReplyDiscuss:o})}))))))},Et=function(e){e.identifier;var t=e.active,n=e.onOk,r=Object(m.useState)(""),i=Object(u.a)(r,2),a=i[0],o=i[1],l=Object(m.useState)(1),d=Object(u.a)(l,2),f=d[0],h=d[1],g=Object(m.useState)([]),y=Object(u.a)(g,2),b=y[0],_=y[1],E=Object(m.useState)(0),x=Object(u.a)(E,2),S=x[0],w=x[1],k=Object(m.useState)(null),T=Object(u.a)(k,2),O=T[0],C=T[1],A=Object(m.useState)(null),L=Object(u.a)(A,2),I=L[0],R=L[1];Object(m.useEffect)((function(){N(1),h(1)}),[t]);var N=function(){var e=Object(c.a)(p.a.mark((function e(n){var r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ue({container_type:"QuestionSolutionArticle",container_identifier:t,limit:5,page:n});case 2:null!=(r=e.sent)&&r.comments&&(_((null==r?void 0:r.comments)||[]),h(n),w(null==r?void 0:r.disscuss_count));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=Object(c.a)(p.a.mark((function e(){var r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==a){e.next=3;break}return s.b.error("请输入内容"),e.abrupt("return");case 3:return e.next=5,he({comments:{content:a},container_type:"QuestionSolutionArticle",container_identifier:t});case 5:null!=(r=e.sent)&&r.discuss&&(o(""),N(f),n());case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){var e=Object(c.a)(p.a.mark((function e(n,r,i){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fe({container_type:"QuestionSolutionArticle",container_identifier:t,comments:{content:r,parent_id:n}});case 2:e.sent,C(null),R(null),N(f);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),j=function(){var e=Object(c.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,de(t);case 2:e.sent,N(f);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return v.a.createElement("div",{className:pt.a.discuss},v.a.createElement("aside",{className:pt.a.reply,style:{borderWidth:S?1:0}},v.a.createElement(Se.a,{defaultValue:a,id:"writeForumsReviewId",onChange:function(e){o(e)},placeholder:"我要回复...",height:240}),v.a.createElement(dt.a,null,v.a.createElement(ft.a,{flex:"1"}),v.a.createElement(ft.a,null,v.a.createElement(D.a,{type:"primary",size:"large",onClick:function(){return M()}},"发送")))),null==b?void 0:b.map((function(e){return v.a.createElement(_t,{secondReply:O,setSecondReply:C,thirdlyReply:I,setThirdlyReply:R,key:e.id,data:e,onReplyDiscuss:P,onPlusDiscuss:j})})),v.a.createElement(F.a,{className:pt.a.pagination,showTotal:function(e){return v.a.createElement("span",{style:{color:"#656F87"}},"共",v.a.createElement("span",{className:"c-light-primary"},e),"条数据")},current:f,onChange:function(e){h(e),N(e)},total:S,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},xt=n("hgre"),St=function(e){var t,n,r,i,a,s,f,h,g,y,b=e.active,_=e.identifier,E=(e.onAssist,e.onEdit),S=e.onArticlesSkip,k=e.onClose,T=e.onOk,O=e.onDelete,C=e.detailsIndex,A=e.btnShowStatus,L=Object(m.useState)(!0),I=Object(u.a)(L,2),R=I[0],N=I[1],M=Object(m.useState)({}),P=Object(u.a)(M,2),j=P[0],F=P[1];Object(m.useEffect)((function(){b&&U()}),[b,C]);var U=function(){var e=Object(c.a)(p.a.mark((function e(){var t,n=arguments;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(!(n.length>0&&void 0!==n[0])||n[0])&&N(!0),e.next=4,Object(x.d)(_,{active:b});case 4:0===(null==(t=e.sent)?void 0:t.status)&&F((null==t?void 0:t.data)||{}),N(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=Object(c.a)(p.a.mark((function e(t){var n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.g)(_,Object(d.a)({active:b},t));case 2:0===(null==(n=e.sent)?void 0:n.status)&&(U(!1),T());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=Object(c.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.c)(_,{active:null==t?void 0:t.id});case 2:0===e.sent.status&&(U(!1),T());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return v.a.createElement("div",{className:it.a.listDetails},v.a.createElement(nt.a,{className:"pt20 pl20 pr20",loading:R,active:!0,paragraph:{rows:5}},v.a.createElement("div",{className:it.a.head},v.a.createElement("div",{className:it.a.name},v.a.createElement("div",{title:null==j?void 0:j.name,className:it.a.title},null==j?void 0:j.name),(null==j?void 0:j.is_authority)&&v.a.createElement("div",{className:it.a.b},"官方"),(null==j?void 0:j.is_excellent)&&v.a.createElement("div",{className:it.a.a},"精选")),v.a.createElement("div",{className:it.a.tag},v.a.createElement("img",{src:w.a.IMG_SERVER+"/images/"+(null==j?void 0:j.image_url)}),v.a.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},null==j?void 0:j.username),v.a.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"发布于",q()(null==j?void 0:j.created_at).format("YYYY-MM-DD")),v.a.createElement("span",null,v.a.createElement("img",{src:Pe.a}),v.a.createElement("span",null,null==j?void 0:j.praises_count)),v.a.createElement("span",null,v.a.createElement("img",{src:Be.a}),v.a.createElement("span",null,null==j?void 0:j.discusses_count)),v.a.createElement("span",null,v.a.createElement("img",{src:ze.a}),v.a.createElement("span",null,null==j?void 0:j.viewed_count)),v.a.createElement("div",{className:it.a.btn},(Object(ge.v)()||(null==j?void 0:j.is_self))&&v.a.createElement(v.a.Fragment,null,v.a.createElement(D.a,{onClick:function(){return e=j,void l.a.confirm({centered:!0,width:500,okText:"确定",cancelText:"取消",title:"提示",icon:null,className:"custom-modal-divider",content:"确认要删除该题解吗?",onOk:function(){return O(e)}});var e},type:"primary",ghost:!0},"删除"),v.a.createElement(D.a,{onClick:function(){return E(j)},type:"primary",ghost:!0},"编辑")),Object(ge.v)()&&v.a.createElement(D.a,{onClick:function(){return B({is_authority:!(null!=j&&j.is_authority)})},type:"primary"},v.a.createElement("img",{src:lt.a}),null!=j&&j.is_authority?"取消":"设为","官方"),Object(ge.v)()&&v.a.createElement(D.a,{onClick:function(){return B({is_excellent:!(null!=j&&j.is_excellent)})},type:"primary"},v.a.createElement("img",{src:ot.a}),null!=j&&j.is_excellent?"取消":"设为","精选")))),v.a.createElement("div",{className:it.a.scroll},(null==j||null===(t=j.videos)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.id)&&v.a.createElement("div",{className:it.a.video},v.a.createElement(o.a,{tip:"正在转码,请稍等...",spinning:!(null!=j&&null!==(r=j.videos)&&void 0!==r&&null!==(i=r[0])&&void 0!==i&&i.transcoded)},v.a.createElement(xt.a,{poster:null==j||null===(a=j.videos)||void 0===a||null===(s=a[0])||void 0===s?void 0:s.cover_url,src:(null==j||null===(f=j.videos)||void 0===f||null===(h=f[0])||void 0===h?void 0:h.play_url)||"",videoId:null==j||null===(g=j.videos)||void 0===g||null===(y=g[0])||void 0===y?void 0:y.id,logWatchHistory:function(){}}))),v.a.createElement(te.a,{className:it.a.html,value:(null==j?void 0:j.content)||""}),v.a.createElement("div",{onClick:function(){return G(j)},className:it.a.g},v.a.createElement("img",{className:"mr10",src:(null!=j&&j.user_liker,ut.a)}),v.a.createElement("span",null,null==j?void 0:j.praises_count)),v.a.createElement(Et,{onOk:function(){U(!1),T()},active:b,identifier:_})),v.a.createElement("div",{className:it.a.btns},v.a.createElement(D.a,{onClick:function(){return k()},type:"primary",ghost:!0},"关闭"),A[0]&&v.a.createElement(D.a,{onClick:function(e){return S(e,"prev")},style:{marginLeft:20},type:"primary"},"上一题解"),A[1]&&v.a.createElement(D.a,{onClick:function(e){return S(e,"next")},style:{marginLeft:20},type:"primary"},"下一题解"))))},wt=n("3tLw"),kt=n.n(wt),Tt=n("ek7X"),Ot=n("0NbB"),Ct=function(e){var t=e.identifier,n=e.tabStatus,r=e.setFilterListTotal,i=e.setListStatus,a={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},l=Object(m.useState)(Object(d.a)({},a)),f=Object(u.a)(l,2),h=f[0],g=f[1],y=Object(m.useState)(!1),b=Object(u.a)(y,2),_=b[0],E=b[1],S=Object(m.useState)(0),w=Object(u.a)(S,2),k=w[0],T=w[1],O=Object(m.useState)(1),C=Object(u.a)(O,2),A=C[0],L=C[1],D=Object(m.useState)(null),I=Object(u.a)(D,2),N=I[0],M=I[1],P=Object(m.useState)([]),j=Object(u.a)(P,2),U=j[0],B=j[1],G=Object(m.useState)([!0,!0]),z=Object(u.a)(G,2),H=z[0],K=z[1],V=Object(m.useState)(0),W=Object(u.a)(V,2),q=W[0],X=W[1],Y=Object(m.useRef)(null);Object(m.useEffect)((function(){ne()}),[n]),Object(m.useEffect)((function(){J()}),[N]),Object(m.useEffect)((function(){Z(Object(d.a)({},a)),ne()}),[t]),Object(m.useEffect)((function(){return window.addEventListener("resize",Q),i(q),function(){window.removeEventListener("resize",Q)}}),[q]);var J=function(){var e=Object(c.a)(p.a.mark((function e(){var t,n;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N){e.next=3;break}return K([!0,!0]),e.abrupt("return");case 3:t=[!0,!0],0===(n=null==U?void 0:U.findIndex((function(e){return e.id===N})))&&1===h.page&&(t[0]=!1),(h.page-1)*h.limit+(n+1)===h.total&&(t[1]=!1),K(t);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(){if(q){var e,t=window.innerWidth-(null===(e=Y.current)||void 0===e?void 0:e.clientWidth);T(t)}},Z=function(){var e=Object(c.a)(p.a.mark((function e(n){var i,a,o,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!0),e.next=3,Object(x.f)(t,n);case 3:return 0===(null==(i=e.sent)?void 0:i.status)&&(B((null==i||null===(a=i.data)||void 0===a?void 0:a.articles)||[]),g(Object(d.a)(Object(d.a)({},n),{},{total:null==i||null===(o=i.data)||void 0===o?void 0:o.articles_count})),r(null==i||null===(s=i.data)||void 0===s?void 0:s.articles_count)),E(!1),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ee=function(){var e;document.getElementsByClassName("btn-resize")[0].style.visibility="hidden";var t=window.innerWidth-(null===(e=Y.current)||void 0===e?void 0:e.clientWidth);T(t)},te=function(e){ee(),M(null==e?void 0:e.id),X(3)},ne=function(){document.getElementsByClassName("btn-resize")[0].style.visibility="visible",T(0),X(0),M(null)},re=function(){var e=Object(c.a)(p.a.mark((function e(n){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.c)(t,{active:null==n?void 0:n.id});case 2:0===e.sent.status&&(Z(h),L(A+1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=Object(c.a)(p.a.mark((function e(n){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.e)(t,{active:null==n?void 0:n.id});case 2:0===e.sent.status&&(Z(h),L(A+1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=Object(c.a)(p.a.mark((function e(n){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.i)(t,{active:null==n?void 0:n.id});case 2:0===e.sent.status&&(ne(),Z(h));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=Object(c.a)(p.a.mark((function e(t,n){var r,i,a,o,l,c,u,f,m,v,y;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null==U?void 0:U.findIndex((function(e){return e.id===N})),console.log(r,n,22),"prev"!==n){e.next=21;break}if(void 0!==r){e.next=6;break}return s.b.warn("上一题解不存在"),e.abrupt("return");case 6:if(0!==r){e.next=19;break}if(1!==h.page){e.next=10;break}return s.b.warn("上一题解不存在"),e.abrupt("return");case 10:if(1===h.page){e.next=17;break}return h.page=h.page-1,g(Object(d.a)({},h)),e.next=15,Z(h);case 15:0===(null==(i=e.sent)?void 0:i.status)&&(c=null==i||null===(a=i.data)||void 0===a?void 0:a.articles[(null==i||null===(o=i.data)||void 0===o||null===(l=o.articles)||void 0===l?void 0:l.length)-1],M(null==c?void 0:c.id),console.log(t.target,555));case 17:e.next=21;break;case 19:u=U[r-1],M(null==u?void 0:u.id);case 21:if("next"!==n){e.next=39;break}if(void 0!==r){e.next=25;break}return s.b.warn("下一题解不存在"),e.abrupt("return");case 25:if((h.page-1)*h.limit+(r+1)!==h.total){e.next=28;break}return s.b.warn("下一题解不存在"),e.abrupt("return");case 28:if(r+1!==h.limit){e.next=37;break}return h.page=h.page+1,g(Object(d.a)({},h)),e.next=33,Z(h);case 33:0===(null==(f=e.sent)?void 0:f.status)&&(v=null==f||null===(m=f.data)||void 0===m?void 0:m.articles[0],M(null==v?void 0:v.id)),e.next=39;break;case 37:y=U[r+1],M(null==y?void 0:y.id);case 39:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return v.a.createElement("div",{className:Le.a.wrap,ref:Y},v.a.createElement("div",{className:Le.a.head},v.a.createElement("div",{className:Le.a.sort,onClick:function(){null===(null==h?void 0:h.sort_direction)?h.sort_direction="asc":"asc"===(null==h?void 0:h.sort_direction)?h.sort_direction="desc":"desc"===(null==h?void 0:h.sort_direction)&&(h.sort_direction=null),h.page=1,ne(),g(Object(d.a)({},h)),Z(h)}},v.a.createElement("span",null,"最新"),v.a.createElement("aside",null,v.a.createElement(Tt.a,{style:{color:"asc"===(null==h?void 0:h.sort_direction)?"#0152d9":"#bfbfbf"}}),v.a.createElement(Ot.a,{style:{color:"desc"===(null==h?void 0:h.sort_direction)?"#0152d9":"#bfbfbf"}}))),v.a.createElement(R.a.Search,{value:h.save_search,className:Le.a["oj-width-input"],placeholder:"搜索题解",onChange:function(e){h.save_search=e.target.value,g(Object(d.a)({},h))},onSearch:function(){h.page=1,h.search=null==h?void 0:h.save_search,ne(),g(Object(d.a)({},h)),Z(h)}}),v.a.createElement("div",{onClick:function(){ee(),X(1)},className:Le.a.btn},v.a.createElement("img",{src:kt.a}),"写题解")),v.a.createElement("div",{className:Le.a.listWarp},v.a.createElement(o.a,{spinning:_,className:"mt20"},null==U?void 0:U.map((function(e,t){var n=!0;return t+1===U.length&&0!==t&&(n=!1),v.a.createElement(He,{active:N,key:e.id,data:e,showLine:n,onClick:te,onAssist:re,onHide:ie})})),0===(null==U?void 0:U.length)&&v.a.createElement($.a,{customText:"暂时还没有相关数据哦!"}))),v.a.createElement(F.a,{className:Le.a.pagination,showTotal:function(e){return v.a.createElement("span",{style:{color:"#656F87"}},"共",v.a.createElement("span",{className:"c-light-primary"},e),"条数据")},total:h.total,showSizeChanger:!1,current:null==h?void 0:h.page,onChange:function(e){h.page=e,g(Object(d.a)({},h)),Z(h)},hideOnSinglePage:!0,showQuickJumper:!0}),q>0&&v.a.createElement("div",{className:Le.a.fixedRight,style:{width:k}},1===q&&v.a.createElement(tt,{identifier:t,onClose:ne,onOk:function(e){X(3),M(e),h.page=1,g(Object(d.a)({},h)),Z(h)}}),2===q&&v.a.createElement(tt,{active:N,identifier:t,onClose:ne,onOk:function(e){X(3),M(e),g(Object(d.a)({},h)),Z(h)}}),3===q&&v.a.createElement(St,{btnShowStatus:H,onArticlesSkip:oe,detailsIndex:A,active:N,identifier:t,onClose:ne,onOk:function(e){g(Object(d.a)({},h)),Z(h)},onEdit:function(e){ee(),M(null==e?void 0:e.id),X(2)},onAssist:re,onDelete:ae})))},At=n("VEzc"),Lt=n.n(At),Dt=function(e){var t,n=e.visible,r=e.onVisible,i=e.value,l=e.onChange,f=e.setIndex,h=Object(m.useState)({page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null}),g=Object(u.a)(h,2),y=g[0],E=g[1],S=Object(m.useState)([]),w=Object(u.a)(S,2),k=w[0],T=w[1],O=Object(m.useState)([]),C=Object(u.a)(O,2),A=C[0],L=C[1],D=Object(m.useState)(!1),I=Object(u.a)(D,2),N=I[0],M=I[1],P=Object(m.useRef)([]),j=Object(m.useRef)(null),U=Object(b.i)();Object(m.useEffect)((function(){return null!=U&&U.id&&(j.current=setInterval((function(){B(30)}),3e4)),function(){clearInterval(j.current)}}),[]);var B=function(){var e=Object(c.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.r)(null==U?void 0:U.id,{practice_time:t});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Object(m.useEffect)((function(){K(y),H()}),[]),Object(m.useEffect)((function(){return window.addEventListener("click",z),function(){window.removeEventListener("click",z)}}),[null==U?void 0:U.save_identifier,n]),Object(m.useEffect)((function(){var e=P.current.findIndex((function(e){return e.identifier===(null==U?void 0:U.save_identifier)})),t=P.current[e-1],n=P.current[e+1],r=document.getElementById("oj-prev"),i=document.getElementById("oj-next");r.style.display=t?"block":"none",i.style.display=n?"block":"none"}),[null==U?void 0:U.save_identifier,P.current]);var G=function(e,t){if(e.id===t)return e;for(var n=0,r=e;r=r.parentNode;n++){if(r.id===t)return r;if(r==document.documentElement)return!1}},z=function(){var e=Object(c.a)(p.a.mark((function e(t){var i,a,o;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G(t.target,"oj-drawer")&&n&&r(!1),i=P.current.findIndex((function(e){return e.identifier===(null==U?void 0:U.save_identifier)})),a=P.current[i-1],o=P.current[i+1],"oj-prev"!==t.target.id){e.next=14;break}if(a&&-1!==i){e.next=8;break}return s.b.warn("上一题不存在"),e.abrupt("return");case 8:return t.target.style.pointerEvents="none",t.target.style.cursor="not-allowed",e.next=12,V(null==a?void 0:a.identifier);case 12:f("0"),setTimeout((function(){t.target.style.pointerEvents="auto",t.target.style.cursor="pointer"}),400);case 14:if("oj-next"!==t.target.id&&"oj-modal-next"!==t.target.id){e.next=24;break}if(o&&-1!==i){e.next=18;break}return s.b.warn("下一题不存在"),e.abrupt("return");case 18:return t.target.style.pointerEvents="none",t.target.style.cursor="not-allowed",e.next=22,V(null==o?void 0:o.identifier);case 22:f("0"),setTimeout((function(){t.target.style.pointerEvents="auto",t.target.style.cursor="pointer"}),400);case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Object(m.useEffect)((function(){l(null==U?void 0:U.save_identifier);var e=A.findIndex((function(e){return e.some((function(e){return e.identifier===(null==U?void 0:U.save_identifier)}))}));E(-1===e?Object(d.a)(Object(d.a)({},y),{},{page:1}):Object(d.a)(Object(d.a)({},y),{},{page:e+1}))}),[null==U?void 0:U.save_identifier,A]);var H=function(){var e=Object(c.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ce.a)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:t=e.sent,T(t.tag_disciplines||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),K=function(){var e=Object(c.a)(p.a.mark((function e(t){var n,r,i,a,o,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,Object(x.p)(t);case 3:if(null!=(n=e.sent)&&n.practices_list){for(i=null==n||null===(r=n.practices_list)||void 0===r?void 0:r.length,a=[],o=0;o<i;o+=null==y?void 0:y.per_page)a.push(null==n||null===(s=n.practices_list)||void 0===s?void 0:s.slice(o,o+(null==y?void 0:y.per_page)));E(Object(d.a)(Object(d.a)({},y),{},{total:null==n?void 0:n.practices_count})),P.current=(null==n?void 0:n.practices_list)||[],L(a)}M(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=Object(c.a)(p.a.mark((function e(t,n){var r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ce.a)("/api/practices/".concat(t,"/start"),{method:"get"});case 2:0===(null==(r=e.sent)?void 0:r.status)&&_.d.push("/problems/".concat(null==r?void 0:r.identifier,"/oj/").concat(t));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return v.a.createElement("div",{className:Lt.a.wrap,id:"oj-drawer",style:{left:n?0:-700}},v.a.createElement("div",{className:Lt.a.head},v.a.createElement("div",{className:Lt.a.title},"题目列表"),v.a.createElement(R.a.Search,{value:null==y?void 0:y.save_search,placeholder:"请输入题目名称搜索",style:{width:178,marginLeft:"auto",marginRight:10},onChange:function(e){y.save_search=e.target.value,E(Object(d.a)({},y))},onSearch:function(){y.page=1,y.search=y.save_search,E(Object(d.a)({},y)),K(y)}}),v.a.createElement(a.a,{value:null==y?void 0:y.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"选择知识点",showSearch:!1,showArrow:!0,getPopupContainer:function(e){return e.parentNode},maxTagTextLength:2,maxTagCount:2,onChange:function(e){y.page=1,y.tag_discipline_id=e,E(Object(d.a)({},y)),K(y)}},k.map((function(e){return v.a.createElement(a.a.Option,{key:e.id,value:e.id},e.name)}))),v.a.createElement(a.a,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"难度",getPopupContainer:function(e){return e.parentNode},value:null==y?void 0:y.difficulty,onChange:function(e){y.page=1,y.difficulty="number"==typeof e?e:null,E(Object(d.a)({},y)),K(y)}},v.a.createElement(a.a.Option,{value:1},"简单"),v.a.createElement(a.a.Option,{value:2},"适中"),v.a.createElement(a.a.Option,{value:3},"困难"))),v.a.createElement("div",{className:Lt.a.content},v.a.createElement(o.a,{spinning:N},null==A||null===(t=A[y.page-1])||void 0===t?void 0:t.map((function(e){return v.a.createElement("div",{key:e.identifier,className:Lt.a.list,onClick:function(t){return V(e.identifier,t)}},v.a.createElement("i",{style:{visibility:i===e.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),v.a.createElement("span",{style:{fontWeight:i===e.identifier?"bold":400,color:i===e.identifier?"#ffffff":"#bac4cd"},title:null==e?void 0:e.name},e.name),1===(null==e?void 0:e.difficulty)&&v.a.createElement("b",{style:{color:"#2FA34F"}},"简单"),2===(null==e?void 0:e.difficulty)&&v.a.createElement("b",{style:{color:"#0152d9"}},"适中"),3===(null==e?void 0:e.difficulty)&&v.a.createElement("b",{style:{color:"#FA6400"}},"困难"))})))),v.a.createElement("div",{className:Lt.a.footer},v.a.createElement(F.a,{showTotal:function(e){return v.a.createElement("span",{style:{color:"#656F87"}},"共",v.a.createElement("span",{className:"c-light-primary"},e),"条数据")},total:y.total,pageSize:null==y?void 0:y.per_page,current:null==y?void 0:y.page,showSizeChanger:!1,onChange:function(e){y.page=e,E(Object(d.a)({},y))},showQuickJumper:!0,hideOnSinglePage:!0})))},It=function(e){var t,n=e.hack,r=e.onTriggerPraise,i=e.topicId,a=e.page,o=e.onPageChange,s=e.user,c=e.submitRecords,d=e.submitting,f=e.submitResult,h=Object(b.h)(),p=Object(m.useState)((null==h||null===(t=h.query)||void 0===t?void 0:t.tab)||"0"),g=Object(u.a)(p,2),y=g[0],_=g[1],E=Object(m.useState)(0),x=Object(u.a)(E,2),S=x[0],w=x[1],k=Object(m.useState)(0),T=Object(u.a)(k,2),O=T[0],C=T[1],A=Object(m.useState)(0),L=Object(u.a)(A,2),D=L[0],I=L[1],R=Object(m.useState)(),N=Object(u.a)(R,2),M=N[0],P=N[1],F=Object(m.useState)(!1),U=Object(u.a)(F,2),B=U[0],G=U[1];function z(e){var t=e.target.id;"3"!==y||t===y||1!==O&&2!==O?_(t):l.a.confirm({centered:!0,width:500,okText:"确定",cancelText:"取消",title:"注意",icon:null,className:"custom-modal-divider",content:"您正在编写题解,点击关闭后,您的题解内容将不会进行保存。",onOk:function(){_(t)}})}return Object(m.useEffect)((function(){return ie.a.subscribe("to-commit-info",(function(){_("1")}))}),[]),v.a.createElement("div",{className:j.a["left-panel"]},v.a.createElement("ul",{className:"".concat(j.a["s-navs"]," ").concat(j.a["bg-white"]," ").concat(j.a.b1)},v.a.createElement("li",{className:"mr40 current"},v.a.createElement("img",{onClick:function(){return G(!0)},src:oe.a})),v.a.createElement("li",{className:j.a["oj-mr"]},v.a.createElement("a",{className:"0"===y?j.a.active:"",id:"0",onClick:z},"任务描述")),v.a.createElement("li",{className:j.a["oj-mr"]},v.a.createElement("a",{className:"3"===y?j.a.active:"",id:"3",onClick:z},"题解",D?"(".concat(D,")"):"")),v.a.createElement("li",{className:j.a["oj-mr"]},v.a.createElement("a",{className:"2"===y?j.a.active:"",id:"2",onClick:z},"评论",S?"(".concat(S,")"):"")),v.a.createElement("li",null,v.a.createElement("a",{className:"1"===y?j.a.active:"",id:"1",onClick:z},"提交记录"))),v.a.createElement("div",{className:"".concat(j.a["tab-panel-body"]," ").concat("0"===y?"":"hide"),style:{padding:"0 0 0 16px"}},v.a.createElement(re,{hack:n,onTriggerPraise:r,toDiscuss:function(){_("2")}})),v.a.createElement("div",{className:"".concat(j.a["tab-panel-body"]," ").concat("1"===y?"":"hide")},null!=c&&c.records_count?v.a.createElement(Y,{page:a,onPageChange:o,topicId:i,submitting:d,submitRecords:c,submitResult:f}):v.a.createElement($.a,null)),v.a.createElement("div",{className:"".concat(j.a["tab-panel-body"]," ").concat("2"===y?"":"hide"),style:{padding:0}},v.a.createElement(Ce,{setDiscussTotal:w,user:s,identifier:n.identifier,hack:n,onTriggerPraise:r})),v.a.createElement("div",{className:"".concat(j.a["tab-panel-body"]," ").concat("3"===y?"":"hide"),style:{padding:0}},v.a.createElement(Ct,{setListStatus:C,setFilterListTotal:I,tabStatus:y,identifier:n.identifier})),v.a.createElement(Dt,{visible:B,setIndex:_,onVisible:function(e){return G(e)},value:M,onChange:function(e){return P(e)}}))},Rt=function(e){return 1===String(e).length?"0".concat(e):e},Nt=function(e){var t=e.className,n=void 0===t?"":t,r=e.onChange,i=Object(m.useState)(0),a=Object(u.a)(i,2),o=a[0],s=a[1];Object(m.useEffect)((function(){var e=setTimeout((function(){s(o+1e3)}),1e3);return r(o+1e3),function(){clearInterval(e)}}),[o]);var l=parseInt(o/36e5)||"00",c=parseInt(o%36e5/6e4)||"00",d=parseInt(o%6e4/1e3)||"00";return v.a.createElement("div",{className:n},Rt(l),":",Rt(c),":",Rt(d))},Mt=n("oFv4"),Pt=n.n(Mt),jt=n("S/kP"),Ft=n.n(jt),Ut=n("t/PP"),Bt=n.n(Ut),Gt=n("LvDl"),zt=n.n(Gt),Ht=n("P5Jw"),Kt=(f.a.Countdown,{Java:"java",C:"c",Python:"py","C++":"c"});function Vt(){return(new Date).getTime()}!function(e){e[e.SET_LOADING=0]="SET_LOADING",e[e.GET_DATA=1]="GET_DATA",e[e.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",e[e.SET_DATA=3]="SET_DATA",e[e.SET_DEBUGING=4]="SET_DEBUGING",e[e.SET_SUBMITING=5]="SET_SUBMITING",e[e.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",e[e.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",e[e.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",e[e.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",e[e.SET_PAGE=10]="SET_PAGE",e[e.GET_LANGUAGE=11]="GET_LANGUAGE",e[e.GET_DRAWER=12]="GET_DRAWER"}(Oe||(Oe={}));var Wt={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function qt(e,t){switch(t.type){case Oe.GET_DATA:return Object(d.a)(Object(d.a)({},e),t.payload);case Oe.SET_DATA:return Object(d.a)(Object(d.a)({},e),{},{data:t.payload});case Oe.SET_LOADING:return Object(d.a)(Object(d.a)({},e),{},{loading:t.payload});case Oe.GET_LANGUAGE:return Object(d.a)(Object(d.a)({},e),{},{languageList:t.payload});case Oe.GET_DRAWER:return Object(d.a)(Object(d.a)({},e),{},{drawerData:t.payload});case Oe.SET_SHOW_NOTE:return Object(d.a)(Object(d.a)({},e),{},{showNote:t.payload});case Oe.SET_DEBUGING:return Object(d.a)(Object(d.a)({},e),{},{debuging:t.payload});case Oe.SET_SUBMITING:return Object(d.a)(Object(d.a)({},e),{},{submitting:t.payload});case Oe.GET_SUBMIT_RECORDS:return Object(d.a)(Object(d.a)({},e),{},{submitRecords:t.payload});case Oe.SET_PAGE:return Object(d.a)(Object(d.a)({},e),{},{submitRecordPage:t.payload});case Oe.SET_EXECUTE_MESSAGE:return Object(d.a)(Object(d.a)({},e),{},{executingMessage:t.payload});case Oe.SET_EXECUTE_RESULT:case Oe.SET_SUBMIT_RESULT:return Object(d.a)(Object(d.a)({},e),t.payload);default:throw new Error}}t.default=function(e){e.children;var t,n,r=Object(m.useReducer)(qt,Wt),i=Object(u.a)(r,2),a=i[0],f=i[1],h=Object(b.i)().id,k=Object(b.g)(),T=Object(b.h)(),C=a.languageValue,L=a.languageList,D=a.loading,I=a.data,R=a.debugResult,N=a.submitResult,M=a.submitRecords,P=a.submitRecordPage,j=a.showNote,F=a.debuging,U=a.submitting,B=a.executingMessage,G=Object(m.useState)("#FFF"),z=Object(u.a)(G,2),H=(z[0],z[1],Object(m.useState)(null)),K=Object(u.a)(H,2),V=(K[0],K[1],Object(m.useState)({})),W=Object(u.a)(V,2),q=(W[0],W[1],Object(m.useState)(!1)),X=Object(u.a)(q,2),Y=X[0],$=X[1],J=Object(m.useRef)(null),Q=Object(m.useRef)(null),Z=null==I?void 0:I.user,ee=null==I?void 0:I.hack;Object(m.useEffect)((function(){return Object(_.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),Object(_.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){Object(_.c)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),Object(_.c)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}}),[]),Object(m.useEffect)((function(){setTimeout((function(){document.title="在线刷题"}),400)})),Object(m.useEffect)((function(){if(Y){var e,t=document.getElementById("oj-next"),n=document.getElementById("oj-modal-next");"none"===(null==t||null===(e=t.style)||void 0===e?void 0:e.display)?n.style.display="none":n.style.display="block"}}),[Y]),Object(m.useEffect)((function(){function e(){return(e=Object(c.a)(p.a.mark((function e(){var t,n,r,i,a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.m)(h);case 2:401===(t=e.sent).status?document.location.href="/user/login":(t.hack=t.practice,t.hack.code=O.Base64.decode(null==t||null===(n=t.hack)||void 0===n?void 0:n.code),a="".concat(null==Z?void 0:Z.login,"-language"),localStorage.getItem(a)&&(t.hack.language=localStorage.getItem(a)),Q.current=zt.a.cloneDeep(t),Q.current.language=null==t||null===(r=t.hack)||void 0===r?void 0:r.language,f({type:Oe.GET_DATA,payload:{loading:!1,data:t}}),f({type:Oe.SET_SUBMIT_RESULT,payload:{languageValue:null==t||null===(i=t.hack)||void 0===i?void 0:i.language}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}h&&function(){e.apply(this,arguments)}()}),[h]),Object(m.useEffect)((function(){f({type:Oe.SET_SUBMIT_RESULT,payload:{debugResult:void 0}}),ne(),$(!1)}),[h]),Object(m.useEffect)((function(){clearTimeout(J.current)}),[h]),Object(m.useEffect)((function(){!function(){te.apply(this,arguments)}()}),[h,P]);function te(){return(te=Object(c.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(x.o)(h,{limit:15,page:P});case 3:t=e.sent,f({type:Oe.GET_SUBMIT_RECORDS,payload:t}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function ne(){return re.apply(this,arguments)}function re(){return(re=Object(c.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(x.w)(h);case 3:t=e.sent,f({type:Oe.GET_LANGUAGE,payload:null==t?void 0:t.data}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function ae(e){return oe.apply(this,arguments)}function oe(){return(oe=Object(c.a)(p.a.mark((function e(t){var n,r,i,a,o,s;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(null===(n=window)||void 0===n||null===(r=n.location)||void 0===r||null===(i=r.pathname)||void 0===i||null===(a=i.split("/"))||void 0===a?void 0:a[2])||h,e.next=3,Object(x.v)(o,t||{code:O.Base64.encode(ee.code),language:C});case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){return(se=Object(c.a)(p.a.mark((function e(){var t,n,r,i,o;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!U){e.next=2;break}return e.abrupt("return");case 2:return f({type:Oe.SET_SUBMITING,payload:!0}),e.prev=3,ie.a.publish("to-commit-info"),e.next=7,ae();case 7:if(0!==e.sent.status){e.next=21;break}return o=function(){return(o=Object(c.a)(p.a.mark((function e(){var t,o,s,c,u,m;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.l)(h,"submit");case 2:if(t=e.sent,o=t.status,s=t.data,c=Vt(),u=c-r>1e3*(n+3),0===o||u||setTimeout(i,1e3),!u){e.next=12;break}return l.a.error({centered:!0,okText:"知道啦",content:"评测代码超时"}),f({type:Oe.SET_SUBMITING,payload:!1}),e.abrupt("return");case 12:if(0!==o){e.next=19;break}return 2===s.status&&l.a.error({centered:!0,okText:"知道啦",content:"评测代码超时"}),e.next=16,Object(x.o)(h,{limit:15,page:P});case 16:m=e.sent,f({type:Oe.SET_SUBMIT_RESULT,payload:Object(d.a)(Object(d.a)({},a),{},{submitResult:s,submitting:!1,submitRecords:m})}),0===(null==s?void 0:s.status)&&$(!0);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)},i=function(){return o.apply(this,arguments)},t={},e.next=14,Object(x.s)(h,t);case 14:if(-1!==e.sent.status){e.next=18;break}return window.parent.location.href="/classrooms/".concat(T.query.coursesId,"/exercise/").concat(T.query.exercisesId,"/detail"),e.abrupt("return");case 18:n=ee.time_limit,r=Vt(),i();case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(3),f({type:Oe.SET_SUBMITING,payload:!1});case 26:case"end":return e.stop()}}),e,null,[[3,23]])})))).apply(this,arguments)}function le(){return(le=Object(c.a)(p.a.mark((function e(){var t,n,r,i,o;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.debuging=!0,f({type:Oe.SET_DEBUGING,payload:!0}),e.prev=2,e.next=5,ae();case 5:if(0!==e.sent.status){e.next=21;break}return o=function(){return(o=Object(c.a)(p.a.mark((function e(){var n,o,s,c,u,m;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.l)(h,"debug");case 2:if(n=e.sent,o=n.status,s=n.message,c=n.data,u=Vt(),m=u-r>1e3*(t+3),0===o||m||(f({type:Oe.SET_EXECUTE_MESSAGE,payload:s}),setTimeout(i,1e3)),!m){e.next=13;break}return l.a.error({centered:!0,okText:"知道啦",content:"调试代码超时"}),f({type:Oe.SET_DEBUGING,payload:!1}),e.abrupt("return");case 13:0===o&&(f({type:Oe.SET_DEBUGING,payload:!1}),2===c.status&&l.a.error({centered:!0,okText:"知道啦",content:"调试代码超时"}),f({type:Oe.SET_EXECUTE_RESULT,payload:Object(d.a)(Object(d.a)({},a),{},{debugResult:c,debuging:!1})}));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)},i=function(){return o.apply(this,arguments)},t=ee.time_limit,n={input:encodeURIComponent(I.test_case.input)},e.next=13,Object(x.h)(h,n);case 13:if(-1!==e.sent.status){e.next=17;break}return window.parent.location.href="/classrooms/".concat(T.query.coursesId,"/exercise/").concat(T.query.exercisesId,"/detail"),e.abrupt("return");case 17:r=Vt(),i(),e.next=22;break;case 21:f({type:Oe.SET_DEBUGING,payload:!1});case 22:e.next=27;break;case 24:e.prev=24,e.t0=e.catch(2),console.log(e.t0);case 27:return e.prev=27,e.finish(27);case 29:case"end":return e.stop()}}),e,null,[[2,24,27,29]])})))).apply(this,arguments)}function ce(e){var t;clearTimeout(J.current),J.current=setTimeout((function(){var t;ae({code:O.Base64.encode(e),language:null==Q||null===(t=Q.current)||void 0===t?void 0:t.language})}),2e3),f({type:Oe.SET_DATA,payload:Object(d.a)(Object(d.a)({},null==Q?void 0:Q.current),{},{hack:Object(d.a)(Object(d.a)({},null==Q||null===(t=Q.current)||void 0===t?void 0:t.hack),{},{code:e})})})}var ue=function(){var e=Object(c.a)(p.a.mark((function e(t){var n,r,i,a;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f({type:Oe.SET_LOADING,payload:!0}),e.next=3,ae();case 3:if(0!==e.sent.status){e.next=14;break}return f({type:Oe.SET_SUBMIT_RESULT,payload:{languageValue:t}}),Q.current.language=t,n="".concat(null==Z?void 0:Z.login,"-language"),localStorage.setItem(n,t),e.next=11,Object(x.w)(h);case 11:0===(r=e.sent).status&&(a=null==r||null===(i=r.data)||void 0===i?void 0:i.find((function(e){return e.language===t})),ce(O.Base64.decode(a.code))),setTimeout((function(){f({type:Oe.SET_LOADING,payload:!1})}),300);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function de(){return(de=Object(c.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(x.q)(h,{language:C});case 3:401===(t=e.sent).status?k.replace("/login",{from:T.pathname}):(ce(O.Base64.decode(t.code)),ne()),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function fe(){return(fe=Object(c.a)(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.b)(h,t);case 2:f({type:Oe.GET_DATA,payload:{showNote:!1,data:Object(d.a)(Object(d.a)({},I),{},{hack:Object(d.a)(Object(d.a)({},ee),{},{notes:t.notes})})}});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var he={input:null==I||null===(t=I.test_case)||void 0===t?void 0:t.input,language:null==ee?void 0:ee.language,code:null==ee?void 0:ee.code,title:"main."+Kt[null==ee?void 0:ee.language],modify_code:null==ee?void 0:ee.modify_code,notes:null==ee?void 0:ee.notes,debugResult:R,debuging:F,submitting:U,executingMessage:B,id:h,languageValue:C,languageList:L,onChangeLanguage:ue,onCancelNote:function(){f({type:Oe.SET_SHOW_NOTE,payload:!1})},onAddNote:function(e){return fe.apply(this,arguments)},showNote:j,onShowNote:function(){f({type:Oe.SET_SHOW_NOTE,payload:!0})},onSubmitCode:function(){return se.apply(this,arguments)},onChangeCode:ce,onChangeInput:function(e){var t=e.target.value;f({type:Oe.SET_DATA,payload:Object(d.a)(Object(d.a)({},I),{},{test_case:{input:t}})})},onDebugCode:function(){return le.apply(this,arguments)},onResetCode:function(){return de.apply(this,arguments)},onSyncCode:function(){l.a.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:v.a.createElement("p",null,"初始代码有修改,更新后将覆盖现有代码哦~ ",v.a.createElement("br",null),"请将您编辑的代码保存至本地,以防丢失"),onOk:function(){return Object(c.a)(p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.t)(h,{language:C});case 2:401===(t=e.sent).status?k.replace("/login",{from:T.pathname}):ce(O.Base64.decode(t.code));case 4:case"end":return e.stop()}}),e)})))()}})},onUpdateCode:ae};function pe(){return(pe=Object(c.a)(p.a.mark((function e(){var t,n,r;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(x.u)(ee.id,{container_type:"Hack",type:1});case 2:t=e.sent,n=t.praise_count,r=Object(d.a)(Object(d.a)({},I),{},{hack:Object(d.a)(Object(d.a)({},ee),{},{praises_count:n,user_praise:!ee.user_praise})}),f({type:Oe.SET_DATA,payload:r});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var me={topicId:h,submitResult:N,submitRecords:M,submitting:U,page:P,onPageChange:function(e){f({type:Oe.SET_PAGE,payload:e})},hack:ee,user:null==I?void 0:I.user,onTriggerPraise:function(){return pe.apply(this,arguments)}};return console.log(I,null==Q?void 0:Q.current,"data--------"),v.a.createElement(v.a.Fragment,null,v.a.createElement(o.a,{className:"oj-custom-large-spin",size:"large",spinning:D},I?v.a.createElement("div",{className:"oj-custom-warp"},v.a.createElement("header",{className:A.a.header,style:{minWidth:1200}},v.a.createElement("div",null,v.a.createElement("img",{src:"".concat(w.a.IMG_SERVER,"/images/").concat(Z.image_url),alt:"user",width:30}),v.a.createElement("span",null,Z.name)),v.a.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},v.a.createElement("div",null,ee.name),v.a.createElement(Nt,{onChange:function(e){},className:"font12 c-grey-999"})),v.a.createElement(Ht.CopyToClipboard,{text:"".concat(null===(n=window.location)||void 0===n?void 0:n.origin,"/problems/").concat(ee.identifier,"/share"),onCopy:function(){return s.b.success("复制题目链接成功")}},v.a.createElement("span",{className:A.a.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",v.a.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"分享题目")),ee.edit_privilege?v.a.createElement(E.a,{className:A.a.btn_back,to:"/problems/".concat(ee.identifier,"/ojedit"),style:{marginRight:10}}," ",v.a.createElement(g.a,null)," 编辑"):null,v.a.createElement(E.a,{className:A.a.btn_back,to:"/problems"}," ",v.a.createElement(y.a,null),"退出")),v.a.createElement(S.a,{hideResize:!0,className:"my-problems oj-problems",leftChild:v.a.createElement(It,me),rightChild:v.a.createElement(Yt,he)})):null),v.a.createElement(l.a,{centered:!0,closable:!1,width:680,footer:null,visible:Y,className:"oj-modal"},v.a.createElement("section",{className:"oj-modal-content"},v.a.createElement("div",{className:"oj-modal-head"},v.a.createElement("img",{src:Pt.a,alt:""}),v.a.createElement("i",{onClick:function(){return $(!1)},className:"iconfont icon-guanbi1"})),v.a.createElement("aside",null,v.a.createElement("img",{className:"mr30",src:Bt.a}),"运行时间: ",v.a.createElement("span",{style:{color:"#75d6ba",marginRight:100}},null==N?void 0:N.execute_time,"s"),"优于",v.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(null==N?void 0:N.time_better_than)||100,"%"),"的用户"),v.a.createElement("aside",{className:"mb50"},v.a.createElement("img",{src:Ft.a,className:"mr30"}),v.a.createElement("span",{className:"oj-modal-tt"},v.a.createElement("span",null,v.a.createElement("span",null,"占用内存: "),v.a.createElement("span",{className:"c-light-primary"},null==N?void 0:N.execute_memory,"kb")),v.a.createElement("span",null,v.a.createElement("span",null))),"优于",v.a.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(null==N?void 0:N.memory_better_than)||100,"%"),"的用户"),v.a.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"进入下一题"))))};function Xt(e){var t=e.languageValue,n=e.languageList,r=e.onChangeLanguage,i=(e.title,e.modify_code,e.onSyncCode,e.onShowCodeSetting),o=e.onResetCode;Object(b.h)();return v.a.createElement("div",{className:"action-bar"},v.a.createElement(a.a,{className:"oj-select",value:t,style:{width:100},placeholder:"选择语言",onChange:r},null==n?void 0:n.map((function(e){return v.a.createElement(a.a.Option,{key:e.language,value:e.language},e.language)}))),v.a.createElement("span",null),v.a.createElement("a",{title:"恢复初始代码",onClick:function(){l.a.confirm({title:"恢复初始代码",icon:v.a.createElement(k.a,null),content:"你在本文件中修改的内容将丢失,是否确定重新加载初始代码?",centered:!0,okText:"确定",cancelText:"取消",onOk:o})}},v.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),v.a.createElement("a",{onClick:i},v.a.createElement("i",{className:"iconfont icon-shezhi"})))}function Yt(e){var t=e.id,n=e.input,a=e.showNote,o=(e.onShowNote,e.notes),s=e.onCancelNote,l=e.onAddNote,c=e.debugResult,u=e.language,d=e.debuging,f=e.submitting,h=e.executingMessage,p=e.code,m=e.onSubmitCode,g=e.onDebugCode,y=e.onChangeCode,b=e.onChangeInput,_=(e.onUpdateCode,Object(i.a)(e,["id","input","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]));var E={id:t,input:n,debugResult:c,debuging:d,submitting:f,executingMessage:h,onDebugCode:g,onChangeCode:y,onSubmitCode:m,onChangeInput:b};return v.a.createElement("div",{className:"right-panel"},v.a.createElement(T.a,{language:u,value:p,onChange:y,ActionBarRender:function(e){return v.a.createElement(Xt,Object(r.a)({},_,{onShowCodeSetting:e}))}}),v.a.createElement("div",{className:"note-form-area ".concat(a?"active":"")},v.a.createElement(M,{onCancel:s,notes:o,callback:l})),v.a.createElement(L.b,E))}},WaYH:
/*!*********************************************************!*\
!*** ./node_modules/rc-tree/es/TreeNode.js + 1 modules ***!
\*********************************************************/
/*! exports provided: InternalTreeNode, default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/contextTypes.js because of ./node_modules/rc-tree/es/Tree.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/util.js because of ./node_modules/antd/es/tree/DirectoryTree.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-tree/es/utils/treeUtil.js because of ./node_modules/antd/es/tree/DirectoryTree.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("rePB"),i=n("Ff2n"),a=n("VTBJ"),o=n("1OyB"),s=n("vuIU"),l=n("JX7q"),c=n("Ji7U"),u=n("LK+K"),d=n("q1tI"),f=n("TSYQ"),h=n.n(f),p=n("sboe"),m=n("OZM5"),v=function(e){var t=e.prefixCls,n=e.level,i=e.isStart,a=e.isEnd;if(!n)return null;for(var o="".concat(t,"-indent-unit"),s=[],l=0;l<n;l+=1){var c;s.push(d.createElement("span",{key:l,className:h()(o,(c={},Object(r.a)(c,"".concat(o,"-start"),i[l+1]),Object(r.a)(c,"".concat(o,"-end"),a[l+1]),Object(r.a)(c,"".concat(o,"-end-first-level"),!l&&a[0]),c))}))}return d.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},s)},g=n("815F"),y=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).state={dragNodeHighlight:!1},e.onSelectorClick=function(t){(0,e.props.context.onNodeClick)(t,Object(g.b)(e.props)),e.isSelectable()?e.onSelect(t):e.onCheck(t)},e.onSelectorDoubleClick=function(t){(0,e.props.context.onNodeDoubleClick)(t,Object(g.b)(e.props))},e.onSelect=function(t){if(!e.isDisabled()){var n=e.props.context.onNodeSelect;t.preventDefault(),n(t,Object(g.b)(e.props))}},e.onCheck=function(t){if(!e.isDisabled()){var n=e.props,r=n.disableCheckbox,i=n.checked,a=e.props.context.onNodeCheck;if(e.isCheckable()&&!r){t.preventDefault();var o=!i;a(t,Object(g.b)(e.props),o)}}},e.onMouseEnter=function(t){(0,e.props.context.onNodeMouseEnter)(t,Object(g.b)(e.props))},e.onMouseLeave=function(t){(0,e.props.context.onNodeMouseLeave)(t,Object(g.b)(e.props))},e.onContextMenu=function(t){(0,e.props.context.onNodeContextMenu)(t,Object(g.b)(e.props))},e.onDragStart=function(t){var n=e.props.context.onNodeDragStart;t.stopPropagation(),e.setState({dragNodeHighlight:!0}),n(t,Object(l.a)(e));try{t.dataTransfer.setData("text/plain","")}catch(e){}},e.onDragEnter=function(t){var n=e.props.context.onNodeDragEnter;t.preventDefault(),t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragOver=function(t){var n=e.props.context.onNodeDragOver;t.preventDefault(),t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragLeave=function(t){var n=e.props.context.onNodeDragLeave;t.stopPropagation(),n(t,Object(l.a)(e))},e.onDragEnd=function(t){var n=e.props.context.onNodeDragEnd;t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(l.a)(e))},e.onDrop=function(t){var n=e.props.context.onNodeDrop;t.preventDefault(),t.stopPropagation(),e.setState({dragNodeHighlight:!1}),n(t,Object(l.a)(e))},e.onExpand=function(t){(0,e.props.context.onNodeExpand)(t,Object(g.b)(e.props))},e.setSelectHandle=function(t){e.selectHandle=t},e.getNodeState=function(){var t=e.props.expanded;return e.isLeaf()?null:t?"open":"close"},e.hasChildren=function(){var t=e.props.eventKey;return!!((e.props.context.keyEntities[t]||{}).children||[]).length},e.isLeaf=function(){var t=e.props,n=t.isLeaf,r=t.loaded,i=e.props.context.loadData,a=e.hasChildren();return!1!==n&&(n||!i&&!a||i&&r&&!a)},e.isDisabled=function(){var t=e.props.disabled;return!(!e.props.context.disabled&&!t)},e.isCheckable=function(){var t=e.props.checkable,n=e.props.context.checkable;return!(!n||!1===t)&&n},e.syncLoadData=function(t){var n=t.expanded,r=t.loading,i=t.loaded,a=e.props.context,o=a.loadData,s=a.onNodeLoad;r||o&&n&&!e.isLeaf()&&(e.hasChildren()||i||s(Object(g.b)(e.props)))},e.renderSwitcher=function(){var t=e.props,n=t.expanded,r=t.switcherIcon,i=e.props.context,o=i.prefixCls,s=i.switcherIcon,l=r||s;if(e.isLeaf())return d.createElement("span",{className:h()("".concat(o,"-switcher"),"".concat(o,"-switcher-noop"))},"function"==typeof l?l(Object(a.a)(Object(a.a)({},e.props),{},{isLeaf:!0})):l);var c=h()("".concat(o,"-switcher"),"".concat(o,"-switcher_").concat(n?"open":"close"));return d.createElement("span",{onClick:e.onExpand,className:c},"function"==typeof l?l(Object(a.a)(Object(a.a)({},e.props),{},{isLeaf:!1})):l)},e.renderCheckbox=function(){var t=e.props,n=t.checked,r=t.halfChecked,i=t.disableCheckbox,a=e.props.context.prefixCls,o=e.isDisabled(),s=e.isCheckable();if(!s)return null;var l="boolean"!=typeof s?s:null;return d.createElement("span",{className:h()("".concat(a,"-checkbox"),n&&"".concat(a,"-checkbox-checked"),!n&&r&&"".concat(a,"-checkbox-indeterminate"),(o||i)&&"".concat(a,"-checkbox-disabled")),onClick:e.onCheck},l)},e.renderIcon=function(){var t=e.props.loading,n=e.props.context.prefixCls;return d.createElement("span",{className:h()("".concat(n,"-iconEle"),"".concat(n,"-icon__").concat(e.getNodeState()||"docu"),t&&"".concat(n,"-icon_loading"))})},e.renderSelector=function(){var t,n,r=e.state.dragNodeHighlight,i=e.props,a=i.title,o=i.selected,s=i.icon,l=i.loading,c=i.data,u=e.props.context,f=u.prefixCls,p=u.showIcon,m=u.icon,v=u.draggable,g=u.loadData,y=u.titleRender,b=e.isDisabled(),_="".concat(f,"-node-content-wrapper");if(p){var E=s||m;t=E?d.createElement("span",{className:h()("".concat(f,"-iconEle"),"".concat(f,"-icon__customize"))},"function"==typeof E?E(e.props):E):e.renderIcon()}else g&&l&&(t=e.renderIcon());n="function"==typeof a?a(c):y?y(c):a;var x=d.createElement("span",{className:"".concat(f,"-title")},n);return d.createElement("span",{ref:e.setSelectHandle,title:"string"==typeof a?a:"",className:h()("".concat(_),"".concat(_,"-").concat(e.getNodeState()||"normal"),!b&&(o||r)&&"".concat(f,"-node-selected"),!b&&v&&"draggable"),draggable:!b&&v||void 0,"aria-grabbed":!b&&v||void 0,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onContextMenu:e.onContextMenu,onClick:e.onSelectorClick,onDoubleClick:e.onSelectorDoubleClick,onDragStart:v?e.onDragStart:void 0},t,x)},e}return Object(s.a)(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,t=this.props.context.selectable;return"boolean"==typeof e?e:t}},{key:"render",value:function(){var e,t=this.props,n=t.eventKey,a=t.className,o=t.style,s=t.dragOver,l=t.dragOverGapTop,c=t.dragOverGapBottom,u=t.isLeaf,f=t.isStart,p=t.isEnd,y=t.expanded,b=t.selected,_=t.checked,E=t.halfChecked,x=t.loading,S=t.domRef,w=t.active,k=t.onMouseMove,T=Object(i.a)(t,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),O=this.props.context,C=O.prefixCls,A=O.filterTreeNode,L=O.draggable,D=O.keyEntities,I=this.isDisabled(),R=Object(m.f)(T),N=(D[n]||{}).level,M=p[p.length-1];return d.createElement("div",Object.assign({ref:S,className:h()(a,"".concat(C,"-treenode"),(e={},Object(r.a)(e,"".concat(C,"-treenode-disabled"),I),Object(r.a)(e,"".concat(C,"-treenode-switcher-").concat(y?"open":"close"),!u),Object(r.a)(e,"".concat(C,"-treenode-checkbox-checked"),_),Object(r.a)(e,"".concat(C,"-treenode-checkbox-indeterminate"),E),Object(r.a)(e,"".concat(C,"-treenode-selected"),b),Object(r.a)(e,"".concat(C,"-treenode-loading"),x),Object(r.a)(e,"".concat(C,"-treenode-active"),w),Object(r.a)(e,"".concat(C,"-treenode-leaf-last"),M),Object(r.a)(e,"drag-over",!I&&s),Object(r.a)(e,"drag-over-gap-top",!I&&l),Object(r.a)(e,"drag-over-gap-bottom",!I&&c),Object(r.a)(e,"filter-node",A&&A(Object(g.b)(this.props))),e)),style:o,onDragEnter:L?this.onDragEnter:void 0,onDragOver:L?this.onDragOver:void 0,onDragLeave:L?this.onDragLeave:void 0,onDrop:L?this.onDrop:void 0,onDragEnd:L?this.onDragEnd:void 0,onMouseMove:k},R),d.createElement(v,{prefixCls:C,level:N,isStart:f,isEnd:p}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(d.Component),b=function(e){return d.createElement(p.a.Consumer,null,(function(t){return d.createElement(y,Object.assign({},e,{context:t}))}))};b.displayName="TreeNode",b.defaultProps={title:"---"},b.isTreeNode=1;t.a=b},Wtmd:
/*!**************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/c.svg ***!
\**************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/c.03ba6fd6.svg"},Wx9E:
/*!****************************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/Discuss/discuss-input-editor/index.less ***!
\****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},XIdC:
/*!********************************************!*\
!*** ./node_modules/rc-switch/es/index.js ***!
\********************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/slicedToArray */"ODXe"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! react */"q1tI"),s=n(/*! classnames */"TSYQ"),l=n.n(s),c=n(/*! rc-util/es/hooks/useMergedState */"6cGi"),u=n(/*! rc-util/es/KeyCode */"4IlW"),d=o.forwardRef((function(e,t){var n,s=e.prefixCls,d=void 0===s?"rc-switch":s,f=e.className,h=e.checked,p=e.defaultChecked,m=e.disabled,v=e.loadingIcon,g=e.checkedChildren,y=e.unCheckedChildren,b=e.onClick,_=e.onChange,E=e.onKeyDown,x=Object(a.a)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),S=Object(c.a)(!1,{value:h,defaultValue:p}),w=Object(i.a)(S,2),k=w[0],T=w[1];function O(e,t){var n=k;return m||(T(n=e),null==_||_(n,t)),n}var C=l()(d,f,(n={},Object(r.a)(n,"".concat(d,"-checked"),k),Object(r.a)(n,"".concat(d,"-disabled"),m),n));return o.createElement("button",Object.assign({},x,{type:"button",role:"switch","aria-checked":k,disabled:m,className:C,ref:t,onKeyDown:function(e){e.which===u.a.LEFT?O(!1,e):e.which===u.a.RIGHT&&O(!0,e),null==E||E(e)},onClick:function(e){var t=O(!k,e);null==b||b(t,e)}}),v,o.createElement("span",{className:"".concat(d,"-inner")},k?g:y))}));d.displayName="Switch",t.a=d},Y1PL:
/*!**********************************************************!*\
!*** ./node_modules/rc-textarea/es/index.js + 7 modules ***!
\**********************************************************/
/*! exports provided: ResizableTextArea, default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/omit.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t),n.d(t,"ResizableTextArea",(function(){return R}));var r=n("wx14"),i=n("1OyB"),a=n("vuIU"),o=n("Ji7U"),s=n("LK+K"),l=n("q1tI"),c=n("VTBJ"),u=n("rePB"),d=n("Zm9Q"),f=(n("Kwbf"),n("c+Xe")),h=n("m+aA"),p=n("bdgK"),m=new Map;var v=new p.default((function(e){e.forEach((function(e){var t,n=e.target;null===(t=m.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var g=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(l.Component),y=l.createContext(null);function b(e){var t=e.children,n=e.disabled,r=l.useRef(null),i=l.useRef(null),a=l.useContext(y),o=l.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),s=l.isValidElement(t)&&Object(f.c)(t),u=s?t.ref:null,d=l.useMemo((function(){return Object(f.a)(u,r)}),[u,r]),p=l.useRef(e);p.current=e;var b=l.useCallback((function(e){var t=p.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),s=i.width,l=i.height,u=e.offsetWidth,d=e.offsetHeight,f=Math.floor(s),h=Math.floor(l);if(o.current.width!==f||o.current.height!==h||o.current.offsetWidth!==u||o.current.offsetHeight!==d){var m={width:f,height:h,offsetWidth:u,offsetHeight:d};o.current=m;var v=u===Math.round(s)?s:u,g=d===Math.round(l)?l:d,y=Object(c.a)(Object(c.a)({},m),{},{offsetWidth:v,offsetHeight:g});null==a||a(y,e,r),n&&Promise.resolve().then((function(){n(y,e)}))}}),[]);return l.useEffect((function(){var e,t,a=Object(h.a)(r.current)||Object(h.a)(i.current);return a&&!n&&(e=a,t=b,m.has(e)||(m.set(e,new Set),v.observe(e)),m.get(e).add(t)),function(){return function(e,t){m.has(e)&&(m.get(e).delete(t),m.get(e).size||(v.unobserve(e),m.delete(e)))}(a,b)}}),[r.current,n]),l.createElement(g,{ref:i},s?l.cloneElement(t,{ref:d}):t)}function _(e){var t=e.children;return Object(d.a)(t).map((function(t,n){var i=(null==t?void 0:t.key)||"".concat("rc-observer-key","-").concat(n);return l.createElement(b,Object(r.a)({},e,{key:i}),t)}))}_.Collection=function(e){var t=e.children,n=e.onBatchResize,r=l.useRef(0),i=l.useRef([]),a=l.useContext(y),o=l.useCallback((function(e,t,o){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then((function(){s===r.current&&(null==n||n(i.current),i.current=[])})),null==a||a(e,t,o)}),[n,a]);return l.createElement(y.Provider,{value:o},t)};var E,x=_,S=n("bT9E"),w=n("TSYQ"),k=n.n(w),T="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",O=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],C={};function A(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&C[n])return C[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=O.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:s,paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(C[n]=l),l}var L,D=n("Gytx"),I=n.n(D);!function(e){e[e.NONE=0]="NONE",e[e.RESIZING=1]="RESIZING",e[e.RESIZED=2]="RESIZED"}(L||(L={}));var R=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,e)).nextFrameActionId=void 0,a.resizeFrameId=void 0,a.textArea=void 0,a.saveTextArea=function(e){a.textArea=e},a.handleResize=function(e){var t=a.state.resizeStatus,n=a.props,r=n.autoSize,i=n.onResize;t===L.NONE&&("function"==typeof i&&i(e),r&&a.resizeOnNextFrame())},a.resizeOnNextFrame=function(){cancelAnimationFrame(a.nextFrameActionId),a.nextFrameActionId=requestAnimationFrame(a.resizeTextarea)},a.resizeTextarea=function(){var e=a.props.autoSize;if(e&&a.textArea){var t=e.minRows,n=e.maxRows,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;E||((E=document.createElement("textarea")).setAttribute("tab-index","-1"),E.setAttribute("aria-hidden","true"),document.body.appendChild(E)),e.getAttribute("wrap")?E.setAttribute("wrap",e.getAttribute("wrap")):E.removeAttribute("wrap");var i=A(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,l=i.sizingStyle;E.setAttribute("style","".concat(l,";").concat(T)),E.value=e.value||e.placeholder||"";var c,u=Number.MIN_SAFE_INTEGER,d=Number.MAX_SAFE_INTEGER,f=E.scrollHeight;if("border-box"===s?f+=o:"content-box"===s&&(f-=a),null!==n||null!==r){E.value=" ";var h=E.scrollHeight-a;null!==n&&(u=h*n,"border-box"===s&&(u=u+a+o),f=Math.max(u,f)),null!==r&&(d=h*r,"border-box"===s&&(d=d+a+o),c=f>d?"":"hidden",f=Math.min(d,f))}return{height:f,minHeight:u,maxHeight:d,overflowY:c,resize:"none"}}(a.textArea,!1,t,n);a.setState({textareaStyles:r,resizeStatus:L.RESIZING},(function(){cancelAnimationFrame(a.resizeFrameId),a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:L.RESIZED},(function(){a.resizeFrameId=requestAnimationFrame((function(){a.setState({resizeStatus:L.NONE}),a.fixFirefoxAutoScroll()}))}))}))}))}},a.renderTextArea=function(){var e=a.props,t=e.prefixCls,n=void 0===t?"rc-textarea":t,i=e.autoSize,o=e.onResize,s=e.className,d=e.disabled,f=a.state,h=f.textareaStyles,p=f.resizeStatus,m=Object(S.a)(a.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),v=k()(n,s,Object(u.a)({},"".concat(n,"-disabled"),d));"value"in m&&(m.value=m.value||"");var g=Object(c.a)(Object(c.a)(Object(c.a)({},a.props.style),h),p===L.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return l.createElement(x,{onResize:a.handleResize,disabled:!(i||o)},l.createElement("textarea",Object(r.a)({},m,{className:v,style:g,ref:a.saveTextArea})))},a.state={textareaStyles:{},resizeStatus:L.NONE},a}return Object(a.a)(n,[{key:"componentDidUpdate",value:function(e){e.value===this.props.value&&I()(e.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 e=this.textArea.selectionStart,t=this.textArea.selectionEnd;this.textArea.setSelectionRange(e,t)}}catch(e){}}},{key:"render",value:function(){return this.renderTextArea()}}]),n}(l.Component),N=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).resizableTextArea=void 0,r.focus=function(){r.resizableTextArea.textArea.focus()},r.saveTextArea=function(e){r.resizableTextArea=e},r.handleChange=function(e){var t=r.props.onChange;r.setValue(e.target.value,(function(){r.resizableTextArea.resizeTextarea()})),t&&t(e)},r.handleKeyDown=function(e){var t=r.props,n=t.onPressEnter,i=t.onKeyDown;13===e.keyCode&&n&&n(e),i&&i(e)};var a=void 0===e.value||null===e.value?e.defaultValue:e.value;return r.state={value:a},r}return Object(a.a)(n,[{key:"setValue",value:function(e,t){"value"in this.props||this.setState({value:e},t)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return l.createElement(R,Object(r.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value}:null}}]),n}(l.Component);t.default=N},Z8dc:
/*!***************************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/index.less?modules ***!
\***************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){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:
/*!*********************************************************!*\
!*** ./src/components/tpi-code-setting/CodeSetting.tsx ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/switch/style */"BoS7");var r=n(/*! antd/es/switch */"Sdc0"),i=(n(/*! antd/es/select/style */"OaEy"),n(/*! antd/es/select */"2fM7")),a=n(/*! react */"q1tI"),o=n.n(a),s=(n(/*! ./index.less */"lOMy"),i.a.Option);t.a=function(e){var t=e.onFontSizeChange,n=e.cmFontSize,a=e.cmCodeMode,l=e.onCodeModeChange,c=e.onTabToSpace,u=e.className,d=void 0===u?"":u,f=e.tabToSpace,h=e.children;return o.a.createElement("div",{className:"tpi-code-setting ".concat(d)},o.a.createElement("h3",null,"代码格式"),o.a.createElement("section",null,o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"显示模式"),o.a.createElement(i.a,{bordered:!1,size:"small",value:a,onChange:l},o.a.createElement(s,{value:"vs"},"白色背景"),o.a.createElement(s,{value:"vs-dark"},"黑色背景"))),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"字体大小"),o.a.createElement(i.a,{bordered:!1,size:"small",value:n,onChange:t},o.a.createElement(s,{value:12},"12px"),o.a.createElement(s,{value:14},"14px"),o.a.createElement(s,{value:16},"16px"),o.a.createElement(s,{value:18},"18px"),o.a.createElement(s,{value:20},"20px"),o.a.createElement(s,{value:22},"22px"))),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"Tab转换"),o.a.createElement(r.a,{checked:f,onChange:c}))),o.a.createElement("h3",null,"快捷键"),o.a.createElement("section",null,o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"保存代码"),o.a.createElement("span",null,"Ctrl + S")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"唤出快捷键列表"),o.a.createElement("span",null,"F1 / Alt + F1")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"左右缩进"),o.a.createElement("span",null,"Ctrl + ]/[")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"跳到匹配的括号"),o.a.createElement("span",null,"Ctrl + Shift + \\")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"转到行首"),o.a.createElement("span",null,"Home")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"转到行尾"),o.a.createElement("span",null,"End"))),h)}},ZW9T:
/*!************************************************************!*\
!*** ./src/components/monaco-editor/index.jsx + 1 modules ***!
\************************************************************/
/*! exports provided: getLanguageByMirrorName, default, DiffEditor */
/*! exports used: DiffEditor, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n("k1fw"),i=(n("miYZ"),n("tsqr")),a=n("rAM+"),o=n("tJVT"),s=n("PpiC"),l=n("q1tI"),c=n.n(l),u=n("bdgK");function d(e,t,n,i,a){var o=t.getWordUntilPosition(n),s={startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=i.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}));return a.map((function(e){l.push(Object(r.a)(Object(r.a)({},e),{},{range:s}))})),l}n("LvDl");function f(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function h(){}var p={"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 m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var r=p[e[n]];if(r)return r}return t[0]}return p[t]||t}var v=null;t.b=function(e){var t=e.width,p=void 0===t?"100%":t,g=e.height,y=void 0===g?"100%":g,b=e.value,_=e.language,E=void 0===_?"javascript":_,x=e.style,S=void 0===x?{}:x,w=e.options,k=void 0===w?{}:w,T=e.overrideServices,O=void 0===T?{}:T,C=e.theme,A=void 0===C?"vs-dark":C,L=e.onEditBlur,D=e.onSave,I=e.autoHeight,R=void 0!==I&&I,N=e.forbidCopy,M=void 0!==N&&N,P=e.onChange,j=void 0===P?h:P,F=e.editorDidMount,U=void 0===F?h:F,B=e.onFocus,G=void 0===B?h:B,z=e.filename,H=void 0===z?"educoder.txt":z,K=(Object(s.a)(e,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),Object(l.useRef)()),V=Object(l.useRef)({}),W=Object(l.useRef)(),q=Object(l.useRef)(!1),X=Object(l.useRef)(),Y=Object(l.useState)(!1),$=Object(o.a)(Y,2),J=$[0],Q=$[1];function Z(){i.b.warn(decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"))}function ee(){var e=V.current.instance;if(e){var t=e.getSelection(),n=V.current.pastePos||{},r=new v.Range(n.startLineNumber||t.endLineNumber,n.startColumn||t.endColumn,n.endLineNumber||t.endLineNumber,n.endColumn||t.endColumn);setTimeout((function(){e.executeEdits("",[{range:r,text:""}])}),300)}}function te(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),D())}Object(l.useEffect)((function(){W.current&&clearTimeout(W.current),W.current=setTimeout((function(){!function(){var e=V.current.instance;if(null!=b&&e&&J){var t=e.getModel();t&&b!==t.getValue()&&(!0,t.setValue(b),e.layout(),!1)}}()}),500)}),[b,J,V.current]);var ne=function(){if(R&&V.current.instance){var e=V.current.instance.getContentHeight();ue(e<y?y:e)}else ue(y)};function re(e,t){var n,r,i=window.URL||window.webkitURL||window,a=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=i.createObjectURL(a),o.download=e,n=o,(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}Object(l.useEffect)((function(){ne()}),[ne]),Object(l.useEffect)((function(){K.current&&!J&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){try{v=e,V.current.instance=v.editor.create(K.current,{value:b,language:m(E),theme:A,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},O);var t=V.current.instance;if(U(t,v),setTimeout((function(){ne(),V.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){re(H||"educoder.txt",t.getValue())}})}),500),V.current.subscription=t.onDidChangeModelContent((function(e){q.current?clearTimeout(X.current):(ne(),j(t.getValue(),e)),X.current=setTimeout((function(){q.current=!1}),500)})),window.Monaco||function(e){var t={label:"ifelse",kind:e.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},n=["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"];e.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(r,i){return{suggestions:d(e,r,i,n,[t])}}});var r=["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"];e.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(t,n){var i=[{label:"print",kind:e.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:d(e,t,n,r,i)}}});var i=["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"];e.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(n,r){var a=[t,{label:"main",kind:e.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {","\t$0","}"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:e.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join("\n"),insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}];return{suggestions:d(e,n,r,i,a)}}})}(v),M&&(t.addCommand(v.KeyMod.CtrlCmd|v.KeyMod.Shift|v.KeyCode.KEY_V,(function(){return Z(),null})),t.addCommand(v.KeyMod.CtrlCmd|v.KeyCode.KEY_C,(function(){return Z(),null}))),window.Monaco=v,L&&t.onDidBlurEditorWidget((function(){L(t.getValue())})),G&&t.onDidFocusEditorText((function(){G(t.getValue())})),M){t.addCommand(v.KeyMod.CtrlCmd|v.KeyCode.KEY_V,(function(){return Z(),null})),t.onDidPaste((function(e){V.current.pastePos=e}));try{window.addEventListener("paste",ee)}catch(e){}}var n=function(){var e;return K.current&&(e=new u.default((function(e){var t,n=Object(a.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&V.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(K.current),e}();return Q(!0),function(){var e=V.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),V.current.subscription&&V.current.subscription.dispose(),M&&window.removeEventListener("paste",ee),n.unobserve(K.current)}}catch(e){}}))}),[]),Object(l.useEffect)((function(){if(V.current.instance&&J)return document.addEventListener("keydown",te,!1),function(){document.removeEventListener("keydown",te)}}),[D,J]),Object(l.useEffect)((function(){var e=V.current.instance;if(e&&J){var t=m(E);v.editor.setModelLanguage(e.getModel(),t),console.log("language:",E,e.getModel(),t)}}),[E,J]),Object(l.useEffect)((function(){V.current.instance&&J&&v.editor.setTheme(A)}),[A,J]),Object(l.useEffect)((function(){var e=V.current.instance;e&&J&&(e.updateOptions(Object(r.a)({},k)),setTimeout((function(){e.getModel().updateOptions(Object(r.a)({},k))}),200))}),[JSON.stringify(k),J]),Object(l.useEffect)((function(){var e=V.current.instance;e&&J&&e.layout()}),[p,y,J]);var ie=Object(l.useState)(f(p)),ae=Object(o.a)(ie,2),oe=ae[0],se=(ae[1],Object(l.useState)(f(y))),le=Object(o.a)(se,2),ce=le[0],ue=le[1],de=Object(r.a)(Object(r.a)({},S),{},{width:oe,height:ce});return c.a.createElement("div",{className:"my-monaco-editor",ref:K,style:de})};function g(e){var t=e.width,i=void 0===t?"100%":t,s=e.height,d=void 0===s?"100%":s,h=e.original,p=e.modified,m=e.language,g=e.options,y=void 0===g?{}:g,b=Object(l.useRef)(),_=Object(l.useState)(null),E=Object(o.a)(_,2),x=E[0],S=E[1];Object(l.useEffect)((function(){b.current&&n.e(/*! import() | monaco-editor */27).then(n.t.bind(null,/*! monaco-editor/esm/vs/editor/editor.api.js */"M/lh",7)).then((function(e){var t=(v=e).editor.createDiffEditor(b.current,Object(r.a)(Object(r.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},y),{},{wordWrap:!0}));S(t);var n=function(e){var t;return b.current&&(t=new u.default((function(t){var n,r=Object(a.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(b.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(b.current)}}))}),[]),Object(l.useEffect)((function(){x&&x.setModel({original:v.editor.createModel(h,m),modified:v.editor.createModel(p,m)})}),[h,p,m,x]);var w={width:f(i),height:f(d)};return c.a.createElement("div",{className:"my-diff-editor",ref:b,style:w})}},ZpRC:
/*!*************************************************************************!*\
!*** ./node_modules/scroll-into-view-if-needed/es/index.js + 1 modules ***!
\*************************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function i(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function a(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return i(n.overflowY,t)||i(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function o(e,t,n,r,i,a,o,s){return a<e&&o>t||a>e&&o<t?0:a<=e&&s<=n||o>=t&&s>=n?a-e-r:o>t&&s<n||a<e&&s>n?o-t+i:0}var s=function(e,t){var n=window,i=t.scrollMode,s=t.block,l=t.inline,c=t.boundary,u=t.skipOverflowHiddenElements,d="function"==typeof c?c:function(e){return e!==c};if(!r(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,h=[],p=e;r(p)&&d(p);){if((p=p.parentElement)===f){h.push(p);break}null!=p&&p===document.body&&a(p)&&!a(document.documentElement)||null!=p&&a(p,u)&&h.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,v=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),_=b.height,E=b.width,x=b.top,S=b.right,w=b.bottom,k=b.left,T="start"===s||"nearest"===s?x:"end"===s?w:x+_/2,O="center"===l?k+E/2:"end"===l?S:k,C=[],A=0;A<h.length;A++){var L=h[A],D=L.getBoundingClientRect(),I=D.height,R=D.width,N=D.top,M=D.right,P=D.bottom,j=D.left;if("if-needed"===i&&x>=0&&k>=0&&w<=v&&S<=m&&x>=N&&w<=P&&k>=j&&S<=M)return C;var F=getComputedStyle(L),U=parseInt(F.borderLeftWidth,10),B=parseInt(F.borderTopWidth,10),G=parseInt(F.borderRightWidth,10),z=parseInt(F.borderBottomWidth,10),H=0,K=0,V="offsetWidth"in L?L.offsetWidth-L.clientWidth-U-G:0,W="offsetHeight"in L?L.offsetHeight-L.clientHeight-B-z:0;if(f===L)H="start"===s?T:"end"===s?T-v:"nearest"===s?o(y,y+v,v,B,z,y+T,y+T+_,_):T-v/2,K="start"===l?O:"center"===l?O-m/2:"end"===l?O-m:o(g,g+m,m,U,G,g+O,g+O+E,E),H=Math.max(0,H+y),K=Math.max(0,K+g);else{H="start"===s?T-N-B:"end"===s?T-P+z+W:"nearest"===s?o(N,P,I,B,z+W,T,T+_,_):T-(N+I/2)+W/2,K="start"===l?O-j-U:"center"===l?O-(j+R/2)+V/2:"end"===l?O-M+G+V:o(j,M,R,U,G+V,O,O+E,E);var q=L.scrollLeft,X=L.scrollTop;T+=X-(H=Math.max(0,Math.min(X+H,L.scrollHeight-I+W))),O+=q-(K=Math.max(0,Math.min(q+K,L.scrollWidth-R+V)))}C.push({el:L,top:H,left:K})}return C};function l(e){return e===Object(e)&&0!==Object.keys(e).length}t.a=function(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(l(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:s(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:l(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,i=e.top,a=e.left;r.scroll&&n?r.scroll({top:i,left:a,behavior:t}):(r.scrollTop=i,r.scrollLeft=a)}))}(s(e,r),r.behavior)}}},ZsLC:
/*!*******************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/index.less?modules ***!
\*******************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){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:
/*!******************************!*\
!*** ./src/utils/urlTool.ts ***!
\******************************/
/*! exports provided: toStore, fromStore */
/*! exports used: fromStore, toStore */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o}));var r=n(/*! store */"je13"),i=n.n(r);function a(e,t){var n=i.a.get("__ec");n||(n={}),n[e]=t,i.a.set("__ec",n)}function o(e,t){var n=i.a.get("__ec");return n?void 0===n[e]?t:n[e]:t}},bT9E:
/*!*****************************************!*\
!*** ./node_modules/rc-util/es/omit.js ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ");function i(e,t){var n=Object(r.a)({},e);return Array.isArray(t)&&t.forEach((function(e){delete n[e]})),n}},bdLU:
/*!***************************************************!*\
!*** ./src/pages/Question/OjProblem/interface.ts ***!
\***************************************************/
/*! exports provided: ExecuteStatus */
/*! exports used: ExecuteStatus */function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.NOMATCH=-1]="NOMATCH",e[e.OK=0]="OK",e[e.TIMEOUT=2]="TIMEOUT",e[e.PODFAILURE=3]="PODFAILURE",e[e.COMPILEFAILURE=4]="COMPILEFAILURE",e[e.EXECUTEFAILURE=5]="EXECUTEFAILURE"}(r||(r={}))},biw7:
/*!**********************************************************!*\
!*** ./node_modules/rc-table/es/context/TableContext.js ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! react */"q1tI"),i=r.createContext(null);t.a=i},c5Ni:
/*!******************************************************!*\
!*** ./node_modules/codemirror/theme/blackboard.css ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},cDPC:
/*!*************************************************!*\
!*** ./src/components/SplitContainer/index.tsx ***!
\*************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),i=n(/*! react */"q1tI"),a=n.n(i);n(/*! ./index.less */"i3hx");t.a=function(e){var t=e.defaultX,n=void 0===t?"40%":t,o=e.leftChild,s=e.rightChild,l=e.className,c=e.hideResize,u=void 0!==c&&c,d=Object(i.useState)(n),f=Object(r.a)(d,2),h=f[0],p=f[1],m=Object(i.useRef)();Object(i.useEffect)((function(){function e(e){m.current&&p(e.pageX)}function t(){m.current=!1}return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),function(){window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}}),[]);var v="number"==typeof h&&.01!==h?"".concat(h,"px"):n,g="calc(100% - ".concat(u?"0px":"4px"," - ").concat(v,")");return a.a.createElement("div",{className:"split-panel-container ".concat(l)},a.a.createElement("section",{style:{width:v,display:.01===h?"none":""}},o),a.a.createElement("section",{className:"resize-x-bar",onMouseDown:function(){m.current=!0}},a.a.createElement("a",{className:"btn-resize"},a.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},a.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"})))),a.a.createElement("section",{style:{width:g}},s))}},dejd:
/*!***********************************************************!*\
!*** ./src/components/markdown-editor/toolbar/index.less ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},dmUQ:
/*!**************************************************************!*\
!*** ./node_modules/rc-input-number/es/index.js + 1 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("Ff2n"),i=n("rePB"),a=n("1OyB"),o=n("vuIU"),s=n("Ji7U"),l=n("md7G"),c=n("foSv"),u=n("q1tI"),d=n.n(u),f=n("TSYQ"),h=n.n(f),p=n("4IlW");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var i=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}function y(){}function b(e){e.preventDefault()}var _=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,E=function(e){return null!=e},x=function(e,t){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},S=function(e){Object(s.a)(n,e);var t=g(n);function n(e){var r;Object(a.a)(this,n),(r=t.call(this,e)).onKeyDown=function(e){var t=r.props,n=t.onKeyDown,i=t.onPressEnter;if(e.keyCode===p.a.UP){var a=r.getRatio(e);r.up(e,a,null),r.stop()}else if(e.keyCode===p.a.DOWN){var o=r.getRatio(e);r.down(e,o,null),r.stop()}else e.keyCode===p.a.ENTER&&i&&i(e);if(r.recordCursorPosition(),r.lastKeyCode=e.keyCode,n){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];n.apply(void 0,[e].concat(l))}},r.onKeyUp=function(e){var t=r.props.onKeyUp;if(r.stop(),r.recordCursorPosition(),t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];t.apply(void 0,[e].concat(i))}},r.onChange=function(e){var t=r.props.onChange;r.state.focused&&(r.inputting=!0),r.rawInput=r.props.parser(r.getValueFromEvent(e)),r.setState({inputValue:r.rawInput}),t(r.toNumber(r.rawInput))},r.onMouseUp=function(){var e=r.props.onMouseUp;r.recordCursorPosition(),e&&e.apply(void 0,arguments)},r.onFocus=function(){var e;r.setState({focused:!0}),(e=r.props).onFocus.apply(e,arguments)},r.onBlur=function(){var e=r.props.onBlur;r.inputting=!1,r.setState({focused:!1});var t=r.getCurrentValidValue(r.state.inputValue),n=r.setValue(t,y);if(e){var i=r.input.value,a=r.getInputDisplayValue({focus:!1,value:n});r.input.value=a?Number(a):a,e.apply(void 0,arguments),r.input.value=i}},r.getRatio=function(e){var t=1;return e.metaKey||e.ctrlKey?t=.1:e.shiftKey&&(t=10),t},r.getFullNum=function(e){return isNaN(e)?e:/e/i.test(String(e))?Number(e).toFixed(18).replace(/\.?0+$/,""):e},r.getPrecision=function(e){if(E(r.props.precision))return r.props.precision;var t=String(e);if(t.indexOf("e-")>=0)return parseInt(t.slice(t.indexOf("e-")+2),10);var n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n},r.getInputDisplayValue=function(e){var t,n=e||r.state,i=n.focused,a=n.inputValue,o=n.value;null==(t=i?a:r.toPrecisionAsStep(o))&&(t="");var s=r.formatWrapper(t);return E(r.props.decimalSeparator)&&(s=s.toString().replace(".",r.props.decimalSeparator)),s},r.recordCursorPosition=function(){try{r.cursorStart=r.input.selectionStart,r.cursorEnd=r.input.selectionEnd,r.currentValue=r.input.value,r.cursorBefore=r.input.value.substring(0,r.cursorStart),r.cursorAfter=r.input.value.substring(r.cursorEnd)}catch(e){}},r.restoreByAfter=function(e){if(void 0===e)return!1;var t=r.input.value,n=t.lastIndexOf(e);if(-1===n)return!1;var i=r.cursorBefore.length;return r.lastKeyCode===p.a.DELETE&&r.cursorBefore.charAt(i-1)===e[0]?(r.fixCaret(i,i),!0):n+e.length===t.length&&(r.fixCaret(n,n),!0)},r.partRestoreByAfter=function(e){return void 0!==e&&Array.prototype.some.call(e,(function(t,n){var i=e.substring(n);return r.restoreByAfter(i)}))},r.isNotCompleteNumber=function(e){return isNaN(e)||""===e||null===e||e&&e.toString().indexOf(".")===e.toString().length-1},r.stop=function(){r.autoStepTimer&&clearTimeout(r.autoStepTimer)},r.down=function(e,t,n){r.pressingUpOrDown=!0,r.step("down",e,t,n)},r.up=function(e,t,n){r.pressingUpOrDown=!0,r.step("up",e,t,n)},r.saveInput=function(e){r.input=e};var i=e.value;void 0===i&&(i=e.defaultValue),r.state={focused:e.autoFocus};var o=r.getValidValue(r.toNumber(i));return r.state=v(v({},r.state),{},{inputValue:r.toPrecisionAsStep(o),value:o}),r}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.value,r=t.onChange,i=t.max,a=t.min,o=this.state.focused;if(e){if(!x(e.value,n)||!x(e.max,i)||!x(e.min,a)){var s,l=o?n:this.getValidValue(n);s=this.pressingUpOrDown?l:this.inputting?this.rawInput:this.toPrecisionAsStep(l),this.setState({value:l,inputValue:s})}var c="value"in this.props?n:this.state.value;"max"in this.props&&e.max!==i&&"number"==typeof c&&c>i&&r&&r(i),"min"in this.props&&e.min!==a&&"number"==typeof c&&c<a&&r&&r(a)}try{if(void 0!==this.cursorStart&&this.state.focused)if(this.partRestoreByAfter(this.cursorAfter)||this.state.value===this.props.value){if(this.currentValue===this.input.value)switch(this.lastKeyCode){case p.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case p.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}}else{var u=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===p.a.BACKSPACE?u=this.cursorStart-1:this.lastKeyCode===p.a.DELETE&&(u=this.cursorStart):u=this.input.value.length,this.fixCaret(u,u)}}catch(e){}this.lastKeyCode=null,this.pressingUpOrDown&&this.props.focusOnUpDown&&this.state.focused&&document.activeElement!==this.input&&this.focus()}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(e){var t=e;return t=""===t?"":this.isNotCompleteNumber(parseFloat(t))?this.state.value:this.getValidValue(t),this.toNumber(t)}},{key:"getValueFromEvent",value:function(e){var t=e.target.value.trim().replace(/。/g,".");return E(this.props.decimalSeparator)&&(t=t.replace(this.props.decimalSeparator,".")),t}},{key:"getValidValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.min,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.props.max,r=parseFloat(e);return isNaN(r)?e:(r<t&&(r=t),r>n&&(r=n),r)}},{key:"setValue",value:function(e,t){var n=this.props.precision,r=this.isNotCompleteNumber(parseFloat(e))?null:parseFloat(e),i=this.state.value,a=void 0===i?null:i,o=this.state.inputValue,s=void 0===o?null:o,l="number"==typeof r?r.toFixed(n):"".concat(r),c=r!==a||l!=="".concat(s);return"value"in this.props?(s=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:s},t)):this.setState({value:r,inputValue:this.toPrecisionAsStep(e)},t),c&&this.props.onChange(r),r}},{key:"getMaxPrecision",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.props,r=n.precision,i=n.step;if(E(r))return r;var a=this.getPrecision(t),o=this.getPrecision(i),s=this.getPrecision(e);return e?Math.max(s,a+o):a+o}},{key:"getPrecisionFactor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getMaxPrecision(e,t);return Math.pow(10,n)}},{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(e){return this.props.formatter?this.props.formatter(e):e}},{key:"toPrecisionAsStep",value:function(e){if(this.isNotCompleteNumber(e)||""===e)return e;var t=Math.abs(this.getMaxPrecision(e));return isNaN(t)?e.toString():Number(e).toFixed(t)}},{key:"toNumber",value:function(e){var t=this.props.precision,n=this.state.focused,r=e&&e.length>16&&n;return this.isNotCompleteNumber(e)||r?e:E(t)?Math.round(e*Math.pow(10,t))/Math.pow(10,t):Number(e)}},{key:"upStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e+r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"downStep",value:function(e,t){var n=this.props.step,r=this.getPrecisionFactor(e,t),i=Math.abs(this.getMaxPrecision(e,t)),a=((r*e-r*n*t)/r).toFixed(i);return this.toNumber(a)}},{key:"step",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0;this.stop(),t&&(t.persist(),t.preventDefault());var a=this.props;if(!a.disabled){var o=this.getCurrentValidValue(this.state.inputValue)||0;if(!this.isNotCompleteNumber(o)){var s=this["".concat(e,"Step")](o,r),l=s>a.max||s<a.min;s>a.max?s=a.max:s<a.min&&(s=a.min),this.setValue(s,null),this.setState({focused:!0},(function(){n.pressingUpOrDown=!1})),l||(this.autoStepTimer=setTimeout((function(){n[e](t,r,!0)}),i?200:600))}}}},{key:"fixCaret",value:function(e,t){if(void 0!==e&&void 0!==t&&this.input&&this.input.value)try{var n=this.input.selectionStart,r=this.input.selectionEnd;e===n&&t===r||this.input.setSelectionRange(e,t)}catch(e){}}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,a=t.disabled,o=t.readOnly,s=t.useTouch,l=t.autoComplete,c=t.upHandler,u=t.downHandler,f=t.className,p=t.max,m=t.min,v=t.style,g=t.title,_=t.onMouseEnter,E=t.onMouseLeave,x=t.onMouseOver,S=t.onMouseOut,w=t.required,k=t.onClick,T=t.tabIndex,O=t.type,C=t.placeholder,A=t.id,L=t.inputMode,D=t.pattern,I=t.step,R=t.maxLength,N=t.autoFocus,M=t.name,P=t.onPaste,j=t.onInput,F=Object(r.a)(t,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),U=this.state,B=U.value,G=U.focused,z=h()(n,(e={},Object(i.a)(e,f,!!f),Object(i.a)(e,"".concat(n,"-disabled"),a),Object(i.a)(e,"".concat(n,"-focused"),G),e)),H={};Object.keys(F).forEach((function(e){"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(H[e]=F[e])}));var K=!o&&!a,V=this.getInputDisplayValue(null),W=(B||0===B)&&(isNaN(B)||Number(B)>=p)||a||o,q=(B||0===B)&&(isNaN(B)||Number(B)<=m)||a||o,X=h()("".concat(n,"-handler"),"".concat(n,"-handler-up"),Object(i.a)({},"".concat(n,"-handler-up-disabled"),W)),Y=h()("".concat(n,"-handler"),"".concat(n,"-handler-down"),Object(i.a)({},"".concat(n,"-handler-down-disabled"),q)),$=s?{onTouchStart:W?y:this.up,onTouchEnd:this.stop}:{onMouseDown:W?y:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},J=s?{onTouchStart:q?y:this.down,onTouchEnd:this.stop}:{onMouseDown:q?y:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:z,style:v,title:g,onMouseEnter:_,onMouseLeave:E,onMouseOver:x,onMouseOut:S,onFocus:function(){return null},onBlur:function(){return null}},d.a.createElement("div",{className:"".concat(n,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},$,{role:"button","aria-label":"Increase Value","aria-disabled":W,className:X}),c||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-up-inner"),onClick:b})),d.a.createElement("span",Object.assign({unselectable:"on"},J,{role:"button","aria-label":"Decrease Value","aria-disabled":q,className:Y}),u||d.a.createElement("span",{unselectable:"on",className:"".concat(n,"-handler-down-inner"),onClick:b}))),d.a.createElement("div",{className:"".concat(n,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":B,required:w,type:O,placeholder:C,onPaste:P,onClick:k,onMouseUp:this.onMouseUp,className:"".concat(n,"-input"),tabIndex:T,autoComplete:l,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:K?this.onKeyDown:y,onKeyUp:K?this.onKeyUp:y,autoFocus:N,maxLength:R,readOnly:o,disabled:a,max:p,min:m,step:I,name:M,title:g,id:A,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(V),pattern:D,inputMode:L,onInput:j},H))))}}]),n}(d.a.Component);S.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:_,min:-_,step:1,style:{},onChange:y,onKeyDown:y,onPressEnter:y,onFocus:y,onBlur:y,parser:function(e){return e.replace(/[^\w.-]+/g,"")},required:!1,autoComplete:"off"};var w=S;t.a=w},fcSX:
/*!********************************************************!*\
!*** ./node_modules/rc-drawer/es/index.js + 3 modules ***!
\********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/PortalWrapper.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";var r=n("Ff2n"),i=n("1OyB"),a=n("vuIU"),o=n("Ji7U"),s=n("md7G"),l=n("foSv"),c=n("1W/9"),u=n("q1tI"),d=n("rePB"),f=n("JX7q"),h=n("TSYQ"),p=n.n(h),m=n("qx4F"),v=n("4IlW");var g={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},y=Object.keys(g).filter((function(e){if("undefined"==typeof document)return!1;var t=document.getElementsByTagName("html")[0];return e in(t?t.style:{})}))[0],b=g[y];function _(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),n)}function E(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r):e.attachEvent&&e.detachEvent("on".concat(t),n)}var x=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},S=!("undefined"!=typeof window&&window.document&&window.document.createElement);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var k={},T=function(e){Object(o.a)(n,e);var t=w(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).domFocus=function(){r.dom&&r.dom.focus()},r.removeStartHandler=function(e){e.touches.length>1||(r.startPos={x:e.touches[0].clientX,y:e.touches[0].clientY})},r.removeMoveHandler=function(e){if(!(e.changedTouches.length>1)){var t=e.currentTarget,n=e.changedTouches[0].clientX-r.startPos.x,i=e.changedTouches[0].clientY-r.startPos.y;(t===r.maskDom||t===r.handlerDom||t===r.contentDom&&function e(t,n,r,i){if(!n||n===document||n instanceof Document)return!1;if(n===t.parentNode)return!0;var a=Math.max(Math.abs(r),Math.abs(i))===Math.abs(i),o=Math.max(Math.abs(r),Math.abs(i))===Math.abs(r),s=n.scrollHeight-n.clientHeight,l=n.scrollWidth-n.clientWidth,c=document.defaultView.getComputedStyle(n),u="auto"===c.overflowY||"scroll"===c.overflowY,d="auto"===c.overflowX||"scroll"===c.overflowX,f=s&&u,h=l&&d;return!!(a&&(!f||f&&(n.scrollTop>=s&&i<0||n.scrollTop<=0&&i>0))||o&&(!h||h&&(n.scrollLeft>=l&&r<0||n.scrollLeft<=0&&r>0)))&&e(t,n.parentNode,r,i)}(t,e.target,n,i))&&e.cancelable&&e.preventDefault()}},r.transitionEnd=function(e){var t=e.target;E(t,b,r.transitionEnd),t.style.transition=""},r.onKeyDown=function(e){if(e.keyCode===v.a.ESC){var t=r.props.onClose;e.stopPropagation(),t&&t(e)}},r.onWrapperTransitionEnd=function(e){var t=r.props,n=t.open,i=t.afterVisibleChange;e.target===r.contentWrapper&&e.propertyName.match(/transform$/)&&(r.dom.style.transition="",!n&&r.getCurrentDrawerSome()&&(document.body.style.overflowX="",r.maskDom&&(r.maskDom.style.left="",r.maskDom.style.width="")),i&&i(!!n))},r.openLevelTransition=function(){var e=r.props,t=e.open,n=e.width,i=e.height,a=r.getHorizontalBoolAndPlacementName(),o=a.isHorizontal,s=a.placementName,l=r.contentDom?r.contentDom.getBoundingClientRect()[o?"width":"height"]:0,c=(o?n:i)||l;r.setLevelAndScrolling(t,s,c)},r.setLevelTransform=function(e,t,n,i){var a=r.props,o=a.placement,s=a.levelMove,l=a.duration,c=a.ease,u=a.showMask;r.levelDom.forEach((function(a){a.style.transition="transform ".concat(l," ").concat(c),_(a,b,r.transitionEnd);var d=e?n:0;if(s){var f=function(e,t){var n="function"==typeof e?e(t):e;return Array.isArray(n)?2===n.length?n:[n[0],n[1]]:[n]}(s,{target:a,open:e});d=e?f[0]:f[1]||0}var h="number"==typeof d?"".concat(d,"px"):d,p="left"===o||"top"===o?h:"-".concat(h);p=u&&"right"===o&&i?"calc(".concat(p," + ").concat(i,"px)"):p,a.style.transform=d?"".concat(t,"(").concat(p,")"):""}))},r.setLevelAndScrolling=function(e,t,n){var i=r.props.onChange;if(!S){var a=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(m.a)(!0):0;r.setLevelTransform(e,t,n,a),r.toggleScrollingToDrawerAndBody(a)}i&&i(e)},r.toggleScrollingToDrawerAndBody=function(e){var t=r.props,n=t.getOpenCount,i=t.getContainer,a=t.showMask,o=t.open,s=i&&i(),l=n&&n();if(s&&s.parentNode===document.body&&a){var c=["touchstart"],u=[document.body,r.maskDom,r.handlerDom,r.contentDom];o&&"hidden"!==document.body.style.overflow?(e&&r.addScrollingEffect(e),1===l&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",u.forEach((function(e,t){e&&_(e,c[t]||"touchmove",t?r.removeMoveHandler:r.removeStartHandler,r.passive)}))):r.getCurrentDrawerSome()&&(l||(document.body.style.overflow=""),document.body.style.touchAction="",e&&r.remScrollingEffect(e),u.forEach((function(e,t){e&&E(e,c[t]||"touchmove",t?r.removeMoveHandler:r.removeStartHandler,r.passive)})))}},r.addScrollingEffect=function(e){var t=r.props,n=t.placement,i=t.duration,a=t.ease,o=t.getOpenCount,s=t.switchScrollingEffect;1===(o&&o())&&s();var l="width ".concat(i," ").concat(a),c="transform ".concat(i," ").concat(a);switch(r.dom.style.transition="none",n){case"right":r.dom.style.transform="translateX(-".concat(e,"px)");break;case"top":case"bottom":r.dom.style.width="calc(100% - ".concat(e,"px)"),r.dom.style.transform="translateZ(0)"}clearTimeout(r.timeout),r.timeout=setTimeout((function(){r.dom&&(r.dom.style.transition="".concat(c,",").concat(l),r.dom.style.width="",r.dom.style.transform="")}))},r.remScrollingEffect=function(e){var t,n=r.props,i=n.placement,a=n.duration,o=n.ease,s=n.getOpenCount,l=n.switchScrollingEffect;s&&s()||l(!0),y&&(document.body.style.overflowX="hidden"),r.dom.style.transition="none";var c="width ".concat(a," ").concat(o),u="transform ".concat(a," ").concat(o);switch(i){case"left":r.dom.style.width="100%",c="width 0s ".concat(o," ").concat(a);break;case"right":r.dom.style.transform="translateX(".concat(e,"px)"),r.dom.style.width="100%",c="width 0s ".concat(o," ").concat(a),r.maskDom&&(r.maskDom.style.left="-".concat(e,"px"),r.maskDom.style.width="calc(100% + ".concat(e,"px)"));break;case"top":case"bottom":r.dom.style.width="calc(100% + ".concat(e,"px)"),r.dom.style.height="100%",r.dom.style.transform="translateZ(0)",t="height 0s ".concat(o," ").concat(a)}clearTimeout(r.timeout),r.timeout=setTimeout((function(){r.dom&&(r.dom.style.transition="".concat(u,",").concat(t?"".concat(t,","):"").concat(c),r.dom.style.transform="",r.dom.style.width="",r.dom.style.height="")}))},r.getCurrentDrawerSome=function(){return!Object.keys(k).some((function(e){return k[e]}))},r.getLevelDom=function(e){var t=e.level,n=e.getContainer;if(!S){var i,a=n&&n(),o=a?a.parentNode:null;if(r.levelDom=[],"all"===t)(o?Array.prototype.slice.call(o.children):[]).forEach((function(e){"SCRIPT"!==e.nodeName&&"STYLE"!==e.nodeName&&"LINK"!==e.nodeName&&e!==a&&r.levelDom.push(e)}));else t&&(i=t,Array.isArray(i)?i:[i]).forEach((function(e){document.querySelectorAll(e).forEach((function(e){r.levelDom.push(e)}))}))}},r.getHorizontalBoolAndPlacementName=function(){var e=r.props.placement,t="left"===e||"right"===e;return{isHorizontal:t,placementName:"translate".concat(t?"X":"Y")}},r.state={_self:Object(f.a)(r)},r}return Object(a.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(!S){var t=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return t=!0,null}}))}catch(e){}this.passive=!!t&&{passive:!1}}var n=this.props,r=n.open,i=n.getContainer,a=i&&i();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(9*Math.random()).toString())).toString(16)),this.getLevelDom(this.props),r&&(a&&a.parentNode===document.body&&(k[this.drawerId]=r),this.openLevelTransition(),this.forceUpdate((function(){e.domFocus()})))}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.open,r=t.getContainer,i=r&&r();n!==e.open&&(n&&this.domFocus(),i&&i.parentNode===document.body&&(k[this.drawerId]=!!n),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.getOpenCount,n=e.open,r=e.switchScrollingEffect,i="function"==typeof t&&t();delete k[this.drawerId],n&&(this.setLevelTransform(!1),document.body.style.touchAction=""),i||(document.body.style.overflow="",r(!0))}},{key:"render",value:function(){var e,t=this,n=this.props,i=n.className,a=n.children,o=n.style,s=n.width,l=n.height,c=(n.defaultOpen,n.open),f=n.prefixCls,h=n.placement,m=(n.level,n.levelMove,n.ease,n.duration,n.getContainer,n.handler),v=(n.onChange,n.afterVisibleChange,n.showMask),g=n.maskClosable,y=n.maskStyle,b=n.onClose,_=n.onHandleClick,E=n.keyboard,S=(n.getOpenCount,n.switchScrollingEffect,Object(r.a)(n,["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"])),w=!!this.dom&&c,k=p()(f,(e={},Object(d.a)(e,"".concat(f,"-").concat(h),!0),Object(d.a)(e,"".concat(f,"-open"),w),Object(d.a)(e,i||"",!!i),Object(d.a)(e,"no-mask",!v),e)),T=this.getHorizontalBoolAndPlacementName().placementName,O="left"===h||"top"===h?"-100%":"100%",C=w?"":"".concat(T,"(").concat(O,")"),A=m&&u.cloneElement(m,{onClick:function(e){m.props.onClick&&m.props.onClick(),_&&_(e)},ref:function(e){t.handlerDom=e}});return u.createElement("div",Object.assign({},S,{tabIndex:-1,className:k,style:o,ref:function(e){t.dom=e},onKeyDown:w&&E?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),v&&u.createElement("div",{className:"".concat(f,"-mask"),onClick:g?b:void 0,style:y,ref:function(e){t.maskDom=e}}),u.createElement("div",{className:"".concat(f,"-content-wrapper"),style:{transform:C,msTransform:C,width:x(s)?"".concat(s,"px"):s,height:x(l)?"".concat(l,"px"):l},ref:function(e){t.contentWrapper=e}},u.createElement("div",{className:"".concat(f,"-content"),ref:function(e){t.contentDom=e},onTouchStart:w&&v?this.removeStartHandler:void 0,onTouchMove:w&&v?this.removeMoveHandler:void 0},a),A))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t._self,i={prevProps:e};if(void 0!==n){var a=e.placement,o=e.level;a!==n.placement&&(r.contentDom=null),o!==n.level&&r.getLevelDom(e)}return i}}]),n}(u.Component);T.defaultProps={switchScrollingEffect:function(){}};var O=T;function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var i=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Object(s.a)(this,n)}}var A=function(e){Object(o.a)(n,e);var t=C(n);function n(e){var r;Object(i.a)(this,n),(r=t.call(this,e)).onHandleClick=function(e){var t=r.props,n=t.onHandleClick,i=t.open;if(n&&n(e),void 0===i){var a=r.state.open;r.setState({open:!a})}},r.onClose=function(e){var t=r.props,n=t.onClose,i=t.open;n&&n(e),void 0===i&&r.setState({open:!1})};var a=void 0!==e.open?e.open:!!e.defaultOpen;return r.state={open:a},"onMaskClick"in e&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),r}return Object(a.a)(n,[{key:"render",value:function(){var e=this,t=this.props,n=(t.defaultOpen,t.getContainer),i=t.wrapperClassName,a=t.forceRender,o=t.handler,s=Object(r.a)(t,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),l=this.state.open;if(!n)return u.createElement("div",{className:i,ref:function(t){e.dom=t}},u.createElement(O,Object.assign({},s,{open:l,handler:o,getContainer:function(){return e.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var d=!!o||a;return u.createElement(c.a,{visible:l,forceRender:d,getContainer:n,wrapperClassName:i},(function(t){var n=t.visible,i=t.afterClose,a=Object(r.a)(t,["visible","afterClose"]);return u.createElement(O,Object.assign({},s,a,{open:void 0!==n?n:l,afterVisibleChange:void 0!==i?i:s.afterVisibleChange,handler:o,onClose:e.onClose,onHandleClick:e.onHandleClick}))}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return void 0!==n&&e.open!==n.open&&(r.open=e.open),r}}]),n}(u.Component);A.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:u.createElement("div",{className:"drawer-handle"},u.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var L=A;t.a=L},fcyK:
/*!********************************************************!*\
!*** ./src/pages/Problems/OjForm/CodePanel/index.less ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},fyJ8:
/*!************************************************!*\
!*** ./node_modules/rc-table/es/Cell/index.js ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),a=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),o=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU"),s=n(/*! react */"q1tI"),l=n(/*! classnames */"TSYQ"),c=n.n(l),u=n(/*! rc-util/es/ref */"c+Xe"),d=n(/*! ../utils/valueUtil */"sR1s");var f=s.forwardRef((function(e,t){var n,l,f,h,p=e.prefixCls,m=e.className,v=e.record,g=e.index,y=e.dataIndex,b=e.render,_=e.children,E=e.component,x=void 0===E?"td":E,S=e.colSpan,w=e.rowSpan,k=e.fixLeft,T=e.fixRight,O=e.firstFixLeft,C=e.lastFixLeft,A=e.firstFixRight,L=e.lastFixRight,D=e.appendNode,I=e.additionalProps,R=void 0===I?{}:I,N=e.ellipsis,M=e.align,P=e.rowType,j=e.isSticky,F="".concat(p,"-cell");if(_)f=_;else{var U=Object(d.b)(v,y);if(f=U,b){var B=b(U,v,g);!(h=B)||"object"!==Object(o.a)(h)||Array.isArray(h)||s.isValidElement(h)?f=B:(f=B.children,l=B.props)}}"object"!==Object(o.a)(f)||Array.isArray(f)||s.isValidElement(f)||(f=null),N&&(C||A)&&(f=s.createElement("span",{className:"".concat(F,"-content")},f));var G=l||{},z=G.colSpan,H=G.rowSpan,K=G.style,V=G.className,W=Object(a.a)(G,["colSpan","rowSpan","style","className"]),q=void 0!==z?z:S,X=void 0!==H?H:w;if(0===q||0===X)return null;var Y={},$="number"==typeof k,J="number"==typeof T;$&&(Y.position="sticky",Y.left=k),J&&(Y.position="sticky",Y.right=T);var Q,Z={};M&&(Z.textAlign=M);var ee=!0===N?{showTitle:!0}:N;ee&&(ee.showTitle||"header"===P)&&("string"==typeof f||"number"==typeof f?Q=f.toString():s.isValidElement(f)&&"string"==typeof f.props.children&&(Q=f.props.children));var te,ne=Object(i.a)(Object(i.a)(Object(i.a)({title:Q},W),R),{},{colSpan:q&&1!==q?q:null,rowSpan:X&&1!==X?X:null,className:c()(F,m,(n={},Object(r.a)(n,"".concat(F,"-fix-left"),$),Object(r.a)(n,"".concat(F,"-fix-left-first"),O),Object(r.a)(n,"".concat(F,"-fix-left-last"),C),Object(r.a)(n,"".concat(F,"-fix-right"),J),Object(r.a)(n,"".concat(F,"-fix-right-first"),A),Object(r.a)(n,"".concat(F,"-fix-right-last"),L),Object(r.a)(n,"".concat(F,"-ellipsis"),N),Object(r.a)(n,"".concat(F,"-with-append"),D),Object(r.a)(n,"".concat(F,"-fix-sticky"),($||J)&&j),n),R.className,V),style:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},R.style),Z),Y),K),ref:(te=x,"string"==typeof te||Object(u.c)(te)?t:null)});return s.createElement(x,Object.assign({},ne),D,f)}));f.displayName="Cell";var h=s.memo(f,(function(e,t){return!!t.shouldCellUpdate&&!t.shouldCellUpdate(t.record,e.record)}));t.a=h},gRFJ:
/*!********************************************!*\
!*** ./node_modules/store/storages/all.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=[n(/*! ./localStorage */"rdUC"),n(/*! ./oldFF-globalStorage */"ynwM"),n(/*! ./oldIE-userDataStorage */"RELg"),n(/*! ./cookieStorage */"DlR+"),n(/*! ./sessionStorage */"CrYA"),n(/*! ./memoryStorage */"PD8m")]},gaXo:
/*!*************************************************!*\
!*** ./node_modules/store/plugins/lib/json2.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(module,exports){"object"!=typeof JSON&&(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,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,r,i,a,o,s=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,o=[],"[object Array]"===Object.prototype.toString.apply(l)){for(a=l.length,n=0;n<a;n+=1)o[n]=str(n,l)||"null";return i=0===o.length?"[]":gap?"[\n"+gap+o.join(",\n"+gap)+"\n"+s+"]":"["+o.join(",")+"]",gap=s,i}if(rep&&"object"==typeof rep)for(a=rep.length,n=0;n<a;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],l))&&o.push(quote(r)+(gap?": ":":")+i);else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(i=str(r,l))&&o.push(quote(r)+(gap?": ":":")+i);return i=0===o.length?"{}":gap?"{\n"+gap+o.join(",\n"+gap)+"\n"+s+"}":"{"+o.join(",")+"}",gap=s,i}}"function"!=typeof Date.prototype.toJSON&&(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),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var n,r,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},gqXR:
/*!*********************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/img/g.svg ***!
\*********************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/g.a5bcde87.svg"},hW8S:
/*!******************************************************!*\
!*** ./node_modules/rc-table/es/utils/legacyUtil.js ***!
\******************************************************/
/*! exports provided: INTERNAL_COL_DEFINE, getExpandableProps, getDataAndAriaProps */
/*! exports used: INTERNAL_COL_DEFINE, getDataAndAriaProps, getExpandableProps */function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),a=(n(/*! rc-util/es/warning */"Kwbf"),"RC_TABLE_INTERNAL_COL_DEFINE");function o(e){var t=e.expandable,n=Object(i.a)(e,["expandable"]);return"expandable"in e?Object(r.a)(Object(r.a)({},n),t):n}function s(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}},hgre:
/*!*********************************************!*\
!*** ./src/components/Video/Play/index.jsx ***!
\*********************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/message/style */"miYZ");var r=n(/*! antd/es/message */"tsqr"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */"9og8"),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */"WmNS"),o=n.n(a),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! flv.js */"GUcZ"),u=n(/*! hls.js */"ulZh"),d=n.n(u),f=n(/*! @/utils/authority */"xKgJ"),h=n(/*! @/utils/fullscreen.ts */"bntm"),p=n(/*! ./index.less?modules */"4xil"),m=n.n(p);function v(e){if(isNaN(e))return{minutes:"00",seconds:"00"};var t=new Date(1e3*e).toISOString().substr(11,8);return{minutes:t.substr(3,2),seconds:t.substr(6,2)}}function g(e,t){return e-t}function y(e){e.sort(g);for(var t=0,n=0;n<e.length-1;n++){var r=Math.abs(e[n+1]-e[n]);r<21&&(t+=r)}return t}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return!!(this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2)}});var b=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;t.a=Object(s.forwardRef)((function(e,t){var n,a,u,p=e.src,g=e.toLog,_=e.videoId,E=e.logWatchHistory,x=e.courseId,S=void 0===x?null:x,w=e.startTime,k=e.handlePause,T=void 0===k?function(){}:k,O=e.handlePlay,C=void 0===O?function(){}:O,A=e.handlePlayEnded,L=void 0===A?function(){}:A,D=e.videoSpeed,I=void 0===D?1:D,R="flv"===(null===(a=p=null===(n=p)||void 0===n?void 0:n.replace("http://","https://"))||void 0===a||null===(u=a.split("."))||void 0===u?void 0:u.pop()),N=Object(s.useRef)(),M=Object(s.useRef)(),P=Object(s.useRef)(),j=Object(s.useRef)(),F=Object(s.useRef)(),U=Object(s.useRef)(),B=Object(s.useRef)(),G=Object(s.useRef)(),z=Object(s.useRef)(),H=Object(s.useRef)(),K=Object(s.useRef)(),V=Object(s.useRef)(),W=Object(s.useRef)(),q=Object(s.useRef)(),X=navigator.userAgent.toLowerCase().match(b),Y=X?X[0]:"pc",$=Object(s.useRef)(!1),J=Object(f.x)(),Q=0,Z=0,ee=0,te=null,ne=!1,re=20,ie=1,ae=!1,oe=!1,se=[];Object(s.useImperativeHandle)(t,(function(){return{getLastUpdatedTime:function(){return N.current.currentTime},getDuration:function(){return N.current.duration}}}));var le=Object(s.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={point:N.current.currentTime};function r(){return a.apply(this,arguments)}function a(){return(a=Object(i.a)(o.a.mark((function t(){var r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return ae=!0,t.next=3,E(n);case 3:r=t.sent,te=r,ae=!1,e&&e();case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}te?(n.log_id=te,n.watch_duration=y(se),n.total_duration=Z):(S?(n.video_id=parseInt(_,10),n.course_id=S):n.video_id=_,n.duration=Q,n.device=Y),t&&(n.ed="1"),r()}),[_,S]);function ce(){N.current.paused?(j.current.style.display="none",F.current.style.display="block"):(j.current.style.display="block",F.current.style.display="none")}function ue(){K.current.style.display="none",W.current.style.display="none",V.current.style.display="none",N.current.muted||0===N.current.volume?K.current.style.display="block":N.current.volume>0&&N.current.volume<=.5?W.current.style.display="block":V.current.style.display="block"}Object(s.useEffect)((function(){var e;r.b.destroy();var t=null;return c.a.isSupported&&R&&p&&(null===(e=p)||void 0===e?void 0:e.indexOf(".m3u8"))<0?(t=c.a.createPlayer({type:"flv",volume:.8,cors:!0,url:p,muted:!1}),N.current&&(t.attachMediaElement(N.current),t.load())):N.current.setAttribute("src",p),ue(),function(){t&&(t.unload(),t.pause(),t.destroy(),t=null)}}),[N,R,p]),Object(s.useEffect)((function(){document.getElementById("play"),document.querySelectorAll(".playback-icons use");function e(){C(),w&&!$.current&&(N.current.currentTime=w),$.current=!0,se.push(N.current.currentTime),ne||(ne=!0,g&&le())}function t(){return n.apply(this,arguments)}function n(){return(n=Object(i.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ce(),se.push(N.current.currentTime),g&&le((function(){te=null,ee=0,ne=!1,ae=!1,oe=!1,se=[],Z=0,ie=1}),!0);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function r(){var e=Math.round(N.current.duration);U.current.setAttribute("max",e),B.current.setAttribute("max",e);var t=v(e);G.current.innerText="".concat(t.minutes,":").concat(t.seconds),G.current.setAttribute("datetime","".concat(t.minutes,"m ").concat(t.seconds,"s"))}function a(){var e=Math.round(N.current.duration);U.current.setAttribute("max",e),B.current.setAttribute("max",e);var t=v(e);G.current.innerText="".concat(t.minutes,":").concat(t.seconds),G.current.setAttribute("datetime","".concat(t.minutes,"m ").concat(t.seconds,"s")),U.current.value=Math.floor(N.current.currentTime),B.current.value=Math.floor(N.current.currentTime),function(){var e=v(Math.round(N.current.currentTime));z.current.innerText="".concat(e.minutes,":").concat(e.seconds),z.current.setAttribute("datetime","".concat(e.minutes,"m ").concat(e.seconds,"s"))}();var n=M.current.getBoundingClientRect(),r=n.width,i=(n.height,n.x),a=n.y;if(!(i<0||a<0)&&r&&!oe){var o=N.current.currentTime,s=o-ee;Math.abs(s)<10?(Z+=Math.abs(s),ee=o,ae||Z-ie*re>=0&&(ie++,se.push(ee),g&&le())):(ee=o,g&&le())}}function s(){oe=!0}function l(){N.current.playing&&se.push(N.current.currentTime,ee),ee=N.current.currentTime,oe=!1}function c(){(Q=N.current.duration)<=20&&(re=Q/3),N.current.addEventListener("play",e)}function u(){T()}function d(e){var t=e.target.dataset.seek?e.target.dataset.seek:e.target.value;N.current.currentTime=t,B.current.value=t,U.current.value=t}function f(e){var t=Math.round(e.offsetX/e.target.clientWidth*parseInt(e.target.getAttribute("max"),10));U.current.setAttribute("data-seek",t);var n=v(t);H.current.textContent="".concat(n.minutes,":").concat(n.seconds);var r=N.current.getBoundingClientRect();H.current.style.left="".concat(e.pageX-r.left,"px")}return P.current.addEventListener(Object(h.c)(),(function(e){e.preventDefault(),Object(h.a)()?(N.current.style.width="100%",N.current.style.height="100%"):N.current.style.cssText=""})),N.current.addEventListener("canplay",c),N.current.addEventListener("ended",t),N.current.addEventListener("seeking",s),N.current.addEventListener("seeked",l),N.current.addEventListener("loadedmetadata",r),U.current.addEventListener("mousemove",f),U.current.addEventListener("input",d),N.current.addEventListener("timeupdate",a),N.current.addEventListener("pause",u),N.current.addEventListener("volumechange",ue),function(){N.current.removeEventListener("canplay",c),N.current.removeEventListener("play",e),N.current.removeEventListener("ended",t),N.current.removeEventListener("seeking",s),N.current.removeEventListener("seeked",l),U.current.removeEventListener("mousemove",f),U.current.removeEventListener("input",d),N.current.removeEventListener("timeupdate",a),N.current.removeEventListener("pause",u),N.current.removeEventListener("loadedmetadata",r),N.current.removeEventListener("volumechange",ue),N.current.playing&&(se.push(ee,N.current.currentTime),g&&le())}}),[N,p]),Object(s.useEffect)((function(){var e;if(N.current.onended=function(){L(N)},N.current.oncontextmenu=function(){return!1},(null===(e=p)||void 0===e?void 0:e.indexOf(".m3u8"))>-1)if(N.current.canPlayType("application/vnd.apple.mpegurl"))N.current.src=p;else if(d.a.isSupported()){var t=new d.a;t.loadSource(p),t.attachMedia(N.current)}}),[p]),Object(s.useEffect)((function(){N.current.playbackRate=I}),[I]);return l.a.createElement("div",{style:{position:"relative"},ref:P},l.a.createElement("div",{ref:M,className:"".concat(m.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(m.a.animate__loop)},J?J.login:" "),l.a.createElement("div",{className:m.a.container},l.a.createElement("div",{className:m.a["video-container"],id:"video-container"},l.a.createElement("div",{className:m.a["playback-animation"],id:"playback-animation"},l.a.createElement("svg",{className:m.a["playback-icons"]},l.a.createElement("use",{className:"hidden",href:"#play-icon"}),l.a.createElement("use",{href:"#pause"}))),l.a.createElement("video",{className:m.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:N,autoPlay:!1}),l.a.createElement("div",{className:"".concat(m.a["video-controls"]," "),id:"video-controls"},l.a.createElement("div",{className:m.a["bottom-controls"]},l.a.createElement("div",{className:m.a["left-controls"]},l.a.createElement("button",{"data-title":"播放/暂停",id:"play",onClick:function(){N.current.paused||N.current.ended?N.current.play():N.current.pause(),ce()}},l.a.createElement("svg",{className:m.a["playback-icons"]},l.a.createElement("use",{ref:F,href:"#play-icon"}),l.a.createElement("use",{ref:j,style:{display:"none"},href:"#pause"}))),l.a.createElement("div",{className:m.a.time},l.a.createElement("time",{id:"time-elapsed",ref:z},"00:00"),l.a.createElement("span",null," / "),l.a.createElement("time",{id:"duration",ref:G},"00:00"))),l.a.createElement("div",{className:m.a["right-controls"]},l.a.createElement("div",{className:m.a["volume-controls"]},l.a.createElement("button",{"data-title":"开启/关闭声音",className:m.a["volume-button"],id:"volume-button",onClick:function(){N.current.muted=!N.current.muted,N.current.muted?(q.current.setAttribute("data-volume",volume.value),q.current.value=0):q.current.value=q.current.dataset.volume}},l.a.createElement("svg",null,l.a.createElement("use",{ref:K,href:"#volume-mute"}),l.a.createElement("use",{ref:W,href:"#volume-low"}),l.a.createElement("use",{ref:V,href:"#volume-high"}))),l.a.createElement("input",{className:m.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:q,style:{display:"none"},onClick:ue})),l.a.createElement("button",{"data-title":"全屏/退出全屏",className:m.a["fullscreen-button"],onClick:function(){Object(h.a)()?Object(h.b)():Object(h.d)(P.current)}},l.a.createElement("svg",null,l.a.createElement("use",{href:"#fullscreen"}),l.a.createElement("use",{href:"#fullscreen-exit",className:"hidden"}))))),l.a.createElement("div",{className:m.a["video-progress"]},l.a.createElement("progress",{ref:B,value:"0",min:"0"}),l.a.createElement("input",{className:m.a.seek,ref:U,value:"0",min:"0",type:"range",step:"1"}),l.a.createElement("div",{className:m.a["seek-tooltip"],ref:H,id:"seek-tooltip"},"00:00"))))),l.a.createElement("svg",{style:{display:"none"}},l.a.createElement("defs",null,l.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),l.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},l.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),l.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},l.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"})),l.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},l.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"})),l.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},l.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"})),l.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},l.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"})),l.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},l.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"})),l.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},l.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:
/*!**************************************************!*\
!*** ./src/components/SplitContainer/index.less ***!
\**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},je13:
/*!*************************************************!*\
!*** ./node_modules/store/dist/store.legacy.js ***!
\*************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../src/store-engine */"5nXd"),i=n(/*! ../storages/all */"gRFJ"),a=[n(/*! ../plugins/json2 */"uQRt")];e.exports=r.createStore(i,a)},kSUc:
/*!***************************************************!*\
!*** ./src/components/markdown-editor/index.less ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},"kaH+":
/*!************************************************!*\
!*** ./src/components/image-preview/index.tsx ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),a=n(/*! react */"q1tI"),o=n.n(a),s=(n(/*! ./index.less */"UZu5"),n(/*! @/components/mediator */"dhSg")),l=n(/*! @ant-design/icons */"rLCj"),c=n(/*! @ant-design/icons */"dF/Y"),u=n(/*! @ant-design/icons */"4i/N");t.a=function(){var e=Object(a.useState)(""),t=Object(i.a)(e,2),n=t[0],d=t[1],f=Object(a.useState)(0),h=Object(i.a)(f,2),p=h[0],m=h[1],v=Object(a.useRef)("");function g(e){27==e.keyCode&&v.current&&y()}function y(){document.body.style.overflow="auto",d("")}return Object(a.useEffect)((function(){return s.a.subscribe("preview-image",(function(e){d(e),document.body.style.overflow="hidden"}))}),[]),Object(a.useEffect)((function(){return document.addEventListener("keydown",g),function(){document.removeEventListener("keydown",g)}}),[]),Object(a.useEffect)((function(){v.current=n}),[n]),o.a.createElement(a.Fragment,null,n?o.a.createElement("div",{className:"image-preview-container"},o.a.createElement("div",{className:"button-group"},o.a.createElement(r.a,{onClick:function(){m(p+90)}},"旋转",o.a.createElement(l.a,null)),o.a.createElement(r.a,{href:n},"下载",o.a.createElement(c.a,null)),o.a.createElement(r.a,{onClick:y},"关闭",o.a.createElement(u.a,null))),o.a.createElement("div",{className:"preview-wrp-group"},o.a.createElement("img",{className:"image-preview",src:n,alt:"预览大图",style:{transform:"rotate(".concat(p,"deg)")}}))):null)}},kovY:
/*!**************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/e.svg ***!
\**************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/e.eabfa286.svg"},lOMy:
/*!****************************************************!*\
!*** ./src/components/tpi-code-setting/index.less ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},lZu9:
/*!***********************************************************!*\
!*** ./node_modules/codemirror/mode/markdown/markdown.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={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 o in a)a.hasOwnProperty(o)&&n.tokenTypeOverrides[o]&&(a[o]=n.tokenTypeOverrides[o]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,h=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/;function v(e,t,n){return t.f=t.inline=n,n(e,t)}function g(e,t,n){return t.f=t.block=n,n(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==_){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=w,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(r,i){var o,f=r.column()===i.indentation,m=!(o=i.prevLine.stream)||!/\S/.test(o.string),g=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,_=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var S=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;S<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;!1!==i.list&&(i.indentationDiff=S-i.listStack[i.listStack.length-1])}var w=!(m||y||i.prevLine.header||b&&g||i.prevLine.fencedCodeEnd),k=(!1===i.list||y||m)&&i.indentation<=_&&r.match(s),T=null;if(i.indentationDiff>=4&&(g||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return r.skipToEnd(),i.indentedCode=!0,a.code;if(r.eatSpace())return null;if(f&&i.indentation<=_&&(T=r.match(u))&&T[1].length<=6)return i.quote=0,i.header=T[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,x(i);if(i.indentation<=_&&r.eat(">"))return i.quote=f?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),r.eatSpace(),x(i);if(!k&&!i.setext&&f&&i.indentation<=_&&(T=r.match(l))){var O=T[1]?"ol":"ul";return i.indentation=S+r.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&r.match(c,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+O]),x(i)}return f&&i.indentation<=_&&(T=r.match(h,!0))?(i.quote=0,i.fencedEndRE=new RegExp(T[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}(T[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=E,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,x(i)):i.setext||!(w&&b||i.quote||!1!==i.list||i.code||k||p.test(r.string))&&(T=r.lookAhead(1))&&(T=T.match(d))?(i.setext?(i.header=i.setext,i.setext=0,r.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==T[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,x(i)):k?(r.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===r.peek()?v(r,i,C):v(r,i,i.inline)}function _(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=w,n.block=b,n.htmlState=null)}return a}function E(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,s=i+3;return t.fencedEndRE&&t.indentation<=s&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=x(t)),t.localMode=t.localState=null,t.block=b,t.f=w,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?g(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function x(e){var t=[];if(e.formatting){t.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function S(e,t){if(e.match(f,!0))return x(t)}function w(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,x(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,x(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),x(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return a.linkHref}if("`"===s){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=i.code||i.quote&&1!=f){if(f==i.code){var h=x(i);return i.code=0,h}return i.formatting=d,x(i)}return i.code=f,x(i)}if(i.code)return x(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var p=x(i),v=a.formatting+"-escape";return p?p+" "+v:v}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),x(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),x(i);if("]"===s&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=x(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=T,p}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),x(i);if("]"===s&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=x(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?T:w,p}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=x(i))?p+=" ":p="",p+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,n.highlightFormatting&&(i.formatting="link"),(p=x(i))?p+=" ":p="",p+a.linkEmail;if(n.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),g(t,i,_)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var E=1,S=1==t.pos?" ":t.string.charAt(t.pos-2);E<3&&t.eat(s);)E++;var O=t.peek()||" ",C=!/\s/.test(O)&&(!m.test(O)||/\s/.test(S)||m.test(S)),A=!/\s/.test(S)&&(!m.test(S)||/\s/.test(O)||m.test(O)),L=null,D=null;if(E%2&&(i.em||!C||"*"!==s&&A&&!m.test(S)?i.em!=s||!A||"*"!==s&&C&&!m.test(O)||(L=!1):L=!0),E>1&&(i.strong||!C||"*"!==s&&A&&!m.test(S)?i.strong!=s||!A||"*"!==s&&C&&!m.test(O)||(D=!1):D=!0),null!=D||null!=L)return n.highlightFormatting&&(i.formatting=null==L?"strong":null==D?"em":"strong em"),!0===L&&(i.em=s),!0===D&&(i.strong=s),h=x(i),!1===L&&(i.em=!1),!1===D&&(i.strong=!1),h}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return x(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),h=x(i),i.strikethrough=!1,h;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),x(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return x(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var I=x(i);return i.emoji=!1,I}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),x(i)}function k(e,t){if(">"===e.next()){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link");var r=x(t);return r?r+=" ":r="",r+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function T(e,t){if(e.eatSpace())return null;var r,i=e.next();return"("===i||"["===i?(t.f=t.inline=(r="("===i?")":"]",function(e,t){if(e.next()===r){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link-string");var i=x(t);return t.linkHref=!1,i}return e.match(O[r]),t.linkHref=!0,x(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,x(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function C(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=A,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,x(t)):v(e,t,w)}function A(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=L,n.highlightFormatting&&(t.formatting="link");var r=x(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function L(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=w,a.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:w,text:S,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=_)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==_?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,n,i){return t.block==_&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:y,getType:x,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(/*! ../../lib/codemirror */"VrN/"),n(/*! ../xml/xml */"1eCo"),n(/*! ../meta */"8EBN"))},n6Qo:
/*!**************************************************************!*\
!*** ./node_modules/rc-table/es/Footer/index.js + 2 modules ***!
\**************************************************************/
/*! exports provided: default, FooterComponents */
/*! exports used: FooterComponents, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI"),i=n("biw7"),a=n("fyJ8");t.b=function(e){var t=e.children,n=r.useContext(i.a).prefixCls;return r.createElement("tfoot",{className:"".concat(n,"-summary")},t)};var o={Cell:function(e){var t=e.className,n=e.index,o=e.children,s=e.colSpan,l=e.rowSpan,c=r.useContext(i.a),u=c.prefixCls,d=c.fixedInfoList[n];return r.createElement(a.a,Object.assign({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,render:function(){return{children:o,props:{colSpan:s,rowSpan:l}}}},d))},Row:function(e){return r.createElement("tr",Object.assign({},e))}}},nCk5:
/*!**************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/d.svg ***!
\**************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/d.53bf6ae3.svg"},nWbc:
/*!**********************************************************************!*\
!*** ./src/pages/tasks/left-panel/discuss/discuss-editor/index.less ***!
\**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},oE5q:
/*!******************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/img/t.svg ***!
\******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/t.0b94c5c3.svg"},oFv4:
/*!*************************************************!*\
!*** ./src/assets/images/question/internal.png ***!
\*************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/internal.da228387.png"},osHv:
/*!********************************************************!*\
!*** ./node_modules/codemirror/addon/fold/xml-fold.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="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",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function o(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(o(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function f(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(o(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function h(e,n){for(var r=[];;){var i,a=d(e),o=e.line,s=e.ch-(a?a[0].length:0);if(!a||!(i=c(e)))return;if("selfClose"!=i)if(a[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(o,s),to:t(e.line,e.ch)}}else r.push(a[2])}}function p(e,n){for(var r=[];;){var i=f(e);if(!i)return;if("selfClose"!=i){var a=e.line,o=e.ch,s=u(e);if(!s)return;if(s[1])r.push(s[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==s[2]){r.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(a,o)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new a(e,r.line,0);;){var o=d(i);if(!o||i.line!=r.line)return;var s=c(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var l=t(i.line,i.ch),u=h(i,o[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var o=new a(e,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=c(o),l=s&&t(o.line,o.ch),d=s&&u(o);if(s&&d&&!(n(o,r)>0)){var f={from:t(o.line,o.ch),to:l,tag:d[2]};return"selfClose"==s?{open:f,close:null,at:"open"}:d[1]?{open:p(o,d[2]),close:f,at:"close"}:{open:f,close:h(o=new a(e,l.line,l.ch,i),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new a(e,t.line,t.ch,n);;){var o=p(i,r);if(!o)break;var s=h(new a(e,t.line,t.ch,n),o.tag);if(s)return{open:o,close:s}}},e.scanForClosingTag=function(e,t,n,r){return h(new a(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(/*! ../../lib/codemirror */"VrN/"))},p5ED:
/*!*********************************************!*\
!*** ./src/components/PreviewAll/index.tsx ***!
\*********************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n(/*! antd/es/button/style */"+L6B");var r=n(/*! antd/es/button */"2/Rp"),i=(n(/*! antd/es/tooltip/style */"5Dmo"),n(/*! antd/es/tooltip */"3S7+")),a=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */"k1fw"),o=n(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */"tJVT"),s=n(/*! react */"q1tI"),l=n.n(s),c=n(/*! ./index.less?modules */"vHTk"),u=n.n(c),d=n(/*! @ant-design/icons */"yEEn"),f=n(/*! @/components/monaco-editor */"ZW9T"),h=n(/*! @/utils/util */"1vsH");t.a=function(e){var t=e.name,n=e.data,c=(e.theme,e.type),p=e.filename,m=e.monacoEditor,v=e.className,g=e.style,y=e.close,b=e.onClose,_=e.hasMask,E=Object(s.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),x=Object(o.a)(E,2),S=(x[0],x[1],Object(s.useState)("")),w=Object(o.a)(S,2),k=(w[0],w[1]),T=Object(s.useRef)();p&&(m.filename=p),Object(s.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&k(t[1])}))}),[]);var O=function(){n.startsWith("http")||n.startsWith("/")?C():Object(h.x)(p||"educoder",n,p)},C=function(){Object(h.v)(p||t,n)};return console.log("data:",n,"fileanme:",p," name:",t),l.a.createElement("div",{style:Object(a.a)({},g||{}),className:"".concat(_&&u.a.bgBlack," ").concat(c?u.a.wrp:"hide")},y&&l.a.createElement("div",{className:u.a.close,ref:T},l.a.createElement(i.a,{title:"点击下载此文件",getPopupContainer:function(){return T.current}},l.a.createElement("span",{onClick:C},l.a.createElement("i",{className:"icon-quxiaozhiding"}))),l.a.createElement(i.a,{title:"关闭",getPopupContainer:function(){return T.current}},l.a.createElement("span",{className:"",onClick:b},l.a.createElement("i",{className:"icon-guanbi1"})))),l.a.createElement("div",{className:"".concat(u.a[v]," ").concat(v," ").concat(u.a.monaco," ").concat("txt"===c?"show":"hide")},"txt"===c&&l.a.createElement(f.b,m)),"audio"===c&&l.a.createElement("audio",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?n:"data:audio/mp3;base64,").concat(n),autoPlay:!0}),"video"===c&&l.a.createElement(l.a.Fragment,null,null!=n&&n.startsWith("/")?l.a.createElement("video",{controls:!0,src:"".concat(n),autoPlay:!0}):l.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(n),autoPlay:!0})),"pdf"===c&&l.a.createElement("embed",{className:u.a.embed,src:n}),"image"===c&&l.a.createElement(l.a.Fragment,null,l.a.createElement("img",{src:"".concat(null!=n&&n.startsWith("/")||(null==n?void 0:n.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(n)})),"other"===c&&l.a.createElement("div",null,l.a.createElement(r.a,{type:"primary",size:"large",onClick:O},l.a.createElement(d.a,null),"点击下载")),("download"===c||"office"===c)&&l.a.createElement(r.a,{type:"primary",size:"large",onClick:O},l.a.createElement(d.a,null),"点击下载"))}},"p77/":
/*!****************************************************!*\
!*** ./node_modules/codemirror/lib/codemirror.css ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},pYxM:
/*!***********************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/index.less?modules ***!
\***********************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){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:
/*!****************************************************!*\
!*** ./node_modules/aliyun-vod-upload-ll/index.js ***!
\****************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){(function(t){!function(t){window.OSS=t(),e.exports=t()}((function(){return function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){return i(t[o][1][e]||e)}),c,c.exports,e,t,n,r)}return n[o].exports}for(var a=!1,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";var r=e("./browser/client");r.Buffer=e("buffer").Buffer,r.co=e("co"),r.urllib=e("../shims/xhr"),r.version=e("./browser/version").version,t.exports=r},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(e,t,n){(function(n,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(this instanceof a))return new a(e,t);e&&e.inited?this.options=e:this.options=a.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=E,this.agent=this.options.agent||O),this.ctx=t,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var o=i(e("babel-runtime/regenerator")),s=i(e("babel-runtime/core-js/object/keys")),l=e("debug")("ali-oss"),c=e("./../../shims/crypto/crypto.js"),u=e("path"),d=e("copy-to"),f=e("mime"),h=e("xml2js"),p=e("humanize-ms"),m=e("agentkeepalive"),v=e("merge-descriptors"),g=e("url"),y=e("is-type-of"),b=e("platform"),_=e("utility"),E=e("urllib"),x=e("./version"),S=e("dateformat"),w=e("bowser"),k=e("../common/signUtils"),T=e("../common/utils"),O=new m;t.exports=a,a.initOptions=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var t={region:"oss-cn-hangzhou",internal:!1,secure:document&&document.location&&"https:"===document.location.protocol,bucket:null,endpoint:null,cname:!1};if((0,s.default)(e).forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=p(t.timeout)),t.endpoint)t.endpoint=function(e,t){var n=g.parse(e);if(!n.protocol){var r=t?"https://":"http://";n=g.parse(r+e)}if("http:"!==n.protocol&&"https:"!==n.protocol)throw new Error("Endpoint protocol must be http or https.");return n}(t.endpoint,t.secure);else{if(!t.region)throw new Error("require options.endpoint or options.region");t.endpoint=function(e,t,n){var r=n?"https://":"http://",i=t?"-internal.aliyuncs.com":".aliyuncs.com";return"vpc100-oss-cn-"===e.substr(0,"vpc100-oss-cn-".length)&&(i=".aliyuncs.com"),g.parse(r+e+i)}(t.region,t.internal,t.secure)}return t.inited=!0,t};var C=a.prototype;v(C,e("./object")),v(C,e("./managed_upload")),v(C,e("../common/multipart")),v(C,e("../common/thunkpool.js")),a.Wrapper=e("./wrapper"),C.signature=function(e){return l("authorization stringToSign: %s",e),k.computeSignature(this.options.accessKeySecret,e)},C.authorization=function(e,t,n,r){var i=k.buildCanonicalString(e.toUpperCase(),t,{headers:r,parameters:n});return k.authorization(this.options.accessKeyId,this.options.accessKeySecret,i)},C.createRequest=function(e){var t={"x-oss-date":S(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(t["x-oss-security-token"]=this.options.stsToken),d(e.headers).to(t),function(e,t){return e[t]||e[t.toLowerCase()]}(t,"Content-Type")||(e.mime===f.default_type&&(e.mime=""),e.mime&&e.mime.indexOf("/")>0?t["Content-Type"]=e.mime:t["Content-Type"]=f.getType(e.mime||u.extname(e.object||""))||"application/octet-stream"),e.content&&(t["Content-Md5"]=c.createHash("md5").update(new r(e.content,"utf8")).digest("base64"),t["Content-Length"]||(t["Content-Length"]=e.content.length));var n=this._getResource(e);t.authorization=this.authorization(e.method,n,e.subres,t);var i=this._getReqUrl(e);l("request %s %s, with headers %j, !!stream: %s",e.method,i,t,!!e.stream);var a=e.timeout||this.options.timeout;return{url:i,params:{agent:this.agent,method:e.method,content:e.content,stream:e.stream,headers:t,timeout:a,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx}}},C.request=o.default.mark((function e(t){var n,r,i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.createRequest(t),r=void 0,i=void 0,e.prev=3,e.next=6,this.urllib.request(n.url,n.params);case 6:r=e.sent,l("response %s %s, got %s, headers: %j",t.method,n.url,r.status,r.headers),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),i=e.t0;case 13:if(a=void 0,!r||!t.successStatuses||-1!==t.successStatuses.indexOf(r.status)){e.next=26;break}return e.next=17,this.requestError(r);case 17:if("RequestTimeTooSkewed"!==(a=e.sent).code){e.next=23;break}return this.options.amendTimeSkewed=+new Date(a.serverTime)-new Date,e.next=22,this.request(t);case 22:return e.abrupt("return",e.sent);case 23:a.params=t,e.next=30;break;case 26:if(!i){e.next=30;break}return e.next=29,this.requestError(i);case 29:a=e.sent;case 30:if(!a){e.next=32;break}throw a;case 32:if(!t.xmlResponse){e.next=36;break}return e.next=35,this.parseXML(r.data);case 35:r.data=e.sent;case 36:return e.abrupt("return",r);case 37:case"end":return e.stop()}}),e,this,[[3,10]])})),C._getResource=function(e){var t="/";return e.bucket&&(t+=e.bucket+"/"),e.object&&(t+=e.object),t},C._isIP=function(e){return T._isIP(e)},C._escape=function(e){return _.encodeURIComponent(e).replace(/%2F/g,"/")},C._getReqUrl=function(e){var t={};d(this.options.endpoint).to(t);var n=this._isIP(t.hostname),r=this.options.cname;!e.bucket||r||n||(t.host=e.bucket+"."+t.host);var i="/";e.bucket&&n&&(i+=e.bucket+"/"),e.object&&(i+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=i;var a={};if(e.query&&v(a,e.query),e.subres){var o={};y.string(e.subres)?o[e.subres]="":y.array(e.subres)?e.subres.forEach((function(e){o[e]=""})):o=e.subres,v(a,o)}return t.query=a,g.format(t)},C._getUserAgent=function(){var e="aliyun-sdk-"+(n&&n.browser?"js":"nodejs")+"/"+x.version,t=b.description;return!t&&n&&(t="Node.js "+n.version.slice(1)+" on "+n.platform+" "+n.arch),this._checkUserAgent(e+" "+t)},C._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},C.checkBrowserAndVersion=function(e,t){return w.name===e&&w.version.split(".")[0]===t},C.parseXML=function(e){return function(t){r.isBuffer(e)&&(e=e.toString()),h.parseString(e,{explicitRoot:!1,explicitArray:!1},t)}},C.requestError=o.default.mark((function e(t){var n,r,i,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,t.data&&t.data.length){e.next=5;break}-1===t.status||-2===t.status?((n=new Error(t.message)).name=t.name,n.status=t.status,n.code=t.name):(404===t.status?((n=new Error("Object not exists")).name="NoSuchKeyError",n.status=404,n.code="NoSuchKey"):412===t.status?((n=new Error("Pre condition failed")).name="PreconditionFailedError",n.status=412,n.code="PreconditionFailed"):((n=new Error("Unknow error, status: "+t.status)).name="UnknowError",n.status=t.status),n.requestId=t.headers["x-oss-request-id"],n.host=""),e.next=30;break;case 5:return r=String(t.data),l("request response error data: %s",r),i=void 0,e.prev=8,e.next=11,this.parseXML(r)||{};case 11:i=e.sent,e.next=21;break;case 14:return e.prev=14,e.t0=e.catch(8),l(r),e.t0.message+="\nraw xml: "+r,e.t0.status=t.status,e.t0.requestId=t.headers["x-oss-request-id"],e.abrupt("return",e.t0);case 21:a=i.Message||"unknow request error, status: "+t.status,i.Condition&&(a+=" (condition: "+i.Condition+")"),(n=new Error(a)).name=i.Code?i.Code+"Error":"UnknowError",n.status=t.status,n.code=i.Code,n.requestId=i.RequestId,n.hostId=i.HostId,n.serverTime=i.ServerTime;case 30:return l("generate error %j",n),e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,this,[[8,14]])}))}).call(this,e("_process"),e("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(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(this instanceof i))return new i(e,t);h.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var a=r(e("babel-runtime/core-js/array/from")),o=r(e("babel-runtime/regenerator")),s=e("is-type-of"),l=e("util"),c=e("path"),u=e("mime"),d=e("copy-to"),f=n;f.multipartUpload=o.default.mark((function e(t,n,r){var i,a,l,d,f,h,p,m,v;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.resetCancelFlag(),!(r=r||{}).checkpoint||!r.checkpoint.uploadId){e.next=6;break}return e.next=5,this._resumeMultipart(r.checkpoint,r);case 5:return e.abrupt("return",e.sent);case 6:return i=102400,r.mime||(s.file(n)?r.mime=u.getType(c.extname(n.name)):s.blob(n)?r.mime=n.type:r.mime=u.getType(c.extname(n))),r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),e.next=12,this._getFileSize(n);case 12:if(!((a=e.sent)<i)){e.next=25;break}return l=this._createStream(n,0,a),r.contentLength=a,e.next=18,this.putStream(t,l,r);case 18:if(d=e.sent,!r||!r.progress){e.next=22;break}return e.next=22,r.progress(1);case 22:return f={res:d.res,bucket:this.options.bucket,name:t,etag:d.res.headers.etag},(r.headers&&r.headers["x-oss-callback"]||r.callback)&&(f.data=d.data),e.abrupt("return",f);case 25:if(!(r.partSize&&r.partSize<i)){e.next=27;break}throw new Error("partSize must not be smaller than "+i);case 27:return e.next=29,this.initMultipartUpload(t,r);case 29:if(h=e.sent,p=h.uploadId,m=this._getPartSize(a,r.partSize),v={file:n,name:t,fileSize:a,partSize:m,uploadId:p,doneParts:[]},!r||!r.progress){e.next=36;break}return e.next=36,r.progress(0,v,h.res);case 36:return e.next=38,this._resumeMultipart(v,r);case 38:return e.abrupt("return",e.sent);case 39:case"end":return e.stop()}}),e,this)})),f._resumeMultipart=o.default.mark((function e(t,n){var r,i,s,l,c,u,f,h,p,m,v,g,y,b,_,E,x,S,w,k;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isCancel()){e.next=2;break}throw this._makeCancelEvent();case 2:if(r=t.file,i=t.fileSize,s=t.partSize,l=t.uploadId,c=t.doneParts,u=t.name,f=[],c.length>0&&d(c).to(f),h=this._divideParts(i,s),p=h.length,m=!1,v=o.default.mark((function e(i,a){var s,d,v;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.isCancel()){e.next=21;break}return e.prev=1,s=h[a-1],d={stream:i._createStream(r,s.start,s.end),size:s.end-s.start},e.next=6,i._uploadPart(u,l,a,d);case 6:if(v=e.sent,i.isCancel()||m){e.next=13;break}if(t.doneParts.push({number:a,etag:v.res.headers.etag}),f.push({number:a,etag:v.res.headers.etag}),!n||!n.progress){e.next=13;break}return e.next=13,n.progress(c.length/p,t,v.res);case 13:e.next=21;break;case 15:if(e.prev=15,e.t0=e.catch(1),i.isCancel()){e.next=21;break}throw i.cancel(),e.t0.partNum=a,e.t0;case 21:case"end":return e.stop()}}),e,this,[[1,15]])})),g=(0,a.default)(new Array(p),(function(e,t){return t+1})),y=f.map((function(e){return e.number})),b=g.filter((function(e){return y.indexOf(e)<0})),5,_=n.parallel||5,!this.checkBrowserAndVersion("Internet Explorer","10")&&1!==_){e.next=26;break}E=0;case 16:if(!(E<b.length)){e.next=24;break}if(!this.isCancel()){e.next=19;break}throw this._makeCancelEvent();case 19:return e.next=21,v(this,b[E]);case 21:E++,e.next=16;break;case 24:e.next=40;break;case 26:for(x=[],S=0;S<b.length;S++)x.push(v(this,b[S]));return e.next=30,this._thunkPool(x,_);case 30:if(w=e.sent,m=!0,!(w&&w.length>0)){e.next=37;break}throw this.resetCancelFlag(),(k=w[0]).message="Failed to upload some parts with error: "+k.toString()+" part_num: "+k.partNum,k;case 37:if(!this.isCancel()){e.next=40;break}throw x=null,this._makeCancelEvent();case 40:return e.next=42,this.completeMultipartUpload(u,l,f,n);case 42:return e.abrupt("return",e.sent);case 43:case"end":return e.stop()}}),e,this)})),s.file=function(e){return"undefined"!=typeof File&&e instanceof File},s.blob=function(e){return"undefined"!=typeof Blob&&e instanceof Blob},f._getFileSize=o.default.mark((function e(t){var n;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!s.buffer(t)){e.next=4;break}return e.abrupt("return",t.length);case 4:if(!s.blob(t)&&!s.file(t)){e.next=6;break}return e.abrupt("return",t.size);case 6:if(!s.string(t)){e.next=11;break}return e.next=9,this._statFile(t);case 9:return n=e.sent,e.abrupt("return",n.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return e.stop()}}),e,this)}));var h=e("stream").Readable;l.inherits(i,h),i.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.start<this.fileBuffer.length;){var n=this.start,r=n+e;r=r>this.fileBuffer.length?this.fileBuffer.length:r,this.start=r,t=this.push(this.fileBuffer.slice(n,r))}},i.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var n=this;this.reader.onload=function(r){n.fileBuffer=new t(new Uint8Array(r.target.result)),n.file=null,n.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},f._createStream=function(e,t,n){if(s.blob(e)||s.file(e))return new i(e.slice(t,n));throw new Error("_createStream requires File/String.")},f._getPartSize=function(e,t){return t?Math.max(Math.ceil(e/1e4),t):1048576},f._divideParts=function(e,t){for(var n=Math.ceil(e/t),r=[],i=0;i<n;i++){var a=t*i,o=Math.min(a+t,e);r.push({start:a,end:o})}return r},f._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,e("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/keys")),a=r(e("babel-runtime/regenerator")),o=e("debug")("ali-oss:object"),s=e("utility"),l=e("fs"),c=e("is-type-of"),u=e("url"),d=e("copy-to"),f=e("path"),h=e("mime"),p=e("../common/callback"),m=e("../common/signUtils"),v=n;v.append=a.default.mark((function e(t,n,r){var i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===(r=r||{}).position&&(r.position="0"),r.subres={append:"",position:r.position},r.method="POST",e.next=6,this.put(t,n,r);case 6:return(i=e.sent).nextAppendPosition=i.res.headers["x-oss-next-append-position"],e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)})),v.put=a.default.mark((function e(t,n,r){var i,o,s,l,u,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=void 0,r=r||{},!c.buffer(n)){e.next=6;break}i=n,e.next=18;break;case 6:if(!c.blob(n)&&!c.file(n)){e.next=17;break}return r.mime||(c.file(n)?r.mime=h.getType(f.extname(n.name)):r.mime=n.type),o=this._createStream(n,0,n.size),e.next=11,this._getFileSize(n);case 11:return r.contentLength=e.sent,e.next=14,this.putStream(t,o,r);case 14:return e.abrupt("return",e.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),s=r.method||"PUT",l=this._objectRequestParams(s,t,r),p.encodeCallback(l,r),l.mime=r.mime,l.content=i,l.successStatuses=[200],e.next=28,this.request(l);case 28:return u=e.sent,d={name:t,url:this._objectUrl(t),res:u.res},l.headers&&l.headers["x-oss-callback"]&&(d.data=JSON.parse(u.data.toString())),e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)})),v.putStream=a.default.mark((function e(t,n,r){var i,o,s,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},r.contentLength?r.headers["Content-Length"]=r.contentLength:r.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(r.meta,r.headers),i=r.method||"PUT",o=this._objectRequestParams(i,t,r),p.encodeCallback(o,r),o.mime=r.mime,o.stream=n,o.successStatuses=[200],e.next=12,this.request(o);case 12:return s=e.sent,l={name:t,url:this._objectUrl(t),res:s.res},o.headers&&o.headers["x-oss-callback"]&&(l.data=JSON.parse(s.data.toString())),e.abrupt("return",l);case 16:case"end":return e.stop()}}),e,this)})),v.head=a.default.mark((function e(t,n){var r,o,s;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("HEAD",t,n)).successStatuses=[200,304],e.next=4,this.request(r);case 4:return o=e.sent,s={meta:null,res:o.res,status:o.status},200===o.status&&(0,i.default)(o.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(s.meta||(s.meta={}),s.meta[e.substring(11)]=o.headers[e])})),e.abrupt("return",s);case 8:case"end":return e.stop()}}),e,this)})),v.get=a.default.mark((function e(t,n,r){var i,s,u,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null,s=!1,c.writableStream(n)?i=n:c.string(n)?(i=l.createWriteStream(n),s=!0):r=n,(r=r||{}).process&&(r.subres=r.subres||{},r.subres["x-oss-process"]=r.process),u=void 0,e.prev=6,(d=this._objectRequestParams("GET",t,r)).writeStream=i,d.successStatuses=[200,206,304],e.next=12,this.request(d);case 12:u=e.sent,s&&i.destroy(),e.next=24;break;case 16:if(e.prev=16,e.t0=e.catch(6),!s){e.next=23;break}return i.destroy(),o("get error: %s, delete the exists file %s",e.t0,n),e.next=23,this._deleteFileSafe(n);case 23:throw e.t0;case 24:return e.abrupt("return",{res:u.res,content:u.data});case 25:case"end":return e.stop()}}),e,this,[[6,16]])})),v.getStream=a.default.mark((function e(t,n){var r,i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=n||{},(r=this._objectRequestParams("GET",t,n)).customResponse=!0,r.successStatuses=[200,206,304],e.next=6,this.request(r);case 6:return i=e.sent,e.abrupt("return",{stream:i.res,res:{status:i.status,headers:i.headers}});case 8:case"end":return e.stop()}}),e,this)})),v.delete=a.default.mark((function e(t,n){var r,i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("DELETE",t,n)).successStatuses=[204],e.next=4,this.request(r);case 4:return i=e.sent,e.abrupt("return",{res:i.res});case 6:case"end":return e.stop()}}),e,this)})),v.deleteMulti=a.default.mark((function e(t,n){var r,i,l,c,u,d;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r='<?xml version="1.0" encoding="UTF-8"?>\n<Delete>\n',(n=n||{}).quiet?r+=" <Quiet>true</Quiet>\n":r+=" <Quiet>false</Quiet>\n",i=0;i<t.length;i++)r+=" <Object><Key>"+s.escape(this._objectName(t[i]))+"</Key></Object>\n";return o("delete multi objects: %s",r+="</Delete>"),n.subres="delete",(l=this._objectRequestParams("POST","",n)).mime="xml",l.content=r,l.xmlResponse=!0,l.successStatuses=[200],e.next=14,this.request(l);case 14:return c=e.sent,u=c.data,(d=u&&u.Deleted||null)&&(Array.isArray(d)||(d=[d]),d=d.map((function(e){return e.Key}))),e.abrupt("return",{res:c.res,deleted:d});case 19:case"end":return e.stop()}}),e,this)})),v.copy=a.default.mark((function e(t,n,r){var o,s,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},(0,i.default)(r.headers).forEach((function(e){r.headers["x-oss-copy-source-"+e.toLowerCase()]=r.headers[e]})),r.meta&&(r.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(r.meta,r.headers),n="/"!==n[0]?"/"+this.options.bucket+"/"+encodeURIComponent(n):"/"+encodeURIComponent(n.slice(1)),r.headers["x-oss-copy-source"]=n,(o=this._objectRequestParams("PUT",t,r)).xmlResponse=!0,o.successStatuses=[200,304],e.next=12,this.request(o);case 12:return s=e.sent,(l=s.data)&&(l={etag:l.ETag,lastModified:l.LastModified}),e.abrupt("return",{data:l,res:s.res});case 16:case"end":return e.stop()}}),e,this)})),v.putMeta=a.default.mark((function e(t,n,r){return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.copy(t,t,{meta:n||{},timeout:r&&r.timeout,ctx:r&&r.ctx});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})),v.list=a.default.mark((function e(t,n){var r,i,o,s,l;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("GET","",n)).query=t,r.xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return i=e.sent,o=i.data.Contents,s=this,o&&(Array.isArray(o)||(o=[o]),o=o.map((function(e){return{name:e.Key,url:s._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(l=i.data.CommonPrefixes||null)&&(Array.isArray(l)||(l=[l]),l=l.map((function(e){return e.Prefix}))),e.abrupt("return",{res:i.res,objects:o,prefixes:l,nextMarker:i.data.NextMarker||null,isTruncated:"true"===i.data.IsTruncated});case 13:case"end":return e.stop()}}),e,this)})),v.putACL=a.default.mark((function e(t,n,r){var i,o;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).subres="acl",r.headers=r.headers||{},r.headers["x-oss-object-acl"]=n,t=this._objectName(t),(i=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=9,this.request(i);case 9:return o=e.sent,e.abrupt("return",{res:o.res});case 11:case"end":return e.stop()}}),e,this)})),v.getACL=a.default.mark((function e(t,n){var r,i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=n||{}).subres="acl",t=this._objectName(t),(r=this._objectRequestParams("GET",t,n)).successStatuses=[200],r.xmlResponse=!0,e.next=8,this.request(r);case 8:return i=e.sent,e.abrupt("return",{acl:i.data.AccessControlList.Grant,owner:{id:i.data.Owner.ID,displayName:i.data.Owner.DisplayName},res:i.res});case 10:case"end":return e.stop()}}),e,this)})),v.restore=a.default.mark((function e(t,n){var r,i;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=n||{}).subres="restore",(r=this._objectRequestParams("POST",t,n)).successStatuses=[202],e.next=6,this.request(r);case 6:return i=e.sent,e.abrupt("return",{res:i.res});case 8:case"end":return e.stop()}}),e,this)})),v.signatureUrl=function(e,t){t=t||{},e=this._objectName(e),t.method=t.method||"GET";var n=s.timestamp()+(t.expires||1800),r={bucket:this.options.bucket,object:e},i=this._getResource(r);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var a=m._signatureForURL(this.options.accessKeySecret,t,i,n),o=u.parse(this._getReqUrl(r));return o.query={OSSAccessKeyId:this.options.accessKeyId,Expires:n,Signature:a.Signature},d(a.subResource).to(o.query),o.format()},v.getObjectUrl=function(e,t){return t?"/"!==t[t.length-1]&&(t+="/"):t=this.options.endpoint.format(),t+this._escape(this._objectName(e))},v._objectUrl=function(e){return this._getReqUrl({bucket:this.options.bucket,object:e})},v.generateObjectUrl=function(e,t){if(t)"/"!==t[t.length-1]&&(t+="/");else{t=this.options.endpoint.format();var n=u.parse(t),r=this.options.bucket;n.hostname=r+"."+n.hostname,n.host=r+"."+n.host,t=n.format()}return t+this._escape(this._objectName(e))},v._objectRequestParams=function(e,t,n){if(!this.options.bucket)throw new Error("Please create a bucket first");n=n||{};var r={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:n&&n.subres,timeout:n&&n.timeout,ctx:n&&n.ctx};return n.headers&&(r.headers={},d(n.headers).to(r.headers)),r},v._objectName=function(e){return e.replace(/^\/+/,"")},v._statFile=function(e){return function(t){l.stat(e,t)}},v._convertMetaToHeaders=function(e,t){e&&(0,i.default)(e).forEach((function(n){t["x-oss-meta-"+n]=e[n]}))},v._deleteFileSafe=function(e){return function(t){l.exists(e,(function(n){n?l.unlink(e,(function(n){n&&o("unlink %j error: %s",e,n),t()})):t()}))}}},{"../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(e,t,n){"use strict";n.version="5.3.1"},{}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return e&&"function"==typeof e.next&&"function"==typeof e.throw}function a(e){if(!e)return!1;var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||i(t.prototype)||i(e.prototype))}function o(e,t){var n=new e(t),r=(0,c.default)(n),i=(0,c.default)((0,l.default)(n));r.concat(i).forEach((function(e){a(n[e])?this[e]=u.wrap(n[e]).bind(n):this[e]=n[e]}),this)}function s(e){if(!(this instanceof s))return new s(e);o.call(this,d,e)}var l=r(e("babel-runtime/core-js/object/get-prototype-of")),c=r(e("babel-runtime/core-js/object/keys")),u=e("co"),d=e("./client");t.exports=s,s.STS=function e(t){if(!(this instanceof e))return new e(t);o.call(this,d.STS,t)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/keys")),a=r(e("babel-runtime/core-js/json/stringify"));n.encodeCallback=function(e,n){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&n.callback){var r={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(r.callbackHost=n.callback.host),n.callback.contentType&&(r.callbackBodyType=n.callback.contentType);var o=new t((0,a.default)(r)).toString("base64");if(e.headers["x-oss-callback"]=o,n.callback.customValue){var s={};(0,i.default)(n.callback.customValue).forEach((function(e){s["x:"+e]=n.callback.customValue[e]})),e.headers["x-oss-callback-var"]=new t((0,a.default)(s)).toString("base64")}}}}).call(this,e("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/regenerator")),i=e("copy-to"),a=e("./callback"),o=n;o.listUploads=r.default.mark((function e(t,n){var a,o,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},i(n=n||{}).to(a),a.subres="uploads",(o=this._objectRequestParams("GET","",a)).query=t,o.xmlResponse=!0,o.successStatuses=[200],e.next=10,this.request(o);case 10:return s=e.sent,l=s.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map((function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}})),e.abrupt("return",{res:s.res,uploads:l,bucket:s.data.Bucket,nextKeyMarker:s.data.NextKeyMarker,nextUploadIdMarker:s.data.NextUploadIdMarker,isTruncated:"true"===s.data.IsTruncated});case 15:case"end":return e.stop()}}),e,this)})),o.listParts=r.default.mark((function e(t,n,a,o){var s,l,c;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={},i(o=o||{}).to(s),s.subres={uploadId:n},(l=this._objectRequestParams("GET",t,s)).query=a,l.xmlResponse=!0,l.successStatuses=[200],e.next=10,this.request(l);case 10:return c=e.sent,e.abrupt("return",{res:c.res,uploadId:c.data.UploadId,bucket:c.data.Bucket,name:c.data.Key,partNumberMarker:c.data.PartNumberMarker,nextPartNumberMarker:c.data.NextPartNumberMarker,maxParts:c.data.MaxParts,isTruncated:c.data.IsTruncated,parts:c.data.Part||[]});case 12:case"end":return e.stop()}}),e,this)})),o.abortMultipartUpload=r.default.mark((function e(t,n,a){var o,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.cancel(),o={},i(a=a||{}).to(o),o.subres={uploadId:n},(s=this._objectRequestParams("DELETE",t,o)).successStatuses=[204],e.next=9,this.request(s);case 9:return l=e.sent,e.abrupt("return",{res:l.res});case 11:case"end":return e.stop()}}),e,this)})),o.initMultipartUpload=r.default.mark((function e(t,n){var a,o,s;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},i(n=n||{}).to(a),a.headers=a.headers||{},this._convertMetaToHeaders(n.meta,a.headers),a.subres="uploads",(o=this._objectRequestParams("POST",t,a)).mime=n.mime,o.xmlResponse=!0,o.successStatuses=[200],e.next=12,this.request(o);case 12:return s=e.sent,e.abrupt("return",{res:s.res,bucket:s.data.Bucket,name:s.data.Key,uploadId:s.data.UploadId});case 14:case"end":return e.stop()}}),e,this)})),o.uploadPart=r.default.mark((function e(t,n,i,a,o,s,l){var c;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c={stream:this._createStream(a,o,s),size:s-o},e.next=3,this._uploadPart(t,n,i,c,l);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})),o.completeMultipartUpload=r.default.mark((function e(t,n,o,s){var l,c,u,d,f,h,p,m;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(l=o.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,n){return!t||e.number!==n[t-1].number})),c='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',u=0;u<l.length;u++)d=l[u],c+="<Part>\n",c+="<PartNumber>"+d.number+"</PartNumber>\n",c+="<ETag>"+d.etag+"</ETag>\n",c+="</Part>\n";return c+="</CompleteMultipartUpload>",f={},i(s=s||{}).to(f),f.subres={uploadId:n},h=this._objectRequestParams("POST",t,f),a.encodeCallback(h,f),h.mime="xml",h.content=c,h.headers&&h.headers["x-oss-callback"]||(h.xmlResponse=!0),h.successStatuses=[200],e.next=16,this.request(h);case 16:return p=e.sent,m={res:p.res,bucket:h.bucket,name:t,etag:p.res.headers.etag},h.headers&&h.headers["x-oss-callback"]&&(m.data=JSON.parse(p.data.toString())),e.abrupt("return",m);case 20:case"end":return e.stop()}}),e,this)})),o._uploadPart=r.default.mark((function e(t,n,a,o,s){var l,c,u;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l={},i(s=s||{}).to(l),l.headers={"Content-Length":o.size},l.subres={partNumber:a,uploadId:n},(c=this._objectRequestParams("PUT",t,l)).mime=l.mime,c.stream=o.stream,c.successStatuses=[200],e.next=11,this.request(c);case 11:return u=e.sent,o.stream=null,c.stream=null,e.abrupt("return",{name:t,etag:u.res.headers.etag,res:u.res});case 15:case"end":return e.stop()}}),e,this)}))},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/json/stringify")),a=r(e("babel-runtime/core-js/object/keys")),o=e("./../../shims/crypto/crypto.js"),s=e("is-type-of");n.buildCanonicalizedResource=function(e,t){var n=""+e,r="?";if(s.string(t)&&""!==t.trim())n+=r+t;else if(s.array(t))t.sort(),n+=r+t.join("&");else if(t){(0,a.default)(t).sort((function(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:0})).forEach((function(e){n+=r+e,t[e]&&(n+="="+t[e]),r="&"}))}return n},n.buildCanonicalString=function(e,t,n,r){var i=(n=n||{}).headers||{},o=[],s={},l=[e.toUpperCase(),i["Content-Md5"]||"",i["Content-Type"]||i["Content-Type".toLowerCase()],r||i["x-oss-date"]];return(0,a.default)(i).forEach((function(e){var t=e.toLowerCase();0===t.indexOf("x-oss-")&&(s[t]=String(i[e]).trim())})),(0,a.default)(s).sort().forEach((function(e){o.push(e+":"+s[e])})),(l=l.concat(o)).push(this.buildCanonicalizedResource(t,n.parameters)),l.join("\n")},n.computeSignature=function(e,n){return o.createHmac("sha1",e).update(new t(n,"utf8")).digest("base64")},n.authorization=function(e,t,n){return"OSS "+e+":"+this.computeSignature(t,n)},n._signatureForURL=function(e,n,r,o){var s={},l={};if(n.process&&(l["x-oss-process"]=n.process),n.response&&(0,a.default)(n.response).forEach((function(e){var t="response-"+e.toLowerCase();l[t]=n.response[e]})),(0,a.default)(n).forEach((function(e){var t=e.toLowerCase(),r=n[e];0===t.indexOf("x-oss-")?s[t]=r:0===t.indexOf("content-md5")||0===t.indexOf("content-type")?s[e]=r:"expires"!==t&&"response"!==t&&"process"!==t&&"method"!==t&&(l[t]=r)})),Object.prototype.hasOwnProperty.call(n,"security-token")&&(l["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var c={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(c.callbackHost=n.callback.host),n.callback.contentType&&(c.callbackBodyType=n.callback.contentType),l.callback=new t((0,i.default)(c)).toString("base64"),n.callback.customValue){var u={};(0,a.default)(n.callback.customValue).forEach((function(e){u["x:"+e]=n.callback.customValue[e]})),l["callback-var"]=new t((0,i.default)(u)).toString("base64")}}var d=this.buildCanonicalString(n.method,r,{headers:s,parameters:l},o.toString());return{Signature:this.computeSignature(e,d),subResource:l}}}).call(this,e("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/regenerator")),i=e("co"),a=e("co-priority-queue"),o=e("any-promise"),s=n;s._thunkPool=function(e,t){function n(e,t){++c===e.length&&t(u)}function s(e,t){function n(){var n;return r.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=void 0;case 1:if(l.isCancel()){r.next=9;break}return r.next=4,c.next();case 4:return n=r.sent,r.next=7,n();case 7:r.next=1;break;case 9:(d+=1)===e&&(c.fns=[],c.buffer=[],t(u));case 11:case"end":return r.stop()}}),s,this)}function o(e){console.error(e.stack)}for(var s=r.default.mark(n),c=new a,d=0,f=0;f<e;f++)i(n).catch(o);return function(e,t){return function(n){c.push(r.default.mark((function t(){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=n,t.next=4,e;case 4:t.t1=t.sent,(0,t.t0)(null,t.t1),t.next=11;break;case 8:t.prev=8,t.t2=t.catch(0),n(t.t2);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})),t)}}}var l=this,c=0,u=[];return new o((function(a){function o(t){return r.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,d(e[t]);case 2:n(e,a);case 3:case"end":return r.stop()}}),c,this)}function l(t){u.push(t),n(e,a)}for(var c=r.default.mark(o),d=new s(t,a),f=0;f<e.length;f++)i(o(f)).catch(l)}))},s.cancel=function(){this.options.cancelFlag=!0},s.isCancel=function(){return this.options.cancelFlag},s.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(e,t,n){"use strict";n._isIP=function(e){return/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(e)||/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/.test(e)}},{}],12:[function(e,t,n){function r(){}t.exports=r,t.exports.HttpsAgent=r},{}],13:[function(e,t,n){t.exports=e("./register")().Promise},{"./register":15}],14:[function(e,t,n){"use strict";var r=null;t.exports=function(e,t){return function(n,i){n=n||null;var a=!1!==(i=i||{}).global;if(null===r&&a&&(r=e["@@any-promise/REGISTRATION"]||null),null!==r&&null!==n&&r.implementation!==n)throw new Error('any-promise already defined as "'+r.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===r&&(r=null!==n&&void 0!==i.Promise?{Promise:i.Promise,implementation:n}:t(n),a&&(e["@@any-promise/REGISTRATION"]=r)),r}}},{}],15:[function(e,t,n){"use strict";t.exports=e("./loader")(window,(function(){if(void 0===window.Promise)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}))},{"./loader":14}],16:[function(e,t,n){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(e,t,n){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(e,t,n){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(e,t,n){t.exports={default:e("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(e,t,n){t.exports={default:e("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(e,t,n){"use strict";n.__esModule=!0,n.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(e,t,n){"use strict";n.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(e("../core-js/object/define-property"));n.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},{"../core-js/object/define-property":20}],32:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}n.__esModule=!0;var i=r(e("../core-js/symbol/iterator")),a=r(e("../core-js/symbol")),o="function"==typeof a.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":typeof e};n.default="function"==typeof a.default&&"symbol"===o(i.default)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof a.default&&e.constructor===a.default&&e!==a.default.prototype?"symbol":void 0===e?"undefined":o(e)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function i(e){return o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function a(e,t,n){for(var r,a=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(i(r));return a.join("")}n.byteLength=function(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i},n.toByteArray=function(e){for(var t,n=r(e),i=n[0],a=n[1],o=new l(function(e,t,n){return 3*(t+n)/4-n}(0,i,a)),c=0,u=a>0?i-4:i,d=0;d<u;d+=4)t=s[e.charCodeAt(d)]<<18|s[e.charCodeAt(d+1)]<<12|s[e.charCodeAt(d+2)]<<6|s[e.charCodeAt(d+3)],o[c++]=t>>16&255,o[c++]=t>>8&255,o[c++]=255&t;return 2===a&&(t=s[e.charCodeAt(d)]<<2|s[e.charCodeAt(d+1)]>>4,o[c++]=255&t),1===a&&(t=s[e.charCodeAt(d)]<<10|s[e.charCodeAt(d+1)]<<4|s[e.charCodeAt(d+2)]>>2,o[c++]=t>>8&255,o[c++]=255&t),o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],s=0,l=n-r;s<l;s+=16383)i.push(a(e,s,s+16383>l?l:s+16383));return 1===r?(t=e[n-1],i.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"=")),i.join("")};for(var o=[],s=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,d=c.length;u<d;++u)o[u]=c[u],s[c.charCodeAt(u)]=u;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],35:[function(e,t,n){!function(e,n,r){void 0!==t&&t.exports?t.exports=r():e.bowser=r()}(this,0,(function(){function e(e){function t(t){var n=e.match(t);return n&&n.length>1&&n[1]||""}function n(t){var n=e.match(t);return n&&n.length>1&&n[2]||""}var r,i=t(/(ipod|iphone|ipad)/i).toLowerCase(),o=!/like android/i.test(e)&&/android/i.test(e),s=/nexus\s*[0-6]\s*/i.test(e),l=!s&&/nexus\s*[0-9]+/i.test(e),c=/CrOS/.test(e),u=/silk/i.test(e),d=/sailfish/i.test(e),f=/tizen/i.test(e),h=/(web|hpw)os/i.test(e),p=/windows phone/i.test(e),m=(/SamsungBrowser/i.test(e),!p&&/windows/i.test(e)),v=!i&&!u&&/macintosh/i.test(e),g=!o&&!d&&!f&&!h&&/linux/i.test(e),y=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),b=t(/version\/(\d+(\.\d+)?)/i),_=/tablet/i.test(e)&&!/tablet pc/i.test(e),E=!_&&/[^-]mobi/i.test(e),x=/xbox/i.test(e);/opera/i.test(e)?r={name:"Opera",opera:a,version:b||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?r={name:"Opera",opera:a,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||b}:/SamsungBrowser/i.test(e)?r={name:"Samsung Internet for Android",samsungBrowser:a,version:b||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(e)?r={name:"Opera Coast",coast:a,version:b||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(e)?r={name:"Yandex Browser",yandexbrowser:a,version:b||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?r={name:"UC Browser",ucbrowser:a,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?r={name:"Maxthon",maxthon:a,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?r={name:"Epiphany",epiphany:a,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?r={name:"Puffin",puffin:a,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?r={name:"Sleipnir",sleipnir:a,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?r={name:"K-Meleon",kMeleon:a,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:p?(r={name:"Windows Phone",osname:"Windows Phone",windowsphone:a},y?(r.msedge=a,r.version=y):(r.msie=a,r.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?r={name:"Internet Explorer",msie:a,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:c?r={name:"Chrome",osname:"Chrome OS",chromeos:a,chromeBook:a,chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?r={name:"Microsoft Edge",msedge:a,version:y}:/vivaldi/i.test(e)?r={name:"Vivaldi",vivaldi:a,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||b}:d?r={name:"Sailfish",osname:"Sailfish OS",sailfish:a,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?r={name:"SeaMonkey",seamonkey:a,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(r={name:"Firefox",firefox:a,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(r.firefoxos=a,r.osname="Firefox OS")):u?r={name:"Amazon Silk",silk:a,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?r={name:"PhantomJS",phantom:a,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?r={name:"SlimerJS",slimer:a,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?r={name:"BlackBerry",osname:"BlackBerry OS",blackberry:a,version:b||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:h?(r={name:"WebOS",osname:"WebOS",webos:a,version:b||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(r.touchpad=a)):/bada/i.test(e)?r={name:"Bada",osname:"Bada",bada:a,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:f?r={name:"Tizen",osname:"Tizen",tizen:a,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||b}:/qupzilla/i.test(e)?r={name:"QupZilla",qupzilla:a,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||b}:/chromium/i.test(e)?r={name:"Chromium",chromium:a,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||b}:/chrome|crios|crmo/i.test(e)?r={name:"Chrome",chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:o?r={name:"Android",version:b}:/safari|applewebkit/i.test(e)?(r={name:"Safari",safari:a},b&&(r.version=b)):i?(r={name:"iphone"==i?"iPhone":"ipad"==i?"iPad":"iPod"},b&&(r.version=b)):r=/googlebot/i.test(e)?{name:"Googlebot",googlebot:a,version:t(/googlebot\/(\d+(\.\d+))/i)||b}:{name:t(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!r.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(r.name=r.name||"Blink",r.blink=a):(r.name=r.name||"Webkit",r.webkit=a),!r.version&&b&&(r.version=b)):!r.opera&&/gecko\//i.test(e)&&(r.name=r.name||"Gecko",r.gecko=a,r.version=r.version||t(/gecko\/(\d+(\.\d+)?)/i)),r.windowsphone||!o&&!r.silk?!r.windowsphone&&i?(r[i]=a,r.ios=a,r.osname="iOS"):v?(r.mac=a,r.osname="macOS"):x?(r.xbox=a,r.osname="Xbox"):m?(r.windows=a,r.osname="Windows"):g&&(r.linux=a,r.osname="Linux"):(r.android=a,r.osname="Android");var S="";r.windows?S=function(e){switch(e){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}}(t(/Windows ((NT|XP)( \d\d?.\d)?)/i)):r.windowsphone?S=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):r.mac?S=(S=t(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):i?S=(S=t(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):o?S=t(/android[ \/-](\d+(\.\d+)*)/i):r.webos?S=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):r.blackberry?S=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):r.bada?S=t(/bada\/(\d+(\.\d+)*)/i):r.tizen&&(S=t(/tizen[\/\s](\d+(\.\d+)*)/i)),S&&(r.osversion=S);var w=!r.windows&&S.split(".")[0];return _||l||"ipad"==i||o&&(3==w||w>=4&&!E)||r.silk?r.tablet=a:(E||"iphone"==i||"ipod"==i||o||s||r.blackberry||r.webos||r.bada)&&(r.mobile=a),r.msedge||r.msie&&r.version>=10||r.yandexbrowser&&r.version>=15||r.vivaldi&&r.version>=1||r.chrome&&r.version>=20||r.samsungBrowser&&r.version>=4||r.firefox&&r.version>=20||r.safari&&r.version>=6||r.opera&&r.version>=10||r.ios&&r.osversion&&r.osversion.split(".")[0]>=6||r.blackberry&&r.version>=10.1||r.chromium&&r.version>=20?r.a=a:r.msie&&r.version<10||r.chrome&&r.version<20||r.firefox&&r.version<20||r.safari&&r.version<6||r.opera&&r.version<10||r.ios&&r.osversion&&r.osversion.split(".")[0]<6||r.chromium&&r.version<20?r.c=a:r.x=a,r}function t(e){return e.split(".").length}function n(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n++)r.push(t(e[n]));return r}function r(e){for(var r=Math.max(t(e[0]),t(e[1])),i=n(e,(function(e){var i=r-t(e);return n((e+=new Array(i+1).join(".0")).split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));--r>=0;){if(i[0][r]>i[1][r])return 1;if(i[0][r]!==i[1][r])return-1;if(0===r)return 0}}function i(t,n,i){var a=o;"string"==typeof n&&(i=n,n=void 0),void 0===n&&(n=!1),i&&(a=e(i));var s=""+a.version;for(var l in t)if(t.hasOwnProperty(l)&&a[l]){if("string"!=typeof t[l])throw new Error("Browser version in the minVersion map should be a string: "+l+": "+String(t));return r([s,t[l]])<0}return n}var a=!0,o=e("undefined"!=typeof navigator&&navigator.userAgent||"");return o.test=function(e){for(var t=0;t<e.length;++t){var n=e[t];if("string"==typeof n&&n in o)return!0}return!1},o.isUnsupportedBrowser=i,o.compareVersions=r,o.check=function(e,t,n){return!i(e,t,n)},o._detect=e,o.detect=e,o}))},{}],36:[function(e,t,n){},{}],37:[function(e,t,n){function r(e){return e.toString(this.encoding)}function i(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var o=e("buffer").Buffer,s=o.isEncoding||function(e){switch(e&&e.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}},l=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!s(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=i;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=r)}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};l.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var i;r=(t+=e.toString(this.encoding,0,r)).length-1;if((i=t.charCodeAt(r))>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,r)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:38}],38:[function(e,n,r){(function(t){"use strict";function n(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=a.prototype:(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return o(this,e,t,n)}function o(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t).__proto__=a.prototype:e=c(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=i(e,r)).write(t,n);return o!==r&&(e=e.slice(0,o)),e}(e,t,n):function(e,t){if(a.isBuffer(t)){var n=0|u(t.length);return 0===(e=i(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?i(e,0):c(e,t);if("Buffer"===t.type&&G(t.data))return c(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(s(t),e=i(e,t<0?0:0|u(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function c(e,t){var n=t.length<0?0:0|u(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function u(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(r)return P(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function p(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){function a(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var o,s=1,l=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,l/=2,c/=2,n/=2}if(i){var u=-1;for(o=n;o<l;o++)if(a(e,o)===a(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===c)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+c>l&&(n=l-c),o=n;o>=0;o--){for(var d=!0,f=0;f<c;f++)if(a(e,o+f)!==a(t,f)){d=!1;break}if(d)return o}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function g(e,t,n,r){return F(P(t,e.length-n),e,n,r)}function y(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function b(e,t,n,r){return y(e,t,n,r)}function _(e,t,n,r){return F(j(t),e,n,r)}function E(e,t,n,r){return F(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?U.fromByteArray(e):U.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=z)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=z));return n}(r)}function w(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function T(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=M(e[a]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function C(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function I(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||I(e,0,n,4),B.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return i||I(e,0,n,8),B.write(e,t,n,r,52,8),n+8}function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function P(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function j(e){return U.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}var U=e("base64-js"),B=e("ieee754"),G=e("isarray");r.Buffer=a,r.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return function(e,t,n,r){return s(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}(null,e,t,n)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!G(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):f.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),d=0;d<l;++d)if(c[d]!==u[d]){o=c[d],s=u[d];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return p(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return p(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return g(this,e,t,n);case"ascii":return y(this,e,t,n);case"latin1":case"binary":return b(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var z=4096;a.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),a.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=a.prototype;else{var i=t-e;n=new a(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},a.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},a.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),B.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),B.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),B.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),B.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:P(new a(e,r).toString()),l=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var H=/[^+\/0-9A-Za-z-_]/g}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(e,t,n){t.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(e,t,n){"use strict";var r=function(){this.buffer=[],this.fns=[]};r.prototype.push=function(e,t){if(this.fns.length)return this.fns.shift()(null,e);var n={data:e,priority:t},r=i(this.buffer,n,(function(e){return e.priority}));this.buffer.splice(r,0,n)},r.prototype.next=function(){var e=this;return function(t){if(e.buffer.length)return t(null,e.buffer.pop().data);e.fns.push(t)}};var i=function(e,t,n){t=n(t);for(var r=0,i=e?e.length:r;r<i;){var a=r+i>>>1;n(e[a])<t?r=a+1:i=a}return r};t.exports=r},{}],41:[function(e,t,n){function r(e){var t=this,n=u.call(arguments,1);return new Promise((function(r,a){function o(t){var n;try{n=e.next(t)}catch(e){return a(e)}c(n)}function s(t){var n;try{n=e.throw(t)}catch(e){return a(e)}c(n)}function c(e){if(e.done)return r(e.value);var n=i.call(t,e.value);return n&&l(n)?n.then(o,s):s(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}if("function"==typeof e&&(e=e.apply(t,n)),!e||"function"!=typeof e.next)return r(e);o()}))}function i(e){return e?l(e)?e:function(e){var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||c(t.prototype))}(e)||c(e)?r.call(this,e):"function"==typeof e?a.call(this,e):Array.isArray(e)?o.call(this,e):function(e){return Object==e.constructor}(e)?s.call(this,e):e:e}function a(e){var t=this;return new Promise((function(n,r){e.call(t,(function(e,t){if(e)return r(e);arguments.length>2&&(t=u.call(arguments,1)),n(t)}))}))}function o(e){return Promise.all(e.map(i,this))}function s(e){for(var t=new e.constructor,n=Object.keys(e),r=[],a=0;a<n.length;a++){var o=n[a],s=i.call(this,e[o]);s&&l(s)?function(e,n){t[n]=void 0,r.push(e.then((function(e){t[n]=e})))}(s,o):t[o]=e[o]}return Promise.all(r).then((function(){return t}))}function l(e){return"function"==typeof e.then}function c(e){return"function"==typeof e.next&&"function"==typeof e.throw}var u=Array.prototype.slice;t.exports=r.default=r.co=r,r.wrap=function(e){function t(){return r.call(this,e.apply(this,arguments))}return t.__generatorFunction__=e,t}},{}],42:[function(e,t,n){t.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(e,t,n){"use strict";function r(e,t){if(!(this instanceof r))return new r(e,t);this.src=e,this._withAccess=t}function i(e,t){return void 0===e[t]&&void 0===e.__lookupGetter__(t)&&void 0===e.__lookupSetter__(t)}var a=Array.prototype.slice;t.exports=r,r.prototype.withAccess=function(e){return this._withAccess=!1!==e,this},r.prototype.pick=function(e){return Array.isArray(e)||(e=a.call(arguments)),e.length&&(this.keys=e),this},r.prototype.to=function(e){if(e=e||{},!this.src)return e;var t=this.keys||Object.keys(this.src);if(!this._withAccess){for(var n=0;n<t.length;n++)void 0===e[r=t[n]]&&(e[r]=this.src[r]);return e}for(n=0;n<t.length;n++){var r=t[n];if(i(e,r)){var a=this.src.__lookupGetter__(r),o=this.src.__lookupSetter__(r);a&&e.__defineGetter__(r,a),o&&e.__defineSetter__(r,o),a||o||(e[r]=this.src[r])}}return e},r.prototype.toCover=function(e){for(var t=this.keys||Object.keys(this.src),n=0;n<t.length;n++){var r=t[n];delete e[r];var i=this.src.__lookupGetter__(r),a=this.src.__lookupSetter__(r);i&&e.__defineGetter__(r,i),a&&e.__defineSetter__(r,a),i||a||(e[r]=this.src[r])}},r.prototype.override=r.prototype.toCover,r.prototype.and=function(e){var t={};return this.to(t),this.src=e,this.to(t),this.src=t,this}},{}],44:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(e,t,n){var r=e("../../modules/_core"),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":65}],46:[function(e,t,n){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(e,t,n){e("../../modules/es6.object.create");var r=e("../../modules/_core").Object;t.exports=function(e,t){return r.create(e,t)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(e,t,n){e("../../modules/es6.object.define-property");var r=e("../../modules/_core").Object;t.exports=function(e,t,n){return r.defineProperty(e,t,n)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(e,t,n){e("../../modules/es6.object.get-own-property-names");var r=e("../../modules/_core").Object;t.exports=function(e){return r.getOwnPropertyNames(e)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(e,t,n){e("../../modules/es6.object.get-prototype-of"),t.exports=e("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(e,t,n){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(e,t,n){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),e("../modules/es7.promise.finally"),e("../modules/es7.promise.try"),t.exports=e("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(e,t,n){e("../modules/web.immediate"),t.exports=e("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(e,t,n){e("../../modules/es6.string.from-code-point"),t.exports=e("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(e,t,n){e("../../modules/es6.function.has-instance"),t.exports=e("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(e,t,n){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],59:[function(e,t,n){t.exports=function(){}},{}],60:[function(e,t,n){t.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},{}],61:[function(e,t,n){var r=e("./_is-object");t.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":85}],62:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_to-length"),a=e("./_to-absolute-index");t.exports=function(e){return function(t,n,o){var s,l=r(t),c=i(l.length),u=a(o,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(e,t,n){var r=e("./_cof"),i=e("./_wks")("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},{"./_cof":64,"./_wks":131}],64:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],65:[function(e,t,n){var r=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},{}],66:[function(e,t,n){"use strict";var r=e("./_object-dp"),i=e("./_property-desc");t.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},{"./_object-dp":98,"./_property-desc":111}],67:[function(e,t,n){var r=e("./_a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":58}],68:[function(e,t,n){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],69:[function(e,t,n){t.exports=!e("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":74}],70:[function(e,t,n){var r=e("./_is-object"),i=e("./_global").document,a=r(i)&&r(i.createElement);t.exports=function(e){return a?i.createElement(e):{}}},{"./_global":76,"./_is-object":85}],71:[function(e,t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(e,t,n){var r=e("./_object-keys"),i=e("./_object-gops"),a=e("./_object-pie");t.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,c=0;s.length>c;)l.call(e,o=s[c++])&&t.push(o);return t}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(e,t,n){var r=e("./_global"),i=e("./_core"),a=e("./_ctx"),o=e("./_hide"),s=e("./_has"),l=function(e,t,n){var c,u,d,f=e&l.F,h=e&l.G,p=e&l.S,m=e&l.P,v=e&l.B,g=e&l.W,y=h?i:i[t]||(i[t]={}),b=y.prototype,_=h?r:p?r[t]:(r[t]||{}).prototype;for(c in h&&(n=t),n)(u=!f&&_&&void 0!==_[c])&&s(y,c)||(d=u?_[c]:n[c],y[c]=h&&"function"!=typeof _[c]?n[c]:v&&u?a(d,r):g&&_[c]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?a(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[c]=d,e&l.R&&b&&!b[c]&&o(b,c,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],75:[function(e,t,n){var r=e("./_ctx"),i=e("./_iter-call"),a=e("./_is-array-iter"),o=e("./_an-object"),s=e("./_to-length"),l=e("./core.get-iterator-method"),c={},u={};(n=t.exports=function(e,t,n,d,f){var h,p,m,v,g=f?function(){return e}:l(e),y=r(n,d,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(a(g)){for(h=s(e.length);h>b;b++)if((v=t?y(o(p=e[b])[0],p[1]):y(e[b]))===c||v===u)return v}else for(m=g.call(e);!(p=m.next()).done;)if((v=i(m,y,p.value,t))===c||v===u)return v}).BREAK=c,n.RETURN=u},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(e,t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],77:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],78:[function(e,t,n){var r=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(e,t,n){var r=e("./_global").document;t.exports=r&&r.documentElement},{"./_global":76}],80:[function(e,t,n){t.exports=!e("./_descriptors")&&!e("./_fails")((function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a}))},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(e,t,n){t.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},{}],82:[function(e,t,n){var r=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{"./_cof":64}],83:[function(e,t,n){var r=e("./_iterators"),i=e("./_wks")("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},{"./_iterators":91,"./_wks":131}],84:[function(e,t,n){var r=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"./_cof":64}],85:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],86:[function(e,t,n){var r=e("./_an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},{"./_an-object":61}],87:[function(e,t,n){"use strict";var r=e("./_object-create"),i=e("./_property-desc"),a=e("./_set-to-string-tag"),o={};e("./_hide")(o,e("./_wks")("iterator"),(function(){return this})),t.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(e,t,n){"use strict";var r=e("./_library"),i=e("./_export"),a=e("./_redefine"),o=e("./_hide"),s=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),u=e("./_object-gpo"),d=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(e,t,n,p,m,v,g){l(n,t,p);var y,b,_,E=function(e){if(!f&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",S="values"==m,w=!1,k=e.prototype,T=k[d]||k["@@iterator"]||m&&k[m],O=T||E(m),C=m?S?E("entries"):O:void 0,A="Array"==t&&k.entries||T;if(A&&(_=u(A.call(new e)))!==Object.prototype&&_.next&&(c(_,x,!0),r||"function"==typeof _[d]||o(_,d,h)),S&&T&&"values"!==T.name&&(w=!0,O=function(){return T.call(this)}),r&&!g||!f&&!w&&k[d]||o(k,d,O),s[t]=O,s[x]=h,m)if(y={values:S?O:E("values"),keys:v?O:E("keys"),entries:C},g)for(b in y)b in k||a(k,b,y[b]);else i(i.P+i.F*(f||w),t,y);return y}},{"./_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(e,t,n){var r=e("./_wks")("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},{"./_wks":131}],90:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],91:[function(e,t,n){t.exports={}},{}],92:[function(e,t,n){t.exports=!0},{}],93:[function(e,t,n){var r=e("./_uid")("meta"),i=e("./_is-object"),a=e("./_has"),o=e("./_object-dp").f,s=0,l=Object.isExtensible||function(){return!0},c=!e("./_fails")((function(){return l(Object.preventExtensions({}))})),u=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!a(e,r)&&u(e),e}}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(e,t,n){var r=e("./_global"),i=e("./_task").set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,l="process"==e("./_cof")(o);t.exports=function(){var e,t,n,c=function(){var r,i;for(l&&(r=o.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){o.nextTick(c)};else if(!a||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){i.call(r,c)};else{var d=!0,f=document.createTextNode("");new a(c).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(e,t,n){"use strict";function r(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=i(t),this.reject=i(n)}var i=e("./_a-function");t.exports.f=function(e){return new r(e)}},{"./_a-function":58}],96:[function(e,t,n){"use strict";var r=e("./_object-keys"),i=e("./_object-gops"),a=e("./_object-pie"),o=e("./_to-object"),s=e("./_iobject"),l=Object.assign;t.exports=!l||e("./_fails")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=o(e),l=arguments.length,c=1,u=i.f,d=a.f;l>c;)for(var f,h=s(arguments[c++]),p=u?r(h).concat(u(h)):r(h),m=p.length,v=0;m>v;)d.call(h,f=p[v++])&&(n[f]=h[f]);return n}:l},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(e,t,n){var r=e("./_an-object"),i=e("./_object-dps"),a=e("./_enum-bug-keys"),o=e("./_shared-key")("IE_PROTO"),s=function(){},l=function(){var t,n=e("./_dom-create")("iframe"),r=a.length;for(n.style.display="none",e("./_html").appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;r--;)delete l.prototype[a[r]];return l()};t.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(e,t,n){var r=e("./_an-object"),i=e("./_ie8-dom-define"),a=e("./_to-primitive"),o=Object.defineProperty;n.f=e("./_descriptors")?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(e,t,n){var r=e("./_object-dp"),i=e("./_an-object"),a=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(e,t,n){var r=e("./_object-pie"),i=e("./_property-desc"),a=e("./_to-iobject"),o=e("./_to-primitive"),s=e("./_has"),l=e("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;n.f=e("./_descriptors")?c:function(e,t){if(e=a(e),t=o(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_object-gopn").f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],104:[function(e,t,n){var r=e("./_has"),i=e("./_to-object"),a=e("./_shared-key")("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(e,t,n){var r=e("./_has"),i=e("./_to-iobject"),a=e("./_array-includes")(!1),o=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var n,s=i(e),l=0,c=[];for(n in s)n!=o&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return r(e,i)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(e,t,n){n.f={}.propertyIsEnumerable},{}],108:[function(e,t,n){var r=e("./_export"),i=e("./_core"),a=e("./_fails");t.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a((function(){n(1)})),"Object",o)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(e,t,n){t.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},{}],110:[function(e,t,n){var r=e("./_an-object"),i=e("./_is-object"),a=e("./_new-promise-capability");t.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],112:[function(e,t,n){var r=e("./_hide");t.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},{"./_hide":78}],113:[function(e,t,n){t.exports=e("./_hide")},{"./_hide":78}],114:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_core"),a=e("./_object-dp"),o=e("./_descriptors"),s=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];o&&t&&!t[s]&&a.f(t,s,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(e,t,n){var r=e("./_object-dp").f,i=e("./_has"),a=e("./_wks")("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(e,t,n){var r=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return r[e]||(r[e]=i(e))}},{"./_shared":117,"./_uid":127}],117:[function(e,t,n){var r=e("./_core"),i=e("./_global"),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:e("./_library")?"pure":"global",copyright:"漏 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(e,t,n){var r=e("./_an-object"),i=e("./_a-function"),a=e("./_wks")("species");t.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||null==(n=r(o)[a])?t:i(n)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(e,t,n){var r=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===c||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},{"./_defined":68,"./_to-integer":122}],120:[function(e,t,n){var r,i,a,o=e("./_ctx"),s=e("./_invoke"),l=e("./_html"),c=e("./_dom-create"),u=e("./_global"),d=u.process,f=u.setImmediate,h=u.clearImmediate,p=u.MessageChannel,m=u.Dispatch,v=0,g={},y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){y.call(e.data)};f&&h||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++v]=function(){s("function"==typeof e?e:Function(e),t)},r(v),v},h=function(e){delete g[e]},"process"==e("./_cof")(d)?r=function(e){d.nextTick(o(y,e,1))}:m&&m.now?r=function(e){m.now(o(y,e,1))}:p?(a=(i=new p).port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),y.call(e)}}:function(e){setTimeout(o(y,e,1),0)}),t.exports={set:f,clear:h}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(e,t,n){var r=e("./_to-integer"),i=Math.max,a=Math.min;t.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},{"./_to-integer":122}],122:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],123:[function(e,t,n){var r=e("./_iobject"),i=e("./_defined");t.exports=function(e){return r(i(e))}},{"./_defined":68,"./_iobject":82}],124:[function(e,t,n){var r=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{"./_to-integer":122}],125:[function(e,t,n){var r=e("./_defined");t.exports=function(e){return Object(r(e))}},{"./_defined":68}],126:[function(e,t,n){var r=e("./_is-object");t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},{}],128:[function(e,t,n){var r=e("./_global").navigator;t.exports=r&&r.userAgent||""},{"./_global":76}],129:[function(e,t,n){var r=e("./_global"),i=e("./_core"),a=e("./_library"),o=e("./_wks-ext"),s=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(e,t,n){n.f=e("./_wks")},{"./_wks":131}],131:[function(e,t,n){var r=e("./_shared")("wks"),i=e("./_uid"),a=e("./_global").Symbol,o="function"==typeof a;(t.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(e,t,n){var r=e("./_classof"),i=e("./_wks")("iterator"),a=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(e,t,n){"use strict";var r=e("./_ctx"),i=e("./_export"),a=e("./_to-object"),o=e("./_iter-call"),s=e("./_is-array-iter"),l=e("./_to-length"),c=e("./_create-property"),u=e("./core.get-iterator-method");i(i.S+i.F*!e("./_iter-detect")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,f=a(e),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,v=void 0!==m,g=0,y=u(f);if(v&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||h==Array&&s(y))for(n=new h(t=l(f.length));t>g;g++)c(n,g,v?m(f[g],g):f[g]);else for(d=y.call(f),n=new h;!(i=d.next()).done;g++)c(n,g,v?o(d,m,[i.value,g],!0):i.value);return n.length=g,n}})},{"./_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(e,t,n){"use strict";var r=e("./_add-to-unscopables"),i=e("./_iter-step"),a=e("./_iterators"),o=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(e,t,n){"use strict";var r=e("./_is-object"),i=e("./_object-gpo"),a=e("./_wks")("hasInstance"),o=Function.prototype;a in o||e("./_object-dp").f(o,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(e,t,n){var r=e("./_export");r(r.S+r.F,"Object",{assign:e("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(e,t,n){var r=e("./_export");r(r.S,"Object",{create:e("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(e,t,n){var r=e("./_export");r(r.S+r.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(e,t,n){e("./_object-sap")("getOwnPropertyNames",(function(){return e("./_object-gopn-ext").f}))},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(e,t,n){var r=e("./_to-object"),i=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(e,t,n){var r=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",(function(){return function(e){return i(r(e))}}))},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(e,t,n){arguments[4][36][0].apply(n,arguments)},{dup:36}],143:[function(e,t,n){"use strict";var r,i,a,o,s=e("./_library"),l=e("./_global"),c=e("./_ctx"),u=e("./_classof"),d=e("./_export"),f=e("./_is-object"),h=e("./_a-function"),p=e("./_an-instance"),m=e("./_for-of"),v=e("./_species-constructor"),g=e("./_task").set,y=e("./_microtask")(),b=e("./_new-promise-capability"),_=e("./_perform"),E=e("./_user-agent"),x=e("./_promise-resolve"),S=l.TypeError,w=l.process,k=w&&w.versions,T=k&&k.v8||"",O=l.Promise,C="process"==u(w),A=function(){},L=i=b.f,D=!!function(){try{var t=O.resolve(1),n=(t.constructor={})[e("./_wks")("species")]=function(e){e(A,A)};return(C||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof n&&0!==T.indexOf("6.6")&&-1===E.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},R=function(e,t){if(!e._n){e._n=!0;var n=e._c;y((function(){for(var r=e._v,i=1==e._s,a=0;n.length>a;)!function(t){var n,a,o,s=i?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(i||(2==e._h&&P(e),e._h=1),!0===s?n=r:(u&&u.enter(),n=s(r),u&&(u.exit(),o=!0)),n===t.promise?c(S("Promise-chain cycle")):(a=I(n))?a.call(n,l,c):l(n)):c(r)}catch(e){u&&!o&&u.exit(),c(e)}}(n[a++]);e._c=[],e._n=!1,t&&!e._h&&N(e)}))}},N=function(e){g.call(l,(function(){var t,n,r,i=e._v,a=M(e);if(a&&(t=_((function(){C?w.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=C||M(e)?2:1),e._a=void 0,a&&t.e)throw t.v}))},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},P=function(e){g.call(l,(function(){var t;C?w.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},j=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),R(t,!0))},F=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=I(e))?y((function(){var r={_w:n,_d:!1};try{t.call(e,c(F,r,1),c(j,r,1))}catch(e){j.call(r,e)}})):(n._v=e,n._s=1,R(n,!1))}catch(e){j.call({_w:n,_d:!1},e)}}};D||(O=function(e){p(this,O,"Promise","_h"),h(e),r.call(this);try{e(c(F,this,1),c(j,this,1))}catch(e){j.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e("./_redefine-all")(O.prototype,{then:function(e,t){var n=L(v(this,O));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?w.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=c(F,e,1),this.reject=c(j,e,1)},b.f=L=function(e){return e===O||e===o?new a(e):i(e)}),d(d.G+d.W+d.F*!D,{Promise:O}),e("./_set-to-string-tag")(O,"Promise"),e("./_set-species")("Promise"),o=e("./_core").Promise,d(d.S+d.F*!D,"Promise",{reject:function(e){var t=L(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!D),"Promise",{resolve:function(e){return x(s&&this===o?O:this,e)}}),d(d.S+d.F*!(D&&e("./_iter-detect")((function(e){O.all(e).catch(A)}))),"Promise",{all:function(e){var t=this,n=L(t),r=n.resolve,i=n.reject,a=_((function(){var n=[],a=0,o=1;m(e,!1,(function(e){var s=a++,l=!1;n.push(void 0),o++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--o||r(n))}),i)})),--o||r(n)}));return a.e&&i(a.v),n.promise},race:function(e){var t=this,n=L(t),r=n.reject,i=_((function(){m(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.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(e,t,n){var r=e("./_export"),i=e("./_to-absolute-index"),a=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(e,t,n){"use strict";var r=e("./_string-at")(!0);e("./_iter-define")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},{"./_iter-define":88,"./_string-at":119}],146:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_has"),a=e("./_descriptors"),o=e("./_export"),s=e("./_redefine"),l=e("./_meta").KEY,c=e("./_fails"),u=e("./_shared"),d=e("./_set-to-string-tag"),f=e("./_uid"),h=e("./_wks"),p=e("./_wks-ext"),m=e("./_wks-define"),v=e("./_enum-keys"),g=e("./_is-array"),y=e("./_an-object"),b=e("./_is-object"),_=e("./_to-iobject"),E=e("./_to-primitive"),x=e("./_property-desc"),S=e("./_object-create"),w=e("./_object-gopn-ext"),k=e("./_object-gopd"),T=e("./_object-dp"),O=e("./_object-keys"),C=k.f,A=T.f,L=w.f,D=r.Symbol,I=r.JSON,R=I&&I.stringify,N=h("_hidden"),M=h("toPrimitive"),P={}.propertyIsEnumerable,j=u("symbol-registry"),F=u("symbols"),U=u("op-symbols"),B=Object.prototype,G="function"==typeof D,z=r.QObject,H=!z||!z.prototype||!z.prototype.findChild,K=a&&c((function(){return 7!=S(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=C(B,t);r&&delete B[t],A(e,t,n),r&&e!==B&&A(B,t,r)}:A,V=function(e){var t=F[e]=S(D.prototype);return t._k=e,t},W=G&&"symbol"==typeof D.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof D},q=function(e,t,n){return e===B&&q(U,t,n),y(e),t=E(t,!0),y(n),i(F,t)?(n.enumerable?(i(e,N)&&e[N][t]&&(e[N][t]=!1),n=S(n,{enumerable:x(0,!1)})):(i(e,N)||A(e,N,x(1,{})),e[N][t]=!0),K(e,t,n)):A(e,t,n)},X=function(e,t){y(e);for(var n,r=v(t=_(t)),i=0,a=r.length;a>i;)q(e,n=r[i++],t[n]);return e},Y=function(e){var t=P.call(this,e=E(e,!0));return!(this===B&&i(F,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(F,e)||i(this,N)&&this[N][e])||t)},$=function(e,t){if(e=_(e),t=E(t,!0),e!==B||!i(F,t)||i(U,t)){var n=C(e,t);return!n||!i(F,t)||i(e,N)&&e[N][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=L(_(e)),r=[],a=0;n.length>a;)i(F,t=n[a++])||t==N||t==l||r.push(t);return r},Q=function(e){for(var t,n=e===B,r=L(n?U:_(e)),a=[],o=0;r.length>o;)!i(F,t=r[o++])||n&&!i(B,t)||a.push(F[t]);return a};G||(s((D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(U,n),i(this,N)&&i(this[N],e)&&(this[N][e]=!1),K(this,e,x(1,n))};return a&&H&&K(B,e,{configurable:!0,set:t}),V(e)}).prototype,"toString",(function(){return this._k})),k.f=$,T.f=q,e("./_object-gopn").f=w.f=J,e("./_object-pie").f=Y,e("./_object-gops").f=Q,a&&!e("./_library")&&s(B,"propertyIsEnumerable",Y,!0),p.f=function(e){return V(h(e))}),o(o.G+o.W+o.F*!G,{Symbol:D});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)h(Z[ee++]);for(var te=O(h.store),ne=0;te.length>ne;)m(te[ne++]);o(o.S+o.F*!G,"Symbol",{for:function(e){return i(j,e+="")?j[e]:j[e]=D(e)},keyFor:function(e){if(!W(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){H=!0},useSimple:function(){H=!1}}),o(o.S+o.F*!G,"Object",{create:function(e,t){return void 0===t?S(e):X(S(e),t)},defineProperty:q,defineProperties:X,getOwnPropertyDescriptor:$,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),I&&o(o.S+o.F*(!G||c((function(){var e=D();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!W(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!W(t))return t}),r[1]=t,R.apply(I,r)}}),D.prototype[M]||e("./_hide")(D.prototype,M,D.prototype.valueOf),d(D,"Symbol"),d(Math,"Math",!0),d(r.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(e,t,n){"use strict";var r=e("./_export"),i=e("./_core"),a=e("./_global"),o=e("./_species-constructor"),s=e("./_promise-resolve");r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,i.Promise||a.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(e,t,n){"use strict";var r=e("./_export"),i=e("./_new-promise-capability"),a=e("./_perform");r(r.S,"Promise",{try:function(e){var t=i.f(this),n=a(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(e,t,n){e("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(e,t,n){e("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(e,t,n){e("./es6.array.iterator");for(var r=e("./_global"),i=e("./_hide"),a=e("./_iterators"),o=e("./_wks")("toStringTag"),s="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(","),l=0;l<s.length;l++){var c=s[l],u=r[c],d=u&&u.prototype;d&&!d[o]&&i(d,o,c),a[c]=a.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(e,t,n){var r=e("./_export"),i=e("./_task");r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},{"./_export":73,"./_task":120}],153:[function(e,t,n){(function(t){"use strict";function r(e){return Object.prototype.toString.call(e)}var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/typeof"));n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"===(void 0===e?"undefined":(0,i.default)(e))},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===r(e)},n.isObject=function(e){return"object"===(void 0===e?"undefined":(0,i.default)(e))&&null!==e},n.isDate=function(e){return"[object Date]"===r(e)},n.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(void 0===e?"undefined":(0,i.default)(e))||void 0===e},n.isBuffer=t.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/typeof"));!function(e){function i(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}function a(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var i=(t-n)/6048e5;return 1+Math.floor(i)}function o(e){var t=e.getDay();return 0===t&&(t=7),t}function s(e){return null===e?"null":void 0===e?"undefined":"object"!==(void 0===e?"undefined":(0,r.default)(e))?void 0===e?"undefined":(0,r.default)(e):Array.isArray(e)?"array":{}.toString.call(e).slice(8,-1).toLowerCase()}var l=function(){var e=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g;return function(r,c,u,d){if(1!==arguments.length||"string"!==s(r)||/\d/.test(r)||(c=r,r=void 0),(r=r||new Date)instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");var f=(c=String(l.masks[c]||c||l.masks.default)).slice(0,4);"UTC:"!==f&&"GMT:"!==f||(c=c.slice(4),u=!0,"GMT:"===f&&(d=!0));var h=u?"getUTC":"get",p=r[h+"Date"](),m=r[h+"Day"](),v=r[h+"Month"](),g=r[h+"FullYear"](),y=r[h+"Hours"](),b=r[h+"Minutes"](),_=r[h+"Seconds"](),E=r[h+"Milliseconds"](),x=u?0:r.getTimezoneOffset(),S=a(r),w=o(r),k={d:p,dd:i(p),ddd:l.i18n.dayNames[m],dddd:l.i18n.dayNames[m+7],m:v+1,mm:i(v+1),mmm:l.i18n.monthNames[v],mmmm:l.i18n.monthNames[v+12],yy:String(g).slice(2),yyyy:g,h:y%12||12,hh:i(y%12||12),H:y,HH:i(y),M:b,MM:i(b),s:_,ss:i(_),l:i(E,3),L:i(Math.round(E/10)),t:y<12?"a":"p",tt:y<12?"am":"pm",T:y<12?"A":"P",TT:y<12?"AM":"PM",Z:d?"GMT":u?"UTC":(String(r).match(t)||[""]).pop().replace(n,""),o:(x>0?"-":"+")+i(100*Math.floor(Math.abs(x)/60)+Math.abs(x)%60,4),S:["th","st","nd","rd"][p%10>3?0:(p%100-p%10!=10)*p%10],W:S,N:w};return c.replace(e,(function(e){return e in k?k[e]:e.slice(1,e.length-1)}))}}();l.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"},l.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"]},"object"===(void 0===n?"undefined":(0,r.default)(n))?t.exports=l:(void 0).dateFormat=l}()},{"babel-runtime/helpers/typeof":32}],155:[function(e,t,n){(function(r){function i(){var e;try{e=n.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(n=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},n.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))})),e.splice(a,0,r)}},n.save=function(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}},n.load=i,n.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(i())}).call(this,e("_process"))},{"./debug":156,_process:173}],156:[function(e,t,n){function r(e){function t(){if(t.enabled){var e=t,r=+new Date,a=r-(i||r);e.diff=a,e.prev=i,e.curr=r,i=r;for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];o[0]=n.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var l=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,(function(t,r){if("%%"===t)return t;l++;var i=n.formatters[r];if("function"==typeof i){var a=o[l];t=i.call(e,a),o.splice(l,1),l--}return t})),n.formatArgs.call(e,o),(t.log||n.log||console.log.bind(console)).apply(e,o)}}return t.namespace=e,t.enabled=n.enabled(e),t.useColors=n.useColors(),t.color=function(e){var t,r=0;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return n.colors[Math.abs(r)%n.colors.length]}(e),"function"==typeof n.init&&n.init(t),t}var i;(n=t.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){n.save(e),n.names=[],n.skips=[];for(var t=("string"==typeof e?e:"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={}},{ms:169}],157:[function(e,t,n){"use strict";var r=/["'&<>]/;t.exports=function(e){var t=""+e,n=r.exec(t);if(!n)return t;var i,a="",o=0,s=0;for(o=n.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 39:i="&#39;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}s!==o&&(a+=t.substring(s,o)),s=o+1,a+=i}return s!==o?a+t.substring(s,o):a}},{}],158:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,s,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(o(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),r=(c=n.slice()).length,l=0;l<r;l++)c[l].apply(this,s);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(n=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){r=s;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],159:[function(e,t,n){var r=e("http"),i=t.exports;for(var a in r)r.hasOwnProperty(a)&&(i[a]=r[a]);i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",r.request.call(this,e,t)}},{http:196}],160:[function(e,t,n){"use strict";var r=e("util"),i=e("ms");t.exports=function(e){if("number"==typeof e)return e;var t=i(e);if(void 0===t){var n=new Error(r.format("humanize-ms(%j) result undefined",e));console.warn(n.stack)}return t}},{ms:169,util:207}],161:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,a=h&(1<<-u)-1,h>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=c}return(h?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,d=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[n+h]=255&o,h+=p,o/=256,c-=8);e[n+h-p]|=128*m}},{}],162:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],163:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],164:[function(e,t,n){!function(e){function r(e){return"function"==typeof e&&(/^class(\s|\{\}$)/.test(i.call(e))||/^.*classCallCheck\(/.test(function(e){return i.call(e).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}(e)))}var i=Function.prototype.toString;void 0!==n?(void 0!==t&&t.exports&&(n=t.exports=r),n.isClass=r):e.isClass=r}(this)},{}],165:[function(e,t,n){"use strict";var r=e("core-util-is"),i=e("isstream"),a=e("is-class");Object.keys(r).map((function(e){n[function(e){var t=e.slice(2);return t[0].toLowerCase()+t.slice(1)}(e)]=r[e]})),n.stream=i,n.readableStream=i.isReadable,n.writableStream=i.isWritable,n.duplexStream=i.isDuplex,n.class=a,n.finite=function(e){return Number.isFinite(e)},n.NaN=function(e){return Number.isNaN(e)},n.generator=function(e){return e&&"function"==typeof e.next&&"function"==typeof e.throw},n.generatorFunction=function(e){return e&&e.constructor&&"GeneratorFunction"===e.constructor.name},n.asyncFunction=function(e){return e&&e.constructor&&"AsyncFunction"===e.constructor.name},n.promise=function(e){return e&&"function"==typeof e.then};var o=Math.pow(2,31);n.int=function(e){return r.isNumber(e)&&e%1==0},n.int32=function(e){return n.int(e)&&e<o&&e>=-o},n.long=function(e){return n.int(e)&&(e>=o||e<-o)},n.Long=function(e){return n.object(e)&&n.number(e.high)&&n.number(e.low)},n.double=function(e){return r.isNumber(e)&&!isNaN(e)&&e%1!=0},n.date=function(e){return e instanceof Date},n.regExp=function(e){return e instanceof RegExp},n.regexp=n.regExp,n.error=function(e){return e instanceof Error},n.array=function(e){return Array.isArray(e)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],167:[function(e,t,n){function r(e){return e instanceof o.Stream}function i(e){return r(e)&&"function"==typeof e._read&&"object"==typeof e._readableState}function a(e){return r(e)&&"function"==typeof e._write&&"object"==typeof e._writableState}var o=e("stream");t.exports=r,t.exports.isReadable=i,t.exports.isWritable=a,t.exports.isDuplex=function(e){return i(e)&&a(e)}},{stream:195}],168:[function(e,t,n){"use strict";t.exports=function(e,t,n){if(!e)throw new TypeError("argument dest is required");if(!t)throw new TypeError("argument src is required");return void 0===n&&(n=!0),Object.getOwnPropertyNames(t).forEach((function(i){if(n||!r.call(e,i)){var a=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,a)}})),e};var r=Object.prototype.hasOwnProperty},{}],169:[function(e,t,n){function r(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var i=1e3,a=60*i,o=60*a,s=24*o,l=365.25*s;t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){return r(e,s,"day")||r(e,o,"hour")||r(e,a,"minute")||r(e,i,"second")||e+" ms"}(e):function(e){return e>=s?Math.round(e/s)+"d":e>=o?Math.round(e/o)+"h":e>=a?Math.round(e/a)+"m":e>=i?Math.round(e/i)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],170:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}n.resolve=function(){for(var n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return(i?"/":"")+(n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"))||"."},n.normalize=function(e){var a=n.isAbsolute(e),o="/"===i(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!a).join("/"))||a||(e="."),e&&o&&(e+="/"),(a?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),a=r(t.split("/")),o=Math.min(i.length,a.length),s=o,l=0;l<o;l++)if(i[l]!==a[l]){s=l;break}var c=[];for(l=s;l<i.length;l++)c.push("..");return(c=c.concat(a.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},n.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){n=o+1;break}}return-1===t||-1===r||0===a||1===a&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:173}],171:[function(e,n,r){(function(e){(function(){"use strict";function t(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function i(e){return e=c(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:t(e)}function a(e,t){for(var n in e)y.call(e,n)&&t(e[n],n,e)}function o(e){return null==e?t(e):b.call(e).slice(8,-1)}function s(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function l(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=m)for(;++n<r;)t(e[n],n,e);else a(e,t)}(e,(function(r,i){n=t(n,r,i,e)})),n}function c(e){return String(e).replace(/^ +| +$/g,"")}var u={function:!0,object:!0},d=u[typeof window]&&window||this,f=u[typeof r]&&r,h=u[typeof n]&&n&&!n.nodeType&&n,p=f&&h&&"object"==typeof e&&e;!p||p.global!==p&&p.window!==p&&p.self!==p||(d=p);var m=Math.pow(2,53)-1,v=/\bOpera/,g=Object.prototype,y=g.hasOwnProperty,b=g.toString,_=function e(t){function n(e){return l(e,(function(e,n){var r=n.pattern||s(n);return!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),n=n.label||n,e=i(e[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}var r=d,u=t&&"object"==typeof t&&"String"!=o(t);u&&(r=t,t=null);var f=r.navigator||{},h=f.userAgent||"";t||(t=h);var p,m,g=u?!!f.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(b.toString()),y=u?"Object":"ScriptBridgingProxyObject",_=u?"Object":"Environment",E=u&&r.java?"JavaPackage":o(r.java),x=u?"Object":"RuntimeObject",S=/\bJava/.test(E)&&r.java,w=S&&o(r.environment)==_,k=S?"a":"伪",T=S?"b":"尾",O=r.document||{},C=r.operamini||r.opera,A=v.test(A=u&&C?C["[[Class]]"]:o(C))?A:C=null,L=t,D=[],I=null,R=t==h,N=R&&C&&"function"==typeof C.version&&C.version(),M=l([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,n){return e||RegExp("\\b"+(n.pattern||s(n))+"\\b","i").exec(t)&&(n.label||n)})),P=l(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"],(function(e,n){return e||RegExp("\\b"+(n.pattern||s(n))+"\\b","i").exec(t)&&(n.label||n)})),j=n([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),F=l({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}},(function(e,n,r){return e||(n[j]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(j)]||RegExp("\\b"+s(r)+"(?:\\b|\\w*\\d)","i").exec(t))&&r})),U=l(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "],(function(e,n){var r=n.pattern||s(n);return!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,n){var r={"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 t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),i(e.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])}(e,r,n.label||n)),e}));if(M&&(M=[M]),F&&!j&&(j=n([F])),(p=/\bGoogle TV\b/.exec(j))&&(j=p[0]),/\bSimulator\b/i.test(t)&&(j=(j?j+" ":"")+"Simulator"),"Opera Mini"==P&&/\bOPiOS\b/.test(t)&&D.push("running in Turbo/Uncompressed mode"),"IE"==P&&/\blike iPhone OS\b/.test(t)?(F=(p=e(t.replace(/like iPhone OS/,""))).manufacturer,j=p.product):/^iP/.test(j)?(P||(P="Safari"),U="iOS"+((p=/ OS ([\d_]+)/i.exec(t))?" "+p[1].replace(/_/g,"."):"")):"Konqueror"!=P||/buntu/i.test(U)?F&&"Google"!=F&&(/Chrome/.test(P)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(j))||/\bAndroid\b/.test(U)&&/^Chrome/.test(P)&&/\bVersion\//i.test(t)?(P="Android Browser",U=/\bAndroid\b/.test(U)?U:"Android"):"Silk"==P?(/\bMobi/i.test(t)||(U="Android",D.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&D.unshift("accelerated")):"PaleMoon"==P&&(p=/\bFirefox\/([\d.]+)\b/.exec(t))?D.push("identifying as Firefox "+p[1]):"Firefox"==P&&(p=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(U||(U="Firefox OS"),j||(j=p[1])):!P||(p=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(P))?(P&&!j&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(p+"/")+8))&&(P=null),(p=j||F||U)&&(j||F||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(U))&&(P=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(U)?U:p)+" Browser")):"Electron"==P&&(p=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&D.push("Chromium "+p):U="Kubuntu",N||(N=function(e){return l(e,(function(e,n){return e||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",s(P),"(?:Firefox|Minefield|NetFront)"])),(p=("iCab"==M&&parseFloat(N)>3?"WebKit":/\bOpera\b/.test(P)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(M)&&"WebKit"||!M&&/\bMSIE\b/i.test(t)&&("Mac OS"==U?"Tasman":"Trident")||"WebKit"==M&&/\bPlayStation\b(?! Vita\b)/i.test(P)&&"NetFront")&&(M=[p]),"IE"==P&&(p=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(P+=" Mobile",U="Windows Phone "+(/\+$/.test(p)?p:p+".x"),D.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(P="IE Mobile",U="Windows Phone 8.x",D.unshift("desktop mode"),N||(N=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=P&&"Trident"==M&&(p=/\brv:([\d.]+)/.exec(t))&&(P&&D.push("identifying as "+P+(N?" "+N:"")),P="IE",N=p[1]),R){if(function(e,t){var n=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!e[t])}(r,"global"))if(S&&(L=(p=S.lang.System).getProperty("os.arch"),U=U||p.getProperty("os.name")+" "+p.getProperty("os.version")),w){try{N=r.require("ringo/engine").version.join("."),P="RingoJS"}catch(t){(p=r.system)&&p.global.system==r.system&&(P="Narwhal",U||(U=p[0].os||null))}P||(P="Rhino")}else"object"==typeof r.process&&!r.process.browser&&(p=r.process)&&("object"==typeof p.versions&&("string"==typeof p.versions.electron?(D.push("Node "+p.versions.node),P="Electron",N=p.versions.electron):"string"==typeof p.versions.nw&&(D.push("Chromium "+N,"Node "+p.versions.node),P="NW.js",N=p.versions.nw)),P||(P="Node.js",L=p.arch,U=p.platform,N=(N=/[\d.]+/.exec(p.version))?N[0]:null));else o(p=r.runtime)==y?(P="Adobe AIR",U=p.flash.system.Capabilities.os):o(p=r.phantom)==x?(P="PhantomJS",N=(p=p.version||null)&&p.major+"."+p.minor+"."+p.patch):"number"==typeof O.documentMode&&(p=/\bTrident\/(\d+)/i.exec(t))?(N=[N,O.documentMode],(p=+p[1]+4)!=N[1]&&(D.push("IE "+N[1]+" mode"),M&&(M[1]=""),N[1]=p),N="IE"==P?String(N[1].toFixed(1)):N[0]):"number"==typeof O.documentMode&&/^(?:Chrome|Firefox)\b/.test(P)&&(D.push("masking as "+P+" "+N),P="IE",N="11.0",M=["Trident"],U="Windows");U=U&&i(U)}if(N&&(p=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(N)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(R&&f.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(I=/b/i.test(p)?"beta":"alpha",N=N.replace(RegExp(p+"\\+?$"),"")+("beta"==I?T:k)+(/\d+\+?/.exec(p)||"")),"Fennec"==P||"Firefox"==P&&/\b(?:Android|Firefox OS)\b/.test(U))P="Firefox Mobile";else if("Maxthon"==P&&N)N=N.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(j))"Xbox 360"==j&&(U=null),"Xbox 360"==j&&/\bIEMobile\b/.test(t)&&D.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(P)&&(!P||j||/Browser|Mobi/.test(P))||"Windows CE"!=U&&!/Mobi/i.test(t))if("IE"==P&&R)try{null===r.external&&D.unshift("platform preview")}catch(t){D.unshift("embedded")}else(/\bBlackBerry\b/.test(j)||/\bBB10\b/.test(t))&&(p=(RegExp(j.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||N)?(U=((p=[p,/BB10/.test(t)])[1]?(j=null,F="BlackBerry"):"Device Software")+" "+p[0],N=null):this!=a&&"Wii"!=j&&(R&&C||/Opera/.test(P)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==P&&/\bOS X (?:\d+\.){2,}/.test(U)||"IE"==P&&(U&&!/^Win/.test(U)&&N>5.5||/\bWindows XP\b/.test(U)&&N>8||8==N&&!/\bTrident\b/.test(t)))&&!v.test(p=e.call(a,t.replace(v,"")+";"))&&p.name&&(p="ing as "+p.name+((p=p.version)?" "+p:""),v.test(P)?(/\bIE\b/.test(p)&&"Mac OS"==U&&(U=null),p="identify"+p):(p="mask"+p,P=A?i(A.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(p)&&(U=null),R||(N=null)),M=["Presto"],D.push(p));else P+=" Mobile";(p=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(p=[parseFloat(p.replace(/\.(\d)$/,".0$1")),p],"Safari"==P&&"+"==p[1].slice(-1)?(P="WebKit Nightly",I="alpha",N=p[1].slice(0,-1)):N!=p[1]&&N!=(p[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(N=null),p[1]=(/\bChrome\/([\d.]+)/i.exec(t)||0)[1],537.36==p[0]&&537.36==p[2]&&parseFloat(p[1])>=28&&"WebKit"==M&&(M=["Blink"]),R&&(g||p[1])?(M&&(M[1]="like Chrome"),p=p[1]||((p=p[0])<530?1:p<532?2:p<532.05?3:p<533?4:p<534.03?5:p<534.07?6:p<534.1?7:p<534.13?8:p<534.16?9:p<534.24?10:p<534.3?11:p<535.01?12:p<535.02?"13+":p<535.07?15:p<535.11?16:p<535.19?17:p<536.05?18:p<536.1?19:p<537.01?20:p<537.11?"21+":p<537.13?23:p<537.18?24:p<537.24?25:p<537.36?26:"Blink"!=M?"27":"28")):(M&&(M[1]="like Safari"),p=(p=p[0])<400?1:p<500?2:p<526?3:p<533?4:p<534?"4+":p<535?5:p<537?6:p<538?7:p<601?8:"8"),M&&(M[1]+=" "+(p+="number"==typeof p?".x":/[.+]/.test(p)?"":"+")),"Safari"==P&&(!N||parseInt(N)>45)&&(N=p)),"Opera"==P&&(p=/\bzbov|zvav$/.exec(U))?(P+=" ",D.unshift("desktop mode"),"zvav"==p?(P+="Mini",N=null):P+="Mobile",U=U.replace(RegExp(" *"+p+"$"),"")):"Safari"==P&&/\bChrome\b/.exec(M&&M[1])&&(D.unshift("desktop mode"),P="Chrome Mobile",N=null,/\bOS X\b/.test(U)?(F="Apple",U="iOS 4.3+"):U=null),N&&0==N.indexOf(p=/[\d.]+$/.exec(U))&&t.indexOf("/"+p+"-")>-1&&(U=c(U.replace(p,""))),M&&!/\b(?:Avant|Nook)\b/.test(P)&&(/Browser|Lunascape|Maxthon/.test(P)||"Safari"!=P&&/^iOS/.test(U)&&/\bSafari\b/.test(M[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(P)&&M[1])&&(p=M[M.length-1])&&D.push(p),D.length&&(D=["("+D.join("; ")+")"]),F&&j&&j.indexOf(F)<0&&D.push("on "+F),j&&D.push((/^on /.test(D[D.length-1])?"":"on ")+j),U&&(p=/ ([\d.+]+)$/.exec(U),m=p&&"/"==U.charAt(U.length-p[0].length-1),U={architecture:32,family:p&&!m?U.replace(p[0],""):U,version:p?p[1]:null,toString:function(){var e=this.version;return this.family+(e&&!m?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(p=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(L))&&!/\bi686\b/i.test(L)?(U&&(U.architecture=64,U.family=U.family.replace(RegExp(" *"+p),"")),P&&(/\bWOW64\b/i.test(t)||R&&/\w(?:86|32)$/.test(f.cpuClass||f.platform)&&!/\bWin64; x64\b/i.test(t))&&D.unshift("32-bit")):U&&/^OS X/.test(U.family)&&"Chrome"==P&&parseFloat(N)>=39&&(U.architecture=64),t||(t=null);var B={};return B.description=t,B.layout=M&&M[0],B.manufacturer=F,B.name=P,B.prerelease=I,B.product=j,B.ua=t,B.version=P&&N,B.os=U||{architecture:null,family:null,version:null,toString:function(){return"null"}},B.parse=e,B.toString=function(){return this.description||""},B.version&&D.unshift(N),B.name&&D.unshift(P),U&&P&&(U!=String(U).split(" ")[0]||U!=P.split(" ")[0]&&!j)&&D.push(j?"("+U+")":"on "+U),D.length&&(B.description=D.join(" ")),B}();f&&h?a(_,(function(e,t){f[t]=e})):d.platform=_}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],172:[function(e,t,n){(function(e){"use strict";!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick((function(){t.apply(null,a)}))}}}:t.exports=e}).call(this,e("_process"))},{_process:173}],173:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(u===setTimeout)return setTimeout(e,0);if((u===r||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(){m&&h&&(m=!1,h.length?p=h.concat(p):v=-1,p.length&&s())}function s(){if(!m){var e=a(o);m=!0;for(var t=p.length;t;){for(h=p,p=[];++v<t;)h&&h[v].run();v=-1,t=p.length}h=null,m=!1,function(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var u,d,f=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:r}catch(e){u=r}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}}();var h,p=[],m=!1,v=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||m||a(s)},l.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],174:[function(e,n,r){(function(e){!function(t){function i(e){throw new RangeError(D[e])}function a(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function o(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+a((e=e.replace(L,".")).split("."),t).join(".")}function s(e){for(var t,n,r=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function l(e){return a(e,(function(e){var t="";return e>65535&&(t+=N((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+N(e)})).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:_}function u(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?R(e/w):e>>1,e+=R(e/t);e>I*x>>1;r+=_)e=R(e/I);return R(r+(I+1)*e/(e+S))}function f(e){var t,n,r,a,o,s,u,f,h,p,m=[],v=e.length,g=0,y=T,S=k;for((n=e.lastIndexOf(O))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&i("not-basic"),m.push(e.charCodeAt(r));for(a=n>0?n+1:0;a<v;){for(o=g,s=1,u=_;a>=v&&i("invalid-input"),((f=c(e.charCodeAt(a++)))>=_||f>R((b-g)/s))&&i("overflow"),g+=f*s,!(f<(h=u<=S?E:u>=S+x?x:u-S));u+=_)s>R(b/(p=_-h))&&i("overflow"),s*=p;S=d(g-o,t=m.length+1,0==o),R(g/t)>b-y&&i("overflow"),y+=R(g/t),g%=t,m.splice(g++,0,y)}return l(m)}function h(e){var t,n,r,a,o,l,c,f,h,p,m,v,g,y,S,w=[];for(v=(e=s(e)).length,t=T,n=0,o=k,l=0;l<v;++l)(m=e[l])<128&&w.push(N(m));for(r=a=w.length,a&&w.push(O);r<v;){for(c=b,l=0;l<v;++l)(m=e[l])>=t&&m<c&&(c=m);for(c-t>R((b-n)/(g=r+1))&&i("overflow"),n+=(c-t)*g,t=c,l=0;l<v;++l)if((m=e[l])<t&&++n>b&&i("overflow"),m==t){for(f=n,h=_;!(f<(p=h<=o?E:h>=o+x?x:h-o));h+=_)S=f-p,y=_-p,w.push(N(u(p+S%y,0))),f=R(S/y);w.push(N(u(f,0))),o=d(n,g,r==a),n=0,++r}++n,++t}return w.join("")}var p="object"==typeof r&&r&&!r.nodeType&&r,m="object"==typeof n&&n&&!n.nodeType&&n,v="object"==typeof e&&e;v.global!==v&&v.window!==v&&v.self!==v||(t=v);var g,y,b=2147483647,_=36,E=1,x=26,S=38,w=700,k=72,T=128,O="-",C=/^xn--/,A=/[^\x20-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=_-E,R=Math.floor,N=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:s,encode:l},decode:f,encode:h,toASCII:function(e){return o(e,(function(e){return A.test(e)?"xn--"+h(e):e}))},toUnicode:function(e){return o(e,(function(e){return C.test(e)?f(e.slice(4).toLowerCase()):e}))}},p&&m)if(n.exports==p)m.exports=g;else for(y in g)g.hasOwnProperty(y)&&(p[y]=g[y]);else t.punycode=g}(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],175:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,a){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;a&&"number"==typeof a.maxKeys&&(l=a.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,f,h,p,m=e[u].replace(s,"%20"),v=m.indexOf(n);v>=0?(d=m.substr(0,v),f=m.substr(v+1)):(d=m,f=""),h=decodeURIComponent(d),p=decodeURIComponent(f),r(o,h)?i(o[h])?o[h].push(p):o[h]=[o[h],p]:o[h]=p}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],176:[function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(o(e),(function(o){var s=encodeURIComponent(i(o))+n;return a(e[o])?r(e[o],(function(e){return s+encodeURIComponent(i(e))})).join(t):s+encodeURIComponent(i(e[o]))})).join(t):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(e)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],177:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":175,"./encode":176}],178:[function(e,t,n){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);u.call(this,e),d.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||s.nextTick(a,this)}function a(e){e.end()}var o=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/keys")),s=e("process-nextick-args"),l=o.default||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=r;var c=e("core-util-is");c.inherits=e("inherits");var u=e("./_stream_readable"),d=e("./_stream_writable");c.inherits(r,u);for(var f=l(d.prototype),h=0;h<f.length;h++){var p=f[h];r.prototype[p]||(r.prototype[p]=d.prototype[p])}Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),r.prototype._destroy=function(e,t){this.push(null),this.end(),s.nextTick(t,e)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}t.exports=r;var i=e("./_stream_transform"),a=e("core-util-is");a.inherits=e("inherits"),a.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(e,n,r){(function(t,r){"use strict";function i(t,n){t=t||{};var r=n instanceof(S=S||e("./_stream_duplex"));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new R,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(I||(I=e("string_decoder/").StringDecoder),this.decoder=new I(t.encoding),this.encoding=t.encoding)}function a(t){if(S=S||e("./_stream_duplex"),!(this instanceof a))return new a(t);this._readableState=new i(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),T.call(this)}function o(e,t,n,r,i){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,u(e)}}(e,o)):(i||(a=l(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||(0,E.default)(t)===O.prototype||(t=function(e){return O.from(e)}(t)),r?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):s(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(t=o.decoder.write(t),o.objectMode||0!==t.length?s(e,o,t,!1):f(e,o)):s(e,o,t,!1))):r||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(o)}function s(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&u(e)),f(e,t)}function l(e,t){var n;return function(e){return O.isBuffer(e)||e instanceof C}(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=P?e=P:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function u(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(D("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?x.nextTick(d,e):d(e))}function d(e){D("emit readable"),e.emit("readable"),v(e)}function f(e,t){t.readingMore||(t.readingMore=!0,x.nextTick(h,e,t))}function h(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(D("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function p(e){D("readable nexttick read 0"),e.read(0)}function m(e,t){t.reading||(D("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),v(e),t.flowing&&!t.reading&&e.read(0)}function v(e){var t=e._readableState;for(D("flow",t.flowing);t.flowing&&null!==e.read(););}function g(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0==(e-=o)){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=O.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),0==(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function y(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,x.nextTick(b,t,e))}function b(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function _(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}var E=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/get-prototype-of")),x=e("process-nextick-args");n.exports=a;var S,w=e("isarray");a.ReadableState=i;var k=(e("events").EventEmitter,function(e,t){return e.listeners(t).length}),T=e("./internal/streams/stream"),O=e("safe-buffer").Buffer,C=r.Uint8Array||function(){},A=e("core-util-is");A.inherits=e("inherits");var L=e("util"),D=void 0;D=L&&L.debuglog?L.debuglog("stream"):function(){};var I,R=e("./internal/streams/BufferList"),N=e("./internal/streams/destroy");A.inherits(a,T);var M=["error","close","destroy","pause","resume"];Object.defineProperty(a.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),a.prototype.destroy=N.destroy,a.prototype._undestroy=N.undestroy,a.prototype._destroy=function(e,t){this.push(null),t(e)},a.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=O.from(e,t),t=""),n=!0),o(this,e,t,!1,n)},a.prototype.unshift=function(e){return o(this,e,null,!0,!1)},a.prototype.isPaused=function(){return!1===this._readableState.flowing},a.prototype.setEncoding=function(t){return I||(I=e("string_decoder/").StringDecoder),this._readableState.decoder=new I(t),this._readableState.encoding=t,this};var P=8388608;a.prototype.read=function(e){D("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return D("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?y(this):u(this),null;if(0===(e=c(e,t))&&t.ended)return 0===t.length&&y(this),null;var r,i=t.needReadable;return D("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&D("length less than watermark",i=!0),t.ended||t.reading?D("reading or ended",i=!1):i&&(D("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=c(n,t))),null===(r=e>0?g(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&y(this)),null!==r&&this.emit("data",r),r},a.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(e,n){function r(e,t){D("onunpipe"),e===d&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,a())}function i(){D("onend"),e.end()}function a(){D("cleanup"),e.removeListener("close",l),e.removeListener("finish",c),e.removeListener("drain",p),e.removeListener("error",s),e.removeListener("unpipe",r),d.removeListener("end",i),d.removeListener("end",u),d.removeListener("data",o),m=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||p()}function o(t){D("ondata"),g=!1,!1!==e.write(t)||g||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&-1!==_(f.pipes,e))&&!m&&(D("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,g=!0),d.pause())}function s(t){D("onerror",t),u(),e.removeListener("error",s),0===k(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",c),u()}function c(){D("onfinish"),e.removeListener("close",l),u()}function u(){D("unpipe"),d.unpipe(e)}var d=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,D("pipe count=%d opts=%j",f.pipesCount,n);var h=(!n||!1!==n.end)&&e!==t.stdout&&e!==t.stderr?i:u;f.endEmitted?x.nextTick(h):d.once("end",h),e.on("unpipe",r);var p=function(e){return function(){var t=e._readableState;D("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&k(e,"data")&&(t.flowing=!0,v(e))}}(d);e.on("drain",p);var m=!1,g=!1;return d.on("data",o),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?w(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",s),e.once("close",l),e.once("finish",c),e.emit("pipe",d),f.flowing||(D("pipe resume"),d.resume()),e},a.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var o=_(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},a.prototype.on=function(e,t){var n=T.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&u(this):x.nextTick(p,this))}return n},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var e=this._readableState;return e.flowing||(D("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,x.nextTick(m,e,t))}(this,e)),this},a.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},a.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(D("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){D("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||!(n.objectMode||i&&i.length)||t.push(i)||(r=!0,e.pause())})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<M.length;a++)e.on(M[a],this.emit.bind(this,M[a]));return this._read=function(t){D("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(a.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),a._fromList=g}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(e,t,n){"use strict";function r(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);s.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){o(e,t,n)})):o(this,null,null)}function o(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=i;var s=e("./_stream_duplex"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(i,s),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},i.prototype._destroy=function(e,t){var n=this;s.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(e,n,r){(function(t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}function o(){}function s(t,n){E=E||e("./_stream_duplex"),t=t||{};var r=n instanceof E;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,o=t.writableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(_.nextTick(i,r),_.nextTick(m,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),m(e,t))}(e,n,r,t,i);else{var a=h(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||f(e,n),r?x(d,e,n,a,i):d(e,n,a,i)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function l(t){if(E=E||e("./_stream_duplex"),!(w.call(l,this)||this instanceof E))return new l(t);this._writableState=new s(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),T.call(this)}function c(e,t,n,r,i,a){if(!n){var o=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=O.from(t,n)),t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else u(e,t,!1,s,r,i,a);return l}function u(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function d(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),m(e,t)}function f(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,u(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,d=n.encoding,f=n.callback;if(u(e,t,!1,t.objectMode?1:c.length,c,d,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function h(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function p(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),m(e,t)}))}function m(e,t){var n=h(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,_.nextTick(p,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}var v=i(e("babel-runtime/core-js/object/define-property")),g=i(e("babel-runtime/core-js/symbol/has-instance")),y=i(e("babel-runtime/core-js/symbol")),b=i(e("babel-runtime/core-js/set-immediate")),_=e("process-nextick-args");n.exports=l;var E,x=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?b.default:_.nextTick;l.WritableState=s;var S=e("core-util-is");S.inherits=e("inherits");var w,k={deprecate:e("util-deprecate")},T=e("./internal/streams/stream"),O=e("safe-buffer").Buffer,C=r.Uint8Array||function(){},A=e("./internal/streams/destroy");S.inherits(l,T),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:k.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof y.default&&g.default&&"function"==typeof Function.prototype[g.default]?(w=Function.prototype[g.default],(0,v.default)(l,g.default,{value:function(e){return!!w.call(this,e)||this===l&&e&&e._writableState instanceof s}})):w=function(e){return e instanceof this},l.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},l.prototype.write=function(e,t,n){var r=this._writableState,i=!1,a=!r.objectMode&&function(e){return O.isBuffer(e)||e instanceof C}(e);return a&&!O.isBuffer(e)&&(e=function(e){return O.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=o),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),_.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),_.nextTick(r,a),i=!1),i}(this,r,e,n))&&(r.pendingcb++,i=c(this,r,a,e,t,n)),i},l.prototype.cork=function(){this._writableState.corked++},l.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||f(this,e))},l.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),l.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},l.prototype._writev=null,l.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,m(e,t),n&&(t.finished?_.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),l.prototype.destroy=A.destroy,l.prototype._undestroy=A.undestroy,l.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,n){"use strict";function r(e,t,n){e.copy(t,n)}var i=e("safe-buffer").Buffer,a=e("util");t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,a=0;n;)r(n.data,t,a),a+=n.data.length,n=n.next;return t},e}(),a&&a.inspect&&a.inspect.custom&&(t.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":193,util:36}],185:[function(e,t,n){"use strict";function r(e,t){e.emit("error",t)}var i=e("process-nextick-args");t.exports={destroy:function(e,t){var n=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i.nextTick(r,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(i.nextTick(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){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)}}},{"process-nextick-args":172}],186:[function(e,t,n){"use strict";t.exports=e("events").EventEmitter},{events:158}],187:[function(e,t,n){t.exports=e("./readable").PassThrough},{"./readable":188}],188:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./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(e,t,n){t.exports=e("./readable").Transform},{"./readable":188}],190:[function(e,t,n){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,a=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)r.regeneratorRuntime=a;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(e,t,n){!function(e){"use strict";function n(e,t,n,r){var a=t&&t.prototype instanceof i?t:i,o=Object.create(a.prototype),s=new h(r||[]);return o._invoke=c(e,n,s),o}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function a(){}function o(){}function s(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function l(e){function t(n,i,a,o){var s=r(e[n],e,i);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&y.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,a,o)}),(function(e){t("throw",e,a,o)})):Promise.resolve(c).then((function(e){l.value=e,a(l)}),o)}o(s.arg)}var n;this._invoke=function(e,r){function i(){return new Promise((function(n,i){t(e,r,n,i)}))}return n=n?n.then(i,i):i()}}function c(e,t,n){var i=k;return function(a,o){if(i===O)throw new Error("Generator is already running");if(i===C){if("throw"===a)throw o;return m()}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var l=u(s,n);if(l){if(l===A)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===k)throw i=C,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=O;var c=r(e,t,n);if("normal"===c.type){if(i=n.done?C:T,c.arg===A)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=C,n.method="throw",n.arg=c.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,u(e,t),"throw"===t.method))return A;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,A;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,A):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,A)}function d(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)}function p(e){if(e){var t=e[_];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(y.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:v,done:!0}}var v,g=Object.prototype,y=g.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},_=b.iterator||"@@iterator",E=b.asyncIterator||"@@asyncIterator",x=b.toStringTag||"@@toStringTag",S="object"==typeof t,w=e.regeneratorRuntime;if(w)S&&(t.exports=w);else{(w=e.regeneratorRuntime=S?t.exports:{}).wrap=n;var k="suspendedStart",T="suspendedYield",O="executing",C="completed",A={},L={};L[_]=function(){return this};var D=Object.getPrototypeOf,I=D&&D(D(p([])));I&&I!==g&&y.call(I,_)&&(L=I);var R=o.prototype=i.prototype=Object.create(L);a.prototype=R.constructor=o,o.constructor=a,o[x]=a.displayName="GeneratorFunction",w.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},w.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,x in e||(e[x]="GeneratorFunction")),e.prototype=Object.create(R),e},w.awrap=function(e){return{__await:e}},s(l.prototype),l.prototype[E]=function(){return this},w.AsyncIterator=l,w.async=function(e,t,r,i){var a=new l(n(e,t,r,i));return w.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},s(R),R[x]="Generator",R[_]=function(){return this},R.toString=function(){return"[object Generator]"},w.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},w.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(f),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,A):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:p(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),A}}}}(function(){return this}()||Function("return this")())},{}],193:[function(e,t,n){function r(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return o(e,t,n)}var a=e("buffer"),o=a.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=a:(r(a,n),n.Buffer=i),r(o,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.SlowBuffer(e)}},{buffer:38}],194:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/string/from-code-point")),a=r(e("babel-runtime/core-js/json/stringify")),o=r(e("babel-runtime/helpers/typeof")),s=r(e("babel-runtime/core-js/object/define-property")),l=r(e("babel-runtime/core-js/object/keys")),c=r(e("babel-runtime/core-js/object/create"));!function(n){function r(e,t){if(!(this instanceof r))return new r(e,t);var i=this;(function(e){for(var t=0,n=R.length;t<n;t++)e[R[t]]=""})(i),i.q=i.c="",i.bufferCheckPosition=n.MAX_BUFFER_LENGTH,i.opt=t||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=K.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?(0,c.default)(n.XML_ENTITIES):(0,c.default)(n.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=(0,c.default)(U)),i.trackPosition=!1!==i.opt.position,i.trackPosition&&(i.position=i.line=i.column=0),g(i,"onready")}function u(e){for(var t=Math.max(n.MAX_BUFFER_LENGTH,10),r=0,i=0,a=R.length;i<a;i++){var o=e[R[i]].length;if(o>t)switch(R[i]){case"textNode":b(e);break;case"cdata":y(e,"oncdata",e.cdata),e.cdata="";break;case"script":y(e,"onscript",e.script),e.script="";break;default:E(e,"Max buffer length exceeded: "+R[i])}r=Math.max(r,o)}var s=n.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=s+e.position}function d(e,t){if(!(this instanceof d))return new d(e,t);I.apply(this),this._parser=new r(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,N.forEach((function(e){(0,s.default)(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}function f(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function h(e){return'"'===e||"'"===e}function p(e){return">"===e||f(e)}function m(e,t){return e.test(t)}function v(e,t){return!m(e,t)}function g(e,t,n){e[t]&&e[t](n)}function y(e,t,n){e.textNode&&b(e),g(e,t,n)}function b(e){e.textNode=_(e.opt,e.textNode),e.textNode&&g(e,"ontext",e.textNode),e.textNode=""}function _(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function E(e,t){return b(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,g(e,"onerror",t),e}function x(e){return e.sawRoot&&!e.closedRoot&&S(e,"Unclosed root tag"),e.state!==K.BEGIN&&e.state!==K.BEGIN_WHITESPACE&&e.state!==K.TEXT&&E(e,"Unexpected end"),b(e),e.c="",e.closed=!0,g(e,"onend"),r.call(e,e.strict,e.opt),e}function S(e,t){if("object"!==(void 0===e?"undefined":(0,o.default)(e))||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&E(e,t)}function w(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,y(e,"onopentagstart",n)}function k(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function T(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=k(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==j)S(e,"xml: prefix must be bound to "+j+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==F)S(e,"xmlns: prefix must be bound to "+F+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=(0,c.default)(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,y(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function O(e,t){if(e.opt.xmlns){var n=e.tag,r=k(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(S(e,"Unbound namespace prefix: "+(0,a.default)(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&(0,l.default)(n.ns).forEach((function(t){y(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var o=0,s=e.attribList.length;o<s;o++){var c=e.attribList[o],u=c[0],d=c[1],f=k(u,!0),h=f.prefix,p=f.local,m=""===h?"":n.ns[h]||"",v={name:u,value:d,prefix:h,local:p,uri:m};h&&"xmlns"!==h&&!m&&(S(e,"Unbound namespace prefix: "+(0,a.default)(h)),v.uri=h),e.tag.attributes[u]=v,y(e,"onattribute",v)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),y(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=K.TEXT:e.state=K.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function C(e){if(!e.tagName)return S(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=K.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=K.SCRIPT);y(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)S(e,"Unexpected close tag");if(t<0)return S(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=K.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,y(e,"onclosetag",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==c.ns&&(0,l.default)(a.ns).forEach((function(t){var n=a.ns[t];y(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=K.TEXT}function A(e){var t,n=e.entity,r=n.toLowerCase(),a="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),a=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),a=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(t)||a.toLowerCase()!==n?(S(e,"Invalid character entity"),"&"+e.entity+";"):(0,i.default)(t))}function L(e,t){"<"===t?(e.state=K.OPEN_WAKA,e.startTagPosition=e.position):f(t)||(S(e,"Non-whitespace before first tag."),e.textNode=t,e.state=K.TEXT)}function D(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}n.parser=function(e,t){return new r(e,t)},n.SAXParser=r,n.SAXStream=d,n.createStream=function(e,t){return new d(e,t)},n.MAX_BUFFER_LENGTH=65536;var I,R=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],c.default||(Object.create=function(e){function t(){}return t.prototype=e,new t}),l.default||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),r.prototype={end:function(){x(this)},write:function(e){var t=this;if(this.error)throw this.error;if(t.closed)return E(t,"Cannot write after close. Assign an onready handler.");if(null===e)return x(t);"object"===(void 0===e?"undefined":(0,o.default)(e))&&(e=e.toString());for(var n=0,r="";r=D(e,n++),t.c=r,r;)switch(t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++),t.state){case K.BEGIN:if(t.state=K.BEGIN_WHITESPACE,"\ufeff"===r)continue;L(t,r);continue;case K.BEGIN_WHITESPACE:L(t,r);continue;case K.TEXT:if(t.sawRoot&&!t.closedRoot){for(var i=n-1;r&&"<"!==r&&"&"!==r;)(r=D(e,n++))&&t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(i,n-1)}"<"!==r||t.sawRoot&&t.closedRoot&&!t.strict?(f(r)||t.sawRoot&&!t.closedRoot||S(t,"Text data outside of root node."),"&"===r?t.state=K.TEXT_ENTITY:t.textNode+=r):(t.state=K.OPEN_WAKA,t.startTagPosition=t.position);continue;case K.SCRIPT:"<"===r?t.state=K.SCRIPT_ENDING:t.script+=r;continue;case K.SCRIPT_ENDING:"/"===r?t.state=K.CLOSE_TAG:(t.script+="<"+r,t.state=K.SCRIPT);continue;case K.OPEN_WAKA:if("!"===r)t.state=K.SGML_DECL,t.sgmlDecl="";else if(f(r));else if(m(B,r))t.state=K.OPEN_TAG,t.tagName=r;else if("/"===r)t.state=K.CLOSE_TAG,t.tagName="";else if("?"===r)t.state=K.PROC_INST,t.procInstName=t.procInstBody="";else{if(S(t,"Unencoded <"),t.startTagPosition+1<t.position){var a=t.position-t.startTagPosition;r=new Array(a).join(" ")+r}t.textNode+="<"+r,t.state=K.TEXT}continue;case K.SGML_DECL:(t.sgmlDecl+r).toUpperCase()===M?(y(t,"onopencdata"),t.state=K.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+r==="--"?(t.state=K.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+r).toUpperCase()===P?(t.state=K.DOCTYPE,(t.doctype||t.sawRoot)&&S(t,"Inappropriately located doctype declaration"),t.doctype="",t.sgmlDecl=""):">"===r?(y(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=K.TEXT):h(r)?(t.state=K.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case K.SGML_DECL_QUOTED:r===t.q&&(t.state=K.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case K.DOCTYPE:">"===r?(t.state=K.TEXT,y(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=K.DOCTYPE_DTD:h(r)&&(t.state=K.DOCTYPE_QUOTED,t.q=r));continue;case K.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=K.DOCTYPE);continue;case K.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=K.DOCTYPE:h(r)&&(t.state=K.DOCTYPE_DTD_QUOTED,t.q=r);continue;case K.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=K.DOCTYPE_DTD,t.q="");continue;case K.COMMENT:"-"===r?t.state=K.COMMENT_ENDING:t.comment+=r;continue;case K.COMMENT_ENDING:"-"===r?(t.state=K.COMMENT_ENDED,t.comment=_(t.opt,t.comment),t.comment&&y(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=K.COMMENT);continue;case K.COMMENT_ENDED:">"!==r?(S(t,"Malformed comment"),t.comment+="--"+r,t.state=K.COMMENT):t.state=K.TEXT;continue;case K.CDATA:"]"===r?t.state=K.CDATA_ENDING:t.cdata+=r;continue;case K.CDATA_ENDING:"]"===r?t.state=K.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=K.CDATA);continue;case K.CDATA_ENDING_2:">"===r?(t.cdata&&y(t,"oncdata",t.cdata),y(t,"onclosecdata"),t.cdata="",t.state=K.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=K.CDATA);continue;case K.PROC_INST:"?"===r?t.state=K.PROC_INST_ENDING:f(r)?t.state=K.PROC_INST_BODY:t.procInstName+=r;continue;case K.PROC_INST_BODY:if(!t.procInstBody&&f(r))continue;"?"===r?t.state=K.PROC_INST_ENDING:t.procInstBody+=r;continue;case K.PROC_INST_ENDING:">"===r?(y(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=K.TEXT):(t.procInstBody+="?"+r,t.state=K.PROC_INST_BODY);continue;case K.OPEN_TAG:m(G,r)?t.tagName+=r:(w(t),">"===r?O(t):"/"===r?t.state=K.OPEN_TAG_SLASH:(f(r)||S(t,"Invalid character in tag name"),t.state=K.ATTRIB));continue;case K.OPEN_TAG_SLASH:">"===r?(O(t,!0),C(t)):(S(t,"Forward-slash in opening tag not followed by >"),t.state=K.ATTRIB);continue;case K.ATTRIB:if(f(r))continue;">"===r?O(t):"/"===r?t.state=K.OPEN_TAG_SLASH:m(B,r)?(t.attribName=r,t.attribValue="",t.state=K.ATTRIB_NAME):S(t,"Invalid attribute name");continue;case K.ATTRIB_NAME:"="===r?t.state=K.ATTRIB_VALUE:">"===r?(S(t,"Attribute without value"),t.attribValue=t.attribName,T(t),O(t)):f(r)?t.state=K.ATTRIB_NAME_SAW_WHITE:m(G,r)?t.attribName+=r:S(t,"Invalid attribute name");continue;case K.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=K.ATTRIB_VALUE;else{if(f(r))continue;S(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",y(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?O(t):m(B,r)?(t.attribName=r,t.state=K.ATTRIB_NAME):(S(t,"Invalid attribute name"),t.state=K.ATTRIB)}continue;case K.ATTRIB_VALUE:if(f(r))continue;h(r)?(t.q=r,t.state=K.ATTRIB_VALUE_QUOTED):(S(t,"Unquoted attribute value"),t.state=K.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case K.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=K.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}T(t),t.q="",t.state=K.ATTRIB_VALUE_CLOSED;continue;case K.ATTRIB_VALUE_CLOSED:f(r)?t.state=K.ATTRIB:">"===r?O(t):"/"===r?t.state=K.OPEN_TAG_SLASH:m(B,r)?(S(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=K.ATTRIB_NAME):S(t,"Invalid attribute name");continue;case K.ATTRIB_VALUE_UNQUOTED:if(!p(r)){"&"===r?t.state=K.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}T(t),">"===r?O(t):t.state=K.ATTRIB;continue;case K.CLOSE_TAG:if(t.tagName)">"===r?C(t):m(G,r)?t.tagName+=r:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=K.SCRIPT):(f(r)||S(t,"Invalid tagname in closing tag"),t.state=K.CLOSE_TAG_SAW_WHITE);else{if(f(r))continue;v(B,r)?t.script?(t.script+="</"+r,t.state=K.SCRIPT):S(t,"Invalid tagname in closing tag."):t.tagName=r}continue;case K.CLOSE_TAG_SAW_WHITE:if(f(r))continue;">"===r?C(t):S(t,"Invalid characters in closing tag");continue;case K.TEXT_ENTITY:case K.ATTRIB_VALUE_ENTITY_Q:case K.ATTRIB_VALUE_ENTITY_U:var s,l;switch(t.state){case K.TEXT_ENTITY:s=K.TEXT,l="textNode";break;case K.ATTRIB_VALUE_ENTITY_Q:s=K.ATTRIB_VALUE_QUOTED,l="attribValue";break;case K.ATTRIB_VALUE_ENTITY_U:s=K.ATTRIB_VALUE_UNQUOTED,l="attribValue"}";"===r?(t[l]+=A(t),t.entity="",t.state=s):m(t.entity.length?H:z,r)?t.entity+=r:(S(t,"Invalid character in entity name"),t[l]+="&"+t.entity+r,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}return t.position>=t.bufferCheckPosition&&u(t),t},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){!function(e){b(e),""!==e.cdata&&(y(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(y(e,"onscript",e.script),e.script="")}(this)}};try{I=e("stream").Stream}catch(e){I=function(){}}var N=n.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));d.prototype=(0,c.default)(I.prototype,{constructor:{value:d}}),d.prototype.write=function(n){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(n)){if(!this._decoder){var r=e("string_decoder").StringDecoder;this._decoder=new r("utf8")}n=this._decoder.write(n)}return this._parser.write(n.toString()),this.emit("data",n),!0},d.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},d.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===N.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),I.prototype.on.call(n,e,t)};var M="[CDATA[",P="DOCTYPE",j="http://www.w3.org/XML/1998/namespace",F="http://www.w3.org/2000/xmlns/",U={xml:j,xmlns:F},B=/[:_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]/,G=/[:_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-]/,z=/[#:_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]/,H=/[#:_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-]/,K=0;for(var V in n.STATE={BEGIN:K++,BEGIN_WHITESPACE:K++,TEXT:K++,TEXT_ENTITY:K++,OPEN_WAKA:K++,SGML_DECL:K++,SGML_DECL_QUOTED:K++,DOCTYPE:K++,DOCTYPE_QUOTED:K++,DOCTYPE_DTD:K++,DOCTYPE_DTD_QUOTED:K++,COMMENT_STARTING:K++,COMMENT:K++,COMMENT_ENDING:K++,COMMENT_ENDED:K++,CDATA:K++,CDATA_ENDING:K++,CDATA_ENDING_2:K++,PROC_INST:K++,PROC_INST_BODY:K++,PROC_INST_ENDING:K++,OPEN_TAG:K++,OPEN_TAG_SLASH:K++,ATTRIB:K++,ATTRIB_NAME:K++,ATTRIB_NAME_SAW_WHITE:K++,ATTRIB_VALUE:K++,ATTRIB_VALUE_QUOTED:K++,ATTRIB_VALUE_CLOSED:K++,ATTRIB_VALUE_UNQUOTED:K++,ATTRIB_VALUE_ENTITY_Q:K++,ATTRIB_VALUE_ENTITY_U:K++,CLOSE_TAG:K++,CLOSE_TAG_SAW_WHITE:K++,SCRIPT:K++,SCRIPT_ENDING:K++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.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,l.default)(n.ENTITIES).forEach((function(e){var t=n.ENTITIES[e],r="number"==typeof t?String.fromCharCode(t):t;n.ENTITIES[e]=r})),n.STATE)n.STATE[n.STATE[V]]=V;K=n.STATE,i.default||function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,r,i=[],a=-1,o=arguments.length;if(!o)return"";for(var s="";++a<o;){var l=Number(arguments[a]);if(!isFinite(l)||l<0||l>1114111||t(l)!==l)throw RangeError("Invalid code point: "+l);l<=65535?i.push(l):(n=55296+((l-=65536)>>10),r=l%1024+56320,i.push(n,r)),(a+1===o||i.length>16384)&&(s+=e.apply(null,i),i.length=0)}return s};s.default?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}(void 0===n?(void 0).sax={}:n)}).call(this,e("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(e,t,n){function r(){i.call(this)}t.exports=r;var i=e("events").EventEmitter;e("inherits")(r,i),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function a(){u||(u=!0,e.end())}function o(){u||(u=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",a),c.removeListener("close",o),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",l),c.removeListener("close",l),e.removeListener("close",l)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(c.on("end",a),c.on("close",o));var u=!1;return c.on("error",s),e.on("error",s),c.on("end",l),c.on("close",l),e.on("close",l),e.emit("pipe",c),e}},{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(e,n,r){(function(t){var n=e("./lib/request"),i=e("./lib/response"),a=e("xtend"),o=e("builtin-status-codes"),s=e("url"),l=r;l.request=function(e,r){e="string"==typeof e?s.parse(e):a(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||i,l=e.hostname||e.host,c=e.port,u=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?o+"//"+l:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new n(e);return r&&d.on("response",r),d},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=n,l.IncomingMessage=i.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=o,l.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,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(e,n,r){(function(e){"use strict";function t(){if(void 0!==a)return a;if(e.XMLHttpRequest){a=new e.XMLHttpRequest;try{a.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){a=null}}else a=null;return a}function n(e){var n=t();if(!n)return!1;try{return n.responseType=e,n.responseType===e}catch(e){}return!1}function i(e){return"function"==typeof e}r.fetch=i(e.fetch)&&i(e.ReadableStream),r.writableStream=i(e.WritableStream),r.abortController=i(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var a,o=void 0!==e.ArrayBuffer,s=o&&i(e.ArrayBuffer.prototype.slice);r.arraybuffer=r.fetch||o&&n("arraybuffer"),r.msstream=!r.fetch&&s&&n("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&o&&n("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!t()&&i(t().overrideMimeType),r.vbArray=i(e.VBArray),a=null}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],198:[function(e,n,r){(function(t,r,i){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/keys")),o=e("./capability"),s=e("inherits"),l=e("./response"),c=e("readable-stream"),u=e("to-arraybuffer"),d=l.IncomingMessage,f=l.readyStates,h=n.exports=function(e){var t=this;c.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),(0,a.default)(e.headers).forEach((function(n){t.setHeader(n,e.headers[n])}));var n,r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)r=!1,n=!0;else if("prefer-streaming"===e.mode)n=!1;else if("allow-wrong-content-type"===e.mode)n=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");n=!0}t._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":o.vbArray&&e?"text:vbarray":"text"}(n,r),t._fetchTimer=null,t.on("finish",(function(){t._onFinish()}))};s(h,c.Writable),h.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===p.indexOf(n)&&(this._headers[n]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts,s=e._headers,l=null;"GET"!==n.method&&"HEAD"!==n.method&&(l=o.arraybuffer?u(i.concat(e._body)):o.blobConstructor?new r.Blob(e._body.map((function(e){return u(e)})),{type:(s["content-type"]||{}).value||""}):i.concat(e._body).toString());var c=[];if((0,a.default)(s).forEach((function(e){var t=s[e].name,n=s[e].value;Array.isArray(n)?n.forEach((function(e){c.push([t,e])})):c.push([t,n])})),"fetch"===e._mode){var d=null;if(o.abortController){var h=new AbortController;d=h.signal,e._fetchAbortController=h,"requestTimeout"in n&&0!==n.requestTimeout&&(e._fetchTimer=r.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),n.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:c,body:l||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:d}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new r.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(n){return void t.nextTick((function(){e.emit("error",n)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(p.timeout=n.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),c.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(l)}catch(n){return void t.nextTick((function(){e.emit("error",n)}))}}}},h.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,n){this._body.push(e),n()},h.prototype.abort=h.prototype.destroy=function(){var e=this;e._destroyed=!0,r.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},h.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var p=["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,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("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(e,n,r){(function(t,n,i){"use strict";var a=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/promise")),o=e("./capability"),s=e("inherits"),l=e("readable-stream"),c=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=r.IncomingMessage=function(e,r,s,c){var u=this;if(l.Readable.call(u),u._mode=s,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){t.nextTick((function(){u.emit("close")}))})),"fetch"===s){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var d=new WritableStream({write:function(e){return new a.default((function(t,n){u._destroyed?n():u.push(new i(e))?t():u._resumeFetch=t}))},close:function(){n.clearTimeout(c),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{return void r.body.pipeTo(d).catch((function(e){n.clearTimeout(c),u._destroyed||u.emit("error",e)}))}catch(e){}}var f=r.body.getReader();!function e(){f.read().then((function(t){if(!u._destroyed){if(t.done)return n.clearTimeout(c),void u.push(null);u.push(new i(t.value)),e()}})).catch((function(e){n.clearTimeout(c),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===u.headers[n]&&(u.headers[n]=[]),u.headers[n].push(t[2])):void 0!==u.headers[n]?u.headers[n]+=", "+t[2]:u.headers[n]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var h=u.rawHeaders["mime-type"];if(h){var p=h.match(/;\s*charset=([^;])(;|$)/);p&&(u._charset=p[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(u,l.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==c.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var a=r.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new i(a.length),s=0;s<a.length;s++)o[s]=255&a.charCodeAt(s);e.push(o)}else e.push(a,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==c.DONE||!t.response)break;r=t.response,e.push(new i(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==c.LOADING||!r)break;e.push(new i(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==c.LOADING)break;var l=new n.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(new i(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(r)}e._xhr.readyState===c.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(e,t,n){"use strict";function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(f.isEncoding===h||!h(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=o,this.end=s,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=u,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=f.allocUnsafe(t)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"锟<>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"锟<>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"锟<>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}var f=e("safe-buffer").Buffer,h=f.isEncoding||function(e){switch((e=""+e)&&e.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}};n.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"锟<>":t},r.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var a=i(t[r]);return a>=0?(a>0&&(e.lastNeed=a-1),a):--r<n||-2===a?0:(a=i(t[r]))>=0?(a>0&&(e.lastNeed=a-2),a):--r<n||-2===a?0:(a=i(t[r]))>=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":193}],201:[function(e,t,n){(function(t,r){function i(e,t){this._id=e,this._clearFn=t}var a=e("process/browser.js").nextTick,o=Function.prototype.apply,s=Array.prototype.slice,l={},c=0;n.setTimeout=function(){return new i(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new i(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&s.call(arguments,1);return l[t]=!0,a((function(){l[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete l[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,i=0;i<n;i++)t[i]=e[i];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&o.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}var a=e("punycode"),o=e("./util");n.parse=i,n.resolve=function(e,t){return i(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?i(e,!1,!0).resolveObject(t):t},n.format=function(e){return o.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)},n.Url=r;var s=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(u),f=["%","/","?",";","#"].concat(d),h=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=e("querystring");r.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",l=e.split(i);l[0]=l[0].replace(/\\/g,"/");var u=e=l.join(i);if(u=u.trim(),!n&&1===e.split("#").length){var _=c.exec(u);if(_)return this.path=u,this.href=u,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var E=s.exec(u);if(E){var x=(E=E[0]).toLowerCase();this.protocol=x,u=u.substr(E.length)}if(n||E||u.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===u.substr(0,2);!S||E&&g[E]||(u=u.substr(2),this.slashes=!0)}if(!g[E]&&(S||E&&!y[E])){for(var w=-1,k=0;k<h.length;k++){-1!==(C=u.indexOf(h[k]))&&(-1===w||C<w)&&(w=C)}var T,O;-1!==(O=-1===w?u.lastIndexOf("@"):u.lastIndexOf("@",w))&&(T=u.slice(0,O),u=u.slice(O+1),this.auth=decodeURIComponent(T)),w=-1;for(k=0;k<f.length;k++){var C;-1!==(C=u.indexOf(f[k]))&&(-1===w||C<w)&&(w=C)}-1===w&&(w=u.length),this.host=u.slice(0,w),u=u.slice(w),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var L=this.hostname.split(/\./),D=(k=0,L.length);k<D;k++){var I=L[k];if(I&&!I.match(p)){for(var R="",N=0,M=I.length;N<M;N++)I.charCodeAt(N)>127?R+="x":R+=I[N];if(!R.match(p)){var P=L.slice(0,k),j=L.slice(k+1),F=I.match(m);F&&(P.push(F[1]),j.unshift(F[2])),j.length&&(u="/"+j.join(".")+u),this.hostname=P.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=a.toASCII(this.hostname));var U=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+U,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!v[x])for(k=0,D=d.length;k<D;k++){var G=d[k];if(-1!==u.indexOf(G)){var z=encodeURIComponent(G);z===G&&(z=escape(G)),u=u.split(G).join(z)}}var H=u.indexOf("#");-1!==H&&(this.hash=u.substr(H),u=u.slice(0,H));var K=u.indexOf("?");if(-1!==K?(this.search=u.substr(K),this.query=u.substr(K+1),t&&(this.query=b.parse(this.query)),u=u.slice(0,K)):t&&(this.search="",this.query={}),u&&(this.pathname=u),y[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var V=this.search||"";this.path=U+V}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=b.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(o.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),a=0;a<i.length;a++){var s=i[a];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!y[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var h=d[f];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var b=n.pathname&&"/"===n.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),E=_||b||n.host&&e.pathname,x=E,S=n.pathname&&n.pathname.split("/")||[],w=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(w&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),E=E&&(""===p[0]||""===S[0])),_)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),n.search=e.search,n.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(w)n.hostname=n.host=S.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=S.slice(-1)[0],T=(n.host||e.host||S.length>1)&&("."===k||".."===k)||""===k,O=0,C=S.length;C>=0;C--)"."===(k=S[C])?S.splice(C,1):".."===k?(S.splice(C,1),O++):O&&(S.splice(C,1),O--);if(!E&&!x)for(;O--;O)S.unshift("..");!E||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),T&&"/"!==S.join("/").substr(-1)&&S.push("");var A,L=""===S[0]||S[0]&&"/"===S[0].charAt(0);w&&(n.hostname=n.host=L?"":S.length?S.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(E=E||n.host&&S.length)&&!L&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":204,punycode:174,querystring:177}],204:[function(e,t,n){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],205:[function(e,n,r){(function(e){function t(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}n.exports=function(e,n){if(t("noDeprecation"))return e;var r=!1;return function(){if(!r){if(t("throwDeprecation"))throw new Error(n);t("traceDeprecation")?console.trace(n):console.warn(n),r=!0}return e.apply(this,arguments)}}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],206:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],207:[function(e,n,r){(function(t,n){function i(e,t){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),s(n,e,n.depth)}function a(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function o(e,t){return e}function s(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return m(i)||(i=s(e,i,n)),i}var a=l(e,t);if(a)return a;var o=Object.keys(t),f=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),_(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(E(t)){var h=t.name?": "+t.name:"";return e.stylize("[Function"+h+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(_(t))return c(t)}var p,v="",y=!1,x=["{","}"];return d(t)&&(y=!0,x=["[","]"]),E(t)&&(v=" [Function"+(t.name?": "+t.name:"")+"]"),g(t)&&(v=" "+RegExp.prototype.toString.call(t)),b(t)&&(v=" "+Date.prototype.toUTCString.call(t)),_(t)&&(v=" "+c(t)),0!==o.length||y&&0!=t.length?n<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),p=y?function(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)k(t,String(o))?a.push(u(e,t,n,r,String(o),!0)):a.push("");return i.forEach((function(i){i.match(/^\d+$/)||a.push(u(e,t,n,r,i,!0))})),a}(e,t,n,f,o):o.map((function(r){return u(e,t,n,f,r,y)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(p,v,x)):x[0]+v+x[1]}function l(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return p(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):h(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,n,r,i,a){var o,l,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?l=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(l=e.stylize("[Setter]","special")),k(r,i)||(o="["+i+"]"),l||(e.seen.indexOf(c.value)<0?(l=h(n)?s(e,c.value,null):s(e,c.value,n-1)).indexOf("\n")>-1&&(l=a?l.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+l.split("\n").map((function(e){return" "+e})).join("\n")):l=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return l;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+l}function d(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function h(e){return null===e}function p(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function g(e){return y(e)&&"[object RegExp]"===x(e)}function y(e){return"object"==typeof e&&null!==e}function b(e){return y(e)&&"[object Date]"===x(e)}function _(e){return y(e)&&("[object Error]"===x(e)||e instanceof Error)}function E(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}function w(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var T=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,a=r.length,o=String(e).replace(T,(function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<a;s=r[++n])h(s)||!y(s)?o+=" "+s:o+=" "+i(s);return o},r.deprecate=function(e,i){if(v(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return function(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}};var O,C={};r.debuglog=function(e){if(v(O)&&(O=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!C[e])if(new RegExp("\\b"+e+"\\b","i").test(O)){var n=t.pid;C[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else C[e]=function(){};return C[e]},r.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=f,r.isNull=h,r.isNullOrUndefined=function(e){return null==e},r.isNumber=p,r.isString=m,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=g,r.isObject=y,r.isDate=b,r.isError=_,r.isFunction=E,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",w(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!y(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(e,t,n){"use strict";(function(){n.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(void 0)},{}],209:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/helpers/typeof")),a=r(e("babel-runtime/core-js/object/keys"));(function(){var t,r,o,s,l,c={}.hasOwnProperty;t=e("xmlbuilder"),r=e("./defaults").defaults,s=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},l=function(e){return"<![CDATA["+o(e)+"]]>"},o=function(e){return e.replace("]]>","]]]]><![CDATA[>")},n.Builder=function(){function e(e){var t,n,i;for(t in this.options={},n=r[.2])c.call(n,t)&&(i=n[t],this.options[t]=i);for(t in e)c.call(e,t)&&(i=e[t],this.options[t]=i)}return e.prototype.buildObject=function(e){var n,o,u,d,f;return n=this.options.attrkey,o=this.options.charkey,1===(0,a.default)(e).length&&this.options.rootName===r[.2].rootName?e=e[f=(0,a.default)(e)[0]]:f=this.options.rootName,u=function(e){return function(t,r){var a,d,f,h,p,m;if("object"!==(void 0===r?"undefined":(0,i.default)(r)))e.options.cdata&&s(r)?t.raw(l(r)):t.txt(r);else if(Array.isArray(r)){for(h in r)if(c.call(r,h))for(p in d=r[h])f=d[p],t=u(t.ele(p),f).up()}else for(p in r)if(c.call(r,p))if(d=r[p],p===n){if("object"===(void 0===d?"undefined":(0,i.default)(d)))for(a in d)m=d[a],t=t.att(a,m)}else if(p===o)t=e.options.cdata&&s(d)?t.raw(l(d)):t.txt(d);else if(Array.isArray(d))for(h in d)c.call(d,h)&&(t="string"==typeof(f=d[h])?e.options.cdata&&s(f)?t.ele(p).raw(l(f)).up():t.ele(p,f).up():u(t.ele(p),f).up());else"object"===(void 0===d?"undefined":(0,i.default)(d))?t=u(t.ele(p),d).up():"string"==typeof d&&e.options.cdata&&s(d)?t=t.ele(p).raw(l(d)).up():(null==d&&(d=""),t=t.ele(p,d.toString()).up());return t}}(this),d=t.create(f,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(d,e).end(this.options.renderOpts)},e}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(e,t,n){"use strict";(function(){n.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:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/get-own-property-names")),a=r(e("babel-runtime/core-js/object/keys")),o=r(e("babel-runtime/helpers/typeof"));(function(){var t,r,s,l,c,u,d,f,h=function(e,t){return function(){return e.apply(t,arguments)}},p={}.hasOwnProperty;d=e("sax"),s=e("events"),t=e("./bom"),u=e("./processors"),f=e("timers").setImmediate,r=e("./defaults").defaults,l=function(e){return"object"===(void 0===e?"undefined":(0,o.default)(e))&&null!=e&&0===(0,a.default)(e).length},c=function(e,t,n){var r,i;for(r=0,i=e.length;r<i;r++)t=(0,e[r])(t,n);return t},n.Parser=function(e){function s(e){var t,i,a;if(this.parseString=h(this.parseString,this),this.reset=h(this.reset,this),this.assignOrPush=h(this.assignOrPush,this),this.processAsync=h(this.processAsync,this),!(this instanceof n.Parser))return new n.Parser(e);for(t in this.options={},i=r[.2])p.call(i,t)&&(a=i[t],this.options[t]=a);for(t in e)p.call(e,t)&&(a=e[t],this.options[t]=a);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return function(e,t){function n(){this.constructor=e}for(var r in t)p.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(s,e),s.prototype.processAsync=function(){var e,t;try{return this.remaining.length<=this.options.chunkSize?(e=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(e),this.saxParser.close()):(e=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(e),f(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},s.prototype.assignOrPush=function(e,t,n){return t in e?(e[t]instanceof Array||(e[t]=[e[t]]),e[t].push(n)):this.options.explicitArray?e[t]=[n]:e[t]=n},s.prototype.reset=function(){var e,t,n,r;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(e){return function(t){if(e.saxParser.resume(),!e.saxParser.errThrown)return e.saxParser.errThrown=!0,e.emit("error",t)}}(this),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit("end",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,r=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var a,o,s,l,u;if((s={})[t]="",!n.options.ignoreAttrs)for(a in u=i.attributes)p.call(u,a)&&(e in s||n.options.mergeAttrs||(s[e]={}),o=n.options.attrValueProcessors?c(n.options.attrValueProcessors,i.attributes[a],a):i.attributes[a],l=n.options.attrNameProcessors?c(n.options.attrNameProcessors,a):a,n.options.mergeAttrs?n.assignOrPush(s,l,o):s[e][l]=o);return s["#name"]=n.options.tagNameProcessors?c(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(s[n.options.xmlnskey]={uri:i.uri,local:i.local}),r.push(s)}}(this),this.saxParser.onclosetag=function(e){return function(){var n,s,u,d,f,h,m,v,g,y;if(h=r.pop(),f=h["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete h["#name"],!0===h.cdata&&(n=h.cdata,delete h.cdata),g=r[r.length-1],h[t].match(/^\s*$/)&&!n?(s=h[t],delete h[t]):(e.options.trim&&(h[t]=h[t].trim()),e.options.normalize&&(h[t]=h[t].replace(/\s{2,}/g," ").trim()),h[t]=e.options.valueProcessors?c(e.options.valueProcessors,h[t],f):h[t],1===(0,a.default)(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])),l(h)&&(h=""!==e.options.emptyTag?e.options.emptyTag:s),null!=e.options.validator&&(y="/"+function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)d=r[e],n.push(d["#name"]);return n}().concat(f).join("/"),function(){var t;try{h=e.options.validator(y,g&&g[f],h)}catch(n){return t=n,e.emit("error",t)}}()),e.options.explicitChildren&&!e.options.mergeAttrs&&"object"===(void 0===h?"undefined":(0,o.default)(h)))if(e.options.preserveChildrenOrder){if(g){for(u in g[e.options.childkey]=g[e.options.childkey]||[],m={},h)p.call(h,u)&&(m[u]=h[u]);g[e.options.childkey].push(m),delete h["#name"],1===(0,a.default)(h).length&&t in h&&!e.EXPLICIT_CHARKEY&&(h=h[t])}}else d={},e.options.attrkey in h&&(d[e.options.attrkey]=h[e.options.attrkey],delete h[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in h&&(d[e.options.charkey]=h[e.options.charkey],delete h[e.options.charkey]),(0,i.default)(h).length>0&&(d[e.options.childkey]=h),h=d;return r.length>0?e.assignOrPush(g,f,h):(e.options.explicitRoot&&(v=h,(h={})[f]=v),e.resultObject=h,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),n=function(e){return function(n){var i,a;if(a=r[r.length-1])return a[t]+=n,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(a[e.options.childkey]=a[e.options.childkey]||[],(i={"#name":"__text__"})[t]=n,e.options.normalize&&(i[t]=i[t].replace(/\s{2,}/g," ").trim()),a[e.options.childkey].push(i)),a}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(e){var t;if(t=n(e))return t.cdata=!0}},s.prototype.parseString=function(e,n){var r;null!=n&&"function"==typeof n&&(this.on("end",(function(e){return this.reset(),n(null,e)})),this.on("error",(function(e){return this.reset(),n(e)})));try{return""===(e=e.toString()).trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,f(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(e){if(r=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},s}(s.EventEmitter),n.parseString=function(e,t,r){var i,a;return null!=r?("function"==typeof r&&(i=r),"object"===(void 0===t?"undefined":(0,o.default)(t))&&(a=t)):("function"==typeof t&&(i=t),a={}),new n.Parser(a).parseString(e,i)}}).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(e,t,n){"use strict";(function(){var e;e=new RegExp(/(?!xmlns)^.*:/),n.normalize=function(e){return e.toLowerCase()},n.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},n.stripPrefix=function(t){return t.replace(e,"")},n.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},n.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(void 0)},{}],213:[function(e,t,n){"use strict";(function(){var t,r,i,a,o={}.hasOwnProperty;r=e("./defaults"),t=e("./builder"),i=e("./parser"),a=e("./processors"),n.defaults=r.defaults,n.processors=a,n.ValidationError=function(e){function t(e){this.message=e}return function(e,t){function n(){this.constructor=e}for(var r in t)o.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,Error),t}(),n.Builder=t.Builder,n.Parser=i.Parser,n.parseString=i.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/get-prototype-of")),a=r(e("babel-runtime/helpers/typeof")),o=r(e("babel-runtime/core-js/object/assign"));(function(){var e,n,r,s,l,c,u=[].slice,d={}.hasOwnProperty;e=function(){var e,t,n,r,i,a;if(a=arguments[0],i=2<=arguments.length?u.call(arguments,1):[],s(o.default))o.default.apply(null,arguments);else for(e=0,n=i.length;e<n;e++)if(null!=(r=i[e]))for(t in r)d.call(r,t)&&(a[t]=r[t]);return a},s=function(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)},l=function(e){var t;return!!e&&("function"===(t=void 0===e?"undefined":(0,a.default)(e))||"object"===t)},n=function(e){return s(Array.isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},r=function(e){var t;if(n(e))return!e.length;for(t in e)if(d.call(e,t))return!1;return!0},c=function(e){var t,n;return l(e)&&(n=(0,i.default)(e))&&(t=n.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},t.exports.assign=e,t.exports.isFunction=s,t.exports.isObject=l,t.exports.isArray=n,t.exports.isEmpty=r,t.exports.isPlainObject=c}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){t.exports=function(){function e(e,t,n){if(this.options=e.options,this.stringify=e.stringify,null==t)throw new Error("Missing attribute name of element "+e.name);if(null==n)throw new Error("Missing attribute value for attribute "+t+" of element "+e.name);this.name=this.stringify.attName(t),this.value=this.stringify.attValue(n)}return e.prototype.clone=function(){return(0,r.default)(this)},e.prototype.toString=function(e){return this.options.writer.set(e).attribute(this)},e}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).cdata(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing comment text");this.text=this.stringify.comment(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).comment(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(e,t,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r,i,a,o){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name");if(null==r)throw new Error("Missing DTD attribute name");if(!i)throw new Error("Missing DTD attribute type");if(!a)throw new Error("Missing DTD attribute default");if(0!==a.indexOf("#")&&(a="#"+a),!a.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(o&&!a.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(n),this.attributeName=this.stringify.attName(r),this.attributeType=this.stringify.dtdAttType(i),this.defaultValue=this.stringify.dtdAttDefault(o),this.defaultValueType=a}return function(e,t){function n(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdAttList(this)},t}(n)}).call(void 0)},{"./XMLNode":227}],219:[function(e,t,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name");r||(r="(#PCDATA)"),Array.isArray(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.eleName(n),this.value=this.stringify.dtdElementValue(r)}return function(e,t){function n(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdElement(this)},t}(n)}).call(void 0)},{"./XMLNode":227}],220:[function(e,t,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=e("./Utility").isObject,n=e("./XMLNode"),t.exports=function(e){function t(e,n,i,a){if(t.__super__.constructor.call(this,e),null==i)throw new Error("Missing entity name");if(null==a)throw new Error("Missing entity value");if(this.pe=!!n,this.name=this.stringify.eleName(i),r(a)){if(!a.pubID&&!a.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(a.pubID&&!a.sysID)throw new Error("System identifier is required for a public external entity");if(null!=a.pubID&&(this.pubID=this.stringify.dtdPubID(a.pubID)),null!=a.sysID&&(this.sysID=this.stringify.dtdSysID(a.sysID)),null!=a.nData&&(this.nData=this.stringify.dtdNData(a.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(a)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdEntity(this)},t}(n)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(e,t,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing notation name");if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(n),null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return function(e,t){function n(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdNotation(this)},t}(n)}).call(void 0)},{"./XMLNode":227}],222:[function(e,t,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=e("./Utility").isObject,n=e("./XMLNode"),t.exports=function(e){function t(e,n,i,a){var o;t.__super__.constructor.call(this,e),r(n)&&(n=(o=n).version,i=o.encoding,a=o.standalone),n||(n="1.0"),this.version=this.stringify.xmlVersion(n),null!=i&&(this.encoding=this.stringify.xmlEncoding(i)),null!=a&&(this.standalone=this.stringify.xmlStandalone(a))}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).declaration(this)},t}(n)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(e,t,n){"use strict";(function(){var n,r,i,a,o,s,l={}.hasOwnProperty;s=e("./Utility").isObject,o=e("./XMLNode"),n=e("./XMLDTDAttList"),i=e("./XMLDTDEntity"),r=e("./XMLDTDElement"),a=e("./XMLDTDNotation"),t.exports=function(e){function t(e,n,r){var i,a;t.__super__.constructor.call(this,e),this.documentObject=e,s(n)&&(n=(i=n).pubID,r=i.sysID),null==r&&(r=(a=[n,r])[0],n=a[1]),null!=n&&(this.pubID=this.stringify.dtdPubID(n)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return function(e,t){function n(){this.constructor=e}for(var r in t)l.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.element=function(e,t){var n;return n=new r(this,e,t),this.children.push(n),this},t.prototype.attList=function(e,t,r,i,a){var o;return o=new n(this,e,t,r,i,a),this.children.push(o),this},t.prototype.entity=function(e,t){var n;return n=new i(this,!1,e,t),this.children.push(n),this},t.prototype.pEntity=function(e,t){var n;return n=new i(this,!0,e,t),this.children.push(n),this},t.prototype.notation=function(e,t){var n;return n=new a(this,e,t),this.children.push(n),this},t.prototype.toString=function(e){return this.options.writer.set(e).docType(this)},t.prototype.ele=function(e,t){return this.element(e,t)},t.prototype.att=function(e,t,n,r,i){return this.attList(e,t,n,r,i)},t.prototype.ent=function(e,t){return this.entity(e,t)},t.prototype.pent=function(e,t){return this.pEntity(e,t)},t.prototype.not=function(e,t){return this.notation(e,t)},t.prototype.up=function(){return this.root()||this.documentObject},t}(o)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(e,t,n){"use strict";(function(){var n,r,i,a,o={}.hasOwnProperty;a=e("./Utility").isPlainObject,n=e("./XMLNode"),i=e("./XMLStringifier"),r=e("./XMLStringWriter"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,null),e||(e={}),e.writer||(e.writer=new r),this.options=e,this.stringify=new i(e),this.isDocument=!0}return function(e,t){function n(){this.constructor=e}for(var r in t)o.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.end=function(e){var t;return e?a(e)&&(t=e,e=this.options.writer.set(t)):e=this.options.writer,e.document(this)},t.prototype.toString=function(e){return this.options.writer.set(e).document(this)},t}(n)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(e,t,n){"use strict";(function(){var n,r,i,a,o,s,l,c,u,d,f,h,p,m,v,g,y,b,_,E={}.hasOwnProperty;_=e("./Utility"),y=_.isObject,g=_.isFunction,b=_.isPlainObject,d=e("./XMLElement"),r=e("./XMLCData"),i=e("./XMLComment"),h=e("./XMLRaw"),v=e("./XMLText"),f=e("./XMLProcessingInstruction"),c=e("./XMLDeclaration"),u=e("./XMLDocType"),a=e("./XMLDTDAttList"),s=e("./XMLDTDEntity"),o=e("./XMLDTDElement"),l=e("./XMLDTDNotation"),n=e("./XMLAttribute"),m=e("./XMLStringifier"),p=e("./XMLStringWriter"),t.exports=function(){function e(e,t,n){var r;e||(e={}),e.writer?b(e.writer)&&(r=e.writer,e.writer=new p(r)):e.writer=new p(e),this.options=e,this.writer=e.writer,this.stringify=new m(e),this.onDataCallback=t||function(){},this.onEndCallback=n||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.node=function(e,t,n){var r;if(null==e)throw new Error("Missing node name");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node");return this.openCurrent(),e=e.valueOf(),null==t&&(t={}),t=t.valueOf(),y(t)||(n=(r=[t,n])[0],t=r[1]),this.currentNode=new d(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},e.prototype.element=function(e,t,n){return this.currentNode&&this.currentNode instanceof u?this.dtdElement.apply(this,arguments):this.node(e,t,n)},e.prototype.attribute=function(e,t){var r,i;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(null!=e&&(e=e.valueOf()),y(e))for(r in e)E.call(e,r)&&(i=e[r],this.attribute(r,i));else g(t)&&(t=t.apply()),this.options.skipNullAttributes&&null==t||(this.currentNode.attributes[e]=new n(this,e,t));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new v(this,e),this.onData(this.writer.text(t,this.currentLevel+1)),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new r(this,e),this.onData(this.writer.cdata(t,this.currentLevel+1)),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new i(this,e),this.onData(this.writer.comment(t,this.currentLevel+1)),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new h(this,e),this.onData(this.writer.raw(t,this.currentLevel+1)),this},e.prototype.instruction=function(e,t){var n,r,i,a,o;if(this.openCurrent(),null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),Array.isArray(e))for(n=0,a=e.length;n<a;n++)r=e[n],this.instruction(r);else if(y(e))for(r in e)E.call(e,r)&&(i=e[r],this.instruction(r,i));else g(t)&&(t=t.apply()),o=new f(this,e,t),this.onData(this.writer.processingInstruction(o,this.currentLevel+1));return this},e.prototype.declaration=function(e,t,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return r=new c(this,e,t,n),this.onData(this.writer.declaration(r,this.currentLevel+1)),this},e.prototype.doctype=function(e,t,n){if(this.openCurrent(),null==e)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new u(this,t,n),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(e,t){var n;return this.openCurrent(),n=new o(this,e,t),this.onData(this.writer.dtdElement(n,this.currentLevel+1)),this},e.prototype.attList=function(e,t,n,r,i){var o;return this.openCurrent(),o=new a(this,e,t,n,r,i),this.onData(this.writer.dtdAttList(o,this.currentLevel+1)),this},e.prototype.entity=function(e,t){var n;return this.openCurrent(),n=new s(this,!1,e,t),this.onData(this.writer.dtdEntity(n,this.currentLevel+1)),this},e.prototype.pEntity=function(e,t){var n;return this.openCurrent(),n=new s(this,!0,e,t),this.onData(this.writer.dtdEntity(n,this.currentLevel+1)),this},e.prototype.notation=function(e,t){var n;return this.openCurrent(),n=new l(this,e,t),this.onData(this.writer.dtdNotation(n,this.currentLevel+1)),this},e.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},e.prototype.end=function(){for(;this.currentLevel>=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(e){if(!e.isOpen)return!this.root&&0===this.currentLevel&&e instanceof d&&(this.root=e),this.onData(this.writer.openNode(e,this.currentLevel)),e.isOpen=!0},e.prototype.closeNode=function(e){if(!e.isClosed)return this.onData(this.writer.closeNode(e,this.currentLevel)),e.isClosed=!0},e.prototype.onData=function(e){return this.documentStarted=!0,this.onDataCallback(e)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.dtd=function(e,t,n){return this.doctype(e,t,n)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode instanceof u?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode instanceof u?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},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(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i,a,o,s,l={}.hasOwnProperty;s=e("./Utility"),o=s.isObject,a=s.isFunction,i=e("./XMLNode"),n=e("./XMLAttribute"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing element name");this.name=this.stringify.eleName(n),this.attributes={},null!=r&&this.attribute(r),e.isDocument&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this)}return function(e,t){function n(){this.constructor=e}for(var r in t)l.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){var e,t,n,i;for(t in(n=(0,r.default)(this)).isRoot&&(n.documentObject=null),n.attributes={},i=this.attributes)l.call(i,t)&&(e=i[t],n.attributes[t]=e.clone());return n.children=[],this.children.forEach((function(e){var t;return(t=e.clone()).parent=n,n.children.push(t)})),n},t.prototype.attribute=function(e,t){var r,i;if(null!=e&&(e=e.valueOf()),o(e))for(r in e)l.call(e,r)&&(i=e[r],this.attribute(r,i));else a(t)&&(t=t.apply()),this.options.skipNullAttributes&&null==t||(this.attributes[e]=new n(this,e,t));return this},t.prototype.removeAttribute=function(e){var t,n,r;if(null==e)throw new Error("Missing attribute name");if(e=e.valueOf(),Array.isArray(e))for(n=0,r=e.length;n<r;n++)t=e[n],delete this.attributes[t];else delete this.attributes[e];return this},t.prototype.toString=function(e){return this.options.writer.set(e).element(this)},t.prototype.att=function(e,t){return this.attribute(e,t)},t.prototype.a=function(e,t){return this.attribute(e,t)},t}(i)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(e,t,n){"use strict";(function(){var n,r,i,a,o,s,l,c,u,d,f,h,p={}.hasOwnProperty;h=e("./Utility"),f=h.isObject,d=h.isFunction,u=h.isEmpty,o=null,n=null,r=null,i=null,a=null,l=null,c=null,s=null,t.exports=function(){function t(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],o||(o=e("./XMLElement"),n=e("./XMLCData"),r=e("./XMLComment"),i=e("./XMLDeclaration"),a=e("./XMLDocType"),l=e("./XMLRaw"),c=e("./XMLText"),s=e("./XMLProcessingInstruction"))}return t.prototype.element=function(e,t,n){var r,i,a,o,s,l,c,h,m,v;if(l=null,null==t&&(t={}),t=t.valueOf(),f(t)||(n=(m=[t,n])[0],t=m[1]),null!=e&&(e=e.valueOf()),Array.isArray(e))for(a=0,c=e.length;a<c;a++)i=e[a],l=this.element(i);else if(d(e))l=this.element(e.apply());else if(f(e)){for(s in e)if(p.call(e,s))if(v=e[s],d(v)&&(v=v.apply()),f(v)&&u(v)&&(v=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===s.indexOf(this.stringify.convertAttKey))l=this.attribute(s.substr(this.stringify.convertAttKey.length),v);else if(!this.options.separateArrayItems&&Array.isArray(v))for(o=0,h=v.length;o<h;o++)i=v[o],(r={})[s]=i,l=this.element(r);else f(v)?(l=this.element(s)).element(v):l=this.element(s,v)}else l=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),n):this.node(e,t,n);if(null==l)throw new Error("Could not create any elements with: "+e);return l},t.prototype.insertBefore=function(e,t,n){var r,i,a;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,a),r},t.prototype.insertAfter=function(e,t,n){var r,i,a;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i+1),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,a),r},t.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element");return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},t.prototype.node=function(e,t,n){var r,i;return null!=e&&(e=e.valueOf()),t||(t={}),t=t.valueOf(),f(t)||(n=(i=[t,n])[0],t=i[1]),r=new o(this,e,t),null!=n&&r.text(n),this.children.push(r),r},t.prototype.text=function(e){var t;return t=new c(this,e),this.children.push(t),this},t.prototype.cdata=function(e){var t;return t=new n(this,e),this.children.push(t),this},t.prototype.comment=function(e){var t;return t=new r(this,e),this.children.push(t),this},t.prototype.commentBefore=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.commentAfter=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.raw=function(e){var t;return t=new l(this,e),this.children.push(t),this},t.prototype.instruction=function(e,t){var n,r,i,a,o;if(null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),Array.isArray(e))for(a=0,o=e.length;a<o;a++)n=e[a],this.instruction(n);else if(f(e))for(n in e)p.call(e,n)&&(r=e[n],this.instruction(n,r));else d(t)&&(t=t.apply()),i=new s(this,e,t),this.children.push(i);return this},t.prototype.instructionBefore=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.instructionAfter=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.declaration=function(e,t,n){var r,a;return r=this.document(),a=new i(r,e,t,n),r.children[0]instanceof i?r.children[0]=a:r.children.unshift(a),r.root()||r},t.prototype.doctype=function(e,t){var n,r,i,o,s,l,c,u,d;for(n=this.document(),r=new a(n,e,t),i=o=0,l=(u=n.children).length;o<l;i=++o)if(u[i]instanceof a)return n.children[i]=r,r;for(i=s=0,c=(d=n.children).length;s<c;i=++s)if(d[i].isRoot)return n.children.splice(i,0,r),r;return n.children.push(r),r},t.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},t.prototype.root=function(){var e;for(e=this;e;){if(e.isDocument)return e.rootObject;if(e.isRoot)return e;e=e.parent}},t.prototype.document=function(){var e;for(e=this;e;){if(e.isDocument)return e;e=e.parent}},t.prototype.end=function(e){return this.document().end(e)},t.prototype.prev=function(){var e;if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[e-1]},t.prototype.next=function(){var e;if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[e+1]},t.prototype.importDocument=function(e){var t;return(t=e.root().clone()).parent=this,t.isRoot=!1,this.children.push(t),this},t.prototype.ele=function(e,t,n){return this.element(e,t,n)},t.prototype.nod=function(e,t,n){return this.node(e,t,n)},t.prototype.txt=function(e){return this.text(e)},t.prototype.dat=function(e){return this.cdata(e)},t.prototype.com=function(e){return this.comment(e)},t.prototype.ins=function(e,t){return this.instruction(e,t)},t.prototype.doc=function(){return this.document()},t.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},t.prototype.dtd=function(e,t){return this.doctype(e,t)},t.prototype.e=function(e,t,n){return this.element(e,t,n)},t.prototype.n=function(e,t,n){return this.node(e,t,n)},t.prototype.t=function(e){return this.text(e)},t.prototype.d=function(e){return this.cdata(e)},t.prototype.c=function(e){return this.comment(e)},t.prototype.r=function(e){return this.raw(e)},t.prototype.i=function(e,t){return this.instruction(e,t)},t.prototype.u=function(){return this.up()},t.prototype.importXMLBuilder=function(e){return this.importDocument(e)},t}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(n),r&&(this.value=this.stringify.insValue(r))}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).processingInstruction(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing raw text");this.value=this.stringify.raw(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).raw(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(e,t,n){"use strict";(function(){var n,r,i,a,o,s,l,c,u,d,f,h,p,m={}.hasOwnProperty;l=e("./XMLDeclaration"),c=e("./XMLDocType"),n=e("./XMLCData"),r=e("./XMLComment"),u=e("./XMLElement"),f=e("./XMLRaw"),h=e("./XMLText"),d=e("./XMLProcessingInstruction"),i=e("./XMLDTDAttList"),a=e("./XMLDTDElement"),o=e("./XMLDTDEntity"),s=e("./XMLDTDNotation"),p=e("./XMLWriterBase"),t.exports=function(e){function t(e,n){t.__super__.constructor.call(this,n),this.stream=e}return function(e,t){function n(){this.constructor=e}for(var r in t)m.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.document=function(e){var t,n,i,a,o,s,u,f;for(n=0,a=(s=e.children).length;n<a;n++)(t=s[n]).isLastRootNode=!1;for(e.children[e.children.length-1].isLastRootNode=!0,f=[],i=0,o=(u=e.children).length;i<o;i++)switch(t=u[i],!1){case!(t instanceof l):f.push(this.declaration(t));break;case!(t instanceof c):f.push(this.docType(t));break;case!(t instanceof r):f.push(this.comment(t));break;case!(t instanceof d):f.push(this.processingInstruction(t));break;default:f.push(this.element(t))}return f},t.prototype.attribute=function(e){return this.stream.write(" "+e.name+'="'+e.value+'"')},t.prototype.cdata=function(e,t){return this.stream.write(this.space(t)+"<![CDATA["+e.text+"]]>"+this.endline(e))},t.prototype.comment=function(e,t){return this.stream.write(this.space(t)+"\x3c!-- "+e.text+" --\x3e"+this.endline(e))},t.prototype.declaration=function(e,t){return this.stream.write(this.space(t)),this.stream.write('<?xml version="'+e.version+'"'),null!=e.encoding&&this.stream.write(' encoding="'+e.encoding+'"'),null!=e.standalone&&this.stream.write(' standalone="'+e.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(e))},t.prototype.docType=function(e,t){var l,c,u,f;if(t||(t=0),this.stream.write(this.space(t)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e)),c=0,u=(f=e.children).length;c<u;c++)switch(l=f[c],!1){case!(l instanceof i):this.dtdAttList(l,t+1);break;case!(l instanceof a):this.dtdElement(l,t+1);break;case!(l instanceof o):this.dtdEntity(l,t+1);break;case!(l instanceof s):this.dtdNotation(l,t+1);break;case!(l instanceof n):this.cdata(l,t+1);break;case!(l instanceof r):this.comment(l,t+1);break;case!(l instanceof d):this.processingInstruction(l,t+1);break;default:throw new Error("Unknown DTD node type: "+l.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(e))},t.prototype.element=function(e,t){var i,a,o,s,l,c,p,v;for(l in t||(t=0),v=this.space(t),this.stream.write(v+"<"+e.name),c=e.attributes)m.call(c,l)&&(i=c[l],this.attribute(i));if(0===e.children.length||e.children.every((function(e){return""===e.value})))this.allowEmpty?this.stream.write("></"+e.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)this.stream.write(">"),this.stream.write(e.children[0].value),this.stream.write("</"+e.name+">");else{for(this.stream.write(">"+this.newline),o=0,s=(p=e.children).length;o<s;o++)switch(a=p[o],!1){case!(a instanceof n):this.cdata(a,t+1);break;case!(a instanceof r):this.comment(a,t+1);break;case!(a instanceof u):this.element(a,t+1);break;case!(a instanceof f):this.raw(a,t+1);break;case!(a instanceof h):this.text(a,t+1);break;case!(a instanceof d):this.processingInstruction(a,t+1);break;default:throw new Error("Unknown XML node type: "+a.constructor.name)}this.stream.write(v+"</"+e.name+">")}return this.stream.write(this.endline(e))},t.prototype.processingInstruction=function(e,t){return this.stream.write(this.space(t)+"<?"+e.target),e.value&&this.stream.write(" "+e.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(e))},t.prototype.raw=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},t.prototype.text=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},t.prototype.dtdAttList=function(e,t){return this.stream.write(this.space(t)+"<!ATTLIST "+e.elementName+" "+e.attributeName+" "+e.attributeType),"#DEFAULT"!==e.defaultValueType&&this.stream.write(" "+e.defaultValueType),e.defaultValue&&this.stream.write(' "'+e.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.dtdElement=function(e,t){return this.stream.write(this.space(t)+"<!ELEMENT "+e.name+" "+e.value),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.dtdEntity=function(e,t){return this.stream.write(this.space(t)+"<!ENTITY"),e.pe&&this.stream.write(" %"),this.stream.write(" "+e.name),e.value?this.stream.write(' "'+e.value+'"'):(e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.nData&&this.stream.write(" NDATA "+e.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.dtdNotation=function(e,t){return this.stream.write(this.space(t)+"<!NOTATION "+e.name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.pubID?this.stream.write(' PUBLIC "'+e.pubID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.endline=function(e){return e.isLastRootNode?"":this.newline},t}(p)}).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(e,t,n){"use strict";(function(){var n,r,i,a,o,s,l,c,u,d,f,h,p,m={}.hasOwnProperty;l=e("./XMLDeclaration"),c=e("./XMLDocType"),n=e("./XMLCData"),r=e("./XMLComment"),u=e("./XMLElement"),f=e("./XMLRaw"),h=e("./XMLText"),d=e("./XMLProcessingInstruction"),i=e("./XMLDTDAttList"),a=e("./XMLDTDElement"),o=e("./XMLDTDEntity"),s=e("./XMLDTDNotation"),p=e("./XMLWriterBase"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return function(e,t){function n(){this.constructor=e}for(var r in t)m.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.document=function(e){var t,n,i,a,o;for(this.textispresent=!1,a="",n=0,i=(o=e.children).length;n<i;n++)t=o[n],a+=function(){switch(!1){case!(t instanceof l):return this.declaration(t);case!(t instanceof c):return this.docType(t);case!(t instanceof r):return this.comment(t);case!(t instanceof d):return this.processingInstruction(t);default:return this.element(t,0)}}.call(this);return this.pretty&&a.slice(-this.newline.length)===this.newline&&(a=a.slice(0,-this.newline.length)),a},t.prototype.attribute=function(e){return" "+e.name+'="'+e.value+'"'},t.prototype.cdata=function(e,t){return this.space(t)+"<![CDATA["+e.text+"]]>"+this.newline},t.prototype.comment=function(e,t){return this.space(t)+"\x3c!-- "+e.text+" --\x3e"+this.newline},t.prototype.declaration=function(e,t){var n;return n=this.space(t),n+='<?xml version="'+e.version+'"',null!=e.encoding&&(n+=' encoding="'+e.encoding+'"'),null!=e.standalone&&(n+=' standalone="'+e.standalone+'"'),(n+=this.spacebeforeslash+"?>")+this.newline},t.prototype.docType=function(e,t){var l,c,u,f,h;if(t||(t=0),f=this.space(t),f+="<!DOCTYPE "+e.root().name,e.pubID&&e.sysID?f+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(f+=' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(f+=" [",f+=this.newline,c=0,u=(h=e.children).length;c<u;c++)l=h[c],f+=function(){switch(!1){case!(l instanceof i):return this.dtdAttList(l,t+1);case!(l instanceof a):return this.dtdElement(l,t+1);case!(l instanceof o):return this.dtdEntity(l,t+1);case!(l instanceof s):return this.dtdNotation(l,t+1);case!(l instanceof n):return this.cdata(l,t+1);case!(l instanceof r):return this.comment(l,t+1);case!(l instanceof d):return this.processingInstruction(l,t+1);default:throw new Error("Unknown DTD node type: "+l.constructor.name)}}.call(this);f+="]"}return(f+=this.spacebeforeslash+">")+this.newline},t.prototype.element=function(e,t){var i,a,o,s,l,c,p,v,g,y,b,_,E;for(p in t||(t=0),E=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),v="",v+=(_=this.space(t))+"<"+e.name,g=e.attributes)m.call(g,p)&&(i=g[p],v+=this.attribute(i));if(0===e.children.length||e.children.every((function(e){return""===e.value})))this.allowEmpty?v+="></"+e.name+">"+this.newline:v+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)v+=">",v+=e.children[0].value,v+="</"+e.name+">"+this.newline;else{if(this.dontprettytextnodes)for(o=0,l=(y=e.children).length;o<l;o++)if(null!=(a=y[o]).value){this.textispresent++,E=!0;break}for(this.textispresent&&(this.newline="",this.pretty=!1,_=this.space(t)),v+=">"+this.newline,s=0,c=(b=e.children).length;s<c;s++)a=b[s],v+=function(){switch(!1){case!(a instanceof n):return this.cdata(a,t+1);case!(a instanceof r):return this.comment(a,t+1);case!(a instanceof u):return this.element(a,t+1);case!(a instanceof f):return this.raw(a,t+1);case!(a instanceof h):return this.text(a,t+1);case!(a instanceof d):return this.processingInstruction(a,t+1);default:throw new Error("Unknown XML node type: "+a.constructor.name)}}.call(this);E&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),v+=_+"</"+e.name+">"+this.newline}return v},t.prototype.processingInstruction=function(e,t){var n;return n=this.space(t)+"<?"+e.target,e.value&&(n+=" "+e.value),n+(this.spacebeforeslash+"?>")+this.newline},t.prototype.raw=function(e,t){return this.space(t)+e.value+this.newline},t.prototype.text=function(e,t){return this.space(t)+e.value+this.newline},t.prototype.dtdAttList=function(e,t){var n;return n=this.space(t)+"<!ATTLIST "+e.elementName+" "+e.attributeName+" "+e.attributeType,"#DEFAULT"!==e.defaultValueType&&(n+=" "+e.defaultValueType),e.defaultValue&&(n+=' "'+e.defaultValue+'"'),n+(this.spacebeforeslash+">")+this.newline},t.prototype.dtdElement=function(e,t){return this.space(t)+"<!ELEMENT "+e.name+" "+e.value+this.spacebeforeslash+">"+this.newline},t.prototype.dtdEntity=function(e,t){var n;return n=this.space(t)+"<!ENTITY",e.pe&&(n+=" %"),n+=" "+e.name,e.value?n+=' "'+e.value+'"':(e.pubID&&e.sysID?n+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(n+=' SYSTEM "'+e.sysID+'"'),e.nData&&(n+=" NDATA "+e.nData)),n+(this.spacebeforeslash+">")+this.newline},t.prototype.dtdNotation=function(e,t){var n;return n=this.space(t)+"<!NOTATION "+e.name,e.pubID&&e.sysID?n+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.pubID?n+=' PUBLIC "'+e.pubID+'"':e.sysID&&(n+=' SYSTEM "'+e.sysID+'"'),n+(this.spacebeforeslash+">")+this.newline},t.prototype.openNode=function(e,t){var n,r,i,a;if(t||(t=0),e instanceof u){for(r in i=this.space(t)+"<"+e.name,a=e.attributes)m.call(a,r)&&(n=a[r],i+=this.attribute(n));return i+(e.children?">":"/>")+this.newline}return i=this.space(t)+"<!DOCTYPE "+e.rootNodeName,e.pubID&&e.sysID?i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(i+=' SYSTEM "'+e.sysID+'"'),i+(e.children?" [":">")+this.newline},t.prototype.closeNode=function(e,t){switch(t||(t=0),!1){case!(e instanceof u):return this.space(t)+"</"+e.name+">"+this.newline;case!(e instanceof c):return this.space(t)+"]>"+this.newline}},t}(p)}).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(e,t,n){"use strict";(function(){var e={}.hasOwnProperty;t.exports=function(){function t(t){var n,r,i;for(n in this.assertLegalChar=function(e,t){return function(){return e.apply(t,arguments)}}(this.assertLegalChar,this),t||(t={}),this.noDoubleEncoding=t.noDoubleEncoding,r=t.stringify||{})e.call(r,n)&&(i=r[n],this[n]=i)}return t.prototype.eleName=function(e){return e=""+e||"",this.assertLegalChar(e)},t.prototype.eleText=function(e){return e=""+e||"",this.assertLegalChar(this.elEscape(e))},t.prototype.cdata=function(e){return e=(e=""+e||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(e)},t.prototype.comment=function(e){if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},t.prototype.raw=function(e){return""+e||""},t.prototype.attName=function(e){return""+e||""},t.prototype.attValue=function(e){return e=""+e||"",this.attEscape(e)},t.prototype.insTarget=function(e){return""+e||""},t.prototype.insValue=function(e){if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return e},t.prototype.xmlVersion=function(e){if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},t.prototype.xmlEncoding=function(e){if(!(e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+e);return e},t.prototype.xmlStandalone=function(e){return e?"yes":"no"},t.prototype.dtdPubID=function(e){return""+e||""},t.prototype.dtdSysID=function(e){return""+e||""},t.prototype.dtdElementValue=function(e){return""+e||""},t.prototype.dtdAttType=function(e){return""+e||""},t.prototype.dtdAttDefault=function(e){return null!=e?""+e||"":e},t.prototype.dtdEntityValue=function(e){return""+e||""},t.prototype.dtdNData=function(e){return""+e||""},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.assertLegalChar=function(e){var t;if(t=e.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+e+" at index "+t.index);return e},t.prototype.elEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},t.prototype.attEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},t}()}).call(void 0)},{}],233:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing element text");this.value=this.stringify.eleText(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).text(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(e,t,n){"use strict";(function(){var e={}.hasOwnProperty;t.exports=function(){function t(t){var n,r,i,a,o,s,l,c,u;for(n in t||(t={}),this.pretty=t.pretty||!1,this.allowEmpty=null!=(r=t.allowEmpty)&&r,this.pretty?(this.indent=null!=(i=t.indent)?i:" ",this.newline=null!=(a=t.newline)?a:"\n",this.offset=null!=(o=t.offset)?o:0,this.dontprettytextnodes=null!=(s=t.dontprettytextnodes)?s:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=null!=(l=t.spacebeforeslash)?l:"",!0===this.spacebeforeslash&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,c=t.writer||{})e.call(c,n)&&(u=c[n],this[n]=u)}return t.prototype.set=function(t){var n,r,i;for(n in t||(t={}),"pretty"in t&&(this.pretty=t.pretty),"allowEmpty"in t&&(this.allowEmpty=t.allowEmpty),this.pretty?(this.indent="indent"in t?t.indent:" ",this.newline="newline"in t?t.newline:"\n",this.offset="offset"in t?t.offset:0,this.dontprettytextnodes="dontprettytextnodes"in t?t.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in t?t.spacebeforeslash:"",!0===this.spacebeforeslash&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,r=t.writer||{})e.call(r,n)&&(i=r[n],this[n]=i);return this},t.prototype.space=function(e){var t;return this.pretty?(t=(e||0)+this.offset+1)>0?new Array(t).join(this.indent):"":""},t}()}).call(void 0)},{}],235:[function(e,t,n){"use strict";(function(){var n,r,i,a,o,s,l;l=e("./Utility"),o=l.assign,s=l.isFunction,n=e("./XMLDocument"),r=e("./XMLDocumentCB"),a=e("./XMLStringWriter"),i=e("./XMLStreamWriter"),t.exports.create=function(e,t,r,i){var a,s;if(null==e)throw new Error("Root element needs a name");return i=o({},t,r,i),s=(a=new n(i)).element(e),i.headless||(a.declaration(i),null==i.pubID&&null==i.sysID||a.doctype(i)),s},t.exports.begin=function(e,t,i){var a;return s(e)&&(t=(a=[e,t])[0],i=a[1],e={}),t?new r(e,t,i):new n(e)},t.exports.stringWriter=function(e){return new a(e)},t.exports.streamWriter=function(e,t){return new i(e,t)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],237:[function(e,t,n){"use strict";function r(e,t){var n=o[e=e||"sha1"],r=[];return n||i("algorithm:",e,"is not yet supported"),{update:function(e){return a.isBuffer(e)||(e=new a(e)),r.push(e),e.length,this},digest:function(e){var i=a.concat(r),o=t?function(e,t,n){a.isBuffer(t)||(t=new a(t)),a.isBuffer(n)||(n=new a(n)),t.length>s?t=e(t):t.length<s&&(t=a.concat([t,l],s));for(var r=new a(s),i=new a(s),o=0;o<s;o++)r[o]=54^t[o],i[o]=92^t[o];var c=e(a.concat([r,n]));return e(a.concat([i,c]))}(n,t,i):n(i);return r=null,e?o.toString(e):o}}}function i(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}var a=e("buffer").Buffer,o={sha1:e("./sha"),sha256:e("./sha256"),md5:e("./md5")},s=64,l=new a(s);l.fill(0),n.createHash=function(e){return r(e)},n.createHmac=function(e,t){return r(e,t)},function(e,t){for(var n in e)t(e[n])}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],(function(e){n[e]=function(){i("sorry,",e,"is not implemented yet")}}))},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(e,t,n){"use strict";var r=e("buffer").Buffer,i=4,a=new r(i);a.fill(0);var o=8;t.exports={hash:function(e,t,n,s){return r.isBuffer(e)||(e=new r(e)),function(e,t,n){for(var i=new r(t),a=n?i.writeInt32BE:i.writeInt32LE,o=0;o<e.length;o++)a.call(i,e[o],4*o,!0);return i}(t(function(e,t){if(e.length%i!=0){var n=e.length+(i-e.length%i);e=r.concat([e,a],n)}for(var o=[],s=t?e.readInt32BE:e.readInt32LE,l=0;l<e.length;l+=i)o.push(s.call(e,l));return o}(e,s),e.length*o),n,s)}}},{buffer:38}],239:[function(e,t,n){"use strict";function r(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,u=271733878,d=0;d<e.length;d+=16){var f=n,h=r,p=i,m=u;n=a(n,r,i,u,e[d+0],7,-680876936),u=a(u,n,r,i,e[d+1],12,-389564586),i=a(i,u,n,r,e[d+2],17,606105819),r=a(r,i,u,n,e[d+3],22,-1044525330),n=a(n,r,i,u,e[d+4],7,-176418897),u=a(u,n,r,i,e[d+5],12,1200080426),i=a(i,u,n,r,e[d+6],17,-1473231341),r=a(r,i,u,n,e[d+7],22,-45705983),n=a(n,r,i,u,e[d+8],7,1770035416),u=a(u,n,r,i,e[d+9],12,-1958414417),i=a(i,u,n,r,e[d+10],17,-42063),r=a(r,i,u,n,e[d+11],22,-1990404162),n=a(n,r,i,u,e[d+12],7,1804603682),u=a(u,n,r,i,e[d+13],12,-40341101),i=a(i,u,n,r,e[d+14],17,-1502002290),n=o(n,r=a(r,i,u,n,e[d+15],22,1236535329),i,u,e[d+1],5,-165796510),u=o(u,n,r,i,e[d+6],9,-1069501632),i=o(i,u,n,r,e[d+11],14,643717713),r=o(r,i,u,n,e[d+0],20,-373897302),n=o(n,r,i,u,e[d+5],5,-701558691),u=o(u,n,r,i,e[d+10],9,38016083),i=o(i,u,n,r,e[d+15],14,-660478335),r=o(r,i,u,n,e[d+4],20,-405537848),n=o(n,r,i,u,e[d+9],5,568446438),u=o(u,n,r,i,e[d+14],9,-1019803690),i=o(i,u,n,r,e[d+3],14,-187363961),r=o(r,i,u,n,e[d+8],20,1163531501),n=o(n,r,i,u,e[d+13],5,-1444681467),u=o(u,n,r,i,e[d+2],9,-51403784),i=o(i,u,n,r,e[d+7],14,1735328473),n=s(n,r=o(r,i,u,n,e[d+12],20,-1926607734),i,u,e[d+5],4,-378558),u=s(u,n,r,i,e[d+8],11,-2022574463),i=s(i,u,n,r,e[d+11],16,1839030562),r=s(r,i,u,n,e[d+14],23,-35309556),n=s(n,r,i,u,e[d+1],4,-1530992060),u=s(u,n,r,i,e[d+4],11,1272893353),i=s(i,u,n,r,e[d+7],16,-155497632),r=s(r,i,u,n,e[d+10],23,-1094730640),n=s(n,r,i,u,e[d+13],4,681279174),u=s(u,n,r,i,e[d+0],11,-358537222),i=s(i,u,n,r,e[d+3],16,-722521979),r=s(r,i,u,n,e[d+6],23,76029189),n=s(n,r,i,u,e[d+9],4,-640364487),u=s(u,n,r,i,e[d+12],11,-421815835),i=s(i,u,n,r,e[d+15],16,530742520),n=l(n,r=s(r,i,u,n,e[d+2],23,-995338651),i,u,e[d+0],6,-198630844),u=l(u,n,r,i,e[d+7],10,1126891415),i=l(i,u,n,r,e[d+14],15,-1416354905),r=l(r,i,u,n,e[d+5],21,-57434055),n=l(n,r,i,u,e[d+12],6,1700485571),u=l(u,n,r,i,e[d+3],10,-1894986606),i=l(i,u,n,r,e[d+10],15,-1051523),r=l(r,i,u,n,e[d+1],21,-2054922799),n=l(n,r,i,u,e[d+8],6,1873313359),u=l(u,n,r,i,e[d+15],10,-30611744),i=l(i,u,n,r,e[d+6],15,-1560198380),r=l(r,i,u,n,e[d+13],21,1309151649),n=l(n,r,i,u,e[d+4],6,-145523070),u=l(u,n,r,i,e[d+11],10,-1120210379),i=l(i,u,n,r,e[d+2],15,718787259),r=l(r,i,u,n,e[d+9],21,-343485551),n=c(n,f),r=c(r,h),i=c(i,p),u=c(u,m)}return Array(n,r,i,u)}function i(e,t,n,r,i,a){return c(function(e,t){return e<<t|e>>>32-t}(c(c(t,e),c(r,a)),i),n)}function a(e,t,n,r,a,o,s){return i(t&n|~t&r,e,t,a,o,s)}function o(e,t,n,r,a,o,s){return i(t&r|n&~r,e,t,a,o,s)}function s(e,t,n,r,a,o,s){return i(t^n^r,e,t,a,o,s)}function l(e,t,n,r,a,o,s){return i(n^(t|~r),e,t,a,o,s)}function c(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}var u=e("./helpers");t.exports=function(e){return u.hash(e,r,16)}},{"./helpers":238}],240:[function(e,t,n){"use strict";function r(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n=Array(80),r=1732584193,l=-271733879,c=-1732584194,u=271733878,d=-1009589776,f=0;f<e.length;f+=16){for(var h=r,p=l,m=c,v=u,g=d,y=0;y<80;y++){n[y]=y<16?e[f+y]:s(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=o(o(s(r,5),i(y,l,c,u)),o(o(d,n[y]),a(y)));d=u,u=c,c=s(l,30),l=r,r=b}r=o(r,h),l=o(l,p),c=o(c,m),u=o(u,v),d=o(d,g)}return Array(r,l,c,u,d)}function i(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function a(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function o(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function s(e,t){return e<<t|e>>>32-t}var l=e("./helpers");t.exports=function(e){return l.hash(e,r,20,!0)}},{"./helpers":238}],241:[function(e,t,n){"use strict";var r=e("./helpers"),i=function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},a=function(e,t){return e>>>t|e<<32-t},o=function(e,t){return e>>>t},s=function(e,t,n){return e&t^~e&n},l=function(e,t,n){return e&t^e&n^t&n},c=function(e){return a(e,2)^a(e,13)^a(e,22)},u=function(e){return a(e,6)^a(e,11)^a(e,25)},d=function(e){return a(e,7)^a(e,18)^o(e,3)},f=function(e){return a(e,17)^a(e,19)^o(e,10)},h=function(e,t){var n,r,a,o,h,p,m,v,g,y,b=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),_=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var x=0;x<e.length;x+=16){n=_[0],r=_[1],a=_[2],o=_[3],h=_[4],p=_[5],m=_[6],v=_[7];for(var S=0;S<64;S++)E[S]=S<16?e[S+x]:i(i(i(f(E[S-2]),E[S-7]),d(E[S-15])),E[S-16]),g=i(i(i(i(v,u(h)),s(h,p,m)),b[S]),E[S]),y=i(c(n),l(n,r,a)),v=m,m=p,p=h,h=i(o,g),o=a,a=r,r=n,n=i(g,y);_[0]=i(n,_[0]),_[1]=i(r,_[1]),_[2]=i(a,_[2]),_[3]=i(o,_[3]),_[4]=i(h,_[4]),_[5]=i(p,_[5]),_[6]=i(m,_[6]),_[7]=i(v,_[7])}return _};t.exports=function(e){return r.hash(e,h,32,!0)}},{"./helpers":238}],242:[function(e,n,r){(function(t){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var a=i(e("babel-runtime/core-js/object/create")),o=i(e("babel-runtime/helpers/classCallCheck")),s=i(e("babel-runtime/helpers/createClass")),l=i(e("babel-runtime/helpers/typeof"));!function(e){"object"===(void 0===r?"undefined":(0,l.default)(r))&&void 0!==n?n.exports=e():("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).mime=e()}((function(){return function t(n,r,i){function a(s,l){if(!r[s]){if(!n[s]){var c="function"==typeof e&&e;if(!l&&c)return c(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var d=r[s]={exports:{}};n[s][0].call(d.exports,(function(e){return a(n[s][1][e]||e)}),d,d.exports,t,n,r,i)}return r[s].exports}for(var o="function"==typeof e&&e,s=0;s<i.length;s++)a(i[s]);return a}({1:[function(e,t,n){var r=function(){function e(){(0,o.default)(this,e),this._types=(0,a.default)(null),this._extensions=(0,a.default)(null);for(var t=0;t<arguments.length;t++)this.define(arguments[t])}return(0,s.default)(e,[{key:"define",value:function(e,t){for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var a=r[i];if(!t&&a in this._types)throw new Error('Attempt to change mapping for "'+a+'" extension from "'+this._types[a]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+a+'" from the list of extensions for "'+n+'".');this._types[a]=n}!t&&this._extensions[n]||(this._extensions[n]=r[0])}}},{key:"getType",value:function(e){var t=(e=String(e)).replace(/^.*[\/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),r=t.length<e.length;return(n.length<t.length-1||!r)&&this._types[n]||null}},{key:"getExtension",value:function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null}}]),e}();t.exports=r},{}],2:[function(e,t,n){var r=e("./Mime");t.exports=new r(e("./types/standard"),e("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(e,t,n){t.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(e,t,n){t.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)}))}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(e,t,n){"use strict";n.encodeURIComponent=function(e){try{return encodeURIComponent(e)}catch(t){return e}},n.escape=e("escape-html"),n.timestamp=function(e){if(e){var t=e;return"string"==typeof t&&(t=Number(t)),10===String(e).length&&(t*=1e3),new Date(t)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(e,t,n){(function(t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return void 0===e?t:e}function o(e,t){return function(n,r,i){if(n)return t(n);e({data:r,status:i.statusCode,headers:i.headers,res:i})}}var s,l=i(e("babel-runtime/core-js/json/stringify")),c=i(e("babel-runtime/helpers/typeof")),u=e("util"),d=e("url"),f=e("http"),h=e("https"),p=e("debug")("urllib"),m=e("humanize-ms"),v=0,g=Math.pow(2,31)-10,y=/^https?:\/\//i;n.TIMEOUTS=[m("300s"),m("300s")];var b=["json","text"];n.request=function(t,r,i){return 2===arguments.length&&"function"==typeof r&&(i=r,r=null),"function"==typeof i?n.requestWithCallback(t,r,i):(s||(s=e("any-promise")),new s((function(e,i){n.requestWithCallback(t,r,o(e,i))})))},n.requestWithCallback=function(i,o,s){function _(){X&&(clearTimeout(X),X=null)}function E(){Y&&(clearTimeout(Y),Y=null)}function x(e,r,a){if(E(),!s)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),A,t.pid,F.method,i),void(e&&console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s: %s\nstack: %s",Date(),A,t.pid,e.name,e.message,e.stack));var c=s;s=null;var u={};if(a&&(ee=a.statusCode,u=a.headers),401===ee&&u["www-authenticate"]&&(!o.headers||!o.headers.Authorization)&&o.digestAuth){var d=u["www-authenticate"];if(d.indexOf("Digest ")>=0)return p("Request#%d %s: got digest auth header WWW-Authenticate: %s",A,i,d),o.headers=o.headers||{},o.headers.Authorization=digestAuthHeader(F.method,F.path,d,o.digestAuth),p("Request#%d %s: auth with digest header: %s",A,i,o.headers.Authorization),a.headers["set-cookie"]&&(o.headers.Cookie=a.headers["set-cookie"].join(";")),n.requestWithCallback(i,o,c)}var f=Date.now()-I;ie&&(ie.contentDownload=f),p("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",f,Z,ee,F.method,F.host,F.path,Q,ie);var h={status:ee,statusCode:ee,headers:u,size:Z,aborted:te,rt:f,keepAliveSocket:Q,data:r,requestUrls:o.requestUrls,timing:ie,remoteAddress:ne,remotePort:re};if(e){var m="";P&&"function"==typeof P.getCurrentStatus&&(m=", agent status: "+(0,l.default)(P.getCurrentStatus())),e.message+=", "+F.method+" "+i+" "+ee+" (connected: "+J+", keepalive socket: "+Q+m+")\nheaders: "+(0,l.default)(u),e.data=r,e.path=F.path,e.status=ee,e.headers=u,e.res=h}c(e,r,o.streaming?a:h),o.emitter&&(L.url=i,L.socket=se&&se.connection,L.options=F,L.size=W,o.emitter.emit("response",{requestId:A,error:e,ctx:o.ctx,req:L,res:h}))}function S(e){var t=null;if(o.followRedirect&&statuses.redirect[e.statusCode]){o._followRedirectCount=(o._followRedirectCount||0)+1;var r=e.headers.location;if(r){if(!(o._followRedirectCount>o.maxRedirects)){var a=o.formatRedirectUrl?o.formatRedirectUrl(i,r):d.resolve(i,r);p("Request#%d %s: `redirected` from %s to %s",A,F.path,i,a),E(),o.headers&&o.headers.Host&&y.test(r)&&(o.headers.Host=null);var l=s;return s=null,n.requestWithCallback(a,o,l),{redirect:!0,error:null}}(t=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+i)).name="MaxRedirectError"}else(t=new Error("Got statusCode "+e.statusCode+" but cannot resolve next location from headers")).name="FollowRedirectError"}return{redirect:!1,error:t}}function w(e,t,n){return n(null,t,e.headers["content-encoding"])}function k(e){var t;if(ie&&(ie.waiting=Date.now()-I),p("Request#%d %s `req response` event emit: status %d, headers: %j",A,i,e.statusCode,e.headers),o.streaming)return(t=S(e)).redirect?void e.resume():t.error?(e.resume(),x(t.error,null,e)):x(null,null,e);if(e.on("close",(function(){p("Request#%d %s: `res close` event emit, total size %d",A,i,Z)})),e.on("error",(function(){p("Request#%d %s: `res error` event emit, total size %d",A,i,Z)})),e.on("aborted",(function(){te=!0,p("Request#%d %s: `res aborted` event emit, total size %d",A,i,Z)})),le)return(t=S(e)).redirect?void e.resume():t.error?(e.resume(),le.end(),x(t.error,null,e)):(!1===o.consumeWriteStream?e.on("end",x.bind(null,null,null,e)):isNode010||isNode012?first([[le,"close"],[e,"aborted"]],(function(t,n,r){p("Request#%d %s: writeStream or res %s event emitted",A,i,r),x($||null,null,e)})):le.on("close",(function(){p("Request#%d %s: writeStream close event emitted",A,i),x($||null,null,e)})),e.pipe(le));var n=[];e.on("data",(function(e){p("Request#%d %s: `res data` event emit, size %d",A,i,e.length),Z+=e.length,n.push(e)})),e.on("end",(function(){var t=r.concat(n,Z);if(p("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",A,i,Z,e._dumped),$)return x($,t,e);var a=S(e);if(a.error)return x(a.error,t,e);a.redirect||w(e,t,(function(n,r,a){if(n)return x(n,t,e);if(!a&&b.indexOf(o.dataType)>=0){try{r=decodeBodyByCharset(r,e)}catch(t){return p("decodeBodyByCharset error: %s",t),x(null,r,e)}if("json"===o.dataType)if(0===Z)r=null;else{var s=parseJSON(r,j);s.error?n=s.error:r=s.data}}te&&p("Request#%d %s: Remote socket was terminated before `response.end()` was called",A,i),x(n,r,e)}))}))}function T(){p("Response timer ticking, timeout: %d",oe),Y=setTimeout((function(){Y=null;var e="Response timeout for "+oe+"ms";($=new Error(e)).name="ResponseTimeoutError",$.requestId=A,p("ResponseTimeout: Request#%d %s %s: %s, connected: %s",A,i,$.name,e,J),O()}),oe)}function O(){p("Request#%d %s abort, connected: %s",A,i,J),se.socket||($.noSocket=!0,x($)),se.abort()}if(!i||"string"!=typeof i&&"object"!==(void 0===i?"undefined":(0,c.default)(i))){var C=u.format("expect request url to be a string or a http request options, but got %j",i);throw new Error(C)}2===arguments.length&&"function"==typeof o&&(s=o,o=null),v>=g&&(v=0);var A=++v;(o=o||{}).requestUrls=o.requestUrls||[];var L={requestId:A,url:i,args:o,ctx:o.ctx};o.emitter&&o.emitter.emit("request",L),o.timeout=o.timeout||n.TIMEOUTS,o.maxRedirects=o.maxRedirects||10,o.streaming=o.streaming||o.customResponse;var D,I=Date.now();"string"==typeof i?(y.test(i)||(i="http://"+i),D=d.parse(i)):D=i;var R=(o.type||o.method||D.method||"GET").toUpperCase(),N=D.port||80,M=f,P=a(o.agent,n.agent),j=o.fixJSONCtlChars;"https:"===D.protocol&&(M=h,P=a(o.httpsAgent,n.httpsAgent),D.port||(N=443));var F={host:D.hostname||D.host||"localhost",path:D.path||"/",method:R,port:N,agent:P,headers:o.headers||{},lookup:o.lookup};Array.isArray(o.timeout)?F.requestTimeout=o.timeout[o.timeout.length-1]:void 0!==o.timeout&&(F.requestTimeout=o.timeout);for(var U=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],B=0;B<U.length;B++){var G=U[B];o.hasOwnProperty(G)&&(F[G]=o[G])}!1!==F.rejectUnauthorized||F.hasOwnProperty("secureOptions")||(F.secureOptions=e("constants").SSL_OP_NO_TLSv1_2);var z=o.auth||D.auth;z&&(F.auth=z);var H=o.content||o.data,K="GET"===R||"HEAD"===R||o.dataAsQueryString;if(!o.content&&H&&"string"!=typeof H&&!r.isBuffer(H))if(K)H=o.nestedQuerystring?qs.stringify(H):querystring.stringify(H);else{var V=F.headers["Content-Type"]||F.headers["content-type"];V||(V="json"===o.contentType?"application/json":"application/x-www-form-urlencoded",F.headers["Content-Type"]=V),H="application/json"===parseContentType(V).type?(0,l.default)(H):o.nestedQuerystring?qs.stringify(H):querystring.stringify(H)}K&&H&&(F.path+=(D.query?"&":"?")+H,H=null);var W=0;if(H){var q=H.length;r.isBuffer(H)||(q=r.byteLength(H)),W=F.headers["Content-Length"]=q}"json"===o.dataType&&(F.headers.Accept="application/json"),"function"==typeof o.beforeRequest&&o.beforeRequest(F);var X=null,Y=null,$=null,J=!1,Q=!1,Z=0,ee=-1,te=!1,ne="",re="",ie=null;o.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),F.headers["User-Agent"]||F.headers["user-agent"]||(F.headers["User-Agent"]=navigator.userAgent),o.gzip&&(F.headers["Accept-Encoding"]||F.headers["accept-encoding"]||(F.headers["Accept-Encoding"]="gzip"));var ae,oe,se,le=o.writeStream;p("Request#%d %s %s with headers %j, options.path: %s",A,R,i,F.headers,F.path),o.requestUrls.push(i),Array.isArray(o.timeout)?(ae=m(o.timeout[0]),oe=m(o.timeout[1])):ae=oe=m(o.timeout),p("ConnectTimeout: %d, ResponseTimeout: %d",ae,oe);try{se=M.request(F,k)}catch(e){return x(e)}return"undefined"==typeof window?(p("Connect timer ticking, timeout: %d",ae),X=setTimeout((function(){X=null,-1===ee&&(ee=-2);var e="Connect timeout for "+ae+"ms",t="ConnectionTimeoutError";se.socket||(t="SocketAssignTimeoutError",e+=", working sockets is full"),($=new Error(e)).name=t,$.requestId=A,p("ConnectTimeout: Request#%d %s %s: %s, connected: %s",A,i,$.name,e,J),O()}),ae)):se.on("requestTimeout",(function(){-1===ee&&(ee=-2),($=new Error("Connect timeout for "+ae+"ms")).name="ConnectionTimeoutError",$.requestId=A,O()})),ie&&se.on("finish",(function(){ie.requestSent=Date.now()-I})),se.once("socket",(function(e){ie&&(ie.queuing=Date.now()-I),isNode010&&e.socket&&(e=e.socket);var t=e.readyState;if("opening"===t)return e.once("lookup",(function(e,t,n){p("Request#%d %s lookup: %s, %s, %s",A,i,e,t,n),ie&&(ie.dnslookup=Date.now()-I),t&&(ne=t)})),void e.once("connect",(function(){ie&&(ie.connected=Date.now()-I),_(),T(),p("Request#%d %s new socket connected",A,i),J=!0,ne||(ne=e.remoteAddress),re=e.remotePort}));p("Request#%d %s reuse socket connected, readyState: %s",A,i,t),J=!0,Q=!0,ne||(ne=e.remoteAddress),re=e.remotePort,_(),T()})),se.on("error",(function(e){"Error"!==e.name&&"TypeError"!==e.name||(e.name=J?"ResponseError":"RequestError"),e.message+=' (req "error")',p("Request#%d %s `req error` event emit, %s: %s",A,i,e.name,e.message),x($||e)})),le&&le.once("error",(function(e){e.message+=' (writeStream "error")',$=e,p("Request#%d %s `writeStream error` event emit, %s: %s",A,i,e.name,e.message),O()})),o.stream?(o.stream.pipe(se),o.stream.once("error",(function(e){e.message+=' (stream "error")',$=e,p("Request#%d %s `readStream error` event emit, %s: %s",A,i,e.name,e.message),O()}))):se.end(H),se.requestId=A,se}}).call(this,e("_process"),e("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)})),function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=12)}([function(e,t,n){e.exports=function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},a=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},o=i.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(a=0;a<i;a+=4)t[r+a>>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=0;i<t;i+=4){var a=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}}(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new o.init(r,t)}}),s=r.enc={},l=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((15&a).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new o.init(n,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new o.init(n,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),l=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,c=e.min(4*l,i);if(l){for(var u=0;u<l;u+=a)this._doProcessBlock(r,u);var d=r.splice(0,l);n.sigBytes-=c}return new o.init(d,c)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),f=(i.Hasher=d.extend({cfg:a.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math);return e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"detectIEVersion",value:function(){for(var e=4,t=document.createElement("div"),n=t.getElementsByTagName("i");t.innerHTML="\x3c!--[if gt IE "+e+"]><i></i><![endif]--\x3e",n[0];)e++;return e>4&&e}},{key:"extend",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&t[n]&&(e[n]=t[n])}},{key:"isArray",value:function(e){return"[object Array]"===Object.prototype.toString.call(arg)}},{key:"getFileType",value:function(e){return e=e.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(e)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(e)?"audio":/.bmp|.jpg|.jpeg|.png/.test(e)?"img":"other"}},{key:"isImage",value:function(e){return e=e.toLowerCase(),!!/.jpg|.jpeg|.png/.test(e)}},{key:"ISODateString",value:function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(e){return!!/^\d+$/.test(e)}}]),e}();t.default=i},function(e,t,n){e.exports=function(e){return function(t){function n(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function r(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function i(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function a(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}var o=e,s=o.lib,l=s.WordArray,c=s.Hasher,u=o.algo,d=[];!function(){for(var e=0;e<64;e++)d[e]=4294967296*t.abs(t.sin(e+1))|0}();var f=u.MD5=c.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var o=0;o<16;o++){var s=t+o,l=e[s];e[s]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var c=this._hash.words,u=e[t+0],f=e[t+1],h=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],_=e[t+9],E=e[t+10],x=e[t+11],S=e[t+12],w=e[t+13],k=e[t+14],T=e[t+15],O=c[0],C=c[1],A=c[2],L=c[3];O=n(O,C,A,L,u,7,d[0]),L=n(L,O,C,A,f,12,d[1]),A=n(A,L,O,C,h,17,d[2]),C=n(C,A,L,O,p,22,d[3]),O=n(O,C,A,L,m,7,d[4]),L=n(L,O,C,A,v,12,d[5]),A=n(A,L,O,C,g,17,d[6]),C=n(C,A,L,O,y,22,d[7]),O=n(O,C,A,L,b,7,d[8]),L=n(L,O,C,A,_,12,d[9]),A=n(A,L,O,C,E,17,d[10]),C=n(C,A,L,O,x,22,d[11]),O=n(O,C,A,L,S,7,d[12]),L=n(L,O,C,A,w,12,d[13]),A=n(A,L,O,C,k,17,d[14]),O=r(O,C=n(C,A,L,O,T,22,d[15]),A,L,f,5,d[16]),L=r(L,O,C,A,g,9,d[17]),A=r(A,L,O,C,x,14,d[18]),C=r(C,A,L,O,u,20,d[19]),O=r(O,C,A,L,v,5,d[20]),L=r(L,O,C,A,E,9,d[21]),A=r(A,L,O,C,T,14,d[22]),C=r(C,A,L,O,m,20,d[23]),O=r(O,C,A,L,_,5,d[24]),L=r(L,O,C,A,k,9,d[25]),A=r(A,L,O,C,p,14,d[26]),C=r(C,A,L,O,b,20,d[27]),O=r(O,C,A,L,w,5,d[28]),L=r(L,O,C,A,h,9,d[29]),A=r(A,L,O,C,y,14,d[30]),O=i(O,C=r(C,A,L,O,S,20,d[31]),A,L,v,4,d[32]),L=i(L,O,C,A,b,11,d[33]),A=i(A,L,O,C,x,16,d[34]),C=i(C,A,L,O,k,23,d[35]),O=i(O,C,A,L,f,4,d[36]),L=i(L,O,C,A,m,11,d[37]),A=i(A,L,O,C,y,16,d[38]),C=i(C,A,L,O,E,23,d[39]),O=i(O,C,A,L,w,4,d[40]),L=i(L,O,C,A,u,11,d[41]),A=i(A,L,O,C,p,16,d[42]),C=i(C,A,L,O,g,23,d[43]),O=i(O,C,A,L,_,4,d[44]),L=i(L,O,C,A,S,11,d[45]),A=i(A,L,O,C,T,16,d[46]),O=a(O,C=i(C,A,L,O,h,23,d[47]),A,L,u,6,d[48]),L=a(L,O,C,A,y,10,d[49]),A=a(A,L,O,C,k,15,d[50]),C=a(C,A,L,O,v,21,d[51]),O=a(O,C,A,L,S,6,d[52]),L=a(L,O,C,A,p,10,d[53]),A=a(A,L,O,C,E,15,d[54]),C=a(C,A,L,O,f,21,d[55]),O=a(O,C,A,L,b,6,d[56]),L=a(L,O,C,A,T,10,d[57]),A=a(A,L,O,C,g,15,d[58]),C=a(C,A,L,O,w,21,d[59]),O=a(O,C,A,L,m,6,d[60]),L=a(L,O,C,A,x,10,d[61]),A=a(A,L,O,C,h,15,d[62]),C=a(C,A,L,O,_,21,d[63]),c[0]=c[0]+O|0,c[1]=c[1]+C|0,c[2]=c[2]+A|0,c[3]=c[3]+L|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return s},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}});o.MD5=c._createHelper(f),o.HmacMD5=c._createHmacHelper(f)}(Math),e.MD5}(n(0))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},t.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},t.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(5)),o=r(n(25)),s=r(n(6)),l=r(n(7)),c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=l.default.os.name,r=l.default.os.version||"",i=l.default.browser.name,o=l.default.browser.version||"",c=window.location.href,u="";c&&(u=l.default.getHost(c));var d="pc";l.default.os.ipad?d="pad":(l.default.os.iphone||l.default.os.android)&&(d="phone"),this._ri=a.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:s.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:e.getUuid(),os:n,ov:r,et:i,ev:o,uat:navigator.userAgent,app_n:u,tt:d,dm:"h5",ut:""}}return i(e,[{key:"log",value:function(e,t){t&&t.ri?(this._ri=t.ri,delete t.ri):this._ri=a.default.create(),t&&t.ut&&(this.initParam.ut=t.ut,delete t.ut),this.initParam.t=(new Date).getTime(),this.initParam.ll="20006"==e?"error":"info",this.initParam.ri=this._ri,this.initParam.e=e;var n=[];if(t)for(var r in t)n.push(r+"="+t[r]);var i=n.join("&");this.initParam.args=encodeURIComponent(""==i?"0":i);var o=[];for(var r in this.initParam)o.push(r+"="+this.initParam[r]);var s=o.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(s):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+s}}],[{key:"getUuid",value:function(){var e=o.default.get("p_h5_upload_u");return e||(e=a.default.create(),o.default.set("p_h5_upload_u",e,730)),e}},{key:"getClientId",value:function(){return o.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(e){return e||(e=a.default.create()),o.default.set("p_h5_upload_clientId",e,730),e}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"create",value:function(e,t){var n,r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),a=[];if(t=t||i.length,e)for(n=0;n<e;n++)a[n]=i[0|Math.random()*t];else for(a[8]=a[13]=a[18]=a[23]="-",a[14]="4",n=0;n<36;n++)a[n]||(r=0|16*Math.random(),a[n]=i[19==n?3&r|8:r]);return a.join("")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={version:"1.5.0"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){var t=navigator.userAgent.toLowerCase();return e.chrome?"Chrome":e.firefox?"Firefox":e.safari?"Safari":e.webview?"webview":e.ie?/edge/.test(t)?"Edge":"IE":/baiduspider/.test(t)?"Baiduspider":/ucweb/.test(t)||/UCBrowser/.test(t)?"UC":/opera/.test(t)?"Opera":/ucweb/.test(t)?"UC":/360se/.test(t)?"360浏览器":/bidubrowser/.test(t)?"百度浏览器":/metasr/.test(t)?"搜狗浏览器":/lbbrowser/.test(t)?"猎豹浏览器":/micromessenger/.test(t)?"微信内置浏览器":/qqbrowser/.test(t)?"QQ浏览器":/playstation/.test(t)?"PS4浏览器":void 0},a=function(){var e={},t={},n=navigator.userAgent,r=navigator.platform,a=n.match(/Web[kK]it[\/]{0,1}([\d.]+)/),o=n.match(/(Android);?[\s\/]+([\d.]+)?/),s=!!n.match(/\(Macintosh\; Intel /),l=n.match(/(iPad).*OS\s([\d_]+)/),c=n.match(/(iPod)(.*OS\s([\d_]+))?/),u=!l&&n.match(/(iPhone\sOS)\s([\d_]+)/),d=n.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),f=/Win\d{2}|Windows/.test(r),h=n.match(/Windows Phone ([\d.]+)/),p=d&&n.match(/TouchPad/),m=n.match(/Kindle\/([\d.]+)/),v=n.match(/Silk\/([\d._]+)/),g=n.match(/(BlackBerry).*Version\/([\d.]+)/),y=n.match(/(BB10).*Version\/([\d.]+)/),b=n.match(/(RIM\sTablet\sOS)\s([\d.]+)/),_=n.match(/PlayBook/),E=n.match(/Chrome\/([\d.]+)/)||n.match(/CriOS\/([\d.]+)/),x=n.match(/Firefox\/([\d.]+)/),S=n.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),w=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),k=!E&&n.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),T=k||n.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((t.webkit=!!a)&&(t.version=a[1]),o&&(e.android=!0,e.version=o[2]),u&&!c&&(e.ios=e.iphone=!0,e.version=u[2].replace(/_/g,".")),l&&(e.ios=e.ipad=!0,e.version=l[2].replace(/_/g,".")),c&&(e.ios=e.ipod=!0,e.version=c[3]?c[3].replace(/_/g,"."):null),h&&(e.wp=!0,e.version=h[1]),d&&(e.webos=!0,e.version=d[2]),p&&(e.touchpad=!0),g&&(e.blackberry=!0,e.version=g[2]),y&&(e.bb10=!0,e.version=y[2]),b&&(e.rimtabletos=!0,e.version=b[2]),_&&(t.playbook=!0),m&&(e.kindle=!0,e.version=m[1]),v&&(t.silk=!0,t.version=v[1]),!v&&e.android&&n.match(/Kindle Fire/)&&(t.silk=!0),E&&(t.chrome=!0,t.version=E[1]),x&&(t.firefox=!0,t.version=x[1]),S&&(e.firefoxos=!0,e.version=S[1]),w&&(t.ie=!0,t.version=w[1]),T&&(s||e.ios||f||o)&&(t.safari=!0,e.ios||(t.version=T[1])),k&&(t.webview=!0),s){var O=n.match(/[\d]*_[\d]*_[\d]*/);O&&O.length>0&&O[0]&&(e.version=O[0].replace(/_/g,"."))}return e.tablet=!!(l||_||o&&!n.match(/Mobile/)||x&&n.match(/Tablet/)||w&&!n.match(/Phone/)&&n.match(/Touch/)),e.phone=!(e.tablet||e.ipod||!(o||u||d||g||y||E&&n.match(/Android/)||E&&n.match(/CriOS\/([\d.]+)/)||x&&n.match(/Mobile/)||w&&n.match(/Touch/))),e.pc=!e.tablet&&!e.phone,s?e.name="macOS":f?(e.name="windows",e.version=function(){var e=navigator.userAgent,t="";return(e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1)&&(t="2000"),(e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1)&&(t="XP"),(e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1)&&(t="2003"),(e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1)&&(t="Vista"),(e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1)&&(t="7"),(e.indexOf("Windows NT 6.2")>-1||e.indexOf("Windows 8")>-1)&&(t="8"),(e.indexOf("Windows NT 6.3")>-1||e.indexOf("Windows 8.1")>-1)&&(t="8.1"),(e.indexOf("Windows NT 10")>-1||e.indexOf("Windows 10")>-1)&&(t="10"),t}()):e.name=function(e){var t=navigator.userAgent,n="other";if(e.ios)return"iOS";if(e.android)return"android";if(t.indexOf("Baiduspider")>-1)return"Baiduspider";if(t.indexOf("PlayStation")>-1)return"PS4";var r="Win32"==navigator.platform||"Windows"==navigator.platform||t.indexOf("Windows")>-1,i="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform;return i&&(n="macOS"),"X11"==navigator.platform&&!r&&!i&&(n="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(n="Linux"),r?"windows":n}(e),t.name=i(t),{os:e,browser:t}}(),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"getHost",value:function(e){var t="";if(void 0===e||null==e||""==e)return"";var n=e.indexOf("//"),r=e;n>-1&&(r=e.substring(n+2));t=r;var i=r.split("/");return i&&i.length>0&&(t=i[0]),(i=t.split(":"))&&i.length>0&&(t=i[0]),t}},{key:"os",get:function(){return a.os}},{key:"browser",get:function(){var e=a.browser;return e.name||(e.name=i()),e}}]),e}();t.default=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"get",value:function(e,t,n,r,i){var a;n=n||function(){},"undefined"==typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("This browser does not support XMLHttpRequest.")}),(a=new XMLHttpRequest).onreadystatechange=function(){4===a.readyState&&(200===a.status?t(a.responseText):n(a.responseText))};try{void 0===r&&(r=!0),a.open("GET",e,r),i&&(a.withCredentials=!0)}catch(e){return void n(e)}try{a.send()}catch(e){n(e)}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(27),a=n(30),o=(n(10),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"randomUUID",value:function(){for(var e=[],t="0123456789abcdef",n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}},{key:"aliyunEncodeURI",value:function(e){var t=encodeURIComponent(e);return t.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(t,n,r){if(!t)throw new Error("PrismPlayer Error: vid should not be null!");var i=[];for(var a in t)i.push(a);var o=i.sort(),s="",l=o.length;for(a=0;a<l;a++){var c=e.aliyunEncodeURI(o[a]),u=e.aliyunEncodeURI(t[o[a]]);""==s?s=c+n+u:s+=r+c+n+u}return s}},{key:"makeChangeSiga",value:function(t,n){if(!t)throw new Error("PrismPlayer Error: vid should not be null!");return a.stringify(i("GET&"+e.aliyunEncodeURI("/")+"&"+e.aliyunEncodeURI(e.makeUTF8sort(t,"=","&")),n+"&"))}}]),e}());t.default=o},function(e,t,n){e.exports=function(e){return e.enc.Utf8}(n(0))},function(e,t,n){e.exports=function(e){return e.enc.Hex}(n(0))},function(e,t,n){e.exports=n(13)},function(t,n,r){"use strict";var i,a={Vod:function(e){return e&&e.__esModule?e:{default:e}}(("function"==typeof Symbol&&Symbol.iterator,r(14))).default};void 0!==(i=function(){return a}.apply(n,[]))&&(t.exports=i),window.AliyunUpload=a,e.exports=AliyunUpload},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(15),o=n(3),s=r(n(16)),l=r(n(18)),c=r(n(24)),u=r(n(4)),d=r(n(1)),f=r(n(5)),h=r(n(26)),p=r(n(31)),m=r(n(32)),v=(n(2),function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.options=t,this.options.partSize=this.options.partSize||o.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||o.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,void 0===this.options.enableUploadProgress&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=a.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new u.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=a.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return i(e,[{key:"init",value:function(e,t,n,r){return this._retryCount=0,!(n&&!r||!n&&r||e&&!t||!e&&t||(this._ossCreditor.accessKeyId=e,this._ossCreditor.accessKeySecret=t,this._ossCreditor.securityToken=n,this._ossCreditor.expireTime=r,0))}},{key:"addFile",value:function(e,t,n,r,i,o){if(!e)return!1;if(0==e.size)try{this.options.onUploadFailed({file:e},"EmptyFile","文件大小为0不能上传")}catch(e){console.log(e)}for(var s=(this.options,0);s<this._uploadList.length;s++)if(this._uploadList[s].file==e)return!1;var c=new Object;if(c.file=e,c._endpoint=t,c._bucket=n,c._object=r,c.state=a.UPLOADSTATE.INIT,c.isImage=d.default.isImage(e.name),!c.isImage&&this.options.enableUploadProgress){var u=this;m.default.getMd5(e,(function(e){c.fileHash=e;var t=u._getCheckoutpoint(c);u.options.localCheckpoint||t||u._getCheckoutpointFromCloud(c,(function(e){if(e.UploadPoint){var t=JSON.parse(e.UploadPoint);1!=t.loaded&&(c.checkpoint=t.checkpoint,c.loaded=t.loaded,c.videoId=e.VideoId,u._saveCheckoutpoint(c,t.checkpoint))}}),(function(e){try{if((e=JSON.parse(e))&&"InvalidParameter"==e.Code&&e.Message.indexOf("UserId")>0){u._invalidUserId=!0;var t=e.Message+"正确账号ID(userId)请参考https://help.aliyun.com/knowledge_detail/37196.html";console.log(t)}}catch(e){console.log(e)}}))}))}i&&(c.videoInfo=i?JSON.parse(i).Vod:{},c.userData=l.default.encode(i)),c.ri=f.default.create(),this._uploadList.push(c),this._reportLog("20001",c,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(c)}catch(e){console.log(e)}return!0}},{key:"deleteFile",value:function(e){return!!this.cancelFile(e)&&(this._uploadList.splice(e,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(e){if(this.options,e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];if(e==this._curIndex&&t.state==a.UPLOADSTATE.UPLOADING){t.state=a.UPLOADSTATE.CANCELED;var n=this._getCheckoutpoint(t);n&&n.checkpoint&&(n=n.checkpoint),n&&this._ossUpload.abort(t),this._removeCheckoutpoint(t),this.nextUpload()}else t.state!=a.UPLOADSTATE.SUCCESS&&(t.state=a.UPLOADSTATE.CANCELED);return this._reportLog("20008",t),!0}},{key:"resumeFile",value:function(e){if(this.options,e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];return t.state==a.UPLOADSTATE.CANCELED&&(t.state=a.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(e){return this._getCheckoutpoint({file:e})}},{key:"startUpload",value:function(e){if(this._retryCount=0,this.options,this._state!=a.VODSTATE.START&&this._state!=a.VODSTATE.EXPIRE)if(this._initState(),this._curIndex=this._findUploadIndex(),-1!=this._curIndex){var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t),this._state=a.VODSTATE.START}else this._state=a.VODSTATE.END;else console.log("already started or expired")}},{key:"nextUpload",value:function(){var e=this.options;if(this._state==a.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),-1!=this._curIndex){var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t)}else{this._state=a.VODSTATE.END;try{e.onUploadEnd&&e.onUploadEnd(t)}catch(e){console.log(e)}}}},{key:"clear",value:function(e){for(var t=this.options,n=0,r=0;r<this._uploadList.length;r++)t.uploadList[r].state==a.UPLOADSTATE.SUCCESS&&n++,this._uploadList[r].state==e&&(t.uploadList.splice(r,1),r--);t.onClear&&t.onClear(t.uploadList.length,n)}},{key:"stopUpload",value:function(){if((this._state==a.VODSTATE.START||this._state==a.VODSTATE.FAILURE||-1==this._curIndex)&&-1!=this._curIndex){var e=this._uploadList[this._curIndex];this._state=a.VODSTATE.STOP,e.state=a.UPLOADSTATE.STOPED,this._changeState(e,a.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(e){if(!e)return!1;var t=JSON.parse(l.default.decode(e));return!!(t.AccessKeyId&&t.AccessKeySecret&&t.SecurityToken&&t.Expiration)&&this.resumeUploadWithToken(t.AccessKeyId,t.AccessKeySecret,t.SecurityToken,t.Expiration)}},{key:"resumeUploadWithToken",value:function(e,t,n,r){if(this.options,!(e&&t&&n&&r))return!1;if(this._state!=a.VODSTATE.EXPIRE)return!1;if(-1==this._curIndex)return!1;var i="";return this._uploadList.length>this._curIndex&&(i=this._uploadList[this._curIndex]),i&&(this.init(e,t,n,r),this._state=a.VODSTATE.START,this._ossUpload=null,this._uploadCore(i,i.retry),i.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(e,t,n){if(-1==this._curIndex)return!1;if(this._state!=a.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var r=this._uploadList[this._curIndex];r.object?this._refreshSTSTokenUpload(r,e,t,n):this.setSTSToken(r,e,t,n)}}},{key:"setSTSTokenDirectlyUpload",value:function(e,t,n,r,i){if(!(t&&n&&r&&i))return console.log("accessKeyId、ccessKeySecret、securityToken and expiration should not be empty."),!1;this._ut="oss";var a=e;this.init(t,n,r,i),a.endpoint=a._endpoint,a.bucket=a._bucket,a.object=a._object,this._ossUpload=null,this._uploadCore(a,e.retry),e.retry=!1}},{key:"setSTSToken",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var i=e.videoInfo,o={accessKeyId:t,securityToken:r,accessKeySecret:n,fileName:e.file.name,title:i.Title,requestId:e.ri,region:this.options.region};i.ImageType&&(o.imageType=i.ImageType),i.ImageExt&&(o.imageExt=i.ImageExt),i.FileSize&&(o.fileSize=i.FileSize),i.Description&&(o.description=i.Description),i.CateId&&(o.cateId=i.CateId),i.Tags&&(o.tags=i.Tags),i.TemplateGroupId&&(o.templateGroupId=i.TemplateGroupId),i.StorageLocation&&(o.storageLocation=i.StorageLocation),i.CoverURL&&(o.coverUrl=i.CoverURL),i.TransCodeMode&&(o.transCodeMode=i.TransCodeMode),i.UserData&&(o.userData=i.UserData);var s=this,l="getUploadAuth";e.videoId?(o.videoId=e.videoId,l="refreshUploadAuth"):e.isImage&&(l="getImageUploadAuth"),h.default[l](o,(function(t){e.videoId=t.VideoId?t.VideoId:e.videoId,s.setUploadAuthAndAddress(e,t.UploadAuth,t.UploadAddress),s._state=a.VODSTATE.START}),(function(t){s._error(e,{name:t.Code,code:t.Code,message:t.Message,requestId:t.RequestId})}))}},{key:"setUploadAuthAndAddress",value:function(e,t,n,r){if(!e||!t||!n)return!1;var i=JSON.parse(l.default.decode(t));if(!(i.AccessKeyId&&i.AccessKeySecret&&i.SecurityToken&&i.Expiration))return console.error("uploadauth is invalid"),!1;var a={},o=e;if(n){if(!(a=JSON.parse(l.default.decode(n))).Endpoint||!a.Bucket||!a.FileName)return console.error("uploadAddress is invalid"),!1}else a.Endpoint=o.endpoint,a.Bucket=o.bucket,a.FileName=o.object;this._ut="vod",this._uploadWay="vod",this.options.region=i.Region||this.options.region,this.init(i.AccessKeyId,i.AccessKeySecret,i.SecurityToken,i.Expiration),o.endpoint=o._endpoint?o._endpoint:a.Endpoint,o.bucket=o._bucket?o._bucket:a.Bucket,o.object=o._object?o._object:a.FileName,o.region=this.options.region,r&&(o.videoId=r),this._ossUpload=null,this._uploadCore(o,e.retry),e.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;var i={accessKeyId:t,securityToken:r,accessKeySecret:n,videoId:e.object,requestId:e.ri,region:this.options.region},o=this,s="refreshUploadAuth";e.isImage&&(s="getImageUploadAuth"),h.default[s](i,(function(t){o.setUploadAuthAndAddress(e,t.UploadAuth,UploadAddress),o._state=a.VODSTATE.START}),(function(t){o._error(e,{name:t.Code,code:t.Code,message:t.Message,requestId:t.RequestId})}))}},{key:"_upload",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.options;if(e.retry=t,n.onUploadstarted&&!t)try{var r=this._getCheckoutpoint(e);r&&r.state!=a.UPLOADSTATE.UPLOADING&&(e.checkpoint=r,e.videoId=r.videoId),n.onUploadstarted(e)}catch(e){console.log(e)}}},{key:"_uploadCore",value:function(e){if(!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId、AccessKeySecret、securityToken should not be null");if(e.state=a.UPLOADSTATE.UPLOADING,!this._ossUpload){e.endpoint=e.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var t=this;this._ossUpload=new s.default({bucket:e.bucket,endpoint:e.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(e,n){t._error.call(t,e,n)},oncomplete:function(e,n){t._complete.call(t,e,n)},onprogress:function(e,n,r){t._progress.call(t,e,n,r)}})}var n=d.default.getFileType(e.file.name),r=this._getCheckoutpoint(e),i="",o="";r&&r.checkpoint&&(o=r.state,i=r.videoId,r=r.checkpoint),r&&i==e.videoId&&o!=a.UPLOADSTATE.UPLOADING&&(r.file=e.file,e.checkpoint=r,r.uploadId);var l=this._adjustPartSize(e);this._reportLog("20002",e,{ft:n,fs:e.file.size,bu:e.bucket,ok:e.object,vid:e.videoId||"",fn:e.file.name,fw:null,fh:null,ps:l});var c={headers:{"x-oss-notification":e.userData?e.userData:""},partSize:l,parallel:this.options.parallel};this._ossUpload.upload(e,c)}},{key:"_findUploadIndex",value:function(){for(var e=-1,t=0;t<this._uploadList.length;t++)if(this._uploadList[t].state==a.UPLOADSTATE.INIT){e=t;break}return e}},{key:"_error",value:function(e,t){if("cancel"==t.name)try{this.options.onUploadCanceled(e,t)}catch(e){console.log(e)}else{if(t.message.indexOf("InvalidAccessKeyIdError")>0||"SignatureDoesNotMatchError"==t.name||"SecurityTokenExpired"==t.code||"InvalidSecurityToken.Expired"==t.code||"InvalidAccessKeyId"==t.code&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=a.VODSTATE.EXPIRE,e.state=a.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(e,t)}catch(e){console.log(e)}}return}if(("RequestTimeoutError"==t.name||"ConnectionTimeout"==t.name||"ConnectionTimeoutError"==t.name)&&this._retryTotal>this._retryCount){var n=this;return setTimeout((function(){n._uploadCore(e,!0)}),1e3*n._retryDuration),void this._retryCount++}"NoSuchUploadError"==t.name&&this._removeCheckoutpoint(e),this._handleError(e,t)}}},{key:"_handleError",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=a.UPLOADSTATE.FAIlURE;if(e.state!=a.UPLOADSTATE.CANCELED&&(e.state=a.UPLOADSTATE.FAIlURE,this._state=a.VODSTATE.FAILURE,this.options.onUploadFailed&&t&&t.code&&t.message))try{this.options.onUploadFailed(e,t.code,t.message)}catch(e){console.log(e)}if(n&&this._changeState(e,r),this._reportLog("20006",e,{code:t.name,message:t.message,requestId:t.requestId,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),this._reportLog("20004",e,{requestId:t.requestId,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),e.ri=f.default.create(),-1!=this._findUploadIndex()){var i=this;this._state=a.VODSTATE.START,setTimeout((function(){i.nextUpload()}),100)}}},{key:"_complete",value:function(e,t){if(e.state=a.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(e)}catch(e){console.log(e)}var n=0;t&&t.res&&t.res.headers&&(n=t.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(e);var r=this;setTimeout((function(){r.nextUpload()}),100),this._retryCount=0,this._reportLog("20003",e,{requestId:n})}},{key:"_progress",value:function(e,t,n){if(this.options.onUploadProgress)try{e.loaded=t.loaded,this.options.onUploadProgress(e,t.total,t.loaded)}catch(e){console.log(e)}var r=t.checkpoint,i=0;r&&(e.checkpoint=r,this._saveCheckoutpoint(e,r,a.UPLOADSTATE.UPLOADING),i=r.uploadId),this._retryCount=0;var o=this._getPortNumber(r),s=0;if(n&&n.headers&&(s=n.headers["x-oss-request-id"]),0!=t.loaded&&this._reportLog("20007",e,{pn:o,requestId:s}),1!=t.loaded&&this._reportLog("20005",e,{UploadId:i,pn:o+1,pr:e.retry?1:0,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),!this._invalidUserId&&!e.isImage&&"vod"==this._ut&&this.options.enableUploadProgress){var l={file:e.file,checkpoint:t,userId:this.options.userId,videoId:e.videoId,region:this.options.region,fileHash:e.fileHash};try{var c=this;p.default.upload(l,(function(){}),(function(e){if((e=JSON.parse(e))&&"InvalidParameter"==e.Code&&e.Message.indexOf("UserId")>0){c._invalidUserId=!0;var t=e.Message+"正确账号ID(userId)请参考https://help.aliyun.com/knowledge_detail/37196.html";console.log(t)}}))}catch(e){console.log(e)}}}},{key:"_getPortNumber",value:function(e){if(e){var t=e.doneParts;if(t&&t.length>0)return t[t.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(e){var t=this._getCheckoutpointKey(e);c.default.remove(t)}},{key:"_getCheckoutpoint",value:function(e){var t=this._getCheckoutpointKey(e),n=c.default.get(t);if(n)try{return JSON.parse(n)}catch(e){}return""}},{key:"_saveCheckoutpoint",value:function(e,t,n){if(t){var r=this._getCheckoutpointKey(e),i=e.file,a={fileName:i.name,lastModified:i.lastModified,size:i.size,object:e.object,videoId:e.videoId,bucket:e.bucket,endpoint:e.endpoint,checkpoint:t,loaded:e.loaded,state:n};c.default.set(r,JSON.stringify(a))}}},{key:"_changeState",value:function(e,t){var n=this._getCheckoutpoint(e);n&&((this._onbeforeunload=!0)&&(t=a.UPLOADSTATE.STOPED),this._saveCheckoutpoint(e,n.checkpoint,t))}},{key:"_getCheckoutpointKey",value:function(e){return"upload_"+e.file.lastModified+"_"+e.file.name+"_"+e.file.size}},{key:"_getCheckoutpointFromCloud",value:function(e,t,n){var r={userId:this.options.userId,uploadInfoList:[{FileName:e.file.name,FileSize:e.file.size,FileCreateTime:e.file.lastModified,FileHash:e.fileHash}],region:this.options.region};p.default.get(r,(function(e){t(e)}),n)}},{key:"_reportLog",value:function(e,t,n){n||(n={}),n.ri=t.ri,this._ut&&(n.ut=this._ut),this._log.log(e,n)}},{key:"_initEvent",value:function(){var e=this;window&&(window.onbeforeunload=function(t){if(e._onbeforeunload=!0,-1!=e._curIndex&&e._uploadList.length>e._curIndex){var n=e._uploadList[e._curIndex];e._changeState(n,a.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var e=0;e<this._uploadList.length;e++){var t=this._uploadList[e];t.state!=a.UPLOADSTATE.FAIlURE&&t.state!=a.UPLOADSTATE.STOPED||(t.state=a.UPLOADSTATE.INIT)}this._state=a.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(e){return e.file.size/this.options.partSize>1e4?e.file.size/9999:this.options.partSize}}]),e}());t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},t.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(3),o=(r(n(17)),n(1)),s=(r(o),function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){this._config=t,this.create(this._config),this._uploadInfo=null,this._callback={};var r=function(){};this._callback.onerror=n.onerror||r,this._callback.oncomplete=n.oncomplete||r,this._callback.onprogress=n.onprogress||r}}return i(e,[{key:"create",value:function(e){if(e.endpoint=e.endpoint||this._config.endpoint,e.bucket=e.bucket||this._config.bucket,!(e.AccessKeyId&&e.AccessKeySecret&&e.endpoint&&e.SecurityToken))throw new Error("AccessKeyId、AccessKeySecret、endpoint should not be null");var t={accessKeyId:e.AccessKeyId,accessKeySecret:e.AccessKeySecret,stsToken:e.SecurityToken,endpoint:e.endpoint||this._config.endpoint,bucket:e.bucket||this._config.bucket,secure:!0,cname:e.cname};e.timeout&&(t.timeout=e.timeout),this.oss=new OSS.Wrapper(t)}},{key:"abort",value:function(e){if(e.checkpoint){var t=e.checkpoint.uploadId;this.oss.abortMultipartUpload(e.object,t)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(e,t){this._uploadInfo=e;var n=this,r={parallel:t.parallel||this._config.parallel||a.UPLOADDEFAULT.PARALLEL,partSize:t.partSize||this._config.partSize||a.UPLOADDEFAULT.PARTSIZE,progress:function(e,t,r){return function(i){n._progress(e,t,r),i()}}};t.headers&&(r.headers=t.headers),e.checkpoint&&(r.checkpoint=e.checkpoint),e.bucket||(this.oss.options.bucket=e.bucket),e.endpoint||(this.oss.options.endpoint=e.endpoint),this.oss.multipartUpload(e.object,e.file,r).then((function(e,t){n._complete(e)})).catch((function(e){n.oss.cancel&&(n.oss&&n.oss.isCancel()?console.log("oss is cancel as error"):n.oss.cancel()),n._error(e)}))}},{key:"header",value:function(e,t,n){this.oss.get(e.object).then((function(e){t(e)})).catch((function(e){n(e)}))}},{key:"_progress",value:function(e,t,n){this._callback.onprogress(this._uploadInfo,{loaded:e,total:this._uploadInfo.file.size,checkpoint:t},n)}},{key:"_error",value:function(e){this._callback.onerror(this._uploadInfo,e)}},{key:"_complete",value:function(e){this._callback.oncomplete(this._uploadInfo,e)}}]),e}());t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"format",value:function(e){if(arguments.length<2)return null;for(var t=arguments[1],n=1;n<arguments.length;n++){var r=new RegExp("\\{"+(n-1)+"\\}","gm");t=t.replace(r,arguments[n+1])}return{code:e,message:t}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"参数 {0} 不能为空。",STSInvalid:"STS参数非法 accessKeyId、accessKeySecret、secretToken、expireTime都不能为空。",ReadFileError:"读取文件{0}{1}失败.",FILEDUPLICATION:"文件重复添加 {0}",UploadALEADRYSTARTED:"重复开始."}}}]),e}();t.default=i},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"encode",value:function(t){return new e(t).toString("base64")}},{key:"decode",value:function(t){return new e(t,"base64").toString()}}]),t}();t.default=r}).call(t,n(19).Buffer)},function(e,t,n){"use strict";(function(e){function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=a.prototype:(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return o(this,e,t,n)}function o(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t).__proto__=a.prototype:e=c(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=i(e,r)).write(t,n);return o!==r&&(e=e.slice(0,o)),e}(e,t,n):function(e,t){if(a.isBuffer(t)){var n=0|u(t.length);return 0===(e=i(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/(t.length)?i(e,0):c(e,t);if("Buffer"===t.type&&G(t.data))return c(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(s(t),e=i(e,t<0?0:0|u(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function c(e,t){var n=t.length<0?0:0|u(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function u(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(r)return P(e).length;t=(""+t).toLowerCase(),r=!0}}function f(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function p(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){function a(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var o,s=1,l=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,l/=2,c/=2,n/=2}if(i){var u=-1;for(o=n;o<l;o++)if(a(e,o)===a(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===c)return u*s}else-1!==u&&(o-=o-u),u=-1}else for(n+c>l&&(n=l-c),o=n;o>=0;o--){for(var d=!0,f=0;f<c;f++)if(a(e,o+f)!==a(t,f)){d=!1;break}if(d)return o}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function g(e,t,n,r){return F(P(t,e.length-n),e,n,r)}function y(e,t,n,r){return F(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function b(e,t,n,r){return y(e,t,n,r)}function _(e,t,n,r){return F(j(t),e,n,r)}function E(e,t,n,r){return F(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?U.fromByteArray(e):U.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=z)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=z));return n}(r)}function w(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function T(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=M(e[a]);return i}function O(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function C(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function I(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return i||I(e,0,n,4),B.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return i||I(e,0,n,8),B.write(e,t,n,r,52,8),n+8}function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function P(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function j(e){return U.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}var U=n(21),B=n(22),G=n(23);t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return function(e,t,n,r){return s(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}(null,e,t,n)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!G(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):f.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),d=0;d<l;++d)if(c[d]!==u[d]){o=c[d],s=u[d];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.indexOf=function(e,t,n){return p(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return p(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return g(this,e,t,n);case"ascii":return y(this,e,t,n);case"latin1":case"binary":return b(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var z=4096;a.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),a.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=a.prototype;else{var i=t-e;n=new a(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},a.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},a.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),B.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),B.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),B.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),B.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:P(new a(e,r).toString()),l=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%l]}return this};var H=/[^+\/0-9A-Za-z-_]/g}).call(t,n(20))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function a(e,t,n){for(var r,a=[],o=t;o<n;o+=3)r=(e[o]<<16)+(e[o+1]<<8)+e[o+2],a.push(i(r));return a.join("")}t.byteLength=function(e){return 3*e.length/4-r(e)},t.toByteArray=function(e){var t,n,i,a,o,c=e.length;a=r(e),o=new l(3*c/4-a),n=a>0?c-4:c;var u=0;for(t=0;t<n;t+=4)i=s[e.charCodeAt(t)]<<18|s[e.charCodeAt(t+1)]<<12|s[e.charCodeAt(t+2)]<<6|s[e.charCodeAt(t+3)],o[u++]=i>>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=s[e.charCodeAt(t)]<<2|s[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=s[e.charCodeAt(t)]<<10|s[e.charCodeAt(t+1)]<<4|s[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",s=[],l=0,c=n-r;l<c;l+=16383)s.push(a(e,l,l+16383>c?c:l+16383));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),s.push(i),s.join("")};for(var o=[],s=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,d=c.length;u<d;++u)o[u]=c[u],s[c.charCodeAt(u)]=u;s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,a=h&(1<<-u)-1,h>>=-u,u+=s;u>0;a=256*a+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=256*o+e[t+d],d+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=c}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,c=8*a-i-1,u=(1<<c)-1,d=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[n+h]=255&o,h+=p,o/=256,c-=8);e[n+h-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"set",value:function(e,t){try{window.localStorage&&localStorage.setItem(e,t)}catch(n){window[e+"_localStorage"]=t}}},{key:"get",value:function(e){try{if(window.localStorage)return localStorage.getItem(e)}catch(t){return window[e+"_localStorage"]}return""}},{key:"remove",value:function(e){try{window.localStorage&&localStorage.removeItem(e)}catch(t){delete window[e+"_localStorage"]}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"get",value:function(e){for(var t=e+"",n=document.cookie.split(";"),r=0;r<n.length;r++){var i=n[r].trim();if(0==i.indexOf(t))return unescape(i.substring(t.length+1,i.length))}return""}},{key:"set",value:function(e,t,n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var i="expires="+r.toGMTString();document.cookie=e+"="+escape(t)+"; "+i}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(8)),o=r(n(9)),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"refreshUploadAuth",value:function(e,t,n){var r=(o.default.randomUUID(),o.default.randomUUID()),i={AccessKeyId:e.accessKeyId,SecurityToken:e.securityToken,Action:"RefreshUploadVideo",VideoId:e.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:e.requestId},s=o.default.makeUTF8sort(i,"=","&")+"&Signature="+o.default.aliyunEncodeURI(o.default.makeChangeSiga(i,e.accessKeySecret)),l="https://vod."+e.region+".aliyuncs.com/?"+s;a.default.get(l,(function(e){e=JSON.parse(e);t&&t(e)}),(function(e){if(n){var t=JSON.parse(e);n(t)}}))}},{key:"getUploadAuth",value:function(e,t,n){var r=(o.default.randomUUID(),o.default.randomUUID()),i={AccessKeyId:e.accessKeyId,SecurityToken:e.securityToken,Action:"CreateUploadVideo",Title:e.title,FileName:e.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:e.requestId};e.fileSize&&(i.FileSize=e.fileSize),e.description&&(i.Description=e.description),e.cateId&&(i.CateId=e.cateId),e.tags&&(i.Tags=e.tags),e.templateGroupId&&(i.TemplateGroupId=e.templateGroupId),e.storageLocation&&(i.StorageLocation=e.storageLocation),e.coverUrl&&(i.CoverURL=e.coverUrl),e.transCodeMode&&(i.TransCodeMode=e.transCodeMode),e.userData&&(i.UserData=JSON.stringify(e.userData));var s=o.default.makeUTF8sort(i,"=","&")+"&Signature="+o.default.aliyunEncodeURI(o.default.makeChangeSiga(i,e.accessKeySecret)),l="https://vod."+e.region+".aliyuncs.com/?"+s;a.default.get(l,(function(e){try{e=JSON.parse(e)}catch(e){if(n)return void n({Code:"GetUploadAuthFailed",Message:"获取uploadauth失败"})}t&&t(e)}),(function(e){if(n){var t={Code:"GetUploadAuthFailed",Message:"获取uploadauth失败"};try{t=JSON.parse(e)}catch(e){}n(t)}}))}},{key:"getImageUploadAuth",value:function(e,t,n){var r=(o.default.randomUUID(),o.default.randomUUID()),i={AccessKeyId:e.accessKeyId,SecurityToken:e.securityToken,Action:"CreateUploadImage",ImageType:e.imageType?e.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:e.requestId};e.title&&(i.Title=e.title),e.imageExt&&(i.ImageExt=e.imageExt),e.tags&&(i.Tags=e.tags),e.storageLocation&&(i.StorageLocation=e.storageLocation);var s=o.default.makeUTF8sort(i,"=","&")+"&Signature="+o.default.aliyunEncodeURI(o.default.makeChangeSiga(i,e.accessKeySecret)),l="https://vod."+e.region+".aliyuncs.com/?"+s;a.default.get(l,(function(e){e=JSON.parse(e),t&&t(e)}),(function(e){if(n){var t=JSON.parse(e);n(t)}}))}}]),e}();t.default=s},function(e,t,n){e.exports=function(e){return e.HmacSHA1}(n(0),n(28),n(29))},function(e,t,n){e.exports=function(e){return function(){var t=e,n=t.lib,r=n.WordArray,i=n.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],s=n[3],l=n[4],c=0;c<80;c++){if(c<16)o[c]=0|e[t+c];else{var u=o[c-3]^o[c-8]^o[c-14]^o[c-16];o[c]=u<<1|u>>>31}var d=(r<<5|r>>>27)+l+o[c];d+=c<20?1518500249+(i&a|~i&s):c<40?1859775393+(i^a^s):c<60?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,l=s,s=a,a=i<<30|i>>>2,i=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),e.SHA1}(n(0))},function(e,t,n){e.exports=function(e){!function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),s=a.words,l=o.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;a.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}()}(n(0))},function(e,t,n){e.exports=function(e){return function(){function t(e,t,n){for(var i=[],a=0,o=0;o<t;o++)if(o%4){var s=n[e.charCodeAt(o-1)]<<o%4*2,l=n[e.charCodeAt(o)]>>>6-o%4*2;i[a>>>2]|=(s|l)<<24-a%4*8,a++}return r.create(i,a)}var n=e,r=n.lib.WordArray;n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],a=0;a<n;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,s=0;s<4&&a+.75*s<n;s++)i.push(r.charAt(o>>>6*(3-s)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var n=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var a=0;a<r.length;a++)i[r.charCodeAt(a)]=a}var o=r.charAt(64);if(o){var s=e.indexOf(o);-1!==s&&(n=s)}return t(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(n(0))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(8)),o=r(n(7)),s=r(n(4)),l=r(n(6)),c=r(n(1)),u=r(n(9)),d=n(2),f=n(11),h=n(10),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"getAuthInfo",value:function(e,t,n){var r=e+"|f#Ylm&^1TppeRhLg|"+n;return t&&(r=e+"|"+t+"|f#Ylm&^1TppeRhLg|"+n),d(h.parse(r)).toString(f)}},{key:"upload",value:function(t,n,r){var i=c.default.ISODateString(new Date),d=Math.floor((new Date).valueOf()/1e3),f=s.default.getClientId();f=s.default.setClientId(f);var h=e.getAuthInfo(t.userId,f,d),p=u.default.randomUUID(),m={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:o.default.browser.name+(o.default.browser.version||""),AppVersion:l.default.version,AuthTimestamp:d,Timestamp:i,AuthInfo:h,FileName:t.file.name,FileSize:t.file.size,FileCreateTime:t.file.lastModified,FileHash:t.fileHash,UploadId:t.checkpoint.checkpoint.uploadId,PartSize:t.checkpoint.checkpoint.partSize,DonePartsCount:t.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(t.checkpoint),UploadRatio:t.checkpoint.loaded,UserId:t.userId,VideoId:t.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:p};f&&(m.ClientId=f);var v=u.default.makeUTF8sort(m,"=","&")+"&Signature="+u.default.aliyunEncodeURI(u.default.makeChangeSiga(m,t.accessKeySecret)),g="https://vod."+t.region+".aliyuncs.com/?"+v;a.default.get(g,(function(e){n&&n()}),(function(e){e&&(r(e),console.log(e))}))}},{key:"get",value:function(t,n,r){var i=c.default.ISODateString(new Date),d=Math.floor((new Date).valueOf()/1e3),f=s.default.getClientId(),h=e.getAuthInfo(t.userId,f,d),p=u.default.randomUUID(),m={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:o.default.browser.name+(o.default.browser.version||""),AppVersion:l.default.version,AuthTimestamp:d,Timestamp:i,AuthInfo:h,UserId:t.userId,UploadInfoList:JSON.stringify(t.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:p};f&&(m.ClientId=f);var v=u.default.makeUTF8sort(m,"=","&")+"&Signature="+u.default.aliyunEncodeURI(u.default.makeChangeSiga(m,t.accessKeySecret)),g="https://vod."+t.region+".aliyuncs.com/?"+v;a.default.get(g,(function(e){var t={},r=f;(e=e?JSON.parse(e):{}).UploadProgress&&e.UploadProgress.UploadProgressList&&e.UploadProgress.UploadProgressList.length>0&&(r=(t=e.UploadProgress.UploadProgressList[0]).ClientId),s.default.setClientId(r),n&&n(t)}),(function(e){e&&(r(e),console.log(e))}))}}]),e}();t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(2),a=n(33),o=(n(11),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"getMd5",value:function(e,t,n){var r=new FileReader;r.onload=function(e){try{if(e&&e.target){var n=i(a.parse(e.target.result)).toString();t(n)}}catch(e){console.log(e)}},r.onerror=function(e){console.log(e),errorCallback(e)};var o=(File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice).call(e,0,1024);r.readAsBinaryString(o)}}]),e}());t.default=o},function(e,t,n){e.exports=function(e){return e.enc.Latin1}(n(0))}])}).call(this,n(/*! ./../@umijs/deps/compiled/webpack/4/global.js */"IyRk"))},ps8w:
/*!*********************************************!*\
!*** ./src/assets/images/question/show.svg ***!
\*********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/show.6268a056.svg"},"rAM+":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js ***!
\*******************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! @babel/runtime/helpers/esm/unsupportedIterableToArray */"Qw5x");function i(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,l=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw o}}}}},rHrb:
/*!***************************************************************!*\
!*** ./node_modules/react-copy-to-clipboard/lib/Component.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=a(n(/*! react */"q1tI")),i=a(n(/*! copy-to-clipboard */"+QRC"));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?h(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(e){function t(){var e,n;c(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return m(h(n=d(this,(e=f(t)).call.apply(e,[this].concat(o)))),"onClick",(function(e){var t=n.props,a=t.text,o=t.onCopy,s=t.children,l=t.options,c=r.default.Children.only(s),u=(0,i.default)(a,l);o&&o(a,u),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(e)})),n}var n,a,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,e),n=t,(a=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=l(e,["text","onCopy","options","children"]),i=r.default.Children.only(t);return r.default.cloneElement(i,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(n,!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{onClick:this.onClick}))}}])&&u(n.prototype,a),o&&u(n,o),t}(r.default.PureComponent);t.CopyToClipboard=v,m(v,"defaultProps",{onCopy:void 0,options:void 0})},rUJ1:
/*!********************************************!*\
!*** ./node_modules/marked/src/helpers.js ***!
\********************************************/
/*! no static exports found */
/*! exports used: escape */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s=e=>o[e];const l=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function c(e){return e.replace(l,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const d=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const h={},p=/^[^:]+:\/*[^/]*$/,m=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function g(e,t){h[" "+e]||(p.test(e)?h[" "+e]=e+"/":h[" "+e]=y(e,"/",!0));const n=-1===(e=h[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(m,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(v,"$1")+t:e+t}function y(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,s)}else if(i.test(e))return e.replace(a,s);return e},unescape:c,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(c(n)).replace(d,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(n)&&(n=g(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:g,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:y,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},rdUC:
/*!*****************************************************!*\
!*** ./node_modules/store/storages/localStorage.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../src/util */"MFOe").Global;function i(){return r.localStorage}function a(e){return i().getItem(e)}e.exports={name:"localStorage",read:a,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(a(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},"s8/Y":
/*!**********************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/img/jx.svg ***!
\**********************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/jx.6713fc81.svg"},"sB/4":
/*!**************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/List/img/b.svg ***!
\**************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/b.7405990c.svg"},sNtx:
/*!*************************************************!*\
!*** ./src/pages/Question/OjProblem/index.less ***!
\*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){},sR1s:
/*!*****************************************************!*\
!*** ./node_modules/rc-table/es/utils/valueUtil.js ***!
\*****************************************************/
/*! exports provided: getPathValue, getColumnsKey, mergeObject, validateValue */
/*! exports used: getColumnsKey, getPathValue, mergeObject, validateValue */function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(/*! @babel/runtime/helpers/esm/typeof */"U8pU");function i(e){return null==e?[]:Array.isArray(e)?e:[e]}function a(e,t){if(!t&&"number"!=typeof t)return e;for(var n=i(t),r=e,a=0;a<n.length;a+=1){if(!r)return null;r=r[n[a]]}return r}function o(e){var t=[],n={};return e.forEach((function(e){for(var r=e||{},a=r.key,o=r.dataIndex,s=a||i(o).join("-")||"RC_TABLE_KEY";n[s];)s="".concat(s,"_next");n[s]=!0,t.push(s)})),t}function s(){var e={};function t(e,n){n&&Object.keys(n).forEach((function(i){var a=n[i];a&&"object"===Object(r.a)(a)?(e[i]=e[i]||{},t(e[i],a)):e[i]=a}))}for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return i.forEach((function(n){t(e,n)})),e}function l(e){return null!=e}},sboe:
/*!*************************************************!*\
!*** ./node_modules/rc-tree/es/contextTypes.js ***!
\*************************************************/
/*! exports provided: TreeContext */
/*! exports used: TreeContext */function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(/*! react */"q1tI"),i=r.createContext(null)},"t/PP":
/*!**********************************************!*\
!*** ./src/assets/images/question/title.svg ***!
\**********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/title.dd3b799f.svg"},t23M:
/*!*****************************************************!*\
!*** ./node_modules/rc-resize-observer/es/index.js ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */function(e,t,n){"use strict";var r=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),i=n(/*! @babel/runtime/helpers/esm/classCallCheck */"1OyB"),a=n(/*! @babel/runtime/helpers/esm/createClass */"vuIU"),o=n(/*! @babel/runtime/helpers/esm/inherits */"Ji7U"),s=n(/*! @babel/runtime/helpers/esm/createSuper */"LK+K"),l=n(/*! react */"q1tI"),c=n(/*! rc-util/es/Dom/findDOMNode */"m+aA"),u=n(/*! rc-util/es/Children/toArray */"Zm9Q"),d=n(/*! rc-util/es/warning */"Kwbf"),f=n(/*! rc-util/es/ref */"c+Xe"),h=n(/*! resize-observer-polyfill */"bdgK"),p=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.childNode=null,e.currentElement=null,e.state={width:0,height:0,offsetHeight:0,offsetWidth:0},e.onResize=function(t){var n=e.props.onResize,i=t[0].target,a=i.getBoundingClientRect(),o=a.width,s=a.height,l=i.offsetWidth,c=i.offsetHeight,u=Math.floor(o),d=Math.floor(s);if(e.state.width!==u||e.state.height!==d||e.state.offsetWidth!==l||e.state.offsetHeight!==c){var f={width:u,height:d,offsetWidth:l,offsetHeight:c};e.setState(f),n&&Promise.resolve().then((function(){n(Object(r.a)(Object(r.a)({},f),{},{offsetWidth:l,offsetHeight:c}))}))}},e.setChildNode=function(t){e.childNode=t},e}return Object(a.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var e=Object(c.a)(this.childNode||this);e!==this.currentElement&&(this.destroyObserver(),this.currentElement=e),!this.resizeObserver&&e&&(this.resizeObserver=new h.default(this.onResize),this.resizeObserver.observe(e))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var e=this.props.children,t=Object(u.a)(e);if(t.length>1)Object(d.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===t.length)return Object(d.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=t[0];if(l.isValidElement(n)&&Object(f.c)(n)){var r=n.ref;t[0]=l.cloneElement(n,{ref:Object(f.a)(r,this.setChildNode)})}return 1===t.length?t[0]:t.map((function(e,t){return!l.isValidElement(e)||"key"in e&&null!==e.key?e:l.cloneElement(e,{key:"".concat("rc-observer-key","-").concat(t)})}))}}]),n}(l.Component);p.displayName="ResizeObserver",t.a=p},twBr:
/*!******************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListForm/img/s.svg ***!
\******************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=n.p+"static/s.1f286590.svg"},uMZB:
/*!******************************************************!*\
!*** ./src/pages/Problems/OjForm/index.less?modules ***!
\******************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){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:
/*!*********************************************!*\
!*** ./node_modules/store/plugins/json2.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports=function(){return n(/*! ./lib/json2 */"gaXo"),{}}},ulZh:
/*!*****************************************!*\
!*** ./node_modules/hls.js/dist/hls.js ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
/*!*********************************************!*\
!*** ./node_modules/eventemitter3/index.js ***!
\*********************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function c(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r<a;r++)o[r]=n[r].fn;return o},c.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,r,a,o){var s=i?i+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,r),!0;case 5:return u.fn.call(u.context,t,n,r,a),!0;case 6:return u.fn.call(u.context,t,n,r,a,o),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,h=u.length;for(c=0;c<h;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,n);break;case 4:u[c].fn.call(u[c].context,t,n,r);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},c.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||r&&!o.once||n&&o.context!==n||l(this,a);else{for(var s=0,c=[],u=o.length;s<u;s++)(o[s].fn!==t||r&&!o[s].once||n&&o[s].context!==n)&&c.push(o[s]);c.length?this._events[a]=1===c.length?c[0]:c:l(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new a,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,e.exports=c},"./node_modules/url-toolkit/src/url-toolkit.js":
/*!*****************************************************!*\
!*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
\*****************************************************/
/*! no static exports found */function(e,t,n){var r,i,a,o,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,i=/^([^\/?#]*)([^]*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var c={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(c.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var u=o.path,d=u.substring(0,u.lastIndexOf("/")+1)+a.path;c.path=s.normalizePath(d)}else c.path=o.path,a.params||(c.params=o.params,a.query||(c.query=o.query));return null===c.path&&(c.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(c)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},"./node_modules/webworkify-webpack/index.js":
/*!**************************************************!*\
!*** ./node_modules/webworkify-webpack/index.js ***!
\**************************************************/
/*! no static exports found */function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,r){var a={};a[r]=[];var o=t.toString(),s=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var l,c=s[1],u=new RegExp("(\\\\n|\\W)"+i(c)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=u.exec(o);)"dll-reference"!==l[3]&&a[r].push(l[3]);for(u=new RegExp("\\("+i(c)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=u.exec(o);)e[l[2]]||(a[r].push(l[1]),e[l[2]]=n(l[1]).m),a[l[2]]=a[l[2]]||[],a[l[2]].push(l[4]);for(var d,f=Object.keys(a),h=0;h<f.length;h++)for(var p=0;p<a[f[h]].length;p++)d=a[f[h]][p],isNaN(1*d)||(a[f[h]][p]=1*a[f[h]][p]);return a}function o(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l<s.length;l++){var c=s[l],u=n[c].pop();if(i[c]=i[c]||{},!i[c][u]&&e[c][u]){i[c][u]=!0,r[c]=r[c]||[],r[c].push(u);for(var d=a(e,e[c][u],c),f=Object.keys(d),h=0;h<f.length;h++)n[f[h]]=n[f[h]]||[],n[f[h]]=n[f[h]].concat(d[f[h]])}}return r}(i,e),l="";Object.keys(s).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;s[e][t];)t++;s[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s[e].map((function(t){return JSON.stringify(t)+": "+i[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s.main.map((function(e){return JSON.stringify(e)+": "+i.main[e].toString()})).join(",")+"}))(self);";var c=new window.Blob([l],{type:"text/javascript"});if(t.bare)return c;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(c),d=new window.Worker(u);return d.objectURL=u,d}},"./src/config.ts":
/*!***********************!*\
!*** ./src/config.ts ***!
\***********************/
/*! exports provided: hlsDefaultConfig, mergeConfig, enableStreamingMode */function(e,t,n){"use strict";n.r(t),n.d(t,"hlsDefaultConfig",(function(){return S})),n.d(t,"mergeConfig",(function(){return w})),n.d(t,"enableStreamingMode",(function(){return k}));var r=n(/*! ./controller/abr-controller */"./src/controller/abr-controller.ts"),i=n(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.ts"),a=n(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.ts"),o=n(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.ts"),s=n(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.ts"),l=n(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.ts"),c=n(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.ts"),u=n(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.ts"),d=n(/*! ./controller/fps-controller */"./src/controller/fps-controller.ts"),f=n(/*! ./controller/eme-controller */"./src/controller/eme-controller.ts"),h=n(/*! ./controller/cmcd-controller */"./src/controller/cmcd-controller.ts"),p=n(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.ts"),m=n(/*! ./utils/fetch-loader */"./src/utils/fetch-loader.ts"),v=n(/*! ./utils/cues */"./src/utils/cues.ts"),g=n(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts"),y=n(/*! ./utils/logger */"./src/utils/logger.ts");function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=E(E({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:p.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:r.default,bufferController:l.default,capLevelController:u.default,fpsController:d.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:g.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},{cueHandler:v.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:o.SubtitleStreamController,subtitleTrackController:s.default,timelineController:c.TimelineController,audioStreamController:i.default,audioTrackController:a.default,emeController:f.default,cmcdController:h.default});function w(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return b({},e,t)}function k(e){var t=e.loader;t!==m.default&&t!==p.default?(y.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):Object(m.fetchSupported)()&&(e.loader=m.default,e.progressive=!0,e.enableSoftwareAES=!0,y.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},"./src/controller/abr-controller.ts":
/*!******************************************!*\
!*** ./src/controller/abr-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/ewma-bandwidth-estimator */"./src/utils/ewma-bandwidth-estimator.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../types/loader */"./src/types/loader.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts");function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(e){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new i.default(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t,n,d,f=e.prototype;return f.registerListeners=function(){var e=this.hls;e.on(a.Events.FRAG_LOADING,this.onFragLoading,this),e.on(a.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(a.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(a.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var e=this.hls;e.off(a.Events.FRAG_LOADING,this.onFragLoading,this),e.off(a.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(a.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(a.Events.ERROR,this.onError,this)},f.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},f.onFragLoading=function(e,t){var n,r=t.frag;r.type===l.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.timer=self.setInterval(this.onCheck,100)))},f.onLevelLoaded=function(e,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},f._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,i=n.autoLevelEnabled,s=n.config,l=n.media;if(e&&l){var u=t?t.stats:e.stats,d=t?t.duration:e.duration;if(u.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(i&&!l.paused&&l.playbackRate&&l.readyState){var f=performance.now()-u.loading.start,h=Math.abs(l.playbackRate);if(!(f<=500*d/h)){var p=n.levels,m=n.minAutoLevel,v=p[e.level],g=u.total||Math.max(u.loaded,Math.round(d*v.maxBitrate/8)),y=Math.max(1,u.bwEstimate?u.bwEstimate/8:1e3*u.loaded/f),b=(g-u.loaded)/y,_=l.currentTime,E=(o.BufferHelper.bufferInfo(l,_,s.maxBufferHole).end-_)/h;if(!(E>=2*d/h||b<=E)){var x,S=Number.POSITIVE_INFINITY;for(x=e.level-1;x>m&&!((S=d*p[x].maxBitrate/(6.4*y))<E);x--);if(!(S>=b)){var w=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+x+"\n Current BW estimate: "+(Object(r.isFiniteNumber)(w)?(w/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+b.toFixed(3)+" s\n Estimated load time for the next fragment: "+S.toFixed(3)+" s\n Time to underbuffer: "+E.toFixed(3)+" s"),n.nextLoadLevel=x,this.bwEstimator.sample(f,u.loaded),this.clearTimer(),e.loader&&(this.fragCurrent=this.partCurrent=null,e.loader.abort()),n.trigger(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:u})}}}}}},f.onFragLoaded=function(e,t){var n=t.frag,i=t.part;if(n.type===l.PlaylistLevelType.MAIN&&Object(r.isFiniteNumber)(n.sn)){var o=i?i.stats:n.stats,s=i?i.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[n.level],u=(c.loaded?c.loaded.bytes:0)+o.loaded,d=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:u,duration:d},c.realBitrate=Math.round(8*u/d)}if(n.bitrateTest){var f={stats:o,frag:n,part:i,id:n.type};this.onFragBuffered(a.Events.FRAG_BUFFERED,f),n.bitrateTest=!1}}},f.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===l.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},f.onError=function(e,t){switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},f.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},f.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,s=n.media,l=t?t.duration:e?e.duration:0,u=s?s.currentTime:0,d=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,f=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,h=(o.BufferHelper.bufferInfo(s,u,i.maxBufferHole).end-u)/d,p=this.findBestLevel(f,a,r,h,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((h?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var m=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay,v=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(!h){var y=this.bitrateTestDelay;y&&(m=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*m)+" ms"),v=g=1)}return p=this.findBestLevel(f,a,r,h+m,v,g),Math.max(p,0)},f.findBestLevel=function(e,t,n,r,i,a){for(var o,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,d=this.hls.levels,f=d[u],h=!(null==f||null===(o=f.details)||void 0===o||!o.live),p=null==f?void 0:f.codecSet,m=l?l.duration:s?s.duration:0,v=n;v>=t;v--){var g=d[v];if(g&&(!p||g.codecSet===p)){var y=g.details,b=(l?null==y?void 0:y.partTarget:null==y?void 0:y.averagetargetduration)||m,_=void 0;_=v<=u?i*e:a*e;var E=d[v].maxBitrate,x=E*b/_;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(_)+"/"+E+"/"+b+"/"+r+"/"+x),_>E&&(!x||h&&!this.bitrateTestDelay||x<r))return v}}return-1},t=e,(n=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this.getNextABRAutoLevel();return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}}])&&u(t.prototype,n),d&&u(t,d),e}();t.default=d},"./src/controller/audio-stream-controller.ts":
/*!***************************************************!*\
!*** ./src/controller/audio-stream-controller.ts ***!
\***************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),l=n(/*! ../types/level */"./src/types/level.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),d=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts"),f=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),h=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),p=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),m=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),v=n(/*! ../errors */"./src/errors.ts"),g=n(/*! ../utils/logger */"./src/utils/logger.ts");function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function _(t,n){var r;return(r=e.call(this,t,n,"[audio-stream-controller]")||this).videoBuffer=null,r.videoTrackCC=-1,r.waitingVideoCC=-1,r.audioSwitch=!1,r.trackId=-1,r.waitingData=null,r.mainDetails=null,r.bufferFlushed=!1,r._registerListeners(),r}n=e,(t=_).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n);var E=_.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var e=this.hls;e.on(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(a.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(a.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(a.Events.ERROR,this.onError,this),e.on(a.Events.BUFFER_RESET,this.onBufferReset,this),e.on(a.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(a.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E._unregisterListeners=function(){var e=this.hls;e.off(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(a.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(a.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(a.Events.ERROR,this.onError,this),e.off(a.Events.BUFFER_RESET,this.onBufferReset,this),e.off(a.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(a.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},E.onInitPtsFound=function(e,t){var n=t.frag,r=t.id,a=t.initPTS;if("main"===r){var o=n.cc;this.initPTS[n.cc]=a,this.log("InitPTS for cc: "+o+" found from main: "+a),this.videoTrackCC=o,this.state===i.State.WAITING_INIT_PTS&&this.tick()}},E.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=i.State.STOPPED);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},E.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var t,n=this.levels,r=this.trackId,a=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(a){if(this.waitForCdnTuneIn(a))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,l=performance.now(),c=this.retryDate;(!c||l>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var u=this.waitingData;if(u){var d=u.frag,f=u.part,h=u.cache,m=u.complete;if(void 0!==this.initPTS[d.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.FRAG_LOADING;var v={frag:d,part:f,payload:h.flush(),networkDetails:null};this._handleFragmentLoadProgress(v),m&&e.prototype._handleFragmentLoadComplete.call(this,v)}else if(this.videoTrackCC!==this.waitingVideoCC)g.logger.log("Waiting fragment cc ("+d.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var y=this.getLoadPosition(),b=o.BufferHelper.bufferInfo(this.mediaBuffer,y,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(b.end,this.config.maxFragLookUpTolerance,d)<0&&(g.logger.log("Waiting fragment cc ("+d.cc+") @ "+d.start+" cancelled because another fragment at "+b.end+" is needed"),this.clearWaitingFragment())}}else this.state=i.State.IDLE}this.onTickEnd()},E.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},E.onTickEnd=function(){var e=this.media;if(e&&e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length&&(this.loadedmetadata=!0),this.lastCurrentTime=e.currentTime}},E.doTickIdle=function(){var e,t,n=this.hls,r=this.levels,o=this.media,s=this.trackId,l=n.config;if(r&&r[s]&&(o||!this.startFragRequested&&l.startFragPrefetch)){var d=r[s].details;if(!d||d.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(d))this.state=i.State.WAITING_TRACK;else{this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,c.PlaylistLevelType.AUDIO));var f=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,c.PlaylistLevelType.AUDIO);if(null!==f){var h=f.len,p=this.getMaxBufferLength(),m=this.audioSwitch;if(!(h>=p)||m){if(!m&&this._streamEnded(f,d))return n.trigger(a.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var v=d.fragments[0].start,g=f.end;if(m){var y=this.getLoadPosition();g=y,d.PTSKnown&&y<v&&(f.end>v||f.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),o.currentTime=v+.05)}var b=this.getNextFragment(g,d);b?"identity"!==(null===(e=b.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=b.decryptdata)&&void 0!==t&&t.key?this.loadFragment(b,d,g):this.loadKey(b,d):this.bufferFlushed=!0}}}}},E.getMaxBufferLength=function(){var t=e.prototype.getMaxBufferLength.call(this),n=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,c.PlaylistLevelType.MAIN);return null===n?t:Math.max(t,n.len)},E.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},E.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new l.Level(e)}))},E.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;null!=r&&r.loader&&r.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},E.onLevelLoaded=function(e,t){this.mainDetails=t.details},E.onAudioTrackLoaded=function(e,t){var n,r=this.levels,a=t.details,o=t.id;if(r){this.log("Track "+o+" loaded ["+a.startSN+","+a.endSN+"],duration:"+a.totalduration);var s=r[o],l=0;if(a.live||null!==(n=s.details)&&void 0!==n&&n.live){var c=this.mainDetails;if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed||!c)return;!s.details&&a.hasProgramDateTime&&c.hasProgramDateTime?(Object(m.alignMediaPlaylistByPDT)(a,c),l=a.fragments[0].start):l=this.alignPlaylists(a,s.details)}s.details=a,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(s.details,l),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(a)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+o)},E._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,a=e.payload,o=this.config,s=this.trackId,l=this.levels;if(l){var u=l[s];console.assert(u,"Audio track is defined on fragment load progress");var p=u.details;console.assert(p,"Audio track details are defined on fragment load progress");var m=o.defaultAudioCodec||u.audioCodec||"mp4a.40.2",v=this.transmuxer;v||(v=this.transmuxer=new f.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var y=this.initPTS[n.cc],b=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==y){var _=r?r.index:-1,E=-1!==_,x=new h.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,a.byteLength,_,E);v.push(a,b,m,"",n,r,p.totalduration,!1,x,y)}else g.logger.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new d.default,complete:!1}).cache.push(new Uint8Array(a)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},E._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},E.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},E.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},E.onFragBuffered=function(e,t){var n=t.frag,r=t.part;n.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(n)?this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==n.sn&&(this.fragPrevious=n,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(n,r)))},E.onError=function(t,n){switch(n.details){case v.ErrorDetails.FRAG_LOAD_ERROR:case v.ErrorDetails.FRAG_LOAD_TIMEOUT:case v.ErrorDetails.KEY_LOAD_ERROR:case v.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,n);break;case v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case v.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=n.fatal?i.State.ERROR:i.State.IDLE,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case v.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var r=!0,a=this.getFwdBufferInfo(this.mediaBuffer,c.PlaylistLevelType.AUDIO);a&&a.len>.5&&(r=!this.reduceMaxBufferLength(a.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}},E.onBufferFlushed=function(e,t){t.type===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},E._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,o=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=l.frag,d=l.part,f=o.audio,h=o.text,p=o.id3,m=o.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&f&&this.completeAudioSwitch(),null!=m&&m.tracks&&(this._bufferInitSegment(m.tracks,c,s),r.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:n,tracks:m.tracks})),f){var v=f.startPTS,g=f.endPTS,b=f.startDTS,_=f.endDTS;d&&(d.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:v,endPTS:g,startDTS:b,endDTS:_}),c.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,v,g,b,_),this.bufferFragmentData(f,c,d,s)}if(null!=p&&null!==(t=p.samples)&&void 0!==t&&t.length){var E=y({frag:c,id:n},p);r.trigger(a.Events.FRAG_PARSING_METADATA,E)}if(h){var x=y({frag:c,id:n},h);r.trigger(a.Events.FRAG_PARSING_USERDATA,x)}}},E._bufferInitSegment=function(e,t,n){if(this.state===i.State.PARSING){e.video&&delete e.video;var r=e.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(a.Events.BUFFER_CODECS,e);var o=r.initSegment;if(null!=o&&o.byteLength){var s={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:o};this.hls.trigger(a.Events.BUFFER_APPENDING,s)}this.tick()}}},E.loadFragment=function(t,n,a){var o=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||o===s.FragmentState.NOT_LOADED||o===s.FragmentState.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t):n.live&&!Object(r.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,a)))},E.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:r})},_}(i.default);t.default=_},"./src/controller/audio-track-controller.ts":
/*!**************************************************!*\
!*** ./src/controller/audio-track-controller.ts ***!
\**************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function a(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var c,u,d,f=a.prototype;return f.registerListeners=function(){var e=this.hls;e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(r.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(r.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(r.Events.ERROR,this.onError,this)},f.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},f.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},f.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},f.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.tracksInGroup[n];if(i){var a=i.details;i.details=t.details,this.log("audioTrack "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,a))}else this.warn("Invalid audio track id "+n)},f.onLevelLoading=function(e,t){this.switchLevel(t.level)},f.onLevelSwitching=function(e,t){this.switchLevel(t.level)},f.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var i=this.tracks.filter((function(e){return!n||e.groupId===n}));this.selectDefaultTrack&&!i.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var a={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.AUDIO_TRACKS_UPDATED,a),this.selectInitialTrack()}}},f.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===o.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},f.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var i=t[e],a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,c=i.type,u=i.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(r.Events.AUDIO_TRACK_SWITCHING,{id:a,groupId:s,name:l,type:c,url:u}),!i.details||i.details.live){var d=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(d)}}},f.selectInitialTrack=function(){var e=this.tracksInGroup;console.assert(e.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,n=this.findTrackId(t)||this.findTrackId();-1!==n?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},f.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},f.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,i=t.groupId,a=t.url;if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(r.Events.AUDIO_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}},c=a,(u=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])&&s(c.prototype,u),d&&s(c,d),a}(a.default);t.default=c},"./src/controller/base-playlist-controller.ts":
/*!****************************************************!*\
!*** ./src/controller/base-playlist-controller.ts ***!
\****************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return l}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../types/level */"./src/types/level.ts"),a=n(/*! ./level-helper */"./src/controller/level-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=o.logger.log.bind(o.logger,t+":"),this.warn=o.logger.warn.bind(o.logger,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.onError=function(e,t){t.fatal&&t.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t){var n=null==t?void 0:t.renditionReports;if(n)for(var a=0;a<n.length;a++){var o=n[a],s=""+o.URI;if(s===e.substr(-s.length)){var l=parseInt(o["LAST-MSN"]),c=parseInt(o["LAST-PART"]);if(t&&this.hls.config.lowLatencyMode){var u=Math.min(t.age-t.partTarget,t.targetduration);void 0!==c&&u>t.partTarget&&(c+=1)}if(Object(r.isFiniteNumber)(l))return new i.HlsUrlParameters(l,Object(r.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},t.loadPlaylist=function(e){},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=o.loading.end?Math.max(0,self.performance.now()-o.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(a.mergeDetails)(n,i),!this.canLoad||!i.live)return;var l,c=void 0,u=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var d=this.hls.config.lowLatencyMode,f=i.lastPartSn,h=i.endSN,p=i.lastPartIndex,m=f===h;-1!==p?(c=m?h+1:f,u=m?d?0:p:p+1):c=h+1;var v=i.age,g=v+i.ageHeader,y=Math.min(g-i.partTarget,1.5*i.targetduration);if(y>0){if(n&&y>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==u&&(u+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+v.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+u)}i.tuneInGoal=y}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),d||!m)return void this.loadPlaylist(l)}else l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u);var _=Object(a.computeReloadInterval)(i,o);void 0!==c&&i.canBlockReload&&(_-=i.partTarget||1),this.log("reload live playlist "+e+" in "+Math.round(_)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),_)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var a=Object(i.getSkipValue)(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,a=i.HlsSkip.No),new i.HlsUrlParameters(n,r,a)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount<r.levelLoadingMaxRetry;if(i)if(this.retryCount++,e.details.indexOf("LoadTimeOut")>-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}()},"./src/controller/base-stream-controller.ts":
/*!**************************************************!*\
!*** ./src/controller/base-stream-controller.ts ***!
\**************************************************/
/*! exports provided: State, default */function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return E})),n.d(t,"default",(function(){return x}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../task-loop */"./src/task-loop.ts"),a=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),o=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),s=n(/*! ../utils/logger */"./src/utils/logger.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../errors */"./src/errors.ts"),u=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),d=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),f=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),h=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),p=n(/*! ./level-helper */"./src/controller/level-helper.ts"),m=n(/*! ../loader/fragment-loader */"./src/loader/fragment-loader.ts"),v=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),g=n(/*! ../utils/time-ranges */"./src/utils/time-ranges.ts"),y=n(/*! ../types/loader */"./src/types/loader.ts");function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var E={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},x=function(e){var t,n;function i(t,n,r){var i;return(i=e.call(this)||this).hls=void 0,i.fragPrevious=null,i.fragCurrent=null,i.fragmentTracker=void 0,i.transmuxer=null,i._state=E.STOPPED,i.media=void 0,i.mediaBuffer=void 0,i.config=void 0,i.bitrateTest=!1,i.lastCurrentTime=0,i.nextLoadPosition=0,i.startPosition=0,i.loadedmetadata=!1,i.fragLoadError=0,i.retryDate=0,i.levels=null,i.fragmentLoader=void 0,i.levelLastLoaded=null,i.startFragRequested=!1,i.decrypter=void 0,i.initPTS=[],i.onvseeking=null,i.onvended=null,i.logPrefix="",i.log=void 0,i.warn=void 0,i.logPrefix=r,i.log=s.logger.log.bind(s.logger,r+":"),i.warn=s.logger.warn.bind(s.logger,r+":"),i.hls=t,i.fragmentLoader=new m.default(t.config),i.fragmentTracker=n,i.config=t.config,i.decrypter=new v.default(t,t.config),t.on(l.Events.KEY_LOADED,i.onKeyLoaded,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i)),i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var x,S,w,k=i.prototype;return k.doTick=function(){this.onTickEnd()},k.onTickEnd=function(){},k.startLoad=function(e){},k.stopLoad=function(){this.fragmentLoader.abort();var e=this.fragCurrent;e&&this.fragmentTracker.removeFragment(e),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=E.STOPPED},k._streamEnded=function(e,t){var n=this.fragCurrent,r=this.fragmentTracker;if(!t.live&&n&&n.sn===t.endSN&&!e.nextStart){var i=r.getState(n);return i===a.FragmentState.PARTIAL||i===a.FragmentState.OK}return!1},k.onMediaAttached=function(e,t){var n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===E.STOPPED&&this.startLoad(r.startPosition)},k.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},k.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,i=this.mediaBuffer,a=this.state,s=n?n.currentTime:0,l=o.BufferHelper.bufferInfo(i||n,s,e.maxBufferHole);if(this.log("media seeking to "+(Object(r.isFiniteNumber)(s)?s.toFixed(3):s)+", state: "+a),a===E.ENDED)this.resetLoadingState();else if(t&&!l.len){var c=e.maxFragLookUpTolerance,u=t.start-c,d=s>t.start+t.duration+c;(s<u||d)&&(d&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.loader.abort()),this.resetLoadingState())}n&&(this.lastCurrentTime=s),this.loadedmetadata||l.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},k.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},k.onKeyLoaded=function(e,t){if(this.state===E.KEY_LOADING&&t.frag===this.fragCurrent&&this.levels){this.state=E.IDLE;var n=this.levels[t.frag.level].details;n&&this.loadFragment(t.frag,n,t.frag.start)}},k.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},k.onHandlerDestroyed=function(){this.state=E.STOPPED,this.hls.off(l.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},k.loadKey=function(e,t){this.log("Loading key for "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=E.KEY_LOADING,this.fragCurrent=e,this.hls.trigger(l.Events.KEY_LOADING,{frag:e})},k.loadFragment=function(e,t,n){this._loadFragForPlayback(e,t,n)},k._loadFragForPlayback=function(e,t,n){var r=this;this._doFragLoad(e,t,n,(function(t){if(r.fragContextChanged(e))return r.warn("Fragment "+e.sn+(t.part?" p: "+t.part.index:"")+" of level "+e.level+" was dropped during download."),void r.fragmentTracker.removeFragment(e);e.stats.chunkCount++,r._handleFragmentLoadProgress(t)})).then((function(t){if(t){r.fragLoadError=0;var n=r.state;if(!r.fragContextChanged(e))return"payload"in t&&(r.log("Loaded fragment "+e.sn+" of level "+e.level),r.hls.trigger(l.Events.FRAG_LOADED,t),r.state===E.BACKTRACKING)?(r.fragmentTracker.backtrack(e,t),void r.resetFragmentLoading(e)):void r._handleFragmentLoadComplete(t);(n===E.FRAG_LOADING||n===E.BACKTRACKING||!r.fragCurrent&&n===E.PARSING)&&(r.fragmentTracker.removeFragment(e),r.state=E.IDLE)}})).catch((function(t){r.warn(t),r.resetFragmentLoading(e)}))},k.flushMainBuffer=function(e,t,n){if(void 0===n&&(n=null),e-t){var r={startOffset:e,endOffset:t,type:n};this.fragLoadError=0,this.hls.trigger(l.Events.BUFFER_FLUSHING,r)}},k._loadInitSegment=function(e){var t=this;this._doFragLoad(e).then((function(n){if(!n||t.fragContextChanged(e)||!t.levels)throw new Error("init load aborted");return n})).then((function(n){var r=t.hls,i=n.payload,a=e.decryptdata;if(i&&i.byteLength>0&&a&&a.key&&a.iv&&"AES-128"===a.method){var o=self.performance.now();return t.decrypter.webCryptoDecrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(t){var i=self.performance.now();return r.trigger(l.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:o,tdecrypt:i}}),n.payload=t,n}))}return n})).then((function(n){var r=t.fragCurrent,i=t.hls,a=t.levels;if(!a)throw new Error("init load aborted, missing levels");var o=a[e.level].details;console.assert(o,"Level details are defined when init segment is loaded");var s=e.stats;t.state=E.IDLE,t.fragLoadError=0,e.data=new Uint8Array(n.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),n.frag===r&&i.trigger(l.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),t.tick()})).catch((function(n){t.warn(n),t.resetFragmentLoading(e)}))},k.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},k.fragBufferedComplete=function(e,t){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" "+g.default.toString(o.BufferHelper.getBuffered(n))),this.state=E.IDLE,this.tick()},k._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new u.ChunkMetadata(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},k._handleFragmentLoadProgress=function(e){},k._doFragLoad=function(e,t,n,i){var a=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");if(n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var o=t.partList;if(o&&i){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var s=this.getNextPart(o,e,n);if(s>-1){var c=o[s];return this.log("Loading part sn: "+e.sn+" p: "+c.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+s+"-"+(o.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=E.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,part:o[s],targetBufferTime:n}),this.doFragPartsLoad(e,o,s,i).catch((function(e){return a.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(o,n))return Promise.resolve(null)}}return this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),Object(r.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=E.FRAG_LOADING,this.hls.trigger(l.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragmentLoader.load(e,i).catch((function(e){return a.handleFragLoadError(e)}))},k.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s=[];!function n(c){var u=t[c];i.fragmentLoader.loadPart(e,u,r).then((function(r){s[u.index]=r;var o=r.part;i.hls.trigger(l.Events.FRAG_LOADED,r);var d=t[c+1];if(!d||d.fragment!==e)return a({frag:e,part:o,partsLoaded:s});n(c+1)})).catch(o)}(n)}))},k.handleFragLoadError=function(e){var t=e.data;return t&&t.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(l.Events.ERROR,t),null},k._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===E.PARSING){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||(this.state=E.IDLE)},k.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?Object(p.getPartWith)(a,r,i):null,s=o?o.fragment:Object(p.getFragmentWithSN)(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},k.bufferFragmentData=function(e,t,n,r){if(e&&this.state===E.PARSING){var i=e.data1,a=e.data2,o=i;if(i&&a&&(o=Object(d.appendUint8Array)(i,a)),o&&o.length){var s={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:o};this.hls.trigger(l.Events.BUFFER_APPENDING,s),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},k.flushBufferGap=function(e){var t=this.media;if(t)if(o.BufferHelper.isBuffered(t,t.currentTime)){var n=t.currentTime,r=o.BufferHelper.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-s>a&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},k.getFwdBufferInfo=function(e,t){var n=this.config,i=this.getLoadPosition();if(!Object(r.isFiniteNumber)(i))return null;var a=o.BufferHelper.bufferInfo(e,i,n.maxBufferHole);if(0===a.len&&void 0!==a.nextStart){var s=this.fragmentTracker.getBufferedFrag(i,t);if(s&&a.nextStart<s.end)return o.BufferHelper.bufferInfo(e,i,Math.max(a.nextStart,n.maxBufferHole))}return a},k.getMaxBufferLength=function(e){var t,n=this.config;return t=e?Math.max(8*n.maxBufferSize/e,n.maxBufferLength):n.maxBufferLength,Math.min(t,n.maxMaxBufferLength)},k.reduceMaxBufferLength=function(e){var t=this.config,n=e||t.maxBufferLength;return t.maxMaxBufferLength>=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},k.getNextFragment=function(e,t){var n,r,i=t.fragments,a=i.length;if(!a)return null;var o,s=this.config,l=i[0].start;if(t.live){var c=s.initialLiveManifestSize;if(a<c)return this.warn("Not enough fragments to start playback (have: "+a+", need: "+c+")"),null;t.PTSKnown||this.startFragRequested||-1!==this.startPosition||(o=this.getInitialLiveFragment(t,i),this.startPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=l&&(o=i[0]);if(!o){var u=s.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,u,t)}return null===(n=o)||void 0===n||!n.initSegment||null!==(r=o)&&void 0!==r&&r.initSegment.data||this.bitrateTest||(o=o.initSegment),o},k.getNextPart=function(e,t,n){for(var r=-1,i=!1,a=!0,o=0,s=e.length;o<s;o++){var l=e[o];if(a=a&&!l.independent,r>-1&&n<l.start)break;var c=l.loaded;!c&&(i||l.independent||a)&&l.fragment===t&&(r=o),i=c}return r},k.loadedEndOfParts=function(e,t){var n=e[e.length-1];return n&&t>n.start&&n.loaded},k.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=Object(h.findFragmentByPDT)(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=Object(h.findFragWithCC)(t,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var o=this.hls.liveSyncPosition;null!==o&&(r=this.getFragmentAtPosition(o,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},k.getFragmentAtPosition=function(e,t,n){var r,i=this.config,o=this.fragPrevious,s=n.fragments,l=n.endSN,c=n.fragmentHint,u=i.maxFragLookUpTolerance,d=!!(i.lowLatencyMode&&n.partList&&c);if(d&&c&&!this.bitrateTest&&(s=s.concat(c),l=c.sn),e<t){var f=e>t-u?0:u;r=Object(h.findFragmentByPTS)(o,s,e,f)}else r=s[s.length-1];if(r){var p=r.sn-n.startSN,m=o&&r.level===o.level,v=s[p+1];if(this.fragmentTracker.getState(r)===a.FragmentState.BACKTRACKED){r=null;for(var g=p;s[g]&&this.fragmentTracker.getState(s[g])===a.FragmentState.BACKTRACKED;)r=o?s[g--]:s[--g];r||(r=v)}else o&&r.sn===o.sn&&!d&&m&&(r.sn<l&&this.fragmentTracker.getState(v)!==a.FragmentState.OK?(this.log("SN "+r.sn+" just loaded, load next one: "+v.sn),r=v):r=null)}return r},k.synchronizeToLiveEdge=function(e){var t=this.config,n=this.media;if(n){var r=this.hls.liveSyncPosition,i=n.currentTime,a=e.fragments[0].start,o=e.edge,s=i>=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i<r||!s)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||i<o-l)&&(this.loadedmetadata||(this.nextLoadPosition=r),n.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+o+", reset currentTime to : "+r.toFixed(3)),n.currentTime=r))}}},k.alignPlaylists=function(e,t){var n=this.levels,i=this.levelLastLoaded,a=this.fragPrevious,o=null!==i?n[i]:null,s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;var l=e.fragments[0].start,c=!t,u=e.alignedSliding&&Object(r.isFiniteNumber)(l);if(c||!u&&!l){Object(f.alignStream)(a,o,e);var d=e.fragments[0].start;return this.log("Live playlist sliding: "+d.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(a?a.sn:"na")+" fragments: "+s),d}return l},k.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},k.setStartPosition=function(e,t){var n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){var i=e.startTimeOffset;Object(r.isFiniteNumber)(i)?(n=t+i,i<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log("Start time offset "+i+" found in playlist, adjust startPosition to "+n),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n},k.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},k.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part"+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},k.resetFragmentLoading=function(e){this.fragCurrent&&this.fragContextChanged(e)||(this.state=E.IDLE)},k.onFragmentOrKeyLoadError=function(e,t){if(!t.fatal){var n=t.frag;if(n&&n.type===e){var r=this.fragCurrent;console.assert(r&&n.sn===r.sn&&n.level===r.level&&n.urlId===r.urlId,"Frag load error must match current frag to retry");var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(n.level))return;var a=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+n.sn+" of "+e+" "+n.level+" failed to load, retrying in "+a+"ms"),this.retryDate=self.performance.now()+a,this.fragLoadError++,this.state=E.FRAG_LOADING_WAITING_RETRY}else t.levelRetry?(e===y.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=E.IDLE):(s.logger.error(t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.stopLoad(),this.state=E.ERROR)}}},k.afterBufferFlushed=function(e,t,n){if(e){var r=o.BufferHelper.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===E.ENDED&&this.resetLoadingState()}},k.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=E.IDLE},k.resetLiveStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var t=this.levels?this.levels[e].details:null;if(null!=t&&t.live)return this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},k.updateLevelTiming=function(e,t,n,r){var i=this,a=n.details;console.assert(!!a,"level.details must be defined"),Object.keys(e.elementaryStreams).reduce((function(t,o){var s=e.elementaryStreams[o];if(s){var c=s.endPTS-s.startPTS;if(c<=0)return i.warn("Could not parse fragment "+e.sn+" "+o+" duration reliably ("+c+") resetting transmuxer to fallback to playlist timing"),i.resetTransmuxer(),t||!1;var u=r?0:Object(p.updateFragPTSDTS)(a,e,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return i.hls.trigger(l.Events.LEVEL_PTS_UPDATED,{details:a,level:n,drift:u,type:o,frag:e,start:s.startPTS,end:s.endPTS}),!0}return t}),!1)?(this.state=E.PARSED,this.hls.trigger(l.Events.FRAG_PARSED,{frag:e,part:t})):this.resetLoadingState()},k.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},x=i,(S=[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}])&&b(x.prototype,S),w&&b(x,w),i}(i.default)},"./src/controller/buffer-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/buffer-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../errors */"./src/errors.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),u=n(/*! ./buffer-operation-queue */"./src/controller/buffer-operation-queue.ts"),d=Object(l.getMediaSource)(),f=/([ha]vc.)(?:\.[^.,]+)+/,h=function(){function e(e){var t=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 e=t.hls,n=t.media,r=t.mediaSource;a.logger.log("[buffer-controller]: Media source opened"),n&&(t.updateMediaElementDuration(),e.trigger(i.Events.MEDIA_ATTACHED,{media:n})),r&&r.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){a.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){a.logger.log("[buffer-controller]: Media source ended")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null},t.registerListeners=function(){var e=this.hls;e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(i.Events.BUFFER_RESET,this.onBufferReset,this),e.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(i.Events.BUFFER_EOS,this.onBufferEos,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(i.Events.FRAG_PARSED,this.onFragParsed,this),e.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(i.Events.BUFFER_RESET,this.onBufferReset,this),e.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(i.Events.BUFFER_EOS,this.onBufferEos,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(i.Events.FRAG_PARSED,this.onFragParsed,this),e.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,a.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&d){var r=this.mediaSource=new d;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(a.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){a.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):a.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(i.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){a.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.codec,s=a.levelCodec,l=a.container;if((i.levelCodec||i.codec).replace(f,"$1")!==(s||o).replace(f,"$1")){var c=l+";codecs="+(s||o);n.appendChangeType(e,c)}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(a.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){a.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,l=this.operationQueue,c=this.tracks,u=t.data,d=t.type,f=t.frag,h=t.part,p=t.chunkMeta,m=p.buffering[d],v=self.performance.now();m.start=v;var g=f.stats.buffering,y=h?h.stats.buffering:null;0===g.start&&(g.start=v),y&&0===y.start&&(y.start=v);var b=c.audio,_="audio"===d&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),E={execute:function(){if(m.executeStart=self.performance.now(),_){var e=n.sourceBuffer[d];if(e){var t=f.start-e.timestampOffset;Math.abs(t)>=.1&&(a.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+f.start+" (delta: "+t+") sn: "+f.sn+")"),e.timestampOffset=f.start)}}n.appendExecutor(u,d)},onStart:function(){},onComplete:function(){var e=self.performance.now();m.executeEnd=m.end=e,0===g.first&&(g.first=e),y&&0===y.first&&(y.first=e);var t=n.sourceBuffer,r={};for(var a in t)r[a]=s.BufferHelper.getBuffered(t[a]);n.appendError=0,n.hls.trigger(i.Events.BUFFER_APPENDED,{type:d,frag:f,part:h,chunkMeta:p,parent:f.type,timeRanges:r})},onError:function(e){a.logger.error("[buffer-controller]: Error encountered while trying to append to the "+d+" SourceBuffer",e);var t={type:o.ErrorTypes.MEDIA_ERROR,parent:f.type,details:o.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=o.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=o.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(a.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(i.Events.ERROR,t)}};l.append(E,d)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,o=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(i.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){a.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(o(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(o(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,o=t.part,s=[],l=o?o.elementaryStreams:r.elementaryStreams;l[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(l[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),l[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&a.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,o&&(o.stats.buffering.end=e);var t=o?o.stats:r.stats;n.hls.trigger(i.Events.FRAG_BUFFERED,{frag:r,part:o,stats:t,id:r.type})}),s)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return t.type&&t.type!==r||i&&!i.ended&&(i.ended=!0,a.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS")),e&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var e=n.mediaSource;e&&"open"===e.readyState&&e.endOfStream()}))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,a=this.sourceBuffer;if(n&&null!==t){var o=this.getSourceBufferTypes();if(o.length){var l=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(Object(r.isFiniteNumber)(l)&&!(l<0)){var c=n.currentTime,u=t.levelTargetDuration,d=Math.max(l,u),f=Math.floor(c/u)*u-d;o.forEach((function(n){var r=a[n];if(r){var o=s.BufferHelper.getBuffered(r);o.length>0&&f>o.start(0)&&(e.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:f}),t.live&&e.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:f}),e.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:f,type:n}))}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,i=this.mediaSource,o=e.fragments[0].start+e.totalduration,s=n.duration,l=Object(r.isFiniteNumber)(i.duration)?i.duration:0;e.live&&t.config.liveDurationInfinity?(a.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(e)):(o>l&&o>s||!Object(r.isFiniteNumber)(s))&&(a.logger.log("[buffer-controller]: Updating Media Source duration to "+o.toFixed(3)),i.duration=o)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var a=this.getSourceBufferTypes();if(0===a.length)return void this.hls.trigger(i.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)"});a.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var s in e)if(!t[s]){var l=e[s];if(!l)throw Error("source buffer exists for track "+s+", however track does not");var c=l.levelCodec||l.codec,u=l.container+";codecs="+c;a.logger.log("[buffer-controller]: creating sourceBuffer("+u+")");try{var d=t[s]=n.addSourceBuffer(u),f=s;this.addBufferListener(f,"updatestart",this._onSBUpdateStart),this.addBufferListener(f,"updateend",this._onSBUpdateEnd),this.addBufferListener(f,"error",this._onSBUpdateError),this.tracks[s]={buffer:d,codec:c,container:l.container,levelCodec:l.levelCodec,id:l.id},r++}catch(e){a.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:u})}}r&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){a.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var i=this.media,o=this.mediaSource,s=this.operationQueue,l=this.sourceBuffer[e];if(!i||!o||!l)return a.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(e);var c=Object(r.isFiniteNumber)(i.duration)?i.duration:1/0,u=Object(r.isFiniteNumber)(o.duration)?o.duration:1/0,d=Math.max(0,t),f=Math.min(n,c,u);f>d?(a.logger.log("[buffer-controller]: Removing ["+d+","+f+"] from the "+e+" SourceBuffer"),console.assert(!l.updating,e+" sourceBuffer must not be updating"),l.remove(d,f)):s.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return a.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,console.assert(!r.updating,t+" sourceBuffer must not be updating"),r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return a.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}()},"./src/controller/buffer-operation-queue.ts":
/*!**************************************************!*\
!*** ./src/controller/buffer-operation-queue.ts ***!
\**************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return i}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,i=t[e],a=n[e];if(a.length){var o=a[0];try{o.execute()}catch(t){r.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),o.onError(t),i&&i.updating||(a.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}()},"./src/controller/cap-level-controller.ts":
/*!************************************************!*\
!*** ./src/controller/cap-level-controller.ts ***!
\************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(e){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t,n,a,o=e.prototype;return o.setStreamController=function(e){this.streamController=e},o.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},o.registerListeners=function(){var e=this.hls;e.on(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.unregisterListener=function(){var e=this.hls;e.off(r.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},o.onFpsDropLevelCapping=function(t,n){e.isLevelAllowed(n.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(n.droppedLevel)},o.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null},o.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},o.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(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())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o<e.length;o+=1){var s=e[o];if((s.width>=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,a=[{key:"contentScaleFactor",get:function(){var e=1;try{e=self.devicePixelRatio}catch(e){}return e}}],(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*e.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*e.contentScaleFactor}}])&&i(t.prototype,n),a&&i(t,a),e}();t.default=a},"./src/controller/cmcd-controller.ts":
/*!*******************************************!*\
!*** ./src/controller/cmcd-controller.ts ***!
\*******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return f}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../types/cmcd */"./src/types/cmcd.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var f=function(){function e(t){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(e){try{n.apply(e,{ot:i.CMCDObjectType.MANIFEST,su:!n.initialized})}catch(e){o.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,r=n.hls.levels[t.level],a=n.getObjectType(t),s={d:1e3*t.duration,ot:a};a!==i.CMCDObjectType.VIDEO&&a!==i.CMCDObjectType.AUDIO&&a!=i.CMCDObjectType.MUXED||(s.br=r.bitrate/1e3,s.tb=n.getTopBandwidth(a),s.bl=n.getBufferLength(a)),n.apply(e,s)}catch(e){o.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=t;var r=this.config=t.config,a=r.cmcd;null!=a&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=a.sessionId||e.uuid(),this.cid=a.contentId,this.useHeaders=!0===a.useHeaders,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(r.Events.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(r.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},t.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,t){var n,r;this.audioBuffer=null===(n=t.tracks.audio)||void 0===n?void 0:n.buffer,this.videoBuffer=null===(r=t.tracks.video)||void 0===r?void 0:r.buffer},t.createData=function(){var e;return{v:i.CMCDVersion,sf:i.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:null===(e=this.media)||void 0===e?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(t,n){void 0===n&&(n={}),d(n,this.createData());var r=n.ot===i.CMCDObjectType.INIT||n.ot===i.CMCDObjectType.VIDEO||n.ot===i.CMCDObjectType.MUXED;if(this.starved&&r&&(n.bs=!0,n.su=!0,this.starved=!1),null==n.su&&(n.su=this.buffering),this.useHeaders){var a=e.toHeaders(n);if(!Object.keys(a).length)return;t.headers||(t.headers={}),d(t.headers,a)}else{var o=e.toQuery(n);if(!o)return;t.url=e.appendQueryToUri(t.url,o)}},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?i.CMCDObjectType.TIMED_TEXT:"initSegment"===e.sn?i.CMCDObjectType.INIT:"audio"===t?i.CMCDObjectType.AUDIO:"main"===t?this.hls.audioTracks.length?i.CMCDObjectType.VIDEO:i.CMCDObjectType.MUXED:void 0},t.getTopBandwidth=function(e){for(var t,n=0,r=c(e===i.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels);!(t=r()).done;){var a=t.value;a.bitrate>n&&(n=a.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===i.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*a.BufferHelper.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},l(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=c(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var d=o[l];d&&(u=d(u));var f=typeof u,h=void 0;h="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===f?l:"number"===f?l+"="+u:l+"="+JSON.stringify(u),n.push(h)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={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},o=0,s=Object.keys(t);o<s.length;o++){var l=s[o];i[null!=a[l]?a[l]:1][l]=t[l]}for(var c=0;c<i.length;c++){var u=e.serialize(i[c]);u&&(n["CMCD-"+r[c]]=u)}return n},e.toQuery=function(t){return"CMCD="+encodeURIComponent(e.serialize(t))},e.appendQueryToUri=function(e,t){if(!t)return e;var n=e.includes("?")?"&":"?";return""+e+n+t},e}()},"./src/controller/eme-controller.ts":
/*!******************************************!*\
!*** ./src/controller/eme-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(e){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=e,this._config=e.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var t,n,l,c=e.prototype;return c.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},c._registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c._unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(r.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this)},c.getLicenseServerUrl=function(e){switch(e){case o.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},c._attemptKeySystemAccess=function(e,t,n){var r=this,i=function(e,t,n,r){switch(e){case o.KeySystems.WIDEVINE:return function(e,t,n){var r={audioCapabilities:[],videoCapabilities:[]};return e.forEach((function(e){r.audioCapabilities.push({contentType:'audio/mp4; codecs="'+e+'"',robustness:n.audioRobustness||""})})),t.forEach((function(e){r.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"',robustness:n.videoRobustness||""})})),[r]}(t,n,r);default:throw new Error("Unknown key-system: "+e)}}(e,t,n,this._drmSystemOptions);a.logger.log("Requesting encrypted media key-system access");var s=this.requestMediaKeySystemAccess(e,i);this.mediaKeysPromise=s.then((function(t){return r._onMediaKeySystemAccessObtained(e,t)})),s.catch((function(t){a.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},c._onMediaKeySystemAccessObtained=function(e,t){var n=this;a.logger.log('Access for key-system "'+e+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(r);var i=Promise.resolve().then((function(){return t.createMediaKeys()})).then((function(t){return r.mediaKeys=t,a.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated(),t}));return i.catch((function(e){a.logger.error("Failed to create media-keys:",e)})),i},c._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},c._onNewMediaKeySession=function(e){var t=this;a.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(n){t._onKeySessionMessage(e,n.message)}),!1)},c._onKeySessionMessage=function(e,t){a.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){a.logger.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},c.onMediaEncrypted=function(e){var t=this;if(a.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),!this.mediaKeysPromise)return a.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var n=function(n){t._media&&(t._attemptSetMediaKeys(n),t._generateRequestWithPreferredKeySession(e.initDataType,e.initData))};this.mediaKeysPromise.then(n).catch(n)},c._attemptSetMediaKeys=function(e){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys)return a.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});a.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},c._generateRequestWithPreferredKeySession=function(e,t){var n=this,o=this._mediaKeysList[0];if(!o)return a.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(o.mediaKeysSessionInitialized)a.logger.warn("Key-Session already initialized but requested again");else{var s=o.mediaKeysSession;if(!s)return a.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return a.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});a.logger.log('Generating key-session request for "'+e+'" init data type'),o.mediaKeysSessionInitialized=!0,s.generateRequest(e,t).then((function(){a.logger.debug("Key-session generation succeeded")})).catch((function(e){a.logger.error("Error generating key-session request:",e),n.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},c._createLicenseXhr=function(e,t,n){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,e,t,n);var i=this._licenseXhrSetup;if(i)try{i.call(this.hls,r,e),i=void 0}catch(e){a.logger.error(e)}try{r.readyState||r.open("POST",e,!0),i&&i.call(this.hls,r,e)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return r},c._onLicenseRequestReadyStageChange=function(e,t,n,o){switch(e.readyState){case 4:if(200===e.status){this._requestLicenseFailureCount=0,a.logger.log("License request succeeded");var s=e.response,l=this._licenseResponseCallback;if(l)try{s=l.call(this.hls,e,t)}catch(e){a.logger.error(e)}o(s)}else{if(a.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;a.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(n,o)}}},c._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case o.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},c._requestLicense=function(e,t){a.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return a.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var o=this.getLicenseServerUrl(n.mediaKeySystemDomain),s=this._createLicenseXhr(o,e,t);a.logger.log("Sending license request to URL: "+o);var l=this._generateLicenseRequestChallenge(n,e);s.send(l)}catch(e){a.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},c.onMediaAttached=function(e,t){if(this._emeEnabled){var n=t.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)}},c.onMediaDetached=function(){var e=this._media,t=this._mediaKeysList;e&&(e.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map((function(e){if(e.mediaKeysSession)return e.mediaKeysSession.close().catch((function(){}))}))).then((function(){return e.setMediaKeys(null)})).catch((function(){})))},c.onManifestParsed=function(e,t){if(this._emeEnabled){var n=t.levels.map((function(e){return e.audioCodec})).filter((function(e){return!!e})),r=t.levels.map((function(e){return e.videoCodec})).filter((function(e){return!!e}));this._attemptKeySystemAccess(o.KeySystems.WIDEVINE,n,r)}},t=e,(n=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&s(t.prototype,n),l&&s(t,l),e}();t.default=l},"./src/controller/fps-controller.ts":
/*!******************************************!*\
!*** ./src/controller/fps-controller.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(r.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(r.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var a=performance.now();if(t){if(this.lastTime){var o=a-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/o,u=this.hls;if(u.trigger(r.Events.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){var d=u.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===u.autoLevelCapping||u.autoLevelCapping>=d)&&(d-=1,u.trigger(r.Events.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:u.currentLevel}),u.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=a,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();t.default=a},"./src/controller/fragment-finders.ts":
/*!********************************************!*\
!*** ./src/controller/fragment-finders.ts ***!
\********************************************/
/*! exports provided: findFragmentByPDT, findFragmentByPTS, fragmentWithinToleranceTest, pdtWithinToleranceTest, findFragWithCC */function(e,t,n){"use strict";n.r(t),n.d(t,"findFragmentByPDT",(function(){return a})),n.d(t,"findFragmentByPTS",(function(){return o})),n.d(t,"fragmentWithinToleranceTest",(function(){return s})),n.d(t,"pdtWithinToleranceTest",(function(){return l})),n.d(t,"findFragWithCC",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/binary-search */"./src/utils/binary-search.ts");function a(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(r.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var i=0;i<e.length;++i){var a=e[i];if(l(t,n,a))return a}return null}function o(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var a=null;if(e?a=t[e.sn-t[0].sn+1]||null:0===n&&0===t[0].start&&(a=t[0]),a&&0===s(n,r,a))return a;var o=i.default.search(t,s.bind(null,n,r));return o||a}function s(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function l(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}function c(e,t){return i.default.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}},"./src/controller/fragment-tracker.ts":
/*!********************************************!*\
!*** ./src/controller/fragment-tracker.ts ***!
\********************************************/
/*! exports provided: FragmentState, FragmentTracker */function(e,t,n){"use strict";n.r(t),n.d(t,"FragmentState",(function(){return r})),n.d(t,"FragmentTracker",(function(){return o}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../types/loader */"./src/types/loader.ts");!function(e){e.NOT_LOADED="NOT_LOADED",e.BACKTRACKED="BACKTRACKED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(r||(r={}));var o=function(){function e(e){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=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){if(t===a.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var o=r[i],s=o?o.end:n.appendedPTS;if(o.start<=e&&void 0!==s&&e<=s)return i>9&&(this.activeParts=r.slice(i-9)),o}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=l(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.backtrack=o.loaded=null,Object.keys(o.range).length?o.buffered=!0:this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=l(e),n=this.fragments[t];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,c=0;c<r.length;c++){var u=r.start(c)-this.bufferPadding,d=r.end(c)+this.bufferPadding;if(l>=u&&s<=d){i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});break}if(a<d&&o>u)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(c)),endPTS:Math.min(o,r.end(c))});else if(o<=u)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,l=this.fragments;return Object.keys(l).forEach((function(c){var u=l[c];u&&s(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.getState=function(e){var t=l(e),n=this.fragments[t];return n?n.buffered?s(n)?r.PARTIAL:r.OK:n.backtrack?r.BACKTRACKED:r.APPENDING:r.NOT_LOADED},t.backtrack=function(e,t){var n=l(e),r=this.fragments[n];if(!r||r.backtrack)return null;var i=r.backtrack=t||r.loaded;return r.loaded=null,i},t.getBacktrackData=function(e){var t=l(e),n=this.fragments[t];if(n){var r,i=n.backtrack;if(null!=i&&null!==(r=i.payload)&&void 0!==r&&r.byteLength)return i;this.removeFragment(e)}return null},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=l(n);this.fragments[i]={body:n,loaded:t,backtrack:null,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,o=t.timeRanges;if(r.type===a.PlaylistLevelType.MAIN)if(this.activeFragment=r,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=o,Object.keys(o).forEach((function(e){var t=o[e];if(n.detectEvictedFragments(e,t),!i)for(var a=0;a<t.length;a++)r.appendedPTS=Math.max(t.end(a),r.appendedPTS||0)}))},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=l(e);return!!this.fragments[t]},t.removeFragmentsInRange=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a&&a.buffered){var o=a.body;o.type===n&&o.start<t&&o.end>e&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=l(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),delete this.fragments[t]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function s(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function l(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}},"./src/controller/gap-controller.ts":
/*!******************************************!*\
!*** ./src/controller/gap-controller.ts ***!
\******************************************/
/*! exports provided: STALL_MINIMUM_DURATION_MS, MAX_START_GAP_JUMP, SKIP_BUFFER_HOLE_STEP_SECONDS, SKIP_BUFFER_RANGE_START, default */function(e,t,n){"use strict";n.r(t),n.d(t,"STALL_MINIMUM_DURATION_MS",(function(){return s})),n.d(t,"MAX_START_GAP_JUMP",(function(){return l})),n.d(t,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),n.d(t,"SKIP_BUFFER_RANGE_START",(function(){return u})),n.d(t,"default",(function(){return d}));var r=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=250,l=2,c=.1,u=.05,d=function(){function e(e,t,n,r){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=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.hls=this.fragmentTracker=this.media=null},t.poll=function(e){var t=this.config,n=this.media,i=this.stalled,a=n.currentTime,c=n.seeking,u=this.seeking&&!c,d=!this.seeking&&c;if(this.seeking=c,a===e){if((d||u)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&r.BufferHelper.getBuffered(n).length){var f=r.BufferHelper.bufferInfo(n,a,0),h=f.len>0,p=f.nextStart||0;if(h||p){if(c){var m=f.len>l,v=!p||p-a>l&&!this.fragmentTracker.getPartialFragment(a);if(m||v)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var g,y=Math.max(p,f.start||0)-a,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,_=(null==b||null===(g=b.details)||void 0===g?void 0:g.live)?2*b.details.targetduration:l;if(y>0&&y<=_)return void this._trySkipBufferHole(null)}var E=self.performance.now();if(null!==i){var x=E-i;!c&&x>=s&&this._reportStall(f.len);var S=r.BufferHelper.bufferInfo(n,a,t.maxBufferHole);this._tryFixBufferStall(S,x)}else this.stalled=E}}}else if(this.moved=!0,null!==i){if(this.stallReported){var w=self.performance.now()-i;o.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(w)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(o.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,o.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer (buffer="+e+")"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,s=this.media,l=s.currentTime,d=0,f=r.BufferHelper.getBuffered(s),h=0;h<f.length;h++){var p=f.start(h);if(l+t.maxBufferHole>=d&&l<p){var m=Math.max(p+u,s.currentTime+c);return o.logger.warn("skipping hole, adjusting currentTime from "+l+" to "+m),this.moved=!0,this.stalled=null,s.currentTime=m,e&&n.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+l+" to "+m,frag:e}),m}d=f.end(h)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=n.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<e.nudgeMaxRetry){var l=r+s*e.nudgeOffset;o.logger.warn("Nudging 'currentTime' from "+r+" to "+l),n.currentTime=l,t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else o.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}()},"./src/controller/id3-track-controller.ts":
/*!************************************************!*\
!*** ./src/controller/id3-track-controller.ts ***!
\************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners()},t._registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},t._unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(Object(i.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null)},t.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Object(i.sendAddTrackEvent)(n,this.media),n}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var n=t.frag,r=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,o=0;o<r.length;o++){var s=a.getID3Frames(r[o].data);if(s){var l=r[o].pts,c=o<r.length-1?r[o+1].pts:n.end;c-l<=0&&(c=l+.25);for(var u=0;u<s.length;u++){var d=s[u];if(!a.isTimeStampFrame(d)){var f=new i(l,c,"");f.value=d,this.id3Track.addCue(f)}}}}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,a=t.type;if(!a||"audio"===a){var o=this.id3Track;o&&Object(i.removeCuesInRange)(o,n,r)}},e}();t.default=o},"./src/controller/latency-controller.ts":
/*!**********************************************!*\
!*** ./src/controller/latency-controller.ts ***!
\**********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../errors */"./src/errors.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts");function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}var t,n,s,l=e.prototype;return l.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},l.registerListeners=function(){this.hls.on(i.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(i.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){this.hls.off(i.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(i.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(i.Events.ERROR,this.onError)},l.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},l.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},l.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},l.onLevelUpdated=function(e,t){var n=t.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},l.onError=function(e,t){t.details===r.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,a.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},l.timeupdate=function(){var e=this.media,t=this.levelDetails;if(e&&t){this.currentTime=e.currentTime;var n=this.computeLatency();if(null!==n){this._latency=n;var r=this.config,i=r.lowLatencyMode,a=r.maxLiveSyncPlaybackRate;if(i&&1!==a){var o=this.targetLatency;if(null!==o){var s=n-o,l=s<Math.min(this.maxLatency,o+t.targetduration);if(t.live&&l&&s>.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,a)),u=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(c,Math.max(1,u))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},l.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},l.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,c=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===c)&&(c=void 0!==a?a:o*r);var u=r;return c+Math.min(1*this.stallCount,u)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return n?e.buffered.end(n-1):t.edge-this.currentTime}}])&&o(t.prototype,n),s&&o(t,s),e}()},"./src/controller/level-controller.ts":
/*!********************************************!*\
!*** ./src/controller/level-controller.ts ***!
\********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return p}));var r=n(/*! ../types/level */"./src/types/level.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),s=n(/*! ./level-helper */"./src/controller/level-helper.ts"),l=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts");function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),p=function(e){var t,n;function l(t){var n;return(n=e.call(this,t,"[level-controller]")||this)._levels=[],n._firstLevel=-1,n._startLevel=void 0,n.currentLevelIndex=-1,n.manualLevelIndex=-1,n.onParsedComplete=void 0,n._registerListeners(),n}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n);var p,m,v,g=l.prototype;return g._registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(i.Events.ERROR,this.onError,this)},g._unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(i.Events.ERROR,this.onError,this)},g.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,e.prototype.destroy.call(this)},g.startLoad=function(){this._levels.forEach((function(e){e.loadError=0})),e.prototype.startLoad.call(this)},g.onManifestLoaded=function(e,t){var n,l,c=[],u=[],d=[],f={},p=!1,m=!1,v=!1;if(t.levels.forEach((function(e){var t=e.attrs;p=p||!(!e.width||!e.height),m=m||!!e.videoCodec,v=v||!!e.audioCodec,h&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0);var n=e.bitrate+"-"+e.attrs.RESOLUTION+"-"+e.attrs.CODECS;(l=f[n])?l.url.push(e.url):(l=new r.Level(e),f[n]=l,c.push(l)),t&&(t.AUDIO&&Object(s.addGroupId)(l,"audio",t.AUDIO),t.SUBTITLES&&Object(s.addGroupId)(l,"text",t.SUBTITLES))})),(p||m)&&v&&(c=c.filter((function(e){var t=e.videoCodec,n=e.width,r=e.height;return!!t||!(!n||!r)}))),c=c.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||Object(o.isCodecSupportedInMp4)(t,"audio"))&&(!n||Object(o.isCodecSupportedInMp4)(n,"video"))})),t.audioTracks&&(u=t.audioTracks.filter((function(e){return!e.audioCodec||Object(o.isCodecSupportedInMp4)(e.audioCodec,"audio")})),Object(s.assignTrackIdsByGroup)(u)),t.subtitles&&(d=t.subtitles,Object(s.assignTrackIdsByGroup)(d)),c.length>0){n=c[0].bitrate,c.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=c;for(var g=0;g<c.length;g++)if(c[g].bitrate===n){this._firstLevel=g,this.log("manifest loaded, "+c.length+" level(s) found, first bitrate: "+n);break}var y=v&&!m,b={levels:c,audioTracks:u,subtitleTracks:d,firstLevel:this._firstLevel,stats:t.stats,audio:v,video:m,altAudio:!y&&u.some((function(e){return!!e.url}))};this.hls.trigger(i.Events.MANIFEST_PARSED,b),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,reason:"no level with compatible codecs found in manifest"})},g.onError=function(t,n){if(e.prototype.onError.call(this,t,n),!n.fatal){var r=n.context,i=this._levels[this.currentLevelIndex];if(r&&(r.type===c.PlaylistContextType.AUDIO_TRACK&&i.audioGroupIds&&r.groupId===i.audioGroupIds[i.urlId]||r.type===c.PlaylistContextType.SUBTITLE_TRACK&&i.textGroupIds&&r.groupId===i.textGroupIds[i.urlId]))this.redundantFailover(this.currentLevelIndex);else{var o,s=!1,l=!0;switch(n.details){case a.ErrorDetails.FRAG_LOAD_ERROR:case a.ErrorDetails.FRAG_LOAD_TIMEOUT:case a.ErrorDetails.KEY_LOAD_ERROR:case a.ErrorDetails.KEY_LOAD_TIMEOUT:if(n.frag){var u=this._levels[n.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(o=n.frag.level)):o=n.frag.level}break;case a.ErrorDetails.LEVEL_LOAD_ERROR:case a.ErrorDetails.LEVEL_LOAD_TIMEOUT:r&&(r.deliveryDirectives&&(l=!1),o=r.level),s=!0;break;case a.ErrorDetails.REMUX_ALLOC_ERROR:o=n.level,s=!0}void 0!==o&&this.recoverLevel(n,o,s,l)}}},g.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError<o)e.levelRetry=!0,this.redundantFailover(t);else if(-1===this.manualLevelIndex){var s=0===t?this._levels.length-1:t-1;this.currentLevelIndex!==s&&0===this._levels[s].loadError&&(this.warn(i+": switch to "+s),e.levelRetry=!0,this.hls.nextAutoLevel=s)}}},g.redundantFailover=function(e){var t=this._levels[e],n=t.url.length;if(n>1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},g.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===c.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},g.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},g.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a<n.audioGroupIds.length;a++)if(n.audioGroupIds[a]===i){r=a;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},g.loadPlaylist=function(e){var t=this.currentLevelIndex,n=this._levels[t];if(this.canLoad&&n&&n.url.length>0){var r=n.urlId,a=n.url[r];if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+t+(e?" at sn "+e.msn+" part "+e.part:"")+" with URL-id "+r+" "+a),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:a,level:t,id:r,deliveryDirectives:e||null})}},g.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:r})},p=l,(m=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.OTHER_ERROR,details:a.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var o=this.currentLevelIndex,s=n[o],l=n[e];this.log("switching to level "+e+" from "+o),this.currentLevelIndex=e;var c=u({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var d=l.details;if(!d||d.live){var f=this.switchParams(l.uri,null==s?void 0:s.details);this.loadPlaylist(f)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&d(p.prototype,m),v&&d(p,v),l}(l.default)},"./src/controller/level-helper.ts":
/*!****************************************!*\
!*** ./src/controller/level-helper.ts ***!
\****************************************/
/*! exports provided: addGroupId, assignTrackIdsByGroup, updatePTS, updateFragPTSDTS, mergeDetails, mapPartIntersection, mapFragmentIntersection, adjustSliding, addSliding, computeReloadInterval, getFragmentWithSN, getPartWith */function(e,t,n){"use strict";n.r(t),n.d(t,"addGroupId",(function(){return a})),n.d(t,"assignTrackIdsByGroup",(function(){return o})),n.d(t,"updatePTS",(function(){return s})),n.d(t,"updateFragPTSDTS",(function(){return c})),n.d(t,"mergeDetails",(function(){return u})),n.d(t,"mapPartIntersection",(function(){return d})),n.d(t,"mapFragmentIntersection",(function(){return f})),n.d(t,"adjustSliding",(function(){return h})),n.d(t,"addSliding",(function(){return p})),n.d(t,"computeReloadInterval",(function(){return m})),n.d(t,"getFragmentWithSN",(function(){return v})),n.d(t,"getPartWith",(function(){return g}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts");function a(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function o(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function s(e,t,n){l(e[t],e[n])}function l(e,t){var n=t.startPTS;if(Object(r.isFiniteNumber)(n)){var i,a=0;t.sn>e.sn?(a=n-e.start,i=e):(a=e.start-n,i=t),i.duration!==a&&(i.duration=a)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function c(e,t,n,a,o,s){a-n<=0&&(i.logger.warn("Fragment should have a positive duration",t),a=n+t.duration,s=o+t.duration);var c=n,u=a,d=t.startPTS,f=t.endPTS;if(Object(r.isFiniteNumber)(d)){var h=Math.abs(d-n);Object(r.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(h,t.deltaPTS):t.deltaPTS=h,c=Math.max(n,d),n=Math.min(n,d),o=Math.min(o,t.startDTS),u=Math.min(a,f),a=Math.max(a,f),s=Math.max(s,t.endDTS)}t.duration=a-n;var p=n-t.start;t.appendedPTS=a,t.start=t.startPTS=n,t.maxStartPTS=c,t.startDTS=o,t.endPTS=a,t.minEndPTS=u,t.endDTS=s;var m,v=t.sn;if(!e||v<e.startSN||v>e.endSN)return 0;var g=v-e.startSN,y=e.fragments;for(y[g]=t,m=g;m>0;m--)l(y[m],y[m-1]);for(m=g;m<y.length-1;m++)l(y[m],y[m+1]);return e.fragmentHint&&l(y[y.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,p}function u(e,t){for(var n=null,a=e.fragments,o=a.length-1;o>=0;o--){var s=a[o].initSegment;if(s){n=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var l,u=0;if(f(e,t,(function(e,i){e.relurl&&(u=e.cc-i.cc),Object(r.isFiniteNumber)(e.startPTS)&&Object(r.isFiniteNumber)(e.endPTS)&&(i.start=i.startPTS=e.startPTS,i.startDTS=e.startDTS,i.appendedPTS=e.appendedPTS,i.maxStartPTS=e.maxStartPTS,i.endPTS=e.endPTS,i.endDTS=e.endDTS,i.minEndPTS=e.minEndPTS,i.duration=e.endPTS-e.startPTS,i.duration&&(l=i),t.PTSKnown=t.alignedSliding=!0),i.elementaryStreams=e.elementaryStreams,i.loader=e.loader,i.stats=e.stats,i.urlId=e.urlId,e.initSegment&&(i.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=t.skippedSegments;p--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var m=t.fragments;if(u){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var v=0;v<m.length;v++)m[v].cc+=u}t.skippedSegments&&(t.startCC=t.fragments[0].cc),d(e.partList,t.partList,(function(e,t){t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),l?c(t,l,l.startPTS,l.endPTS,l.startDTS,l.endDTS):h(e,t),m.length&&(t.totalduration=t.edge-m[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var g=t.advancedDateTime;if(t.advanced&&g){var y=t.edge;t.driftStart||(t.driftStartTime=g,t.driftStart=y),t.driftEndTime=g,t.driftEnd=y}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function d(e,t,n){if(e&&t)for(var r=0,i=0,a=e.length;i<=a;i++){var o=e[i],s=t[i+r];o&&s&&o.index===s.index&&o.fragment.sn===s.fragment.sn?n(o,s):r--}}function f(e,t,n){for(var r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,c=i;c<=a;c++){var u=l[o+c],d=s[c];r&&!d&&c<r&&(d=t.fragments[c]=u),u&&d&&n(u,d)}}function h(e,t){var n=t.startSN+t.skippedSegments-e.startSN,r=e.fragments;n<0||n>=r.length||p(t,r[n].start)}function p(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r<n.length;r++)n[r].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function m(e,t){var n,r=1e3*e.levelTargetDuration,i=r/2,a=e.age,o=a>0&&a<3*r,s=t.loading.end-t.loading.start,l=e.availabilityDelay;if(!1===e.updated)if(o){var c=333*e.misses;n=Math.max(Math.min(i,2*s),c),e.availabilityDelay=(e.availabilityDelay||0)+n}else n=i;else o?(l=Math.min(l||r/2,a),e.availabilityDelay=l,n=l+r-a):n=r-s;return Math.round(n)}function v(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t<r.startSN&&n&&n.sn===t?n:null)}function g(e,t,n){if(!e||!e.details)return null;var r=e.details.partList;if(r)for(var i=r.length;i--;){var a=r[i];if(a.index===n&&a.fragment.sn===t)return a}return null}},"./src/controller/stream-controller.ts":
/*!*********************************************!*\
!*** ./src/controller/stream-controller.ts ***!
\*********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),a=n(/*! ../is-supported */"./src/is-supported.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),l=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),d=n(/*! ../demux/transmuxer-interface */"./src/demux/transmuxer-interface.ts"),f=n(/*! ../types/transmuxer */"./src/types/transmuxer.ts"),h=n(/*! ./gap-controller */"./src/controller/gap-controller.ts"),p=n(/*! ../errors */"./src/errors.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){var t,n;function y(t,n){var r;return(r=e.call(this,t,n,"[stream-controller]")||this).audioCodecSwap=!1,r.gapController=null,r.level=-1,r._forceStartLoad=!1,r.altAudio=!1,r.audioOnly=!1,r.fragPlaying=null,r.onvplaying=null,r.onvseeked=null,r.fragLastKbps=0,r.stalled=!1,r.couldBacktrack=!1,r.audioCodecSwitch=!1,r.videoBuffer=null,r._registerListeners(),r}n=e,(t=y).prototype=Object.create(n.prototype),t.prototype.constructor=t,g(t,n);var b,_,E,x=y.prototype;return x._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},x.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},x.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},x.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var a,o=self.performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},x.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},x.doTickIdle=function(){var e,t,n=this.hls,r=this.levelLastLoaded,a=this.levels,s=this.media,d=n.config,f=n.nextLoadLevel;if(null!==r&&(s||!this.startFragRequested&&d.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&a&&a[f]){var h=a[f];this.level=n.nextLoadLevel=f;var p=h.details;if(!p||this.state===i.State.WAITING_LEVEL||p.live&&this.levelLastLoaded!==f)this.state=i.State.WAITING_LEVEL;else{var m=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:s,c.PlaylistLevelType.MAIN);if(null!==m&&!(m.len>=this.getMaxBufferLength(h.maxBitrate))){if(this._streamEnded(m,p)){var v={};return this.altAudio&&(v.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,v),void(this.state=i.State.ENDED)}var g=m.end,y=this.getNextFragment(g,p);if(this.couldBacktrack&&!this.fragPrevious&&y&&"initSegment"!==y.sn){var b=y.sn-p.startSN;b>1&&(y=p.fragments[b-1],this.fragmentTracker.removeFragment(y))}if(y&&this.fragmentTracker.getState(y)===l.FragmentState.OK&&this.nextLoadPosition>g){var _=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(s,_,c.PlaylistLevelType.MAIN),y=this.getNextFragment(this.nextLoadPosition,p)}y&&(!y.initSegment||y.initSegment.data||this.bitrateTest||(y=y.initSegment),"identity"!==(null===(e=y.decryptdata)||void 0===e?void 0:e.keyFormat)||null!==(t=y.decryptdata)&&void 0!==t&&t.key?this.loadFragment(y,p,g):this.loadKey(y,p))}}}},x.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);if(this.fragCurrent=t,a===l.FragmentState.BACKTRACKED){var o=this.fragmentTracker.getBacktrackData(t);if(o)return this._handleFragmentLoadProgress(o),void this._handleFragmentLoadComplete(o);a=l.FragmentState.NOT_LOADED}a===l.FragmentState.NOT_LOADED||a===l.FragmentState.PARTIAL?"initSegment"===t.sn?this._loadInitSegment(t):this.bitrateTest?(t.bitrateTest=!0,this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===l.FragmentState.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},x.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,c.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},x.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,c.PlaylistLevelType.MAIN)},x.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},x.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},x.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,c=s.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}},x.abortCurrentFrag=function(){var e=this.fragCurrent;this.fragCurrent=null,null!=e&&e.loader&&e.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},x.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},x.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new h.default(this.config,r,this.fragmentTracker,this.hls)},x.onMediaDetaching=function(){var t=this.media;t&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},x.onMediaPlaying=function(){this.tick()},x.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;Object(r.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},x.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},x.onManifestParsed=function(e,t){var n,r=!1,i=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(r=!0),-1!==n.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=r&&i&&!Object(a.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},x.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===i.State.IDLE){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=i.State.WAITING_LEVEL)}},x.onLevelLoaded=function(e,t){var n,r=this.levels,a=t.level,s=t.details,l=s.totalduration;if(r){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+l);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==t.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var u=r[a],d=0;if(s.live||null!==(n=u.details)&&void 0!==n&&n.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;d=this.alignPlaylists(s,u.details)}if(u.details=s,this.levelLastLoaded=a,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:s,level:a}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,d),this.tick()}else this.warn("Levels were reset while loading level "+a)},x._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,h=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),m=this.transmuxer=this.transmuxer||new d.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),v=r?r.index:-1,g=-1!==v,y=new f.ChunkMetadata(n.level,n.sn,n.stats.chunkCount,i.byteLength,v,g),b=this.initPTS[n.cc];m.push(i,h,p,l,n,r,s.totalduration,u,y,b)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},x.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;null!=a&&a.loader&&(this.log("Switching to main audio track, cancel main fragment load"),a.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},x.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},x.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},x.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var a=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},x.onError=function(e,t){switch(t.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,t);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(t.fatal?(this.warn(""+t.details),this.state=i.State.ERROR):t.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=!0,r=this.getFwdBufferInfo(this.media,c.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}},x.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){var n=s.BufferHelper.getBuffered(e);!this.loadedmetadata&&n.length?(this.loadedmetadata=!0,this.seekToStartPos()):t.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime}},x.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},x.onBufferFlushed=function(e,t){var n=t.type;if(n!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,c.PlaylistLevelType.MAIN)}},x.onLevelsUpdated=function(e,t){this.levels=t.levels},x.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},x.seekToStartPos=function(){var e=this.media,t=e.currentTime,n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void m.logger.log("could not seek to "+n+", already seeking at "+t);var r=s.BufferHelper.getBuffered(e),i=(r.length?r.start(0):0)-n;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(m.logger.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+t),e.currentTime=n}},x._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},x._loadBitrateTestFrag=function(e){var t=this;this._doFragLoad(e).then((function(n){var r=t.hls;if(n&&!r.nextLoadLevel&&!t.fragContextChanged(e)){t.fragLoadError=0,t.state=i.State.IDLE,t.startFragRequested=!1,t.bitrateTest=!1;var a=e.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),r.trigger(o.Events.FRAG_LOADED,n)}}))},x._handleTransmuxComplete=function(e){var t,n="main",a=this.hls,s=e.remuxResult,l=e.chunkMeta,c=this.getCurrentContext(l);if(!c)return this.warn("The loading context changed while buffering fragment "+l.sn+" of level "+l.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(l.level);var d=c.frag,f=c.part,h=c.level,p=s.video,m=s.text,v=s.id3,g=s.initSegment,y=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(d)){if(this.state=i.State.PARSING,g){g.tracks&&(this._bufferInitSegment(h,g.tracks,d,l),a.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:d,id:n,tracks:g.tracks}));var b=g.initPTS,_=g.timescale;Object(r.isFiniteNumber)(b)&&(this.initPTS[d.cc]=b,a.trigger(o.Events.INIT_PTS_FOUND,{frag:d,id:n,initPTS:b,timescale:_}))}if(p&&!1!==s.independent){if(h.details){var E=p.startPTS,x=p.endPTS,S=p.startDTS,w=p.endDTS;if(f)f.elementaryStreams[p.type]={startPTS:E,endPTS:x,startDTS:S,endDTS:w};else if(p.firstKeyFrame&&p.independent&&(this.couldBacktrack=!0),p.dropped&&p.independent){if(this.getLoadPosition()+this.config.maxBufferHole<E)return void this.backtrack(d);d.setElementaryStreamInfo(p.type,d.start,x,d.start,w,!0)}d.setElementaryStreamInfo(p.type,E,x,S,w),this.bufferFragmentData(p,d,f,l)}}else if(!1===s.independent)return void this.backtrack(d);if(y){var k=y.startPTS,T=y.endPTS,O=y.startDTS,C=y.endDTS;f&&(f.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:k,endPTS:T,startDTS:O,endDTS:C}),d.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,k,T,O,C),this.bufferFragmentData(y,d,f,l)}if(null!=v&&null!==(t=v.samples)&&void 0!==t&&t.length){var A={frag:d,id:n,samples:v.samples};a.trigger(o.Events.FRAG_PARSING_METADATA,A)}if(m){var L={frag:d,id:n,samples:m.samples};a.trigger(o.Events.FRAG_PARSING_USERDATA,L)}}},x._bufferInitSegment=function(e,t,n,r){var a=this;if(this.state===i.State.PARSING){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var s=t.audio,l=t.video,c=t.audiovideo;if(s){var u=e.audioCodec,d=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===d.indexOf("firefox")&&(u="mp4a.40.5")),-1!==d.indexOf("android")&&"audio/mpeg"!==s.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),e.audioCodec&&e.audioCodec!==u&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+u+'"'),s.levelCodec=u,s.id="main",this.log("Init audio buffer, container:"+s.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(e.audioCodec||"")+"/"+s.codec+"]")}l&&(l.levelCodec=e.videoCodec,l.id="main",this.log("Init video buffer, container:"+l.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+l.codec+"]")),c&&this.log("Init audiovideo buffer, container:"+c.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+c.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var i=t[e].initSegment;null!=i&&i.byteLength&&a.hls.trigger(o.Events.BUFFER_APPENDING,{type:e,data:i,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tick()}},x.backtrack=function(e){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(e);var t=this.fragmentTracker.backtrack(e);this.fragPrevious=null,this.nextLoadPosition=e.start,t?this.resetFragmentLoading(e):this.state=i.State.BACKTRACKING},x.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var n=e.currentTime;if(s.BufferHelper.isBuffered(e,n)?t=this.getAppendedFrag(n):s.BufferHelper.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=t)}}},b=y,(_=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var t=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(t)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&v(b.prototype,_),E&&v(b,E),y}(i.default)},"./src/controller/subtitle-stream-controller.ts":
/*!******************************************************!*\
!*** ./src/controller/subtitle-stream-controller.ts ***!
\******************************************************/
/*! exports provided: SubtitleStreamController */function(e,t,n){"use strict";n.r(t),n.d(t,"SubtitleStreamController",(function(){return m}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a=n(/*! ../utils/buffer-helper */"./src/utils/buffer-helper.ts"),o=n(/*! ./fragment-finders */"./src/controller/fragment-finders.ts"),s=n(/*! ../utils/discontinuities */"./src/utils/discontinuities.ts"),l=n(/*! ./level-helper */"./src/controller/level-helper.ts"),c=n(/*! ./fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./base-stream-controller */"./src/controller/base-stream-controller.ts"),d=n(/*! ../types/loader */"./src/types/loader.ts"),f=n(/*! ../types/level */"./src/types/level.ts");function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=function(e){var t,n;function m(t,n){var r;return(r=e.call(this,t,n,"[subtitle-stream-controller]")||this).levels=[],r.currentTrackId=-1,r.tracksBuffered=[],r.mainDetails=null,r._registerListeners(),r}n=e,(t=m).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var v,g,y,b=m.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(r.Events.ERROR,this.onError,this),e.on(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(r.Events.ERROR,this.onError,this),e.off(r.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(r.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(r.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(r.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=u.State.IDLE,this.setInterval(500),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(e,t){this.mainDetails=t.details},b.onSubtitleFragProcessed=function(e,t){var n=t.frag,r=t.success;if(this.fragPrevious=n,this.state=u.State.IDLE,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var a,o=n.start,s=0;s<i.length;s++)if(o>=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},b.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=o)e.shift();else{if(!(e[t].start<o))break;e[t].start=o,t++}})),this.fragmentTracker.removeFragmentsInRange(n,o,d.PlaylistLevelType.SUBTITLE)}},b.onError=function(e,t){var n,r=t.frag;r&&r.type===d.PlaylistLevelType.SUBTITLE&&(null!==(n=this.fragCurrent)&&void 0!==n&&n.loader&&this.fragCurrent.loader.abort(),this.state=u.State.IDLE)},b.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks;this.tracksBuffered=[],this.levels=r.map((function(e){return new f.Level(e)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(e){n.tracksBuffered[e.id]=[]})),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(e,t){if(this.currentTrackId=t.id,this.levels.length&&-1!==this.currentTrackId){var n=this.levels[this.currentTrackId];null!=n&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(500)}else this.clearInterval()},b.onSubtitleTrackLoaded=function(e,t){var n,r=t.details,i=t.id,a=this.currentTrackId,c=this.levels;if(c.length){var d=c[a];if(!(i>=c.length||i!==a)&&d){if(this.mediaBuffer=this.mediaBufferTimeRanges,r.live||null!==(n=d.details)&&void 0!==n&&n.live){var f=this.mainDetails;if(r.deltaUpdateFailed||!f)return;var h=f.fragments[0];d.details?0===this.alignPlaylists(r,d.details)&&h&&Object(l.addSliding)(r,h.start):r.hasProgramDateTime&&f.hasProgramDateTime?Object(s.alignMediaPlaylistByPDT)(r,f):h&&Object(l.addSliding)(r,h.start)}d.details=r,this.levelLastLoaded=i,this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE&&(Object(o.findFragmentByPTS)(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),d.details=void 0))}}},b._handleFragmentLoadComplete=function(e){var t=e.frag,n=e.payload,i=t.decryptdata,a=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var o=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(n),i.key.buffer,i.iv.buffer).then((function(e){var n=performance.now();a.trigger(r.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:o,tdecrypt:n}})}))}},b.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var e,t=this.currentTrackId,n=this.levels;if(!n.length||!n[t]||!n[t].details)return;var s=n[t].details,l=s.targetduration,d=this.config,f=this.media,h=a.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,f.currentTime-l,d.maxBufferHole),p=h.end;if(h.len>this.getMaxBufferLength()+l)return;console.assert(s,"Subtitle track details are defined on idle subtitle stream controller tick");var m,v=s.fragments,g=v.length,y=s.edge,b=this.fragPrevious;if(p<y){var _=d.maxFragLookUpTolerance;b&&s.hasProgramDateTime&&(m=Object(o.findFragmentByPDT)(v,b.endProgramDateTime,_)),m||!(m=Object(o.findFragmentByPTS)(b,v,p,_))&&b&&b.start<v[0].start&&(m=v[0])}else m=v[g-1];null!==(e=m)&&void 0!==e&&e.encrypted?(i.logger.log("Loading key for "+m.sn),this.state=u.State.KEY_LOADING,this.hls.trigger(r.Events.KEY_LOADING,{frag:m})):m&&this.fragmentTracker.getState(m)===c.FragmentState.NOT_LOADED&&this.loadFragment(m,s,p)}}else this.state=u.State.IDLE},b.loadFragment=function(t,n,r){this.fragCurrent=t,e.prototype.loadFragment.call(this,t,n,r)},v=m,(g=[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}])&&h(v.prototype,g),y&&h(v,y),m}(u.default)},"./src/controller/subtitle-track-controller.ts":
/*!*****************************************************!*\
!*** ./src/controller/subtitle-track-controller.ts ***!
\*****************************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),a=n(/*! ./base-playlist-controller */"./src/controller/base-playlist-controller.ts"),o=n(/*! ../types/loader */"./src/types/loader.ts");function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(e){var t,n;function a(t){var n;return(n=e.call(this,t,"[subtitle-track-controller]")||this).media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n.subtitleDisplay=!0,n.registerListeners(),n}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n);var c,d,f,h=a.prototype;return h.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},h.registerListeners=function(){var e=this.hls;e.on(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(r.Events.ERROR,this.onError,this)},h.unregisterListeners=function(){var e=this.hls;e.off(r.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(r.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(r.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(r.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(r.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(r.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(r.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(r.Events.ERROR,this.onError,this)},h.onMediaAttached=function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},h.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},h.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),u(this.media.textTracks).forEach((function(e){Object(i.clearCurrentCues)(e)})),this.subtitleTrack=-1,this.media=null)},h.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},h.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},h.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},h.onLevelLoading=function(e,t){this.switchLevel(t.level)},h.onLevelSwitching=function(e,t){this.switchLevel(t.level)},h.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,a=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=a;var o=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(r.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==o&&this.setSubtitleTrack(o,i)}}},h.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},h.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===o.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},h.loadPlaylist=function(e){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var n=t.id,i=t.groupId,a=t.url;if(e)try{a=e.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+n),this.hls.trigger(r.Events.SUBTITLE_TRACK_LOADING,{url:a,id:n,groupId:i,deliveryDirectives:e||null})}},h.toggleTrackModes=function(e){var t=this,n=this.media,r=this.subtitleDisplay,i=this.trackId;if(n){var a=u(n.textTracks),o=a.filter((function(e){return e.groupId===t.groupId}));if(-1===e)[].slice.call(a).forEach((function(e){e.mode="disabled"}));else{var s=o[i];s&&(s.mode="disabled")}var l=o[e];l&&(l.mode=r?"showing":"hidden")}},h.setSubtitleTrack=function(e,t){var n,i=this.tracksInGroup;if(this.media){if(this.trackId!==e&&this.toggleTrackModes(e),!(this.trackId===e&&(-1===e||null!==(n=i[e])&&void 0!==n&&n.details)||e<-1||e>=i.length)){this.clearTimer();var a=i[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,a){var o=a.id,s=a.groupId,l=void 0===s?"":s,c=a.name,u=a.type,d=a.url;this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:o,groupId:l,name:c,type:u,url:d});var f=this.switchParams(a.url,null==t?void 0:t.details);this.loadPlaylist(f)}else this.hls.trigger(r.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},h.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=u(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},c=a,(d=[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}])&&s(c.prototype,d),f&&s(c,f),a}(a.default);function u(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&r.label&&t.push(e[n])}return t}t.default=c},"./src/controller/timeline-controller.ts":
/*!***********************************************!*\
!*** ./src/controller/timeline-controller.ts ***!
\***********************************************/
/*! exports provided: TimelineController */function(e,t,n){"use strict";n.r(t),n.d(t,"TimelineController",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/cea-608-parser */"./src/utils/cea-608-parser.ts"),o=n(/*! ../utils/output-filter */"./src/utils/output-filter.ts"),s=n(/*! ../utils/webvtt-parser */"./src/utils/webvtt-parser.ts"),l=n(/*! ../utils/texttrack-utils */"./src/utils/texttrack-utils.ts"),c=n(/*! ../utils/imsc1-ttml-parser */"./src/utils/imsc1-ttml-parser.ts"),u=n(/*! ../types/loader */"./src/types/loader.ts"),d=n(/*! ../utils/logger */"./src/utils/logger.ts"),f=function(){function e(e){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new o.default(this,"textTrack1"),n=new o.default(this,"textTrack2"),r=new o.default(this,"textTrack3"),s=new o.default(this,"textTrack4");this.cea608Parser1=new a.default(1,t,n),this.cea608Parser2=new a.default(3,r,s)}e.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(i.Events.FRAG_LOADING,this.onFragLoading,this),e.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(i.Events.FRAG_LOADING,this.onFragLoading,this),e.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(e,t,n,r,a){for(var o,s,l,c,u=!1,d=a.length;d--;){var f=a[d],h=(o=f[0],s=f[1],l=t,c=n,Math.min(s,c)-Math.max(o,l));if(h>=0&&(f[0]=Math.min(f[0],t),f[1]=Math.max(f[1],n),u=!0,h/(n-t)>.5))return}if(u||a.push([t,n]),this.config.renderTextTracksNatively){var p=this.captionsTracks[e];this.Cues.newCue(p,t,n,r)}else{var m=this.Cues.newCue(null,t,n,r);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:m,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,a=t.id,o=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===a&&(this.initPTS[r.cc]=o,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(i.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],a=i.label,o=i.languageCode,s=this.getExistingTrack(e);if(s)n[e]=s,Object(l.clearCurrentCues)(n[e]),Object(l.sendAddTrackEvent)(n[e],r);else{var c=this.createTextTrack("captions",a,o);c&&(c[e]=!0,n[e]=c)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},t.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},t.onMediaAttaching=function(e,t){this.media=t.media,this._cleanTracks()},t.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Object(l.clearCurrentCues)(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Object(l.clearCurrentCues)(t[n])}},t.onSubtitleTracksUpdated=function(e,t){var n=this;this.textTracks=[];var r=t.subtitleTracks||[],a=r.some((function(e){return e.textCodec===c.IMSC1_CODEC}));if(this.config.enableWebVTT||a&&this.config.enableIMSC1){var o=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=r||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,t){var r;if(t<s.length){for(var i=null,a=0;a<s.length;a++)if(h(s[a],e)){i=s[a];break}i&&(r=i)}r?Object(l.clearCurrentCues)(r):(r=n.createTextTrack("subtitles",e.name,e.lang))&&(r.mode="disabled"),r&&(r.groupId=e.groupId,n.textTracks.push(r))}))}else if(!o&&this.tracks&&this.tracks.length){var u=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:u})}}},t.onManifestLoaded=function(e,t){var n=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var r="textTrack"+t[1],i=n.captionsProperties[r];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}}))},t.onFragLoading=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2,i=this.lastSn,a=this.lastPartIndex;if(this.enabled&&n&&r&&t.frag.type===u.PlaylistLevelType.MAIN){var o,s,l=t.frag.sn,c=null!=(o=null==t||null===(s=t.part)||void 0===s?void 0:s.index)?o:-1;l===i+1||l===i&&c===a+1||(n.reset(),r.reset()),this.lastSn=l,this.lastPartIndex=c}},t.onFragLoaded=function(e,t){var n=t.frag,a=t.payload,o=this.initPTS,s=this.unparsedVttFrags;if(n.type===u.PlaylistLevelType.SUBTITLE)if(a.byteLength){if(!Object(r.isFiniteNumber)(o[n.cc]))return s.push(t),void(o.length&&this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Missing initial subtitle PTS")}));var l=n.decryptdata;if(null==l||null==l.key||"AES-128"!==l.method){var d=this.tracks[n.level],f=this.vttCCs;f[n.cc]||(f[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),d&&d.textCodec===c.IMSC1_CODEC?this._parseIMSC1(n,a):this._parseVTTs(n,a,f)}}else this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var n=this,r=this.hls;Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(t){n._appendCues(t,e.level),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){d.logger.log("Failed to parse IMSC1: "+t),r.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e,t,n){var r=this,a=this.hls;Object(s.parseWebVTT)(t,this.initPTS[e.cc],this.timescale[e.cc],n,e.cc,e.start,(function(t){r._appendCues(t,e.level),a.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(n){r._fallbackToIMSC1(e,t),d.logger.log("Failed to parse VTT cue: "+n),a.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})}))},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||Object(c.parseIMSC1)(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){r.textCodec=c.IMSC1_CODEC,n._parseIMSC1(e,t)}),(function(){r.textCodec="wvtt"}))},t._appendCues=function(e,t){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[t];if("disabled"===r.mode)return;e.forEach((function(e){return Object(l.addCueToTrack)(r,e)}))}else{var a=this.tracks[t].default?"default":"subtitles"+t;n.trigger(i.Events.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){var n=t.frag;if(n.type===u.PlaylistLevelType.SUBTITLE){if(!Object(r.isFiniteNumber)(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(t);this.onFragLoaded(i.Events.FRAG_LOADED,t)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r)for(var i=0;i<t.samples.length;i++){var a=t.samples[i].bytes;if(a){var o=this.extractCea608Data(a);n.addData(t.samples[i].pts,o[0]),r.addData(t.samples[i].pts,o[1])}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.endOffsetSubtitles,a=t.type,o=this.media;if(o&&!(o.currentTime<r)){if(!a||"video"===a){var s=this.captionsTracks;Object.keys(s).forEach((function(e){return Object(l.removeCuesInRange)(s[e],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var c=this.textTracks;Object.keys(c).forEach((function(e){return Object(l.removeCuesInRange)(c[e],n,i)}))}}},t.extractCea608Data=function(e){for(var t=31&e[0],n=2,r=[[],[]],i=0;i<t;i++){var a=e[n++],o=127&e[n++],s=127&e[n++],l=3&a;0===o&&0===s||0!=(4&a)&&(0!==l&&1!==l||(r[l].push(o),r[l].push(s)))}return r},e}();function h(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}},"./src/crypt/aes-crypto.ts":
/*!*********************************!*\
!*** ./src/crypt/aes-crypto.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}()},"./src/crypt/aes-decryptor.ts":
/*!************************************!*\
!*** ./src/crypt/aes-decryptor.ts ***!
\************************************/
/*! exports provided: removePadding, default */function(e,t,n){"use strict";n.r(t),n.d(t,"removePadding",(function(){return i})),n.d(t,"default",(function(){return a}));var r=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts");function i(e){var t=e.byteLength,n=t&&new DataView(e.buffer).getUint8(t-1);return n?Object(r.sliceUint8)(e,0,t-n):e}var a=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],c=s[1],u=s[2],d=s[3],f=new Uint32Array(256),h=0,p=0,m=0;for(m=0;m<256;m++)f[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var v=p^p<<1^p<<2^p<<3^p<<4;v=v>>>8^255&v^99,e[h]=v,t[v]=h;var g=f[h],y=f[g],b=f[y],_=257*f[v]^16843008*v;r[h]=_<<24|_>>>8,i[h]=_<<16|_>>>16,a[h]=_<<8|_>>>24,o[h]=_,_=16843009*b^65537*y^257*g^16843008*h,l[v]=_<<24|_>>>8,c[v]=_<<16|_>>>16,u[v]=_<<8|_>>>24,d[v]=_,h?(h=g^f[f[f[b^g]]],p^=f[f[p]]):h=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a,o,s,l,c=this.ksRows=4*(i+6+1),u=this.keySchedule=new Uint32Array(c),d=this.invKeySchedule=new Uint32Array(c),f=this.sBox,h=this.rcon,p=this.invSubMix,m=p[0],v=p[1],g=p[2],y=p[3];for(a=0;a<c;a++)a<i?s=u[a]=t[a]:(l=s,a%i==0?(l=f[(l=l<<8|l>>>24)>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=h[a/i|0]<<24):i>6&&a%i==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),u[a]=s=(u[a-i]^l)>>>0);for(o=0;o<c;o++)a=c-o,l=3&o?u[a]:u[a-4],d[o]=o<4||a<=4?l:m[f[l>>>24]]^v[f[l>>>16&255]]^g[f[l>>>8&255]]^y[f[255&l]],d[o]=d[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n){for(var r,i,a,o,s,l,c,u,d,f,h,p,m,v,g=this.keySize+6,y=this.invKeySchedule,b=this.invSBox,_=this.invSubMix,E=_[0],x=_[1],S=_[2],w=_[3],k=this.uint8ArrayToUint32Array_(n),T=k[0],O=k[1],C=k[2],A=k[3],L=new Int32Array(e),D=new Int32Array(L.length),I=this.networkToHostOrderSwap;t<L.length;){for(d=I(L[t]),f=I(L[t+1]),h=I(L[t+2]),p=I(L[t+3]),s=d^y[0],l=p^y[1],c=h^y[2],u=f^y[3],m=4,v=1;v<g;v++)r=E[s>>>24]^x[l>>16&255]^S[c>>8&255]^w[255&u]^y[m],i=E[l>>>24]^x[c>>16&255]^S[u>>8&255]^w[255&s]^y[m+1],a=E[c>>>24]^x[u>>16&255]^S[s>>8&255]^w[255&l]^y[m+2],o=E[u>>>24]^x[s>>16&255]^S[l>>8&255]^w[255&c]^y[m+3],s=r,l=i,c=a,u=o,m+=4;r=b[s>>>24]<<24^b[l>>16&255]<<16^b[c>>8&255]<<8^b[255&u]^y[m],i=b[l>>>24]<<24^b[c>>16&255]<<16^b[u>>8&255]<<8^b[255&s]^y[m+1],a=b[c>>>24]<<24^b[u>>16&255]<<16^b[s>>8&255]<<8^b[255&l]^y[m+2],o=b[u>>>24]<<24^b[s>>16&255]<<16^b[l>>8&255]<<8^b[255&c]^y[m+3],D[t]=I(r^T),D[t+1]=I(o^O),D[t+2]=I(a^C),D[t+3]=I(i^A),T=d,O=f,C=h,A=p,t+=4}return D.buffer},e}()},"./src/crypt/decrypter.ts":
/*!********************************!*\
!*** ./src/crypt/decrypter.ts ***!
\********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return c}));var r=n(/*! ./aes-crypto */"./src/crypt/aes-crypto.ts"),i=n(/*! ./fast-aes-key */"./src/crypt/fast-aes-key.ts"),a=n(/*! ./aes-decryptor */"./src/crypt/aes-decryptor.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),c=function(){function e(e,t,n){var r=(void 0===n?{}:n).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=e,this.config=t,this.removePKCS7Padding=i,i)try{var a=self.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(e){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var t=e.prototype;return t.destroy=function(){this.observer=null},t.isSync=function(){return this.config.enableSoftwareAES},t.flush=function(){var e=this.currentResult;if(e){var t=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Object(a.removePadding)(t):t}this.reset()},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,t,n,r){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(e),t,n);var i=this.flush();i&&r(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(e),t,n).then(r)},t.softwareDecrypt=function(e,t,n){var r=this.currentIV,i=this.currentResult,o=this.remainderData;this.logOnce("JS AES decrypt"),o&&(e=Object(s.appendUint8Array)(o,e),this.remainderData=null);var c=this.getValidChunk(e);if(!c.length)return null;r&&(n=r);var u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new a.default),u.expandKey(t);var d=i;return this.currentResult=u.decrypt(c.buffer,0,n),this.currentIV=Object(l.sliceUint8)(c,-16).buffer,d||null},t.webCryptoDecrypt=function(e,t,n){var a=this,o=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new i.default(o,t)),this.fastAesKey.expandKey().then((function(t){return o?new r.default(o,n).decrypt(e.buffer,t):Promise.reject(new Error("web crypto not initialized"))})).catch((function(r){return a.onWebCryptoError(r,e,t,n)}))},t.onWebCryptoError=function(e,t,n,r){return o.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",e),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(t,n,r)},t.getValidChunk=function(e){var t=e,n=e.length-e.length%16;return n!==e.length&&(t=Object(l.sliceUint8)(e,0,n),this.remainderData=Object(l.sliceUint8)(e,n)),t},t.logOnce=function(e){this.logEnabled&&(o.logger.log("[decrypter.ts]: "+e),this.logEnabled=!1)},e}()},"./src/crypt/fast-aes-key.ts":
/*!***********************************!*\
!*** ./src/crypt/fast-aes-key.ts ***!
\***********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}()},"./src/demux/aacdemuxer.ts":
/*!*********************************!*\
!*** ./src/demux/aacdemuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ./adts */"./src/demux/adts.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(o.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(i.probe(e,t))return a.logger.log("ADTS sync word found !"),!0;return!1},l.canParse=function(e,t){return i.canParse(e,t)},l.appendFrame=function(e,t,n){i.initTrackConfig(e,this.observer,t,n,e.manifestCodec);var r=i.appendFrame(e,t,n,this.initPTS,this.frameIndex);if(r&&0===r.missing)return r},r}(r.default);l.minProbeByteLength=9,t.default=l},"./src/demux/adts.ts":
/*!***************************!*\
!*** ./src/demux/adts.ts ***!
\***************************/
/*! exports provided: getAudioConfig, isHeaderPattern, getHeaderLength, getFullFrameLength, canGetFrameLength, isHeader, canParse, probe, initTrackConfig, getFrameDuration, parseFrameHeader, appendFrame */function(e,t,n){"use strict";n.r(t),n.d(t,"getAudioConfig",(function(){return o})),n.d(t,"isHeaderPattern",(function(){return s})),n.d(t,"getHeaderLength",(function(){return l})),n.d(t,"getFullFrameLength",(function(){return c})),n.d(t,"canGetFrameLength",(function(){return u})),n.d(t,"isHeader",(function(){return d})),n.d(t,"canParse",(function(){return f})),n.d(t,"probe",(function(){return h})),n.d(t,"initTrackConfig",(function(){return p})),n.d(t,"getFrameDuration",(function(){return m})),n.d(t,"parseFrameHeader",(function(){return v})),n.d(t,"appendFrame",(function(){return g}));var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../events */"./src/events.ts");function o(e,t,n,o){var s,l,c,u,d=navigator.userAgent.toLowerCase(),f=o,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&t[n+2])>>>6);var p=(60&t[n+2])>>>2;if(!(p>h.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,r.logger.log("manifest codec:"+o+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(d)?p>=6?(s=5,u=new Array(4),l=p-3):(s=2,u=new Array(2),l=p):-1!==d.indexOf("android")?(s=2,u=new Array(2),l=p):(s=5,u=new Array(4),o&&(-1!==o.indexOf("mp4a.40.29")||-1!==o.indexOf("mp4a.40.5"))||!o&&p>=6?l=p-3:((o&&-1!==o.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(d))||!o&&1===c)&&(s=2,u=new Array(2)),l=p)),u[0]=s<<3,u[0]|=(14&p)>>1,u[1]|=(1&p)<<7,u[1]|=c<<3,5===s&&(u[1]|=(14&l)>>1,u[2]=(1&l)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:h[p],channelCount:c,codec:"mp4a.40."+s,manifestCodec:f};e.trigger(a.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(e,t){return 255===e[t]&&240==(246&e[t+1])}function l(e,t){return 1&e[t+1]?7:9}function c(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function u(e,t){return t+5<e.length}function d(e,t){return t+1<e.length&&s(e,t)}function f(e,t){return u(e,t)&&s(e,t)&&c(e,t)<=e.length-t}function h(e,t){if(d(e,t)){var n=l(e,t);if(t+n>=e.length)return!1;var r=c(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||d(e,i)}return!1}function p(e,t,n,i,a){if(!e.samplerate){var s=o(t,n,i,a);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,r.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function m(e){return 9216e4/e}function v(e,t,n,r,i){var a=l(e,t),o=c(e,t);if((o-=a)>0)return{headerLength:a,frameLength:o,stamp:n+r*i}}function g(e,t,n,r,i){var a=v(t,n,r,i,m(e.samplerate));if(a){var o,s=a.frameLength,l=a.headerLength,c=a.stamp,u=l+s,d=Math.max(0,n+u-t.length);d?(o=new Uint8Array(u-l)).set(t.subarray(n+l,t.length),0):o=t.subarray(n+l,n+u);var f={unit:o,pts:c};return d||e.samples.push(f),{sample:f,length:u,missing:d}}}},"./src/demux/base-audio-demuxer.ts":
/*!*****************************************!*\
!*** ./src/demux/base-audio-demuxer.ts ***!
\*****************************************/
/*! exports provided: initPTSFn, default */function(e,t,n){"use strict";n.r(t),n.d(t,"initPTSFn",(function(){return c}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),o=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),s=n(/*! ../utils/typed-array */"./src/utils/typed-array.ts"),l=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(){},t.resetContiguity=function(){},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=Object(o.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r,l=i.getID3Data(e,0),u=l?l.length:0,d=this._audioTrack,f=this._id3Track,h=l?i.getTimeStamp(l):void 0,p=e.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(h,t)),l&&l.length>0&&f.samples.push({pts:this.initPTS,dts:this.initPTS,data:l}),r=this.initPTS;u<p;){if(this.canParse(e,u)){var m=this.appendFrame(d,e,u);m?(this.frameIndex++,r=m.sample.pts,n=u+=m.length):u=p}else i.canParse(e,u)?(l=i.getID3Data(e,u),f.samples.push({pts:r,dts:r,data:l}),n=u+=l.length):u++;if(u===p&&n!==p){var v=Object(s.sliceUint8)(e,n);this.cachedData?this.cachedData=Object(o.appendUint8Array)(this.cachedData,v):this.cachedData=v}}return{audioTrack:d,avcTrack:Object(a.dummyTrack)(),id3Track:f,textTrack:Object(a.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(a.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(a.dummyTrack)()}},t.destroy=function(){},e}(),c=function(e,t){return Object(r.isFiniteNumber)(e)?90*e:9e4*t};t.default=l},"./src/demux/chunk-cache.ts":
/*!**********************************!*\
!*** ./src/demux/chunk-cache.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,n=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++){var a=e[i];n.set(a,r),r+=a.length}return n}(t,n),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}()},"./src/demux/dummy-demuxed-track.ts":
/*!******************************************!*\
!*** ./src/demux/dummy-demuxed-track.ts ***!
\******************************************/
/*! exports provided: dummyTrack */function(e,t,n){"use strict";function r(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}n.r(t),n.d(t,"dummyTrack",(function(){return r}))},"./src/demux/exp-golomb.ts":
/*!*********************************!*\
!*** ./src/demux/exp-golomb.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=function(){function e(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&r.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n},t.readSPS=function(){var e,t,n,r=0,i=0,a=0,o=0,s=this.readUByte.bind(this),l=this.readBits.bind(this),c=this.readUEG.bind(this),u=this.readBoolean.bind(this),d=this.skipBits.bind(this),f=this.skipEG.bind(this),h=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);s();var m=s();if(l(5),d(3),s(),h(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){var v=c();if(3===v&&d(1),h(),h(),d(1),u())for(t=3!==v?8:12,n=0;n<t;n++)u()&&p(n<6?16:64)}h();var g=c();if(0===g)c();else if(1===g)for(d(1),f(),f(),e=c(),n=0;n<e;n++)f();h(),d(1);var y=c(),b=c(),_=l(1);0===_&&d(1),d(1),u()&&(r=c(),i=c(),a=c(),o=c());var E=[1,1];if(u()&&u())switch(s()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(y+1)-2*r-2*i),height:(2-_)*(b+1)*16-(_?2:4)*(a+o),pixelRatio:E}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}();t.default=i},"./src/demux/id3.ts":
/*!**************************!*\
!*** ./src/demux/id3.ts ***!
\**************************/
/*! exports provided: isHeader, isFooter, getID3Data, canParse, getTimeStamp, isTimeStampFrame, getID3Frames, decodeFrame, utf8ArrayToStr, testables */function(e,t,n){"use strict";n.r(t),n.d(t,"isHeader",(function(){return i})),n.d(t,"isFooter",(function(){return a})),n.d(t,"getID3Data",(function(){return o})),n.d(t,"canParse",(function(){return l})),n.d(t,"getTimeStamp",(function(){return c})),n.d(t,"isTimeStampFrame",(function(){return u})),n.d(t,"getID3Frames",(function(){return f})),n.d(t,"decodeFrame",(function(){return h})),n.d(t,"utf8ArrayToStr",(function(){return y})),n.d(t,"testables",(function(){return b}));var r,i=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},a=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},o=function(e,t){for(var n=t,r=0;i(e,t);)r+=10,r+=s(e,t+6),a(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},c=function(e){for(var t=f(e),n=0;n<t.length;n++){var r=t[n];if(u(r))return g(r)}},u=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},d=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=s(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},f=function(e){for(var t=0,n=[];i(e,t);){for(var r=s(e,t+6),o=(t+=10)+r;t+8<o;){var l=d(e.subarray(t)),c=h(l);c&&n.push(c),t+=l.size+10}a(e,t)&&(t+=10)}return n},h=function(e){return"PRIV"===e.type?p(e):"W"===e.type[0]?v(e):m(e)},p=function(e){if(!(e.size<2)){var t=y(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}},m=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=y(e.data.subarray(t),!0);t+=n.length+1;var r=y(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=y(e.data.subarray(1));return{key:e.type,data:i}}},v=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=y(e.data.subarray(t),!0);t+=n.length+1;var r=y(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=y(e.data);return{key:e.type,data:i}},g=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},y=function(e,t){void 0===t&&(t=!1);var n=_();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var a,o,s,l=e.length,c="",u=0;u<l;){if(0===(a=e[u++])&&t)return c;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:o=e[u++],c+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[u++],s=e[u++],c+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:m};function _(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},"./src/demux/mp3demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp3demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./base-audio-demuxer */"./src/demux/base-audio-demuxer.ts"),i=n(/*! ../demux/id3 */"./src/demux/id3.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts");function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var l=r.prototype;return l.resetInitSegment=function(t,n,r){e.prototype.resetInitSegment.call(this,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(i.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(o.probe(e,t))return a.logger.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(e,t){return o.canParse(e,t)},l.appendFrame=function(e,t,n){if(null!==this.initPTS)return o.appendFrame(e,t,n,this.initPTS,this.frameIndex)},r}(r.default);l.minProbeByteLength=4,t.default=l},"./src/demux/mp4demuxer.ts":
/*!*********************************!*\
!*** ./src/demux/mp4demuxer.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./dummy-demuxed-track */"./src/demux/dummy-demuxed-track.ts"),a=function(){function e(e,t){this.remainderData=null,this.config=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.resetContiguity=function(){},e.probe=function(e){return Object(r.findBox)({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.demux=function(e){var t=e,n=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(t=Object(r.appendUint8Array)(this.remainderData,e));var a=Object(r.segmentValidRange)(t);this.remainderData=a.remainder,n.samples=a.valid||new Uint8Array}else n.samples=t;return{audioTrack:Object(i.dummyTrack)(),avcTrack:n,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.flush=function(){var e=Object(i.dummyTrack)();return e.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:e,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();a.minProbeByteLength=1024,t.default=a},"./src/demux/mpegaudio.ts":
/*!********************************!*\
!*** ./src/demux/mpegaudio.ts ***!
\********************************/
/*! exports provided: appendFrame, parseHeader, isHeaderPattern, isHeader, canParse, probe */function(e,t,n){"use strict";n.r(t),n.d(t,"appendFrame",(function(){return l})),n.d(t,"parseHeader",(function(){return c})),n.d(t,"isHeaderPattern",(function(){return u})),n.d(t,"isHeader",(function(){return d})),n.d(t,"canParse",(function(){return f})),n.d(t,"probe",(function(){return h}));var r=null,i=[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],a=[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]],s=[0,1,1,4];function l(e,t,n,r,i){if(!(n+24>t.length)){var a=c(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function c(e,t){var n=e[t+1]>>3&3,l=e[t+1]>>1&3,c=e[t+2]>>4&15,u=e[t+2]>>2&3;if(1!==n&&0!==c&&15!==c&&3!==u){var d=e[t+2]>>1&1,f=e[t+3]>>6,h=1e3*i[14*(3===n?3-l:3===l?3:4)+c-1],p=a[3*(3===n?0:2===n?1:2)+u],m=3===f?1:2,v=o[n][l],g=s[l],y=8*v*g,b=Math.floor(v*h/p+d)*g;if(null===r){var _=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);r=_?parseInt(_[1]):0}return!!r&&r<=87&&2===l&&h>=224e3&&0===f&&(e[t+3]=128|e[t+3]),{sampleRate:p,channelCount:m,frameLength:b,samplesPerFrame:y}}}function u(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function d(e,t){return t+1<e.length&&u(e,t)}function f(e,t){return u(e,t)&&4<=e.length-t}function h(e,t){if(t+1<e.length&&u(e,t)){var n=c(e,t),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=t+r;return i===e.length||d(e,i)}return!1}},"./src/demux/sample-aes.ts":
/*!*********************************!*\
!*** ./src/demux/sample-aes.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),i=n(/*! ./tsdemuxer */"./src/demux/tsdemuxer.ts"),a=function(){function e(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new r.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,t)},t.decryptAacSample=function(e,t,n,r){var i=e[t].unit,a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,(function(a){var o=new Uint8Array(a);i.set(o,16),r||s.decryptAacSamples(e,t+1,n)}))},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,a,o){var s=Object(i.discardEPB)(a.data),l=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(l.buffer,(function(i){a.data=c.getAvcDecryptedUnit(s,i),o||c.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}();t.default=a},"./src/demux/transmuxer-interface.ts":
/*!*******************************************!*\
!*** ./src/demux/transmuxer-interface.ts ***!
\*******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d}));var r=n(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/mediasource-helper */"./src/utils/mediasource-helper.ts"),c=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),u=Object(l.getMediaSource)()||{isTypeSupported:function(){return!1}},d=function(){function e(e,t,n,l){var d=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=e,this.id=t,this.onTransmuxComplete=n,this.onFlush=l;var f=e.config,h=function(t,n){(n=n||{}).frag=d.frag,n.id=d.id,e.trigger(t,n)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,h),this.observer.on(i.Events.ERROR,h);var p={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(f.enableWorker&&"undefined"!=typeof Worker){var v;o.logger.log("demuxing in webworker");try{v=this.worker=r(/*! ../demux/transmuxer-worker.ts */"./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),v.addEventListener("message",this.onwmsg),v.onerror=function(t){e.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(t.message+" ("+t.filename+":"+t.lineno+")")})},v.postMessage({cmd:"init",typeSupported:p,vendor:m,id:t,config:JSON.stringify(f)})}catch(e){o.logger.warn("Error in worker:",e),o.logger.error("Error while initializing DemuxerWorker, fallback to inline"),v&&self.URL.revokeObjectURL(v.objectURL),this.transmuxer=new a.default(this.observer,p,f,m,t),this.worker=null}}else this.transmuxer=new a.default(this.observer,p,f,m,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.observer=null},t.push=function(e,t,n,r,i,s,l,c,u,d){var f=this;u.transmuxing.start=self.performance.now();var h=this.transmuxer,p=this.worker,m=s?s.start:i.start,v=i.decryptdata,g=this.frag,y=!(g&&i.cc===g.cc),b=!(g&&u.level===g.level),_=g?u.sn-g.sn:-1,E=this.part?u.part-this.part.index:1,x=!b&&(1===_||0===_&&1===E),S=self.performance.now();(b||_||0===i.stats.parsing.start)&&(i.stats.parsing.start=S),!s||!E&&x||(s.stats.parsing.start=S);var w=new a.TransmuxState(y,x,c,b,m);if(!x||y){o.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+y+"\n trackSwitch: "+b+"\n contiguous: "+x+"\n accurateTimeOffset: "+c+"\n timeOffset: "+m);var k=new a.TransmuxConfig(n,r,t,l,d);this.configureTransmuxer(k)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:e,decryptdata:v,chunkMeta:u,state:w},e instanceof ArrayBuffer?[e]:[]);else if(h){var T=h.push(e,v,u,w);Object(a.isPromise)(T)?T.then((function(e){f.handleTransmuxComplete(e)})):this.handleTransmuxComplete(T)}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);Object(a.isPromise)(i)?i.then((function(n){t.handleFlushResult(n,e)})):this.handleFlushResult(i,e)}},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=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,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}()},"./src/demux/transmuxer-worker.ts":
/*!****************************************!*\
!*** ./src/demux/transmuxer-worker.ts ***!
\****************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return s}));var r=n(/*! ../demux/transmuxer */"./src/demux/transmuxer.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");function s(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.transmuxer=new r.default(t,o.typeSupported,s,o.vendor,o.id),Object(a.enableLogs)(s.debug),n("init",null);break;case"configure":e.transmuxer.configure(o.config);break;case"demux":var c=e.transmuxer.push(o.data,o.decryptdata,o.chunkMeta,o.state);Object(r.isPromise)(c)?c.then((function(t){l(e,t)})):l(e,c);break;case"flush":var d=o.chunkMeta,f=e.transmuxer.flush(d);Object(r.isPromise)(f)?f.then((function(t){u(e,t,d)})):u(e,f,d)}}))}function l(e,t){if((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment){var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r)}}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function u(e,t,n){t.forEach((function(t){l(e,t)})),e.postMessage({event:"flush",data:n})}},"./src/demux/transmuxer.ts":
/*!*********************************!*\
!*** ./src/demux/transmuxer.ts ***!
\*********************************/
/*! exports provided: default, isPromise, TransmuxConfig, TransmuxState */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y})),n.d(t,"isPromise",(function(){return _})),n.d(t,"TransmuxConfig",(function(){return E})),n.d(t,"TransmuxState",(function(){return x}));var r,i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../crypt/decrypter */"./src/crypt/decrypter.ts"),s=n(/*! ../demux/aacdemuxer */"./src/demux/aacdemuxer.ts"),l=n(/*! ../demux/mp4demuxer */"./src/demux/mp4demuxer.ts"),c=n(/*! ../demux/tsdemuxer */"./src/demux/tsdemuxer.ts"),u=n(/*! ../demux/mp3demuxer */"./src/demux/mp3demuxer.ts"),d=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),f=n(/*! ../remux/passthrough-remuxer */"./src/remux/passthrough-remuxer.ts"),h=n(/*! ./chunk-cache */"./src/demux/chunk-cache.ts"),p=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),m=n(/*! ../utils/logger */"./src/utils/logger.ts");try{r=self.performance.now.bind(self.performance)}catch(e){m.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var v=[{demux:c.default,remux:d.default},{demux:l.default,remux:f.default},{demux:s.default,remux:d.default},{demux:u.default,remux:d.default}],g=1024;v.forEach((function(e){var t=e.demux;g=Math.max(g,t.minProbeByteLength)}));var y=function(){function e(e,t,n,r,i){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 h.default,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,i){var a=this,o=n.transmuxing;o.executeStart=r();var s=new Uint8Array(e),l=this.cache,c=this.config,u=this.currentTransmuxState,d=this.transmuxConfig;i&&(this.currentTransmuxState=i);var f=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(s,t);if(f&&"AES-128"===f.method){var h=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=h.webCryptoDecrypt(s,f.key.buffer,f.iv.buffer).then((function(e){var t=a.push(e,null,n);return a.decryptionPromise=null,t})),this.decryptionPromise;var m=h.softwareDecrypt(s,f.key.buffer,f.iv.buffer);if(!m)return o.executeEnd=r(),b(n);s=new Uint8Array(m)}var v=i||u,g=v.contiguous,y=v.discontinuity,_=v.trackSwitch,E=v.accurateTimeOffset,x=v.timeOffset,S=d.audioCodec,w=d.videoCodec,k=d.defaultInitPts,T=d.duration,O=d.initSegmentData;if((y||_)&&this.resetInitSegment(O,S,w,T),y&&this.resetInitialTimestamp(k),g||this.resetContiguity(),this.needsProbing(s,y,_)){if(l.dataLength){var C=l.flush();s=Object(p.appendUint8Array)(C,s)}this.configureTransmuxer(s,d)}var A=this.transmux(s,f,x,E,n),L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,o.executeEnd=r(),A},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=r();var o=this.decrypter,s=this.cache,l=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return t.flush(e)}));var u=[],d=l.timeOffset;if(o){var f=o.flush();f&&u.push(this.push(f,null,e))}var h=s.dataLength;s.reset();var p=this.demuxer,m=this.remuxer;if(!p||!m)return h>=g&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=r(),[b(e)];var v=p.flush(d);return _(v)?v.then((function(n){return t.flushRemux(u,n,e),u})):(this.flushRemux(u,v,e),u)},t.flushRemux=function(e,t,n){var i=t.audioTrack,a=t.avcTrack,o=t.id3Track,s=t.textTrack,l=this.currentTransmuxState,c=l.accurateTimeOffset,u=l.timeOffset;m.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var d=this.remuxer.remux(i,a,o,s,u,c,!0,this.id);e.push({remuxResult:d,chunkMeta:n}),n.transmuxing.executeEnd=r()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r){var i=this.demuxer,a=this.remuxer;i&&a&&(i.resetInitSegment(t,n,r),a.resetInitSegment(e,t,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.avcTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.avcTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e,t){for(var n,r=this.config,i=this.observer,a=this.typeSupported,o=this.vendor,s=t.audioCodec,c=t.defaultInitPts,u=t.duration,d=t.initSegmentData,h=t.videoCodec,p=0,g=v.length;p<g;p++)if(v[p].demux.probe(e)){n=v[p];break}n||(m.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),n={demux:l.default,remux:f.default});var y=this.demuxer,b=this.remuxer,_=n.remux,E=n.demux;b&&b instanceof _||(this.remuxer=new _(i,r,a,o)),y&&y instanceof E||(this.demuxer=new E(i,r,a),this.probe=E.probe),this.resetInitSegment(d,s,h,u),this.resetInitialTimestamp(c)},t.needsProbing=function(e,t,n){return!this.demuxer||!this.remuxer||t||n},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new o.default(this.observer,this.config)),e},e}(),b=function(e){return{remuxResult:{},chunkMeta:e}};function _(e){return"then"in e&&e.then instanceof Function}var E=function(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i},x=function(e,t,n,r,i){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i}},"./src/demux/tsdemuxer.ts":
/*!********************************!*\
!*** ./src/demux/tsdemuxer.ts ***!
\********************************/
/*! exports provided: discardEPB, default */function(e,t,n){"use strict";n.r(t),n.d(t,"discardEPB",(function(){return _}));var r=n(/*! ./adts */"./src/demux/adts.ts"),i=n(/*! ./mpegaudio */"./src/demux/mpegaudio.ts"),a=n(/*! ./exp-golomb */"./src/demux/exp-golomb.ts"),o=n(/*! ./id3 */"./src/demux/id3.ts"),s=n(/*! ./sample-aes */"./src/demux/sample-aes.ts"),l=n(/*! ../events */"./src/events.ts"),c=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),u=n(/*! ../utils/logger */"./src/utils/logger.ts"),d=n(/*! ../errors */"./src/errors.ts"),f={video:1,audio:2,id3:3,text:4},h=function(){function e(e,t,n){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=e,this.config=t,this.typeSupported=n}e.probe=function(t){var n=e.syncOffset(t);return!(n<0||(n&&u.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e.syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:f[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",r),this._audioTrack=e.createTrack("audio",r),this._id3Track=e.createTrack("id3",r),this._txtTrack=e.createTrack("text",r),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=t,this.videoCodec=n,this._duration=r},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},t.demux=function(t,n,r,i){var a;void 0===r&&(r=!1),void 0===i&&(i=!1),r||(this.sampleAes=null);var o=this._avcTrack,s=this._audioTrack,f=this._id3Track,h=o.pid,p=o.pesData,y=s.pid,b=f.pid,_=s.pesData,E=f.pesData,x=!1,S=this.pmtParsed,w=this._pmtId,k=t.length;if(this.remainderData&&(k=(t=Object(c.appendUint8Array)(this.remainderData,t)).length,this.remainderData=null),k<188&&!i)return this.remainderData=t,{audioTrack:s,avcTrack:o,id3Track:f,textTrack:this._txtTrack};var T=Math.max(0,e.syncOffset(t));(k-=(k+T)%188)<t.byteLength&&!i&&(this.remainderData=new Uint8Array(t.buffer,k,t.buffer.byteLength-k));for(var O=T;O<k;O+=188)if(71===t[O]){var C=!!(64&t[O+1]),A=((31&t[O+1])<<8)+t[O+2],L=void 0;if((48&t[O+3])>>4>1){if((L=O+5+t[O+4])===O+188)continue}else L=O+4;switch(A){case h:C&&(p&&(a=g(p))&&this.parseAVCPES(a,!1),p={data:[],size:0}),p&&(p.data.push(t.subarray(L,O+188)),p.size+=O+188-L);break;case y:C&&(_&&(a=g(_))&&(s.isAAC?this.parseAACPES(a):this.parseMPEGPES(a)),_={data:[],size:0}),_&&(_.data.push(t.subarray(L,O+188)),_.size+=O+188-L);break;case b:C&&(E&&(a=g(E))&&this.parseID3PES(a),E={data:[],size:0}),E&&(E.data.push(t.subarray(L,O+188)),E.size+=O+188-L);break;case 0:C&&(L+=t[L]+1),w=this._pmtId=m(t,L);break;case w:C&&(L+=t[L]+1);var D=v(t,L,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,r);(h=D.avc)>0&&(o.pid=h),(y=D.audio)>0&&(s.pid=y,s.isAAC=D.isAAC),(b=D.id3)>0&&(f.pid=b),x&&!S&&(u.logger.log("reparse from beginning"),x=!1,O=T-188),S=this.pmtParsed=!0;break;case 17:case 8191:break;default:x=!0}}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"});o.pesData=p,s.pesData=_,f.pesData=E;var I={audioTrack:s,avcTrack:o,id3Track:f,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(I),I},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.avcTrack,i=e.id3Track,a=r.pesData,o=n.pesData,s=i.pesData;a&&(t=g(a))?(this.parseAVCPES(t,!0),r.pesData=null):r.pesData=a,o&&(t=g(o))?(n.isAAC?this.parseAACPES(t):this.parseMPEGPES(t),n.pesData=null):(null!=o&&o.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=o),s&&(t=g(s))?(this.parseID3PES(t),i.pesData=null):i.pesData=s},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.avcTrack;r.samples&&r.isAAC?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},t.parseAVCPES=function(e,t){var n,r=this,i=this._avcTrack,s=this.parseAVCNALu(e.data),l=this.avcSample,c=!1;e.data=null,l&&s.length&&!i.audFound&&(y(l,i),l=this.avcSample=p(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(c&&s.length>4){var u=new a.default(s).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(l.key=!0)}break;case 5:n=!0,l||(l=r.avcSample=p(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0;var d=new a.default(_(t.data));d.readUByte();for(var f=0,h=0,m=!1,v=0;!m&&d.bytesAvailable>1;){f=0;do{f+=v=d.readUByte()}while(255===v);h=0;do{h+=v=d.readUByte()}while(255===v);if(4===f&&0!==d.bytesAvailable){if(m=!0,181===d.readUByte()&&49===d.readUShort()&&1195456820===d.readUInt()&&3===d.readUByte()){for(var g=d.readUByte(),E=31&g,x=[g,d.readUByte()],S=0;S<E;S++)x.push(d.readUByte()),x.push(d.readUByte()),x.push(d.readUByte());b(r._txtTrack.samples,{type:3,pts:e.pts,bytes:x})}}else if(5===f&&0!==d.bytesAvailable){if(m=!0,h>16){for(var w=[],k=0;k<16;k++)w.push(d.readUByte().toString(16)),3!==k&&5!==k&&7!==k&&9!==k||w.push("-");for(var T=h-16,O=new Uint8Array(T),C=0;C<T;C++)O[C]=d.readUByte();b(r._txtTrack.samples,{pts:e.pts,payloadType:f,uuid:w.join(""),userData:Object(o.utf8ArrayToStr)(O),userDataBytes:O})}}else if(h<d.bytesAvailable)for(var A=0;A<h;A++)d.readUByte()}break;case 7:if(n=!0,c=!0,!i.sps){var L=new a.default(t.data).readSPS();i.width=L.width,i.height=L.height,i.pixelRatio=L.pixelRatio,i.sps=[t.data],i.duration=r._duration;for(var D=t.data.subarray(1,4),I="avc1.",R=0;R<3;R++){var N=D[R].toString(16);N.length<2&&(N="0"+N),I+=N}i.codec=I}break;case 8:n=!0,i.pps||(i.pps=[t.data]);break;case 9:n=!1,i.audFound=!0,l&&y(l,i),l=r.avcSample=p(!1,e.pts,e.dts,"");break;case 12:n=!1;break;default:n=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&n&&l.units.push(t)})),t&&l&&(y(l,i),this.avcSample=null)},t.getLastNalUnit=function(){var e,t,n=this.avcSample;if(!n||0===n.units.length){var r=this._avcTrack.samples;n=r[r.length-1]}if(null!==(e=n)&&void 0!==e&&e.units){var i=n.units;t=i[i.length-1]}return t},t.parseAVCNALu=function(e){var t,n,r=e.byteLength,i=this._avcTrack,a=i.naluState||0,o=a,s=[],l=0,c=-1,u=0;for(-1===a&&(c=0,u=31&e[0],a=0,l=1);l<r;)if(t=e[l++],a)if(1!==a)if(t)if(1===t){if(c>=0){var d={data:e.subarray(c,l-a-1),type:u};s.push(d)}else{var f=this.getLastNalUnit();if(f&&(o&&l<=4-o&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-o)),(n=l-a-1)>0)){var h=new Uint8Array(f.data.byteLength+n);h.set(f.data,0),h.set(e.subarray(0,n),f.data.byteLength),f.data=h,f.state=0}}l<r?(c=l,u=31&e[l],a=0):a=-1}else a=0;else a=3;else a=t?0:2;else a=t?0:1;if(c>=0&&a>=0){var p={data:e.subarray(c,r),type:u,state:a};s.push(p)}if(0===s.length){var m=this.getLastNalUnit();if(m){var v=new Uint8Array(m.data.byteLength+e.byteLength);v.set(m.data,0),v.set(e,m.data.byteLength),m.data=v}}return i.naluState=a,s},t.parseAACPES=function(e){var t,n,i,a,o,s=0,c=this._audioTrack,f=this.aacOverFlow,h=e.data;if(f){this.aacOverFlow=null;var p=f.sample.unit.byteLength,m=Math.min(f.missing,p),v=p-m;f.sample.unit.set(h.subarray(0,m),v),c.samples.push(f.sample),s=f.missing}for(t=s,n=h.length;t<n-1&&!r.isHeader(h,t);t++);if(t===s||(t<n-1?(i="AAC PES did not start with ADTS header,offset:"+t,a=!1):(i="no ADTS header found in AAC PES",a=!0),u.logger.warn("parsing error:"+i),this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:d.ErrorTypes.MEDIA_ERROR,details:d.ErrorDetails.FRAG_PARSING_ERROR,fatal:a,reason:i}),!a)){if(r.initTrackConfig(c,this.observer,h,t,this.audioCodec),void 0!==e.pts)o=e.pts;else{if(!f)return void u.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var g=r.getFrameDuration(c.samplerate);o=f.sample.pts+g}for(var y=0;t<n;){if(r.isHeader(h,t)){if(t+5<n){var b=r.appendFrame(c,h,t,o,y);if(b){if(!b.missing){t+=b.length,y++;continue}this.aacOverFlow=b}}break}t++}}},t.parseMPEGPES=function(e){var t=e.data,n=t.length,r=0,a=0,o=e.pts;if(void 0!==o)for(;a<n;)if(i.isHeader(t,a)){var s=i.appendFrame(this._audioTrack,t,a,o,r);if(!s)break;a+=s.length,r++}else a++;else u.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseID3PES=function(e){void 0!==e.pts?this._id3Track.samples.push(e):u.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function p(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,length:0}}function m(e,t){return(31&e[t+10])<<8|e[t+11]}function v(e,t,n,r){var i={audio:-1,avc:-1,id3:-1,isAAC:!0},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){var o=(31&e[t+1])<<8|e[t+2];switch(e[t]){case 207:if(!r){u.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===i.audio&&(i.audio=o);break;case 21:-1===i.id3&&(i.id3=o);break;case 219:if(!r){u.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===i.avc&&(i.avc=o);break;case 3:case 4:n?-1===i.audio&&(i.audio=o,i.isAAC=!1):u.logger.log("MPEG audio found, not supported in this browser");break;case 36:u.logger.warn("Unsupported HEVC stream type found")}t+=5+((15&e[t+3])<<8|e[t+4])}return i}function g(e){var t,n,r,i,a,o=0,s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&s.length>1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var c=t[7];192&c&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&c?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(u.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var d=(r=t[8])+9;if(e.size<=d)return null;e.size-=d;for(var f=new Uint8Array(e.size),h=0,p=s.length;h<p;h++){var m=(t=s[h]).byteLength;if(d){if(d>m){d-=m;continue}t=t.subarray(d),m-=d,d=0}f.set(t,o),o+=m}return n&&(n-=r+3),{data:f,pts:i,dts:a,len:n}}return null}function y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&u.logger.log(e.pts+"/"+e.dts+":"+e.debug)}function b(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts<e[r].pts){e.splice(r,0,t);break}}else e.push(t)}function _(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;var i=t-n.length,a=new Uint8Array(i),o=0;for(r=0;r<i;o++,r++)o===n[0]&&(o++,n.shift()),a[r]=e[o];return a}h.minProbeByteLength=188,t.default=h},"./src/errors.ts":
/*!***********************!*\
!*** ./src/errors.ts ***!
\***********************/
/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"ErrorTypes",(function(){return r})),n.d(t,"ErrorDetails",(function(){return i})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown"}(i||(i={}))},"./src/events.ts":
/*!***********************!*\
!*** ./src/events.ts ***!
\***********************/
/*! exports provided: Events */function(e,t,n){"use strict";var r;n.r(t),n.d(t,"Events",(function(){return r})),function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"}(r||(r={}))},"./src/hls.ts":
/*!********************!*\
!*** ./src/hls.ts ***!
\********************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return y}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),i=n(/*! ./loader/playlist-loader */"./src/loader/playlist-loader.ts"),a=n(/*! ./loader/key-loader */"./src/loader/key-loader.ts"),o=n(/*! ./controller/id3-track-controller */"./src/controller/id3-track-controller.ts"),s=n(/*! ./controller/latency-controller */"./src/controller/latency-controller.ts"),l=n(/*! ./controller/level-controller */"./src/controller/level-controller.ts"),c=n(/*! ./controller/fragment-tracker */"./src/controller/fragment-tracker.ts"),u=n(/*! ./controller/stream-controller */"./src/controller/stream-controller.ts"),d=n(/*! ./is-supported */"./src/is-supported.ts"),f=n(/*! ./utils/logger */"./src/utils/logger.ts"),h=n(/*! ./config */"./src/config.ts"),p=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js"),m=n(/*! ./events */"./src/events.ts"),v=n(/*! ./errors */"./src/errors.ts");function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var n=this.config=Object(h.mergeConfig)(e.DefaultConfig,t);this.userConfig=t,Object(f.enableLogs)(n.debug),this._autoLevelCapping=-1,n.progressive&&Object(h.enableStreamingMode)(n);var r=n.abrController,d=n.bufferController,m=n.capLevelController,v=n.fpsController,g=this.abrController=new r(this),y=this.bufferController=new d(this),b=this.capLevelController=new m(this),_=new v(this),E=new i.default(this),x=new a.default(this),S=new o.default(this),w=this.levelController=new l.default(this),k=new c.FragmentTracker(this),T=this.streamController=new u.default(this,k);b.setStreamController(T),_.setStreamController(T);var O=[w,T];this.networkControllers=O;var C=[E,x,g,y,b,_,S,k];this.audioTrackController=this.createController(n.audioTrackController,null,O),this.createController(n.audioStreamController,k,O),this.subtitleTrackController=this.createController(n.subtitleTrackController,null,O),this.createController(n.subtitleStreamController,k,O),this.createController(n.timelineController,null,C),this.emeController=this.createController(n.emeController,null,C),this.cmcdController=this.createController(n.cmcdController,null,C),this.latencyController=this.createController(s.default,null,C),this.coreComponents=C}e.isSupported=function(){return Object(d.isSupported)()};var t,n,y,b=e.prototype;return b.createController=function(e,t,n){if(e){var r=t?new e(this,t):new e(this);return n&&n.push(r),r}return null},b.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},b.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},b.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},b.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},b.listeners=function(e){return this._emitter.listeners(e)},b.emit=function(e,t,n){return this._emitter.emit(e,t,n)},b.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){f.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(m.Events.ERROR,{type:v.ErrorTypes.OTHER_ERROR,details:v.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1},b.listenerCount=function(e){return this._emitter.listenerCount(e)},b.destroy=function(){f.logger.log("destroy"),this.trigger(m.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0},b.attachMedia=function(e){f.logger.log("attachMedia"),this._media=e,this.trigger(m.Events.MEDIA_ATTACHING,{media:e})},b.detachMedia=function(){f.logger.log("detachMedia"),this.trigger(m.Events.MEDIA_DETACHING,void 0),this._media=null},b.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,i=this.url=r.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});f.logger.log("loadSource:"+i),t&&n&&n!==i&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.Events.MANIFEST_LOADING,{url:e})},b.startLoad=function(e){void 0===e&&(e=-1),f.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},b.stopLoad=function(){f.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},b.swapAudioCodec=function(){f.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},b.recoverMediaError=function(){f.logger.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},b.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},t=e,y=[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return m.Events}},{key:"ErrorTypes",get:function(){return v.ErrorTypes}},{key:"ErrorDetails",get:function(){return v.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:h.hlsDefaultConfig},set:function(t){e.defaultConfig=t}}],(n=[{key:"levels",get:function(){var e=this.levelController.levels;return e||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){f.logger.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){f.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){f.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){f.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){f.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(f.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r<n;r++)if(e[r].maxBitrate>t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{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}}])&&g(t.prototype,n),y&&g(t,y),e}();y.defaultConfig=void 0},"./src/is-supported.ts":
/*!*****************************!*\
!*** ./src/is-supported.ts ***!
\*****************************/
/*! exports provided: isSupported, changeTypeSupported */function(e,t,n){"use strict";n.r(t),n.d(t,"isSupported",(function(){return a})),n.d(t,"changeTypeSupported",(function(){return o}));var r=n(/*! ./utils/mediasource-helper */"./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function a(){var e=Object(r.getMediaSource)();if(!e)return!1;var t=i(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),a=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!a}function o(){var e,t=i();return"function"==typeof(null==t||null===(e=t.prototype)||void 0===e?void 0:e.changeType)}},"./src/loader/fragment-loader.ts":
/*!***************************************!*\
!*** ./src/loader/fragment-loader.ts ***!
\***************************************/
/*! exports provided: default, LoadError */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return d})),n.d(t,"LoadError",(function(){return h}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return(a=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return o(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)})(e)}function o(e,t,n){return(o=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&l(i,n.prototype),i}).apply(null,arguments)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=Math.pow(2,17),d=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var c=n.loader=e.loader=o?new o(a):new s(a),d=f(e),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};e.stats=c.stats,c.load(d,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,c),r({frag:e,part:null,payload:t.data,networkDetails:o})},onError:function(t,r,a){n.resetLoader(e,c),l(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,r,a){n.resetLoader(e,c),l(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,r,a){n.resetLoader(e,c),l(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,c){r.loader&&r.loader.destroy();var d=r.loader=e.loader=o?new o(a):new s(a),p=f(e,t),m={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=d.stats,d.load(p,m,{onSuccess:function(i,a,o,s){r.resetLoader(e,d),r.updateStatsFromPart(e,t);var c={frag:e,part:t,payload:i.data,networkDetails:s};n(c),l(c)},onError:function(n,a,o){r.resetLoader(e,d),c(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:o}))},onAbort:function(n,a,o){e.stats.aborted=t.stats.aborted,r.resetLoader(e,d),c(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:o}))},onTimeout:function(n,a,o){r.resetLoader(e,d),c(new h({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:o}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,c=r.loading;l.start?l.first+=c.first-c.start:(l.start=c.start,l.first=c.first),l.end=c.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function f(e,t){void 0===t&&(t=null);var n=t||e,i={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},a=n.byteRangeStartOffset,o=n.byteRangeEndOffset;return Object(r.isFiniteNumber)(a)&&Object(r.isFiniteNumber)(o)&&(i.rangeStart=a,i.rangeEnd=o),i}var h=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this].concat(i))||this).data=void 0,n.data=t,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,l(t,n),r}(a(Error))},"./src/loader/fragment.ts":
/*!********************************!*\
!*** ./src/loader/fragment.ts ***!
\********************************/
/*! exports provided: ElementaryStreamTypes, BaseSegment, Fragment, Part */function(e,t,n){"use strict";n.r(t),n.d(t,"ElementaryStreamTypes",(function(){return r})),n.d(t,"BaseSegment",(function(){return h})),n.d(t,"Fragment",(function(){return p})),n.d(t,"Part",(function(){return m}));var r,i=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),a=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ./load-stats */"./src/loader/load-stats.ts");function c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(r||(r={}));var h=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},f(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(a.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),p=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkey=void 0,r.type=void 0,r.loader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.appendedPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new l.LoadStats,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.type=t,r}c(t,e);var n=t.prototype;return n.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},n.setDecryptDataFromLevelKey=function(e,t){var n=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((n=s.LevelKey.fromURI(e.uri)).method=e.method,n.iv=this.createInitializationVector(t),n.keyFormat="identity"),n},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},f(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&o.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var e=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(h),m=function(e){function t(t,n,r,i,a){var o;(o=e.call(this,r)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new l.LoadStats,o.duration=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return c(t,e),f(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 e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(h)},"./src/loader/key-loader.ts":
/*!**********************************!*\
!*** ./src/loader/key-loader.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o}));var r=n(/*! ../events */"./src/events.ts"),i=n(/*! ../errors */"./src/errors.ts"),a=n(/*! ../utils/logger */"./src/utils/logger.ts"),o=function(){function e(e){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){this.hls.on(r.Events.KEY_LOADING,this.onKeyLoading,this)},t._unregisterListeners=function(){this.hls.off(r.Events.KEY_LOADING,this.onKeyLoading)},t.destroy=function(){for(var e in this._unregisterListeners(),this.loaders){var t=this.loaders[e];t&&t.destroy()}this.loaders={}},t.onKeyLoading=function(e,t){var n=t.frag,i=n.type,o=this.loaders[i];if(n.decryptdata){var s=n.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var l=this.hls.config;if(o&&(a.logger.warn("abort previous key loader for type:"+i),o.abort()),!s)return void a.logger.warn("key uri is falsy");var c=l.loader,u=n.loader=this.loaders[i]=new c(l);this.decrypturl=s,this.decryptkey=null;var d={url:s,frag:n,responseType:"arraybuffer"},f={timeout:l.fragLoadingTimeOut,maxRetry:0,retryDelay:l.fragLoadingRetryDelay,maxRetryDelay:l.fragLoadingMaxRetryTimeout,highWaterMark:0},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(d,f,h)}else this.decryptkey&&(n.decryptdata.key=this.decryptkey,this.hls.trigger(r.Events.KEY_LOADED,{frag:n}))}else a.logger.warn("Missing decryption data on fragment in onKeyLoading")},t.loadsuccess=function(e,t,n){var i=n.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(e.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(r.Events.KEY_LOADED,{frag:i})):a.logger.error("after key load, decryptdata unset")},t.loaderror=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},t.loadtimeout=function(e,t){var n=t.frag,a=n.loader;a&&a.abort(),delete this.loaders[n.type],this.hls.trigger(r.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},e}()},"./src/loader/level-details.ts":
/*!*************************************!*\
!*** ./src/loader/level-details.ts ***!
\*************************************/
/*! exports provided: LevelDetails */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelDetails",(function(){return a}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=e}var t,n,a;return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(r.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.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 e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/level-key.ts":
/*!*********************************!*\
!*** ./src/loader/level-key.ts ***!
\*********************************/
/*! exports provided: LevelKey */function(e,t,n){"use strict";n.r(t),n.d(t,"LevelKey",(function(){return a}));var r=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js");function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(e,t){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=t?Object(r.buildAbsoluteURL)(e,t,{alwaysNormalize:!0}):e}var t,n,a;return e.fromURL=function(t,n){return new e(t,n)},e.fromURI=function(t){return new e(t)},t=e,(n=[{key:"uri",get:function(){return this._uri}}])&&i(t.prototype,n),a&&i(t,a),e}()},"./src/loader/load-stats.ts":
/*!**********************************!*\
!*** ./src/loader/load-stats.ts ***!
\**********************************/
/*! exports provided: LoadStats */function(e,t,n){"use strict";n.r(t),n.d(t,"LoadStats",(function(){return r}));var r=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":
/*!***********************************!*\
!*** ./src/loader/m3u8-parser.ts ***!
\***********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),a=n(/*! ./fragment */"./src/loader/fragment.ts"),o=n(/*! ./level-details */"./src/loader/level-details.ts"),s=n(/*! ./level-key */"./src/loader/level-key.ts"),l=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),c=n(/*! ../utils/logger */"./src/utils/logger.ts"),u=n(/*! ../utils/codecs */"./src/utils/codecs.ts"),d=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,f=/#EXT-X-MEDIA:(.*)/g,h=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),m=/\.(mp4|m4s|m4v|m4a)$/i,v=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t=e.split(".");if(t.length>2){var n=t.shift()+".";return n+=parseInt(t.shift()).toString(16),n+=("000"+parseInt(t.shift()).toString(16)).substr(-4)}return e},e.resolve=function(e,t){return i.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a={},o=!1;for(d.lastIndex=0;null!=(r=d.exec(t));)if(r[1]){var s=new l.AttrList(r[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(r[2],n)},u=s.decimalResolution("RESOLUTION");u&&(c.width=u.width,c.height=u.height),g((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=e.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(r[3]){var f=new l.AttrList(r[3]);f["DATA-ID"]&&(o=!0,a[f["DATA-ID"]]=f)}return{levels:i,sessionData:o?a:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(f.lastIndex=0;null!==(a=f.exec(t));){var c=new l.AttrList(a[1]);if(c.TYPE===r){var u={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:r,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?e.resolve(c.URI,n):""};if(i.length){var d=e.findGroup(i,u.groupId)||i[0];y(u,d,"audioCodec"),y(u,d,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,u,d){var f,v,g,y=new o.LevelDetails(t),_=y.fragments,E=null,x=0,S=0,w=0,k=0,T=null,O=new a.Fragment(u,t),C=-1,A=!1;for(h.lastIndex=0,y.m3u8=e;null!==(f=h.exec(e));){A&&(A=!1,(O=new a.Fragment(u,t)).start=w,O.sn=x,O.cc=k,O.level=n,E&&(O.initSegment=E,O.rawProgramDateTime=E.rawProgramDateTime));var L=f[1];if(L){O.duration=parseFloat(L);var D=(" "+f[2]).slice(1);O.title=D||null,O.tagList.push(D?["INF",L,D]:["INF",L])}else if(f[3])Object(r.isFiniteNumber)(O.duration)&&(O.start=w,g&&(O.levelkey=g),O.sn=x,O.level=n,O.cc=k,O.urlId=d,_.push(O),O.relurl=(" "+f[3]).slice(1),b(O,T),T=O,w+=O.duration,x++,S=0,A=!0);else if(f[4]){var I=(" "+f[4]).slice(1);T?O.setByteRange(I,T):O.setByteRange(I)}else if(f[5])O.rawProgramDateTime=(" "+f[5]).slice(1),O.tagList.push(["PROGRAM-DATE-TIME",O.rawProgramDateTime]),-1===C&&(C=_.length);else{if(!(f=f[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(v=1;v<f.length&&void 0===f[v];v++);var R=(" "+f[v]).slice(1),N=(" "+f[v+1]).slice(1),M=f[v+2]?(" "+f[v+2]).slice(1):"";switch(R){case"PLAYLIST-TYPE":y.type=N.toUpperCase();break;case"MEDIA-SEQUENCE":x=y.startSN=parseInt(N);break;case"SKIP":var P=new l.AttrList(N),j=P.decimalInteger("SKIPPED-SEGMENTS");if(Object(r.isFiniteNumber)(j)){y.skippedSegments=j;for(var F=j;F--;)_.unshift(null);x+=j}var U=P.enumeratedString("RECENTLY-REMOVED-DATERANGES");U&&(y.recentlyRemovedDateranges=U.split("\t"));break;case"TARGETDURATION":y.targetduration=parseFloat(N);break;case"VERSION":y.version=parseInt(N);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(N||M)&&O.tagList.push(M?[N,M]:[N]);break;case"DIS":k++;case"GAP":O.tagList.push([R]);break;case"BITRATE":O.tagList.push([R,N]);break;case"DISCONTINUITY-SEQ":k=parseInt(N);break;case"KEY":var B,G=new l.AttrList(N),z=G.enumeratedString("METHOD"),H=G.URI,K=G.hexadecimalInteger("IV"),V=G.enumeratedString("KEYFORMATVERSIONS"),W=G.enumeratedString("KEYID"),q=null!=(B=G.enumeratedString("KEYFORMAT"))?B:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(q)>-1){c.logger.warn("Keyformat "+q+" is not supported from the manifest");continue}if("identity"!==q)continue;z&&(g=s.LevelKey.fromURL(t,H),H&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(z)>=0&&(g.method=z,g.keyFormat=q,W&&(g.keyID=W),V&&(g.keyFormatVersions=V),g.iv=K));break;case"START":var X=new l.AttrList(N).decimalFloatingPoint("TIME-OFFSET");Object(r.isFiniteNumber)(X)&&(y.startTimeOffset=X);break;case"MAP":var Y=new l.AttrList(N);O.relurl=Y.URI,Y.BYTERANGE&&O.setByteRange(Y.BYTERANGE),O.level=n,O.sn="initSegment",g&&(O.levelkey=g),O.initSegment=null,E=O,A=!0;break;case"SERVER-CONTROL":var $=new l.AttrList(N);y.canBlockReload=$.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=$.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&$.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=$.optionalFloat("PART-HOLD-BACK",0),y.holdBack=$.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var J=new l.AttrList(N);y.partTarget=J.decimalFloatingPoint("PART-TARGET");break;case"PART":var Q=y.partList;Q||(Q=y.partList=[]);var Z=S>0?Q[Q.length-1]:void 0,ee=S++,te=new a.Part(new l.AttrList(N),O,t,ee,Z);Q.push(te),O.duration+=te.duration;break;case"PRELOAD-HINT":var ne=new l.AttrList(N);y.preloadHint=ne;break;case"RENDITION-REPORT":var re=new l.AttrList(N);y.renditionReports=y.renditionReports||[],y.renditionReports.push(re);break;default:c.logger.warn("line parsed but not handled: "+f)}}}T&&!T.relurl?(_.pop(),w-=T.duration,y.partList&&(y.fragmentHint=T)):y.partList&&(b(O,T),O.cc=k,y.fragmentHint=O);var ie=_.length,ae=_[0],oe=_[ie-1];if((w+=y.skippedSegments*y.targetduration)>0&&ie&&oe){y.averagetargetduration=w/ie;var se=oe.sn;y.endSN="initSegment"!==se?se:0,ae&&(y.startCC=ae.cc,ae.initSegment||y.fragments.every((function(e){return e.relurl&&(t=e.relurl,m.test(null!=(n=null===(r=i.parseURL(t))||void 0===r?void 0:r.path)?n:""));var t,n,r}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(O=new a.Fragment(u,t)).relurl=oe.relurl,O.level=n,O.sn="initSegment",ae.initSegment=O,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(w+=y.fragmentHint.duration),y.totalduration=w,y.endCC=k,C>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(_,C),y},e}();function g(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return Object(u.isCodecType)(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function y(e,t,n){var r=t[n];r&&(e[n]=r)}function b(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(r.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":
/*!***************************************!*\
!*** ./src/loader/playlist-loader.ts ***!
\***************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../events */"./src/events.ts"),a=n(/*! ../errors */"./src/errors.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),l=n(/*! ./m3u8-parser */"./src/loader/m3u8-parser.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/attr-list */"./src/utils/attr-list.ts");function d(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var f=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,s,l=this.hls.config,u=this.getInternalLoader(e);if(u){var d=u.context;if(d&&d.url===e.url)return void o.logger.trace("[playlist-loader]: playlist request ongoing");o.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case c.PlaylistContextType.MANIFEST:n=l.manifestLoadingMaxRetry,r=l.manifestLoadingTimeOut,i=l.manifestLoadingRetryDelay,a=l.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:n=0,r=l.levelLoadingTimeOut;break;default:n=l.levelLoadingMaxRetry,r=l.levelLoadingTimeOut,i=l.levelLoadingRetryDelay,a=l.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===c.PlaylistContextType.LEVEL&&null!==e.level?s=this.hls.levels[e.level].details:e.type===c.PlaylistContextType.AUDIO_TRACK&&null!==e.id?s=this.hls.audioTracks[e.id].details:e.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(s=this.hls.subtitleTracks[e.id].details),s)){var f=s.partTarget,h=s.targetduration;f&&h&&(r=Math.min(1e3*Math.max(3*f,.8*h),r))}var p={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,p,m)},t.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this.handleSidxRequest(e,n),void this.handlePlaylistLoaded(e,t,n,r);this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var a=this.hls,s=e.data,c=d(e,n),f=l.default.parseMasterPlaylist(s,c),h=f.levels,p=f.sessionData;if(h.length){var m=h.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),v=h.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),g=l.default.parseMasterPlaylistMedia(s,c,"AUDIO",m),y=l.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",v),b=l.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");g.length&&(g.some((function(e){return!e.url}))||!h[0].audioCodec||h[0].attrs.AUDIO||(o.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))),a.trigger(i.Events.MANIFEST_LOADED,{levels:h,audioTracks:g,subtitles:y,captions:b,url:c,stats:t,networkDetails:r,sessionData:p})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,o){var s=this.hls,f=n.id,h=n.level,p=n.type,m=d(e,n),v=Object(r.isFiniteNumber)(f)?f:0,g=Object(r.isFiniteNumber)(h)?h:v,y=function(e){switch(e.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(n),b=l.default.parseLevelPlaylist(e.data,m,g,y,v);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var _={attrs:new u.AttrList({}),bitrate:0,details:b,name:"",url:m};s.trigger(i.Events.MANIFEST_LOADED,{levels:[_],audioTracks:[],url:m,stats:t,networkDetails:o,sessionData:null})}if(t.parsing.end=performance.now(),b.needSidxRanges){var E,x=null===(E=b.fragments[0].initSegment)||void 0===E?void 0:E.url;this.load({url:x,isSidxRequest:!0,type:p,level:h,levelDetails:b,id:f,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else n.levelDetails=b,this.handlePlaylistLoaded(e,t,n,o)}else s.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:m,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleSidxRequest=function(e,t){var n=Object(s.parseSegmentIndex)(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var r=e.info,a=i.fragments[t];0===a.byteRange.length&&a.setByteRange(String(1+r.end-r.start)+"@"+String(r.start)),a.initSegment&&a.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}))}},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.NETWORK_ERROR,details:a.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===c.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),o.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var s=a.ErrorDetails.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case c.PlaylistContextType.MANIFEST:s=n?a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:a.ErrorDetails.MANIFEST_LOAD_ERROR,l=!0;break;case c.PlaylistContextType.LEVEL:s=n?a.ErrorDetails.LEVEL_LOAD_TIMEOUT:a.ErrorDetails.LEVEL_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=n?a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=n?a.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:a.ErrorDetails.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var d={type:a.ErrorTypes.NETWORK_ERROR,details:s,fatal:l,url:e.url,loader:u,context:e,networkDetails:t};r&&(d.response=r),this.hls.trigger(i.Events.ERROR,d)},t.handlePlaylistLoaded=function(e,t,n,r){var a=n.type,o=n.level,s=n.id,l=n.groupId,u=n.loader,d=n.levelDetails,f=n.deliveryDirectives;if(null!=d&&d.targetduration){if(u)switch(d.live&&(u.getCacheAge&&(d.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(d.ageHeader)||(d.ageHeader=0)),a){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:d,level:o||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:f});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:f});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:d,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:f})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();t.default=f},"./src/polyfills/number.ts":
/*!*********************************!*\
!*** ./src/polyfills/number.ts ***!
\*********************************/
/*! exports provided: isFiniteNumber, MAX_SAFE_INTEGER */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r})),n.d(t,"MAX_SAFE_INTEGER",(function(){return i}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":
/*!*********************************!*\
!*** ./src/remux/aac-helper.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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(1===t)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(2===t)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(3===t)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])}},e}();t.default=r},"./src/remux/mp4-generator.ts":
/*!************************************!*\
!*** ./src/remux/mp4-generator.ts ***!
\************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=Math.pow(2,32)-1,i=function(){function e(){}return e.init=function(){var t;for(t in e.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:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=r.length,o=a;a--;)t+=r[a].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a<o;a++)s.set(r[a],t),t+=r[a].byteLength;return s},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(r+1));return e.box(e.types.mdhd,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,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var i=Math.floor(n/(r+1)),a=Math.floor(n%(r+1)),o=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,255&t,i>>24,i>>16&255,i>>8&255,255&i,a>>24,a>>16&255,a>>8&255,255&a,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 e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,a[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,c=t.height,u=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.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,l>>8&255,255&l,c>>8&255,255&c,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]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,255&u,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.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,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.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,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,i=t.duration*t.timescale,a=t.width,o=t.height,s=Math.floor(i/(r+1)),l=Math.floor(i%(r+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,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,a>>8&255,255&a,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var i=e.sdtp(t),a=t.id,o=Math.floor(n/(r+1)),s=Math.floor(n%(r+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,c=t.samples||[],u=c.length,d=12+16*u,f=new Uint8Array(d);for(n+=8+d,f.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,255&u,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<u;r++)a=(i=c[r]).duration,o=i.size,s=i.flags,l=i.cts,f.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,t.default=i},"./src/remux/mp4-remuxer.ts":
/*!**********************************!*\
!*** ./src/remux/mp4-remuxer.ts ***!
\**********************************/
/*! exports provided: default, normalizePts */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return m})),n.d(t,"normalizePts",(function(){return v}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./aac-helper */"./src/remux/aac-helper.ts"),a=n(/*! ./mp4-generator */"./src/remux/mp4-generator.ts"),o=n(/*! ../events */"./src/events.ts"),s=n(/*! ../errors */"./src/errors.ts"),l=n(/*! ../utils/logger */"./src/utils/logger.ts"),c=n(/*! ../types/loader */"./src/types/loader.ts"),u=n(/*! ../utils/timescale-conversion */"./src/utils/timescale-conversion.ts");function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var f=null,h=null,p=!1,m=function(){function e(e,t,n,r){if(void 0===r&&(r=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===f){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);f=i?parseInt(i[1]):0}if(null===h){var a=navigator.userAgent.match(/Safari\/(\d+)/i);h=a?parseInt(a[1]):0}p=!!f&&f<75||!!h&&h<600}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){l.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){l.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){l.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var r=n.pts-e;return r<-4294967296?(t=!0,v(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&l.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var u,d,f,h,p,m,g=i,y=i,b=e.pid>-1,_=t.pid>-1,E=t.samples.length,x=e.samples.length>0,S=E>1;if((!b||x)&&(!_||S)||this.ISGenerated||o){this.ISGenerated||(f=this.generateIS(e,t,i));var w=this.isVideoContiguous,k=-1;if(S&&(k=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!w&&this.config.forceKeyFrameOnDiscontinuity))if(m=!0,k>0){l.logger.warn("[mp4-remuxer]: Dropped "+k+" out of "+E+" video samples due to a missing keyframe");var T=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(k),t.dropped+=k,y+=(t.samples[0].pts-T)/(t.timescale||9e4)}else-1===k&&(l.logger.warn("[mp4-remuxer]: No keyframe found out of "+E+" video samples"),m=!1);if(this.ISGenerated){if(x&&S){var O=this.getVideoStartPts(t.samples),C=(v(e.samples[0].pts,O)-O)/t.inputTimeScale;g+=Math.max(0,C),y+=Math.max(0,-C)}if(x){if(e.samplerate||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),f=this.generateIS(e,t,i)),d=this.remuxAudio(e,g,this.isAudioContiguous,a,_||S||s===c.PlaylistLevelType.AUDIO?y:void 0),S){var A=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(l.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),f=this.generateIS(e,t,i)),u=this.remuxVideo(t,y,w,A)}}else S&&(u=this.remuxVideo(t,y,w,0));u&&(u.firstKeyFrame=k,u.independent=-1!==k)}}return this.ISGenerated&&(n.samples.length&&(p=this.remuxID3(n,i)),r.samples.length&&(h=this.remuxText(r,i))),{audio:d,video:u,initSegment:f,independent:m,text:h,id3:p}},t.generateIS=function(e,t,n){var i,o,s,l=e.samples,c=t.samples,u=this.typeSupported,d={},f=!Object(r.isFiniteNumber)(this._initPTS),h="audio/mp4";if(f&&(i=o=1/0),e.config&&l.length&&(e.timescale=e.samplerate,e.isAAC||(u.mpeg?(h="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),d.audio={id:"audio",container:h,codec:e.codec,initSegment:!e.isAAC&&u.mpeg?new Uint8Array(0):a.default.initSegment([e]),metadata:{channelCount:e.channelCount}},f&&(s=e.inputTimeScale,i=o=l[0].pts-Math.round(s*n))),t.sps&&t.pps&&c.length&&(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:a.default.initSegment([t]),metadata:{width:t.width,height:t.height}},f)){s=t.inputTimeScale;var p=this.getVideoStartPts(c),m=Math.round(s*n);o=Math.min(o,v(c[0].dts,p)-m),i=Math.min(i,p-m)}if(Object.keys(d).length)return this.ISGenerated=!0,f&&(this._initPTS=i,this._initDTS=o),{tracks:d,initPTS:i,timescale:s}},t.remuxVideo=function(e,t,n,r){var i,c,h,m=e.inputTimeScale,y=e.samples,b=[],_=y.length,E=this._initPTS,x=this.nextAvcDts,S=8,w=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,T=0,O=!1;n&&null!==x||(x=t*m-(y[0].pts-v(y[0].dts,y[0].pts)));for(var C=0;C<_;C++){var A=y[C];A.pts=v(A.pts-E,x),A.dts=v(A.dts-E,x),A.dts>A.pts&&(T=Math.max(Math.min(T,A.pts-A.dts),-18e3)),A.dts<y[C>0?C-1:C].dts&&(O=!0)}O&&y.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),c=y[0].dts,h=y[y.length-1].dts;var L=Math.round((h-c)/(_-1));if(T<0){if(T<-2*L){l.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-L,!0)+" ms");for(var D=T,I=0;I<_;I++)y[I].dts=D=Math.max(D,y[I].pts-L),y[I].pts=Math.max(D,y[I].pts)}else{l.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(u.toMsFromMpegTsClock)(T,!0)+" ms to overcome this issue");for(var R=0;R<_;R++)y[R].dts=y[R].dts+T}c=y[0].dts}if(n){var N=c-x,M=N>L;if(M||N<-1){M?l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms ("+N+"dts) hole between fragments detected, filling it"):l.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-N,!0)+" ms ("+N+"dts) overlapping between fragments detected"),c=x;var P=y[0].pts-N;y[0].dts=c,y[0].pts=P,l.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(P,!0)+"/"+Object(u.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(N,!0)+" ms")}}p&&(c=Math.max(0,c));for(var j=0,F=0,U=0;U<_;U++){for(var B=y[U],G=B.units,z=G.length,H=0,K=0;K<z;K++)H+=G[K].data.length;F+=H,j+=z,B.length=H,B.dts=Math.max(B.dts,c),B.pts=Math.max(B.pts,B.dts,0),w=Math.min(B.pts,w),k=Math.max(B.pts,k)}h=y[_-1].dts;var V,W=F+4*j+8;try{V=new Uint8Array(W)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:W,reason:"fail allocating video mdat "+W})}var q=new DataView(V.buffer);q.setUint32(0,W),V.set(a.default.types.mdat,4);for(var X=0;X<_;X++){for(var Y=y[X],$=Y.units,J=0,Q=0,Z=$.length;Q<Z;Q++){var ee=$[Q],te=ee.data,ne=ee.data.byteLength;q.setUint32(S,ne),S+=4,V.set(te,S),S+=ne,J+=4+ne}if(X<_-1)i=y[X+1].dts-Y.dts;else{var re=this.config,ie=Y.dts-y[X>0?X-1:X].dts;if(re.stretchShortVideoTrack&&null!==this.nextAudioPts){var ae=Math.floor(re.maxBufferHole*m),oe=(r?w+r*m:this.nextAudioPts)-Y.pts;oe>ae?((i=oe-ie)<0&&(i=ie),l.logger.log("[mp4-remuxer]: It is approximately "+oe/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=ie}else i=ie}var se=Math.round(Y.pts-Y.dts);b.push(new g(Y.key,i,J,se))}if(b.length&&f&&f<70){var le=b[0].flags;le.dependsOn=2,le.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=x=h+i,this.isVideoContiguous=!0;var ce={data1:a.default.moof(e.sequenceNumber++,c,d({},e,{samples:b})),data2:V,startPTS:w/m,endPTS:(k+i)/m,startDTS:c/m,endDTS:x/m,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(V.length,"MDAT length must not be zero"),ce},t.remuxAudio=function(e,t,n,r,c){var u=e.inputTimeScale,f=u/(e.samplerate?e.samplerate:u),h=e.isAAC?1024:1152,p=h*f,m=this._initPTS,y=!e.isAAC&&this.typeSupported.mpeg,b=[],_=e.samples,E=y?0:8,x=this.nextAudioPts||-1,S=t*u;if(this.isAudioContiguous=n=n||_.length&&x>0&&(r&&Math.abs(S-x)<9e3||Math.abs(v(_[0].pts-m,S)-x)<20*p),_.forEach((function(e){e.pts=v(e.pts-m,S)})),!n||x<0){if(!(_=_.filter((function(e){return e.pts>=0}))).length)return;x=0===c?0:r?Math.max(0,S):_[0].pts}if(e.isAAC)for(var w=void 0!==c,k=this.config.maxAudioFramesDrift,T=0,O=x;T<_.length;T++){var C=_[T],A=C.pts,L=A-O,D=Math.abs(1e3*L/u);if(L<=-k*p&&w)0===T&&(l.logger.warn("Audio frame @ "+(A/u).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*L/u)+" ms."),this.nextAudioPts=x=O=A);else if(L>=k*p&&D<1e4&&w){var I=Math.round(L/p);(O=A-I*p)<0&&(I--,O+=p),0===T&&(this.nextAudioPts=x=O),l.logger.warn("[mp4-remuxer]: Injecting "+I+" audio frame @ "+(O/u).toFixed(3)+"s due to "+Math.round(1e3*L/u)+" ms gap.");for(var R=0;R<I;R++){var N=Math.max(O,0),M=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);M||(l.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),M=C.unit.subarray()),_.splice(T,0,{unit:M,pts:N}),O+=p,T++}}C.pts=O,O+=p}for(var P,j=null,F=null,U=0,B=_.length;B--;)U+=_[B].unit.byteLength;for(var G=0,z=_.length;G<z;G++){var H=_[G],K=H.unit,V=H.pts;if(null!==F)b[G-1].duration=Math.round((V-F)/f);else{if(n&&e.isAAC&&(V=x),j=V,!(U>0))return;U+=E;try{P=new Uint8Array(U)}catch(e){return void this.observer.emit(o.Events.ERROR,o.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:U,reason:"fail allocating audio mdat "+U})}y||(new DataView(P.buffer).setUint32(0,U),P.set(a.default.types.mdat,4))}P.set(K,E);var W=K.byteLength;E+=W,b.push(new g(!0,h,W,0)),F=V}var q=b.length;if(q){var X=b[b.length-1];this.nextAudioPts=x=F+f*X.duration;var Y=y?new Uint8Array(0):a.default.moof(e.sequenceNumber++,j/f,d({},e,{samples:b}));e.samples=[];var $=j/u,J=x/u,Q={data1:Y,data2:P,startPTS:$,endPTS:J,startDTS:$,endDTS:J,type:"audio",hasAudio:!0,hasVideo:!1,nb:q};return this.isAudioContiguous=!0,console.assert(P.length,"MDAT length must not be zero"),Q}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,c=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,d=1024*o,f=Math.ceil((u-c)/d),h=i.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(l.logger.warn("[mp4-remuxer]: remux empty Audio"),h){for(var p=[],m=0;m<f;m++){var v=c+m*d;p.push({unit:h,pts:v,dts:v})}return e.samples=p,this.remuxAudio(e,t,n,!1)}l.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},t.remuxID3=function(e,t){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,i=this._initPTS,a=this._initDTS,o=0;o<n;o++){var s=e.samples[o];s.pts=v(s.pts-i,t*r)/r,s.dts=v(s.dts-a,t*r)/r}var l=e.samples;return e.samples=[],{samples:l}}},t.remuxText=function(e,t){var n=e.samples.length;if(n){for(var r=e.inputTimeScale,i=this._initPTS,a=0;a<n;a++){var o=e.samples[a];o.pts=v(o.pts-i,t*r)/r}e.samples.sort((function(e,t){return e.pts-t.pts}));var s=e.samples;return e.samples=[],{samples:s}}},e}();function v(e,t){var n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}var g=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new y(e)},y=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},"./src/remux/passthrough-remuxer.ts":
/*!******************************************!*\
!*** ./src/remux/passthrough-remuxer.ts ***!
\******************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../utils/mp4-tools */"./src/utils/mp4-tools.ts"),a=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),o=n(/*! ../utils/logger */"./src/utils/logger.ts"),s=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndDTS=null},t.resetNextTimestamp=function(){this.lastEndDTS=null},t.resetInitSegment=function(e,t,n){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(e),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Object(i.parseInitSegment)(e);t||(t=c(r.audio,a.ElementaryStreamTypes.AUDIO)),n||(n=c(r.video,a.ElementaryStreamTypes.VIDEO));var s={};r.audio&&r.video?s.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?s.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?s.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:o.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},t.remux=function(e,t,n,a,s){var c=this.initPTS,u=this.lastEndDTS,d={audio:void 0,video:void 0,text:a,id3:n,initSegment:void 0};Object(r.isFiniteNumber)(u)||(u=this.lastEndDTS=s||0);var f=t.samples;if(!f||!f.length)return d;var h={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(f),p=this.initData),!p||!p.length)return o.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(h.tracks=this.initTracks,this.emitInitSegment=!1),Object(r.isFiniteNumber)(c)||(this.initPTS=h.initPTS=c=l(p,f,u));var m=Object(i.getDuration)(f,p),v=u,g=m+v;Object(i.offsetStartDTS)(p,f,c),m>0?this.lastEndDTS=g:(o.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,_="";y&&(_+="audio"),b&&(_+="video");var E={data1:f,startPTS:v,startDTS:v,endPTS:g,endDTS:g,type:_,hasAudio:y,hasVideo:b,nb:1,dropped:0};return d.audio="audio"===E.type?E:void 0,d.video="audio"!==E.type?E:void 0,d.text=a,d.id3=n,d.initSegment=h,d},e}(),l=function(e,t,n){return Object(i.getStartDTS)(e,t)-n};function c(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===a.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}t.default=s},"./src/task-loop.ts":
/*!**************************!*\
!*** ./src/task-loop.ts ***!
\**************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}()},"./src/types/cmcd.ts":
/*!***************************!*\
!*** ./src/types/cmcd.ts ***!
\***************************/
/*! exports provided: CMCDVersion, CMCDObjectType, CMCDStreamingFormat, CMCDStreamType */function(e,t,n){"use strict";n.r(t),n.d(t,"CMCDVersion",(function(){return o})),n.d(t,"CMCDObjectType",(function(){return r})),n.d(t,"CMCDStreamingFormat",(function(){return i})),n.d(t,"CMCDStreamType",(function(){return a}));var r,i,a,o=1;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(r||(r={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(i||(i={})),function(e){e.VOD="v",e.LIVE="l"}(a||(a={}))},"./src/types/level.ts":
/*!****************************!*\
!*** ./src/types/level.ts ***!
\****************************/
/*! exports provided: HlsSkip, getSkipValue, HlsUrlParameters, Level */function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i;function a(e,t){var n=e.canSkipUntil,r=e.canSkipDateRanges,a=e.endSN;return n&&(void 0!==t?t-a:0)<n?r?i.v2:i.Yes:i.No}n.r(t),n.d(t,"HlsSkip",(function(){return i})),n.d(t,"getSkipValue",(function(){return a})),n.d(t,"HlsUrlParameters",(function(){return o})),n.d(t,"Level",(function(){return s})),function(e){e.No="",e.Yes="YES",e.v2="v2"}(i||(i={}));var o=function(){function e(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.toString()},e}(),s=function(){function e(e){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this.attrs=e.attrs,this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter((function(e){return e})).join(",").replace(/\.[^.,]+/g,"")}var t,n,i;return t=e,(n=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(e){var t=e%this.url.length;this._urlId!==t&&(this.details=void 0,this._urlId=t)}}])&&r(t.prototype,n),i&&r(t,i),e}()},"./src/types/loader.ts":
/*!*****************************!*\
!*** ./src/types/loader.ts ***!
\*****************************/
/*! exports provided: PlaylistContextType, PlaylistLevelType */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"PlaylistContextType",(function(){return r})),n.d(t,"PlaylistLevelType",(function(){return i})),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(i||(i={}))},"./src/types/transmuxer.ts":
/*!*********************************!*\
!*** ./src/types/transmuxer.ts ***!
\*********************************/
/*! exports provided: ChunkMetadata */function(e,t,n){"use strict";n.r(t),n.d(t,"ChunkMetadata",(function(){return r}));var r=function(e,t,n,r,i,a){void 0===r&&(r=0),void 0===i&&(i=-1),void 0===a&&(a=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=a}},"./src/utils/attr-list.ts":
/*!********************************!*\
!*** ./src/utils/attr-list.ts ***!
\********************************/
/*! exports provided: AttrList */function(e,t,n){"use strict";n.r(t),n.d(t,"AttrList",(function(){return a}));var r=/^(\d+)x(\d+)$/,i=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,a=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=r.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(i.lastIndex=0;null!==(t=i.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}()},"./src/utils/binary-search.ts":
/*!************************************!*\
!*** ./src/utils/binary-search.ts ***!
\************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}}},"./src/utils/buffer-helper.ts":
/*!************************************!*\
!*** ./src/utils/buffer-helper.ts ***!
\************************************/
/*! exports provided: BufferHelper */function(e,t,n){"use strict";n.r(t),n.d(t,"BufferHelper",(function(){return a}));var r=n(/*! ./logger */"./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},a=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;i<a.length;i++)o.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(o,n,r)}}catch(e){}return{len:0,start:n,end:n,nextStart:void 0}},e.bufferedInfo=function(e,t,n){t=Math.max(0,t),e.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var a=r.length;if(a){var o=r[a-1].end;e[i].start-o<n?e[i].end>o&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,c=t,u=t,d=0;d<r.length;d++){var f=r[d].start,h=r[d].end;if(t+n>=f&&t<h)c=f,l=(u=h)-t;else if(t+n<f){s=f;break}}return{len:l,start:c||0,end:u||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return r.logger.log("failed to get media.buffered",e),i}},e}()},"./src/utils/cea-608-parser.ts":
/*!*************************************!*\
!*** ./src/utils/cea-608-parser.ts ***!
\*************************************/
/*! exports provided: Row, CaptionScreen, default */function(e,t,n){"use strict";n.r(t),n.d(t,"Row",(function(){return v})),n.d(t,"CaptionScreen",(function(){return g}));var r,i=n(/*! ../utils/logger */"./src/utils/logger.ts"),a={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},o=function(e){var t=e;return a.hasOwnProperty(e)&&(t=a[e]),String.fromCharCode(t)},s={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},c={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},u={25:2,26:4,29:6,30:8,31:10,27:13,28:15},d=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(r||(r={}));var f=function(){function e(){this.time=null,this.verboseLevel=r.ERROR}return e.prototype.log=function(e,t){this.verboseLevel>=e&&i.logger.log(this.time+" ["+e+"] "+t)},e}(),h=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},p=function(){function e(e,t,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),m=function(){function e(e,t,n,r,i,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new p(t,n,r,i,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),v=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<100;t++)this.chars.push(new m);this.logger=e,this.pos=0,this.currPenState=new p}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<100;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(r.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(this.logger.log(r.DEBUG,"Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=o(e);this.pos>=100?this.logger.log(r.ERROR,"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),g=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new v(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(r.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(r.INFO,"pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<15;n++)this.rows[n].clear();var i=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){var o=a.rows[i].cueStartTime,s=this.logger.time;if(o&&null!==s&&o<s)for(var l=0;l<this.nrRollUpRows;l++)this.rows[t-this.nrRollUpRows+l+1].copy(a.rows[i+l])}}this.currRow=t;var c=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,d=Math.max(u-1,0);c.setCursor(e.indent),e.color=c.chars[d].penState.foreground}var f={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(f)},t.setBkgData=function(e){this.logger.log(r.INFO,"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(r.TEXT,this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(r.INFO,"Rolling up")}else this.logger.log(r.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),y=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new g(n),this.nonDisplayedMemory=new g(n),this.lastOutputScreen=new g(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(r.INFO,"MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(r.INFO,n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(r.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(r.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(r.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(r.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(r.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(r.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(r.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(r.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(r.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(r.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(r.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(r.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(this.logger.log(r.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(r.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(r.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(r.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),b=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new f;this.channels=[null,new y(e,t,r),new y(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,i,a,o=!1;this.logger.time=e;for(var s=0;s<t.length;s+=2)if(i=127&t[s],a=127&t[s+1],0!==i||0!==a){if(this.logger.log(r.DATA,"["+h([t[s],t[s+1]])+"] -> ("+h([i,a])+")"),(n=this.parseCmd(i,a))||(n=this.parseMidrow(i,a)),n||(n=this.parsePAC(i,a)),n||(n=this.parseBackgroundAttributes(i,a)),!n&&(o=this.parseChars(i,a))){var l=this.currentChannel;l&&l>0?this.channels[l].insertChars(o):this.logger.log(r.WARNING,"No channel found yet. TEXT-MODE?")}n||o||this.logger.log(r.WARNING,"Couldn't parse cleaned data "+h([i,a])+" orig: "+h([t[s],t[s+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(E(e,t,n))return _(null,null,n),this.logger.log(r.DEBUG,"Repeated command ("+h([e,t])+") is dropped"),!0;var i=20===e||21===e||23===e?1:2,a=this.channels[i];return 20===e||21===e||28===e||29===e?32===t?a.ccRCL():33===t?a.ccBS():34===t?a.ccAOF():35===t?a.ccAON():36===t?a.ccDER():37===t?a.ccRU(2):38===t?a.ccRU(3):39===t?a.ccRU(4):40===t?a.ccFON():41===t?a.ccRDC():42===t?a.ccTR():43===t?a.ccRTD():44===t?a.ccEDM():45===t?a.ccCR():46===t?a.ccENM():47===t&&a.ccEOC():a.ccTO(t-32),_(e,t,n),this.currentChannel=i,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(r.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[n];return!!i&&(i.ccMIDROW(t),this.logger.log(r.DEBUG,"MIDROW ("+h([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(E(e,t,r))return _(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?s[e]:c[e]:1===i?l[e]:u[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),_(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,i,a=null,s=null;if(e>=25?(n=2,s=e-8):(n=1,s=e),s>=17&&s<=19?(i=17===s?t+80:18===s?t+112:t+144,this.logger.log(r.INFO,"Special char '"+o(i)+"' in channel "+n),a=[i]):e>=32&&e<=127&&(a=0===t?[e]:[e,t]),a){var l=h(a);this.logger.log(r.DEBUG,"Char codes = "+l.join(",")),_(e,t,this.cmdHistory)}return a},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=d[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),_(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var n=this.channels[t];n&&n.cueSplitAtTime(e)}},e}();function _(e,t,n){n.a=e,n.b=t}function E(e,t,n){return n.a===e&&n.b===t}t.default=b},"./src/utils/codecs.ts":
/*!*****************************!*\
!*** ./src/utils/codecs.ts ***!
\*****************************/
/*! exports provided: isCodecType, isCodecSupportedInMp4 */function(e,t,n){"use strict";n.r(t),n.d(t,"isCodecType",(function(){return i})),n.d(t,"isCodecSupportedInMp4",(function(){return a}));var r={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function i(e,t){var n=r[t];return!!n&&!0===n[e.slice(0,4)]}function a(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}},"./src/utils/cues.ts":
/*!***************************!*\
!*** ./src/utils/cues.ts ***!
\***************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ./vttparser */"./src/utils/vttparser.ts"),i=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts"),a=n(/*! ./texttrack-utils */"./src/utils/texttrack-utils.ts"),o=/\s/,s={newCue:function(e,t,n,s){for(var l,c,u,d,f,h=[],p=self.VTTCue||self.TextTrackCue,m=0;m<s.rows.length;m++)if(u=!0,d=0,f="",!(l=s.rows[m]).isEmpty()){for(var v=0;v<l.chars.length;v++)o.test(l.chars[v].uchar)&&u?d++:(f+=l.chars[v].uchar,u=!1);l.cueStartTime=t,t===n&&(n+=1e-4),d>=16?d--:d++;var g=Object(r.fixLineBreaks)(f.trim()),y=Object(i.generateCueId)(t,n,g);e&&e.cues&&e.cues.getCueById(y)||((c=new p(t,n,g)).id=y,c.line=m+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*d/32)),h.push(c))}return e&&h.length&&(h.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),h.forEach((function(t){return Object(a.addCueToTrack)(e,t)}))),h}};t.default=s},"./src/utils/discontinuities.ts":
/*!**************************************!*\
!*** ./src/utils/discontinuities.ts ***!
\**************************************/
/*! exports provided: findFirstFragWithCC, shouldAlignOnDiscontinuities, findDiscontinuousReferenceFrag, adjustSlidingStart, alignStream, alignPDT, alignFragmentByPDTDelta, alignMediaPlaylistByPDT */function(e,t,n){"use strict";n.r(t),n.d(t,"findFirstFragWithCC",(function(){return o})),n.d(t,"shouldAlignOnDiscontinuities",(function(){return s})),n.d(t,"findDiscontinuousReferenceFrag",(function(){return l})),n.d(t,"adjustSlidingStart",(function(){return u})),n.d(t,"alignStream",(function(){return d})),n.d(t,"alignPDT",(function(){return f})),n.d(t,"alignFragmentByPDTDelta",(function(){return h})),n.d(t,"alignMediaPlaylistByPDT",(function(){return p}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./logger */"./src/utils/logger.ts"),a=n(/*! ../controller/level-helper */"./src/controller/level-helper.ts");function o(e,t){for(var n=null,r=0,i=e.length;r<i;r++){var a=e[r];if(a&&a.cc===t){n=a;break}}return n}function s(e,t,n){return!(!t.details||!(n.endCC>n.startCC||e&&e.cc<n.startCC))}function l(e,t){var n=e.fragments,r=t.fragments;if(r.length&&n.length){var a=o(n,r[0].cc);if(a&&(!a||a.startPTS))return a;i.logger.log("No frag in previous level to align on")}else i.logger.log("No fragments to align")}function c(e,t){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function u(e,t){for(var n=t.fragments,r=0,i=n.length;r<i;r++)c(n[r],e);t.fragmentHint&&c(t.fragmentHint,e),t.alignedSliding=!0}function d(e,t,n){t&&(function(e,t,n){if(s(e,n,t)){var a=l(n.details,t);a&&Object(r.isFiniteNumber)(a.start)&&(i.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),u(a.start,t))}}(e,n,t),!n.alignedSliding&&t.details&&f(n,t.details),n.alignedSliding||!t.details||n.skippedSegments||Object(a.adjustSliding)(t.details,n))}function f(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime,a=e.fragments[0].programDateTime,o=(a-n)/1e3+t.fragments[0].start;o&&Object(r.isFiniteNumber)(o)&&(i.logger.log("Adjusting PTS using programDateTime delta "+(a-n)+"ms, sliding:"+o.toFixed(3)+" "+e.url+" "),u(o,e))}}function h(e,t){var n=e.programDateTime;if(n){var r=(n-t)/1e3;e.start=e.startPTS=r,e.endPTS=r+e.duration}}function p(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime-1e3*t.fragments[0].start;e.fragments.forEach((function(e){h(e,n)})),e.fragmentHint&&h(e.fragmentHint,n),e.alignedSliding=!0}}},"./src/utils/ewma-bandwidth-estimator.ts":
/*!***********************************************!*\
!*** ./src/utils/ewma-bandwidth-estimator.ts ***!
\***********************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/ewma */"./src/utils/ewma.ts"),i=function(){function e(e,t,n){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new r.default(e),this.fast_=new r.default(t)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,i=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new r.default(e,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==t&&(this.fast_=new r.default(t,i.getEstimate(),i.getTotalWeight()))},t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();t.default=i},"./src/utils/ewma.ts":
/*!***************************!*\
!*** ./src/utils/ewma.ts ***!
\***************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}();t.default=r},"./src/utils/fetch-loader.ts":
/*!***********************************!*\
!*** ./src/utils/fetch-loader.ts ***!
\***********************************/
/*! exports provided: fetchSupported, default */function(e,t,n){"use strict";n.r(t),n.d(t,"fetchSupported",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=n(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function o(e){var t="function"==typeof Map?new Map:void 0;return(o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function s(e,t,n){return(s=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&c(i,n.prototype),i}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function f(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}var h=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||p,this.controller=new self.AbortController,this.stats=new i.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,n){var i=this,a=this.stats;if(a.loading.start)throw new Error("Loader can only be used once.");a.loading.start=self.performance.now();var o=function(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(d({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),s=n.onProgress,l="arraybuffer"===e.responseType,c=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),n.onTimeout(a,e,i.response)}),t.timeout),self.fetch(this.request).then((function(n){if(i.response=i.loader=n,!n.ok){var o=n.status,c=n.statusText;throw new m(c||"fetch, bad network response",o,n)}return a.loading.first=Math.max(self.performance.now(),a.loading.start),a.total=parseInt(n.headers.get("Content-Length")||"0"),s&&Object(r.isFiniteNumber)(t.highWaterMark)?i.loadProgressively(n,a,e,t.highWaterMark,s):l?n.arrayBuffer():n.text()})).then((function(o){var l=i.response;self.clearTimeout(i.requestTimeout),a.loading.end=Math.max(self.performance.now(),a.loading.first),a.loaded=a.total=o[c];var u={url:l.url,data:o};s&&!Object(r.isFiniteNumber)(t.highWaterMark)&&s(a,e,o,l),n.onSuccess(u,a,e,l)})).catch((function(t){if(self.clearTimeout(i.requestTimeout),!a.aborted){var r=t.code||0;n.onError({code:r,text:t.message},e,t.details)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,n,r,i){void 0===r&&(r=0);var o=new a.default,s=e.body.getReader();return function a(){return s.read().then((function(s){if(s.done)return o.dataLength&&i(t,n,o.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=s.value,c=l.length;return t.loaded+=c,c<r||o.dataLength?(o.push(l),o.dataLength>=r&&i(t,n,o.flush(),e)):i(t,n,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function p(e,t){return new self.Request(e.url,t)}var m=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n),r}(o(Error));t.default=h},"./src/utils/imsc1-ttml-parser.ts":
/*!****************************************!*\
!*** ./src/utils/imsc1-ttml-parser.ts ***!
\****************************************/
/*! exports provided: IMSC1_CODEC, parseIMSC1 */function(e,t,n){"use strict";n.r(t),n.d(t,"IMSC1_CODEC",(function(){return u})),n.d(t,"parseIMSC1",(function(){return p}));var r=n(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ./vttcue */"./src/utils/vttcue.ts"),o=n(/*! ../demux/id3 */"./src/demux/id3.ts"),s=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=n(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var u="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,f=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,h={left:"start",center:"center",right:"end",start:"start",end:"end"};function p(e,t,n,i,u){var d=Object(r.findBox)(new Uint8Array(e),["mdat"]);if(0!==d.length){var f=d[0],p=Object(o.utf8ArrayToStr)(new Uint8Array(e,f.start,f.end-f.start)),_=Object(s.toTimescaleFromScale)(t,1,n);try{i(function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce((function(e,t){return e[t]=n.getAttribute("ttp:"+t)||r[t],e}),{}),o="preserve"!==n.getAttribute("xml:space"),s=v(m(n,"styling","style")),u=v(m(n,"layout","region")),d=m(n,"body","[begin]");return[].map.call(d,(function(e){var n=function e(t,n){return[].slice.call(t.childNodes).reduce((function(t,r,i){var a;return"br"===r.nodeName&&i?t+"\n":null!==(a=r.childNodes)&&void 0!==a&&a.length?e(r,n):n?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent}),"")}(e,o);if(!n||!e.hasAttribute("begin"))return null;var r=b(e.getAttribute("begin"),i),d=b(e.getAttribute("dur"),i),f=b(e.getAttribute("end"),i);if(null===r)throw y(e);if(null===f){if(null===d)throw y(e);f=r+d}var p=new a.default(r-t,f-t,n);p.id=Object(l.generateCueId)(p.startTime,p.endTime,p.text);var m=u[e.getAttribute("region")],v=s[e.getAttribute("style")];p.position=10,p.size=80;var _=function(e,t){var n="http://www.w3.org/ns/ttml#styling";return["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(r,i){var a=g(t,n,i)||g(e,n,i);return a&&(r[i]=a),r}),{})}(m,v),E=_.textAlign;if(E){var x=h[E];x&&(p.lineAlign=x),p.align=E}return c(p,_),p})).filter((function(e){return null!==e}))}(p,_))}catch(e){u(e)}}else u(new Error("Could not parse IMSC1 mdat"))}function m(e,t,n){var r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function v(e){return e.reduce((function(e,t){var n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function g(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function y(e){return new Error("Could not parse ttml timestamp "+e)}function b(e,t){if(!e)return null;var n=Object(i.parseTimeStamp)(e);return null===n&&(d.test(e)?n=function(e,t){var n=d.exec(e),r=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/t.frameRate}(e,t):f.test(e)&&(n=function(e,t){var n=f.exec(e),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),n}},"./src/utils/logger.ts":
/*!*****************************!*\
!*** ./src/utils/logger.ts ***!
\*****************************/
/*! exports provided: enableLogs, logger */function(e,t,n){"use strict";n.r(t),n.d(t,"enableLogs",(function(){return s})),n.d(t,"logger",(function(){return l}));var r=function(){},i={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=i;function o(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):r}function s(e){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){a[t]=e[t]?e[t].bind(e):o(t)}))}(e,"debug","log","info","warn","error");try{a.log()}catch(e){a=i}}else a=i}var l=i},"./src/utils/mediakeys-helper.ts":
/*!***************************************!*\
!*** ./src/utils/mediakeys-helper.ts ***!
\***************************************/
/*! exports provided: KeySystems, requestMediaKeySystemAccess */function(e,t,n){"use strict";var r;n.r(t),n.d(t,"KeySystems",(function(){return r})),n.d(t,"requestMediaKeySystemAccess",(function(){return i})),function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(r||(r={}));var i="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null},"./src/utils/mediasource-helper.ts":
/*!*****************************************!*\
!*** ./src/utils/mediasource-helper.ts ***!
\*****************************************/
/*! exports provided: getMediaSource */function(e,t,n){"use strict";function r(){return self.MediaSource||self.WebKitMediaSource}n.r(t),n.d(t,"getMediaSource",(function(){return r}))},"./src/utils/mp4-tools.ts":
/*!********************************!*\
!*** ./src/utils/mp4-tools.ts ***!
\********************************/
/*! exports provided: bin2str, readUint16, readUint32, writeUint32, findBox, parseSegmentIndex, parseInitSegment, getStartDTS, getDuration, computeRawDurationFromSamples, offsetStartDTS, segmentValidRange, appendUint8Array */function(e,t,n){"use strict";n.r(t),n.d(t,"bin2str",(function(){return s})),n.d(t,"readUint16",(function(){return l})),n.d(t,"readUint32",(function(){return c})),n.d(t,"writeUint32",(function(){return u})),n.d(t,"findBox",(function(){return d})),n.d(t,"parseSegmentIndex",(function(){return f})),n.d(t,"parseInitSegment",(function(){return h})),n.d(t,"getStartDTS",(function(){return p})),n.d(t,"getDuration",(function(){return m})),n.d(t,"computeRawDurationFromSamples",(function(){return v})),n.d(t,"offsetStartDTS",(function(){return g})),n.d(t,"segmentValidRange",(function(){return y})),n.d(t,"appendUint8Array",(function(){return b}));var r=n(/*! ./typed-array */"./src/utils/typed-array.ts"),i=n(/*! ../loader/fragment */"./src/loader/fragment.ts"),a=Math.pow(2,32)-1,o=[].push;function s(e){return String.fromCharCode.apply(null,e)}function l(e,t){"data"in e&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function c(e,t){"data"in e&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n}function u(e,t,n){"data"in e&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function d(e,t){var n,r,i,a=[];if(!t.length)return a;"data"in e?(n=e.data,r=e.start,i=e.end):(r=0,i=(n=e).byteLength);for(var l=r;l<i;){var u=c(n,l),f=u>1?l+u:i;if(s(n.subarray(l+4,l+8))===t[0])if(1===t.length)a.push({data:n,start:l+8,end:f});else{var h=d({data:n,start:l+8,end:f},t.slice(1));h.length&&o.apply(a,h)}l=f}return a}function f(e){var t=d(e,["moov"])[0],n=t?t.end:null,r=d(e,["sidx"]);if(!r||!r[0])return null;var i=[],a=r[0],o=a.data[0],s=0===o?8:16,u=c(a,s);s+=4,s+=0===o?8:16,s+=2;var f=a.end+0,h=l(a,s);s+=2;for(var p=0;p<h;p++){var m=s,v=c(a,m);m+=4;var g=2147483647&v;if(1==(2147483648&v)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(a,m);m+=4,i.push({referenceSize:g,subsegmentDuration:y,info:{duration:y/u,start:f,end:f+g-1}}),f+=g,s=m+=4}return{earliestPresentationTime:0,timescale:u,version:o,referencesCount:h,references:i,moovEndOffset:n}}function h(e){for(var t=[],n=d(e,["moov","trak"]),r=0;r<n.length;r++){var a=n[r],o=d(a,["tkhd"])[0];if(o){var l=o.data[o.start],u=0===l?12:20,f=c(o,u),h=d(a,["mdia","mdhd"])[0];if(h){var p=c(h,u=0===(l=h.data[h.start])?12:20),m=d(a,["mdia","hdlr"])[0];if(m){var v=s(m.data.subarray(m.start+8,m.start+12)),g={soun:i.ElementaryStreamTypes.AUDIO,vide:i.ElementaryStreamTypes.VIDEO}[v];if(g){var y=d(a,["mdia","minf","stbl","stsd"])[0],b=void 0;y&&(b=s(y.data.subarray(y.start+12,y.start+16))),t[f]={timescale:p,type:g},t[g]={timescale:p,id:f,codec:b}}}}}}return d(e,["moov","mvex","trex"]).forEach((function(e){var n=c(e,4),r=t[n];r&&(r.default={duration:c(e,12),flags:c(e,20)})})),t}function p(e,t){return d(t,["moof","traf"]).reduce((function(t,n){var r=d(n,["tfdt"])[0],i=r.data[r.start],a=d(n,["tfhd"]).reduce((function(t,n){var a=c(n,4),o=e[a];if(o){var s=c(r,4);1===i&&(s*=Math.pow(2,32),s+=c(r,8));var l=s/(o.timescale||9e4);if(isFinite(l)&&(null===t||l<t))return l}return t}),null);return null!==a&&isFinite(a)&&(null===t||a<t)?a:t}),null)||0}function m(e,t){for(var n=0,r=0,a=0,o=d(e,["moof","traf"]),s=0;s<o.length;s++){var l=o[s],u=d(l,["tfhd"])[0],h=t[c(u,4)];if(h){var p=h.default,m=c(u,0)|(null==p?void 0:p.flags),g=null==p?void 0:p.duration;8&m&&(g=c(u,2&m?12:8));for(var y=h.timescale||9e4,b=d(l,["trun"]),_=0;_<b.length;_++)n=g?g*c(b[_],4):v(b[_]),h.type===i.ElementaryStreamTypes.VIDEO?r+=n/y:h.type===i.ElementaryStreamTypes.AUDIO&&(a+=n/y)}}if(0===r&&0===a){var E=f(e);if(null!=E&&E.references)return E.references.reduce((function(e,t){return e+t.info.duration||0}),0)}return r||a}function v(e){var t=c(e,0),n=8;1&t&&(n+=4),4&t&&(n+=4);for(var r=0,i=c(e,4),a=0;a<i;a++)256&t&&(r+=c(e,n),n+=4),512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4);return r}function g(e,t,n){d(t,["moof","traf"]).forEach((function(t){d(t,["tfhd"]).forEach((function(r){var i=c(r,4),o=e[i];if(o){var s=o.timescale||9e4;d(t,["tfdt"]).forEach((function(e){var t=e.data[e.start],r=c(e,4);if(0===t)u(e,4,r-n*s);else{r*=Math.pow(2,32),r+=c(e,8),r-=n*s,r=Math.max(r,0);var i=Math.floor(r/(a+1)),o=Math.floor(r%(a+1));u(e,4,i),u(e,8,o)}}))}}))}))}function y(e){var t={valid:null,remainder:null},n=d(e,["moof"]);if(!n)return t;if(n.length<2)return t.remainder=e,t;var i=n[n.length-1];return t.valid=Object(r.sliceUint8)(e,0,i.start-8),t.remainder=Object(r.sliceUint8)(e,i.start-8),t}function b(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}},"./src/utils/output-filter.ts":
/*!************************************!*\
!*** ./src/utils/output-filter.ts ***!
\************************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return r}));var r=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[]},e}()},"./src/utils/texttrack-utils.ts":
/*!**************************************!*\
!*** ./src/utils/texttrack-utils.ts ***!
\**************************************/
/*! exports provided: sendAddTrackEvent, addCueToTrack, clearCurrentCues, removeCuesInRange, getCuesInRange */function(e,t,n){"use strict";n.r(t),n.d(t,"sendAddTrackEvent",(function(){return i})),n.d(t,"addCueToTrack",(function(){return a})),n.d(t,"clearCurrentCues",(function(){return o})),n.d(t,"removeCuesInRange",(function(){return s})),n.d(t,"getCuesInRange",(function(){return l}));var r=n(/*! ./logger */"./src/utils/logger.ts");function i(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function a(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){r.logger.debug("[texttrack-utils]: "+n);var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}"disabled"===n&&(e.mode=n)}function o(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function s(e,t,n){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var i=l(e.cues,t,n),a=0;a<i.length;a++)e.removeCue(i[a]);"disabled"===r&&(e.mode=r)}function l(e,t,n){var r=[],i=function(e,t){if(t<e[0].startTime)return 0;var n=e.length-1;if(t>e[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(t<e[a].startTime)i=a-1;else{if(!(t>e[a].startTime&&r<n))return a;r=a+1}}return e[r].startTime-t<t-e[i].startTime?r:i}(e,t);if(i>-1)for(var a=i,o=e.length;a<o;a++){var s=e[a];if(s.startTime>=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}},"./src/utils/time-ranges.ts":
/*!**********************************!*\
!*** ./src/utils/time-ranges.ts ***!
\**********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={toString:function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+","+e.end(r).toFixed(3)+"]";return t}}},"./src/utils/timescale-conversion.ts":
/*!*******************************************!*\
!*** ./src/utils/timescale-conversion.ts ***!
\*******************************************/
/*! exports provided: toTimescaleFromBase, toTimescaleFromScale, toMsFromMpegTsClock, toMpegTsClockFromTimescale */function(e,t,n){"use strict";function r(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function i(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),r(e,t,1/n,i)}function a(e,t){return void 0===t&&(t=!1),r(e,1e3,1/9e4,t)}function o(e,t){return void 0===t&&(t=1),r(e,9e4,1/t)}n.r(t),n.d(t,"toTimescaleFromBase",(function(){return r})),n.d(t,"toTimescaleFromScale",(function(){return i})),n.d(t,"toMsFromMpegTsClock",(function(){return a})),n.d(t,"toMpegTsClockFromTimescale",(function(){return o}))},"./src/utils/typed-array.ts":
/*!**********************************!*\
!*** ./src/utils/typed-array.ts ***!
\**********************************/
/*! exports provided: sliceUint8 */function(e,t,n){"use strict";function r(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}n.r(t),n.d(t,"sliceUint8",(function(){return r}))},"./src/utils/vttcue.ts":
/*!*****************************!*\
!*** ./src/utils/vttcue.ts ***!
\*****************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=1;i<arguments.length;i++){var a=arguments[i];for(var o in a)e[o]=a[o]}return e}function a(t,a,o){var s=this,l={enumerable:!0};s.hasBeenReset=!1;var c="",u=!1,d=t,f=a,h=o,p=null,m="",v=!0,g="auto",y="start",b=50,_="middle",E=50,x="middle";Object.defineProperty(s,"id",i({},l,{get:function(){return c},set:function(e){c=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},l,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(s,"startTime",i({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return p},set:function(e){p=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},l,{get:function(){return m},set:function(t){var r=function(t){return n(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");m=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},l,{get:function(){return v},set:function(e){v=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},l,{get:function(){return g},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},l,{get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return x},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");x=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts":
/*!********************************!*\
!*** ./src/utils/vttparser.ts ***!
\********************************/
/*! exports provided: parseTimeStamp, fixLineBreaks, VTTParser */function(e,t,n){"use strict";n.r(t),n.d(t,"parseTimeStamp",(function(){return a})),n.d(t,"fixLineBreaks",(function(){return d})),n.d(t,"VTTParser",(function(){return f}));var r=n(/*! ./vttcue */"./src/utils/vttcue.ts"),i=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function a(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var o=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1},e}();function s(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var l=new r.default(0,0,""),c="middle"===l.align?"middle":"center";function u(e,t,n){var r=e;function i(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=i(),u(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),u(),t.endTime=i(),u(),function(e,t){var r=new o;s(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",c,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===l.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",c);var a=r.get("position","auto");"auto"===a&&50===l.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function d(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var f=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=d(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(i=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var o=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(o?o=!1:i=n(),t.state){case"HEADER":/:/.test(i)?s(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new r.default(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{u(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var l=-1!==i.indexOf("--\x3e");if(!i||l&&(o=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){try{if((this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state||"BADWEBVTT"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){this.onparsingerror&&this.onparsingerror(e)}return this.onflush&&this.onflush(),this},e}()},"./src/utils/webvtt-parser.ts":
/*!************************************!*\
!*** ./src/utils/webvtt-parser.ts ***!
\************************************/
/*! exports provided: generateCueId, parseWebVTT */function(e,t,n){"use strict";n.r(t),n.d(t,"generateCueId",(function(){return d})),n.d(t,"parseWebVTT",(function(){return f}));var r=n(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),i=n(/*! ./vttparser */"./src/utils/vttparser.ts"),a=n(/*! ../demux/id3 */"./src/demux/id3.ts"),o=n(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),s=n(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,c=function(e,t,n){return void 0===n&&(n=0),e.substr(n,t.length)===t},u=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function d(e,t,n){return u(e.toString())+u(t.toString())+u(n)}function f(e,t,n,u,f,h,p,m){var v,g=new i.VTTParser,y=Object(a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),b=[],_=Object(o.toMpegTsClockFromTimescale)(t,n),E="00:00.000",x=0,S=0,w=!0,k=!1;g.oncue=function(e){var t=u[f],n=u.ccOffset,r=(x-_)/9e4;if(null!=t&&t.new&&(void 0!==S?n=u.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(u,f,r)),r&&(n=r-u.presentationOffset),k){var i=e.endTime-e.startTime,a=Object(s.normalizePts)(9e4*(e.startTime+n-S),9e4*h)/9e4;e.startTime=a,e.endTime=a+i}var o=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(o)),e.id||(e.id=d(e.startTime,e.endTime,o)),e.endTime>0&&b.push(e)},g.onparsingerror=function(e){v=e},g.onflush=function(){v?m(v):p(b)},y.forEach((function(e){if(w){if(c(e,"X-TIMESTAMP-MAP=")){w=!1,k=!0,e.substr(16).split(",").forEach((function(e){c(e,"LOCAL:")?E=e.substr(6):c(e,"MPEGTS:")&&(x=parseInt(e.substr(7)))}));try{S=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),i=parseInt(e.substr(-9,2)),a=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(r.isFiniteNumber)(t)&&Object(r.isFiniteNumber)(n)&&Object(r.isFiniteNumber)(i)&&Object(r.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*i,t+=36e5*a}(E)/1e3}catch(e){k=!1,v=e}return}""===e&&(w=!1)}g.parse(e+"\n")})),g.flush()}},"./src/utils/xhr-loader.ts":
/*!*********************************!*\
!*** ./src/utils/xhr-loader.ts ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.ts"),i=n(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m,o=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e?e.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var i=t.readyState,a=this.config;if(!n.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===i){t.onreadystatechange=null,t.onprogress=null;var o=t.status;if(o>=200&&o<300){var s,l;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),l="arraybuffer"===e.responseType?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=l,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,n,e,t)}else n.retry>=a.maxRetry||o>=400&&o<499?(r.logger.error(o+" while loading "+e.url),this.callbacks.onError({code:o,text:t.statusText},e,t)):(r.logger.warn(o+" while loading "+e.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,a.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},t.loadtimeout=function(){r.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();t.default=o}}).default},e.exports=r())},vHTk:
/*!******************************************************!*\
!*** ./src/components/PreviewAll/index.less?modules ***!
\******************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){e.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:
/*!********************************************************!*\
!*** ./node_modules/rc-table/es/Table.js + 17 modules ***!
\********************************************************/
/*! exports provided: INTERNAL_HOOKS, default */
/*! exports used: INTERNAL_HOOKS, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-resize-observer/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Cell/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/Footer/index.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/context/TableContext.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/hooks/useColumns.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/Column.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/sugar/ColumnGroup.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/legacyUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-table/es/utils/valueUtil.js because of ./node_modules/antd/es/table/hooks/useSelection.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/css.js because of ./node_modules/rc-image/es/Image.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Q}));var r=n("rePB"),i=n("VTBJ"),a=n("KQm4"),o=n("U8pU"),s=n("ODXe"),l=n("q1tI"),c=n("TSYQ"),u=n.n(c),d=n("Gytx"),f=n.n(d),h=n("Kwbf"),p=n("t23M"),m=n("qx4F"),v=n("6eGT"),g=n("IBYe"),y=n("Ff2n"),b=n("c+Xe"),_=n("fyJ8"),E=n("biw7");function x(e,t,n,r,i){var a,o,s=n[e]||{},l=n[t]||{};"left"===s.fixed?a=r.left[e]:"right"===l.fixed&&(o=r.right[t]);var c=!1,u=!1,d=!1,f=!1,h=n[t+1],p=n[e-1];if("rtl"===i){if(void 0!==a)f=!(p&&"left"===p.fixed);else if(void 0!==o){d=!(h&&"right"===h.fixed)}}else if(void 0!==a){c=!(h&&"left"===h.fixed)}else if(void 0!==o){u=!(p&&"right"===p.fixed)}return{fixLeft:a,fixRight:o,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:f,isSticky:r.isSticky}}var S=n("sR1s");function w(e){var t,n=e.cells,r=e.stickyOffsets,i=e.flattenColumns,a=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,c=e.index,u=l.useContext(E.a),d=u.prefixCls,f=u.direction;s&&(t=s(n.map((function(e){return e.column})),c));var h=Object(S.a)(n.map((function(e){return e.column})));return l.createElement(a,Object.assign({},t),n.map((function(e,t){var n,a=e.column,s=x(e.colStart,e.colEnd,i,r,f);return a&&a.onHeaderCell&&(n=e.column.onHeaderCell(a)),l.createElement(_.a,Object.assign({},e,{ellipsis:a.ellipsis,align:a.align,component:o,prefixCls:d,key:h[t]},s,{additionalProps:n,rowType:"header"}))})))}w.displayName="HeaderRow";var k=w;var T=function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,a=l.useContext(E.a),o=a.prefixCls,s=a.getComponent,c=l.useMemo((function(){return function(e){var t=[];!function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var a=r,o=n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:a},o=1,s=n.children;return s&&s.length>0&&(o=e(s,a,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(o=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=o,r.colEnd=r.colStart+o-1,t[i].push(r),a+=o,o}));return o}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i<n;i+=1)r(i);return t}(n)}),[n]),u=s(["header","wrapper"],"thead"),d=s(["header","row"],"tr"),f=s(["header","cell"],"th");return l.createElement(u,{className:"".concat(o,"-thead")},c.map((function(e,n){return l.createElement(k,{key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:d,cellComponent:f,onHeaderRow:i,index:n})})))},O=n("hW8S");var C=function(e){for(var t=e.colWidths,n=e.columns,r=[],i=!1,a=(e.columCount||n.length)-1;a>=0;a-=1){var o=t[a],s=n&&n[a],c=s&&s[O.a];(o||c||i)&&(r.unshift(l.createElement("col",Object.assign({key:a,style:{width:o,minWidth:o}},c))),i=!0)}return l.createElement("colgroup",null,r)};var A=l.forwardRef((function(e,t){var n=e.noData,o=e.columns,s=e.flattenColumns,c=e.colWidths,d=e.columCount,f=e.stickyOffsets,h=e.direction,p=e.fixHeader,m=e.offsetHeader,v=e.stickyClassName,g=e.onScroll,_=Object(y.a)(e,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),x=l.useContext(E.a),S=x.prefixCls,w=x.scrollbarSize,k=x.isSticky,O=k&&!p?0:w,A=l.useRef(null),L=l.useCallback((function(e){Object(b.b)(t,e),Object(b.b)(A,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e.currentTarget,n=e.deltaX;n&&(g({currentTarget:t,scrollLeft:t.scrollLeft+n}),e.preventDefault())}return null===(e=A.current)||void 0===e||e.addEventListener("wheel",t),function(){var e;null===(e=A.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var D=s[s.length-1],I={fixed:D?D.fixed:null,onHeaderCell:function(){return{className:"".concat(S,"-cell-scrollbar")}}},R=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(o),[I]):o}),[O,o]),N=Object(l.useMemo)((function(){return O?[].concat(Object(a.a)(s),[I]):s}),[O,s]),M=Object(l.useMemo)((function(){var e=f.right,t=f.left;return Object(i.a)(Object(i.a)({},f),{},{left:"rtl"===h?[].concat(Object(a.a)(t.map((function(e){return e+O}))),[0]):t,right:"rtl"===h?e:[].concat(Object(a.a)(e.map((function(e){return e+O}))),[0]),isSticky:k})}),[O,f,k]),P=function(e,t){return Object(l.useMemo)((function(){for(var n=[],r=0;r<t;r+=1){var i=e[r];if(void 0===i)return null;n[r]=i}return n}),[e.join("_"),t])}(c,d);return l.createElement("div",{style:Object(i.a)({overflow:"hidden"},k?{top:m}:{}),ref:L,className:u()("".concat(S,"-header"),Object(r.a)({},v,!!v))},l.createElement("table",{style:{tableLayout:"fixed",visibility:n||P?null:"hidden"}},l.createElement(C,{colWidths:P?[].concat(Object(a.a)(P),[O]):[],columCount:d+1,columns:N}),l.createElement(T,Object.assign({},_,{stickyOffsets:M,columns:R,flattenColumns:N}))))}));A.displayName="FixedHeader";var L=A,D=l.createContext(null);var I=function(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,a=e.fixHeader,o=e.fixColumn,s=e.horizonScroll,c=e.className,u=e.expanded,d=e.componentWidth,f=e.colSpan,h=l.useContext(E.a).scrollbarSize;return l.useMemo((function(){var e=n;return o&&(e=l.createElement("div",{style:{width:d-(a?h:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},e)),l.createElement(r,{className:c,style:{display:u?null:"none"}},l.createElement(_.a,{component:i,prefixCls:t,colSpan:f},e))}),[n,r,a,s,c,u,d,f,h])};function R(e){var t=e.className,n=e.style,r=e.record,a=e.index,o=e.rowKey,c=e.getRowKey,d=e.rowExpandable,f=e.expandedKeys,h=e.onRow,p=e.indent,m=void 0===p?0:p,v=e.rowComponent,g=e.cellComponent,y=e.childrenColumnName,b=l.useContext(E.a),x=b.prefixCls,w=b.fixedInfoList,k=l.useContext(D),T=k.fixHeader,O=k.fixColumn,C=k.horizonScroll,A=k.componentWidth,L=k.flattenColumns,N=k.expandableType,M=k.expandRowByClick,P=k.onTriggerExpand,j=k.rowClassName,F=k.expandedRowClassName,U=k.indentSize,B=k.expandIcon,G=k.expandedRowRender,z=k.expandIconColumnIndex,H=l.useState(!1),K=Object(s.a)(H,2),V=K[0],W=K[1],q=f&&f.has(e.recordKey);l.useEffect((function(){q&&W(!0)}),[q]);var X,Y="row"===N&&(!d||d(r)),$="nest"===N,J=y&&r&&r[y],Q=Y||$;h&&(X=h(r,a));var Z;"string"==typeof j?Z=j:"function"==typeof j&&(Z=j(r,a,m));var ee,te,ne=Object(S.a)(L),re=l.createElement(v,Object.assign({},X,{"data-row-key":o,className:u()(t,"".concat(x,"-row"),"".concat(x,"-row-level-").concat(m),Z,X&&X.className),style:Object(i.a)(Object(i.a)({},n),X?X.style:null),onClick:function(e){if(M&&Q&&P(r,e),X&&X.onClick){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];(t=X).onClick.apply(t,[e].concat(i))}}}),L.map((function(e,t){var n,i,o=e.render,s=e.dataIndex,c=e.className,u=ne[t],d=w[t];return t===(z||0)&&$&&(n=l.createElement(l.Fragment,null,l.createElement("span",{style:{paddingLeft:"".concat(U*m,"px")},className:"".concat(x,"-row-indent indent-level-").concat(m)}),B({prefixCls:x,expanded:q,expandable:J,record:r,onExpand:P}))),e.onCell&&(i=e.onCell(r,a)),l.createElement(_.a,Object.assign({className:c,ellipsis:e.ellipsis,align:e.align,component:g,prefixCls:x,key:u,record:r,index:a,dataIndex:s,render:o,shouldCellUpdate:e.shouldCellUpdate},d,{appendNode:n,additionalProps:i}))})));if(Y&&(V||q)){var ie=G(r,a,m+1,q),ae=F&&F(r,a,m);ee=l.createElement(I,{expanded:q,className:u()("".concat(x,"-expanded-row"),"".concat(x,"-expanded-row-level-").concat(m+1),ae),prefixCls:x,fixHeader:T,fixColumn:O,horizonScroll:C,component:v,componentWidth:A,cellComponent:g,colSpan:L.length},ie)}return J&&q&&(te=(r[y]||[]).map((function(t,n){var r=c(t,n);return l.createElement(R,Object.assign({},e,{key:r,rowKey:r,record:t,recordKey:r,index:n,indent:m+1}))}))),l.createElement(l.Fragment,null,re,ee,te)}R.displayName="BodyRow";var N=R,M=l.createContext(null);function P(e){var t=e.columnKey,n=e.onColumnResize,r=l.useRef();return l.useEffect((function(){r.current&&n(t,r.current.offsetWidth)}),[]),l.createElement(p.a,{onResize:function(e){var r=e.offsetWidth;n(t,r)}},l.createElement("td",{ref:r,style:{padding:0,border:0,height:0}},l.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}var j=l.memo((function(e){var t=e.data,n=e.getRowKey,r=e.measureColumnWidth,i=e.expandedKeys,a=e.onRow,o=e.rowExpandable,s=e.emptyNode,c=e.childrenColumnName,u=l.useContext(M).onColumnResize,d=l.useContext(E.a),f=d.prefixCls,h=d.getComponent,p=l.useContext(D),m=p.fixHeader,v=p.horizonScroll,g=p.flattenColumns,y=p.componentWidth;return l.useMemo((function(){var e,d=h(["body","wrapper"],"tbody"),p=h(["body","row"],"tr"),b=h(["body","cell"],"td");e=t.length?t.map((function(e,t){var r=n(e,t);return l.createElement(N,{key:r,rowKey:r,record:e,recordKey:r,index:t,rowComponent:p,cellComponent:b,expandedKeys:i,onRow:a,getRowKey:n,rowExpandable:o,childrenColumnName:c})})):l.createElement(I,{expanded:!0,className:"".concat(f,"-placeholder"),prefixCls:f,fixHeader:m,fixColumn:v,horizonScroll:v,component:p,componentWidth:y,cellComponent:b,colSpan:g.length},s);var _=Object(S.a)(g);return l.createElement(d,{className:"".concat(f,"-tbody")},r&&l.createElement("tr",{"aria-hidden":"true",className:"".concat(f,"-measure-row"),style:{height:0}},_.map((function(e){return l.createElement(P,{key:e,columnKey:e,onColumnResize:u})}))),e)}),[t,f,a,r,i,n,h,y,s,g])}));j.displayName="Body";var F=j,U=n("wRmb"),B=n("xEkU"),G=n.n(B);function z(e){var t=Object(l.useRef)(e),n=Object(l.useState)({}),r=Object(s.a)(n,2)[1],i=Object(l.useRef)(null),a=Object(l.useRef)([]);return Object(l.useEffect)((function(){return function(){G.a.cancel(i.current)}}),[]),[t.current,function(e){null===i.current&&(a.current=[],i.current=G()((function(){a.current.forEach((function(e){t.current=e(t.current)})),i.current=null,r({})}))),a.current.push(e)}]}var H=function(e,t,n){return Object(l.useMemo)((function(){for(var r=[],i=[],a=0,o=0,s=0;s<t;s+=1)if("rtl"===n){i[s]=o,o+=e[s]||0;var l=t-s-1;r[l]=a,a+=e[l]||0}else{r[s]=a,a+=e[s]||0;var c=t-s-1;i[c]=o,o+=e[c]||0}return{left:r,right:i}}),[e,t,n])};var K=function(e){var t=e.className,n=e.children;return l.createElement("div",{className:t},n)},V=n("n6Qo");function W(e){var t,n=e.prefixCls,i=e.record,a=e.onExpand,o=e.expanded,s=e.expandable,c="".concat(n,"-row-expand-icon");if(!s)return l.createElement("span",{className:u()(c,"".concat(n,"-row-spaced"))});return l.createElement("span",{className:u()(c,(t={},Object(r.a)(t,"".concat(n,"-row-expanded"),o),Object(r.a)(t,"".concat(n,"-row-collapsed"),!o),t)),onClick:function(e){a(i,e),e.stopPropagation()}})}var q=n("zT1h"),X=n("y0+3"),Y=l.forwardRef((function(e,t){var n,a,o=e.scrollBodyRef,c=e.onScroll,d=e.offsetScroll,f=l.useContext(E.a).prefixCls,h=(null===(n=o.current)||void 0===n?void 0:n.scrollWidth)||0,p=(null===(a=o.current)||void 0===a?void 0:a.clientWidth)||0,v=h&&p*(p/h),g=l.useRef(),y=z({scrollLeft:0,isHiddenScrollBar:!1}),b=Object(s.a)(y,2),_=b[0],x=b[1],S=l.useRef({delta:0,x:0}),w=l.useState(!1),k=Object(s.a)(w,2),T=k[0],O=k[1],C=function(){O(!1)},A=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(T&&0!==n){var r=S.current.x+e.pageX-S.current.x-S.current.delta;r<=0&&(r=0),r+v>=p&&(r=p-v),c({scrollLeft:r/p*(h+2)}),S.current.x=e.pageX}else T&&O(!1)},L=function(){var e=Object(X.b)(o.current).top,t=e+o.current.offsetHeight,n=document.documentElement.scrollTop+window.innerHeight;t-Object(m.a)()<=n||e>=n-d?x((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!0})})):x((function(e){return Object(i.a)(Object(i.a)({},e),{},{isHiddenScrollBar:!1})}))},D=function(e){x((function(t){return Object(i.a)(Object(i.a)({},t),{},{scrollLeft:e/h*p||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:D}})),l.useEffect((function(){var e=Object(q.a)(document.body,"mouseup",C,!1),t=Object(q.a)(document.body,"mousemove",A,!1);return L(),function(){e.remove(),t.remove()}}),[v,T]),l.useEffect((function(){var e=Object(q.a)(window,"scroll",L,!1),t=Object(q.a)(window,"resize",L,!1);return function(){e.remove(),t.remove()}}),[]),l.useEffect((function(){_.isHiddenScrollBar||x((function(e){var t,n;return Object(i.a)(Object(i.a)({},e),{},{scrollLeft:o.current.scrollLeft/(null===(t=o.current)||void 0===t?void 0:t.scrollWidth)*(null===(n=o.current)||void 0===n?void 0:n.clientWidth)})}))}),[_.isHiddenScrollBar]),h<=p||!v||_.isHiddenScrollBar?null:l.createElement("div",{style:{height:Object(m.a)(),width:p,bottom:d},className:"".concat(f,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),S.current.delta=e.pageX-_.scrollLeft,S.current.x=0,O(!0),e.preventDefault()},ref:g,className:u()("".concat(f,"-sticky-scroll-bar"),Object(r.a)({},"".concat(f,"-sticky-scroll-bar-active"),T)),style:{width:"".concat(v,"px"),transform:"translate3d(".concat(_.scrollLeft,"px, 0, 0)")}}))}));var $=[],J={},Q="rc-table-internal-hook",Z=l.memo((function(e){return e.children}),(function(e,t){return!!f()(e.props,t.props)&&(e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight)}));function ee(e){var t,n=e.prefixCls,c=e.className,d=e.rowClassName,f=e.style,v=e.data,g=e.rowKey,y=e.scroll,b=e.tableLayout,_=e.direction,w=e.title,k=e.footer,A=e.summary,I=e.id,R=e.showHeader,N=e.components,P=e.emptyText,j=e.onRow,B=e.onHeaderRow,G=e.internalHooks,q=e.transformColumns,X=e.internalRefs,ee=e.sticky,te=v||$,ne=!!te.length,re=l.useState(0),ie=Object(s.a)(re,2),ae=ie[0],oe=ie[1];l.useEffect((function(){oe(Object(m.a)())}));var se,le,ce,ue=l.useMemo((function(){return Object(S.c)(N,{})}),[N]),de=l.useCallback((function(e,t){return Object(S.b)(ue,e)||t}),[ue]),fe=l.useMemo((function(){return"function"==typeof g?g:function(e){return e&&e[g]}}),[g]),he=Object(O.c)(e),pe=he.expandIcon,me=he.expandedRowKeys,ve=he.defaultExpandedRowKeys,ge=he.defaultExpandAllRows,ye=he.expandedRowRender,be=he.onExpand,_e=he.onExpandedRowsChange,Ee=he.expandRowByClick,xe=he.rowExpandable,Se=he.expandIconColumnIndex,we=he.expandedRowClassName,ke=he.childrenColumnName,Te=he.indentSize,Oe=pe||W,Ce=ke||"children",Ae=l.useMemo((function(){return ye?"row":!!(e.expandable&&G===Q&&e.expandable.__PARENT_RENDER_ICON__||te.some((function(e){return e&&"object"===Object(o.a)(e)&&e[Ce]})))&&"nest"}),[!!ye,te]),Le=l.useState((function(){return ve||(ge?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,a){r.push(t(i,a)),e(i[n])}))}(e),r}(te,fe,Ce):[])})),De=Object(s.a)(Le,2),Ie=De[0],Re=De[1],Ne=l.useMemo((function(){return new Set(me||Ie||[])}),[me,Ie]),Me=l.useCallback((function(e){var t,n=fe(e,te.indexOf(e)),r=Ne.has(n);r?(Ne.delete(n),t=Object(a.a)(Ne)):t=[].concat(Object(a.a)(Ne),[n]),Re(t),be&&be(!r,e),_e&&_e(t)}),[fe,Ne,te,be,_e]),Pe=l.useState(0),je=Object(s.a)(Pe,2),Fe=je[0],Ue=je[1],Be=Object(U.b)(Object(i.a)(Object(i.a)(Object(i.a)({},e),he),{},{expandable:!!ye,expandedKeys:Ne,getRowKey:fe,onTriggerExpand:Me,expandIcon:Oe,expandIconColumnIndex:Se,direction:_}),G===Q?q:null),Ge=Object(s.a)(Be,2),ze=Ge[0],He=Ge[1],Ke=l.useMemo((function(){return{columns:ze,flattenColumns:He}}),[ze,He]),Ve=l.useRef(),We=l.useRef(),qe=l.useRef(),Xe=l.useState(!1),Ye=Object(s.a)(Xe,2),$e=Ye[0],Je=Ye[1],Qe=l.useState(!1),Ze=Object(s.a)(Qe,2),et=Ze[0],tt=Ze[1],nt=z(new Map),rt=Object(s.a)(nt,2),it=rt[0],at=rt[1],ot=Object(S.a)(He).map((function(e){return it.get(e)})),st=l.useMemo((function(){return ot}),[ot.join("_")]),lt=H(st,He.length,_),ct=y&&Object(S.d)(y.y),ut=y&&Object(S.d)(y.x),dt=ut&&He.some((function(e){return e.fixed})),ft=l.useRef(),ht=function(e,t){return l.useMemo((function(){var n=!!e;return{isSticky:n,stickyClassName:n?"".concat(t,"-sticky-header"):"",offsetHeader:"object"===Object(o.a)(e)&&e.offsetHeader||0,offsetScroll:"object"===Object(o.a)(e)&&e.offsetScroll||0}}),[e,t])}(ee,n),pt=ht.isSticky,mt=ht.offsetHeader,vt=ht.offsetScroll,gt=ht.stickyClassName;ct&&(le={overflowY:"scroll",maxHeight:y.y}),ut&&(se={overflowX:"auto"},ct||(le={overflowY:"hidden"}),ce={width:!0===y.x?"auto":y.x,minWidth:"100%"});var yt=l.useCallback((function(e,t){at((function(n){var r=new Map(n);return r.set(e,t),r}))}),[]),bt=function(e){var t=Object(l.useRef)(e),n=Object(l.useRef)(null);function r(){window.clearTimeout(n.current)}return Object(l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=null}),100)},function(){return t.current}]}(null),_t=Object(s.a)(bt,2),Et=_t[0],xt=_t[1];function St(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e))}var wt=function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="number"==typeof r?r:n.scrollLeft,a=n||J;xt()&&xt()!==a||(Et(a),St(i,We.current),St(i,qe.current),St(i,null===(t=ft.current)||void 0===t?void 0:t.setScrollLeft));if(n){var o=n.scrollWidth,s=n.clientWidth;Je(i>0),tt(i<o-s)}},kt=function(){qe.current&&wt({currentTarget:qe.current})};l.useEffect((function(){return kt}),[]),l.useEffect((function(){ut&&kt()}),[ut]),l.useEffect((function(){G===Q&&X&&(X.body.current=qe.current)}));var Tt,Ot,Ct=de(["table"],"table"),At=l.useMemo((function(){return b||(dt?"max-content"===y.x?"auto":"fixed":ct||He.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[ct,dt,He,b]),Lt={colWidths:st,columCount:He.length,stickyOffsets:lt,onHeaderRow:B,fixHeader:ct},Dt=l.useMemo((function(){return ne?null:"function"==typeof P?P():P}),[ne,P]),It=l.createElement(F,{data:te,measureColumnWidth:ct||ut||pt,expandedKeys:Ne,rowExpandable:xe,getRowKey:fe,onRow:j,emptyNode:Dt,childrenColumnName:Ce}),Rt=l.createElement(C,{colWidths:He.map((function(e){return e.width})),columns:He}),Nt=A&&l.createElement(V.b,null,A(te)),Mt=de(["body"]);ct||pt?("function"==typeof Mt?(Ot=Mt(te,{scrollbarSize:ae,ref:qe,onScroll:wt}),Lt.colWidths=He.map((function(e,t){var n=e.width,r=t===ze.length-1?n-ae:n;return"number"!=typeof r||Number.isNaN(r)?(Object(h.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0):r}))):Ot=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),onScroll:wt,ref:qe,className:u()("".concat(n,"-body"))},l.createElement(Ct,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:At})},Rt,It,Nt),pt&&l.createElement(Y,{ref:ft,offsetScroll:vt,scrollBodyRef:qe,onScroll:wt})),Tt=l.createElement(l.Fragment,null,!1!==R&&l.createElement(L,Object.assign({noData:!te.length},Lt,Ke,{direction:_,offsetHeader:mt,stickyClassName:gt,ref:We,onScroll:wt})),Ot)):Tt=l.createElement("div",{style:Object(i.a)(Object(i.a)({},se),le),className:u()("".concat(n,"-content")),onScroll:wt,ref:qe},l.createElement(Ct,{style:Object(i.a)(Object(i.a)({},ce),{},{tableLayout:At})},Rt,!1!==R&&l.createElement(T,Object.assign({},Lt,Ke)),It,Nt));var Pt=Object(O.b)(e),jt=l.createElement("div",Object.assign({className:u()(n,c,(t={},Object(r.a)(t,"".concat(n,"-rtl"),"rtl"===_),Object(r.a)(t,"".concat(n,"-ping-left"),$e),Object(r.a)(t,"".concat(n,"-ping-right"),et),Object(r.a)(t,"".concat(n,"-layout-fixed"),"fixed"===b),Object(r.a)(t,"".concat(n,"-fixed-header"),ct),Object(r.a)(t,"".concat(n,"-fixed-column"),dt),Object(r.a)(t,"".concat(n,"-scroll-horizontal"),ut),Object(r.a)(t,"".concat(n,"-has-fix-left"),He[0]&&He[0].fixed),Object(r.a)(t,"".concat(n,"-has-fix-right"),He[He.length-1]&&"right"===He[He.length-1].fixed),t)),style:f,id:I,ref:Ve},Pt),l.createElement(Z,{pingLeft:$e,pingRight:et,props:Object(i.a)(Object(i.a)({},e),{},{stickyOffsets:lt,mergedExpandedKeys:Ne})},w&&l.createElement(K,{className:"".concat(n,"-title")},w(te)),l.createElement("div",{className:"".concat(n,"-container")},Tt),k&&l.createElement(K,{className:"".concat(n,"-footer")},k(te))));ut&&(jt=l.createElement(p.a,{onResize:function(e){var t=e.width;kt(),Ue(Ve.current?Ve.current.offsetWidth:t)}},jt));var Ft=l.useMemo((function(){return{prefixCls:n,getComponent:de,scrollbarSize:ae,direction:_,fixedInfoList:He.map((function(e,t){return x(t,t,He,lt,_)})),isSticky:pt}}),[n,de,ae,_,He,lt,_,pt]),Ut=l.useMemo((function(){return Object(i.a)(Object(i.a)({},Ke),{},{tableLayout:At,rowClassName:d,expandedRowClassName:we,componentWidth:Fe,fixHeader:ct,fixColumn:dt,horizonScroll:ut,expandIcon:Oe,expandableType:Ae,expandRowByClick:Ee,expandedRowRender:ye,onTriggerExpand:Me,expandIconColumnIndex:Se,indentSize:Te})}),[Ke,At,d,we,Fe,ct,dt,ut,Oe,Ae,Ee,ye,Me,Se,Te]),Bt=l.useMemo((function(){return{onColumnResize:yt}}),[yt]);return l.createElement(E.a.Provider,{value:Ft},l.createElement(D.Provider,{value:Ut},l.createElement(M.Provider,{value:Bt},jt)))}ee.Column=g.a,ee.ColumnGroup=v.a,ee.Summary=V.a,ee.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};t.b=ee},wRmb:
/*!******************************************************!*\
!*** ./node_modules/rc-table/es/hooks/useColumns.js ***!
\******************************************************/
/*! exports provided: convertChildrenToColumns, default */
/*! exports used: convertChildrenToColumns, default */function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(/*! @babel/runtime/helpers/esm/defineProperty */"rePB"),i=n(/*! @babel/runtime/helpers/esm/toConsumableArray */"KQm4"),a=n(/*! @babel/runtime/helpers/esm/objectSpread2 */"VTBJ"),o=n(/*! @babel/runtime/helpers/esm/objectWithoutProperties */"Ff2n"),s=n(/*! react */"q1tI"),l=(n(/*! rc-util/es/warning */"Kwbf"),n(/*! rc-util/es/Children/toArray */"Zm9Q")),c=n(/*! ../utils/legacyUtil */"hW8S");function u(e){return Object(l.a)(e).filter((function(e){return s.isValidElement(e)})).map((function(e){var t=e.key,n=e.props,r=n.children,i=Object(o.a)(n,["children"]),s=Object(a.a)({key:t},i);return r&&(s.children=u(r)),s}))}function d(e){return e.reduce((function(e,t){var n=t.fixed,r=!0===n?"left":n,o=t.children;return o&&o.length>0?[].concat(Object(i.a)(e),Object(i.a)(d(o).map((function(e){return Object(a.a)({fixed:r},e)})))):[].concat(Object(i.a)(e),[Object(a.a)(Object(a.a)({},t),{},{fixed:r})])}),[])}t.b=function(e,t){var n=e.prefixCls,i=e.columns,l=e.children,f=e.expandable,h=e.expandedKeys,p=e.getRowKey,m=e.onTriggerExpand,v=e.expandIcon,g=e.rowExpandable,y=e.expandIconColumnIndex,b=e.direction,_=e.expandRowByClick,E=s.useMemo((function(){return i||u(l)}),[i,l]),x=s.useMemo((function(){if(f){var e,t=y||0,i=E[t],a=(e={},Object(r.a)(e,c.a,{className:"".concat(n,"-expand-icon-col")}),Object(r.a)(e,"title",""),Object(r.a)(e,"fixed",i?i.fixed:null),Object(r.a)(e,"className","".concat(n,"-row-expand-icon-cell")),Object(r.a)(e,"render",(function(e,t,r){var i=p(t,r),a=h.has(i),o=!g||g(t),l=v({prefixCls:n,expanded:a,expandable:o,record:t,onExpand:m});return _?s.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l})),e),o=E.slice();return t>=0&&o.splice(t,0,a),o}return E}),[f,E,p,h,v,b]),S=s.useMemo((function(){var e=x;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,x,b]),w=s.useMemo((function(){return"rtl"===b?function(e){return e.map((function(e){var t=e.fixed,n=Object(o.a)(e,["fixed"]),r=t;return"left"===t?r="right":"right"===t&&(r="left"),Object(a.a)({fixed:r},n)}))}(d(S)):d(S)}),[S,b]);return[S,w]}},wW8i:
/*!********************************************************************************************************!*\
!*** ./src/pages/Question/OjProblem/LeftPanel/FilterList/ListDetails/CustomDiscuss/index.less?modules ***!
\********************************************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){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":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/Dom/css.js ***!
\********************************************/
/*! exports provided: get, set, getOuterWidth, getOuterHeight, getDocSize, getClientSize, getScroll, getOffset */
/*! exports used: getClientSize, getOffset */function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));function r(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function i(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}},ynwM:
/*!************************************************************!*\
!*** ./node_modules/store/storages/oldFF-globalStorage.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r=n(/*! ../src/util */"MFOe").Global;e.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:a,remove:function(e){return i.removeItem(e)},clearAll:function(){a((function(e,t){delete i[e]}))}};var i=r.globalStorage;function a(e){for(var t=i.length-1;t>=0;t--){var n=i.key(t);e(i[n],n)}}}}]);