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__Video__Detail__id.205d74...

362 lines
958 KiB

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.

(window.webpackJsonp=window.webpackJsonp||[]).push([[269,6,7],{"0r65":function(ht,st){var me=arguments[3],Fe=arguments[4],Ve=arguments[5],je=JSON.stringify;ht.exports=function(r,I){for(var f,h=Object.keys(Ve),m=0,u=h.length;m<u;m++){var o=h[m],p=Ve[o].exports;if(p===r||p&&p.default===r){f=o;break}}if(!f){f=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var s={},m=0,u=h.length;m<u;m++){var o=h[m];s[o]=o}Fe[f]=["function(require,module,exports){"+r+"(self); }",s]}var t=Math.floor(Math.pow(16,8)*Math.random()).toString(16),a={};a[f]=f,Fe[t]=["function(require,module,exports){var f = require("+je(f)+");(f.default ? f.default : f)(self);}",a];var c={};g(t);function g(E){c[E]=!0;for(var O in Fe[E][1]){var w=Fe[E][1][O];c[w]||g(w)}}var y="("+me+")({"+Object.keys(c).map(function(E){return je(E)+":["+Fe[E][0]+","+je(Fe[E][1])+"]"}).join(",")+"},{},["+je(t)+"])",d=window.URL||window.webkitURL||window.mozURL||window.msURL,C=new Blob([y],{type:"text/javascript"});if(I&&I.bare)return C;var k=d.createObjectURL(C),S=new Worker(k);return S.objectURL=k,S}},"1ZF9":function(ht,st,me){ht.exports=me.p+"static/Authorize.cc9c212f.png"},"4xil":function(ht,st,me){ht.exports={watermark:"watermark___2DVjg",videovideo:"videovideo___3jScv",animate__loop:"animate__loop___36IZ1",upDown:"upDown___3FGkz",container:"container___GV_Ds","video-container":"video-container___35tqx","video-controls":"video-controls___u99fM",hide:"hide___2GDit","video-progress":"video-progress___2LKQJ",seek:"seek___3b-US","seek-tooltip":"seek-tooltip___bZ9sZ","bottom-controls":"bottom-controls___74sQw","left-controls":"left-controls___2kBb3","volume-controls":"volume-controls___QLaWH","fullscreen-button":"fullscreen-button___2nHzc","pip-button":"pip-button___18qQG","playback-animation":"playback-animation___gCL6X",volume:"volume___10eUe",hidden:"hidden___2JBJW"}},"55Ip":function(ht,st,me){"use strict";me.d(st,"a",function(){return C}),me.d(st,"b",function(){return _});var Fe=me("Ty5D"),Ve=me("dI71"),je=me("q1tI"),r=me.n(je),I=me("YS25"),f=me("17x9"),h=me.n(f),m=me("wx14"),u=me("zLVn"),o=me("9R94"),p=function(M){Object(Ve.a)(b,M);function b(){for(var B,U=arguments.length,W=new Array(U),ne=0;ne<U;ne++)W[ne]=arguments[ne];return B=M.call.apply(M,[this].concat(W))||this,B.history=Object(I.a)(B.props),B}var X=b.prototype;return X.render=function(){return r.a.createElement(Fe.c,{history:this.history,children:this.props.children})},b}(r.a.Component),s=function(M){Object(Ve.a)(b,M);function b(){for(var B,U=arguments.length,W=new Array(U),ne=0;ne<U;ne++)W[ne]=arguments[ne];return B=M.call.apply(M,[this].concat(W))||this,B.history=Object(I.b)(B.props),B}var X=b.prototype;return X.render=function(){return r.a.createElement(Fe.c,{history:this.history,children:this.props.children})},b}(r.a.Component),t=function(b,X){return typeof b=="function"?b(X):b},a=function(b,X){return typeof b=="string"?Object(I.c)(b,null,null,X):b},c=function(b){return b},g=r.a.forwardRef;typeof g=="undefined"&&(g=c);function y(M){return!!(M.metaKey||M.altKey||M.ctrlKey||M.shiftKey)}var d=g(function(M,b){var X=M.innerRef,B=M.navigate,U=M.onClick,W=Object(u.a)(M,["innerRef","navigate","onClick"]),ne=W.target,re=Object(m.a)({},W,{onClick:function(ue){try{U&&U(ue)}catch(V){throw ue.preventDefault(),V}!ue.defaultPrevented&&ue.button===0&&(!ne||ne==="_self")&&!y(ue)&&(ue.preventDefault(),B())}});return c!==g?re.ref=b||X:re.ref=X,r.a.createElement("a",re)}),C=g(function(M,b){var X=M.component,B=X===void 0?d:X,U=M.replace,W=M.to,ne=M.innerRef,re=Object(u.a)(M,["component","replace","to","innerRef"]);return r.a.createElement(Fe.e.Consumer,null,function(ae){ae||Object(o.a)(!1);var ue=ae.history,V=a(t(W,ae.location),ae.location),ye=V?ue.createHref(V):"",J=Object(m.a)({},re,{href:ye,navigate:function(){var z=t(W,ae.location),H=U?ue.replace:ue.push;H(z)}});return c!==g?J.ref=b||ne:J.innerRef=ne,r.a.createElement(B,J)})});if(!1)var k,S;var E=function(b){return b},O=r.a.forwardRef;typeof O=="undefined"&&(O=E);function w(){for(var M=arguments.length,b=new Array(M),X=0;X<M;X++)b[X]=arguments[X];return b.filter(function(B){return B}).join(" ")}var _=O(function(M,b){var X=M["aria-current"],B=X===void 0?"page":X,U=M.activeClassName,W=U===void 0?"active":U,ne=M.activeStyle,re=M.className,ae=M.exact,ue=M.isActive,V=M.location,ye=M.sensitive,J=M.strict,$=M.style,z=M.to,H=M.innerRef,Y=Object(u.a)(M,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return r.a.createElement(Fe.e.Consumer,null,function(ee){ee||Object(o.a)(!1);var we=V||ee.location,he=a(t(z,we),we),Ae=he.pathname,pe=Ae&&Ae.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ge=pe?Object(Fe.f)(we.pathname,{path:pe,exact:ae,sensitive:ye,strict:J}):null,se=!!(ue?ue(ge,we):ge),ie=se?w(re,W):re,Z=se?Object(m.a)({},$,{},ne):$,be=Object(m.a)({"aria-current":se&&B||null,className:ie,style:Z,to:he},Y);return E!==O?be.ref=b||H:be.innerRef=H,r.a.createElement(C,be)})});if(!1)var F},"7ixt":function(ht,st,me){"use strict";me.d(st,"a",function(){return je});var Fe={adjustX:1,adjustY:1},Ve=[0,0],je={left:{points:["cr","cl"],overflow:Fe,offset:[-4,0],targetOffset:Ve},right:{points:["cl","cr"],overflow:Fe,offset:[4,0],targetOffset:Ve},top:{points:["bc","tc"],overflow:Fe,offset:[0,-4],targetOffset:Ve},bottom:{points:["tc","bc"],overflow:Fe,offset:[0,4],targetOffset:Ve},topLeft:{points:["bl","tl"],overflow:Fe,offset:[0,-4],targetOffset:Ve},leftTop:{points:["tr","tl"],overflow:Fe,offset:[-4,0],targetOffset:Ve},topRight:{points:["br","tr"],overflow:Fe,offset:[0,-4],targetOffset:Ve},rightTop:{points:["tl","tr"],overflow:Fe,offset:[4,0],targetOffset:Ve},bottomRight:{points:["tr","br"],overflow:Fe,offset:[0,4],targetOffset:Ve},rightBottom:{points:["bl","br"],overflow:Fe,offset:[4,0],targetOffset:Ve},bottomLeft:{points:["tl","bl"],overflow:Fe,offset:[0,4],targetOffset:Ve},leftBottom:{points:["br","bl"],overflow:Fe,offset:[-4,0],targetOffset:Ve}},r=je},"8hTe":function(ht,st,me){ht.exports={button:"button___1wy9m"}},"8mKB":function(ht,st,me){"use strict";var Fe=me("rePB"),Ve=me("1OyB"),je=me("vuIU"),r=me("Ji7U"),I=me("md7G"),f=me("foSv"),h=me("q1tI"),m=me.n(h),u=me("m+aA"),o=me("TSYQ"),p=me.n(o),s=me("4IlW");function t(M){var b=M.pageXOffset,X="scrollLeft";if(typeof b!="number"){var B=M.document;b=B.documentElement[X],typeof b!="number"&&(b=B.body[X])}return b}function a(M){var b,X,B=M.ownerDocument,U=B.body,W=B&&B.documentElement,ne=M.getBoundingClientRect();return b=ne.left,X=ne.top,b-=W.clientLeft||U.clientLeft||0,X-=W.clientTop||U.clientTop||0,{left:b,top:X}}function c(M){var b=a(M),X=M.ownerDocument,B=X.defaultView||X.parentWindow;return b.left+=t(B),b.left}function g(M){var b=y();return function(){var B=Object(f.a)(M),U;if(b){var W=Object(f.a)(this).constructor;U=Reflect.construct(B,arguments,W)}else U=B.apply(this,arguments);return Object(I.a)(this,U)}}function y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(M){return!1}}var d=function(M){Object(r.a)(X,M);var b=g(X);function X(){var B;return Object(Ve.a)(this,X),B=b.apply(this,arguments),B.onHover=function(U){var W=B.props,ne=W.onHover,re=W.index;ne(U,re)},B.onClick=function(U){var W=B.props,ne=W.onClick,re=W.index;ne(U,re)},B.onKeyDown=function(U){var W=B.props,ne=W.onClick,re=W.index;U.keyCode===13&&ne(U,re)},B}return Object(je.a)(X,[{key:"getClassName",value:function(){var U=this.props,W=U.prefixCls,ne=U.index,re=U.value,ae=U.allowHalf,ue=U.focused,V=ne+1,ye=W;return re===0&&ne===0&&ue?ye+=" ".concat(W,"-focused"):ae&&re+.5>=V&&re<V?(ye+=" ".concat(W,"-half ").concat(W,"-active"),ue&&(ye+=" ".concat(W,"-focused"))):(ye+=V<=re?" ".concat(W,"-full"):" ".concat(W,"-zero"),V===re&&ue&&(ye+=" ".concat(W,"-focused"))),ye}},{key:"render",value:function(){var U=this.onHover,W=this.onClick,ne=this.onKeyDown,re=this.props,ae=re.disabled,ue=re.prefixCls,V=re.character,ye=re.characterRender,J=re.index,$=re.count,z=re.value,H=typeof V=="function"?V(this.props):V,Y=m.a.createElement("li",{className:this.getClassName()},m.a.createElement("div",{onClick:ae?null:W,onKeyDown:ae?null:ne,onMouseMove:ae?null:U,role:"radio","aria-checked":z>J?"true":"false","aria-posinset":J+1,"aria-setsize":$,tabIndex:ae?-1:0},m.a.createElement("div",{className:"".concat(ue,"-first")},H),m.a.createElement("div",{className:"".concat(ue,"-second")},H)));return ye&&(Y=ye(Y,this.props)),Y}}]),X}(m.a.Component);function C(M,b){var X=Object.keys(M);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(M);b&&(B=B.filter(function(U){return Object.getOwnPropertyDescriptor(M,U).enumerable})),X.push.apply(X,B)}return X}function k(M){for(var b=1;b<arguments.length;b++){var X=arguments[b]!=null?arguments[b]:{};b%2?C(Object(X),!0).forEach(function(B){Object(Fe.a)(M,B,X[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(X)):C(Object(X)).forEach(function(B){Object.defineProperty(M,B,Object.getOwnPropertyDescriptor(X,B))})}return M}function S(M){var b=E();return function(){var B=Object(f.a)(M),U;if(b){var W=Object(f.a)(this).constructor;U=Reflect.construct(B,arguments,W)}else U=B.apply(this,arguments);return Object(I.a)(this,U)}}function E(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(M){return!1}}function O(){}var w=function(M){Object(r.a)(X,M);var b=S(X);function X(B){var U;Object(Ve.a)(this,X),U=b.call(this,B),U.onHover=function(ne,re){var ae=U.props.onHoverChange,ue=U.getStarValue(re,ne.pageX),V=U.state.cleanedValue;ue!==V&&U.setState({hoverValue:ue,cleanedValue:null}),ae(ue)},U.onMouseLeave=function(){var ne=U.props.onHoverChange;U.setState({hoverValue:void 0,cleanedValue:null}),ne(void 0)},U.onClick=function(ne,re){var ae=U.props.allowClear,ue=U.state.value,V=U.getStarValue(re,ne.pageX),ye=!1;ae&&(ye=V===ue),U.onMouseLeave(),U.changeValue(ye?0:V),U.setState({cleanedValue:ye?V:null})},U.onFocus=function(){var ne=U.props.onFocus;U.setState({focused:!0}),ne&&ne()},U.onBlur=function(){var ne=U.props.onBlur;U.setState({focused:!1}),ne&&ne()},U.onKeyDown=function(ne){var re=ne.keyCode,ae=U.props,ue=ae.count,V=ae.allowHalf,ye=ae.onKeyDown,J=ae.direction,$=J==="rtl",z=U.state.value;re===s.a.RIGHT&&z<ue&&!$?(V?z+=.5:z+=1,U.changeValue(z),ne.preventDefault()):re===s.a.LEFT&&z>0&&!$||re===s.a.RIGHT&&z>0&&$?(V?z-=.5:z-=1,U.changeValue(z),ne.preventDefault()):re===s.a.LEFT&&z<ue&&$&&(V?z+=.5:z+=1,U.changeValue(z),ne.preventDefault()),ye&&ye(ne)},U.saveRef=function(ne){return function(re){U.stars[ne]=re}},U.saveRate=function(ne){U.rate=ne};var W=B.value;return W===void 0&&(W=B.defaultValue),U.stars={},U.state={value:W,focused:!1,cleanedValue:null},U}return Object(je.a)(X,[{key:"componentDidMount",value:function(){var U=this.props,W=U.autoFocus,ne=U.disabled;W&&!ne&&this.focus()}},{key:"getStarDOM",value:function(U){return Object(u.a)(this.stars[U])}},{key:"getStarValue",value:function(U,W){var ne=this.props,re=ne.allowHalf,ae=ne.direction,ue=ae==="rtl",V=U+1;if(re){var ye=this.getStarDOM(U),J=c(ye),$=ye.clientWidth;(ue&&W-J>$/2||!ue&&W-J<$/2)&&(V-=.5)}return V}},{key:"focus",value:function(){var U=this.props.disabled;U||this.rate.focus()}},{key:"blur",value:function(){var U=this.props.disabled;U||this.rate.blur()}},{key:"changeValue",value:function(U){var W=this.props.onChange;"value"in this.props||this.setState({value:U}),W(U)}},{key:"render",value:function(){for(var U=this.props,W=U.count,ne=U.allowHalf,re=U.style,ae=U.prefixCls,ue=U.disabled,V=U.className,ye=U.character,J=U.characterRender,$=U.tabIndex,z=U.direction,H=this.state,Y=H.value,ee=H.hoverValue,we=H.focused,he=[],Ae=ue?"".concat(ae,"-disabled"):"",pe=0;pe<W;pe+=1)he.push(m.a.createElement(d,{ref:this.saveRef(pe),index:pe,count:W,disabled:ue,prefixCls:"".concat(ae,"-star"),allowHalf:ne,value:ee===void 0?Y:ee,onClick:this.onClick,onHover:this.onHover,key:pe,character:ye,characterRender:J,focused:we}));var ge=p()(ae,Ae,V,Object(Fe.a)({},"".concat(ae,"-rtl"),z==="rtl"));return m.a.createElement("ul",{className:ge,style:re,onMouseLeave:ue?null:this.onMouseLeave,tabIndex:ue?-1:$,onFocus:ue?null:this.onFocus,onBlur:ue?null:this.onBlur,onKeyDown:ue?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},he)}}],[{key:"getDerivedStateFromProps",value:function(U,W){return"value"in U&&U.value!==void 0?k(k({},W),{},{value:U.value}):W}}]),X}(m.a.Component);w.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:O,character:"\u2605",onHoverChange:O,tabIndex:0,direction:"ltr"};var _=w,F=st.a=_},"96GE":function(ht,st,me){"use strict";me.r(st),me.d(st,"formatQuery",function(){return mt});var Fe=me("T2oS"),Ve=me("W9HT"),je=me("k1fw"),r=me("PpiC"),I=me("q1tI"),f=me.n(I),h=me("9kvl"),m=me("JqQi"),u=me.n(m),o=me("5Dmo"),p=me("3S7+"),s=me("+L6B"),t=me("2/Rp"),a=me("pC0b"),c=me("GzdX"),g=me("9og8"),y=me("tJVT"),d=me("WmNS"),C=me.n(d),k=me("nUhQ"),S=me.n(k),E=me("2qtc"),O=me("kLXV"),w=me("7Kak"),_=me("9yH6"),F=me("miYZ"),M=me("tsqr"),b=me("5NDa"),X=me("5rEg"),B=me("Ty5D"),U=me("sWEp"),W=me.n(U),ne=me("qdXH"),re=X.a.Search,ae=function(Je){var Xe,ot=Je.videoDetail,rt=Je.globalSetting,ft=Je.loading,gt=Je.dispatch,ct=Object(r.a)(Je,["videoDetail","globalSetting","loading","dispatch"]),yt=Object(B.i)(),Ct=Object(B.h)(),nt=Object(I.useState)([]),At=Object(y.a)(nt,2),kt=At[0],bt=At[1],Rt=Object(I.useState)(""),de=Object(y.a)(Rt,2),Q=de[0],v=de[1],D=Object(I.useState)(),j=Object(y.a)(D,2),G=j[0],le=j[1],Te=Object(I.useState)(!1),Le=Object(y.a)(Te,2),qe=Le[0],Ke=Le[1],Ge=Object(I.useState)(!1),lt=Object(y.a)(Ge,2),it=lt[0],We=lt[1];Object(I.useEffect)(function(){ot.actionTabs.key==="Banner-SendToClass"&&ut()},[ot.actionTabs.key]);var ut=function(){var l=Object(g.a)(C.a.mark(function L(){var K,N;return C.a.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ue.next=2,Object(ne.h)({});case 2:if(N=Ue.sent,!(N!=null&&(K=N.courses)!==null&&K!==void 0&&K.length)){Ue.next=8;break}bt((N==null?void 0:N.courses)||[]),We(!0),Ue.next=11;break;case 8:return n(),M.b.info("\u60A8\u5F53\u524D\u6CA1\u6709\u7BA1\u7406\u4EFB\u4F55\u8BFE\u5802\uFF0C\u4E0D\u53EF\u53D1\u9001"),Ue.abrupt("return");case 11:case"end":return Ue.stop()}},L)}));return function(){return l.apply(this,arguments)}}(),Qe=function(L){bt(kt==null?void 0:kt.map(function(K){return Object(je.a)(Object(je.a)({},K),{},{hide:!K.course_name.includes(L)})}))},R=function(){var l=Object(g.a)(C.a.mark(function L(){var K;return C.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(G){Ce.next=3;break}return Ke(!0),Ce.abrupt("return");case 3:return Ce.next=5,Object(ne.m)({id:yt.videoId,course_id:G});case 5:K=Ce.sent,(K==null?void 0:K.status)===0&&(M.b.success("\u53D1\u9001\u6210\u529F"),n(),h.d===null||h.d===void 0||h.d.replace("/classrooms/".concat(G,"/shixun_homework")));case 7:case"end":return Ce.stop()}},L)}));return function(){return l.apply(this,arguments)}}(),n=function(){v(""),le(null),Ke(!1),gt({type:"videoDetail/setActionTabs",payload:{}}),We(!1)};return f.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,title:"\u53D1\u9001\u81F3\u8BFE\u5802",visible:it,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:R,onCancel:n},f.a.createElement("div",{className:W.a.wrap},f.a.createElement("div",{className:"mb10"},f.a.createElement(re,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:Q,onChange:function(L){return v(L.target.value)},onSearch:function(L){v(L),Qe(L)}})),f.a.createElement("div",{className:W.a.radioWrap},f.a.createElement(_.a.Group,{value:G,onChange:function(L){le(L.target.value),Ke(!1)}},kt==null||((Xe=kt.filter(function(l){return!(l!=null&&l.hide)}))===null||Xe===void 0)?void 0:Xe.map(function(l,L){return f.a.createElement(_.a,{className:W.a.radio,value:l.course_id,key:L},l.course_name)}))),qe&&f.a.createElement("div",{className:W.a.colorFF0000},"\u8BF7\u9009\u62E9\u4F60\u8981\u53D1\u9001\u7684\u8BFE\u5802"),f.a.createElement("div",{className:W.a.title},"\u6E29\u99A8\u63D0\u793A\uFF1A\u5F53\u524D\u89C6\u9891\u9879\u76EE\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802")))},ue=Object(h.a)(function(pt){var Je=pt.videoDetail,Xe=pt.loading,ot=pt.globalSetting;return{videoDetail:Je,globalSetting:ot,loading:Xe.models.index}})(ae),V=me("sBCT"),ye=me("Mgx3"),J=me("1vsH"),$=me("NLgs"),z=me("Awhp"),H=me("KrTs"),Y=me("O3gP"),ee=me("lrIw"),we=me("oBTY"),he=me("eoI0"),Ae=me.n(he),pe=me("HBuW"),ge=function(Je){var Xe,ot,rt=Je.videoDetail,ft=Je.dispatch,gt=ft===void 0?function(){}:ft,ct=Je.visible,yt=Je.onClose,Ct=yt===void 0?function(){}:yt,nt=rt.queryParams,At=rt.queryParams,kt=At.subject_id,bt=At.videoId,Rt={videoId:bt},de=Object(I.useState)(0),Q=Object(y.a)(de,2),v=Q[0],D=Q[1],j=Object(I.useState)(""),G=Object(y.a)(j,2),le=G[0],Te=G[1],Le=Object(I.useState)([]),qe=Object(y.a)(Le,2),Ke=qe[0],Ge=qe[1],lt=Object(I.useState)([]),it=Object(y.a)(lt,2),We=it[0],ut=it[1];Object(I.useEffect)(function(){var L,K,N=((L=rt.detail)===null||L===void 0||((K=L.video_item)===null||K===void 0)?void 0:K.schools)||[];D(N!=null&&N.length?1:0),ut(N)},[(Xe=rt.detail)===null||Xe===void 0||((ot=Xe.video_item)===null||ot===void 0)?void 0:ot.schools]);var Qe=function(){var L=Object(g.a)(C.a.mark(function K(N){var Ce;return C.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return Ze.next=2,Object(pe.O)({q:N});case 2:Ce=Ze.sent,Ce&&Ge(Ce.shools_name||[]);case 4:case"end":return Ze.stop()}},K)}));return function(N){return L.apply(this,arguments)}}(),R=function(K){if(We.includes(K)){M.b.info("\u8BF7\u52FF\u6307\u5B9A\u76F8\u540C\u7684\u5355\u4F4D");return}Te(""),ut([].concat(Object(we.a)(We),[K]))},n=function(){var L=Object(g.a)(C.a.mark(function K(){var N;return C.a.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(!(v===1&&!(We!=null&&We.length))){Ue.next=2;break}return Ue.abrupt("return",M.b.info("\u8BF7\u9009\u62E9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00"));case 2:return Ue.next=4,Object(ne.a)(Object(je.a)(Object(je.a)({},nt),{},{id:Rt.videoId,schools:v===0?[]:We,is_public:!(v===2)}));case 4:N=Ue.sent,(N==null?void 0:N.status)===0&&(M.b.success("\u8BBE\u7F6E\u6210\u529F"),l());case 6:case"end":return Ue.stop()}},K)}));return function(){return L.apply(this,arguments)}}(),l=function(){Ct(),gt({type:"videoDetail/getVideoDetail",payload:Object(je.a)(Object(je.a)({},nt),{},{id:Rt.videoId})})};return f.a.createElement(O.a,{centered:!0,maskClosable:!1,title:"\u6743\u9650\u8BBE\u7F6E",width:530,className:Ae.a.modal,visible:ct,onOk:n,onCancel:l},f.a.createElement(f.a.Fragment,null,f.a.createElement(_.a.Group,{value:v,onChange:function(K){return D(K.target.value)}},f.a.createElement(_.a,{value:0},"\u5BF9\u6240\u6709\u5355\u4F4D\u516C\u5F00",f.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u53EF\u89C1\uFF09")),f.a.createElement(_.a,{value:1},"\u5BF9\u6307\u5B9A\u5355\u4F4D\u516C\u5F00",f.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u4EC5\u5BF9\u4E0B\u65B9\u6307\u5B9A\u5355\u4F4D\u7528\u6237\u53EF\u89C1\uFF09")),f.a.createElement(_.a,{value:2},"\u4E0D\u516C\u5F00",f.a.createElement("span",null,"\uFF08\u9009\u4E2D\u540E\uFF0C\u5BF9\u6240\u6709\u7528\u6237\u4E0D\u53EF\u89C1\uFF09"))),v===1&&f.a.createElement(f.a.Fragment,null,f.a.createElement("div",{className:"mt10"},f.a.createElement(ee.a,{showSearch:!0,className:Ae.a.selectSchool,placeholder:"\u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u5355\u4F4D\u540D\u79F0",value:le,onChange:function(K){Te(K),Qe(K)},onSelect:R,options:Ke==null?void 0:Ke.map(function(L){return{value:L}})})),f.a.createElement("div",{className:"mt10"},We==null?void 0:We.map(function(L,K){return f.a.createElement(H.a,{count:f.a.createElement("span",{className:Ae.a.delete,onClick:function(){return ut(We.filter(function(Ce){return Ce!==L}))}},"x"),className:"mt10 mr20 current",key:K},f.a.createElement(t.a,{type:"primary",ghost:!0},L))})))))},se=ge,ie=function(Je){var Xe=Je.user,ot=Je.videoDetail,rt=Je.globalSetting,ft=Je.loading,gt=Je.dispatch,ct=Object(r.a)(Je,["user","videoDetail","globalSetting","loading","dispatch"]),yt=ot.queryParams,Ct=ot.queryParams,nt=Ct.subject_id,At=Ct.videoId,kt={videoId:At},bt=Object(I.useState)(),Rt=Object(y.a)(bt,2),de=Rt[0],Q=Rt[1],v=Object(I.useState)(),D=Object(y.a)(v,2),j=D[0],G=D[1],le=Object(I.useState)(!1),Te=Object(y.a)(le,2),Le=Te[0],qe=Te[1],Ke=ot.detail||{},Ge=Ke.video_item,lt=ot||{},it=lt.stages,We=function(){gt({type:"videoDetail/setActionTabs",payload:{key:"Banner-SendToClass"}})},ut=function(){var R=Object(g.a)(C.a.mark(function n(){var l,L,K,N,Ce,Ue;return C.a.wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(!((l=Xe.userInfo)!==null&&l!==void 0&&l.admin||(L=Xe.userInfo)!==null&&L!==void 0&&L.is_teacher&&Object($.d)())){at.next=9;break}return N=[],it.map(function(Ye){Ye.items.map(function(dt){N.push(dt)})}),Ce=N.filter(function(Ye){return Ye.id===Ge.id}),at.next=6,Object(ne.g)(Object(je.a)({id:Ce==null||((K=Ce[0])===null||K===void 0)?void 0:K.stage_item_id},yt));case 6:Ue=at.sent,G(Ue),Q(!0);case 9:case"end":return at.stop()}},n)}));return function(){return R.apply(this,arguments)}}(),Qe=function(){var R=Object(g.a)(C.a.mark(function n(l){var L,K,N;return C.a.wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ue.next=2,Object(ye.S)(Object(je.a)(Object(je.a)({id:j==null?void 0:j.id},l),{},{video_id:(l==null?void 0:l.video_id)||(j==null||((L=j.video_item)===null||L===void 0)?void 0:L.video_id),link:(l==null?void 0:l.link)||(j==null||((K=j.video_item)===null||K===void 0)?void 0:K.link)}));case 2:return N=Ue.sent,N&&(Q(!1),gt({type:"videoDetail/getVideoDetail",payload:Object(je.a)({id:kt.videoId},yt)})),Ue.abrupt("return",N);case 5:case"end":return Ue.stop()}},n)}));return function(l){return R.apply(this,arguments)}}();return f.a.createElement("aside",{className:S.a.banner},f.a.createElement("aside",{className:S.a.wrap},f.a.createElement("p",{className:S.a.title},Ge==null?void 0:Ge.name),f.a.createElement("div",{className:S.a.contentWrap},f.a.createElement("span",{className:"font14 c-white"},f.a.createElement("span",{className:"mr10"},"\u5B66\u4E60\u4EBA\u6570\uFF1A"),f.a.createElement("span",null,(Ge==null?void 0:Ge.study_video_items_count)||0),f.a.createElement("span",{className:"ml100 mr10"},"\u5B66\u5458\u8BC4\u5206\uFF1A"),f.a.createElement(c.a,{allowHalf:!0,value:Object(J.B)(Ge==null?void 0:Ge.star),disabled:!0,className:S.a.rating})),f.a.createElement("div",null,(Ge==null?void 0:Ge.can_edit)&&f.a.createElement(t.a,{className:"".concat(S.a.button," ").concat(S.a.buttonTransparent," mr15"),onClick:function(){return qe(!0)}},"\u6743\u9650\u8BBE\u7F6E"),(Ge==null?void 0:Ge.can_edit)&&f.a.createElement(t.a,{className:"".concat(S.a.button," ").concat(S.a.buttonTransparent," mr15"),onClick:ut},"\u7F16\u8F91"),f.a.createElement(p.a,{title:"\u53EF\u5C06\u672C\u89C6\u9891\u53D1\u9001\u81F3\u6211\u7684\u8BFE\u5802\u4E2D\u7684\u89C6\u9891\u680F\u76EE",placement:"bottom"},f.a.createElement(t.a,{className:"".concat(S.a.button," ").concat(S.a.buttonTransparent," mr15"),onClick:We},"\u53D1\u9001\u81F3"))))),f.a.createElement(ue,null),f.a.createElement(V.a,{editData:j,visible:de,onCancel:function(){return Q(!1)},onOk:Qe}),f.a.createElement(se,{dispatch:gt,videoDetail:ot,visible:Le,onClose:function(){return qe(!1)}}))},Z=Object(h.a)(function(pt){var Je=pt.user,Xe=pt.videoDetail,ot=pt.loading,rt=pt.globalSetting;return{user:Je,videoDetail:Xe,globalSetting:rt,loading:ot}})(ie),be=me("R9oj"),te=me("ECub"),q=me("sRBo"),Ee=me("kaz8"),Se=me("J66h"),Ie=me("hgre"),P=me("9Bee"),e=me("vZDz"),i=me.n(e),T=me("9VGf"),x=function(Je){var Xe=Je.videoDetail,ot=Je.globalSetting,rt=Je.loading,ft=Je.dispatch,gt=Object(r.a)(Je,["videoDetail","globalSetting","loading","dispatch"]),ct=Xe.queryParams,yt=Xe.selectParams,Ct=Xe.videoList,nt=ct.subject_id,At=ct.videoId,kt=yt.checkBoxValue,bt=yt.radioValue,Rt={videoId:At},de={query:ct},Q=Object(I.useRef)(),v=Object(I.useRef)(),D=Object(I.useRef)(),j=Object(I.useRef)(5),G=Xe.detail||{},le=G.video_item;Object(T.a)(Object(g.a)(C.a.mark(function ut(){return C.a.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:if(!v.current){R.next=5;break}return console.log("videoRef lastUpdatedTime: ",Q.current.getLastUpdatedTime()),console.log(Q.current),R.next=5,Te();case 5:case"end":return R.stop()}},ut)})),j.current*1e3);var Te=function(){var Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,R=Qe?{is_f:1}:{};return Object(ne.n)(Object(je.a)(Object(je.a)({},R),{id:Rt.videoId,point:Q.current.getLastUpdatedTime(),total:Q.current.getDuration()}))},Le=function(Qe){return console.log("handlLogWatchHistory: ",Qe),Qe.ed==="1"&&(v.current=!1,Te(!0)),!v.current&&!Qe.ed&&(v.current=!0,j.current=Q.current.getDuration()<=5?1:5,Te()),ft({type:"userDetail/logWatchHistory",payload:Qe})},qe=function(){v.current=!1},Ke=function(){v.current=!0},Ge=function(){D.current=5,O.a.confirm({width:600,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BF7\u7ED9\u672C\u89C6\u9891\u8BC4\u5206",content:f.a.createElement("div",{className:"tc font14"},f.a.createElement(c.a,{defaultValue:D.current,onChange:function(R){return D.current=R},className:i.a.modalRating})),onOk:function(){var Qe=Object(g.a)(C.a.mark(function n(){var l;return C.a.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,Object(ne.l)({id:Rt.videoId,star:D.current});case 2:l=K.sent,l.status===0&&ft({type:"videoDetail/getVideoDetail",payload:Object(je.a)({id:Rt.videoId},mt(de.query))});case 4:case"end":return K.stop()}},n)}));function R(){return Qe.apply(this,arguments)}return R}()})},lt=function(Qe){var R=window.filterVideoSign,n=R.findIndex(function(Ue){return Ue.id===At}),l=n===R.length-1;if(l)return;var L=R[n+1].id,K=R[n+1].can_view,N=R[n+1].link,Ce=R[n+1].is_public;if(window.checkBoxValue){if(N){window.open(N);return}if(!K){O.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}if(!Ce){O.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}ft({type:"videoDetail/handleList",payload:{videoId:L}}),window.videoTimer=setTimeout(function(){Qe.current.play()},2e3)}},it=function(Qe,R){if(Qe==="checkBox"){var n=R.target.checked;window.checkBoxValue=n,ft({type:"videoDetail/setSelectValue",payload:{radioValue:bt,checkBoxValue:n}});return}ft({type:"videoDetail/setSelectValue",payload:{checkBoxValue:kt,radioValue:R.target.value}})},We=function(){var Qe=Ct.findIndex(function(n){return n.id===At}),R=Qe===Ct.length-1;return R?f.a.createElement("div",null,"\u5F53\u524D\u5DF2\u662F\u6700\u540E\u4E00\u4E2A\u89C6\u9891"):f.a.createElement(Ee.a,{onChange:function(l){it("checkBox",l)},checked:kt},"\u81EA\u52A8\u64AD\u653E\u4E0B\u4E00\u4E2A\u89C6\u9891")};return f.a.createElement("aside",{className:i.a.contentWrap},f.a.createElement("aside",{className:i.a.wrap},f.a.createElement("header",null,(le==null?void 0:le.description)&&f.a.createElement("span",{className:i.a.introName},"\u7B80\u4ECB"),Object(J.N)(le==null?void 0:le.my_star)?f.a.createElement(t.a,{type:"primary",ghost:!0,onClick:Ge},"\u8BC4\u5206"):f.a.createElement("span",null,f.a.createElement("span",{className:"ml100 mr10 font14"},"\u6211\u7684\u8BC4\u5206\uFF1A"),f.a.createElement(c.a,{value:le==null?void 0:le.my_star,disabled:!0,className:i.a.rating}))),f.a.createElement("div",{className:"mt20"},f.a.createElement(P.a,{value:(le==null?void 0:le.description)||""})),!(le!=null&&le.can_edit)&&!(le!=null&&le.is_public)?f.a.createElement(te.a,{description:"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85"}):f.a.createElement(Ie.a,{ref:Q,startTime:le==null?void 0:le.last_point,src:le!=null&&le.is_link?le==null?void 0:le.link:(le==null?void 0:le.play_url)&&Se.Base64.decode(le==null?void 0:le.play_url),videoId:le==null?void 0:le.video_id,logWatchHistory:Le,handlePause:qe,handlePlay:Ke,videoSpeed:bt,handlePlayEnded:lt}),!(le!=null&&le.can_edit)&&!(le!=null&&le.is_public)?null:f.a.createElement("div",{className:i.a.footer},f.a.createElement("div",{className:i.a.checkBox},We()),f.a.createElement("div",{className:i.a.radioGroup},f.a.createElement(_.a.Group,{onChange:function(Qe){it("radio",Qe)},value:bt},f.a.createElement(_.a,{value:1},"1.0X"),f.a.createElement(_.a,{value:1.5},"1.5X"),f.a.createElement(_.a,{value:2},"2.0X"))))))},A=Object(h.a)(function(pt){var Je=pt.videoDetail,Xe=pt.loading,ot=pt.globalSetting;return{videoDetail:Je,globalSetting:ot,loading:Xe}})(x),oe=me("MRWH"),_e=me.n(oe),He=me("V0Rq"),Ne=me("m3rI"),Be=[{name:"\u5B9E\u8DF5\u9879\u76EE",type:"Shixun",icon:f.a.createElement("i",{className:"iconfont icon-shixun2 font20"})},{name:"\u89C6\u9891\u9879\u76EE",type:"VideoItem",icon:f.a.createElement("i",{className:"iconfont icon-shipin font20"})},{name:"\u6559\u5B66\u8BFE\u4EF6",type:"Attachment",icon:f.a.createElement("i",{className:"iconfont icon-jiaoxueanli font20"})},{name:"\u7A7A\u76EE\u5F55",type:"StageCatalog",icon:f.a.createElement("i",{className:"iconfont icon-kongbai font20"})}],$e=function(Je){var Xe=Je.dispatch,ot=Je.videoDetail,rt=Je.user,ft=Object(r.a)(Je,["dispatch","videoDetail","user"]),gt=ot.queryParams,ct=ot.stages,yt=ot.videoList,Ct=ot.cust_seq,nt=gt.subject_id,At=gt.videoId,kt=gt.course_id;Object(I.useEffect)(function(){Xe(nt?{type:"videoDetail/getStageData",payload:{subject_id:nt}}:{type:"videoDetail/getCourseStageData",payload:{coursesId:kt}})},[]);var bt=function(){var Te=Object(g.a)(C.a.mark(function Le(qe,Ke){var Ge;return C.a.wrap(function(it){for(;;)switch(it.prev=it.next){case 0:if(Xe({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF0C\u8BF7\u7A0D\u540E..."}}),!Ke){it.next=7;break}return it.next=4,Object(pe.C)({id:qe});case 4:it.t0=it.sent,it.next=10;break;case 7:return it.next=9,Object(pe.D)({id:qe});case 9:it.t0=it.sent;case 10:if(Ge=it.t0,Xe({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!(Ge!=null&&Ge.game_identifier||Ge!=null&&Ge.identifier)){it.next=15;break}return Object(J.Q)(Ke?"/tasks/".concat(Ge==null?void 0:Ge.identifier,"/jupyter"):"/tasks/".concat(Ge.game_identifier)),it.abrupt("return");case 15:(Ge==null?void 0:Ge.status)===2?de(Ge==null?void 0:Ge.message):(Ge==null?void 0:Ge.status)===3&&Rt(Ge==null?void 0:Ge.message);case 16:case"end":return it.stop()}},Le)}));return function(qe,Ke){return Te.apply(this,arguments)}}(),Rt=function(Le){O.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:f.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Le,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},de=function Te(Le){var qe;Le=(qe=Le)!==null&&qe!==void 0&&qe.includes(".json")?Le:"".concat(Le,".json"),O.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:f.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var Ke=Object(g.a)(C.a.mark(function lt(){var it,We;return C.a.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Object(He.S)({url:Le});case 2:if(it=Qe.sent,it){Qe.next=5;break}return Qe.abrupt("return");case 5:return M.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),Qe.next=8,Object(pe.D)({id:it.shixun_identifier});case 8:if(We=Qe.sent,!(We!=null&&We.game_identifier)){Qe.next=12;break}return Object(J.Q)("/tasks/".concat(We.game_identifier)),Qe.abrupt("return");case 12:(We==null?void 0:We.status)===2?Te(We==null?void 0:We.message):(We==null?void 0:We.status)===3&&Rt(We==null?void 0:We.message);case 13:case"end":return Qe.stop()}},lt)}));function Ge(){return Ke.apply(this,arguments)}return Ge}()})},Q=ot.detail||{},v=Q.video_item,D=function(Le){if((Le==null?void 0:Le.item_type)==="StageCatalog")return;clearTimeout(window.videoTimer);var qe=Le.id,Ke=Le.item_type,Ge=Le.identifier,lt=Le.is_jupyter,it=Le.url,We=Le.link;if(Ke==="VideoItem"&&!We){var ut,Qe;if(!((ut=rt.userInfo)!==null&&ut!==void 0&&ut.admin)&&!((Qe=rt.userInfo)!==null&&Qe!==void 0&&Qe.business)&&!Le.can_view){O.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}Xe({type:"videoDetail/getVideoDetail",payload:Object(je.a)(Object(je.a)({id:qe},gt),{},{videoId:qe}),callback:function(n){if(n&&n.video_item&&!n.video_item.can_edit&&!Le.is_public){O.a.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:f.a.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}Xe({type:"videoDetail/handleList",payload:{videoId:qe}})}});return}if(Ke==="VideoItem"&&!!We){Le.link&&Object(ne.n)({is_f:1,id:Le.id,point:0,total:0}),window.open(We);return}if(Ke==="Shixun"){bt(Ge,lt);return}if(Ke==="Attachment"){Object(J.t)(Le.name,Ne.a.API_SERVER+Le.url);return}window.open(Ne.a.IMG_SERVER+it)},j=function(Le){var qe=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],Ke=["","\u5341","\u767E","\u5343","\u4E07"];Le=parseInt(Le);var Ge=function(ut){for(var Qe=ut.toString().split("").reverse(),R="",n=0;n<Qe.length;n++)R=(n==0&&Qe[n]==0||n>0&&Qe[n]==0&&Qe[n-1]==0?"":qe[Qe[n]]+(Qe[n]==0?Ke[0]:Ke[n]))+R;return R},lt=Math.floor(Le/1e4),it=Le%1e4;return it.toString().length<4&&(it="0"+it),lt?Ge(lt)+"\u4E07"+Ge(it):Ge(Le)},G=function(Le,qe,Ke,Ge){var lt=Le.name,it=Le.item_type,We=Le.id,ut="".concat(qe+1,"-").concat(Ke+1,"-").concat(Ge+1),Qe=Be.find(function(l){return l.type===it}).icon,R=_e.a.brght,n=At===We?"".concat(R," ").concat(_e.a.active):R;return f.a.createElement("div",{key:ut,onClick:function(){return D(Le)},className:n,style:{paddingLeft:52}},f.a.createElement("span",{className:_e.a.s1},Qe),!!Ct&&f.a.createElement("span",{className:_e.a.s2},ut),f.a.createElement("span",{className:_e.a.s3},"\u203B ",lt))},le=function(Le,qe,Ke){var Ge=Le.name,lt=Le.item_type,it=Le.id,We=Le.children,ut="".concat(qe+1,"-").concat(Ke+1),Qe=Be.find(function(l){return l.type===lt}).icon,R=_e.a.brght,n=At===it?"".concat(R," ").concat(_e.a.active):R;return f.a.createElement(I.Fragment,{key:ut},f.a.createElement("div",{onClick:function(){return D(Le)},className:n},f.a.createElement("span",{className:_e.a.s1},Qe),!!Ct&&f.a.createElement("span",{className:_e.a.s2},ut),f.a.createElement("span",{className:_e.a.s3},"\u203B ",Ge)),!!We.length&&We.map(function(l,L){return G(l,qe,Ke,L)}))};return f.a.createElement("aside",{className:_e.a.list},ct.map(function(Te,Le){var qe=Te.stage_name,Ke=Te.shixuns_list,Ge=Ke===void 0?[]:Ke,lt=Te.items,it=lt===void 0?[]:lt,We=Object(we.a)(it);return f.a.createElement("aside",{key:Le,className:_e.a.box},f.a.createElement("div",{className:_e.a.title},j(Le+1),"\u3001",qe),We.map(function(ut,Qe){return le(ut,Le,Qe)}),Le!==ct.length-1&&f.a.createElement("div",{className:_e.a.line}))}))},tt=Object(h.a)(function(pt){var Je=pt.user,Xe=pt.videoDetail,ot=pt.loading,rt=pt.globalSetting;return{user:Je,videoDetail:Xe,globalSetting:rt,loading:ot}})($e),Me=me("lppi"),Pe=me.n(Me),ke=me("fWQN"),Re=function pt(){var Je=this;Object(ke.a)(this,pt),this.conversion_getDPI=function(){var Xe=new Array;if(window.screen.deviceXDPI)Xe[0]=window.screen.deviceXDPI,Xe[1]=window.screen.deviceXDPI;else{var ot=document.createElement("DIV");ot.style.cssText="width:1in;height:1in;position:absolute;left:0px;top:0px;z-index:99;visibility:hidden",document.body.appendChild(ot),Xe[0]=parseInt(String(ot.offsetWidth)),Xe[1]=parseInt(String(ot.offsetHeight)),ot.parentNode.removeChild(ot)}return Xe},this.pxConversionMm=function(Xe){var ot=Xe/Je.conversion_getDPI()[0],rt=ot*25.4;return rt},this.mmConversionPx=function(Xe){var ot=Xe/25.4,rt=ot*Je.conversion_getDPI()[0];return rt}},Oe=new Re,ce=Oe.mmConversionPx(297),ve=function(Je){var Xe=Je.url,ot=Object(I.useState)(""),rt=Object(y.a)(ot,2),ft=rt[0],gt=rt[1],ct=Object(I.useState)(!0),yt=Object(y.a)(ct,2),Ct=yt[0],nt=yt[1];return Object(I.useEffect)(function(){var At="".concat(Ne.a.API_SERVER).concat(Xe);ft!==At&&(nt(!1),setTimeout(function(){nt(!0)},500)),gt(At)},[Xe]),ft?f.a.createElement("div",{className:Pe.a.pdfContainer},f.a.createElement("div",{className:Pe.a.loading},f.a.createElement(Ve.a,{tip:"\u6B63\u5728\u52A0\u8F7D"})),Ct&&f.a.createElement("embed",{src:ft,height:ce,width:"100%"})):f.a.createElement(f.a.Fragment,null)},xe=ve,fe=me("b57q"),De=me.n(fe),ze=function(Je){var Xe=Je.name,ot=Je.url;return f.a.createElement("div",{className:De.a.officeContainer},f.a.createElement(t.a,{type:"primary",onClick:function(){Object(J.t)(Xe,ot)}},"\u70B9\u51FB\u4E0B\u8F7D\u6587\u4EF6"))},et=ze,mt=function(Je){var Xe=Je.subject_id;return{subject_id:Xe,course_id:Xe}},_t=function(Je){var Xe=Je.videoDetail,ot=Je.globalSetting,rt=Je.loading,ft=Je.dispatch,gt=Object(r.a)(Je,["videoDetail","globalSetting","loading","dispatch"]),ct=Xe.queryParams,yt=Xe.videoList,Ct=Xe.attachmentList,nt=Xe.active,At=ct.subject_id,kt=ct.videoId,bt={videoId:kt};Object(I.useEffect)(function(){if(nt){var de=nt.item_type,Q=nt.id;de==="VideoItem"&&ft({type:"videoDetail/getVideoDetail",payload:Object(je.a)(Object(je.a)({},ct),{},{id:Q})})}},[nt.id]),Object(I.useEffect)(function(){var de,Q;Object(J.V)((de=Xe.detail)===null||de===void 0||((Q=de.video_item)===null||Q===void 0)?void 0:Q.name)},[Xe]);var Rt={width:1200};return nt&&nt.item_type==="Attachment"&&nt.content_type==="application/pdf"&&(Rt={width:1250,marginLeft:(document.body.clientWidth-1200)/2}),console.log("active:",nt),f.a.createElement(Ve.a,{spinning:!1},f.a.createElement("section",{className:u.a.bg},f.a.createElement(Z,null),f.a.createElement("div",{className:u.a.container,style:Rt},f.a.createElement(tt,null),nt&&nt.item_type==="VideoItem"&&f.a.createElement(A,null),nt&&nt.item_type==="Attachment"&&nt.content_type==="application/pdf"&&nt.url&&f.a.createElement(xe,{url:nt.url}),nt&&nt.item_type==="Attachment"&&["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(nt.content_type)&&nt.url&&f.a.createElement(et,{url:nt.url,name:nt.name}))))},vt=st.default=Object(h.a)(function(pt){var Je=pt.videoDetail,Xe=pt.loading,ot=pt.globalSetting;return{videoDetail:Je,globalSetting:ot,loading:Xe}})(_t)},"9Bee":function(ht,st,me){"use strict";var Fe=me("DYRE"),Ve=me("zeV3"),je=me("+L6B"),r=me("2/Rp"),I=me("k1fw"),f=me("9og8"),h=me("tJVT"),m=me("WmNS"),u=me.n(m),o=me("q1tI"),p=me.n(o),s=me("vg9a"),t=me("DlQD"),a=me.n(t),c=me("rUJ1");function g(R,n){var l=R.match(/^(\s+)(?:```)/);if(l===null)return n;var L=l[1];return n.split(`
`).map(function(K){var N=K.match(/^\s+/);if(N===null)return K;var Ce=Object(h.a)(N,1),Ue=Ce[0];return Ue.length>=L.length?K.slice(L.length):K}).join(`
`)}var y=[],d=["<ul>"],C=new a.a.Renderer,k=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function S(){y.length=0,d=["<ul>"]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function O(R,n,l,L){if(n>=R.length||R[n].level<=l)return n;var K=R[n];L.push("<li><a href='#"+K.anchor+"'>"+K.text+"</a>"),n++;var N=[];return n=O(R,n,K.level,N),N.length>0&&(L.push("<ul>"),N.forEach(function(Ce){L.push(Ce)}),L.push("</ul>")),L.push("</li>"),n=O(R,n,l,L),n}function w(){return O(y,0,0,d),d.push("</ul>"),d.join("")}var _={heading:function(n){var l=k.exec(n);if(l)return{type:"heading",raw:l[0],depth:l[1].length,text:l[2]}},fences:function(n){var l=this.rules.block.fences.exec(n);if(l){var L=l[0],K=g(L,l[3]||""),N=l[2]?l[2].trim():l[2];if(["latex","katex","math"].indexOf(N)>=0){var Ce=b(),Ue=K;K=Ce,X[Ce]={type:"block",expression:Ue}}return{type:"code",raw:L,lang:N,text:K}}}},F=/(?:\${2})([^\n`]+?)(?:\${2})/gi,M=0,b=function(){return"__special_katext_id_".concat(M++,"__")},X={};function B(){return X}function U(){M=0,X={}}function W(R){return R=R.replace(F,function(n,l){var L=b();return X[L]={type:"inline",expression:l},L}),R}var ne=C.listitem;C.listitem=function(R){return ne(W(R))};var re=C.paragraph;C.paragraph=function(R){return re(W(R))};var ae=C.tablecell;C.tablecell=function(R,n){return ae(W(R),n)},C.code=function(R,n,l){var L=(n||"").match(/\S*/)[0];return L?["latex","katex","math"].indexOf(L)>=0?"<p class='editormd-tex'>".concat(R,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(l?R:Object(c.escape)(R,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(l?R:Object(c.escape)(R,!0))+"</code></pre>"},C.heading=function(R,n,l){var L=this.options.headerPrefix+l.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return y.push({anchor:L,level:n,text:R}),"<h"+n+' id="'+L+'">'+R+"</h"+n+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:_,renderer:C});var ue=a.a,V=me("SJMd"),ye=me("ulZh"),J=me.n(ye),$=me("m3rI"),z=me("Oy/b"),H=me("p5ED"),Y=me("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ee=function(R,n){return(ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,L){l.__proto__=L}||function(l,L){for(var K in L)Object.prototype.hasOwnProperty.call(L,K)&&(l[K]=L[K])})(R,n)};function we(R,n){function l(){this.constructor=R}ee(R,n),R.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}function he(R,n,l,L){return new(l||(l=Promise))(function(K,N){function Ce(at){try{Ze(L.next(at))}catch(Ye){N(Ye)}}function Ue(at){try{Ze(L.throw(at))}catch(Ye){N(Ye)}}function Ze(at){var Ye;at.done?K(at.value):(Ye=at.value,Ye instanceof l?Ye:new l(function(dt){dt(Ye)})).then(Ce,Ue)}Ze((L=L.apply(R,n||[])).next())})}function Ae(R,n){var l,L,K,N,Ce={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return N={next:Ue(0),throw:Ue(1),return:Ue(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function Ue(Ze){return function(at){return function(Ye){if(l)throw new TypeError("Generator is already executing.");for(;Ce;)try{if(l=1,L&&(K=2&Ye[0]?L.return:Ye[0]?L.throw||((K=L.return)&&K.call(L),0):L.next)&&!(K=K.call(L,Ye[1])).done)return K;switch(L=0,K&&(Ye=[2&Ye[0],K.value]),Ye[0]){case 0:case 1:K=Ye;break;case 4:return Ce.label++,{value:Ye[1],done:!1};case 5:Ce.label++,L=Ye[1],Ye=[0];continue;case 7:Ye=Ce.ops.pop(),Ce.trys.pop();continue;default:if(!(K=Ce.trys,(K=K.length>0&&K[K.length-1])||Ye[0]!==6&&Ye[0]!==2)){Ce=0;continue}if(Ye[0]===3&&(!K||Ye[1]>K[0]&&Ye[1]<K[3])){Ce.label=Ye[1];break}if(Ye[0]===6&&Ce.label<K[1]){Ce.label=K[1],K=Ye;break}if(K&&Ce.label<K[2]){Ce.label=K[2],Ce.ops.push(Ye);break}K[2]&&Ce.ops.pop(),Ce.trys.pop();continue}Ye=n.call(R,Ce)}catch(dt){Ye=[6,dt],L=0}finally{l=K=0}if(5&Ye[0])throw Ye[1];return{value:Ye[0]?Ye[1]:void 0,done:!0}}([Ze,at])}}}function pe(){for(var R=0,n=0,l=arguments.length;n<l;n++)R+=arguments[n].length;var L=Array(R),K=0;for(n=0;n<l;n++)for(var N=arguments[n],Ce=0,Ue=N.length;Ce<Ue;Ce++,K++)L[K]=N[Ce];return L}var ge=function(){function R(){}return R.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},R.setAttributes=function(n,l){for(var L=0,K=l;L<K.length;L++){var N=K[L],Ce=N[0],Ue=N[1];n.setAttribute(Ce,Ue)}},R.createRect=function(n,l,L){var K=document.createElementNS("http://www.w3.org/2000/svg","rect");return K.setAttribute("width",n.toString()),K.setAttribute("height",l.toString()),L&&R.setAttributes(K,L),K},R.createLine=function(n,l,L,K,N){var Ce=document.createElementNS("http://www.w3.org/2000/svg","line");return Ce.setAttribute("x1",n.toString()),Ce.setAttribute("y1",l.toString()),Ce.setAttribute("x2",L.toString()),Ce.setAttribute("y2",K.toString()),N&&R.setAttributes(Ce,N),Ce},R.createPolygon=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","polygon");return L.setAttribute("points",n),l&&R.setAttributes(L,l),L},R.createCircle=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","circle");return L.setAttribute("cx",(n/2).toString()),L.setAttribute("cy",(n/2).toString()),L.setAttribute("r",n.toString()),l&&R.setAttributes(L,l),L},R.createEllipse=function(n,l,L){var K=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return K.setAttribute("cx",(n/2).toString()),K.setAttribute("cy",(l/2).toString()),K.setAttribute("rx",(n/2).toString()),K.setAttribute("ry",(l/2).toString()),L&&R.setAttributes(K,L),K},R.createGroup=function(n){var l=document.createElementNS("http://www.w3.org/2000/svg","g");return n&&R.setAttributes(l,n),l},R.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},R.createMarker=function(n,l,L,K,N,Ce,Ue){var Ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return R.setAttributes(Ze,[["id",n],["orient",l],["markerWidth",L.toString()],["markerHeight",K.toString()],["refX",N.toString()],["refY",Ce.toString()]]),Ze.appendChild(Ue),Ze},R.createText=function(n){var l=document.createElementNS("http://www.w3.org/2000/svg","text");return l.setAttribute("x","0"),l.setAttribute("y","0"),n&&R.setAttributes(l,n),l},R.createTSpan=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","tspan");return L.textContent=n,l&&R.setAttributes(L,l),L},R.createImage=function(n){var l=document.createElementNS("http://www.w3.org/2000/svg","image");return n&&R.setAttributes(l,n),l},R.createPoint=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return L.x=n,L.y=l,L},R.createPath=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","path");return L.setAttribute("d",n),l&&R.setAttributes(L,l),L},R}(),se=function(){function R(){}return R.addKey=function(n){R.key=n},Object.defineProperty(R,"isLicensed",{get:function(){return!!R.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(R.key)},enumerable:!1,configurable:!0}),R}(),ie=function(){function R(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return R.prototype.rasterize=function(n,l,L){var K=this;return new Promise(function(N){var Ce=L!==void 0?L:document.createElement("canvas");n===null&&(K.markersOnly=!0,K.naturalSize=!1);var Ue=document.createElementNS("http://www.w3.org/2000/svg","svg");Ue.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ue.setAttribute("width",l.width.baseVal.valueAsString),Ue.setAttribute("height",l.height.baseVal.valueAsString),Ue.setAttribute("viewBox","0 0 "+l.viewBox.baseVal.width.toString()+" "+l.viewBox.baseVal.height.toString()),Ue.innerHTML=l.innerHTML,K.naturalSize===!0?(Ue.width.baseVal.value=n.naturalWidth,Ue.height.baseVal.value=n.naturalHeight):K.width!==void 0&&K.height!==void 0&&(Ue.width.baseVal.value=K.width,Ue.height.baseVal.value=K.height),Ce.width=Ue.width.baseVal.value,Ce.height=Ue.height.baseVal.value;var Ze=Ue.outerHTML,at=Ce.getContext("2d");K.markersOnly!==!0&&at.drawImage(n,0,0,Ce.width,Ce.height);var Ye=window.URL,dt=new Image(Ce.width,Ce.height);dt.setAttribute("crossOrigin","anonymous");var xt=new Blob([Ze],{type:"image/svg+xml"}),wt=Ye.createObjectURL(xt);dt.onload=function(){at.drawImage(dt,0,0),Ye.revokeObjectURL(wt);var Nt=Ce.toDataURL(K.imageType,K.imageQuality);N(Nt)},dt.src=wt})},R}(),Z=function(){},be=function(){function R(n){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+n+"_"}return Object.defineProperty(R.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),R.prototype.addClass=function(n){return this.styleSheet===void 0&&this.addStyleSheet(),n.name=""+this.classNamePrefix+n.localName,this.classes.push(n),this.styleSheet.sheet.insertRule("."+n.name+" {"+n.style+"}",this.styleSheet.sheet.cssRules.length),n},R.prototype.addRule=function(n){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(n),this.styleSheet.sheet.insertRule(n.selector+" {"+n.style+"}",this.styleSheet.sheet.cssRules.length)},R.prototype.addStyleSheet=function(){var n;this.styleSheet=document.createElement("style"),((n=this.styleSheetRoot)!==null&&n!==void 0?n:document.head).appendChild(this.styleSheet),this.addRule(new te("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new te("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new te("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new q("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new q("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},R.prototype.removeStyleSheet=function(){var n;this.styleSheet&&(((n=this.styleSheetRoot)!==null&&n!==void 0?n:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},R}(),te=function(R,n){this.selector=R,this.style=n},q=function(R,n){this.localName=R,this.style=n},Ee=function(){function R(n,l,L,K,N){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=n,this.displayMode=l,this.markerItems=L,this.uiStyleSettings=K,this.styles=N,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return R.prototype.show=function(n){var l=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=n,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var L=document.createElement("div");L.className=this.toolbarBlockStyleClass.name,L.style.whiteSpace="nowrap",this.uiContainer.appendChild(L),this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(L,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(N){var Ce=document.createElement("div");Ce.className=""+l.toolbarButtonStyleClass.name,Ce.setAttribute("data-type-name",N.typeName),Ce.innerHTML=N.icon,Ce.addEventListener("click",function(){l.markerToolbarButtonClicked(Ce,N)}),l.buttons.push(Ce),l.markerButtons.push(Ce)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var K=document.createElement("div");K.className=this.toolbarBlockStyleClass.name,K.style.whiteSpace="nowrap",K.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(K),this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},R.prototype.addButtonClickListener=function(n){this.buttonClickListeners.push(n)},R.prototype.removeButtonClickListener=function(n){this.buttonClickListeners.indexOf(n)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(n),1)},R.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},R.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var n=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var l=0;l<this.markerButtons.length;l++)l<n||l===n&&this.markerButtons.length-1===n?this.markerButtonBlock.appendChild(this.markerButtons[l]):(l===n&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[l]))}},R.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},R.prototype.resetButtonStyles=function(){var n=this;this.buttons.forEach(function(l){l.className=l.className.replace(n.uiStyleSettings.toolbarButtonStyleColorsClassName?n.uiStyleSettings.toolbarButtonStyleColorsClassName:n.toolbarButtonStyleColorsClass.name,"").trim(),l.className=l.className.replace(n.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?n.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:n.toolbarActiveButtonStyleColorsClass.name,"").trim(),l.className+=" "+(n.uiStyleSettings.toolbarButtonStyleColorsClassName?n.uiStyleSettings.toolbarButtonStyleColorsClassName:n.toolbarButtonStyleColorsClass.name)})},R.prototype.addActionButton=function(n,l,L){var K=this,N=document.createElement("div");switch(N.className=""+this.toolbarButtonStyleClass.name,N.innerHTML=l,N.setAttribute("data-action",L),N.addEventListener("click",function(){K.actionToolbarButtonClicked(N,L)}),L){case"select":N.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":N.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":N.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":N.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":N.style.fill=this.uiStyleSettings.closeButtonColor}n.appendChild(N),this.buttons.push(N)},R.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new q("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new q("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new q("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new q("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new q("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var n=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new q("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*n)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*n)+`px;
padding: `+n+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new q("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new te("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new te("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},R.prototype.markerToolbarButtonClicked=function(n,l){this.setActiveButton(n),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(L){return L("marker",l)}),this.markerButtonOverflowBlock.style.display="none"},R.prototype.actionToolbarButtonClicked=function(n,l){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(L){return L("action",l)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},R.prototype.setActiveButton=function(n){this.resetButtonStyles(),n.className=n.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),n.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},R.prototype.setActiveMarkerButton=function(n){var l=this.markerButtons.find(function(L){return L.getAttribute("data-type-name")===n});l&&this.setActiveButton(l)},R.prototype.setCurrentMarker=function(n){var l=this;this.currentMarker=n,this.buttons.filter(function(L){return/delete|notes/.test(L.getAttribute("data-action"))}).forEach(function(L){l.currentMarker===void 0?(L.style.fillOpacity="0.4",L.style.pointerEvents="none"):(L.style.fillOpacity="1",L.style.pointerEvents="all")})},R}(),Se=function(){function R(n,l,L,K){this.panels=[],this.panelButtons=[],this.markerjsContainer=n,this.displayMode=l,this.uiStyleSettings=L,this.styles=K,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return R.prototype.addStyles=function(){var n;this.toolboxStyleClass=this.styles.addClass(new q("toolbox",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
font-family: sans-serif;
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
box-sizing: content-box;
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolboxStyleColorsClass=this.styles.addClass(new q("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var l=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new q("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new q("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new q("toolbox-panel-row",`
display: flex;
`+(this.displayMode==="inline"?"position: absolute;":"")+`
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
cursor: default;
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
`+(this.displayMode==="inline"?"width: 100%;":"")+`
box-sizing: content-box;
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new q("toolbox-panel-row_colors",`
background-color: `+((n=this.uiStyleSettings.toolboxBackgroundColor)!==null&&n!==void 0?n:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new q("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*l)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*l)+`px;
padding: `+l+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new q("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new q("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new te("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new te("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},R.prototype.show=function(n){var l;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=n,this.uiContainer.className=this.toolboxStyleClass.name+" "+((l=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&l!==void 0?l:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},R.prototype.setPanelButtons=function(n){var l,L,K=this;this.panels=n,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((l=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&l!==void 0?l:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((L=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&L!==void 0?L:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(N){var Ce;N.uiStyleSettings=K.uiStyleSettings;var Ue=document.createElement("div");Ue.className=K.toolboxButtonStyleClass.name+" "+((Ce=K.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ce!==void 0?Ce:K.toolboxButtonStyleColorsClass.name),Ue.innerHTML=N.icon,Ue.title=N.title,Ue.addEventListener("click",function(){K.panelButtonClick(N)}),K.panelButtons.push(Ue),K.buttonRow.appendChild(Ue)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},R.prototype.panelButtonClick=function(n){var l=this,L=-1;if(n!==this.activePanel){L=this.panels.indexOf(n),this.panelRow.innerHTML="";var K=n.getUi();K.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(K),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=n}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){l.displayMode==="inline"?l.panelRow.style.display="none":l.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(N,Ce){var Ue,Ze;N.className=l.toolboxButtonStyleClass.name+" "+(Ce===L?""+((Ue=l.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ue!==void 0?Ue:l.toolboxActiveButtonStyleColorsClass.name):""+((Ze=l.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:l.toolboxButtonStyleColorsClass.name))})},R}(),Ie=function(R,n){this.title=R,this.icon=n},P=function(R){function n(l,L,K,N){var Ce=R.call(this,l,N||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return Ce.colors=[],Ce.addTransparent=!1,Ce.colorBoxes=[],Ce.colors=L,Ce.currentColor=K,Ce.setCurrentColor=Ce.setCurrentColor.bind(Ce),Ce.getColorBox=Ce.getColorBox.bind(Ce),Ce}return we(n,R),n.prototype.getUi=function(){var l=this,L=document.createElement("div");return L.style.overflow="hidden",L.style.whiteSpace="nowrap",this.colors.forEach(function(K){var N=l.getColorBox(K);L.appendChild(N),l.colorBoxes.push(N)}),L},n.prototype.getColorBox=function(l){var L=this,K=this.uiStyleSettings.toolbarHeight/4,N=this.uiStyleSettings.toolbarHeight-K,Ce=document.createElement("div");Ce.style.display="inline-block",Ce.style.boxSizing="content-box",Ce.style.width=N-2+"px",Ce.style.height=N-2+"px",Ce.style.padding="1px",Ce.style.marginRight="2px",Ce.style.marginBottom="2px",Ce.style.borderWidth="2px",Ce.style.borderStyle="solid",Ce.style.borderRadius=(N+2)/2+"px",Ce.style.borderColor=l===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ce.addEventListener("click",function(){L.setCurrentColor(l,Ce)});var Ue=document.createElement("div");return Ue.style.display="inline-block",Ue.style.width=N-2+"px",Ue.style.height=N-2+"px",Ue.style.backgroundColor=l,Ue.style.borderRadius=N/2+"px",l==="transparent"&&(Ue.style.fill=this.uiStyleSettings.toolboxAccentColor,Ue.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),Ce.appendChild(Ue),Ce},n.prototype.setCurrentColor=function(l,L){var K=this;this.currentColor=l,this.colorBoxes.forEach(function(N){N.style.borderColor=N===L?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(l)},n}(Ie),e=function(){function R(n,l,L){this._state="new",this._isSelected=!1,this._container=n,this._overlayContainer=l,this.globalSettings=L,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(R.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),R.prototype.ownsTarget=function(n){return!1},Object.defineProperty(R.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),R.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},R.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},R.prototype.pointerDown=function(n,l){},R.prototype.dblClick=function(n,l){},R.prototype.manipulate=function(n){},R.prototype.pointerUp=function(n){this.stateChanged()},R.prototype.dispose=function(){},R.prototype.addMarkerVisualToContainer=function(n){this.container.childNodes.length>0?this.container.insertBefore(n,this.container.childNodes[0]):this.container.appendChild(n)},R.prototype.getState=function(){return{typeName:R.typeName,state:this.state,notes:this.notes}},R.prototype.restoreState=function(n){this._state=n.state,this.notes=n.notes},R.prototype.scale=function(n,l){},R.prototype.colorChanged=function(n){this.onColorChanged&&this.onColorChanged(n),this.stateChanged()},R.prototype.fillColorChanged=function(n){this.onFillColorChanged&&this.onFillColorChanged(n),this.stateChanged()},R.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var n=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),n.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(n)&&this.onStateChanged(this)}},R.typeName="MarkerBase",R}(),i=function(){function R(){this.findGripByVisual=this.findGripByVisual.bind(this)}return R.prototype.findGripByVisual=function(n){return this.topLeft.ownsTarget(n)?this.topLeft:this.topCenter.ownsTarget(n)?this.topCenter:this.topRight.ownsTarget(n)?this.topRight:this.centerLeft.ownsTarget(n)?this.centerLeft:this.centerRight.ownsTarget(n)?this.centerRight:this.bottomLeft.ownsTarget(n)?this.bottomLeft:this.bottomCenter.ownsTarget(n)?this.bottomCenter:this.bottomRight.ownsTarget(n)?this.bottomRight:void 0},R}(),T=function(){function R(){this.GRIP_SIZE=10,this.visual=ge.createGroup(),this.visual.appendChild(ge.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ge.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return R.prototype.ownsTarget=function(n){return n===this.visual||n===this.visual.childNodes[0]||n===this.visual.childNodes[1]},R}(),x=function(){function R(){}return R.toITransformMatrix=function(n){return{a:n.a,b:n.b,c:n.c,d:n.d,e:n.e,f:n.f}},R.toSVGMatrix=function(n,l){return n.a=l.a,n.b=l.b,n.c=l.c,n.d=l.d,n.e=l.e,n.f=l.f,n},R}(),A=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.left=0,N.top=0,N.width=0,N.height=0,N.defaultSize={x:50,y:20},N.offsetX=0,N.offsetY=0,N.rotationAngle=0,N.CB_DISTANCE=10,N._suppressMarkerCreateEvent=!1,N.container.transform.baseVal.appendItem(ge.createTransform()),N.setupControlBox(),N}return we(n,R),Object.defineProperty(n.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"visual",{get:function(){return this._visual},set:function(l){this._visual=l;var L=ge.createTransform();this._visual.transform.baseVal.appendItem(L)},enumerable:!1,configurable:!0}),n.prototype.ownsTarget=function(l){return!!R.prototype.ownsTarget.call(this,l)||!!(this.controlGrips.findGripByVisual(l)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(l))},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.state==="new"&&(this.left=l.x,this.top=l.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var K=this.unrotatePoint(l);if(this.manipulationStartX=K.x,this.manipulationStartY=K.y,this.offsetX=K.x-this.left,this.offsetY=K.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(L),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(L)){this.activeGrip=this.rotatorGrip;var N=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=N.x-this.width/2,this.top=N.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ce=this.container.transform.baseVal.getItem(0);Ce.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ce,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},n.prototype.pointerUp=function(l){var L=this.state;R.prototype.pointerUp.call(this,l),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(l),this._state="select",L==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},n.prototype.moveVisual=function(l){this.visual.style.transform="translate("+l.x+"px, "+l.y+"px)"},n.prototype.manipulate=function(l){var L=this.unrotatePoint(l);this.state==="creating"?this.resize(l):this.state==="move"?(this.left=this.manipulationStartLeft+(L.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(L.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(L):this.state==="rotate"&&this.rotate(l)},n.prototype.resize=function(l){var L=this.manipulationStartLeft,K=this.manipulationStartWidth,N=this.manipulationStartTop,Ce=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:L=this.manipulationStartLeft+l.x-this.manipulationStartX,K=this.manipulationStartWidth+this.manipulationStartLeft-L;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:K=this.manipulationStartWidth+l.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:N=this.manipulationStartTop+l.y-this.manipulationStartY,Ce=this.manipulationStartHeight+this.manipulationStartTop-N;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ce=this.manipulationStartHeight+l.y-this.manipulationStartY}K>=0?(this.left=L,this.width=K):(this.left=L+K,this.width=-K),Ce>=0?(this.top=N,this.height=Ce):(this.top=N+Ce,this.height=-Ce),this.setSize()},n.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},n.prototype.rotate=function(l){if(Math.abs(l.x-this.centerX)>.1){var L=Math.sign(l.x-this.centerX);this.rotationAngle=180*Math.atan((l.y-this.centerY)/(l.x-this.centerX))/Math.PI+90*L,this.applyRotation()}},n.prototype.applyRotation=function(){var l=this.container.transform.baseVal.getItem(0);l.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(l,0)},n.prototype.rotatePoint=function(l){if(this.rotationAngle===0)return l;var L=this.container.getCTM(),K=ge.createPoint(l.x,l.y);return{x:(K=K.matrixTransform(L)).x,y:K.y}},n.prototype.unrotatePoint=function(l){if(this.rotationAngle===0)return l;var L=this.container.getCTM();L=L.inverse();var K=ge.createPoint(l.x,l.y);return{x:(K=K.matrixTransform(L)).x,y:K.y}},n.prototype.select=function(){R.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},n.prototype.deselect=function(){R.prototype.deselect.call(this),this.controlBox.style.display="none"},n.prototype.setupControlBox=function(){this.controlBox=ge.createGroup();var l=ge.createTransform();l.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(l),this.container.appendChild(this.controlBox),this.controlRect=ge.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ge.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new i,this.addControlGrips(),this.controlBox.style.display="none"},n.prototype.adjustControlBox=function(){var l=this.controlBox.transform.baseVal.getItem(0);l.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(l,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},n.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},n.prototype.createGrip=function(){var l=new T;return l.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(l.visual),l},n.prototype.positionGrips=function(){var l=this.controlGrips.topLeft.GRIP_SIZE,L=-l/2,K=L,N=(this.width+this.CB_DISTANCE)/2-l/2,Ce=(this.height+this.CB_DISTANCE)/2-l/2,Ue=this.height+this.CB_DISTANCE-l/2,Ze=this.width+this.CB_DISTANCE-l/2;this.positionGrip(this.controlGrips.topLeft.visual,L,K),this.positionGrip(this.controlGrips.topCenter.visual,N,K),this.positionGrip(this.controlGrips.topRight.visual,Ze,K),this.positionGrip(this.controlGrips.centerLeft.visual,L,Ce),this.positionGrip(this.controlGrips.centerRight.visual,Ze,Ce),this.positionGrip(this.controlGrips.bottomLeft.visual,L,Ue),this.positionGrip(this.controlGrips.bottomCenter.visual,N,Ue),this.positionGrip(this.controlGrips.bottomRight.visual,Ze,Ue),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,N,K-3*this.CB_DISTANCE)},n.prototype.positionGrip=function(l,L,K){var N=l.transform.baseVal.getItem(0);N.setTranslate(L,K),l.transform.baseVal.replaceItem(N,0)},n.prototype.hideControlBox=function(){this.controlBox.style.display="none"},n.prototype.showControlBox=function(){this.controlBox.style.display=""},n.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:x.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:x.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},R.prototype.getState.call(this))},n.prototype.restoreState=function(l){R.prototype.restoreState.call(this,l);var L=l;this.left=L.left,this.top=L.top,this.width=L.width,this.height=L.height,this.rotationAngle=L.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(x.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,L.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(x.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,L.containerTransformMatrix))},n.prototype.scale=function(l,L){R.prototype.scale.call(this,l,L);var K=this.rotatePoint({x:this.left,y:this.top}),N=this.unrotatePoint({x:K.x*l,y:K.y*L});this.left=N.x,this.top=N.y,this.width=this.width*l,this.height=this.height*L,this.adjustControlBox()},n}(e),oe=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.fillColor="transparent",N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.opacity=1,N.setStrokeColor=N.setStrokeColor.bind(N),N.setFillColor=N.setFillColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.createVisual=N.createVisual.bind(N),N}return we(n,R),n.prototype.ownsTarget=function(l){return!(!R.prototype.ownsTarget.call(this,l)&&l!==this.visual)},n.prototype.createVisual=function(){this.visual=ge.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.state==="new"&&(this.createVisual(),this.moveVisual(l),this._state="creating")},n.prototype.manipulate=function(l){R.prototype.manipulate.call(this,l)},n.prototype.resize=function(l){R.prototype.resize.call(this,l),this.setSize()},n.prototype.setSize=function(){R.prototype.setSize.call(this),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},n.prototype.pointerUp=function(l){R.prototype.pointerUp.call(this,l),this.setSize()},n.prototype.setStrokeColor=function(l){this.strokeColor=l,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(l),this.stateChanged()},n.prototype.setFillColor=function(l){this.fillColor=l,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},n.prototype.setStrokeWidth=function(l){this.strokeWidth=l,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},n.prototype.setStrokeDasharray=function(l){this.strokeDasharray=l,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},n.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},R.prototype.getState.call(this))},n.prototype.restoreState=function(l){var L=l;this.fillColor=L.fillColor,this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.opacity=L.opacity,this.createVisual(),R.prototype.restoreState.call(this,l),this.setSize()},n.prototype.scale=function(l,L){R.prototype.scale.call(this,l,L),this.setSize()},n.title="Rectangle marker",n}(A),_e=function(R){function n(l,L,K,N){var Ce=R.call(this,l,N||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ce.widths=[],Ce.widthBoxes=[],Ce.widths=L,Ce.currentWidth=K,Ce.setCurrentWidth=Ce.setCurrentWidth.bind(Ce),Ce}return we(n,R),n.prototype.getUi=function(){var l=this,L=document.createElement("div");return L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2",this.widths.forEach(function(K){var N=document.createElement("div");N.style.display="flex",N.style.flexGrow="2",N.style.alignItems="center",N.style.justifyContent="space-between",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.borderColor=K===l.currentWidth?l.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){l.setCurrentWidth(K,N)}),L.appendChild(N);var Ce=document.createElement("div");Ce.innerText=K.toString(),Ce.style.marginRight="5px",N.appendChild(Ce);var Ue=document.createElement("div");Ue.style.minHeight="20px",Ue.style.flexGrow="2",Ue.style.display="flex",Ue.style.alignItems="center";var Ze=document.createElement("hr");Ze.style.minWidth="20px",Ze.style.border="0px",Ze.style.borderTop=K+"px solid "+l.uiStyleSettings.toolboxColor,Ze.style.flexGrow="2",Ue.appendChild(Ze),N.appendChild(Ue),l.widthBoxes.push(N)}),L},n.prototype.setCurrentWidth=function(l,L){var K=this;this.currentWidth=l,this.widthBoxes.forEach(function(N){N.style.borderColor=N===L?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},n}(Ie),He=function(R){function n(l,L,K,N){var Ce=R.call(this,l,N||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return Ce.styles=[],Ce.styleBoxes=[],Ce.styles=L,Ce.currentStyle=K,Ce.setCurrentStyle=Ce.setCurrentStyle.bind(Ce),Ce}return we(n,R),n.prototype.getUi=function(){var l=this,L=document.createElement("div");return L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2",this.styles.forEach(function(K){var N=document.createElement("div");N.style.display="flex",N.style.alignItems="center",N.style.justifyContent="space-between",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.overflow="hidden",N.style.maxWidth=100/l.styles.length-5+"%",N.style.borderColor=K===l.currentStyle?l.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){l.setCurrentStyle(K,N)}),L.appendChild(N);var Ce=document.createElement("div");Ce.style.minHeight="20px",Ce.style.flexGrow="2",Ce.style.overflow="hidden";var Ue=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+l.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(K!==""?'stroke-dasharray="'+K+'"':"")+` />
</svg>`;Ce.innerHTML=Ue,N.appendChild(Ce),l.styleBoxes.push(N)}),L},n.prototype.setCurrentStyle=function(l,L){var K=this;this.currentStyle=l,this.styleBoxes.forEach(function(N){N.style.borderColor=N===L?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},n}(Ie),Ne=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.strokeColor=K.defaultColor,N.strokeWidth=K.defaultStrokeWidth,N.strokeDasharray=K.defaultStrokeDasharray,N.strokePanel=new P("Line color",K.defaultColorSet,K.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.strokeWidthPanel=new _e("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new He("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N}return we(n,R),Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=R.prototype.getState.call(this);return l.typeName=n.typeName,l},n.typeName="FrameMarker",n.title="Frame marker",n.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',n}(oe),Be=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},$e=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.x1=0,N.y1=0,N.x2=0,N.y2=0,N.defaultLength=50,N.manipulationStartX=0,N.manipulationStartY=0,N.manipulationStartX1=0,N.manipulationStartY1=0,N.manipulationStartX2=0,N.manipulationStartY2=0,N.setupControlBox(),N}return we(n,R),n.prototype.ownsTarget=function(l){return!!R.prototype.ownsTarget.call(this,l)||!(!this.grip1.ownsTarget(l)&&!this.grip2.ownsTarget(l))},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.manipulationStartX=l.x,this.manipulationStartY=l.y,this.state==="new"&&(this.x1=l.x,this.y1=l.y,this.x2=l.x,this.y2=l.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(L)?this.activeGrip=this.grip1:this.grip2.ownsTarget(L)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},n.prototype.pointerUp=function(l){var L=this.state;R.prototype.pointerUp.call(this,l),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(l),this._state="select",L==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},n.prototype.adjustVisual=function(){},n.prototype.manipulate=function(l){this.state==="creating"?this.resize(l):this.state==="move"?(this.x1=this.manipulationStartX1+l.x-this.manipulationStartX,this.y1=this.manipulationStartY1+l.y-this.manipulationStartY,this.x2=this.manipulationStartX2+l.x-this.manipulationStartX,this.y2=this.manipulationStartY2+l.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(l)},n.prototype.resize=function(l){switch(this.activeGrip){case this.grip1:this.x1=l.x,this.y1=l.y;break;case this.grip2:case void 0:this.x2=l.x,this.y2=l.y}this.adjustVisual(),this.adjustControlBox()},n.prototype.select=function(){R.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},n.prototype.deselect=function(){R.prototype.deselect.call(this),this.controlBox.style.display="none"},n.prototype.setupControlBox=function(){this.controlBox=ge.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},n.prototype.adjustControlBox=function(){this.positionGrips()},n.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},n.prototype.createGrip=function(){var l=new T;return l.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(l.visual),l},n.prototype.positionGrips=function(){var l=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-l/2,this.y1-l/2),this.positionGrip(this.grip2.visual,this.x2-l/2,this.y2-l/2)},n.prototype.positionGrip=function(l,L,K){var N=l.transform.baseVal.getItem(0);N.setTranslate(L,K),l.transform.baseVal.replaceItem(N,0)},n.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},R.prototype.getState.call(this))},n.prototype.restoreState=function(l){R.prototype.restoreState.call(this,l);var L=l;this.x1=L.x1,this.y1=L.y1,this.x2=L.x2,this.y2=L.y2},n.prototype.scale=function(l,L){R.prototype.scale.call(this,l,L),this.x1=this.x1*l,this.y1=this.y1*L,this.x2=this.x2*l,this.y2=this.y2*L,this.adjustVisual(),this.adjustControlBox()},n}(e),tt=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.setStrokeColor=N.setStrokeColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.strokeColor=K.defaultColor,N.strokeWidth=K.defaultStrokeWidth,N.strokeDasharray=K.defaultStrokeDasharray,N.strokePanel=new P("Line color",K.defaultColorSet,K.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.strokeWidthPanel=new _e("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new He("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N}return we(n,R),n.prototype.ownsTarget=function(l){return!(!R.prototype.ownsTarget.call(this,l)&&l!==this.visual&&l!==this.selectorLine&&l!==this.visibleLine)},n.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},n.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ge.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},n.prototype.setStrokeColor=function(l){this.strokeColor=l,this.adjustVisual(),this.colorChanged(l)},n.prototype.setStrokeWidth=function(l){this.strokeWidth=l,this.adjustVisual()},n.prototype.setStrokeDasharray=function(l){this.strokeDasharray=l,this.adjustVisual(),this.stateChanged()},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},R.prototype.getState.call(this));return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){R.prototype.restoreState.call(this,l);var L=l;this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.createVisual(),this.adjustVisual()},n.typeName="LineMarker",n.title="Line marker",n.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',n}($e),Me=function(R){function n(l,L,K,N){var Ce=R.call(this,l,N||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return Ce.fonts=[],Ce.fontBoxes=[],Ce.fonts=L,Ce.currentFont=K,Ce.setCurrentFont=Ce.setCurrentFont.bind(Ce),Ce}return we(n,R),n.prototype.getUi=function(){var l=this,L=document.createElement("div");return L.style.overflow="hidden",L.style.flexGrow="2",this.fonts.forEach(function(K){var N=document.createElement("div");N.style.display="inline-block",N.style.alignItems="center",N.style.justifyContent="space-between",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.overflow="hidden",N.style.maxWidth=100/l.fonts.length-5+"%",N.style.borderColor=K===l.currentFont?l.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){l.setCurrentFont(K,N)}),L.appendChild(N);var Ce=document.createElement("div");Ce.style.display="flex",Ce.style.minHeight="20px",Ce.style.flexGrow="2",Ce.style.fontFamily=K,Ce.style.overflow="hidden";var Ue=document.createElement("div");Ue.style.whiteSpace="nowrap",Ue.style.overflow="hidden",Ue.style.textOverflow="ellipsis",Ue.innerHTML="The quick brown fox jumps over the lazy dog",Ce.appendChild(Ue),N.appendChild(Ce),l.fontBoxes.push(N)}),L},n.prototype.setCurrentFont=function(l,L){var K=this;this.currentFont=l,this.fontBoxes.forEach(function(N){N.style.borderColor=N===L?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},n}(Ie),Pe=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.color="transparent",N.padding=5,N.DEFAULT_TEXT="your text here",N.text=N.DEFAULT_TEXT,N.isMoved=!1,N.color=K.defaultColor,N.fontFamily=K.defaultFontFamily,N.defaultSize={x:100,y:30},N.setColor=N.setColor.bind(N),N.setFont=N.setFont.bind(N),N.renderText=N.renderText.bind(N),N.sizeText=N.sizeText.bind(N),N.textEditDivClicked=N.textEditDivClicked.bind(N),N.showTextEditor=N.showTextEditor.bind(N),N.setSize=N.setSize.bind(N),N.positionTextEditor=N.positionTextEditor.bind(N),N.colorPanel=new P("Color",K.defaultColorSet,K.defaultColor),N.colorPanel.onColorChanged=N.setColor,N.fontFamilyPanel=new Me("Font",K.defaultFontFamilies,K.defaultFontFamily),N.fontFamilyPanel.onFontChanged=N.setFont,N}return we(n,R),n.prototype.ownsTarget=function(l){if(R.prototype.ownsTarget.call(this,l)||l===this.visual||l===this.textElement||l===this.bgRectangle)return!0;var L=!1;return this.textElement.childNodes.forEach(function(K){K===l&&(L=!0)}),L},n.prototype.createVisual=function(){this.visual=ge.createGroup(),this.bgRectangle=ge.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ge.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.isMoved=!1,this.pointerDownPoint=l,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(l),this._state="creating")},n.prototype.renderText=function(){var l=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(L){l.textElement.appendChild(ge.createTSpan(L.trim()===""?" ":L.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},n.prototype.getTextScale=function(){var l=this.textElement.getBBox(),L=1;if(l.width>0&&l.height>0){var K=(1*this.width-this.width*this.padding*2/100)/l.width,N=(1*this.height-this.height*this.padding*2/100)/l.height;L=Math.min(K,N)}return L},n.prototype.getTextPosition=function(l){var L=this.textElement.getBBox(),K=0,N=0;return L.width>0&&L.height>0&&(K=(this.width-L.width*l)/2,N=this.height/2-L.height*l/2),{x:K,y:N}},n.prototype.sizeText=function(){var l=this.textElement.getBBox(),L=this.getTextScale(),K=this.getTextPosition(L);K.y-=l.y*L,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+K.x+"px, "+K.y+"px) scale("+L+", "+L+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(K.x,K.y),this.textElement.transform.baseVal.getItem(1).setScale(L,L))},n.prototype.manipulate=function(l){R.prototype.manipulate.call(this,l),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(l.x-this.pointerDownPoint.x)>5||Math.abs(l.y-this.pointerDownPoint.y)>5)},n.prototype.resize=function(l){R.prototype.resize.call(this,l),this.isMoved=!0,this.setSize(),this.sizeText()},n.prototype.setSize=function(){R.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},n.prototype.pointerUp=function(l){var L=this.state;L==="creating"&&(this._suppressMarkerCreateEvent=!0),R.prototype.pointerUp.call(this,l),this.setSize(),(L==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},n.prototype.showTextEditor=function(){var l=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(L){L.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var L=Number.parseFloat(l.textEditor.style.fontSize);l.textEditor.clientWidth>=Number.parseInt(l.textEditor.style.maxWidth)&&L>.9;)L-=.1,l.textEditor.style.fontSize=Math.max(L,.9)+"em"}),this.textEditor.addEventListener("keyup",function(L){L.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(L){if(L.clipboardData){var K=L.clipboardData.getData("text"),N=window.getSelection();if(!N.rangeCount)return!1;N.deleteFromDocument(),N.getRangeAt(0).insertNode(document.createTextNode(K)),L.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){l.textEditDivClicked(l.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},n.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var l=this.getTextScale(),L=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),K=this.textElement.getBBox(),N={x:K.width*l,y:K.height*l};L.x-=N.x/2,L.y-=N.y/2,this.textEditor.style.top=L.y+"px",this.textEditor.style.left=L.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-L.x+"px",this.textEditor.style.fontSize=Math.max(16*l,12)+"px",this.textElement.style.display="none"}},n.prototype.textEditDivClicked=function(l){this.text=l.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},n.prototype.select=function(){R.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},n.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),R.prototype.deselect.call(this)},n.prototype.dblClick=function(l,L){R.prototype.dblClick.call(this,l,L),this.showTextEditor()},n.prototype.setColor=function(l){this.textElement&&ge.setAttributes(this.textElement,[["fill",l]]),this.color=l,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(l)},n.prototype.setFont=function(l){this.textElement&&ge.setAttributes(this.textElement,[["font-family",l]]),this.fontFamily=l,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},n.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},n.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},R.prototype.getState.call(this));return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){var L=l;this.color=L.color,this.fontFamily=L.fontFamily,this.padding=L.padding,this.text=L.text,this.createVisual(),R.prototype.restoreState.call(this,l),this.setSize()},n.prototype.scale=function(l,L){R.prototype.scale.call(this,l,L),this.setSize(),this.sizeText(),this.positionTextEditor()},n.typeName="TextMarker",n.title="Text marker",n.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',n}(A),ke=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.color="transparent",N.lineWidth=3,N.drawing=!1,N.pixelRatio=1,N.color=K.defaultColor,N.lineWidth=K.defaultStrokeWidth,N.pixelRatio=K.freehandPixelRatio,N.setColor=N.setColor.bind(N),N.addCanvas=N.addCanvas.bind(N),N.finishCreation=N.finishCreation.bind(N),N.setLineWidth=N.setLineWidth.bind(N),N.colorPanel=new P("Color",K.defaultColorSet,K.defaultColor),N.colorPanel.onColorChanged=N.setColor,N.lineWidthPanel=new _e("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),N.lineWidthPanel.onWidthChanged=N.setLineWidth,N}return we(n,R),n.prototype.ownsTarget=function(l){return!(!R.prototype.ownsTarget.call(this,l)&&l!==this.visual&&l!==this.drawingImage)},n.prototype.createVisual=function(){this.visual=ge.createGroup(),this.drawingImage=ge.createImage(),this.visual.appendChild(this.drawingImage);var l=ge.createTransform();this.visual.transform.baseVal.appendItem(l),this.addMarkerVisualToContainer(this.visual)},n.prototype.pointerDown=function(l,L){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(l.x,l.y),this.drawing=!0):R.prototype.pointerDown.call(this,l,L)},n.prototype.manipulate=function(l){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(l.x,l.y),this.canvasContext.stroke()):R.prototype.manipulate.call(this,l)},n.prototype.resize=function(l){R.prototype.resize.call(this,l),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},n.prototype.pointerUp=function(l){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):R.prototype.pointerUp.call(this,l)},n.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},n.prototype.select=function(){this.state==="creating"&&this.finishCreation(),R.prototype.select.call(this)},n.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),R.prototype.deselect.call(this)},n.prototype.finishCreation=function(){for(var l=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),L=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],K=L[0],N=L[1],Ce=L[2],Ue=L[3],Ze=!1,at=0;at<this.canvasElement.height;at++)for(var Ye=0;Ye<this.canvasElement.width;Ye++)l.data[at*this.canvasElement.width*4+4*Ye+3]>0&&(Ze=!0,at<N&&(N=at),Ye<K&&(K=Ye),at>Ue&&(Ue=at),Ye>Ce&&(Ce=Ye));if(Ze){this.left=K/this.pixelRatio,this.top=N/this.pixelRatio,this.width=(Ce-K)/this.pixelRatio,this.height=(Ue-N)/this.pixelRatio;var dt=document.createElement("canvas");dt.width=Ce-K,dt.height=Ue-N,dt.getContext("2d").putImageData(this.canvasContext.getImageData(K,N,Ce-K,Ue-N),0,0),this.drawingImgUrl=dt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},n.prototype.setDrawingImage=function(){ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},n.prototype.setColor=function(l){this.color=l,this.colorChanged(l)},n.prototype.setLineWidth=function(l){this.lineWidth=l},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=Object.assign({drawingImgUrl:this.drawingImgUrl},R.prototype.getState.call(this));return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){this.createVisual(),R.prototype.restoreState.call(this,l),this.drawingImgUrl=l.drawingImgUrl,this.setDrawingImage()},n.prototype.scale=function(l,L){R.prototype.scale.call(this,l,L),this.setDrawingImage()},n.typeName="FreehandMarker",n.title="Freehand marker",n.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',n}(A),Re=function(R){function n(l,L,K){var N=R.call(this,l,K||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return N.typeBoxes=[],N.currentType=L,N.setCurrentType=N.setCurrentType.bind(N),N}return we(n,R),n.prototype.getUi=function(){var l=this,L=document.createElement("div");L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2";for(var K=function(Ue){var Ze="both";switch(Ue){case 0:Ze="both";break;case 1:Ze="start";break;case 2:Ze="end";break;case 3:Ze="none"}var at=document.createElement("div");if(at.style.display="flex",at.style.flexGrow="2",at.style.alignItems="center",at.style.justifyContent="space-between",at.style.padding="5px",at.style.borderWidth="2px",at.style.borderStyle="solid",at.style.borderColor=Ze===N.currentType?N.uiStyleSettings.toolboxAccentColor:"transparent",at.addEventListener("click",function(){l.setCurrentType(Ze,at)}),L.appendChild(at),Ze==="both"||Ze==="start"){var Ye=document.createElement("div");Ye.style.display="flex",Ye.style.alignItems="center",Ye.style.minHeight="20px",Ye.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(N.uiStyleSettings!==void 0?N.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ye.style.marginLeft="5px",at.appendChild(Ye)}var dt=document.createElement("div");dt.style.display="flex",dt.style.alignItems="center",dt.style.minHeight="20px",dt.style.flexGrow="2";var xt=document.createElement("hr");if(xt.style.minWidth="20px",xt.style.border="0px",xt.style.borderTop="3px solid "+(N.uiStyleSettings!==void 0?N.uiStyleSettings.toolboxColor:"#eeeeee"),xt.style.flexGrow="2",dt.appendChild(xt),at.appendChild(dt),Ze==="both"||Ze==="end"){var wt=document.createElement("div");wt.style.display="flex",wt.style.alignItems="center",wt.style.minHeight="20px",wt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(N.uiStyleSettings!==void 0?N.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,wt.style.marginRight="5px",at.appendChild(wt)}N.typeBoxes.push(at)},N=this,Ce=0;Ce<4;Ce++)K(Ce);return L},n.prototype.setCurrentType=function(l,L){var K=this;this.currentType=l,this.typeBoxes.forEach(function(N){N.style.borderColor=N===L?K.uiStyleSettings!==void 0?K.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},n}(Ie),Oe=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.arrowType="end",N.arrowBaseHeight=10,N.arrowBaseWidth=10,N.getArrowPoints=N.getArrowPoints.bind(N),N.setArrowType=N.setArrowType.bind(N),N.arrowTypePanel=new Re("Arrow type","end"),N.arrowTypePanel.onArrowTypeChanged=N.setArrowType,N}return we(n,R),n.prototype.ownsTarget=function(l){return!(!R.prototype.ownsTarget.call(this,l)&&l!==this.arrow1&&l!==this.arrow2)},n.prototype.getArrowPoints=function(l,L){var K=this.arrowBaseWidth+2*this.strokeWidth,N=this.arrowBaseHeight+2*this.strokeWidth;return l-K/2+","+(L+N/2)+" "+l+","+(L-N/2)+" "+(l+K/2)+","+(L+N/2)},n.prototype.createTips=function(){this.arrow1=ge.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ge.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow2)},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.state==="creating"&&this.createTips()},n.prototype.adjustVisual=function(){if(R.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ge.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ge.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var l=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),L=this.arrow1.transform.baseVal.getItem(0);L.setRotate(l,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(L,0);var K=this.arrow2.transform.baseVal.getItem(0);K.setRotate(l+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(K,0)}},n.prototype.setArrowType=function(l){this.arrowType=l,this.adjustVisual(),this.stateChanged()},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=Object.assign({arrowType:this.arrowType},R.prototype.getState.call(this));return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){R.prototype.restoreState.call(this,l);var L=l;this.arrowType=L.arrowType,this.createTips(),this.adjustVisual()},n.typeName="ArrowMarker",n.title="Arrow marker",n.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',n}(tt),ce=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.fillColor=K.defaultFillColor,N.strokeWidth=0,N.fillPanel=new P("Color",K.defaultColorSet,K.defaultFillColor),N.fillPanel.onColorChanged=N.setFillColor,N}return we(n,R),Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=R.prototype.getState.call(this);return l.typeName=n.typeName,l},n.typeName="CoverMarker",n.title="Cover marker",n.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',n}(oe),ve=function(R){function n(l,L,K,N){var Ce=R.call(this,l,N||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return Ce.opacities=[],Ce.opacityBoxes=[],Ce.opacities=L,Ce.currentOpacity=K,Ce.setCurrentOpacity=Ce.setCurrentOpacity.bind(Ce),Ce}return we(n,R),n.prototype.getUi=function(){var l=this,L=document.createElement("div");return L.style.display="flex",L.style.overflow="hidden",L.style.flexGrow="2",L.style.justifyContent="space-between",this.opacities.forEach(function(K){var N=document.createElement("div");N.style.display="flex",N.style.alignItems="center",N.style.justifyContent="center",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.borderColor=K===l.currentOpacity?l.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){l.setCurrentOpacity(K,N)}),L.appendChild(N);var Ce=document.createElement("div");Ce.innerText=100*K+"%",N.appendChild(Ce),l.opacityBoxes.push(N)}),L},n.prototype.setCurrentOpacity=function(l,L){var K=this;this.currentOpacity=l,this.opacityBoxes.forEach(function(N){N.style.borderColor=N===L?K.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},n}(Ie),xe=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.setOpacity=N.setOpacity.bind(N),N.fillColor=K.defaultHighlightColor,N.strokeWidth=0,N.opacity=K.defaultHighlightOpacity,N.fillPanel=new P("Color",K.defaultColorSet,N.fillColor),N.fillPanel.onColorChanged=N.setFillColor,N.opacityPanel=new ve("Opacity",K.defaultOpacitySteps,N.opacity),N.opacityPanel.onOpacityChanged=N.setOpacity,N}return we(n,R),n.prototype.setOpacity=function(l){this.opacity=l,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=R.prototype.getState.call(this);return l.typeName=n.typeName,l},n.typeName="HighlightMarker",n.title="Highlight marker",n.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',n}(ce),fe='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',De=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.bgColor="transparent",N.tipPosition={x:0,y:0},N.tipBase1Position={x:0,y:0},N.tipBase2Position={x:0,y:0},N.tipMoving=!1,N.color=K.defaultStrokeColor,N.bgColor=K.defaultFillColor,N.fontFamily=K.defaultFontFamily,N.defaultSize={x:100,y:30},N.setBgColor=N.setBgColor.bind(N),N.getTipPoints=N.getTipPoints.bind(N),N.positionTip=N.positionTip.bind(N),N.setTipPoints=N.setTipPoints.bind(N),N.colorPanel=new P("Text color",K.defaultColorSet,N.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),N.colorPanel.onColorChanged=N.setColor,N.bgColorPanel=new P("Fill color",K.defaultColorSet,N.bgColor,fe),N.bgColorPanel.onColorChanged=N.setBgColor,N.fontFamilyPanel=new Me("Font",K.defaultFontFamilies,K.defaultFontFamily),N.fontFamilyPanel.onFontChanged=N.setFont,N.tipGrip=new T,N.tipGrip.visual.transform.baseVal.appendItem(ge.createTransform()),N.controlBox.appendChild(N.tipGrip.visual),N}return we(n,R),n.prototype.ownsTarget=function(l){return R.prototype.ownsTarget.call(this,l)||this.tipGrip.ownsTarget(l)||this.tip===l},n.prototype.createTip=function(){ge.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ge.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},n.prototype.pointerDown=function(l,L){this.state==="new"&&R.prototype.pointerDown.call(this,l,L),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(L)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):R.prototype.pointerDown.call(this,l,L)},n.prototype.pointerUp=function(l){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,R.prototype.pointerUp.call(this,l);else{var L=this.state==="creating";R.prototype.pointerUp.call(this,l),this.setTipPoints(L),this.positionTip()}},n.prototype.manipulate=function(l){if(this.tipMoving){var L=this.unrotatePoint(l);this.tipPosition={x:L.x-this.manipulationStartLeft,y:L.y-this.manipulationStartTop},this.positionTip()}else R.prototype.manipulate.call(this,l)},n.prototype.setBgColor=function(l){this.bgRectangle&&this.tip&&(ge.setAttributes(this.bgRectangle,[["fill",l]]),ge.setAttributes(this.tip,[["fill",l]])),this.bgColor=l,this.fillColorChanged(l)},n.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},n.prototype.setTipPoints=function(l){l===void 0&&(l=!1);var L=Math.min(this.height/2,15),K=this.height/5;l&&(this.tipPosition={x:L+K/2,y:this.height+20});var N=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?N<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(K=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:L,y:0},this.tipBase2Position={x:L+K,y:0}):(this.tipBase1Position={x:0,y:L},this.tipBase2Position={x:0,y:L+K}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?N<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(K=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-L-K,y:0},this.tipBase2Position={x:this.width-L,y:0}):(this.tipBase1Position={x:this.width,y:L},this.tipBase2Position={x:this.width,y:L+K}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?N<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(K=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-L-K,y:this.height},this.tipBase2Position={x:this.width-L,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-L-K},this.tipBase2Position={x:this.width,y:this.height-L}):N<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(K=this.width/5,L=Math.min(this.width/2,15),this.tipBase1Position={x:L,y:this.height},this.tipBase2Position={x:L+K,y:this.height}):(this.tipBase1Position={x:0,y:this.height-L},this.tipBase2Position={x:0,y:this.height-L-K})},n.prototype.resize=function(l){R.prototype.resize.call(this,l),this.positionTip()},n.prototype.positionTip=function(){ge.setAttributes(this.tip,[["points",this.getTipPoints()]]);var l=this.tipGrip.visual.transform.baseVal.getItem(0);l.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(l,0)},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),n.prototype.select=function(){this.positionTip(),R.prototype.select.call(this)},n.prototype.getState=function(){var l=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},R.prototype.getState.call(this));return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){var L=l;this.bgColor=L.bgColor,this.tipPosition=L.tipPosition,R.prototype.restoreState.call(this,l),this.createTip(),this.setTipPoints()},n.prototype.scale=function(l,L){R.prototype.scale.call(this,l,L),this.tipPosition={x:this.tipPosition.x*l,y:this.tipPosition.y*L},this.positionTip()},n.typeName="CalloutMarker",n.title="Callout marker",n.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',n}(Pe),ze=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.fillColor="transparent",N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.opacity=1,N.strokeColor=K.defaultColor,N.strokeWidth=K.defaultStrokeWidth,N.strokeDasharray=K.defaultStrokeDasharray,N.fillColor=K.defaultFillColor,N.setStrokeColor=N.setStrokeColor.bind(N),N.setFillColor=N.setFillColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.setOpacity=N.setOpacity.bind(N),N.createVisual=N.createVisual.bind(N),N.strokePanel=new P("Line color",pe(K.defaultColorSet,["transparent"]),K.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.fillPanel=new P("Fill color",pe(K.defaultColorSet,["transparent"]),N.fillColor,fe),N.fillPanel.onColorChanged=N.setFillColor,N.strokeWidthPanel=new _e("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new He("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N.opacityPanel=new ve("Opacity",K.defaultOpacitySteps,N.opacity),N.opacityPanel.onOpacityChanged=N.setOpacity,N}return we(n,R),n.prototype.ownsTarget=function(l){return!(!R.prototype.ownsTarget.call(this,l)&&l!==this.visual)},n.prototype.createVisual=function(){this.visual=ge.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.state==="new"&&(this.createVisual(),this.moveVisual(l),this._state="creating")},n.prototype.manipulate=function(l){R.prototype.manipulate.call(this,l)},n.prototype.resize=function(l){R.prototype.resize.call(this,l),this.setSize()},n.prototype.setSize=function(){R.prototype.setSize.call(this),ge.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},n.prototype.pointerUp=function(l){R.prototype.pointerUp.call(this,l),this.setSize()},n.prototype.setStrokeColor=function(l){this.strokeColor=l,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(l),this.stateChanged()},n.prototype.setFillColor=function(l){this.fillColor=l,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(l),this.stateChanged()},n.prototype.setStrokeWidth=function(l){this.strokeWidth=l,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},n.prototype.setStrokeDasharray=function(l){this.strokeDasharray=l,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},n.prototype.setOpacity=function(l){this.opacity=l,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},R.prototype.getState.call(this));return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){var L=l;this.fillColor=L.fillColor,this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.opacity=L.opacity,this.createVisual(),R.prototype.restoreState.call(this,l),this.setSize()},n.prototype.scale=function(l,L){R.prototype.scale.call(this,l,L),this.setSize()},n.typeName="EllipseMarker",n.title="Ellipse marker",n.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',n}(A),et=function(R){function n(l,L,K){return R.call(this,l,L,K)||this}return we(n,R),Object.defineProperty(n.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),n.prototype.ownsTarget=function(l){return!(!R.prototype.ownsTarget.call(this,l)&&l!==this.tip1&&l!==this.tip2)},n.prototype.createTips=function(){this.tip1=ge.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ge.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.tip2)},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.state==="creating"&&this.createTips()},n.prototype.adjustVisual=function(){if(R.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ge.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var l=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),L=this.tip1.transform.baseVal.getItem(0);L.setRotate(l,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(L,0);var K=this.tip2.transform.baseVal.getItem(0);K.setRotate(l+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(K,0)}},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=R.prototype.getState.call(this);return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){R.prototype.restoreState.call(this,l),this.createTips(),this.adjustVisual()},n.typeName="MeasurementMarker",n.title="Measurement marker",n.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',n}(tt),mt=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.strokePanel.colors=K.defaultColorSet,N.fillColor="transparent",N}return we(n,R),Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=R.prototype.getState.call(this);return l.typeName=n.typeName,l},n.typeName="EllipseFrameMarker",n.title="Ellipse frame marker",n.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',n}(ze),_t=function(){function R(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(R.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),R.prototype.addUndoStep=function(n){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(n)||(this.undoStack.push(n),JSON.stringify(this.lastRedoStep)!==JSON.stringify(n)&&this.redoStack.splice(0,this.redoStack.length))},R.prototype.replaceLastUndoStep=function(n){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=n)},R.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},R.prototype.undo=function(){if(this.undoStack.length>1){var n=this.undoStack.pop();return n!==void 0&&this.redoStack.push(n),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},R.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},R}(),vt=function(R){function n(l,L,K){var N=R.call(this,l,L,K)||this;return N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.curveX=0,N.curveY=0,N.manipulationStartCurveX=0,N.manipulationStartCurveY=0,N.setStrokeColor=N.setStrokeColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.positionGrips=N.positionGrips.bind(N),N.addControlGrips=N.addControlGrips.bind(N),N.adjustVisual=N.adjustVisual.bind(N),N.setupControlBox=N.setupControlBox.bind(N),N.resize=N.resize.bind(N),N.strokeColor=K.defaultColor,N.strokeWidth=K.defaultStrokeWidth,N.strokeDasharray=K.defaultStrokeDasharray,N.strokePanel=new P("Line color",K.defaultColorSet,K.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.strokeWidthPanel=new _e("Line width",K.defaultStrokeWidths,K.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new He("Line style",K.defaultStrokeDasharrays,K.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N}return we(n,R),n.prototype.ownsTarget=function(l){return!(!R.prototype.ownsTarget.call(this,l)&&l!==this.visual&&l!==this.selectorCurve&&l!==this.visibleCurve&&!this.curveGrip.ownsTarget(l))},n.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},n.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorCurve=ge.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ge.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},n.prototype.pointerDown=function(l,L){R.prototype.pointerDown.call(this,l,L),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=l.x,this.curveY=l.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(L)&&(this.activeGrip=this.curveGrip,this._state="resize")},n.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ge.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},n.prototype.setupControlBox=function(){R.prototype.setupControlBox.call(this),this.curveControlLine1=ge.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ge.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},n.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,R.prototype.addControlGrips.call(this)},n.prototype.positionGrips=function(){R.prototype.positionGrips.call(this);var l=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-l/2,this.curveY-l/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},n.prototype.manipulate=function(l){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+l.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+l.y-this.manipulationStartY),R.prototype.manipulate.call(this,l)},n.prototype.resize=function(l){this.activeGrip===this.curveGrip&&(this.curveX=l.x,this.curveY=l.y),R.prototype.resize.call(this,l),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},n.prototype.setStrokeColor=function(l){this.strokeColor=l,this.adjustVisual(),this.colorChanged(l)},n.prototype.setStrokeWidth=function(l){this.strokeWidth=l,this.adjustVisual()},n.prototype.setStrokeDasharray=function(l){this.strokeDasharray=l,this.adjustVisual()},n.prototype.scale=function(l,L){this.curveX=this.curveX*l,this.curveY=this.curveY*L,R.prototype.scale.call(this,l,L)},Object.defineProperty(n.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),n.prototype.getState=function(){var l=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},R.prototype.getState.call(this));return l.typeName=n.typeName,l},n.prototype.restoreState=function(l){R.prototype.restoreState.call(this,l);var L=l;this.strokeColor=L.strokeColor,this.strokeWidth=L.strokeWidth,this.strokeDasharray=L.strokeDasharray,this.curveX=L.curveX,this.curveY=L.curveY,this.createVisual(),this.adjustVisual()},n.typeName="CurveMarker",n.title="Curve marker",n.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',n}($e),pt=function(){function R(n,l){l===void 0&&(l=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=n,this.cancelable=l}return Object.defineProperty(R.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),R.prototype.preventDefault=function(){this._defaultPrevented=!0},R}(),Je=function(R){function n(l,L,K){var N=R.call(this,l,!1)||this;return N.dataUrl=L,N.state=K,N}return we(n,R),n}(pt),Xe=function(R){function n(l,L,K){K===void 0&&(K=!1);var N=R.call(this,l,K)||this;return N.marker=L,N}return we(n,R),n}(pt),ot=function(){function R(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return R.prototype.addEventListener=function(n,l){this[n].push(l)},R.prototype.removeEventListener=function(n,l){var L=this[n].indexOf(l);L>-1&&this[n].splice(L,1)},R}(),rt=function(){function R(n){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Be,this._isOpen=!1,this.undoRedoManager=new _t,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new ot,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=R.instanceCounter++,this.styles=new be(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=n,this.targetRoot=document.body,this.width=n.clientWidth,this.height=n.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(R.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ne,ke,Oe,Pe,mt,ze,xe,De,et,ce,tt,vt]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ne,ke,Oe,Pe,ze,xe,De]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ne,ke,Oe,Pe,xe]},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(n){var l=this;this._availableMarkerTypes.splice(0),n.forEach(function(L){if(typeof L=="string"){var K=l.ALL_MARKER_TYPES.find(function(N){return N.typeName===L});K!==void 0&&l._availableMarkerTypes.push(K)}else l._availableMarkerTypes.push(L)})},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(n){this._zoomLevel=n,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),R.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),se.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},R.prototype.show=function(){var n=this;this.styles.styleSheetRoot===void 0&&Z.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Z.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(l){return l(new pt(n))})},R.prototype.render=function(){return he(this,void 0,void 0,function(){var n;return Ae(this,function(l){switch(l.label){case 0:return this.setCurrentMarker(),(n=new ie).naturalSize=this.renderAtNaturalSize,n.imageType=this.renderImageType,n.imageQuality=this.renderImageQuality,n.markersOnly=this.renderMarkersOnly,n.width=this.renderWidth,n.height=this.renderHeight,[4,n.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return l.sent(),[4,n.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,l.sent()]}})})},R.prototype.close=function(n){var l=this;if(n===void 0&&(n=!1),this.isOpen){var L=!1;n||this.eventListeners.beforeclose.forEach(function(K){var N=new pt(l,!0);K(N),N.defaultPrevented&&(L=!0)}),L||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(K){return K(new pt(l))}),this.detachEvents(),this._isOpen=!1)}},R.prototype.addMarkersToToolbar=function(){for(var n,l=[],L=0;L<arguments.length;L++)l[L]=arguments[L];(n=this._availableMarkerTypes).push.apply(n,l)},R.prototype.addRenderEventListener=function(n){this.addEventListener("render",function(l){n(l.dataUrl,l.state)})},R.prototype.removeRenderEventListener=function(n){},R.prototype.addCloseEventListener=function(n){this.addEventListener("close",function(){n()})},R.prototype.removeCloseEventListener=function(n){},R.prototype.setupResizeObserver=function(){var n=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){n.resize(n.target.clientWidth,n.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return n.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},R.prototype.onPopupTargetResize=function(){var n=1*this.target.clientWidth/this.target.clientHeight,l=this.editorCanvas.clientWidth/n>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*n:this.editorCanvas.clientWidth,L=l<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/n;this.resize(l,L)},R.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},R.prototype.resize=function(n,l){this._isResizing=!0;var L=n/this.imageWidth,K=l/this.imageHeight;this.imageWidth=Math.round(n),this.imageHeight=Math.round(l),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(L,K),this._isResizing=!1},R.prototype.scaleMarkers=function(n,l){var L,K=this;this._currentMarker&&this._currentMarker instanceof Pe?this._currentMarker.scale(n,l):(L=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(N){N!==K._currentMarker&&N.scale(n,l)}),L!==void 0&&this.setCurrentMarker(L)},R.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},R.prototype.setTopLeft=function(){var n=this.editingTarget.getBoundingClientRect(),l=this.editorCanvas.getBoundingClientRect();this.left=n.left-l.left,this.top=n.top-l.top},R.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},R.prototype.addDefs=function(){for(var n,l=[],L=0;L<arguments.length;L++)l[L]=arguments[L];this.defs=ge.createDefs(),this.addDefsToImage(),(n=this.defs).append.apply(n,l)},R.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},R.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},R.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},R.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},R.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},R.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},R.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},R.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var n=document.createElement("a");n.href="https://markerjs.com/",n.target="_blank",n.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',n.title="Powered by marker.js",n.style.display="grid",n.style.alignItems="center",n.style.justifyItems="center",n.style.padding="3px",n.style.width="20px",n.style.height="20px",this.logoUI.appendChild(n),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},R.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},R.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},R.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},R.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var n=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=n+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Ee(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Se(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},R.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},R.prototype.removeMarker=function(n){this.markerImage.removeChild(n.container),this.markers.indexOf(n)>-1&&this.markers.splice(this.markers.indexOf(n),1),n.dispose()},R.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},R.prototype.toolbarButtonClicked=function(n,l){if(n==="marker"&&l!==void 0)this.createNewMarker(l);else if(n==="action")switch(l){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},R.prototype.deleteSelectedMarker=function(){var n=this;if(this._currentMarker!==void 0){var l=!1;if(this.eventListeners.markerbeforedelete.forEach(function(K){var N=new Xe(n,n._currentMarker,!0);K(N),N.defaultPrevented&&(l=!0)}),!l){var L=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(K){return K(new Xe(n,L))})}}},R.prototype.clear=function(){var n=this,l=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ce){var Ue=new Xe(n,void 0,!0);Ce(Ue),Ue.defaultPrevented&&(l=!0)}),!l)){this.setCurrentMarker();for(var L=function(Ce){var Ue=K.markers[Ce];K.setCurrentMarker(K.markers[Ce]),K._currentMarker.dispose(),K.markerImage.removeChild(K._currentMarker.container),K.markers.splice(K.markers.indexOf(K._currentMarker),1),K.eventListeners.markerdelete.forEach(function(Ze){return Ze(new Xe(n,Ue))})},K=this,N=this.markers.length-1;N>=0;N--)L(N);this.addUndoStep()}},Object.defineProperty(R.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),R.prototype.showNotesEditor=function(){var n;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(n=this._currentMarker.notes)!==null&&n!==void 0?n:"",this.overlayContainer.appendChild(this.notesArea))},R.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},R.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},R.prototype.addUndoStep=function(){var n=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var l=this.getState(),L=this.undoRedoManager.getLastUndoStep();if(!L||L.width===l.width&&L.height===l.height){var K=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(l),K<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(N){return N(new pt(n))})}else this.undoRedoManager.replaceLastUndoStep(l),this.eventListeners.statechange.forEach(function(N){return N(new pt(n))})}},R.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},R.prototype.undoStep=function(){var n=this,l=this.undoRedoManager.undo();l!==void 0&&(this.restoreState(l),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(L){return L(new pt(n))}))},R.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},R.prototype.redoStep=function(){var n=this,l=this.undoRedoManager.redo();l!==void 0&&(this.restoreState(l),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(L){return L(new pt(n))}))},R.prototype.stepZoom=function(){var n=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=n<this.zoomSteps.length-1?this.zoomSteps[n+1]:this.zoomSteps[0]},R.prototype.panTo=function(n){this.contentDiv.scrollBy({left:this.prevPanPoint.x-n.x,top:this.prevPanPoint.y-n.y}),this.prevPanPoint=n},R.prototype.startRenderAndClose=function(){return he(this,void 0,void 0,function(){var n,l,L=this;return Ae(this,function(K){switch(K.label){case 0:return[4,this.render()];case 1:return n=K.sent(),l=this.getState(),this.eventListeners.render.forEach(function(N){return N(new Je(L,n,l))}),this.close(!0),[2]}})})},R.prototype.getState=function(n){n===!0&&this.setCurrentMarker();var l={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(L){return l.markers.push(L.getState())}),l},R.prototype.restoreState=function(n){var l=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);n.markers.forEach(function(L){var K=l._availableMarkerTypes.find(function(Ce){return Ce.typeName===L.typeName});if(K!==void 0){var N=l.addNewMarker(K);N.restoreState(L),l.markers.push(N)}}),n.width&&n.height&&(n.width!==this.imageWidth||n.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/n.width,this.imageHeight/n.height),this.eventListeners.restorestate.forEach(function(L){return L(new pt(l))})},R.prototype.addNewMarker=function(n){var l=ge.createGroup();return this.markerImage.appendChild(l),new n(l,this.overlayContainer,this.settings)},R.prototype.createNewMarker=function(n){var l,L=this;(l=typeof n=="string"?this._availableMarkerTypes.find(function(K){return K.typeName===n}):n)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(l),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(l.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(K){return K(new Xe(L,L._currentMarker))}))},R.prototype.markerCreated=function(n){var l=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(n),this.setCurrentMarker(n),n instanceof ke&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ke):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(L){return L(new Xe(l,l._currentMarker))})},R.prototype.colorChanged=function(n){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=n,this.settings.defaultStrokeColor=n)},R.prototype.fillColorChanged=function(n){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=n)},R.prototype.markerStateChanged=function(n){var l=this;this.eventListeners.markerchange.forEach(function(L){return L(new Xe(l,n))})},R.prototype.setCurrentMarker=function(n){var l=this;this._currentMarker!==n&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(L){return L(new Xe(l,l._currentMarker))})),this._currentMarker=n,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(L){return L(new Xe(l,l._currentMarker))}))},R.prototype.onPointerDown=function(n){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||n.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var l=this.markers.find(function(L){return L.ownsTarget(n.target)});l!==void 0?(this.setCurrentMarker(l),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(n.clientX,n.clientY),n.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:n.clientX,y:n.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(n.clientX,n.clientY))},R.prototype.onDblClick=function(n){if(this._isFocused||this.focus(),this.mode==="select"){var l=this.markers.find(function(L){return L.ownsTarget(n.target)});l!==void 0&&l!==this._currentMarker&&this.setCurrentMarker(l),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(n.clientX,n.clientY),n.target):this.setCurrentMarker()}},R.prototype.onPointerMove=function(n){this.touchPoints!==1&&n.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||n.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(n.clientX,n.clientY)):this.zoomLevel>1&&this.panTo({x:n.clientX,y:n.clientY}))},R.prototype.onPointerUp=function(n){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(n.clientX,n.clientY)),this.isDragging=!1,this.addUndoStep()},R.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},R.prototype.onKeyUp=function(n){this._currentMarker===void 0||this.notesArea!==void 0||n.key!=="Delete"&&n.key!=="Backspace"||this.deleteSelectedMarker()},R.prototype.clientToLocalCoordinates=function(n,l){var L=this.markerImage.getBoundingClientRect();return{x:(n-L.left)/this.zoomLevel,y:(l-L.top)/this.zoomLevel}},R.prototype.onWindowResize=function(){this.positionUI()},R.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var n=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=n+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},R.prototype.addLicenseKey=function(n){se.addKey(n)},R.prototype.addEventListener=function(n,l){this.eventListeners.addEventListener(n,l)},R.prototype.removeEventListener=function(n,l){this.eventListeners.removeEventListener(n,l)},R.prototype.renderState=function(n){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(n),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(R.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),R.prototype.focus=function(){var n=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(l){return l(new pt(n))}))},R.prototype.blur=function(){var n=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(l){return l(new pt(n))}))},R.instanceCounter=0,R}();/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ft=function(R,n){return(ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,L){l.__proto__=L}||function(l,L){for(var K in L)Object.prototype.hasOwnProperty.call(L,K)&&(l[K]=L[K])})(R,n)};function gt(R,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function l(){this.constructor=R}ft(R,n),R.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}function ct(R,n,l,L){return new(l||(l=Promise))(function(K,N){function Ce(at){try{Ze(L.next(at))}catch(Ye){N(Ye)}}function Ue(at){try{Ze(L.throw(at))}catch(Ye){N(Ye)}}function Ze(at){var Ye;at.done?K(at.value):(Ye=at.value,Ye instanceof l?Ye:new l(function(dt){dt(Ye)})).then(Ce,Ue)}Ze((L=L.apply(R,n||[])).next())})}function yt(R,n){var l,L,K,N,Ce={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return N={next:Ue(0),throw:Ue(1),return:Ue(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function Ue(Ze){return function(at){return function(Ye){if(l)throw new TypeError("Generator is already executing.");for(;Ce;)try{if(l=1,L&&(K=2&Ye[0]?L.return:Ye[0]?L.throw||((K=L.return)&&K.call(L),0):L.next)&&!(K=K.call(L,Ye[1])).done)return K;switch(L=0,K&&(Ye=[2&Ye[0],K.value]),Ye[0]){case 0:case 1:K=Ye;break;case 4:return Ce.label++,{value:Ye[1],done:!1};case 5:Ce.label++,L=Ye[1],Ye=[0];continue;case 7:Ye=Ce.ops.pop(),Ce.trys.pop();continue;default:if(!(K=Ce.trys,(K=K.length>0&&K[K.length-1])||Ye[0]!==6&&Ye[0]!==2)){Ce=0;continue}if(Ye[0]===3&&(!K||Ye[1]>K[0]&&Ye[1]<K[3])){Ce.label=Ye[1];break}if(Ye[0]===6&&Ce.label<K[1]){Ce.label=K[1],K=Ye;break}if(K&&Ce.label<K[2]){Ce.label=K[2],Ce.ops.push(Ye);break}K[2]&&Ce.ops.pop(),Ce.trys.pop();continue}Ye=n.call(R,Ce)}catch(dt){Ye=[6,dt],L=0}finally{l=K=0}if(5&Ye[0])throw Ye[1];return{value:Ye[0]?Ye[1]:void 0,done:!0}}([Ze,at])}}}var Ct=function(){function R(){}return R.addKey=function(n){R.key=n},Object.defineProperty(R,"isLicensed",{get:function(){return!!R.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(R.key)},enumerable:!1,configurable:!0}),R}(),nt=function(){function R(){}return R.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},R.setAttributes=function(n,l){for(var L=0,K=l;L<K.length;L++){var N=K[L],Ce=N[0],Ue=N[1];n.setAttribute(Ce,Ue)}},R.createRect=function(n,l,L){var K=document.createElementNS("http://www.w3.org/2000/svg","rect");return K.setAttribute("width",n.toString()),K.setAttribute("height",l.toString()),L&&R.setAttributes(K,L),K},R.createLine=function(n,l,L,K,N){var Ce=document.createElementNS("http://www.w3.org/2000/svg","line");return Ce.setAttribute("x1",n.toString()),Ce.setAttribute("y1",l.toString()),Ce.setAttribute("x2",L.toString()),Ce.setAttribute("y2",K.toString()),N&&R.setAttributes(Ce,N),Ce},R.createPolygon=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","polygon");return L.setAttribute("points",n),l&&R.setAttributes(L,l),L},R.createCircle=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","circle");return L.setAttribute("cx",(n/2).toString()),L.setAttribute("cy",(n/2).toString()),L.setAttribute("r",n.toString()),l&&R.setAttributes(L,l),L},R.createEllipse=function(n,l,L){var K=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return K.setAttribute("cx",(n/2).toString()),K.setAttribute("cy",(l/2).toString()),K.setAttribute("rx",(n/2).toString()),K.setAttribute("ry",(l/2).toString()),L&&R.setAttributes(K,L),K},R.createGroup=function(n){var l=document.createElementNS("http://www.w3.org/2000/svg","g");return n&&R.setAttributes(l,n),l},R.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},R.createMarker=function(n,l,L,K,N,Ce,Ue){var Ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return R.setAttributes(Ze,[["id",n],["orient",l],["markerWidth",L.toString()],["markerHeight",K.toString()],["refX",N.toString()],["refY",Ce.toString()]]),Ze.appendChild(Ue),Ze},R.createText=function(n){var l=document.createElementNS("http://www.w3.org/2000/svg","text");return l.setAttribute("x","0"),l.setAttribute("y","0"),n&&R.setAttributes(l,n),l},R.createTSpan=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","tspan");return L.textContent=n,l&&R.setAttributes(L,l),L},R.createImage=function(n){var l=document.createElementNS("http://www.w3.org/2000/svg","image");return n&&R.setAttributes(l,n),l},R.createPoint=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return L.x=n,L.y=l,L},R.createPath=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg","path");return L.setAttribute("d",n),l&&R.setAttributes(L,l),L},R.createElement=function(n,l){var L=document.createElementNS("http://www.w3.org/2000/svg",n);return l&&R.setAttributes(L,l),L},R.getHollowRectanglePath=function(n,l,L,K,N,Ce,Ue,Ze){return"M"+n+","+l+"V"+(l+K)+"H"+(n+L)+"V"+l+"H"+N+"V"+Ce+"H"+(N+Ue)+"V"+(Ce+Ze)+"H"+N+"V"+l+"Z"},R}(),At=function(){function R(n){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+n+"_"}return Object.defineProperty(R.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),R.prototype.addClass=function(n){return this.styleSheet===void 0&&this.addStyleSheet(),n.name=""+this.classNamePrefix+n.localName,this.classes.push(n),this.styleSheet.sheet.insertRule("."+n.name+" {"+n.style+"}",this.styleSheet.sheet.cssRules.length),n},R.prototype.addRule=function(n){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(n),this.styleSheet.sheet.insertRule(n.selector+" {"+n.style+"}",this.styleSheet.sheet.cssRules.length)},R.prototype.addStyleSheet=function(){var n;this.styleSheet=document.createElement("style"),((n=this.styleSheetRoot)!==null&&n!==void 0?n:document.head).appendChild(this.styleSheet),this.addRule(new kt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new kt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new kt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new bt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new bt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},R.prototype.removeStyleSheet=function(){var n;this.styleSheet&&(((n=this.styleSheetRoot)!==null&&n!==void 0?n:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},R}(),kt=function(R,n){this.selector=R,this.style=n},bt=function(R,n){this.localName=R,this.style=n},Rt=function(){function R(){this.blocks=[],this.display=""}return R.prototype.addButtonBlock=function(n){n.className=this.blockClassName,n.buttonClassName=this.buttonClassName,n.buttonColorsClassName=this.buttonColorsClassName,n.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(n)},R.prototype.addElementBlock=function(n){n.className===void 0&&(n.className=this.blockClassName),this.blocks.push(n)},R.prototype.getUI=function(){var n=document.createElement("div");return n.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,n.style.display=this.display,this.blocks.forEach(function(l){return n.appendChild(l.getUI())}),n},R}(),de=function(){function R(){}return R.prototype.getUI=function(){var n=document.createElement("div");if(n.className=this.className,this.minWidth!==void 0&&(n.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":n.style.justifyContent="flex-start";break;case"center":n.style.justifyContent="center";break;case"end":n.style.justifyContent="flex-end"}return n.style.whiteSpace="nowrap",n},R}(),Q=function(R){function n(){var l=R!==null&&R.apply(this,arguments)||this;return l.buttons=[],l}return gt(n,R),n.prototype.addButton=function(l){l.className=this.buttonClassName,l.colorsClassName=this.buttonColorsClassName,l.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(l)},n.prototype.getUI=function(){var l=R.prototype.getUI.call(this);return this.buttons.forEach(function(L){return l.appendChild(L.getUI())}),l},n}(de),v=function(){function R(n,l){this._isActive=!1,this._isHidden=!1,this._icon=n,this.title=l,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(R.prototype,"icon",{get:function(){return this._icon},set:function(n){this._icon=n,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isActive",{get:function(){return this._isActive},set:function(n){this._isActive=n,this.adjustClassName()},enumerable:!1,configurable:!0}),R.prototype.getUI=function(){var n=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return n.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},R.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},R.prototype.hide=function(){this._isHidden=!0},R}(),D=function(R){function n(){var l=R!==null&&R.apply(this,arguments)||this;return l.elements=[],l}return gt(n,R),n.prototype.addElement=function(l){this.elements.push(l)},n.prototype.getUI=function(){var l=R.prototype.getUI.call(this);return this.elements.forEach(function(L){return l.appendChild(L)}),l},n}(de),j=function(){function R(n,l){this.horizontal=n,this.vertical=l}return Object.defineProperty(R.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),R.prototype.getVerticalLength=function(n){return n/this.ratio},R.prototype.getHorizontalLength=function(n){return n*this.ratio},R}(),G=function(){function R(){}return R.getIcon=function(n,l){if(n>0&&l>0){var L=new j(n,l),K=L.ratio>=1?20:L.getHorizontalLength(20),N=L.ratio<1?20:L.getVerticalLength(20),Ce=document.createElementNS("http://www.w3.org/2000/svg","svg");Ce.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ce.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ce);var Ue=nt.createDefs();Ce.appendChild(Ue);var Ze=nt.createElement("clipPath",[["id","text-bg-clip"]]);Ue.appendChild(Ze);var at=nt.createPath(nt.getHollowRectanglePath((24-K)/2,(24-N)/2,K,N,(24-K)/2+2,(24-N)/2+2,K-4,N-4));Ce.appendChild(at);var Ye=nt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ye.appendChild(nt.createTSpan(n+":"+l)),Ce.appendChild(Ye);var dt=Ye.getBBox();nt.setAttributes(Ye,[["x",((24-dt.width)/2).toString()],["y",((24-dt.height)/2-dt.y).toString()]]);var xt=nt.createPath(nt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(dt.width))/2,(24-Math.ceil(dt.height))/2,Math.ceil(dt.width),Math.ceil(dt.height)));return Ze.appendChild(xt),nt.setAttributes(at,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ce),Ce.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},R}(),le=function(R){function n(l,L,K){var N=R.call(this,l,L)||this;return N.isDropdownOpen=!1,N.onClick=N.dropdownButtonClicked,N.dropdownButtons=K,N}return gt(n,R),n.prototype.setupDropdown=function(){var l=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(L){L.className=l.className,L.colorsClassName=l.colorsClassName,l.dropdownBlock.appendChild(L.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},n.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},n.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},n.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},n.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},n.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},n}(v),Te=function(){function R(n,l){this.GRIP_SIZE=10,this.color=n,this.fillColor=l,this.visual=nt.createGroup(),this.visual.appendChild(nt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(nt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return R.prototype.ownsTarget=function(n){return n===this.visual||n===this.visual.childNodes[0]||n===this.visual.childNodes[1]},R.prototype.setCenter=function(n,l){this.visual.childNodes.forEach(function(L){return nt.setAttributes(L,[["cx",n.toString()],["cy",l.toString()]])})},R}(),Le=function(){function R(n,l,L,K){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=n,this.canvasHeight=l,this.margin=L,this.container=K,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(R.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(n){this._aspectRatio=n,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(n){this._isGridVisible=n,this.gridContainer&&nt.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(n){this._zoomFactor=n,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),R.prototype.open=function(){var n=this;this.cropShadeElement=nt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=nt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var l=0;l<this.numberOfGridLines;l++)this.horizontalGridLines.push(nt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(nt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(L){return n.gridContainer.appendChild(L)}),this.verticalGridLines.forEach(function(L){return n.gridContainer.appendChild(L)}),this.cropRectElement=nt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Te(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Te(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Te(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Te(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},R.prototype.setCropRectangle=function(n){this.cropRect=n;var l=Object.assign({},this.cropRect);this.zoomFactor!==1&&(l.width=this.cropRect.width*this.zoomFactor,l.height=this.cropRect.height*this.zoomFactor,l.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-l.width/2,l.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-l.height/2),nt.setAttributes(this.cropRectElement,[["x",l.x.toString()],["y",l.y.toString()],["width",l.width.toString()],["height",l.height.toString()]]);var L=l.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(N,Ce){var Ue=l.y+L*(Ce+1);nt.setAttributes(N,[["x1",""+l.x],["y1",""+Ue],["x2",""+(l.x+l.width)],["y2",""+Ue]])});var K=l.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(N,Ce){var Ue=l.x+K*(Ce+1);nt.setAttributes(N,[["x1",""+Ue],["y1",""+l.y],["x2",""+Ue],["y2",""+(l.y+l.height)]])}),nt.setAttributes(this.cropShadeElement,[["d",nt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,l.x,l.y,l.width,l.height)]]),this.topLeftGrip.setCenter(l.x,l.y),this.topRightGrip.setCenter(l.x+l.width,l.y),this.bottomLeftGrip.setCenter(l.x,l.y+l.height),this.bottomRightGrip.setCenter(l.x+l.width,l.y+l.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},R.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},R.prototype.clientToLocalCoordinates=function(n,l){var L=this.container.getBoundingClientRect();return{x:n-L.left+this.margin,y:l-L.top+this.margin}},R.prototype.onPointerDown=function(n){this.container.setPointerCapture(n.pointerId),this.previousPoint=this.clientToLocalCoordinates(n.clientX,n.clientY),this.cropRectElement===n.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(n.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(n.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(n.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(n.target)&&(this.activeGrip=this.bottomRightGrip)},R.prototype.onPointerMove=function(n){if(this.isMoving)this.move(this.clientToLocalCoordinates(n.clientX,n.clientY));else if(this.activeGrip){var l=this.clientToLocalCoordinates(n.clientX,n.clientY);this.resize(l)}n.preventDefault()},R.prototype.onPointerUp=function(n){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(n.pointerId)},R.prototype.move=function(n){var l=n.x-this.previousPoint.x,L=n.y-this.previousPoint.y;this.zoomFactor!==1&&(l=-l/this.zoomFactor,L=-L/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+l),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+L),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=n},R.prototype.resize=function(n){var l=Object.assign({},this.cropRect),L=n.x-this.previousPoint.x,K=n.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:l.x+L<this.margin&&(L=this.margin-l.x),l.x+=L,l.width=this.cropRect.x+this.cropRect.width-l.x;break;case this.bottomRightGrip:case this.topRightGrip:l.width+L>this.canvasWidth*this.zoomFactor&&(L=this.canvasWidth*this.zoomFactor-l.width),l.width+=L}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(l.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(L),l.height=this.aspectRatio.getVerticalLength(l.width)):(l.y+=K,l.height=this.cropRect.y+this.cropRect.height-l.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?l.height=this.aspectRatio.getVerticalLength(l.width):l.height+=K}l.width<10&&(l.x=this.cropRect.x,l.width=10),l.height<10&&(l.y=this.cropRect.y,l.height=10),this.previousPoint=n,l.x>=this.margin&&l.y>=this.margin&&l.x-this.margin+l.width<=this.canvasWidth&&l.y-this.margin+l.height<=this.canvasHeight&&(this.cropRect=l,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},R.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var n=this.cropRect.x+this.cropRect.width/2,l=this.cropRect.y+this.cropRect.height/2,L=this.aspectRatio.getHorizontalLength(this.cropRect.height),K=this.aspectRatio.getVerticalLength(this.cropRect.width);L/this.canvasWidth<K/this.canvasHeight?this.cropRect.width=L:this.cropRect.height=K,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=n-this.cropRect.width/2,this.cropRect.y=l-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},R.prototype.getRescaledRect=function(n,l,L,K,N,Ce){var Ue=L/n,Ze=K/l;return{x:(N.x-Ce)*Ue+Ce,y:(N.y-Ce)*Ze+Ce,width:N.width*Ue,height:N.height*Ze}},R.prototype.scaleCanvas=function(n,l){var L=this.getRescaledRect(this.canvasWidth,this.canvasHeight,n,l,this.cropRect,this.margin);this.canvasWidth=n,this.canvasHeight=l,this.onCropChange&&this.onCropChange(L),this.setCropRectangle(L)},R}(),qe=function(){function R(n){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=n,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(R.prototype,"angle",{get:function(){return this._angle},set:function(n){this._angle=n,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),R.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},R.prototype.onPointerDown=function(n){this.controlContainer.setPointerCapture(n.pointerId),this.isDragging=!0,this.previousPoint={x:n.clientX,y:n.clientY}},R.prototype.onPointerMove=function(n){this.isDragging&&(this.onAngleChange&&this.onAngleChange((n.clientX-this.previousPoint.x)/5),this.previousPoint.x=n.clientX)},R.prototype.onPointerUp=function(n){this.isDragging&&this.onAngleChange&&this.onAngleChange((n.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(n.pointerId)},R.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var n=this.angleLabelText.getBBox();nt.setAttributes(this.angleLabelElement,[["x",((this.width-n.width)/2).toString()],["y",(this.height/2).toString()]])}},R.prototype.positionScaleShape=function(){if(this.scaleShape){var n=this.scaleShape.transform.baseVal.getItem(0);n.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(n,0)}},R.prototype.getVisual=function(){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("width",this.width+"px"),n.setAttribute("height",this.height+"px"),n.setAttribute("viewBox","0 0 "+this.width+" "+this.height),n.style.flexShrink="0",document.body.appendChild(n);for(var l="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,L=1;L<=this.width/5+10;L++){var K=L%5==0?this.height/3:this.height/6;l+="h4v"+-K+"h1v"+K}l+="v1H0Z",this.scaleShape=nt.createPath(l);var N=nt.createTransform();this.scaleShape.transform.baseVal.appendItem(N),n.appendChild(this.scaleShape),this.angleLabelElement=nt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=nt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ce=nt.createTSpan("");return Ce.innerHTML="&deg;",this.angleLabelElement.appendChild(Ce),n.appendChild(this.angleLabelElement),document.body.removeChild(n),n},R}(),Ke=function(){function R(){this.naturalSize=!1,this.imageType="image/png"}return R.prototype.rasterize=function(n,l,L,K,N,Ce,Ue){var Ze=this;return new Promise(function(at){var Ye=document.createElement("canvas");Ye.width=n.width.baseVal.value-2*K,Ye.height=n.height.baseVal.value-2*K;var dt=1,xt=1;Ze.naturalSize===!0?(dt=l.naturalWidth/(n.width.baseVal.value-2*K)/Ce,xt=l.naturalHeight/(n.height.baseVal.value-2*K)/Ue,Ye.width=l.naturalWidth/Ce,Ye.height=l.naturalHeight/Ue):Ze.width!==void 0&&Ze.height!==void 0&&(dt=Ze.width/L.width,xt=Ze.height/L.height,Ye.width*=dt,Ye.height*=xt);var wt=Ye.getContext("2d");wt.translate(Ye.width/2,Ye.height/2),wt.rotate(N*Math.PI/180),wt.scale(Ce,Ue),wt.translate(-Ye.width/2,-Ye.height/2),wt.drawImage(l,0,0,Ye.width,Ye.height);var Nt=document.createElement("canvas");Nt.width=L.width*dt,Nt.height=L.height*xt,Nt.getContext("2d").putImageData(wt.getImageData((L.x-K)*dt,(L.y-K)*xt,L.width*dt,L.height*xt),0,0),at(Nt.toDataURL(Ze.imageType,Ze.imageQuality))})},R}(),Ge=function(){function R(n){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=R.instanceCounter++,this.styles=new At(this.instanceNo),this.target=n,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(R.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(n){this._zoomToCropEnabled=n,n?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(n){this._isGridVisible=n,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"gridLines",{get:function(){return this._gridLines},set:function(n){this._gridLines=n,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(n){this._rotationAngle=n,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"aspectRatio",{get:function(){var n;return(n=this._aspectRatio)!==null&&n!==void 0?n:this.aspectRatios[0]},set:function(n){this._aspectRatio=n},enumerable:!1,configurable:!0}),R.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},R.prototype.show=function(){this.showUI(),this.open()},R.prototype.close=function(n){n===void 0&&(n=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),n||this.closeEventListeners.forEach(function(l){return l()}),this._isOpen=!1)},R.prototype.addRenderEventListener=function(n){this.renderEventListeners.push(n)},R.prototype.removeRenderEventListener=function(n){this.renderEventListeners.indexOf(n)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(n),1)},R.prototype.addCloseEventListener=function(n){this.closeEventListeners.push(n)},R.prototype.removeCloseEventListener=function(n){this.closeEventListeners.indexOf(n)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(n),1)},R.prototype.setupResizeObserver=function(){var n=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){n.resize(n.target.clientWidth,n.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},R.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var n=1*this.target.clientWidth/this.target.clientHeight,l=this.contentDiv.clientWidth/n>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*n:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,L=l+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/n;this.resize(l,L)}},R.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},R.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",nt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},R.prototype.resize=function(n,l){this.imageWidth=Math.round(n),this.imageHeight=Math.round(l),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},R.prototype.setEditingTarget=function(){var n=document.createElement("canvas");n.width=this.target.naturalWidth,n.height=this.target.naturalHeight,n.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var l=n.toDataURL();nt.setAttributes(this.editingTarget,[["href",l]]),this.setEditingTargetSize()},R.prototype.setTopLeft=function(){var n=this.target.getBoundingClientRect(),l=this.editorCanvas.getBoundingClientRect();this.left=n.left-l.left-this.CANVAS_MARGIN,this.top=n.top-l.top-this.CANVAS_MARGIN},R.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=nt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=nt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=nt.createGroup(),this.editingTargetRotationScaleContainer=nt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var n=nt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(n);var l=nt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(l),this.editingTargetContainer=nt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},R.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},R.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=nt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Le(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},R.prototype.zoomToCrop=function(){if(this.cropRect){var n=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,l=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=n+"px "+l+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-n+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-l+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},R.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},R.prototype.cropRectChanged=function(n){this.cropRect=n,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},R.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},R.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},R.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},R.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var n=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,l=this.target.offsetTop>n+this.CANVAS_MARGIN?this.target.offsetTop-(n+this.CANVAS_MARGIN):0;this.coverDiv.style.top=l+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},R.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},R.prototype.addTopToolbar=function(){var n=this;this.topToolbar=new Rt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var l=new Q;l.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(l);var L=[];this.aspectRatios.forEach(function(xt){var wt=new v(G.getIcon(xt.horizontal,xt.vertical),xt.horizontal===0&&xt.vertical===0?"FREE":xt.horizontal+":"+xt.vertical);wt.onClick=function(){return n.ratioButtonClicked(xt)},L.push(wt)}),this.aspectRatioButton=new le(G.getIcon(0,0),"Aspect ratio",L),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,l.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var K=new v('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");K.isActive=this.isGridVisible,K.onClick=function(){n.isGridVisible=!n.isGridVisible,K.isActive=n.isGridVisible},l.addButton(K);var N=new v('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(N.isActive=this.zoomToCropEnabled,N.onClick=function(){n.zoomToCropEnabled=!n.zoomToCropEnabled,N.isActive=n.zoomToCropEnabled},l.addButton(N),!Ct.isLicensed){var Ce=new D;this.topToolbar.addElementBlock(Ce);var Ue=document.createElement("div");Ue.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Ze=document.createElement("a");Ze.style.color="currentColor",Ze.href="https://markerjs.com/products/cropro",Ze.target="_blank",Ze.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Ue.appendChild(Ze),Ce.addElement(Ue)}var at=new Q;at.minWidth=3*this.toolbarHeight+"px",at.contentAlign="end",this.topToolbar.addButtonBlock(at);var Ye=new v('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Ye.onClick=this.startRenderAndClose,at.addButton(Ye),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ye.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var dt=new v('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");dt.onClick=this.close,at.addButton(dt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(dt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},R.prototype.addBottomToolbar=function(){var n=this;this.bottomToolbar=new Rt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var l=new Q;l.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(l);var L=new v('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");L.onClick=this.rotateLeftButtonClicked,l.addButton(L);var K=new v('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");K.onClick=this.rotateRightButtonClicked,l.addButton(K);var N=new D;N.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(N),this.straightener=new qe("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(at){n.rotateBy(at),n.straightener.angle=n.rotationAngle},N.addElement(this.straightener.getUI());var Ce=new Q;Ce.minWidth=2*this.toolbarHeight+"px",Ce.contentAlign="end",this.bottomToolbar.addButtonBlock(Ce);var Ue=new v('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ue.onClick=this.flipHorizontallyButtonClicked,Ce.addButton(Ue);var Ze=new v('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Ze.onClick=this.flipVerticallyButtonClicked,Ce.addButton(Ze)},R.prototype.ratioButtonClicked=function(n){this.aspectRatio=n,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},R.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=G.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},R.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new j(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},R.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},R.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},R.prototype.restoreState=function(n){if(n){var l=this.cropLayer.getRescaledRect(n.width,n.height,this.imageWidth,this.imageHeight,n.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(l),this.cropRectChanged(l),this.flippedHorizontally=n.flippedHorizontally,this.flippedVertically=n.flippedVertically,this.applyFlip(),this.rotationAngle=n.rotationAngle,this.applyRotation()}},R.prototype.clientToLocalCoordinates=function(n,l){var L=this.cropImage.getBoundingClientRect();return{x:n-L.left,y:l-L.top}},R.prototype.onWindowResize=function(){this.positionUI()},R.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var n=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=n+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},R.prototype.rotateLeftButtonClicked=function(){var n=this.rotationAngle-90;this.rotationAngle%90!=0&&(n+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(n)},R.prototype.rotateRightButtonClicked=function(){var n=this.rotationAngle+90;this.rotationAngle%90!=0&&(n-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(n)},R.prototype.rotateTo=function(n){n=(n=n>180?n-360:n)<=-180?n+360:n,this.rotationAngle=n,this.applyRotation()},R.prototype.rotateBy=function(n){this.rotateTo((this.rotationAngle+n)%360)},R.prototype.applyRotation=function(){var n=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var l=this.editingTargetRotationContainer.transform.baseVal.getItem(0);l.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(l,0);var L=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/L.width,this.imageHeight/L.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=n},R.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},R.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},R.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},R.prototype.startRenderAndClose=function(){return ct(this,void 0,void 0,function(){var n,l;return yt(this,function(L){switch(L.label){case 0:return[4,this.render()];case 1:return n=L.sent(),l=this.getState(),this.renderEventListeners.forEach(function(K){return K(n,l)}),this.close(!0),[2]}})})},R.prototype.render=function(){return ct(this,void 0,void 0,function(){var n;return yt(this,function(l){switch(l.label){case 0:return(n=new Ke).naturalSize=this.renderAtNaturalSize,n.imageType=this.renderImageType,n.imageQuality=this.renderImageQuality,n.width=this.renderWidth,n.height=this.renderHeight,this.unzoomFromCrop(),nt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,n.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return l.sent(),[4,n.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,l.sent()]}})})},R.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new bt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new bt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new bt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var n=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new bt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*n)+`px;
height: `+(this.toolbarHeight-2*n)+`px;
padding: `+n+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new bt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new bt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new kt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new kt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new bt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new bt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new bt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new bt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*n)+`px;
padding: `+n+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new bt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},R.instanceCounter=0,R}(),lt=me("8hTe"),it=me.n(lt),We=/<pre[^>]*>/g;function ut(R){var n=document.createElement("div");return n.innerHTML=R,n.childNodes.length===0?"":n.childNodes[0].nodeValue}var Qe=st.a=function(R){var n=R.value,l=n===void 0?"":n,L=R.edit,K=L===void 0?!1:L,N=R.className,Ce=R.showTextOnly,Ue=R.showLines,Ze=R.replaces,at=R.zoomImg,Ye=R.hasMask,dt=R.style,xt=dt===void 0?{}:dt,wt=R.stylesPrev,Nt=wt===void 0?{}:wt,Mt=String(l),Ot=Object(o.useRef)(),Tt=Object(o.useRef)(),Kt=Object(o.useState)(""),Ht=Object(h.a)(Kt,2),It=Ht[0],Pt=Ht[1],Wt=Object(o.useState)("office"),Gt=Object(h.a)(Wt,2),Xt=Gt[0],Ft=Gt[1],Yt=function(){var Et=new Ge(Tt.current);Et.displayMode="popup",Et.addRenderEventListener(function(){var jt=Object(f.a)(u.a.mark(function St(Vt){var Dt;return u.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ot.current.style.display="none",Ut.next=3,Object(Y.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Vt}});case 3:Dt=Ut.sent,Dt!=null&&Dt.id&&Ze(Tt.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 5:case"end":return Ut.stop()}},St)}));return function(St){return jt.apply(this,arguments)}}()),Et.show()},qt=function(){var Et=new rt(Tt.current);Et.settings.displayMode="popup",Et.addEventListener("render",function(){var jt=Object(f.a)(u.a.mark(function St(Vt){var Dt;return u.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:if(Ot.current.style.display="none",!Tt.current){Ut.next=6;break}return Ut.next=4,Object(Y.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Vt.dataUrl}});case 4:Dt=Ut.sent,Dt!=null&&Dt.id&&Ze(Tt.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(Dt==null?void 0:Dt.id,"?type=").concat(Dt.content_type));case 6:case"end":return Ut.stop()}},St)}));return function(St){return jt.apply(this,arguments)}}()),Et.show(),window.markerArea=Et},zt=Object(o.useMemo)(function(){try{var Lt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Et=/\"\/api\/attachments\/|\"\/attachments\/download\//g,jt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Mt=Mt.replace(Lt,"("+$.a.API_SERVER+"/api/attachments/").replace(Et,'"'+$.a.API_SERVER+"/api/attachments/").replace(jt,'"'+$.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,`
`),Mt=Mt.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Qt){}var St=ue(Mt),Vt=B();if(Mt.match(/\[TOC\]/)&&(St=St.replace("<p>[TOC]</p>",w()),S()),St=St.replace(/(__special_katext_id_\d+__)/g,function(Qt,Ut){var en=Vt[Ut],tn=en.type,nn=en.expression;return Object(z.renderToString)(ut(nn)||"",{displayMode:tn==="block",throwOnError:!1,output:"html"})}),St=St.replace(/▁/g,"\u2581\u2581\u2581"),U(),Ce){var Dt=document.createElement("div");return Dt.innerHTML=St,Dt.innerText}return setTimeout(function(){return Jt()},500),St},[Mt]),Bt=Object(o.useRef)();E.WebkitLineClamp=Ue,Ue&&(xt=Object(I.a)(Object(I.a)({},xt),E));function $t(Lt){var Et=Lt.target;if(Et.tagName.toUpperCase()==="IMG"){if(at){var jt=Et.getAttribute("src");Pt(jt),Ft("image")}}else if(Et.tagName.toUpperCase()==="A"){var St=Et.getAttribute("href");if(St.indexOf("office")>-1)Lt.preventDefault(),Pt(St),Ft("office");else if(St.indexOf("application/pdf")>-1)Lt.preventDefault(),Pt(St),Ft("pdf");else if(St.indexOf("type=text")>-1)Lt.preventDefault(),Pt(St),Ft("html");else if(St.startsWith("#")){Lt.preventDefault();var Vt=document.getElementById(St.replace("#",""));Vt&&Vt.scrollIntoView(!0)}}}var Jt=function(){var Et,jt=(Et=Bt.current)===null||Et===void 0?void 0:Et.querySelectorAll("video");jt==null||jt.forEach(function(St){if(St.oncontextmenu=function(){return!1},St.src.indexOf(".m3u8")>-1&&!St.canPlayType("application/vnd.apple.mpegurl")){if(J.a.isSupported()){var Vt=new J.a;Vt.loadSource(St.src),Vt.attachMedia(St)}}})};Object(o.useEffect)(function(){if(Bt.current&&zt&&(zt.match(We)&&window.PR.prettyPrint()),Bt.current)return Bt.current.addEventListener("click",$t),function(){Bt.current.removeEventListener("click",$t),U(),S()}},[zt,Bt.current,$t]);var Zt=function(Et){if(!K)return;Et.target.nodeName==="IMG"?(Ot.current.style.display="flex",Ot.current.style.width=Et.target.clientWidth+"px",Ot.current.style.height=Et.target.clientHeight+"px",Ot.current.style.top=Et.target.offsetTop+"px",Ot.current.style.left=Et.target.offsetLeft+"px",Tt.current.src=Et.target.getAttribute("src")):Ot.current.style.display="none"};return p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("div",{ref:Bt,style:Object(I.a)({},xt),className:"".concat(N||""," markdown-body ").concat(it.a.mdBody),onMouseOver:Zt,dangerouslySetInnerHTML:{__html:zt}}),p.a.createElement("div",{ref:Ot,className:it.a.button},p.a.createElement(Ve.a,null,p.a.createElement(r.a,{onClick:function(){return Yt()}},"\u88C1\u526A"),p.a.createElement(r.a,{onClick:function(){return qt()}},"\u7F16\u8F91"))),p.a.createElement("img",{ref:Tt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),p.a.createElement(H.a,{close:!0,data:It,hasMask:Ye,type:It!=null&&It.length?Xt:"",style:Object(I.a)({},Nt),onClose:function(){return Pt("")}}))}},"9VGf":function(ht,st,me){"use strict";me.d(st,"a",function(){return je});var Fe=me("q1tI"),Ve=me.n(Fe);function je(r,I){var f=Object(Fe.useRef)();Object(Fe.useEffect)(function(){f.current=r}),Object(Fe.useEffect)(function(){function h(){f.current()}if(I!==null){var m=setInterval(h,I);return function(){return clearInterval(m)}}},[I])}},Aky1:function(ht,st,me){"use strict";me.d(st,"a",function(){return u});var Fe=me("ErOA"),Ve=me("ppsT"),je=me.n(Ve),r="",I,f="";function h(o){m(o)}function m(o){I=new je.a.Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:1829848226361863,enableUploadProgress:!1,addFileSuccess:function(s){console.log("addFileSuccess: "+s.file.name),o.addFileSuccess&&o.addFileSuccess(s),I.startUpload()},onUploadstarted:function(s){var t=s.file.name;if(s.videoId){var g="/api/users/".concat(r,"/video_auths.json");Object(Fe.a)(g,{method:"put",body:{video_id:s.videoId,title:t,file_name:t,virtual_classroom_id:f}}).then(function(y){if(y.status==-1){o.onUploadError&&o.onUploadError(s);return}var d=y.data,C=d.UploadAuth,k=d.UploadAddress,S=d.VideoId;I.setUploadAuthAndAddress(s,C,k)}).catch(function(y){I.deleteFile(I._curIndex),I.nextUpload(),console.log(y)})}else{var a="/api/users/".concat(r,"/video_auths.json"),c="";Object(Fe.a)(a,{method:"Post",body:{title:c+t,file_name:c+t,virtual_classroom_id:f}}).then(function(y){if(y){var d=y.data,C=d.UploadAuth,k=d.UploadAddress,S=d.VideoId;I.setUploadAuthAndAddress(s,C,k,S)}}).catch(function(y){I.deleteFile(I._curIndex),I.nextUpload(),console.log(y)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(s){o.onUploadSucceed&&o.onUploadSucceed(s),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(s,t,a){o.onUploadFailed&&o.onUploadFailed(s),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(s,t,a){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(s,t,a){o.onUploadProgress&&o.onUploadProgress(s,t,a);var c=Math.ceil(a*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(s){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var t="/api/users/".concat(r,"/video_auths.json");Object(Fe.a)(t,{method:"put",body:{video_id:s.videoId}}).then(function(a){var c=a.data,g=c.UploadAuth;I.resumeUploadWithAuth(g)}).catch(function(a){console.log(a)})},onUploadEnd:function(s){o.onUploadEnd&&o.onUploadEnd(s),console.log("onUploadEnd: uploaded all the files")}}),o.gotUploader&&o.gotUploader(I)}function u(o,p,s){o&&(r=o),p&&(f=p),h(s)}},DlQD:function(ht,st,me){(function(Fe,Ve){ht.exports=Ve()})(this,function(){"use strict";function Fe(ke,Re){for(var Oe=0;Oe<Re.length;Oe++){var ce=Re[Oe];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(ke,ce.key,ce)}}function Ve(ke,Re,Oe){return Re&&Fe(ke.prototype,Re),Oe&&Fe(ke,Oe),ke}function je(ke,Re){if(!ke)return;if(typeof ke=="string")return r(ke,Re);var Oe=Object.prototype.toString.call(ke).slice(8,-1);if(Oe==="Object"&&ke.constructor&&(Oe=ke.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(ke);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return r(ke,Re)}function r(ke,Re){(Re==null||Re>ke.length)&&(Re=ke.length);for(var Oe=0,ce=new Array(Re);Oe<Re;Oe++)ce[Oe]=ke[Oe];return ce}function I(ke,Re){var Oe;if(typeof Symbol=="undefined"||ke[Symbol.iterator]==null){if(Array.isArray(ke)||(Oe=je(ke))||Re&&ke&&typeof ke.length=="number"){Oe&&(ke=Oe);var ce=0;return function(){return ce>=ke.length?{done:!0}:{done:!1,value:ke[ce++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Oe=ke[Symbol.iterator](),Oe.next.bind(Oe)}function f(ke,Re){return Re={exports:{}},ke(Re,Re.exports),Re.exports}var h=f(function(ke){function Re(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Oe(ce){ke.exports.defaults=ce}ke.exports={defaults:Re(),getDefaults:Re,changeDefaults:Oe}}),m=h.defaults,u=h.getDefaults,o=h.changeDefaults,p=/[&<>"']/,s=/[&<>"']/g,t=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},g=function(Re){return c[Re]};function y(ke,Re){if(Re){if(p.test(ke))return ke.replace(s,g)}else if(t.test(ke))return ke.replace(a,g);return ke}var d=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function C(ke){return ke.replace(d,function(Re,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var k=/(^|[^\[])\^/g;function S(ke,Re){ke=ke.source||ke,Re=Re||"";var Oe={replace:function(ve,xe){return xe=xe.source||xe,xe=xe.replace(k,"$1"),ke=ke.replace(ve,xe),Oe},getRegex:function(){return new RegExp(ke,Re)}};return Oe}var E=/[^\w:]/g,O=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function w(ke,Re,Oe){if(ke){var ce;try{ce=decodeURIComponent(C(Oe)).replace(E,"").toLowerCase()}catch(ve){return null}if(ce.indexOf("javascript:")===0||ce.indexOf("vbscript:")===0||ce.indexOf("data:")===0)return null}Re&&!O.test(Oe)&&(Oe=X(Re,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(ve){return null}return Oe}var _={},F=/^[^:]+:\/*[^/]*$/,M=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function X(ke,Re){_[" "+ke]||(F.test(ke)?_[" "+ke]=ke+"/":_[" "+ke]=ne(ke,"/",!0)),ke=_[" "+ke];var Oe=ke.indexOf(":")===-1;return Re.substring(0,2)==="//"?Oe?Re:ke.replace(M,"$1")+Re:Re.charAt(0)==="/"?Oe?Re:ke.replace(b,"$1")+Re:ke+Re}var B={exec:function(){}};function U(ke){for(var Re=1,Oe,ce;Re<arguments.length;Re++){Oe=arguments[Re];for(ce in Oe)Object.prototype.hasOwnProperty.call(Oe,ce)&&(ke[ce]=Oe[ce])}return ke}function W(ke,Re){var Oe=ke.replace(/\|/g,function(xe,fe,De){for(var ze=!1,et=fe;--et>=0&&De[et]==="\\";)ze=!ze;return ze?"|":" |"}),ce=Oe.split(/ \|/),ve=0;if(ce.length>Re)ce.splice(Re);else for(;ce.length<Re;)ce.push("");for(;ve<ce.length;ve++)ce[ve]=ce[ve].trim().replace(/\\\|/g,"|");return ce}function ne(ke,Re,Oe){var ce=ke.length;if(ce===0)return"";for(var ve=0;ve<ce;){var xe=ke.charAt(ce-ve-1);if(xe===Re&&!Oe)ve++;else if(xe!==Re&&Oe)ve++;else break}return ke.substr(0,ce-ve)}function re(ke,Re){if(ke.indexOf(Re[1])===-1)return-1;for(var Oe=ke.length,ce=0,ve=0;ve<Oe;ve++)if(ke[ve]==="\\")ve++;else if(ke[ve]===Re[0])ce++;else if(ke[ve]===Re[1]&&(ce--,ce<0))return ve;return-1}function ae(ke){ke&&ke.sanitize&&!ke.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")}var ue={escape:y,unescape:C,edit:S,cleanUrl:w,resolveUrl:X,noopTest:B,merge:U,splitCells:W,rtrim:ne,findClosingBracket:re,checkSanitizeDeprecation:ae},V=h.defaults,ye=ue.rtrim,J=ue.splitCells,$=ue.escape,z=ue.findClosingBracket;function H(ke,Re,Oe){var ce=Re.href,ve=Re.title?$(Re.title):null,xe=ke[1].replace(/\\([\[\]])/g,"$1");return ke[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:ce,title:ve,text:xe}:{type:"image",raw:Oe,href:ce,title:ve,text:$(xe)}}function Y(ke,Re){var Oe=ke.match(/^(\s+)(?:```)/);if(Oe===null)return Re;var ce=Oe[1];return Re.split(`
`).map(function(ve){var xe=ve.match(/^\s+/);if(xe===null)return ve;var fe=xe[0];return fe.length>=ce.length?ve.slice(ce.length):ve}).join(`
`)}var ee=function(){function ke(Oe){this.options=Oe||V}var Re=ke.prototype;return Re.space=function(ce){var ve=this.rules.block.newline.exec(ce);if(ve)return ve[0].length>1?{type:"space",raw:ve[0]}:{raw:`
`}},Re.code=function(ce,ve){var xe=this.rules.block.code.exec(ce);if(xe){var fe=ve[ve.length-1];if(fe&&fe.type==="paragraph")return{raw:xe[0],text:xe[0].trimRight()};var De=xe[0].replace(/^ {4}/gm,"");return{type:"code",raw:xe[0],codeBlockStyle:"indented",text:this.options.pedantic?De:ye(De,`
`)}}},Re.fences=function(ce){var ve=this.rules.block.fences.exec(ce);if(ve){var xe=ve[0],fe=Y(xe,ve[3]||"");return{type:"code",raw:xe,lang:ve[2]?ve[2].trim():ve[2],text:fe}}},Re.heading=function(ce){var ve=this.rules.block.heading.exec(ce);if(ve)return{type:"heading",raw:ve[0],depth:ve[1].length,text:ve[2]}},Re.nptable=function(ce){var ve=this.rules.block.nptable.exec(ce);if(ve){var xe={type:"table",header:J(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
`):[],raw:ve[0]};if(xe.header.length===xe.align.length){var fe=xe.align.length,De;for(De=0;De<fe;De++)/^ *-+: *$/.test(xe.align[De])?xe.align[De]="right":/^ *:-+: *$/.test(xe.align[De])?xe.align[De]="center":/^ *:-+ *$/.test(xe.align[De])?xe.align[De]="left":xe.align[De]=null;for(fe=xe.cells.length,De=0;De<fe;De++)xe.cells[De]=J(xe.cells[De],xe.header.length);return xe}}},Re.hr=function(ce){var ve=this.rules.block.hr.exec(ce);if(ve)return{type:"hr",raw:ve[0]}},Re.blockquote=function(ce){var ve=this.rules.block.blockquote.exec(ce);if(ve){var xe=ve[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ve[0],text:xe}}},Re.list=function(ce){var ve=this.rules.block.list.exec(ce);if(ve){for(var xe=ve[0],fe=ve[2],De=fe.length>1,ze=fe[fe.length-1]===")",et={type:"list",raw:xe,ordered:De,start:De?+fe.slice(0,-1):"",loose:!1,items:[]},mt=ve[0].match(this.rules.block.item),_t=!1,vt,pt,Je,Xe,ot,rt,ft,gt=mt.length,ct=0;ct<gt;ct++)vt=mt[ct],xe=vt,pt=vt.length,vt=vt.replace(/^ *([*+-]|\d+[.)]) */,""),~vt.indexOf(`
`)&&(pt-=vt.length,vt=this.options.pedantic?vt.replace(/^ {1,4}/gm,""):vt.replace(new RegExp("^ {1,"+pt+"}","gm"),"")),ct!==gt-1&&(Je=this.rules.block.bullet.exec(mt[ct+1])[0],(De?Je.length===1||!ze&&Je[Je.length-1]===")":Je.length>1||this.options.smartLists&&Je!==fe)&&(Xe=mt.slice(ct+1).join(`
`),et.raw=et.raw.substring(0,et.raw.length-Xe.length),ct=gt-1)),ot=_t||/\n\n(?!\s*$)/.test(vt),ct!==gt-1&&(_t=vt.charAt(vt.length-1)===`
`,ot||(ot=_t)),ot&&(et.loose=!0),rt=/^\[[ xX]\] /.test(vt),ft=void 0,rt&&(ft=vt[1]!==" ",vt=vt.replace(/^\[[ xX]\] +/,"")),et.items.push({type:"list_item",raw:xe,task:rt,checked:ft,loose:ot,text:vt});return et}},Re.html=function(ce){var ve=this.rules.block.html.exec(ce);if(ve)return{type:this.options.sanitize?"paragraph":"html",raw:ve[0],pre:!this.options.sanitizer&&(ve[1]==="pre"||ve[1]==="script"||ve[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ve[0]):$(ve[0]):ve[0]}},Re.def=function(ce){var ve=this.rules.block.def.exec(ce);if(ve){ve[3]&&(ve[3]=ve[3].substring(1,ve[3].length-1));var xe=ve[1].toLowerCase().replace(/\s+/g," ");return{tag:xe,raw:ve[0],href:ve[2],title:ve[3]}}},Re.table=function(ce){var ve=this.rules.block.table.exec(ce);if(ve){var xe={type:"table",header:J(ve[1].replace(/^ *| *\| *$/g,"")),align:ve[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ve[3]?ve[3].replace(/\n$/,"").split(`
`):[]};if(xe.header.length===xe.align.length){xe.raw=ve[0];var fe=xe.align.length,De;for(De=0;De<fe;De++)/^ *-+: *$/.test(xe.align[De])?xe.align[De]="right":/^ *:-+: *$/.test(xe.align[De])?xe.align[De]="center":/^ *:-+ *$/.test(xe.align[De])?xe.align[De]="left":xe.align[De]=null;for(fe=xe.cells.length,De=0;De<fe;De++)xe.cells[De]=J(xe.cells[De].replace(/^ *\| *| *\| *$/g,""),xe.header.length);return xe}}},Re.lheading=function(ce){var ve=this.rules.block.lheading.exec(ce);if(ve)return{type:"heading",raw:ve[0],depth:ve[2].charAt(0)==="="?1:2,text:ve[1]}},Re.paragraph=function(ce){var ve=this.rules.block.paragraph.exec(ce);if(ve)return{type:"paragraph",raw:ve[0],text:ve[1].charAt(ve[1].length-1)===`
`?ve[1].slice(0,-1):ve[1]}},Re.text=function(ce,ve){var xe=this.rules.block.text.exec(ce);if(xe){var fe=ve[ve.length-1];return fe&&fe.type==="text"?{raw:xe[0],text:xe[0]}:{type:"text",raw:xe[0],text:xe[0]}}},Re.escape=function(ce){var ve=this.rules.inline.escape.exec(ce);if(ve)return{type:"escape",raw:ve[0],text:$(ve[1])}},Re.tag=function(ce,ve,xe){var fe=this.rules.inline.tag.exec(ce);if(fe)return!ve&&/^<a /i.test(fe[0])?ve=!0:ve&&/^<\/a>/i.test(fe[0])&&(ve=!1),!xe&&/^<(pre|code|kbd|script)(\s|>)/i.test(fe[0])?xe=!0:xe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(fe[0])&&(xe=!1),{type:this.options.sanitize?"text":"html",raw:fe[0],inLink:ve,inRawBlock:xe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):$(fe[0]):fe[0]}},Re.link=function(ce){var ve=this.rules.inline.link.exec(ce);if(ve){var xe=z(ve[2],"()");if(xe>-1){var fe=ve[0].indexOf("!")===0?5:4,De=fe+ve[1].length+xe;ve[2]=ve[2].substring(0,xe),ve[0]=ve[0].substring(0,De).trim(),ve[3]=""}var ze=ve[2],et="";if(this.options.pedantic){var mt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ze);mt?(ze=mt[1],et=mt[3]):et=""}else et=ve[3]?ve[3].slice(1,-1):"";ze=ze.trim().replace(/^<([\s\S]*)>$/,"$1");var _t=H(ve,{href:ze&&ze.replace(this.rules.inline._escapes,"$1"),title:et&&et.replace(this.rules.inline._escapes,"$1")},ve[0]);return _t}},Re.reflink=function(ce,ve){var xe;if((xe=this.rules.inline.reflink.exec(ce))||(xe=this.rules.inline.nolink.exec(ce))){var fe=(xe[2]||xe[1]).replace(/\s+/g," ");if(fe=ve[fe.toLowerCase()],!fe||!fe.href){var De=xe[0].charAt(0);return{type:"text",raw:De,text:De}}var ze=H(xe,fe,xe[0]);return ze}},Re.strong=function(ce,ve,xe){xe===void 0&&(xe="");var fe=this.rules.inline.strong.start.exec(ce);if(fe&&(!fe[1]||fe[1]&&(xe===""||this.rules.inline.punctuation.exec(xe)))){ve=ve.slice(-1*ce.length);var De=fe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;De.lastIndex=0;for(var ze;(fe=De.exec(ve))!=null;)if(ze=this.rules.inline.strong.middle.exec(ve.slice(0,fe.index+3)),ze)return{type:"strong",raw:ce.slice(0,ze[0].length),text:ce.slice(2,ze[0].length-2)}}},Re.em=function(ce,ve,xe){xe===void 0&&(xe="");var fe=this.rules.inline.em.start.exec(ce);if(fe&&(!fe[1]||fe[1]&&(xe===""||this.rules.inline.punctuation.exec(xe)))){ve=ve.slice(-1*ce.length);var De=fe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;De.lastIndex=0;for(var ze;(fe=De.exec(ve))!=null;)if(ze=this.rules.inline.em.middle.exec(ve.slice(0,fe.index+2)),ze)return{type:"em",raw:ce.slice(0,ze[0].length),text:ce.slice(1,ze[0].length-1)}}},Re.codespan=function(ce){var ve=this.rules.inline.code.exec(ce);if(ve){var xe=ve[2].replace(/\n/g," "),fe=/[^ ]/.test(xe),De=xe.startsWith(" ")&&xe.endsWith(" ");return fe&&De&&(xe=xe.substring(1,xe.length-1)),xe=$(xe,!0),{type:"codespan",raw:ve[0],text:xe}}},Re.br=function(ce){var ve=this.rules.inline.br.exec(ce);if(ve)return{type:"br",raw:ve[0]}},Re.del=function(ce){var ve=this.rules.inline.del.exec(ce);if(ve)return{type:"del",raw:ve[0],text:ve[1]}},Re.autolink=function(ce,ve){var xe=this.rules.inline.autolink.exec(ce);if(xe){var fe,De;return xe[2]==="@"?(fe=$(this.options.mangle?ve(xe[1]):xe[1]),De="mailto:"+fe):(fe=$(xe[1]),De=fe),{type:"link",raw:xe[0],text:fe,href:De,tokens:[{type:"text",raw:fe,text:fe}]}}},Re.url=function(ce,ve){var xe;if(xe=this.rules.inline.url.exec(ce)){var fe,De;if(xe[2]==="@")fe=$(this.options.mangle?ve(xe[0]):xe[0]),De="mailto:"+fe;else{var ze;do ze=xe[0],xe[0]=this.rules.inline._backpedal.exec(xe[0])[0];while(ze!==xe[0]);fe=$(xe[0]),xe[1]==="www."?De="http://"+fe:De=fe}return{type:"link",raw:xe[0],text:fe,href:De,tokens:[{type:"text",raw:fe,text:fe}]}}},Re.inlineText=function(ce,ve,xe){var fe=this.rules.inline.text.exec(ce);if(fe){var De;return ve?De=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(fe[0]):$(fe[0]):fe[0]:De=$(this.options.smartypants?xe(fe[0]):fe[0]),{type:"text",raw:fe[0],text:De}}},ke}(),we=ue.noopTest,he=ue.edit,Ae=ue.merge,pe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\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:we,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};pe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,pe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,pe.def=he(pe.def).replace("label",pe._label).replace("title",pe._title).getRegex(),pe.bullet=/(?:[*+-]|\d{1,9}[.)])/,pe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,pe.item=he(pe.item,"gm").replace(/bull/g,pe.bullet).getRegex(),pe.list=he(pe.list).replace(/bull/g,pe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+pe.def.source+")").getRegex(),pe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",pe._comment=/<!--(?!-?>)[\s\S]*?-->/,pe.html=he(pe.html,"i").replace("comment",pe._comment).replace("tag",pe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pe.paragraph=he(pe._paragraph).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.blockquote=he(pe.blockquote).replace("paragraph",pe.paragraph).getRegex(),pe.normal=Ae({},pe),pe.gfm=Ae({},pe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),pe.gfm.nptable=he(pe.gfm.nptable).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.gfm.table=he(pe.gfm.table).replace("hr",pe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",pe._tag).getRegex(),pe.pedantic=Ae({},pe.normal,{html:he(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",pe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:we,paragraph:he(pe.normal._paragraph).replace("hr",pe.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",pe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ge={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,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:we,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ge._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ge.punctuation=he(ge.punctuation).replace(/punctuation/g,ge._punctuation).getRegex(),ge._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ge._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ge.em.start=he(ge.em.start).replace(/punctuation/g,ge._punctuation).getRegex(),ge.em.middle=he(ge.em.middle).replace(/punctuation/g,ge._punctuation).replace(/overlapSkip/g,ge._overlapSkip).getRegex(),ge.em.endAst=he(ge.em.endAst,"g").replace(/punctuation/g,ge._punctuation).getRegex(),ge.em.endUnd=he(ge.em.endUnd,"g").replace(/punctuation/g,ge._punctuation).getRegex(),ge.strong.start=he(ge.strong.start).replace(/punctuation/g,ge._punctuation).getRegex(),ge.strong.middle=he(ge.strong.middle).replace(/punctuation/g,ge._punctuation).replace(/blockSkip/g,ge._blockSkip).getRegex(),ge.strong.endAst=he(ge.strong.endAst,"g").replace(/punctuation/g,ge._punctuation).getRegex(),ge.strong.endUnd=he(ge.strong.endUnd,"g").replace(/punctuation/g,ge._punctuation).getRegex(),ge.blockSkip=he(ge._blockSkip,"g").getRegex(),ge.overlapSkip=he(ge._overlapSkip,"g").getRegex(),ge._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ge._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ge._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])?)+(?![-_])/,ge.autolink=he(ge.autolink).replace("scheme",ge._scheme).replace("email",ge._email).getRegex(),ge._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ge.tag=he(ge.tag).replace("comment",pe._comment).replace("attribute",ge._attribute).getRegex(),ge._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ge._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ge._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ge.link=he(ge.link).replace("label",ge._label).replace("href",ge._href).replace("title",ge._title).getRegex(),ge.reflink=he(ge.reflink).replace("label",ge._label).getRegex(),ge.reflinkSearch=he(ge.reflinkSearch,"g").replace("reflink",ge.reflink).replace("nolink",ge.nolink).getRegex(),ge.normal=Ae({},ge),ge.pedantic=Ae({},ge.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:he(/^!?\[(label)\]\((.*?)\)/).replace("label",ge._label).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ge._label).getRegex()}),ge.gfm=Ae({},ge.normal,{escape:he(ge.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ge.gfm.url=he(ge.gfm.url,"i").replace("email",ge.gfm._extended_email).getRegex(),ge.breaks=Ae({},ge.gfm,{br:he(ge.br).replace("{2,}","*").getRegex(),text:he(ge.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var se={block:pe,inline:ge},ie=h.defaults,Z=se.block,be=se.inline;function te(ke){return ke.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function q(ke){var Re="",Oe,ce,ve=ke.length;for(Oe=0;Oe<ve;Oe++)ce=ke.charCodeAt(Oe),Math.random()>.5&&(ce="x"+ce.toString(16)),Re+="&#"+ce+";";return Re}var Ee=function(){function ke(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||ie,this.options.tokenizer=this.options.tokenizer||new ee,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ce={block:Z.normal,inline:be.normal};this.options.pedantic?(ce.block=Z.pedantic,ce.inline=be.pedantic):this.options.gfm&&(ce.block=Z.gfm,this.options.breaks?ce.inline=be.breaks:ce.inline=be.gfm),this.tokenizer.rules=ce}ke.lex=function(ce,ve){var xe=new ke(ve);return xe.lex(ce)};var Re=ke.prototype;return Re.lex=function(ce){return ce=ce.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(ce,this.tokens,!0),this.inline(this.tokens),this.tokens},Re.blockTokens=function(ce,ve,xe){ve===void 0&&(ve=[]),xe===void 0&&(xe=!0),ce=ce.replace(/^ +$/gm,"");for(var fe,De,ze,et;ce;){if(fe=this.tokenizer.space(ce)){ce=ce.substring(fe.raw.length),fe.type&&ve.push(fe);continue}if(fe=this.tokenizer.code(ce,ve)){ce=ce.substring(fe.raw.length),fe.type?ve.push(fe):(et=ve[ve.length-1],et.raw+=`
`+fe.raw,et.text+=`
`+fe.text);continue}if(fe=this.tokenizer.fences(ce)){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(fe=this.tokenizer.heading(ce)){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(fe=this.tokenizer.nptable(ce)){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(fe=this.tokenizer.hr(ce)){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(fe=this.tokenizer.blockquote(ce)){ce=ce.substring(fe.raw.length),fe.tokens=this.blockTokens(fe.text,[],xe),ve.push(fe);continue}if(fe=this.tokenizer.list(ce)){for(ce=ce.substring(fe.raw.length),ze=fe.items.length,De=0;De<ze;De++)fe.items[De].tokens=this.blockTokens(fe.items[De].text,[],!1);ve.push(fe);continue}if(fe=this.tokenizer.html(ce)){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(xe&&(fe=this.tokenizer.def(ce))){ce=ce.substring(fe.raw.length),this.tokens.links[fe.tag]||(this.tokens.links[fe.tag]={href:fe.href,title:fe.title});continue}if(fe=this.tokenizer.table(ce)){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(fe=this.tokenizer.lheading(ce)){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(xe&&(fe=this.tokenizer.paragraph(ce))){ce=ce.substring(fe.raw.length),ve.push(fe);continue}if(fe=this.tokenizer.text(ce,ve)){ce=ce.substring(fe.raw.length),fe.type?ve.push(fe):(et=ve[ve.length-1],et.raw+=`
`+fe.raw,et.text+=`
`+fe.text);continue}if(ce){var mt="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(mt);break}else throw new Error(mt)}}return ve},Re.inline=function(ce){var ve,xe,fe,De,ze,et,mt=ce.length;for(ve=0;ve<mt;ve++){et=ce[ve];switch(et.type){case"paragraph":case"text":case"heading":{et.tokens=[],this.inlineTokens(et.text,et.tokens);break}case"table":{for(et.tokens={header:[],cells:[]},De=et.header.length,xe=0;xe<De;xe++)et.tokens.header[xe]=[],this.inlineTokens(et.header[xe],et.tokens.header[xe]);for(De=et.cells.length,xe=0;xe<De;xe++)for(ze=et.cells[xe],et.tokens.cells[xe]=[],fe=0;fe<ze.length;fe++)et.tokens.cells[xe][fe]=[],this.inlineTokens(ze[fe],et.tokens.cells[xe][fe]);break}case"blockquote":{this.inline(et.tokens);break}case"list":{for(De=et.items.length,xe=0;xe<De;xe++)this.inline(et.items[xe].tokens);break}}}return ce},Re.inlineTokens=function(ce,ve,xe,fe,De){ve===void 0&&(ve=[]),xe===void 0&&(xe=!1),fe===void 0&&(fe=!1),De===void 0&&(De="");var ze,et=ce,mt;if(this.tokens.links){var _t=Object.keys(this.tokens.links);if(_t.length>0)for(;(mt=this.tokenizer.rules.inline.reflinkSearch.exec(et))!=null;)_t.includes(mt[0].slice(mt[0].lastIndexOf("[")+1,-1))&&(et=et.slice(0,mt.index)+"["+"a".repeat(mt[0].length-2)+"]"+et.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(mt=this.tokenizer.rules.inline.blockSkip.exec(et))!=null;)et=et.slice(0,mt.index)+"["+"a".repeat(mt[0].length-2)+"]"+et.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ce;){if(ze=this.tokenizer.escape(ce)){ce=ce.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.tag(ce,xe,fe)){ce=ce.substring(ze.raw.length),xe=ze.inLink,fe=ze.inRawBlock,ve.push(ze);continue}if(ze=this.tokenizer.link(ce)){ce=ce.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,fe)),ve.push(ze);continue}if(ze=this.tokenizer.reflink(ce,this.tokens.links)){ce=ce.substring(ze.raw.length),ze.type==="link"&&(ze.tokens=this.inlineTokens(ze.text,[],!0,fe)),ve.push(ze);continue}if(ze=this.tokenizer.strong(ce,et,De)){ce=ce.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],xe,fe),ve.push(ze);continue}if(ze=this.tokenizer.em(ce,et,De)){ce=ce.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],xe,fe),ve.push(ze);continue}if(ze=this.tokenizer.codespan(ce)){ce=ce.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.br(ce)){ce=ce.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.del(ce)){ce=ce.substring(ze.raw.length),ze.tokens=this.inlineTokens(ze.text,[],xe,fe),ve.push(ze);continue}if(ze=this.tokenizer.autolink(ce,q)){ce=ce.substring(ze.raw.length),ve.push(ze);continue}if(!xe&&(ze=this.tokenizer.url(ce,q))){ce=ce.substring(ze.raw.length),ve.push(ze);continue}if(ze=this.tokenizer.inlineText(ce,fe,te)){ce=ce.substring(ze.raw.length),De=ze.raw.slice(-1),ve.push(ze);continue}if(ce){var vt="Infinite loop on byte: "+ce.charCodeAt(0);if(this.options.silent){console.error(vt);break}else throw new Error(vt)}}return ve},Ve(ke,null,[{key:"rules",get:function(){return{block:Z,inline:be}}}]),ke}(),Se=h.defaults,Ie=ue.cleanUrl,P=ue.escape,e=function(){function ke(Oe){this.options=Oe||Se}var Re=ke.prototype;return Re.code=function(ce,ve,xe){var fe=(ve||"").match(/\S*/)[0];if(this.options.highlight){var De=this.options.highlight(ce,fe);De!=null&&De!==ce&&(xe=!0,ce=De)}return fe?'<pre><code class="'+this.options.langPrefix+P(fe,!0)+'">'+(xe?ce:P(ce,!0))+`</code></pre>
`:"<pre><code>"+(xe?ce:P(ce,!0))+`</code></pre>
`},Re.blockquote=function(ce){return`<blockquote>
`+ce+`</blockquote>
`},Re.html=function(ce){return ce},Re.heading=function(ce,ve,xe,fe){return this.options.headerIds?"<h"+ve+' id="'+this.options.headerPrefix+fe.slug(xe)+'">'+ce+"</h"+ve+`>
`:"<h"+ve+">"+ce+"</h"+ve+`>
`},Re.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Re.list=function(ce,ve,xe){var fe=ve?"ol":"ul",De=ve&&xe!==1?' start="'+xe+'"':"";return"<"+fe+De+`>
`+ce+"</"+fe+`>
`},Re.listitem=function(ce){return"<li>"+ce+`</li>
`},Re.checkbox=function(ce){return"<input "+(ce?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Re.paragraph=function(ce){return"<p>"+ce+`</p>
`},Re.table=function(ce,ve){return ve&&(ve="<tbody>"+ve+"</tbody>"),`<table>
<thead>
`+ce+`</thead>
`+ve+`</table>
`},Re.tablerow=function(ce){return`<tr>
`+ce+`</tr>
`},Re.tablecell=function(ce,ve){var xe=ve.header?"th":"td",fe=ve.align?"<"+xe+' align="'+ve.align+'">':"<"+xe+">";return fe+ce+"</"+xe+`>
`},Re.strong=function(ce){return"<strong>"+ce+"</strong>"},Re.em=function(ce){return"<em>"+ce+"</em>"},Re.codespan=function(ce){return"<code>"+ce+"</code>"},Re.br=function(){return this.options.xhtml?"<br/>":"<br>"},Re.del=function(ce){return"<del>"+ce+"</del>"},Re.link=function(ce,ve,xe){if(ce=Ie(this.options.sanitize,this.options.baseUrl,ce),ce===null)return xe;var fe='<a href="'+P(ce)+'"';return ve&&(fe+=' title="'+ve+'"'),fe+=">"+xe+"</a>",fe},Re.image=function(ce,ve,xe){if(ce=Ie(this.options.sanitize,this.options.baseUrl,ce),ce===null)return xe;var fe='<img src="'+ce+'" alt="'+xe+'"';return ve&&(fe+=' title="'+ve+'"'),fe+=this.options.xhtml?"/>":">",fe},Re.text=function(ce){return ce},ke}(),i=function(){function ke(){}var Re=ke.prototype;return Re.strong=function(ce){return ce},Re.em=function(ce){return ce},Re.codespan=function(ce){return ce},Re.del=function(ce){return ce},Re.html=function(ce){return ce},Re.text=function(ce){return ce},Re.link=function(ce,ve,xe){return""+xe},Re.image=function(ce,ve,xe){return""+xe},Re.br=function(){return""},ke}(),T=function(){function ke(){this.seen={}}var Re=ke.prototype;return Re.slug=function(ce){var ve=ce.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ve)){var xe=ve;do this.seen[xe]++,ve=xe+"-"+this.seen[xe];while(this.seen.hasOwnProperty(ve))}return this.seen[ve]=0,ve},ke}(),x=h.defaults,A=ue.unescape,oe=function(){function ke(Oe){this.options=Oe||x,this.options.renderer=this.options.renderer||new e,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new i,this.slugger=new T}ke.parse=function(ce,ve){var xe=new ke(ve);return xe.parse(ce)};var Re=ke.prototype;return Re.parse=function(ce,ve){ve===void 0&&(ve=!0);var xe="",fe,De,ze,et,mt,_t,vt,pt,Je,Xe,ot,rt,ft,gt,ct,yt,Ct,nt,At=ce.length;for(fe=0;fe<At;fe++){Xe=ce[fe];switch(Xe.type){case"space":continue;case"hr":{xe+=this.renderer.hr();continue}case"heading":{xe+=this.renderer.heading(this.parseInline(Xe.tokens),Xe.depth,A(this.parseInline(Xe.tokens,this.textRenderer)),this.slugger);continue}case"code":{xe+=this.renderer.code(Xe.text,Xe.lang,Xe.escaped);continue}case"table":{for(pt="",vt="",et=Xe.header.length,De=0;De<et;De++)vt+=this.renderer.tablecell(this.parseInline(Xe.tokens.header[De]),{header:!0,align:Xe.align[De]});for(pt+=this.renderer.tablerow(vt),Je="",et=Xe.cells.length,De=0;De<et;De++){for(_t=Xe.tokens.cells[De],vt="",mt=_t.length,ze=0;ze<mt;ze++)vt+=this.renderer.tablecell(this.parseInline(_t[ze]),{header:!1,align:Xe.align[ze]});Je+=this.renderer.tablerow(vt)}xe+=this.renderer.table(pt,Je);continue}case"blockquote":{Je=this.parse(Xe.tokens),xe+=this.renderer.blockquote(Je);continue}case"list":{for(ot=Xe.ordered,rt=Xe.start,ft=Xe.loose,et=Xe.items.length,Je="",De=0;De<et;De++)ct=Xe.items[De],yt=ct.checked,Ct=ct.task,gt="",ct.task&&(nt=this.renderer.checkbox(yt),ft?ct.tokens.length>0&&ct.tokens[0].type==="text"?(ct.tokens[0].text=nt+" "+ct.tokens[0].text,ct.tokens[0].tokens&&ct.tokens[0].tokens.length>0&&ct.tokens[0].tokens[0].type==="text"&&(ct.tokens[0].tokens[0].text=nt+" "+ct.tokens[0].tokens[0].text)):ct.tokens.unshift({type:"text",text:nt}):gt+=nt),gt+=this.parse(ct.tokens,ft),Je+=this.renderer.listitem(gt,Ct,yt);xe+=this.renderer.list(Je,ot,rt);continue}case"html":{xe+=this.renderer.html(Xe.text);continue}case"paragraph":{xe+=this.renderer.paragraph(this.parseInline(Xe.tokens));continue}case"text":{for(Je=Xe.tokens?this.parseInline(Xe.tokens):Xe.text;fe+1<At&&ce[fe+1].type==="text";)Xe=ce[++fe],Je+=`
`+(Xe.tokens?this.parseInline(Xe.tokens):Xe.text);xe+=ve?this.renderer.paragraph(Je):Je;continue}default:{var kt='Token with "'+Xe.type+'" type was not found.';if(this.options.silent){console.error(kt);return}else throw new Error(kt)}}}return xe},Re.parseInline=function(ce,ve){ve=ve||this.renderer;var xe="",fe,De,ze=ce.length;for(fe=0;fe<ze;fe++){De=ce[fe];switch(De.type){case"escape":{xe+=ve.text(De.text);break}case"html":{xe+=ve.html(De.text);break}case"link":{xe+=ve.link(De.href,De.title,this.parseInline(De.tokens,ve));break}case"image":{xe+=ve.image(De.href,De.title,De.text);break}case"strong":{xe+=ve.strong(this.parseInline(De.tokens,ve));break}case"em":{xe+=ve.em(this.parseInline(De.tokens,ve));break}case"codespan":{xe+=ve.codespan(De.text);break}case"br":{xe+=ve.br();break}case"del":{xe+=ve.del(this.parseInline(De.tokens,ve));break}case"text":{xe+=ve.text(De.text);break}default:{var et='Token with "'+De.type+'" type was not found.';if(this.options.silent){console.error(et);return}else throw new Error(et)}}}return xe},ke}(),_e=ue.merge,He=ue.checkSanitizeDeprecation,Ne=ue.escape,Be=h.getDefaults,$e=h.changeDefaults,tt=h.defaults;function Me(ke,Re,Oe){if(typeof ke=="undefined"||ke===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ke!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ke)+", string expected");if(typeof Re=="function"&&(Oe=Re,Re=null),Re=_e({},Me.defaults,Re||{}),He(Re),Oe){var ce=Re.highlight,ve;try{ve=Ee.lex(ke,Re)}catch(ze){return Oe(ze)}var xe=function(et){var mt;if(!et)try{mt=oe.parse(ve,Re)}catch(_t){et=_t}return Re.highlight=ce,et?Oe(et):Oe(null,mt)};if(!ce||ce.length<3)return xe();if(delete Re.highlight,!ve.length)return xe();var fe=0;Me.walkTokens(ve,function(ze){ze.type==="code"&&(fe++,setTimeout(function(){ce(ze.text,ze.lang,function(et,mt){if(et)return xe(et);mt!=null&&mt!==ze.text&&(ze.text=mt,ze.escaped=!0),fe--,fe===0&&xe()})},0))}),fe===0&&xe();return}try{var De=Ee.lex(ke,Re);return Re.walkTokens&&Me.walkTokens(De,Re.walkTokens),oe.parse(De,Re)}catch(ze){if(ze.message+=`
Please report this to https://github.com/markedjs/marked.`,Re.silent)return"<p>An error occurred:</p><pre>"+Ne(ze.message+"",!0)+"</pre>";throw ze}}Me.options=Me.setOptions=function(ke){return _e(Me.defaults,ke),$e(Me.defaults),Me},Me.getDefaults=Be,Me.defaults=tt,Me.use=function(ke){var Re=_e({},ke);if(ke.renderer&&function(){var ce=Me.defaults.renderer||new e,ve=function(De){var ze=ce[De];ce[De]=function(){for(var et=arguments.length,mt=new Array(et),_t=0;_t<et;_t++)mt[_t]=arguments[_t];var vt=ke.renderer[De].apply(ce,mt);return vt===!1&&(vt=ze.apply(ce,mt)),vt}};for(var xe in ke.renderer)ve(xe);Re.renderer=ce}(),ke.tokenizer&&function(){var ce=Me.defaults.tokenizer||new ee,ve=function(De){var ze=ce[De];ce[De]=function(){for(var et=arguments.length,mt=new Array(et),_t=0;_t<et;_t++)mt[_t]=arguments[_t];var vt=ke.tokenizer[De].apply(ce,mt);return vt===!1&&(vt=ze.apply(ce,mt)),vt}};for(var xe in ke.tokenizer)ve(xe);Re.tokenizer=ce}(),ke.walkTokens){var Oe=Me.defaults.walkTokens;Re.walkTokens=function(ce){ke.walkTokens(ce),Oe&&Oe(ce)}}Me.setOptions(Re)},Me.walkTokens=function(ke,Re){for(var Oe=I(ke),ce;!(ce=Oe()).done;){var ve=ce.value;Re(ve);switch(ve.type){case"table":{for(var xe=I(ve.tokens.header),fe;!(fe=xe()).done;){var De=fe.value;Me.walkTokens(De,Re)}for(var ze=I(ve.tokens.cells),et;!(et=ze()).done;)for(var mt=et.value,_t=I(mt),vt;!(vt=_t()).done;){var pt=vt.value;Me.walkTokens(pt,Re)}break}case"list":{Me.walkTokens(ve.items,Re);break}default:ve.tokens&&Me.walkTokens(ve.tokens,Re)}}},Me.Parser=oe,Me.parser=oe.parse,Me.Renderer=e,Me.TextRenderer=i,Me.Lexer=Ee,Me.lexer=Ee.lex,Me.Tokenizer=ee,Me.Slugger=T,Me.parse=Me;var Pe=Me;return Pe})},E2g8:function(ht,st,me){(function(Fe,Ve){/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/(function(je,r){ht.exports=r()})(this,function(){"use strict";function je(e){var i=typeof e;return e!==null&&(i==="object"||i==="function")}function r(e){return typeof e=="function"}var I=void 0;Array.isArray?I=Array.isArray:I=function(e){return Object.prototype.toString.call(e)==="[object Array]"};var f=I,h=0,m=void 0,u=void 0,o=function(i,T){O[h]=i,O[h+1]=T,h+=2,h===2&&(u?u(w):F())};function p(e){u=e}function s(e){o=e}var t=typeof window!="undefined"?window:void 0,a=t||{},c=a.MutationObserver||a.WebKitMutationObserver,g=typeof self=="undefined"&&typeof Fe!="undefined"&&{}.toString.call(Fe)==="[object process]",y=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function d(){return function(){return Fe.nextTick(w)}}function C(){return typeof m!="undefined"?function(){m(w)}:E()}function k(){var e=0,i=new c(w),T=document.createTextNode("");return i.observe(T,{characterData:!0}),function(){T.data=e=++e%2}}function S(){var e=new MessageChannel;return e.port1.onmessage=w,function(){return e.port2.postMessage(0)}}function E(){var e=setTimeout;return function(){return e(w,1)}}var O=new Array(1e3);function w(){for(var e=0;e<h;e+=2){var i=O[e],T=O[e+1];i(T),O[e]=void 0,O[e+1]=void 0}h=0}function _(){try{var e=Function("return this")().require("vertx");return m=e.runOnLoop||e.runOnContext,C()}catch(i){return E()}}var F=void 0;g?F=d():c?F=k():y?F=S():t===void 0&&!0?F=_():F=E();function M(e,i){var T=this,x=new this.constructor(B);x[X]===void 0&&se(x);var A=T._state;if(A){var oe=arguments[A-1];o(function(){return he(A,x,oe,T._result)})}else ee(T,x,e,i);return x}function b(e){var i=this;if(e&&typeof e=="object"&&e.constructor===i)return e;var T=new i(B);return $(T,e),T}var X=Math.random().toString(36).substring(2);function B(){}var U=void 0,W=1,ne=2;function re(){return new TypeError("You cannot resolve a promise with itself")}function ae(){return new TypeError("A promises callback cannot return that same promise.")}function ue(e,i,T,x){try{e.call(i,T,x)}catch(A){return A}}function V(e,i,T){o(function(x){var A=!1,oe=ue(T,i,function(_e){if(A)return;A=!0,i!==_e?$(x,_e):H(x,_e)},function(_e){if(A)return;A=!0,Y(x,_e)},"Settle: "+(x._label||" unknown promise"));!A&&oe&&(A=!0,Y(x,oe))},e)}function ye(e,i){i._state===W?H(e,i._result):i._state===ne?Y(e,i._result):ee(i,void 0,function(T){return $(e,T)},function(T){return Y(e,T)})}function J(e,i,T){i.constructor===e.constructor&&T===M&&i.constructor.resolve===b?ye(e,i):T===void 0?H(e,i):r(T)?V(e,i,T):H(e,i)}function $(e,i){if(e===i)Y(e,re());else if(je(i)){var T=void 0;try{T=i.then}catch(x){Y(e,x);return}J(e,i,T)}else H(e,i)}function z(e){e._onerror&&e._onerror(e._result),we(e)}function H(e,i){if(e._state!==U)return;e._result=i,e._state=W,e._subscribers.length!==0&&o(we,e)}function Y(e,i){if(e._state!==U)return;e._state=ne,e._result=i,o(z,e)}function ee(e,i,T,x){var A=e._subscribers,oe=A.length;e._onerror=null,A[oe]=i,A[oe+W]=T,A[oe+ne]=x,oe===0&&e._state&&o(we,e)}function we(e){var i=e._subscribers,T=e._state;if(i.length===0)return;for(var x=void 0,A=void 0,oe=e._result,_e=0;_e<i.length;_e+=3)x=i[_e],A=i[_e+T],x?he(T,x,A,oe):A(oe);e._subscribers.length=0}function he(e,i,T,x){var A=r(T),oe=void 0,_e=void 0,He=!0;if(A){try{oe=T(x)}catch(Ne){He=!1,_e=Ne}if(i===oe){Y(i,ae());return}}else oe=x;i._state!==U||(A&&He?$(i,oe):He===!1?Y(i,_e):e===W?H(i,oe):e===ne&&Y(i,oe))}function Ae(e,i){try{i(function(x){$(e,x)},function(x){Y(e,x)})}catch(T){Y(e,T)}}var pe=0;function ge(){return pe++}function se(e){e[X]=pe++,e._state=void 0,e._result=void 0,e._subscribers=[]}function ie(){return new Error("Array Methods must be provided an Array")}var Z=function(){function e(i,T){this._instanceConstructor=i,this.promise=new i(B),this.promise[X]||se(this.promise),f(T)?(this.length=T.length,this._remaining=T.length,this._result=new Array(this.length),this.length===0?H(this.promise,this._result):(this.length=this.length||0,this._enumerate(T),this._remaining===0&&H(this.promise,this._result))):Y(this.promise,ie())}return e.prototype._enumerate=function(T){for(var x=0;this._state===U&&x<T.length;x++)this._eachEntry(T[x],x)},e.prototype._eachEntry=function(T,x){var A=this._instanceConstructor,oe=A.resolve;if(oe===b){var _e=void 0,He=void 0,Ne=!1;try{_e=T.then}catch($e){Ne=!0,He=$e}if(_e===M&&T._state!==U)this._settledAt(T._state,x,T._result);else if(typeof _e!="function")this._remaining--,this._result[x]=T;else if(A===Ie){var Be=new A(B);Ne?Y(Be,He):J(Be,T,_e),this._willSettleAt(Be,x)}else this._willSettleAt(new A(function($e){return $e(T)}),x)}else this._willSettleAt(oe(T),x)},e.prototype._settledAt=function(T,x,A){var oe=this.promise;oe._state===U&&(this._remaining--,T===ne?Y(oe,A):this._result[x]=A),this._remaining===0&&H(oe,this._result)},e.prototype._willSettleAt=function(T,x){var A=this;ee(T,void 0,function(oe){return A._settledAt(W,x,oe)},function(oe){return A._settledAt(ne,x,oe)})},e}();function be(e){return new Z(this,e).promise}function te(e){var i=this;return f(e)?new i(function(T,x){for(var A=e.length,oe=0;oe<A;oe++)i.resolve(e[oe]).then(T,x)}):new i(function(T,x){return x(new TypeError("You must pass an array to race."))})}function q(e){var i=this,T=new i(B);return Y(T,e),T}function Ee(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Se(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Ie=function(){function e(i){this[X]=ge(),this._result=this._state=void 0,this._subscribers=[],B!==i&&(typeof i!="function"&&Ee(),this instanceof e?Ae(this,i):Se())}return e.prototype.catch=function(T){return this.then(null,T)},e.prototype.finally=function(T){var x=this,A=x.constructor;return r(T)?x.then(function(oe){return A.resolve(T()).then(function(){return oe})},function(oe){return A.resolve(T()).then(function(){throw oe})}):x.then(T,T)},e}();Ie.prototype.then=M,Ie.all=be,Ie.race=te,Ie.resolve=b,Ie.reject=q,Ie._setScheduler=p,Ie._setAsap=s,Ie._asap=o;function P(){var e=void 0;if(typeof Ve!="undefined")e=Ve;else if(typeof self!="undefined")e=self;else try{e=Function("return this")()}catch(x){throw new Error("polyfill failed because global object is unavailable in this environment")}var i=e.Promise;if(i){var T=null;try{T=Object.prototype.toString.call(i.resolve())}catch(x){}if(T==="[object Promise]"&&!i.cast)return}e.Promise=Ie}return Ie.polyfill=P,Ie.Promise=Ie,Ie})}).call(this,me("Q2Ig"),me("IyRk"))},GUcZ:function(ht,st,me){"use strict";var Fe=me("fWQN"),Ve=me("mtLc"),je=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(v,D){return v.__proto__=D,v},Object.assign=Object.assign||function(v){if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var D=Object(v),j=1;j<arguments.length;j++){var G=arguments[j];if(G!=null)for(var le in G)G.hasOwnProperty(le)&&(D[le]=G[le])}return D},typeof self.Promise!="function"&&me("E2g8").polyfill()}}]),de}();je.install();var r=je,I=me("+qE3"),f=me.n(I),h=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"e",value:function(v,D){(!v||de.FORCE_GLOBAL_TAG)&&(v=de.GLOBAL_TAG);var j="[".concat(v,"] > ").concat(D);if(de.ENABLE_CALLBACK&&de.emitter.emit("log","error",j),!de.ENABLE_ERROR)return;console.error?console.error(j):console.warn?console.warn(j):console.log(j)}},{key:"i",value:function(v,D){(!v||de.FORCE_GLOBAL_TAG)&&(v=de.GLOBAL_TAG);var j="[".concat(v,"] > ").concat(D);if(de.ENABLE_CALLBACK&&de.emitter.emit("log","info",j),!de.ENABLE_INFO)return;console.info?console.info(j):console.log(j)}},{key:"w",value:function(v,D){(!v||de.FORCE_GLOBAL_TAG)&&(v=de.GLOBAL_TAG);var j="[".concat(v,"] > ").concat(D);if(de.ENABLE_CALLBACK&&de.emitter.emit("log","warn",j),!de.ENABLE_WARN)return;console.warn?console.warn(j):console.log(j)}},{key:"d",value:function(v,D){(!v||de.FORCE_GLOBAL_TAG)&&(v=de.GLOBAL_TAG);var j="[".concat(v,"] > ").concat(D);if(de.ENABLE_CALLBACK&&de.emitter.emit("log","debug",j),!de.ENABLE_DEBUG)return;console.debug?console.debug(j):console.log(j)}},{key:"v",value:function(v,D){(!v||de.FORCE_GLOBAL_TAG)&&(v=de.GLOBAL_TAG);var j="[".concat(v,"] > ").concat(D);if(de.ENABLE_CALLBACK&&de.emitter.emit("log","verbose",j),!de.ENABLE_VERBOSE)return;console.log(j)}}]),de}();h.GLOBAL_TAG="flv.js",h.FORCE_GLOBAL_TAG=!1,h.ENABLE_ERROR=!0,h.ENABLE_INFO=!0,h.ENABLE_WARN=!0,h.ENABLE_DEBUG=!0,h.ENABLE_VERBOSE=!0,h.ENABLE_CALLBACK=!1,h.emitter=new f.a;var m=h,u=function(){function de(){Object(Fe.a)(this,de),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(Ve.a)(de,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(v){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=v,this._totalBytes+=v):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=v,this._totalBytes+=v):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=v,this._totalBytes+=v,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var v=(this._now()-this._lastCheckpoint)/1e3;return v==0&&(v=1),this._intervalBytes/v/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var v=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/v/1024}}]),de}(),o=u,p=me("yKVA"),s=me("879j"),t=function(){function de(Q){Object(Fe.a)(this,de),this._message=Q}return Object(Ve.a)(de,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),de}(),a=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(D){return Object(Fe.a)(this,v),Q.call(this,D)}return Object(Ve.a)(v,[{key:"name",get:function(){return"IllegalStateException"}}]),v}(t),c=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(D){return Object(Fe.a)(this,v),Q.call(this,D)}return Object(Ve.a)(v,[{key:"name",get:function(){return"InvalidArgumentException"}}]),v}(t),g=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(D){return Object(Fe.a)(this,v),Q.call(this,D)}return Object(Ve.a)(v,[{key:"name",get:function(){return"NotImplementedException"}}]),v}(t),y={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},d={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},C=function(){function de(Q){Object(Fe.a)(this,de),this._type=Q||"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(Ve.a)(de,[{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(v){this._onContentLengthKnown=v}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(v){this._onURLRedirect=v}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(v){this._onDataArrival=v}},{key:"onError",get:function(){return this._onError},set:function(v){this._onError=v}},{key:"onComplete",get:function(){return this._onComplete},set:function(v){this._onComplete=v}},{key:"open",value:function(v,D){throw new g("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new g("Unimplemented abstract function!")}}]),de}(),k=me("oZsa");function S(de,Q){for(;!Object.prototype.hasOwnProperty.call(de,Q)&&!(de=Object(k.a)(de),de===null););return de}function E(de,Q,v){return typeof Reflect!="undefined"&&Reflect.get?E=Reflect.get:E=function(j,G,le){var Te=S(j,G);if(!Te)return;var Le=Object.getOwnPropertyDescriptor(Te,G);return Le.get?Le.get.call(le):Le.value},E(de,Q,v||de)}var O={};function w(){var de=self.navigator.userAgent.toLowerCase(),Q=/(edge)\/([\w.]+)/.exec(de)||/(opr)[\/]([\w.]+)/.exec(de)||/(chrome)[ \/]([\w.]+)/.exec(de)||/(iemobile)[\/]([\w.]+)/.exec(de)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(de)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(de)||/(webkit)[ \/]([\w.]+)/.exec(de)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(de)||/(msie) ([\w.]+)/.exec(de)||de.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(de)||de.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(de)||[],v=/(ipad)/.exec(de)||/(ipod)/.exec(de)||/(windows phone)/.exec(de)||/(iphone)/.exec(de)||/(kindle)/.exec(de)||/(android)/.exec(de)||/(windows)/.exec(de)||/(mac)/.exec(de)||/(linux)/.exec(de)||/(cros)/.exec(de)||[],D={browser:Q[5]||Q[3]||Q[1]||"",version:Q[2]||Q[4]||"0",majorVersion:Q[4]||Q[2]||"0",platform:v[0]||""},j={};if(D.browser){j[D.browser]=!0;var G=D.majorVersion.split(".");j.version={major:parseInt(D.majorVersion,10),string:D.version},G.length>1&&(j.version.minor=parseInt(G[1],10)),G.length>2&&(j.version.build=parseInt(G[2],10))}if(D.platform&&(j[D.platform]=!0),(j.chrome||j.opr||j.safari)&&(j.webkit=!0),j.rv||j.iemobile){j.rv&&delete j.rv;var le="msie";D.browser=le,j[le]=!0}if(j.edge){delete j.edge;var Te="msedge";D.browser=Te,j[Te]=!0}if(j.opr){var Le="opera";D.browser=Le,j[Le]=!0}if(j.safari&&j.android){var qe="android";D.browser=qe,j[qe]=!0}j.name=D.browser,j.platform=D.platform;for(var Ke in O)O.hasOwnProperty(Ke)&&delete O[Ke];Object.assign(O,j)}w();var _=O,F=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(D,j){var G;return Object(Fe.a)(this,v),G=Q.call(this,"fetch-stream-loader"),G.TAG="FetchStreamLoader",G._seekHandler=D,G._config=j,G._needStash=!0,G._requestAbort=!1,G._contentLength=null,G._receivedLength=0,G}return Object(Ve.a)(v,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),E(Object(k.a)(v.prototype),"destroy",this).call(this)}},{key:"open",value:function(j,G){var le=this;this._dataSource=j,this._range=G;var Te=j.url;this._config.reuseRedirectedURL&&j.redirectedURL!=null&&(Te=j.redirectedURL);var Le=this._seekHandler.getConfig(Te,G),qe=new self.Headers;if(typeof Le.headers=="object"){var Ke=Le.headers;for(var Ge in Ke)Ke.hasOwnProperty(Ge)&&qe.append(Ge,Ke[Ge])}var lt={method:"GET",headers:qe,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(var it in this._config.headers)qe.append(it,this._config.headers[it]);j.cors===!1&&(lt.mode="same-origin"),j.withCredentials&&(lt.credentials="include"),j.referrerPolicy&&(lt.referrerPolicy=j.referrerPolicy),this._status=y.kConnecting,self.fetch(Le.url,lt).then(function(We){if(le._requestAbort){le._requestAbort=!1,le._status=y.kIdle;return}if(We.ok&&We.status>=200&&We.status<=299){if(We.url!==Le.url&&le._onURLRedirect){var ut=le._seekHandler.removeURLParameters(We.url);le._onURLRedirect(ut)}var Qe=We.headers.get("Content-Length");return Qe!=null&&(le._contentLength=parseInt(Qe),le._contentLength!==0&&(le._onContentLengthKnown&&le._onContentLengthKnown(le._contentLength))),le._pump.call(le,We.body.getReader())}else if(le._status=y.kError,le._onError)le._onError(d.HTTP_STATUS_CODE_INVALID,{code:We.status,msg:We.statusText});else throw new t("FetchStreamLoader: Http code invalid, "+We.status+" "+We.statusText)}).catch(function(We){if(le._status=y.kError,le._onError)le._onError(d.EXCEPTION,{code:-1,msg:We.message});else throw We})}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(j){var G=this;return j.read().then(function(le){if(le.done)if(G._contentLength!==null&&G._receivedLength<G._contentLength){G._status=y.kError;var Te=d.EARLY_EOF,Le={code:-1,msg:"Fetch stream meet Early-EOF"};if(G._onError)G._onError(Te,Le);else throw new t(Le.msg)}else G._status=y.kComplete,G._onComplete&&G._onComplete(G._range.from,G._range.from+G._receivedLength-1);else{if(G._requestAbort===!0)return G._requestAbort=!1,G._status=y.kComplete,j.cancel();G._status=y.kBuffering;var qe=le.value.buffer,Ke=G._range.from+G._receivedLength;G._receivedLength+=qe.byteLength,G._onDataArrival&&G._onDataArrival(qe,Ke,G._receivedLength),G._pump(j)}}).catch(function(le){if(le.code===11&&_.msedge)return;G._status=y.kError;var Te=0,Le=null;if((le.code===19||le.message==="network error")&&(G._contentLength===null||G._contentLength!==null&&G._receivedLength<G._contentLength)?(Te=d.EARLY_EOF,Le={code:le.code,msg:"Fetch stream meet Early-EOF"}):(Te=d.EXCEPTION,Le={code:le.code,msg:le.message}),G._onError)G._onError(Te,Le);else throw new t(Le.msg)})}}],[{key:"isSupported",value:function(){try{var j=_.msedge&&_.version.minor>=15048,G=_.msedge?j:!0;return self.fetch&&self.ReadableStream&&G}catch(le){return!1}}}]),v}(C),M=F,b=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(D,j){var G;return Object(Fe.a)(this,v),G=Q.call(this,"xhr-moz-chunked-loader"),G.TAG="MozChunkedLoader",G._seekHandler=D,G._config=j,G._needStash=!0,G._xhr=null,G._requestAbort=!1,G._contentLength=null,G._receivedLength=0,G}return Object(Ve.a)(v,[{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),E(Object(k.a)(v.prototype),"destroy",this).call(this)}},{key:"open",value:function(j,G){this._dataSource=j,this._range=G;var le=j.url;this._config.reuseRedirectedURL&&j.redirectedURL!=null&&(le=j.redirectedURL);var Te=this._seekHandler.getConfig(le,G);this._requestURL=Te.url;var Le=this._xhr=new XMLHttpRequest;if(Le.open("GET",Te.url,!0),Le.responseType="moz-chunked-arraybuffer",Le.onreadystatechange=this._onReadyStateChange.bind(this),Le.onprogress=this._onProgress.bind(this),Le.onloadend=this._onLoadEnd.bind(this),Le.onerror=this._onXhrError.bind(this),j.withCredentials&&(Le.withCredentials=!0),typeof Te.headers=="object"){var qe=Te.headers;for(var Ke in qe)qe.hasOwnProperty(Ke)&&Le.setRequestHeader(Ke,qe[Ke])}if(typeof this._config.headers=="object"){var Ge=this._config.headers;for(var lt in Ge)Ge.hasOwnProperty(lt)&&Le.setRequestHeader(lt,Ge[lt])}this._status=y.kConnecting,Le.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=y.kComplete}},{key:"_onReadyStateChange",value:function(j){var G=j.target;if(G.readyState===2){if(G.responseURL!=null&&G.responseURL!==this._requestURL&&this._onURLRedirect){var le=this._seekHandler.removeURLParameters(G.responseURL);this._onURLRedirect(le)}if(G.status!==0&&(G.status<200||G.status>299))if(this._status=y.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:G.status,msg:G.statusText});else throw new t("MozChunkedLoader: Http code invalid, "+G.status+" "+G.statusText);else this._status=y.kBuffering}}},{key:"_onProgress",value:function(j){if(this._status===y.kError)return;this._contentLength===null&&(j.total!==null&&j.total!==0&&(this._contentLength=j.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)));var G=j.target.response,le=this._range.from+this._receivedLength;this._receivedLength+=G.byteLength,this._onDataArrival&&this._onDataArrival(G,le,this._receivedLength)}},{key:"_onLoadEnd",value:function(j){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===y.kError)return;this._status=y.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}},{key:"_onXhrError",value:function(j){this._status=y.kError;var G=0,le=null;if(this._contentLength&&j.loaded<this._contentLength?(G=d.EARLY_EOF,le={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(G=d.EXCEPTION,le={code:-1,msg:j.constructor.name+" "+j.type}),this._onError)this._onError(G,le);else throw new t(le.msg)}}],[{key:"isSupported",value:function(){try{var j=new XMLHttpRequest;return j.open("GET","https://example.com",!0),j.responseType="moz-chunked-arraybuffer",j.responseType==="moz-chunked-arraybuffer"}catch(G){return m.w("MozChunkedLoader",G.message),!1}}}]),v}(C),X=b,B=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(D,j){var G;return Object(Fe.a)(this,v),G=Q.call(this,"xhr-msstream-loader"),G.TAG="MSStreamLoader",G._seekHandler=D,G._config=j,G._needStash=!0,G._xhr=null,G._reader=null,G._totalRange=null,G._currentRange=null,G._currentRequestURL=null,G._currentRedirectedURL=null,G._contentLength=null,G._receivedLength=0,G._bufferLimit=16*1024*1024,G._lastTimeBufferSize=0,G._isReconnecting=!1,G}return Object(Ve.a)(v,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),E(Object(k.a)(v.prototype),"destroy",this).call(this)}},{key:"open",value:function(j,G){this._internalOpen(j,G,!1)}},{key:"_internalOpen",value:function(j,G,le){this._dataSource=j,le?this._currentRange=G:this._totalRange=G;var Te=j.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Te=this._currentRedirectedURL:j.redirectedURL!=null&&(Te=j.redirectedURL));var Le=this._seekHandler.getConfig(Te,G);this._currentRequestURL=Le.url;var qe=this._reader=new self.MSStreamReader;qe.onprogress=this._msrOnProgress.bind(this),qe.onload=this._msrOnLoad.bind(this),qe.onerror=this._msrOnError.bind(this);var Ke=this._xhr=new XMLHttpRequest;if(Ke.open("GET",Le.url,!0),Ke.responseType="ms-stream",Ke.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Ke.onerror=this._xhrOnError.bind(this),j.withCredentials&&(Ke.withCredentials=!0),typeof Le.headers=="object"){var Ge=Le.headers;for(var lt in Ge)Ge.hasOwnProperty(lt)&&Ke.setRequestHeader(lt,Ge[lt])}if(typeof this._config.headers=="object"){var it=this._config.headers;for(var We in it)it.hasOwnProperty(We)&&Ke.setRequestHeader(We,it[We])}this._isReconnecting?this._isReconnecting=!1:this._status=y.kConnecting,Ke.send()}},{key:"abort",value:function(){this._internalAbort(),this._status=y.kComplete}},{key:"_internalAbort",value:function(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}},{key:"_xhrOnReadyStateChange",value:function(j){var G=j.target;if(G.readyState===2)if(G.status>=200&&G.status<=299){if(this._status=y.kBuffering,G.responseURL!=null){var le=this._seekHandler.removeURLParameters(G.responseURL);G.responseURL!==this._currentRequestURL&&le!==this._currentRedirectedURL&&(this._currentRedirectedURL=le,this._onURLRedirect&&this._onURLRedirect(le))}var Te=G.getResponseHeader("Content-Length");if(Te!=null&&this._contentLength==null){var Le=parseInt(Te);Le>0&&(this._contentLength=Le,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=y.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:G.status,msg:G.statusText});else throw new t("MSStreamLoader: Http code invalid, "+G.status+" "+G.statusText);else if(G.readyState===3&&(G.status>=200&&G.status<=299)){this._status=y.kBuffering;var qe=G.response;this._reader.readAsArrayBuffer(qe)}}},{key:"_xhrOnError",value:function(j){this._status=y.kError;var G=d.EXCEPTION,le={code:-1,msg:j.constructor.name+" "+j.type};if(this._onError)this._onError(G,le);else throw new t(le.msg)}},{key:"_msrOnProgress",value:function(j){var G=j.target,le=G.result;if(le==null){this._doReconnectIfNeeded();return}var Te=le.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=le.byteLength;var Le=this._totalRange.from+this._receivedLength;this._receivedLength+=Te.byteLength,this._onDataArrival&&this._onDataArrival(Te,Le,this._receivedLength),le.byteLength>=this._bufferLimit&&(m.v(this.TAG,"MSStream buffer exceeded max size near ".concat(Le+Te.byteLength,", reconnecting...")),this._doReconnectIfNeeded())}},{key:"_doReconnectIfNeeded",value:function(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();var j={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,j,!0)}}},{key:"_msrOnLoad",value:function(j){this._status=y.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}},{key:"_msrOnError",value:function(j){this._status=y.kError;var G=0,le=null;if(this._contentLength&&this._receivedLength<this._contentLength?(G=d.EARLY_EOF,le={code:-1,msg:"MSStream meet Early-Eof"}):(G=d.EARLY_EOF,le={code:-1,msg:j.constructor.name+" "+j.type}),this._onError)this._onError(G,le);else throw new t(le.msg)}}],[{key:"isSupported",value:function(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;var j=new XMLHttpRequest;return j.open("GET","https://example.com",!0),j.responseType="ms-stream",j.responseType==="ms-stream"}catch(G){return m.w("MSStreamLoader",G.message),!1}}}]),v}(C),U=B,W=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(D,j){var G;return Object(Fe.a)(this,v),G=Q.call(this,"xhr-range-loader"),G.TAG="RangeLoader",G._seekHandler=D,G._config=j,G._needStash=!1,G._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],G._currentChunkSizeKB=384,G._currentSpeedNormalized=0,G._zeroSpeedChunkCount=0,G._xhr=null,G._speedSampler=new o,G._requestAbort=!1,G._waitForTotalLength=!1,G._totalLengthReceived=!1,G._currentRequestURL=null,G._currentRedirectedURL=null,G._currentRequestRange=null,G._totalLength=null,G._contentLength=null,G._receivedLength=0,G._lastTimeLoaded=0,G}return Object(Ve.a)(v,[{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),E(Object(k.a)(v.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(j,G){this._dataSource=j,this._range=G,this._status=y.kConnecting;var le=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(le=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!le?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}},{key:"_openSubRange",value:function(){var j=this._currentChunkSizeKB*1024,G=this._range.from+this._receivedLength,le=G+j;this._contentLength!=null&&(le-this._range.from>=this._contentLength&&(le=this._range.from+this._contentLength-1)),this._currentRequestRange={from:G,to:le},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(j,G){this._lastTimeLoaded=0;var le=j.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?le=this._currentRedirectedURL:j.redirectedURL!=null&&(le=j.redirectedURL));var Te=this._seekHandler.getConfig(le,G);this._currentRequestURL=Te.url;var Le=this._xhr=new XMLHttpRequest;if(Le.open("GET",Te.url,!0),Le.responseType="arraybuffer",Le.onreadystatechange=this._onReadyStateChange.bind(this),Le.onprogress=this._onProgress.bind(this),Le.onload=this._onLoad.bind(this),Le.onerror=this._onXhrError.bind(this),j.withCredentials&&(Le.withCredentials=!0),typeof Te.headers=="object"){var qe=Te.headers;for(var Ke in qe)qe.hasOwnProperty(Ke)&&Le.setRequestHeader(Ke,qe[Ke])}if(typeof this._config.headers=="object"){var Ge=this._config.headers;for(var lt in Ge)Ge.hasOwnProperty(lt)&&Le.setRequestHeader(lt,Ge[lt])}Le.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(j){var G=j.target;if(G.readyState===2){if(G.responseURL!=null){var le=this._seekHandler.removeURLParameters(G.responseURL);G.responseURL!==this._currentRequestURL&&le!==this._currentRedirectedURL&&(this._currentRedirectedURL=le,this._onURLRedirect&&this._onURLRedirect(le))}if(G.status>=200&&G.status<=299){if(this._waitForTotalLength)return;this._status=y.kBuffering}else if(this._status=y.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:G.status,msg:G.statusText});else throw new t("RangeLoader: Http code invalid, "+G.status+" "+G.statusText)}}},{key:"_onProgress",value:function(j){if(this._status===y.kError)return;if(this._contentLength===null){var G=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,G=!0;var le=j.total;this._internalAbort(),le!=null&le!==0&&(this._totalLength=le)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,G){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var Te=j.loaded-this._lastTimeLoaded;this._lastTimeLoaded=j.loaded,this._speedSampler.addBytes(Te)}},{key:"_normalizeSpeed",value:function(j){var G=this._chunkSizeKBList,le=G.length-1,Te=0,Le=0,qe=le;if(j<G[0])return G[0];for(;Le<=qe;){if(Te=Le+Math.floor((qe-Le)/2),Te===le||j>=G[Te]&&j<G[Te+1])return G[Te];G[Te]<j?Le=Te+1:qe=Te-1}}},{key:"_onLoad",value:function(j){if(this._status===y.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;var G=this._speedSampler.lastSecondKBps;if(G===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(G=this._speedSampler.currentKBps)),G!==0){var le=this._normalizeSpeed(G);this._currentSpeedNormalized!==le&&(this._currentSpeedNormalized=le,this._currentChunkSizeKB=le)}var Te=j.target.response,Le=this._range.from+this._receivedLength;this._receivedLength+=Te.byteLength;var qe=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():qe=!0,this._onDataArrival&&this._onDataArrival(Te,Le,this._receivedLength),qe&&(this._status=y.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},{key:"_onXhrError",value:function(j){this._status=y.kError;var G=0,le=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(G=d.EARLY_EOF,le={code:-1,msg:"RangeLoader meet Early-Eof"}):(G=d.EXCEPTION,le={code:-1,msg:j.constructor.name+" "+j.type}),this._onError)this._onError(G,le);else throw new t(le.msg)}}],[{key:"isSupported",value:function(){try{var j=new XMLHttpRequest;return j.open("GET","https://example.com",!0),j.responseType="arraybuffer",j.responseType==="arraybuffer"}catch(G){return m.w("RangeLoader",G.message),!1}}}]),v}(C),ne=W,re=function(de){Object(p.a)(v,de);var Q=Object(s.a)(v);function v(){var D;return Object(Fe.a)(this,v),D=Q.call(this,"websocket-loader"),D.TAG="WebSocketLoader",D._needStash=!0,D._ws=null,D._requestAbort=!1,D._receivedLength=0,D}return Object(Ve.a)(v,[{key:"destroy",value:function(){this._ws&&this.abort(),E(Object(k.a)(v.prototype),"destroy",this).call(this)}},{key:"open",value:function(j){try{var G=this._ws=new self.WebSocket(j.url);G.binaryType="arraybuffer",G.onopen=this._onWebSocketOpen.bind(this),G.onclose=this._onWebSocketClose.bind(this),G.onmessage=this._onWebSocketMessage.bind(this),G.onerror=this._onWebSocketError.bind(this),this._status=y.kConnecting}catch(Te){this._status=y.kError;var le={code:Te.code,msg:Te.message};if(this._onError)this._onError(d.EXCEPTION,le);else throw new t(le.msg)}}},{key:"abort",value:function(){var j=this._ws;j&&(j.readyState===0||j.readyState===1)&&(this._requestAbort=!0,j.close()),this._ws=null,this._status=y.kComplete}},{key:"_onWebSocketOpen",value:function(j){this._status=y.kBuffering}},{key:"_onWebSocketClose",value:function(j){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=y.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}},{key:"_onWebSocketMessage",value:function(j){var G=this;if(j.data instanceof ArrayBuffer)this._dispatchArrayBuffer(j.data);else if(j.data instanceof Blob){var le=new FileReader;le.onload=function(){G._dispatchArrayBuffer(le.result)},le.readAsArrayBuffer(j.data)}else{this._status=y.kError;var Te={code:-1,msg:"Unsupported WebSocket message type: "+j.data.constructor.name};if(this._onError)this._onError(d.EXCEPTION,Te);else throw new t(Te.msg)}}},{key:"_dispatchArrayBuffer",value:function(j){var G=j,le=this._receivedLength;this._receivedLength+=G.byteLength,this._onDataArrival&&this._onDataArrival(G,le,this._receivedLength)}},{key:"_onWebSocketError",value:function(j){this._status=y.kError;var G={code:j.code,msg:j.message};if(this._onError)this._onError(d.EXCEPTION,G);else throw new t(G.msg)}}],[{key:"isSupported",value:function(){try{return typeof self.WebSocket!="undefined"}catch(j){return!1}}}]),v}(C),ae=re,ue=function(){function de(Q){Object(Fe.a)(this,de),this._zeroStart=Q||!1}return Object(Ve.a)(de,[{key:"getConfig",value:function(v,D){var j={};if(D.from!==0||D.to!==-1){var G;D.to!==-1?G="bytes=".concat(D.from.toString(),"-").concat(D.to.toString()):G="bytes=".concat(D.from.toString(),"-"),j.Range=G}else this._zeroStart&&(j.Range="bytes=0-");return{url:v,headers:j}}},{key:"removeURLParameters",value:function(v){return v}}]),de}(),V=ue,ye=function(){function de(Q,v){Object(Fe.a)(this,de),this._startName=Q,this._endName=v}return Object(Ve.a)(de,[{key:"getConfig",value:function(v,D){var j=v;if(D.from!==0||D.to!==-1){var G=!0;j.indexOf("?")===-1&&(j+="?",G=!1),G&&(j+="&"),j+="".concat(this._startName,"=").concat(D.from.toString()),D.to!==-1&&(j+="&".concat(this._endName,"=").concat(D.to.toString()))}return{url:j,headers:{}}}},{key:"removeURLParameters",value:function(v){var D=v.split("?")[0],j=void 0,G=v.indexOf("?");G!==-1&&(j=v.substring(G+1));var le="";if(j!=null&&j.length>0)for(var Te=j.split("&"),Le=0;Le<Te.length;Le++){var qe=Te[Le].split("="),Ke=Le>0;qe[0]!==this._startName&&qe[0]!==this._endName&&(Ke&&(le+="&"),le+=Te[Le])}return le.length===0?D:D+"?"+le}}]),de}(),J=ye,$=function(){function de(Q,v,D){Object(Fe.a)(this,de),this.TAG="IOController",this._config=v,this._extraData=D,this._stashInitialSize=1024*384,v.stashInitialSize!=null&&v.stashInitialSize>0&&(this._stashInitialSize=v.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,v.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Q,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Q.url),this._refTotalLength=Q.filesize?Q.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new o,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(Ve.a)(de,[{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(v){this._extraData=v}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(v){this._onDataArrival=v}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(v){this._onSeeked=v}},{key:"onError",get:function(){return this._onError},set:function(v){this._onError=v}},{key:"onComplete",get:function(){return this._onComplete},set:function(v){this._onComplete=v}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(v){this._onRedirect=v}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(v){this._onRecoveredEarlyEof=v}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===ne?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var v=this._config;if(v.seekType==="range")this._seekHandler=new V(this._config.rangeLoadZeroStart);else if(v.seekType==="param"){var D=v.seekParamStart||"bstart",j=v.seekParamEnd||"bend";this._seekHandler=new J(D,j)}else if(v.seekType==="custom"){if(typeof v.customSeekHandler!="function")throw new c("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new v.customSeekHandler}else throw new c("Invalid seekType in config: ".concat(v.seekType))}},{key:"_selectLoader",value:function(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=ae;else if(M.isSupported())this._loaderClass=M;else if(X.isSupported())this._loaderClass=X;else if(ne.isSupported())this._loaderClass=ne;else throw new t("Your browser doesn't support xhr with arraybuffer responseType!")}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}},{key:"open",value:function(v){this._currentRange={from:0,to:-1},v&&(this._currentRange.from=v),this._speedSampler.reset(),v||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var v=this._resumeFrom;this._resumeFrom=0,this._internalSeek(v,!0)}}},{key:"seek",value:function(v){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(v,!0)}},{key:"_internalSeek",value:function(v,D){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(D),this._loader.destroy(),this._loader=null;var j={from:v,to:-1};this._currentRange={from:j.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,j),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(v){if(!v||typeof v!="string"||v.length===0)throw new c("Url must be a non-empty string!");this._dataSource.url=v}},{key:"_expandBuffer",value:function(v){for(var D=this._stashSize;D+1024*1024*1<v;)D*=2;if(D+=1024*1024*1,D===this._bufferSize)return;var j=new ArrayBuffer(D);if(this._stashUsed>0){var G=new Uint8Array(this._stashBuffer,0,this._stashUsed),le=new Uint8Array(j,0,D);le.set(G,0)}this._stashBuffer=j,this._bufferSize=D}},{key:"_normalizeSpeed",value:function(v){var D=this._speedNormalizeList,j=D.length-1,G=0,le=0,Te=j;if(v<D[0])return D[0];for(;le<=Te;){if(G=le+Math.floor((Te-le)/2),G===j||v>=D[G]&&v<D[G+1])return D[G];D[G]<v?le=G+1:Te=G-1}}},{key:"_adjustStashSize",value:function(v){var D=0;this._config.isLive||v<512?D=v:v>=512&&v<=1024?D=Math.floor(v*1.5):D=v*2,D>8192&&(D=8192);var j=D*1024+1024*1024*1;this._bufferSize<j&&this._expandBuffer(j),this._stashSize=D*1024}},{key:"_dispatchChunks",value:function(v,D){return this._currentRange.to=D+v.byteLength-1,this._onDataArrival(v,D)}},{key:"_onURLRedirect",value:function(v){this._redirectedURL=v,this._onRedirect&&this._onRedirect(v)}},{key:"_onContentLengthKnown",value:function(v){v&&this._fullRequestFlag&&(this._totalLength=v,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(v,D,j){if(!this._onDataArrival)throw new a("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(v.byteLength);var G=this._speedSampler.lastSecondKBps;if(G!==0){var le=this._normalizeSpeed(G);this._speedNormalized!==le&&(this._speedNormalized=le,this._adjustStashSize(le))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=D),this._stashUsed+v.byteLength<=this._stashSize){var it=new Uint8Array(this._stashBuffer,0,this._stashSize);it.set(new Uint8Array(v),this._stashUsed),this._stashUsed+=v.byteLength}else{var We=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var ut=this._stashBuffer.slice(0,this._stashUsed),Qe=this._dispatchChunks(ut,this._stashByteStart);if(Qe<ut.byteLength){if(Qe>0){var R=new Uint8Array(ut,Qe);We.set(R,0),this._stashUsed=R.byteLength,this._stashByteStart+=Qe}}else this._stashUsed=0,this._stashByteStart+=Qe;this._stashUsed+v.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+v.byteLength),We=new Uint8Array(this._stashBuffer,0,this._bufferSize)),We.set(new Uint8Array(v),this._stashUsed),this._stashUsed+=v.byteLength}else{var n=this._dispatchChunks(v,D);if(n<v.byteLength){var l=v.byteLength-n;l>this._bufferSize&&(this._expandBuffer(l),We=new Uint8Array(this._stashBuffer,0,this._bufferSize)),We.set(new Uint8Array(v,n),0),this._stashUsed+=l,this._stashByteStart=D+n}}}else if(this._stashUsed===0){var Te=this._dispatchChunks(v,D);if(Te<v.byteLength){var Le=v.byteLength-Te;Le>this._bufferSize&&this._expandBuffer(Le);var qe=new Uint8Array(this._stashBuffer,0,this._bufferSize);qe.set(new Uint8Array(v,Te),0),this._stashUsed+=Le,this._stashByteStart=D+Te}}else{this._stashUsed+v.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+v.byteLength);var Ke=new Uint8Array(this._stashBuffer,0,this._bufferSize);Ke.set(new Uint8Array(v),this._stashUsed),this._stashUsed+=v.byteLength;var Ge=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Ge<this._stashUsed&&Ge>0){var lt=new Uint8Array(this._stashBuffer,Ge);Ke.set(lt,0)}this._stashUsed-=Ge,this._stashByteStart+=Ge}}},{key:"_flushStashBuffer",value:function(v){if(this._stashUsed>0){var D=this._stashBuffer.slice(0,this._stashUsed),j=this._dispatchChunks(D,this._stashByteStart),G=D.byteLength-j;if(j<D.byteLength)if(v)m.w(this.TAG,"".concat(G," bytes unconsumed data remain when flush buffer, dropped"));else{if(j>0){var le=new Uint8Array(this._stashBuffer,0,this._bufferSize),Te=new Uint8Array(D,j);le.set(Te,0),this._stashUsed=Te.byteLength,this._stashByteStart+=j}return 0}return this._stashUsed=0,this._stashByteStart=0,G}return 0}},{key:"_onLoaderComplete",value:function(v,D){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(v,D){m.e(this.TAG,"Loader error, code = ".concat(D.code,", msg = ").concat(D.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,v=d.UNRECOVERABLE_EARLY_EOF);switch(v){case d.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){var j=this._currentRange.to+1;j<this._totalLength&&(m.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(j,!1));return}v=d.UNRECOVERABLE_EARLY_EOF;break}case d.UNRECOVERABLE_EARLY_EOF:case d.CONNECTING_TIMEOUT:case d.HTTP_STATUS_CODE_INVALID:case d.EXCEPTION:break}if(this._onError)this._onError(v,D);else throw new t("IOException: "+D.msg)}}]),de}(),z=$,H={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,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 Y(){return Object.assign({},H)}var ee=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var v=new z({},Y()),D=v.loaderType;return v.destroy(),D=="fetch-stream-loader"||D=="xhr-moz-chunked-loader"}},{key:"getNetworkLoaderTypeName",value:function(){var v=new z({},Y()),D=v.loaderType;return v.destroy(),D}},{key:"supportNativeMediaPlayback",value:function(v){de.videoElement==null&&(de.videoElement=window.document.createElement("video"));var D=de.videoElement.canPlayType(v);return D==="probably"||D=="maybe"}},{key:"getFeatureList",value:function(){var v={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return v.mseFlvPlayback=de.supportMSEH264Playback(),v.networkStreamIO=de.supportNetworkStreamIO(),v.networkLoaderName=de.getNetworkLoaderTypeName(),v.mseLiveFlvPlayback=v.mseFlvPlayback&&v.networkStreamIO,v.nativeMP4H264Playback=de.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),v.nativeWebmVP8Playback=de.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),v.nativeWebmVP9Playback=de.supportNativeMediaPlayback('video/webm; codecs="vp9"'),v}}]),de}(),we=ee,he={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"},Ae=he,pe=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"forceGlobalTag",get:function(){return m.FORCE_GLOBAL_TAG},set:function(v){m.FORCE_GLOBAL_TAG=v,de._notifyChange()}},{key:"globalTag",get:function(){return m.GLOBAL_TAG},set:function(v){m.GLOBAL_TAG=v,de._notifyChange()}},{key:"enableAll",get:function(){return m.ENABLE_VERBOSE&&m.ENABLE_DEBUG&&m.ENABLE_INFO&&m.ENABLE_WARN&&m.ENABLE_ERROR},set:function(v){m.ENABLE_VERBOSE=v,m.ENABLE_DEBUG=v,m.ENABLE_INFO=v,m.ENABLE_WARN=v,m.ENABLE_ERROR=v,de._notifyChange()}},{key:"enableDebug",get:function(){return m.ENABLE_DEBUG},set:function(v){m.ENABLE_DEBUG=v,de._notifyChange()}},{key:"enableVerbose",get:function(){return m.ENABLE_VERBOSE},set:function(v){m.ENABLE_VERBOSE=v,de._notifyChange()}},{key:"enableInfo",get:function(){return m.ENABLE_INFO},set:function(v){m.ENABLE_INFO=v,de._notifyChange()}},{key:"enableWarn",get:function(){return m.ENABLE_WARN},set:function(v){m.ENABLE_WARN=v,de._notifyChange()}},{key:"enableError",get:function(){return m.ENABLE_ERROR},set:function(v){m.ENABLE_ERROR=v,de._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:m.GLOBAL_TAG,forceGlobalTag:m.FORCE_GLOBAL_TAG,enableVerbose:m.ENABLE_VERBOSE,enableDebug:m.ENABLE_DEBUG,enableInfo:m.ENABLE_INFO,enableWarn:m.ENABLE_WARN,enableError:m.ENABLE_ERROR,enableCallback:m.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(v){m.GLOBAL_TAG=v.globalTag,m.FORCE_GLOBAL_TAG=v.forceGlobalTag,m.ENABLE_VERBOSE=v.enableVerbose,m.ENABLE_DEBUG=v.enableDebug,m.ENABLE_INFO=v.enableInfo,m.ENABLE_WARN=v.enableWarn,m.ENABLE_ERROR=v.enableError,m.ENABLE_CALLBACK=v.enableCallback}},{key:"_notifyChange",value:function(){var v=de.emitter;if(v.listenerCount("change")>0){var D=de.getConfig();v.emit("change",D)}}},{key:"registerListener",value:function(v){de.emitter.addListener("change",v)}},{key:"removeListener",value:function(v){de.emitter.removeListener("change",v)}},{key:"addLogListener",value:function(v){m.emitter.addListener("log",v),m.emitter.listenerCount("log")>0&&(m.ENABLE_CALLBACK=!0,de._notifyChange())}},{key:"removeLogListener",value:function(v){m.emitter.removeListener("log",v),m.emitter.listenerCount("log")===0&&(m.ENABLE_CALLBACK=!1,de._notifyChange())}}]),de}();pe.emitter=new f.a;var ge=pe,se=function(){function de(){Object(Fe.a)(this,de),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(Ve.a)(de,[{key:"isComplete",value:function(){var v=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,D=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&v&&D}},{key:"isSeekable",value:function(){return this.hasKeyframesIndex===!0}},{key:"getNearestKeyframe",value:function(v){if(this.keyframesIndex==null)return null;var D=this.keyframesIndex,j=this._search(D.times,v);return{index:j,milliseconds:D.times[j],fileposition:D.filepositions[j]}}},{key:"_search",value:function(v,D){var j=0,G=v.length-1,le=0,Te=0,Le=G;for(D<v[0]&&(j=0,Te=Le+1);Te<=Le;)if(le=Te+Math.floor((Le-Te)/2),le===G||D>=v[le]&&D<v[le+1]){j=le;break}else v[le]<D?Te=le+1:Le=le-1;return j}}]),de}(),ie=se;function Z(de,Q,v){var D=de;if(Q+v<D.length){for(;v--;)if((D[++Q]&192)!==128)return!1;return!0}else return!1}function be(de){for(var Q=[],v=de,D=0,j=de.length;D<j;){if(v[D]<128){Q.push(String.fromCharCode(v[D])),++D;continue}else if(!(v[D]<192)){if(v[D]<224){if(Z(v,D,1)){var G=(v[D]&31)<<6|v[D+1]&63;if(G>=128){Q.push(String.fromCharCode(G&65535)),D+=2;continue}}}else if(v[D]<240){if(Z(v,D,2)){var le=(v[D]&15)<<12|(v[D+1]&63)<<6|v[D+2]&63;if(le>=2048&&(le&63488)!==55296){Q.push(String.fromCharCode(le&65535)),D+=3;continue}}}else if(v[D]<248&&Z(v,D,3)){var Te=(v[D]&7)<<18|(v[D+1]&63)<<12|(v[D+2]&63)<<6|v[D+3]&63;if(Te>65536&&Te<1114112){Te-=65536,Q.push(String.fromCharCode(Te>>>10|55296)),Q.push(String.fromCharCode(Te&1023|56320)),D+=4;continue}}}Q.push(String.fromCharCode(65533)),++D}return Q.join("")}var te=be,q=function(){var de=new ArrayBuffer(2);return new DataView(de).setInt16(0,256,!0),new Int16Array(de)[0]===256}(),Ee=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"parseScriptData",value:function(v,D,j){var G={};try{var le=de.parseValue(v,D,j),Te=de.parseValue(v,D+le.size,j-le.size);G[le.data]=Te.data}catch(Le){m.e("AMF",Le.toString())}return G}},{key:"parseObject",value:function(v,D,j){if(j<3)throw new a("Data not enough when parse ScriptDataObject");var G=de.parseString(v,D,j),le=de.parseValue(v,D+G.size,j-G.size),Te=le.objectEnd;return{data:{name:G.data,value:le.data},size:G.size+le.size,objectEnd:Te}}},{key:"parseVariable",value:function(v,D,j){return de.parseObject(v,D,j)}},{key:"parseString",value:function(v,D,j){if(j<2)throw new a("Data not enough when parse String");var G=new DataView(v,D,j),le=G.getUint16(0,!q),Te;return le>0?Te=te(new Uint8Array(v,D+2,le)):Te="",{data:Te,size:2+le}}},{key:"parseLongString",value:function(v,D,j){if(j<4)throw new a("Data not enough when parse LongString");var G=new DataView(v,D,j),le=G.getUint32(0,!q),Te;return le>0?Te=te(new Uint8Array(v,D+4,le)):Te="",{data:Te,size:4+le}}},{key:"parseDate",value:function(v,D,j){if(j<10)throw new a("Data size invalid when parse Date");var G=new DataView(v,D,j),le=G.getFloat64(0,!q),Te=G.getInt16(8,!q);return le+=Te*60*1e3,{data:new Date(le),size:8+2}}},{key:"parseValue",value:function(v,D,j){if(j<1)throw new a("Data not enough when parse Value");var G=new DataView(v,D,j),le=1,Te=G.getUint8(0),Le,qe=!1;try{switch(Te){case 0:Le=G.getFloat64(1,!q),le+=8;break;case 1:{var Ke=G.getUint8(1);Le=!!Ke,le+=1;break}case 2:{var Ge=de.parseString(v,D+1,j-1);Le=Ge.data,le+=Ge.size;break}case 3:{Le={};var lt=0;for((G.getUint32(j-4,!q)&16777215)===9&&(lt=3);le<j-4;){var it=de.parseObject(v,D+le,j-le-lt);if(it.objectEnd)break;Le[it.data.name]=it.data.value,le+=it.size}if(le<=j-3){var We=G.getUint32(le-1,!q)&16777215;We===9&&(le+=3)}break}case 8:{Le={},le+=4;var ut=0;for((G.getUint32(j-4,!q)&16777215)===9&&(ut=3);le<j-8;){var Qe=de.parseVariable(v,D+le,j-le-ut);if(Qe.objectEnd)break;Le[Qe.data.name]=Qe.data.value,le+=Qe.size}if(le<=j-3){var R=G.getUint32(le-1,!q)&16777215;R===9&&(le+=3)}break}case 9:Le=void 0,le=1,qe=!0;break;case 10:{Le=[];var n=G.getUint32(1,!q);le+=4;for(var l=0;l<n;l++){var L=de.parseValue(v,D+le,j-le);Le.push(L.data),le+=L.size}break}case 11:{var K=de.parseDate(v,D+1,j-1);Le=K.data,le+=K.size;break}case 12:{var N=de.parseString(v,D+1,j-1);Le=N.data,le+=N.size;break}default:le=j,m.w("AMF","Unsupported AMF value type "+Te)}}catch(Ce){m.e("AMF",Ce.toString())}return{data:Le,size:le,objectEnd:qe}}}]),de}(),Se=Ee,Ie=function(){function de(Q){Object(Fe.a)(this,de),this.TAG="ExpGolomb",this._buffer=Q,this._buffer_index=0,this._total_bytes=Q.byteLength,this._total_bits=Q.byteLength*8,this._current_word=0,this._current_word_bits_left=0}return Object(Ve.a)(de,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var v=this._total_bytes-this._buffer_index;if(v<=0)throw new a("ExpGolomb: _fillCurrentWord() but no bytes available");var D=Math.min(4,v),j=new Uint8Array(4);j.set(this._buffer.subarray(this._buffer_index,this._buffer_index+D)),this._current_word=new DataView(j.buffer).getUint32(0,!1),this._buffer_index+=D,this._current_word_bits_left=D*8}},{key:"readBits",value:function(v){if(v>32)throw new c("ExpGolomb: readBits() bits exceeded max 32bits!");if(v<=this._current_word_bits_left){var D=this._current_word>>>32-v;return this._current_word<<=v,this._current_word_bits_left-=v,D}var j=this._current_word_bits_left?this._current_word:0;j=j>>>32-this._current_word_bits_left;var G=v-this._current_word_bits_left;this._fillCurrentWord();var le=Math.min(G,this._current_word_bits_left),Te=this._current_word>>>32-le;return this._current_word<<=le,this._current_word_bits_left-=le,j=j<<le|Te,j}},{key:"readBool",value:function(){return this.readBits(1)===1}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var v;for(v=0;v<this._current_word_bits_left;v++)if((this._current_word&2147483648>>>v)!==0)return this._current_word<<=v,this._current_word_bits_left-=v,v;return this._fillCurrentWord(),v+this._skipLeadingZero()}},{key:"readUEG",value:function(){var v=this._skipLeadingZero();return this.readBits(v+1)-1}},{key:"readSEG",value:function(){var v=this.readUEG();return v&1?v+1>>>1:-1*(v>>>1)}}]),de}(),P=Ie,e=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"_ebsp2rbsp",value:function(v){for(var D=v,j=D.byteLength,G=new Uint8Array(j),le=0,Te=0;Te<j;Te++){if(Te>=2&&(D[Te]===3&&D[Te-1]===0&&D[Te-2]===0))continue;G[le]=D[Te],le++}return new Uint8Array(G.buffer,0,le)}},{key:"parseSPS",value:function(v){var D=de._ebsp2rbsp(v),j=new P(D);j.readByte();var G=j.readByte();j.readByte();var le=j.readByte();j.readUEG();var Te=de.getProfileString(G),Le=de.getLevelString(le),qe=1,Ke=420,Ge=[0,420,422,444],lt=8;if((G===100||G===110||G===122||G===244||G===44||G===83||G===86||G===118||G===128||G===138||G===144)&&(qe=j.readUEG(),qe===3&&j.readBits(1),qe<=3&&(Ke=Ge[qe]),lt=j.readUEG()+8,j.readUEG(),j.readBits(1),j.readBool()))for(var it=qe!==3?8:12,We=0;We<it;We++)j.readBool()&&(We<6?de._skipScalingList(j,16):de._skipScalingList(j,64));j.readUEG();var ut=j.readUEG();if(ut===0)j.readUEG();else if(ut===1){j.readBits(1),j.readSEG(),j.readSEG();for(var Qe=j.readUEG(),R=0;R<Qe;R++)j.readSEG()}var n=j.readUEG();j.readBits(1);var l=j.readUEG(),L=j.readUEG(),K=j.readBits(1);K===0&&j.readBits(1),j.readBits(1);var N=0,Ce=0,Ue=0,Ze=0,at=j.readBool();at&&(N=j.readUEG(),Ce=j.readUEG(),Ue=j.readUEG(),Ze=j.readUEG());var Ye=1,dt=1,xt=0,wt=!0,Nt=0,Mt=0,Ot=j.readBool();if(Ot){if(j.readBool()){var Tt=j.readByte(),Kt=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Ht=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Tt>0&&Tt<16?(Ye=Kt[Tt-1],dt=Ht[Tt-1]):Tt===255&&(Ye=j.readByte()<<8|j.readByte(),dt=j.readByte()<<8|j.readByte())}if(j.readBool()&&j.readBool(),j.readBool()&&(j.readBits(4),j.readBool()&&j.readBits(24)),j.readBool()&&(j.readUEG(),j.readUEG()),j.readBool()){var It=j.readBits(32),Pt=j.readBits(32);wt=j.readBool(),Nt=Pt,Mt=It*2,xt=Nt/Mt}}var Wt=1;(Ye!==1||dt!==1)&&(Wt=Ye/dt);var Gt=0,Xt=0;if(qe===0)Gt=1,Xt=2-K;else{var Ft=qe===3?1:2,Yt=qe===1?2:1;Gt=Ft,Xt=Yt*(2-K)}var qt=(l+1)*16,zt=(2-K)*((L+1)*16);qt-=(N+Ce)*Gt,zt-=(Ue+Ze)*Xt;var Bt=Math.ceil(qt*Wt);return j.destroy(),j=null,{profile_string:Te,level_string:Le,bit_depth:lt,ref_frames:n,chroma_format:Ke,chroma_format_string:de.getChromaFormatString(Ke),frame_rate:{fixed:wt,fps:xt,fps_den:Mt,fps_num:Nt},sar_ratio:{width:Ye,height:dt},codec_size:{width:qt,height:zt},present_size:{width:Bt,height:zt}}}},{key:"_skipScalingList",value:function(v,D){for(var j=8,G=8,le=0,Te=0;Te<D;Te++)G!==0&&(le=v.readSEG(),G=(j+le+256)%256),j=G===0?j:G}},{key:"getProfileString",value:function(v){switch(v){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(v){return(v/10).toFixed(1)}},{key:"getChromaFormatString",value:function(v){switch(v){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),de}(),i=e,T={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"},x=T;function A(de){return de>>>8&255|(de&255)<<8}function oe(de){return(de&4278190080)>>>24|(de&16711680)>>>8|(de&65280)<<8|(de&255)<<24}function _e(de,Q){return de[Q]<<24|de[Q+1]<<16|de[Q+2]<<8|de[Q+3]}var He=function(){function de(Q,v){Object(Fe.a)(this,de),this.TAG="FLVDemuxer",this._config=v,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Q.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Q.hasAudioTrack,this._hasVideo=Q.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new ie,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 D=new ArrayBuffer(2);return new DataView(D).setInt16(0,256,!0),new Int16Array(D)[0]===256}()}return Object(Ve.a)(de,[{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(v){return v.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(v){this._onTrackMetadata=v}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(v){this._onMediaInfo=v}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(v){this._onMetaDataArrived=v}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(v){this._onScriptDataArrived=v}},{key:"onError",get:function(){return this._onError},set:function(v){this._onError=v}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(v){this._onDataAvailable=v}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(v){this._timestampBase=v}},{key:"overridedDuration",get:function(){return this._duration},set:function(v){this._durationOverrided=!0,this._duration=v,this._mediaInfo.duration=v}},{key:"overridedHasAudio",set:function(v){this._hasAudioFlagOverrided=!0,this._hasAudio=v,this._mediaInfo.hasAudio=v}},{key:"overridedHasVideo",set:function(v){this._hasVideoFlagOverrided=!0,this._hasVideo=v,this._mediaInfo.hasVideo=v}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new ie}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}},{key:"parseChunks",value:function(v,D){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new a("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var j=0,G=this._littleEndian;if(D===0)if(v.byteLength>13){var le=de.probe(v);j=le.dataOffset}else return 0;if(this._firstParse){this._firstParse=!1,D+j!==this._dataOffset&&m.w(this.TAG,"First time parsing but chunk byteStart invalid!");var Te=new DataView(v,j),Le=Te.getUint32(0,!G);Le!==0&&m.w(this.TAG,"PrevTagSize0 !== 0 !!!"),j+=4}for(;j<v.byteLength;){this._dispatch=!0;var qe=new DataView(v,j);if(j+11+4>v.byteLength)break;var Ke=qe.getUint8(0),Ge=qe.getUint32(0,!G)&16777215;if(j+11+Ge+4>v.byteLength)break;if(Ke!==8&&Ke!==9&&Ke!==18){m.w(this.TAG,"Unsupported tag type ".concat(Ke,", skipped")),j+=11+Ge+4;continue}var lt=qe.getUint8(4),it=qe.getUint8(5),We=qe.getUint8(6),ut=qe.getUint8(7),Qe=We|it<<8|lt<<16|ut<<24,R=qe.getUint32(7,!G)&16777215;R!==0&&m.w(this.TAG,"Meet tag which has StreamID != 0!");var n=j+11;switch(Ke){case 8:this._parseAudioData(v,n,Ge,Qe);break;case 9:this._parseVideoData(v,n,Ge,Qe,D+j);break;case 18:this._parseScriptData(v,n,Ge);break}var l=qe.getUint32(11+Ge,!G);l!==11+Ge&&m.w(this.TAG,"Invalid PrevTagSize ".concat(l)),j+=11+Ge+4}return this._isInitialMetadataDispatched()&&(this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack)),j}},{key:"_parseScriptData",value:function(v,D,j){var G=Se.parseScriptData(v,D,j);if(G.hasOwnProperty("onMetaData")){if(G.onMetaData==null||typeof G.onMetaData!="object"){m.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&m.w(this.TAG,"Found another onMetaData tag!"),this._metadata=G;var le=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},le)),typeof le.hasAudio=="boolean"&&(this._hasAudioFlagOverrided===!1&&(this._hasAudio=le.hasAudio,this._mediaInfo.hasAudio=this._hasAudio)),typeof le.hasVideo=="boolean"&&(this._hasVideoFlagOverrided===!1&&(this._hasVideo=le.hasVideo,this._mediaInfo.hasVideo=this._hasVideo)),typeof le.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=le.audiodatarate),typeof le.videodatarate=="number"&&(this._mediaInfo.videoDataRate=le.videodatarate),typeof le.width=="number"&&(this._mediaInfo.width=le.width),typeof le.height=="number"&&(this._mediaInfo.height=le.height),typeof le.duration=="number"){if(!this._durationOverrided){var Te=Math.floor(le.duration*this._timescale);this._duration=Te,this._mediaInfo.duration=Te}}else this._mediaInfo.duration=0;if(typeof le.framerate=="number"){var Le=Math.floor(le.framerate*1e3);if(Le>0){var qe=Le/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=qe,this._referenceFrameRate.fps_num=Le,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=qe}}if(typeof le.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;var Ke=le.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Ke),le.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=le,m.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(G).length>0&&(this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},G)))}},{key:"_parseKeyframesIndex",value:function(v){for(var D=[],j=[],G=1;G<v.times.length;G++){var le=this._timestampBase+Math.floor(v.times[G]*1e3);D.push(le),j.push(v.filepositions[G])}return{times:D,filepositions:j}}},{key:"_parseAudioData",value:function(v,D,j,G){if(j<=1){m.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;var le=this._littleEndian,Te=new DataView(v,D,j),Le=Te.getUint8(0),qe=Le>>>4;if(qe!==2&&qe!==10){this._onError(x.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+qe);return}var Ke=0,Ge=(Le&12)>>>2;if(Ge>=0&&Ge<=4)Ke=this._flvSoundRateTable[Ge];else{this._onError(x.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Ge);return}var lt=(Le&2)>>>1,it=Le&1,We=this._audioMetadata,ut=this._audioTrack;if(We||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),We=this._audioMetadata={},We.type="audio",We.id=ut.id,We.timescale=this._timescale,We.duration=this._duration,We.audioSampleRate=Ke,We.channelCount=it===0?1:2),qe===10){var Qe=this._parseAACAudioData(v,D+1,j-1);if(Qe==null)return;if(Qe.packetType===0){We.config&&m.w(this.TAG,"Found another AudioSpecificConfig!");var R=Qe.data;We.audioSampleRate=R.samplingRate,We.channelCount=R.channelCount,We.codec=R.codec,We.originalCodec=R.originalCodec,We.config=R.config,We.refSampleDuration=1024/We.audioSampleRate*We.timescale,m.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",We);var n=this._mediaInfo;n.audioCodec=We.originalCodec,n.audioSampleRate=We.audioSampleRate,n.audioChannelCount=We.channelCount,n.hasVideo?n.videoCodec!=null&&(n.mimeType='video/x-flv; codecs="'+n.videoCodec+","+n.audioCodec+'"'):n.mimeType='video/x-flv; codecs="'+n.audioCodec+'"',n.isComplete()&&this._onMediaInfo(n)}else if(Qe.packetType===1){var l=this._timestampBase+G,L={unit:Qe.data,length:Qe.data.byteLength,dts:l,pts:l};ut.samples.push(L),ut.length+=Qe.data.length}else m.e(this.TAG,"Flv: Unsupported AAC data type ".concat(Qe.packetType))}else if(qe===2){if(!We.codec){var K=this._parseMP3AudioData(v,D+1,j-1,!0);if(K==null)return;We.audioSampleRate=K.samplingRate,We.channelCount=K.channelCount,We.codec=K.codec,We.originalCodec=K.originalCodec,We.refSampleDuration=1152/We.audioSampleRate*We.timescale,m.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",We);var N=this._mediaInfo;N.audioCodec=We.codec,N.audioSampleRate=We.audioSampleRate,N.audioChannelCount=We.channelCount,N.audioDataRate=K.bitRate,N.hasVideo?N.videoCodec!=null&&(N.mimeType='video/x-flv; codecs="'+N.videoCodec+","+N.audioCodec+'"'):N.mimeType='video/x-flv; codecs="'+N.audioCodec+'"',N.isComplete()&&this._onMediaInfo(N)}var Ce=this._parseMP3AudioData(v,D+1,j-1,!1);if(Ce==null)return;var Ue=this._timestampBase+G,Ze={unit:Ce,length:Ce.byteLength,dts:Ue,pts:Ue};ut.samples.push(Ze),ut.length+=Ce.length}}},{key:"_parseAACAudioData",value:function(v,D,j){if(j<=1){m.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}var G={},le=new Uint8Array(v,D,j);return G.packetType=le[0],le[0]===0?G.data=this._parseAACAudioSpecificConfig(v,D+1,j-1):G.data=le.subarray(1),G}},{key:"_parseAACAudioSpecificConfig",value:function(v,D,j){var G=new Uint8Array(v,D,j),le=null,Te=0,Le=0,qe=null,Ke=0,Ge=null;if(Te=Le=G[0]>>>3,Ke=(G[0]&7)<<1|G[1]>>>7,Ke<0||Ke>=this._mpegSamplingRates.length){this._onError(x.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}var lt=this._mpegSamplingRates[Ke],it=(G[1]&120)>>>3;if(it<0||it>=8){this._onError(x.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Te===5&&(Ge=(G[1]&7)<<1|G[2]>>>7,qe=(G[2]&124)>>>2);var We=self.navigator.userAgent.toLowerCase();return We.indexOf("firefox")!==-1?Ke>=6?(Te=5,le=new Array(4),Ge=Ke-3):(Te=2,le=new Array(2),Ge=Ke):We.indexOf("android")!==-1?(Te=2,le=new Array(2),Ge=Ke):(Te=5,Ge=Ke,le=new Array(4),Ke>=6?Ge=Ke-3:it===1&&(Te=2,le=new Array(2),Ge=Ke)),le[0]=Te<<3,le[0]|=(Ke&15)>>>1,le[1]=(Ke&15)<<7,le[1]|=(it&15)<<3,Te===5&&(le[1]|=(Ge&15)>>>1,le[2]=(Ge&1)<<7,le[2]|=2<<2,le[3]=0),{config:le,samplingRate:lt,channelCount:it,codec:"mp4a.40."+Te,originalCodec:"mp4a.40."+Le}}},{key:"_parseMP3AudioData",value:function(v,D,j,G){if(j<4){m.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}var le=this._littleEndian,Te=new Uint8Array(v,D,j),Le=null;if(G){if(Te[0]!==255)return;var qe=Te[1]>>>3&3,Ke=(Te[1]&6)>>1,Ge=(Te[2]&240)>>>4,lt=(Te[2]&12)>>>2,it=Te[3]>>>6&3,We=it!==3?2:1,ut=0,Qe=0,R=34,n="mp3";switch(qe){case 0:ut=this._mpegAudioV25SampleRateTable[lt];break;case 2:ut=this._mpegAudioV20SampleRateTable[lt];break;case 3:ut=this._mpegAudioV10SampleRateTable[lt];break}switch(Ke){case 1:R=34,Ge<this._mpegAudioL3BitRateTable.length&&(Qe=this._mpegAudioL3BitRateTable[Ge]);break;case 2:R=33,Ge<this._mpegAudioL2BitRateTable.length&&(Qe=this._mpegAudioL2BitRateTable[Ge]);break;case 3:R=32,Ge<this._mpegAudioL1BitRateTable.length&&(Qe=this._mpegAudioL1BitRateTable[Ge]);break}Le={bitRate:Qe,samplingRate:ut,channelCount:We,codec:n,originalCodec:n}}else Le=Te;return Le}},{key:"_parseVideoData",value:function(v,D,j,G,le){if(j<=1){m.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;var Te=new Uint8Array(v,D,j)[0],Le=(Te&240)>>>4,qe=Te&15;if(qe!==7){this._onError(x.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(qe));return}this._parseAVCVideoPacket(v,D+1,j-1,G,le,Le)}},{key:"_parseAVCVideoPacket",value:function(v,D,j,G,le,Te){if(j<4){m.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}var Le=this._littleEndian,qe=new DataView(v,D,j),Ke=qe.getUint8(0),Ge=qe.getUint32(0,!Le)&16777215,lt=Ge<<8>>8;if(Ke===0)this._parseAVCDecoderConfigurationRecord(v,D+4,j-4);else if(Ke===1)this._parseAVCVideoData(v,D+4,j-4,G,le,Te,lt);else if(!(Ke===2)){this._onError(x.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(Ke));return}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(v,D,j){if(j<7){m.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}var G=this._videoMetadata,le=this._videoTrack,Te=this._littleEndian,Le=new DataView(v,D,j);G?typeof G.avcc!="undefined"&&m.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),G=this._videoMetadata={},G.type="video",G.id=le.id,G.timescale=this._timescale,G.duration=this._duration);var qe=Le.getUint8(0),Ke=Le.getUint8(1),Ge=Le.getUint8(2),lt=Le.getUint8(3);if(qe!==1||Ke===0){this._onError(x.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Le.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(x.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));return}var it=Le.getUint8(5)&31;if(it===0){this._onError(x.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else it>1&&m.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(it));for(var We=6,ut=0;ut<it;ut++){var Qe=Le.getUint16(We,!Te);if(We+=2,Qe===0)continue;var R=new Uint8Array(v,D+We,Qe);We+=Qe;var n=i.parseSPS(R);if(ut!==0)continue;G.codecWidth=n.codec_size.width,G.codecHeight=n.codec_size.height,G.presentWidth=n.present_size.width,G.presentHeight=n.present_size.height,G.profile=n.profile_string,G.level=n.level_string,G.bitDepth=n.bit_depth,G.chromaFormat=n.chroma_format,G.sarRatio=n.sar_ratio,G.frameRate=n.frame_rate,(n.frame_rate.fixed===!1||n.frame_rate.fps_num===0||n.frame_rate.fps_den===0)&&(G.frameRate=this._referenceFrameRate);var l=G.frameRate.fps_den,L=G.frameRate.fps_num;G.refSampleDuration=G.timescale*(l/L);for(var K=R.subarray(1,4),N="avc1.",Ce=0;Ce<3;Ce++){var Ue=K[Ce].toString(16);Ue.length<2&&(Ue="0"+Ue),N+=Ue}G.codec=N;var Ze=this._mediaInfo;Ze.width=G.codecWidth,Ze.height=G.codecHeight,Ze.fps=G.frameRate.fps,Ze.profile=G.profile,Ze.level=G.level,Ze.refFrames=n.ref_frames,Ze.chromaFormat=n.chroma_format_string,Ze.sarNum=G.sarRatio.width,Ze.sarDen=G.sarRatio.height,Ze.videoCodec=N,Ze.hasAudio?Ze.audioCodec!=null&&(Ze.mimeType='video/x-flv; codecs="'+Ze.videoCodec+","+Ze.audioCodec+'"'):Ze.mimeType='video/x-flv; codecs="'+Ze.videoCodec+'"',Ze.isComplete()&&this._onMediaInfo(Ze)}var at=Le.getUint8(We);if(at===0){this._onError(x.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else at>1&&m.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(at));We++;for(var Ye=0;Ye<at;Ye++){var dt=Le.getUint16(We,!Te);if(We+=2,dt===0)continue;We+=dt}G.avcc=new Uint8Array(j),G.avcc.set(new Uint8Array(v,D,j),0),m.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",G)}},{key:"_parseAVCVideoData",value:function(v,D,j,G,le,Te,Le){for(var qe=this._littleEndian,Ke=new DataView(v,D,j),Ge=[],lt=0,it=0,We=this._naluLengthSize,ut=this._timestampBase+G,Qe=Te===1;it<j;){if(it+4>=j){m.w(this.TAG,"Malformed Nalu near timestamp ".concat(ut,", offset = ").concat(it,", dataSize = ").concat(j));break}var R=Ke.getUint32(it,!qe);if(We===3&&(R>>>=8),R>j-We){m.w(this.TAG,"Malformed Nalus near timestamp ".concat(ut,", NaluSize > DataSize!"));return}var n=Ke.getUint8(it+We)&31;n===5&&(Qe=!0);var l=new Uint8Array(v,D+it,We+R),L={type:n,data:l};Ge.push(L),lt+=l.byteLength,it+=We+R}if(Ge.length){var K=this._videoTrack,N={units:Ge,length:lt,isKeyframe:Qe,dts:ut,cts:Le,pts:ut+Le};Qe&&(N.fileposition=le),K.samples.push(N),K.length+=lt}}}],[{key:"probe",value:function(v){var D=new Uint8Array(v),j={match:!1};if(D[0]!==70||D[1]!==76||D[2]!==86||D[3]!==1)return j;var G=(D[4]&4)>>>2!==0,le=(D[4]&1)!==0,Te=_e(D,5);return Te<9?j:{match:!0,consumed:Te,dataOffset:Te,hasAudioTrack:G,hasVideoTrack:le}}}]),de}(),Ne=He,Be=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"init",value:function(){de.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(var v in de.types)de.types.hasOwnProperty(v)&&(de.types[v]=[v.charCodeAt(0),v.charCodeAt(1),v.charCodeAt(2),v.charCodeAt(3)]);var D=de.constants={};D.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),D.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),D.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),D.STSC=D.STCO=D.STTS,D.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),D.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]),D.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]),D.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),D.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),D.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(v){for(var D=8,j=null,G=Array.prototype.slice.call(arguments,1),le=G.length,Te=0;Te<le;Te++)D+=G[Te].byteLength;j=new Uint8Array(D),j[0]=D>>>24&255,j[1]=D>>>16&255,j[2]=D>>>8&255,j[3]=D&255,j.set(v,4);for(var Le=8,qe=0;qe<le;qe++)j.set(G[qe],Le),Le+=G[qe].byteLength;return j}},{key:"generateInitSegment",value:function(v){var D=de.box(de.types.ftyp,de.constants.FTYP),j=de.moov(v),G=new Uint8Array(D.byteLength+j.byteLength);return G.set(D,0),G.set(j,D.byteLength),G}},{key:"moov",value:function(v){var D=de.mvhd(v.timescale,v.duration),j=de.trak(v),G=de.mvex(v);return de.box(de.types.moov,D,j,G)}},{key:"mvhd",value:function(v,D){return de.box(de.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,v>>>24&255,v>>>16&255,v>>>8&255,v&255,D>>>24&255,D>>>16&255,D>>>8&255,D&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}},{key:"trak",value:function(v){return de.box(de.types.trak,de.tkhd(v),de.mdia(v))}},{key:"tkhd",value:function(v){var D=v.id,j=v.duration,G=v.presentWidth,le=v.presentHeight;return de.box(de.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,D>>>24&255,D>>>16&255,D>>>8&255,D&255,0,0,0,0,j>>>24&255,j>>>16&255,j>>>8&255,j&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,G>>>8&255,G&255,0,0,le>>>8&255,le&255,0,0]))}},{key:"mdia",value:function(v){return de.box(de.types.mdia,de.mdhd(v),de.hdlr(v),de.minf(v))}},{key:"mdhd",value:function(v){var D=v.timescale,j=v.duration;return de.box(de.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,D>>>24&255,D>>>16&255,D>>>8&255,D&255,j>>>24&255,j>>>16&255,j>>>8&255,j&255,85,196,0,0]))}},{key:"hdlr",value:function(v){var D=null;return v.type==="audio"?D=de.constants.HDLR_AUDIO:D=de.constants.HDLR_VIDEO,de.box(de.types.hdlr,D)}},{key:"minf",value:function(v){var D=null;return v.type==="audio"?D=de.box(de.types.smhd,de.constants.SMHD):D=de.box(de.types.vmhd,de.constants.VMHD),de.box(de.types.minf,D,de.dinf(),de.stbl(v))}},{key:"dinf",value:function(){var v=de.box(de.types.dinf,de.box(de.types.dref,de.constants.DREF));return v}},{key:"stbl",value:function(v){var D=de.box(de.types.stbl,de.stsd(v),de.box(de.types.stts,de.constants.STTS),de.box(de.types.stsc,de.constants.STSC),de.box(de.types.stsz,de.constants.STSZ),de.box(de.types.stco,de.constants.STCO));return D}},{key:"stsd",value:function(v){return v.type==="audio"?v.codec==="mp3"?de.box(de.types.stsd,de.constants.STSD_PREFIX,de.mp3(v)):de.box(de.types.stsd,de.constants.STSD_PREFIX,de.mp4a(v)):de.box(de.types.stsd,de.constants.STSD_PREFIX,de.avc1(v))}},{key:"mp3",value:function(v){var D=v.channelCount,j=v.audioSampleRate,G=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,D,0,16,0,0,0,0,j>>>8&255,j&255,0,0]);return de.box(de.types[".mp3"],G)}},{key:"mp4a",value:function(v){var D=v.channelCount,j=v.audioSampleRate,G=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,D,0,16,0,0,0,0,j>>>8&255,j&255,0,0]);return de.box(de.types.mp4a,G,de.esds(v))}},{key:"esds",value:function(v){var D=v.config||[],j=D.length,G=new Uint8Array([0,0,0,0,3,23+j,0,1,0,4,15+j,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([j]).concat(D).concat([6,1,2]));return de.box(de.types.esds,G)}},{key:"avc1",value:function(v){var D=v.avcc,j=v.codecWidth,G=v.codecHeight,le=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,j>>>8&255,j&255,G>>>8&255,G&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return de.box(de.types.avc1,le,de.box(de.types.avcC,D))}},{key:"mvex",value:function(v){return de.box(de.types.mvex,de.trex(v))}},{key:"trex",value:function(v){var D=v.id,j=new Uint8Array([0,0,0,0,D>>>24&255,D>>>16&255,D>>>8&255,D&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return de.box(de.types.trex,j)}},{key:"moof",value:function(v,D){return de.box(de.types.moof,de.mfhd(v.sequenceNumber),de.traf(v,D))}},{key:"mfhd",value:function(v){var D=new Uint8Array([0,0,0,0,v>>>24&255,v>>>16&255,v>>>8&255,v&255]);return de.box(de.types.mfhd,D)}},{key:"traf",value:function(v,D){var j=v.id,G=de.box(de.types.tfhd,new Uint8Array([0,0,0,0,j>>>24&255,j>>>16&255,j>>>8&255,j&255])),le=de.box(de.types.tfdt,new Uint8Array([0,0,0,0,D>>>24&255,D>>>16&255,D>>>8&255,D&255])),Te=de.sdtp(v),Le=de.trun(v,Te.byteLength+16+16+8+16+8+8);return de.box(de.types.traf,G,le,Le,Te)}},{key:"sdtp",value:function(v){for(var D=v.samples||[],j=D.length,G=new Uint8Array(4+j),le=0;le<j;le++){var Te=D[le].flags;G[le+4]=Te.isLeading<<6|Te.dependsOn<<4|Te.isDependedOn<<2|Te.hasRedundancy}return de.box(de.types.sdtp,G)}},{key:"trun",value:function(v,D){var j=v.samples||[],G=j.length,le=12+16*G,Te=new Uint8Array(le);D+=8+le,Te.set([0,0,15,1,G>>>24&255,G>>>16&255,G>>>8&255,G&255,D>>>24&255,D>>>16&255,D>>>8&255,D&255],0);for(var Le=0;Le<G;Le++){var qe=j[Le].duration,Ke=j[Le].size,Ge=j[Le].flags,lt=j[Le].cts;Te.set([qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,Ke>>>24&255,Ke>>>16&255,Ke>>>8&255,Ke&255,Ge.isLeading<<2|Ge.dependsOn,Ge.isDependedOn<<6|Ge.hasRedundancy<<4|Ge.isNonSync,0,0,lt>>>24&255,lt>>>16&255,lt>>>8&255,lt&255],12+16*Le)}return de.box(de.types.trun,Te)}},{key:"mdat",value:function(v){return de.box(de.types.mdat,v)}}]),de}();Be.init();var $e=Be,tt=function(){function de(){Object(Fe.a)(this,de)}return Object(Ve.a)(de,null,[{key:"getSilentFrame",value:function(v,D){if(v==="mp4a.40.2"){if(D===1)return new Uint8Array([0,200,0,128,35,128]);if(D===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(D===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(D===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(D===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(D===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(D===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(D===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(D===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}]),de}(),Me=tt,Pe=function de(Q,v,D,j,G){Object(Fe.a)(this,de),this.dts=Q,this.pts=v,this.duration=D,this.originalDts=j,this.isSyncPoint=G,this.fileposition=null},ke=function(){function de(){Object(Fe.a)(this,de),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(Ve.a)(de,[{key:"appendSyncPoint",value:function(v){v.isSyncPoint=!0,this.syncPoints.push(v)}}]),de}(),Re=function(){function de(){Object(Fe.a)(this,de),this._list=[]}return Object(Ve.a)(de,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(v){var D=this._list;if(v.length===0)return;D.length>0&&v[0].originalDts<D[D.length-1].originalDts&&this.clear(),Array.prototype.push.apply(D,v)}},{key:"getLastSyncPointBeforeDts",value:function(v){if(this._list.length==0)return null;var D=this._list,j=0,G=D.length-1,le=0,Te=0,Le=G;for(v<D[0].dts&&(j=0,Te=Le+1);Te<=Le;)if(le=Te+Math.floor((Le-Te)/2),le===G||v>=D[le].dts&&v<D[le+1].dts){j=le;break}else D[le].dts<v?Te=le+1:Le=le-1;return this._list[j]}}]),de}(),Oe=function(){function de(Q){Object(Fe.a)(this,de),this._type=Q,this._list=[],this._lastAppendLocation=-1}return Object(Ve.a)(de,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return this._list.length===0}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(v){var D=this._list;if(D.length===0)return-2;var j=D.length-1,G=0,le=0,Te=j,Le=0;if(v<D[0].originalBeginDts)return Le=-1,Le;for(;le<=Te;)if(G=le+Math.floor((Te-le)/2),G===j||v>D[G].lastSample.originalDts&&v<D[G+1].originalBeginDts){Le=G;break}else D[G].originalBeginDts<v?le=G+1:Te=G-1;return Le}},{key:"_searchNearestSegmentAfter",value:function(v){return this._searchNearestSegmentBefore(v)+1}},{key:"append",value:function(v){var D=this._list,j=v,G=this._lastAppendLocation,le=0;G!==-1&&G<D.length&&j.originalBeginDts>=D[G].lastSample.originalDts&&(G===D.length-1||G<D.length-1&&j.originalBeginDts<D[G+1].originalBeginDts)?le=G+1:D.length>0&&(le=this._searchNearestSegmentBefore(j.originalBeginDts)+1),this._lastAppendLocation=le,this._list.splice(le,0,j)}},{key:"getLastSegmentBefore",value:function(v){var D=this._searchNearestSegmentBefore(v);return D>=0?this._list[D]:null}},{key:"getLastSampleBefore",value:function(v){var D=this.getLastSegmentBefore(v);return D!=null?D.lastSample:null}},{key:"getLastSyncPointBefore",value:function(v){for(var D=this._searchNearestSegmentBefore(v),j=this._list[D].syncPoints;j.length===0&&D>0;)D--,j=this._list[D].syncPoints;return j.length>0?j[j.length-1]:null}}]),de}(),ce=function(){function de(Q){Object(Fe.a)(this,de),this.TAG="MP4Remuxer",this._config=Q,this._isLive=Q.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=Infinity,this._videoDtsBase=Infinity,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Oe("audio"),this._videoSegmentInfoList=new Oe("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(_.chrome&&(_.version.major<50||_.version.major===50&&_.version.build<2661)),this._fillSilentAfterSeek=_.msedge||_.msie,this._mp3UseMpegAudio=!_.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return Object(Ve.a)(de,[{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(v){return v.onDataAvailable=this.remux.bind(this),v.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(v){this._onInitSegment=v}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(v){this._onMediaSegment=v}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(v){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(v,D){if(!this._onMediaSegment)throw new a("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(v,D),this._remuxVideo(D),this._remuxAudio(v)}},{key:"_onTrackMetadataReceived",value:function(v,D){var j=null,G="mp4",le=D.codec;if(v==="audio")this._audioMeta=D,D.codec==="mp3"&&this._mp3UseMpegAudio?(G="mpeg",le="",j=new Uint8Array):j=$e.generateInitSegment(D);else if(v==="video")this._videoMeta=D,j=$e.generateInitSegment(D);else return;if(!this._onInitSegment)throw new a("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(v,{type:v,data:j.buffer,codec:le,container:"".concat(v,"/").concat(G),mediaDuration:D.duration})}},{key:"_calculateDtsBase",value:function(v,D){if(this._dtsBaseInited)return;v.samples&&v.samples.length&&(this._audioDtsBase=v.samples[0].dts),D.samples&&D.samples.length&&(this._videoDtsBase=D.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0}},{key:"flushStashedSamples",value:function(){var v=this._videoStashedLastSample,D=this._audioStashedLastSample,j={type:"video",id:1,sequenceNumber:0,samples:[],length:0};v!=null&&(j.samples.push(v),j.length=v.length);var G={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};D!=null&&(G.samples.push(D),G.length=D.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(j,!0),this._remuxAudio(G,!0)}},{key:"_remuxAudio",value:function(v,D){if(this._audioMeta==null)return;var j=v,G=j.samples,le=void 0,Te=-1,Le=-1,qe=-1,Ke=this._audioMeta.refSampleDuration,Ge=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,lt=this._dtsBaseInited&&this._audioNextDts===void 0,it=!1;if(!G||G.length===0)return;if(G.length===1&&!D)return;var We=0,ut=null,Qe=0;Ge?(We=0,Qe=j.length):(We=8,Qe=8+j.length);var R=null;if(G.length>1&&(R=G.pop(),Qe-=R.length),this._audioStashedLastSample!=null){var n=this._audioStashedLastSample;this._audioStashedLastSample=null,G.unshift(n),Qe+=n.length}R!=null&&(this._audioStashedLastSample=R);var l=G[0].dts-this._dtsBase;if(this._audioNextDts)le=l-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())le=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&(this._audioMeta.originalCodec!=="mp3"&&(it=!0));else{var L=this._audioSegmentInfoList.getLastSampleBefore(l);if(L!=null){var K=l-(L.originalDts+L.duration);K<=3&&(K=0);var N=L.dts+L.duration+K;le=l-N}else le=0}if(it){var Ce=l-le,Ue=this._videoSegmentInfoList.getLastSegmentBefore(l);if(Ue!=null&&Ue.beginDts<Ce){var Ze=Me.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Ze){var at=Ue.beginDts,Ye=Ce-Ue.beginDts;m.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(at,", duration: ").concat(Ye)),G.unshift({unit:Ze,dts:at,pts:at}),Qe+=Ze.byteLength}}else it=!1}for(var dt=[],xt=0;xt<G.length;xt++){var wt=G[xt],Nt=wt.unit,Mt=wt.dts-this._dtsBase,Ot=Mt-le;Te===-1&&(Te=Ot);var Tt=0;if(xt!==G.length-1){var Kt=G[xt+1].dts-this._dtsBase-le;Tt=Kt-Ot}else if(R!=null){var Ht=R.dts-this._dtsBase-le;Tt=Ht-Ot}else dt.length>=1?Tt=dt[dt.length-1].duration:Tt=Math.floor(Ke);var It=!1,Pt=null;if(Tt>Ke*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!_.safari){It=!0;var Wt=Math.abs(Tt-Ke),Gt=Math.ceil(Wt/Ke),Xt=Ot+Ke;m.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
`+"dts: ".concat(Ot+Tt," ms, expected: ").concat(Ot+Math.round(Ke)," ms, ")+"delta: ".concat(Math.round(Wt)," ms, generate: ").concat(Gt," frames"));var Ft=Me.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Ft==null&&(m.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),Ft=Nt),Pt=[];for(var Yt=0;Yt<Gt;Yt++){var qt=Math.round(Xt);if(Pt.length>0){var zt=Pt[Pt.length-1];zt.duration=qt-zt.dts}var Bt={dts:qt,pts:qt,cts:0,unit:Ft,size:Ft.byteLength,duration:0,originalDts:Mt,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Pt.push(Bt),Qe+=Bt.size,Xt+=Ke}var $t=Pt[Pt.length-1];$t.duration=Ot+Tt-$t.dts,Tt=Math.round(Ke)}dt.push({dts:Ot,pts:Ot,cts:0,unit:wt.unit,size:wt.unit.byteLength,duration:Tt,originalDts:Mt,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),It&&dt.push.apply(dt,Pt)}Ge?ut=new Uint8Array(Qe):(ut=new Uint8Array(Qe),ut[0]=Qe>>>24&255,ut[1]=Qe>>>16&255,ut[2]=Qe>>>8&255,ut[3]=Qe&255,ut.set($e.types.mdat,4));for(var Jt=0;Jt<dt.length;Jt++){var Zt=dt[Jt].unit;ut.set(Zt,We),We+=Zt.byteLength}var Lt=dt[dt.length-1];Le=Lt.dts+Lt.duration,this._audioNextDts=Le;var Et=new ke;Et.beginDts=Te,Et.endDts=Le,Et.beginPts=Te,Et.endPts=Le,Et.originalBeginDts=dt[0].originalDts,Et.originalEndDts=Lt.originalDts+Lt.duration,Et.firstSample=new Pe(dt[0].dts,dt[0].pts,dt[0].duration,dt[0].originalDts,!1),Et.lastSample=new Pe(Lt.dts,Lt.pts,Lt.duration,Lt.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(Et),j.samples=dt,j.sequenceNumber++;var jt=null;Ge?jt=new Uint8Array:jt=$e.moof(j,Te),j.samples=[],j.length=0;var St={type:"audio",data:this._mergeBoxes(jt,ut).buffer,sampleCount:dt.length,info:Et};Ge&&lt&&(St.timestampOffset=Te),this._onMediaSegment("audio",St)}},{key:"_remuxVideo",value:function(v,D){if(this._videoMeta==null)return;var j=v,G=j.samples,le=void 0,Te=-1,Le=-1,qe=-1,Ke=-1;if(!G||G.length===0)return;if(G.length===1&&!D)return;var Ge=8,lt=null,it=8+v.length,We=null;if(G.length>1&&(We=G.pop(),it-=We.length),this._videoStashedLastSample!=null){var ut=this._videoStashedLastSample;this._videoStashedLastSample=null,G.unshift(ut),it+=ut.length}We!=null&&(this._videoStashedLastSample=We);var Qe=G[0].dts-this._dtsBase;if(this._videoNextDts)le=Qe-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())le=0;else{var R=this._videoSegmentInfoList.getLastSampleBefore(Qe);if(R!=null){var n=Qe-(R.originalDts+R.duration);n<=3&&(n=0);var l=R.dts+R.duration+n;le=Qe-l}else le=0}for(var L=new ke,K=[],N=0;N<G.length;N++){var Ce=G[N],Ue=Ce.dts-this._dtsBase,Ze=Ce.isKeyframe,at=Ue-le,Ye=Ce.cts,dt=at+Ye;Te===-1&&(Te=at,qe=dt);var xt=0;if(N!==G.length-1){var wt=G[N+1].dts-this._dtsBase-le;xt=wt-at}else if(We!=null){var Nt=We.dts-this._dtsBase-le;xt=Nt-at}else K.length>=1?xt=K[K.length-1].duration:xt=Math.floor(this._videoMeta.refSampleDuration);if(Ze){var Mt=new Pe(at,dt,xt,Ce.dts,!0);Mt.fileposition=Ce.fileposition,L.appendSyncPoint(Mt)}K.push({dts:at,pts:dt,cts:Ye,units:Ce.units,size:Ce.length,isKeyframe:Ze,duration:xt,originalDts:Ue,flags:{isLeading:0,dependsOn:Ze?2:1,isDependedOn:Ze?1:0,hasRedundancy:0,isNonSync:Ze?0:1}})}lt=new Uint8Array(it),lt[0]=it>>>24&255,lt[1]=it>>>16&255,lt[2]=it>>>8&255,lt[3]=it&255,lt.set($e.types.mdat,4);for(var Ot=0;Ot<K.length;Ot++)for(var Tt=K[Ot].units;Tt.length;){var Kt=Tt.shift(),Ht=Kt.data;lt.set(Ht,Ge),Ge+=Ht.byteLength}var It=K[K.length-1];if(Le=It.dts+It.duration,Ke=It.pts+It.duration,this._videoNextDts=Le,L.beginDts=Te,L.endDts=Le,L.beginPts=qe,L.endPts=Ke,L.originalBeginDts=K[0].originalDts,L.originalEndDts=It.originalDts+It.duration,L.firstSample=new Pe(K[0].dts,K[0].pts,K[0].duration,K[0].originalDts,K[0].isKeyframe),L.lastSample=new Pe(It.dts,It.pts,It.duration,It.originalDts,It.isKeyframe),this._isLive||this._videoSegmentInfoList.append(L),j.samples=K,j.sequenceNumber++,this._forceFirstIDR){var Pt=K[0].flags;Pt.dependsOn=2,Pt.isNonSync=0}var Wt=$e.moof(j,Te);j.samples=[],j.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Wt,lt).buffer,sampleCount:K.length,info:L})}},{key:"_mergeBoxes",value:function(v,D){var j=new Uint8Array(v.byteLength+D.byteLength);return j.set(v,0),j.set(D,v.byteLength),j}}]),de}(),ve=ce,xe={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"},fe=xe,De=function(){function de(Q,v){Object(Fe.a)(this,de),this.TAG="TransmuxingController",this._emitter=new f.a,this._config=v,Q.segments||(Q.segments=[{duration:Q.duration,filesize:Q.filesize,url:Q.url}]),typeof Q.cors!="boolean"&&(Q.cors=!0),typeof Q.withCredentials!="boolean"&&(Q.withCredentials=!1),this._mediaDataSource=Q,this._currentSegmentIndex=0;var D=0;this._mediaDataSource.segments.forEach(function(j){j.timestampBase=D,D+=j.duration,j.cors=Q.cors,j.withCredentials=Q.withCredentials,v.referrerPolicy&&(j.referrerPolicy=v.referrerPolicy)}),!isNaN(D)&&this._mediaDataSource.duration!==D&&(this._mediaDataSource.duration=D),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return Object(Ve.a)(de,[{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(v,D){this._emitter.addListener(v,D)}},{key:"off",value:function(v,D){this._emitter.removeListener(v,D)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(v,D){this._currentSegmentIndex=v;var j=this._mediaDataSource.segments[v],G=this._ioctl=new z(j,this._config,v);G.onError=this._onIOException.bind(this),G.onSeeked=this._onIOSeeked.bind(this),G.onComplete=this._onIOComplete.bind(this),G.onRedirect=this._onIORedirect.bind(this),G.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),D?this._demuxer.bindDataSource(this._ioctl):G.onDataArrival=this._onInitChunkArrival.bind(this),G.open(D)}},{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(v){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;var D=this._searchSegmentIndexContains(v);if(D===this._currentSegmentIndex){var j=this._mediaInfo.segments[D];if(j==null)this._pendingSeekTime=v;else{var G=j.getNearestKeyframe(v);this._remuxer.seek(G.milliseconds),this._ioctl.seek(G.fileposition),this._pendingResolveSeekPoint=G.milliseconds}}else{var le=this._mediaInfo.segments[D];if(le==null)this._pendingSeekTime=v,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(D);else{var Te=le.getNearestKeyframe(v);this._internalAbort(),this._remuxer.seek(v),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[D].timestampBase,this._loadSegment(D,Te.fileposition),this._pendingResolveSeekPoint=Te.milliseconds,this._reportSegmentMediaInfo(D)}}this._enableStatisticsReporter()}},{key:"_searchSegmentIndexContains",value:function(v){for(var D=this._mediaDataSource.segments,j=D.length-1,G=0;G<D.length;G++)if(v<D[G].timestampBase){j=G-1;break}return j}},{key:"_onInitChunkArrival",value:function(v,D){var j=this,G=null,le=0;if(D>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,le=this._demuxer.parseChunks(v,D);else if((G=Ne.probe(v)).match){this._demuxer=new Ne(G,this._config),this._remuxer||(this._remuxer=new ve(this._config));var Te=this._mediaDataSource;Te.duration!=null&&!isNaN(Te.duration)&&(this._demuxer.overridedDuration=Te.duration),typeof Te.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Te.hasAudio),typeof Te.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Te.hasVideo),this._demuxer.timestampBase=Te.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),le=this._demuxer.parseChunks(v,D)}else G=null,m.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(function(){j._internalAbort()}),this._emitter.emit(fe.DEMUX_ERROR,x.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),le=0;return le}},{key:"_onMediaInfo",value:function(v){var D=this;this._mediaInfo==null&&(this._mediaInfo=Object.assign({},v),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,ie.prototype));var j=Object.assign({},v);Object.setPrototypeOf(j,ie.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=j,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(function(){var G=D._pendingSeekTime;D._pendingSeekTime=null,D.seek(G)})}},{key:"_onMetaDataArrived",value:function(v){this._emitter.emit(fe.METADATA_ARRIVED,v)}},{key:"_onScriptDataArrived",value:function(v){this._emitter.emit(fe.SCRIPTDATA_ARRIVED,v)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(v){var D=v,j=D+1;j<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(j)):(this._remuxer.flushStashedSamples(),this._emitter.emit(fe.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(v){var D=this._ioctl.extraData;this._mediaDataSource.segments[D].redirectedURL=v}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(fe.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(v,D){m.e(this.TAG,"IOException: type = ".concat(v,", code = ").concat(D.code,", msg = ").concat(D.msg)),this._emitter.emit(fe.IO_ERROR,v,D),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(v,D){m.e(this.TAG,"DemuxException: type = ".concat(v,", info = ").concat(D)),this._emitter.emit(fe.DEMUX_ERROR,v,D)}},{key:"_onRemuxerInitSegmentArrival",value:function(v,D){this._emitter.emit(fe.INIT_SEGMENT,v,D)}},{key:"_onRemuxerMediaSegmentArrival",value:function(v,D){if(this._pendingSeekTime!=null)return;if(this._emitter.emit(fe.MEDIA_SEGMENT,v,D),this._pendingResolveSeekPoint!=null&&v==="video"){var j=D.info.syncPoints,G=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,_.safari&&j.length>0&&j[0].originalDts===G&&(G=j[0].pts),this._emitter.emit(fe.RECOMMEND_SEEKPOINT,G)}}},{key:"_enableStatisticsReporter",value:function(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(v){var D=this._mediaInfo.segments[v],j=Object.assign({},D);j.duration=this._mediaInfo.duration,j.segmentCount=this._mediaInfo.segmentCount,delete j.segments,delete j.keyframesIndex,this._emitter.emit(fe.MEDIA_INFO,j)}},{key:"_reportStatisticsInfo",value:function(){var v={};v.url=this._ioctl.currentURL,v.hasRedirect=this._ioctl.hasRedirect,v.hasRedirect&&(v.redirectedURL=this._ioctl.currentRedirectedURL),v.speed=this._ioctl.currentSpeed,v.loaderType=this._ioctl.loaderType,v.currentSegmentIndex=this._currentSegmentIndex,v.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(fe.STATISTICS_INFO,v)}}]),de}(),ze=De,et=function(Q){var v="TransmuxingWorker",D=null,j=Qe.bind(this);r.install(),Q.addEventListener("message",function(R){switch(R.data.cmd){case"init":D=new ze(R.data.param[0],R.data.param[1]),D.on(fe.IO_ERROR,it.bind(this)),D.on(fe.DEMUX_ERROR,We.bind(this)),D.on(fe.INIT_SEGMENT,G.bind(this)),D.on(fe.MEDIA_SEGMENT,le.bind(this)),D.on(fe.LOADING_COMPLETE,Te.bind(this)),D.on(fe.RECOVERED_EARLY_EOF,Le.bind(this)),D.on(fe.MEDIA_INFO,qe.bind(this)),D.on(fe.METADATA_ARRIVED,Ke.bind(this)),D.on(fe.SCRIPTDATA_ARRIVED,Ge.bind(this)),D.on(fe.STATISTICS_INFO,lt.bind(this)),D.on(fe.RECOMMEND_SEEKPOINT,ut.bind(this));break;case"destroy":D&&(D.destroy(),D=null),Q.postMessage({msg:"destroyed"});break;case"start":D.start();break;case"stop":D.stop();break;case"seek":D.seek(R.data.param);break;case"pause":D.pause();break;case"resume":D.resume();break;case"logging_config":{var n=R.data.param;ge.applyConfig(n),n.enableCallback===!0?ge.addLogListener(j):ge.removeLogListener(j);break}}});function G(R,n){var l={msg:fe.INIT_SEGMENT,data:{type:R,data:n}};Q.postMessage(l,[n.data])}function le(R,n){var l={msg:fe.MEDIA_SEGMENT,data:{type:R,data:n}};Q.postMessage(l,[n.data])}function Te(){var R={msg:fe.LOADING_COMPLETE};Q.postMessage(R)}function Le(){var R={msg:fe.RECOVERED_EARLY_EOF};Q.postMessage(R)}function qe(R){var n={msg:fe.MEDIA_INFO,data:R};Q.postMessage(n)}function Ke(R){var n={msg:fe.METADATA_ARRIVED,data:R};Q.postMessage(n)}function Ge(R){var n={msg:fe.SCRIPTDATA_ARRIVED,data:R};Q.postMessage(n)}function lt(R){var n={msg:fe.STATISTICS_INFO,data:R};Q.postMessage(n)}function it(R,n){Q.postMessage({msg:fe.IO_ERROR,data:{type:R,info:n}})}function We(R,n){Q.postMessage({msg:fe.DEMUX_ERROR,data:{type:R,info:n}})}function ut(R){Q.postMessage({msg:fe.RECOMMEND_SEEKPOINT,data:R})}function Qe(R,n){Q.postMessage({msg:"logcat_callback",data:{type:R,logcat:n}})}},mt=et,_t=function(){function de(Q,v){if(Object(Fe.a)(this,de),this.TAG="Transmuxer",this._emitter=new f.a,v.enableWorker&&typeof Worker!="undefined")try{var D=me("0r65");this._worker=D(mt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Q,v]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},ge.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:ge.getConfig()})}catch(G){m.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new ze(Q,v)}else this._controller=new ze(Q,v);if(this._controller){var j=this._controller;j.on(fe.IO_ERROR,this._onIOError.bind(this)),j.on(fe.DEMUX_ERROR,this._onDemuxError.bind(this)),j.on(fe.INIT_SEGMENT,this._onInitSegment.bind(this)),j.on(fe.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),j.on(fe.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),j.on(fe.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),j.on(fe.MEDIA_INFO,this._onMediaInfo.bind(this)),j.on(fe.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),j.on(fe.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),j.on(fe.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),j.on(fe.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return Object(Ve.a)(de,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),ge.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(v,D){this._emitter.addListener(v,D)}},{key:"off",value:function(v,D){this._emitter.removeListener(v,D)}},{key:"hasWorker",value:function(){return this._worker!=null}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(v){this._worker?this._worker.postMessage({cmd:"seek",param:v}):this._controller.seek(v)}},{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(v,D){var j=this;Promise.resolve().then(function(){j._emitter.emit(fe.INIT_SEGMENT,v,D)})}},{key:"_onMediaSegment",value:function(v,D){var j=this;Promise.resolve().then(function(){j._emitter.emit(fe.MEDIA_SEGMENT,v,D)})}},{key:"_onLoadingComplete",value:function(){var v=this;Promise.resolve().then(function(){v._emitter.emit(fe.LOADING_COMPLETE)})}},{key:"_onRecoveredEarlyEof",value:function(){var v=this;Promise.resolve().then(function(){v._emitter.emit(fe.RECOVERED_EARLY_EOF)})}},{key:"_onMediaInfo",value:function(v){var D=this;Promise.resolve().then(function(){D._emitter.emit(fe.MEDIA_INFO,v)})}},{key:"_onMetaDataArrived",value:function(v){var D=this;Promise.resolve().then(function(){D._emitter.emit(fe.METADATA_ARRIVED,v)})}},{key:"_onScriptDataArrived",value:function(v){var D=this;Promise.resolve().then(function(){D._emitter.emit(fe.SCRIPTDATA_ARRIVED,v)})}},{key:"_onStatisticsInfo",value:function(v){var D=this;Promise.resolve().then(function(){D._emitter.emit(fe.STATISTICS_INFO,v)})}},{key:"_onIOError",value:function(v,D){var j=this;Promise.resolve().then(function(){j._emitter.emit(fe.IO_ERROR,v,D)})}},{key:"_onDemuxError",value:function(v,D){var j=this;Promise.resolve().then(function(){j._emitter.emit(fe.DEMUX_ERROR,v,D)})}},{key:"_onRecommendSeekpoint",value:function(v){var D=this;Promise.resolve().then(function(){D._emitter.emit(fe.RECOMMEND_SEEKPOINT,v)})}},{key:"_onLoggingConfigChanged",value:function(v){this._worker&&this._worker.postMessage({cmd:"logging_config",param:v})}},{key:"_onWorkerMessage",value:function(v){var D=v.data,j=D.data;if(D.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(D.msg){case fe.INIT_SEGMENT:case fe.MEDIA_SEGMENT:this._emitter.emit(D.msg,j.type,j.data);break;case fe.LOADING_COMPLETE:case fe.RECOVERED_EARLY_EOF:this._emitter.emit(D.msg);break;case fe.MEDIA_INFO:Object.setPrototypeOf(j,ie.prototype),this._emitter.emit(D.msg,j);break;case fe.METADATA_ARRIVED:case fe.SCRIPTDATA_ARRIVED:case fe.STATISTICS_INFO:this._emitter.emit(D.msg,j);break;case fe.IO_ERROR:case fe.DEMUX_ERROR:this._emitter.emit(D.msg,j.type,j.info);break;case fe.RECOMMEND_SEEKPOINT:this._emitter.emit(D.msg,j);break;case"logcat_callback":m.emitter.emit("log",j.type,j.logcat);break;default:break}}}]),de}(),vt=_t,pt={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},Je=pt,Xe=function(){function de(Q){Object(Fe.a)(this,de),this.TAG="MSEController",this._config=Q,this._emitter=new f.a,this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Re}return Object(Ve.a)(de,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(v,D){this._emitter.addListener(v,D)}},{key:"off",value:function(v,D){this._emitter.removeListener(v,D)}},{key:"attachMediaElement",value:function(v){if(this._mediaSource)throw new a("MediaSource has been attached to an HTMLMediaElement!");var D=this._mediaSource=new window.MediaSource;D.addEventListener("sourceopen",this.e.onSourceOpen),D.addEventListener("sourceended",this.e.onSourceEnded),D.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=v,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),v.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var v=this._mediaSource;for(var D in this._sourceBuffers){var j=this._pendingSegments[D];j.splice(0,j.length),this._pendingSegments[D]=null,this._pendingRemoveRanges[D]=null,this._lastInitSegments[D]=null;var G=this._sourceBuffers[D];if(G){if(v.readyState!=="closed"){try{v.removeSourceBuffer(G)}catch(le){m.e(this.TAG,le.message)}G.removeEventListener("error",this.e.onSourceBufferError),G.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[D]=null,this._sourceBuffers[D]=null}}if(v.readyState==="open")try{v.endOfStream()}catch(le){m.e(this.TAG,le.message)}v.removeEventListener("sourceopen",this.e.onSourceOpen),v.removeEventListener("sourceended",this.e.onSourceEnded),v.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(v,D){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(v),this._pendingSegments[v.type].push(v);return}var j=v,G="".concat(j.container);j.codec&&j.codec.length>0&&(G+=";codecs=".concat(j.codec));var le=!1;if(m.v(this.TAG,"Received Initialization Segment, mimeType: "+G),this._lastInitSegments[j.type]=j,G!==this._mimeTypes[j.type]){if(this._mimeTypes[j.type])m.v(this.TAG,"Notice: ".concat(j.type," mimeType changed, origin: ").concat(this._mimeTypes[j.type],", target: ").concat(G));else{le=!0;try{var Te=this._sourceBuffers[j.type]=this._mediaSource.addSourceBuffer(G);Te.addEventListener("error",this.e.onSourceBufferError),Te.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Le){m.e(this.TAG,Le.message),this._emitter.emit(Je.ERROR,{code:Le.code,msg:Le.message});return}}this._mimeTypes[j.type]=G}D||this._pendingSegments[j.type].push(j),le||this._sourceBuffers[j.type]&&!this._sourceBuffers[j.type].updating&&this._doAppendSegments(),_.safari&&j.container==="audio/mpeg"&&j.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=j.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(v){var D=v;this._pendingSegments[D.type].push(D),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var j=this._sourceBuffers[D.type];j&&!j.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}},{key:"seek",value:function(v){for(var D in this._sourceBuffers){if(!this._sourceBuffers[D])continue;var j=this._sourceBuffers[D];if(this._mediaSource.readyState==="open")try{j.abort()}catch(Ke){m.e(this.TAG,Ke.message)}this._idrList.clear();var G=this._pendingSegments[D];if(G.splice(0,G.length),this._mediaSource.readyState==="closed")continue;for(var le=0;le<j.buffered.length;le++){var Te=j.buffered.start(le),Le=j.buffered.end(le);this._pendingRemoveRanges[D].push({start:Te,end:Le})}if(j.updating||this._doRemoveRanges(),_.safari){var qe=this._lastInitSegments[D];qe&&(this._pendingSegments[D].push(qe),j.updating||this._doAppendSegments())}}}},{key:"endOfStream",value:function(){var v=this._mediaSource,D=this._sourceBuffers;if(!v||v.readyState!=="open"){v&&v.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}D.video&&D.video.updating||D.audio&&D.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,v.endOfStream())}},{key:"getNearestKeyframe",value:function(v){return this._idrList.getLastSyncPointBeforeDts(v)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var v=this._mediaElement.currentTime;for(var D in this._sourceBuffers){var j=this._sourceBuffers[D];if(j){var G=j.buffered;if(G.length>=1&&v-G.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var v=this._mediaElement.currentTime;for(var D in this._sourceBuffers){var j=this._sourceBuffers[D];if(j){for(var G=j.buffered,le=!1,Te=0;Te<G.length;Te++){var Le=G.start(Te),qe=G.end(Te);if(Le<=v&&v<qe+3){if(v-Le>=this._config.autoCleanupMaxBackwardDuration){le=!0;var Ke=v-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[D].push({start:Le,end:Ke})}}else qe<v&&(le=!0,this._pendingRemoveRanges[D].push({start:Le,end:qe}))}le&&!j.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var v=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open")return;if(v.video&&v.video.updating||v.audio&&v.audio.updating)return;var D=this._mediaSource.duration,j=this._pendingMediaDuration;j>0&&(isNaN(D)||j>D)&&(m.v(this.TAG,"Update MediaSource duration from ".concat(D," to ").concat(j)),this._mediaSource.duration=j),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},{key:"_doRemoveRanges",value:function(){for(var v in this._pendingRemoveRanges){if(!this._sourceBuffers[v]||this._sourceBuffers[v].updating)continue;for(var D=this._sourceBuffers[v],j=this._pendingRemoveRanges[v];j.length&&!D.updating;){var G=j.shift();D.remove(G.start,G.end)}}}},{key:"_doAppendSegments",value:function(){var v=this._pendingSegments;for(var D in v){if(!this._sourceBuffers[D]||this._sourceBuffers[D].updating)continue;if(v[D].length>0){var j=v[D].shift();if(j.timestampOffset){var G=this._sourceBuffers[D].timestampOffset,le=j.timestampOffset/1e3,Te=Math.abs(G-le);Te>.1&&(m.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(G," to ").concat(le)),this._sourceBuffers[D].timestampOffset=le),delete j.timestampOffset}if(!j.data||j.data.byteLength===0)continue;try{this._sourceBuffers[D].appendBuffer(j.data),this._isBufferFull=!1,D==="video"&&j.hasOwnProperty("info")&&this._idrList.appendArray(j.info.syncPoints)}catch(Le){this._pendingSegments[D].unshift(j),Le.code===22?(this._isBufferFull||this._emitter.emit(Je.BUFFER_FULL),this._isBufferFull=!0):(m.e(this.TAG,Le.message),this._emitter.emit(Je.ERROR,{code:Le.code,msg:Le.message}))}}}}},{key:"_onSourceOpen",value:function(){if(m.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var v=this._pendingSourceBufferInit;v.length;){var D=v.shift();this.appendInitSegment(D,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Je.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){m.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){m.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var v=this._pendingSegments;return v.video.length>0||v.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var v=this._pendingRemoveRanges;return v.video.length>0||v.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(Je.UPDATE_END)}},{key:"_onSourceBufferError",value:function(v){m.e(this.TAG,"SourceBuffer Error: ".concat(v))}}]),de}(),ot=Xe,rt={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},ft={NETWORK_EXCEPTION:d.EXCEPTION,NETWORK_STATUS_CODE_INVALID:d.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:d.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:d.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:x.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:x.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:x.CODEC_UNSUPPORTED},gt=function(){function de(Q,v){if(Object(Fe.a)(this,de),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new f.a,this._config=Y(),typeof v=="object"&&Object.assign(this._config,v),Q.type.toLowerCase()!=="flv")throw new c("FlvPlayer requires an flv MediaDataSource input!");Q.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=Q,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 D=_.chrome&&(_.version.major<50||_.version.major===50&&_.version.build<2661);this._alwaysSeekKeyframe=!!(D||_.msedge||_.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return Object(Ve.a)(de,[{key:"destroy",value:function(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(v,D){var j=this;v===Ae.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(function(){j._emitter.emit(Ae.MEDIA_INFO,j.mediaInfo)}):v===Ae.STATISTICS_INFO&&(this._statisticsInfo!=null&&Promise.resolve().then(function(){j._emitter.emit(Ae.STATISTICS_INFO,j.statisticsInfo)})),this._emitter.addListener(v,D)}},{key:"off",value:function(v,D){this._emitter.removeListener(v,D)}},{key:"attachMediaElement",value:function(v){var D=this;if(this._mediaElement=v,v.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),v.addEventListener("seeking",this.e.onvSeeking),v.addEventListener("canplay",this.e.onvCanPlay),v.addEventListener("stalled",this.e.onvStalled),v.addEventListener("progress",this.e.onvProgress),this._msectl=new ot(this._config),this._msectl.on(Je.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Je.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Je.SOURCE_OPEN,function(){D._mseSourceOpened=!0,D._hasPendingLoad&&(D._hasPendingLoad=!1,D.load())}),this._msectl.on(Je.ERROR,function(j){D._emitter.emit(Ae.ERROR,rt.MEDIA_ERROR,ft.MEDIA_MSE_ERROR,j)}),this._msectl.attachMediaElement(v),this._pendingSeekTime!=null)try{v.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(j){}}},{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 v=this;if(!this._mediaElement)throw new a("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new a("FlvPlayer.load() has been called, please call unload() first!");if(this._hasPendingLoad)return;if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new vt(this._mediaDataSource,this._config),this._transmuxer.on(fe.INIT_SEGMENT,function(D,j){v._msectl.appendInitSegment(j)}),this._transmuxer.on(fe.MEDIA_SEGMENT,function(D,j){if(v._msectl.appendMediaSegment(j),v._config.lazyLoad&&!v._config.isLive){var G=v._mediaElement.currentTime;j.info.endDts>=(G+v._config.lazyLoadMaxDuration)*1e3&&(v._progressChecker==null&&(m.v(v.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),v._suspendTransmuxer()))}}),this._transmuxer.on(fe.LOADING_COMPLETE,function(){v._msectl.endOfStream(),v._emitter.emit(Ae.LOADING_COMPLETE)}),this._transmuxer.on(fe.RECOVERED_EARLY_EOF,function(){v._emitter.emit(Ae.RECOVERED_EARLY_EOF)}),this._transmuxer.on(fe.IO_ERROR,function(D,j){v._emitter.emit(Ae.ERROR,rt.NETWORK_ERROR,D,j)}),this._transmuxer.on(fe.DEMUX_ERROR,function(D,j){v._emitter.emit(Ae.ERROR,rt.MEDIA_ERROR,D,{code:-1,msg:j})}),this._transmuxer.on(fe.MEDIA_INFO,function(D){v._mediaInfo=D,v._emitter.emit(Ae.MEDIA_INFO,Object.assign({},D))}),this._transmuxer.on(fe.METADATA_ARRIVED,function(D){v._emitter.emit(Ae.METADATA_ARRIVED,D)}),this._transmuxer.on(fe.SCRIPTDATA_ARRIVED,function(D){v._emitter.emit(Ae.SCRIPTDATA_ARRIVED,D)}),this._transmuxer.on(fe.STATISTICS_INFO,function(D){v._statisticsInfo=v._fillStatisticsInfo(D),v._emitter.emit(Ae.STATISTICS_INFO,Object.assign({},v._statisticsInfo))}),this._transmuxer.on(fe.RECOMMEND_SEEKPOINT,function(D){v._mediaElement&&!v._config.accurateSeek&&(v._requestSetTime=!0,v._mediaElement.currentTime=D/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(v){this._mediaElement.volume=v}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(v){this._mediaElement.muted=v}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(v){this._mediaElement?this._internalSeek(v):this._pendingSeekTime=v}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(v){if(v.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return v;var D=!0,j=0,G=0;if(this._mediaElement.getVideoPlaybackQuality){var le=this._mediaElement.getVideoPlaybackQuality();j=le.totalVideoFrames,G=le.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(j=this._mediaElement.webkitDecodedFrameCount,G=this._mediaElement.webkitDroppedFrameCount):D=!1;return D&&(v.decodedFrames=j,v.droppedFrames=G),v}},{key:"_onmseUpdateEnd",value:function(){if(!this._config.lazyLoad||this._config.isLive)return;for(var v=this._mediaElement.buffered,D=this._mediaElement.currentTime,j=0,G=0,le=0;le<v.length;le++){var Te=v.start(le),Le=v.end(le);if(Te<=D&&D<Le){j=Te,G=Le;break}}G>=D+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(m.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},{key:"_onmseBufferFull",value:function(){m.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var v=this._mediaElement.currentTime,D=this._mediaElement.buffered,j=!1,G=0;G<D.length;G++){var le=D.start(G),Te=D.end(G);if(v>=le&&v<Te){v>=Te-this._config.lazyLoadRecoverDuration&&(j=!0);break}}j&&(window.clearInterval(this._progressChecker),this._progressChecker=null,j&&(m.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(v){for(var D=this._mediaElement.buffered,j=0;j<D.length;j++){var G=D.start(j),le=D.end(j);if(v>=G&&v<le)return!0}return!1}},{key:"_internalSeek",value:function(v){var D=this._isTimepointBuffered(v),j=!1,G=0;if(v<1&&this._mediaElement.buffered.length>0){var le=this._mediaElement.buffered.start(0);(le<1&&v<le||_.safari)&&(j=!0,G=_.safari?.1:le)}if(j)this._requestSetTime=!0,this._mediaElement.currentTime=G;else if(D){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=v;else{var Te=this._msectl.getNearestKeyframe(Math.floor(v*1e3));this._requestSetTime=!0,Te!=null?this._mediaElement.currentTime=Te.dts/1e3:this._mediaElement.currentTime=v}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(v),this._transmuxer.seek(Math.floor(v*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=v)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var v=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(v)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(v),this._transmuxer.seek(Math.floor(v*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=v))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(v){var D=this._mediaElement;if(v||!this._receivedCanPlay||D.readyState<2){var j=D.buffered;j.length>0&&D.currentTime<j.start(0)&&(m.w(this.TAG,"Playback seems stuck at ".concat(D.currentTime,", seek to ").concat(j.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=j.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(v){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(v){var D=this._mediaElement.currentTime,j=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(D<1&&j.length>0){var G=j.start(0);if(G<1&&D<G||_.safari){this._requestSetTime=!0,this._mediaElement.currentTime=_.safari?.1:G;return}}if(this._isTimepointBuffered(D)){if(this._alwaysSeekKeyframe){var le=this._msectl.getNearestKeyframe(Math.floor(D*1e3));le!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=le.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:D,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_onvCanPlay",value:function(v){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(v){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(v){this._checkAndResumeStuckPlayback()}}]),de}(),ct=gt,yt=function(){function de(Q,v){if(Object(Fe.a)(this,de),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new f.a,this._config=Y(),typeof v=="object"&&Object.assign(this._config,v),Q.type.toLowerCase()==="flv")throw new c("NativePlayer does't support flv MediaDataSource input!");if(Q.hasOwnProperty("segments"))throw new c("NativePlayer(".concat(Q.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Q,this._mediaElement=null}return Object(Ve.a)(de,[{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(v,D){var j=this;v===Ae.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){j._emitter.emit(Ae.MEDIA_INFO,j.mediaInfo)}):v===Ae.STATISTICS_INFO&&(this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(function(){j._emitter.emit(Ae.STATISTICS_INFO,j.statisticsInfo)})),this._emitter.addListener(v,D)}},{key:"off",value:function(v,D){this._emitter.removeListener(v,D)}},{key:"attachMediaElement",value:function(v){if(this._mediaElement=v,v.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{v.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(D){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new a("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")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(v){this._mediaElement.volume=v}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(v){this._mediaElement.muted=v}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(v){this._mediaElement?this._mediaElement.currentTime=v:this._pendingSeekTime=v}},{key:"mediaInfo",get:function(){var v=this._mediaElement instanceof HTMLAudioElement?"audio/":"video/",D={mimeType:v+this._mediaDataSource.type};return this._mediaElement&&(D.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(D.width=this._mediaElement.videoWidth,D.height=this._mediaElement.videoHeight)),D}},{key:"statisticsInfo",get:function(){var v={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return v;var D=!0,j=0,G=0;if(this._mediaElement.getVideoPlaybackQuality){var le=this._mediaElement.getVideoPlaybackQuality();j=le.totalVideoFrames,G=le.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(j=this._mediaElement.webkitDecodedFrameCount,G=this._mediaElement.webkitDroppedFrameCount):D=!1;return D&&(v.decodedFrames=j,v.droppedFrames=G),v}},{key:"_onvLoadedMetadata",value:function(v){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Ae.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(Ae.STATISTICS_INFO,this.statisticsInfo)}}]),de}(),Ct=yt;r.install();function nt(de,Q){var v=de;if(v==null||typeof v!="object")throw new c("MediaDataSource must be an javascript object!");if(!v.hasOwnProperty("type"))throw new c("MediaDataSource must has type field to indicate video file type!");switch(v.type){case"flv":return new ct(v,Q);default:return new Ct(v,Q)}}function At(){return we.supportMSEH264Playback()}function kt(){return we.getFeatureList()}var bt={};bt.createPlayer=nt,bt.isSupported=At,bt.getFeatureList=kt,bt.BaseLoader=C,bt.LoaderStatus=y,bt.LoaderErrors=d,bt.Events=Ae,bt.ErrorTypes=rt,bt.ErrorDetails=ft,bt.FlvPlayer=ct,bt.NativePlayer=Ct,bt.LoggingControl=ge,Object.defineProperty(bt,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Rt=st.a=bt},GfqC:function(ht,st,me){"use strict";var Fe=me("q1tI"),Ve=me.n(Fe),je=me("TSYQ"),r=me.n(je);function I(ue,V){var ye="cannot "+ue.method+" "+ue.action+" "+V.status+"'",J=new Error(ye);return J.status=V.status,J.method=ue.method,J.url=ue.action,J}function f(ue){var V=ue.responseText||ue.response;if(!V)return V;try{return JSON.parse(V)}catch(ye){return V}}function h(ue){var V=new XMLHttpRequest;ue.onProgress&&V.upload&&(V.upload.onprogress=function(z){z.total>0&&(z.percent=z.loaded/z.total*100),ue.onProgress(z)});var ye=new FormData;ue.data&&Object.keys(ue.data).forEach(function($){var z=ue.data[$];if(Array.isArray(z)){z.forEach(function(H){ye.append($+"[]",H)});return}ye.append($,ue.data[$])}),ue.file instanceof Blob?ye.append(ue.filename,ue.file,ue.file.name):ye.append(ue.filename,ue.file),V.onerror=function(z){ue.onError(z)},V.onload=function(){return V.status<200||V.status>=300?ue.onError(I(ue,V),f(V)):ue.onSuccess(f(V),V)},V.open(ue.method,ue.action,!0),ue.withCredentials&&"withCredentials"in V&&(V.withCredentials=!0);var J=ue.headers||{};return J["X-Requested-With"]!==null&&V.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(J).forEach(function($){J[$]!==null&&V.setRequestHeader($,J[$])}),V.send(ye),{abort:function(){V.abort()}}}var m=+new Date,u=0;function o(){return"rc-upload-"+m+"-"+ ++u}function p(ue,V){return ue.indexOf(V,ue.length-V.length)!==-1}var s=function(ue,V){if(ue&&V){var ye=Array.isArray(V)?V:V.split(","),J=ue.name||"",$=ue.type||"",z=$.replace(/\/.*$/,"");return ye.some(function(H){var Y=H.trim();return Y.charAt(0)==="."?p(J.toLowerCase(),Y.toLowerCase()):/\/\*$/.test(Y)?z===Y.replace(/\/.*$/,""):$===Y})}return!0};function t(ue,V){var ye=ue.createReader(),J=[];function $(){ye.readEntries(function(z){var H=Array.prototype.slice.apply(z);J=J.concat(H);var Y=!H.length;Y?V(J):$()})}$()}var a=function(V,ye,J){var $=function z(H,Y){Y=Y||"",H.isFile?H.file(function(ee){J(ee)&&(H.fullPath&&!ee.webkitRelativePath&&(Object.defineProperties(ee,{webkitRelativePath:{writable:!0}}),ee.webkitRelativePath=H.fullPath.replace(/^\//,""),Object.defineProperties(ee,{webkitRelativePath:{writable:!1}})),ye([ee]))}):H.isDirectory&&t(H,function(ee){ee.forEach(function(we){z(we,""+Y+H.name+"/")})})};V.forEach(function(z){$(z.webkitGetAsEntry())})},c=a,g=Object.assign||function(ue){for(var V=1;V<arguments.length;V++){var ye=arguments[V];for(var J in ye)Object.prototype.hasOwnProperty.call(ye,J)&&(ue[J]=ye[J])}return ue},y=function(){function ue(V,ye){var J=[],$=!0,z=!1,H=void 0;try{for(var Y=V[Symbol.iterator](),ee;!($=(ee=Y.next()).done)&&!(J.push(ee.value),ye&&J.length===ye);$=!0);}catch(we){z=!0,H=we}finally{try{!$&&Y.return&&Y.return()}finally{if(z)throw H}}return J}return function(V,ye){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return ue(V,ye);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),d=function(){function ue(V,ye){for(var J=0;J<ye.length;J++){var $=ye[J];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(V,$.key,$)}}return function(V,ye,J){return ye&&ue(V.prototype,ye),J&&ue(V,J),V}}();function C(ue,V,ye){return V in ue?Object.defineProperty(ue,V,{value:ye,enumerable:!0,configurable:!0,writable:!0}):ue[V]=ye,ue}function k(ue,V){var ye={};for(var J in ue){if(V.indexOf(J)>=0)continue;if(!Object.prototype.hasOwnProperty.call(ue,J))continue;ye[J]=ue[J]}return ye}function S(ue,V){if(!(ue instanceof V))throw new TypeError("Cannot call a class as a function")}function E(ue,V){if(!ue)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V&&(typeof V=="object"||typeof V=="function")?V:ue}function O(ue,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof V);ue.prototype=Object.create(V&&V.prototype,{constructor:{value:ue,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(ue,V):ue.__proto__=V)}var w=function(V){return Object.keys(V).reduce(function(ye,J){return(J.substr(0,5)==="data-"||J.substr(0,5)==="aria-"||J==="role")&&(ye[J]=V[J]),ye},{})},_=function(ue){O(V,ue);function V(){var ye,J,$,z;S(this,V);for(var H=arguments.length,Y=Array(H),ee=0;ee<H;ee++)Y[ee]=arguments[ee];return z=(J=($=E(this,(ye=V.__proto__||Object.getPrototypeOf(V)).call.apply(ye,[this].concat(Y))),$),$.state={uid:o()},$.reqs={},$.onChange=function(we){var he=we.target.files;$.uploadFiles(he),$.reset()},$.onClick=function(we){var he=$.fileInput;if(!he)return;var Ae=$.props,pe=Ae.children,ge=Ae.onClick;pe&&pe.type==="button"&&(he.parentNode.focus(),he.parentNode.querySelector("button").blur()),he.click(),ge&&ge(we)},$.onKeyDown=function(we){we.key==="Enter"&&$.onClick()},$.onFileDrop=function(we){var he=$.props.multiple;if(we.preventDefault(),we.type==="dragover")return;if($.props.directory)c(Array.prototype.slice.call(we.dataTransfer.items),$.uploadFiles,function(pe){return s(pe,$.props.accept)});else{var Ae=Array.prototype.slice.call(we.dataTransfer.files).filter(function(pe){return s(pe,$.props.accept)});he===!1&&(Ae=Ae.slice(0,1)),$.uploadFiles(Ae)}},$.uploadFiles=function(we){var he=Array.prototype.slice.call(we);he.map(function(Ae){return Ae.uid=o(),Ae}).forEach(function(Ae){$.upload(Ae,he)})},$.saveFileInput=function(we){$.fileInput=we},J),E($,z)}return d(V,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(J,$){var z=this,H=this.props;if(!H.beforeUpload)return setTimeout(function(){return z.post(J)},0);var Y=H.beforeUpload(J,$);Y&&Y.then?Y.then(function(ee){var we=Object.prototype.toString.call(ee);return we==="[object File]"||we==="[object Blob]"?z.post(ee):z.post(J)}).catch(function(ee){console.log(ee)}):Y!==!1&&setTimeout(function(){return z.post(J)},0);return}},{key:"post",value:function(J){var $=this;if(!this._isMounted)return;var z=this.props,H=z.onStart,Y=z.onProgress,ee=z.transformFile,we=ee===void 0?function(he){return he}:ee;new Promise(function(he){var Ae=z.action;return typeof Ae=="function"&&(Ae=Ae(J)),he(Ae)}).then(function(he){var Ae=J.uid,pe=z.customRequest||h,ge=Promise.resolve(we(J)).then(function(se){var ie=z.data;return typeof ie=="function"&&(ie=ie(se)),Promise.all([se,ie])}).catch(function(se){console.error(se)});ge.then(function(se){var ie=y(se,2),Z=ie[0],be=ie[1],te={action:he,filename:z.name,data:be,file:Z,headers:z.headers,withCredentials:z.withCredentials,method:z.method||"post",onProgress:Y?function(q){Y(q,J)}:null,onSuccess:function(Ee,Se){delete $.reqs[Ae],z.onSuccess(Ee,J,Se)},onError:function(Ee,Se){delete $.reqs[Ae],z.onError(Ee,Se,J)}};H(J),$.reqs[Ae]=pe(te)})})}},{key:"reset",value:function(){this.setState({uid:o()})}},{key:"abort",value:function(J){var $=this.reqs;if(J){var z=J;J&&J.uid&&(z=J.uid),$[z]&&$[z].abort&&$[z].abort(),delete $[z]}else Object.keys($).forEach(function(H){$[H]&&$[H].abort&&$[H].abort(),delete $[H]})}},{key:"render",value:function(){var J,$=this.props,z=$.component,H=$.prefixCls,Y=$.className,ee=$.disabled,we=$.id,he=$.style,Ae=$.multiple,pe=$.accept,ge=$.children,se=$.directory,ie=$.openFileDialogOnClick,Z=$.onMouseEnter,be=$.onMouseLeave,te=k($,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),q=r()((J={},C(J,H,!0),C(J,H+"-disabled",ee),C(J,Y,Y),J)),Ee=ee?{}:{onClick:ie?this.onClick:function(){},onKeyDown:ie?this.onKeyDown:function(){},onMouseEnter:Z,onMouseLeave:be,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return Ve.a.createElement(z,g({},Ee,{className:q,role:"button",style:he}),Ve.a.createElement("input",g({},w(te),{id:we,type:"file",ref:this.saveFileInput,onClick:function(Ie){return Ie.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:pe,directory:se?"directory":null,webkitdirectory:se?"webkitdirectory":null,multiple:Ae,onChange:this.onChange})),ge)}}]),V}(Fe.Component),F=_,M=Object.assign||function(ue){for(var V=1;V<arguments.length;V++){var ye=arguments[V];for(var J in ye)Object.prototype.hasOwnProperty.call(ye,J)&&(ue[J]=ye[J])}return ue},b=function(){function ue(V,ye){for(var J=0;J<ye.length;J++){var $=ye[J];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(V,$.key,$)}}return function(V,ye,J){return ye&&ue(V.prototype,ye),J&&ue(V,J),V}}();function X(ue,V){if(!(ue instanceof V))throw new TypeError("Cannot call a class as a function")}function B(ue,V){if(!ue)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V&&(typeof V=="object"||typeof V=="function")?V:ue}function U(ue,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof V);ue.prototype=Object.create(V&&V.prototype,{constructor:{value:ue,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(ue,V):ue.__proto__=V)}function W(){}var ne=function(ue){U(V,ue);function V(){var ye,J,$,z;X(this,V);for(var H=arguments.length,Y=Array(H),ee=0;ee<H;ee++)Y[ee]=arguments[ee];return z=(J=($=B(this,(ye=V.__proto__||Object.getPrototypeOf(V)).call.apply(ye,[this].concat(Y))),$),$.saveUploader=function(we){$.uploader=we},J),B($,z)}return b(V,[{key:"abort",value:function(J){this.uploader.abort(J)}},{key:"render",value:function(){return Ve.a.createElement(F,M({},this.props,{ref:this.saveUploader}))}}]),V}(Fe.Component);ne.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:W,onError:W,onSuccess:W,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var re=ne,ae=st.a=re},Gytx:function(ht,st){ht.exports=function(Fe,Ve,je,r){var I=je?je.call(r,Fe,Ve):void 0;if(I!==void 0)return!!I;if(Fe===Ve)return!0;if(typeof Fe!="object"||!Fe||typeof Ve!="object"||!Ve)return!1;var f=Object.keys(Fe),h=Object.keys(Ve);if(f.length!==h.length)return!1;for(var m=Object.prototype.hasOwnProperty.bind(Ve),u=0;u<f.length;u++){var o=f[u];if(!m(o))return!1;var p=Fe[o],s=Ve[o];if(I=je?je.call(r,p,s,o):void 0,I===!1||I===void 0&&p!==s)return!1}return!0}},J66h:function(ht,st,me){(function(Fe){var Ve,je;(function(r,I){ht.exports=I(r)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Fe!="undefined"?Fe:this,function(r){"use strict";r=r||{};var I=r.Base64,f="2.6.4",h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=function(W){for(var ne={},re=0,ae=W.length;re<ae;re++)ne[W.charAt(re)]=re;return ne}(h),u=String.fromCharCode,o=function(W){if(W.length<2){var ne=W.charCodeAt(0);return ne<128?W:ne<2048?u(192|ne>>>6)+u(128|ne&63):u(224|ne>>>12&15)+u(128|ne>>>6&63)+u(128|ne&63)}else{var ne=65536+(W.charCodeAt(0)-55296)*1024+(W.charCodeAt(1)-56320);return u(240|ne>>>18&7)+u(128|ne>>>12&63)+u(128|ne>>>6&63)+u(128|ne&63)}},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(W){return W.replace(p,o)},t=function(W){var ne=[0,2,1][W.length%3],re=W.charCodeAt(0)<<16|(W.length>1?W.charCodeAt(1):0)<<8|(W.length>2?W.charCodeAt(2):0),ae=[h.charAt(re>>>18),h.charAt(re>>>12&63),ne>=2?"=":h.charAt(re>>>6&63),ne>=1?"=":h.charAt(re&63)];return ae.join("")},a=r.btoa&&typeof r.btoa=="function"?function(W){return r.btoa(W)}:function(W){if(W.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return W.replace(/[\s\S]{1,3}/g,t)},c=function(W){return a(s(String(W)))},g=function(W){return W.replace(/[+\/]/g,function(ne){return ne=="+"?"-":"_"}).replace(/=/g,"")},y=function(W,ne){return ne?g(c(W)):c(W)},d=function(W){return y(W,!0)},C;r.Uint8Array&&(C=function(W,ne){for(var re="",ae=0,ue=W.length;ae<ue;ae+=3){var V=W[ae],ye=W[ae+1],J=W[ae+2],$=V<<16|ye<<8|J;re+=h.charAt($>>>18)+h.charAt($>>>12&63)+(typeof ye!="undefined"?h.charAt($>>>6&63):"=")+(typeof J!="undefined"?h.charAt($&63):"=")}return ne?g(re):re});var k=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,S=function(W){switch(W.length){case 4:var ne=(7&W.charCodeAt(0))<<18|(63&W.charCodeAt(1))<<12|(63&W.charCodeAt(2))<<6|63&W.charCodeAt(3),re=ne-65536;return u((re>>>10)+55296)+u((re&1023)+56320);case 3:return u((15&W.charCodeAt(0))<<12|(63&W.charCodeAt(1))<<6|63&W.charCodeAt(2));default:return u((31&W.charCodeAt(0))<<6|63&W.charCodeAt(1))}},E=function(W){return W.replace(k,S)},O=function(W){var ne=W.length,re=ne%4,ae=(ne>0?m[W.charAt(0)]<<18:0)|(ne>1?m[W.charAt(1)]<<12:0)|(ne>2?m[W.charAt(2)]<<6:0)|(ne>3?m[W.charAt(3)]:0),ue=[u(ae>>>16),u(ae>>>8&255),u(ae&255)];return ue.length-=[0,0,2,1][re],ue.join("")},w=r.atob&&typeof r.atob=="function"?function(W){return r.atob(W)}:function(W){return W.replace(/\S{1,4}/g,O)},_=function(W){return w(String(W).replace(/[^A-Za-z0-9\+\/]/g,""))},F=function(W){return E(w(W))},M=function(W){return String(W).replace(/[-_]/g,function(ne){return ne=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},b=function(W){return F(M(W))},X;r.Uint8Array&&(X=function(W){return Uint8Array.from(_(M(W)),function(ne){return ne.charCodeAt(0)})});var B=function(){var W=r.Base64;return r.Base64=I,W};if(r.Base64={VERSION:f,atob:_,btoa:a,fromBase64:b,toBase64:y,utob:s,encode:y,encodeURI:d,btou:E,decode:b,noConflict:B,fromUint8Array:C,toUint8Array:X},typeof Object.defineProperty=="function"){var U=function(W){return{value:W,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",U(function(){return b(this)})),Object.defineProperty(String.prototype,"toBase64",U(function(W){return y(this,W)})),Object.defineProperty(String.prototype,"toBase64URI",U(function(){return y(this,!0)}))}}return r.Meteor&&(Base64=r.Base64),ht.exports?ht.exports.Base64=r.Base64:!(Ve=[],je=function(){return r.Base64}.apply(st,Ve),je!==void 0&&(ht.exports=je)),{Base64:r.Base64}})}).call(this,me("IyRk"))},JqQi:function(ht,st,me){ht.exports={bg:"bg___31owl",container:"container___2NGOo"}},LdHM:function(ht,st,me){"use strict";me.d(st,"b",function(){return k}),me.d(st,"a",function(){return E});var Fe=me("1OyB"),Ve=me("vuIU"),je=me("Ji7U"),r=me("LK+K"),I=me("q1tI"),f=me("rePB"),h=me("Ff2n"),m=me("ODXe"),u=me("4IlW"),o=me("bX4T"),p=me("YrtM"),s=me("TSYQ"),t=me.n(s),a=me("+nKL"),c=me("8OUc"),g=function(J,$){var z=J.prefixCls,H=J.id,Y=J.flattenOptions,ee=J.childrenAsData,we=J.values,he=J.searchValue,Ae=J.multiple,pe=J.defaultActiveFirstOption,ge=J.height,se=J.itemHeight,ie=J.notFoundContent,Z=J.open,be=J.menuItemSelectedIcon,te=J.virtual,q=J.onSelect,Ee=J.onToggleOpen,Se=J.onActiveValue,Ie=J.onScroll,P=J.onMouseEnter,e="".concat(z,"-item"),i=Object(p.a)(function(){return Y},[Z,Y],function(Pe,ke){return ke[0]&&Pe[1]!==ke[1]}),T=I.useRef(null),x=function(ke){ke.preventDefault()},A=function(ke){T.current&&T.current.scrollTo({index:ke})},oe=function(ke){for(var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Oe=i.length,ce=0;ce<Oe;ce+=1){var ve=(ke+ce*Re+Oe)%Oe,xe=i[ve],fe=xe.group,De=xe.data;if(!fe&&!De.disabled)return ve}return-1},_e=I.useState(function(){return oe(0)}),He=Object(m.a)(_e,2),Ne=He[0],Be=He[1],$e=function(ke){Be(ke);var Re=i[ke];if(!Re){Se(null,-1);return}Se(Re.data.value,ke)};I.useEffect(function(){$e(pe!==!1?oe(0):-1)},[i.length,he]),I.useEffect(function(){var Pe=setTimeout(function(){if(!Ae&&Z&&we.size===1){var ke=Array.from(we)[0],Re=i.findIndex(function(Oe){var ce=Oe.data;return ce.value===ke});$e(Re),A(Re)}});return function(){return clearTimeout(Pe)}},[Z]);var tt=function(ke){ke!==void 0&&q(ke,{selected:!we.has(ke)}),Ae||Ee(!1)};if(I.useImperativeHandle($,function(){return{onKeyDown:function(ke){var Re=ke.which;switch(Re){case u.a.UP:case u.a.DOWN:{var Oe=0;if(Re===u.a.UP?Oe=-1:Re===u.a.DOWN&&(Oe=1),Oe!==0){var ce=oe(Ne+Oe,Oe);A(ce),$e(ce)}break}case u.a.ENTER:{var ve=i[Ne];ve&&!ve.data.disabled?tt(ve.data.value):tt(void 0),Z&&ke.preventDefault();break}case u.a.ESC:Ee(!1)}},onKeyUp:function(){},scrollTo:function(ke){A(ke)}}}),i.length===0)return I.createElement("div",{role:"listbox",id:"".concat(H,"_list"),className:"".concat(e,"-empty"),onMouseDown:x},ie);function Me(Pe){var ke=i[Pe];if(!ke)return null;var Re=ke.data||{},Oe=Re.value,ce=Re.label,ve=Re.children,xe=Object(o.a)(Re,!0),fe=ee?ve:ce;return ke?I.createElement("div",Object.assign({"aria-label":typeof fe=="string"?fe:null},xe,{key:Pe,role:"option",id:"".concat(H,"_list_").concat(Pe),"aria-selected":we.has(Oe)}),Oe):null}return I.createElement(I.Fragment,null,I.createElement("div",{role:"listbox",id:"".concat(H,"_list"),style:{height:0,width:0,overflow:"hidden"}},Me(Ne-1),Me(Ne),Me(Ne+1)),I.createElement(a.a,{itemKey:"key",ref:T,data:i,height:ge,itemHeight:se,fullHeight:!1,onMouseDown:x,onScroll:Ie,virtual:te,onMouseEnter:P},function(Pe,ke){var Re,Oe=Pe.group,ce=Pe.groupOption,ve=Pe.data,xe=ve.label,fe=ve.key;if(Oe)return I.createElement("div",{className:t()(e,"".concat(e,"-group"))},xe!==void 0?xe:fe);var De=ve.disabled,ze=ve.value,et=ve.title,mt=ve.children,_t=ve.style,vt=ve.className,pt=Object(h.a)(ve,["disabled","value","title","children","style","className"]),Je=we.has(ze),Xe="".concat(e,"-option"),ot=t()(e,Xe,vt,(Re={},Object(f.a)(Re,"".concat(Xe,"-grouped"),ce),Object(f.a)(Re,"".concat(Xe,"-active"),Ne===ke&&!De),Object(f.a)(Re,"".concat(Xe,"-disabled"),De),Object(f.a)(Re,"".concat(Xe,"-selected"),Je),Re)),rt=ee?mt:xe,ft=!be||typeof be=="function"||Je;return I.createElement("div",Object.assign({},pt,{"aria-selected":Je,className:ot,title:et,onMouseMove:function(){if(Ne===ke||De)return;$e(ke)},onClick:function(){De||tt(ze)},style:_t}),I.createElement("div",{className:"".concat(Xe,"-content")},rt||ze),I.isValidElement(be)||Je,ft&&I.createElement(c.a,{className:"".concat(e,"-option-state"),customizeIcon:be,customizeIconProps:{isSelected:Je}},Je?"\u2713":null))}))},y=I.forwardRef(g);y.displayName="OptionList";var d=y,C=function(){return null};C.isSelectOption=!0;var k=C,S=function(){return null};S.isSelectOptGroup=!0;var E=S,O=me("VTBJ"),w=me("Zm9Q");function _(ye){var J=ye.key,$=ye.props,z=$.children,H=$.value,Y=Object(h.a)($,["children","value"]);return Object(O.a)({key:J,value:H!==void 0?H:J,children:z},Y)}function F(ye){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(w.a)(ye).map(function($,z){if(!I.isValidElement($)||!$.type)return null;var H=$.type.isSelectOptGroup,Y=$.key,ee=$.props,we=ee.children,he=Object(h.a)(ee,["children"]);return J||!H?_($):Object(O.a)(Object(O.a)({key:"__RC_SELECT_GRP__".concat(Y===null?z:Y,"__"),label:Y},he),{},{options:F(we)})}).filter(function($){return $})}var M=me("2Qr1"),b=me("qNPg"),X=me("U8pU"),B=me("Kwbf"),U=me("WKfj");function W(ye){var J=ye.mode,$=ye.options,z=ye.children,H=ye.backfill,Y=ye.allowClear,ee=ye.placeholder,we=ye.getInputElement,he=ye.showSearch,Ae=ye.onSearch,pe=ye.defaultOpen,ge=ye.autoFocus,se=ye.labelInValue,ie=ye.value,Z=ye.inputValue,be=ye.optionLabelProp,te=J==="multiple"||J==="tags",q=he!==void 0?he:te||J==="combobox",Ee=$||F(z);if(Object(B.a)(J!=="tags"||Ee.every(function(e){return!e.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),J==="tags"||J==="combobox"){var Se=Ee.some(function(e){return e.options?e.options.some(function(i){return typeof("value"in i?i.value:i.key)=="number"}):typeof("value"in e?e.value:e.key)=="number"});Object(B.a)(!Se,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(B.a)(J!=="combobox"||!be,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(B.a)(J==="combobox"||!H,"`backfill` only works with `combobox` mode."),Object(B.a)(J==="combobox"||!we,"`getInputElement` only work with `combobox` mode."),Object(B.b)(J!=="combobox"||!we||!Y||!ee,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ae&&!q&&J!=="combobox"&&J!=="tags"&&Object(B.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(B.b)(!pe||ge,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ie!=null){var Ie=Object(U.d)(ie);Object(B.a)(!se||Ie.every(function(e){return Object(X.a)(e)==="object"&&("key"in e||"value"in e)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(B.a)(!te||Array.isArray(ie),"`value` should be array when `mode` is `multiple` or `tags`")}if(z){var P=null;Object(w.a)(z).some(function(e){if(!I.isValidElement(e)||!e.type)return!1;var i=e.type;if(i.isSelectOption)return!1;if(i.isSelectOptGroup){var T=Object(w.a)(e.props.children).every(function(x){return!I.isValidElement(x)||!e.type||x.type.isSelectOption?!0:(P=x.type,!1)});return!T}return P=i,!0}),P&&Object(B.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(P.displayName||P.name||P,"`.")),Object(B.a)(Z===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var ne=W,re=Object(b.a)({prefixCls:"rc-select",components:{optionList:d},convertChildrenToData:F,flattenOptions:M.d,getLabeledValue:M.e,filterOptions:M.b,isValueDisabled:M.g,findValueOption:M.c,warningProps:ne,fillOptionsWithMissingValue:M.a}),ae=function(ye){Object(je.a)($,ye);var J=Object(r.a)($);function $(){var z;return Object(Fe.a)(this,$),z=J.apply(this,arguments),z.selectRef=I.createRef(),z.focus=function(){z.selectRef.current.focus()},z.blur=function(){z.selectRef.current.blur()},z}return Object(Ve.a)($,[{key:"render",value:function(){return I.createElement(re,Object.assign({ref:this.selectRef},this.props))}}]),$}(I.Component);ae.Option=k,ae.OptGroup=E;var ue=ae,V=st.c=ue},MRWH:function(ht,st,me){ht.exports={flex_box_center:"flex_box_center___30XbU",flex_space_between:"flex_space_between___3jfWA",flex_box_vertical_center:"flex_box_vertical_center___27kWs",flex_box_center_end:"flex_box_center_end___1RoAS",flex_box_column:"flex_box_column____3Jvr",list:"list___2NJ_T",box:"box___36KCF",title:"title___Kd2ce",gray:"gray___14ob6",brght:"brght___GgzyD",s1:"s1___IhDpz",s2:"s2___3hR0s",s3:"s3___23SCF",active:"active___2_5D5",line:"line___3Croa"}},NLgs:function(ht,st,me){"use strict";me.d(st,"e",function(){return S}),me.d(st,"f",function(){return E}),me.d(st,"d",function(){return w}),me.d(st,"c",function(){return _}),me.d(st,"a",function(){return F}),me.d(st,"b",function(){return M});var Fe=me("miYZ"),Ve=me("tsqr"),je=me("9og8"),r=me("2qtc"),I=me("kLXV"),f=me("WmNS"),h=me.n(f),m=me("q1tI"),u=me.n(m),o=me("9kvl"),p=me("xKgJ"),s=me("1vsH"),t=me("RCxd"),a=me("mOS8"),c=me.n(a),g=me("1ZF9"),y=me.n(g),d=me("WdTA"),C=me.n(d),k=me("m3rI"),S=function(X){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(E(X)&&O(B))},E=function(X){return Object(p.p)()?!0:(X({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},O=function(){var X,B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,U=Object(o.c)()._store.getState(),W=U.user;return(X=W.userInfo)!==null&&X!==void 0&&X.profile_completed?!0:(I.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:B?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){o.d.push("/account/profile/edit")}}),!1)},w=function(){var X,B=Object(o.c)()._store.getState(),U=B.user;return(X=U.userInfo)!==null&&X!==void 0&&X.professional_certification?!0:(I.a.confirm({title:"\u63D0\u793A",centered:!0,content:u.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(s.Q)("/account/certification")}}),!1)},_=function(){return Object(p.a)()?!0:(I.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:u.a.createElement("div",{className:"tc",style:{marginLeft:-38}},u.a.createElement("p",null,"\u60A8\u53EF\u4EE5\u626B\u7801\u52A0\u7FA4@\u7FA4\u7BA1\u7406\u5458\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650\u54E6\uFF01"),u.a.createElement("img",{src:Object(p.t)()?C.a:"".concat(k.a.IMG_SERVER,"/images/educoder/qqqun20191230.png"),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},F=function(X,B){return X?!0:(I.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:u.a.createElement("div",null,u.a.createElement("p",null,B||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),u.a.createElement("div",{style:{marginLeft:"110px"}},u.a.createElement("img",{src:y.a,width:200}),u.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(s.Q)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},M=function(X){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",U=Object(o.c)()._store.getState(),W=U.shixunsDetail.detail;return(W==null?void 0:W.public)===2||(W==null?void 0:W.public)===1||(W==null?void 0:W.shixun_status)===3?(I.a.info({centered:!0,icon:u.a.createElement(t.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:u.a.createElement("div",{className:"tc",style:{marginLeft:-38}},u.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},u.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(W==null?void 0:W.public)===2?"\u5DF2\u516C\u5F00":(W==null?void 0:W.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",B,"\u3002"),u.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),u.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:c.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(W==null?void 0:W.shixun_status)===2?(I.a.confirm({centered:!0,icon:u.a.createElement(t.a,null),title:"\u63D0\u793A",content:u.a.createElement("div",null,u.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",B,"\u3002"),u.a.createElement("br",null),u.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){I.a.confirm({width:440,centered:!0,icon:u.a.createElement(t.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var re=Object(je.a)(h.a.mark(function ue(){var V;return h.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return J.next=2,X({type:"shixunsDetail/cancelRelease",payload:{id:W==null?void 0:W.identifier}});case 2:V=J.sent,V.status!==401&&(Ve.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),X({type:"shixunsDetail/getShixunsDetail",payload:{id:W==null?void 0:W.identifier}}),X({type:"practiceSetting/getCommonData",payload:{id:W==null?void 0:W.identifier}}));case 4:case"end":return J.stop()}},ue)}));function ae(){return re.apply(this,arguments)}return ae}()})}}),!0):!1}},OLES:function(ht,st,me){"use strict";var Fe=me("U8pU"),Ve=me("VTBJ"),je=me("Ff2n"),r=me("q1tI"),I=me("uciX"),f=me("7ixt"),h=function(t){var a=t.overlay,c=t.prefixCls,g=t.id,y=t.overlayInnerStyle;return r.createElement("div",{className:"".concat(c,"-inner"),id:g,role:"tooltip",style:y},typeof a=="function"?a():a)},m=h,u=function(t,a){var c=t.overlayClassName,g=t.trigger,y=g===void 0?["hover"]:g,d=t.mouseEnterDelay,C=d===void 0?0:d,k=t.mouseLeaveDelay,S=k===void 0?.1:k,E=t.overlayStyle,O=t.prefixCls,w=O===void 0?"rc-tooltip":O,_=t.children,F=t.onVisibleChange,M=t.afterVisibleChange,b=t.transitionName,X=t.animation,B=t.placement,U=B===void 0?"right":B,W=t.align,ne=W===void 0?{}:W,re=t.destroyTooltipOnHide,ae=re===void 0?!1:re,ue=t.defaultVisible,V=t.getTooltipContainer,ye=t.overlayInnerStyle,J=Object(je.a)(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),$=Object(r.useRef)(null);Object(r.useImperativeHandle)(a,function(){return $.current});var z=Object(Ve.a)({},J);"visible"in t&&(z.popupVisible=t.visible);var H=function(){var Ae=t.arrowContent,pe=Ae===void 0?null:Ae,ge=t.overlay,se=t.id;return[r.createElement("div",{className:"".concat(w,"-arrow"),key:"arrow"},pe),r.createElement(m,{key:"content",prefixCls:w,id:se,overlay:ge,overlayInnerStyle:ye})]},Y=!1,ee=!1;if(typeof ae=="boolean")Y=ae;else if(ae&&Object(Fe.a)(ae)==="object"){var we=ae.keepParent;Y=we===!0,ee=we===!1}return r.createElement(I.a,Object.assign({popupClassName:c,prefixCls:w,popup:H,action:y,builtinPlacements:f.a,popupPlacement:U,ref:$,popupAlign:ne,getPopupContainer:V,onPopupVisibleChange:F,afterPopupVisibleChange:M,popupTransitionName:b,popupAnimation:X,defaultPopupVisible:ue,destroyPopupOnHide:Y,autoDestroy:ee,mouseLeaveDelay:S,popupStyle:E,mouseEnterDelay:C},z),_)},o=Object(r.forwardRef)(u),p=st.a=o},SJMd:function(ht,st){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var me,Fe,Ve,je=!1,r,I;window.PR_SHOULD_USE_CONTINUATION=!0;var f,h;(function(){var m=window,u=["break,continue,do,else,for,if,return,while"],o=[u,"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"],p=[o,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],s=[p,"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"],t=[p,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[p,"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"],c="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",g=[p,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],y="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",d=[u,"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=[u,"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"],k=[u,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],S=[s,a,t,g,y,d,C,k],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,O="str",w="kwd",_="com",F="typ",M="lit",b="pun",X="pln",B="tag",U="dec",W="src",ne="atn",re="atv",ae="nocode",ue="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function V(q){for(var Ee=0,Se=!1,Ie=!1,P=0,e=q.length;P<e;++P){var i=q[P];if(i.ignoreCase)Ie=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Se=!0,Ie=!1;break}}var T={b:8,t:9,n:10,v:11,f:12,r:13};function x(Ne){var Be=Ne.charCodeAt(0);if(Be!==92)return Be;var $e=Ne.charAt(1);return Be=T[$e],Be||("0"<=$e&&$e<="7"?parseInt(Ne.substring(1),8):$e==="u"||$e==="x"?parseInt(Ne.substring(2),16):Ne.charCodeAt(1))}function A(Ne){if(Ne<32)return(Ne<16?"\\x0":"\\x")+Ne.toString(16);var Be=String.fromCharCode(Ne);return Be==="\\"||Be==="-"||Be==="]"||Be==="^"?"\\"+Be:Be}function oe(Ne){var Be=Ne.substring(1,Ne.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")),$e=[],tt=Be[0]==="^",Me=["["];tt&&Me.push("^");for(var Pe=tt?1:0,ke=Be.length;Pe<ke;++Pe){var Re=Be[Pe];if(/\\[bdsw]/i.test(Re))Me.push(Re);else{var Oe=x(Re),ce;Pe+2<ke&&Be[Pe+1]==="-"?(ce=x(Be[Pe+2]),Pe+=2):ce=Oe,$e.push([Oe,ce]),ce<65||Oe>122||(ce<65||Oe>90||$e.push([Math.max(65,Oe)|32,Math.min(ce,90)|32]),ce<97||Oe>122||$e.push([Math.max(97,Oe)&~32,Math.min(ce,122)&~32]))}}$e.sort(function(De,ze){return De[0]-ze[0]||ze[1]-De[1]});for(var ve=[],xe=[],Pe=0;Pe<$e.length;++Pe){var fe=$e[Pe];fe[0]<=xe[1]+1?xe[1]=Math.max(xe[1],fe[1]):ve.push(xe=fe)}for(var Pe=0;Pe<ve.length;++Pe){var fe=ve[Pe];Me.push(A(fe[0])),fe[1]>fe[0]&&(fe[1]+1>fe[0]&&Me.push("-"),Me.push(A(fe[1])))}return Me.push("]"),Me.join("")}function _e(Ne){for(var Be=Ne.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")),$e=Be.length,tt=[],Me=0,Pe=0;Me<$e;++Me){var ke=Be[Me];if(ke==="(")++Pe;else if(ke.charAt(0)==="\\"){var Re=+ke.substring(1);Re&&(Re<=Pe?tt[Re]=-1:Be[Me]=A(Re))}}for(var Me=1;Me<tt.length;++Me)tt[Me]===-1&&(tt[Me]=++Ee);for(var Me=0,Pe=0;Me<$e;++Me){var ke=Be[Me];if(ke==="(")++Pe,tt[Pe]||(Be[Me]="(?:");else if(ke.charAt(0)==="\\"){var Re=+ke.substring(1);Re&&Re<=Pe&&(Be[Me]="\\"+tt[Re])}}for(var Me=0;Me<$e;++Me)Be[Me]==="^"&&Be[Me+1]!=="^"&&(Be[Me]="");if(Ne.ignoreCase&&Se)for(var Me=0;Me<$e;++Me){var ke=Be[Me],Oe=ke.charAt(0);ke.length>=2&&Oe==="["?Be[Me]=oe(ke):Oe!=="\\"&&(Be[Me]=ke.replace(/[a-zA-Z]/g,function(xe){var fe=xe.charCodeAt(0);return"["+String.fromCharCode(fe&~32,fe|32)+"]"}))}return Be.join("")}for(var He=[],P=0,e=q.length;P<e;++P){var i=q[P];if(i.global||i.multiline)throw new Error(""+i);He.push("(?:"+_e(i)+")")}return new RegExp(He.join("|"),Ie?"gi":"g")}function ye(q,Ee){var Se=/(?:^|\s)nocode(?:\s|$)/,Ie=[],P=0,e=[],i=0;function T(x){var A=x.nodeType;if(A==1){if(Se.test(x.className))return;for(var oe=x.firstChild;oe;oe=oe.nextSibling)T(oe);var _e=x.nodeName.toLowerCase();(_e==="br"||_e==="li")&&(Ie[i]=`
`,e[i<<1]=P++,e[i++<<1|1]=x)}else if(A==3||A==4){var He=x.nodeValue;He.length&&(Ee?He=He.replace(/\r\n?/g,`
`):He=He.replace(/[ \t\r\n]+/g," "),Ie[i]=He,e[i<<1]=P,P+=He.length,e[i++<<1|1]=x)}}return T(q),{sourceCode:Ie.join("").replace(/\n$/,""),spans:e}}function J(q,Ee,Se,Ie,P){if(!Se)return;var e={sourceNode:q,pre:1,langExtension:null,numberLines:null,sourceCode:Se,spans:null,basePos:Ee,decorations:null};Ie(e),P.push.apply(P,e.decorations)}var $=/\S/;function z(q){for(var Ee=void 0,Se=q.firstChild;Se;Se=Se.nextSibling){var Ie=Se.nodeType;Ee=Ie===1?Ee?q:Se:Ie===3&&$.test(Se.nodeValue)?q:Ee}return Ee===q?void 0:Ee}function H(q,Ee){var Se={},Ie;(function(){for(var i=q.concat(Ee),T=[],x={},A=0,oe=i.length;A<oe;++A){var _e=i[A],He=_e[3];if(He)for(var Ne=He.length;--Ne>=0;)Se[He.charAt(Ne)]=_e;var Be=_e[1],$e=""+Be;x.hasOwnProperty($e)||(T.push(Be),x[$e]=null)}T.push(/[\0-\uffff]/),Ie=V(T)})();var P=Ee.length,e=function(i){for(var T=i.sourceCode,x=i.basePos,A=i.sourceNode,oe=[x,X],_e=0,He=T.match(Ie)||[],Ne={},Be=0,$e=He.length;Be<$e;++Be){var tt=He[Be],Me=Ne[tt],Pe=void 0,ke;if(typeof Me=="string")ke=!1;else{var Re=Se[tt.charAt(0)];if(Re)Pe=tt.match(Re[1]),Me=Re[0];else{for(var Oe=0;Oe<P;++Oe)if(Re=Ee[Oe],Pe=tt.match(Re[1]),Pe){Me=Re[0];break}Pe||(Me=X)}ke=Me.length>=5&&Me.substring(0,5)==="lang-",ke&&!(Pe&&typeof Pe[1]=="string")&&(ke=!1,Me=W),ke||(Ne[tt]=Me)}var ce=_e;if(_e+=tt.length,!ke)oe.push(x+ce,Me);else{var ve=Pe[1],xe=tt.indexOf(ve),fe=xe+ve.length;Pe[2]&&(fe=tt.length-Pe[2].length,xe=fe-ve.length);var De=Me.substring(5);J(A,x+ce,tt.substring(0,xe),e,oe),J(A,x+ce+xe,ve,ge(De,ve),oe),J(A,x+ce+fe,tt.substring(fe),e,oe)}}i.decorations=oe};return e}function Y(q){var Ee=[],Se=[];q.tripleQuotedStrings?Ee.push([O,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):q.multiLineStrings?Ee.push([O,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ee.push([O,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),q.verbatimStrings&&Se.push([O,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Ie=q.hashComments;Ie&&(q.cStyleComments?(Ie>1?Ee.push([_,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ee.push([_,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Se.push([O,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ee.push([_,/^#[^\r\n]*/,null,"#"])),q.cStyleComments&&(Se.push([_,/^\/\/[^\r\n]*/,null]),Se.push([_,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var P=q.regexLiterals;if(P){var e=P>1?"":`
\r`,i=e?".":"[\\S\\s]",T="/(?=[^/*"+e+"])(?:[^/\\x5B\\x5C"+e+"]|\\x5C"+i+"|\\x5B(?:[^\\x5C\\x5D"+e+"]|\\x5C"+i+")*(?:\\x5D|$))+/";Se.push(["lang-regex",RegExp("^"+ue+"("+T+")")])}var x=q.types;x&&Se.push([F,x]);var A=(""+q.keywords).replace(/^ | $/g,"");A.length&&Se.push([w,new RegExp("^(?:"+A.replace(/[\s,]+/g,"|")+")\\b"),null]),Ee.push([X,/^\s+/,null,` \r
\xA0`]);var oe="^.[^\\s\\w.$@'\"`/\\\\]*";return q.regexLiterals&&(oe+="(?!s*/)"),Se.push([M,/^@[a-z_$][a-z_$@0-9]*/i,null],[F,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[X,/^[a-z_$][a-z_$@0-9]*/i,null],[M,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[X,/^\\[\s\S]?/,null],[b,new RegExp(oe),null]),H(Ee,Se)}var ee=Y({keywords:S,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function we(q,Ee,Se){for(var Ie=/(?:^|\s)nocode(?:\s|$)/,P=/\r\n?|\n/,e=q.ownerDocument,i=e.createElement("li");q.firstChild;)i.appendChild(q.firstChild);var T=[i];function x(Be){var $e=Be.nodeType;if($e==1&&!Ie.test(Be.className))if(Be.nodeName==="br")A(Be),Be.parentNode&&Be.parentNode.removeChild(Be);else for(var tt=Be.firstChild;tt;tt=tt.nextSibling)x(tt);else if(($e==3||$e==4)&&Se){var Me=Be.nodeValue,Pe=Me.match(P);if(Pe){var ke=Me.substring(0,Pe.index);Be.nodeValue=ke;var Re=Me.substring(Pe.index+Pe[0].length);if(Re){var Oe=Be.parentNode;Oe.insertBefore(e.createTextNode(Re),Be.nextSibling)}A(Be),ke||Be.parentNode.removeChild(Be)}}}function A(Be){for(;!Be.nextSibling;)if(Be=Be.parentNode,!Be)return;function $e(Pe,ke){var Re=ke?Pe.cloneNode(!1):Pe,Oe=Pe.parentNode;if(Oe){var ce=$e(Oe,1),ve=Pe.nextSibling;ce.appendChild(Re);for(var xe=ve;xe;xe=ve)ve=xe.nextSibling,ce.appendChild(xe)}return Re}for(var tt=$e(Be.nextSibling,0),Me;(Me=tt.parentNode)&&Me.nodeType===1;)tt=Me;T.push(tt)}for(var oe=0;oe<T.length;++oe)x(T[oe]);Ee===(Ee|0)&&T[0].setAttribute("value",Ee);var _e=e.createElement("ol");_e.className="linenums";for(var He=Math.max(0,Ee-1|0)||0,oe=0,Ne=T.length;oe<Ne;++oe)i=T[oe],i.className="L"+(oe+He)%10,i.firstChild||i.appendChild(e.createTextNode("\xA0")),_e.appendChild(i);q.appendChild(_e)}function he(q){var Ee=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Ee=Ee&&+Ee[1]<=8;var Se=/\n/g,Ie=q.sourceCode,P=Ie.length,e=0,i=q.spans,T=i.length,x=0,A=q.decorations,oe=A.length,_e=0;A[oe]=P;var He,Ne;for(Ne=He=0;Ne<oe;)A[Ne]!==A[Ne+2]?(A[He++]=A[Ne++],A[He++]=A[Ne++]):Ne+=2;for(oe=He,Ne=He=0;Ne<oe;){for(var Be=A[Ne],$e=A[Ne+1],tt=Ne+2;tt+2<=oe&&A[tt+1]===$e;)tt+=2;A[He++]=Be,A[He++]=$e,Ne=tt}oe=A.length=He;var Me=q.sourceNode,Pe="";Me&&(Pe=Me.style.display,Me.style.display="none");try{for(var ke=null;x<T;){var Re=i[x],Oe=i[x+2]||P,ce=A[_e+2]||P,tt=Math.min(Oe,ce),ve=i[x+1],xe;if(ve.nodeType!==1&&(xe=Ie.substring(e,tt))){Ee&&(xe=xe.replace(Se,"\r")),ve.nodeValue=xe;var fe=ve.ownerDocument,De=fe.createElement("span");De.className=A[_e+1];var ze=ve.parentNode;ze.replaceChild(De,ve),De.appendChild(ve),e<Oe&&(i[x+1]=ve=fe.createTextNode(Ie.substring(tt,Oe)),ze.insertBefore(ve,De.nextSibling))}e=tt,e>=Oe&&(x+=2),e>=ce&&(_e+=2)}}finally{Me&&(Me.style.display=Pe)}}var Ae={};function pe(q,Ee){for(var Se=Ee.length;--Se>=0;){var Ie=Ee[Se];Ae.hasOwnProperty(Ie)?m.console&&console.warn("cannot override language handler %s",Ie):Ae[Ie]=q}}function ge(q,Ee){return q&&Ae.hasOwnProperty(q)||(q=/^\s*</.test(Ee)?"default-markup":"default-code"),Ae[q]}pe(ee,["default-code"]),pe(H([],[[X,/^[^<?]+/],[U,/^<!\w[^>]*(?:>|$)/],[_,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[b,/^(?:<[%?]|[%?]>)/],["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"]),pe(H([[X,/^[\s]+/,null,` \r
`],[re,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[B,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[ne,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[b,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),pe(H([],[[re,/^[\s\S]+/]]),["uq.val"]),pe(Y({keywords:s,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),pe(Y({keywords:"null,true,false"}),["json"]),pe(Y({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),pe(Y({keywords:t,cStyleComments:!0}),["java"]),pe(Y({keywords:k,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),pe(Y({keywords:d,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),pe(Y({keywords:y,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),pe(Y({keywords:C,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),pe(Y({keywords:g,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),pe(Y({keywords:c,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),pe(H([],[[O,/^[\s\S]+/]]),["regex"]);function se(q){var Ee=q.langExtension;try{var Se=ye(q.sourceNode,q.pre),Ie=Se.sourceCode;q.sourceCode=Ie,q.spans=Se.spans,q.basePos=0,ge(Ee,Ie)(q),he(q)}catch(P){m.console&&console.log(P&&P.stack||P)}}function ie(q,Ee,Se){var Ie=Se||!1,P=Ee||null,e=document.createElement("div");e.innerHTML="<pre>"+q+"</pre>",e=e.firstChild,Ie&&we(e,Ie,!0);var i={langExtension:P,numberLines:Ie,sourceNode:e,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return se(i),e.innerHTML}function Z(q,Ee){var Se=Ee||document.body,Ie=Se.ownerDocument||document;function P(Re){return Se.getElementsByTagName(Re)}for(var e=[P("pre"),P("code"),P("xmp")],i=[],T=0;T<e.length;++T)for(var x=0,A=e[T].length;x<A;++x)i.push(e[T][x]);e=null;var oe=Date;oe.now||(oe={now:function(){return+new Date}});var _e=0,He=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ne=/\bprettyprint\b/,Be=/\bprettyprinted\b/,$e=/pre|xmp/i,tt=/^code$/i,Me=/^(?:pre|code|xmp)$/i,Pe={};function ke(){for(var Re=m.PR_SHOULD_USE_CONTINUATION?oe.now()+250:Infinity;_e<i.length&&oe.now()<Re;_e++){for(var Oe=i[_e],ce=Pe,ve=Oe;ve=ve.previousSibling;){var xe=ve.nodeType,fe=(xe===7||xe===8)&&ve.nodeValue;if(fe?!/^\??prettify\b/.test(fe):xe!==3||/\S/.test(ve.nodeValue))break;if(fe){ce={},fe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(gt,ct,yt){ce[ct]=yt});break}}var De=Oe.className;if((ce!==Pe||Ne.test(De))&&!Be.test(De)){for(var ze=!1,et=Oe.parentNode;et;et=et.parentNode){var mt=et.tagName;if(Me.test(mt)&&et.className&&Ne.test(et.className)){ze=!0;break}}if(!ze){Oe.className+=" prettyprinted";var _t=ce.lang;if(!_t){_t=De.match(He);var vt;!_t&&(vt=z(Oe))&&tt.test(vt.tagName)&&(_t=vt.className.match(He)),_t&&(_t=_t[1])}var pt;if($e.test(Oe.tagName))pt=1;else{var Je=Oe.currentStyle,Xe=Ie.defaultView,ot=Je?Je.whiteSpace:Xe&&Xe.getComputedStyle?Xe.getComputedStyle(Oe,null).getPropertyValue("white-space"):0;pt=ot&&ot.substring(0,3)==="pre"}var rt=ce.linenums;(rt=rt==="true"||+rt)||(rt=De.match(/\blinenums\b(?::(\d+))?/),rt=rt?rt[1]&&rt[1].length?+rt[1]:!0:!1),rt&&we(Oe,rt,pt);var ft={langExtension:_t,sourceNode:Oe,numberLines:rt,pre:pt,sourceCode:null,basePos:null,spans:null,decorations:null};se(ft)}}}_e<i.length?m.setTimeout(ke,250):typeof q=="function"&&q()}ke()}var be=m.PR={createSimpleLexer:H,registerLangHandler:pe,sourceDecorator:Y,PR_ATTRIB_NAME:ne,PR_ATTRIB_VALUE:re,PR_COMMENT:_,PR_DECLARATION:U,PR_KEYWORD:w,PR_LITERAL:M,PR_NOCODE:ae,PR_PLAIN:X,PR_PUNCTUATION:b,PR_SOURCE:W,PR_STRING:O,PR_TAG:B,PR_TYPE:F,prettyPrintOne:je?m.prettyPrintOne=ie:f=ie,prettyPrint:h=je?m.prettyPrint=Z:h=Z},te=m.define;typeof te=="function"&&te.amd&&te("google-code-prettify",[],function(){return be})})()},WdTA:function(ht,st,me){ht.exports=me.p+"static/studnetqun.598eeb43.png"},Y1PL:function(ht,st,me){"use strict";me.r(st),me.d(st,"ResizableTextArea",function(){return z});var Fe=me("wx14"),Ve=me("1OyB"),je=me("vuIU"),r=me("Ji7U"),I=me("LK+K"),f=me("q1tI"),h=me("VTBJ"),m=me("rePB"),u=me("Zm9Q"),o=me("Kwbf"),p=me("c+Xe"),s=me("m+aA"),t=me("bdgK"),a=new Map;function c(ee){ee.forEach(function(we){var he,Ae=we.target;(he=a.get(Ae))===null||he===void 0||he.forEach(function(pe){return pe(Ae)})})}var g=new t.default(c),y=null,d=null;function C(ee,we){a.has(ee)||(a.set(ee,new Set),g.observe(ee)),a.get(ee).add(we)}function k(ee,we){a.has(ee)&&(a.get(ee).delete(we),a.get(ee).size||(g.unobserve(ee),a.delete(ee)))}var S=function(ee){Object(r.a)(he,ee);var we=Object(I.a)(he);function he(){return Object(Ve.a)(this,he),we.apply(this,arguments)}return Object(je.a)(he,[{key:"render",value:function(){return this.props.children}}]),he}(f.Component),E=f.createContext(null);function O(ee){var we=ee.children,he=ee.onBatchResize,Ae=f.useRef(0),pe=f.useRef([]),ge=f.useContext(E),se=f.useCallback(function(ie,Z,be){Ae.current+=1;var te=Ae.current;pe.current.push({size:ie,element:Z,data:be}),Promise.resolve().then(function(){te===Ae.current&&(he==null||he(pe.current),pe.current=[])}),ge==null||ge(ie,Z,be)},[he,ge]);return f.createElement(E.Provider,{value:se},we)}function w(ee){var we=ee.children,he=ee.disabled,Ae=f.useRef(null),pe=f.useRef(null),ge=f.useContext(E),se=f.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ie=f.isValidElement(we)&&Object(p.c)(we),Z=ie?we.ref:null,be=f.useMemo(function(){return Object(p.a)(Z,Ae)},[Z,Ae]),te=f.useRef(ee);te.current=ee;var q=f.useCallback(function(Ee){var Se=te.current,Ie=Se.onResize,P=Se.data,e=Ee.getBoundingClientRect(),i=e.width,T=e.height,x=Ee.offsetWidth,A=Ee.offsetHeight,oe=Math.floor(i),_e=Math.floor(T);if(se.current.width!==oe||se.current.height!==_e||se.current.offsetWidth!==x||se.current.offsetHeight!==A){var He={width:oe,height:_e,offsetWidth:x,offsetHeight:A};se.current=He;var Ne=x===Math.round(i)?i:x,Be=A===Math.round(T)?T:A,$e=Object(h.a)(Object(h.a)({},He),{},{offsetWidth:Ne,offsetHeight:Be});ge==null||ge($e,Ee,P),Ie&&Promise.resolve().then(function(){Ie($e,Ee)})}},[]);return f.useEffect(function(){var Ee=Object(s.a)(Ae.current)||Object(s.a)(pe.current);return Ee&&!he&&C(Ee,q),function(){return k(Ee,q)}},[Ae.current,he]),f.createElement(S,{ref:pe},ie?f.cloneElement(we,{ref:be}):we)}var _="rc-observer-key";function F(ee){var we=ee.children,he=Object(u.a)(we);return he.map(function(Ae,pe){var ge=(Ae==null?void 0:Ae.key)||"".concat(_,"-").concat(pe);return f.createElement(w,Object(Fe.a)({},ee,{key:ge}),Ae)})}F.Collection=O;var M=F,b=me("bT9E"),X=me("TSYQ"),B=me.n(X),U=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important
`,W=["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"],ne={},re;function ae(ee){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he=ee.getAttribute("id")||ee.getAttribute("data-reactid")||ee.getAttribute("name");if(we&&ne[he])return ne[he];var Ae=window.getComputedStyle(ee),pe=Ae.getPropertyValue("box-sizing")||Ae.getPropertyValue("-moz-box-sizing")||Ae.getPropertyValue("-webkit-box-sizing"),ge=parseFloat(Ae.getPropertyValue("padding-bottom"))+parseFloat(Ae.getPropertyValue("padding-top")),se=parseFloat(Ae.getPropertyValue("border-bottom-width"))+parseFloat(Ae.getPropertyValue("border-top-width")),ie=W.map(function(be){return"".concat(be,":").concat(Ae.getPropertyValue(be))}).join(";"),Z={sizingStyle:ie,paddingSize:ge,borderSize:se,boxSizing:pe};return we&&he&&(ne[he]=Z),Z}function ue(ee){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;re||(re=document.createElement("textarea"),re.setAttribute("tab-index","-1"),re.setAttribute("aria-hidden","true"),document.body.appendChild(re)),ee.getAttribute("wrap")?re.setAttribute("wrap",ee.getAttribute("wrap")):re.removeAttribute("wrap");var pe=ae(ee,we),ge=pe.paddingSize,se=pe.borderSize,ie=pe.boxSizing,Z=pe.sizingStyle;re.setAttribute("style","".concat(Z,";").concat(U)),re.value=ee.value||ee.placeholder||"";var be=Number.MIN_SAFE_INTEGER,te=Number.MAX_SAFE_INTEGER,q=re.scrollHeight,Ee;if(ie==="border-box"?q+=se:ie==="content-box"&&(q-=ge),he!==null||Ae!==null){re.value=" ";var Se=re.scrollHeight-ge;he!==null&&(be=Se*he,ie==="border-box"&&(be=be+ge+se),q=Math.max(be,q)),Ae!==null&&(te=Se*Ae,ie==="border-box"&&(te=te+ge+se),Ee=q>te?"":"hidden",q=Math.min(te,q))}return{height:q,minHeight:be,maxHeight:te,overflowY:Ee,resize:"none"}}var V=me("Gytx"),ye=me.n(V),J;(function(ee){ee[ee.NONE=0]="NONE",ee[ee.RESIZING=1]="RESIZING",ee[ee.RESIZED=2]="RESIZED"})(J||(J={}));var $=function(ee){Object(r.a)(he,ee);var we=Object(I.a)(he);function he(Ae){var pe;return Object(Ve.a)(this,he),pe=we.call(this,Ae),pe.nextFrameActionId=void 0,pe.resizeFrameId=void 0,pe.textArea=void 0,pe.saveTextArea=function(ge){pe.textArea=ge},pe.handleResize=function(ge){var se=pe.state.resizeStatus,ie=pe.props,Z=ie.autoSize,be=ie.onResize;if(se!==J.NONE)return;typeof be=="function"&&be(ge),Z&&pe.resizeOnNextFrame()},pe.resizeOnNextFrame=function(){cancelAnimationFrame(pe.nextFrameActionId),pe.nextFrameActionId=requestAnimationFrame(pe.resizeTextarea)},pe.resizeTextarea=function(){var ge=pe.props.autoSize;if(!ge||!pe.textArea)return;var se=ge.minRows,ie=ge.maxRows,Z=ue(pe.textArea,!1,se,ie);pe.setState({textareaStyles:Z,resizeStatus:J.RESIZING},function(){cancelAnimationFrame(pe.resizeFrameId),pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:J.RESIZED},function(){pe.resizeFrameId=requestAnimationFrame(function(){pe.setState({resizeStatus:J.NONE}),pe.fixFirefoxAutoScroll()})})})})},pe.renderTextArea=function(){var ge=pe.props,se=ge.prefixCls,ie=se===void 0?"rc-textarea":se,Z=ge.autoSize,be=ge.onResize,te=ge.className,q=ge.disabled,Ee=pe.state,Se=Ee.textareaStyles,Ie=Ee.resizeStatus,P=Object(b.a)(pe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),e=B()(ie,te,Object(m.a)({},"".concat(ie,"-disabled"),q));"value"in P&&(P.value=P.value||"");var i=Object(h.a)(Object(h.a)(Object(h.a)({},pe.props.style),Se),Ie===J.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return f.createElement(M,{onResize:pe.handleResize,disabled:!(Z||be)},f.createElement("textarea",Object(Fe.a)({},P,{className:e,style:i,ref:pe.saveTextArea})))},pe.state={textareaStyles:{},resizeStatus:J.NONE},pe}return Object(je.a)(he,[{key:"componentDidUpdate",value:function(pe){(pe.value!==this.props.value||!ye()(pe.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var pe=this.textArea.selectionStart,ge=this.textArea.selectionEnd;this.textArea.setSelectionRange(pe,ge)}}catch(se){}}},{key:"render",value:function(){return this.renderTextArea()}}]),he}(f.Component),z=$,H=function(ee){Object(r.a)(he,ee);var we=Object(I.a)(he);function he(Ae){var pe;Object(Ve.a)(this,he),pe=we.call(this,Ae),pe.resizableTextArea=void 0,pe.focus=function(){pe.resizableTextArea.textArea.focus()},pe.saveTextArea=function(se){pe.resizableTextArea=se},pe.handleChange=function(se){var ie=pe.props.onChange;pe.setValue(se.target.value,function(){pe.resizableTextArea.resizeTextarea()}),ie&&ie(se)},pe.handleKeyDown=function(se){var ie=pe.props,Z=ie.onPressEnter,be=ie.onKeyDown;se.keyCode===13&&Z&&Z(se),be&&be(se)};var ge=typeof Ae.value=="undefined"||Ae.value===null?Ae.defaultValue:Ae.value;return pe.state={value:ge},pe}return Object(je.a)(he,[{key:"setValue",value:function(pe,ge){"value"in this.props||this.setState({value:pe},ge)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return f.createElement(z,Object(Fe.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(pe){return"value"in pe?{value:pe.value}:null}}]),he}(f.Component),Y=st.default=H},ZW9T:function(ht,st,me){"use strict";me.d(st,"a",function(){return S});var Fe=me("k1fw"),Ve=me("miYZ"),je=me("tsqr"),r=me("rAM+"),I=me("tJVT"),f=me("PpiC"),h=me("q1tI"),m=me.n(h),u=me("bdgK");function o(E,O,w,_,F){var M=O.getWordUntilPosition(w),b={startLineNumber:w.lineNumber,endLineNumber:w.lineNumber,startColumn:M.startColumn,endColumn:M.endColumn},X=_.map(function(B){return{label:B,kind:E.languages.CompletionItemKind.Keyword,insertText:B,insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:b}});return F.map(function(B){X.push(Object(Fe.a)(Object(Fe.a)({},B),{},{range:b}))}),X}var p=function(E){var O={label:"ifelse",kind:E.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},w=["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(b,X){var B=o(E,b,X,w,[O]);return{suggestions:B}}});var _=["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(b,X){var B=[{label:"print",kind:E.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=o(E,b,X,_,B);return{suggestions:U}}});var F=["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(b,X){var B=[O,{label:"main",kind:E.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:E.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:E.languages.CompletionItemInsertTextRule.InsertAsSnippet}],U=o(E,b,X,F,B);return{suggestions:U}}})},s="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",t=me("LvDl");function a(E){return/^\d+$/.test(E)?"".concat(E,"px"):E}function c(){}var g=!1,y={"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 d(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],O=E;if(Array.isArray(E)){for(var w=0;w<E.length;w++){var _=y[E[w]];if(_)return _}return O[0]}return y[O]||O}var C=null,k=st.b=function(E){var O=E.width,w=O===void 0?"100%":O,_=E.height,F=_===void 0?"100%":_,M=E.value,b=E.language,X=b===void 0?"javascript":b,B=E.style,U=B===void 0?{}:B,W=E.options,ne=W===void 0?{}:W,re=E.overrideServices,ae=re===void 0?{}:re,ue=E.theme,V=ue===void 0?"vs-dark":ue,ye=E.onEditBlur,J=E.onSave,$=E.autoHeight,z=$===void 0?!1:$,H=E.forbidCopy,Y=H===void 0?!1:H,ee=E.onChange,we=ee===void 0?c:ee,he=E.editorDidMount,Ae=he===void 0?c:he,pe=E.onFocus,ge=pe===void 0?c:pe,se=E.filename,ie=se===void 0?"educoder.txt":se,Z=Object(f.a)(E,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),be=Object(h.useRef)(),te=Object(h.useRef)({}),q=Object(h.useRef)(),Ee=Object(h.useRef)(!1),Se=Object(h.useRef)(),Ie=Object(h.useState)(!1),P=Object(I.a)(Ie,2),e=P[0],i=P[1];function T(){var xe;return be.current&&(xe=new u.default(function(fe){var De=Object(r.a)(fe),ze;try{for(De.s();!(ze=De.n()).done;){var et=ze.value;(et.target.offsetHeight>0||et.target.offsetWidth>0)&&te.current.instance.layout()}}catch(mt){De.e(mt)}finally{De.f()}}),xe.observe(be.current)),xe}function x(){je.b.warn(decodeURIComponent(s))}var A=function(){var fe=te.current.instance;if(M!=null&&fe&&e){var De=fe.getModel();De&&M!==De.getValue()&&(g=!0,De.setValue(M),fe.layout(),g=!1)}};Object(h.useEffect)(function(){q.current&&clearTimeout(q.current),q.current=setTimeout(function(){A()},500)},[M,e,te.current]);function oe(){var xe=te.current.instance;if(xe){var fe=xe.getSelection(),De=te.current.pastePos||{},ze=new C.Range(De.startLineNumber||fe.endLineNumber,De.startColumn||fe.endColumn,De.endLineNumber||fe.endLineNumber,De.endColumn||fe.endColumn);setTimeout(function(){xe.executeEdits("",[{range:ze,text:""}])},300)}}function _e(xe){(window.navigator.platform.match("Mac")?xe.metaKey:xe.ctrlKey)&&xe.keyCode==83&&(xe.preventDefault(),J())}var He=function(){if(z&&te.current.instance){var fe=te.current.instance.getContentHeight();ce(fe<F?F:fe)}else ce(F)};function Ne(xe){var fe=document.createEvent("MouseEvents");fe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),xe.dispatchEvent(fe)}function Be(xe,fe){var De=window.URL||window.webkitURL||window,ze=new Blob([fe]),et=document.createElementNS("http://www.w3.org/1999/xhtml","a");et.href=De.createObjectURL(ze),et.download=xe,Ne(et)}Object(h.useEffect)(function(){He()},[He]),Object(h.useEffect)(function(){be.current&&!e&&me.e(27).then(me.t.bind(null,"M/lh",7)).then(function(xe){try{C=xe,te.current.instance=C.editor.create(be.current,{value:M,language:d(X),theme:V,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},ae);var fe=te.current.instance;if(Ae(fe,C),setTimeout(function(){He(),te.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){Be(ie||"educoder.txt",fe.getValue())}})},500),te.current.subscription=fe.onDidChangeModelContent(function(ze){Ee.current?clearTimeout(Se.current):(He(),we(fe.getValue(),ze)),Se.current=setTimeout(function(){Ee.current=!1},500)}),window.Monaco||p(C),Y&&(fe.addCommand(C.KeyMod.CtrlCmd|C.KeyMod.Shift|C.KeyCode.KEY_V,function(){return x(),null}),fe.addCommand(C.KeyMod.CtrlCmd|C.KeyCode.KEY_C,function(){return x(),null})),window.Monaco=C,ye&&fe.onDidBlurEditorWidget(function(){ye(fe.getValue())}),ge&&fe.onDidFocusEditorText(function(){ge(fe.getValue())}),Y){fe.addCommand(C.KeyMod.CtrlCmd|C.KeyCode.KEY_V,function(){return x(),null}),fe.onDidPaste(function(ze){te.current.pastePos=ze});try{window.addEventListener("paste",oe)}catch(ze){}}var De=T();return i(!0),function(){var ze=te.current.instance;ze.dispose();var et=ze.getModel();et&&et.dispose(),te.current.subscription&&te.current.subscription.dispose(),Y&&window.removeEventListener("paste",oe),De.unobserve(be.current)}}catch(ze){}})},[]),Object(h.useEffect)(function(){var xe=te.current.instance;if(xe&&e)return document.addEventListener("keydown",_e,!1),function(){document.removeEventListener("keydown",_e)}},[J,e]),Object(h.useEffect)(function(){var xe=te.current.instance;if(xe&&e){var fe=d(X);C.editor.setModelLanguage(xe.getModel(),fe),console.log("language:",X,xe.getModel(),fe)}},[X,e]),Object(h.useEffect)(function(){var xe=te.current.instance;xe&&e&&C.editor.setTheme(V)},[V,e]),Object(h.useEffect)(function(){var xe=te.current.instance;xe&&e&&(xe.updateOptions(Object(Fe.a)({},ne)),setTimeout(function(){xe.getModel().updateOptions(Object(Fe.a)({},ne))},200))},[JSON.stringify(ne),e]),Object(h.useEffect)(function(){var xe=te.current.instance;xe&&e&&xe.layout()},[w,F,e]);var $e=Object(h.useState)(a(w)),tt=Object(I.a)($e,2),Me=tt[0],Pe=tt[1],ke=Object(h.useState)(a(F)),Re=Object(I.a)(ke,2),Oe=Re[0],ce=Re[1],ve=Object(Fe.a)(Object(Fe.a)({},U),{},{width:Me,height:Oe});return m.a.createElement("div",{className:"my-monaco-editor",ref:be,style:ve})};function S(E){var O=E.width,w=O===void 0?"100%":O,_=E.height,F=_===void 0?"100%":_,M=E.original,b=E.modified,X=E.language,B=E.options,U=B===void 0?{}:B,W=Object(h.useRef)(),ne=Object(h.useState)(null),re=Object(I.a)(ne,2),ae=re[0],ue=re[1];function V(z){var H;return W.current&&(H=new u.default(function(Y){var ee=Object(r.a)(Y),we;try{for(ee.s();!(we=ee.n()).done;){var he=we.value;(he.target.offsetHeight>0||he.target.offsetWidth>0)&&z.layout()}}catch(Ae){ee.e(Ae)}finally{ee.f()}}),H.observe(W.current)),H}Object(h.useEffect)(function(){W.current&&me.e(27).then(me.t.bind(null,"M/lh",7)).then(function(z){C=z;var H=C.editor.createDiffEditor(W.current,Object(Fe.a)(Object(Fe.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},U),{},{wordWrap:!0}));ue(H);var Y=V(H);return function(){H.dispose();var ee=H.getModel();ee&&ee.dispose(),Y.unobserve(W.current)}})},[]),Object(h.useEffect)(function(){ae&&ae.setModel({original:C.editor.createModel(M,X),modified:C.editor.createModel(b,X)})},[M,b,X,ae]);var ye=a(w),J=a(F),$={width:ye,height:J};return m.a.createElement("div",{className:"my-diff-editor",ref:W,style:$})}},ZpRC:function(ht,st,me){"use strict";function Fe(p){return typeof p=="object"&&p!=null&&p.nodeType===1}function Ve(p,s){return(!s||p!=="hidden")&&p!=="visible"&&p!=="clip"}function je(p,s){if(p.clientHeight<p.scrollHeight||p.clientWidth<p.scrollWidth){var t=getComputedStyle(p,null);return Ve(t.overflowY,s)||Ve(t.overflowX,s)||function(a){var c=function(g){if(!g.ownerDocument||!g.ownerDocument.defaultView)return null;try{return g.ownerDocument.defaultView.frameElement}catch(y){return null}}(a);return!!c&&(c.clientHeight<a.scrollHeight||c.clientWidth<a.scrollWidth)}(p)}return!1}function r(p,s,t,a,c,g,y,d){return g<p&&y>s||g>p&&y<s?0:g<=p&&d<=t||y>=s&&d>=t?g-p-a:y>s&&d<t||g<p&&d>t?y-s+c:0}var I=function(p,s){var t=window,a=s.scrollMode,c=s.block,g=s.inline,y=s.boundary,d=s.skipOverflowHiddenElements,C=typeof y=="function"?y:function(Se){return Se!==y};if(!Fe(p))throw new TypeError("Invalid target");for(var k=document.scrollingElement||document.documentElement,S=[],E=p;Fe(E)&&C(E);){if((E=E.parentElement)===k){S.push(E);break}E!=null&&E===document.body&&je(E)&&!je(document.documentElement)||E!=null&&je(E,d)&&S.push(E)}for(var O=t.visualViewport?t.visualViewport.width:innerWidth,w=t.visualViewport?t.visualViewport.height:innerHeight,_=window.scrollX||pageXOffset,F=window.scrollY||pageYOffset,M=p.getBoundingClientRect(),b=M.height,X=M.width,B=M.top,U=M.right,W=M.bottom,ne=M.left,re=c==="start"||c==="nearest"?B:c==="end"?W:B+b/2,ae=g==="center"?ne+X/2:g==="end"?U:ne,ue=[],V=0;V<S.length;V++){var ye=S[V],J=ye.getBoundingClientRect(),$=J.height,z=J.width,H=J.top,Y=J.right,ee=J.bottom,we=J.left;if(a==="if-needed"&&B>=0&&ne>=0&&W<=w&&U<=O&&B>=H&&W<=ee&&ne>=we&&U<=Y)return ue;var he=getComputedStyle(ye),Ae=parseInt(he.borderLeftWidth,10),pe=parseInt(he.borderTopWidth,10),ge=parseInt(he.borderRightWidth,10),se=parseInt(he.borderBottomWidth,10),ie=0,Z=0,be="offsetWidth"in ye?ye.offsetWidth-ye.clientWidth-Ae-ge:0,te="offsetHeight"in ye?ye.offsetHeight-ye.clientHeight-pe-se:0;if(k===ye)ie=c==="start"?re:c==="end"?re-w:c==="nearest"?r(F,F+w,w,pe,se,F+re,F+re+b,b):re-w/2,Z=g==="start"?ae:g==="center"?ae-O/2:g==="end"?ae-O:r(_,_+O,O,Ae,ge,_+ae,_+ae+X,X),ie=Math.max(0,ie+F),Z=Math.max(0,Z+_);else{ie=c==="start"?re-H-pe:c==="end"?re-ee+se+te:c==="nearest"?r(H,ee,$,pe,se+te,re,re+b,b):re-(H+$/2)+te/2,Z=g==="start"?ae-we-Ae:g==="center"?ae-(we+z/2)+be/2:g==="end"?ae-Y+ge+be:r(we,Y,z,Ae,ge+be,ae,ae+X,X);var q=ye.scrollLeft,Ee=ye.scrollTop;re+=Ee-(ie=Math.max(0,Math.min(Ee+ie,ye.scrollHeight-$+te))),ae+=q-(Z=Math.max(0,Math.min(q+Z,ye.scrollWidth-z+be)))}ue.push({el:ye,top:ie,left:Z})}return ue};function f(p){return p===Object(p)&&Object.keys(p).length!==0}function h(p,s){s===void 0&&(s="auto");var t="scrollBehavior"in document.body.style;p.forEach(function(a){var c=a.el,g=a.top,y=a.left;c.scroll&&t?c.scroll({top:g,left:y,behavior:s}):(c.scrollTop=g,c.scrollLeft=y)})}function m(p){return p===!1?{block:"end",inline:"nearest"}:f(p)?p:{block:"start",inline:"nearest"}}function u(p,s){var t=!p.ownerDocument.documentElement.contains(p);if(f(s)&&typeof s.behavior=="function")return s.behavior(t?[]:I(p,s));if(t)return;var a=m(s);return h(I(p,a),a.behavior)}var o=st.a=u},Zss7:function(ht,st,me){var Fe;(function(Ve){var je=/^\s+/,r=/\s+$/,I=0,f=Ve.round,h=Ve.min,m=Ve.max,u=Ve.random;function o(se,ie){if(se=se||"",ie=ie||{},se instanceof o)return se;if(!(this instanceof o))return new o(se,ie);var Z=p(se);this._originalInput=se,this._r=Z.r,this._g=Z.g,this._b=Z.b,this._a=Z.a,this._roundA=f(100*this._a)/100,this._format=ie.format||Z.format,this._gradientType=ie.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=Z.ok,this._tc_id=I++}o.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var se=this.toRgb();return(se.r*299+se.g*587+se.b*114)/1e3},getLuminance:function(){var se=this.toRgb(),ie,Z,be,te,q,Ee;return ie=se.r/255,Z=se.g/255,be=se.b/255,ie<=.03928?te=ie/12.92:te=Ve.pow((ie+.055)/1.055,2.4),Z<=.03928?q=Z/12.92:q=Ve.pow((Z+.055)/1.055,2.4),be<=.03928?Ee=be/12.92:Ee=Ve.pow((be+.055)/1.055,2.4),.2126*te+.7152*q+.0722*Ee},setAlpha:function(se){return this._a=ue(se),this._roundA=f(100*this._a)/100,this},toHsv:function(){var se=c(this._r,this._g,this._b);return{h:se.h*360,s:se.s,v:se.v,a:this._a}},toHsvString:function(){var se=c(this._r,this._g,this._b),ie=f(se.h*360),Z=f(se.s*100),be=f(se.v*100);return this._a==1?"hsv("+ie+", "+Z+"%, "+be+"%)":"hsva("+ie+", "+Z+"%, "+be+"%, "+this._roundA+")"},toHsl:function(){var se=t(this._r,this._g,this._b);return{h:se.h*360,s:se.s,l:se.l,a:this._a}},toHslString:function(){var se=t(this._r,this._g,this._b),ie=f(se.h*360),Z=f(se.s*100),be=f(se.l*100);return this._a==1?"hsl("+ie+", "+Z+"%, "+be+"%)":"hsla("+ie+", "+Z+"%, "+be+"%, "+this._roundA+")"},toHex:function(se){return y(this._r,this._g,this._b,se)},toHexString:function(se){return"#"+this.toHex(se)},toHex8:function(se){return d(this._r,this._g,this._b,this._a,se)},toHex8String:function(se){return"#"+this.toHex8(se)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(V(this._r,255)*100)+"%",g:f(V(this._g,255)*100)+"%",b:f(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+f(V(this._r,255)*100)+"%, "+f(V(this._g,255)*100)+"%, "+f(V(this._b,255)*100)+"%)":"rgba("+f(V(this._r,255)*100)+"%, "+f(V(this._g,255)*100)+"%, "+f(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:re[y(this._r,this._g,this._b,!0)]||!1},toFilter:function(se){var ie="#"+C(this._r,this._g,this._b,this._a),Z=ie,be=this._gradientType?"GradientType = 1, ":"";if(se){var te=o(se);Z="#"+C(te._r,te._g,te._b,te._a)}return"progid:DXImageTransform.Microsoft.gradient("+be+"startColorstr="+ie+",endColorstr="+Z+")"},toString:function(se){var ie=!!se;se=se||this._format;var Z=!1,be=this._a<1&&this._a>=0,te=!ie&&be&&(se==="hex"||se==="hex6"||se==="hex3"||se==="hex4"||se==="hex8"||se==="name");return te?se==="name"&&this._a===0?this.toName():this.toRgbString():(se==="rgb"&&(Z=this.toRgbString()),se==="prgb"&&(Z=this.toPercentageRgbString()),(se==="hex"||se==="hex6")&&(Z=this.toHexString()),se==="hex3"&&(Z=this.toHexString(!0)),se==="hex4"&&(Z=this.toHex8String(!0)),se==="hex8"&&(Z=this.toHex8String()),se==="name"&&(Z=this.toName()),se==="hsl"&&(Z=this.toHslString()),se==="hsv"&&(Z=this.toHsvString()),Z||this.toHexString())},clone:function(){return o(this.toString())},_applyModification:function(se,ie){var Z=se.apply(null,[this].concat([].slice.call(ie)));return this._r=Z._r,this._g=Z._g,this._b=Z._b,this.setAlpha(Z._a),this},lighten:function(){return this._applyModification(O,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(k,arguments)},saturate:function(){return this._applyModification(S,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(F,arguments)},_applyCombination:function(se,ie){return se.apply(null,[this].concat([].slice.call(ie)))},analogous:function(){return this._applyCombination(U,arguments)},complement:function(){return this._applyCombination(M,arguments)},monochromatic:function(){return this._applyCombination(W,arguments)},splitcomplement:function(){return this._applyCombination(B,arguments)},triad:function(){return this._applyCombination(b,arguments)},tetrad:function(){return this._applyCombination(X,arguments)}},o.fromRatio=function(se,ie){if(typeof se=="object"){var Z={};for(var be in se)se.hasOwnProperty(be)&&(be==="a"?Z[be]=se[be]:Z[be]=Y(se[be]));se=Z}return o(se,ie)};function p(se){var ie={r:0,g:0,b:0},Z=1,be=null,te=null,q=null,Ee=!1,Se=!1;return typeof se=="string"&&(se=pe(se)),typeof se=="object"&&(Ae(se.r)&&Ae(se.g)&&Ae(se.b)?(ie=s(se.r,se.g,se.b),Ee=!0,Se=String(se.r).substr(-1)==="%"?"prgb":"rgb"):Ae(se.h)&&Ae(se.s)&&Ae(se.v)?(be=Y(se.s),te=Y(se.v),ie=g(se.h,be,te),Ee=!0,Se="hsv"):Ae(se.h)&&Ae(se.s)&&Ae(se.l)&&(be=Y(se.s),q=Y(se.l),ie=a(se.h,be,q),Ee=!0,Se="hsl"),se.hasOwnProperty("a")&&(Z=se.a)),Z=ue(Z),{ok:Ee,format:se.format||Se,r:h(255,m(ie.r,0)),g:h(255,m(ie.g,0)),b:h(255,m(ie.b,0)),a:Z}}function s(se,ie,Z){return{r:V(se,255)*255,g:V(ie,255)*255,b:V(Z,255)*255}}function t(se,ie,Z){se=V(se,255),ie=V(ie,255),Z=V(Z,255);var be=m(se,ie,Z),te=h(se,ie,Z),q,Ee,Se=(be+te)/2;if(be==te)q=Ee=0;else{var Ie=be-te;Ee=Se>.5?Ie/(2-be-te):Ie/(be+te);switch(be){case se:q=(ie-Z)/Ie+(ie<Z?6:0);break;case ie:q=(Z-se)/Ie+2;break;case Z:q=(se-ie)/Ie+4;break}q/=6}return{h:q,s:Ee,l:Se}}function a(se,ie,Z){var be,te,q;se=V(se,360),ie=V(ie,100),Z=V(Z,100);function Ee(P,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?P+(e-P)*6*i:i<1/2?e:i<2/3?P+(e-P)*(2/3-i)*6:P}if(ie===0)be=te=q=Z;else{var Se=Z<.5?Z*(1+ie):Z+ie-Z*ie,Ie=2*Z-Se;be=Ee(Ie,Se,se+1/3),te=Ee(Ie,Se,se),q=Ee(Ie,Se,se-1/3)}return{r:be*255,g:te*255,b:q*255}}function c(se,ie,Z){se=V(se,255),ie=V(ie,255),Z=V(Z,255);var be=m(se,ie,Z),te=h(se,ie,Z),q,Ee,Se=be,Ie=be-te;if(Ee=be===0?0:Ie/be,be==te)q=0;else{switch(be){case se:q=(ie-Z)/Ie+(ie<Z?6:0);break;case ie:q=(Z-se)/Ie+2;break;case Z:q=(se-ie)/Ie+4;break}q/=6}return{h:q,s:Ee,v:Se}}function g(se,ie,Z){se=V(se,360)*6,ie=V(ie,100),Z=V(Z,100);var be=Ve.floor(se),te=se-be,q=Z*(1-ie),Ee=Z*(1-te*ie),Se=Z*(1-(1-te)*ie),Ie=be%6,P=[Z,Ee,q,q,Se,Z][Ie],e=[Se,Z,Z,Ee,q,q][Ie],i=[q,q,Se,Z,Z,Ee][Ie];return{r:P*255,g:e*255,b:i*255}}function y(se,ie,Z,be){var te=[H(f(se).toString(16)),H(f(ie).toString(16)),H(f(Z).toString(16))];return be&&te[0].charAt(0)==te[0].charAt(1)&&te[1].charAt(0)==te[1].charAt(1)&&te[2].charAt(0)==te[2].charAt(1)?te[0].charAt(0)+te[1].charAt(0)+te[2].charAt(0):te.join("")}function d(se,ie,Z,be,te){var q=[H(f(se).toString(16)),H(f(ie).toString(16)),H(f(Z).toString(16)),H(ee(be))];return te&&q[0].charAt(0)==q[0].charAt(1)&&q[1].charAt(0)==q[1].charAt(1)&&q[2].charAt(0)==q[2].charAt(1)&&q[3].charAt(0)==q[3].charAt(1)?q[0].charAt(0)+q[1].charAt(0)+q[2].charAt(0)+q[3].charAt(0):q.join("")}function C(se,ie,Z,be){var te=[H(ee(be)),H(f(se).toString(16)),H(f(ie).toString(16)),H(f(Z).toString(16))];return te.join("")}o.equals=function(se,ie){return!se||!ie?!1:o(se).toRgbString()==o(ie).toRgbString()},o.random=function(){return o.fromRatio({r:u(),g:u(),b:u()})};function k(se,ie){ie=ie===0?0:ie||10;var Z=o(se).toHsl();return Z.s-=ie/100,Z.s=ye(Z.s),o(Z)}function S(se,ie){ie=ie===0?0:ie||10;var Z=o(se).toHsl();return Z.s+=ie/100,Z.s=ye(Z.s),o(Z)}function E(se){return o(se).desaturate(100)}function O(se,ie){ie=ie===0?0:ie||10;var Z=o(se).toHsl();return Z.l+=ie/100,Z.l=ye(Z.l),o(Z)}function w(se,ie){ie=ie===0?0:ie||10;var Z=o(se).toRgb();return Z.r=m(0,h(255,Z.r-f(255*-(ie/100)))),Z.g=m(0,h(255,Z.g-f(255*-(ie/100)))),Z.b=m(0,h(255,Z.b-f(255*-(ie/100)))),o(Z)}function _(se,ie){ie=ie===0?0:ie||10;var Z=o(se).toHsl();return Z.l-=ie/100,Z.l=ye(Z.l),o(Z)}function F(se,ie){var Z=o(se).toHsl(),be=(Z.h+ie)%360;return Z.h=be<0?360+be:be,o(Z)}function M(se){var ie=o(se).toHsl();return ie.h=(ie.h+180)%360,o(ie)}function b(se){var ie=o(se).toHsl(),Z=ie.h;return[o(se),o({h:(Z+120)%360,s:ie.s,l:ie.l}),o({h:(Z+240)%360,s:ie.s,l:ie.l})]}function X(se){var ie=o(se).toHsl(),Z=ie.h;return[o(se),o({h:(Z+90)%360,s:ie.s,l:ie.l}),o({h:(Z+180)%360,s:ie.s,l:ie.l}),o({h:(Z+270)%360,s:ie.s,l:ie.l})]}function B(se){var ie=o(se).toHsl(),Z=ie.h;return[o(se),o({h:(Z+72)%360,s:ie.s,l:ie.l}),o({h:(Z+216)%360,s:ie.s,l:ie.l})]}function U(se,ie,Z){ie=ie||6,Z=Z||30;var be=o(se).toHsl(),te=360/Z,q=[o(se)];for(be.h=(be.h-(te*ie>>1)+720)%360;--ie;)be.h=(be.h+te)%360,q.push(o(be));return q}function W(se,ie){ie=ie||6;for(var Z=o(se).toHsv(),be=Z.h,te=Z.s,q=Z.v,Ee=[],Se=1/ie;ie--;)Ee.push(o({h:be,s:te,v:q})),q=(q+Se)%1;return Ee}o.mix=function(se,ie,Z){Z=Z===0?0:Z||50;var be=o(se).toRgb(),te=o(ie).toRgb(),q=Z/100,Ee={r:(te.r-be.r)*q+be.r,g:(te.g-be.g)*q+be.g,b:(te.b-be.b)*q+be.b,a:(te.a-be.a)*q+be.a};return o(Ee)},o.readability=function(se,ie){var Z=o(se),be=o(ie);return(Ve.max(Z.getLuminance(),be.getLuminance())+.05)/(Ve.min(Z.getLuminance(),be.getLuminance())+.05)},o.isReadable=function(se,ie,Z){var be=o.readability(se,ie),te,q;q=!1,te=ge(Z);switch(te.level+te.size){case"AAsmall":case"AAAlarge":q=be>=4.5;break;case"AAlarge":q=be>=3;break;case"AAAsmall":q=be>=7;break}return q},o.mostReadable=function(se,ie,Z){var be=null,te=0,q,Ee,Se,Ie;Z=Z||{},Ee=Z.includeFallbackColors,Se=Z.level,Ie=Z.size;for(var P=0;P<ie.length;P++)q=o.readability(se,ie[P]),q>te&&(te=q,be=o(ie[P]));return o.isReadable(se,be,{level:Se,size:Ie})||!Ee?be:(Z.includeFallbackColors=!1,o.mostReadable(se,["#fff","#000"],Z))};var ne=o.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},re=o.hexNames=ae(ne);function ae(se){var ie={};for(var Z in se)se.hasOwnProperty(Z)&&(ie[se[Z]]=Z);return ie}function ue(se){return se=parseFloat(se),(isNaN(se)||se<0||se>1)&&(se=1),se}function V(se,ie){$(se)&&(se="100%");var Z=z(se);return se=h(ie,m(0,parseFloat(se))),Z&&(se=parseInt(se*ie,10)/100),Ve.abs(se-ie)<1e-6?1:se%ie/parseFloat(ie)}function ye(se){return h(1,m(0,se))}function J(se){return parseInt(se,16)}function $(se){return typeof se=="string"&&se.indexOf(".")!=-1&&parseFloat(se)===1}function z(se){return typeof se=="string"&&se.indexOf("%")!=-1}function H(se){return se.length==1?"0"+se:""+se}function Y(se){return se<=1&&(se=se*100+"%"),se}function ee(se){return Ve.round(parseFloat(se)*255).toString(16)}function we(se){return J(se)/255}var he=function(){var se="[-\\+]?\\d+%?",ie="[-\\+]?\\d*\\.\\d+%?",Z="(?:"+ie+")|(?:"+se+")",be="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?",te="[\\s|\\(]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")[,|\\s]+("+Z+")\\s*\\)?";return{CSS_UNIT:new RegExp(Z),rgb:new RegExp("rgb"+be),rgba:new RegExp("rgba"+te),hsl:new RegExp("hsl"+be),hsla:new RegExp("hsla"+te),hsv:new RegExp("hsv"+be),hsva:new RegExp("hsva"+te),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ae(se){return!!he.CSS_UNIT.exec(se)}function pe(se){se=se.replace(je,"").replace(r,"").toLowerCase();var ie=!1;if(ne[se])se=ne[se],ie=!0;else if(se=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var Z;return(Z=he.rgb.exec(se))?{r:Z[1],g:Z[2],b:Z[3]}:(Z=he.rgba.exec(se))?{r:Z[1],g:Z[2],b:Z[3],a:Z[4]}:(Z=he.hsl.exec(se))?{h:Z[1],s:Z[2],l:Z[3]}:(Z=he.hsla.exec(se))?{h:Z[1],s:Z[2],l:Z[3],a:Z[4]}:(Z=he.hsv.exec(se))?{h:Z[1],s:Z[2],v:Z[3]}:(Z=he.hsva.exec(se))?{h:Z[1],s:Z[2],v:Z[3],a:Z[4]}:(Z=he.hex8.exec(se))?{r:J(Z[1]),g:J(Z[2]),b:J(Z[3]),a:we(Z[4]),format:ie?"name":"hex8"}:(Z=he.hex6.exec(se))?{r:J(Z[1]),g:J(Z[2]),b:J(Z[3]),format:ie?"name":"hex"}:(Z=he.hex4.exec(se))?{r:J(Z[1]+""+Z[1]),g:J(Z[2]+""+Z[2]),b:J(Z[3]+""+Z[3]),a:we(Z[4]+""+Z[4]),format:ie?"name":"hex8"}:(Z=he.hex3.exec(se))?{r:J(Z[1]+""+Z[1]),g:J(Z[2]+""+Z[2]),b:J(Z[3]+""+Z[3]),format:ie?"name":"hex"}:!1}function ge(se){var ie,Z;return se=se||{level:"AA",size:"small"},ie=(se.level||"AA").toUpperCase(),Z=(se.size||"small").toLowerCase(),ie!=="AA"&&ie!=="AAA"&&(ie="AA"),Z!=="small"&&Z!=="large"&&(Z="small"),{level:ie,size:Z}}ht.exports?ht.exports=o:!(Fe=function(){return o}.call(st,me,st,ht),Fe!==void 0&&(ht.exports=Fe))})(Math)},b57q:function(ht,st,me){ht.exports={officeContainer:"officeContainer___z7fd9"}},bT9E:function(ht,st,me){"use strict";me.d(st,"a",function(){return Ve});var Fe=me("VTBJ");function Ve(je,r){var I=Object(Fe.a)({},je);return Array.isArray(r)&&r.forEach(function(f){delete I[f]}),I}},eoI0:function(ht,st,me){ht.exports={selectSchool:"selectSchool___2Vrh7",delete:"delete___qM8Jm"}},"h/US":function(ht,st,me){"use strict";var Fe=me("DZo9"),Ve=me("8z0m"),je=me("+L6B"),r=me("2/Rp"),I=me("tJVT"),f=me("q1tI"),h=me.n(f),m=me("z7Xi"),u=me("jN4g"),o=me("m3rI"),p=me("w8Aa"),s=me.n(p),t=function(c){var g=c.value,y=c.onChange,d=c.getFileProgress,C=Object(f.useState)(!1),k=Object(I.a)(C,2),S=k[0],E=k[1],O=h.a.createElement(r.a,{loading:S,icon:h.a.createElement(m.a,null)},"\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),w=function(){return h.a.createElement("div",{className:s.a.img},h.a.createElement("img",{src:o.a.API_SERVER+"/api/attachments/"+g,alt:"avatar",style:{width:288}}),h.a.createElement("div",null,h.a.createElement(u.a,{onClick:function(){return y("")},style:{fontSize:"16px",color:"red"}})))},_=function(M){if(d&&d(M),M.file.status==="uploading"){E(!0);return}if(M.file.status==="done"){var b,X;E(!1),y(M==null||((b=M.file)===null||b===void 0||((X=b.response)===null||X===void 0))?void 0:X.id)}};return h.a.createElement(h.a.Fragment,null,g?w():h.a.createElement("div",null,h.a.createElement(Ve.a,{withCredentials:!0,name:"file",showUploadList:!1,action:"".concat(o.a.API_SERVER,"/api/attachments.json"),onChange:_,accept:"image/*"},O),h.a.createElement("div",{className:"mt20 c-light-black"},"\u8BF4\u660E\uFF1A\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528288*158\u50CF\u7D20\uFF1B"),h.a.createElement("div",{className:"c-light-black"},"\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002")))};st.a=t},h78n:function(ht,st,me){"use strict";me.d(st,"a",function(){return W});var Fe=me("q1tI"),Ve=me.n(Fe),je=me("TSYQ"),r=me.n(je),I={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},f=function(ae){var ue=ae.map(function(){return Object(Fe.useRef)()}),V=Object(Fe.useRef)();return Object(Fe.useEffect)(function(){var ye=Date.now(),J=!1;Object.keys(ue).forEach(function($){var z=ue[$].current;if(!z)return;J=!0;var H=z.style;H.transitionDuration=".3s, .3s, .3s, .06s",V.current&&ye-V.current<100&&(H.transitionDuration="0s, 0s")}),J&&(V.current=Date.now())}),[ue]};function h(){return h=Object.assign||function(re){for(var ae=1;ae<arguments.length;ae++){var ue=arguments[ae];for(var V in ue)Object.prototype.hasOwnProperty.call(ue,V)&&(re[V]=ue[V])}return re},h.apply(this,arguments)}function m(re,ae){return t(re)||s(re,ae)||o(re,ae)||u()}function u(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o(re,ae){if(!re)return;if(typeof re=="string")return p(re,ae);var ue=Object.prototype.toString.call(re).slice(8,-1);if(ue==="Object"&&re.constructor&&(ue=re.constructor.name),ue==="Map"||ue==="Set")return Array.from(re);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return p(re,ae)}function p(re,ae){(ae==null||ae>re.length)&&(ae=re.length);for(var ue=0,V=new Array(ae);ue<ae;ue++)V[ue]=re[ue];return V}function s(re,ae){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(re)))return;var ue=[],V=!0,ye=!1,J=void 0;try{for(var $=re[Symbol.iterator](),z;!(V=(z=$.next()).done)&&!(ue.push(z.value),ae&&ue.length===ae);V=!0);}catch(H){ye=!0,J=H}finally{try{!V&&$.return!=null&&$.return()}finally{if(ye)throw J}}return ue}function t(re){if(Array.isArray(re))return re}function a(re,ae){if(re==null)return{};var ue=c(re,ae),V,ye;if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(re);for(ye=0;ye<J.length;ye++){if(V=J[ye],ae.indexOf(V)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(re,V))continue;ue[V]=re[V]}}return ue}function c(re,ae){if(re==null)return{};var ue={},V=Object.keys(re),ye,J;for(J=0;J<V.length;J++){if(ye=V[J],ae.indexOf(ye)>=0)continue;ue[ye]=re[ye]}return ue}var g=function(ae){var ue=ae.className,V=ae.percent,ye=ae.prefixCls,J=ae.strokeColor,$=ae.strokeLinecap,z=ae.strokeWidth,H=ae.style,Y=ae.trailColor,ee=ae.trailWidth,we=ae.transition,he=a(ae,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete he.gapPosition;var Ae=Array.isArray(V)?V:[V],pe=Array.isArray(J)?J:[J],ge=f(Ae),se=m(ge,1),ie=se[0],Z=z/2,be=100-z/2,te="M ".concat($==="round"?Z:0,",").concat(Z,`
L `).concat($==="round"?be:100,",").concat(Z),q="0 0 100 ".concat(z),Ee=0;return Ve.a.createElement("svg",h({className:r()("".concat(ye,"-line"),ue),viewBox:q,preserveAspectRatio:"none",style:H},he),Ve.a.createElement("path",{className:"".concat(ye,"-line-trail"),d:te,strokeLinecap:$,stroke:Y,strokeWidth:ee||z,fillOpacity:"0"}),Ae.map(function(Se,Ie){var P={strokeDasharray:"".concat(Se,"px, 100px"),strokeDashoffset:"-".concat(Ee,"px"),transition:we||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},e=pe[Ie]||pe[pe.length-1];return Ee+=Se,Ve.a.createElement("path",{key:Ie,className:"".concat(ye,"-line-path"),d:te,strokeLinecap:$,stroke:e,strokeWidth:z,fillOpacity:"0",ref:ie[Ie],style:P})}))};g.defaultProps=I;var y=g;function d(){return d=Object.assign||function(re){for(var ae=1;ae<arguments.length;ae++){var ue=arguments[ae];for(var V in ue)Object.prototype.hasOwnProperty.call(ue,V)&&(re[V]=ue[V])}return re},d.apply(this,arguments)}function C(re,ae){return w(re)||O(re,ae)||S(re,ae)||k()}function k(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(re,ae){if(!re)return;if(typeof re=="string")return E(re,ae);var ue=Object.prototype.toString.call(re).slice(8,-1);if(ue==="Object"&&re.constructor&&(ue=re.constructor.name),ue==="Map"||ue==="Set")return Array.from(re);if(ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ue))return E(re,ae)}function E(re,ae){(ae==null||ae>re.length)&&(ae=re.length);for(var ue=0,V=new Array(ae);ue<ae;ue++)V[ue]=re[ue];return V}function O(re,ae){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(re)))return;var ue=[],V=!0,ye=!1,J=void 0;try{for(var $=re[Symbol.iterator](),z;!(V=(z=$.next()).done)&&!(ue.push(z.value),ae&&ue.length===ae);V=!0);}catch(H){ye=!0,J=H}finally{try{!V&&$.return!=null&&$.return()}finally{if(ye)throw J}}return ue}function w(re){if(Array.isArray(re))return re}function _(re,ae){if(re==null)return{};var ue=F(re,ae),V,ye;if(Object.getOwnPropertySymbols){var J=Object.getOwnPropertySymbols(re);for(ye=0;ye<J.length;ye++){if(V=J[ye],ae.indexOf(V)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(re,V))continue;ue[V]=re[V]}}return ue}function F(re,ae){if(re==null)return{};var ue={},V=Object.keys(re),ye,J;for(J=0;J<V.length;J++){if(ye=V[J],ae.indexOf(ye)>=0)continue;ue[ye]=re[ye]}return ue}var M=0;function b(re){return+re.replace("%","")}function X(re){return Array.isArray(re)?re:[re]}function B(re,ae,ue,V){var ye=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,J=arguments.length>5?arguments[5]:void 0,$=50-V/2,z=0,H=-$,Y=0,ee=-2*$;switch(J){case"left":z=-$,H=0,Y=2*$,ee=0;break;case"right":z=$,H=0,Y=-2*$,ee=0;break;case"bottom":H=$,ee=2*$;break;default:}var we="M 50,50 m ".concat(z,",").concat(H,`
a `).concat($,",").concat($," 0 1 1 ").concat(Y,",").concat(-ee,`
a `).concat($,",").concat($," 0 1 1 ").concat(-Y,",").concat(ee),he=Math.PI*2*$,Ae={stroke:ue,strokeDasharray:"".concat(ae/100*(he-ye),"px ").concat(he,"px"),strokeDashoffset:"-".concat(ye/2+re/100*(he-ye),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:we,pathStyle:Ae}}var U=function(ae){var ue=ae.prefixCls,V=ae.strokeWidth,ye=ae.trailWidth,J=ae.gapDegree,$=ae.gapPosition,z=ae.trailColor,H=ae.strokeLinecap,Y=ae.style,ee=ae.className,we=ae.strokeColor,he=ae.percent,Ae=_(ae,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),pe=Object(Fe.useMemo)(function(){return M+=1,M},[]),ge=B(0,100,z,V,J,$),se=ge.pathString,ie=ge.pathStyle,Z=X(he),be=X(we),te=be.find(function(P){return Object.prototype.toString.call(P)==="[object Object]"}),q=f(Z),Ee=C(q,1),Se=Ee[0],Ie=function(){var e=0;return Z.map(function(i,T){var x=be[T]||be[be.length-1],A=Object.prototype.toString.call(x)==="[object Object]"?"url(#".concat(ue,"-gradient-").concat(pe,")"):"",oe=B(e,i,x,V,J,$);return e+=i,Ve.a.createElement("path",{key:T,className:"".concat(ue,"-circle-path"),d:oe.pathString,stroke:A,strokeLinecap:H,strokeWidth:V,opacity:i===0?0:1,fillOpacity:"0",style:oe.pathStyle,ref:Se[T]})})};return Ve.a.createElement("svg",d({className:r()("".concat(ue,"-circle"),ee),viewBox:"0 0 100 100",style:Y},Ae),te&&Ve.a.createElement("defs",null,Ve.a.createElement("linearGradient",{id:"".concat(ue,"-gradient-").concat(pe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(te).sort(function(P,e){return b(P)-b(e)}).map(function(P,e){return Ve.a.createElement("stop",{key:e,offset:P,stopColor:te[P]})}))),Ve.a.createElement("path",{className:"".concat(ue,"-circle-trail"),d:se,stroke:z,strokeLinecap:H,strokeWidth:ye||V,fillOpacity:"0",style:ie}),Ie().reverse())};U.defaultProps=I;var W=U,ne={Line:y,Circle:W}},hgre:function(ht,st,me){"use strict";var Fe=me("miYZ"),Ve=me("tsqr"),je=me("9og8"),r=me("WmNS"),I=me.n(r),f=me("q1tI"),h=me.n(f),m=me("GUcZ"),u=me("ulZh"),o=me.n(u),p=me("xKgJ"),s=me("bntm"),t=me("4xil"),a=me.n(t);function c(C){if(isNaN(C))return{minutes:"00",seconds:"00"};var k=new Date(C*1e3).toISOString().substr(11,8);return{minutes:k.substr(3,2),seconds:k.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function g(C,k){return C-k}function y(C){C.sort(g);for(var k=0,S=0;S<C.length-1;S++){var E=Math.abs(C[S+1]-C[S]);E<21&&(k+=E)}return k}var d=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;st.a=Object(f.forwardRef)(function(C,k){var S,E=C.src,O=C.toLog,w=C.videoId,_=C.logWatchHistory,F=C.courseId,M=F===void 0?null:F,b=C.startTime,X=C.handlePause,B=X===void 0?function(){}:X,U=C.handlePlay,W=U===void 0?function(){}:U,ne=C.handlePlayEnded,re=ne===void 0?function(){}:ne,ae=C.videoSpeed,ue=ae===void 0?1:ae,V=E==null||((S=E.split("."))===null||S===void 0)?void 0:S.pop(),ye=V==="flv",J=Object(f.useRef)(),$=Object(f.useRef)(),z=Object(f.useRef)(),H=Object(f.useRef)(),Y=Object(f.useRef)(),ee=Object(f.useRef)(),we=Object(f.useRef)(),he=Object(f.useRef)(),Ae=Object(f.useRef)(),pe=Object(f.useRef)(),ge=Object(f.useRef)(),se=Object(f.useRef)(),ie=Object(f.useRef)(),Z=Object(f.useRef)(),be=navigator.userAgent.toLowerCase().match(d),te=be?be[0]:"pc",q=Object(f.useRef)(!1),Ee=Object(p.x)(),Se=0,Ie=0,P=0,e=null,i=!1,T=20,x=1,A=!1,oe=!1,_e=[];Object(f.useImperativeHandle)(k,function(){return{getLastUpdatedTime:function(){return J.current.currentTime},getDuration:function(){return J.current.duration}}});var He=Object(f.useCallback)(function(Me){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ke={point:J.current.currentTime};e?(ke.log_id=e,ke.watch_duration=y(_e),ke.total_duration=Ie):(M?(ke.video_id=parseInt(w,10),ke.course_id=M):ke.video_id=w,ke.duration=Se,ke.device=te),Pe&&(ke.ed="1");function Re(){return Oe.apply(this,arguments)}function Oe(){return Oe=Object(je.a)(I.a.mark(function ce(){var ve;return I.a.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return A=!0,fe.next=3,_(ke);case 3:ve=fe.sent,e=ve,A=!1,Me&&Me();case 7:case"end":return fe.stop()}},ce)})),Oe.apply(this,arguments)}Re()},[w,M]);Object(f.useEffect)(function(){Ve.b.destroy();var Me=null;return m.a.isSupported&&ye&&E&&(E==null?void 0:E.indexOf(".m3u8"))<0?(Me=m.a.createPlayer({type:"flv",volume:.8,cors:!0,url:E,muted:!1}),J.current&&(Me.attachMediaElement(J.current),Me.load())):J.current.setAttribute("src",E),Be(),function(){Me&&(Me.unload(),Me.pause(),Me.destroy(),Me=null)}},[J,ye,E]);function Ne(){J.current.paused?(H.current.style.display="none",Y.current.style.display="block"):(H.current.style.display="block",Y.current.style.display="none")}function Be(){ge.current.style.display="none",ie.current.style.display="none",se.current.style.display="none",J.current.muted||J.current.volume===0?ge.current.style.display="block":J.current.volume>0&&J.current.volume<=.5?ie.current.style.display="block":se.current.style.display="block"}Object(f.useEffect)(function(){var Me=document.getElementById("play"),Pe=document.querySelectorAll(".playback-icons use");function ke(){W(),b&&!q.current&&(J.current.currentTime=b),q.current=!0,_e.push(J.current.currentTime),i||(i=!0,O&&He())}function Re(){return Oe.apply(this,arguments)}function Oe(){return Oe=Object(je.a)(I.a.mark(function Je(){return I.a.wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:Ne(),_e.push(J.current.currentTime),O&&He(function(){e=null,P=0,i=!1,A=!1,oe=!1,_e=[],Ie=0,x=1},!0);case 3:case"end":return ot.stop()}},Je)})),Oe.apply(this,arguments)}function ce(){ee.current.value=Math.floor(J.current.currentTime),we.current.value=Math.floor(J.current.currentTime)}function ve(){var Je=c(Math.round(J.current.currentTime));Ae.current.innerText="".concat(Je.minutes,":").concat(Je.seconds),Ae.current.setAttribute("datetime","".concat(Je.minutes,"m ").concat(Je.seconds,"s"))}function xe(){var Je=Math.round(J.current.duration);ee.current.setAttribute("max",Je),we.current.setAttribute("max",Je);var Xe=c(Je);he.current.innerText="".concat(Xe.minutes,":").concat(Xe.seconds),he.current.setAttribute("datetime","".concat(Xe.minutes,"m ").concat(Xe.seconds,"s"))}function fe(){var Je=Math.round(J.current.duration);ee.current.setAttribute("max",Je),we.current.setAttribute("max",Je);var Xe=c(Je);he.current.innerText="".concat(Xe.minutes,":").concat(Xe.seconds),he.current.setAttribute("datetime","".concat(Xe.minutes,"m ").concat(Xe.seconds,"s")),ce(),ve();var ot=$.current.getBoundingClientRect(),rt=ot.width,ft=ot.height,gt=ot.x,ct=ot.y;if(gt<0||ct<0||!rt)return;if(!oe){var yt=J.current.currentTime,Ct=yt-P;Math.abs(Ct)<10?(Ie+=Math.abs(Ct),P=yt,A||Ie-x*T>=0&&(x++,_e.push(P),O&&He())):(P=yt,O&&He())}}function De(){oe=!0}function ze(){J.current.playing&&_e.push(J.current.currentTime,P),P=J.current.currentTime,oe=!1}function et(){Se=J.current.duration,Se<=20&&(T=Se/3),J.current.addEventListener("play",ke)}function mt(Je){Je.preventDefault(),Object(s.a)()?(J.current.style.width="100%",J.current.style.height="100%"):J.current.style.cssText=""}function _t(){B()}function vt(Je){var Xe=Je.target.dataset.seek?Je.target.dataset.seek:Je.target.value;J.current.currentTime=Xe,we.current.value=Xe,ee.current.value=Xe}function pt(Je){var Xe=Math.round(Je.offsetX/Je.target.clientWidth*parseInt(Je.target.getAttribute("max"),10));ee.current.setAttribute("data-seek",Xe);var ot=c(Xe);pe.current.textContent="".concat(ot.minutes,":").concat(ot.seconds);var rt=J.current.getBoundingClientRect();pe.current.style.left="".concat(Je.pageX-rt.left,"px")}return z.current.addEventListener(Object(s.c)(),mt),J.current.addEventListener("canplay",et),J.current.addEventListener("ended",Re),J.current.addEventListener("seeking",De),J.current.addEventListener("seeked",ze),J.current.addEventListener("loadedmetadata",xe),ee.current.addEventListener("mousemove",pt),ee.current.addEventListener("input",vt),J.current.addEventListener("timeupdate",fe),J.current.addEventListener("pause",_t),J.current.addEventListener("volumechange",Be),function(){J.current.removeEventListener("canplay",et),J.current.removeEventListener("play",ke),J.current.removeEventListener("ended",Re),J.current.removeEventListener("seeking",De),J.current.removeEventListener("seeked",ze),ee.current.removeEventListener("mousemove",pt),ee.current.removeEventListener("input",vt),J.current.removeEventListener("timeupdate",fe),J.current.removeEventListener("pause",_t),J.current.removeEventListener("loadedmetadata",xe),J.current.removeEventListener("volumechange",Be),J.current.playing&&(_e.push(P,J.current.currentTime),O&&He())}},[J,E]),Object(f.useEffect)(function(){if(J.current.onended=function(){re(J)},J.current.oncontextmenu=function(){return!1},(E==null?void 0:E.indexOf(".m3u8"))>-1){if(J.current.canPlayType("application/vnd.apple.mpegurl"))J.current.src=E;else if(o.a.isSupported()){var Me=new o.a;Me.loadSource(E),Me.attachMedia(J.current)}}},[E]),Object(f.useEffect)(function(){J.current.playbackRate=ue},[ue]);var $e=function(){J.current.paused||J.current.ended?J.current.play():J.current.pause(),Ne()};function tt(){J.current.muted=!J.current.muted,J.current.muted?(Z.current.setAttribute("data-volume",volume.value),Z.current.value=0):Z.current.value=Z.current.dataset.volume}return h.a.createElement("div",{style:{position:"relative"},ref:z},h.a.createElement("div",{ref:$,className:"".concat(a.a.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(a.a.animate__loop)},Ee?Ee.login:" "),h.a.createElement("div",{className:a.a.container},h.a.createElement("div",{className:a.a["video-container"],id:"video-container"},h.a.createElement("div",{className:a.a["playback-animation"],id:"playback-animation"},h.a.createElement("svg",{className:a.a["playback-icons"]},h.a.createElement("use",{className:"hidden",href:"#play-icon"}),h.a.createElement("use",{href:"#pause"}))),h.a.createElement("video",{className:a.a.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:J,autoPlay:!1}),h.a.createElement("div",{className:"".concat(a.a["video-controls"]," "),id:"video-controls"},h.a.createElement("div",{className:a.a["bottom-controls"]},h.a.createElement("div",{className:a.a["left-controls"]},h.a.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:$e},h.a.createElement("svg",{className:a.a["playback-icons"]},h.a.createElement("use",{ref:Y,href:"#play-icon"}),h.a.createElement("use",{ref:H,style:{display:"none"},href:"#pause"}))),h.a.createElement("div",{className:a.a.time},h.a.createElement("time",{id:"time-elapsed",ref:Ae},"00:00"),h.a.createElement("span",null," / "),h.a.createElement("time",{id:"duration",ref:he},"00:00"))),h.a.createElement("div",{className:a.a["right-controls"]},h.a.createElement("div",{className:a.a["volume-controls"]},h.a.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:a.a["volume-button"],id:"volume-button",onClick:tt},h.a.createElement("svg",null,h.a.createElement("use",{ref:ge,href:"#volume-mute"}),h.a.createElement("use",{ref:ie,href:"#volume-low"}),h.a.createElement("use",{ref:se,href:"#volume-high"}))),h.a.createElement("input",{className:a.a.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:Z,style:{display:"none"},onClick:Be})),h.a.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:a.a["fullscreen-button"],onClick:function(){Object(s.a)()?Object(s.b)():Object(s.d)(z.current)}},h.a.createElement("svg",null,h.a.createElement("use",{href:"#fullscreen"}),h.a.createElement("use",{href:"#fullscreen-exit",className:"hidden"}))))),h.a.createElement("div",{className:a.a["video-progress"]},h.a.createElement("progress",{ref:we,value:"0",min:"0"}),h.a.createElement("input",{className:a.a.seek,ref:ee,value:"0",min:"0",type:"range",step:"1"}),h.a.createElement("div",{className:a.a["seek-tooltip"],ref:pe,id:"seek-tooltip"},"00:00"))))),h.a.createElement("svg",{style:{display:"none"}},h.a.createElement("defs",null,h.a.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},h.a.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),h.a.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},h.a.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),h.a.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},h.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"})),h.a.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},h.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"})),h.a.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},h.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"})),h.a.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},h.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"})),h.a.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},h.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"})),h.a.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},h.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"})))))})},kwm0:function(ht,st,me){ht.exports={modal:"modal___1jX7c",uploadWrap:"uploadWrap___3-sVK",upload:"upload___2LemY",uploadLink:"uploadLink___j9Fsx",fileProgress:"fileProgress___11p3K",fileCancel:"fileCancel___3Mx9l",videoName:"videoName___2a-ZN",contentItem:"contentItem___1gUuj","tagsList-content":"tagsList-content___3Yj4d"}},lppi:function(ht,st,me){ht.exports={pdfContainer:"pdfContainer___ECPbw",loading:"loading___2tzD5"}},mOS8:function(ht,st,me){ht.exports=me.p+"static/403Qrcode.6c17b6f4.png"},nUhQ:function(ht,st,me){ht.exports={flex_box_center:"flex_box_center___1OQ1z",flex_space_between:"flex_space_between___22uwF",flex_box_vertical_center:"flex_box_vertical_center___1xWAr",flex_box_center_end:"flex_box_center_end___1QTe3",flex_box_column:"flex_box_column___lWxZG",banner:"banner___1Hzq6",wrap:"wrap___1D5RS",title:"title___1LzGm",contentWrap:"contentWrap___19oxo",button:"button___3chJs",rating:"rating___3ODxx"}},p5ED:function(ht,st,me){"use strict";var Fe=me("+L6B"),Ve=me("2/Rp"),je=me("5Dmo"),r=me("3S7+"),I=me("k1fw"),f=me("9og8"),h=me("tJVT"),m=me("WmNS"),u=me.n(m),o=me("q1tI"),p=me.n(o),s=me("vHTk"),t=me.n(s),a=me("yEEn"),c=me("ZW9T"),g=me("1vsH"),y=me("V0Rq"),d=me("m3rI"),C=function(S){var E=S.name,O=S.data,w=S.theme,_=S.type,F=S.filename,M=S.monacoEditor,b=S.className,X=S.style,B=S.close,U=S.onClose,W=S.hasMask,ne=S.otherData,re=ne===void 0?{}:ne,ae=Object(o.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),ue=Object(h.a)(ae,2),V=ue[0],ye=ue[1],J=Object(o.useState)(""),$=Object(h.a)(J,2),z=$[0],H=$[1],Y=Object(o.useState)(),ee=Object(h.a)(Y,2),we=ee[0],he=ee[1],Ae=window.ENV==="build"?"/react/build/office.html":"/office.html",pe,ge=1024*1024,se=10*ge,ie=Object(o.useRef)();_==="office"&&(pe=Object(g.R)(O).filesize,pe>se&&(_="other")),F&&(M.filename=F),Object(o.useEffect)(function(){var q,Ee,Se=(q=document.cookie)===null||q===void 0||((Ee=q.replace(/\s/g,""))===null||Ee===void 0)?void 0:Ee.split(";");Se==null||Se.map(function(Ie){var P=Ie.split("=");P[0]==="_educoder_session"&&H(P[1])})},[]),Object(o.useEffect)(function(){_==="office"&&Z()},[_]);var Z=function(){var q=Object(f.a)(u.a.mark(function Ee(){var Se,Ie,P;return u.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return console.log("data:",O),Se=O,O.startsWith("http")||(Se=location.origin+Se),Ie=new URL(Se).pathname.split("/").pop(),i.next=6,Object(y.U)({attachment_id:Ie});case 6:P=i.sent,he(P);case 8:case"end":return i.stop()}},Ee)}));return function(){return q.apply(this,arguments)}}(),be=function(){if(O.startsWith("http")||O.startsWith("blob:")){te();return}Object(g.x)(F||"educoder",O,F)},te=function(){Object(g.v)(F||"educoder",decodeURIComponent(O))};return p.a.createElement("div",{style:Object(I.a)({},X||{}),className:"".concat(W&&t.a.bgBlack," ").concat(_?t.a.wrp:"hide")},B&&p.a.createElement("div",{className:t.a.close,ref:ie},p.a.createElement(r.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ie.current}},p.a.createElement("span",{onClick:te},p.a.createElement("i",{className:"icon-quxiaozhiding"}))),p.a.createElement(r.a,{title:"\u5173\u95ED",getPopupContainer:function(){return ie.current}},p.a.createElement("span",{className:"",onClick:function(){U(),he(null)}},p.a.createElement("i",{className:"icon-guanbi1"})))),p.a.createElement("div",{className:"".concat(t.a[b]," ").concat(b," ").concat(t.a.monaco," ").concat(_==="txt"?"show":"hide")},_==="txt"&&p.a.createElement(c.b,M)),_==="audio"&&p.a.createElement("audio",{src:"".concat((O==null?void 0:O.indexOf("http://"))>-1||(O==null?void 0:O.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(O),autoPlay:!0}),_==="video"&&p.a.createElement(p.a.Fragment,null,(O==null?void 0:O.indexOf("http"))>-1?p.a.createElement("video",{controls:!0,src:"".concat(O),autoPlay:!0}):p.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(O),autoPlay:!0})),_==="office"&&we&&p.a.createElement("iframe",{src:"".concat(Ae,"?key=").concat(we.key,"&url=").concat(d.a.API_SERVER+we.url,"&callbackUrl=").concat(d.a.API_SERVER+we.callbackUrl,"&fileType=").concat(we.fileType,"&title=").concat(we.title,"&model=view")}),(_==="xlsx"||_==="doc"||_==="pptx"||_==="docx")&&p.a.createElement("iframe",{src:"".concat(Ae,"?key=").concat(re.key,"&url=").concat(d.a.API_SERVER+re.url,"&callbackUrl=").concat(d.a.API_SERVER+re.callbackUrl,"&fileType=").concat(re.fileType,"&title=").concat(re.title,"&model=").concat(re.model)}),_==="html"&&p.a.createElement("iframe",{src:O+"&disposition=inline"}),_==="pdf"&&p.a.createElement("embed",{className:t.a.embed,src:O,type:"application/pdf"}),_==="image"&&p.a.createElement("img",{src:"".concat((O==null?void 0:O.indexOf("http://"))>-1||(O==null?void 0:O.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(O)}),_==="other"&&p.a.createElement("div",null,p.a.createElement(Ve.a,{type:"primary",size:"large",onClick:be},p.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),_==="download"&&p.a.createElement(Ve.a,{type:"primary",size:"large",onClick:be},p.a.createElement(a.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))};st.a=C},ppsT:function(ht,st,me){(function(Fe){var Ve,Ve;!function(je){if(!0)window.OSS=je(),ht.exports=je();else var r}(function(){var je;return function(){function r(I,f,h){function m(p,s){if(!f[p]){if(!I[p]){var t=typeof Ve=="function"&&Ve;if(!s&&t)return Ve(p,!0);if(u)return u(p,!0);var a=new Error("Cannot find module '"+p+"'");throw a.code="MODULE_NOT_FOUND",a}var c=f[p]={exports:{}};I[p][0].call(c.exports,function(g){return m(I[p][1][g]||g)},c,c.exports,r,I,f,h)}return f[p].exports}for(var u=typeof Ve=="function"&&Ve,o=0;o<h.length;o++)m(h[o]);return m}return r}()({1:[function(r,I,f){"use strict";var h=r("./browser/client");h.Buffer=r("buffer").Buffer,h.co=r("co"),h.urllib=r("../shims/xhr"),h.version=r("./browser/version").version,I.exports=h},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(r,I,f){(function(h,m){"use strict";function u($){return $&&$.__esModule?$:{default:$}}function o($,z){return $[z]||$[z.toLowerCase()]}function p($,z){var H=b.parse($);if(!H.protocol){var Y=z?"https://":"http://";H=b.parse(Y+$)}if(H.protocol!=="http:"&&H.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return H}function s($,z,H){var Y=H?"https://":"http://",ee=z?"-internal.aliyuncs.com":".aliyuncs.com";return $.substr(0,"vpc100-oss-cn-".length)==="vpc100-oss-cn-"&&(ee=".aliyuncs.com"),b.parse(Y+$+ee)}function t(){return document&&document.location&&document.location.protocol==="https:"}function a($,z){if(!(this instanceof a))return new a($,z);$&&$.inited?this.options=$:this.options=a.initOptions($),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=W,this.agent=this.options.agent||ye),this.ctx=z,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var c=r("babel-runtime/regenerator"),g=u(c),y=r("babel-runtime/core-js/object/keys"),d=u(y),C=r("debug")("ali-oss"),k=r("./../../shims/crypto/crypto.js"),S=r("path"),E=r("copy-to"),O=r("mime"),w=r("xml2js"),_=r("humanize-ms"),F=r("agentkeepalive"),M=r("merge-descriptors"),b=r("url"),X=r("is-type-of"),B=r("platform"),U=r("utility"),W=r("urllib"),ne=r("./version"),re=r("dateformat"),ae=r("bowser"),ue=r("../common/signUtils"),V=r("../common/utils"),ye=new F;I.exports=a,a.initOptions=function($){if(!$||!$.accessKeyId||!$.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var z=t(),H={region:"oss-cn-hangzhou",internal:!1,secure:z,bucket:null,endpoint:null,cname:!1};if((0,d.default)($).forEach(function(Y){$[Y]!==void 0&&(H[Y]=$[Y])}),H.accessKeyId=H.accessKeyId.trim(),H.accessKeySecret=H.accessKeySecret.trim(),H.timeout&&(H.timeout=_(H.timeout)),H.endpoint)H.endpoint=p(H.endpoint,H.secure);else{if(!H.region)throw new Error("require options.endpoint or options.region");H.endpoint=s(H.region,H.internal,H.secure)}return H.inited=!0,H};var J=a.prototype;M(J,r("./object")),M(J,r("./managed_upload")),M(J,r("../common/multipart")),M(J,r("../common/thunkpool.js")),a.Wrapper=r("./wrapper"),J.signature=function($){return C("authorization stringToSign: %s",$),ue.computeSignature(this.options.accessKeySecret,$)},J.authorization=function($,z,H,Y){var ee=ue.buildCanonicalString($.toUpperCase(),z,{headers:Y,parameters:H});return ue.authorization(this.options.accessKeyId,this.options.accessKeySecret,ee)},J.createRequest=function($){var z={"x-oss-date":re(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(z["x-oss-security-token"]=this.options.stsToken),E($.headers).to(z),o(z,"Content-Type")||($.mime===O.default_type&&($.mime=""),$.mime&&$.mime.indexOf("/")>0?z["Content-Type"]=$.mime:z["Content-Type"]=O.getType($.mime||S.extname($.object||""))||"application/octet-stream"),$.content&&(z["Content-Md5"]=k.createHash("md5").update(new m($.content,"utf8")).digest("base64"),z["Content-Length"]||(z["Content-Length"]=$.content.length));var H=this._getResource($);z.authorization=this.authorization($.method,H,$.subres,z);var Y=this._getReqUrl($);C("request %s %s, with headers %j, !!stream: %s",$.method,Y,z,!!$.stream);var ee=$.timeout||this.options.timeout;return{url:Y,params:{agent:this.agent,method:$.method,content:$.content,stream:$.stream,headers:z,timeout:ee,writeStream:$.writeStream,customResponse:$.customResponse,ctx:$.ctx||this.ctx}}},J.request=g.default.mark(function $(z){var H,Y,ee,we;return g.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return H=this.createRequest(z),Y=void 0,ee=void 0,he.prev=3,he.next=6,this.urllib.request(H.url,H.params);case 6:Y=he.sent,C("response %s %s, got %s, headers: %j",z.method,H.url,Y.status,Y.headers),he.next=13;break;case 10:he.prev=10,he.t0=he.catch(3),ee=he.t0;case 13:if(we=void 0,!Y||!z.successStatuses||z.successStatuses.indexOf(Y.status)!==-1){he.next=26;break}return he.next=17,this.requestError(Y);case 17:if(we=he.sent,we.code!=="RequestTimeTooSkewed"){he.next=23;break}return this.options.amendTimeSkewed=+new Date(we.serverTime)-new Date,he.next=22,this.request(z);case 22:return he.abrupt("return",he.sent);case 23:we.params=z,he.next=30;break;case 26:if(!ee){he.next=30;break}return he.next=29,this.requestError(ee);case 29:we=he.sent;case 30:if(!we){he.next=32;break}throw we;case 32:if(!z.xmlResponse){he.next=36;break}return he.next=35,this.parseXML(Y.data);case 35:Y.data=he.sent;case 36:return he.abrupt("return",Y);case 37:case"end":return he.stop()}},$,this,[[3,10]])}),J._getResource=function($){var z="/";return $.bucket&&(z+=$.bucket+"/"),$.object&&(z+=$.object),z},J._isIP=function($){return V._isIP($)},J._escape=function($){return U.encodeURIComponent($).replace(/%2F/g,"/")},J._getReqUrl=function($){var z={};E(this.options.endpoint).to(z);var H=this._isIP(z.hostname),Y=this.options.cname;!$.bucket||Y||H||(z.host=$.bucket+"."+z.host);var ee="/";$.bucket&&H&&(ee+=$.bucket+"/"),$.object&&(ee+=this._escape($.object).replace(/\+/g,"%2B")),z.pathname=ee;var we={};if($.query&&M(we,$.query),$.subres){var he={};X.string($.subres)?he[$.subres]="":X.array($.subres)?$.subres.forEach(function(Ae){he[Ae]=""}):he=$.subres,M(we,he)}return z.query=we,b.format(z)},J._getUserAgent=function(){var $=h&&h.browser?"js":"nodejs",z="aliyun-sdk-"+$+"/"+ne.version,H=B.description;return!H&&h&&(H="Node.js "+h.version.slice(1)+" on "+h.platform+" "+h.arch),this._checkUserAgent(z+" "+H)},J._checkUserAgent=function($){return $.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},J.checkBrowserAndVersion=function($,z){return ae.name===$&&ae.version.split(".")[0]===z},J.parseXML=function($){return function(z){m.isBuffer($)&&($=$.toString()),w.parseString($,{explicitRoot:!1,explicitArray:!1},z)}},J.requestError=g.default.mark(function $(z){var H,Y,ee,we;return g.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(H=null,z.data&&z.data.length){he.next=5;break}z.status===-1||z.status===-2?(H=new Error(z.message),H.name=z.name,H.status=z.status,H.code=z.name):(z.status===404?(H=new Error("Object not exists"),H.name="NoSuchKeyError",H.status=404,H.code="NoSuchKey"):z.status===412?(H=new Error("Pre condition failed"),H.name="PreconditionFailedError",H.status=412,H.code="PreconditionFailed"):(H=new Error("Unknow error, status: "+z.status),H.name="UnknowError",H.status=z.status),H.requestId=z.headers["x-oss-request-id"],H.host=""),he.next=30;break;case 5:return Y=String(z.data),C("request response error data: %s",Y),ee=void 0,he.prev=8,he.next=11,this.parseXML(Y)||{};case 11:ee=he.sent,he.next=21;break;case 14:return he.prev=14,he.t0=he.catch(8),C(Y),he.t0.message+=`
raw xml: `+Y,he.t0.status=z.status,he.t0.requestId=z.headers["x-oss-request-id"],he.abrupt("return",he.t0);case 21:we=ee.Message||"unknow request error, status: "+z.status,ee.Condition&&(we+=" (condition: "+ee.Condition+")"),H=new Error(we),H.name=ee.Code?ee.Code+"Error":"UnknowError",H.status=z.status,H.code=ee.Code,H.requestId=ee.RequestId,H.hostId=ee.HostId,H.serverTime=ee.ServerTime;case 30:return C("generate error %j",H),he.abrupt("return",H);case 32:case"end":return he.stop()}},$,this,[[8,14]])})}).call(this,r("_process"),r("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(r,I,f){(function(h){"use strict";function m(E){return E&&E.__esModule?E:{default:E}}function u(E,O){if(!(this instanceof u))return new u(E,O);S.call(this,O),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var o=r("babel-runtime/core-js/array/from"),p=m(o),s=r("babel-runtime/regenerator"),t=m(s),a=r("is-type-of"),c=r("util"),g=r("path"),y=r("mime"),d=r("copy-to"),C=f;C.multipartUpload=t.default.mark(function E(O,w,_){var F,M,b,X,B,U,W,ne,re;return t.default.wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(this.resetCancelFlag(),_=_||{},!_.checkpoint||!_.checkpoint.uploadId){ae.next=6;break}return ae.next=5,this._resumeMultipart(_.checkpoint,_);case 5:return ae.abrupt("return",ae.sent);case 6:return F=102400,_.mime||(a.file(w)?_.mime=y.getType(g.extname(w.name)):a.blob(w)?_.mime=w.type:_.mime=y.getType(g.extname(w))),_.headers=_.headers||{},this._convertMetaToHeaders(_.meta,_.headers),ae.next=12,this._getFileSize(w);case 12:if(!((M=ae.sent)<F)){ae.next=25;break}return b=this._createStream(w,0,M),_.contentLength=M,ae.next=18,this.putStream(O,b,_);case 18:if(X=ae.sent,!_||!_.progress){ae.next=22;break}return ae.next=22,_.progress(1);case 22:return B={res:X.res,bucket:this.options.bucket,name:O,etag:X.res.headers.etag},(_.headers&&_.headers["x-oss-callback"]||_.callback)&&(B.data=X.data),ae.abrupt("return",B);case 25:if(!(_.partSize&&_.partSize<F)){ae.next=27;break}throw new Error("partSize must not be smaller than "+F);case 27:return ae.next=29,this.initMultipartUpload(O,_);case 29:if(U=ae.sent,W=U.uploadId,ne=this._getPartSize(M,_.partSize),re={file:w,name:O,fileSize:M,partSize:ne,uploadId:W,doneParts:[]},!_||!_.progress){ae.next=36;break}return ae.next=36,_.progress(0,re,U.res);case 36:return ae.next=38,this._resumeMultipart(re,_);case 38:return ae.abrupt("return",ae.sent);case 39:case"end":return ae.stop()}},E,this)}),C._resumeMultipart=t.default.mark(function E(O,w){var _,F,M,b,X,B,U,W,ne,re,ae,ue,V,ye,J,$,z,H,Y,ee,we;return t.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(!this.isCancel()){he.next=2;break}throw this._makeCancelEvent();case 2:if(_=O.file,F=O.fileSize,M=O.partSize,b=O.uploadId,X=O.doneParts,B=O.name,U=[],X.length>0&&d(X).to(U),W=this._divideParts(F,M),ne=W.length,re=!1,ae=t.default.mark(function Ae(pe,ge){var se,ie,Z;return t.default.wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(pe.isCancel()){be.next=21;break}return be.prev=1,se=W[ge-1],ie={stream:pe._createStream(_,se.start,se.end),size:se.end-se.start},be.next=6,pe._uploadPart(B,b,ge,ie);case 6:if(Z=be.sent,pe.isCancel()||re){be.next=13;break}if(O.doneParts.push({number:ge,etag:Z.res.headers.etag}),U.push({number:ge,etag:Z.res.headers.etag}),!w||!w.progress){be.next=13;break}return be.next=13,w.progress(X.length/ne,O,Z.res);case 13:be.next=21;break;case 15:if(be.prev=15,be.t0=be.catch(1),pe.isCancel()){be.next=21;break}throw pe.cancel(),be.t0.partNum=ge,be.t0;case 21:case"end":return be.stop()}},Ae,this,[[1,15]])}),ue=(0,p.default)(new Array(ne),function(Ae,pe){return pe+1}),V=U.map(function(Ae){return Ae.number}),ye=ue.filter(function(Ae){return V.indexOf(Ae)<0}),J=5,$=w.parallel||J,!this.checkBrowserAndVersion("Internet Explorer","10")&&$!==1){he.next=26;break}z=0;case 16:if(!(z<ye.length)){he.next=24;break}if(!this.isCancel()){he.next=19;break}throw this._makeCancelEvent();case 19:return he.next=21,ae(this,ye[z]);case 21:z++,he.next=16;break;case 24:he.next=40;break;case 26:for(H=[],Y=0;Y<ye.length;Y++)H.push(ae(this,ye[Y]));return he.next=30,this._thunkPool(H,$);case 30:if(ee=he.sent,re=!0,!(ee&&ee.length>0)){he.next=37;break}throw this.resetCancelFlag(),we=ee[0],we.message="Failed to upload some parts with error: "+we.toString()+" part_num: "+we.partNum,we;case 37:if(!this.isCancel()){he.next=40;break}throw H=null,this._makeCancelEvent();case 40:return he.next=42,this.completeMultipartUpload(B,b,U,w);case 42:return he.abrupt("return",he.sent);case 43:case"end":return he.stop()}},E,this)}),a.file=function(E){return typeof File!="undefined"&&E instanceof File},a.blob=function(E){return typeof Blob!="undefined"&&E instanceof Blob},C._getFileSize=t.default.mark(function E(O){var w;return t.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!a.buffer(O)){_.next=4;break}return _.abrupt("return",O.length);case 4:if(!a.blob(O)&&!a.file(O)){_.next=6;break}return _.abrupt("return",O.size);case 6:if(!a.string(O)){_.next=11;break}return _.next=9,this._statFile(O);case 9:return w=_.sent,_.abrupt("return",w.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return _.stop()}},E,this)});var k=r("stream"),S=k.Readable;c.inherits(u,S),u.prototype.readFileAndPush=function(E){if(this.fileBuffer)for(var O=!0;O&&this.fileBuffer&&this.start<this.fileBuffer.length;){var w=this.start,_=w+E;_=_>this.fileBuffer.length?this.fileBuffer.length:_,this.start=_,O=this.push(this.fileBuffer.slice(w,_))}},u.prototype._read=function(E){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);E=E||16384;var O=this;this.reader.onload=function(w){O.fileBuffer=new h(new Uint8Array(w.target.result)),O.file=null,O.readFileAndPush(E)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(E)},C._createStream=function(E,O,w){if(a.blob(E)||a.file(E))return new u(E.slice(O,w));throw new Error("_createStream requires File/String.")},C._getPartSize=function(E,O){return O?Math.max(Math.ceil(E/1e4),O):1048576},C._divideParts=function(E,O){for(var w=Math.ceil(E/O),_=[],F=0;F<w;F++){var M=O*F,b=Math.min(M+O,E);_.push({start:M,end:b})}return _},C._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,r("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(r,I,f){"use strict";function h(O){return O&&O.__esModule?O:{default:O}}var m=r("babel-runtime/core-js/object/keys"),u=h(m),o=r("babel-runtime/regenerator"),p=h(o),s=r("debug")("ali-oss:object"),t=r("utility"),a=r("fs"),c=r("is-type-of"),g=r("url"),y=r("copy-to"),d=r("path"),C=r("mime"),k=r("../common/callback"),S=r("../common/signUtils"),E=f;E.append=p.default.mark(function O(w,_,F){var M;return p.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return F=F||{},F.position===void 0&&(F.position="0"),F.subres={append:"",position:F.position},F.method="POST",b.next=6,this.put(w,_,F);case 6:return M=b.sent,M.nextAppendPosition=M.res.headers["x-oss-next-append-position"],b.abrupt("return",M);case 9:case"end":return b.stop()}},O,this)}),E.put=p.default.mark(function O(w,_,F){var M,b,X,B,U,W;return p.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(M=void 0,F=F||{},!c.buffer(_)){ne.next=6;break}M=_,ne.next=18;break;case 6:if(!c.blob(_)&&!c.file(_)){ne.next=17;break}return F.mime||(c.file(_)?F.mime=C.getType(d.extname(_.name)):F.mime=_.type),b=this._createStream(_,0,_.size),ne.next=11,this._getFileSize(_);case 11:return F.contentLength=ne.sent,ne.next=14,this.putStream(w,b,F);case 14:return ne.abrupt("return",ne.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return F.headers=F.headers||{},this._convertMetaToHeaders(F.meta,F.headers),X=F.method||"PUT",B=this._objectRequestParams(X,w,F),k.encodeCallback(B,F),B.mime=F.mime,B.content=M,B.successStatuses=[200],ne.next=28,this.request(B);case 28:return U=ne.sent,W={name:w,url:this._objectUrl(w),res:U.res},B.headers&&B.headers["x-oss-callback"]&&(W.data=JSON.parse(U.data.toString())),ne.abrupt("return",W);case 32:case"end":return ne.stop()}},O,this)}),E.putStream=p.default.mark(function O(w,_,F){var M,b,X,B;return p.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return F=F||{},F.headers=F.headers||{},F.contentLength?F.headers["Content-Length"]=F.contentLength:F.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(F.meta,F.headers),M=F.method||"PUT",b=this._objectRequestParams(M,w,F),k.encodeCallback(b,F),b.mime=F.mime,b.stream=_,b.successStatuses=[200],U.next=12,this.request(b);case 12:return X=U.sent,B={name:w,url:this._objectUrl(w),res:X.res},b.headers&&b.headers["x-oss-callback"]&&(B.data=JSON.parse(X.data.toString())),U.abrupt("return",B);case 16:case"end":return U.stop()}},O,this)}),E.head=p.default.mark(function O(w,_){var F,M,b;return p.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return F=this._objectRequestParams("HEAD",w,_),F.successStatuses=[200,304],X.next=4,this.request(F);case 4:return M=X.sent,b={meta:null,res:M.res,status:M.status},M.status===200&&(0,u.default)(M.headers).forEach(function(B){B.indexOf("x-oss-meta-")===0&&(b.meta||(b.meta={}),b.meta[B.substring(11)]=M.headers[B])}),X.abrupt("return",b);case 8:case"end":return X.stop()}},O,this)}),E.get=p.default.mark(function O(w,_,F){var M,b,X,B;return p.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return M=null,b=!1,c.writableStream(_)?M=_:c.string(_)?(M=a.createWriteStream(_),b=!0):F=_,F=F||{},F.process&&(F.subres=F.subres||{},F.subres["x-oss-process"]=F.process),X=void 0,U.prev=6,B=this._objectRequestParams("GET",w,F),B.writeStream=M,B.successStatuses=[200,206,304],U.next=12,this.request(B);case 12:X=U.sent,b&&M.destroy(),U.next=24;break;case 16:if(U.prev=16,U.t0=U.catch(6),!b){U.next=23;break}return M.destroy(),s("get error: %s, delete the exists file %s",U.t0,_),U.next=23,this._deleteFileSafe(_);case 23:throw U.t0;case 24:return U.abrupt("return",{res:X.res,content:X.data});case 25:case"end":return U.stop()}},O,this,[[6,16]])}),E.getStream=p.default.mark(function O(w,_){var F,M;return p.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return _=_||{},F=this._objectRequestParams("GET",w,_),F.customResponse=!0,F.successStatuses=[200,206,304],b.next=6,this.request(F);case 6:return M=b.sent,b.abrupt("return",{stream:M.res,res:{status:M.status,headers:M.headers}});case 8:case"end":return b.stop()}},O,this)}),E.delete=p.default.mark(function O(w,_){var F,M;return p.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return F=this._objectRequestParams("DELETE",w,_),F.successStatuses=[204],b.next=4,this.request(F);case 4:return M=b.sent,b.abrupt("return",{res:M.res});case 6:case"end":return b.stop()}},O,this)}),E.deleteMulti=p.default.mark(function O(w,_){var F,M,b,X,B,U;return p.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:for(_=_||{},F=`<?xml version="1.0" encoding="UTF-8"?>
<Delete>
`,_.quiet?F+=` <Quiet>true</Quiet>
`:F+=` <Quiet>false</Quiet>
`,M=0;M<w.length;M++)F+=" <Object><Key>"+t.escape(this._objectName(w[M]))+`</Key></Object>
`;return F+="</Delete>",s("delete multi objects: %s",F),_.subres="delete",b=this._objectRequestParams("POST","",_),b.mime="xml",b.content=F,b.xmlResponse=!0,b.successStatuses=[200],W.next=14,this.request(b);case 14:return X=W.sent,B=X.data,U=B&&B.Deleted||null,U&&(Array.isArray(U)||(U=[U]),U=U.map(function(ne){return ne.Key})),W.abrupt("return",{res:X.res,deleted:U});case 19:case"end":return W.stop()}},O,this)}),E.copy=p.default.mark(function O(w,_,F){var M,b,X;return p.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return F=F||{},F.headers=F.headers||{},(0,u.default)(F.headers).forEach(function(U){F.headers["x-oss-copy-source-"+U.toLowerCase()]=F.headers[U]}),F.meta&&(F.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(F.meta,F.headers),_=_[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(_):"/"+encodeURIComponent(_.slice(1)),F.headers["x-oss-copy-source"]=_,M=this._objectRequestParams("PUT",w,F),M.xmlResponse=!0,M.successStatuses=[200,304],B.next=12,this.request(M);case 12:return b=B.sent,X=b.data,X&&(X={etag:X.ETag,lastModified:X.LastModified}),B.abrupt("return",{data:X,res:b.res});case 16:case"end":return B.stop()}},O,this)}),E.putMeta=p.default.mark(function O(w,_,F){return p.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,this.copy(w,w,{meta:_||{},timeout:F&&F.timeout,ctx:F&&F.ctx});case 2:return M.abrupt("return",M.sent);case 3:case"end":return M.stop()}},O,this)}),E.list=p.default.mark(function O(w,_){var F,M,b,X,B;return p.default.wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return F=this._objectRequestParams("GET","",_),F.query=w,F.xmlResponse=!0,F.successStatuses=[200],U.next=6,this.request(F);case 6:return M=U.sent,b=M.data.Contents,X=this,b&&(Array.isArray(b)||(b=[b]),b=b.map(function(W){return{name:W.Key,url:X._objectUrl(W.Key),lastModified:W.LastModified,etag:W.ETag,type:W.Type,size:Number(W.Size),storageClass:W.StorageClass,owner:{id:W.Owner.ID,displayName:W.Owner.DisplayName}}})),B=M.data.CommonPrefixes||null,B&&(Array.isArray(B)||(B=[B]),B=B.map(function(W){return W.Prefix})),U.abrupt("return",{res:M.res,objects:b,prefixes:B,nextMarker:M.data.NextMarker||null,isTruncated:M.data.IsTruncated==="true"});case 13:case"end":return U.stop()}},O,this)}),E.putACL=p.default.mark(function O(w,_,F){var M,b;return p.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return F=F||{},F.subres="acl",F.headers=F.headers||{},F.headers["x-oss-object-acl"]=_,w=this._objectName(w),M=this._objectRequestParams("PUT",w,F),M.successStatuses=[200],X.next=9,this.request(M);case 9:return b=X.sent,X.abrupt("return",{res:b.res});case 11:case"end":return X.stop()}},O,this)}),E.getACL=p.default.mark(function O(w,_){var F,M;return p.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return _=_||{},_.subres="acl",w=this._objectName(w),F=this._objectRequestParams("GET",w,_),F.successStatuses=[200],F.xmlResponse=!0,b.next=8,this.request(F);case 8:return M=b.sent,b.abrupt("return",{acl:M.data.AccessControlList.Grant,owner:{id:M.data.Owner.ID,displayName:M.data.Owner.DisplayName},res:M.res});case 10:case"end":return b.stop()}},O,this)}),E.restore=p.default.mark(function O(w,_){var F,M;return p.default.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return _=_||{},_.subres="restore",F=this._objectRequestParams("POST",w,_),F.successStatuses=[202],b.next=6,this.request(F);case 6:return M=b.sent,b.abrupt("return",{res:M.res});case 8:case"end":return b.stop()}},O,this)}),E.signatureUrl=function(O,w){w=w||{},O=this._objectName(O),w.method=w.method||"GET";var _=t.timestamp()+(w.expires||1800),F={bucket:this.options.bucket,object:O},M=this._getResource(F);this.options.stsToken&&(w["security-token"]=this.options.stsToken);var b=S._signatureForURL(this.options.accessKeySecret,w,M,_),X=g.parse(this._getReqUrl(F));return X.query={OSSAccessKeyId:this.options.accessKeyId,Expires:_,Signature:b.Signature},y(b.subResource).to(X.query),X.format()},E.getObjectUrl=function(O,w){return w?w[w.length-1]!=="/"&&(w+="/"):w=this.options.endpoint.format(),w+this._escape(this._objectName(O))},E._objectUrl=function(O){return this._getReqUrl({bucket:this.options.bucket,object:O})},E.generateObjectUrl=function(O,w){if(w)w[w.length-1]!=="/"&&(w+="/");else{w=this.options.endpoint.format();var _=g.parse(w),F=this.options.bucket;_.hostname=F+"."+_.hostname,_.host=F+"."+_.host,w=_.format()}return w+this._escape(this._objectName(O))},E._objectRequestParams=function(O,w,_){if(!this.options.bucket)throw new Error("Please create a bucket first");_=_||{},w=this._objectName(w);var F={object:w,bucket:this.options.bucket,method:O,subres:_&&_.subres,timeout:_&&_.timeout,ctx:_&&_.ctx};return _.headers&&(F.headers={},y(_.headers).to(F.headers)),F},E._objectName=function(O){return O.replace(/^\/+/,"")},E._statFile=function(O){return function(w){a.stat(O,w)}},E._convertMetaToHeaders=function(O,w){O&&(0,u.default)(O).forEach(function(_){w["x-oss-meta-"+_]=O[_]})},E._deleteFileSafe=function(O){return function(w){a.exists(O,function(_){_?a.unlink(O,function(F){F&&s("unlink %j error: %s",O,F),w()}):w()})}}},{"../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(r,I,f){"use strict";f.version="5.3.1"},{}],6:[function(r,I,f){"use strict";function h(d){return d&&d.__esModule?d:{default:d}}function m(d){return d&&typeof d.next=="function"&&typeof d.throw=="function"}function u(d){if(!d)return!1;var C=d.constructor;return!!C&&(C.name==="GeneratorFunction"||C.displayName==="GeneratorFunction"||m(C.prototype)||m(d.prototype))}function o(d,C){var k=new d(C),S=(0,c.default)(k),E=(0,c.default)((0,t.default)(k));S.concat(E).forEach(function(O){u(k[O])?this[O]=g.wrap(k[O]).bind(k):this[O]=k[O]},this)}function p(d){if(!(this instanceof p))return new p(d);o.call(this,y,d)}var s=r("babel-runtime/core-js/object/get-prototype-of"),t=h(s),a=r("babel-runtime/core-js/object/keys"),c=h(a),g=r("co"),y=r("./client");I.exports=p,p.STS=function d(C){if(!(this instanceof d))return new d(C);o.call(this,y.STS,C)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(r,I,f){(function(h){"use strict";function m(t){return t&&t.__esModule?t:{default:t}}var u=r("babel-runtime/core-js/object/keys"),o=m(u),p=r("babel-runtime/core-js/json/stringify"),s=m(p);f.encodeCallback=function(t,a){if(t.headers=t.headers||{},!Object.prototype.hasOwnProperty.call(t.headers,"x-oss-callback")&&a.callback){var c={callbackUrl:encodeURI(a.callback.url),callbackBody:a.callback.body};a.callback.host&&(c.callbackHost=a.callback.host),a.callback.contentType&&(c.callbackBodyType=a.callback.contentType);var g=new h((0,s.default)(c)).toString("base64");if(t.headers["x-oss-callback"]=g,a.callback.customValue){var y={};(0,o.default)(a.callback.customValue).forEach(function(d){y["x:"+d]=a.callback.customValue[d]}),t.headers["x-oss-callback-var"]=new h((0,s.default)(y)).toString("base64")}}}}).call(this,r("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(r,I,f){"use strict";var h=r("babel-runtime/regenerator"),m=function(s){return s&&s.__esModule?s:{default:s}}(h),u=r("copy-to"),o=r("./callback"),p=f;p.listUploads=m.default.mark(function s(t,a){var c,g,y,d;return m.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return a=a||{},c={},u(a).to(c),c.subres="uploads",g=this._objectRequestParams("GET","",c),g.query=t,g.xmlResponse=!0,g.successStatuses=[200],C.next=10,this.request(g);case 10:return y=C.sent,d=y.data.Upload||[],Array.isArray(d)||(d=[d]),d=d.map(function(k){return{name:k.Key,uploadId:k.UploadId,initiated:k.Initiated}}),C.abrupt("return",{res:y.res,uploads:d,bucket:y.data.Bucket,nextKeyMarker:y.data.NextKeyMarker,nextUploadIdMarker:y.data.NextUploadIdMarker,isTruncated:y.data.IsTruncated==="true"});case 15:case"end":return C.stop()}},s,this)}),p.listParts=m.default.mark(function s(t,a,c,g){var y,d,C;return m.default.wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return g=g||{},y={},u(g).to(y),y.subres={uploadId:a},d=this._objectRequestParams("GET",t,y),d.query=c,d.xmlResponse=!0,d.successStatuses=[200],k.next=10,this.request(d);case 10:return C=k.sent,k.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 k.stop()}},s,this)}),p.abortMultipartUpload=m.default.mark(function s(t,a,c){var g,y,d;return m.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return this.cancel(),c=c||{},g={},u(c).to(g),g.subres={uploadId:a},y=this._objectRequestParams("DELETE",t,g),y.successStatuses=[204],C.next=9,this.request(y);case 9:return d=C.sent,C.abrupt("return",{res:d.res});case 11:case"end":return C.stop()}},s,this)}),p.initMultipartUpload=m.default.mark(function s(t,a){var c,g,y;return m.default.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return a=a||{},c={},u(a).to(c),c.headers=c.headers||{},this._convertMetaToHeaders(a.meta,c.headers),c.subres="uploads",g=this._objectRequestParams("POST",t,c),g.mime=a.mime,g.xmlResponse=!0,g.successStatuses=[200],d.next=12,this.request(g);case 12:return y=d.sent,d.abrupt("return",{res:y.res,bucket:y.data.Bucket,name:y.data.Key,uploadId:y.data.UploadId});case 14:case"end":return d.stop()}},s,this)}),p.uploadPart=m.default.mark(function s(t,a,c,g,y,d,C){var k;return m.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return k={stream:this._createStream(g,y,d),size:d-y},S.next=3,this._uploadPart(t,a,c,k,C);case 3:return S.abrupt("return",S.sent);case 4:case"end":return S.stop()}},s,this)}),p.completeMultipartUpload=m.default.mark(function s(t,a,c,g){var y,d,C,k,S,E,O,w;return m.default.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:for(y=c.concat().sort(function(F,M){return F.number-M.number}).filter(function(F,M,b){return!M||F.number!==b[M-1].number}),d=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,C=0;C<y.length;C++)k=y[C],d+=`<Part>
`,d+="<PartNumber>"+k.number+`</PartNumber>
`,d+="<ETag>"+k.etag+`</ETag>
`,d+=`</Part>
`;return d+="</CompleteMultipartUpload>",g=g||{},S={},u(g).to(S),S.subres={uploadId:a},E=this._objectRequestParams("POST",t,S),o.encodeCallback(E,S),E.mime="xml",E.content=d,E.headers&&E.headers["x-oss-callback"]||(E.xmlResponse=!0),E.successStatuses=[200],_.next=16,this.request(E);case 16:return O=_.sent,w={res:O.res,bucket:E.bucket,name:t,etag:O.res.headers.etag},E.headers&&E.headers["x-oss-callback"]&&(w.data=JSON.parse(O.data.toString())),_.abrupt("return",w);case 20:case"end":return _.stop()}},s,this)}),p._uploadPart=m.default.mark(function s(t,a,c,g,y){var d,C,k;return m.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return y=y||{},d={},u(y).to(d),d.headers={"Content-Length":g.size},d.subres={partNumber:c,uploadId:a},C=this._objectRequestParams("PUT",t,d),C.mime=d.mime,C.stream=g.stream,C.successStatuses=[200],S.next=11,this.request(C);case 11:return k=S.sent,g.stream=null,C.stream=null,S.abrupt("return",{name:t,etag:k.res.headers.etag,res:k.res});case 15:case"end":return S.stop()}},s,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(r,I,f){(function(h){"use strict";function m(c){return c&&c.__esModule?c:{default:c}}var u=r("babel-runtime/core-js/json/stringify"),o=m(u),p=r("babel-runtime/core-js/object/keys"),s=m(p),t=r("./../../shims/crypto/crypto.js"),a=r("is-type-of");f.buildCanonicalizedResource=function(c,g){var y=""+c,d="?";if(a.string(g)&&g.trim()!=="")y+=d+g;else if(a.array(g))g.sort(),y+=d+g.join("&");else if(g){var C=function(S,E){return S[0]>E[0]?1:S[0]<E[0]?-1:0},k=function(S){y+=d+S,g[S]&&(y+="="+g[S]),d="&"};(0,s.default)(g).sort(C).forEach(k)}return y},f.buildCanonicalString=function(c,g,y,d){y=y||{};var C=y.headers||{},k=[],S={},E=[c.toUpperCase(),C["Content-Md5"]||"",C["Content-Type"]||C["Content-Type".toLowerCase()],d||C["x-oss-date"]];return(0,s.default)(C).forEach(function(O){var w=O.toLowerCase();w.indexOf("x-oss-")===0&&(S[w]=String(C[O]).trim())}),(0,s.default)(S).sort().forEach(function(O){k.push(O+":"+S[O])}),E=E.concat(k),E.push(this.buildCanonicalizedResource(g,y.parameters)),E.join(`
`)},f.computeSignature=function(c,g){return t.createHmac("sha1",c).update(new h(g,"utf8")).digest("base64")},f.authorization=function(c,g,y){return"OSS "+c+":"+this.computeSignature(g,y)},f._signatureForURL=function(c,g,y,d){var C={},k={};if(g.process&&(k["x-oss-process"]=g.process),g.response&&(0,s.default)(g.response).forEach(function(w){var _="response-"+w.toLowerCase();k[_]=g.response[w]}),(0,s.default)(g).forEach(function(w){var _=w.toLowerCase(),F=g[w];_.indexOf("x-oss-")===0?C[_]=F:_.indexOf("content-md5")===0||_.indexOf("content-type")===0?C[w]=F:_!=="expires"&&_!=="response"&&_!=="process"&&_!=="method"&&(k[_]=F)}),Object.prototype.hasOwnProperty.call(g,"security-token")&&(k["security-token"]=g["security-token"]),Object.prototype.hasOwnProperty.call(g,"callback")){var S={callbackUrl:encodeURI(g.callback.url),callbackBody:g.callback.body};if(g.callback.host&&(S.callbackHost=g.callback.host),g.callback.contentType&&(S.callbackBodyType=g.callback.contentType),k.callback=new h((0,o.default)(S)).toString("base64"),g.callback.customValue){var E={};(0,s.default)(g.callback.customValue).forEach(function(w){E["x:"+w]=g.callback.customValue[w]}),k["callback-var"]=new h((0,o.default)(E)).toString("base64")}}var O=this.buildCanonicalString(g.method,y,{headers:C,parameters:k},d.toString());return{Signature:this.computeSignature(c,O),subResource:k}}}).call(this,r("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(r,I,f){"use strict";var h=r("babel-runtime/regenerator"),m=function(t){return t&&t.__esModule?t:{default:t}}(h),u=r("co"),o=r("co-priority-queue"),p=r("any-promise"),s=f;s._thunkPool=function(t,a){function c(k,S){++d===k.length&&S(C)}function g(k,S){function E(){var b;return m.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:b=void 0;case 1:if(y.isCancel()){X.next=9;break}return X.next=4,_.next();case 4:return b=X.sent,X.next=7,b();case 7:X.next=1;break;case 9:F+=1,F===k&&(_.fns=[],_.buffer=[],S(C));case 11:case"end":return X.stop()}},w,this)}function O(b){console.error(b.stack)}for(var w=m.default.mark(E),_=new o,F=0,M=0;M<k;M++)u(E).catch(O);return function(b,X){return function(B){_.push(m.default.mark(function U(){return m.default.wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.prev=0,W.t0=B,W.next=4,b;case 4:W.t1=W.sent,(0,W.t0)(null,W.t1),W.next=11;break;case 8:W.prev=8,W.t2=W.catch(0),B(W.t2);case 11:case"end":return W.stop()}},U,this,[[0,8]])}),X)}}}var y=this,d=0,C=[];return new p(function(k){function S(F){return m.default.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.next=2,w(t[F]);case 2:c(t,k);case 3:case"end":return M.stop()}},O,this)}function E(F){C.push(F),c(t,k)}for(var O=m.default.mark(S),w=new g(a,k),_=0;_<t.length;_++)u(S(_)).catch(E)})},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(r,I,f){"use strict";f._isIP=function(h){var m=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,u=/^\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*$/;return m.test(h)||u.test(h)}},{}],12:[function(r,I,f){function h(){}I.exports=h,I.exports.HttpsAgent=h},{}],13:[function(r,I,f){I.exports=r("./register")().Promise},{"./register":15}],14:[function(r,I,f){"use strict";var h=null;I.exports=function(m,u){return function(o,p){o=o||null,p=p||{};var s=p.global!==!1;if(h===null&&s&&(h=m["@@any-promise/REGISTRATION"]||null),h!==null&&o!==null&&h.implementation!==o)throw new Error('any-promise already defined as "'+h.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return h===null&&(h=o!==null&&p.Promise!==void 0?{Promise:p.Promise,implementation:o}:u(o),s&&(m["@@any-promise/REGISTRATION"]=h)),h}}},{}],15:[function(r,I,f){"use strict";function h(){if(window.Promise===void 0)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"}}I.exports=r("./loader")(window,h)},{"./loader":14}],16:[function(r,I,f){I.exports={default:r("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(r,I,f){I.exports={default:r("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(r,I,f){I.exports={default:r("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(r,I,f){I.exports={default:r("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(r,I,f){I.exports={default:r("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(r,I,f){I.exports={default:r("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(r,I,f){I.exports={default:r("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(r,I,f){I.exports={default:r("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(r,I,f){I.exports={default:r("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(r,I,f){I.exports={default:r("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(r,I,f){I.exports={default:r("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(r,I,f){I.exports={default:r("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(r,I,f){I.exports={default:r("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(r,I,f){I.exports={default:r("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(r,I,f){"use strict";f.__esModule=!0,f.default=function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(r,I,f){"use strict";f.__esModule=!0;var h=r("../core-js/object/define-property"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);f.default=function(){function u(o,p){for(var s=0;s<p.length;s++){var t=p[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),(0,m.default)(o,t.key,t)}}return function(o,p,s){return p&&u(o.prototype,p),s&&u(o,s),o}}()},{"../core-js/object/define-property":20}],32:[function(r,I,f){"use strict";function h(t){return t&&t.__esModule?t:{default:t}}f.__esModule=!0;var m=r("../core-js/symbol/iterator"),u=h(m),o=r("../core-js/symbol"),p=h(o),s=typeof p.default=="function"&&typeof u.default=="symbol"?function(t){return typeof t}:function(t){return t&&typeof p.default=="function"&&t.constructor===p.default&&t!==p.default.prototype?"symbol":typeof t};f.default=typeof p.default=="function"&&s(u.default)==="symbol"?function(t){return t===void 0?"undefined":s(t)}:function(t){return t&&typeof p.default=="function"&&t.constructor===p.default&&t!==p.default.prototype?"symbol":t===void 0?"undefined":s(t)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(r,I,f){I.exports=r("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(r,I,f){"use strict";function h(k){var S=k.length;if(S%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=k.indexOf("=");return E===-1&&(E=S),[E,E===S?0:4-E%4]}function m(k){var S=h(k),E=S[0],O=S[1];return 3*(E+O)/4-O}function u(k,S,E){return 3*(S+E)/4-E}function o(k){for(var S,E=h(k),O=E[0],w=E[1],_=new g(u(k,O,w)),F=0,M=w>0?O-4:O,b=0;b<M;b+=4)S=c[k.charCodeAt(b)]<<18|c[k.charCodeAt(b+1)]<<12|c[k.charCodeAt(b+2)]<<6|c[k.charCodeAt(b+3)],_[F++]=S>>16&255,_[F++]=S>>8&255,_[F++]=255&S;return w===2&&(S=c[k.charCodeAt(b)]<<2|c[k.charCodeAt(b+1)]>>4,_[F++]=255&S),w===1&&(S=c[k.charCodeAt(b)]<<10|c[k.charCodeAt(b+1)]<<4|c[k.charCodeAt(b+2)]>>2,_[F++]=S>>8&255,_[F++]=255&S),_}function p(k){return a[k>>18&63]+a[k>>12&63]+a[k>>6&63]+a[63&k]}function s(k,S,E){for(var O,w=[],_=S;_<E;_+=3)O=(k[_]<<16&16711680)+(k[_+1]<<8&65280)+(255&k[_+2]),w.push(p(O));return w.join("")}function t(k){for(var S,E=k.length,O=E%3,w=[],_=0,F=E-O;_<F;_+=16383)w.push(s(k,_,_+16383>F?F:_+16383));return O===1?(S=k[E-1],w.push(a[S>>2]+a[S<<4&63]+"==")):O===2&&(S=(k[E-2]<<8)+k[E-1],w.push(a[S>>10]+a[S>>4&63]+a[S<<2&63]+"=")),w.join("")}f.byteLength=m,f.toByteArray=o,f.fromByteArray=t;for(var a=[],c=[],g=typeof Uint8Array!="undefined"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,C=y.length;d<C;++d)a[d]=y[d],c[y.charCodeAt(d)]=d;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],35:[function(r,I,f){!function(h,m,u){I!==void 0&&I.exports?I.exports=u():typeof je=="function"&&je.amd?je("bowser",u):h.bowser=u()}(this,0,function(){function h(c){function g($){var z=c.match($);return z&&z.length>1&&z[1]||""}function y($){var z=c.match($);return z&&z.length>1&&z[2]||""}var d,C=g(/(ipod|iphone|ipad)/i).toLowerCase(),k=/like android/i.test(c),S=!k&&/android/i.test(c),E=/nexus\s*[0-6]\s*/i.test(c),O=!E&&/nexus\s*[0-9]+/i.test(c),w=/CrOS/.test(c),_=/silk/i.test(c),F=/sailfish/i.test(c),M=/tizen/i.test(c),b=/(web|hpw)os/i.test(c),X=/windows phone/i.test(c),B=(/SamsungBrowser/i.test(c),!X&&/windows/i.test(c)),U=!C&&!_&&/macintosh/i.test(c),W=!S&&!F&&!M&&!b&&/linux/i.test(c),ne=y(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),re=g(/version\/(\d+(\.\d+)?)/i),ae=/tablet/i.test(c)&&!/tablet pc/i.test(c),ue=!ae&&/[^-]mobi/i.test(c),V=/xbox/i.test(c);/opera/i.test(c)?d={name:"Opera",opera:t,version:re||g(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(c)?d={name:"Opera",opera:t,version:g(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||re}:/SamsungBrowser/i.test(c)?d={name:"Samsung Internet for Android",samsungBrowser:t,version:re||g(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(c)?d={name:"Opera Coast",coast:t,version:re||g(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(c)?d={name:"Yandex Browser",yandexbrowser:t,version:re||g(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(c)?d={name:"UC Browser",ucbrowser:t,version:g(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(c)?d={name:"Maxthon",maxthon:t,version:g(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(c)?d={name:"Epiphany",epiphany:t,version:g(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(c)?d={name:"Puffin",puffin:t,version:g(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(c)?d={name:"Sleipnir",sleipnir:t,version:g(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(c)?d={name:"K-Meleon",kMeleon:t,version:g(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:X?(d={name:"Windows Phone",osname:"Windows Phone",windowsphone:t},ne?(d.msedge=t,d.version=ne):(d.msie=t,d.version=g(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(c)?d={name:"Internet Explorer",msie:t,version:g(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:w?d={name:"Chrome",osname:"Chrome OS",chromeos:t,chromeBook:t,chrome:t,version:g(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(c)?d={name:"Microsoft Edge",msedge:t,version:ne}:/vivaldi/i.test(c)?d={name:"Vivaldi",vivaldi:t,version:g(/vivaldi\/(\d+(\.\d+)?)/i)||re}:F?d={name:"Sailfish",osname:"Sailfish OS",sailfish:t,version:g(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(c)?d={name:"SeaMonkey",seamonkey:t,version:g(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(c)?(d={name:"Firefox",firefox:t,version:g(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(c)&&(d.firefoxos=t,d.osname="Firefox OS")):_?d={name:"Amazon Silk",silk:t,version:g(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(c)?d={name:"PhantomJS",phantom:t,version:g(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(c)?d={name:"SlimerJS",slimer:t,version:g(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(c)||/rim\stablet/i.test(c)?d={name:"BlackBerry",osname:"BlackBerry OS",blackberry:t,version:re||g(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:b?(d={name:"WebOS",osname:"WebOS",webos:t,version:re||g(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(c)&&(d.touchpad=t)):/bada/i.test(c)?d={name:"Bada",osname:"Bada",bada:t,version:g(/dolfin\/(\d+(\.\d+)?)/i)}:M?d={name:"Tizen",osname:"Tizen",tizen:t,version:g(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||re}:/qupzilla/i.test(c)?d={name:"QupZilla",qupzilla:t,version:g(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||re}:/chromium/i.test(c)?d={name:"Chromium",chromium:t,version:g(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||re}:/chrome|crios|crmo/i.test(c)?d={name:"Chrome",chrome:t,version:g(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:S?d={name:"Android",version:re}:/safari|applewebkit/i.test(c)?(d={name:"Safari",safari:t},re&&(d.version=re)):C?(d={name:C=="iphone"?"iPhone":C=="ipad"?"iPad":"iPod"},re&&(d.version=re)):d=/googlebot/i.test(c)?{name:"Googlebot",googlebot:t,version:g(/googlebot\/(\d+(\.\d+))/i)||re}:{name:g(/^(.*)\/(.*) /),version:y(/^(.*)\/(.*) /)},!d.msedge&&/(apple)?webkit/i.test(c)?(/(apple)?webkit\/537\.36/i.test(c)?(d.name=d.name||"Blink",d.blink=t):(d.name=d.name||"Webkit",d.webkit=t),!d.version&&re&&(d.version=re)):!d.opera&&/gecko\//i.test(c)&&(d.name=d.name||"Gecko",d.gecko=t,d.version=d.version||g(/gecko\/(\d+(\.\d+)?)/i)),d.windowsphone||!S&&!d.silk?!d.windowsphone&&C?(d[C]=t,d.ios=t,d.osname="iOS"):U?(d.mac=t,d.osname="macOS"):V?(d.xbox=t,d.osname="Xbox"):B?(d.windows=t,d.osname="Windows"):W&&(d.linux=t,d.osname="Linux"):(d.android=t,d.osname="Android");var ye="";d.windows?ye=function($){switch($){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}}(g(/Windows ((NT|XP)( \d\d?.\d)?)/i)):d.windowsphone?ye=g(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):d.mac?(ye=g(/Mac OS X (\d+([_\.\s]\d+)*)/i),ye=ye.replace(/[_\s]/g,".")):C?(ye=g(/os (\d+([_\s]\d+)*) like mac os x/i),ye=ye.replace(/[_\s]/g,".")):S?ye=g(/android[ \/-](\d+(\.\d+)*)/i):d.webos?ye=g(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):d.blackberry?ye=g(/rim\stablet\sos\s(\d+(\.\d+)*)/i):d.bada?ye=g(/bada\/(\d+(\.\d+)*)/i):d.tizen&&(ye=g(/tizen[\/\s](\d+(\.\d+)*)/i)),ye&&(d.osversion=ye);var J=!d.windows&&ye.split(".")[0];return ae||O||C=="ipad"||S&&(J==3||J>=4&&!ue)||d.silk?d.tablet=t:(ue||C=="iphone"||C=="ipod"||S||E||d.blackberry||d.webos||d.bada)&&(d.mobile=t),d.msedge||d.msie&&d.version>=10||d.yandexbrowser&&d.version>=15||d.vivaldi&&d.version>=1||d.chrome&&d.version>=20||d.samsungBrowser&&d.version>=4||d.firefox&&d.version>=20||d.safari&&d.version>=6||d.opera&&d.version>=10||d.ios&&d.osversion&&d.osversion.split(".")[0]>=6||d.blackberry&&d.version>=10.1||d.chromium&&d.version>=20?d.a=t:d.msie&&d.version<10||d.chrome&&d.version<20||d.firefox&&d.version<20||d.safari&&d.version<6||d.opera&&d.version<10||d.ios&&d.osversion&&d.osversion.split(".")[0]<6||d.chromium&&d.version<20?d.c=t:d.x=t,d}function m(c){return c.split(".").length}function u(c,g){var y,d=[];if(Array.prototype.map)return Array.prototype.map.call(c,g);for(y=0;y<c.length;y++)d.push(g(c[y]));return d}function o(c){for(var g=Math.max(m(c[0]),m(c[1])),y=u(c,function(d){var C=g-m(d);return d+=new Array(C+1).join(".0"),u(d.split("."),function(k){return new Array(20-k.length).join("0")+k}).reverse()});--g>=0;){if(y[0][g]>y[1][g])return 1;if(y[0][g]!==y[1][g])return-1;if(g===0)return 0}}function p(c,g,y){var d=a;typeof g=="string"&&(y=g,g=void 0),g===void 0&&(g=!1),y&&(d=h(y));var C=""+d.version;for(var k in c)if(c.hasOwnProperty(k)&&d[k]){if(typeof c[k]!="string")throw new Error("Browser version in the minVersion map should be a string: "+k+": "+String(c));return o([C,c[k]])<0}return g}function s(c,g,y){return!p(c,g,y)}var t=!0,a=h(typeof navigator!="undefined"&&navigator.userAgent||"");return a.test=function(c){for(var g=0;g<c.length;++g){var y=c[g];if(typeof y=="string"&&y in a)return!0}return!1},a.isUnsupportedBrowser=p,a.compareVersions=o,a.check=s,a._detect=h,a.detect=h,a})},{}],36:[function(r,I,f){},{}],37:[function(r,I,f){function h(a){if(a&&!s(a))throw new Error("Unknown encoding: "+a)}function m(a){return a.toString(this.encoding)}function u(a){this.charReceived=a.length%2,this.charLength=this.charReceived?2:0}function o(a){this.charReceived=a.length%3,this.charLength=this.charReceived?3:0}var p=r("buffer").Buffer,s=p.isEncoding||function(a){switch(a&&a.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}},t=f.StringDecoder=function(a){switch(this.encoding=(a||"utf8").toLowerCase().replace(/[-_]/,""),h(a),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=u;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=m)}this.charBuffer=new p(6),this.charReceived=0,this.charLength=0};t.prototype.write=function(a){for(var c="";this.charLength;){var g=a.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,g),this.charReceived+=g,this.charReceived<this.charLength)return"";a=a.slice(g,a.length),c=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var d=c.charCodeAt(c.length-1);if(!(d>=55296&&d<=56319)){if(this.charReceived=this.charLength=0,a.length===0)return c;break}this.charLength+=this.surrogateSize,c=""}this.detectIncompleteChar(a);var y=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,y),y-=this.charReceived),c+=a.toString(this.encoding,0,y);var y=c.length-1,d=c.charCodeAt(y);if(d>=55296&&d<=56319){var C=this.surrogateSize;return this.charLength+=C,this.charReceived+=C,this.charBuffer.copy(this.charBuffer,C,0,C),a.copy(this.charBuffer,0,0,C),c.substring(0,y)}return c},t.prototype.detectIncompleteChar=function(a){for(var c=a.length>=3?3:a.length;c>0;c--){var g=a[a.length-c];if(c==1&&g>>5==6){this.charLength=2;break}if(c<=2&&g>>4==14){this.charLength=3;break}if(c<=3&&g>>3==30){this.charLength=4;break}}this.charReceived=c},t.prototype.end=function(a){var c="";if(a&&a.length&&(c=this.write(a)),this.charReceived){var g=this.charReceived,y=this.charBuffer,d=this.encoding;c+=y.slice(0,g).toString(d)}return c}},{buffer:38}],38:[function(r,I,f){(function(h){"use strict";function m(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,i){if(m()<i)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(i),e.__proto__=o.prototype):(e===null&&(e=new o(i)),e.length=i),e}function o(e,i,T){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,i,T);if(typeof e=="number"){if(typeof i=="string")throw new Error("If encoding is specified then the first argument must be a string");return a(this,e)}return p(this,e,i,T)}function p(e,i,T,x){if(typeof i=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&i instanceof ArrayBuffer?y(e,i,T,x):typeof i=="string"?c(e,i,T):d(e,i)}function s(e){if(typeof e!="number")throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function t(e,i,T,x){return s(i),i<=0?u(e,i):T!==void 0?typeof x=="string"?u(e,i).fill(T,x):u(e,i).fill(T):u(e,i)}function a(e,i){if(s(i),e=u(e,i<0?0:0|C(i)),!o.TYPED_ARRAY_SUPPORT)for(var T=0;T<i;++T)e[T]=0;return e}function c(e,i,T){if(typeof T=="string"&&T!==""||(T="utf8"),!o.isEncoding(T))throw new TypeError('"encoding" must be a valid string encoding');var x=0|S(i,T);e=u(e,x);var A=e.write(i,T);return A!==x&&(e=e.slice(0,A)),e}function g(e,i){var T=i.length<0?0:0|C(i.length);e=u(e,T);for(var x=0;x<T;x+=1)e[x]=255&i[x];return e}function y(e,i,T,x){if(i.byteLength,T<0||i.byteLength<T)throw new RangeError("'offset' is out of bounds");if(i.byteLength<T+(x||0))throw new RangeError("'length' is out of bounds");return i=T===void 0&&x===void 0?new Uint8Array(i):x===void 0?new Uint8Array(i,T):new Uint8Array(i,T,x),o.TYPED_ARRAY_SUPPORT?(e=i,e.__proto__=o.prototype):e=g(e,i),e}function d(e,i){if(o.isBuffer(i)){var T=0|C(i.length);return e=u(e,T),e.length===0||i.copy(e,0,0,T),e}if(i){if(typeof ArrayBuffer!="undefined"&&i.buffer instanceof ArrayBuffer||"length"in i)return typeof i.length!="number"||te(i.length)?u(e,0):g(e,i);if(i.type==="Buffer"&&Se(i.data))return g(e,i.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function C(e){if(e>=m())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+m().toString(16)+" bytes");return 0|e}function k(e){return+e!=e&&(e=0),o.alloc(+e)}function S(e,i){if(o.isBuffer(e))return e.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var T=e.length;if(T===0)return 0;for(var x=!1;;)switch(i){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":case void 0:return ge(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*T;case"hex":return T>>>1;case"base64":return Z(e).length;default:if(x)return ge(e).length;i=(""+i).toLowerCase(),x=!0}}function E(e,i,T){var x=!1;if((i===void 0||i<0)&&(i=0),i>this.length)return"";if((T===void 0||T>this.length)&&(T=this.length),T<=0)return"";if(T>>>=0,i>>>=0,T<=i)return"";for(e||(e="utf8");;)switch(e){case"hex":return V(this,i,T);case"utf8":case"utf-8":return ne(this,i,T);case"ascii":return ae(this,i,T);case"latin1":case"binary":return ue(this,i,T);case"base64":return W(this,i,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ye(this,i,T);default:if(x)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),x=!0}}function O(e,i,T){var x=e[i];e[i]=e[T],e[T]=x}function w(e,i,T,x,A){if(e.length===0)return-1;if(typeof T=="string"?(x=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,isNaN(T)&&(T=A?0:e.length-1),T<0&&(T=e.length+T),T>=e.length){if(A)return-1;T=e.length-1}else if(T<0){if(!A)return-1;T=0}if(typeof i=="string"&&(i=o.from(i,x)),o.isBuffer(i))return i.length===0?-1:_(e,i,T,x,A);if(typeof i=="number")return i&=255,o.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?A?Uint8Array.prototype.indexOf.call(e,i,T):Uint8Array.prototype.lastIndexOf.call(e,i,T):_(e,[i],T,x,A);throw new TypeError("val must be string, number or Buffer")}function _(e,i,T,x,A){function oe(Pe,ke){return _e===1?Pe[ke]:Pe.readUInt16BE(ke*_e)}var _e=1,He=e.length,Ne=i.length;if(x!==void 0&&((x=String(x).toLowerCase())==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(e.length<2||i.length<2)return-1;_e=2,He/=2,Ne/=2,T/=2}var Be;if(A){var $e=-1;for(Be=T;Be<He;Be++)if(oe(e,Be)===oe(i,$e===-1?0:Be-$e)){if($e===-1&&($e=Be),Be-$e+1===Ne)return $e*_e}else $e!==-1&&(Be-=Be-$e),$e=-1}else for(T+Ne>He&&(T=He-Ne),Be=T;Be>=0;Be--){for(var tt=!0,Me=0;Me<Ne;Me++)if(oe(e,Be+Me)!==oe(i,Me)){tt=!1;break}if(tt)return Be}return-1}function F(e,i,T,x){T=Number(T)||0;var A=e.length-T;x?(x=Number(x))>A&&(x=A):x=A;var oe=i.length;if(oe%2!=0)throw new TypeError("Invalid hex string");x>oe/2&&(x=oe/2);for(var _e=0;_e<x;++_e){var He=parseInt(i.substr(2*_e,2),16);if(isNaN(He))return _e;e[T+_e]=He}return _e}function M(e,i,T,x){return be(ge(i,e.length-T),e,T,x)}function b(e,i,T,x){return be(se(i),e,T,x)}function X(e,i,T,x){return b(e,i,T,x)}function B(e,i,T,x){return be(Z(i),e,T,x)}function U(e,i,T,x){return be(ie(i,e.length-T),e,T,x)}function W(e,i,T){return i===0&&T===e.length?q.fromByteArray(e):q.fromByteArray(e.slice(i,T))}function ne(e,i,T){T=Math.min(e.length,T);for(var x=[],A=i;A<T;){var oe=e[A],_e=null,He=oe>239?4:oe>223?3:oe>191?2:1;if(A+He<=T){var Ne,Be,$e,tt;switch(He){case 1:oe<128&&(_e=oe);break;case 2:Ne=e[A+1],(192&Ne)==128&&(tt=(31&oe)<<6|63&Ne)>127&&(_e=tt);break;case 3:Ne=e[A+1],Be=e[A+2],(192&Ne)==128&&(192&Be)==128&&(tt=(15&oe)<<12|(63&Ne)<<6|63&Be)>2047&&(tt<55296||tt>57343)&&(_e=tt);break;case 4:Ne=e[A+1],Be=e[A+2],$e=e[A+3],(192&Ne)==128&&(192&Be)==128&&(192&$e)==128&&(tt=(15&oe)<<18|(63&Ne)<<12|(63&Be)<<6|63&$e)>65535&&tt<1114112&&(_e=tt)}}_e===null?(_e=65533,He=1):_e>65535&&(_e-=65536,x.push(_e>>>10&1023|55296),_e=56320|1023&_e),x.push(_e),A+=He}return re(x)}function re(e){var i=e.length;if(i<=Ie)return String.fromCharCode.apply(String,e);for(var T="",x=0;x<i;)T+=String.fromCharCode.apply(String,e.slice(x,x+=Ie));return T}function ae(e,i,T){var x="";T=Math.min(e.length,T);for(var A=i;A<T;++A)x+=String.fromCharCode(127&e[A]);return x}function ue(e,i,T){var x="";T=Math.min(e.length,T);for(var A=i;A<T;++A)x+=String.fromCharCode(e[A]);return x}function V(e,i,T){var x=e.length;(!i||i<0)&&(i=0),(!T||T<0||T>x)&&(T=x);for(var A="",oe=i;oe<T;++oe)A+=pe(e[oe]);return A}function ye(e,i,T){for(var x=e.slice(i,T),A="",oe=0;oe<x.length;oe+=2)A+=String.fromCharCode(x[oe]+256*x[oe+1]);return A}function J(e,i,T){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+i>T)throw new RangeError("Trying to access beyond buffer length")}function $(e,i,T,x,A,oe){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>A||i<oe)throw new RangeError('"value" argument is out of bounds');if(T+x>e.length)throw new RangeError("Index out of range")}function z(e,i,T,x){i<0&&(i=65535+i+1);for(var A=0,oe=Math.min(e.length-T,2);A<oe;++A)e[T+A]=(i&255<<8*(x?A:1-A))>>>8*(x?A:1-A)}function H(e,i,T,x){i<0&&(i=4294967295+i+1);for(var A=0,oe=Math.min(e.length-T,4);A<oe;++A)e[T+A]=i>>>8*(x?A:3-A)&255}function Y(e,i,T,x,A,oe){if(T+x>e.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function ee(e,i,T,x,A){return A||Y(e,i,T,4,34028234663852886e22,-34028234663852886e22),Ee.write(e,i,T,x,23,4),T+4}function we(e,i,T,x,A){return A||Y(e,i,T,8,17976931348623157e292,-17976931348623157e292),Ee.write(e,i,T,x,52,8),T+8}function he(e){if(e=Ae(e).replace(P,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function Ae(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function pe(e){return e<16?"0"+e.toString(16):e.toString(16)}function ge(e,i){i=i||1/0;for(var T,x=e.length,A=null,oe=[],_e=0;_e<x;++_e){if((T=e.charCodeAt(_e))>55295&&T<57344){if(!A){if(T>56319){(i-=3)>-1&&oe.push(239,191,189);continue}if(_e+1===x){(i-=3)>-1&&oe.push(239,191,189);continue}A=T;continue}if(T<56320){(i-=3)>-1&&oe.push(239,191,189),A=T;continue}T=65536+(A-55296<<10|T-56320)}else A&&(i-=3)>-1&&oe.push(239,191,189);if(A=null,T<128){if((i-=1)<0)break;oe.push(T)}else if(T<2048){if((i-=2)<0)break;oe.push(T>>6|192,63&T|128)}else if(T<65536){if((i-=3)<0)break;oe.push(T>>12|224,T>>6&63|128,63&T|128)}else{if(!(T<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;oe.push(T>>18|240,T>>12&63|128,T>>6&63|128,63&T|128)}}return oe}function se(e){for(var i=[],T=0;T<e.length;++T)i.push(255&e.charCodeAt(T));return i}function ie(e,i){for(var T,x,A,oe=[],_e=0;_e<e.length&&!((i-=2)<0);++_e)T=e.charCodeAt(_e),x=T>>8,A=T%256,oe.push(A),oe.push(x);return oe}function Z(e){return q.toByteArray(he(e))}function be(e,i,T,x){for(var A=0;A<x&&!(A+T>=i.length||A>=e.length);++A)i[A+T]=e[A];return A}function te(e){return e!==e}var q=r("base64-js"),Ee=r("ieee754"),Se=r("isarray");f.Buffer=o,f.SlowBuffer=k,f.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT!==void 0?h.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42&&typeof e.subarray=="function"&&e.subarray(1,1).byteLength===0}catch(i){return!1}}(),f.kMaxLength=m(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,i,T){return p(null,e,i,T)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,i,T){return t(null,e,i,T)},o.allocUnsafe=function(e){return a(null,e)},o.allocUnsafeSlow=function(e){return a(null,e)},o.isBuffer=function(e){return!(e==null||!e._isBuffer)},o.compare=function(e,i){if(!o.isBuffer(e)||!o.isBuffer(i))throw new TypeError("Arguments must be Buffers");if(e===i)return 0;for(var T=e.length,x=i.length,A=0,oe=Math.min(T,x);A<oe;++A)if(e[A]!==i[A]){T=e[A],x=i[A];break}return T<x?-1:x<T?1:0},o.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}},o.concat=function(e,i){if(!Se(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return o.alloc(0);var T;if(i===void 0)for(i=0,T=0;T<e.length;++T)i+=e[T].length;var x=o.allocUnsafe(i),A=0;for(T=0;T<e.length;++T){var oe=e[T];if(!o.isBuffer(oe))throw new TypeError('"list" argument must be an Array of Buffers');oe.copy(x,A),A+=oe.length}return x},o.byteLength=S,o.prototype._isBuffer=!0,o.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 i=0;i<e;i+=2)O(this,i,i+1);return this},o.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 i=0;i<e;i+=4)O(this,i,i+3),O(this,i+1,i+2);return this},o.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 i=0;i<e;i+=8)O(this,i,i+7),O(this,i+1,i+6),O(this,i+2,i+5),O(this,i+3,i+4);return this},o.prototype.toString=function(){var e=0|this.length;return e===0?"":arguments.length===0?ne(this,0,e):E.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||o.compare(this,e)===0},o.prototype.inspect=function(){var e="",i=f.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,i,T,x,A){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(i===void 0&&(i=0),T===void 0&&(T=e?e.length:0),x===void 0&&(x=0),A===void 0&&(A=this.length),i<0||T>e.length||x<0||A>this.length)throw new RangeError("out of range index");if(x>=A&&i>=T)return 0;if(x>=A)return-1;if(i>=T)return 1;if(i>>>=0,T>>>=0,x>>>=0,A>>>=0,this===e)return 0;for(var oe=A-x,_e=T-i,He=Math.min(oe,_e),Ne=this.slice(x,A),Be=e.slice(i,T),$e=0;$e<He;++$e)if(Ne[$e]!==Be[$e]){oe=Ne[$e],_e=Be[$e];break}return oe<_e?-1:_e<oe?1:0},o.prototype.includes=function(e,i,T){return this.indexOf(e,i,T)!==-1},o.prototype.indexOf=function(e,i,T){return w(this,e,i,T,!0)},o.prototype.lastIndexOf=function(e,i,T){return w(this,e,i,T,!1)},o.prototype.write=function(e,i,T,x){if(i===void 0)x="utf8",T=this.length,i=0;else if(T===void 0&&typeof i=="string")x=i,T=this.length,i=0;else{if(!isFinite(i))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");i|=0,isFinite(T)?(T|=0,x===void 0&&(x="utf8")):(x=T,T=void 0)}var A=this.length-i;if((T===void 0||T>A)&&(T=A),e.length>0&&(T<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");for(var oe=!1;;)switch(x){case"hex":return F(this,e,i,T);case"utf8":case"utf-8":return M(this,e,i,T);case"ascii":return b(this,e,i,T);case"latin1":case"binary":return X(this,e,i,T);case"base64":return B(this,e,i,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,i,T);default:if(oe)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),oe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ie=4096;o.prototype.slice=function(e,i){var T=this.length;e=~~e,i=i===void 0?T:~~i,e<0?(e+=T)<0&&(e=0):e>T&&(e=T),i<0?(i+=T)<0&&(i=0):i>T&&(i=T),i<e&&(i=e);var x;if(o.TYPED_ARRAY_SUPPORT)x=this.subarray(e,i),x.__proto__=o.prototype;else{var A=i-e;x=new o(A,void 0);for(var oe=0;oe<A;++oe)x[oe]=this[oe+e]}return x},o.prototype.readUIntLE=function(e,i,T){e|=0,i|=0,T||J(e,i,this.length);for(var x=this[e],A=1,oe=0;++oe<i&&(A*=256);)x+=this[e+oe]*A;return x},o.prototype.readUIntBE=function(e,i,T){e|=0,i|=0,T||J(e,i,this.length);for(var x=this[e+--i],A=1;i>0&&(A*=256);)x+=this[e+--i]*A;return x},o.prototype.readUInt8=function(e,i){return i||J(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,i){return i||J(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,i){return i||J(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,i){return i||J(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,i){return i||J(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,i,T){e|=0,i|=0,T||J(e,i,this.length);for(var x=this[e],A=1,oe=0;++oe<i&&(A*=256);)x+=this[e+oe]*A;return A*=128,x>=A&&(x-=Math.pow(2,8*i)),x},o.prototype.readIntBE=function(e,i,T){e|=0,i|=0,T||J(e,i,this.length);for(var x=i,A=1,oe=this[e+--x];x>0&&(A*=256);)oe+=this[e+--x]*A;return A*=128,oe>=A&&(oe-=Math.pow(2,8*i)),oe},o.prototype.readInt8=function(e,i){return i||J(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,i){i||J(e,2,this.length);var T=this[e]|this[e+1]<<8;return 32768&T?4294901760|T:T},o.prototype.readInt16BE=function(e,i){i||J(e,2,this.length);var T=this[e+1]|this[e]<<8;return 32768&T?4294901760|T:T},o.prototype.readInt32LE=function(e,i){return i||J(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,i){return i||J(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,i){return i||J(e,4,this.length),Ee.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,i){return i||J(e,4,this.length),Ee.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,i){return i||J(e,8,this.length),Ee.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,i){return i||J(e,8,this.length),Ee.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,i,T,x){(e=+e,i|=0,T|=0,!x)&&$(this,e,i,T,Math.pow(2,8*T)-1,0);var A=1,oe=0;for(this[i]=255&e;++oe<T&&(A*=256);)this[i+oe]=e/A&255;return i+T},o.prototype.writeUIntBE=function(e,i,T,x){(e=+e,i|=0,T|=0,!x)&&$(this,e,i,T,Math.pow(2,8*T)-1,0);var A=T-1,oe=1;for(this[i+A]=255&e;--A>=0&&(oe*=256);)this[i+A]=e/oe&255;return i+T},o.prototype.writeUInt8=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[i]=255&e,i+1},o.prototype.writeUInt16LE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[i]=255&e,this[i+1]=e>>>8):z(this,e,i,!0),i+2},o.prototype.writeUInt16BE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[i]=e>>>8,this[i+1]=255&e):z(this,e,i,!1),i+2},o.prototype.writeUInt32LE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[i+3]=e>>>24,this[i+2]=e>>>16,this[i+1]=e>>>8,this[i]=255&e):H(this,e,i,!0),i+4},o.prototype.writeUInt32BE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[i]=e>>>24,this[i+1]=e>>>16,this[i+2]=e>>>8,this[i+3]=255&e):H(this,e,i,!1),i+4},o.prototype.writeIntLE=function(e,i,T,x){if(e=+e,i|=0,!x){var A=Math.pow(2,8*T-1);$(this,e,i,T,A-1,-A)}var oe=0,_e=1,He=0;for(this[i]=255&e;++oe<T&&(_e*=256);)e<0&&He===0&&this[i+oe-1]!==0&&(He=1),this[i+oe]=(e/_e>>0)-He&255;return i+T},o.prototype.writeIntBE=function(e,i,T,x){if(e=+e,i|=0,!x){var A=Math.pow(2,8*T-1);$(this,e,i,T,A-1,-A)}var oe=T-1,_e=1,He=0;for(this[i+oe]=255&e;--oe>=0&&(_e*=256);)e<0&&He===0&&this[i+oe+1]!==0&&(He=1),this[i+oe]=(e/_e>>0)-He&255;return i+T},o.prototype.writeInt8=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[i]=255&e,i+1},o.prototype.writeInt16LE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[i]=255&e,this[i+1]=e>>>8):z(this,e,i,!0),i+2},o.prototype.writeInt16BE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[i]=e>>>8,this[i+1]=255&e):z(this,e,i,!1),i+2},o.prototype.writeInt32LE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[i]=255&e,this[i+1]=e>>>8,this[i+2]=e>>>16,this[i+3]=e>>>24):H(this,e,i,!0),i+4},o.prototype.writeInt32BE=function(e,i,T){return e=+e,i|=0,T||$(this,e,i,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[i]=e>>>24,this[i+1]=e>>>16,this[i+2]=e>>>8,this[i+3]=255&e):H(this,e,i,!1),i+4},o.prototype.writeFloatLE=function(e,i,T){return ee(this,e,i,!0,T)},o.prototype.writeFloatBE=function(e,i,T){return ee(this,e,i,!1,T)},o.prototype.writeDoubleLE=function(e,i,T){return we(this,e,i,!0,T)},o.prototype.writeDoubleBE=function(e,i,T){return we(this,e,i,!1,T)},o.prototype.copy=function(e,i,T,x){if(T||(T=0),x||x===0||(x=this.length),i>=e.length&&(i=e.length),i||(i=0),x>0&&x<T&&(x=T),x===T)return 0;if(e.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("sourceStart out of bounds");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),e.length-i<x-T&&(x=e.length-i+T);var A,oe=x-T;if(this===e&&T<i&&i<x)for(A=oe-1;A>=0;--A)e[A+i]=this[A+T];else if(oe<1e3||!o.TYPED_ARRAY_SUPPORT)for(A=0;A<oe;++A)e[A+i]=this[A+T];else Uint8Array.prototype.set.call(e,this.subarray(T,T+oe),i);return oe},o.prototype.fill=function(e,i,T,x){if(typeof e=="string"){if(typeof i=="string"?(x=i,i=0,T=this.length):typeof T=="string"&&(x=T,T=this.length),e.length===1){var A=e.charCodeAt(0);A<256&&(e=A)}if(x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!o.isEncoding(x))throw new TypeError("Unknown encoding: "+x)}else typeof e=="number"&&(e&=255);if(i<0||this.length<i||this.length<T)throw new RangeError("Out of range index");if(T<=i)return this;i>>>=0,T=T===void 0?this.length:T>>>0,e||(e=0);var oe;if(typeof e=="number")for(oe=i;oe<T;++oe)this[oe]=e;else{var _e=o.isBuffer(e)?e:ge(new o(e,x).toString()),He=_e.length;for(oe=0;oe<T-i;++oe)this[oe+i]=_e[oe%He]}return this};var P=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(r,I,f){I.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(r,I,f){"use strict";var h=function(){this.buffer=[],this.fns=[]};h.prototype.push=function(u,o){if(this.fns.length)return this.fns.shift()(null,u);var p={data:u,priority:o},s=m(this.buffer,p,function(t){return t.priority});this.buffer.splice(s,0,p)},h.prototype.next=function(){var u=this;return function(o){if(u.buffer.length)return o(null,u.buffer.pop().data);u.fns.push(o)}};var m=function(u,o,p){o=p(o);for(var s=0,t=u?u.length:s;s<t;){var a=s+t>>>1;p(u[a])<o?s=a+1:t=a}return s};I.exports=h},{}],41:[function(r,I,f){function h(y){var d=this,C=g.call(arguments,1);return new Promise(function(k,S){function E(_){var F;try{F=y.next(_)}catch(M){return S(M)}w(F)}function O(_){var F;try{F=y.throw(_)}catch(M){return S(M)}w(F)}function w(_){if(_.done)return k(_.value);var F=m.call(d,_.value);return F&&s(F)?F.then(E,O):O(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(_.value)+'"'))}if(typeof y=="function"&&(y=y.apply(d,C)),!y||typeof y.next!="function")return k(y);E()})}function m(y){return y&&(s(y)?y:a(y)||t(y)?h.call(this,y):typeof y=="function"?u.call(this,y):Array.isArray(y)?o.call(this,y):c(y)?p.call(this,y):y)}function u(y){var d=this;return new Promise(function(C,k){y.call(d,function(S,E){if(S)return k(S);arguments.length>2&&(E=g.call(arguments,1)),C(E)})})}function o(y){return Promise.all(y.map(m,this))}function p(y){for(var d=new y.constructor,C=Object.keys(y),k=[],S=0;S<C.length;S++){var E=C[S],O=m.call(this,y[E]);O&&s(O)?function(w,_){d[_]=void 0,k.push(w.then(function(F){d[_]=F}))}(O,E):d[E]=y[E]}return Promise.all(k).then(function(){return d})}function s(y){return typeof y.then=="function"}function t(y){return typeof y.next=="function"&&typeof y.throw=="function"}function a(y){var d=y.constructor;return!!d&&(d.name==="GeneratorFunction"||d.displayName==="GeneratorFunction"||t(d.prototype))}function c(y){return Object==y.constructor}var g=Array.prototype.slice;I.exports=h.default=h.co=h,h.wrap=function(y){function d(){return h.call(this,y.apply(this,arguments))}return d.__generatorFunction__=y,d}},{}],42:[function(r,I,f){I.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(r,I,f){"use strict";function h(o,p){if(!(this instanceof h))return new h(o,p);this.src=o,this._withAccess=p}function m(o,p){return o[p]===void 0&&o.__lookupGetter__(p)===void 0&&o.__lookupSetter__(p)===void 0}var u=Array.prototype.slice;I.exports=h,h.prototype.withAccess=function(o){return this._withAccess=o!==!1,this},h.prototype.pick=function(o){return Array.isArray(o)||(o=u.call(arguments)),o.length&&(this.keys=o),this},h.prototype.to=function(o){if(o=o||{},!this.src)return o;var p=this.keys||Object.keys(this.src);if(!this._withAccess){for(var s=0;s<p.length;s++)t=p[s],o[t]===void 0&&(o[t]=this.src[t]);return o}for(var s=0;s<p.length;s++){var t=p[s];if(m(o,t)){var a=this.src.__lookupGetter__(t),c=this.src.__lookupSetter__(t);a&&o.__defineGetter__(t,a),c&&o.__defineSetter__(t,c),a||c||(o[t]=this.src[t])}}return o},h.prototype.toCover=function(o){for(var p=this.keys||Object.keys(this.src),s=0;s<p.length;s++){var t=p[s];delete o[t];var a=this.src.__lookupGetter__(t),c=this.src.__lookupSetter__(t);a&&o.__defineGetter__(t,a),c&&o.__defineSetter__(t,c),a||c||(o[t]=this.src[t])}},h.prototype.override=h.prototype.toCover,h.prototype.and=function(o){var p={};return this.to(p),this.src=o,this.to(p),this.src=p,this}},{}],44:[function(r,I,f){r("../../modules/es6.string.iterator"),r("../../modules/es6.array.from"),I.exports=r("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(r,I,f){var h=r("../../modules/_core"),m=h.JSON||(h.JSON={stringify:JSON.stringify});I.exports=function(u){return m.stringify.apply(m,arguments)}},{"../../modules/_core":65}],46:[function(r,I,f){r("../../modules/es6.object.assign"),I.exports=r("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(r,I,f){r("../../modules/es6.object.create");var h=r("../../modules/_core").Object;I.exports=function(m,u){return h.create(m,u)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(r,I,f){r("../../modules/es6.object.define-property");var h=r("../../modules/_core").Object;I.exports=function(m,u,o){return h.defineProperty(m,u,o)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(r,I,f){r("../../modules/es6.object.get-own-property-names");var h=r("../../modules/_core").Object;I.exports=function(m){return h.getOwnPropertyNames(m)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(r,I,f){r("../../modules/es6.object.get-prototype-of"),I.exports=r("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(r,I,f){r("../../modules/es6.object.keys"),I.exports=r("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(r,I,f){r("../modules/es6.object.to-string"),r("../modules/es6.string.iterator"),r("../modules/web.dom.iterable"),r("../modules/es6.promise"),r("../modules/es7.promise.finally"),r("../modules/es7.promise.try"),I.exports=r("../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(r,I,f){r("../modules/web.immediate"),I.exports=r("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(r,I,f){r("../../modules/es6.string.from-code-point"),I.exports=r("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(r,I,f){r("../../modules/es6.function.has-instance"),I.exports=r("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(r,I,f){r("../../modules/es6.symbol"),r("../../modules/es6.object.to-string"),r("../../modules/es7.symbol.async-iterator"),r("../../modules/es7.symbol.observable"),I.exports=r("../../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(r,I,f){r("../../modules/es6.string.iterator"),r("../../modules/web.dom.iterable"),I.exports=r("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(r,I,f){I.exports=function(h){if(typeof h!="function")throw TypeError(h+" is not a function!");return h}},{}],59:[function(r,I,f){I.exports=function(){}},{}],60:[function(r,I,f){I.exports=function(h,m,u,o){if(!(h instanceof m)||o!==void 0&&o in h)throw TypeError(u+": incorrect invocation!");return h}},{}],61:[function(r,I,f){var h=r("./_is-object");I.exports=function(m){if(!h(m))throw TypeError(m+" is not an object!");return m}},{"./_is-object":85}],62:[function(r,I,f){var h=r("./_to-iobject"),m=r("./_to-length"),u=r("./_to-absolute-index");I.exports=function(o){return function(p,s,t){var a,c=h(p),g=m(c.length),y=u(t,g);if(o&&s!=s){for(;g>y;)if((a=c[y++])!=a)return!0}else for(;g>y;y++)if((o||y in c)&&c[y]===s)return o||y||0;return!o&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(r,I,f){var h=r("./_cof"),m=r("./_wks")("toStringTag"),u=h(function(){return arguments}())=="Arguments",o=function(p,s){try{return p[s]}catch(t){}};I.exports=function(p){var s,t,a;return p===void 0?"Undefined":p===null?"Null":typeof(t=o(s=Object(p),m))=="string"?t:u?h(s):(a=h(s))=="Object"&&typeof s.callee=="function"?"Arguments":a}},{"./_cof":64,"./_wks":131}],64:[function(r,I,f){var h={}.toString;I.exports=function(m){return h.call(m).slice(8,-1)}},{}],65:[function(r,I,f){var h=I.exports={version:"2.5.7"};typeof __e=="number"&&(__e=h)},{}],66:[function(r,I,f){"use strict";var h=r("./_object-dp"),m=r("./_property-desc");I.exports=function(u,o,p){o in u?h.f(u,o,m(0,p)):u[o]=p}},{"./_object-dp":98,"./_property-desc":111}],67:[function(r,I,f){var h=r("./_a-function");I.exports=function(m,u,o){if(h(m),u===void 0)return m;switch(o){case 1:return function(p){return m.call(u,p)};case 2:return function(p,s){return m.call(u,p,s)};case 3:return function(p,s,t){return m.call(u,p,s,t)}}return function(){return m.apply(u,arguments)}}},{"./_a-function":58}],68:[function(r,I,f){I.exports=function(h){if(h==null)throw TypeError("Can't call method on "+h);return h}},{}],69:[function(r,I,f){I.exports=!r("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(r,I,f){var h=r("./_is-object"),m=r("./_global").document,u=h(m)&&h(m.createElement);I.exports=function(o){return u?m.createElement(o):{}}},{"./_global":76,"./_is-object":85}],71:[function(r,I,f){I.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(r,I,f){var h=r("./_object-keys"),m=r("./_object-gops"),u=r("./_object-pie");I.exports=function(o){var p=h(o),s=m.f;if(s)for(var t,a=s(o),c=u.f,g=0;a.length>g;)c.call(o,t=a[g++])&&p.push(t);return p}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(r,I,f){var h=r("./_global"),m=r("./_core"),u=r("./_ctx"),o=r("./_hide"),p=r("./_has"),s=function(t,a,c){var g,y,d,C=t&s.F,k=t&s.G,S=t&s.S,E=t&s.P,O=t&s.B,w=t&s.W,_=k?m:m[a]||(m[a]={}),F=_.prototype,M=k?h:S?h[a]:(h[a]||{}).prototype;k&&(c=a);for(g in c)(y=!C&&M&&M[g]!==void 0)&&p(_,g)||(d=y?M[g]:c[g],_[g]=k&&typeof M[g]!="function"?c[g]:O&&y?u(d,h):w&&M[g]==d?function(b){var X=function(B,U,W){if(this instanceof b){switch(arguments.length){case 0:return new b;case 1:return new b(B);case 2:return new b(B,U)}return new b(B,U,W)}return b.apply(this,arguments)};return X.prototype=b.prototype,X}(d):E&&typeof d=="function"?u(Function.call,d):d,E&&((_.virtual||(_.virtual={}))[g]=d,t&s.R&&F&&!F[g]&&o(F,g,d)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,I.exports=s},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(r,I,f){I.exports=function(h){try{return!!h()}catch(m){return!0}}},{}],75:[function(r,I,f){var h=r("./_ctx"),m=r("./_iter-call"),u=r("./_is-array-iter"),o=r("./_an-object"),p=r("./_to-length"),s=r("./core.get-iterator-method"),t={},a={},f=I.exports=function(c,g,y,d,C){var k,S,E,O,w=C?function(){return c}:s(c),_=h(y,d,g?2:1),F=0;if(typeof w!="function")throw TypeError(c+" is not iterable!");if(u(w)){for(k=p(c.length);k>F;F++)if((O=g?_(o(S=c[F])[0],S[1]):_(c[F]))===t||O===a)return O}else for(E=w.call(c);!(S=E.next()).done;)if((O=m(E,_,S.value,g))===t||O===a)return O};f.BREAK=t,f.RETURN=a},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(r,I,f){var h=I.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=h)},{}],77:[function(r,I,f){var h={}.hasOwnProperty;I.exports=function(m,u){return h.call(m,u)}},{}],78:[function(r,I,f){var h=r("./_object-dp"),m=r("./_property-desc");I.exports=r("./_descriptors")?function(u,o,p){return h.f(u,o,m(1,p))}:function(u,o,p){return u[o]=p,u}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(r,I,f){var h=r("./_global").document;I.exports=h&&h.documentElement},{"./_global":76}],80:[function(r,I,f){I.exports=!r("./_descriptors")&&!r("./_fails")(function(){return Object.defineProperty(r("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(r,I,f){I.exports=function(h,m,u){var o=u===void 0;switch(m.length){case 0:return o?h():h.call(u);case 1:return o?h(m[0]):h.call(u,m[0]);case 2:return o?h(m[0],m[1]):h.call(u,m[0],m[1]);case 3:return o?h(m[0],m[1],m[2]):h.call(u,m[0],m[1],m[2]);case 4:return o?h(m[0],m[1],m[2],m[3]):h.call(u,m[0],m[1],m[2],m[3])}return h.apply(u,m)}},{}],82:[function(r,I,f){var h=r("./_cof");I.exports=Object("z").propertyIsEnumerable(0)?Object:function(m){return h(m)=="String"?m.split(""):Object(m)}},{"./_cof":64}],83:[function(r,I,f){var h=r("./_iterators"),m=r("./_wks")("iterator"),u=Array.prototype;I.exports=function(o){return o!==void 0&&(h.Array===o||u[m]===o)}},{"./_iterators":91,"./_wks":131}],84:[function(r,I,f){var h=r("./_cof");I.exports=Array.isArray||function(m){return h(m)=="Array"}},{"./_cof":64}],85:[function(r,I,f){I.exports=function(h){return typeof h=="object"?h!==null:typeof h=="function"}},{}],86:[function(r,I,f){var h=r("./_an-object");I.exports=function(m,u,o,p){try{return p?u(h(o)[0],o[1]):u(o)}catch(t){var s=m.return;throw s!==void 0&&h(s.call(m)),t}}},{"./_an-object":61}],87:[function(r,I,f){"use strict";var h=r("./_object-create"),m=r("./_property-desc"),u=r("./_set-to-string-tag"),o={};r("./_hide")(o,r("./_wks")("iterator"),function(){return this}),I.exports=function(p,s,t){p.prototype=h(o,{next:m(1,t)}),u(p,s+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(r,I,f){"use strict";var h=r("./_library"),m=r("./_export"),u=r("./_redefine"),o=r("./_hide"),p=r("./_iterators"),s=r("./_iter-create"),t=r("./_set-to-string-tag"),a=r("./_object-gpo"),c=r("./_wks")("iterator"),g=!([].keys&&"next"in[].keys()),y=function(){return this};I.exports=function(d,C,k,S,E,O,w){s(k,C,S);var _,F,M,b=function(V){if(!g&&V in W)return W[V];switch(V){case"keys":case"values":return function(){return new k(this,V)}}return function(){return new k(this,V)}},X=C+" Iterator",B=E=="values",U=!1,W=d.prototype,ne=W[c]||W["@@iterator"]||E&&W[E],re=ne||b(E),ae=E?B?b("entries"):re:void 0,ue=C=="Array"&&W.entries||ne;if(ue&&(M=a(ue.call(new d)))!==Object.prototype&&M.next&&(t(M,X,!0),h||typeof M[c]=="function"||o(M,c,y)),B&&ne&&ne.name!=="values"&&(U=!0,re=function(){return ne.call(this)}),h&&!w||!g&&!U&&W[c]||o(W,c,re),p[C]=re,p[X]=y,E)if(_={values:B?re:b("values"),keys:O?re:b("keys"),entries:ae},w)for(F in _)F in W||u(W,F,_[F]);else m(m.P+m.F*(g||U),C,_);return _}},{"./_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(r,I,f){var h=r("./_wks")("iterator"),m=!1;try{var u=[7][h]();u.return=function(){m=!0},Array.from(u,function(){throw 2})}catch(o){}I.exports=function(o,p){if(!p&&!m)return!1;var s=!1;try{var t=[7],a=t[h]();a.next=function(){return{done:s=!0}},t[h]=function(){return a},o(t)}catch(c){}return s}},{"./_wks":131}],90:[function(r,I,f){I.exports=function(h,m){return{value:m,done:!!h}}},{}],91:[function(r,I,f){I.exports={}},{}],92:[function(r,I,f){I.exports=!0},{}],93:[function(r,I,f){var h=r("./_uid")("meta"),m=r("./_is-object"),u=r("./_has"),o=r("./_object-dp").f,p=0,s=Object.isExtensible||function(){return!0},t=!r("./_fails")(function(){return s(Object.preventExtensions({}))}),a=function(C){o(C,h,{value:{i:"O"+ ++p,w:{}}})},c=function(C,k){if(!m(C))return typeof C=="symbol"?C:(typeof C=="string"?"S":"P")+C;if(!u(C,h)){if(!s(C))return"F";if(!k)return"E";a(C)}return C[h].i},g=function(C,k){if(!u(C,h)){if(!s(C))return!0;if(!k)return!1;a(C)}return C[h].w},y=function(C){return t&&d.NEED&&s(C)&&!u(C,h)&&a(C),C},d=I.exports={KEY:h,NEED:!1,fastKey:c,getWeak:g,onFreeze:y}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(r,I,f){var h=r("./_global"),m=r("./_task").set,u=h.MutationObserver||h.WebKitMutationObserver,o=h.process,p=h.Promise,s=r("./_cof")(o)=="process";I.exports=function(){var t,a,c,g=function(){var k,S;for(s&&(k=o.domain)&&k.exit();t;){S=t.fn,t=t.next;try{S()}catch(E){throw t?c():a=void 0,E}}a=void 0,k&&k.enter()};if(s)c=function(){o.nextTick(g)};else if(!u||h.navigator&&h.navigator.standalone)if(p&&p.resolve){var y=p.resolve(void 0);c=function(){y.then(g)}}else c=function(){m.call(h,g)};else{var d=!0,C=document.createTextNode("");new u(g).observe(C,{characterData:!0}),c=function(){C.data=d=!d}}return function(k){var S={fn:k,next:void 0};a&&(a.next=S),t||(t=S,c()),a=S}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(r,I,f){"use strict";function h(u){var o,p;this.promise=new u(function(s,t){if(o!==void 0||p!==void 0)throw TypeError("Bad Promise constructor");o=s,p=t}),this.resolve=m(o),this.reject=m(p)}var m=r("./_a-function");I.exports.f=function(u){return new h(u)}},{"./_a-function":58}],96:[function(r,I,f){"use strict";var h=r("./_object-keys"),m=r("./_object-gops"),u=r("./_object-pie"),o=r("./_to-object"),p=r("./_iobject"),s=Object.assign;I.exports=!s||r("./_fails")(function(){var t={},a={},c=Symbol(),g="abcdefghijklmnopqrst";return t[c]=7,g.split("").forEach(function(y){a[y]=y}),s({},t)[c]!=7||Object.keys(s({},a)).join("")!=g})?function(t,a){for(var c=o(t),g=arguments.length,y=1,d=m.f,C=u.f;g>y;)for(var k,S=p(arguments[y++]),E=d?h(S).concat(d(S)):h(S),O=E.length,w=0;O>w;)C.call(S,k=E[w++])&&(c[k]=S[k]);return c}:s},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(r,I,f){var h=r("./_an-object"),m=r("./_object-dps"),u=r("./_enum-bug-keys"),o=r("./_shared-key")("IE_PROTO"),p=function(){},s=function(){var t,a=r("./_dom-create")("iframe"),c=u.length;for(a.style.display="none",r("./_html").appendChild(a),a.src="javascript:",t=a.contentWindow.document,t.open(),t.write("<script>document.F=Object</script>"),t.close(),s=t.F;c--;)delete s.prototype[u[c]];return s()};I.exports=Object.create||function(t,a){var c;return t!==null?(p.prototype=h(t),c=new p,p.prototype=null,c[o]=t):c=s(),a===void 0?c:m(c,a)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(r,I,f){var h=r("./_an-object"),m=r("./_ie8-dom-define"),u=r("./_to-primitive"),o=Object.defineProperty;f.f=r("./_descriptors")?Object.defineProperty:function(p,s,t){if(h(p),s=u(s,!0),h(t),m)try{return o(p,s,t)}catch(a){}if("get"in t||"set"in t)throw TypeError("Accessors not supported!");return"value"in t&&(p[s]=t.value),p}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(r,I,f){var h=r("./_object-dp"),m=r("./_an-object"),u=r("./_object-keys");I.exports=r("./_descriptors")?Object.defineProperties:function(o,p){m(o);for(var s,t=u(p),a=t.length,c=0;a>c;)h.f(o,s=t[c++],p[s]);return o}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(r,I,f){var h=r("./_object-pie"),m=r("./_property-desc"),u=r("./_to-iobject"),o=r("./_to-primitive"),p=r("./_has"),s=r("./_ie8-dom-define"),t=Object.getOwnPropertyDescriptor;f.f=r("./_descriptors")?t:function(a,c){if(a=u(a),c=o(c,!0),s)try{return t(a,c)}catch(g){}if(p(a,c))return m(!h.f.call(a,c),a[c])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(r,I,f){var h=r("./_to-iobject"),m=r("./_object-gopn").f,u={}.toString,o=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],p=function(s){try{return m(s)}catch(t){return o.slice()}};I.exports.f=function(s){return o&&u.call(s)=="[object Window]"?p(s):m(h(s))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(r,I,f){var h=r("./_object-keys-internal"),m=r("./_enum-bug-keys").concat("length","prototype");f.f=Object.getOwnPropertyNames||function(u){return h(u,m)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(r,I,f){f.f=Object.getOwnPropertySymbols},{}],104:[function(r,I,f){var h=r("./_has"),m=r("./_to-object"),u=r("./_shared-key")("IE_PROTO"),o=Object.prototype;I.exports=Object.getPrototypeOf||function(p){return p=m(p),h(p,u)?p[u]:typeof p.constructor=="function"&&p instanceof p.constructor?p.constructor.prototype:p instanceof Object?o:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(r,I,f){var h=r("./_has"),m=r("./_to-iobject"),u=r("./_array-includes")(!1),o=r("./_shared-key")("IE_PROTO");I.exports=function(p,s){var t,a=m(p),c=0,g=[];for(t in a)t!=o&&h(a,t)&&g.push(t);for(;s.length>c;)h(a,t=s[c++])&&(~u(g,t)||g.push(t));return g}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(r,I,f){var h=r("./_object-keys-internal"),m=r("./_enum-bug-keys");I.exports=Object.keys||function(u){return h(u,m)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(r,I,f){f.f={}.propertyIsEnumerable},{}],108:[function(r,I,f){var h=r("./_export"),m=r("./_core"),u=r("./_fails");I.exports=function(o,p){var s=(m.Object||{})[o]||Object[o],t={};t[o]=p(s),h(h.S+h.F*u(function(){s(1)}),"Object",t)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(r,I,f){I.exports=function(h){try{return{e:!1,v:h()}}catch(m){return{e:!0,v:m}}}},{}],110:[function(r,I,f){var h=r("./_an-object"),m=r("./_is-object"),u=r("./_new-promise-capability");I.exports=function(o,p){if(h(o),m(p)&&p.constructor===o)return p;var s=u.f(o);return(0,s.resolve)(p),s.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(r,I,f){I.exports=function(h,m){return{enumerable:!(1&h),configurable:!(2&h),writable:!(4&h),value:m}}},{}],112:[function(r,I,f){var h=r("./_hide");I.exports=function(m,u,o){for(var p in u)o&&m[p]?m[p]=u[p]:h(m,p,u[p]);return m}},{"./_hide":78}],113:[function(r,I,f){I.exports=r("./_hide")},{"./_hide":78}],114:[function(r,I,f){"use strict";var h=r("./_global"),m=r("./_core"),u=r("./_object-dp"),o=r("./_descriptors"),p=r("./_wks")("species");I.exports=function(s){var t=typeof m[s]=="function"?m[s]:h[s];o&&t&&!t[p]&&u.f(t,p,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(r,I,f){var h=r("./_object-dp").f,m=r("./_has"),u=r("./_wks")("toStringTag");I.exports=function(o,p,s){o&&!m(o=s?o:o.prototype,u)&&h(o,u,{configurable:!0,value:p})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(r,I,f){var h=r("./_shared")("keys"),m=r("./_uid");I.exports=function(u){return h[u]||(h[u]=m(u))}},{"./_shared":117,"./_uid":127}],117:[function(r,I,f){var h=r("./_core"),m=r("./_global"),u=m["__core-js_shared__"]||(m["__core-js_shared__"]={});(I.exports=function(o,p){return u[o]||(u[o]=p!==void 0?p:{})})("versions",[]).push({version:h.version,mode:r("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(r,I,f){var h=r("./_an-object"),m=r("./_a-function"),u=r("./_wks")("species");I.exports=function(o,p){var s,t=h(o).constructor;return t===void 0||(s=h(t)[u])==null?p:m(s)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(r,I,f){var h=r("./_to-integer"),m=r("./_defined");I.exports=function(u){return function(o,p){var s,t,a=String(m(o)),c=h(p),g=a.length;return c<0||c>=g?u?"":void 0:(s=a.charCodeAt(c),s<55296||s>56319||c+1===g||(t=a.charCodeAt(c+1))<56320||t>57343?u?a.charAt(c):s:u?a.slice(c,c+2):t-56320+(s-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(r,I,f){var h,m,u,o=r("./_ctx"),p=r("./_invoke"),s=r("./_html"),t=r("./_dom-create"),a=r("./_global"),c=a.process,g=a.setImmediate,y=a.clearImmediate,d=a.MessageChannel,C=a.Dispatch,k=0,S={},E=function(){var w=+this;if(S.hasOwnProperty(w)){var _=S[w];delete S[w],_()}},O=function(w){E.call(w.data)};g&&y||(g=function(w){for(var _=[],F=1;arguments.length>F;)_.push(arguments[F++]);return S[++k]=function(){p(typeof w=="function"?w:Function(w),_)},h(k),k},y=function(w){delete S[w]},r("./_cof")(c)=="process"?h=function(w){c.nextTick(o(E,w,1))}:C&&C.now?h=function(w){C.now(o(E,w,1))}:d?(m=new d,u=m.port2,m.port1.onmessage=O,h=o(u.postMessage,u,1)):a.addEventListener&&typeof postMessage=="function"&&!a.importScripts?(h=function(w){a.postMessage(w+"","*")},a.addEventListener("message",O,!1)):h="onreadystatechange"in t("script")?function(w){s.appendChild(t("script")).onreadystatechange=function(){s.removeChild(this),E.call(w)}}:function(w){setTimeout(o(E,w,1),0)}),I.exports={set:g,clear:y}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(r,I,f){var h=r("./_to-integer"),m=Math.max,u=Math.min;I.exports=function(o,p){return o=h(o),o<0?m(o+p,0):u(o,p)}},{"./_to-integer":122}],122:[function(r,I,f){var h=Math.ceil,m=Math.floor;I.exports=function(u){return isNaN(u=+u)?0:(u>0?m:h)(u)}},{}],123:[function(r,I,f){var h=r("./_iobject"),m=r("./_defined");I.exports=function(u){return h(m(u))}},{"./_defined":68,"./_iobject":82}],124:[function(r,I,f){var h=r("./_to-integer"),m=Math.min;I.exports=function(u){return u>0?m(h(u),9007199254740991):0}},{"./_to-integer":122}],125:[function(r,I,f){var h=r("./_defined");I.exports=function(m){return Object(h(m))}},{"./_defined":68}],126:[function(r,I,f){var h=r("./_is-object");I.exports=function(m,u){if(!h(m))return m;var o,p;if(u&&typeof(o=m.toString)=="function"&&!h(p=o.call(m)))return p;if(typeof(o=m.valueOf)=="function"&&!h(p=o.call(m)))return p;if(!u&&typeof(o=m.toString)=="function"&&!h(p=o.call(m)))return p;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(r,I,f){var h=0,m=Math.random();I.exports=function(u){return"Symbol(".concat(u===void 0?"":u,")_",(++h+m).toString(36))}},{}],128:[function(r,I,f){var h=r("./_global"),m=h.navigator;I.exports=m&&m.userAgent||""},{"./_global":76}],129:[function(r,I,f){var h=r("./_global"),m=r("./_core"),u=r("./_library"),o=r("./_wks-ext"),p=r("./_object-dp").f;I.exports=function(s){var t=m.Symbol||(m.Symbol=u?{}:h.Symbol||{});s.charAt(0)=="_"||s in t||p(t,s,{value:o.f(s)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(r,I,f){f.f=r("./_wks")},{"./_wks":131}],131:[function(r,I,f){var h=r("./_shared")("wks"),m=r("./_uid"),u=r("./_global").Symbol,o=typeof u=="function";(I.exports=function(p){return h[p]||(h[p]=o&&u[p]||(o?u:m)("Symbol."+p))}).store=h},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(r,I,f){var h=r("./_classof"),m=r("./_wks")("iterator"),u=r("./_iterators");I.exports=r("./_core").getIteratorMethod=function(o){if(o!=null)return o[m]||o["@@iterator"]||u[h(o)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(r,I,f){"use strict";var h=r("./_ctx"),m=r("./_export"),u=r("./_to-object"),o=r("./_iter-call"),p=r("./_is-array-iter"),s=r("./_to-length"),t=r("./_create-property"),a=r("./core.get-iterator-method");m(m.S+m.F*!r("./_iter-detect")(function(c){Array.from(c)}),"Array",{from:function(c){var g,y,d,C,k=u(c),S=typeof this=="function"?this:Array,E=arguments.length,O=E>1?arguments[1]:void 0,w=O!==void 0,_=0,F=a(k);if(w&&(O=h(O,E>2?arguments[2]:void 0,2)),F==null||S==Array&&p(F))for(g=s(k.length),y=new S(g);g>_;_++)t(y,_,w?O(k[_],_):k[_]);else for(C=F.call(k),y=new S;!(d=C.next()).done;_++)t(y,_,w?o(C,O,[d.value,_],!0):d.value);return y.length=_,y}})},{"./_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(r,I,f){"use strict";var h=r("./_add-to-unscopables"),m=r("./_iter-step"),u=r("./_iterators"),o=r("./_to-iobject");I.exports=r("./_iter-define")(Array,"Array",function(p,s){this._t=o(p),this._i=0,this._k=s},function(){var p=this._t,s=this._k,t=this._i++;return!p||t>=p.length?(this._t=void 0,m(1)):s=="keys"?m(0,t):s=="values"?m(0,p[t]):m(0,[t,p[t]])},"values"),u.Arguments=u.Array,h("keys"),h("values"),h("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(r,I,f){"use strict";var h=r("./_is-object"),m=r("./_object-gpo"),u=r("./_wks")("hasInstance"),o=Function.prototype;u in o||r("./_object-dp").f(o,u,{value:function(p){if(typeof this!="function"||!h(p))return!1;if(!h(this.prototype))return p instanceof this;for(;p=m(p);)if(this.prototype===p)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(r,I,f){var h=r("./_export");h(h.S+h.F,"Object",{assign:r("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(r,I,f){var h=r("./_export");h(h.S,"Object",{create:r("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(r,I,f){var h=r("./_export");h(h.S+h.F*!r("./_descriptors"),"Object",{defineProperty:r("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(r,I,f){r("./_object-sap")("getOwnPropertyNames",function(){return r("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(r,I,f){var h=r("./_to-object"),m=r("./_object-gpo");r("./_object-sap")("getPrototypeOf",function(){return function(u){return m(h(u))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(r,I,f){var h=r("./_to-object"),m=r("./_object-keys");r("./_object-sap")("keys",function(){return function(u){return m(h(u))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(r,I,f){arguments[4][36][0].apply(f,arguments)},{dup:36}],143:[function(r,I,f){"use strict";var h,m,u,o,p=r("./_library"),s=r("./_global"),t=r("./_ctx"),a=r("./_classof"),c=r("./_export"),g=r("./_is-object"),y=r("./_a-function"),d=r("./_an-instance"),C=r("./_for-of"),k=r("./_species-constructor"),S=r("./_task").set,E=r("./_microtask")(),O=r("./_new-promise-capability"),w=r("./_perform"),_=r("./_user-agent"),F=r("./_promise-resolve"),M=s.TypeError,b=s.process,X=b&&b.versions,B=X&&X.v8||"",U=s.Promise,W=a(b)=="process",ne=function(){},re=m=O.f,ae=!!function(){try{var Y=U.resolve(1),ee=(Y.constructor={})[r("./_wks")("species")]=function(we){we(ne,ne)};return(W||typeof PromiseRejectionEvent=="function")&&Y.then(ne)instanceof ee&&B.indexOf("6.6")!==0&&_.indexOf("Chrome/66")===-1}catch(we){}}(),ue=function(Y){var ee;return!(!g(Y)||typeof(ee=Y.then)!="function")&&ee},V=function(Y,ee){if(!Y._n){Y._n=!0;var we=Y._c;E(function(){for(var he=Y._v,Ae=Y._s==1,pe=0;we.length>pe;)!function(ge){var se,ie,Z,be=Ae?ge.ok:ge.fail,te=ge.resolve,q=ge.reject,Ee=ge.domain;try{be?(Ae||(Y._h==2&&$(Y),Y._h=1),be===!0?se=he:(Ee&&Ee.enter(),se=be(he),Ee&&(Ee.exit(),Z=!0)),se===ge.promise?q(M("Promise-chain cycle")):(ie=ue(se))?ie.call(se,te,q):te(se)):q(he)}catch(Se){Ee&&!Z&&Ee.exit(),q(Se)}}(we[pe++]);Y._c=[],Y._n=!1,ee&&!Y._h&&ye(Y)})}},ye=function(Y){S.call(s,function(){var ee,we,he,Ae=Y._v,pe=J(Y);if(pe&&(ee=w(function(){W?b.emit("unhandledRejection",Ae,Y):(we=s.onunhandledrejection)?we({promise:Y,reason:Ae}):(he=s.console)&&he.error&&he.error("Unhandled promise rejection",Ae)}),Y._h=W||J(Y)?2:1),Y._a=void 0,pe&&ee.e)throw ee.v})},J=function(Y){return Y._h!==1&&(Y._a||Y._c).length===0},$=function(Y){S.call(s,function(){var ee;W?b.emit("rejectionHandled",Y):(ee=s.onrejectionhandled)&&ee({promise:Y,reason:Y._v})})},z=function(Y){var ee=this;ee._d||(ee._d=!0,ee=ee._w||ee,ee._v=Y,ee._s=2,ee._a||(ee._a=ee._c.slice()),V(ee,!0))},H=function(Y){var ee,we=this;if(!we._d){we._d=!0,we=we._w||we;try{if(we===Y)throw M("Promise can't be resolved itself");(ee=ue(Y))?E(function(){var he={_w:we,_d:!1};try{ee.call(Y,t(H,he,1),t(z,he,1))}catch(Ae){z.call(he,Ae)}}):(we._v=Y,we._s=1,V(we,!1))}catch(he){z.call({_w:we,_d:!1},he)}}};ae||(U=function(Y){d(this,U,"Promise","_h"),y(Y),h.call(this);try{Y(t(H,this,1),t(z,this,1))}catch(ee){z.call(this,ee)}},h=function(Y){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},h.prototype=r("./_redefine-all")(U.prototype,{then:function(Y,ee){var we=re(k(this,U));return we.ok=typeof Y!="function"||Y,we.fail=typeof ee=="function"&&ee,we.domain=W?b.domain:void 0,this._c.push(we),this._a&&this._a.push(we),this._s&&V(this,!1),we.promise},catch:function(Y){return this.then(void 0,Y)}}),u=function(){var Y=new h;this.promise=Y,this.resolve=t(H,Y,1),this.reject=t(z,Y,1)},O.f=re=function(Y){return Y===U||Y===o?new u(Y):m(Y)}),c(c.G+c.W+c.F*!ae,{Promise:U}),r("./_set-to-string-tag")(U,"Promise"),r("./_set-species")("Promise"),o=r("./_core").Promise,c(c.S+c.F*!ae,"Promise",{reject:function(Y){var ee=re(this);return(0,ee.reject)(Y),ee.promise}}),c(c.S+c.F*(p||!ae),"Promise",{resolve:function(Y){return F(p&&this===o?U:this,Y)}}),c(c.S+c.F*!(ae&&r("./_iter-detect")(function(Y){U.all(Y).catch(ne)})),"Promise",{all:function(Y){var ee=this,we=re(ee),he=we.resolve,Ae=we.reject,pe=w(function(){var ge=[],se=0,ie=1;C(Y,!1,function(Z){var be=se++,te=!1;ge.push(void 0),ie++,ee.resolve(Z).then(function(q){te||(te=!0,ge[be]=q,--ie||he(ge))},Ae)}),--ie||he(ge)});return pe.e&&Ae(pe.v),we.promise},race:function(Y){var ee=this,we=re(ee),he=we.reject,Ae=w(function(){C(Y,!1,function(pe){ee.resolve(pe).then(we.resolve,he)})});return Ae.e&&he(Ae.v),we.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(r,I,f){var h=r("./_export"),m=r("./_to-absolute-index"),u=String.fromCharCode,o=String.fromCodePoint;h(h.S+h.F*(!!o&&o.length!=1),"String",{fromCodePoint:function(p){for(var s,t=[],a=arguments.length,c=0;a>c;){if(s=+arguments[c++],m(s,1114111)!==s)throw RangeError(s+" is not a valid code point");t.push(s<65536?u(s):u(55296+((s-=65536)>>10),s%1024+56320))}return t.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(r,I,f){"use strict";var h=r("./_string-at")(!0);r("./_iter-define")(String,"String",function(m){this._t=String(m),this._i=0},function(){var m,u=this._t,o=this._i;return o>=u.length?{value:void 0,done:!0}:(m=h(u,o),this._i+=m.length,{value:m,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(r,I,f){"use strict";var h=r("./_global"),m=r("./_has"),u=r("./_descriptors"),o=r("./_export"),p=r("./_redefine"),s=r("./_meta").KEY,t=r("./_fails"),a=r("./_shared"),c=r("./_set-to-string-tag"),g=r("./_uid"),y=r("./_wks"),d=r("./_wks-ext"),C=r("./_wks-define"),k=r("./_enum-keys"),S=r("./_is-array"),E=r("./_an-object"),O=r("./_is-object"),w=r("./_to-iobject"),_=r("./_to-primitive"),F=r("./_property-desc"),M=r("./_object-create"),b=r("./_object-gopn-ext"),X=r("./_object-gopd"),B=r("./_object-dp"),U=r("./_object-keys"),W=X.f,ne=B.f,re=b.f,ae=h.Symbol,ue=h.JSON,V=ue&&ue.stringify,ye=y("_hidden"),J=y("toPrimitive"),$={}.propertyIsEnumerable,z=a("symbol-registry"),H=a("symbols"),Y=a("op-symbols"),ee=Object.prototype,we=typeof ae=="function",he=h.QObject,Ae=!he||!he.prototype||!he.prototype.findChild,pe=u&&t(function(){return M(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a!=7})?function(T,x,A){var oe=W(ee,x);oe&&delete ee[x],ne(T,x,A),oe&&T!==ee&&ne(ee,x,oe)}:ne,ge=function(T){var x=H[T]=M(ae.prototype);return x._k=T,x},se=we&&typeof ae.iterator=="symbol"?function(T){return typeof T=="symbol"}:function(T){return T instanceof ae},ie=function(T,x,A){return T===ee&&ie(Y,x,A),E(T),x=_(x,!0),E(A),m(H,x)?(A.enumerable?(m(T,ye)&&T[ye][x]&&(T[ye][x]=!1),A=M(A,{enumerable:F(0,!1)})):(m(T,ye)||ne(T,ye,F(1,{})),T[ye][x]=!0),pe(T,x,A)):ne(T,x,A)},Z=function(T,x){E(T);for(var A,oe=k(x=w(x)),_e=0,He=oe.length;He>_e;)ie(T,A=oe[_e++],x[A]);return T},be=function(T,x){return x===void 0?M(T):Z(M(T),x)},te=function(T){var x=$.call(this,T=_(T,!0));return!(this===ee&&m(H,T)&&!m(Y,T))&&(!(x||!m(this,T)||!m(H,T)||m(this,ye)&&this[ye][T])||x)},q=function(T,x){if(T=w(T),x=_(x,!0),T!==ee||!m(H,x)||m(Y,x)){var A=W(T,x);return!A||!m(H,x)||m(T,ye)&&T[ye][x]||(A.enumerable=!0),A}},Ee=function(T){for(var x,A=re(w(T)),oe=[],_e=0;A.length>_e;)m(H,x=A[_e++])||x==ye||x==s||oe.push(x);return oe},Se=function(T){for(var x,A=T===ee,oe=re(A?Y:w(T)),_e=[],He=0;oe.length>He;)!m(H,x=oe[He++])||A&&!m(ee,x)||_e.push(H[x]);return _e};we||(ae=function(){if(this instanceof ae)throw TypeError("Symbol is not a constructor!");var T=g(arguments.length>0?arguments[0]:void 0),x=function(A){this===ee&&x.call(Y,A),m(this,ye)&&m(this[ye],T)&&(this[ye][T]=!1),pe(this,T,F(1,A))};return u&&Ae&&pe(ee,T,{configurable:!0,set:x}),ge(T)},p(ae.prototype,"toString",function(){return this._k}),X.f=q,B.f=ie,r("./_object-gopn").f=b.f=Ee,r("./_object-pie").f=te,r("./_object-gops").f=Se,u&&!r("./_library")&&p(ee,"propertyIsEnumerable",te,!0),d.f=function(T){return ge(y(T))}),o(o.G+o.W+o.F*!we,{Symbol:ae});for(var Ie="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),P=0;Ie.length>P;)y(Ie[P++]);for(var e=U(y.store),i=0;e.length>i;)C(e[i++]);o(o.S+o.F*!we,"Symbol",{for:function(T){return m(z,T+="")?z[T]:z[T]=ae(T)},keyFor:function(T){if(!se(T))throw TypeError(T+" is not a symbol!");for(var x in z)if(z[x]===T)return x},useSetter:function(){Ae=!0},useSimple:function(){Ae=!1}}),o(o.S+o.F*!we,"Object",{create:be,defineProperty:ie,defineProperties:Z,getOwnPropertyDescriptor:q,getOwnPropertyNames:Ee,getOwnPropertySymbols:Se}),ue&&o(o.S+o.F*(!we||t(function(){var T=ae();return V([T])!="[null]"||V({a:T})!="{}"||V(Object(T))!="{}"})),"JSON",{stringify:function(T){for(var x,A,oe=[T],_e=1;arguments.length>_e;)oe.push(arguments[_e++]);if(A=x=oe[1],(O(x)||T!==void 0)&&!se(T))return S(x)||(x=function(He,Ne){if(typeof A=="function"&&(Ne=A.call(this,He,Ne)),!se(Ne))return Ne}),oe[1]=x,V.apply(ue,oe)}}),ae.prototype[J]||r("./_hide")(ae.prototype,J,ae.prototype.valueOf),c(ae,"Symbol"),c(Math,"Math",!0),c(h.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(r,I,f){"use strict";var h=r("./_export"),m=r("./_core"),u=r("./_global"),o=r("./_species-constructor"),p=r("./_promise-resolve");h(h.P+h.R,"Promise",{finally:function(s){var t=o(this,m.Promise||u.Promise),a=typeof s=="function";return this.then(a?function(c){return p(t,s()).then(function(){return c})}:s,a?function(c){return p(t,s()).then(function(){throw c})}:s)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(r,I,f){"use strict";var h=r("./_export"),m=r("./_new-promise-capability"),u=r("./_perform");h(h.S,"Promise",{try:function(o){var p=m.f(this),s=u(o);return(s.e?p.reject:p.resolve)(s.v),p.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(r,I,f){r("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(r,I,f){r("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(r,I,f){r("./es6.array.iterator");for(var h=r("./_global"),m=r("./_hide"),u=r("./_iterators"),o=r("./_wks")("toStringTag"),p="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(","),s=0;s<p.length;s++){var t=p[s],a=h[t],c=a&&a.prototype;c&&!c[o]&&m(c,o,t),u[t]=u.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(r,I,f){var h=r("./_export"),m=r("./_task");h(h.G+h.B,{setImmediate:m.set,clearImmediate:m.clear})},{"./_export":73,"./_task":120}],153:[function(r,I,f){(function(h){"use strict";function m(_){return Array.isArray?Array.isArray(_):E(_)==="[object Array]"}function u(_){return typeof _=="boolean"}function o(_){return _===null}function p(_){return _==null}function s(_){return typeof _=="number"}function t(_){return typeof _=="string"}function a(_){return(_===void 0?"undefined":(0,w.default)(_))==="symbol"}function c(_){return _===void 0}function g(_){return E(_)==="[object RegExp]"}function y(_){return(_===void 0?"undefined":(0,w.default)(_))==="object"&&_!==null}function d(_){return E(_)==="[object Date]"}function C(_){return E(_)==="[object Error]"||_ instanceof Error}function k(_){return typeof _=="function"}function S(_){return _===null||typeof _=="boolean"||typeof _=="number"||typeof _=="string"||(_===void 0?"undefined":(0,w.default)(_))==="symbol"||_===void 0}function E(_){return Object.prototype.toString.call(_)}var O=r("babel-runtime/helpers/typeof"),w=function(_){return _&&_.__esModule?_:{default:_}}(O);f.isArray=m,f.isBoolean=u,f.isNull=o,f.isNullOrUndefined=p,f.isNumber=s,f.isString=t,f.isSymbol=a,f.isUndefined=c,f.isRegExp=g,f.isObject=y,f.isDate=d,f.isError=C,f.isFunction=k,f.isPrimitive=S,f.isBuffer=h.isBuffer}).call(this,{isBuffer:r("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(r,I,f){"use strict";var h=r("babel-runtime/helpers/typeof"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);!function(u){function o(c,g){for(c=String(c),g=g||2;c.length<g;)c="0"+c;return c}function p(c){var g=new Date(c.getFullYear(),c.getMonth(),c.getDate());g.setDate(g.getDate()-(g.getDay()+6)%7+3);var y=new Date(g.getFullYear(),0,4);y.setDate(y.getDate()-(y.getDay()+6)%7+3);var d=g.getTimezoneOffset()-y.getTimezoneOffset();g.setHours(g.getHours()-d);var C=(g-y)/6048e5;return 1+Math.floor(C)}function s(c){var g=c.getDay();return g===0&&(g=7),g}function t(c){return c===null?"null":c===void 0?"undefined":(c===void 0?"undefined":(0,m.default)(c))!=="object"?c===void 0?"undefined":(0,m.default)(c):Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()}var a=function(){var c=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,y=/[^-+\dA-Z]/g;return function(d,C,k,S){if(arguments.length!==1||t(d)!=="string"||/\d/.test(d)||(C=d,d=void 0),d=d||new Date,d instanceof Date||(d=new Date(d)),isNaN(d))throw TypeError("Invalid date");C=String(a.masks[C]||C||a.masks.default);var E=C.slice(0,4);E!=="UTC:"&&E!=="GMT:"||(C=C.slice(4),k=!0,E==="GMT:"&&(S=!0));var O=k?"getUTC":"get",w=d[O+"Date"](),_=d[O+"Day"](),F=d[O+"Month"](),M=d[O+"FullYear"](),b=d[O+"Hours"](),X=d[O+"Minutes"](),B=d[O+"Seconds"](),U=d[O+"Milliseconds"](),W=k?0:d.getTimezoneOffset(),ne=p(d),re=s(d),ae={d:w,dd:o(w),ddd:a.i18n.dayNames[_],dddd:a.i18n.dayNames[_+7],m:F+1,mm:o(F+1),mmm:a.i18n.monthNames[F],mmmm:a.i18n.monthNames[F+12],yy:String(M).slice(2),yyyy:M,h:b%12||12,hh:o(b%12||12),H:b,HH:o(b),M:X,MM:o(X),s:B,ss:o(B),l:o(U,3),L:o(Math.round(U/10)),t:b<12?"a":"p",tt:b<12?"am":"pm",T:b<12?"A":"P",TT:b<12?"AM":"PM",Z:S?"GMT":k?"UTC":(String(d).match(g)||[""]).pop().replace(y,""),o:(W>0?"-":"+")+o(100*Math.floor(Math.abs(W)/60)+Math.abs(W)%60,4),S:["th","st","nd","rd"][w%10>3?0:(w%100-w%10!=10)*w%10],W:ne,N:re};return C.replace(c,function(ue){return ue in ae?ae[ue]:ue.slice(1,ue.length-1)})}}();a.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"},a.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof je=="function"&&je.amd?je(function(){return a}):(f===void 0?"undefined":(0,m.default)(f))==="object"?I.exports=a:u.dateFormat=a}(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(r,I,f){(function(h){function m(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function u(t){var a=this.useColors;if(t[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+t[0]+(a?"%c ":" ")+"+"+f.humanize(this.diff),a){var c="color: "+this.color;t.splice(1,0,c,"color: inherit");var g=0,y=0;t[0].replace(/%[a-zA-Z%]/g,function(d){d!=="%%"&&(g++,d==="%c"&&(y=g))}),t.splice(y,0,c)}}function o(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function p(t){try{t==null?f.storage.removeItem("debug"):f.storage.debug=t}catch(a){}}function s(){var t;try{t=f.storage.debug}catch(a){}return!t&&h!==void 0&&"env"in h&&(t=h.env.DEBUG),t}f=I.exports=r("./debug"),f.log=o,f.formatArgs=u,f.save=p,f.load=s,f.useColors=m,f.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),f.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],f.formatters.j=function(t){try{return JSON.stringify(t)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}},f.enable(s())}).call(this,r("_process"))},{"./debug":156,_process:173}],156:[function(r,I,f){function h(a){var c,g=0;for(c in a)g=(g<<5)-g+a.charCodeAt(c),g|=0;return f.colors[Math.abs(g)%f.colors.length]}function m(a){function c(){if(c.enabled){var g=c,y=+new Date,d=y-(t||y);g.diff=d,g.prev=t,g.curr=y,t=y;for(var C=new Array(arguments.length),k=0;k<C.length;k++)C[k]=arguments[k];C[0]=f.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");var S=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,function(E,O){if(E==="%%")return E;S++;var w=f.formatters[O];if(typeof w=="function"){var _=C[S];E=w.call(g,_),C.splice(S,1),S--}return E}),f.formatArgs.call(g,C),(c.log||f.log||console.log.bind(console)).apply(g,C)}}return c.namespace=a,c.enabled=f.enabled(a),c.useColors=f.useColors(),c.color=h(a),typeof f.init=="function"&&f.init(c),c}function u(a){f.save(a),f.names=[],f.skips=[];for(var c=(typeof a=="string"?a:"").split(/[\s,]+/),g=c.length,y=0;y<g;y++)c[y]&&(a=c[y].replace(/\*/g,".*?"),a[0]==="-"?f.skips.push(new RegExp("^"+a.substr(1)+"$")):f.names.push(new RegExp("^"+a+"$")))}function o(){f.enable("")}function p(a){var c,g;for(c=0,g=f.skips.length;c<g;c++)if(f.skips[c].test(a))return!1;for(c=0,g=f.names.length;c<g;c++)if(f.names[c].test(a))return!0;return!1}function s(a){return a instanceof Error?a.stack||a.message:a}f=I.exports=m.debug=m.default=m,f.coerce=s,f.disable=o,f.enable=u,f.enabled=p,f.humanize=r("ms"),f.names=[],f.skips=[],f.formatters={};var t},{ms:169}],157:[function(r,I,f){"use strict";function h(u){var o=""+u,p=m.exec(o);if(!p)return o;var s,t="",a=0,c=0;for(a=p.index;a<o.length;a++){switch(o.charCodeAt(a)){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&#39;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;default:continue}c!==a&&(t+=o.substring(c,a)),c=a+1,t+=s}return c!==a?t+o.substring(c,a):t}var m=/["'&<>]/;I.exports=h},{}],158:[function(r,I,f){function h(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function m(s){return typeof s=="function"}function u(s){return typeof s=="number"}function o(s){return typeof s=="object"&&s!==null}function p(s){return s===void 0}I.exports=h,h.EventEmitter=h,h.prototype._events=void 0,h.prototype._maxListeners=void 0,h.defaultMaxListeners=10,h.prototype.setMaxListeners=function(s){if(!u(s)||s<0||isNaN(s))throw TypeError("n must be a positive number");return this._maxListeners=s,this},h.prototype.emit=function(s){var t,a,c,g,y,d;if(this._events||(this._events={}),s==="error"&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var C=new Error('Uncaught, unspecified "error" event. ('+t+")");throw C.context=t,C}if(a=this._events[s],p(a))return!1;if(m(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:g=Array.prototype.slice.call(arguments,1),a.apply(this,g)}else if(o(a))for(g=Array.prototype.slice.call(arguments,1),d=a.slice(),c=d.length,y=0;y<c;y++)d[y].apply(this,g);return!0},h.prototype.addListener=function(s,t){var a;if(!m(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",s,m(t.listener)?t.listener:t),this._events[s]?o(this._events[s])?this._events[s].push(t):this._events[s]=[this._events[s],t]:this._events[s]=t,o(this._events[s])&&!this._events[s].warned&&(a=p(this._maxListeners)?h.defaultMaxListeners:this._maxListeners)&&a>0&&this._events[s].length>a&&(this._events[s].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[s].length),typeof console.trace=="function"&&console.trace()),this},h.prototype.on=h.prototype.addListener,h.prototype.once=function(s,t){function a(){this.removeListener(s,a),c||(c=!0,t.apply(this,arguments))}if(!m(t))throw TypeError("listener must be a function");var c=!1;return a.listener=t,this.on(s,a),this},h.prototype.removeListener=function(s,t){var a,c,g,y;if(!m(t))throw TypeError("listener must be a function");if(!this._events||!this._events[s])return this;if(a=this._events[s],g=a.length,c=-1,a===t||m(a.listener)&&a.listener===t)delete this._events[s],this._events.removeListener&&this.emit("removeListener",s,t);else if(o(a)){for(y=g;y-- >0;)if(a[y]===t||a[y].listener&&a[y].listener===t){c=y;break}if(c<0)return this;a.length===1?(a.length=0,delete this._events[s]):a.splice(c,1),this._events.removeListener&&this.emit("removeListener",s,t)}return this},h.prototype.removeAllListeners=function(s){var t,a;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[s]&&delete this._events[s],this;if(arguments.length===0){for(t in this._events)t!=="removeListener"&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(a=this._events[s],m(a))this.removeListener(s,a);else if(a)for(;a.length;)this.removeListener(s,a[a.length-1]);return delete this._events[s],this},h.prototype.listeners=function(s){return this._events&&this._events[s]?m(this._events[s])?[this._events[s]]:this._events[s].slice():[]},h.prototype.listenerCount=function(s){if(this._events){var t=this._events[s];if(m(t))return 1;if(t)return t.length}return 0},h.listenerCount=function(s,t){return s.listenerCount(t)}},{}],159:[function(r,I,f){var h=r("http"),m=I.exports;for(var u in h)h.hasOwnProperty(u)&&(m[u]=h[u]);m.request=function(o,p){return o||(o={}),o.scheme="https",o.protocol="https:",h.request.call(this,o,p)}},{http:196}],160:[function(r,I,f){"use strict";var h=r("util"),m=r("ms");I.exports=function(u){if(typeof u=="number")return u;var o=m(u);if(o===void 0){var p=new Error(h.format("humanize-ms(%j) result undefined",u));console.warn(p.stack)}return o}},{ms:169,util:207}],161:[function(r,I,f){f.read=function(h,m,u,o,p){var s,t,a=8*p-o-1,c=(1<<a)-1,g=c>>1,y=-7,d=u?p-1:0,C=u?-1:1,k=h[m+d];for(d+=C,s=k&(1<<-y)-1,k>>=-y,y+=a;y>0;s=256*s+h[m+d],d+=C,y-=8);for(t=s&(1<<-y)-1,s>>=-y,y+=o;y>0;t=256*t+h[m+d],d+=C,y-=8);if(s===0)s=1-g;else{if(s===c)return t?NaN:1/0*(k?-1:1);t+=Math.pow(2,o),s-=g}return(k?-1:1)*t*Math.pow(2,s-o)},f.write=function(h,m,u,o,p,s){var t,a,c,g=8*s-p-1,y=(1<<g)-1,d=y>>1,C=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=o?0:s-1,S=o?1:-1,E=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(a=isNaN(m)?1:0,t=y):(t=Math.floor(Math.log(m)/Math.LN2),m*(c=Math.pow(2,-t))<1&&(t--,c*=2),m+=t+d>=1?C/c:C*Math.pow(2,1-d),m*c>=2&&(t++,c/=2),t+d>=y?(a=0,t=y):t+d>=1?(a=(m*c-1)*Math.pow(2,p),t+=d):(a=m*Math.pow(2,d-1)*Math.pow(2,p),t=0));p>=8;h[u+k]=255&a,k+=S,a/=256,p-=8);for(t=t<<p|a,g+=p;g>0;h[u+k]=255&t,k+=S,t/=256,g-=8);h[u+k-S]|=128*E}},{}],162:[function(r,I,f){typeof Object.create=="function"?I.exports=function(h,m){h.super_=m,h.prototype=Object.create(m.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}})}:I.exports=function(h,m){h.super_=m;var u=function(){};u.prototype=m.prototype,h.prototype=new u,h.prototype.constructor=h}},{}],163:[function(r,I,f){function h(u){return!!u.constructor&&typeof u.constructor.isBuffer=="function"&&u.constructor.isBuffer(u)}function m(u){return typeof u.readFloatLE=="function"&&typeof u.slice=="function"&&h(u.slice(0,0))}I.exports=function(u){return u!=null&&(h(u)||m(u)||!!u._isBuffer)}},{}],164:[function(r,I,f){!function(h){function m(p){return o.call(p).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function u(p){return typeof p=="function"&&(/^class(\s|\{\}$)/.test(o.call(p))||/^.*classCallCheck\(/.test(m(p)))}var o=Function.prototype.toString;f!==void 0?(I!==void 0&&I.exports&&(f=I.exports=u),f.isClass=u):typeof je=="function"&&je.amd?je([],function(){return u}):h.isClass=u}(this)},{}],165:[function(r,I,f){"use strict";function h(s){var t=s.slice(2);return t=t[0].toLowerCase()+t.slice(1)}var m=r("core-util-is"),u=r("isstream"),o=r("is-class");Object.keys(m).map(function(s){f[h(s)]=m[s]}),f.stream=u,f.readableStream=u.isReadable,f.writableStream=u.isWritable,f.duplexStream=u.isDuplex,f.class=o,f.finite=function(s){return Number.isFinite(s)},f.NaN=function(s){return Number.isNaN(s)},f.generator=function(s){return s&&typeof s.next=="function"&&typeof s.throw=="function"},f.generatorFunction=function(s){return s&&s.constructor&&s.constructor.name==="GeneratorFunction"},f.asyncFunction=function(s){return s&&s.constructor&&s.constructor.name==="AsyncFunction"},f.promise=function(s){return s&&typeof s.then=="function"};var p=Math.pow(2,31);f.int=function(s){return m.isNumber(s)&&s%1==0},f.int32=function(s){return f.int(s)&&s<p&&s>=-p},f.long=function(s){return f.int(s)&&(s>=p||s<-p)},f.Long=function(s){return f.object(s)&&f.number(s.high)&&f.number(s.low)},f.double=function(s){return m.isNumber(s)&&!isNaN(s)&&s%1!=0},f.date=function(s){return s instanceof Date},f.regExp=function(s){return s instanceof RegExp},f.regexp=f.regExp,f.error=function(s){return s instanceof Error},f.array=function(s){return Array.isArray(s)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(r,I,f){var h={}.toString;I.exports=Array.isArray||function(m){return h.call(m)=="[object Array]"}},{}],167:[function(r,I,f){function h(s){return s instanceof p.Stream}function m(s){return h(s)&&typeof s._read=="function"&&typeof s._readableState=="object"}function u(s){return h(s)&&typeof s._write=="function"&&typeof s._writableState=="object"}function o(s){return m(s)&&u(s)}var p=r("stream");I.exports=h,I.exports.isReadable=m,I.exports.isWritable=u,I.exports.isDuplex=o},{stream:195}],168:[function(r,I,f){"use strict";function h(u,o,p){if(!u)throw new TypeError("argument dest is required");if(!o)throw new TypeError("argument src is required");return p===void 0&&(p=!0),Object.getOwnPropertyNames(o).forEach(function(s){if(p||!m.call(u,s)){var t=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(u,s,t)}}),u}I.exports=h;var m=Object.prototype.hasOwnProperty},{}],169:[function(r,I,f){function h(g){if(g=String(g),!(g.length>100)){var y=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(g);if(y){var d=parseFloat(y[1]);switch((y[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return d*c;case"days":case"day":case"d":return d*a;case"hours":case"hour":case"hrs":case"hr":case"h":return d*t;case"minutes":case"minute":case"mins":case"min":case"m":return d*s;case"seconds":case"second":case"secs":case"sec":case"s":return d*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function m(g){return g>=a?Math.round(g/a)+"d":g>=t?Math.round(g/t)+"h":g>=s?Math.round(g/s)+"m":g>=p?Math.round(g/p)+"s":g+"ms"}function u(g){return o(g,a,"day")||o(g,t,"hour")||o(g,s,"minute")||o(g,p,"second")||g+" ms"}function o(g,y,d){if(!(g<y))return g<1.5*y?Math.floor(g/y)+" "+d:Math.ceil(g/y)+" "+d+"s"}var p=1e3,s=60*p,t=60*s,a=24*t,c=365.25*a;I.exports=function(g,y){y=y||{};var d=typeof g;if(d==="string"&&g.length>0)return h(g);if(d==="number"&&isNaN(g)===!1)return y.long?u(g):m(g);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(g))}},{}],170:[function(r,I,f){(function(h){function m(s,t){for(var a=0,c=s.length-1;c>=0;c--){var g=s[c];g==="."?s.splice(c,1):g===".."?(s.splice(c,1),a++):a&&(s.splice(c,1),a--)}if(t)for(;a--;a)s.unshift("..");return s}function u(s){typeof s!="string"&&(s+="");var t,a=0,c=-1,g=!0;for(t=s.length-1;t>=0;--t)if(s.charCodeAt(t)===47){if(!g){a=t+1;break}}else c===-1&&(g=!1,c=t+1);return c===-1?"":s.slice(a,c)}function o(s,t){if(s.filter)return s.filter(t);for(var a=[],c=0;c<s.length;c++)t(s[c],c,s)&&a.push(s[c]);return a}f.resolve=function(){for(var s="",t=!1,a=arguments.length-1;a>=-1&&!t;a--){var c=a>=0?arguments[a]:h.cwd();if(typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");c&&(s=c+"/"+s,t=c.charAt(0)==="/")}return s=m(o(s.split("/"),function(g){return!!g}),!t).join("/"),(t?"/":"")+s||"."},f.normalize=function(s){var t=f.isAbsolute(s),a=p(s,-1)==="/";return s=m(o(s.split("/"),function(c){return!!c}),!t).join("/"),s||t||(s="."),s&&a&&(s+="/"),(t?"/":"")+s},f.isAbsolute=function(s){return s.charAt(0)==="/"},f.join=function(){var s=Array.prototype.slice.call(arguments,0);return f.normalize(o(s,function(t,a){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},f.relative=function(s,t){function a(S){for(var E=0;E<S.length&&S[E]==="";E++);for(var O=S.length-1;O>=0&&S[O]==="";O--);return E>O?[]:S.slice(E,O-E+1)}s=f.resolve(s).substr(1),t=f.resolve(t).substr(1);for(var c=a(s.split("/")),g=a(t.split("/")),y=Math.min(c.length,g.length),d=y,C=0;C<y;C++)if(c[C]!==g[C]){d=C;break}for(var k=[],C=d;C<c.length;C++)k.push("..");return k=k.concat(g.slice(d)),k.join("/")},f.sep="/",f.delimiter=":",f.dirname=function(s){if(typeof s!="string"&&(s+=""),s.length===0)return".";for(var t=s.charCodeAt(0),a=t===47,c=-1,g=!0,y=s.length-1;y>=1;--y)if((t=s.charCodeAt(y))===47){if(!g){c=y;break}}else g=!1;return c===-1?a?"/":".":a&&c===1?"/":s.slice(0,c)},f.basename=function(s,t){var a=u(s);return t&&a.substr(-1*t.length)===t&&(a=a.substr(0,a.length-t.length)),a},f.extname=function(s){typeof s!="string"&&(s+="");for(var t=-1,a=0,c=-1,g=!0,y=0,d=s.length-1;d>=0;--d){var C=s.charCodeAt(d);if(C!==47)c===-1&&(g=!1,c=d+1),C===46?t===-1?t=d:y!==1&&(y=1):t!==-1&&(y=-1);else if(!g){a=d+1;break}}return t===-1||c===-1||y===0||y===1&&t===c-1&&t===a+1?"":s.slice(t,c)};var p="ab".substr(-1)==="b"?function(s,t,a){return s.substr(t,a)}:function(s,t,a){return t<0&&(t=s.length+t),s.substr(t,a)}}).call(this,r("_process"))},{_process:173}],171:[function(r,I,f){(function(h){(function(){"use strict";function m(B){return B=String(B),B.charAt(0).toUpperCase()+B.slice(1)}function u(B,U,W){var ne={"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 U&&W&&/^Win/i.test(B)&&!/^Windows Phone /i.test(B)&&(ne=ne[/[\d.]+$/.exec(B)])&&(B="Windows "+ne),B=String(B),U&&W&&(B=B.replace(RegExp(U,"i"),W)),B=p(B.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function o(B,U){var W=-1,ne=B?B.length:0;if(typeof ne=="number"&&ne>-1&&ne<=w)for(;++W<ne;)U(B[W],W,B);else s(B,U)}function p(B){return B=y(B),/^(?:webOS|i(?:OS|P))/.test(B)?B:m(B)}function s(B,U){for(var W in B)M.call(B,W)&&U(B[W],W,B)}function t(B){return B==null?m(B):b.call(B).slice(8,-1)}function a(B,U){var W=B!=null?typeof B[U]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(W)||W=="object"&&!B[U])}function c(B){return String(B).replace(/([ -])(?!$)/g,"$1?")}function g(B,U){var W=null;return o(B,function(ne,re){W=U(W,ne,re,B)}),W}function y(B){return String(B).replace(/^ +| +$/g,"")}function d(B){function U(T){return g(T,function(x,A){var oe=A.pattern||c(A);return!x&&(x=RegExp("\\b"+oe+" *\\d+[.\\w_]*","i").exec(B)||RegExp("\\b"+oe+" *\\w+-[\\w]*","i").exec(B)||RegExp("\\b"+oe+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(B))&&((x=String(A.label&&!RegExp(oe,"i").test(A.label)?A.label:x).split("/"))[1]&&!/[\d.]+/.test(x[0])&&(x[0]+=" "+x[1]),A=A.label||A,x=p(x[0].replace(RegExp(oe,"i"),A).replace(RegExp("; *(?:"+A+"[_-])?","i")," ").replace(RegExp("("+A+")[-_.]?(\\w)","i"),"$1 $2"))),x})}function W(){return this.description||""}var ne=k,re=B&&typeof B=="object"&&t(B)!="String";re&&(ne=B,B=null);var ae=ne.navigator||{},ue=ae.userAgent||"";B||(B=ue);var V,ye,J=re?!!ae.likeChrome:/\bChrome\b/.test(B)&&!/internal|\n/i.test(b.toString()),$=re?"Object":"ScriptBridgingProxyObject",z=re?"Object":"Environment",H=re&&ne.java?"JavaPackage":t(ne.java),Y=re?"Object":"RuntimeObject",ee=/\bJava/.test(H)&&ne.java,we=ee&&t(ne.environment)==z,he=ee?"a":"\u4F2A",Ae=ee?"b":"\u5C3E",pe=ne.document||{},ge=ne.operamini||ne.opera,se=_.test(se=re&&ge?ge["[[Class]]"]:t(ge))?se:ge=null,ie=B,Z=[],be=null,te=B==ue,q=te&&ge&&typeof ge.version=="function"&&ge.version(),Ee=function(T){return g(T,function(x,A){return x||RegExp("\\b"+(A.pattern||c(A))+"\\b","i").exec(B)&&(A.label||A)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Se=function(T){return g(T,function(x,A){return x||RegExp("\\b"+(A.pattern||c(A))+"\\b","i").exec(B)&&(A.label||A)})}(["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"]),Ie=U([{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"]),P=function(T){return g(T,function(x,A,oe){return x||(A[Ie]||A[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ie)]||RegExp("\\b"+c(oe)+"(?:\\b|\\w*\\d)","i").exec(B))&&oe})}({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}}),e=function(T){return g(T,function(x,A){var oe=A.pattern||c(A);return!x&&(x=RegExp("\\b"+oe+"(?:/[\\d.]+|[ \\w.]*)","i").exec(B))&&(x=u(x,oe,A.label||A)),x})}(["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 "]);if(Ee&&(Ee=[Ee]),P&&!Ie&&(Ie=U([P])),(V=/\bGoogle TV\b/.exec(Ie))&&(Ie=V[0]),/\bSimulator\b/i.test(B)&&(Ie=(Ie?Ie+" ":"")+"Simulator"),Se=="Opera Mini"&&/\bOPiOS\b/.test(B)&&Z.push("running in Turbo/Uncompressed mode"),Se=="IE"&&/\blike iPhone OS\b/.test(B)?(V=d(B.replace(/like iPhone OS/,"")),P=V.manufacturer,Ie=V.product):/^iP/.test(Ie)?(Se||(Se="Safari"),e="iOS"+((V=/ OS ([\d_]+)/i.exec(B))?" "+V[1].replace(/_/g,"."):"")):Se!="Konqueror"||/buntu/i.test(e)?P&&P!="Google"&&(/Chrome/.test(Se)&&!/\bMobile Safari\b/i.test(B)||/\bVita\b/.test(Ie))||/\bAndroid\b/.test(e)&&/^Chrome/.test(Se)&&/\bVersion\//i.test(B)?(Se="Android Browser",e=/\bAndroid\b/.test(e)?e:"Android"):Se=="Silk"?(/\bMobi/i.test(B)||(e="Android",Z.unshift("desktop mode")),/Accelerated *= *true/i.test(B)&&Z.unshift("accelerated")):Se=="PaleMoon"&&(V=/\bFirefox\/([\d.]+)\b/.exec(B))?Z.push("identifying as Firefox "+V[1]):Se=="Firefox"&&(V=/\b(Mobile|Tablet|TV)\b/i.exec(B))?(e||(e="Firefox OS"),Ie||(Ie=V[1])):!Se||(V=!/\bMinefield\b/i.test(B)&&/\b(?:Firefox|Safari)\b/.exec(Se))?(Se&&!Ie&&/[\/,]|^[^(]+?\)/.test(B.slice(B.indexOf(V+"/")+8))&&(Se=null),(V=Ie||P||e)&&(Ie||P||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(e))&&(Se=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(e)?e:V)+" Browser")):Se=="Electron"&&(V=(/\bChrome\/([\d.]+)\b/.exec(B)||0)[1])&&Z.push("Chromium "+V):e="Kubuntu",q||(q=function(T){return g(T,function(x,A){return x||(RegExp(A+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(B)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",c(Se),"(?:Firefox|Minefield|NetFront)"])),(V=Ee=="iCab"&&parseFloat(q)>3&&"WebKit"||/\bOpera\b/.test(Se)&&(/\bOPR\b/.test(B)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(B)&&!/^(?:Trident|EdgeHTML)$/.test(Ee)&&"WebKit"||!Ee&&/\bMSIE\b/i.test(B)&&(e=="Mac OS"?"Tasman":"Trident")||Ee=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Se)&&"NetFront")&&(Ee=[V]),Se=="IE"&&(V=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(B)||0)[1])?(Se+=" Mobile",e="Windows Phone "+(/\+$/.test(V)?V:V+".x"),Z.unshift("desktop mode")):/\bWPDesktop\b/i.test(B)?(Se="IE Mobile",e="Windows Phone 8.x",Z.unshift("desktop mode"),q||(q=(/\brv:([\d.]+)/.exec(B)||0)[1])):Se!="IE"&&Ee=="Trident"&&(V=/\brv:([\d.]+)/.exec(B))&&(Se&&Z.push("identifying as "+Se+(q?" "+q:"")),Se="IE",q=V[1]),te){if(a(ne,"global"))if(ee&&(V=ee.lang.System,ie=V.getProperty("os.arch"),e=e||V.getProperty("os.name")+" "+V.getProperty("os.version")),we){try{q=ne.require("ringo/engine").version.join("."),Se="RingoJS"}catch(T){(V=ne.system)&&V.global.system==ne.system&&(Se="Narwhal",e||(e=V[0].os||null))}Se||(Se="Rhino")}else typeof ne.process=="object"&&!ne.process.browser&&(V=ne.process)&&(typeof V.versions=="object"&&(typeof V.versions.electron=="string"?(Z.push("Node "+V.versions.node),Se="Electron",q=V.versions.electron):typeof V.versions.nw=="string"&&(Z.push("Chromium "+q,"Node "+V.versions.node),Se="NW.js",q=V.versions.nw)),Se||(Se="Node.js",ie=V.arch,e=V.platform,q=/[\d.]+/.exec(V.version),q=q?q[0]:null));else t(V=ne.runtime)==$?(Se="Adobe AIR",e=V.flash.system.Capabilities.os):t(V=ne.phantom)==Y?(Se="PhantomJS",q=(V=V.version||null)&&V.major+"."+V.minor+"."+V.patch):typeof pe.documentMode=="number"&&(V=/\bTrident\/(\d+)/i.exec(B))?(q=[q,pe.documentMode],(V=+V[1]+4)!=q[1]&&(Z.push("IE "+q[1]+" mode"),Ee&&(Ee[1]=""),q[1]=V),q=Se=="IE"?String(q[1].toFixed(1)):q[0]):typeof pe.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Se)&&(Z.push("masking as "+Se+" "+q),Se="IE",q="11.0",Ee=["Trident"],e="Windows");e=e&&p(e)}if(q&&(V=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(q)||/(?:alpha|beta)(?: ?\d)?/i.exec(B+";"+(te&&ae.appMinorVersion))||/\bMinefield\b/i.test(B)&&"a")&&(be=/b/i.test(V)?"beta":"alpha",q=q.replace(RegExp(V+"\\+?$"),"")+(be=="beta"?Ae:he)+(/\d+\+?/.exec(V)||"")),Se=="Fennec"||Se=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(e))Se="Firefox Mobile";else if(Se=="Maxthon"&&q)q=q.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ie))Ie=="Xbox 360"&&(e=null),Ie=="Xbox 360"&&/\bIEMobile\b/.test(B)&&Z.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Se)&&(!Se||Ie||/Browser|Mobi/.test(Se))||e!="Windows CE"&&!/Mobi/i.test(B))if(Se=="IE"&&te)try{ne.external===null&&Z.unshift("platform preview")}catch(T){Z.unshift("embedded")}else(/\bBlackBerry\b/.test(Ie)||/\bBB10\b/.test(B))&&(V=(RegExp(Ie.replace(/ +/g," *")+"/([.\\d]+)","i").exec(B)||0)[1]||q)?(V=[V,/BB10/.test(B)],e=(V[1]?(Ie=null,P="BlackBerry"):"Device Software")+" "+V[0],q=null):this!=s&&Ie!="Wii"&&(te&&ge||/Opera/.test(Se)&&/\b(?:MSIE|Firefox)\b/i.test(B)||Se=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(e)||Se=="IE"&&(e&&!/^Win/.test(e)&&q>5.5||/\bWindows XP\b/.test(e)&&q>8||q==8&&!/\bTrident\b/.test(B)))&&!_.test(V=d.call(s,B.replace(_,"")+";"))&&V.name&&(V="ing as "+V.name+((V=V.version)?" "+V:""),_.test(Se)?(/\bIE\b/.test(V)&&e=="Mac OS"&&(e=null),V="identify"+V):(V="mask"+V,Se=se?p(se.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(V)&&(e=null),te||(q=null)),Ee=["Presto"],Z.push(V));else Se+=" Mobile";(V=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(B)||0)[1])&&(V=[parseFloat(V.replace(/\.(\d)$/,".0$1")),V],Se=="Safari"&&V[1].slice(-1)=="+"?(Se="WebKit Nightly",be="alpha",q=V[1].slice(0,-1)):q!=V[1]&&q!=(V[2]=(/\bSafari\/([\d.]+\+?)/i.exec(B)||0)[1])||(q=null),V[1]=(/\bChrome\/([\d.]+)/i.exec(B)||0)[1],V[0]==537.36&&V[2]==537.36&&parseFloat(V[1])>=28&&Ee=="WebKit"&&(Ee=["Blink"]),te&&(J||V[1])?(Ee&&(Ee[1]="like Chrome"),V=V[1]||(V=V[0],V<530?1:V<532?2:V<532.05?3:V<533?4:V<534.03?5:V<534.07?6:V<534.1?7:V<534.13?8:V<534.16?9:V<534.24?10:V<534.3?11:V<535.01?12:V<535.02?"13+":V<535.07?15:V<535.11?16:V<535.19?17:V<536.05?18:V<536.1?19:V<537.01?20:V<537.11?"21+":V<537.13?23:V<537.18?24:V<537.24?25:V<537.36?26:Ee!="Blink"?"27":"28")):(Ee&&(Ee[1]="like Safari"),V=V[0],V=V<400?1:V<500?2:V<526?3:V<533?4:V<534?"4+":V<535?5:V<537?6:V<538?7:V<601?8:"8"),Ee&&(Ee[1]+=" "+(V+=typeof V=="number"?".x":/[.+]/.test(V)?"":"+")),Se=="Safari"&&(!q||parseInt(q)>45)&&(q=V)),Se=="Opera"&&(V=/\bzbov|zvav$/.exec(e))?(Se+=" ",Z.unshift("desktop mode"),V=="zvav"?(Se+="Mini",q=null):Se+="Mobile",e=e.replace(RegExp(" *"+V+"$"),"")):Se=="Safari"&&/\bChrome\b/.exec(Ee&&Ee[1])&&(Z.unshift("desktop mode"),Se="Chrome Mobile",q=null,/\bOS X\b/.test(e)?(P="Apple",e="iOS 4.3+"):e=null),q&&q.indexOf(V=/[\d.]+$/.exec(e))==0&&B.indexOf("/"+V+"-")>-1&&(e=y(e.replace(V,""))),Ee&&!/\b(?:Avant|Nook)\b/.test(Se)&&(/Browser|Lunascape|Maxthon/.test(Se)||Se!="Safari"&&/^iOS/.test(e)&&/\bSafari\b/.test(Ee[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Se)&&Ee[1])&&(V=Ee[Ee.length-1])&&Z.push(V),Z.length&&(Z=["("+Z.join("; ")+")"]),P&&Ie&&Ie.indexOf(P)<0&&Z.push("on "+P),Ie&&Z.push((/^on /.test(Z[Z.length-1])?"":"on ")+Ie),e&&(V=/ ([\d.+]+)$/.exec(e),ye=V&&e.charAt(e.length-V[0].length-1)=="/",e={architecture:32,family:V&&!ye?e.replace(V[0],""):e,version:V?V[1]:null,toString:function(){var T=this.version;return this.family+(T&&!ye?" "+T:"")+(this.architecture==64?" 64-bit":"")}}),(V=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ie))&&!/\bi686\b/i.test(ie)?(e&&(e.architecture=64,e.family=e.family.replace(RegExp(" *"+V),"")),Se&&(/\bWOW64\b/i.test(B)||te&&/\w(?:86|32)$/.test(ae.cpuClass||ae.platform)&&!/\bWin64; x64\b/i.test(B))&&Z.unshift("32-bit")):e&&/^OS X/.test(e.family)&&Se=="Chrome"&&parseFloat(q)>=39&&(e.architecture=64),B||(B=null);var i={};return i.description=B,i.layout=Ee&&Ee[0],i.manufacturer=P,i.name=Se,i.prerelease=be,i.product=Ie,i.ua=B,i.version=Se&&q,i.os=e||{architecture:null,family:null,version:null,toString:function(){return"null"}},i.parse=d,i.toString=W,i.version&&Z.unshift(q),i.name&&Z.unshift(Se),e&&Se&&(e!=String(e).split(" ")[0]||e!=Se.split(" ")[0]&&!Ie)&&Z.push(Ie?"("+e+")":"on "+e),Z.length&&(i.description=Z.join(" ")),i}var C={function:!0,object:!0},k=C[typeof window]&&window||this,S=C[typeof f]&&f,E=C[typeof I]&&I&&!I.nodeType&&I,O=S&&E&&typeof h=="object"&&h;!O||O.global!==O&&O.window!==O&&O.self!==O||(k=O);var w=Math.pow(2,53)-1,_=/\bOpera/,F=Object.prototype,M=F.hasOwnProperty,b=F.toString,X=d();typeof je=="function"&&typeof je.amd=="object"&&je.amd?(k.platform=X,je(function(){return X})):S&&E?s(X,function(B,U){S[U]=B}):k.platform=X}).call(this)}).call(this,typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(r,I,f){(function(h){"use strict";function m(u,o,p,s){if(typeof u!="function")throw new TypeError('"callback" argument must be a function');var t,a,c=arguments.length;switch(c){case 0:case 1:return h.nextTick(u);case 2:return h.nextTick(function(){u.call(null,o)});case 3:return h.nextTick(function(){u.call(null,o,p)});case 4:return h.nextTick(function(){u.call(null,o,p,s)});default:for(t=new Array(c-1),a=0;a<t.length;)t[a++]=arguments[a];return h.nextTick(function(){u.apply(null,t)})}}!h.version||h.version.indexOf("v0.")===0||h.version.indexOf("v1.")===0&&h.version.indexOf("v1.8.")!==0?I.exports={nextTick:m}:I.exports=h}).call(this,r("_process"))},{_process:173}],173:[function(r,I,f){function h(){throw new Error("setTimeout has not been defined")}function m(){throw new Error("clearTimeout has not been defined")}function u(E){if(c===setTimeout)return setTimeout(E,0);if((c===h||!c)&&setTimeout)return c=setTimeout,setTimeout(E,0);try{return c(E,0)}catch(O){try{return c.call(null,E,0)}catch(w){return c.call(this,E,0)}}}function o(E){if(g===clearTimeout)return clearTimeout(E);if((g===m||!g)&&clearTimeout)return g=clearTimeout,clearTimeout(E);try{return g(E)}catch(O){try{return g.call(null,E)}catch(w){return g.call(this,E)}}}function p(){k&&d&&(k=!1,d.length?C=d.concat(C):S=-1,C.length&&s())}function s(){if(!k){var E=u(p);k=!0;for(var O=C.length;O;){for(d=C,C=[];++S<O;)d&&d[S].run();S=-1,O=C.length}d=null,k=!1,o(E)}}function t(E,O){this.fun=E,this.array=O}function a(){}var c,g,y=I.exports={};!function(){try{c=typeof setTimeout=="function"?setTimeout:h}catch(E){c=h}try{g=typeof clearTimeout=="function"?clearTimeout:m}catch(E){g=m}}();var d,C=[],k=!1,S=-1;y.nextTick=function(E){var O=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)O[w-1]=arguments[w];C.push(new t(E,O)),C.length!==1||k||u(s)},t.prototype.run=function(){this.fun.apply(null,this.array)},y.title="browser",y.browser=!0,y.env={},y.argv=[],y.version="",y.versions={},y.on=a,y.addListener=a,y.once=a,y.off=a,y.removeListener=a,y.removeAllListeners=a,y.emit=a,y.prependListener=a,y.prependOnceListener=a,y.listeners=function(E){return[]},y.binding=function(E){throw new Error("process.binding is not supported")},y.cwd=function(){return"/"},y.chdir=function(E){throw new Error("process.chdir is not supported")},y.umask=function(){return 0}},{}],174:[function(r,I,f){(function(h){!function(m){function u(H){throw new RangeError(ye[H])}function o(H,Y){for(var ee=H.length,we=[];ee--;)we[ee]=Y(H[ee]);return we}function p(H,Y){var ee=H.split("@"),we="";return ee.length>1&&(we=ee[0]+"@",H=ee[1]),H=H.replace(V,"."),we+o(H.split("."),Y).join(".")}function s(H){for(var Y,ee,we=[],he=0,Ae=H.length;he<Ae;)Y=H.charCodeAt(he++),Y>=55296&&Y<=56319&&he<Ae?(ee=H.charCodeAt(he++),(64512&ee)==56320?we.push(((1023&Y)<<10)+(1023&ee)+65536):(we.push(Y),he--)):we.push(Y);return we}function t(H){return o(H,function(Y){var ee="";return Y>65535&&(Y-=65536,ee+=z(Y>>>10&1023|55296),Y=56320|1023&Y),ee+=z(Y)}).join("")}function a(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:M}function c(H,Y){return H+22+75*(H<26)-((Y!=0)<<5)}function g(H,Y,ee){var we=0;for(H=ee?$(H/U):H>>1,H+=$(H/Y);H>J*X>>1;we+=M)H=$(H/J);return $(we+(J+1)*H/(H+B))}function y(H){var Y,ee,we,he,Ae,pe,ge,se,ie,Z,be=[],te=H.length,q=0,Ee=ne,Se=W;for(ee=H.lastIndexOf(re),ee<0&&(ee=0),we=0;we<ee;++we)H.charCodeAt(we)>=128&&u("not-basic"),be.push(H.charCodeAt(we));for(he=ee>0?ee+1:0;he<te;){for(Ae=q,pe=1,ge=M;he>=te&&u("invalid-input"),se=a(H.charCodeAt(he++)),(se>=M||se>$((F-q)/pe))&&u("overflow"),q+=se*pe,ie=ge<=Se?b:ge>=Se+X?X:ge-Se,!(se<ie);ge+=M)Z=M-ie,pe>$(F/Z)&&u("overflow"),pe*=Z;Y=be.length+1,Se=g(q-Ae,Y,Ae==0),$(q/Y)>F-Ee&&u("overflow"),Ee+=$(q/Y),q%=Y,be.splice(q++,0,Ee)}return t(be)}function d(H){var Y,ee,we,he,Ae,pe,ge,se,ie,Z,be,te,q,Ee,Se,Ie=[];for(H=s(H),te=H.length,Y=ne,ee=0,Ae=W,pe=0;pe<te;++pe)(be=H[pe])<128&&Ie.push(z(be));for(we=he=Ie.length,he&&Ie.push(re);we<te;){for(ge=F,pe=0;pe<te;++pe)(be=H[pe])>=Y&&be<ge&&(ge=be);for(q=we+1,ge-Y>$((F-ee)/q)&&u("overflow"),ee+=(ge-Y)*q,Y=ge,pe=0;pe<te;++pe)if(be=H[pe],be<Y&&++ee>F&&u("overflow"),be==Y){for(se=ee,ie=M;Z=ie<=Ae?b:ie>=Ae+X?X:ie-Ae,!(se<Z);ie+=M)Se=se-Z,Ee=M-Z,Ie.push(z(c(Z+Se%Ee,0))),se=$(Se/Ee);Ie.push(z(c(se,0))),Ae=g(ee,q,we==he),ee=0,++we}++ee,++Y}return Ie.join("")}function C(H){return p(H,function(Y){return ae.test(Y)?y(Y.slice(4).toLowerCase()):Y})}function k(H){return p(H,function(Y){return ue.test(Y)?"xn--"+d(Y):Y})}var S=typeof f=="object"&&f&&!f.nodeType&&f,E=typeof I=="object"&&I&&!I.nodeType&&I,O=typeof h=="object"&&h;O.global!==O&&O.window!==O&&O.self!==O||(m=O);var w,_,F=2147483647,M=36,b=1,X=26,B=38,U=700,W=72,ne=128,re="-",ae=/^xn--/,ue=/[^\x20-\x7E]/,V=/[\x2E\u3002\uFF0E\uFF61]/g,ye={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},J=M-b,$=Math.floor,z=String.fromCharCode;if(w={version:"1.4.1",ucs2:{decode:s,encode:t},decode:y,encode:d,toASCII:k,toUnicode:C},typeof je=="function"&&typeof je.amd=="object"&&je.amd)je("punycode",function(){return w});else if(S&&E)if(I.exports==S)E.exports=w;else for(_ in w)w.hasOwnProperty(_)&&(S[_]=w[_]);else m.punycode=w}(this)}).call(this,typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(r,I,f){"use strict";function h(u,o){return Object.prototype.hasOwnProperty.call(u,o)}I.exports=function(u,o,p,s){o=o||"&",p=p||"=";var t={};if(typeof u!="string"||u.length===0)return t;var a=/\+/g;u=u.split(o);var c=1e3;s&&typeof s.maxKeys=="number"&&(c=s.maxKeys);var g=u.length;c>0&&g>c&&(g=c);for(var y=0;y<g;++y){var d,C,k,S,E=u[y].replace(a,"%20"),O=E.indexOf(p);O>=0?(d=E.substr(0,O),C=E.substr(O+1)):(d=E,C=""),k=decodeURIComponent(d),S=decodeURIComponent(C),h(t,k)?m(t[k])?t[k].push(S):t[k]=[t[k],S]:t[k]=S}return t};var m=Array.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"}},{}],176:[function(r,I,f){"use strict";function h(p,s){if(p.map)return p.map(s);for(var t=[],a=0;a<p.length;a++)t.push(s(p[a],a));return t}var m=function(p){switch(typeof p){case"string":return p;case"boolean":return p?"true":"false";case"number":return isFinite(p)?p:"";default:return""}};I.exports=function(p,s,t,a){return s=s||"&",t=t||"=",p===null&&(p=void 0),typeof p=="object"?h(o(p),function(c){var g=encodeURIComponent(m(c))+t;return u(p[c])?h(p[c],function(y){return g+encodeURIComponent(m(y))}).join(s):g+encodeURIComponent(m(p[c]))}).join(s):a?encodeURIComponent(m(a))+t+encodeURIComponent(m(p)):""};var u=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"},o=Object.keys||function(p){var s=[];for(var t in p)Object.prototype.hasOwnProperty.call(p,t)&&s.push(t);return s}},{}],177:[function(r,I,f){"use strict";f.decode=f.parse=r("./decode"),f.encode=f.stringify=r("./encode")},{"./decode":175,"./encode":176}],178:[function(r,I,f){I.exports=r("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(r,I,f){"use strict";function h(k){if(!(this instanceof h))return new h(k);c.call(this,k),g.call(this,k),k&&k.readable===!1&&(this.readable=!1),k&&k.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,k&&k.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",m)}function m(){this.allowHalfOpen||this._writableState.ended||s.nextTick(u,this)}function u(k){k.end()}var o=r("babel-runtime/core-js/object/keys"),p=function(k){return k&&k.__esModule?k:{default:k}}(o),s=r("process-nextick-args"),t=p.default||function(k){var S=[];for(var E in k)S.push(E);return S};I.exports=h;var a=r("core-util-is");a.inherits=r("inherits");var c=r("./_stream_readable"),g=r("./_stream_writable");a.inherits(h,c);for(var y=t(g.prototype),d=0;d<y.length;d++){var C=y[d];h.prototype[C]||(h.prototype[C]=g.prototype[C])}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(k){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=k,this._writableState.destroyed=k)}}),h.prototype._destroy=function(k,S){this.push(null),this.end(),s.nextTick(S,k)}},{"./_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(r,I,f){"use strict";function h(o){if(!(this instanceof h))return new h(o);m.call(this,o)}I.exports=h;var m=r("./_stream_transform"),u=r("core-util-is");u.inherits=r("inherits"),u.inherits(h,m),h.prototype._transform=function(o,p,s){s(null,o)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(r,I,f){(function(h,m){"use strict";function u(te){return ee.from(te)}function o(te){return ee.isBuffer(te)||te instanceof we}function p(te,q,Ee){if(typeof te.prependListener=="function")return te.prependListener(q,Ee);te._events&&te._events[q]?z(te._events[q])?te._events[q].unshift(Ee):te._events[q]=[Ee,te._events[q]]:te.on(q,Ee)}function s(te,q){$=$||r("./_stream_duplex"),te=te||{};var Ee=q instanceof $;this.objectMode=!!te.objectMode,Ee&&(this.objectMode=this.objectMode||!!te.readableObjectMode);var Se=te.highWaterMark,Ie=te.readableHighWaterMark,P=this.objectMode?16:16384;this.highWaterMark=Se||Se===0?Se:Ee&&(Ie||Ie===0)?Ie:P,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new se,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=te.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,te.encoding&&(ge||(ge=r("string_decoder/").StringDecoder),this.decoder=new ge(te.encoding),this.encoding=te.encoding)}function t(te){if($=$||r("./_stream_duplex"),!(this instanceof t))return new t(te);this._readableState=new s(te,this),this.readable=!0,te&&(typeof te.read=="function"&&(this._read=te.read),typeof te.destroy=="function"&&(this._destroy=te.destroy)),Y.call(this)}function a(te,q,Ee,Se,Ie){var P=te._readableState;if(q===null)P.reading=!1,k(te,P);else{var e;Ie||(e=g(P,q)),e?te.emit("error",e):P.objectMode||q&&q.length>0?(typeof q=="string"||P.objectMode||(0,ye.default)(q)===ee.prototype||(q=u(q)),Se?P.endEmitted?te.emit("error",new Error("stream.unshift() after end event")):c(te,P,q,!0):P.ended?te.emit("error",new Error("stream.push() after EOF")):(P.reading=!1,P.decoder&&!Ee?(q=P.decoder.write(q),P.objectMode||q.length!==0?c(te,P,q,!1):O(te,P)):c(te,P,q,!1))):Se||(P.reading=!1)}return y(P)}function c(te,q,Ee,Se){q.flowing&&q.length===0&&!q.sync?(te.emit("data",Ee),te.read(0)):(q.length+=q.objectMode?1:Ee.length,Se?q.buffer.unshift(Ee):q.buffer.push(Ee),q.needReadable&&S(te)),O(te,q)}function g(te,q){var Ee;return o(q)||typeof q=="string"||q===void 0||te.objectMode||(Ee=new TypeError("Invalid non-string/buffer chunk")),Ee}function y(te){return!te.ended&&(te.needReadable||te.length<te.highWaterMark||te.length===0)}function d(te){return te>=be?te=be:(te--,te|=te>>>1,te|=te>>>2,te|=te>>>4,te|=te>>>8,te|=te>>>16,te++),te}function C(te,q){return te<=0||q.length===0&&q.ended?0:q.objectMode?1:te!==te?q.flowing&&q.length?q.buffer.head.data.length:q.length:(te>q.highWaterMark&&(q.highWaterMark=d(te)),te<=q.length?te:q.ended?q.length:(q.needReadable=!0,0))}function k(te,q){if(!q.ended){if(q.decoder){var Ee=q.decoder.end();Ee&&Ee.length&&(q.buffer.push(Ee),q.length+=q.objectMode?1:Ee.length)}q.ended=!0,S(te)}}function S(te){var q=te._readableState;q.needReadable=!1,q.emittedReadable||(pe("emitReadable",q.flowing),q.emittedReadable=!0,q.sync?J.nextTick(E,te):E(te))}function E(te){pe("emit readable"),te.emit("readable"),X(te)}function O(te,q){q.readingMore||(q.readingMore=!0,J.nextTick(w,te,q))}function w(te,q){for(var Ee=q.length;!q.reading&&!q.flowing&&!q.ended&&q.length<q.highWaterMark&&(pe("maybeReadMore read 0"),te.read(0),Ee!==q.length);)Ee=q.length;q.readingMore=!1}function _(te){return function(){var q=te._readableState;pe("pipeOnDrain",q.awaitDrain),q.awaitDrain&&q.awaitDrain--,q.awaitDrain===0&&H(te,"data")&&(q.flowing=!0,X(te))}}function F(te){pe("readable nexttick read 0"),te.read(0)}function M(te,q){q.resumeScheduled||(q.resumeScheduled=!0,J.nextTick(b,te,q))}function b(te,q){q.reading||(pe("resume read 0"),te.read(0)),q.resumeScheduled=!1,q.awaitDrain=0,te.emit("resume"),X(te),q.flowing&&!q.reading&&te.read(0)}function X(te){var q=te._readableState;for(pe("flow",q.flowing);q.flowing&&te.read()!==null;);}function B(te,q){if(q.length===0)return null;var Ee;return q.objectMode?Ee=q.buffer.shift():!te||te>=q.length?(Ee=q.decoder?q.buffer.join(""):q.buffer.length===1?q.buffer.head.data:q.buffer.concat(q.length),q.buffer.clear()):Ee=U(te,q.buffer,q.decoder),Ee}function U(te,q,Ee){var Se;return te<q.head.data.length?(Se=q.head.data.slice(0,te),q.head.data=q.head.data.slice(te)):Se=te===q.head.data.length?q.shift():Ee?W(te,q):ne(te,q),Se}function W(te,q){var Ee=q.head,Se=1,Ie=Ee.data;for(te-=Ie.length;Ee=Ee.next;){var P=Ee.data,e=te>P.length?P.length:te;if(e===P.length?Ie+=P:Ie+=P.slice(0,te),(te-=e)===0){e===P.length?(++Se,Ee.next?q.head=Ee.next:q.head=q.tail=null):(q.head=Ee,Ee.data=P.slice(e));break}++Se}return q.length-=Se,Ie}function ne(te,q){var Ee=ee.allocUnsafe(te),Se=q.head,Ie=1;for(Se.data.copy(Ee),te-=Se.data.length;Se=Se.next;){var P=Se.data,e=te>P.length?P.length:te;if(P.copy(Ee,Ee.length-te,0,e),(te-=e)===0){e===P.length?(++Ie,Se.next?q.head=Se.next:q.head=q.tail=null):(q.head=Se,Se.data=P.slice(e));break}++Ie}return q.length-=Ie,Ee}function re(te){var q=te._readableState;if(q.length>0)throw new Error('"endReadable()" called on non-empty stream');q.endEmitted||(q.ended=!0,J.nextTick(ae,q,te))}function ae(te,q){te.endEmitted||te.length!==0||(te.endEmitted=!0,q.readable=!1,q.emit("end"))}function ue(te,q){for(var Ee=0,Se=te.length;Ee<Se;Ee++)if(te[Ee]===q)return Ee;return-1}var V=r("babel-runtime/core-js/object/get-prototype-of"),ye=function(te){return te&&te.__esModule?te:{default:te}}(V),J=r("process-nextick-args");I.exports=t;var $,z=r("isarray");t.ReadableState=s;var H=(r("events").EventEmitter,function(te,q){return te.listeners(q).length}),Y=r("./internal/streams/stream"),ee=r("safe-buffer").Buffer,we=m.Uint8Array||function(){},he=r("core-util-is");he.inherits=r("inherits");var Ae=r("util"),pe=void 0;pe=Ae&&Ae.debuglog?Ae.debuglog("stream"):function(){};var ge,se=r("./internal/streams/BufferList"),ie=r("./internal/streams/destroy");he.inherits(t,Y);var Z=["error","close","destroy","pause","resume"];Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(te){this._readableState&&(this._readableState.destroyed=te)}}),t.prototype.destroy=ie.destroy,t.prototype._undestroy=ie.undestroy,t.prototype._destroy=function(te,q){this.push(null),q(te)},t.prototype.push=function(te,q){var Ee,Se=this._readableState;return Se.objectMode?Ee=!0:typeof te=="string"&&(q=q||Se.defaultEncoding,q!==Se.encoding&&(te=ee.from(te,q),q=""),Ee=!0),a(this,te,q,!1,Ee)},t.prototype.unshift=function(te){return a(this,te,null,!0,!1)},t.prototype.isPaused=function(){return this._readableState.flowing===!1},t.prototype.setEncoding=function(te){return ge||(ge=r("string_decoder/").StringDecoder),this._readableState.decoder=new ge(te),this._readableState.encoding=te,this};var be=8388608;t.prototype.read=function(te){pe("read",te),te=parseInt(te,10);var q=this._readableState,Ee=te;if(te!==0&&(q.emittedReadable=!1),te===0&&q.needReadable&&(q.length>=q.highWaterMark||q.ended))return pe("read: emitReadable",q.length,q.ended),q.length===0&&q.ended?re(this):S(this),null;if((te=C(te,q))===0&&q.ended)return q.length===0&&re(this),null;var Se=q.needReadable;pe("need readable",Se),(q.length===0||q.length-te<q.highWaterMark)&&(Se=!0,pe("length less than watermark",Se)),q.ended||q.reading?(Se=!1,pe("reading or ended",Se)):Se&&(pe("do read"),q.reading=!0,q.sync=!0,q.length===0&&(q.needReadable=!0),this._read(q.highWaterMark),q.sync=!1,q.reading||(te=C(Ee,q)));var Ie;return Ie=te>0?B(te,q):null,Ie===null?(q.needReadable=!0,te=0):q.length-=te,q.length===0&&(q.ended||(q.needReadable=!0),Ee!==te&&q.ended&&re(this)),Ie!==null&&this.emit("data",Ie),Ie},t.prototype._read=function(te){this.emit("error",new Error("_read() is not implemented"))},t.prototype.pipe=function(te,q){function Ee(tt,Me){pe("onunpipe"),tt===A&&Me&&Me.hasUnpiped===!1&&(Me.hasUnpiped=!0,Ie())}function Se(){pe("onend"),te.end()}function Ie(){pe("cleanup"),te.removeListener("close",i),te.removeListener("finish",T),te.removeListener("drain",Ne),te.removeListener("error",e),te.removeListener("unpipe",Ee),A.removeListener("end",Se),A.removeListener("end",x),A.removeListener("data",P),Be=!0,!oe.awaitDrain||te._writableState&&!te._writableState.needDrain||Ne()}function P(tt){pe("ondata"),$e=!1,te.write(tt)!==!1||$e||((oe.pipesCount===1&&oe.pipes===te||oe.pipesCount>1&&ue(oe.pipes,te)!==-1)&&!Be&&(pe("false write response, pause",A._readableState.awaitDrain),A._readableState.awaitDrain++,$e=!0),A.pause())}function e(tt){pe("onerror",tt),x(),te.removeListener("error",e),H(te,"error")===0&&te.emit("error",tt)}function i(){te.removeListener("finish",T),x()}function T(){pe("onfinish"),te.removeListener("close",i),x()}function x(){pe("unpipe"),A.unpipe(te)}var A=this,oe=this._readableState;switch(oe.pipesCount){case 0:oe.pipes=te;break;case 1:oe.pipes=[oe.pipes,te];break;default:oe.pipes.push(te)}oe.pipesCount+=1,pe("pipe count=%d opts=%j",oe.pipesCount,q);var _e=(!q||q.end!==!1)&&te!==h.stdout&&te!==h.stderr,He=_e?Se:x;oe.endEmitted?J.nextTick(He):A.once("end",He),te.on("unpipe",Ee);var Ne=_(A);te.on("drain",Ne);var Be=!1,$e=!1;return A.on("data",P),p(te,"error",e),te.once("close",i),te.once("finish",T),te.emit("pipe",A),oe.flowing||(pe("pipe resume"),A.resume()),te},t.prototype.unpipe=function(te){var q=this._readableState,Ee={hasUnpiped:!1};if(q.pipesCount===0)return this;if(q.pipesCount===1)return te&&te!==q.pipes?this:(te||(te=q.pipes),q.pipes=null,q.pipesCount=0,q.flowing=!1,te&&te.emit("unpipe",this,Ee),this);if(!te){var Se=q.pipes,Ie=q.pipesCount;q.pipes=null,q.pipesCount=0,q.flowing=!1;for(var P=0;P<Ie;P++)Se[P].emit("unpipe",this,Ee);return this}var e=ue(q.pipes,te);return e===-1?this:(q.pipes.splice(e,1),q.pipesCount-=1,q.pipesCount===1&&(q.pipes=q.pipes[0]),te.emit("unpipe",this,Ee),this)},t.prototype.on=function(te,q){var Ee=Y.prototype.on.call(this,te,q);if(te==="data")this._readableState.flowing!==!1&&this.resume();else if(te==="readable"){var Se=this._readableState;Se.endEmitted||Se.readableListening||(Se.readableListening=Se.needReadable=!0,Se.emittedReadable=!1,Se.reading?Se.length&&S(this):J.nextTick(F,this))}return Ee},t.prototype.addListener=t.prototype.on,t.prototype.resume=function(){var te=this._readableState;return te.flowing||(pe("resume"),te.flowing=!0,M(this,te)),this},t.prototype.pause=function(){return pe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(pe("pause"),this._readableState.flowing=!1,this.emit("pause")),this},t.prototype.wrap=function(te){var q=this,Ee=this._readableState,Se=!1;te.on("end",function(){if(pe("wrapped end"),Ee.decoder&&!Ee.ended){var e=Ee.decoder.end();e&&e.length&&q.push(e)}q.push(null)}),te.on("data",function(e){(pe("wrapped data"),Ee.decoder&&(e=Ee.decoder.write(e)),(!Ee.objectMode||e!=null)&&(Ee.objectMode||e&&e.length))&&(q.push(e)||(Se=!0,te.pause()))});for(var Ie in te)this[Ie]===void 0&&typeof te[Ie]=="function"&&(this[Ie]=function(e){return function(){return te[e].apply(te,arguments)}}(Ie));for(var P=0;P<Z.length;P++)te.on(Z[P],this.emit.bind(this,Z[P]));return this._read=function(e){pe("wrapped _read",e),Se&&(Se=!1,te.resume())},this},Object.defineProperty(t.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),t._fromList=B}).call(this,r("_process"),typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?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(r,I,f){"use strict";function h(t,a){var c=this._transformState;c.transforming=!1;var g=c.writecb;if(!g)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,a!=null&&this.push(a),g(t);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function m(t){if(!(this instanceof m))return new m(t);p.call(this,t),this._transformState={afterTransform:h.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",u)}function u(){var t=this;typeof this._flush=="function"?this._flush(function(a,c){o(t,a,c)}):o(this,null,null)}function o(t,a,c){if(a)return t.emit("error",a);if(c!=null&&t.push(c),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}I.exports=m;var p=r("./_stream_duplex"),s=r("core-util-is");s.inherits=r("inherits"),s.inherits(m,p),m.prototype.push=function(t,a){return this._transformState.needTransform=!1,p.prototype.push.call(this,t,a)},m.prototype._transform=function(t,a,c){throw new Error("_transform() is not implemented")},m.prototype._write=function(t,a,c){var g=this._transformState;if(g.writecb=c,g.writechunk=t,g.writeencoding=a,!g.transforming){var y=this._readableState;(g.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},m.prototype._read=function(t){var a=this._transformState;a.writechunk!==null&&a.writecb&&!a.transforming?(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform)):a.needTransform=!0},m.prototype._destroy=function(t,a){var c=this;p.prototype._destroy.call(this,t,function(g){a(g),c.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(r,I,f){(function(h,m){"use strict";function u(ie){return ie&&ie.__esModule?ie:{default:ie}}function o(ie){var Z=this;this.next=null,this.entry=null,this.finish=function(){W(Z,ie)}}function p(ie){return Ae.from(ie)}function s(ie){return Ae.isBuffer(ie)||ie instanceof pe}function t(){}function a(ie,Z){H=H||r("./_stream_duplex"),ie=ie||{};var be=Z instanceof H;this.objectMode=!!ie.objectMode,be&&(this.objectMode=this.objectMode||!!ie.writableObjectMode);var te=ie.highWaterMark,q=ie.writableHighWaterMark,Ee=this.objectMode?16:16384;this.highWaterMark=te||te===0?te:be&&(q||q===0)?q:Ee,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 Se=ie.decodeStrings===!1;this.decodeStrings=!Se,this.defaultEncoding=ie.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ie){O(Z,Ie)},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 o(this)}function c(ie){if(H=H||r("./_stream_duplex"),!(se.call(c,this)||this instanceof H))return new c(ie);this._writableState=new a(ie,this),this.writable=!0,ie&&(typeof ie.write=="function"&&(this._write=ie.write),typeof ie.writev=="function"&&(this._writev=ie.writev),typeof ie.destroy=="function"&&(this._destroy=ie.destroy),typeof ie.final=="function"&&(this._final=ie.final)),he.call(this)}function g(ie,Z){var be=new Error("write after end");ie.emit("error",be),z.nextTick(Z,be)}function y(ie,Z,be,te){var q=!0,Ee=!1;return be===null?Ee=new TypeError("May not write null values to stream"):typeof be=="string"||be===void 0||Z.objectMode||(Ee=new TypeError("Invalid non-string/buffer chunk")),Ee&&(ie.emit("error",Ee),z.nextTick(te,Ee),q=!1),q}function d(ie,Z,be){return ie.objectMode||ie.decodeStrings===!1||typeof Z!="string"||(Z=Ae.from(Z,be)),Z}function C(ie,Z,be,te,q,Ee){if(!be){var Se=d(Z,te,q);te!==Se&&(be=!0,q="buffer",te=Se)}var Ie=Z.objectMode?1:te.length;Z.length+=Ie;var P=Z.length<Z.highWaterMark;if(P||(Z.needDrain=!0),Z.writing||Z.corked){var e=Z.lastBufferedRequest;Z.lastBufferedRequest={chunk:te,encoding:q,isBuf:be,callback:Ee,next:null},e?e.next=Z.lastBufferedRequest:Z.bufferedRequest=Z.lastBufferedRequest,Z.bufferedRequestCount+=1}else k(ie,Z,!1,Ie,te,q,Ee);return P}function k(ie,Z,be,te,q,Ee,Se){Z.writelen=te,Z.writecb=Se,Z.writing=!0,Z.sync=!0,be?ie._writev(q,Z.onwrite):ie._write(q,Ee,Z.onwrite),Z.sync=!1}function S(ie,Z,be,te,q){--Z.pendingcb,be?(z.nextTick(q,te),z.nextTick(B,ie,Z),ie._writableState.errorEmitted=!0,ie.emit("error",te)):(q(te),ie._writableState.errorEmitted=!0,ie.emit("error",te),B(ie,Z))}function E(ie){ie.writing=!1,ie.writecb=null,ie.length-=ie.writelen,ie.writelen=0}function O(ie,Z){var be=ie._writableState,te=be.sync,q=be.writecb;if(E(be),Z)S(ie,be,te,Z,q);else{var Ee=M(be);Ee||be.corked||be.bufferProcessing||!be.bufferedRequest||F(ie,be),te?Y(w,ie,be,Ee,q):w(ie,be,Ee,q)}}function w(ie,Z,be,te){be||_(ie,Z),Z.pendingcb--,te(),B(ie,Z)}function _(ie,Z){Z.length===0&&Z.needDrain&&(Z.needDrain=!1,ie.emit("drain"))}function F(ie,Z){Z.bufferProcessing=!0;var be=Z.bufferedRequest;if(ie._writev&&be&&be.next){var te=Z.bufferedRequestCount,q=new Array(te),Ee=Z.corkedRequestsFree;Ee.entry=be;for(var Se=0,Ie=!0;be;)q[Se]=be,be.isBuf||(Ie=!1),be=be.next,Se+=1;q.allBuffers=Ie,k(ie,Z,!0,Z.length,q,"",Ee.finish),Z.pendingcb++,Z.lastBufferedRequest=null,Ee.next?(Z.corkedRequestsFree=Ee.next,Ee.next=null):Z.corkedRequestsFree=new o(Z),Z.bufferedRequestCount=0}else{for(;be;){var P=be.chunk,e=be.encoding,i=be.callback;if(k(ie,Z,!1,Z.objectMode?1:P.length,P,e,i),be=be.next,Z.bufferedRequestCount--,Z.writing)break}be===null&&(Z.lastBufferedRequest=null)}Z.bufferedRequest=be,Z.bufferProcessing=!1}function M(ie){return ie.ending&&ie.length===0&&ie.bufferedRequest===null&&!ie.finished&&!ie.writing}function b(ie,Z){ie._final(function(be){Z.pendingcb--,be&&ie.emit("error",be),Z.prefinished=!0,ie.emit("prefinish"),B(ie,Z)})}function X(ie,Z){Z.prefinished||Z.finalCalled||(typeof ie._final=="function"?(Z.pendingcb++,Z.finalCalled=!0,z.nextTick(b,ie,Z)):(Z.prefinished=!0,ie.emit("prefinish")))}function B(ie,Z){var be=M(Z);return be&&(X(ie,Z),Z.pendingcb===0&&(Z.finished=!0,ie.emit("finish"))),be}function U(ie,Z,be){Z.ending=!0,B(ie,Z),be&&(Z.finished?z.nextTick(be):ie.once("finish",be)),Z.ended=!0,ie.writable=!1}function W(ie,Z,be){var te=ie.entry;for(ie.entry=null;te;){var q=te.callback;Z.pendingcb--,q(be),te=te.next}Z.corkedRequestsFree?Z.corkedRequestsFree.next=ie:Z.corkedRequestsFree=ie}var ne=r("babel-runtime/core-js/object/define-property"),re=u(ne),ae=r("babel-runtime/core-js/symbol/has-instance"),ue=u(ae),V=r("babel-runtime/core-js/symbol"),ye=u(V),J=r("babel-runtime/core-js/set-immediate"),$=u(J),z=r("process-nextick-args");I.exports=c;var H,Y=!h.browser&&["v0.10","v0.9."].indexOf(h.version.slice(0,5))>-1?$.default:z.nextTick;c.WritableState=a;var ee=r("core-util-is");ee.inherits=r("inherits");var we={deprecate:r("util-deprecate")},he=r("./internal/streams/stream"),Ae=r("safe-buffer").Buffer,pe=m.Uint8Array||function(){},ge=r("./internal/streams/destroy");ee.inherits(c,he),a.prototype.getBuffer=function(){for(var ie=this.bufferedRequest,Z=[];ie;)Z.push(ie),ie=ie.next;return Z},function(){try{Object.defineProperty(a.prototype,"buffer",{get:we.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ie){}}();var se;typeof ye.default=="function"&&ue.default&&typeof Function.prototype[ue.default]=="function"?(se=Function.prototype[ue.default],(0,re.default)(c,ue.default,{value:function(ie){return!!se.call(this,ie)||this===c&&ie&&ie._writableState instanceof a}})):se=function(ie){return ie instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(ie,Z,be){var te=this._writableState,q=!1,Ee=!te.objectMode&&s(ie);return Ee&&!Ae.isBuffer(ie)&&(ie=p(ie)),typeof Z=="function"&&(be=Z,Z=null),Ee?Z="buffer":Z||(Z=te.defaultEncoding),typeof be!="function"&&(be=t),te.ended?g(this,be):(Ee||y(this,te,ie,be))&&(te.pendingcb++,q=C(this,te,Ee,ie,Z,be)),q},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var ie=this._writableState;ie.corked&&(ie.corked--,ie.writing||ie.corked||ie.finished||ie.bufferProcessing||!ie.bufferedRequest||F(this,ie))},c.prototype.setDefaultEncoding=function(ie){if(typeof ie=="string"&&(ie=ie.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ie+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ie);return this._writableState.defaultEncoding=ie,this},Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),c.prototype._write=function(ie,Z,be){be(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(ie,Z,be){var te=this._writableState;typeof ie=="function"?(be=ie,ie=null,Z=null):typeof Z=="function"&&(be=Z,Z=null),ie!=null&&this.write(ie,Z),te.corked&&(te.corked=1,this.uncork()),te.ending||te.finished||U(this,te,be)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(ie){this._writableState&&(this._writableState.destroyed=ie)}}),c.prototype.destroy=ge.destroy,c.prototype._undestroy=ge.undestroy,c.prototype._destroy=function(ie,Z){this.end(),Z(ie)}}).call(this,r("_process"),typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(r,I,f){"use strict";function h(p,s){if(!(p instanceof s))throw new TypeError("Cannot call a class as a function")}function m(p,s,t){p.copy(s,t)}var u=r("safe-buffer").Buffer,o=r("util");I.exports=function(){function p(){h(this,p),this.head=null,this.tail=null,this.length=0}return p.prototype.push=function(s){var t={data:s,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},p.prototype.unshift=function(s){var t={data:s,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},p.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},p.prototype.clear=function(){this.head=this.tail=null,this.length=0},p.prototype.join=function(s){if(this.length===0)return"";for(var t=this.head,a=""+t.data;t=t.next;)a+=s+t.data;return a},p.prototype.concat=function(s){if(this.length===0)return u.alloc(0);if(this.length===1)return this.head.data;for(var t=u.allocUnsafe(s>>>0),a=this.head,c=0;a;)m(a.data,t,c),c+=a.data.length,a=a.next;return t},p}(),o&&o.inspect&&o.inspect.custom&&(I.exports.prototype[o.inspect.custom]=function(){var p=o.inspect({length:this.length});return this.constructor.name+" "+p})},{"safe-buffer":193,util:36}],185:[function(r,I,f){"use strict";function h(p,s){var t=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(s?s(p):!p||this._writableState&&this._writableState.errorEmitted||o.nextTick(u,this,p),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(p||null,function(g){!s&&g?(o.nextTick(u,t,g),t._writableState&&(t._writableState.errorEmitted=!0)):s&&s(g)}),this)}function m(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function u(p,s){p.emit("error",s)}var o=r("process-nextick-args");I.exports={destroy:h,undestroy:m}},{"process-nextick-args":172}],186:[function(r,I,f){"use strict";I.exports=r("events").EventEmitter},{events:158}],187:[function(r,I,f){I.exports=r("./readable").PassThrough},{"./readable":188}],188:[function(r,I,f){f=I.exports=r("./lib/_stream_readable.js"),f.Stream=f,f.Readable=f,f.Writable=r("./lib/_stream_writable.js"),f.Duplex=r("./lib/_stream_duplex.js"),f.Transform=r("./lib/_stream_transform.js"),f.PassThrough=r("./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(r,I,f){I.exports=r("./readable").Transform},{"./readable":188}],190:[function(r,I,f){I.exports=r("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(r,I,f){var h=function(){return this}()||Function("return this")(),m=h.regeneratorRuntime&&Object.getOwnPropertyNames(h).indexOf("regeneratorRuntime")>=0,u=m&&h.regeneratorRuntime;if(h.regeneratorRuntime=void 0,I.exports=r("./runtime"),m)h.regeneratorRuntime=u;else try{delete h.regeneratorRuntime}catch(o){h.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(r,I,f){!function(h){"use strict";function m($,z,H,Y){var ee=z&&z.prototype instanceof o?z:o,we=Object.create(ee.prototype),he=new C(Y||[]);return we._invoke=c($,H,he),we}function u($,z,H){try{return{type:"normal",arg:$.call(z,H)}}catch(Y){return{type:"throw",arg:Y}}}function o(){}function p(){}function s(){}function t($){["next","throw","return"].forEach(function(z){$[z]=function(H){return this._invoke(z,H)}})}function a($){function z(ee,we,he,Ae){var pe=u($[ee],$,we);if(pe.type!=="throw"){var ge=pe.arg,se=ge.value;return se&&typeof se=="object"&&w.call(se,"__await")?Promise.resolve(se.__await).then(function(ie){z("next",ie,he,Ae)},function(ie){z("throw",ie,he,Ae)}):Promise.resolve(se).then(function(ie){ge.value=ie,he(ge)},Ae)}Ae(pe.arg)}function H(ee,we){function he(){return new Promise(function(Ae,pe){z(ee,we,Ae,pe)})}return Y=Y?Y.then(he,he):he()}var Y;this._invoke=H}function c($,z,H){var Y=U;return function(ee,we){if(Y===ne)throw new Error("Generator is already running");if(Y===re){if(ee==="throw")throw we;return S()}for(H.method=ee,H.arg=we;;){var he=H.delegate;if(he){var Ae=g(he,H);if(Ae){if(Ae===ae)continue;return Ae}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(Y===U)throw Y=re,H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);Y=ne;var pe=u($,z,H);if(pe.type==="normal"){if(Y=H.done?re:W,pe.arg===ae)continue;return{value:pe.arg,done:H.done}}pe.type==="throw"&&(Y=re,H.method="throw",H.arg=pe.arg)}}}function g($,z){var H=$.iterator[z.method];if(H===E){if(z.delegate=null,z.method==="throw"){if($.iterator.return&&(z.method="return",z.arg=E,g($,z),z.method==="throw"))return ae;z.method="throw",z.arg=new TypeError("The iterator does not provide a 'throw' method")}return ae}var Y=u(H,$.iterator,z.arg);if(Y.type==="throw")return z.method="throw",z.arg=Y.arg,z.delegate=null,ae;var ee=Y.arg;return ee?ee.done?(z[$.resultName]=ee.value,z.next=$.nextLoc,z.method!=="return"&&(z.method="next",z.arg=E),z.delegate=null,ae):ee:(z.method="throw",z.arg=new TypeError("iterator result is not an object"),z.delegate=null,ae)}function y($){var z={tryLoc:$[0]};1 in $&&(z.catchLoc=$[1]),2 in $&&(z.finallyLoc=$[2],z.afterLoc=$[3]),this.tryEntries.push(z)}function d($){var z=$.completion||{};z.type="normal",delete z.arg,$.completion=z}function C($){this.tryEntries=[{tryLoc:"root"}],$.forEach(y,this),this.reset(!0)}function k($){if($){var z=$[F];if(z)return z.call($);if(typeof $.next=="function")return $;if(!isNaN($.length)){var H=-1,Y=function ee(){for(;++H<$.length;)if(w.call($,H))return ee.value=$[H],ee.done=!1,ee;return ee.value=E,ee.done=!0,ee};return Y.next=Y}}return{next:S}}function S(){return{value:E,done:!0}}var E,O=Object.prototype,w=O.hasOwnProperty,_=typeof Symbol=="function"?Symbol:{},F=_.iterator||"@@iterator",M=_.asyncIterator||"@@asyncIterator",b=_.toStringTag||"@@toStringTag",X=typeof I=="object",B=h.regeneratorRuntime;if(B)return void(X&&(I.exports=B));B=h.regeneratorRuntime=X?I.exports:{},B.wrap=m;var U="suspendedStart",W="suspendedYield",ne="executing",re="completed",ae={},ue={};ue[F]=function(){return this};var V=Object.getPrototypeOf,ye=V&&V(V(k([])));ye&&ye!==O&&w.call(ye,F)&&(ue=ye);var J=s.prototype=o.prototype=Object.create(ue);p.prototype=J.constructor=s,s.constructor=p,s[b]=p.displayName="GeneratorFunction",B.isGeneratorFunction=function($){var z=typeof $=="function"&&$.constructor;return!!z&&(z===p||(z.displayName||z.name)==="GeneratorFunction")},B.mark=function($){return Object.setPrototypeOf?Object.setPrototypeOf($,s):($.__proto__=s,b in $||($[b]="GeneratorFunction")),$.prototype=Object.create(J),$},B.awrap=function($){return{__await:$}},t(a.prototype),a.prototype[M]=function(){return this},B.AsyncIterator=a,B.async=function($,z,H,Y){var ee=new a(m($,z,H,Y));return B.isGeneratorFunction(z)?ee:ee.next().then(function(we){return we.done?we.value:ee.next()})},t(J),J[b]="Generator",J[F]=function(){return this},J.toString=function(){return"[object Generator]"},B.keys=function($){var z=[];for(var H in $)z.push(H);return z.reverse(),function Y(){for(;z.length;){var ee=z.pop();if(ee in $)return Y.value=ee,Y.done=!1,Y}return Y.done=!0,Y}},B.values=k,C.prototype={constructor:C,reset:function($){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(d),!$)for(var z in this)z.charAt(0)==="t"&&w.call(this,z)&&!isNaN(+z.slice(1))&&(this[z]=E)},stop:function(){this.done=!0;var $=this.tryEntries[0],z=$.completion;if(z.type==="throw")throw z.arg;return this.rval},dispatchException:function($){function z(pe,ge){return we.type="throw",we.arg=$,H.next=pe,ge&&(H.method="next",H.arg=E),!!ge}if(this.done)throw $;for(var H=this,Y=this.tryEntries.length-1;Y>=0;--Y){var ee=this.tryEntries[Y],we=ee.completion;if(ee.tryLoc==="root")return z("end");if(ee.tryLoc<=this.prev){var he=w.call(ee,"catchLoc"),Ae=w.call(ee,"finallyLoc");if(he&&Ae){if(this.prev<ee.catchLoc)return z(ee.catchLoc,!0);if(this.prev<ee.finallyLoc)return z(ee.finallyLoc)}else if(he){if(this.prev<ee.catchLoc)return z(ee.catchLoc,!0)}else{if(!Ae)throw new Error("try statement without catch or finally");if(this.prev<ee.finallyLoc)return z(ee.finallyLoc)}}}},abrupt:function($,z){for(var H=this.tryEntries.length-1;H>=0;--H){var Y=this.tryEntries[H];if(Y.tryLoc<=this.prev&&w.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var ee=Y;break}}ee&&($==="break"||$==="continue")&&ee.tryLoc<=z&&z<=ee.finallyLoc&&(ee=null);var we=ee?ee.completion:{};return we.type=$,we.arg=z,ee?(this.method="next",this.next=ee.finallyLoc,ae):this.complete(we)},complete:function($,z){if($.type==="throw")throw $.arg;return $.type==="break"||$.type==="continue"?this.next=$.arg:$.type==="return"?(this.rval=this.arg=$.arg,this.method="return",this.next="end"):$.type==="normal"&&z&&(this.next=z),ae},finish:function($){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H.finallyLoc===$)return this.complete(H.completion,H.afterLoc),d(H),ae}},catch:function($){for(var z=this.tryEntries.length-1;z>=0;--z){var H=this.tryEntries[z];if(H.tryLoc===$){var Y=H.completion;if(Y.type==="throw"){var ee=Y.arg;d(H)}return ee}}throw new Error("illegal catch attempt")},delegateYield:function($,z,H){return this.delegate={iterator:k($),resultName:z,nextLoc:H},this.method==="next"&&(this.arg=E),ae}}}(function(){return this}()||Function("return this")())},{}],193:[function(r,I,f){function h(p,s){for(var t in p)s[t]=p[t]}function m(p,s,t){return o(p,s,t)}var u=r("buffer"),o=u.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?I.exports=u:(h(u,f),f.Buffer=m),h(o,m),m.from=function(p,s,t){if(typeof p=="number")throw new TypeError("Argument must not be a number");return o(p,s,t)},m.alloc=function(p,s,t){if(typeof p!="number")throw new TypeError("Argument must be a number");var a=o(p);return s!==void 0?typeof t=="string"?a.fill(s,t):a.fill(s):a.fill(0),a},m.allocUnsafe=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return o(p)},m.allocUnsafeSlow=function(p){if(typeof p!="number")throw new TypeError("Argument must be a number");return u.SlowBuffer(p)}},{buffer:38}],194:[function(r,I,f){(function(h){"use strict";function m(S){return S&&S.__esModule?S:{default:S}}var u=r("babel-runtime/core-js/string/from-code-point"),o=m(u),p=r("babel-runtime/core-js/json/stringify"),s=m(p),t=r("babel-runtime/helpers/typeof"),a=m(t),c=r("babel-runtime/core-js/object/define-property"),g=m(c),y=r("babel-runtime/core-js/object/keys"),d=m(y),C=r("babel-runtime/core-js/object/create"),k=m(C);!function(S){function E(x,A){if(!(this instanceof E))return new E(x,A);var oe=this;w(oe),oe.q=oe.c="",oe.bufferCheckPosition=S.MAX_BUFFER_LENGTH,oe.opt=A||{},oe.opt.lowercase=oe.opt.lowercase||oe.opt.lowercasetags,oe.looseCase=oe.opt.lowercase?"toLowerCase":"toUpperCase",oe.tags=[],oe.closed=oe.closedRoot=oe.sawRoot=!1,oe.tag=oe.error=null,oe.strict=!!x,oe.noscript=!(!x&&!oe.opt.noscript),oe.state=i.BEGIN,oe.strictEntities=oe.opt.strictEntities,oe.ENTITIES=oe.strictEntities?(0,k.default)(S.XML_ENTITIES):(0,k.default)(S.ENTITIES),oe.attribList=[],oe.opt.xmlns&&(oe.ns=(0,k.default)(Ee)),oe.trackPosition=oe.opt.position!==!1,oe.trackPosition&&(oe.position=oe.line=oe.column=0),ne(oe,"onready")}function O(x){for(var A=Math.max(S.MAX_BUFFER_LENGTH,10),oe=0,_e=0,He=ge.length;_e<He;_e++){var Ne=x[ge[_e]].length;if(Ne>A)switch(ge[_e]){case"textNode":ae(x);break;case"cdata":re(x,"oncdata",x.cdata),x.cdata="";break;case"script":re(x,"onscript",x.script),x.script="";break;default:V(x,"Max buffer length exceeded: "+ge[_e])}oe=Math.max(oe,Ne)}var Be=S.MAX_BUFFER_LENGTH-oe;x.bufferCheckPosition=Be+x.position}function w(x){for(var A=0,oe=ge.length;A<oe;A++)x[ge[A]]=""}function _(x){ae(x),x.cdata!==""&&(re(x,"oncdata",x.cdata),x.cdata=""),x.script!==""&&(re(x,"onscript",x.script),x.script="")}function F(x,A){return new M(x,A)}function M(x,A){if(!(this instanceof M))return new M(x,A);se.apply(this),this._parser=new E(x,A),this.writable=!0,this.readable=!0;var oe=this;this._parser.onend=function(){oe.emit("end")},this._parser.onerror=function(_e){oe.emit("error",_e),oe._parser.error=null},this._decoder=null,ie.forEach(function(_e){(0,g.default)(oe,"on"+_e,{get:function(){return oe._parser["on"+_e]},set:function(He){if(!He)return oe.removeAllListeners(_e),oe._parser["on"+_e]=He,He;oe.on(_e,He)},enumerable:!0,configurable:!1})})}function b(x){return x===" "||x===`
`||x==="\r"||x===" "}function X(x){return x==='"'||x==="'"}function B(x){return x===">"||b(x)}function U(x,A){return x.test(A)}function W(x,A){return!U(x,A)}function ne(x,A,oe){x[A]&&x[A](oe)}function re(x,A,oe){x.textNode&&ae(x),ne(x,A,oe)}function ae(x){x.textNode=ue(x.opt,x.textNode),x.textNode&&ne(x,"ontext",x.textNode),x.textNode=""}function ue(x,A){return x.trim&&(A=A.trim()),x.normalize&&(A=A.replace(/\s+/g," ")),A}function V(x,A){return ae(x),x.trackPosition&&(A+=`
Line: `+x.line+`
Column: `+x.column+`
Char: `+x.c),A=new Error(A),x.error=A,ne(x,"onerror",A),x}function ye(x){return x.sawRoot&&!x.closedRoot&&J(x,"Unclosed root tag"),x.state!==i.BEGIN&&x.state!==i.BEGIN_WHITESPACE&&x.state!==i.TEXT&&V(x,"Unexpected end"),ae(x),x.c="",x.closed=!0,ne(x,"onend"),E.call(x,x.strict,x.opt),x}function J(x,A){if((x===void 0?"undefined":(0,a.default)(x))!=="object"||!(x instanceof E))throw new Error("bad call to strictFail");x.strict&&V(x,A)}function $(x){x.strict||(x.tagName=x.tagName[x.looseCase]());var A=x.tags[x.tags.length-1]||x,oe=x.tag={name:x.tagName,attributes:{}};x.opt.xmlns&&(oe.ns=A.ns),x.attribList.length=0,re(x,"onopentagstart",oe)}function z(x,A){var oe=x.indexOf(":"),_e=oe<0?["",x]:x.split(":"),He=_e[0],Ne=_e[1];return A&&x==="xmlns"&&(He="xmlns",Ne=""),{prefix:He,local:Ne}}function H(x){if(x.strict||(x.attribName=x.attribName[x.looseCase]()),x.attribList.indexOf(x.attribName)!==-1||x.tag.attributes.hasOwnProperty(x.attribName))return void(x.attribName=x.attribValue="");if(x.opt.xmlns){var A=z(x.attribName,!0),oe=A.prefix,_e=A.local;if(oe==="xmlns")if(_e==="xml"&&x.attribValue!==te)J(x,"xml: prefix must be bound to "+te+`
Actual: `+x.attribValue);else if(_e==="xmlns"&&x.attribValue!==q)J(x,"xmlns: prefix must be bound to "+q+`
Actual: `+x.attribValue);else{var He=x.tag,Ne=x.tags[x.tags.length-1]||x;He.ns===Ne.ns&&(He.ns=(0,k.default)(Ne.ns)),He.ns[_e]=x.attribValue}x.attribList.push([x.attribName,x.attribValue])}else x.tag.attributes[x.attribName]=x.attribValue,re(x,"onattribute",{name:x.attribName,value:x.attribValue});x.attribName=x.attribValue=""}function Y(x,A){if(x.opt.xmlns){var oe=x.tag,_e=z(x.tagName);oe.prefix=_e.prefix,oe.local=_e.local,oe.uri=oe.ns[_e.prefix]||"",oe.prefix&&!oe.uri&&(J(x,"Unbound namespace prefix: "+(0,s.default)(x.tagName)),oe.uri=_e.prefix);var He=x.tags[x.tags.length-1]||x;oe.ns&&He.ns!==oe.ns&&(0,d.default)(oe.ns).forEach(function(ve){re(x,"onopennamespace",{prefix:ve,uri:oe.ns[ve]})});for(var Ne=0,Be=x.attribList.length;Ne<Be;Ne++){var $e=x.attribList[Ne],tt=$e[0],Me=$e[1],Pe=z(tt,!0),ke=Pe.prefix,Re=Pe.local,Oe=ke===""?"":oe.ns[ke]||"",ce={name:tt,value:Me,prefix:ke,local:Re,uri:Oe};ke&&ke!=="xmlns"&&!Oe&&(J(x,"Unbound namespace prefix: "+(0,s.default)(ke)),ce.uri=ke),x.tag.attributes[tt]=ce,re(x,"onattribute",ce)}x.attribList.length=0}x.tag.isSelfClosing=!!A,x.sawRoot=!0,x.tags.push(x.tag),re(x,"onopentag",x.tag),A||(x.noscript||x.tagName.toLowerCase()!=="script"?x.state=i.TEXT:x.state=i.SCRIPT,x.tag=null,x.tagName=""),x.attribName=x.attribValue="",x.attribList.length=0}function ee(x){if(!x.tagName)return J(x,"Weird empty close tag."),x.textNode+="</>",void(x.state=i.TEXT);if(x.script){if(x.tagName!=="script")return x.script+="</"+x.tagName+">",x.tagName="",void(x.state=i.SCRIPT);re(x,"onscript",x.script),x.script=""}var A=x.tags.length,oe=x.tagName;x.strict||(oe=oe[x.looseCase]());for(var _e=oe;A--&&!(x.tags[A].name===_e);)J(x,"Unexpected close tag");if(A<0)return J(x,"Unmatched closing tag: "+x.tagName),x.textNode+="</"+x.tagName+">",void(x.state=i.TEXT);x.tagName=oe;for(var He=x.tags.length;He-- >A;){var Ne=x.tag=x.tags.pop();x.tagName=x.tag.name,re(x,"onclosetag",x.tagName);var Be={};for(var $e in Ne.ns)Be[$e]=Ne.ns[$e];var tt=x.tags[x.tags.length-1]||x;x.opt.xmlns&&Ne.ns!==tt.ns&&(0,d.default)(Ne.ns).forEach(function(Me){var Pe=Ne.ns[Me];re(x,"onclosenamespace",{prefix:Me,uri:Pe})})}A===0&&(x.closedRoot=!0),x.tagName=x.attribValue=x.attribName="",x.attribList.length=0,x.state=i.TEXT}function we(x){var A,oe=x.entity,_e=oe.toLowerCase(),He="";return x.ENTITIES[oe]?x.ENTITIES[oe]:x.ENTITIES[_e]?x.ENTITIES[_e]:(oe=_e,oe.charAt(0)==="#"&&(oe.charAt(1)==="x"?(oe=oe.slice(2),A=parseInt(oe,16),He=A.toString(16)):(oe=oe.slice(1),A=parseInt(oe,10),He=A.toString(10))),oe=oe.replace(/^0+/,""),isNaN(A)||He.toLowerCase()!==oe?(J(x,"Invalid character entity"),"&"+x.entity+";"):(0,o.default)(A))}function he(x,A){A==="<"?(x.state=i.OPEN_WAKA,x.startTagPosition=x.position):b(A)||(J(x,"Non-whitespace before first tag."),x.textNode=A,x.state=i.TEXT)}function Ae(x,A){var oe="";return A<x.length&&(oe=x.charAt(A)),oe}function pe(x){var A=this;if(this.error)throw this.error;if(A.closed)return V(A,"Cannot write after close. Assign an onready handler.");if(x===null)return ye(A);(x===void 0?"undefined":(0,a.default)(x))==="object"&&(x=x.toString());for(var oe=0,_e="";!(_e=Ae(x,oe++),A.c=_e,!_e);)switch(A.trackPosition&&(A.position++,_e===`
`?(A.line++,A.column=0):A.column++),A.state){case i.BEGIN:if(A.state=i.BEGIN_WHITESPACE,_e==="\uFEFF")continue;he(A,_e);continue;case i.BEGIN_WHITESPACE:he(A,_e);continue;case i.TEXT:if(A.sawRoot&&!A.closedRoot){for(var He=oe-1;_e&&_e!=="<"&&_e!=="&";)(_e=Ae(x,oe++))&&A.trackPosition&&(A.position++,_e===`
`?(A.line++,A.column=0):A.column++);A.textNode+=x.substring(He,oe-1)}_e!=="<"||A.sawRoot&&A.closedRoot&&!A.strict?(b(_e)||A.sawRoot&&!A.closedRoot||J(A,"Text data outside of root node."),_e==="&"?A.state=i.TEXT_ENTITY:A.textNode+=_e):(A.state=i.OPEN_WAKA,A.startTagPosition=A.position);continue;case i.SCRIPT:_e==="<"?A.state=i.SCRIPT_ENDING:A.script+=_e;continue;case i.SCRIPT_ENDING:_e==="/"?A.state=i.CLOSE_TAG:(A.script+="<"+_e,A.state=i.SCRIPT);continue;case i.OPEN_WAKA:if(_e==="!")A.state=i.SGML_DECL,A.sgmlDecl="";else if(!b(_e))if(U(Se,_e))A.state=i.OPEN_TAG,A.tagName=_e;else if(_e==="/")A.state=i.CLOSE_TAG,A.tagName="";else if(_e==="?")A.state=i.PROC_INST,A.procInstName=A.procInstBody="";else{if(J(A,"Unencoded <"),A.startTagPosition+1<A.position){var Ne=A.position-A.startTagPosition;_e=new Array(Ne).join(" ")+_e}A.textNode+="<"+_e,A.state=i.TEXT}continue;case i.SGML_DECL:(A.sgmlDecl+_e).toUpperCase()===Z?(re(A,"onopencdata"),A.state=i.CDATA,A.sgmlDecl="",A.cdata=""):A.sgmlDecl+_e==="--"?(A.state=i.COMMENT,A.comment="",A.sgmlDecl=""):(A.sgmlDecl+_e).toUpperCase()===be?(A.state=i.DOCTYPE,(A.doctype||A.sawRoot)&&J(A,"Inappropriately located doctype declaration"),A.doctype="",A.sgmlDecl=""):_e===">"?(re(A,"onsgmldeclaration",A.sgmlDecl),A.sgmlDecl="",A.state=i.TEXT):(X(_e)&&(A.state=i.SGML_DECL_QUOTED),A.sgmlDecl+=_e);continue;case i.SGML_DECL_QUOTED:_e===A.q&&(A.state=i.SGML_DECL,A.q=""),A.sgmlDecl+=_e;continue;case i.DOCTYPE:_e===">"?(A.state=i.TEXT,re(A,"ondoctype",A.doctype),A.doctype=!0):(A.doctype+=_e,_e==="["?A.state=i.DOCTYPE_DTD:X(_e)&&(A.state=i.DOCTYPE_QUOTED,A.q=_e));continue;case i.DOCTYPE_QUOTED:A.doctype+=_e,_e===A.q&&(A.q="",A.state=i.DOCTYPE);continue;case i.DOCTYPE_DTD:A.doctype+=_e,_e==="]"?A.state=i.DOCTYPE:X(_e)&&(A.state=i.DOCTYPE_DTD_QUOTED,A.q=_e);continue;case i.DOCTYPE_DTD_QUOTED:A.doctype+=_e,_e===A.q&&(A.state=i.DOCTYPE_DTD,A.q="");continue;case i.COMMENT:_e==="-"?A.state=i.COMMENT_ENDING:A.comment+=_e;continue;case i.COMMENT_ENDING:_e==="-"?(A.state=i.COMMENT_ENDED,A.comment=ue(A.opt,A.comment),A.comment&&re(A,"oncomment",A.comment),A.comment=""):(A.comment+="-"+_e,A.state=i.COMMENT);continue;case i.COMMENT_ENDED:_e!==">"?(J(A,"Malformed comment"),A.comment+="--"+_e,A.state=i.COMMENT):A.state=i.TEXT;continue;case i.CDATA:_e==="]"?A.state=i.CDATA_ENDING:A.cdata+=_e;continue;case i.CDATA_ENDING:_e==="]"?A.state=i.CDATA_ENDING_2:(A.cdata+="]"+_e,A.state=i.CDATA);continue;case i.CDATA_ENDING_2:_e===">"?(A.cdata&&re(A,"oncdata",A.cdata),re(A,"onclosecdata"),A.cdata="",A.state=i.TEXT):_e==="]"?A.cdata+="]":(A.cdata+="]]"+_e,A.state=i.CDATA);continue;case i.PROC_INST:_e==="?"?A.state=i.PROC_INST_ENDING:b(_e)?A.state=i.PROC_INST_BODY:A.procInstName+=_e;continue;case i.PROC_INST_BODY:if(!A.procInstBody&&b(_e))continue;_e==="?"?A.state=i.PROC_INST_ENDING:A.procInstBody+=_e;continue;case i.PROC_INST_ENDING:_e===">"?(re(A,"onprocessinginstruction",{name:A.procInstName,body:A.procInstBody}),A.procInstName=A.procInstBody="",A.state=i.TEXT):(A.procInstBody+="?"+_e,A.state=i.PROC_INST_BODY);continue;case i.OPEN_TAG:U(Ie,_e)?A.tagName+=_e:($(A),_e===">"?Y(A):_e==="/"?A.state=i.OPEN_TAG_SLASH:(b(_e)||J(A,"Invalid character in tag name"),A.state=i.ATTRIB));continue;case i.OPEN_TAG_SLASH:_e===">"?(Y(A,!0),ee(A)):(J(A,"Forward-slash in opening tag not followed by >"),A.state=i.ATTRIB);continue;case i.ATTRIB:if(b(_e))continue;_e===">"?Y(A):_e==="/"?A.state=i.OPEN_TAG_SLASH:U(Se,_e)?(A.attribName=_e,A.attribValue="",A.state=i.ATTRIB_NAME):J(A,"Invalid attribute name");continue;case i.ATTRIB_NAME:_e==="="?A.state=i.ATTRIB_VALUE:_e===">"?(J(A,"Attribute without value"),A.attribValue=A.attribName,H(A),Y(A)):b(_e)?A.state=i.ATTRIB_NAME_SAW_WHITE:U(Ie,_e)?A.attribName+=_e:J(A,"Invalid attribute name");continue;case i.ATTRIB_NAME_SAW_WHITE:if(_e==="=")A.state=i.ATTRIB_VALUE;else{if(b(_e))continue;J(A,"Attribute without value"),A.tag.attributes[A.attribName]="",A.attribValue="",re(A,"onattribute",{name:A.attribName,value:""}),A.attribName="",_e===">"?Y(A):U(Se,_e)?(A.attribName=_e,A.state=i.ATTRIB_NAME):(J(A,"Invalid attribute name"),A.state=i.ATTRIB)}continue;case i.ATTRIB_VALUE:if(b(_e))continue;X(_e)?(A.q=_e,A.state=i.ATTRIB_VALUE_QUOTED):(J(A,"Unquoted attribute value"),A.state=i.ATTRIB_VALUE_UNQUOTED,A.attribValue=_e);continue;case i.ATTRIB_VALUE_QUOTED:if(_e!==A.q){_e==="&"?A.state=i.ATTRIB_VALUE_ENTITY_Q:A.attribValue+=_e;continue}H(A),A.q="",A.state=i.ATTRIB_VALUE_CLOSED;continue;case i.ATTRIB_VALUE_CLOSED:b(_e)?A.state=i.ATTRIB:_e===">"?Y(A):_e==="/"?A.state=i.OPEN_TAG_SLASH:U(Se,_e)?(J(A,"No whitespace between attributes"),A.attribName=_e,A.attribValue="",A.state=i.ATTRIB_NAME):J(A,"Invalid attribute name");continue;case i.ATTRIB_VALUE_UNQUOTED:if(!B(_e)){_e==="&"?A.state=i.ATTRIB_VALUE_ENTITY_U:A.attribValue+=_e;continue}H(A),_e===">"?Y(A):A.state=i.ATTRIB;continue;case i.CLOSE_TAG:if(A.tagName)_e===">"?ee(A):U(Ie,_e)?A.tagName+=_e:A.script?(A.script+="</"+A.tagName,A.tagName="",A.state=i.SCRIPT):(b(_e)||J(A,"Invalid tagname in closing tag"),A.state=i.CLOSE_TAG_SAW_WHITE);else{if(b(_e))continue;W(Se,_e)?A.script?(A.script+="</"+_e,A.state=i.SCRIPT):J(A,"Invalid tagname in closing tag."):A.tagName=_e}continue;case i.CLOSE_TAG_SAW_WHITE:if(b(_e))continue;_e===">"?ee(A):J(A,"Invalid characters in closing tag");continue;case i.TEXT_ENTITY:case i.ATTRIB_VALUE_ENTITY_Q:case i.ATTRIB_VALUE_ENTITY_U:var Be,$e;switch(A.state){case i.TEXT_ENTITY:Be=i.TEXT,$e="textNode";break;case i.ATTRIB_VALUE_ENTITY_Q:Be=i.ATTRIB_VALUE_QUOTED,$e="attribValue";break;case i.ATTRIB_VALUE_ENTITY_U:Be=i.ATTRIB_VALUE_UNQUOTED,$e="attribValue"}_e===";"?(A[$e]+=we(A),A.entity="",A.state=Be):U(A.entity.length?e:P,_e)?A.entity+=_e:(J(A,"Invalid character in entity name"),A[$e]+="&"+A.entity+_e,A.entity="",A.state=Be);continue;default:throw new Error(A,"Unknown state: "+A.state)}return A.position>=A.bufferCheckPosition&&O(A),A}S.parser=function(x,A){return new E(x,A)},S.SAXParser=E,S.SAXStream=M,S.createStream=F,S.MAX_BUFFER_LENGTH=65536;var ge=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];S.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],k.default||(Object.create=function(x){function A(){}return A.prototype=x,new A}),d.default||(Object.keys=function(x){var A=[];for(var oe in x)x.hasOwnProperty(oe)&&A.push(oe);return A}),E.prototype={end:function(){ye(this)},write:pe,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){_(this)}};var se;try{se=r("stream").Stream}catch(x){se=function(){}}var ie=S.EVENTS.filter(function(x){return x!=="error"&&x!=="end"});M.prototype=(0,k.default)(se.prototype,{constructor:{value:M}}),M.prototype.write=function(x){if(typeof h=="function"&&typeof h.isBuffer=="function"&&h.isBuffer(x)){if(!this._decoder){var A=r("string_decoder").StringDecoder;this._decoder=new A("utf8")}x=this._decoder.write(x)}return this._parser.write(x.toString()),this.emit("data",x),!0},M.prototype.end=function(x){return x&&x.length&&this.write(x),this._parser.end(),!0},M.prototype.on=function(x,A){var oe=this;return oe._parser["on"+x]||ie.indexOf(x)===-1||(oe._parser["on"+x]=function(){var _e=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);_e.splice(0,0,x),oe.emit.apply(oe,_e)}),se.prototype.on.call(oe,x,A)};var Z="[CDATA[",be="DOCTYPE",te="http://www.w3.org/XML/1998/namespace",q="http://www.w3.org/2000/xmlns/",Ee={xml:te,xmlns:q},Se=/[:_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]/,Ie=/[:_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-]/,P=/[#:_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]/,e=/[#:_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-]/,i=0;S.STATE={BEGIN:i++,BEGIN_WHITESPACE:i++,TEXT:i++,TEXT_ENTITY:i++,OPEN_WAKA:i++,SGML_DECL:i++,SGML_DECL_QUOTED:i++,DOCTYPE:i++,DOCTYPE_QUOTED:i++,DOCTYPE_DTD:i++,DOCTYPE_DTD_QUOTED:i++,COMMENT_STARTING:i++,COMMENT:i++,COMMENT_ENDING:i++,COMMENT_ENDED:i++,CDATA:i++,CDATA_ENDING:i++,CDATA_ENDING_2:i++,PROC_INST:i++,PROC_INST_BODY:i++,PROC_INST_ENDING:i++,OPEN_TAG:i++,OPEN_TAG_SLASH:i++,ATTRIB:i++,ATTRIB_NAME:i++,ATTRIB_NAME_SAW_WHITE:i++,ATTRIB_VALUE:i++,ATTRIB_VALUE_QUOTED:i++,ATTRIB_VALUE_CLOSED:i++,ATTRIB_VALUE_UNQUOTED:i++,ATTRIB_VALUE_ENTITY_Q:i++,ATTRIB_VALUE_ENTITY_U:i++,CLOSE_TAG:i++,CLOSE_TAG_SAW_WHITE:i++,SCRIPT:i++,SCRIPT_ENDING:i++},S.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},S.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,d.default)(S.ENTITIES).forEach(function(x){var A=S.ENTITIES[x],oe=typeof A=="number"?String.fromCharCode(A):A;S.ENTITIES[x]=oe});for(var T in S.STATE)S.STATE[S.STATE[T]]=T;i=S.STATE,o.default||function(){var x=String.fromCharCode,A=Math.floor,oe=function(){var _e,He,Ne=[],Be=-1,$e=arguments.length;if(!$e)return"";for(var tt="";++Be<$e;){var Me=Number(arguments[Be]);if(!isFinite(Me)||Me<0||Me>1114111||A(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?Ne.push(Me):(Me-=65536,_e=55296+(Me>>10),He=Me%1024+56320,Ne.push(_e,He)),(Be+1===$e||Ne.length>16384)&&(tt+=x.apply(null,Ne),Ne.length=0)}return tt};g.default?Object.defineProperty(String,"fromCodePoint",{value:oe,configurable:!0,writable:!0}):String.fromCodePoint=oe}()}(f===void 0?(void 0).sax={}:f)}).call(this,r("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(r,I,f){function h(){m.call(this)}I.exports=h;var m=r("events").EventEmitter;r("inherits")(h,m),h.Readable=r("readable-stream/readable.js"),h.Writable=r("readable-stream/writable.js"),h.Duplex=r("readable-stream/duplex.js"),h.Transform=r("readable-stream/transform.js"),h.PassThrough=r("readable-stream/passthrough.js"),h.Stream=h,h.prototype.pipe=function(u,o){function p(C){u.writable&&u.write(C)===!1&&y.pause&&y.pause()}function s(){y.readable&&y.resume&&y.resume()}function t(){d||(d=!0,u.end())}function a(){d||(d=!0,typeof u.destroy=="function"&&u.destroy())}function c(C){if(g(),m.listenerCount(this,"error")===0)throw C}function g(){y.removeListener("data",p),u.removeListener("drain",s),y.removeListener("end",t),y.removeListener("close",a),y.removeListener("error",c),u.removeListener("error",c),y.removeListener("end",g),y.removeListener("close",g),u.removeListener("close",g)}var y=this;y.on("data",p),u.on("drain",s),u._isStdio||o&&o.end===!1||(y.on("end",t),y.on("close",a));var d=!1;return y.on("error",c),u.on("error",c),y.on("end",g),y.on("close",g),u.on("close",g),u.emit("pipe",y),u}},{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(r,I,f){(function(h){var m=r("./lib/request"),u=r("./lib/response"),o=r("xtend"),p=r("builtin-status-codes"),s=r("url"),t=f;t.request=function(a,c){a=typeof a=="string"?s.parse(a):o(a);var g=h.location.protocol.search(/^https?:$/)===-1?"http:":"",y=a.protocol||g,d=a.hostname||a.host,C=a.port,k=a.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),a.url=(d?y+"//"+d:"")+(C?":"+C:"")+k,a.method=(a.method||"GET").toUpperCase(),a.headers=a.headers||{};var S=new m(a);return c&&S.on("response",c),S},t.get=function(a,c){var g=t.request(a,c);return g.end(),g},t.ClientRequest=m,t.IncomingMessage=u.IncomingMessage,t.Agent=function(){},t.Agent.defaultMaxSockets=4,t.globalAgent=new t.Agent,t.STATUS_CODES=p,t.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(r,I,f){(function(h){"use strict";function m(){if(p!==void 0)return p;if(h.XMLHttpRequest){p=new h.XMLHttpRequest;try{p.open("GET",h.XDomainRequest?"/":"https://example.com")}catch(a){p=null}}else p=null;return p}function u(a){var c=m();if(!c)return!1;try{return c.responseType=a,c.responseType===a}catch(g){}return!1}function o(a){return typeof a=="function"}f.fetch=o(h.fetch)&&o(h.ReadableStream),f.writableStream=o(h.WritableStream),f.abortController=o(h.AbortController),f.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),f.blobConstructor=!0}catch(a){}var p,s=h.ArrayBuffer!==void 0,t=s&&o(h.ArrayBuffer.prototype.slice);f.arraybuffer=f.fetch||s&&u("arraybuffer"),f.msstream=!f.fetch&&t&&u("ms-stream"),f.mozchunkedarraybuffer=!f.fetch&&s&&u("moz-chunked-arraybuffer"),f.overrideMimeType=f.fetch||!!m()&&o(m().overrideMimeType),f.vbArray=o(h.VBArray),p=null}).call(this,typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(r,I,f){(function(h,m,u){"use strict";function o(O,w){return a.fetch&&w?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&O?"arraybuffer":a.vbArray&&O?"text:vbarray":"text"}function p(O){try{var w=O.status;return w!==null&&w!==0}catch(_){return!1}}var s=r("babel-runtime/core-js/object/keys"),t=function(O){return O&&O.__esModule?O:{default:O}}(s),a=r("./capability"),c=r("inherits"),g=r("./response"),y=r("readable-stream"),d=r("to-arraybuffer"),C=g.IncomingMessage,k=g.readyStates,S=I.exports=function(O){var w=this;y.Writable.call(w),w._opts=O,w._body=[],w._headers={},O.auth&&w.setHeader("Authorization","Basic "+new u(O.auth).toString("base64")),(0,t.default)(O.headers).forEach(function(M){w.setHeader(M,O.headers[M])});var _,F=!0;if(O.mode==="disable-fetch"||"requestTimeout"in O&&!a.abortController)F=!1,_=!0;else if(O.mode==="prefer-streaming")_=!1;else if(O.mode==="allow-wrong-content-type")_=!a.overrideMimeType;else{if(O.mode&&O.mode!=="default"&&O.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");_=!0}w._mode=o(_,F),w._fetchTimer=null,w.on("finish",function(){w._onFinish()})};c(S,y.Writable),S.prototype.setHeader=function(O,w){var _=this,F=O.toLowerCase();E.indexOf(F)===-1&&(_._headers[F]={name:O,value:w})},S.prototype.getHeader=function(O){var w=this._headers[O.toLowerCase()];return w?w.value:null},S.prototype.removeHeader=function(O){delete this._headers[O.toLowerCase()]},S.prototype._onFinish=function(){var O=this;if(!O._destroyed){var w=O._opts,_=O._headers,F=null;w.method!=="GET"&&w.method!=="HEAD"&&(F=a.arraybuffer?d(u.concat(O._body)):a.blobConstructor?new m.Blob(O._body.map(function(U){return d(U)}),{type:(_["content-type"]||{}).value||""}):u.concat(O._body).toString());var M=[];if((0,t.default)(_).forEach(function(U){var W=_[U].name,ne=_[U].value;Array.isArray(ne)?ne.forEach(function(re){M.push([W,re])}):M.push([W,ne])}),O._mode==="fetch"){var b=null;if(a.abortController){var X=new AbortController;b=X.signal,O._fetchAbortController=X,"requestTimeout"in w&&w.requestTimeout!==0&&(O._fetchTimer=m.setTimeout(function(){O.emit("requestTimeout"),O._fetchAbortController&&O._fetchAbortController.abort()},w.requestTimeout))}m.fetch(O._opts.url,{method:O._opts.method,headers:M,body:F||void 0,mode:"cors",credentials:w.withCredentials?"include":"same-origin",signal:b}).then(function(U){O._fetchResponse=U,O._connect()},function(U){m.clearTimeout(O._fetchTimer),O._destroyed||O.emit("error",U)})}else{var B=O._xhr=new m.XMLHttpRequest;try{B.open(O._opts.method,O._opts.url,!0)}catch(U){return void h.nextTick(function(){O.emit("error",U)})}"responseType"in B&&(B.responseType=O._mode.split(":")[0]),"withCredentials"in B&&(B.withCredentials=!!w.withCredentials),O._mode==="text"&&"overrideMimeType"in B&&B.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in w&&(B.timeout=w.requestTimeout,B.ontimeout=function(){O.emit("requestTimeout")}),M.forEach(function(U){B.setRequestHeader(U[0],U[1])}),O._response=null,B.onreadystatechange=function(){switch(B.readyState){case k.LOADING:case k.DONE:O._onXHRProgress()}},O._mode==="moz-chunked-arraybuffer"&&(B.onprogress=function(){O._onXHRProgress()}),B.onerror=function(){O._destroyed||O.emit("error",new Error("XHR error"))};try{B.send(F)}catch(U){return void h.nextTick(function(){O.emit("error",U)})}}}},S.prototype._onXHRProgress=function(){var O=this;p(O._xhr)&&!O._destroyed&&(O._response||O._connect(),O._response._onXHRProgress())},S.prototype._connect=function(){var O=this;O._destroyed||(O._response=new C(O._xhr,O._fetchResponse,O._mode,O._fetchTimer),O._response.on("error",function(w){O.emit("error",w)}),O.emit("response",O._response))},S.prototype._write=function(O,w,_){this._body.push(O),_()},S.prototype.abort=S.prototype.destroy=function(){var O=this;O._destroyed=!0,m.clearTimeout(O._fetchTimer),O._response&&(O._response._destroyed=!0),O._xhr?O._xhr.abort():O._fetchAbortController&&O._fetchAbortController.abort()},S.prototype.end=function(O,w,_){var F=this;typeof O=="function"&&(_=O,O=void 0),y.Writable.prototype.end.call(F,O,w,_)},S.prototype.flushHeaders=function(){},S.prototype.setTimeout=function(){},S.prototype.setNoDelay=function(){},S.prototype.setSocketKeepAlive=function(){};var E=["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,r("_process"),typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{},r("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(r,I,f){(function(h,m,u){"use strict";var o=r("babel-runtime/core-js/promise"),p=function(y){return y&&y.__esModule?y:{default:y}}(o),s=r("./capability"),t=r("inherits"),a=r("readable-stream"),c=f.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},g=f.IncomingMessage=function(y,d,C,k){var S=this;if(a.Readable.call(S),S._mode=C,S.headers={},S.rawHeaders=[],S.trailers={},S.rawTrailers=[],S.on("end",function(){h.nextTick(function(){S.emit("close")})}),C==="fetch"){if(S._fetchResponse=d,S.url=d.url,S.statusCode=d.status,S.statusMessage=d.statusText,d.headers.forEach(function(F,M){S.headers[M.toLowerCase()]=F,S.rawHeaders.push(M,F)}),s.writableStream){var E=new WritableStream({write:function(F){return new p.default(function(M,b){S._destroyed?b():S.push(new u(F))?M():S._resumeFetch=M})},close:function(){m.clearTimeout(k),S._destroyed||S.push(null)},abort:function(F){S._destroyed||S.emit("error",F)}});try{return void d.body.pipeTo(E).catch(function(F){m.clearTimeout(k),S._destroyed||S.emit("error",F)})}catch(F){}}var O=d.body.getReader();!function F(){O.read().then(function(M){if(!S._destroyed){if(M.done)return m.clearTimeout(k),void S.push(null);S.push(new u(M.value)),F()}}).catch(function(M){m.clearTimeout(k),S._destroyed||S.emit("error",M)})}()}else if(S._xhr=y,S._pos=0,S.url=y.responseURL,S.statusCode=y.status,S.statusMessage=y.statusText,y.getAllResponseHeaders().split(/\r?\n/).forEach(function(F){var M=F.match(/^([^:]+):\s*(.*)/);if(M){var b=M[1].toLowerCase();b==="set-cookie"?(S.headers[b]===void 0&&(S.headers[b]=[]),S.headers[b].push(M[2])):S.headers[b]!==void 0?S.headers[b]+=", "+M[2]:S.headers[b]=M[2],S.rawHeaders.push(M[1],M[2])}}),S._charset="x-user-defined",!s.overrideMimeType){var w=S.rawHeaders["mime-type"];if(w){var _=w.match(/;\s*charset=([^;])(;|$)/);_&&(S._charset=_[1].toLowerCase())}S._charset||(S._charset="utf-8")}};t(g,a.Readable),g.prototype._read=function(){var y=this,d=y._resumeFetch;d&&(y._resumeFetch=null,d())},g.prototype._onXHRProgress=function(){var y=this,d=y._xhr,C=null;switch(y._mode){case"text:vbarray":if(d.readyState!==c.DONE)break;try{C=new m.VBArray(d.responseBody).toArray()}catch(w){}if(C!==null){y.push(new u(C));break}case"text":try{C=d.responseText}catch(w){y._mode="text:vbarray";break}if(C.length>y._pos){var k=C.substr(y._pos);if(y._charset==="x-user-defined"){for(var S=new u(k.length),E=0;E<k.length;E++)S[E]=255&k.charCodeAt(E);y.push(S)}else y.push(k,y._charset);y._pos=C.length}break;case"arraybuffer":if(d.readyState!==c.DONE||!d.response)break;C=d.response,y.push(new u(new Uint8Array(C)));break;case"moz-chunked-arraybuffer":if(C=d.response,d.readyState!==c.LOADING||!C)break;y.push(new u(new Uint8Array(C)));break;case"ms-stream":if(C=d.response,d.readyState!==c.LOADING)break;var O=new m.MSStreamReader;O.onprogress=function(){O.result.byteLength>y._pos&&(y.push(new u(new Uint8Array(O.result.slice(y._pos)))),y._pos=O.result.byteLength)},O.onload=function(){y.push(null)},O.readAsArrayBuffer(C)}y._xhr.readyState===c.DONE&&y._mode!=="ms-stream"&&y.push(null)}}).call(this,r("_process"),typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{},r("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(r,I,f){"use strict";function h(w){if(!w)return"utf8";for(var _;;)switch(w){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 w;default:if(_)return;w=(""+w).toLowerCase(),_=!0}}function m(w){var _=h(w);if(typeof _!="string"&&(E.isEncoding===O||!O(w)))throw new Error("Unknown encoding: "+w);return _||w}function u(w){this.encoding=m(w);var _;switch(this.encoding){case"utf16le":this.text=g,this.end=y,_=4;break;case"utf8":this.fillLast=t,_=4;break;case"base64":this.text=d,this.end=C,_=3;break;default:return this.write=k,void(this.end=S)}this.lastNeed=0,this.lastTotal=0,this.lastChar=E.allocUnsafe(_)}function o(w){return w<=127?0:w>>5==6?2:w>>4==14?3:w>>3==30?4:w>>6==2?-1:-2}function p(w,_,F){var M=_.length-1;if(M<F)return 0;var b=o(_[M]);return b>=0?(b>0&&(w.lastNeed=b-1),b):--M<F||b===-2?0:(b=o(_[M]))>=0?(b>0&&(w.lastNeed=b-2),b):--M<F||b===-2?0:(b=o(_[M]),b>=0?(b>0&&(b===2?b=0:w.lastNeed=b-3),b):0)}function s(w,_,F){if((192&_[0])!=128)return w.lastNeed=0,"\u951F\uFFFD";if(w.lastNeed>1&&_.length>1){if((192&_[1])!=128)return w.lastNeed=1,"\u951F\uFFFD";if(w.lastNeed>2&&_.length>2&&(192&_[2])!=128)return w.lastNeed=2,"\u951F\uFFFD"}}function t(w){var _=this.lastTotal-this.lastNeed,F=s(this,w,_);return F!==void 0?F:this.lastNeed<=w.length?(w.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(w.copy(this.lastChar,_,0,w.length),void(this.lastNeed-=w.length))}function a(w,_){var F=p(this,w,_);if(!this.lastNeed)return w.toString("utf8",_);this.lastTotal=F;var M=w.length-(F-this.lastNeed);return w.copy(this.lastChar,0,M),w.toString("utf8",_,M)}function c(w){var _=w&&w.length?this.write(w):"";return this.lastNeed?_+"\u951F\uFFFD":_}function g(w,_){if((w.length-_)%2==0){var F=w.toString("utf16le",_);if(F){var M=F.charCodeAt(F.length-1);if(M>=55296&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1],F.slice(0,-1)}return F}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=w[w.length-1],w.toString("utf16le",_,w.length-1)}function y(w){var _=w&&w.length?this.write(w):"";if(this.lastNeed){var F=this.lastTotal-this.lastNeed;return _+this.lastChar.toString("utf16le",0,F)}return _}function d(w,_){var F=(w.length-_)%3;return F===0?w.toString("base64",_):(this.lastNeed=3-F,this.lastTotal=3,F===1?this.lastChar[0]=w[w.length-1]:(this.lastChar[0]=w[w.length-2],this.lastChar[1]=w[w.length-1]),w.toString("base64",_,w.length-F))}function C(w){var _=w&&w.length?this.write(w):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function k(w){return w.toString(this.encoding)}function S(w){return w&&w.length?this.write(w):""}var E=r("safe-buffer").Buffer,O=E.isEncoding||function(w){switch((w=""+w)&&w.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}};f.StringDecoder=u,u.prototype.write=function(w){if(w.length===0)return"";var _,F;if(this.lastNeed){if((_=this.fillLast(w))===void 0)return"";F=this.lastNeed,this.lastNeed=0}else F=0;return F<w.length?_?_+this.text(w,F):this.text(w,F):_||""},u.prototype.end=c,u.prototype.text=a,u.prototype.fillLast=function(w){if(this.lastNeed<=w.length)return w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);w.copy(this.lastChar,this.lastTotal-this.lastNeed,0,w.length),this.lastNeed-=w.length}},{"safe-buffer":193}],201:[function(r,I,f){(function(h,m){function u(c,g){this._id=c,this._clearFn=g}var o=r("process/browser.js").nextTick,p=Function.prototype.apply,s=Array.prototype.slice,t={},a=0;f.setTimeout=function(){return new u(p.call(setTimeout,window,arguments),clearTimeout)},f.setInterval=function(){return new u(p.call(setInterval,window,arguments),clearInterval)},f.clearTimeout=f.clearInterval=function(c){c.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},f.enroll=function(c,g){clearTimeout(c._idleTimeoutId),c._idleTimeout=g},f.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},f._unrefActive=f.active=function(c){clearTimeout(c._idleTimeoutId);var g=c._idleTimeout;g>=0&&(c._idleTimeoutId=setTimeout(function(){c._onTimeout&&c._onTimeout()},g))},f.setImmediate=typeof h=="function"?h:function(c){var g=a++,y=!(arguments.length<2)&&s.call(arguments,1);return t[g]=!0,o(function(){t[g]&&(y?c.apply(null,y):c.call(null),f.clearImmediate(g))}),g},f.clearImmediate=typeof m=="function"?m:function(c){delete t[c]}}).call(this,r("timers").setImmediate,r("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(r,I,f){var h=r("buffer").Buffer;I.exports=function(m){if(m instanceof Uint8Array){if(m.byteOffset===0&&m.byteLength===m.buffer.byteLength)return m.buffer;if(typeof m.buffer.slice=="function")return m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength)}if(h.isBuffer(m)){for(var u=new Uint8Array(m.length),o=m.length,p=0;p<o;p++)u[p]=m[p];return u.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(r,I,f){"use strict";function h(){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 m(b,X,B){if(b&&t.isObject(b)&&b instanceof h)return b;var U=new h;return U.parse(b,X,B),U}function u(b){return t.isString(b)&&(b=m(b)),b instanceof h?b.format():h.prototype.format.call(b)}function o(b,X){return m(b,!1,!0).resolve(X)}function p(b,X){return b?m(b,!1,!0).resolveObject(X):X}var s=r("punycode"),t=r("./util");f.parse=m,f.resolve=o,f.resolveObject=p,f.format=u,f.Url=h;var a=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,g=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,y=["<",">",'"',"`"," ","\r",`
`," "],d=["{","}","|","\\","^","`"].concat(y),C=["'"].concat(d),k=["%","/","?",";","#"].concat(C),S=["/","?","#"],E=/^[+a-z0-9A-Z_-]{0,63}$/,O=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},F={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},M=r("querystring");h.prototype.parse=function(b,X,B){if(!t.isString(b))throw new TypeError("Parameter 'url' must be a string, not "+typeof b);var U=b.indexOf("?"),W=U!==-1&&U<b.indexOf("#")?"?":"#",ne=b.split(W),re=/\\/g;ne[0]=ne[0].replace(re,"/"),b=ne.join(W);var ae=b;if(ae=ae.trim(),!B&&b.split("#").length===1){var ue=g.exec(ae);if(ue)return this.path=ae,this.href=ae,this.pathname=ue[1],ue[2]?(this.search=ue[2],this.query=X?M.parse(this.search.substr(1)):this.search.substr(1)):X&&(this.search="",this.query={}),this}var V=a.exec(ae);if(V){V=V[0];var ye=V.toLowerCase();this.protocol=ye,ae=ae.substr(V.length)}if(B||V||ae.match(/^\/\/[^@\/]+@[^@\/]+/)){var J=ae.substr(0,2)==="//";!J||V&&_[V]||(ae=ae.substr(2),this.slashes=!0)}if(!_[V]&&(J||V&&!F[V])){for(var $=-1,z=0;z<S.length;z++){var H=ae.indexOf(S[z]);H!==-1&&($===-1||H<$)&&($=H)}var Y,ee;ee=$===-1?ae.lastIndexOf("@"):ae.lastIndexOf("@",$),ee!==-1&&(Y=ae.slice(0,ee),ae=ae.slice(ee+1),this.auth=decodeURIComponent(Y)),$=-1;for(var z=0;z<k.length;z++){var H=ae.indexOf(k[z]);H!==-1&&($===-1||H<$)&&($=H)}$===-1&&($=ae.length),this.host=ae.slice(0,$),ae=ae.slice($),this.parseHost(),this.hostname=this.hostname||"";var we=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!we)for(var he=this.hostname.split(/\./),z=0,Ae=he.length;z<Ae;z++){var pe=he[z];if(pe&&!pe.match(E)){for(var ge="",se=0,ie=pe.length;se<ie;se++)pe.charCodeAt(se)>127?ge+="x":ge+=pe[se];if(!ge.match(E)){var Z=he.slice(0,z),be=he.slice(z+1),te=pe.match(O);te&&(Z.push(te[1]),be.unshift(te[2])),be.length&&(ae="/"+be.join(".")+ae),this.hostname=Z.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),we||(this.hostname=s.toASCII(this.hostname));var q=this.port?":"+this.port:"",Ee=this.hostname||"";this.host=Ee+q,this.href+=this.host,we&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ae[0]!=="/"&&(ae="/"+ae))}if(!w[ye])for(var z=0,Ae=C.length;z<Ae;z++){var Se=C[z];if(ae.indexOf(Se)!==-1){var Ie=encodeURIComponent(Se);Ie===Se&&(Ie=escape(Se)),ae=ae.split(Se).join(Ie)}}var P=ae.indexOf("#");P!==-1&&(this.hash=ae.substr(P),ae=ae.slice(0,P));var e=ae.indexOf("?");if(e!==-1?(this.search=ae.substr(e),this.query=ae.substr(e+1),X&&(this.query=M.parse(this.query)),ae=ae.slice(0,e)):X&&(this.search="",this.query={}),ae&&(this.pathname=ae),F[ye]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",i=this.search||"";this.path=q+i}return this.href=this.format(),this},h.prototype.format=function(){var b=this.auth||"";b&&(b=encodeURIComponent(b),b=b.replace(/%3A/i,":"),b+="@");var X=this.protocol||"",B=this.pathname||"",U=this.hash||"",W=!1,ne="";this.host?W=b+this.host:this.hostname&&(W=b+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(W+=":"+this.port)),this.query&&t.isObject(this.query)&&Object.keys(this.query).length&&(ne=M.stringify(this.query));var re=this.search||ne&&"?"+ne||"";return X&&X.substr(-1)!==":"&&(X+=":"),this.slashes||(!X||F[X])&&W!==!1?(W="//"+(W||""),B&&B.charAt(0)!=="/"&&(B="/"+B)):W||(W=""),U&&U.charAt(0)!=="#"&&(U="#"+U),re&&re.charAt(0)!=="?"&&(re="?"+re),B=B.replace(/[?#]/g,function(ae){return encodeURIComponent(ae)}),re=re.replace("#","%23"),X+W+B+re+U},h.prototype.resolve=function(b){return this.resolveObject(m(b,!1,!0)).format()},h.prototype.resolveObject=function(b){if(t.isString(b)){var X=new h;X.parse(b,!1,!0),b=X}for(var B=new h,U=Object.keys(this),W=0;W<U.length;W++){var ne=U[W];B[ne]=this[ne]}if(B.hash=b.hash,b.href==="")return B.href=B.format(),B;if(b.slashes&&!b.protocol){for(var re=Object.keys(b),ae=0;ae<re.length;ae++){var ue=re[ae];ue!=="protocol"&&(B[ue]=b[ue])}return F[B.protocol]&&B.hostname&&!B.pathname&&(B.path=B.pathname="/"),B.href=B.format(),B}if(b.protocol&&b.protocol!==B.protocol){if(!F[b.protocol]){for(var V=Object.keys(b),ye=0;ye<V.length;ye++){var J=V[ye];B[J]=b[J]}return B.href=B.format(),B}if(B.protocol=b.protocol,b.host||_[b.protocol])B.pathname=b.pathname;else{for(var Ae=(b.pathname||"").split("/");Ae.length&&!(b.host=Ae.shift()););b.host||(b.host=""),b.hostname||(b.hostname=""),Ae[0]!==""&&Ae.unshift(""),Ae.length<2&&Ae.unshift(""),B.pathname=Ae.join("/")}if(B.search=b.search,B.query=b.query,B.host=b.host||"",B.auth=b.auth,B.hostname=b.hostname||b.host,B.port=b.port,B.pathname||B.search){var $=B.pathname||"",z=B.search||"";B.path=$+z}return B.slashes=B.slashes||b.slashes,B.href=B.format(),B}var H=B.pathname&&B.pathname.charAt(0)==="/",Y=b.host||b.pathname&&b.pathname.charAt(0)==="/",ee=Y||H||B.host&&b.pathname,we=ee,he=B.pathname&&B.pathname.split("/")||[],Ae=b.pathname&&b.pathname.split("/")||[],pe=B.protocol&&!F[B.protocol];if(pe&&(B.hostname="",B.port=null,B.host&&(he[0]===""?he[0]=B.host:he.unshift(B.host)),B.host="",b.protocol&&(b.hostname=null,b.port=null,b.host&&(Ae[0]===""?Ae[0]=b.host:Ae.unshift(b.host)),b.host=null),ee=ee&&(Ae[0]===""||he[0]==="")),Y)B.host=b.host||b.host===""?b.host:B.host,B.hostname=b.hostname||b.hostname===""?b.hostname:B.hostname,B.search=b.search,B.query=b.query,he=Ae;else if(Ae.length)he||(he=[]),he.pop(),he=he.concat(Ae),B.search=b.search,B.query=b.query;else if(!t.isNullOrUndefined(b.search)){if(pe){B.hostname=B.host=he.shift();var ge=!!(B.host&&B.host.indexOf("@")>0)&&B.host.split("@");ge&&(B.auth=ge.shift(),B.host=B.hostname=ge.shift())}return B.search=b.search,B.query=b.query,t.isNull(B.pathname)&&t.isNull(B.search)||(B.path=(B.pathname?B.pathname:"")+(B.search?B.search:"")),B.href=B.format(),B}if(!he.length)return B.pathname=null,B.search?B.path="/"+B.search:B.path=null,B.href=B.format(),B;for(var se=he.slice(-1)[0],ie=(B.host||b.host||he.length>1)&&(se==="."||se==="..")||se==="",Z=0,be=he.length;be>=0;be--)se=he[be],se==="."?he.splice(be,1):se===".."?(he.splice(be,1),Z++):Z&&(he.splice(be,1),Z--);if(!ee&&!we)for(;Z--;Z)he.unshift("..");!ee||he[0]===""||he[0]&&he[0].charAt(0)==="/"||he.unshift(""),ie&&he.join("/").substr(-1)!=="/"&&he.push("");var te=he[0]===""||he[0]&&he[0].charAt(0)==="/";if(pe){B.hostname=B.host=te?"":he.length?he.shift():"";var ge=!!(B.host&&B.host.indexOf("@")>0)&&B.host.split("@");ge&&(B.auth=ge.shift(),B.host=B.hostname=ge.shift())}return ee=ee||B.host&&he.length,ee&&!te&&he.unshift(""),he.length?B.pathname=he.join("/"):(B.pathname=null,B.path=null),t.isNull(B.pathname)&&t.isNull(B.search)||(B.path=(B.pathname?B.pathname:"")+(B.search?B.search:"")),B.auth=b.auth||B.auth,B.slashes=B.slashes||b.slashes,B.href=B.format(),B},h.prototype.parseHost=function(){var b=this.host,X=c.exec(b);X&&(X=X[0],X!==":"&&(this.port=X.substr(1)),b=b.substr(0,b.length-X.length)),b&&(this.hostname=b)}},{"./util":204,punycode:174,querystring:177}],204:[function(r,I,f){"use strict";I.exports={isString:function(h){return typeof h=="string"},isObject:function(h){return typeof h=="object"&&h!==null},isNull:function(h){return h===null},isNullOrUndefined:function(h){return h==null}}},{}],205:[function(r,I,f){(function(h){function m(o,p){function s(){if(!t){if(u("throwDeprecation"))throw new Error(p);u("traceDeprecation")?console.trace(p):console.warn(p),t=!0}return o.apply(this,arguments)}if(u("noDeprecation"))return o;var t=!1;return s}function u(o){try{if(!h.localStorage)return!1}catch(s){return!1}var p=h.localStorage[o];return p!=null&&String(p).toLowerCase()==="true"}I.exports=m}).call(this,typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(r,I,f){I.exports=function(h){return h&&typeof h=="object"&&typeof h.copy=="function"&&typeof h.fill=="function"&&typeof h.readUInt8=="function"}},{}],207:[function(r,I,f){(function(h,m){function u(z,H){var Y={seen:[],stylize:p};return arguments.length>=3&&(Y.depth=arguments[2]),arguments.length>=4&&(Y.colors=arguments[3]),k(H)?Y.showHidden=H:H&&f._extend(Y,H),F(Y.showHidden)&&(Y.showHidden=!1),F(Y.depth)&&(Y.depth=2),F(Y.colors)&&(Y.colors=!1),F(Y.customInspect)&&(Y.customInspect=!0),Y.colors&&(Y.stylize=o),t(Y,z,Y.depth)}function o(z,H){var Y=u.styles[H];return Y?"["+u.colors[Y][0]+"m"+z+"["+u.colors[Y][1]+"m":z}function p(z,H){return z}function s(z){var H={};return z.forEach(function(Y,ee){H[Y]=!0}),H}function t(z,H,Y){if(z.customInspect&&H&&U(H.inspect)&&H.inspect!==f.inspect&&(!H.constructor||H.constructor.prototype!==H)){var ee=H.inspect(Y,z);return w(ee)||(ee=t(z,ee,Y)),ee}var we=a(z,H);if(we)return we;var he=Object.keys(H),Ae=s(he);if(z.showHidden&&(he=Object.getOwnPropertyNames(H)),B(H)&&(he.indexOf("message")>=0||he.indexOf("description")>=0))return c(H);if(he.length===0){if(U(H)){var pe=H.name?": "+H.name:"";return z.stylize("[Function"+pe+"]","special")}if(M(H))return z.stylize(RegExp.prototype.toString.call(H),"regexp");if(X(H))return z.stylize(Date.prototype.toString.call(H),"date");if(B(H))return c(H)}var ge="",se=!1,ie=["{","}"];if((C(H)&&(se=!0,ie=["[","]"]),U(H))&&(ge=" [Function"+(H.name?": "+H.name:"")+"]"),M(H)&&(ge=" "+RegExp.prototype.toString.call(H)),X(H)&&(ge=" "+Date.prototype.toUTCString.call(H)),B(H)&&(ge=" "+c(H)),he.length===0&&(!se||H.length==0))return ie[0]+ge+ie[1];if(Y<0)return M(H)?z.stylize(RegExp.prototype.toString.call(H),"regexp"):z.stylize("[Object]","special");z.seen.push(H);var Z;return Z=se?g(z,H,Y,Ae,he):he.map(function(be){return y(z,H,Y,Ae,be,se)}),z.seen.pop(),d(Z,ge,ie)}function a(z,H){if(F(H))return z.stylize("undefined","undefined");if(w(H)){var Y="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return z.stylize(Y,"string")}return O(H)?z.stylize(""+H,"number"):k(H)?z.stylize(""+H,"boolean"):S(H)?z.stylize("null","null"):void 0}function c(z){return"["+Error.prototype.toString.call(z)+"]"}function g(z,H,Y,ee,we){for(var he=[],Ae=0,pe=H.length;Ae<pe;++Ae)ue(H,String(Ae))?he.push(y(z,H,Y,ee,String(Ae),!0)):he.push("");return we.forEach(function(ge){ge.match(/^\d+$/)||he.push(y(z,H,Y,ee,ge,!0))}),he}function y(z,H,Y,ee,we,he){var Ae,pe,ge;if(ge=Object.getOwnPropertyDescriptor(H,we)||{value:H[we]},ge.get?pe=ge.set?z.stylize("[Getter/Setter]","special"):z.stylize("[Getter]","special"):ge.set&&(pe=z.stylize("[Setter]","special")),ue(ee,we)||(Ae="["+we+"]"),pe||(z.seen.indexOf(ge.value)<0?(pe=S(Y)?t(z,ge.value,null):t(z,ge.value,Y-1),pe.indexOf(`
`)>-1&&(pe=he?pe.split(`
`).map(function(se){return" "+se}).join(`
`).substr(2):`
`+pe.split(`
`).map(function(se){return" "+se}).join(`
`))):pe=z.stylize("[Circular]","special")),F(Ae)){if(he&&we.match(/^\d+$/))return pe;Ae=JSON.stringify(""+we),Ae.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ae=Ae.substr(1,Ae.length-2),Ae=z.stylize(Ae,"name")):(Ae=Ae.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ae=z.stylize(Ae,"string"))}return Ae+": "+pe}function d(z,H,Y){var ee=0;return z.reduce(function(we,he){return ee++,he.indexOf(`
`)>=0&&ee++,we+he.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Y[0]+(H===""?"":H+`
`)+" "+z.join(`,
`)+" "+Y[1]:Y[0]+H+" "+z.join(", ")+" "+Y[1]}function C(z){return Array.isArray(z)}function k(z){return typeof z=="boolean"}function S(z){return z===null}function E(z){return z==null}function O(z){return typeof z=="number"}function w(z){return typeof z=="string"}function _(z){return typeof z=="symbol"}function F(z){return z===void 0}function M(z){return b(z)&&ne(z)==="[object RegExp]"}function b(z){return typeof z=="object"&&z!==null}function X(z){return b(z)&&ne(z)==="[object Date]"}function B(z){return b(z)&&(ne(z)==="[object Error]"||z instanceof Error)}function U(z){return typeof z=="function"}function W(z){return z===null||typeof z=="boolean"||typeof z=="number"||typeof z=="string"||typeof z=="symbol"||z===void 0}function ne(z){return Object.prototype.toString.call(z)}function re(z){return z<10?"0"+z.toString(10):z.toString(10)}function ae(){var z=new Date,H=[re(z.getHours()),re(z.getMinutes()),re(z.getSeconds())].join(":");return[z.getDate(),$[z.getMonth()],H].join(" ")}function ue(z,H){return Object.prototype.hasOwnProperty.call(z,H)}var V=/%[sdj%]/g;f.format=function(z){if(!w(z)){for(var H=[],Y=0;Y<arguments.length;Y++)H.push(u(arguments[Y]));return H.join(" ")}for(var Y=1,ee=arguments,we=ee.length,he=String(z).replace(V,function(ge){if(ge==="%%")return"%";if(Y>=we)return ge;switch(ge){case"%s":return String(ee[Y++]);case"%d":return Number(ee[Y++]);case"%j":try{return JSON.stringify(ee[Y++])}catch(se){return"[Circular]"}default:return ge}}),Ae=ee[Y];Y<we;Ae=ee[++Y])S(Ae)||!b(Ae)?he+=" "+Ae:he+=" "+u(Ae);return he},f.deprecate=function(z,H){function Y(){if(!ee){if(h.throwDeprecation)throw new Error(H);h.traceDeprecation?console.trace(H):console.error(H),ee=!0}return z.apply(this,arguments)}if(F(m.process))return function(){return f.deprecate(z,H).apply(this,arguments)};if(h.noDeprecation===!0)return z;var ee=!1;return Y};var ye,J={};f.debuglog=function(z){if(F(ye)&&(ye=h.env.NODE_DEBUG||""),z=z.toUpperCase(),!J[z])if(new RegExp("\\b"+z+"\\b","i").test(ye)){var H=h.pid;J[z]=function(){var Y=f.format.apply(f,arguments);console.error("%s %d: %s",z,H,Y)}}else J[z]=function(){};return J[z]},f.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},f.isArray=C,f.isBoolean=k,f.isNull=S,f.isNullOrUndefined=E,f.isNumber=O,f.isString=w,f.isSymbol=_,f.isUndefined=F,f.isRegExp=M,f.isObject=b,f.isDate=X,f.isError=B,f.isFunction=U,f.isPrimitive=W,f.isBuffer=r("./support/isBuffer");var $=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];f.log=function(){console.log("%s - %s",ae(),f.format.apply(f,arguments))},f.inherits=r("inherits"),f._extend=function(z,H){if(!H||!b(H))return z;for(var Y=Object.keys(H),ee=Y.length;ee--;)z[Y[ee]]=H[Y[ee]];return z}}).call(this,r("_process"),typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(r,I,f){"use strict";(function(){f.stripBOM=function(h){return h[0]==="\uFEFF"?h.substring(1):h}}).call(void 0)},{}],209:[function(r,I,f){"use strict";function h(s){return s&&s.__esModule?s:{default:s}}var m=r("babel-runtime/helpers/typeof"),u=h(m),o=r("babel-runtime/core-js/object/keys"),p=h(o);(function(){var s,t,a,c,g,y={}.hasOwnProperty;s=r("xmlbuilder"),t=r("./defaults").defaults,c=function(d){return typeof d=="string"&&(d.indexOf("&")>=0||d.indexOf(">")>=0||d.indexOf("<")>=0)},g=function(d){return"<![CDATA["+a(d)+"]]>"},a=function(d){return d.replace("]]>","]]]]><![CDATA[>")},f.Builder=function(){function d(C){var k,S,E;this.options={},S=t[.2];for(k in S)y.call(S,k)&&(E=S[k],this.options[k]=E);for(k in C)y.call(C,k)&&(E=C[k],this.options[k]=E)}return d.prototype.buildObject=function(C){var k,S,E,O,w;return k=this.options.attrkey,S=this.options.charkey,(0,p.default)(C).length===1&&this.options.rootName===t[.2].rootName?(w=(0,p.default)(C)[0],C=C[w]):w=this.options.rootName,E=function(_){return function(F,M){var b,X,B,U,W,ne;if((M===void 0?"undefined":(0,u.default)(M))!=="object")_.options.cdata&&c(M)?F.raw(g(M)):F.txt(M);else if(Array.isArray(M)){for(U in M)if(y.call(M,U)){X=M[U];for(W in X)B=X[W],F=E(F.ele(W),B).up()}}else for(W in M)if(y.call(M,W))if(X=M[W],W===k){if((X===void 0?"undefined":(0,u.default)(X))==="object")for(b in X)ne=X[b],F=F.att(b,ne)}else if(W===S)F=_.options.cdata&&c(X)?F.raw(g(X)):F.txt(X);else if(Array.isArray(X))for(U in X)y.call(X,U)&&(B=X[U],F=typeof B=="string"?_.options.cdata&&c(B)?F.ele(W).raw(g(B)).up():F.ele(W,B).up():E(F.ele(W),B).up());else(X===void 0?"undefined":(0,u.default)(X))==="object"?F=E(F.ele(W),X).up():typeof X=="string"&&_.options.cdata&&c(X)?F=F.ele(W).raw(g(X)).up():(X==null&&(X=""),F=F.ele(W,X.toString()).up());return F}}(this),O=s.create(w,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),E(O,C).end(this.options.renderOpts)},d}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(r,I,f){"use strict";(function(){f.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(r,I,f){"use strict";function h(a){return a&&a.__esModule?a:{default:a}}var m=r("babel-runtime/core-js/object/get-own-property-names"),u=h(m),o=r("babel-runtime/core-js/object/keys"),p=h(o),s=r("babel-runtime/helpers/typeof"),t=h(s);(function(){var a,c,g,y,d,C,k,S,E=function(_,F){return function(){return _.apply(F,arguments)}},O=function(_,F){function M(){this.constructor=_}for(var b in F)w.call(F,b)&&(_[b]=F[b]);return M.prototype=F.prototype,_.prototype=new M,_.__super__=F.prototype,_},w={}.hasOwnProperty;k=r("sax"),g=r("events"),a=r("./bom"),C=r("./processors"),S=r("timers").setImmediate,c=r("./defaults").defaults,y=function(_){return(_===void 0?"undefined":(0,t.default)(_))==="object"&&_!=null&&(0,p.default)(_).length===0},d=function(_,F,M){var b,X,B;for(b=0,X=_.length;b<X;b++)B=_[b],F=B(F,M);return F},f.Parser=function(_){function F(M){this.parseString=E(this.parseString,this),this.reset=E(this.reset,this),this.assignOrPush=E(this.assignOrPush,this),this.processAsync=E(this.processAsync,this);var b,X,B;if(!(this instanceof f.Parser))return new f.Parser(M);this.options={},X=c[.2];for(b in X)w.call(X,b)&&(B=X[b],this.options[b]=B);for(b in M)w.call(M,b)&&(B=M[b],this.options[b]=B);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(C.normalize)),this.reset()}return O(F,_),F.prototype.processAsync=function(){var M,b;try{return this.remaining.length<=this.options.chunkSize?(M=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(M),this.saxParser.close()):(M=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(M),S(this.processAsync))}catch(X){if(b=X,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(b)}},F.prototype.assignOrPush=function(M,b,X){return b in M?(M[b]instanceof Array||(M[b]=[M[b]]),M[b].push(X)):this.options.explicitArray?M[b]=[X]:M[b]=X},F.prototype.reset=function(){var M,b,X,B;return this.removeAllListeners(),this.saxParser=k.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(U){return function(W){if(U.saxParser.resume(),!U.saxParser.errThrown)return U.saxParser.errThrown=!0,U.emit("error",W)}}(this),this.saxParser.onend=function(U){return function(){if(!U.saxParser.ended)return U.saxParser.ended=!0,U.emit("end",U.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,B=[],M=this.options.attrkey,b=this.options.charkey,this.saxParser.onopentag=function(U){return function(W){var ne,re,ae,ue,V;if(ae={},ae[b]="",!U.options.ignoreAttrs){V=W.attributes;for(ne in V)w.call(V,ne)&&(M in ae||U.options.mergeAttrs||(ae[M]={}),re=U.options.attrValueProcessors?d(U.options.attrValueProcessors,W.attributes[ne],ne):W.attributes[ne],ue=U.options.attrNameProcessors?d(U.options.attrNameProcessors,ne):ne,U.options.mergeAttrs?U.assignOrPush(ae,ue,re):ae[M][ue]=re)}return ae["#name"]=U.options.tagNameProcessors?d(U.options.tagNameProcessors,W.name):W.name,U.options.xmlns&&(ae[U.options.xmlnskey]={uri:W.uri,local:W.local}),B.push(ae)}}(this),this.saxParser.onclosetag=function(U){return function(){var W,ne,re,ae,ue,V,ye,J,$,z;if(V=B.pop(),ue=V["#name"],U.options.explicitChildren&&U.options.preserveChildrenOrder||delete V["#name"],V.cdata===!0&&(W=V.cdata,delete V.cdata),$=B[B.length-1],V[b].match(/^\s*$/)&&!W?(ne=V[b],delete V[b]):(U.options.trim&&(V[b]=V[b].trim()),U.options.normalize&&(V[b]=V[b].replace(/\s{2,}/g," ").trim()),V[b]=U.options.valueProcessors?d(U.options.valueProcessors,V[b],ue):V[b],(0,p.default)(V).length===1&&b in V&&!U.EXPLICIT_CHARKEY&&(V=V[b])),y(V)&&(V=U.options.emptyTag!==""?U.options.emptyTag:ne),U.options.validator!=null&&(z="/"+function(){var H,Y,ee;for(ee=[],H=0,Y=B.length;H<Y;H++)ae=B[H],ee.push(ae["#name"]);return ee}().concat(ue).join("/"),function(){var H;try{V=U.options.validator(z,$&&$[ue],V)}catch(Y){return H=Y,U.emit("error",H)}}()),U.options.explicitChildren&&!U.options.mergeAttrs&&(V===void 0?"undefined":(0,t.default)(V))==="object")if(U.options.preserveChildrenOrder){if($){$[U.options.childkey]=$[U.options.childkey]||[],ye={};for(re in V)w.call(V,re)&&(ye[re]=V[re]);$[U.options.childkey].push(ye),delete V["#name"],(0,p.default)(V).length===1&&b in V&&!U.EXPLICIT_CHARKEY&&(V=V[b])}}else ae={},U.options.attrkey in V&&(ae[U.options.attrkey]=V[U.options.attrkey],delete V[U.options.attrkey]),!U.options.charsAsChildren&&U.options.charkey in V&&(ae[U.options.charkey]=V[U.options.charkey],delete V[U.options.charkey]),(0,u.default)(V).length>0&&(ae[U.options.childkey]=V),V=ae;return B.length>0?U.assignOrPush($,ue,V):(U.options.explicitRoot&&(J=V,V={},V[ue]=J),U.resultObject=V,U.saxParser.ended=!0,U.emit("end",U.resultObject))}}(this),X=function(U){return function(W){var ne,re;if(re=B[B.length-1])return re[b]+=W,U.options.explicitChildren&&U.options.preserveChildrenOrder&&U.options.charsAsChildren&&(U.options.includeWhiteChars||W.replace(/\\n/g,"").trim()!=="")&&(re[U.options.childkey]=re[U.options.childkey]||[],ne={"#name":"__text__"},ne[b]=W,U.options.normalize&&(ne[b]=ne[b].replace(/\s{2,}/g," ").trim()),re[U.options.childkey].push(ne)),re}}(this),this.saxParser.ontext=X,this.saxParser.oncdata=function(U){return function(W){var ne;if(ne=X(W))return ne.cdata=!0}}()},F.prototype.parseString=function(M,b){var X;b!=null&&typeof b=="function"&&(this.on("end",function(B){return this.reset(),b(null,B)}),this.on("error",function(B){return this.reset(),b(B)}));try{return M=M.toString(),M.trim()===""?(this.emit("end",null),!0):(M=a.stripBOM(M),this.options.async?(this.remaining=M,S(this.processAsync),this.saxParser):this.saxParser.write(M).close())}catch(B){if(X=B,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",X),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw X}},F}(g.EventEmitter),f.parseString=function(_,F,M){var b,X,B;return M!=null?(typeof M=="function"&&(b=M),(F===void 0?"undefined":(0,t.default)(F))==="object"&&(X=F)):(typeof F=="function"&&(b=F),X={}),B=new f.Parser(X),B.parseString(_,b)}}).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(r,I,f){"use strict";(function(){var h;h=new RegExp(/(?!xmlns)^.*:/),f.normalize=function(m){return m.toLowerCase()},f.firstCharLowerCase=function(m){return m.charAt(0).toLowerCase()+m.slice(1)},f.stripPrefix=function(m){return m.replace(h,"")},f.parseNumbers=function(m){return isNaN(m)||(m=m%1==0?parseInt(m,10):parseFloat(m)),m},f.parseBooleans=function(m){return/^(?:true|false)$/i.test(m)&&(m=m.toLowerCase()==="true"),m}}).call(void 0)},{}],213:[function(r,I,f){"use strict";(function(){var h,m,u,o,p=function(t,a){function c(){this.constructor=t}for(var g in a)s.call(a,g)&&(t[g]=a[g]);return c.prototype=a.prototype,t.prototype=new c,t.__super__=a.prototype,t},s={}.hasOwnProperty;m=r("./defaults"),h=r("./builder"),u=r("./parser"),o=r("./processors"),f.defaults=m.defaults,f.processors=o,f.ValidationError=function(t){function a(c){this.message=c}return p(a,t),a}(Error),f.Builder=h.Builder,f.Parser=u.Parser,f.parseString=u.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(r,I,f){"use strict";function h(a){return a&&a.__esModule?a:{default:a}}var m=r("babel-runtime/core-js/object/get-prototype-of"),u=h(m),o=r("babel-runtime/helpers/typeof"),p=h(o),s=r("babel-runtime/core-js/object/assign"),t=h(s);(function(){var a,c,g,y,d,C,k=[].slice,S={}.hasOwnProperty;a=function(){var E,O,w,_,F,M;if(M=arguments[0],F=2<=arguments.length?k.call(arguments,1):[],y(t.default))t.default.apply(null,arguments);else for(E=0,w=F.length;E<w;E++)if((_=F[E])!=null)for(O in _)S.call(_,O)&&(M[O]=_[O]);return M},y=function(E){return!!E&&Object.prototype.toString.call(E)==="[object Function]"},d=function(E){var O;return!!E&&((O=E===void 0?"undefined":(0,p.default)(E))==="function"||O==="object")},c=function(E){return y(Array.isArray)?Array.isArray(E):Object.prototype.toString.call(E)==="[object Array]"},g=function(E){var O;if(c(E))return!E.length;for(O in E)if(S.call(E,O))return!1;return!0},C=function(E){var O,w;return d(E)&&(w=(0,u.default)(E))&&(O=w.constructor)&&typeof O=="function"&&O instanceof O&&Function.prototype.toString.call(O)===Function.prototype.toString.call(Object)},I.exports.assign=a,I.exports.isFunction=y,I.exports.isObject=d,I.exports.isArray=c,I.exports.isEmpty=g,I.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(r,I,f){"use strict";var h=r("babel-runtime/core-js/object/create"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);(function(){I.exports=function(){function u(o,p,s){if(this.options=o.options,this.stringify=o.stringify,p==null)throw new Error("Missing attribute name of element "+o.name);if(s==null)throw new Error("Missing attribute value for attribute "+p+" of element "+o.name);this.name=this.stringify.attName(p),this.value=this.stringify.attValue(s)}return u.prototype.clone=function(){return(0,m.default)(this)},u.prototype.toString=function(o){return this.options.writer.set(o).attribute(this)},u}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(r,I,f){"use strict";var h=r("babel-runtime/core-js/object/create"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);(function(){var u,o=function(s,t){function a(){this.constructor=s}for(var c in t)p.call(t,c)&&(s[c]=t[c]);return a.prototype=t.prototype,s.prototype=new a,s.__super__=t.prototype,s},p={}.hasOwnProperty;u=r("./XMLNode"),I.exports=function(s){function t(a,c){if(t.__super__.constructor.call(this,a),c==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(c)}return o(t,s),t.prototype.clone=function(){return(0,m.default)(this)},t.prototype.toString=function(a){return this.options.writer.set(a).cdata(this)},t}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(r,I,f){"use strict";var h=r("babel-runtime/core-js/object/create"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);(function(){var u,o=function(s,t){function a(){this.constructor=s}for(var c in t)p.call(t,c)&&(s[c]=t[c]);return a.prototype=t.prototype,s.prototype=new a,s.__super__=t.prototype,s},p={}.hasOwnProperty;u=r("./XMLNode"),I.exports=function(s){function t(a,c){if(t.__super__.constructor.call(this,a),c==null)throw new Error("Missing comment text");this.text=this.stringify.comment(c)}return o(t,s),t.prototype.clone=function(){return(0,m.default)(this)},t.prototype.toString=function(a){return this.options.writer.set(a).comment(this)},t}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(r,I,f){"use strict";(function(){var h,m=function(o,p){function s(){this.constructor=o}for(var t in p)u.call(p,t)&&(o[t]=p[t]);return s.prototype=p.prototype,o.prototype=new s,o.__super__=p.prototype,o},u={}.hasOwnProperty;h=r("./XMLNode"),I.exports=function(o){function p(s,t,a,c,g,y){if(p.__super__.constructor.call(this,s),t==null)throw new Error("Missing DTD element name");if(a==null)throw new Error("Missing DTD attribute name");if(!c)throw new Error("Missing DTD attribute type");if(!g)throw new Error("Missing DTD attribute default");if(g.indexOf("#")!==0&&(g="#"+g),!g.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(y&&!g.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(t),this.attributeName=this.stringify.attName(a),this.attributeType=this.stringify.dtdAttType(c),this.defaultValue=this.stringify.dtdAttDefault(y),this.defaultValueType=g}return m(p,o),p.prototype.toString=function(s){return this.options.writer.set(s).dtdAttList(this)},p}(h)}).call(void 0)},{"./XMLNode":227}],219:[function(r,I,f){"use strict";(function(){var h,m=function(o,p){function s(){this.constructor=o}for(var t in p)u.call(p,t)&&(o[t]=p[t]);return s.prototype=p.prototype,o.prototype=new s,o.__super__=p.prototype,o},u={}.hasOwnProperty;h=r("./XMLNode"),I.exports=function(o){function p(s,t,a){if(p.__super__.constructor.call(this,s),t==null)throw new Error("Missing DTD element name");a||(a="(#PCDATA)"),Array.isArray(a)&&(a="("+a.join(",")+")"),this.name=this.stringify.eleName(t),this.value=this.stringify.dtdElementValue(a)}return m(p,o),p.prototype.toString=function(s){return this.options.writer.set(s).dtdElement(this)},p}(h)}).call(void 0)},{"./XMLNode":227}],220:[function(r,I,f){"use strict";(function(){var h,m,u=function(p,s){function t(){this.constructor=p}for(var a in s)o.call(s,a)&&(p[a]=s[a]);return t.prototype=s.prototype,p.prototype=new t,p.__super__=s.prototype,p},o={}.hasOwnProperty;m=r("./Utility").isObject,h=r("./XMLNode"),I.exports=function(p){function s(t,a,c,g){if(s.__super__.constructor.call(this,t),c==null)throw new Error("Missing entity name");if(g==null)throw new Error("Missing entity value");if(this.pe=!!a,this.name=this.stringify.eleName(c),m(g)){if(!g.pubID&&!g.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(g.pubID&&!g.sysID)throw new Error("System identifier is required for a public external entity");if(g.pubID!=null&&(this.pubID=this.stringify.dtdPubID(g.pubID)),g.sysID!=null&&(this.sysID=this.stringify.dtdSysID(g.sysID)),g.nData!=null&&(this.nData=this.stringify.dtdNData(g.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(g)}return u(s,p),s.prototype.toString=function(t){return this.options.writer.set(t).dtdEntity(this)},s}(h)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(r,I,f){"use strict";(function(){var h,m=function(o,p){function s(){this.constructor=o}for(var t in p)u.call(p,t)&&(o[t]=p[t]);return s.prototype=p.prototype,o.prototype=new s,o.__super__=p.prototype,o},u={}.hasOwnProperty;h=r("./XMLNode"),I.exports=function(o){function p(s,t,a){if(p.__super__.constructor.call(this,s),t==null)throw new Error("Missing notation name");if(!a.pubID&&!a.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(t),a.pubID!=null&&(this.pubID=this.stringify.dtdPubID(a.pubID)),a.sysID!=null&&(this.sysID=this.stringify.dtdSysID(a.sysID))}return m(p,o),p.prototype.toString=function(s){return this.options.writer.set(s).dtdNotation(this)},p}(h)}).call(void 0)},{"./XMLNode":227}],222:[function(r,I,f){"use strict";(function(){var h,m,u=function(p,s){function t(){this.constructor=p}for(var a in s)o.call(s,a)&&(p[a]=s[a]);return t.prototype=s.prototype,p.prototype=new t,p.__super__=s.prototype,p},o={}.hasOwnProperty;m=r("./Utility").isObject,h=r("./XMLNode"),I.exports=function(p){function s(t,a,c,g){var y;s.__super__.constructor.call(this,t),m(a)&&(y=a,a=y.version,c=y.encoding,g=y.standalone),a||(a="1.0"),this.version=this.stringify.xmlVersion(a),c!=null&&(this.encoding=this.stringify.xmlEncoding(c)),g!=null&&(this.standalone=this.stringify.xmlStandalone(g))}return u(s,p),s.prototype.toString=function(t){return this.options.writer.set(t).declaration(this)},s}(h)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(r,I,f){"use strict";(function(){var h,m,u,o,p,s,t=function(c,g){function y(){this.constructor=c}for(var d in g)a.call(g,d)&&(c[d]=g[d]);return y.prototype=g.prototype,c.prototype=new y,c.__super__=g.prototype,c},a={}.hasOwnProperty;s=r("./Utility").isObject,p=r("./XMLNode"),h=r("./XMLDTDAttList"),u=r("./XMLDTDEntity"),m=r("./XMLDTDElement"),o=r("./XMLDTDNotation"),I.exports=function(c){function g(y,d,C){var k,S;g.__super__.constructor.call(this,y),this.documentObject=y,s(d)&&(k=d,d=k.pubID,C=k.sysID),C==null&&(S=[d,C],C=S[0],d=S[1]),d!=null&&(this.pubID=this.stringify.dtdPubID(d)),C!=null&&(this.sysID=this.stringify.dtdSysID(C))}return t(g,c),g.prototype.element=function(y,d){var C;return C=new m(this,y,d),this.children.push(C),this},g.prototype.attList=function(y,d,C,k,S){var E;return E=new h(this,y,d,C,k,S),this.children.push(E),this},g.prototype.entity=function(y,d){var C;return C=new u(this,!1,y,d),this.children.push(C),this},g.prototype.pEntity=function(y,d){var C;return C=new u(this,!0,y,d),this.children.push(C),this},g.prototype.notation=function(y,d){var C;return C=new o(this,y,d),this.children.push(C),this},g.prototype.toString=function(y){return this.options.writer.set(y).docType(this)},g.prototype.ele=function(y,d){return this.element(y,d)},g.prototype.att=function(y,d,C,k,S){return this.attList(y,d,C,k,S)},g.prototype.ent=function(y,d){return this.entity(y,d)},g.prototype.pent=function(y,d){return this.pEntity(y,d)},g.prototype.not=function(y,d){return this.notation(y,d)},g.prototype.up=function(){return this.root()||this.documentObject},g}(p)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(r,I,f){"use strict";(function(){var h,m,u,o,p=function(t,a){function c(){this.constructor=t}for(var g in a)s.call(a,g)&&(t[g]=a[g]);return c.prototype=a.prototype,t.prototype=new c,t.__super__=a.prototype,t},s={}.hasOwnProperty;o=r("./Utility").isPlainObject,h=r("./XMLNode"),u=r("./XMLStringifier"),m=r("./XMLStringWriter"),I.exports=function(t){function a(c){a.__super__.constructor.call(this,null),c||(c={}),c.writer||(c.writer=new m),this.options=c,this.stringify=new u(c),this.isDocument=!0}return p(a,t),a.prototype.end=function(c){var g;return c?o(c)&&(g=c,c=this.options.writer.set(g)):c=this.options.writer,c.document(this)},a.prototype.toString=function(c){return this.options.writer.set(c).document(this)},a}(h)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(r,I,f){"use strict";(function(){var h,m,u,o,p,s,t,a,c,g,y,d,C,k,S,E,O,w,_,F={}.hasOwnProperty;_=r("./Utility"),O=_.isObject,E=_.isFunction,w=_.isPlainObject,g=r("./XMLElement"),m=r("./XMLCData"),u=r("./XMLComment"),d=r("./XMLRaw"),S=r("./XMLText"),y=r("./XMLProcessingInstruction"),a=r("./XMLDeclaration"),c=r("./XMLDocType"),o=r("./XMLDTDAttList"),s=r("./XMLDTDEntity"),p=r("./XMLDTDElement"),t=r("./XMLDTDNotation"),h=r("./XMLAttribute"),k=r("./XMLStringifier"),C=r("./XMLStringWriter"),I.exports=function(){function M(b,X,B){var U;b||(b={}),b.writer?w(b.writer)&&(U=b.writer,b.writer=new C(U)):b.writer=new C(b),this.options=b,this.writer=b.writer,this.stringify=new k(b),this.onDataCallback=X||function(){},this.onEndCallback=B||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return M.prototype.node=function(b,X,B){var U;if(b==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),b=b.valueOf(),X==null&&(X={}),X=X.valueOf(),O(X)||(U=[X,B],B=U[0],X=U[1]),this.currentNode=new g(this,b,X),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,B!=null&&this.text(B),this},M.prototype.element=function(b,X,B){return this.currentNode&&this.currentNode instanceof c?this.dtdElement.apply(this,arguments):this.node(b,X,B)},M.prototype.attribute=function(b,X){var B,U;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(b!=null&&(b=b.valueOf()),O(b))for(B in b)F.call(b,B)&&(U=b[B],this.attribute(B,U));else E(X)&&(X=X.apply()),this.options.skipNullAttributes&&X==null||(this.currentNode.attributes[b]=new h(this,b,X));return this},M.prototype.text=function(b){var X;return this.openCurrent(),X=new S(this,b),this.onData(this.writer.text(X,this.currentLevel+1)),this},M.prototype.cdata=function(b){var X;return this.openCurrent(),X=new m(this,b),this.onData(this.writer.cdata(X,this.currentLevel+1)),this},M.prototype.comment=function(b){var X;return this.openCurrent(),X=new u(this,b),this.onData(this.writer.comment(X,this.currentLevel+1)),this},M.prototype.raw=function(b){var X;return this.openCurrent(),X=new d(this,b),this.onData(this.writer.raw(X,this.currentLevel+1)),this},M.prototype.instruction=function(b,X){var B,U,W,ne,re;if(this.openCurrent(),b!=null&&(b=b.valueOf()),X!=null&&(X=X.valueOf()),Array.isArray(b))for(B=0,ne=b.length;B<ne;B++)U=b[B],this.instruction(U);else if(O(b))for(U in b)F.call(b,U)&&(W=b[U],this.instruction(U,W));else E(X)&&(X=X.apply()),re=new y(this,b,X),this.onData(this.writer.processingInstruction(re,this.currentLevel+1));return this},M.prototype.declaration=function(b,X,B){var U;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return U=new a(this,b,X,B),this.onData(this.writer.declaration(U,this.currentLevel+1)),this},M.prototype.doctype=function(b,X,B){if(this.openCurrent(),b==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new c(this,X,B),this.currentNode.rootNodeName=b,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},M.prototype.dtdElement=function(b,X){var B;return this.openCurrent(),B=new p(this,b,X),this.onData(this.writer.dtdElement(B,this.currentLevel+1)),this},M.prototype.attList=function(b,X,B,U,W){var ne;return this.openCurrent(),ne=new o(this,b,X,B,U,W),this.onData(this.writer.dtdAttList(ne,this.currentLevel+1)),this},M.prototype.entity=function(b,X){var B;return this.openCurrent(),B=new s(this,!1,b,X),this.onData(this.writer.dtdEntity(B,this.currentLevel+1)),this},M.prototype.pEntity=function(b,X){var B;return this.openCurrent(),B=new s(this,!0,b,X),this.onData(this.writer.dtdEntity(B,this.currentLevel+1)),this},M.prototype.notation=function(b,X){var B;return this.openCurrent(),B=new t(this,b,X),this.onData(this.writer.dtdNotation(B,this.currentLevel+1)),this},M.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},M.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},M.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},M.prototype.openNode=function(b){if(!b.isOpen)return!this.root&&this.currentLevel===0&&b instanceof g&&(this.root=b),this.onData(this.writer.openNode(b,this.currentLevel)),b.isOpen=!0},M.prototype.closeNode=function(b){if(!b.isClosed)return this.onData(this.writer.closeNode(b,this.currentLevel)),b.isClosed=!0},M.prototype.onData=function(b){return this.documentStarted=!0,this.onDataCallback(b)},M.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},M.prototype.ele=function(){return this.element.apply(this,arguments)},M.prototype.nod=function(b,X,B){return this.node(b,X,B)},M.prototype.txt=function(b){return this.text(b)},M.prototype.dat=function(b){return this.cdata(b)},M.prototype.com=function(b){return this.comment(b)},M.prototype.ins=function(b,X){return this.instruction(b,X)},M.prototype.dec=function(b,X,B){return this.declaration(b,X,B)},M.prototype.dtd=function(b,X,B){return this.doctype(b,X,B)},M.prototype.e=function(b,X,B){return this.element(b,X,B)},M.prototype.n=function(b,X,B){return this.node(b,X,B)},M.prototype.t=function(b){return this.text(b)},M.prototype.d=function(b){return this.cdata(b)},M.prototype.c=function(b){return this.comment(b)},M.prototype.r=function(b){return this.raw(b)},M.prototype.i=function(b,X){return this.instruction(b,X)},M.prototype.att=function(){return this.currentNode&&this.currentNode instanceof c?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},M.prototype.a=function(){return this.currentNode&&this.currentNode instanceof c?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},M.prototype.ent=function(b,X){return this.entity(b,X)},M.prototype.pent=function(b,X){return this.pEntity(b,X)},M.prototype.not=function(b,X){return this.notation(b,X)},M}()}).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(r,I,f){"use strict";var h=r("babel-runtime/core-js/object/create"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);(function(){var u,o,p,s,t,a=function(g,y){function d(){this.constructor=g}for(var C in y)c.call(y,C)&&(g[C]=y[C]);return d.prototype=y.prototype,g.prototype=new d,g.__super__=y.prototype,g},c={}.hasOwnProperty;t=r("./Utility"),s=t.isObject,p=t.isFunction,o=r("./XMLNode"),u=r("./XMLAttribute"),I.exports=function(g){function y(d,C,k){if(y.__super__.constructor.call(this,d),C==null)throw new Error("Missing element name");this.name=this.stringify.eleName(C),this.attributes={},k!=null&&this.attribute(k),d.isDocument&&(this.isRoot=!0,this.documentObject=d,d.rootObject=this)}return a(y,g),y.prototype.clone=function(){var d,C,k,S;k=(0,m.default)(this),k.isRoot&&(k.documentObject=null),k.attributes={},S=this.attributes;for(C in S)c.call(S,C)&&(d=S[C],k.attributes[C]=d.clone());return k.children=[],this.children.forEach(function(E){var O;return O=E.clone(),O.parent=k,k.children.push(O)}),k},y.prototype.attribute=function(d,C){var k,S;if(d!=null&&(d=d.valueOf()),s(d))for(k in d)c.call(d,k)&&(S=d[k],this.attribute(k,S));else p(C)&&(C=C.apply()),this.options.skipNullAttributes&&C==null||(this.attributes[d]=new u(this,d,C));return this},y.prototype.removeAttribute=function(d){var C,k,S;if(d==null)throw new Error("Missing attribute name");if(d=d.valueOf(),Array.isArray(d))for(k=0,S=d.length;k<S;k++)C=d[k],delete this.attributes[C];else delete this.attributes[d];return this},y.prototype.toString=function(d){return this.options.writer.set(d).element(this)},y.prototype.att=function(d,C){return this.attribute(d,C)},y.prototype.a=function(d,C){return this.attribute(d,C)},y}(o)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(r,I,f){"use strict";(function(){var h,m,u,o,p,s,t,a,c,g,y,d,C={}.hasOwnProperty;d=r("./Utility"),y=d.isObject,g=d.isFunction,c=d.isEmpty,p=null,h=null,m=null,u=null,o=null,t=null,a=null,s=null,I.exports=function(){function k(S){this.parent=S,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],p||(p=r("./XMLElement"),h=r("./XMLCData"),m=r("./XMLComment"),u=r("./XMLDeclaration"),o=r("./XMLDocType"),t=r("./XMLRaw"),a=r("./XMLText"),s=r("./XMLProcessingInstruction"))}return k.prototype.element=function(S,E,O){var w,_,F,M,b,X,B,U,W,ne;if(X=null,E==null&&(E={}),E=E.valueOf(),y(E)||(W=[E,O],O=W[0],E=W[1]),S!=null&&(S=S.valueOf()),Array.isArray(S))for(F=0,B=S.length;F<B;F++)_=S[F],X=this.element(_);else if(g(S))X=this.element(S.apply());else if(y(S)){for(b in S)if(C.call(S,b))if(ne=S[b],g(ne)&&(ne=ne.apply()),y(ne)&&c(ne)&&(ne=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&b.indexOf(this.stringify.convertAttKey)===0)X=this.attribute(b.substr(this.stringify.convertAttKey.length),ne);else if(!this.options.separateArrayItems&&Array.isArray(ne))for(M=0,U=ne.length;M<U;M++)_=ne[M],w={},w[b]=_,X=this.element(w);else y(ne)?(X=this.element(b),X.element(ne)):X=this.element(b,ne)}else X=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&S.indexOf(this.stringify.convertTextKey)===0?this.text(O):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&S.indexOf(this.stringify.convertCDataKey)===0?this.cdata(O):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&S.indexOf(this.stringify.convertCommentKey)===0?this.comment(O):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&S.indexOf(this.stringify.convertRawKey)===0?this.raw(O):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&S.indexOf(this.stringify.convertPIKey)===0?this.instruction(S.substr(this.stringify.convertPIKey.length),O):this.node(S,E,O);if(X==null)throw new Error("Could not create any elements with: "+S);return X},k.prototype.insertBefore=function(S,E,O){var w,_,F;if(this.isRoot)throw new Error("Cannot insert elements at root level");return _=this.parent.children.indexOf(this),F=this.parent.children.splice(_),w=this.parent.element(S,E,O),Array.prototype.push.apply(this.parent.children,F),w},k.prototype.insertAfter=function(S,E,O){var w,_,F;if(this.isRoot)throw new Error("Cannot insert elements at root level");return _=this.parent.children.indexOf(this),F=this.parent.children.splice(_+1),w=this.parent.element(S,E,O),Array.prototype.push.apply(this.parent.children,F),w},k.prototype.remove=function(){var S;if(this.isRoot)throw new Error("Cannot remove the root element");return S=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[S,S-S+1].concat([])),this.parent},k.prototype.node=function(S,E,O){var w,_;return S!=null&&(S=S.valueOf()),E||(E={}),E=E.valueOf(),y(E)||(_=[E,O],O=_[0],E=_[1]),w=new p(this,S,E),O!=null&&w.text(O),this.children.push(w),w},k.prototype.text=function(S){var E;return E=new a(this,S),this.children.push(E),this},k.prototype.cdata=function(S){var E;return E=new h(this,S),this.children.push(E),this},k.prototype.comment=function(S){var E;return E=new m(this,S),this.children.push(E),this},k.prototype.commentBefore=function(S){var E,O;return E=this.parent.children.indexOf(this),O=this.parent.children.splice(E),this.parent.comment(S),Array.prototype.push.apply(this.parent.children,O),this},k.prototype.commentAfter=function(S){var E,O;return E=this.parent.children.indexOf(this),O=this.parent.children.splice(E+1),this.parent.comment(S),Array.prototype.push.apply(this.parent.children,O),this},k.prototype.raw=function(S){var E;return E=new t(this,S),this.children.push(E),this},k.prototype.instruction=function(S,E){var O,w,_,F,M;if(S!=null&&(S=S.valueOf()),E!=null&&(E=E.valueOf()),Array.isArray(S))for(F=0,M=S.length;F<M;F++)O=S[F],this.instruction(O);else if(y(S))for(O in S)C.call(S,O)&&(w=S[O],this.instruction(O,w));else g(E)&&(E=E.apply()),_=new s(this,S,E),this.children.push(_);return this},k.prototype.instructionBefore=function(S,E){var O,w;return O=this.parent.children.indexOf(this),w=this.parent.children.splice(O),this.parent.instruction(S,E),Array.prototype.push.apply(this.parent.children,w),this},k.prototype.instructionAfter=function(S,E){var O,w;return O=this.parent.children.indexOf(this),w=this.parent.children.splice(O+1),this.parent.instruction(S,E),Array.prototype.push.apply(this.parent.children,w),this},k.prototype.declaration=function(S,E,O){var w,_;return w=this.document(),_=new u(w,S,E,O),w.children[0]instanceof u?w.children[0]=_:w.children.unshift(_),w.root()||w},k.prototype.doctype=function(S,E){var O,w,_,F,M,b,X,B,U,W;for(w=this.document(),_=new o(w,S,E),U=w.children,F=M=0,X=U.length;M<X;F=++M)if((O=U[F])instanceof o)return w.children[F]=_,_;for(W=w.children,F=b=0,B=W.length;b<B;F=++b)if(O=W[F],O.isRoot)return w.children.splice(F,0,_),_;return w.children.push(_),_},k.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},k.prototype.root=function(){var S;for(S=this;S;){if(S.isDocument)return S.rootObject;if(S.isRoot)return S;S=S.parent}},k.prototype.document=function(){var S;for(S=this;S;){if(S.isDocument)return S;S=S.parent}},k.prototype.end=function(S){return this.document().end(S)},k.prototype.prev=function(){var S;if((S=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[S-1]},k.prototype.next=function(){var S;if((S=this.parent.children.indexOf(this))===-1||S===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[S+1]},k.prototype.importDocument=function(S){var E;return E=S.root().clone(),E.parent=this,E.isRoot=!1,this.children.push(E),this},k.prototype.ele=function(S,E,O){return this.element(S,E,O)},k.prototype.nod=function(S,E,O){return this.node(S,E,O)},k.prototype.txt=function(S){return this.text(S)},k.prototype.dat=function(S){return this.cdata(S)},k.prototype.com=function(S){return this.comment(S)},k.prototype.ins=function(S,E){return this.instruction(S,E)},k.prototype.doc=function(){return this.document()},k.prototype.dec=function(S,E,O){return this.declaration(S,E,O)},k.prototype.dtd=function(S,E){return this.doctype(S,E)},k.prototype.e=function(S,E,O){return this.element(S,E,O)},k.prototype.n=function(S,E,O){return this.node(S,E,O)},k.prototype.t=function(S){return this.text(S)},k.prototype.d=function(S){return this.cdata(S)},k.prototype.c=function(S){return this.comment(S)},k.prototype.r=function(S){return this.raw(S)},k.prototype.i=function(S,E){return this.instruction(S,E)},k.prototype.u=function(){return this.up()},k.prototype.importXMLBuilder=function(S){return this.importDocument(S)},k}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(r,I,f){"use strict";var h=r("babel-runtime/core-js/object/create"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);(function(){var u,o=function(s,t){function a(){this.constructor=s}for(var c in t)p.call(t,c)&&(s[c]=t[c]);return a.prototype=t.prototype,s.prototype=new a,s.__super__=t.prototype,s},p={}.hasOwnProperty;u=r("./XMLNode"),I.exports=function(s){function t(a,c,g){if(t.__super__.constructor.call(this,a),c==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(c),g&&(this.value=this.stringify.insValue(g))}return o(t,s),t.prototype.clone=function(){return(0,m.default)(this)},t.prototype.toString=function(a){return this.options.writer.set(a).processingInstruction(this)},t}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(r,I,f){"use strict";var h=r("babel-runtime/core-js/object/create"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);(function(){var u,o=function(s,t){function a(){this.constructor=s}for(var c in t)p.call(t,c)&&(s[c]=t[c]);return a.prototype=t.prototype,s.prototype=new a,s.__super__=t.prototype,s},p={}.hasOwnProperty;u=r("./XMLNode"),I.exports=function(s){function t(a,c){if(t.__super__.constructor.call(this,a),c==null)throw new Error("Missing raw text");this.value=this.stringify.raw(c)}return o(t,s),t.prototype.clone=function(){return(0,m.default)(this)},t.prototype.toString=function(a){return this.options.writer.set(a).raw(this)},t}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(r,I,f){"use strict";(function(){var h,m,u,o,p,s,t,a,c,g,y,d,C,k=function(E,O){function w(){this.constructor=E}for(var _ in O)S.call(O,_)&&(E[_]=O[_]);return w.prototype=O.prototype,E.prototype=new w,E.__super__=O.prototype,E},S={}.hasOwnProperty;t=r("./XMLDeclaration"),a=r("./XMLDocType"),h=r("./XMLCData"),m=r("./XMLComment"),c=r("./XMLElement"),y=r("./XMLRaw"),d=r("./XMLText"),g=r("./XMLProcessingInstruction"),u=r("./XMLDTDAttList"),o=r("./XMLDTDElement"),p=r("./XMLDTDEntity"),s=r("./XMLDTDNotation"),C=r("./XMLWriterBase"),I.exports=function(E){function O(w,_){O.__super__.constructor.call(this,_),this.stream=w}return k(O,E),O.prototype.document=function(w){var _,F,M,b,X,B,U,W;for(B=w.children,F=0,b=B.length;F<b;F++)_=B[F],_.isLastRootNode=!1;for(w.children[w.children.length-1].isLastRootNode=!0,U=w.children,W=[],M=0,X=U.length;M<X;M++)switch(_=U[M],!1){case!(_ instanceof t):W.push(this.declaration(_));break;case!(_ instanceof a):W.push(this.docType(_));break;case!(_ instanceof m):W.push(this.comment(_));break;case!(_ instanceof g):W.push(this.processingInstruction(_));break;default:W.push(this.element(_))}return W},O.prototype.attribute=function(w){return this.stream.write(" "+w.name+'="'+w.value+'"')},O.prototype.cdata=function(w,_){return this.stream.write(this.space(_)+"<![CDATA["+w.text+"]]>"+this.endline(w))},O.prototype.comment=function(w,_){return this.stream.write(this.space(_)+"<!-- "+w.text+" -->"+this.endline(w))},O.prototype.declaration=function(w,_){return this.stream.write(this.space(_)),this.stream.write('<?xml version="'+w.version+'"'),w.encoding!=null&&this.stream.write(' encoding="'+w.encoding+'"'),w.standalone!=null&&this.stream.write(' standalone="'+w.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(w))},O.prototype.docType=function(w,_){var F,M,b,X;if(_||(_=0),this.stream.write(this.space(_)),this.stream.write("<!DOCTYPE "+w.root().name),w.pubID&&w.sysID?this.stream.write(' PUBLIC "'+w.pubID+'" "'+w.sysID+'"'):w.sysID&&this.stream.write(' SYSTEM "'+w.sysID+'"'),w.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(w)),X=w.children,M=0,b=X.length;M<b;M++)switch(F=X[M],!1){case!(F instanceof u):this.dtdAttList(F,_+1);break;case!(F instanceof o):this.dtdElement(F,_+1);break;case!(F instanceof p):this.dtdEntity(F,_+1);break;case!(F instanceof s):this.dtdNotation(F,_+1);break;case!(F instanceof h):this.cdata(F,_+1);break;case!(F instanceof m):this.comment(F,_+1);break;case!(F instanceof g):this.processingInstruction(F,_+1);break;default:throw new Error("Unknown DTD node type: "+F.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(w))},O.prototype.element=function(w,_){var F,M,b,X,B,U,W,ne;_||(_=0),ne=this.space(_),this.stream.write(ne+"<"+w.name),U=w.attributes;for(B in U)S.call(U,B)&&(F=U[B],this.attribute(F));if(w.children.length===0||w.children.every(function(re){return re.value===""}))this.allowEmpty?this.stream.write("></"+w.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&w.children.length===1&&w.children[0].value!=null)this.stream.write(">"),this.stream.write(w.children[0].value),this.stream.write("</"+w.name+">");else{for(this.stream.write(">"+this.newline),W=w.children,b=0,X=W.length;b<X;b++)switch(M=W[b],!1){case!(M instanceof h):this.cdata(M,_+1);break;case!(M instanceof m):this.comment(M,_+1);break;case!(M instanceof c):this.element(M,_+1);break;case!(M instanceof y):this.raw(M,_+1);break;case!(M instanceof d):this.text(M,_+1);break;case!(M instanceof g):this.processingInstruction(M,_+1);break;default:throw new Error("Unknown XML node type: "+M.constructor.name)}this.stream.write(ne+"</"+w.name+">")}return this.stream.write(this.endline(w))},O.prototype.processingInstruction=function(w,_){return this.stream.write(this.space(_)+"<?"+w.target),w.value&&this.stream.write(" "+w.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(w))},O.prototype.raw=function(w,_){return this.stream.write(this.space(_)+w.value+this.endline(w))},O.prototype.text=function(w,_){return this.stream.write(this.space(_)+w.value+this.endline(w))},O.prototype.dtdAttList=function(w,_){return this.stream.write(this.space(_)+"<!ATTLIST "+w.elementName+" "+w.attributeName+" "+w.attributeType),w.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+w.defaultValueType),w.defaultValue&&this.stream.write(' "'+w.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(w))},O.prototype.dtdElement=function(w,_){return this.stream.write(this.space(_)+"<!ELEMENT "+w.name+" "+w.value),this.stream.write(this.spacebeforeslash+">"+this.endline(w))},O.prototype.dtdEntity=function(w,_){return this.stream.write(this.space(_)+"<!ENTITY"),w.pe&&this.stream.write(" %"),this.stream.write(" "+w.name),w.value?this.stream.write(' "'+w.value+'"'):(w.pubID&&w.sysID?this.stream.write(' PUBLIC "'+w.pubID+'" "'+w.sysID+'"'):w.sysID&&this.stream.write(' SYSTEM "'+w.sysID+'"'),w.nData&&this.stream.write(" NDATA "+w.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(w))},O.prototype.dtdNotation=function(w,_){return this.stream.write(this.space(_)+"<!NOTATION "+w.name),w.pubID&&w.sysID?this.stream.write(' PUBLIC "'+w.pubID+'" "'+w.sysID+'"'):w.pubID?this.stream.write(' PUBLIC "'+w.pubID+'"'):w.sysID&&this.stream.write(' SYSTEM "'+w.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(w))},O.prototype.endline=function(w){return w.isLastRootNode?"":this.newline},O}(C)}).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(r,I,f){"use strict";(function(){var h,m,u,o,p,s,t,a,c,g,y,d,C,k=function(E,O){function w(){this.constructor=E}for(var _ in O)S.call(O,_)&&(E[_]=O[_]);return w.prototype=O.prototype,E.prototype=new w,E.__super__=O.prototype,E},S={}.hasOwnProperty;t=r("./XMLDeclaration"),a=r("./XMLDocType"),h=r("./XMLCData"),m=r("./XMLComment"),c=r("./XMLElement"),y=r("./XMLRaw"),d=r("./XMLText"),g=r("./XMLProcessingInstruction"),u=r("./XMLDTDAttList"),o=r("./XMLDTDElement"),p=r("./XMLDTDEntity"),s=r("./XMLDTDNotation"),C=r("./XMLWriterBase"),I.exports=function(E){function O(w){O.__super__.constructor.call(this,w)}return k(O,E),O.prototype.document=function(w){var _,F,M,b,X;for(this.textispresent=!1,b="",X=w.children,F=0,M=X.length;F<M;F++)_=X[F],b+=function(){switch(!1){case!(_ instanceof t):return this.declaration(_);case!(_ instanceof a):return this.docType(_);case!(_ instanceof m):return this.comment(_);case!(_ instanceof g):return this.processingInstruction(_);default:return this.element(_,0)}}.call(this);return this.pretty&&b.slice(-this.newline.length)===this.newline&&(b=b.slice(0,-this.newline.length)),b},O.prototype.attribute=function(w){return" "+w.name+'="'+w.value+'"'},O.prototype.cdata=function(w,_){return this.space(_)+"<![CDATA["+w.text+"]]>"+this.newline},O.prototype.comment=function(w,_){return this.space(_)+"<!-- "+w.text+" -->"+this.newline},O.prototype.declaration=function(w,_){var F;return F=this.space(_),F+='<?xml version="'+w.version+'"',w.encoding!=null&&(F+=' encoding="'+w.encoding+'"'),w.standalone!=null&&(F+=' standalone="'+w.standalone+'"'),F+=this.spacebeforeslash+"?>",F+=this.newline},O.prototype.docType=function(w,_){var F,M,b,X,B;if(_||(_=0),X=this.space(_),X+="<!DOCTYPE "+w.root().name,w.pubID&&w.sysID?X+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(X+=' SYSTEM "'+w.sysID+'"'),w.children.length>0){for(X+=" [",X+=this.newline,B=w.children,M=0,b=B.length;M<b;M++)F=B[M],X+=function(){switch(!1){case!(F instanceof u):return this.dtdAttList(F,_+1);case!(F instanceof o):return this.dtdElement(F,_+1);case!(F instanceof p):return this.dtdEntity(F,_+1);case!(F instanceof s):return this.dtdNotation(F,_+1);case!(F instanceof h):return this.cdata(F,_+1);case!(F instanceof m):return this.comment(F,_+1);case!(F instanceof g):return this.processingInstruction(F,_+1);default:throw new Error("Unknown DTD node type: "+F.constructor.name)}}.call(this);X+="]"}return X+=this.spacebeforeslash+">",X+=this.newline},O.prototype.element=function(w,_){var F,M,b,X,B,U,W,ne,re,ae,ue,V,ye;_||(_=0),ye=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),V=this.space(_),ne="",ne+=V+"<"+w.name,re=w.attributes;for(W in re)S.call(re,W)&&(F=re[W],ne+=this.attribute(F));if(w.children.length===0||w.children.every(function(J){return J.value===""}))this.allowEmpty?ne+="></"+w.name+">"+this.newline:ne+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&w.children.length===1&&w.children[0].value!=null)ne+=">",ne+=w.children[0].value,ne+="</"+w.name+">"+this.newline;else{if(this.dontprettytextnodes){for(ae=w.children,b=0,B=ae.length;b<B;b++)if(M=ae[b],M.value!=null){this.textispresent++,ye=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,V=this.space(_)),ne+=">"+this.newline,ue=w.children,X=0,U=ue.length;X<U;X++)M=ue[X],ne+=function(){switch(!1){case!(M instanceof h):return this.cdata(M,_+1);case!(M instanceof m):return this.comment(M,_+1);case!(M instanceof c):return this.element(M,_+1);case!(M instanceof y):return this.raw(M,_+1);case!(M instanceof d):return this.text(M,_+1);case!(M instanceof g):return this.processingInstruction(M,_+1);default:throw new Error("Unknown XML node type: "+M.constructor.name)}}.call(this);ye&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),ne+=V+"</"+w.name+">"+this.newline}return ne},O.prototype.processingInstruction=function(w,_){var F;return F=this.space(_)+"<?"+w.target,w.value&&(F+=" "+w.value),F+=this.spacebeforeslash+"?>"+this.newline},O.prototype.raw=function(w,_){return this.space(_)+w.value+this.newline},O.prototype.text=function(w,_){return this.space(_)+w.value+this.newline},O.prototype.dtdAttList=function(w,_){var F;return F=this.space(_)+"<!ATTLIST "+w.elementName+" "+w.attributeName+" "+w.attributeType,w.defaultValueType!=="#DEFAULT"&&(F+=" "+w.defaultValueType),w.defaultValue&&(F+=' "'+w.defaultValue+'"'),F+=this.spacebeforeslash+">"+this.newline},O.prototype.dtdElement=function(w,_){return this.space(_)+"<!ELEMENT "+w.name+" "+w.value+this.spacebeforeslash+">"+this.newline},O.prototype.dtdEntity=function(w,_){var F;return F=this.space(_)+"<!ENTITY",w.pe&&(F+=" %"),F+=" "+w.name,w.value?F+=' "'+w.value+'"':(w.pubID&&w.sysID?F+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(F+=' SYSTEM "'+w.sysID+'"'),w.nData&&(F+=" NDATA "+w.nData)),F+=this.spacebeforeslash+">"+this.newline},O.prototype.dtdNotation=function(w,_){var F;return F=this.space(_)+"<!NOTATION "+w.name,w.pubID&&w.sysID?F+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.pubID?F+=' PUBLIC "'+w.pubID+'"':w.sysID&&(F+=' SYSTEM "'+w.sysID+'"'),F+=this.spacebeforeslash+">"+this.newline},O.prototype.openNode=function(w,_){var F,M,b,X;if(_||(_=0),w instanceof c){b=this.space(_)+"<"+w.name,X=w.attributes;for(M in X)S.call(X,M)&&(F=X[M],b+=this.attribute(F));return b+=(w.children?">":"/>")+this.newline}return b=this.space(_)+"<!DOCTYPE "+w.rootNodeName,w.pubID&&w.sysID?b+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(b+=' SYSTEM "'+w.sysID+'"'),b+=(w.children?" [":">")+this.newline},O.prototype.closeNode=function(w,_){switch(_||(_=0),!1){case!(w instanceof c):return this.space(_)+"</"+w.name+">"+this.newline;case!(w instanceof a):return this.space(_)+"]>"+this.newline}},O}(C)}).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(r,I,f){"use strict";(function(){var h=function(u,o){return function(){return u.apply(o,arguments)}},m={}.hasOwnProperty;I.exports=function(){function u(o){this.assertLegalChar=h(this.assertLegalChar,this);var p,s,t;o||(o={}),this.noDoubleEncoding=o.noDoubleEncoding,s=o.stringify||{};for(p in s)m.call(s,p)&&(t=s[p],this[p]=t)}return u.prototype.eleName=function(o){return o=""+o||"",this.assertLegalChar(o)},u.prototype.eleText=function(o){return o=""+o||"",this.assertLegalChar(this.elEscape(o))},u.prototype.cdata=function(o){return o=""+o||"",o=o.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(o)},u.prototype.comment=function(o){if(o=""+o||"",o.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+o);return this.assertLegalChar(o)},u.prototype.raw=function(o){return""+o||""},u.prototype.attName=function(o){return o=""+o||""},u.prototype.attValue=function(o){return o=""+o||"",this.attEscape(o)},u.prototype.insTarget=function(o){return""+o||""},u.prototype.insValue=function(o){if(o=""+o||"",o.match(/\?>/))throw new Error("Invalid processing instruction value: "+o);return o},u.prototype.xmlVersion=function(o){if(o=""+o||"",!o.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+o);return o},u.prototype.xmlEncoding=function(o){if(o=""+o||"",!o.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+o);return o},u.prototype.xmlStandalone=function(o){return o?"yes":"no"},u.prototype.dtdPubID=function(o){return""+o||""},u.prototype.dtdSysID=function(o){return""+o||""},u.prototype.dtdElementValue=function(o){return""+o||""},u.prototype.dtdAttType=function(o){return""+o||""},u.prototype.dtdAttDefault=function(o){return o!=null?""+o||"":o},u.prototype.dtdEntityValue=function(o){return""+o||""},u.prototype.dtdNData=function(o){return""+o||""},u.prototype.convertAttKey="@",u.prototype.convertPIKey="?",u.prototype.convertTextKey="#text",u.prototype.convertCDataKey="#cdata",u.prototype.convertCommentKey="#comment",u.prototype.convertRawKey="#raw",u.prototype.assertLegalChar=function(o){var p;if(p=o.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+o+" at index "+p.index);return o},u.prototype.elEscape=function(o){var p;return p=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,o.replace(p,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},u.prototype.attEscape=function(o){var p;return p=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,o.replace(p,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},u}()}).call(void 0)},{}],233:[function(r,I,f){"use strict";var h=r("babel-runtime/core-js/object/create"),m=function(u){return u&&u.__esModule?u:{default:u}}(h);(function(){var u,o=function(s,t){function a(){this.constructor=s}for(var c in t)p.call(t,c)&&(s[c]=t[c]);return a.prototype=t.prototype,s.prototype=new a,s.__super__=t.prototype,s},p={}.hasOwnProperty;u=r("./XMLNode"),I.exports=function(s){function t(a,c){if(t.__super__.constructor.call(this,a),c==null)throw new Error("Missing element text");this.value=this.stringify.eleText(c)}return o(t,s),t.prototype.clone=function(){return(0,m.default)(this)},t.prototype.toString=function(a){return this.options.writer.set(a).text(this)},t}(u)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(r,I,f){"use strict";(function(){var h={}.hasOwnProperty;I.exports=function(){function m(u){var o,p,s,t,a,c,g,y,d;u||(u={}),this.pretty=u.pretty||!1,this.allowEmpty=(p=u.allowEmpty)!=null&&p,this.pretty?(this.indent=(s=u.indent)!=null?s:" ",this.newline=(t=u.newline)!=null?t:`
`,this.offset=(a=u.offset)!=null?a:0,this.dontprettytextnodes=(c=u.dontprettytextnodes)!=null?c:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(g=u.spacebeforeslash)!=null?g:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,y=u.writer||{};for(o in y)h.call(y,o)&&(d=y[o],this[o]=d)}return m.prototype.set=function(u){var o,p,s;u||(u={}),"pretty"in u&&(this.pretty=u.pretty),"allowEmpty"in u&&(this.allowEmpty=u.allowEmpty),this.pretty?(this.indent="indent"in u?u.indent:" ",this.newline="newline"in u?u.newline:`
`,this.offset="offset"in u?u.offset:0,this.dontprettytextnodes="dontprettytextnodes"in u?u.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in u?u.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,p=u.writer||{};for(o in p)h.call(p,o)&&(s=p[o],this[o]=s);return this},m.prototype.space=function(u){var o;return this.pretty?(o=(u||0)+this.offset+1,o>0?new Array(o).join(this.indent):""):""},m}()}).call(void 0)},{}],235:[function(r,I,f){"use strict";(function(){var h,m,u,o,p,s,t;t=r("./Utility"),p=t.assign,s=t.isFunction,h=r("./XMLDocument"),m=r("./XMLDocumentCB"),o=r("./XMLStringWriter"),u=r("./XMLStreamWriter"),I.exports.create=function(a,c,g,y){var d,C;if(a==null)throw new Error("Root element needs a name");return y=p({},c,g,y),d=new h(y),C=d.element(a),y.headless||(d.declaration(y),y.pubID==null&&y.sysID==null||d.doctype(y)),C},I.exports.begin=function(a,c,g){var y;return s(a)&&(y=[a,c],c=y[0],g=y[1],a={}),c?new m(a,c,g):new h(a)},I.exports.stringWriter=function(a){return new o(a)},I.exports.streamWriter=function(a,c){return new u(a,c)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(r,I,f){function h(){for(var u={},o=0;o<arguments.length;o++){var p=arguments[o];for(var s in p)m.call(p,s)&&(u[s]=p[s])}return u}I.exports=h;var m=Object.prototype.hasOwnProperty},{}],237:[function(r,I,f){"use strict";function h(y,d,C){o.isBuffer(d)||(d=new o(d)),o.isBuffer(C)||(C=new o(C)),d.length>c?d=y(d):d.length<c&&(d=o.concat([d,g],c));for(var k=new o(c),S=new o(c),E=0;E<c;E++)k[E]=54^d[E],S[E]=92^d[E];var O=y(o.concat([k,C]));return y(o.concat([S,O]))}function m(y,d){y=y||"sha1";var C=a[y],k=[],S=0;return C||u("algorithm:",y,"is not yet supported"),{update:function(E){return o.isBuffer(E)||(E=new o(E)),k.push(E),S+=E.length,this},digest:function(E){var O=o.concat(k),w=d?h(C,d,O):C(O);return k=null,E?w.toString(E):w}}}function u(){var y=[].slice.call(arguments).join(" ");throw new Error([y,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}var o=r("buffer").Buffer,p=r("./sha"),s=r("./sha256"),t=r("./md5"),a={sha1:p,sha256:s,md5:t},c=64,g=new o(c);g.fill(0),f.createHash=function(y){return m(y)},f.createHmac=function(y,d){return m(y,d)},function(y,d){for(var C in y)d(y[C],C)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(y){f[y]=function(){u("sorry,",y,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(r,I,f){"use strict";function h(a,c){if(a.length%p!=0){var g=a.length+(p-a.length%p);a=o.concat([a,s],g)}for(var y=[],d=c?a.readInt32BE:a.readInt32LE,C=0;C<a.length;C+=p)y.push(d.call(a,C));return y}function m(a,c,g){for(var y=new o(c),d=g?y.writeInt32BE:y.writeInt32LE,C=0;C<a.length;C++)d.call(y,a[C],4*C,!0);return y}function u(a,c,g,y){return o.isBuffer(a)||(a=new o(a)),m(c(h(a,y),a.length*t),g,y)}var o=r("buffer").Buffer,p=4,s=new o(p);s.fill(0);var t=8;I.exports={hash:u}},{buffer:38}],239:[function(r,I,f){"use strict";function h(g,y){g[y>>5]|=128<<y%32,g[14+(y+64>>>9<<4)]=y;for(var d=1732584193,C=-271733879,k=-1732584194,S=271733878,E=0;E<g.length;E+=16){var O=d,w=C,_=k,F=S;d=u(d,C,k,S,g[E+0],7,-680876936),S=u(S,d,C,k,g[E+1],12,-389564586),k=u(k,S,d,C,g[E+2],17,606105819),C=u(C,k,S,d,g[E+3],22,-1044525330),d=u(d,C,k,S,g[E+4],7,-176418897),S=u(S,d,C,k,g[E+5],12,1200080426),k=u(k,S,d,C,g[E+6],17,-1473231341),C=u(C,k,S,d,g[E+7],22,-45705983),d=u(d,C,k,S,g[E+8],7,1770035416),S=u(S,d,C,k,g[E+9],12,-1958414417),k=u(k,S,d,C,g[E+10],17,-42063),C=u(C,k,S,d,g[E+11],22,-1990404162),d=u(d,C,k,S,g[E+12],7,1804603682),S=u(S,d,C,k,g[E+13],12,-40341101),k=u(k,S,d,C,g[E+14],17,-1502002290),C=u(C,k,S,d,g[E+15],22,1236535329),d=o(d,C,k,S,g[E+1],5,-165796510),S=o(S,d,C,k,g[E+6],9,-1069501632),k=o(k,S,d,C,g[E+11],14,643717713),C=o(C,k,S,d,g[E+0],20,-373897302),d=o(d,C,k,S,g[E+5],5,-701558691),S=o(S,d,C,k,g[E+10],9,38016083),k=o(k,S,d,C,g[E+15],14,-660478335),C=o(C,k,S,d,g[E+4],20,-405537848),d=o(d,C,k,S,g[E+9],5,568446438),S=o(S,d,C,k,g[E+14],9,-1019803690),k=o(k,S,d,C,g[E+3],14,-187363961),C=o(C,k,S,d,g[E+8],20,1163531501),d=o(d,C,k,S,g[E+13],5,-1444681467),S=o(S,d,C,k,g[E+2],9,-51403784),k=o(k,S,d,C,g[E+7],14,1735328473),C=o(C,k,S,d,g[E+12],20,-1926607734),d=p(d,C,k,S,g[E+5],4,-378558),S=p(S,d,C,k,g[E+8],11,-2022574463),k=p(k,S,d,C,g[E+11],16,1839030562),C=p(C,k,S,d,g[E+14],23,-35309556),d=p(d,C,k,S,g[E+1],4,-1530992060),S=p(S,d,C,k,g[E+4],11,1272893353),k=p(k,S,d,C,g[E+7],16,-155497632),C=p(C,k,S,d,g[E+10],23,-1094730640),d=p(d,C,k,S,g[E+13],4,681279174),S=p(S,d,C,k,g[E+0],11,-358537222),k=p(k,S,d,C,g[E+3],16,-722521979),C=p(C,k,S,d,g[E+6],23,76029189),d=p(d,C,k,S,g[E+9],4,-640364487),S=p(S,d,C,k,g[E+12],11,-421815835),k=p(k,S,d,C,g[E+15],16,530742520),C=p(C,k,S,d,g[E+2],23,-995338651),d=s(d,C,k,S,g[E+0],6,-198630844),S=s(S,d,C,k,g[E+7],10,1126891415),k=s(k,S,d,C,g[E+14],15,-1416354905),C=s(C,k,S,d,g[E+5],21,-57434055),d=s(d,C,k,S,g[E+12],6,1700485571),S=s(S,d,C,k,g[E+3],10,-1894986606),k=s(k,S,d,C,g[E+10],15,-1051523),C=s(C,k,S,d,g[E+1],21,-2054922799),d=s(d,C,k,S,g[E+8],6,1873313359),S=s(S,d,C,k,g[E+15],10,-30611744),k=s(k,S,d,C,g[E+6],15,-1560198380),C=s(C,k,S,d,g[E+13],21,1309151649),d=s(d,C,k,S,g[E+4],6,-145523070),S=s(S,d,C,k,g[E+11],10,-1120210379),k=s(k,S,d,C,g[E+2],15,718787259),C=s(C,k,S,d,g[E+9],21,-343485551),d=t(d,O),C=t(C,w),k=t(k,_),S=t(S,F)}return Array(d,C,k,S)}function m(g,y,d,C,k,S){return t(a(t(t(y,g),t(C,S)),k),d)}function u(g,y,d,C,k,S,E){return m(y&d|~y&C,g,y,k,S,E)}function o(g,y,d,C,k,S,E){return m(y&C|d&~C,g,y,k,S,E)}function p(g,y,d,C,k,S,E){return m(y^d^C,g,y,k,S,E)}function s(g,y,d,C,k,S,E){return m(d^(y|~C),g,y,k,S,E)}function t(g,y){var d=(65535&g)+(65535&y);return(g>>16)+(y>>16)+(d>>16)<<16|65535&d}function a(g,y){return g<<y|g>>>32-y}var c=r("./helpers");I.exports=function(g){return c.hash(g,h,16)}},{"./helpers":238}],240:[function(r,I,f){"use strict";function h(t,a){t[a>>5]|=128<<24-a%32,t[15+(a+64>>9<<4)]=a;for(var c=Array(80),g=1732584193,y=-271733879,d=-1732584194,C=271733878,k=-1009589776,S=0;S<t.length;S+=16){for(var E=g,O=y,w=d,_=C,F=k,M=0;M<80;M++){c[M]=M<16?t[S+M]:p(c[M-3]^c[M-8]^c[M-14]^c[M-16],1);var b=o(o(p(g,5),m(M,y,d,C)),o(o(k,c[M]),u(M)));k=C,C=d,d=p(y,30),y=g,g=b}g=o(g,E),y=o(y,O),d=o(d,w),C=o(C,_),k=o(k,F)}return Array(g,y,d,C,k)}function m(t,a,c,g){return t<20?a&c|~a&g:t<40?a^c^g:t<60?a&c|a&g|c&g:a^c^g}function u(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function o(t,a){var c=(65535&t)+(65535&a);return(t>>16)+(a>>16)+(c>>16)<<16|65535&c}function p(t,a){return t<<a|t>>>32-a}var s=r("./helpers");I.exports=function(t){return s.hash(t,h,20,!0)}},{"./helpers":238}],241:[function(r,I,f){"use strict";var h=r("./helpers"),m=function(d,C){var k=(65535&d)+(65535&C);return(d>>16)+(C>>16)+(k>>16)<<16|65535&k},u=function(d,C){return d>>>C|d<<32-C},o=function(d,C){return d>>>C},p=function(d,C,k){return d&C^~d&k},s=function(d,C,k){return d&C^d&k^C&k},t=function(d){return u(d,2)^u(d,13)^u(d,22)},a=function(d){return u(d,6)^u(d,11)^u(d,25)},c=function(d){return u(d,7)^u(d,18)^o(d,3)},g=function(d){return u(d,17)^u(d,19)^o(d,10)},y=function(d,C){var k,S,E,O,w,_,F,M,b,X,B,U,W=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),ne=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),re=new Array(64);d[C>>5]|=128<<24-C%32,d[15+(C+64>>9<<4)]=C;for(var b=0;b<d.length;b+=16){k=ne[0],S=ne[1],E=ne[2],O=ne[3],w=ne[4],_=ne[5],F=ne[6],M=ne[7];for(var X=0;X<64;X++)re[X]=X<16?d[X+b]:m(m(m(g(re[X-2]),re[X-7]),c(re[X-15])),re[X-16]),B=m(m(m(m(M,a(w)),p(w,_,F)),W[X]),re[X]),U=m(t(k),s(k,S,E)),M=F,F=_,_=w,w=m(O,B),O=E,E=S,S=k,k=m(B,U);ne[0]=m(k,ne[0]),ne[1]=m(S,ne[1]),ne[2]=m(E,ne[2]),ne[3]=m(O,ne[3]),ne[4]=m(w,ne[4]),ne[5]=m(_,ne[5]),ne[6]=m(F,ne[6]),ne[7]=m(M,ne[7])}return ne};I.exports=function(d){return h.hash(d,y,32,!0)}},{"./helpers":238}],242:[function(r,I,f){(function(h){"use strict";function m(y){return y&&y.__esModule?y:{default:y}}var u=r("babel-runtime/core-js/object/create"),o=m(u),p=r("babel-runtime/helpers/classCallCheck"),s=m(p),t=r("babel-runtime/helpers/createClass"),a=m(t),c=r("babel-runtime/helpers/typeof"),g=m(c);!function(y){if((f===void 0?"undefined":(0,g.default)(f))==="object"&&I!==void 0)I.exports=y();else if(typeof je=="function"&&je.amd)je([],y);else{var d;d=typeof window!="undefined"?window:h!==void 0?h:typeof self!="undefined"?self:this,d.mime=y()}}(function(){return function y(d,C,k){function S(w,_){if(!C[w]){if(!d[w]){var F=typeof r=="function"&&r;if(!_&&F)return F(w,!0);if(E)return E(w,!0);var M=new Error("Cannot find module '"+w+"'");throw M.code="MODULE_NOT_FOUND",M}var b=C[w]={exports:{}};d[w][0].call(b.exports,function(X){var B=d[w][1][X];return S(B||X)},b,b.exports,y,d,C,k)}return C[w].exports}for(var E=typeof r=="function"&&r,O=0;O<k.length;O++)S(k[O]);return S}({1:[function(y,d,C){var k=function(){function S(){(0,s.default)(this,S),this._types=(0,o.default)(null),this._extensions=(0,o.default)(null);for(var E=0;E<arguments.length;E++)this.define(arguments[E])}return(0,a.default)(S,[{key:"define",value:function(E,O){for(var w in E){for(var _=E[w],F=0;F<_.length;F++){var M=_[F];if(!O&&M in this._types)throw new Error('Attempt to change mapping for "'+M+'" extension from "'+this._types[M]+'" to "'+w+'". Pass `force=true` to allow this, otherwise remove "'+M+'" from the list of extensions for "'+w+'".');this._types[M]=w}!O&&this._extensions[w]||(this._extensions[w]=_[0])}}},{key:"getType",value:function(E){E=String(E);var O=E.replace(/^.*[\/\\]/,"").toLowerCase(),w=O.replace(/^.*\./,"").toLowerCase(),_=O.length<E.length;return(w.length<O.length-1||!_)&&this._types[w]||null}},{key:"getExtension",value:function(E){return(E=/^\s*([^;\s]*)/.test(E)&&RegExp.$1)&&this._extensions[E.toLowerCase()]||null}}]),S}();d.exports=k},{}],2:[function(y,d,C){var k=y("./Mime");d.exports=new k(y("./types/standard"),y("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(y,d,C){d.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(y,d,C){d.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,typeof Fe!="undefined"?Fe:typeof self!="undefined"?self:typeof window!="undefined"?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(r,I,f){"use strict";f.encodeURIComponent=function(h){try{return encodeURIComponent(h)}catch(m){return h}},f.escape=r("escape-html"),f.timestamp=function(h){if(h){var m=h;return typeof m=="string"&&(m=Number(m)),String(h).length===10&&(m*=1e3),new Date(m)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(r,I,f){(function(h,m){"use strict";function u(M){return M&&M.__esModule?M:{default:M}}function o(M,b){return M===void 0?b:M}function p(M,b){return function(X,B,U){if(X)return b(X);M({data:B,status:U.statusCode,headers:U.headers,res:U})}}var s,t=r("babel-runtime/core-js/json/stringify"),a=u(t),c=r("babel-runtime/helpers/typeof"),g=u(c),y=r("util"),d=r("url"),C=r("http"),k=r("https"),S=r("debug")("urllib"),E=r("humanize-ms"),O=0,w=Math.pow(2,31)-10,_=/^https?:\/\//i;f.TIMEOUTS=[E("300s"),E("300s")];var F=["json","text"];f.request=function(M,b,X){return arguments.length===2&&typeof b=="function"&&(X=b,b=null),typeof X=="function"?f.requestWithCallback(M,b,X):(s||(s=r("any-promise")),new s(function(B,U){f.requestWithCallback(M,b,p(B,U))}))},f.requestWithCallback=function(M,b,X){function B(){Ie&&(clearTimeout(Ie),Ie=null)}function U(){P&&(clearTimeout(P),P=null)}function W(Pe,ke,Re){if(U(),!X)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),J,h.pid,pe.method,M),void(Pe&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),J,h.pid,Pe.name,Pe.message,Pe.stack));var Oe=X;X=null;var ce={};if(Re&&(A=Re.statusCode,ce=Re.headers),A===401&&ce["www-authenticate"]&&(!b.headers||!b.headers.Authorization)&&b.digestAuth){var ve=ce["www-authenticate"];if(ve.indexOf("Digest ")>=0)return S("Request#%d %s: got digest auth header WWW-Authenticate: %s",J,M,ve),b.headers=b.headers||{},b.headers.Authorization=digestAuthHeader(pe.method,pe.path,ve,b.digestAuth),S("Request#%d %s: auth with digest header: %s",J,M,b.headers.Authorization),Re.headers["set-cookie"]&&(b.headers.Cookie=Re.headers["set-cookie"].join(";")),f.requestWithCallback(M,b,Oe)}var xe=Date.now()-H;Ne&&(Ne.contentDownload=xe),S("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",xe,x,A,pe.method,pe.host,pe.path,T,Ne);var fe={status:A,statusCode:A,headers:ce,size:x,aborted:oe,rt:xe,keepAliveSocket:T,data:ke,requestUrls:b.requestUrls,timing:Ne,remoteAddress:_e,remotePort:He};if(Pe){var De="";he&&typeof he.getCurrentStatus=="function"&&(De=", agent status: "+(0,a.default)(he.getCurrentStatus())),Pe.message+=", "+pe.method+" "+M+" "+A+" (connected: "+i+", keepalive socket: "+T+De+`)
headers: `+(0,a.default)(ce),Pe.data=ke,Pe.path=pe.path,Pe.status=A,Pe.headers=ce,Pe.res=fe}Oe(Pe,ke,b.streaming?Re:fe),b.emitter&&($.url=M,$.socket=Me&&Me.connection,$.options=pe,$.size=Ee,b.emitter.emit("response",{requestId:J,error:Pe,ctx:b.ctx,req:$,res:fe}))}function ne(Pe){var ke=null;if(b.followRedirect&&statuses.redirect[Pe.statusCode]){b._followRedirectCount=(b._followRedirectCount||0)+1;var Re=Pe.headers.location;if(Re){if(!(b._followRedirectCount>b.maxRedirects)){var Oe=b.formatRedirectUrl?b.formatRedirectUrl(M,Re):d.resolve(M,Re);S("Request#%d %s: `redirected` from %s to %s",J,pe.path,M,Oe),U(),b.headers&&b.headers.Host&&_.test(Re)&&(b.headers.Host=null);var ce=X;return X=null,f.requestWithCallback(Oe,b,ce),{redirect:!0,error:null}}ke=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+M),ke.name="MaxRedirectError"}else ke=new Error("Got statusCode "+Pe.statusCode+" but cannot resolve next location from headers"),ke.name="FollowRedirectError"}return{redirect:!1,error:ke}}function re(Pe,ke,Re){return Re(null,ke,Pe.headers["content-encoding"])}function ae(Pe){if(Ne&&(Ne.waiting=Date.now()-H),S("Request#%d %s `req response` event emit: status %d, headers: %j",J,M,Pe.statusCode,Pe.headers),b.streaming){var ke=ne(Pe);return ke.redirect?void Pe.resume():ke.error?(Pe.resume(),W(ke.error,null,Pe)):W(null,null,Pe)}if(Pe.on("close",function(){S("Request#%d %s: `res close` event emit, total size %d",J,M,x)}),Pe.on("error",function(){S("Request#%d %s: `res error` event emit, total size %d",J,M,x)}),Pe.on("aborted",function(){oe=!0,S("Request#%d %s: `res aborted` event emit, total size %d",J,M,x)}),Be){var ke=ne(Pe);return ke.redirect?void Pe.resume():ke.error?(Pe.resume(),Be.end(),W(ke.error,null,Pe)):(b.consumeWriteStream===!1?Pe.on("end",W.bind(null,null,null,Pe)):isNode010||isNode012?first([[Be,"close"],[Pe,"aborted"]],function(ce,ve,xe){S("Request#%d %s: writeStream or res %s event emitted",J,M,xe),W(e||null,null,Pe)}):Be.on("close",function(){S("Request#%d %s: writeStream close event emitted",J,M),W(e||null,null,Pe)}),Pe.pipe(Be))}var Re=[];Pe.on("data",function(Oe){S("Request#%d %s: `res data` event emit, size %d",J,M,Oe.length),x+=Oe.length,Re.push(Oe)}),Pe.on("end",function(){var Oe=m.concat(Re,x);if(S("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",J,M,x,Pe._dumped),e)return W(e,Oe,Pe);var ce=ne(Pe);if(ce.error)return W(ce.error,Oe,Pe);ce.redirect||re(Pe,Oe,function(ve,xe,fe){if(ve)return W(ve,Oe,Pe);if(!fe&&F.indexOf(b.dataType)>=0){try{xe=decodeBodyByCharset(xe,Pe)}catch(ze){return S("decodeBodyByCharset error: %s",ze),W(null,xe,Pe)}if(b.dataType==="json")if(x===0)xe=null;else{var De=parseJSON(xe,Ae);De.error?ve=De.error:xe=De.data}}oe&&S("Request#%d %s: Remote socket was terminated before `response.end()` was called",J,M),W(ve,xe,Pe)})})}function ue(){S("Response timer ticking, timeout: %d",tt),P=setTimeout(function(){P=null;var Pe="Response timeout for "+tt+"ms";e=new Error(Pe),e.name="ResponseTimeoutError",e.requestId=J,S("ResponseTimeout: Request#%d %s %s: %s, connected: %s",J,M,e.name,Pe,i),V()},tt)}function V(){S("Request#%d %s abort, connected: %s",J,M,i),Me.socket||(e.noSocket=!0,W(e)),Me.abort()}if(!M||typeof M!="string"&&(M===void 0?"undefined":(0,g.default)(M))!=="object"){var ye=y.format("expect request url to be a string or a http request options, but got %j",M);throw new Error(ye)}arguments.length===2&&typeof b=="function"&&(X=b,b=null),b=b||{},O>=w&&(O=0);var J=++O;b.requestUrls=b.requestUrls||[];var $={requestId:J,url:M,args:b,ctx:b.ctx};b.emitter&&b.emitter.emit("request",$),b.timeout=b.timeout||f.TIMEOUTS,b.maxRedirects=b.maxRedirects||10,b.streaming=b.streaming||b.customResponse;var z,H=Date.now();typeof M=="string"?(_.test(M)||(M="http://"+M),z=d.parse(M)):z=M;var Y=(b.type||b.method||z.method||"GET").toUpperCase(),ee=z.port||80,we=C,he=o(b.agent,f.agent),Ae=b.fixJSONCtlChars;z.protocol==="https:"&&(we=k,he=o(b.httpsAgent,f.httpsAgent),z.port||(ee=443));var pe={host:z.hostname||z.host||"localhost",path:z.path||"/",method:Y,port:ee,agent:he,headers:b.headers||{},lookup:b.lookup};Array.isArray(b.timeout)?pe.requestTimeout=b.timeout[b.timeout.length-1]:b.timeout!==void 0&&(pe.requestTimeout=b.timeout);for(var ge=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],se=0;se<ge.length;se++){var ie=ge[se];b.hasOwnProperty(ie)&&(pe[ie]=b[ie])}pe.rejectUnauthorized!==!1||pe.hasOwnProperty("secureOptions")||(pe.secureOptions=r("constants").SSL_OP_NO_TLSv1_2);var Z=b.auth||z.auth;Z&&(pe.auth=Z);var be=b.content||b.data,te=Y==="GET"||Y==="HEAD"||b.dataAsQueryString;if(!b.content&&be&&typeof be!="string"&&!m.isBuffer(be))if(te)be=b.nestedQuerystring?qs.stringify(be):querystring.stringify(be);else{var q=pe.headers["Content-Type"]||pe.headers["content-type"];q||(q=b.contentType==="json"?"application/json":"application/x-www-form-urlencoded",pe.headers["Content-Type"]=q),be=parseContentType(q).type==="application/json"?(0,a.default)(be):b.nestedQuerystring?qs.stringify(be):querystring.stringify(be)}te&&be&&(pe.path+=(z.query?"&":"?")+be,be=null);var Ee=0;if(be){var Se=be.length;m.isBuffer(be)||(Se=m.byteLength(be)),Ee=pe.headers["Content-Length"]=Se}b.dataType==="json"&&(pe.headers.Accept="application/json"),typeof b.beforeRequest=="function"&&b.beforeRequest(pe);var Ie=null,P=null,e=null,i=!1,T=!1,x=0,A=-1,oe=!1,_e="",He="",Ne=null;b.timing&&(Ne={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),pe.headers["User-Agent"]||pe.headers["user-agent"]||(pe.headers["User-Agent"]=navigator.userAgent),b.gzip&&(pe.headers["Accept-Encoding"]||pe.headers["accept-encoding"]||(pe.headers["Accept-Encoding"]="gzip"));var Be=b.writeStream;S("Request#%d %s %s with headers %j, options.path: %s",J,Y,M,pe.headers,pe.path),b.requestUrls.push(M);var $e,tt;Array.isArray(b.timeout)?($e=E(b.timeout[0]),tt=E(b.timeout[1])):$e=tt=E(b.timeout),S("ConnectTimeout: %d, ResponseTimeout: %d",$e,tt);var Me;try{Me=we.request(pe,ae)}catch(Pe){return W(Pe)}return typeof window=="undefined"?function(){S("Connect timer ticking, timeout: %d",$e),Ie=setTimeout(function(){Ie=null,A===-1&&(A=-2);var Pe="Connect timeout for "+$e+"ms",ke="ConnectionTimeoutError";Me.socket||(ke="SocketAssignTimeoutError",Pe+=", working sockets is full"),e=new Error(Pe),e.name=ke,e.requestId=J,S("ConnectTimeout: Request#%d %s %s: %s, connected: %s",J,M,e.name,Pe,i),V()},$e)}():Me.on("requestTimeout",function(){A===-1&&(A=-2);var Pe="Connect timeout for "+$e+"ms";e=new Error(Pe),e.name="ConnectionTimeoutError",e.requestId=J,V()}),Ne&&Me.on("finish",function(){Ne.requestSent=Date.now()-H}),Me.once("socket",function(Pe){Ne&&(Ne.queuing=Date.now()-H),isNode010&&Pe.socket&&(Pe=Pe.socket);var ke=Pe.readyState;if(ke==="opening")return Pe.once("lookup",function(Re,Oe,ce){S("Request#%d %s lookup: %s, %s, %s",J,M,Re,Oe,ce),Ne&&(Ne.dnslookup=Date.now()-H),Oe&&(_e=Oe)}),void Pe.once("connect",function(){Ne&&(Ne.connected=Date.now()-H),B(),ue(),S("Request#%d %s new socket connected",J,M),i=!0,_e||(_e=Pe.remoteAddress),He=Pe.remotePort});S("Request#%d %s reuse socket connected, readyState: %s",J,M,ke),i=!0,T=!0,_e||(_e=Pe.remoteAddress),He=Pe.remotePort,B(),ue()}),Me.on("error",function(Pe){Pe.name!=="Error"&&Pe.name!=="TypeError"||(Pe.name=i?"ResponseError":"RequestError"),Pe.message+=' (req "error")',S("Request#%d %s `req error` event emit, %s: %s",J,M,Pe.name,Pe.message),W(e||Pe)}),Be&&Be.once("error",function(Pe){Pe.message+=' (writeStream "error")',e=Pe,S("Request#%d %s `writeStream error` event emit, %s: %s",J,M,Pe.name,Pe.message),V()}),b.stream?(b.stream.pipe(Me),b.stream.once("error",function(Pe){Pe.message+=' (stream "error")',e=Pe,S("Request#%d %s `readStream error` event emit, %s: %s",J,M,Pe.name,Pe.message),V()})):Me.end(be),Me.requestId=J,Me}}).call(this,r("_process"),r("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(je){function r(f){if(I[f])return I[f].exports;var h=I[f]={i:f,l:!1,exports:{}};return je[f].call(h.exports,h,h.exports,r),h.l=!0,h.exports}var I={};r.m=je,r.c=I,r.d=function(f,h,m){r.o(f,h)||Object.defineProperty(f,h,{configurable:!1,enumerable:!0,get:m})},r.n=function(f){var h=f&&f.__esModule?function(){return f.default}:function(){return f};return r.d(h,"a",h),h},r.o=function(f,h){return Object.prototype.hasOwnProperty.call(f,h)},r.p="",r(r.s=12)}([function(je,r,I){!function(f,h){je.exports=r=h()}(0,function(){var f=f||function(h,m){var u=Object.create||function(){function k(){}return function(S){var E;return k.prototype=S,E=new k,k.prototype=null,E}}(),o={},p=o.lib={},s=p.Base=function(){return{extend:function(k){var S=u(this);return k&&S.mixIn(k),S.hasOwnProperty("init")&&this.init!==S.init||(S.init=function(){S.$super.init.apply(this,arguments)}),S.init.prototype=S,S.$super=this,S},create:function(){var k=this.extend();return k.init.apply(k,arguments),k},init:function(){},mixIn:function(k){for(var S in k)k.hasOwnProperty(S)&&(this[S]=k[S]);k.hasOwnProperty("toString")&&(this.toString=k.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),t=p.WordArray=s.extend({init:function(k,S){k=this.words=k||[],this.sigBytes=S!=null?S:4*k.length},toString:function(k){return(k||c).stringify(this)},concat:function(k){var S=this.words,E=k.words,O=this.sigBytes,w=k.sigBytes;if(this.clamp(),O%4)for(var _=0;_<w;_++){var F=E[_>>>2]>>>24-_%4*8&255;S[O+_>>>2]|=F<<24-(O+_)%4*8}else for(var _=0;_<w;_+=4)S[O+_>>>2]=E[_>>>2];return this.sigBytes+=w,this},clamp:function(){var k=this.words,S=this.sigBytes;k[S>>>2]&=4294967295<<32-S%4*8,k.length=h.ceil(S/4)},clone:function(){var k=s.clone.call(this);return k.words=this.words.slice(0),k},random:function(k){for(var S,E=[],O=0;O<k;O+=4){var w=function(_){var _=_,F=987654321,M=4294967295;return function(){F=36969*(65535&F)+(F>>16)&M,_=18e3*(65535&_)+(_>>16)&M;var b=(F<<16)+_&M;return b/=4294967296,(b+=.5)*(h.random()>.5?1:-1)}}(4294967296*(S||h.random()));S=987654071*w(),E.push(4294967296*w()|0)}return new t.init(E,k)}}),a=o.enc={},c=a.Hex={stringify:function(k){for(var S=k.words,E=k.sigBytes,O=[],w=0;w<E;w++){var _=S[w>>>2]>>>24-w%4*8&255;O.push((_>>>4).toString(16)),O.push((15&_).toString(16))}return O.join("")},parse:function(k){for(var S=k.length,E=[],O=0;O<S;O+=2)E[O>>>3]|=parseInt(k.substr(O,2),16)<<24-O%8*4;return new t.init(E,S/2)}},g=a.Latin1={stringify:function(k){for(var S=k.words,E=k.sigBytes,O=[],w=0;w<E;w++){var _=S[w>>>2]>>>24-w%4*8&255;O.push(String.fromCharCode(_))}return O.join("")},parse:function(k){for(var S=k.length,E=[],O=0;O<S;O++)E[O>>>2]|=(255&k.charCodeAt(O))<<24-O%4*8;return new t.init(E,S)}},y=a.Utf8={stringify:function(k){try{return decodeURIComponent(escape(g.stringify(k)))}catch(S){throw new Error("Malformed UTF-8 data")}},parse:function(k){return g.parse(unescape(encodeURIComponent(k)))}},d=p.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new t.init,this._nDataBytes=0},_append:function(k){typeof k=="string"&&(k=y.parse(k)),this._data.concat(k),this._nDataBytes+=k.sigBytes},_process:function(k){var S=this._data,E=S.words,O=S.sigBytes,w=this.blockSize,_=4*w,F=O/_;F=k?h.ceil(F):h.max((0|F)-this._minBufferSize,0);var M=F*w,b=h.min(4*M,O);if(M){for(var X=0;X<M;X+=w)this._doProcessBlock(E,X);var B=E.splice(0,M);S.sigBytes-=b}return new t.init(B,b)},clone:function(){var k=s.clone.call(this);return k._data=this._data.clone(),k},_minBufferSize:0}),C=(p.Hasher=d.extend({cfg:s.extend(),init:function(k){this.cfg=this.cfg.extend(k),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(k){return this._append(k),this._process(),this},finalize:function(k){return k&&this._append(k),this._doFinalize()},blockSize:16,_createHelper:function(k){return function(S,E){return new k.init(E).finalize(S)}},_createHmacHelper:function(k){return function(S,E){return new C.HMAC.init(k,E).finalize(S)}}}),o.algo={});return o}(Math);return f})},function(je,r,I){"use strict";function f(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function u(o,p){for(var s=0;s<p.length;s++){var t=p[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,p,s){return p&&u(o.prototype,p),s&&u(o,s),o}}(),m=function(){function u(){f(this,u)}return h(u,null,[{key:"detectIEVersion",value:function(){for(var o=4,p=document.createElement("div"),s=p.getElementsByTagName("i");p.innerHTML="<!--[if gt IE "+o+"]><i></i><![endif]-->",s[0];)o++;return o>4&&o}},{key:"extend",value:function(o,p){for(var s in p)Object.prototype.hasOwnProperty.call(p,s)&&p[s]&&(o[s]=p[s])}},{key:"isArray",value:function(o){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(o){return o=o.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(o)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(o)?"audio":/.bmp|.jpg|.jpeg|.png/.test(o)?"img":"other"}},{key:"isImage",value:function(o){return o=o.toLowerCase(),!!/.jpg|.jpeg|.png/.test(o)}},{key:"ISODateString",value:function(o){function p(s){return s<10?"0"+s:s}return o.getUTCFullYear()+"-"+p(o.getUTCMonth()+1)+"-"+p(o.getUTCDate())+"T"+p(o.getUTCHours())+":"+p(o.getUTCMinutes())+":"+p(o.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(o){return!!/^\d+$/.test(o)}}]),u}();r.default=m},function(je,r,I){!function(f,h){je.exports=r=h(I(0))}(0,function(f){return function(h){function m(C,k,S,E,O,w,_){var F=C+(k&S|~k&E)+O+_;return(F<<w|F>>>32-w)+k}function u(C,k,S,E,O,w,_){var F=C+(k&E|S&~E)+O+_;return(F<<w|F>>>32-w)+k}function o(C,k,S,E,O,w,_){var F=C+(k^S^E)+O+_;return(F<<w|F>>>32-w)+k}function p(C,k,S,E,O,w,_){var F=C+(S^(k|~E))+O+_;return(F<<w|F>>>32-w)+k}var s=f,t=s.lib,a=t.WordArray,c=t.Hasher,g=s.algo,y=[];!function(){for(var C=0;C<64;C++)y[C]=4294967296*h.abs(h.sin(C+1))|0}();var d=g.MD5=c.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(C,k){for(var S=0;S<16;S++){var E=k+S,O=C[E];C[E]=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8)}var w=this._hash.words,_=C[k+0],F=C[k+1],M=C[k+2],b=C[k+3],X=C[k+4],B=C[k+5],U=C[k+6],W=C[k+7],ne=C[k+8],re=C[k+9],ae=C[k+10],ue=C[k+11],V=C[k+12],ye=C[k+13],J=C[k+14],$=C[k+15],z=w[0],H=w[1],Y=w[2],ee=w[3];z=m(z,H,Y,ee,_,7,y[0]),ee=m(ee,z,H,Y,F,12,y[1]),Y=m(Y,ee,z,H,M,17,y[2]),H=m(H,Y,ee,z,b,22,y[3]),z=m(z,H,Y,ee,X,7,y[4]),ee=m(ee,z,H,Y,B,12,y[5]),Y=m(Y,ee,z,H,U,17,y[6]),H=m(H,Y,ee,z,W,22,y[7]),z=m(z,H,Y,ee,ne,7,y[8]),ee=m(ee,z,H,Y,re,12,y[9]),Y=m(Y,ee,z,H,ae,17,y[10]),H=m(H,Y,ee,z,ue,22,y[11]),z=m(z,H,Y,ee,V,7,y[12]),ee=m(ee,z,H,Y,ye,12,y[13]),Y=m(Y,ee,z,H,J,17,y[14]),H=m(H,Y,ee,z,$,22,y[15]),z=u(z,H,Y,ee,F,5,y[16]),ee=u(ee,z,H,Y,U,9,y[17]),Y=u(Y,ee,z,H,ue,14,y[18]),H=u(H,Y,ee,z,_,20,y[19]),z=u(z,H,Y,ee,B,5,y[20]),ee=u(ee,z,H,Y,ae,9,y[21]),Y=u(Y,ee,z,H,$,14,y[22]),H=u(H,Y,ee,z,X,20,y[23]),z=u(z,H,Y,ee,re,5,y[24]),ee=u(ee,z,H,Y,J,9,y[25]),Y=u(Y,ee,z,H,b,14,y[26]),H=u(H,Y,ee,z,ne,20,y[27]),z=u(z,H,Y,ee,ye,5,y[28]),ee=u(ee,z,H,Y,M,9,y[29]),Y=u(Y,ee,z,H,W,14,y[30]),H=u(H,Y,ee,z,V,20,y[31]),z=o(z,H,Y,ee,B,4,y[32]),ee=o(ee,z,H,Y,ne,11,y[33]),Y=o(Y,ee,z,H,ue,16,y[34]),H=o(H,Y,ee,z,J,23,y[35]),z=o(z,H,Y,ee,F,4,y[36]),ee=o(ee,z,H,Y,X,11,y[37]),Y=o(Y,ee,z,H,W,16,y[38]),H=o(H,Y,ee,z,ae,23,y[39]),z=o(z,H,Y,ee,ye,4,y[40]),ee=o(ee,z,H,Y,_,11,y[41]),Y=o(Y,ee,z,H,b,16,y[42]),H=o(H,Y,ee,z,U,23,y[43]),z=o(z,H,Y,ee,re,4,y[44]),ee=o(ee,z,H,Y,V,11,y[45]),Y=o(Y,ee,z,H,$,16,y[46]),H=o(H,Y,ee,z,M,23,y[47]),z=p(z,H,Y,ee,_,6,y[48]),ee=p(ee,z,H,Y,W,10,y[49]),Y=p(Y,ee,z,H,J,15,y[50]),H=p(H,Y,ee,z,B,21,y[51]),z=p(z,H,Y,ee,V,6,y[52]),ee=p(ee,z,H,Y,b,10,y[53]),Y=p(Y,ee,z,H,ae,15,y[54]),H=p(H,Y,ee,z,F,21,y[55]),z=p(z,H,Y,ee,ne,6,y[56]),ee=p(ee,z,H,Y,$,10,y[57]),Y=p(Y,ee,z,H,U,15,y[58]),H=p(H,Y,ee,z,ye,21,y[59]),z=p(z,H,Y,ee,X,6,y[60]),ee=p(ee,z,H,Y,ue,10,y[61]),Y=p(Y,ee,z,H,M,15,y[62]),H=p(H,Y,ee,z,re,21,y[63]),w[0]=w[0]+z|0,w[1]=w[1]+H|0,w[2]=w[2]+Y|0,w[3]=w[3]+ee|0},_doFinalize:function(){var C=this._data,k=C.words,S=8*this._nDataBytes,E=8*C.sigBytes;k[E>>>5]|=128<<24-E%32;var O=h.floor(S/4294967296),w=S;k[15+(E+64>>>9<<4)]=16711935&(O<<8|O>>>24)|4278255360&(O<<24|O>>>8),k[14+(E+64>>>9<<4)]=16711935&(w<<8|w>>>24)|4278255360&(w<<24|w>>>8),C.sigBytes=4*(k.length+1),this._process();for(var _=this._hash,F=_.words,M=0;M<4;M++){var b=F[M];F[M]=16711935&(b<<8|b>>>24)|4278255360&(b<<24|b>>>8)}return _},clone:function(){var C=c.clone.call(this);return C._hash=this._hash.clone(),C}});s.MD5=c._createHelper(d),s.HmacMD5=c._createHmacHelper(d)}(Math),f.MD5})},function(je,r,I){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},r.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},r.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(je,r,I){"use strict";function f(d){return d&&d.__esModule?d:{default:d}}function h(d,C){if(!(d instanceof C))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var m=function(){function d(C,k){for(var S=0;S<k.length;S++){var E=k[S];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(C,E.key,E)}}return function(C,k,S){return k&&d(C.prototype,k),S&&d(C,S),C}}(),u=I(5),o=f(u),p=I(25),s=f(p),t=I(6),a=f(t),c=I(7),g=f(c),y=function(){function d(C){h(this,d);var k=g.default.os.name,S=g.default.os.version||"",E=g.default.browser.name,O=g.default.browser.version||"",w=window.location.href,_="";w&&(_=g.default.getHost(w));var F="pc";g.default.os.ipad?F="pad":(g.default.os.iphone||g.default.os.android)&&(F="phone"),this._ri=o.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:a.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:d.getUuid(),os:k,ov:S,et:E,ev:O,uat:navigator.userAgent,app_n:_,tt:F,dm:"h5",ut:""}}return m(d,[{key:"log",value:function(C,k){k&&k.ri?(this._ri=k.ri,delete k.ri):this._ri=o.default.create(),k&&k.ut&&(this.initParam.ut=k.ut,delete k.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=C=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=C;var S=[];if(k)for(var E in k)S.push(E+"="+k[E]);var O=S.join("&");this.initParam.args=encodeURIComponent(O==""?"0":O);var w=[];for(var E in this.initParam)w.push(E+"="+this.initParam[E]);var _=w.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(_):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+_}}],[{key:"getUuid",value:function(){var C=s.default.get("p_h5_upload_u");return C||(C=o.default.create(),s.default.set("p_h5_upload_u",C,730)),C}},{key:"getClientId",value:function(){return s.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(C){return C||(C=o.default.create()),s.default.set("p_h5_upload_clientId",C,730),C}}]),d}();r.default=y},function(je,r,I){"use strict";function f(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function u(o,p){for(var s=0;s<p.length;s++){var t=p[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,p,s){return p&&u(o.prototype,p),s&&u(o,s),o}}(),m=function(){function u(){f(this,u)}return h(u,null,[{key:"create",value:function(o,p){var s,t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),a=[];if(p=p||t.length,o)for(s=0;s<o;s++)a[s]=t[0|Math.random()*p];else{var c;for(a[8]=a[13]=a[18]=a[23]="-",a[14]="4",s=0;s<36;s++)a[s]||(c=0|16*Math.random(),a[s]=t[s==19?3&c|8:c])}return a.join("")}}]),u}();r.default=m},function(je,r,I){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var f={version:"1.5.0"};r.default=f},function(je,r,I){"use strict";function f(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function t(a,c){for(var g=0;g<c.length;g++){var y=c[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}return function(a,c,g){return c&&t(a.prototype,c),g&&t(a,g),a}}(),m=function(t){var a=navigator.userAgent,c="other";if(t.ios)return"iOS";if(t.android)return"android";if(a.indexOf("Baiduspider")>-1)return"Baiduspider";if(a.indexOf("PlayStation")>-1)return"PS4";var g=navigator.platform=="Win32"||navigator.platform=="Windows"||a.indexOf("Windows")>-1,y=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return y&&(c="macOS"),navigator.platform=="X11"&&!g&&!y&&(c="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(c="Linux"),g?"windows":c},u=function(){var t=navigator.userAgent,a="";return(t.indexOf("Windows NT 5.0")>-1||t.indexOf("Windows 2000")>-1)&&(a="2000"),(t.indexOf("Windows NT 5.1")>-1||t.indexOf("Windows XP")>-1)&&(a="XP"),(t.indexOf("Windows NT 5.2")>-1||t.indexOf("Windows 2003")>-1)&&(a="2003"),(t.indexOf("Windows NT 6.0")>-1||t.indexOf("Windows Vista")>-1)&&(a="Vista"),(t.indexOf("Windows NT 6.1")>-1||t.indexOf("Windows 7")>-1)&&(a="7"),(t.indexOf("Windows NT 6.2")>-1||t.indexOf("Windows 8")>-1)&&(a="8"),(t.indexOf("Windows NT 6.3")>-1||t.indexOf("Windows 8.1")>-1)&&(a="8.1"),(t.indexOf("Windows NT 10")>-1||t.indexOf("Windows 10")>-1)&&(a="10"),a},o=function(t){var a=navigator.userAgent.toLowerCase();return t.chrome?"Chrome":t.firefox?"Firefox":t.safari?"Safari":t.webview?"webview":t.ie?/edge/.test(a)?"Edge":"IE":/baiduspider/.test(a)?"Baiduspider":/ucweb/.test(a)||/UCBrowser/.test(a)?"UC":/opera/.test(a)?"Opera":/ucweb/.test(a)?"UC":/360se/.test(a)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(a)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(a)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(a)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(a)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(a)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(a)?"PS4\u6D4F\u89C8\u5668":void 0},p=function(){var t={},a={},c=navigator.userAgent,g=navigator.platform,y=c.match(/Web[kK]it[\/]{0,1}([\d.]+)/),d=c.match(/(Android);?[\s\/]+([\d.]+)?/),C=!!c.match(/\(Macintosh\; Intel /),k=c.match(/(iPad).*OS\s([\d_]+)/),S=c.match(/(iPod)(.*OS\s([\d_]+))?/),E=!k&&c.match(/(iPhone\sOS)\s([\d_]+)/),O=c.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),w=/Win\d{2}|Windows/.test(g),_=c.match(/Windows Phone ([\d.]+)/),F=O&&c.match(/TouchPad/),M=c.match(/Kindle\/([\d.]+)/),b=c.match(/Silk\/([\d._]+)/),X=c.match(/(BlackBerry).*Version\/([\d.]+)/),B=c.match(/(BB10).*Version\/([\d.]+)/),U=c.match(/(RIM\sTablet\sOS)\s([\d.]+)/),W=c.match(/PlayBook/),ne=c.match(/Chrome\/([\d.]+)/)||c.match(/CriOS\/([\d.]+)/),re=c.match(/Firefox\/([\d.]+)/),ae=c.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),ue=c.match(/MSIE\s([\d.]+)/)||c.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),V=!ne&&c.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),ye=V||c.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((a.webkit=!!y)&&(a.version=y[1]),d&&(t.android=!0,t.version=d[2]),E&&!S&&(t.ios=t.iphone=!0,t.version=E[2].replace(/_/g,".")),k&&(t.ios=t.ipad=!0,t.version=k[2].replace(/_/g,".")),S&&(t.ios=t.ipod=!0,t.version=S[3]?S[3].replace(/_/g,"."):null),_&&(t.wp=!0,t.version=_[1]),O&&(t.webos=!0,t.version=O[2]),F&&(t.touchpad=!0),X&&(t.blackberry=!0,t.version=X[2]),B&&(t.bb10=!0,t.version=B[2]),U&&(t.rimtabletos=!0,t.version=U[2]),W&&(a.playbook=!0),M&&(t.kindle=!0,t.version=M[1]),b&&(a.silk=!0,a.version=b[1]),!b&&t.android&&c.match(/Kindle Fire/)&&(a.silk=!0),ne&&(a.chrome=!0,a.version=ne[1]),re&&(a.firefox=!0,a.version=re[1]),ae&&(t.firefoxos=!0,t.version=ae[1]),ue&&(a.ie=!0,a.version=ue[1]),ye&&(C||t.ios||w||d)&&(a.safari=!0,t.ios||(a.version=ye[1])),V&&(a.webview=!0),C){var J=c.match(/[\d]*_[\d]*_[\d]*/);J&&J.length>0&&J[0]&&(t.version=J[0].replace(/_/g,"."))}return t.tablet=!!(k||W||d&&!c.match(/Mobile/)||re&&c.match(/Tablet/)||ue&&!c.match(/Phone/)&&c.match(/Touch/)),t.phone=!(t.tablet||t.ipod||!(d||E||O||X||B||ne&&c.match(/Android/)||ne&&c.match(/CriOS\/([\d.]+)/)||re&&c.match(/Mobile/)||ue&&c.match(/Touch/))),t.pc=!t.tablet&&!t.phone,C?t.name="macOS":w?(t.name="windows",t.version=u()):t.name=m(t),a.name=o(a),{os:t,browser:a}}(),s=function(){function t(){f(this,t)}return h(t,null,[{key:"getHost",value:function(a){var c="";if(a===void 0||a==null||a=="")return"";var g=a.indexOf("//"),y=a;g>-1&&(y=a.substring(g+2));var c=y,d=y.split("/");return d&&d.length>0&&(c=d[0]),d=c.split(":"),d&&d.length>0&&(c=d[0]),c}},{key:"os",get:function(){return p.os}},{key:"browser",get:function(){var a=p.browser;return a.name||(a.name=o()),a}}]),t}();r.default=s},function(je,r,I){"use strict";function f(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function u(o,p){for(var s=0;s<p.length;s++){var t=p[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,p,s){return p&&u(o.prototype,p),s&&u(o,s),o}}(),m=function(){function u(){f(this,u)}return h(u,null,[{key:"get",value:function(o,p,s,t,a){var c;s=s||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(g){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(g){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(g){}throw new Error("This browser does not support XMLHttpRequest.")}),c=new XMLHttpRequest,c.onreadystatechange=function(){c.readyState===4&&(c.status===200?p(c.responseText):s(c.responseText))};try{t===void 0&&(t=!0),c.open("GET",o,t),a&&(c.withCredentials=!0)}catch(g){return void s(g)}try{c.send()}catch(g){s(g)}}}]),u}();r.default=m},function(je,r,I){"use strict";function f(p,s){if(!(p instanceof s))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function p(s,t){for(var a=0;a<t.length;a++){var c=t[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,c.key,c)}}return function(s,t,a){return t&&p(s.prototype,t),a&&p(s,a),s}}(),m=I(27),u=I(30),o=(I(10),function(){function p(){f(this,p)}return h(p,null,[{key:"randomUUID",value:function(){for(var s=[],t="0123456789abcdef",a=0;a<36;a++)s[a]=t.substr(Math.floor(16*Math.random()),1);return s[14]="4",s[19]=t.substr(3&s[19]|8,1),s[8]=s[13]=s[18]=s[23]="-",s.join("")}},{key:"aliyunEncodeURI",value:function(s){var t=encodeURIComponent(s);return t=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(s,t,a){if(!s)throw new Error("PrismPlayer Error: vid should not be null!");var c=[];for(var g in s)c.push(g);for(var y=c.sort(),d="",C=y.length,g=0;g<C;g++){var k=p.aliyunEncodeURI(y[g]),S=p.aliyunEncodeURI(s[y[g]]);d==""?d=k+t+S:d+=a+k+t+S}return d}},{key:"makeChangeSiga",value:function(s,t){if(!s)throw new Error("PrismPlayer Error: vid should not be null!");return u.stringify(m("GET&"+p.aliyunEncodeURI("/")+"&"+p.aliyunEncodeURI(p.makeUTF8sort(s,"=","&")),t+"&"))}}]),p}());r.default=o},function(je,r,I){!function(f,h){je.exports=r=h(I(0))}(0,function(f){return f.enc.Utf8})},function(je,r,I){!function(f,h){je.exports=r=h(I(0))}(0,function(f){return f.enc.Hex})},function(je,r,I){je.exports=I(13)},function(je,r,I){"use strict";var f,h,m=(typeof Symbol=="function"&&Symbol.iterator,I(14)),u=function(p){return p&&p.__esModule?p:{default:p}}(m),o={Vod:u.default};f=[],(h=function(){return o}.apply(r,f))!==void 0&&(je.exports=h),window.AliyunUpload=o,ht.exports=AliyunUpload},function(je,r,I){"use strict";function f(B){return B&&B.__esModule?B:{default:B}}function h(B,U){if(!(B instanceof U))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var m=function(){function B(U,W){for(var ne=0;ne<W.length;ne++){var re=W[ne];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(U,re.key,re)}}return function(U,W,ne){return W&&B(U.prototype,W),ne&&B(U,ne),U}}(),u=I(15),o=I(3),p=I(16),s=f(p),t=I(18),a=f(t),c=I(24),g=f(c),y=I(4),d=f(y),C=I(1),k=f(C),S=I(5),E=f(S),O=I(26),w=f(O),_=I(31),F=f(_),M=I(32),b=f(M),X=(I(2),function(){function B(U){h(this,B),this.options=U,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,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=u.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new d.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=u.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return m(B,[{key:"init",value:function(U,W,ne,re){return this._retryCount=0,!(ne&&!re||!ne&&re)&&!(U&&!W||!U&&W)&&(this._ossCreditor.accessKeyId=U,this._ossCreditor.accessKeySecret=W,this._ossCreditor.securityToken=ne,this._ossCreditor.expireTime=re,!0)}},{key:"addFile",value:function(U,W,ne,re,ae,ue){if(!U)return!1;if(U.size==0)try{this.options.onUploadFailed({file:U},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch($){console.log($)}for(var V=(this.options,0);V<this._uploadList.length;V++)if(this._uploadList[V].file==U)return!1;var ye=new Object;if(ye.file=U,ye._endpoint=W,ye._bucket=ne,ye._object=re,ye.state=u.UPLOADSTATE.INIT,ye.isImage=k.default.isImage(U.name),!ye.isImage&&this.options.enableUploadProgress){var J=this;b.default.getMd5(U,function($){ye.fileHash=$;var z=J._getCheckoutpoint(ye);J.options.localCheckpoint||z||J._getCheckoutpointFromCloud(ye,function(H){if(H.UploadPoint){var Y=JSON.parse(H.UploadPoint);Y.loaded!=1&&(ye.checkpoint=Y.checkpoint,ye.loaded=Y.loaded,ye.videoId=H.VideoId,J._saveCheckoutpoint(ye,Y.checkpoint))}},function(H){try{if((H=JSON.parse(H))&&H.Code=="InvalidParameter"&&H.Message.indexOf("UserId")>0){J._invalidUserId=!0;var Y=H.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Y)}}catch(ee){console.log(ee)}})})}ae&&(ye.videoInfo=ae?JSON.parse(ae).Vod:{},ye.userData=a.default.encode(ae)),ye.ri=E.default.create(),this._uploadList.push(ye),this._reportLog("20001",ye,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(ye)}catch($){console.log($)}return!0}},{key:"deleteFile",value:function(U){return!!this.cancelFile(U)&&(this._uploadList.splice(U,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(U){if(this.options,U<0||U>=this._uploadList.length)return!1;var W=this._uploadList[U];if(U==this._curIndex&&W.state==u.UPLOADSTATE.UPLOADING){W.state=u.UPLOADSTATE.CANCELED;var ne=this._getCheckoutpoint(W);ne&&ne.checkpoint&&(ne=ne.checkpoint),ne&&this._ossUpload.abort(W),this._removeCheckoutpoint(W),this.nextUpload()}else W.state!=u.UPLOADSTATE.SUCCESS&&(W.state=u.UPLOADSTATE.CANCELED);return this._reportLog("20008",W),!0}},{key:"resumeFile",value:function(U){if(this.options,U<0||U>=this._uploadList.length)return!1;var W=this._uploadList[U];return W.state==u.UPLOADSTATE.CANCELED&&(W.state=u.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(U){return this._getCheckoutpoint({file:U})}},{key:"startUpload",value:function(U){if(this._retryCount=0,this.options,this._state==u.VODSTATE.START||this._state==u.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=u.VODSTATE.END);var W=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(W),this._state=u.VODSTATE.START}},{key:"nextUpload",value:function(){var U=this.options;if(this._state==u.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var W=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(W)}else{this._state=u.VODSTATE.END;try{U.onUploadEnd&&U.onUploadEnd(W)}catch(ne){console.log(ne)}}}},{key:"clear",value:function(U){for(var W=this.options,ne=0,re=0;re<this._uploadList.length;re++)W.uploadList[re].state==u.UPLOADSTATE.SUCCESS&&ne++,this._uploadList[re].state==U&&(W.uploadList.splice(re,1),re--);W.onClear&&W.onClear(W.uploadList.length,ne)}},{key:"stopUpload",value:function(){if((this._state==u.VODSTATE.START||this._state==u.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var U=this._uploadList[this._curIndex];this._state=u.VODSTATE.STOP,U.state=u.UPLOADSTATE.STOPED,this._changeState(U,u.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(U){var W=this;if(!U)return!1;var ne=JSON.parse(a.default.decode(U));return!!(ne.AccessKeyId&&ne.AccessKeySecret&&ne.SecurityToken&&ne.Expiration)&&W.resumeUploadWithToken(ne.AccessKeyId,ne.AccessKeySecret,ne.SecurityToken,ne.Expiration)}},{key:"resumeUploadWithToken",value:function(U,W,ne,re){if(this.options,!(U&&W&&ne&&re))return!1;if(this._state!=u.VODSTATE.EXPIRE)return!1;if(this._curIndex==-1)return!1;var ae="";return this._uploadList.length>this._curIndex&&(ae=this._uploadList[this._curIndex]),ae&&(this.init(U,W,ne,re),this._state=u.VODSTATE.START,this._ossUpload=null,this._uploadCore(ae,ae.retry),ae.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(U,W,ne){if(this._curIndex==-1)return!1;if(this._state!=u.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var re=this._uploadList[this._curIndex];re.object?this._refreshSTSTokenUpload(re,U,W,ne):this.setSTSToken(re,U,W,ne)}}},{key:"setSTSTokenDirectlyUpload",value:function(U,W,ne,re,ae){if(!(W&&ne&&re&&ae))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var ue=U;this.init(W,ne,re,ae),ue.endpoint=ue._endpoint,ue.bucket=ue._bucket,ue.object=ue._object,this._ossUpload=null,this._uploadCore(ue,U.retry),U.retry=!1}},{key:"setSTSToken",value:function(U,W,ne,re){if(!W||!ne||!re)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var ae=U.videoInfo,ue={accessKeyId:W,securityToken:re,accessKeySecret:ne,fileName:U.file.name,title:ae.Title,requestId:U.ri,region:this.options.region};ae.ImageType&&(ue.imageType=ae.ImageType),ae.ImageExt&&(ue.imageExt=ae.ImageExt),ae.FileSize&&(ue.fileSize=ae.FileSize),ae.Description&&(ue.description=ae.Description),ae.CateId&&(ue.cateId=ae.CateId),ae.Tags&&(ue.tags=ae.Tags),ae.TemplateGroupId&&(ue.templateGroupId=ae.TemplateGroupId),ae.StorageLocation&&(ue.storageLocation=ae.StorageLocation),ae.CoverURL&&(ue.coverUrl=ae.CoverURL),ae.TransCodeMode&&(ue.transCodeMode=ae.TransCodeMode),ae.UserData&&(ue.userData=ae.UserData);var V=this,ye="getUploadAuth";U.videoId?(ue.videoId=U.videoId,ye="refreshUploadAuth"):U.isImage&&(ye="getImageUploadAuth"),w.default[ye](ue,function(J){U.videoId=J.VideoId?J.VideoId:U.videoId,V.setUploadAuthAndAddress(U,J.UploadAuth,J.UploadAddress),V._state=u.VODSTATE.START},function(J){V._error(U,{name:J.Code,code:J.Code,message:J.Message,requestId:J.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(U,W,ne,re){if(!U||!W||!ne)return!1;var ae=JSON.parse(a.default.decode(W));if(!(ae.AccessKeyId&&ae.AccessKeySecret&&ae.SecurityToken&&ae.Expiration))return console.error("uploadauth is invalid"),!1;var ue={},V=U;if(ne){if(ue=JSON.parse(a.default.decode(ne)),!ue.Endpoint||!ue.Bucket||!ue.FileName)return console.error("uploadAddress is invalid"),!1}else ue.Endpoint=V.endpoint,ue.Bucket=V.bucket,ue.FileName=V.object;this._ut="vod",this._uploadWay="vod",this.options.region=ae.Region||this.options.region,this.init(ae.AccessKeyId,ae.AccessKeySecret,ae.SecurityToken,ae.Expiration),V.endpoint=V._endpoint?V._endpoint:ue.Endpoint,V.bucket=V._bucket?V._bucket:ue.Bucket,V.object=V._object?V._object:ue.FileName,V.region=this.options.region,re&&(V.videoId=re),this._ossUpload=null,this._uploadCore(V,U.retry),U.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(U,W,ne,re){if(!W||!ne||!re)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var ae={accessKeyId:W,securityToken:re,accessKeySecret:ne,videoId:U.object,requestId:U.ri,region:this.options.region},ue=this,V="refreshUploadAuth";U.isImage&&(V="getImageUploadAuth"),w.default[V](ae,function(ye){ue.setUploadAuthAndAddress(U,ye.UploadAuth,UploadAddress),ue._state=u.VODSTATE.START},function(ye){ue._error(U,{name:ye.Code,code:ye.Code,message:ye.Message,requestId:ye.RequestId})})}},{key:"_upload",value:function(U){var W=arguments.length>1&&arguments[1]!==void 0&&arguments[1],ne=this.options;if(U.retry=W,ne.onUploadstarted&&!W)try{var re=this._getCheckoutpoint(U);re&&re.state!=u.UPLOADSTATE.UPLOADING&&(U.checkpoint=re,U.videoId=re.videoId),ne.onUploadstarted(U)}catch(ae){console.log(ae)}}},{key:"_uploadCore",value:function(U){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(U.state=u.UPLOADSTATE.UPLOADING,!this._ossUpload){U.endpoint=U.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var W=this;this._ossUpload=new s.default({bucket:U.bucket,endpoint:U.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(J,$){W._error.call(W,J,$)},oncomplete:function(J,$){W._complete.call(W,J,$)},onprogress:function(J,$,z){W._progress.call(W,J,$,z)}})}var ne=k.default.getFileType(U.file.name),re=this._getCheckoutpoint(U),ae="",ue="";re&&re.checkpoint&&(ue=re.state,ae=re.videoId,re=re.checkpoint),re&&ae==U.videoId&&ue!=u.UPLOADSTATE.UPLOADING&&(re.file=U.file,U.checkpoint=re,re.uploadId);var V=this._adjustPartSize(U);this._reportLog("20002",U,{ft:ne,fs:U.file.size,bu:U.bucket,ok:U.object,vid:U.videoId||"",fn:U.file.name,fw:null,fh:null,ps:V});var ye={headers:{"x-oss-notification":U.userData?U.userData:""},partSize:V,parallel:this.options.parallel};this._ossUpload.upload(U,ye)}},{key:"_findUploadIndex",value:function(){for(var U=-1,W=0;W<this._uploadList.length;W++)if(this._uploadList[W].state==u.UPLOADSTATE.INIT){U=W;break}return U}},{key:"_error",value:function(U,W){if(W.name=="cancel")try{this.options.onUploadCanceled(U,W)}catch(re){console.log(re)}else{if(W.message.indexOf("InvalidAccessKeyIdError")>0||W.name=="SignatureDoesNotMatchError"||W.code=="SecurityTokenExpired"||W.code=="InvalidSecurityToken.Expired"||W.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=u.VODSTATE.EXPIRE,U.state=u.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(U,W)}catch(re){console.log(re)}}return}if((W.name=="RequestTimeoutError"||W.name=="ConnectionTimeout"||W.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var ne=this;return setTimeout(function(){ne._uploadCore(U,!0)},1e3*ne._retryDuration),void this._retryCount++}W.name=="NoSuchUploadError"&&this._removeCheckoutpoint(U),this._handleError(U,W)}}},{key:"_handleError",value:function(U,W){var ne=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],re=u.UPLOADSTATE.FAIlURE;if(U.state!=u.UPLOADSTATE.CANCELED&&(U.state=u.UPLOADSTATE.FAIlURE,this._state=u.VODSTATE.FAILURE,this.options.onUploadFailed&&W&&W.code&&W.message))try{this.options.onUploadFailed(U,W.code,W.message)}catch(ue){console.log(ue)}if(ne&&this._changeState(U,re),this._reportLog("20006",U,{code:W.name,message:W.message,requestId:W.requestId,fs:U.file.size,bu:U.bucket,ok:U.object,fn:U.file.name}),this._reportLog("20004",U,{requestId:W.requestId,fs:U.file.size,bu:U.bucket,ok:U.object,fn:U.file.name}),U.ri=E.default.create(),this._findUploadIndex()!=-1){var ae=this;this._state=u.VODSTATE.START,setTimeout(function(){ae.nextUpload()},100)}}},{key:"_complete",value:function(U,W){if(U.state=u.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(U)}catch(ae){console.log(ae)}var ne=0;W&&W.res&&W.res.headers&&(ne=W.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(U);var re=this;setTimeout(function(){re.nextUpload()},100),this._retryCount=0,this._reportLog("20003",U,{requestId:ne})}},{key:"_progress",value:function(U,W,ne){if(this.options.onUploadProgress)try{U.loaded=W.loaded,this.options.onUploadProgress(U,W.total,W.loaded)}catch($){console.log($)}var re=W.checkpoint,ae=0;re&&(U.checkpoint=re,this._saveCheckoutpoint(U,re,u.UPLOADSTATE.UPLOADING),ae=re.uploadId),this._retryCount=0;var ue=this._getPortNumber(re),V=0;if(ne&&ne.headers&&(V=ne.headers["x-oss-request-id"]),W.loaded!=0&&this._reportLog("20007",U,{pn:ue,requestId:V}),W.loaded!=1&&this._reportLog("20005",U,{UploadId:ae,pn:ue+1,pr:U.retry?1:0,fs:U.file.size,bu:U.bucket,ok:U.object,fn:U.file.name}),!this._invalidUserId&&!U.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var ye={file:U.file,checkpoint:W,userId:this.options.userId,videoId:U.videoId,region:this.options.region,fileHash:U.fileHash};try{var J=this;F.default.upload(ye,function(){},function($){if(($=JSON.parse($))&&$.Code=="InvalidParameter"&&$.Message.indexOf("UserId")>0){J._invalidUserId=!0;var z=$.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(z)}})}catch($){console.log($)}}}},{key:"_getPortNumber",value:function(U){if(U){var W=U.doneParts;if(W&&W.length>0)return W[W.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(U){var W=this._getCheckoutpointKey(U);g.default.remove(W)}},{key:"_getCheckoutpoint",value:function(U){var W=this._getCheckoutpointKey(U),ne=g.default.get(W);if(ne)try{return JSON.parse(ne)}catch(re){}return""}},{key:"_saveCheckoutpoint",value:function(U,W,ne){if(W){var re=this._getCheckoutpointKey(U),ae=U.file,ue={fileName:ae.name,lastModified:ae.lastModified,size:ae.size,object:U.object,videoId:U.videoId,bucket:U.bucket,endpoint:U.endpoint,checkpoint:W,loaded:U.loaded,state:ne};g.default.set(re,JSON.stringify(ue))}}},{key:"_changeState",value:function(U,W){var ne=this._getCheckoutpoint(U);ne&&((this._onbeforeunload=!0)&&(W=u.UPLOADSTATE.STOPED),this._saveCheckoutpoint(U,ne.checkpoint,W))}},{key:"_getCheckoutpointKey",value:function(U){return"upload_"+U.file.lastModified+"_"+U.file.name+"_"+U.file.size}},{key:"_getCheckoutpointFromCloud",value:function(U,W,ne){var re={userId:this.options.userId,uploadInfoList:[{FileName:U.file.name,FileSize:U.file.size,FileCreateTime:U.file.lastModified,FileHash:U.fileHash}],region:this.options.region};F.default.get(re,function(ae){W(ae)},ne)}},{key:"_reportLog",value:function(U,W,ne){ne||(ne={}),ne.ri=W.ri,this._ut&&(ne.ut=this._ut),this._log.log(U,ne)}},{key:"_initEvent",value:function(){var U=this;window&&(window.onbeforeunload=function(W){if(U._onbeforeunload=!0,U._curIndex!=-1&&U._uploadList.length>U._curIndex){var ne=U._uploadList[U._curIndex];U._changeState(ne,u.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var U=0;U<this._uploadList.length;U++){var W=this._uploadList[U];W.state!=u.UPLOADSTATE.FAIlURE&&W.state!=u.UPLOADSTATE.STOPED||(W.state=u.UPLOADSTATE.INIT)}this._state=u.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(U){return U.file.size/this.options.partSize>1e4?U.file.size/9999:this.options.partSize}}]),B}());r.default=X},function(je,r,I){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},r.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(je,r,I){"use strict";function f(t){return t&&t.__esModule?t:{default:t}}function h(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var m=function(){function t(a,c){for(var g=0;g<c.length;g++){var y=c[g];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}return function(a,c,g){return c&&t(a.prototype,c),g&&t(a,g),a}}(),u=I(3),o=I(17),p=(f(o),I(1)),s=(f(p),function(){function t(a,c){if(h(this,t),a){this._config=a,this.create(this._config),this._uploadInfo=null,this._callback={};var g=function(){};this._callback.onerror=c.onerror||g,this._callback.oncomplete=c.oncomplete||g,this._callback.onprogress=c.onprogress||g}}return m(t,[{key:"create",value:function(a){if(a.endpoint=a.endpoint||this._config.endpoint,a.bucket=a.bucket||this._config.bucket,!(a.AccessKeyId&&a.AccessKeySecret&&a.endpoint&&a.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var c={accessKeyId:a.AccessKeyId,accessKeySecret:a.AccessKeySecret,stsToken:a.SecurityToken,endpoint:a.endpoint||this._config.endpoint,bucket:a.bucket||this._config.bucket,secure:!0,cname:a.cname};a.timeout&&(c.timeout=a.timeout),this.oss=new OSS.Wrapper(c)}},{key:"abort",value:function(a){if(a.checkpoint){var c=a.checkpoint.uploadId;this.oss.abortMultipartUpload(a.object,c)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(a,c){this._uploadInfo=a;var g=this,y=function(C,k,S){return function(E){g._progress(C,k,S),E()}},d={parallel:c.parallel||this._config.parallel||u.UPLOADDEFAULT.PARALLEL,partSize:c.partSize||this._config.partSize||u.UPLOADDEFAULT.PARTSIZE,progress:y};c.headers&&(d.headers=c.headers),a.checkpoint&&(d.checkpoint=a.checkpoint),a.bucket||(this.oss.options.bucket=a.bucket),a.endpoint||(this.oss.options.endpoint=a.endpoint),this.oss.multipartUpload(a.object,a.file,d).then(function(C,k){g._complete(C)}).catch(function(C){g.oss.cancel&&(g.oss&&g.oss.isCancel()?console.log("oss is cancel as error"):g.oss.cancel()),g._error(C)})}},{key:"header",value:function(a,c,g){this.oss.get(a.object).then(function(y){c(y)}).catch(function(y){g(y)})}},{key:"_progress",value:function(a,c,g){this._callback.onprogress(this._uploadInfo,{loaded:a,total:this._uploadInfo.file.size,checkpoint:c},g)}},{key:"_error",value:function(a){this._callback.onerror(this._uploadInfo,a)}},{key:"_complete",value:function(a){this._callback.oncomplete(this._uploadInfo,a)}}]),t}());r.default=s},function(je,r,I){"use strict";function f(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function u(o,p){for(var s=0;s<p.length;s++){var t=p[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,p,s){return p&&u(o.prototype,p),s&&u(o,s),o}}(),m=function(){function u(){f(this,u)}return h(u,null,[{key:"format",value:function(o){if(arguments.length<2)return null;for(var p=arguments[1],s=1;s<arguments.length;s++){var t=new RegExp("\\{"+(s-1)+"\\}","gm");p=p.replace(t,arguments[s+1])}return{code:o,message:p}}},{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:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),u}();r.default=m},function(je,r,I){"use strict";(function(f){function h(o,p){if(!(o instanceof p))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var m=function(){function o(p,s){for(var t=0;t<s.length;t++){var a=s[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(p,a.key,a)}}return function(p,s,t){return s&&o(p.prototype,s),t&&o(p,t),p}}(),u=function(){function o(){h(this,o)}return m(o,null,[{key:"encode",value:function(p){return new f(p).toString("base64")}},{key:"decode",value:function(p){return new f(p,"base64").toString()}}]),o}();r.default=u}).call(r,I(19).Buffer)},function(je,r,I){"use strict";(function(f){function h(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function m(P,e){if(h()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(P=new Uint8Array(e),P.__proto__=u.prototype):(P===null&&(P=new u(e)),P.length=e),P}function u(P,e,i){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(P,e,i);if(typeof P=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return t(this,P)}return o(this,P,e,i)}function o(P,e,i,T){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer?g(P,e,i,T):typeof e=="string"?a(P,e,i):y(P,e)}function p(P){if(typeof P!="number")throw new TypeError('"size" argument must be a number');if(P<0)throw new RangeError('"size" argument must not be negative')}function s(P,e,i,T){return p(e),e<=0?m(P,e):i!==void 0?typeof T=="string"?m(P,e).fill(i,T):m(P,e).fill(i):m(P,e)}function t(P,e){if(p(e),P=m(P,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)P[i]=0;return P}function a(P,e,i){if(typeof i=="string"&&i!==""||(i="utf8"),!u.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var T=0|k(e,i);P=m(P,T);var x=P.write(e,i);return x!==T&&(P=P.slice(0,x)),P}function c(P,e){var i=e.length<0?0:0|d(e.length);P=m(P,i);for(var T=0;T<i;T+=1)P[T]=255&e[T];return P}function g(P,e,i,T){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(T||0))throw new RangeError("'length' is out of bounds");return e=i===void 0&&T===void 0?new Uint8Array(e):T===void 0?new Uint8Array(e,i):new Uint8Array(e,i,T),u.TYPED_ARRAY_SUPPORT?(P=e,P.__proto__=u.prototype):P=c(P,e),P}function y(P,e){if(u.isBuffer(e)){var i=0|d(e.length);return P=m(P,i),P.length===0||e.copy(P,0,0,i),P}if(e){if(typeof ArrayBuffer!="undefined"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||be(e.length)?m(P,0):c(P,e);if(e.type==="Buffer"&&Ee(e.data))return c(P,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(P){if(P>=h())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h().toString(16)+" bytes");return 0|P}function C(P){return+P!=P&&(P=0),u.alloc(+P)}function k(P,e){if(u.isBuffer(P))return P.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(P)||P instanceof ArrayBuffer))return P.byteLength;typeof P!="string"&&(P=""+P);var i=P.length;if(i===0)return 0;for(var T=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return pe(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return ie(P).length;default:if(T)return pe(P).length;e=(""+e).toLowerCase(),T=!0}}function S(P,e,i){var T=!1;if((e===void 0||e<0)&&(e=0),e>this.length)return"";if((i===void 0||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,e>>>=0,i<=e)return"";for(P||(P="utf8");;)switch(P){case"hex":return ue(this,e,i);case"utf8":case"utf-8":return W(this,e,i);case"ascii":return re(this,e,i);case"latin1":case"binary":return ae(this,e,i);case"base64":return U(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,e,i);default:if(T)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),T=!0}}function E(P,e,i){var T=P[e];P[e]=P[i],P[i]=T}function O(P,e,i,T,x){if(P.length===0)return-1;if(typeof i=="string"?(T=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=x?0:P.length-1),i<0&&(i=P.length+i),i>=P.length){if(x)return-1;i=P.length-1}else if(i<0){if(!x)return-1;i=0}if(typeof e=="string"&&(e=u.from(e,T)),u.isBuffer(e))return e.length===0?-1:w(P,e,i,T,x);if(typeof e=="number")return e&=255,u.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?x?Uint8Array.prototype.indexOf.call(P,e,i):Uint8Array.prototype.lastIndexOf.call(P,e,i):w(P,[e],i,T,x);throw new TypeError("val must be string, number or Buffer")}function w(P,e,i,T,x){function A(Me,Pe){return oe===1?Me[Pe]:Me.readUInt16BE(Pe*oe)}var oe=1,_e=P.length,He=e.length;if(T!==void 0&&((T=String(T).toLowerCase())==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(P.length<2||e.length<2)return-1;oe=2,_e/=2,He/=2,i/=2}var Ne;if(x){var Be=-1;for(Ne=i;Ne<_e;Ne++)if(A(P,Ne)===A(e,Be===-1?0:Ne-Be)){if(Be===-1&&(Be=Ne),Ne-Be+1===He)return Be*oe}else Be!==-1&&(Ne-=Ne-Be),Be=-1}else for(i+He>_e&&(i=_e-He),Ne=i;Ne>=0;Ne--){for(var $e=!0,tt=0;tt<He;tt++)if(A(P,Ne+tt)!==A(e,tt)){$e=!1;break}if($e)return Ne}return-1}function _(P,e,i,T){i=Number(i)||0;var x=P.length-i;T?(T=Number(T))>x&&(T=x):T=x;var A=e.length;if(A%2!=0)throw new TypeError("Invalid hex string");T>A/2&&(T=A/2);for(var oe=0;oe<T;++oe){var _e=parseInt(e.substr(2*oe,2),16);if(isNaN(_e))return oe;P[i+oe]=_e}return oe}function F(P,e,i,T){return Z(pe(e,P.length-i),P,i,T)}function M(P,e,i,T){return Z(ge(e),P,i,T)}function b(P,e,i,T){return M(P,e,i,T)}function X(P,e,i,T){return Z(ie(e),P,i,T)}function B(P,e,i,T){return Z(se(e,P.length-i),P,i,T)}function U(P,e,i){return e===0&&i===P.length?te.fromByteArray(P):te.fromByteArray(P.slice(e,i))}function W(P,e,i){i=Math.min(P.length,i);for(var T=[],x=e;x<i;){var A=P[x],oe=null,_e=A>239?4:A>223?3:A>191?2:1;if(x+_e<=i){var He,Ne,Be,$e;switch(_e){case 1:A<128&&(oe=A);break;case 2:He=P[x+1],(192&He)==128&&($e=(31&A)<<6|63&He)>127&&(oe=$e);break;case 3:He=P[x+1],Ne=P[x+2],(192&He)==128&&(192&Ne)==128&&($e=(15&A)<<12|(63&He)<<6|63&Ne)>2047&&($e<55296||$e>57343)&&(oe=$e);break;case 4:He=P[x+1],Ne=P[x+2],Be=P[x+3],(192&He)==128&&(192&Ne)==128&&(192&Be)==128&&($e=(15&A)<<18|(63&He)<<12|(63&Ne)<<6|63&Be)>65535&&$e<1114112&&(oe=$e)}}oe===null?(oe=65533,_e=1):oe>65535&&(oe-=65536,T.push(oe>>>10&1023|55296),oe=56320|1023&oe),T.push(oe),x+=_e}return ne(T)}function ne(P){var e=P.length;if(e<=Se)return String.fromCharCode.apply(String,P);for(var i="",T=0;T<e;)i+=String.fromCharCode.apply(String,P.slice(T,T+=Se));return i}function re(P,e,i){var T="";i=Math.min(P.length,i);for(var x=e;x<i;++x)T+=String.fromCharCode(127&P[x]);return T}function ae(P,e,i){var T="";i=Math.min(P.length,i);for(var x=e;x<i;++x)T+=String.fromCharCode(P[x]);return T}function ue(P,e,i){var T=P.length;(!e||e<0)&&(e=0),(!i||i<0||i>T)&&(i=T);for(var x="",A=e;A<i;++A)x+=Ae(P[A]);return x}function V(P,e,i){for(var T=P.slice(e,i),x="",A=0;A<T.length;A+=2)x+=String.fromCharCode(T[A]+256*T[A+1]);return x}function ye(P,e,i){if(P%1!=0||P<0)throw new RangeError("offset is not uint");if(P+e>i)throw new RangeError("Trying to access beyond buffer length")}function J(P,e,i,T,x,A){if(!u.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>x||e<A)throw new RangeError('"value" argument is out of bounds');if(i+T>P.length)throw new RangeError("Index out of range")}function $(P,e,i,T){e<0&&(e=65535+e+1);for(var x=0,A=Math.min(P.length-i,2);x<A;++x)P[i+x]=(e&255<<8*(T?x:1-x))>>>8*(T?x:1-x)}function z(P,e,i,T){e<0&&(e=4294967295+e+1);for(var x=0,A=Math.min(P.length-i,4);x<A;++x)P[i+x]=e>>>8*(T?x:3-x)&255}function H(P,e,i,T,x,A){if(i+T>P.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function Y(P,e,i,T,x){return x||H(P,e,i,4,34028234663852886e22,-34028234663852886e22),q.write(P,e,i,T,23,4),i+4}function ee(P,e,i,T,x){return x||H(P,e,i,8,17976931348623157e292,-17976931348623157e292),q.write(P,e,i,T,52,8),i+8}function we(P){if(P=he(P).replace(Ie,""),P.length<2)return"";for(;P.length%4!=0;)P+="=";return P}function he(P){return P.trim?P.trim():P.replace(/^\s+|\s+$/g,"")}function Ae(P){return P<16?"0"+P.toString(16):P.toString(16)}function pe(P,e){e=e||1/0;for(var i,T=P.length,x=null,A=[],oe=0;oe<T;++oe){if((i=P.charCodeAt(oe))>55295&&i<57344){if(!x){if(i>56319){(e-=3)>-1&&A.push(239,191,189);continue}if(oe+1===T){(e-=3)>-1&&A.push(239,191,189);continue}x=i;continue}if(i<56320){(e-=3)>-1&&A.push(239,191,189),x=i;continue}i=65536+(x-55296<<10|i-56320)}else x&&(e-=3)>-1&&A.push(239,191,189);if(x=null,i<128){if((e-=1)<0)break;A.push(i)}else if(i<2048){if((e-=2)<0)break;A.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;A.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;A.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return A}function ge(P){for(var e=[],i=0;i<P.length;++i)e.push(255&P.charCodeAt(i));return e}function se(P,e){for(var i,T,x,A=[],oe=0;oe<P.length&&!((e-=2)<0);++oe)i=P.charCodeAt(oe),T=i>>8,x=i%256,A.push(x),A.push(T);return A}function ie(P){return te.toByteArray(we(P))}function Z(P,e,i,T){for(var x=0;x<T&&!(x+i>=e.length||x>=P.length);++x)e[x+i]=P[x];return x}function be(P){return P!==P}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/var te=I(21),q=I(22),Ee=I(23);r.Buffer=u,r.SlowBuffer=C,r.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=f.TYPED_ARRAY_SUPPORT!==void 0?f.TYPED_ARRAY_SUPPORT:function(){try{var P=new Uint8Array(1);return P.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},P.foo()===42&&typeof P.subarray=="function"&&P.subarray(1,1).byteLength===0}catch(e){return!1}}(),r.kMaxLength=h(),u.poolSize=8192,u._augment=function(P){return P.__proto__=u.prototype,P},u.from=function(P,e,i){return o(null,P,e,i)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(P,e,i){return s(null,P,e,i)},u.allocUnsafe=function(P){return t(null,P)},u.allocUnsafeSlow=function(P){return t(null,P)},u.isBuffer=function(P){return!(P==null||!P._isBuffer)},u.compare=function(P,e){if(!u.isBuffer(P)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(P===e)return 0;for(var i=P.length,T=e.length,x=0,A=Math.min(i,T);x<A;++x)if(P[x]!==e[x]){i=P[x],T=e[x];break}return i<T?-1:T<i?1:0},u.isEncoding=function(P){switch(String(P).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}},u.concat=function(P,e){if(!Ee(P))throw new TypeError('"list" argument must be an Array of Buffers');if(P.length===0)return u.alloc(0);var i;if(e===void 0)for(e=0,i=0;i<P.length;++i)e+=P[i].length;var T=u.allocUnsafe(e),x=0;for(i=0;i<P.length;++i){var A=P[i];if(!u.isBuffer(A))throw new TypeError('"list" argument must be an Array of Buffers');A.copy(T,x),x+=A.length}return T},u.byteLength=k,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var P=this.length;if(P%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<P;e+=2)E(this,e,e+1);return this},u.prototype.swap32=function(){var P=this.length;if(P%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<P;e+=4)E(this,e,e+3),E(this,e+1,e+2);return this},u.prototype.swap64=function(){var P=this.length;if(P%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<P;e+=8)E(this,e,e+7),E(this,e+1,e+6),E(this,e+2,e+5),E(this,e+3,e+4);return this},u.prototype.toString=function(){var P=0|this.length;return P===0?"":arguments.length===0?W(this,0,P):S.apply(this,arguments)},u.prototype.equals=function(P){if(!u.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P||u.compare(this,P)===0},u.prototype.inspect=function(){var P="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(P=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(P+=" ... ")),"<Buffer "+P+">"},u.prototype.compare=function(P,e,i,T,x){if(!u.isBuffer(P))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),i===void 0&&(i=P?P.length:0),T===void 0&&(T=0),x===void 0&&(x=this.length),e<0||i>P.length||T<0||x>this.length)throw new RangeError("out of range index");if(T>=x&&e>=i)return 0;if(T>=x)return-1;if(e>=i)return 1;if(e>>>=0,i>>>=0,T>>>=0,x>>>=0,this===P)return 0;for(var A=x-T,oe=i-e,_e=Math.min(A,oe),He=this.slice(T,x),Ne=P.slice(e,i),Be=0;Be<_e;++Be)if(He[Be]!==Ne[Be]){A=He[Be],oe=Ne[Be];break}return A<oe?-1:oe<A?1:0},u.prototype.includes=function(P,e,i){return this.indexOf(P,e,i)!==-1},u.prototype.indexOf=function(P,e,i){return O(this,P,e,i,!0)},u.prototype.lastIndexOf=function(P,e,i){return O(this,P,e,i,!1)},u.prototype.write=function(P,e,i,T){if(e===void 0)T="utf8",i=this.length,e=0;else if(i===void 0&&typeof e=="string")T=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,T===void 0&&(T="utf8")):(T=i,i=void 0)}var x=this.length-e;if((i===void 0||i>x)&&(i=x),P.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");for(var A=!1;;)switch(T){case"hex":return _(this,P,e,i);case"utf8":case"utf-8":return F(this,P,e,i);case"ascii":return M(this,P,e,i);case"latin1":case"binary":return b(this,P,e,i);case"base64":return X(this,P,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,P,e,i);default:if(A)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),A=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Se=4096;u.prototype.slice=function(P,e){var i=this.length;P=~~P,e=e===void 0?i:~~e,P<0?(P+=i)<0&&(P=0):P>i&&(P=i),e<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<P&&(e=P);var T;if(u.TYPED_ARRAY_SUPPORT)T=this.subarray(P,e),T.__proto__=u.prototype;else{var x=e-P;T=new u(x,void 0);for(var A=0;A<x;++A)T[A]=this[A+P]}return T},u.prototype.readUIntLE=function(P,e,i){P|=0,e|=0,i||ye(P,e,this.length);for(var T=this[P],x=1,A=0;++A<e&&(x*=256);)T+=this[P+A]*x;return T},u.prototype.readUIntBE=function(P,e,i){P|=0,e|=0,i||ye(P,e,this.length);for(var T=this[P+--e],x=1;e>0&&(x*=256);)T+=this[P+--e]*x;return T},u.prototype.readUInt8=function(P,e){return e||ye(P,1,this.length),this[P]},u.prototype.readUInt16LE=function(P,e){return e||ye(P,2,this.length),this[P]|this[P+1]<<8},u.prototype.readUInt16BE=function(P,e){return e||ye(P,2,this.length),this[P]<<8|this[P+1]},u.prototype.readUInt32LE=function(P,e){return e||ye(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+16777216*this[P+3]},u.prototype.readUInt32BE=function(P,e){return e||ye(P,4,this.length),16777216*this[P]+(this[P+1]<<16|this[P+2]<<8|this[P+3])},u.prototype.readIntLE=function(P,e,i){P|=0,e|=0,i||ye(P,e,this.length);for(var T=this[P],x=1,A=0;++A<e&&(x*=256);)T+=this[P+A]*x;return x*=128,T>=x&&(T-=Math.pow(2,8*e)),T},u.prototype.readIntBE=function(P,e,i){P|=0,e|=0,i||ye(P,e,this.length);for(var T=e,x=1,A=this[P+--T];T>0&&(x*=256);)A+=this[P+--T]*x;return x*=128,A>=x&&(A-=Math.pow(2,8*e)),A},u.prototype.readInt8=function(P,e){return e||ye(P,1,this.length),128&this[P]?-1*(255-this[P]+1):this[P]},u.prototype.readInt16LE=function(P,e){e||ye(P,2,this.length);var i=this[P]|this[P+1]<<8;return 32768&i?4294901760|i:i},u.prototype.readInt16BE=function(P,e){e||ye(P,2,this.length);var i=this[P+1]|this[P]<<8;return 32768&i?4294901760|i:i},u.prototype.readInt32LE=function(P,e){return e||ye(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},u.prototype.readInt32BE=function(P,e){return e||ye(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},u.prototype.readFloatLE=function(P,e){return e||ye(P,4,this.length),q.read(this,P,!0,23,4)},u.prototype.readFloatBE=function(P,e){return e||ye(P,4,this.length),q.read(this,P,!1,23,4)},u.prototype.readDoubleLE=function(P,e){return e||ye(P,8,this.length),q.read(this,P,!0,52,8)},u.prototype.readDoubleBE=function(P,e){return e||ye(P,8,this.length),q.read(this,P,!1,52,8)},u.prototype.writeUIntLE=function(P,e,i,T){(P=+P,e|=0,i|=0,!T)&&J(this,P,e,i,Math.pow(2,8*i)-1,0);var x=1,A=0;for(this[e]=255&P;++A<i&&(x*=256);)this[e+A]=P/x&255;return e+i},u.prototype.writeUIntBE=function(P,e,i,T){(P=+P,e|=0,i|=0,!T)&&J(this,P,e,i,Math.pow(2,8*i)-1,0);var x=i-1,A=1;for(this[e+x]=255&P;--x>=0&&(A*=256);)this[e+x]=P/A&255;return e+i},u.prototype.writeUInt8=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),this[e]=255&P,e+1},u.prototype.writeUInt16LE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&P,this[e+1]=P>>>8):$(this,P,e,!0),e+2},u.prototype.writeUInt16BE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=P>>>8,this[e+1]=255&P):$(this,P,e,!1),e+2},u.prototype.writeUInt32LE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=P>>>24,this[e+2]=P>>>16,this[e+1]=P>>>8,this[e]=255&P):z(this,P,e,!0),e+4},u.prototype.writeUInt32BE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=P>>>24,this[e+1]=P>>>16,this[e+2]=P>>>8,this[e+3]=255&P):z(this,P,e,!1),e+4},u.prototype.writeIntLE=function(P,e,i,T){if(P=+P,e|=0,!T){var x=Math.pow(2,8*i-1);J(this,P,e,i,x-1,-x)}var A=0,oe=1,_e=0;for(this[e]=255&P;++A<i&&(oe*=256);)P<0&&_e===0&&this[e+A-1]!==0&&(_e=1),this[e+A]=(P/oe>>0)-_e&255;return e+i},u.prototype.writeIntBE=function(P,e,i,T){if(P=+P,e|=0,!T){var x=Math.pow(2,8*i-1);J(this,P,e,i,x-1,-x)}var A=i-1,oe=1,_e=0;for(this[e+A]=255&P;--A>=0&&(oe*=256);)P<0&&_e===0&&this[e+A+1]!==0&&(_e=1),this[e+A]=(P/oe>>0)-_e&255;return e+i},u.prototype.writeInt8=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(P=Math.floor(P)),P<0&&(P=255+P+1),this[e]=255&P,e+1},u.prototype.writeInt16LE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&P,this[e+1]=P>>>8):$(this,P,e,!0),e+2},u.prototype.writeInt16BE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=P>>>8,this[e+1]=255&P):$(this,P,e,!1),e+2},u.prototype.writeInt32LE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&P,this[e+1]=P>>>8,this[e+2]=P>>>16,this[e+3]=P>>>24):z(this,P,e,!0),e+4},u.prototype.writeInt32BE=function(P,e,i){return P=+P,e|=0,i||J(this,P,e,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),u.TYPED_ARRAY_SUPPORT?(this[e]=P>>>24,this[e+1]=P>>>16,this[e+2]=P>>>8,this[e+3]=255&P):z(this,P,e,!1),e+4},u.prototype.writeFloatLE=function(P,e,i){return Y(this,P,e,!0,i)},u.prototype.writeFloatBE=function(P,e,i){return Y(this,P,e,!1,i)},u.prototype.writeDoubleLE=function(P,e,i){return ee(this,P,e,!0,i)},u.prototype.writeDoubleBE=function(P,e,i){return ee(this,P,e,!1,i)},u.prototype.copy=function(P,e,i,T){if(i||(i=0),T||T===0||(T=this.length),e>=P.length&&(e=P.length),e||(e=0),T>0&&T<i&&(T=i),T===i)return 0;if(P.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),P.length-e<T-i&&(T=P.length-e+i);var x,A=T-i;if(this===P&&i<e&&e<T)for(x=A-1;x>=0;--x)P[x+e]=this[x+i];else if(A<1e3||!u.TYPED_ARRAY_SUPPORT)for(x=0;x<A;++x)P[x+e]=this[x+i];else Uint8Array.prototype.set.call(P,this.subarray(i,i+A),e);return A},u.prototype.fill=function(P,e,i,T){if(typeof P=="string"){if(typeof e=="string"?(T=e,e=0,i=this.length):typeof i=="string"&&(T=i,i=this.length),P.length===1){var x=P.charCodeAt(0);x<256&&(P=x)}if(T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!u.isEncoding(T))throw new TypeError("Unknown encoding: "+T)}else typeof P=="number"&&(P&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;e>>>=0,i=i===void 0?this.length:i>>>0,P||(P=0);var A;if(typeof P=="number")for(A=e;A<i;++A)this[A]=P;else{var oe=u.isBuffer(P)?P:pe(new u(P,T).toString()),_e=oe.length;for(A=0;A<i-e;++A)this[A+e]=oe[A%_e]}return this};var Ie=/[^+\/0-9A-Za-z-_]/g}).call(r,I(20))},function(je,r){var I;I=function(){return this}();try{I=I||Function("return this")()||(0,eval)("this")}catch(f){typeof window=="object"&&(I=window)}je.exports=I},function(je,r,I){"use strict";function f(d){var C=d.length;if(C%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return d[C-2]==="="?2:d[C-1]==="="?1:0}function h(d){return 3*d.length/4-f(d)}function m(d){var C,k,S,E,O,w=d.length;E=f(d),O=new a(3*w/4-E),k=E>0?w-4:w;var _=0;for(C=0;C<k;C+=4)S=t[d.charCodeAt(C)]<<18|t[d.charCodeAt(C+1)]<<12|t[d.charCodeAt(C+2)]<<6|t[d.charCodeAt(C+3)],O[_++]=S>>16&255,O[_++]=S>>8&255,O[_++]=255&S;return E===2?(S=t[d.charCodeAt(C)]<<2|t[d.charCodeAt(C+1)]>>4,O[_++]=255&S):E===1&&(S=t[d.charCodeAt(C)]<<10|t[d.charCodeAt(C+1)]<<4|t[d.charCodeAt(C+2)]>>2,O[_++]=S>>8&255,O[_++]=255&S),O}function u(d){return s[d>>18&63]+s[d>>12&63]+s[d>>6&63]+s[63&d]}function o(d,C,k){for(var S,E=[],O=C;O<k;O+=3)S=(d[O]<<16)+(d[O+1]<<8)+d[O+2],E.push(u(S));return E.join("")}function p(d){for(var C,k=d.length,S=k%3,E="",O=[],w=0,_=k-S;w<_;w+=16383)O.push(o(d,w,w+16383>_?_:w+16383));return S===1?(C=d[k-1],E+=s[C>>2],E+=s[C<<4&63],E+="=="):S===2&&(C=(d[k-2]<<8)+d[k-1],E+=s[C>>10],E+=s[C>>4&63],E+=s[C<<2&63],E+="="),O.push(E),O.join("")}r.byteLength=h,r.toByteArray=m,r.fromByteArray=p;for(var s=[],t=[],a=typeof Uint8Array!="undefined"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,y=c.length;g<y;++g)s[g]=c[g],t[c.charCodeAt(g)]=g;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63},function(je,r){r.read=function(I,f,h,m,u){var o,p,s=8*u-m-1,t=(1<<s)-1,a=t>>1,c=-7,g=h?u-1:0,y=h?-1:1,d=I[f+g];for(g+=y,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+I[f+g],g+=y,c-=8);for(p=o&(1<<-c)-1,o>>=-c,c+=m;c>0;p=256*p+I[f+g],g+=y,c-=8);if(o===0)o=1-a;else{if(o===t)return p?NaN:1/0*(d?-1:1);p+=Math.pow(2,m),o-=a}return(d?-1:1)*p*Math.pow(2,o-m)},r.write=function(I,f,h,m,u,o){var p,s,t,a=8*o-u-1,c=(1<<a)-1,g=c>>1,y=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=m?0:o-1,C=m?1:-1,k=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(s=isNaN(f)?1:0,p=c):(p=Math.floor(Math.log(f)/Math.LN2),f*(t=Math.pow(2,-p))<1&&(p--,t*=2),f+=p+g>=1?y/t:y*Math.pow(2,1-g),f*t>=2&&(p++,t/=2),p+g>=c?(s=0,p=c):p+g>=1?(s=(f*t-1)*Math.pow(2,u),p+=g):(s=f*Math.pow(2,g-1)*Math.pow(2,u),p=0));u>=8;I[h+d]=255&s,d+=C,s/=256,u-=8);for(p=p<<u|s,a+=u;a>0;I[h+d]=255&p,d+=C,p/=256,a-=8);I[h+d-C]|=128*k}},function(je,r){var I={}.toString;je.exports=Array.isArray||function(f){return I.call(f)=="[object Array]"}},function(je,r,I){"use strict";function f(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function u(o,p){for(var s=0;s<p.length;s++){var t=p[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,p,s){return p&&u(o.prototype,p),s&&u(o,s),o}}(),m=function(){function u(){f(this,u)}return h(u,null,[{key:"set",value:function(o,p){try{window.localStorage&&localStorage.setItem(o,p)}catch(s){window[o+"_localStorage"]=p}}},{key:"get",value:function(o){try{if(window.localStorage)return localStorage.getItem(o)}catch(p){return window[o+"_localStorage"]}return""}},{key:"remove",value:function(o){try{window.localStorage&&localStorage.removeItem(o)}catch(p){delete window[o+"_localStorage"]}}}]),u}();r.default=m},function(je,r,I){"use strict";function f(u,o){if(!(u instanceof o))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function u(o,p){for(var s=0;s<p.length;s++){var t=p[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(o,t.key,t)}}return function(o,p,s){return p&&u(o.prototype,p),s&&u(o,s),o}}(),m=function(){function u(){f(this,u)}return h(u,null,[{key:"get",value:function(o){for(var p=o+"",s=document.cookie.split(";"),t=0;t<s.length;t++){var a=s[t].trim();if(a.indexOf(p)==0)return unescape(a.substring(p.length+1,a.length))}return""}},{key:"set",value:function(o,p,s){var t=new Date;t.setTime(t.getTime()+24*s*60*60*1e3);var a="expires="+t.toGMTString();document.cookie=o+"="+escape(p)+"; "+a}}]),u}();r.default=m},function(je,r,I){"use strict";function f(a){return a&&a.__esModule?a:{default:a}}function h(a,c){if(!(a instanceof c))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var m=function(){function a(c,g){for(var y=0;y<g.length;y++){var d=g[y];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(c,d.key,d)}}return function(c,g,y){return g&&a(c.prototype,g),y&&a(c,y),c}}(),u=I(8),o=f(u),p=I(9),s=f(p),t=function(){function a(){h(this,a)}return m(a,null,[{key:"refreshUploadAuth",value:function(c,g,y){var d=(s.default.randomUUID(),s.default.randomUUID()),C={AccessKeyId:c.accessKeyId,SecurityToken:c.securityToken,Action:"RefreshUploadVideo",VideoId:c.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:d,RequestId:c.requestId},k=s.default.makeUTF8sort(C,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(C,c.accessKeySecret)),S="https://vod."+c.region+".aliyuncs.com/?"+k;o.default.get(S,function(E){var E=JSON.parse(E);g&&g(E)},function(E){if(y){var O=JSON.parse(E);y(O)}})}},{key:"getUploadAuth",value:function(c,g,y){var d=(s.default.randomUUID(),s.default.randomUUID()),C={AccessKeyId:c.accessKeyId,SecurityToken:c.securityToken,Action:"CreateUploadVideo",Title:c.title,FileName:c.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:d,RequestId:c.requestId};c.fileSize&&(C.FileSize=c.fileSize),c.description&&(C.Description=c.description),c.cateId&&(C.CateId=c.cateId),c.tags&&(C.Tags=c.tags),c.templateGroupId&&(C.TemplateGroupId=c.templateGroupId),c.storageLocation&&(C.StorageLocation=c.storageLocation),c.coverUrl&&(C.CoverURL=c.coverUrl),c.transCodeMode&&(C.TransCodeMode=c.transCodeMode),c.userData&&(C.UserData=JSON.stringify(c.userData));var k=s.default.makeUTF8sort(C,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(C,c.accessKeySecret)),S="https://vod."+c.region+".aliyuncs.com/?"+k;o.default.get(S,function(E){try{E=JSON.parse(E)}catch(O){if(y)return void y({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}g&&g(E)},function(E){if(y){var O={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{O=JSON.parse(E)}catch(w){}y(O)}})}},{key:"getImageUploadAuth",value:function(c,g,y){var d=(s.default.randomUUID(),s.default.randomUUID()),C={AccessKeyId:c.accessKeyId,SecurityToken:c.securityToken,Action:"CreateUploadImage",ImageType:c.imageType?c.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:d,RequestId:c.requestId};c.title&&(C.Title=c.title),c.imageExt&&(C.ImageExt=c.imageExt),c.tags&&(C.Tags=c.tags),c.storageLocation&&(C.StorageLocation=c.storageLocation);var k=s.default.makeUTF8sort(C,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(C,c.accessKeySecret)),S="https://vod."+c.region+".aliyuncs.com/?"+k;o.default.get(S,function(E){E=JSON.parse(E),g&&g(E)},function(E){if(y){var O=JSON.parse(E);y(O)}})}}]),a}();r.default=t},function(je,r,I){!function(f,h,m){je.exports=r=h(I(0),I(28),I(29))}(0,function(f){return f.HmacSHA1})},function(je,r,I){!function(f,h){je.exports=r=h(I(0))}(0,function(f){return function(){var h=f,m=h.lib,u=m.WordArray,o=m.Hasher,p=h.algo,s=[],t=p.SHA1=o.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,c){for(var g=this._hash.words,y=g[0],d=g[1],C=g[2],k=g[3],S=g[4],E=0;E<80;E++){if(E<16)s[E]=0|a[c+E];else{var O=s[E-3]^s[E-8]^s[E-14]^s[E-16];s[E]=O<<1|O>>>31}var w=(y<<5|y>>>27)+S+s[E];w+=E<20?1518500249+(d&C|~d&k):E<40?1859775393+(d^C^k):E<60?(d&C|d&k|C&k)-1894007588:(d^C^k)-899497514,S=k,k=C,C=d<<30|d>>>2,d=y,y=w}g[0]=g[0]+y|0,g[1]=g[1]+d|0,g[2]=g[2]+C|0,g[3]=g[3]+k|0,g[4]=g[4]+S|0},_doFinalize:function(){var a=this._data,c=a.words,g=8*this._nDataBytes,y=8*a.sigBytes;return c[y>>>5]|=128<<24-y%32,c[14+(y+64>>>9<<4)]=Math.floor(g/4294967296),c[15+(y+64>>>9<<4)]=g,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=o.clone.call(this);return a._hash=this._hash.clone(),a}});h.SHA1=o._createHelper(t),h.HmacSHA1=o._createHmacHelper(t)}(),f.SHA1})},function(je,r,I){!function(f,h){je.exports=r=h(I(0))}(0,function(f){!function(){var h=f,m=h.lib,u=m.Base,o=h.enc,p=o.Utf8,s=h.algo;s.HMAC=u.extend({init:function(t,a){t=this._hasher=new t.init,typeof a=="string"&&(a=p.parse(a));var c=t.blockSize,g=4*c;a.sigBytes>g&&(a=t.finalize(a)),a.clamp();for(var y=this._oKey=a.clone(),d=this._iKey=a.clone(),C=y.words,k=d.words,S=0;S<c;S++)C[S]^=1549556828,k[S]^=909522486;y.sigBytes=d.sigBytes=g,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var a=this._hasher,c=a.finalize(t);return a.reset(),a.finalize(this._oKey.clone().concat(c))}})}()})},function(je,r,I){!function(f,h){je.exports=r=h(I(0))}(0,function(f){return function(){function h(s,t,a){for(var c=[],g=0,y=0;y<t;y++)if(y%4){var d=a[s.charCodeAt(y-1)]<<y%4*2,C=a[s.charCodeAt(y)]>>>6-y%4*2;c[g>>>2]|=(d|C)<<24-g%4*8,g++}return o.create(c,g)}var m=f,u=m.lib,o=u.WordArray,p=m.enc;p.Base64={stringify:function(s){var t=s.words,a=s.sigBytes,c=this._map;s.clamp();for(var g=[],y=0;y<a;y+=3)for(var d=t[y>>>2]>>>24-y%4*8&255,C=t[y+1>>>2]>>>24-(y+1)%4*8&255,k=t[y+2>>>2]>>>24-(y+2)%4*8&255,S=d<<16|C<<8|k,E=0;E<4&&y+.75*E<a;E++)g.push(c.charAt(S>>>6*(3-E)&63));var O=c.charAt(64);if(O)for(;g.length%4;)g.push(O);return g.join("")},parse:function(s){var t=s.length,a=this._map,c=this._reverseMap;if(!c){c=this._reverseMap=[];for(var g=0;g<a.length;g++)c[a.charCodeAt(g)]=g}var y=a.charAt(64);if(y){var d=s.indexOf(y);d!==-1&&(t=d)}return h(s,t,c)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),f.enc.Base64})},function(je,r,I){"use strict";function f(_){return _&&_.__esModule?_:{default:_}}function h(_,F){if(!(_ instanceof F))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var m=function(){function _(F,M){for(var b=0;b<M.length;b++){var X=M[b];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(F,X.key,X)}}return function(F,M,b){return M&&_(F.prototype,M),b&&_(F,b),F}}(),u=I(8),o=f(u),p=I(7),s=f(p),t=I(4),a=f(t),c=I(6),g=f(c),y=I(1),d=f(y),C=I(9),k=f(C),S=I(2),E=I(11),O=I(10),w=function(){function _(){h(this,_)}return m(_,null,[{key:"getAuthInfo",value:function(F,M,b){var X=F+"|f#Ylm&^1TppeRhLg|"+b;return M&&(X=F+"|"+M+"|f#Ylm&^1TppeRhLg|"+b),S(O.parse(X)).toString(E)}},{key:"upload",value:function(F,M,b){var X=d.default.ISODateString(new Date),B=Math.floor(new Date().valueOf()/1e3),U=a.default.getClientId();U=a.default.setClientId(U);var W=_.getAuthInfo(F.userId,U,B),ne=k.default.randomUUID(),re={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:s.default.browser.name+(s.default.browser.version||""),AppVersion:g.default.version,AuthTimestamp:B,Timestamp:X,AuthInfo:W,FileName:F.file.name,FileSize:F.file.size,FileCreateTime:F.file.lastModified,FileHash:F.fileHash,UploadId:F.checkpoint.checkpoint.uploadId,PartSize:F.checkpoint.checkpoint.partSize,DonePartsCount:F.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(F.checkpoint),UploadRatio:F.checkpoint.loaded,UserId:F.userId,VideoId:F.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ne};U&&(re.ClientId=U);var ae=k.default.makeUTF8sort(re,"=","&")+"&Signature="+k.default.aliyunEncodeURI(k.default.makeChangeSiga(re,F.accessKeySecret)),ue="https://vod."+F.region+".aliyuncs.com/?"+ae;o.default.get(ue,function(V){M&&M()},function(V){V&&(b(V),console.log(V))})}},{key:"get",value:function(F,M,b){var X=d.default.ISODateString(new Date),B=Math.floor(new Date().valueOf()/1e3),U=a.default.getClientId(),W=_.getAuthInfo(F.userId,U,B),ne=k.default.randomUUID(),re={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:s.default.browser.name+(s.default.browser.version||""),AppVersion:g.default.version,AuthTimestamp:B,Timestamp:X,AuthInfo:W,UserId:F.userId,UploadInfoList:JSON.stringify(F.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:ne};U&&(re.ClientId=U);var ae=k.default.makeUTF8sort(re,"=","&")+"&Signature="+k.default.aliyunEncodeURI(k.default.makeChangeSiga(re,F.accessKeySecret)),ue="https://vod."+F.region+".aliyuncs.com/?"+ae;o.default.get(ue,function(V){var ye={},J=U;V=V?JSON.parse(V):{},V.UploadProgress&&V.UploadProgress.UploadProgressList&&V.UploadProgress.UploadProgressList.length>0&&(ye=V.UploadProgress.UploadProgressList[0],J=ye.ClientId),a.default.setClientId(J),M&&M(ye)},function(V){V&&(b(V),console.log(V))})}}]),_}();r.default=w},function(je,r,I){"use strict";function f(p,s){if(!(p instanceof s))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var h=function(){function p(s,t){for(var a=0;a<t.length;a++){var c=t[a];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,c.key,c)}}return function(s,t,a){return t&&p(s.prototype,t),a&&p(s,a),s}}(),m=I(2),u=I(33),o=(I(11),function(){function p(){f(this,p)}return h(p,null,[{key:"getMd5",value:function(s,t,a){var c=new FileReader;c.onload=function(d){try{if(d&&d.target){var C=m(u.parse(d.target.result)),k=C.toString();t(k)}}catch(S){console.log(S)}},c.onerror=function(d){console.log(d),errorCallback(d)};var g=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,y=g.call(s,0,1024);c.readAsBinaryString(y)}}]),p}());r.default=o},function(je,r,I){!function(f,h){je.exports=r=h(I(0))}(0,function(f){return f.enc.Latin1})}])}).call(this,me("IyRk"))},"rAM+":function(ht,st,me){"use strict";me.d(st,"a",function(){return Ve});var Fe=me("Qw5x");function Ve(je,r){var I;if(typeof Symbol=="undefined"||je[Symbol.iterator]==null){if(Array.isArray(je)||(I=Object(Fe.a)(je))||r&&je&&typeof je.length=="number"){I&&(je=I);var f=0,h=function(){};return{s:h,n:function(){return f>=je.length?{done:!0}:{done:!1,value:je[f++]}},e:function(s){throw s},f:h}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var m=!0,u=!1,o;return{s:function(){I=je[Symbol.iterator]()},n:function(){var s=I.next();return m=s.done,s},e:function(s){u=!0,o=s},f:function(){try{!m&&I.return!=null&&I.return()}finally{if(u)throw o}}}}},rUJ1:function(ht,st){const me=/[&<>"']/,Fe=/[&<>"']/g,Ve=/[<>"']|&(?!#?\w+;)/,je=/[<>"']|&(?!#?\w+;)/g,r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},I=_=>r[_];function f(_,F){if(F){if(me.test(_))return _.replace(Fe,I)}else if(Ve.test(_))return _.replace(je,I);return _}const h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function m(_){return _.replace(h,(F,M)=>(M=M.toLowerCase(),M==="colon"?":":M.charAt(0)==="#"?M.charAt(1)==="x"?String.fromCharCode(parseInt(M.substring(2),16)):String.fromCharCode(+M.substring(1)):""))}const u=/(^|[^\[])\^/g;function o(_,F){_=_.source||_,F=F||"";const M={replace:(b,X)=>(X=X.source||X,X=X.replace(u,"$1"),_=_.replace(b,X),M),getRegex:()=>new RegExp(_,F)};return M}const p=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function t(_,F,M){if(_){let b;try{b=decodeURIComponent(m(M)).replace(p,"").toLowerCase()}catch(X){return null}if(b.indexOf("javascript:")===0||b.indexOf("vbscript:")===0||b.indexOf("data:")===0)return null}F&&!s.test(M)&&(M=d(F,M));try{M=encodeURI(M).replace(/%25/g,"%")}catch(b){return null}return M}const a={},c=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function d(_,F){a[" "+_]||(c.test(_)?a[" "+_]=_+"/":a[" "+_]=E(_,"/",!0)),_=a[" "+_];const M=_.indexOf(":")===-1;return F.substring(0,2)==="//"?M?F:_.replace(g,"$1")+F:F.charAt(0)==="/"?M?F:_.replace(y,"$1")+F:_+F}const C={exec:function(){}};function k(_){let F=1,M,b;for(;F<arguments.length;F++){M=arguments[F];for(b in M)Object.prototype.hasOwnProperty.call(M,b)&&(_[b]=M[b])}return _}function S(_,F){const M=_.replace(/\|/g,(B,U,W)=>{let ne=!1,re=U;for(;--re>=0&&W[re]==="\\";)ne=!ne;return ne?"|":" |"}),b=M.split(/ \|/);let X=0;if(b.length>F)b.splice(F);else for(;b.length<F;)b.push("");for(;X<b.length;X++)b[X]=b[X].trim().replace(/\\\|/g,"|");return b}function E(_,F,M){const b=_.length;if(b===0)return"";let X=0;for(;X<b;){const B=_.charAt(b-X-1);if(B===F&&!M)X++;else if(B!==F&&M)X++;else break}return _.substr(0,b-X)}function O(_,F){if(_.indexOf(F[1])===-1)return-1;const M=_.length;let b=0,X=0;for(;X<M;X++)if(_[X]==="\\")X++;else if(_[X]===F[0])b++;else if(_[X]===F[1]&&(b--,b<0))return X;return-1}function w(_){_&&_.sanitize&&!_.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")}ht.exports={escape:f,unescape:m,edit:o,cleanUrl:t,resolveUrl:d,noopTest:C,merge:k,splitCells:S,rtrim:E,findClosingBracket:O,checkSanitizeDeprecation:w}},sBCT:function(ht,st,me){"use strict";var Fe=me("DZo9"),Ve=me("8z0m"),je=me("+L6B"),r=me("2/Rp"),I=me("MXD1"),f=me("CFYs"),h=me("9og8"),m=me("2qtc"),u=me("kLXV"),o=me("miYZ"),p=me("tsqr"),s=me("y8nQ"),t=me("Vl3Y"),a=me("tJVT"),c=me("k1fw"),g=me("oBTY"),y=me("5NDa"),d=me("5rEg"),C=me("WmNS"),k=me.n(C),S=me("q1tI"),E=me.n(S),O=me("Ty5D"),w=me("55Ip"),_=me("9kvl"),F=me("kwm0"),M=me.n(F),b=me("Aky1"),X=me("h/US"),B=me("m3rI"),U=d.a.TextArea,W=1024,ne=function(ue,V){var ye,J=V.payload||{},$=J.uploadInfo,z=$===void 0?{}:$;switch(V.type){case"addVideo":return{videoList:[].concat(Object(g.a)(ue.videoList),[{name:z.file.name,size:z.file.size,type:z.file.type,fileHash:z.fileHash,state:z.state,videoId:z.videoId,loaded:z.loaded||0,title:""}])};case"removeVideo":return{videoList:ue.videoList.filter(function(H){return H.name!==V.payload.name})};case"removeAll":return{videoList:[]};case"updateProgress":return{videoList:ue.videoList.map(function(H){return H.name===V.payload.uploadInfo.file.name?Object(c.a)(Object(c.a)({},H),{loaded:V.payload.progressPercent,videoId:z.videoId,fileHash:z.fileHash}):H})};case"updateTitle":return{videoList:(ye=ue.videoList)===null||ye===void 0?void 0:ye.map(function(H){return H.name===V.payload.item.name?Object(c.a)(Object(c.a)({},H),{title:V.payload.title}):H})};default:return{videoList:[]}}},re=function(ue){var V,ye=ue.user,J=ue.globalSetting,$=ue.loading,z=ue.dispatch,H=ue.visible,Y=ue.editData,ee=ue.onCancel,we=ee===void 0?function(){}:ee,he=ue.onOk,Ae=he===void 0?function(){}:he,pe=Object(O.i)(),ge=t.a.useForm(),se=Object(a.a)(ge,1),ie=se[0],Z=Object(S.useReducer)(ne,{videoList:[]}),be=Object(a.a)(Z,2),te=be[0],q=be[1],Ee=Object(S.useState)(!1),Se=Object(a.a)(Ee,2),Ie=Se[0],P=Se[1],e=Object(S.useRef)(),i=Object(S.useState)(),T=Object(a.a)(i,2),x=T[0],A=T[1],oe=Object(S.useState)(!1),_e=Object(a.a)(oe,2),He=_e[0],Ne=_e[1],Be=Object(S.useState)(!1),$e=Object(a.a)(Be,2),tt=$e[0],Me=$e[1],Pe=Object(S.useState)([]),ke=Object(a.a)(Pe,2),Re=ke[0],Oe=ke[1],ce=Object(S.useState)([]),ve=Object(a.a)(ce,2),xe=ve[0],fe=ve[1];Object(S.useEffect)(function(){if(!Y)return;Ne(Y.is_link),A(Y.link),!Y.is_link&&q({type:"addVideo",payload:{uploadInfo:{file:{name:Y.file_name},videoId:Y.video_id,loaded:100}}}),ie.setFieldsValue({name:Y.name,description:Y.description,attachment_id:Y==null?void 0:Y.attachment_id})},[Y]);var De=function(){var rt=document.getElementById("fileUpload");rt.value=""},ze=function(rt){var ft;Ne(!1);var gt=rt.target.files[0];if(!gt){De();return}var ct=gt.name.toLowerCase();if(ct&&ct.indexOf(".avi")==-1&&ct.indexOf(".flv")==-1&&ct.indexOf(".f4v")==-1&&ct.indexOf(".m4v")==-1&&ct.indexOf(".mov")==-1&&ct.indexOf(".mp4")==-1&&ct.indexOf(".rmvb")==-1&&ct.indexOf(".swf")==-1&&ct.indexOf(".webm")==-1&&ct.indexOf(".wmv")==-1){p.b.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),De();return}if(gt.size>W*1024*1024){p.b.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71G"),De();return}if((ft=te.videoList)!==null&&ft!==void 0&&ft.find(function(yt){return yt.name===gt.name})){p.b.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),De();return}mt(gt)},et=function(rt,ft){u.a.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:E.a.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",ft?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:function(){De(),q({type:"removeVideo",payload:{name:rt}})}})},mt=function(rt){var ft,gt='{"Vod":{}}';if(P(!0),e.current){e.current.addFile(rt,null,null,null,gt);return}Object(b.a)((ft=ye.userInfo)===null||ft===void 0?void 0:ft.login,{create:!e,addFileSuccess:function(yt){q({type:"addVideo",payload:{uploadInfo:yt}})},onUploadProgress:function(yt,Ct,nt){var At=Math.ceil(nt*100);q({type:"updateProgress",payload:{uploadInfo:yt,progressPercent:At}}),De()},onUploadFailed:function(yt){p.b.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:function(yt){P(!1)},onUploadSucceed:function(yt){P(!1)},onUploadError:function(yt){P(!1)},gotUploader:function(yt){yt.addFile(rt,null,null,null,gt),e.current=yt}})},_t=function(){var ot=Object(h.a)(k.a.mark(function rt(){var ft,gt,ct,yt;return k.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.next=2,ie.validateFields();case 2:if(!(!He&&!((ft=te.videoList)!==null&&ft!==void 0&&ft.length)||He&&!x)){nt.next=5;break}return p.b.info("\u8BF7\u5148\u4E0A\u4F20\u89C6\u9891\u6216\u8005\u6DFB\u52A0\u5916\u94FE"),nt.abrupt("return");case 5:Me(!0),ct=He?{link:x}:{video_id:(gt=te.videoList)===null||gt===void 0?void 0:gt[0].videoId};debugger;return nt.next=10,Ae(Object(c.a)(Object(c.a)({},ct),{name:ie.getFieldValue("name"),attachment_id:ie.getFieldValue("attachment_id"),description:ie.getFieldValue("description")}));case 10:yt=nt.sent,Me(!1),yt.id&&vt();case 13:case"end":return nt.stop()}},rt)}));return function(){return ot.apply(this,arguments)}}(),vt=function(){ie.resetFields(),q({type:"removeAll"}),A(null),Ne(null)},pt=function(){we(),vt()},Je={name:"file",multiple:!0,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*",action:B.a.API_SERVER+"/api/attachments.json",withCredentials:!0,onRemove:function(rt){fe([])},onChange:function(rt){var ft=rt.file.status;if(ft!=="uploading",ft==="removed"&&Oe(rt.fileList),ft==="done"){var gt,ct,yt;Oe(rt==null||((gt=rt.fileList)===null||gt===void 0)?void 0:gt.slice(-1)),q({type:"addVideo",payload:{uploadInfo:{videoId:rt==null||((ct=rt.fileList[0])===null||ct===void 0||((yt=ct.response)===null||yt===void 0))?void 0:yt.id,loaded:100,file:Object(c.a)({},rt==null?void 0:rt.fileList[0])}}}),Ne(!1),p.b.success("".concat(rt.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F"))}else ft==="error"&&p.b.error("".concat(rt.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(rt){var ft=rt.size/1024/1024<1e3;return ft||p.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),ft}},Xe=function(){var rt,ft,gt,ct,yt,Ct,nt,At,kt,bt,Rt,de;return E.a.createElement(E.a.Fragment,null,!He&&!!((rt=te.videoList)!==null&&rt!==void 0&&rt.length)&&E.a.createElement("div",{className:M.a.fileProgress},((ft=te.videoList)===null||ft===void 0||((gt=ft[0])===null||gt===void 0)?void 0:gt.loaded)==100?E.a.createElement("div",{className:"".concat(M.a.videoName," font14")},(ct=te.videoList)===null||ct===void 0||((yt=ct[0])===null||yt===void 0)?void 0:yt.name):E.a.createElement(f.a,{style:{width:"80%"},percent:(Ct=te.videoList)===null||Ct===void 0||((nt=Ct[0])===null||nt===void 0)?void 0:nt.loaded,status:((At=te.videoList)===null||At===void 0||((kt=At[0])===null||kt===void 0)?void 0:kt.loaded)==100?"normal":"active"}),E.a.createElement("div",{className:M.a.fileCancel,onClick:function(){var v,D,j,G;return et((v=te.videoList)===null||v===void 0||((D=v[0])===null||D===void 0)?void 0:D.name,((j=te.videoList)===null||j===void 0||((G=j[0])===null||G===void 0)?void 0:G.loaded)==100)}},((bt=te.videoList)===null||bt===void 0||((Rt=bt[0])===null||Rt===void 0)?void 0:Rt.loaded)===100?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20")),!((de=te.videoList)!==null&&de!==void 0&&de.length)&&E.a.createElement("div",{className:M.a.uploadWrap},E.a.createElement("label",{htmlFor:"fileUpload",style:{marginRight:"30px"}},E.a.createElement(Ve.a,Je,E.a.createElement(r.a,{className:M.a.upload,disabled:(xe==null?void 0:xe.length)>0},E.a.createElement("i",{className:"iconfont icon-shangchuanshipin1 mr5"}),"\u4E0A\u4F20\u89C6\u9891"))),E.a.createElement("label",{className:"".concat(M.a.upload," ").concat(M.a.uploadLink),onClick:function(){return Ne(!0)}},E.a.createElement("i",{className:"iconfont icon-lianjie1 mr5"}),"\u6DFB\u52A0\u5916\u94FE")),He&&E.a.createElement(d.a,{className:"mt5",placeholder:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5",value:x,onChange:function(v){return A(v.target.value)}}))};return E.a.createElement(u.a,{centered:!0,maskClosable:!1,title:Y?"\u7F16\u8F91\u89C6\u9891\u9879\u76EE":"\u65B0\u5EFA\u89C6\u9891\u9879\u76EE",width:740,className:M.a.modal,visible:H,confirmLoading:tt,onOk:_t,onCancel:pt},E.a.createElement(t.a,{form:ie},E.a.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:ze,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}),E.a.createElement(t.a.Item,{label:"\u9879\u76EE\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"}]},E.a.createElement(d.a,{maxLength:40,placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u9879\u76EE\u540D\u79F0"})),E.a.createElement(t.a.Item,{label:"\u9879\u76EE\u5185\u5BB9",name:"content",className:M.a.contentItem},Xe()),E.a.createElement(t.a.Item,{name:"attachment_id",label:"\u4E0A\u4F20\u5C01\u9762\u56FE:"},E.a.createElement(X.a,{getFileProgress:function(rt){if(rt.file.status==="uploading"){Me(!0);return}rt.file.status==="done"&&Me(!1)}})),E.a.createElement(t.a.Item,{label:"\u9879\u76EE\u7B80\u4ECB",name:"description",className:"ml8"},E.a.createElement(U,{rows:5,maxLength:800,placeholder:"\u8BF7\u8F93\u5165\u672C\u89C6\u9891\u7B80\u4ECB\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC7800\u5B57"})),E.a.createElement("div",{className:"c-grey-999"},E.a.createElement("div",null,"\u6CE8\u610F\uFF1A"),E.a.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",E.a.createElement(w.a,{to:"/users/".concat((V=ye.userInfo)===null||V===void 0?void 0:V.login,"/videos/protocol"),target:"_blank",className:M.a.colorBlue},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),E.a.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),E.a.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"),E.a.createElement("div",null,"4\u3001\u5982\u679C\u89C6\u9891\u6765\u81EA\u4E8E\u5916\u90E8\u94FE\u63A5\uFF0C\u672C\u7F51\u7AD9\u4E0D\u63D0\u4F9B\u64AD\u653E\u9875\u9762\uFF0C\u65E0\u6CD5\u63D0\u4F9B\u7EDF\u8BA1\u6570\u636E\u3002"))))};st.a=Object(_.a)(function(ae){var ue=ae.user,V=ae.loading,ye=ae.globalSetting;return{user:ue,globalSetting:ye,loading:V}})(re)},sWEp:function(ht,st,me){ht.exports={wrap:"wrap___3nJXB",title:"title___3AYM5",radioWrap:"radioWrap___dbSML",radio:"radio___3h-_z",colorFF0000:"colorFF0000___2d_ZE",pagination:"pagination___3WP6s"}},vHTk:function(ht,st,me){ht.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vZDz:function(ht,st,me){ht.exports={contentWrap:"contentWrap___3Fc2r",footer:"footer___4nxVN",radioGroup:"radioGroup___359yE",wrap:"wrap___1OqR3",introName:"introName___3saG-",rating:"rating___3X95K",modalRating:"modalRating___A4qeN"}},w8Aa:function(ht,st,me){ht.exports={img:"img___3e4yQ"}}}]);