/*! For license information please see 4.d272848c.chunk.js.LICENSE.txt */ (this["webpackJsonp@uniswap/interface"]=this["webpackJsonp@uniswap/interface"]||[]).push([[4],[function(e,t,n){"use strict";e.exports=n(356)},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"createGlobalStyle",(function(){return nt})),n.d(t,"css",(function(){return be})),n.d(t,"isStyledComponent",(function(){return C})),n.d(t,"keyframes",(function(){return it})),n.d(t,"ServerStyleSheet",(function(){return We})),n.d(t,"StyleSheetConsumer",(function(){return Ze})),n.d(t,"StyleSheetContext",(function(){return qe})),n.d(t,"StyleSheetManager",(function(){return Ke})),n.d(t,"ThemeConsumer",(function(){return Je})),n.d(t,"ThemeContext",(function(){return Ge})),n.d(t,"ThemeProvider",(function(){return Xe})),n.d(t,"withTheme",(function(){return ot})),n.d(t,"__DO_NOT_USE_OR_YOU_WILL_BE_HAUNTED_BY_SPOOKY_GHOSTS",(function(){return at}));var r=n(223),i=n.n(r),o=n(305),a=n.n(o),s=n(0),u=n.n(s),l=n(178),c=n(110),f=n(86),d=(n(18),n(122)),h=n(335),p=function(e,t){for(var n=[e[0]],r=0,i=t.length;r1?r-1:0),o=1;o0?" Additional arguments: "+i.join(", "):"")));return w(a)}return b(t,e),t}(Error),I=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,D=function(e){var t=""+(e||""),n=[];return t.replace(I,(function(e,t,r){return n.push({componentId:t,matchIndex:r}),e})),n.map((function(e,r){var i=e.componentId,o=e.matchIndex,a=n[r+1];return{componentId:i,cssFromDOM:a?t.slice(o,a.matchIndex):t.slice(o)}}))},L=/^\s*\/\/.*$/gm,R=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),N=new i.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),j=[],B=function(e){if(-2===e){var t=j;return j=[],t}},F=a()((function(e){j.push(e)})),z=void 0,V=void 0,H=void 0,U=function(e,t,n){return t>0&&-1!==n.slice(0,t).indexOf(V)&&n.slice(t-V.length,t)!==V?"."+z:e};N.use([function(e,t,n){2===e&&n.length&&n[0].lastIndexOf(V)>0&&(n[0]=n[0].replace(H,U))},F,B]),R.use([F,B]);var G=function(e){return R("",e)};function J(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",i=e.join("").replace(L,""),o=t&&n?n+" "+t+" { "+i+" }":i;return z=r,V=t,H=new RegExp("\\"+V+"\\b","g"),N(n||!t?"":t,o)}var X=function(){return n.nc},W=function(e,t,n){n&&((e[t]||(e[t]=Object.create(null)))[n]=!0)},q=function(e,t){e[t]=Object.create(null)},Z=function(e){return function(t,n){return void 0!==e[t]&&e[t][n]}},K=function(e){var t="";for(var n in e)t+=Object.keys(e[n]).join(" ")+" ";return t.trim()},Y=function(e){if(e.sheet)return e.sheet;for(var t=e.ownerDocument.styleSheets.length,n=0;n"+e()+""}},ne=function(e,t){return function(){var n,r=((n={})[A]=K(t),n["data-styled-version"]="4.4.1",n),i=X();return i&&(r.nonce=i),u.a.createElement("style",m({},r,{dangerouslySetInnerHTML:{__html:e()}}))}},re=function(e){return function(){return Object.keys(e)}},ie=function(e,t){return e.createTextNode(Q(t))},oe=function e(t,n){var r=void 0===t?Object.create(null):t,i=void 0===n?Object.create(null):n,o=function(e){var t=i[e];return void 0!==t?t:i[e]=[""]},a=function(){var e="";for(var t in i){var n=i[t][0];n&&(e+=Q(t)+n)}return e};return{clone:function(){var t=function(e){var t=Object.create(null);for(var n in e)t[n]=m({},e[n]);return t}(r),n=Object.create(null);for(var o in i)n[o]=[i[o][0]];return e(t,n)},css:a,getIds:re(i),hasNameForId:Z(r),insertMarker:o,insertRules:function(e,t,n){o(e)[0]+=t.join(" "),W(r,e,n)},removeRules:function(e){var t=i[e];void 0!==t&&(t[0]="",q(r,e))},sealed:!1,styleTag:null,toElement:ne(a,r),toHTML:te(a,r)}},ae=function(e,t,n,r,i){if(O&&!n){var o=function(e,t,n){var r=document;e?r=e.ownerDocument:t&&(r=t.ownerDocument);var i=r.createElement("style");i.setAttribute(A,""),i.setAttribute("data-styled-version","4.4.1");var o=X();if(o&&i.setAttribute("nonce",o),i.appendChild(r.createTextNode("")),e&&!t)e.appendChild(i);else{if(!t||!e||!t.parentNode)throw new P(6);t.parentNode.insertBefore(i,n?t:t.nextSibling)}return i}(e,t,r);return M?function(e,t){var n=Object.create(null),r=Object.create(null),i=void 0!==t,o=!1,a=function(t){var i=r[t];return void 0!==i?i:(r[t]=ie(e.ownerDocument,t),e.appendChild(r[t]),n[t]=Object.create(null),r[t])},s=function(){var e="";for(var t in r)e+=r[t].data;return e};return{clone:function(){throw new P(5)},css:s,getIds:re(r),hasNameForId:Z(n),insertMarker:a,insertRules:function(e,r,s){for(var u=a(e),l=[],c=r.length,f=0;f0&&(o=!0,t().insertRules(e+"-import",l))},removeRules:function(a){var s=r[a];if(void 0!==s){var u=ie(e.ownerDocument,a);e.replaceChild(u,s),r[a]=u,q(n,a),i&&o&&t().removeRules(a+"-import")}},sealed:!1,styleTag:e,toElement:ne(s,n),toHTML:te(s,n)}}(o,i):function(e,t){var n=Object.create(null),r=Object.create(null),i=[],o=void 0!==t,a=!1,s=function(e){var t=r[e];return void 0!==t?t:(r[e]=i.length,i.push(0),q(n,e),r[e])},u=function(){var t=Y(e).cssRules,n="";for(var o in r){n+=Q(o);for(var a=r[o],s=ee(i,a),u=s-i[a];u0&&(a=!0,t().insertRules(r+"-import",p)),i[c]+=h,W(n,r,l)},removeRules:function(s){var u=r[s];if(void 0!==u&&!1!==e.isConnected){var l=i[u];!function(e,t,n){for(var r=t-n,i=t;i>r;i-=1)e.deleteRule(i)}(Y(e),ee(i,u)-1,l),i[u]=0,q(n,s),o&&a&&t().removeRules(s+"-import")}},sealed:!1,styleTag:e,toElement:ne(u,n),toHTML:te(u,n)}}(o,i)}return oe()},se=/\s+/,ue=void 0;ue=O?M?40:1e3:-1;var le=0,ce=void 0,fe=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O?document.head:null,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];y(this,e),this.getImportRuleTag=function(){var e=t.importRuleTag;if(void 0!==e)return e;var n=t.tags[0];return t.importRuleTag=ae(t.target,n?n.styleTag:null,t.forceServer,!0)},le+=1,this.id=le,this.forceServer=r,this.target=r?null:n,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return e.prototype.rehydrate=function(){if(!O||this.forceServer)return this;var e=[],t=[],n=!1,r=document.querySelectorAll("style["+A+'][data-styled-version="4.4.1"]'),i=r.length;if(!i)return this;for(var o=0;o0&&void 0!==arguments[0]&&arguments[0];ce=new e(void 0,t).rehydrate()},e.prototype.clone=function(){var t=new e(this.target,this.forceServer);return this.clones.push(t),t.tags=this.tags.map((function(e){for(var n=e.getIds(),r=e.clone(),i=0;i1?t-1:0),r=1;r=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:r^=(255&e.charCodeAt(i+2))<<16;case 2:r^=(255&e.charCodeAt(i+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(i)))+((1540483477*(r>>>16)&65535)<<16)}return((r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16))^r>>>15)>>>0}var xe=function(e){return String.fromCharCode(e+(e>25?39:97))};function _e(e){var t="",n=void 0;for(n=e;n>52;n=Math.floor(n/52))t=xe(n%52)+t;return xe(n%52)+t}function ke(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:k,r=!!n&&e.theme===n.theme,i=e.theme&&!r?e.theme:t||n.theme;return i},Oe=/[[\].#*$><+~=|^:(),"'`-]+/g,Me=/(^-|-$)/g;function Ee(e){return e.replace(Oe,"-").replace(Me,"")}function Pe(e){return"string"===typeof e&&!0}var Ie={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},De={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Le=((Se={})[c.ForwardRef]={$$typeof:!0,render:!0},Se),Re=Object.defineProperty,Ne=Object.getOwnPropertyNames,je=Object.getOwnPropertySymbols,Be=void 0===je?function(){return[]}:je,Fe=Object.getOwnPropertyDescriptor,ze=Object.getPrototypeOf,Ve=Object.prototype,He=Array.prototype;function Ue(e,t,n){if("string"!==typeof t){var r=ze(t);r&&r!==Ve&&Ue(e,r,n);for(var i=He.concat(Ne(t),Be(t)),o=Le[e.$$typeof]||Ie,a=Le[t.$$typeof]||Ie,s=i.length,u=void 0,l=void 0;s--;)if(l=i[s],!De[l]&&(!n||!n[l])&&(!a||!a[l])&&(!o||!o[l])&&(u=Fe(t,l)))try{Re(e,l,u)}catch(c){}return e}return e}var Ge=Object(s.createContext)(),Je=Ge.Consumer,Xe=function(e){function t(n){y(this,t);var r=w(this,e.call(this,n));return r.getContext=Object(f.a)(r.getContext.bind(r)),r.renderInner=r.renderInner.bind(r),r}return b(t,e),t.prototype.render=function(){return this.props.children?u.a.createElement(Ge.Consumer,null,this.renderInner):null},t.prototype.renderInner=function(e){var t=this.getContext(this.props.theme,e);return u.a.createElement(Ge.Provider,{value:t},this.props.children)},t.prototype.getTheme=function(e,t){if(S(e))return e(t);if(null===e||Array.isArray(e)||"object"!==("undefined"===typeof e?"undefined":g(e)))throw new P(8);return m({},t,e)},t.prototype.getContext=function(e,t){return this.getTheme(e,t)},t}(s.Component),We=function(){function e(){y(this,e),this.masterSheet=fe.master,this.instance=this.masterSheet.clone(),this.sealed=!1}return e.prototype.seal=function(){if(!this.sealed){var e=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(e,1),this.sealed=!0}},e.prototype.collectStyles=function(e){if(this.sealed)throw new P(2);return u.a.createElement(Ke,{sheet:this.instance},e)},e.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},e.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},e.prototype.interleaveWithNodeStream=function(e){throw new P(3)},e}(),qe=Object(s.createContext)(),Ze=qe.Consumer,Ke=function(e){function t(n){y(this,t);var r=w(this,e.call(this,n));return r.getContext=Object(f.a)(r.getContext),r}return b(t,e),t.prototype.getContext=function(e,t){if(e)return e;if(t)return new fe(t);throw new P(4)},t.prototype.render=function(){var e=this.props,t=e.children,n=e.sheet,r=e.target;return u.a.createElement(qe.Provider,{value:this.getContext(n,r)},t)},t}(s.Component),Ye={};var $e=function(e){function t(){y(this,t);var n=w(this,e.call(this));return n.attrs={},n.renderOuter=n.renderOuter.bind(n),n.renderInner=n.renderInner.bind(n),n}return b(t,e),t.prototype.render=function(){return u.a.createElement(Ze,null,this.renderOuter)},t.prototype.renderOuter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fe.master;return this.styleSheet=e,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():u.a.createElement(Je,null,this.renderInner)},t.prototype.renderInner=function(e){var t=this.props.forwardedComponent,n=t.componentStyle,r=t.defaultProps,i=(t.displayName,t.foldedComponentIds),o=t.styledComponentId,a=t.target,u=void 0;u=n.isStatic?this.generateAndInjectStyles(k,this.props):this.generateAndInjectStyles(Ae(this.props,e,r)||k,this.props);var l=this.props.as||this.attrs.as||a,c=Pe(l),f={},h=m({},this.props,this.attrs),p=void 0;for(p in h)"forwardedComponent"!==p&&"as"!==p&&("forwardedRef"===p?f.ref=h[p]:"forwardedAs"===p?f.as=h[p]:c&&!Object(d.a)(p)||(f[p]=h[p]));return this.props.style&&this.attrs.style&&(f.style=m({},this.attrs.style,this.props.style)),f.className=Array.prototype.concat(i,o,u!==o?u:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(s.createElement)(l,f)},t.prototype.buildExecutionContext=function(e,t,n){var r=this,i=m({},t,{theme:e});return n.length?(this.attrs={},n.forEach((function(e){var t,n=e,o=!1,a=void 0,s=void 0;for(s in S(n)&&(n=n(i),o=!0),n)a=n[s],o||!S(a)||(t=a)&&t.prototype&&t.prototype.isReactComponent||C(a)||(a=a(i)),r.attrs[s]=a,i[s]=a})),i):i},t.prototype.generateAndInjectStyles=function(e,t){var n=t.forwardedComponent,r=n.attrs,i=n.componentStyle;n.warnTooManyClasses;return i.isStatic&&!r.length?i.generateAndInjectStyles(k,this.styleSheet):i.generateAndInjectStyles(this.buildExecutionContext(e,t,r),this.styleSheet)},t}(s.Component);function Qe(e,t,n){var r=C(e),i=!Pe(e),o=t.displayName,a=void 0===o?function(e){return Pe(e)?"styled."+e:"Styled("+T(e)+")"}(e):o,s=t.componentId,l=void 0===s?function(e,t,n){var r="string"!==typeof t?"sc":Ee(t),i=(Ye[r]||0)+1;Ye[r]=i;var o=r+"-"+e.generateName(r+i);return n?n+"-"+o:o}(Ce,t.displayName,t.parentComponentId):s,c=t.ParentComponent,f=void 0===c?$e:c,d=t.attrs,p=void 0===d?_:d,g=t.displayName&&t.componentId?Ee(t.displayName)+"-"+t.componentId:t.componentId||l,y=r&&e.attrs?Array.prototype.concat(e.attrs,p).filter(Boolean):p,v=new Ce(r?e.componentStyle.rules.concat(n):n,y,g),b=void 0,w=function(e,t){return u.a.createElement(f,m({},e,{forwardedComponent:b,forwardedRef:t}))};return w.displayName=a,(b=u.a.forwardRef(w)).displayName=a,b.attrs=y,b.componentStyle=v,b.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):_,b.styledComponentId=g,b.target=r?e.target:e,b.withComponent=function(e){var r=t.componentId,i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["componentId"]),o=r&&r+"-"+(Pe(e)?e:Ee(T(e)));return Qe(e,m({},i,{attrs:y,componentId:o,ParentComponent:f}),n)},Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Object(h.a)(e.defaultProps,t):t}}),b.toString=function(){return"."+b.styledComponentId},i&&Ue(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),b}var et=function(e){return function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:k;if(!Object(c.isValidElementType)(n))throw new P(1,String(n));var i=function(){return t(n,r,be.apply(void 0,arguments))};return i.withConfig=function(i){return e(t,n,m({},r,i))},i.attrs=function(i){return e(t,n,m({},r,{attrs:Array.prototype.concat(r.attrs,i).filter(Boolean)}))},i}(Qe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){et[e]=et(e)}));var tt=function(){function e(t,n){y(this,e),this.rules=t,this.componentId=n,this.isStatic=ke(t,_),fe.master.hasId(n)||fe.master.deferredInject(n,[])}return e.prototype.createStyles=function(e,t){var n=J(me(this.rules,e,t),"");t.inject(this.componentId,n)},e.prototype.removeStyles=function(e){var t=this.componentId;e.hasId(t)&&e.remove(t)},e.prototype.renderStyles=function(e,t){this.removeStyles(t),this.createStyles(e,t)},e}();function nt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r=256||n%1)return!1}return!0}function u(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid arrayify value");for(var n=[];e;)n.unshift(255&e),e=parseInt(String(e/256));return 0===n.length&&n.push(0),o(new Uint8Array(n))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),d(e)){var a=e.substring(2);a.length%2&&("left"===t.hexPad?a="0x0"+a.substring(2):"right"===t.hexPad?a+="0":r.throwArgumentError("hex data is odd-length","value",e));for(var u=[],l=0;lt&&r.throwArgumentError("value out of range","value",arguments[0]);var n=new Uint8Array(t);return n.set(e,t-e.length),o(n)}function d(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function h(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid hexlify value");for(var n="";e;)n="0123456789abcdef"[15&e]+n,e=Math.floor(e/16);return n.length?(n.length%2&&(n="0"+n),"0x"+n):"0x00"}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(d(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":r.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(s(e)){for(var o="0x",a=0;a>4]+"0123456789abcdef"[15&u]}return o}return r.throwArgumentError("invalid hexlify value","value",e)}function p(e){if("string"!==typeof e)e=h(e);else if(!d(e)||e.length%2)return null;return(e.length-2)/2}function g(e,t,n){return"string"!==typeof e?e=h(e):(!d(e)||e.length%2)&&r.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function y(e){var t="0x";return e.forEach((function(e){t+=h(e).substring(2)})),t}function v(e){var t=m(h(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function m(e){"string"!==typeof e&&(e=h(e)),d(e)||r.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&r.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function w(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(a(e)){var n=u(e);65!==n.length&&r.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=h(n.slice(0,32)),t.s=h(n.slice(32,64)),t.v=n[64],t.v<27&&(0===t.v||1===t.v?t.v+=27:r.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=h(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var i=f(u(t._vs),32);t._vs=h(i);var o=i[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&r.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),i[0]&=127;var s=h(i);null==t.s?t.s=s:t.s!==s&&r.throwArgumentError("signature v mismatch _vs","signature",e)}null==t.recoveryParam?null==t.v?r.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&r.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&d(t.r)?t.r=b(t.r,32):r.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&d(t.s)?t.s=b(t.s,32):r.throwArgumentError("signature missing or invalid s","signature",e);var l=u(t.s);l[0]>=128&&r.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(l[0]|=128);var c=h(l);t._vs&&(d(t._vs)||r.throwArgumentError("signature invalid _vs","signature",e),t._vs=b(t._vs,32)),null==t._vs?t._vs=c:t._vs!==c&&r.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t}function x(e){return h(l([(e=w(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(120);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.r(t),n.d(t,"defineReadOnly",(function(){return l})),n.d(t,"getStatic",(function(){return c})),n.d(t,"resolveProperties",(function(){return f})),n.d(t,"checkProperties",(function(){return d})),n.d(t,"shallowCopy",(function(){return h})),n.d(t,"deepCopy",(function(){return y})),n.d(t,"Description",(function(){return v}));var r=n(11),i=n(4),o=n.n(i),a=n(8),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},u=new a.Logger("properties/5.1.0");function l(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}function c(e,t){for(var n=0;n<32;n++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function f(e){return s(this,void 0,void 0,o.a.mark((function t(){var n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e).map((function(t){var n=e[t];return Promise.resolve(n).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(n);case 3:return r=t.sent,t.abrupt("return",r.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))}function d(e,t){e&&"object"===typeof e||u.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(n){t[n]||u.throwArgumentError("invalid object key - "+n,"transaction:"+n,e)}))}function h(e){var t={};for(var n in e)t[n]=e[n];return t}var p={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function g(e){if(function e(t){if(void 0===t||null===t||p[typeof t])return!0;if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;for(var n=Object.keys(t),r=0;r=9007199254740991)&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,n,r){r=r?": "+r:"",tn&&this.throwError("too many arguments"+r,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}},{key:"checkNew",value:function(t,n){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}},{key:"checkAbstract",value:function(t,n){t===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}}],[{key:"globalLogger",value:function(){return u||(u=new e("logger/5.1.0")),u}},{key:"setCensorship",value:function(t,n){if(!t&&n&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!n}},{key:"setLogLevel",value:function(t){var n=s[t.toLowerCase()];null!=n?n:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();d.errors=c,d.levels=l},function(e,t,n){"use strict";n.d(t,"b",(function(){return P})),n.d(t,"a",(function(){return x}));n(100);var r=n(68),i=n.n(r),o=(n(62),n(0)),a=n.n(o),s=(n(295),n(49)),u=n.n(s),l=n(50),c=n.n(l);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};g=d({},g,{},e)}(e.options.react),function(e){h=e}(e)}};function _(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=Object(o.useContext)(y),i=v()&&r||{},a=i.i18n,s=i.defaultNS,u=n||a||w();if(u&&!u.reportNamespaces&&(u.reportNamespaces=new b),!u){S("You will need pass in an i18next instance by using initReactI18next");var l=[function(e){return e},{},!1];return l.t=function(e){return e},l.i18n={},l.ready=!1,l}var c=E({},m(),{},u.options.react),f=t.useSuspense,d=void 0===f?c.useSuspense:f,h=e||s||u.options&&u.options.defaultNS;h="string"===typeof h?[h]:h||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(h);var p=(u.isInitialized||u.initializedStoreOnce)&&h.every((function(e){return C(e,u)}));function g(){return{t:u.getFixedT(null,"fallback"===c.nsMode?h:h[0])}}var x=Object(o.useState)(g()),_=O()(x,2),k=_[0],A=_[1];Object(o.useEffect)((function(){var e=!0,t=c.bindI18n,n=c.bindI18nStore;function r(){e&&A(g())}return p||d||T(u,h,(function(){e&&A(g())})),t&&u&&u.on(t,r),n&&u&&u.store.on(n,r),function(){e=!1,t&&u&&t.split(" ").forEach((function(e){return u.off(e,r)})),n&&u&&n.split(" ").forEach((function(e){return u.store.off(e,r)}))}}),[h.join()]);var M=[k.t,u,p];if(M.t=k.t,M.i18n=u,M.ready=p,p)return M;if(!p&&!d)return M;throw new Promise((function(e){T(u,h,(function(){A(g()),e()}))}))}n(296)},function(e,t,n){var r;!function(i){"use strict";var o,a="[big.js] ",s=a+"Invalid ",u=s+"decimal places",l={},c=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function f(e,t,n,r){var i=e.c;if(void 0===n&&(n=e.constructor.RM),0!==n&&1!==n&&2!==n&&3!==n)throw Error("[big.js] Invalid rounding mode");if(t<1)r=3===n&&(r||!!i[0])||0===t&&(1===n&&i[0]>=5||2===n&&(i[0]>5||5===i[0]&&(r||void 0!==i[1]))),i.length=1,r?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t=5||2===n&&(i[t]>5||5===i[t]&&(r||void 0!==i[t+1]||1&i[t-1]))||3===n&&(r||!!i[0]),i.length=t--,r)for(;++i[t]>9;)i[t]=0,t--||(++e.e,i.unshift(1));for(t=i.length;!i[--t];)i.pop()}return e}function d(e,t,n){var r=e.e,i=e.c.join(""),o=i.length;if(t)i=i.charAt(0)+(o>1?"."+i.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)i="0"+i;i="0."+i}else if(r>0)if(++r>o)for(r-=o;r--;)i+="0";else r1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&n?"-"+i:i}l.abs=function(){var e=new this.constructor(this);return e.s=1,e},l.cmp=function(e){var t,n=this,r=n.c,i=(e=new n.constructor(e)).c,o=n.s,a=e.s,s=n.e,u=e.e;if(!r[0]||!i[0])return r[0]?o:i[0]?-a:0;if(o!=a)return o;if(t=o<0,s!=u)return s>u^t?1:-1;for(a=(s=r.length)<(u=i.length)?s:u,o=-1;++oi[o]^t?1:-1;return s==u?0:s>u^t?1:-1},l.div=function(e){var t=this,n=t.constructor,r=t.c,i=(e=new n(e)).c,o=t.s==e.s?1:-1,a=n.DP;if(a!==~~a||a<0||a>1e6)throw Error(u);if(!i[0])throw Error("[big.js] Division by zero");if(!r[0])return e.s=o,e.c=[e.e=0],e;var s,l,c,d,h,p=i.slice(),g=s=i.length,y=r.length,v=r.slice(0,s),m=v.length,b=e,w=b.c=[],x=0,_=a+(b.e=t.e-e.e)+1;for(b.s=o,o=_<0?0:_,p.unshift(0);m++m?1:-1;else for(h=-1,d=0;++hv[h]?1:-1;break}if(!(d<0))break;for(l=m==s?i:p;m;){if(v[--m]_&&f(b,_,n.RM,void 0!==v[0]),b},l.eq=function(e){return 0===this.cmp(e)},l.gt=function(e){return this.cmp(e)>0},l.gte=function(e){return this.cmp(e)>-1},l.lt=function(e){return this.cmp(e)<0},l.lte=function(e){return this.cmp(e)<1},l.minus=l.sub=function(e){var t,n,r,i,o=this,a=o.constructor,s=o.s,u=(e=new a(e)).s;if(s!=u)return e.s=-u,o.plus(e);var l=o.c.slice(),c=o.e,f=e.c,d=e.e;if(!l[0]||!f[0])return f[0]?e.s=-u:l[0]?e=new a(o):e.s=1,e;if(s=c-d){for((i=s<0)?(s=-s,r=l):(d=c,r=f),r.reverse(),u=s;u--;)r.push(0);r.reverse()}else for(n=((i=l.length0)for(;u--;)l[t++]=0;for(u=t;n>s;){if(l[--n]0?(u=a,r=l):(t=-t,r=s),r.reverse();t--;)r.push(0);r.reverse()}for(s.length-l.length<0&&(r=l,l=s,s=r),t=l.length,n=0;t;s[t]%=10)n=(s[--t]=s[t]+l[t]+n)/10|0;for(n&&(s.unshift(n),++u),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=u,e},l.pow=function(e){var t=this,n=new t.constructor("1"),r=n,i=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(s+"exponent");for(i&&(e=-e);1&e&&(r=r.times(t)),e>>=1;)t=t.times(t);return i?n.div(r):r},l.prec=function(e,t){if(e!==~~e||e<1||e>1e6)throw Error(s+"precision");return f(new this.constructor(this),e,t)},l.round=function(e,t){if(void 0===e)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(u);return f(new this.constructor(this),e+this.e+1,t)},l.sqrt=function(){var e,t,n,r=this,i=r.constructor,o=r.s,s=r.e,u=new i("0.5");if(!r.c[0])return new i(r);if(o<0)throw Error(a+"No square root");0===(o=Math.sqrt(r+""))||o===1/0?((t=r.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new i(((o=Math.sqrt(t))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+s)):e=new i(o+""),s=e.e+(i.DP+=4);do{n=e,e=u.times(n.plus(r.div(n)))}while(n.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return f(e,(i.DP-=4)+e.e+1,i.RM)},l.times=l.mul=function(e){var t,n=this,r=n.constructor,i=n.c,o=(e=new r(e)).c,a=i.length,s=o.length,u=n.e,l=e.e;if(e.s=n.s==e.s?1:-1,!i[0]||!o[0])return e.c=[e.e=0],e;for(e.e=u+l,au;)s=t[l]+o[u]*i[l-u-1]+s,t[l--]=s%10,s=s/10|0;t[l]=s}for(s?++e.e:t.shift(),u=t.length;!t[--u];)t.pop();return e.c=t,e},l.toExponential=function(e,t){var n=this,r=n.c[0];if(void 0!==e){if(e!==~~e||e<0||e>1e6)throw Error(u);for(n=f(new n.constructor(n),++e,t);n.c.length1e6)throw Error(u);for(e=e+(n=f(new n.constructor(n),e+n.e+1,t)).e+1;n.c.length=t.PE,!!e.c[0])},l.toNumber=function(){var e=Number(d(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(a+"Imprecise conversion");return e},l.toPrecision=function(e,t){var n=this,r=n.constructor,i=n.c[0];if(void 0!==e){if(e!==~~e||e<1||e>1e6)throw Error(s+"precision");for(n=f(new r(n),e,t);n.c.length=r.PE,!!i)},l.valueOf=function(){var e=this,t=e.constructor;if(!0===t.strict)throw Error(a+"valueOf disallowed");return d(e,e.e<=t.NE||e.e>=t.PE,!0)},(o=function e(){function t(n){var r=this;if(!(r instanceof t))return void 0===n?e():new t(n);if(n instanceof t)r.s=n.s,r.e=n.e,r.c=n.c.slice();else{if("string"!==typeof n){if(!0===t.strict)throw TypeError(s+"number");n=0===n&&1/n<0?"-0":String(n)}!function(e,t){var n,r,i;if(!c.test(t))throw Error(s+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length);for(i=t.length,r=0;r0&&"0"==t.charAt(--i););for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}}(r,n)}r.constructor=t}return t.prototype=l,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=!1,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}()).default=o.Big=o,void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n=0&&i<1?(s=o,u=a):i>=1&&i<2?(s=a,u=o):i>=2&&i<3?(u=o,l=a):i>=3&&i<4?(u=a,l=o):i>=4&&i<5?(s=a,l=o):i>=5&&i<6&&(s=o,l=a);var c=n-o/2;return r(s+c,u+c,l+c)}var g={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",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:"ff00ff",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:"639",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"};var y=/^#[a-fA-F0-9]{6}$/,v=/^#[a-fA-F0-9]{8}$/,m=/^#[a-fA-F0-9]{3}$/,b=/^#[a-fA-F0-9]{4}$/,w=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,x=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,_=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,k=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function S(e){if("string"!==typeof e)throw new f(3);var t=function(e){if("string"!==typeof e)return e;var t=e.toLowerCase();return g[t]?"#"+g[t]:e}(e);if(t.match(y))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(v)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(m))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(b)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=w.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=x.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var a=_.exec(t);if(a){var s="rgb("+p(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",u=w.exec(s);if(!u)throw new f(4,t,s);return{red:parseInt(""+u[1],10),green:parseInt(""+u[2],10),blue:parseInt(""+u[3],10)}}var l=k.exec(t);if(l){var c="rgb("+p(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",d=w.exec(c);if(!d)throw new f(4,t,c);return{red:parseInt(""+d[1],10),green:parseInt(""+d[2],10),blue:parseInt(""+d[3],10),alpha:parseFloat(""+l[4])}}throw new f(5)}function T(e){return function(e){var t,n=e.red/255,r=e.green/255,i=e.blue/255,o=Math.max(n,r,i),a=Math.min(n,r,i),s=(o+a)/2;if(o===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:s,alpha:e.alpha}:{hue:0,saturation:0,lightness:s};var u=o-a,l=s>.5?u/(2-o-a):u/(o+a);switch(o){case n:t=(r-i)/u+(r=1?E(e,t,n):"rgba("+p(e,t,n)+","+r+")";if("object"===typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?E(e.hue,e.saturation,e.lightness):"rgba("+p(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new f(2)}function D(e,t,n){if("number"===typeof e&&"number"===typeof t&&"number"===typeof n)return C("#"+A(e)+A(t)+A(n));if("object"===typeof e&&void 0===t&&void 0===n)return C("#"+A(e.red)+A(e.green)+A(e.blue));throw new f(6)}function L(e,t,n,r){if("string"===typeof e&&"number"===typeof t){var i=S(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"===typeof e&&"number"===typeof t&&"number"===typeof n&&"number"===typeof r)return r>=1?D(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"===typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?D(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new f(7)}function R(e){if("object"!==typeof e)throw new f(8);if(function(e){return"number"===typeof e.red&&"number"===typeof e.green&&"number"===typeof e.blue&&"number"===typeof e.alpha}(e))return L(e);if(function(e){return"number"===typeof e.red&&"number"===typeof e.green&&"number"===typeof e.blue&&("number"!==typeof e.alpha||"undefined"===typeof e.alpha)}(e))return D(e);if(function(e){return"number"===typeof e.hue&&"number"===typeof e.saturation&&"number"===typeof e.lightness&&"number"===typeof e.alpha}(e))return I(e);if(function(e){return"number"===typeof e.hue&&"number"===typeof e.saturation&&"number"===typeof e.lightness&&("number"!==typeof e.alpha||"undefined"===typeof e.alpha)}(e))return P(e);throw new f(8)}function N(e){return function e(t,n,r){return function(){var i=r.concat(Array.prototype.slice.call(arguments));return i.length>=n?t.apply(this,i):e(t,n,i)}}(e,e.length,[])}function j(e,t,n){return Math.max(e,Math.min(t,n))}function B(e,t){if("transparent"===t)return t;var n=T(t);return R(Object(r.a)({},n,{lightness:j(0,1,n.lightness-parseFloat(e))}))}var F=N(B);function z(e,t){if("transparent"===t)return t;var n=T(t);return R(Object(r.a)({},n,{lightness:j(0,1,n.lightness+parseFloat(e))}))}var V=N(z);function H(e,t){if("transparent"===t)return t;var n=S(t),i="number"===typeof n.alpha?n.alpha:1;return L(Object(r.a)({},n,{alpha:j(0,1,+(100*i-100*parseFloat(e)).toFixed(2)/100)}))}var U=N(H)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return _})),n.d(t,"b",(function(){return h}));var r=n(0),i=n.n(r),o=(n(18),i.a.createContext(null));var a=function(e){e()},s={notify:function(){}};function u(){var e=a,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var l=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=s,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=u())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=s)},e}(),c="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect;var f=function(e){var t=e.store,n=e.context,a=e.children,s=Object(r.useMemo)((function(){var e=new l(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),u=Object(r.useMemo)((function(){return t.getState()}),[t]);c((function(){var e=s.subscription;return e.trySubscribe(),u!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,u]);var f=n||o;return i.a.createElement(f.Provider,{value:s},a)};n(20),n(35),n(141),n(110);function d(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function h(e,t){if(d(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:h(e)?3:0}function u(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){return 2===s(e)?e.get(t):e[t]}function c(e,t,n){var r=s(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return H&&e instanceof Map}function h(e){return U&&e instanceof Set}function p(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=K(e);delete t[W];for(var n=Z(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=v),Object.freeze(e),t&&a(e,(function(e,t){return y(t,!0)}),!0)),e}function v(){r(2)}function m(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=Y[e];return t||r(18,e),t}function w(e,t){Y[e]||(Y[e]=t)}function x(){return z}function _(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function k(e){S(e),e.p.forEach(C),e.p=null}function S(e){e===z&&(z=e.l)}function T(e){return z={p:[],l:z,h:e,m:!0,_:0}}function C(e){var t=e[W];0===t.i||1===t.i?t.j():t.g=!0}function A(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.O||b("ES5").S(t,e,i),i?(n[W].P&&(k(t),r(4)),o(e)&&(e=O(t,e),t.l||E(t,e)),t.u&&b("Patches").M(n[W],e,t.u,t.s)):e=O(t,n,[]),k(t),t.u&&t.v(t.u,t.s),e!==J?e:void 0}function O(e,t,n){if(m(t))return t;var r=t[W];if(!r)return a(t,(function(i,o){return M(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return E(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=g(r.k):r.o;a(3===r.i?new Set(i):i,(function(t,o){return M(e,r,i,t,o,n)})),E(e,i,!1),n&&e.u&&b("Patches").R(r,n,e.u,e.s)}return r.o}function M(e,t,n,r,a,s){if(i(a)){var l=O(e,a,s&&t&&3!==t.i&&!u(t.D,r)?s.concat(r):void 0);if(c(n,r,l),!i(l))return;e.m=!1}if(o(a)&&!m(a)){if(!e.h.F&&e._<1)return;O(e,a),t&&t.A.l||E(e,a)}}function E(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&y(t,n)}function P(e,t){var n=e[W];return(n?p(n):e)[t]}function I(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function D(e){e.P||(e.P=!0,e.l&&D(e.l))}function L(e){e.o||(e.o=g(e.t))}function R(e,t,n){var r=d(t)?b("MapSet").N(t,n):h(t)?b("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:x(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=$;n&&(i=[r],o=Q);var a=Proxy.revocable(i,o),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):b("ES5").J(t,n);return(n?n.A:x()).p.push(r),r}function N(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[W],i=s(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=j(t,i),r.I=!1}else n=j(t,i);return a(n,(function(t,i){r&&l(r.t,t)===i||c(n,t,e(i))})),3===i?new Set(n):n}(e)}function j(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}function B(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[W];return $.get(t,e)},set:function(t){var n=this[W];$.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][W];if(!i.P)switch(i.i){case 5:r(i)&&D(i);break;case 4:n(i)&&D(i)}}}function n(e){for(var t=e.t,n=e.k,r=Z(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==W){var a=t[o];if(void 0===a&&!u(t,o))return!0;var s=n[o],l=s&&s[W];if(l?l.t!==a:!f(s,a))return!0}}var c=!!t[W];return r.length!==Z(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var o={};w("ES5",{J:function(t,n){var r=Array.isArray(t),i=function(t,n){if(t){for(var r=Array(n.length),i=0;i1?r-1:0),o=1;o1?r-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}var o=b("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t.slice(n+1))}))},e}()),te=ee.produce,ne=(ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee),ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee),ee.createDraft.bind(ee),ee.finishDraft.bind(ee),te),re=n(180);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:ge,n=null,r=null;return function(){return ye(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}));function me(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"===typeof i?i(n,r,e):t(i)}}}}var be=me();be.withExtraArgument=me;var we=be;function xe(){return(xe=Object.assign||function(e){for(var t=1;t0&&(10===arguments[0]?p||(p=!0,f.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?f.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",u.Logger.errors.UNEXPECTED_ARGUMENT,{}):f.throwError("BigNumber.toString does not accept parameters",u.Logger.errors.UNEXPECTED_ARGUMENT,{})),m(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(d,y(t)):t.match(/^-?[0-9]+$/)?new e(d,y(new c(t))):f.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&b("underflow","BigNumber.from",t),(t>=9007199254740991||t<=-9007199254740991)&&b("overflow","BigNumber.from",t),e.from(String(t));var n=t;if("bigint"===typeof n)return e.from(n.toString());if(Object(s.isBytes)(n))return e.from(Object(s.hexlify)(n));if(n)if(n.toHexString){var r=n.toHexString();if("string"===typeof r)return e.from(r)}else{var i=n._hex;if(null==i&&"BigNumber"===n.type&&(i=n.hex),"string"===typeof i&&(Object(s.isHexString)(i)||"-"===i[0]&&Object(s.isHexString)(i.substring(1))))return e.from(i)}return f.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function y(e){if("string"!==typeof e)return y(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&f.throwArgumentError("invalid hex","value",e),"0x00"===(e=y(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function v(e){return g.from(y(e))}function m(e){var t=g.from(e).toHexString();return"-"===t[0]?new c("-"+t.substring(3),16):new c(t.substring(2),16)}function b(e,t,n){var r={fault:e,operation:t};return null!=n&&(r.value=n),f.throwError(e,u.Logger.errors.NUMERIC_FAULT,r)}function w(e){return new c(e,36).toString(16)}function x(e){return new c(e,16).toString(36)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(142);var i=n(120);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(367).Buffer}catch(T){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function l(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,c=n;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l>>26,f=67108863&u,d=Math.min(l,t.length-1),h=Math.max(0,l-e.length+1);h<=d;h++){var p=l-h|0;c+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[l]=0|f,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:c[l-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,l=new e(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,y=0|a[2],v=8191&y,m=y>>>13,b=0|a[3],w=8191&b,x=b>>>13,_=0|a[4],k=8191&_,S=_>>>13,T=0|a[5],C=8191&T,A=T>>>13,O=0|a[6],M=8191&O,E=O>>>13,P=0|a[7],I=8191&P,D=P>>>13,L=0|a[8],R=8191&L,N=L>>>13,j=0|a[9],B=8191&j,F=j>>>13,z=0|s[0],V=8191&z,H=z>>>13,U=0|s[1],G=8191&U,J=U>>>13,X=0|s[2],W=8191&X,q=X>>>13,Z=0|s[3],K=8191&Z,Y=Z>>>13,$=0|s[4],Q=8191&$,ee=$>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,de=ce>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ye=(l+(r=Math.imul(f,V))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,V)|0))<<13)|0;l=((o=Math.imul(d,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(p,V),i=(i=Math.imul(p,H))+Math.imul(g,V)|0,o=Math.imul(g,H);var ve=(l+(r=r+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,J)|0)+Math.imul(d,G)|0))<<13)|0;l=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,V),i=(i=Math.imul(v,H))+Math.imul(m,V)|0,o=Math.imul(m,H),r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,J)|0;var me=(l+(r=r+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(d,W)|0))<<13)|0;l=((o=o+Math.imul(d,q)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(w,V),i=(i=Math.imul(w,H))+Math.imul(x,V)|0,o=Math.imul(x,H),r=r+Math.imul(v,G)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,J)|0,r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,q)|0;var be=(l+(r=r+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(d,K)|0))<<13)|0;l=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(k,V),i=(i=Math.imul(k,H))+Math.imul(S,V)|0,o=Math.imul(S,H),r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,q)|0,r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,Y)|0;var we=(l+(r=r+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,Q)|0))<<13)|0;l=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,V),i=(i=Math.imul(C,H))+Math.imul(A,V)|0,o=Math.imul(A,H),r=r+Math.imul(k,G)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,J)|0,r=r+Math.imul(w,W)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,q)|0,r=r+Math.imul(v,K)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0;var xe=(l+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;l=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(M,V),i=(i=Math.imul(M,H))+Math.imul(E,V)|0,o=Math.imul(E,H),r=r+Math.imul(C,G)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(k,W)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,q)|0,r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(l+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;l=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,V),i=(i=Math.imul(I,H))+Math.imul(D,V)|0,o=Math.imul(D,H),r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,q)|0,r=r+Math.imul(k,K)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var ke=(l+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(d,ue)|0))<<13)|0;l=((o=o+Math.imul(d,le)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(R,V),i=(i=Math.imul(R,H))+Math.imul(N,V)|0,o=Math.imul(N,H),r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(D,G)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(M,W)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,q)|0,r=r+Math.imul(C,K)|0,i=(i=i+Math.imul(C,Y)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(x,ne)|0,o=o+Math.imul(x,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,le)|0;var Se=(l+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;l=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,V),i=(i=Math.imul(B,H))+Math.imul(F,V)|0,o=Math.imul(F,H),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,q)|0,r=r+Math.imul(M,K)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,ae)|0,r=r+Math.imul(v,ue)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Te=(l+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;l=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,G),i=(i=Math.imul(B,J))+Math.imul(F,G)|0,o=Math.imul(F,J),r=r+Math.imul(R,W)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,q)|0,r=r+Math.imul(I,K)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,le)|0,r=r+Math.imul(v,fe)|0,i=(i=i+Math.imul(v,de)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,de)|0;var Ce=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;l=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,W),i=(i=Math.imul(B,q))+Math.imul(F,W)|0,o=Math.imul(F,q),r=r+Math.imul(R,K)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,ee)|0,r=r+Math.imul(M,ne)|0,i=(i=i+Math.imul(M,re)|0)+Math.imul(E,ne)|0,o=o+Math.imul(E,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,le)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,le)|0,r=r+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(x,fe)|0,o=o+Math.imul(x,de)|0;var Ae=(l+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,ge)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,ge)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,Y))+Math.imul(F,K)|0,o=Math.imul(F,Y),r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,re)|0,r=r+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,ae)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,r=r+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Oe=(l+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(x,pe)|0))<<13)|0;l=((o=o+Math.imul(x,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,le)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Me=(l+(r=r+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(S,pe)|0))<<13)|0;l=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,r=r+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(D,ue)|0,o=o+Math.imul(D,le)|0,r=r+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,de)|0)+Math.imul(E,fe)|0,o=o+Math.imul(E,de)|0;var Ee=(l+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(A,pe)|0))<<13)|0;l=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(B,oe),i=(i=Math.imul(B,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),r=r+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,le)|0,r=r+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,de)|0)+Math.imul(D,fe)|0,o=o+Math.imul(D,de)|0;var Pe=(l+(r=r+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(E,pe)|0))<<13)|0;l=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,ue),i=(i=Math.imul(B,le))+Math.imul(F,ue)|0,o=Math.imul(F,le),r=r+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,de)|0)+Math.imul(N,fe)|0,o=o+Math.imul(N,de)|0;var Ie=(l+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ge)|0)+Math.imul(D,pe)|0))<<13)|0;l=((o=o+Math.imul(D,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,fe),i=(i=Math.imul(B,de))+Math.imul(F,fe)|0,o=Math.imul(F,de);var De=(l+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,ge)|0)+Math.imul(N,pe)|0))<<13)|0;l=((o=o+Math.imul(N,ge)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863;var Le=(l+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,ge))+Math.imul(F,pe)|0))<<13)|0;return l=((o=Math.imul(F,ge))+(i>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=ye,u[1]=ve,u[2]=me,u[3]=be,u[4]=we,u[5]=xe,u[6]=_e,u[7]=ke,u[8]=Se,u[9]=Te,u[10]=Ce,u[11]=Ae,u[12]=Oe,u[13]=Me,u[14]=Ee,u[15]=Pe,u[16]=Ie,u[17]=De,u[18]=Le,0!==l&&(u[19]=l,n.length++),n};function g(e,t,n){return(new y).mulp(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):g(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0===(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(b,m),b.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},k.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,y=0;0!==g.cmp(s);y++)g=g.redSqr();r(y=0;r--){for(var l=t.words[r],c=u-1;c>=0;c--){var f=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===c)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,k),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(189)(e))},function(e,t,n){"use strict";n.r(t),n.d(t,"getAddress",(function(){return g})),n.d(t,"isAddress",(function(){return y})),n.d(t,"getIcapAddress",(function(){return v})),n.d(t,"getContractAddress",(function(){return m})),n.d(t,"getCreate2Address",(function(){return b}));var r=n(5),i=n(25),o=n(29),a=n(71),s=new(n(8).Logger)("address/5.1.0");function u(e){Object(r.isHexString)(e,20)||s.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40),i=0;i<40;i++)n[i]=t[i].charCodeAt(0);for(var a=Object(r.arrayify)(Object(o.keccak256)(n)),u=0;u<40;u+=2)a[u>>1]>>4>=8&&(t[u]=t[u].toUpperCase()),(15&a[u>>1])>=8&&(t[u+1]=t[u+1].toUpperCase());return"0x"+t.join("")}for(var l={},c=0;c<10;c++)l[String(c)]=String(c);for(var f=0;f<26;f++)l[String.fromCharCode(65+f)]=String(10+f);var d,h=Math.floor((d=9007199254740991,Math.log10?Math.log10(d):Math.log(d)/Math.LN10));function p(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return l[e]})).join("");t.length>=h;){var n=t.substring(0,h);t=parseInt(n,10)%97+t.substring(n.length)}for(var r=String(98-parseInt(t,10)%97);r.length<2;)r="0"+r;return r}function g(e){var t=null;if("string"!==typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=u(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&s.throwArgumentError("bad icap checksum","address",e),t=Object(i.c)(e.substring(4));t.length<40;)t="0"+t;t=u("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function y(e){try{return g(e),!0}catch(t){}return!1}function v(e){for(var t=Object(i.b)(g(e).substring(2)).toUpperCase();t.length<30;)t="0"+t;return"XE"+p("XE00"+t)+t}function m(e){var t=null;try{t=g(e.from)}catch(u){s.throwArgumentError("missing from address","transaction",e)}var n=Object(r.stripZeros)(Object(r.arrayify)(i.a.from(e.nonce).toHexString()));return g(Object(r.hexDataSlice)(Object(o.keccak256)(Object(a.encode)([t,n])),12))}function b(e,t,n){return 32!==Object(r.hexDataLength)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(r.hexDataLength)(n)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",n),g(Object(r.hexDataSlice)(Object(o.keccak256)(Object(r.concat)(["0xff",g(e),t,n])),12))}},function(e,t,n){"use strict";n.r(t),n.d(t,"keccak256",(function(){return a}));var r=n(288),i=n.n(r),o=n(5);function a(e){return"0x"+i.a.keccak_256(Object(o.arrayify)(e))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return l}));var r=n(5),i=n(37);function o(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Object(r.arrayify)(e)}function a(e,t){for(e=String(e);e.length=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n0&&t+e.length!==n.length&&e.search(w)>-1&&":"!==n.charAt(t-2)&&("-"!==n.charAt(t+e.length)||"-"===n.charAt(t-1))&&n.charAt(t-1).search(/[^\s-]/)<0?e.toLowerCase():e.substr(1).search(/[A-Z]|\../)>-1?e:e.charAt(0).toUpperCase()+e.substr(1)})):e}var _=[],k={calls:_,ga:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A(e){return(A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1?t-1:0),r=1;r0&&(L.apply(void 0,t),E&&"with arguments: ".concat(JSON.stringify(t))),window.ga}function z(e,t){e&&"object"===A(e)&&(Object.keys(e).length,N(t,"set",e),E&&"with fieldsObject: ".concat(JSON.stringify(e)))}function V(e,t){N(t,"send",e),E&&("with fieldObject: ".concat(JSON.stringify(e)),"with trackers: ".concat(JSON.stringify(t)))}function H(e,t,n){if(e){var r=b(e);if(""!==r){var i={};if(n&&(i.title=n),N(t,"send",function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.variable,r=e.value,i=e.label,o=arguments.length>1?arguments[1]:void 0;if(t&&n&&r&&"number"===typeof r){var a={hitType:"timing",timingCategory:R(t),timingVar:R(n),timingValue:r};i&&(a.timingLabel=R(i)),V(a,o)}}function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.category,n=e.action,r=e.label,i=e.value,o=e.nonInteraction,a=e.transport,s=S(e,["category","action","label","value","nonInteraction","transport"]),u=arguments.length>1?arguments[1]:void 0;if(t&&n){var l={hitType:"event",eventCategory:R(t),eventAction:R(n)};r&&(l.eventLabel=R(r)),"undefined"!==typeof i&&("number"!==typeof i||(l.eventValue=i)),"undefined"!==typeof o&&("boolean"!==typeof o||(l.nonInteraction=o)),"undefined"!==typeof a&&("string"!==typeof a||(["beacon","xhr","image"].indexOf(a),l.transport=a)),Object.keys(s).filter((function(e){return"dimension"===e.substr(0,"dimension".length)})).forEach((function(e){l[e]=s[e]})),Object.keys(s).filter((function(e){return"metric"===e.substr(0,"metric".length)})).forEach((function(e){l[e]=s[e]})),V(l,u)}}function X(e,t){var n=e.description,r=e.fatal,i={hitType:"exception"};n&&(i.exDescription=R(n)),"undefined"!==typeof r&&("boolean"!==typeof r||(i.exFatal=r)),V(i,t)}var W={require:function(e,t,n){if(e){var r=b(e);if(""!==r){var i=n?"".concat(n,".require"):"require";if(t){if("object"!==A(t))return;Object.keys(t).length,F(i,r,t),E&&"called ga('require', '".concat(r,"', ").concat(JSON.stringify(t))}else F(i,r),E&&"called ga('require', '".concat(r,"');")}}},execute:function(e,t){var n,r;if(1===(arguments.length<=2?0:arguments.length-2)?n=arguments.length<=2?void 0:arguments[2]:(r=arguments.length<=2?void 0:arguments[2],n=arguments.length<=3?void 0:arguments[3]),"string"!==typeof e);else if("string"!==typeof t);else{var i="".concat(e,":").concat(t);n=n||null,r&&n?(F(i,r,n),E&&("called ga('".concat(i,"');"),'actionType: "'.concat(r,'" with payload: ').concat(JSON.stringify(n)))):n?(F(i,n),E&&("called ga('".concat(i,"');"),"with payload: ".concat(JSON.stringify(n)))):(F(i),E&&"called ga('".concat(i,"');"))}}};function q(e,t,n){if("function"===typeof t&&e&&e.label){var r={hitType:"event",eventCategory:"Outbound",eventAction:"Click",eventLabel:R(e.label)},i=!1,o=setTimeout((function(){i=!0,t()}),250);r.hitCallback=function(){clearTimeout(o),i||t()},V(r,n)}}var Z=k,K={initialize:B,ga:F,set:z,send:V,pageview:H,modalview:U,timing:G,event:J,exception:X,plugin:W,outboundLink:q,testModeAPI:k};function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}m.origTrackLink=m.trackLink,m.trackLink=q;var Q=m;t.a=function(e){for(var t=1;t=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"computeAddress",(function(){return v})),n.d(t,"recoverAddress",(function(){return m})),n.d(t,"accessListify",(function(){return x})),n.d(t,"serialize",(function(){return k})),n.d(t,"parse",(function(){return S}));var r=n(28),i=n(25),o=n(5),a=n(107),s=n(29),u=n(7),l=n(71),c=n(61),f=n(8),d=new f.Logger("transactions/5.1.1");function h(e){return"0x"===e?null:Object(r.getAddress)(e)}function p(e){return"0x"===e?a.f:i.a.from(e)}var g=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0};function v(e){var t=Object(c.computePublicKey)(e);return Object(r.getAddress)(Object(o.hexDataSlice)(Object(s.keccak256)(Object(o.hexDataSlice)(t,1)),12))}function m(e,t){return v(Object(c.recoverPublicKey)(Object(o.arrayify)(e),t))}function b(e,t){var n=Object(o.stripZeros)(i.a.from(e).toHexString());return n.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),n}function w(e,t){return{address:Object(r.getAddress)(e),storageKeys:(t||[]).map((function(t,n){return 32!==Object(o.hexDataLength)(t)&&d.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(n,"]"),t),t.toLowerCase()}))}}function x(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),w(e[0],e[1])):w(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var n=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return w(t,Object.keys(n).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function _(e,t){var n,i=[b(e.chainId||0,"chainId"),b(e.nonce||0,"nonce"),b(e.gasPrice||0,"gasPrice"),b(e.gasLimit||0,"gasLimit"),null!=e.to?Object(r.getAddress)(e.to):"0x",b(e.value||0,"value"),e.data||"0x",(n=e.accessList||[],x(n).map((function(e){return[e.address,e.storageKeys]})))];if(t){var a=Object(o.splitSignature)(t);i.push(b(a.recoveryParam,"recoveryParam")),i.push(Object(o.stripZeros)(a.r)),i.push(Object(o.stripZeros)(a.s))}return Object(o.hexConcat)(["0x01",l.encode(i)])}function k(e,t){if(null==e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){Object(u.checkProperties)(e,y);var n=[];g.forEach((function(t){var r=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),r=Object(o.arrayify)(Object(o.hexlify)(r,i)),t.length&&r.length!==t.length&&r.length>0&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),t.maxLength&&(r=Object(o.stripZeros)(r)).length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),n.push(Object(o.hexlify)(r))}));var r=0;if(null!=e.chainId?"number"!==typeof(r=e.chainId)&&d.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!Object(o.isBytesLike)(t)&&t.v>28&&(r=Math.floor((t.v-35)/2)),0!==r&&(n.push(Object(o.hexlify)(r)),n.push("0x"),n.push("0x")),!t)return l.encode(n);var i=Object(o.splitSignature)(t),a=27+i.recoveryParam;return 0!==r?(n.pop(),n.pop(),n.pop(),a+=2*r+8,i.v>28&&i.v!==a&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==a&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),n.push(Object(o.hexlify)(a)),n.push(Object(o.stripZeros)(Object(o.arrayify)(i.r))),n.push(Object(o.stripZeros)(Object(o.arrayify)(i.s))),l.encode(n)}(e,t);switch(e.type){case 1:return _(e,t)}return d.throwError("unsupported transaction type: ".concat(e.type),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function S(e){var t=Object(o.arrayify)(e);if(t[0]>127)return function(e){var t=l.decode(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);var n={nonce:p(t[0]).toNumber(),gasPrice:p(t[1]),gasLimit:p(t[2]),to:h(t[3]),value:p(t[4]),data:t[5],chainId:0};if(6===t.length)return n;try{n.v=i.a.from(t[6]).toNumber()}catch(c){return n}if(n.r=Object(o.hexZeroPad)(t[7],32),n.s=Object(o.hexZeroPad)(t[8],32),i.a.from(n.r).isZero()&&i.a.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);var r=n.v-27,a=t.slice(0,6);0!==n.chainId&&(a.push(Object(o.hexlify)(n.chainId)),a.push("0x"),a.push("0x"),r-=2*n.chainId+8);var u=Object(s.keccak256)(l.encode(a));try{n.from=m(u,{r:Object(o.hexlify)(n.r),s:Object(o.hexlify)(n.s),recoveryParam:r})}catch(c){}n.hash=Object(s.keccak256)(e)}return n.type=null,n}(t);switch(t[0]){case 1:return function(e){var t=l.decode(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",Object(o.hexlify)(e));var n={type:1,chainId:p(t[0]).toNumber(),nonce:p(t[1]).toNumber(),gasPrice:p(t[2]),gasLimit:p(t[3]),to:h(t[4]),value:p(t[5]),data:t[6],accessList:x(t[7])};if(8===t.length)return n;try{var r=p(t[8]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");n.v=r}catch(a){d.throwArgumentError("invalid v for transaction type: 1","v",t[8])}n.r=Object(o.hexZeroPad)(t[9],32),n.s=Object(o.hexZeroPad)(t[10],32);try{var i=Object(s.keccak256)(_(n));n.from=m(i,{r:n.r,s:n.s,recoveryParam:n.v})}catch(a){}return n.hash=Object(s.keccak256)(e),n}(t)}return d.throwError("unsupported transaction type: ".concat(t[0]),f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return h})),n.d(t,"h",(function(){return p})),n.d(t,"g",(function(){return g}));var r,i,o=n(5),a=new(n(8).Logger)("strings/5.1.0");function s(e,t,n,r,o){if(e===i.BAD_PREFIX||e===i.UNEXPECTED_CONTINUE){for(var a=0,s=t+1;s>6===2;s++)a++;return a}return e===i.OVERRUN?n.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(r||(r={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(i||(i={}));var u=Object.freeze({error:function(e,t,n,r,i){return a.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",n)},ignore:s,replace:function(e,t,n,r,o){return e===i.OVERLONG?(r.push(o),0):(r.push(65533),s(e,t,n))}});function l(e,t){null==t&&(t=u.error),e=Object(o.arrayify)(e);for(var n=[],r=0;r>7!==0){var s=null,l=null;if(192===(224&a))s=1,l=127;else if(224===(240&a))s=2,l=2047;else{if(240!==(248&a)){r+=t(128===(192&a)?i.UNEXPECTED_CONTINUE:i.BAD_PREFIX,r-1,e,n);continue}s=3,l=65535}if(r-1+s>=e.length)r+=t(i.OVERRUN,r-1,e,n);else{for(var c=a&(1<<8-s-1)-1,f=0;f1114111?r+=t(i.OUT_OF_RANGE,r-1-s,e,n,c):c>=55296&&c<=57343?r+=t(i.UTF16_SURROGATE,r-1-s,e,n,c):c<=l?r+=t(i.OVERLONG,r-1-s,e,n,c):n.push(c))}}else n.push(a)}return n}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.current;t!=r.current&&(a.checkNormalize(),e=e.normalize(t));for(var n=[],i=0;i>6|192),n.push(63&s|128);else if(55296==(64512&s)){i++;var u=e.charCodeAt(i);if(i>=e.length||56320!==(64512&u))throw new Error("invalid utf-8 string");var l=65536+((1023&s)<<10)+(1023&u);n.push(l>>18|240),n.push(l>>12&63|128),n.push(l>>6&63|128),n.push(63&l|128)}else n.push(s>>12|224),n.push(s>>6&63|128),n.push(63&s|128)}return Object(o.arrayify)(n)}function f(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+l(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?f(e):f(55296+((e-=65536)>>10&1023))+f(56320+(1023&e))})).join("")+'"'}function h(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function p(e,t){return h(l(e,t))}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.current;return l(c(e,t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return w}));var r=n(39),i=n(47),o=n(0),a=n.n(o),s=n(74),u=(n(18),n(20)),l=n(35),c=n(33);a.a.Component;var f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return f})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return p}));var r=n(11),i=n(13),o=n(5),a=n(25),s=n(7),u=n(8),l=n(84),c=new u.Logger(l.a);function f(e){var t=[];return function e(n,r){if(Array.isArray(r))for(var i in r){var o=n.slice();o.push(i);try{e(o,r[i])}catch(a){t.push({path:o,error:a})}}}([],e),t}var d=function(){function e(t,n,i,o){Object(r.a)(this,e),this.name=t,this.type=n,this.localName=i,this.dynamic=o}return Object(i.a)(e,[{key:"_throwError",value:function(e,t){c.throwArgumentError(e,this.localName,t)}}]),e}(),h=function(){function e(t){Object(r.a)(this,e),Object(s.defineReadOnly)(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}return Object(i.a)(e,[{key:"data",get:function(){return Object(o.hexConcat)(this._data)}},{key:"length",get:function(){return this._dataLength}},{key:"_writeData",value:function(e){return this._data.push(e),this._dataLength+=e.length,e.length}},{key:"appendWriter",value:function(e){return this._writeData(Object(o.concat)(e._data))}},{key:"writeBytes",value:function(e){var t=Object(o.arrayify)(e),n=t.length%this.wordSize;return n&&(t=Object(o.concat)([t,this._padding.slice(n)])),this._writeData(t)}},{key:"_getValue",value:function(e){var t=Object(o.arrayify)(a.a.from(e));return t.length>this.wordSize&&c.throwError("value out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(o.concat)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(n){e._data[t]=e._getValue(n)}}}]),e}(),p=function(){function e(t,n,i,a){Object(r.a)(this,e),Object(s.defineReadOnly)(this,"_data",Object(o.arrayify)(t)),Object(s.defineReadOnly)(this,"wordSize",n||32),Object(s.defineReadOnly)(this,"_coerceFunc",i),Object(s.defineReadOnly)(this,"allowLoose",a),this._offset=0}return Object(i.a)(e,[{key:"data",get:function(){return Object(o.hexlify)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,n){return this._coerceFunc?this._coerceFunc(t,n):e.coerce(t,n)}},{key:"_peekBytes",value:function(e,t,n){var r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:c.throwError("data out-of-bounds",u.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}},{key:"readValue",value:function(){return a.a.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}}]),e}()},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return C})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return A}));var r=n(0),i=n.n(r),o=n(33),a=n(77),s=n(5),u=n(29);function l(){return(l=Object.assign||function(e){for(var t=1;t>1]>>4>=8&&(n[l]=n[l].toUpperCase()),(15&a[l>>1])>=8&&(n[l+1]=n[l+1].toUpperCase());var c="0x"+n.join("");return t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==c&&Object(o.default)(!1),c}var b,w=function(e,t){try{var n=function(n){return Promise.resolve(Promise.all([void 0===t.chainId?e.getChainId():t.chainId,void 0===t.account?e.getAccount():t.account])).then((function(t){var r=t[0],i=t[1],o=v(r);if(e.supportedChainIds&&!e.supportedChainIds.includes(o))throw new _(o,e.supportedChainIds);var a=null===i?i:m(i);return{provider:n,chainId:o,account:a}}))},r=void 0===t.provider;return Promise.resolve(r?Promise.resolve(e.getProvider()).then(n):n(t.provider))}catch(i){return Promise.reject(i)}},x=function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t}return c(t,e),t}(g(Error)),_=function(e){function t(t,n){var r;return(r=e.call(this)||this).name=r.constructor.name,r.message="Unsupported chain id: "+t+". Supported chain ids are: "+n+".",r}return c(t,e),t}(g(Error));function k(e,t){var n=t.type,r=t.payload;switch(n){case b.ACTIVATE_CONNECTOR:return{connector:r.connector,provider:r.provider,chainId:r.chainId,account:r.account,onError:r.onError};case b.UPDATE:var i=r.provider,o=r.chainId,a=r.account;return l({},e,void 0===i?{}:{provider:i},void 0===o?{}:{chainId:o},void 0===a?{}:{account:a});case b.UPDATE_FROM_ERROR:var s=r.provider,u=r.chainId,c=r.account;return l({},e,void 0===s?{}:{provider:s},void 0===u?{}:{chainId:u},void 0===c?{}:{account:c},{error:void 0});case b.ERROR:var f=r.error;return{connector:e.connector,error:f,onError:e.onError};case b.ERROR_FROM_ACTIVATION:return{connector:r.connector,error:r.error};case b.DEACTIVATE_CONNECTOR:return{}}}!function(e){e[e.ACTIVATE_CONNECTOR=0]="ACTIVATE_CONNECTOR",e[e.UPDATE=1]="UPDATE",e[e.UPDATE_FROM_ERROR=2]="UPDATE_FROM_ERROR",e[e.ERROR=3]="ERROR",e[e.ERROR_FROM_ACTIVATION=4]="ERROR_FROM_ACTIVATION",e[e.DEACTIVATE_CONNECTOR=5]="DEACTIVATE_CONNECTOR"}(b||(b={}));var S={};function T(e){S[e]&&Object(o.default)(!1),S[e]=Object(r.createContext)({activate:function(){try{return Object(o.default)(!1),Promise.resolve()}catch(e){return Promise.reject(e)}},setError:function(){Object(o.default)(!1)},deactivate:function(){Object(o.default)(!1)},active:!1}),S[e].displayName="Web3ReactContext - "+e;var t=S[e].Provider;return function(e){var n=e.getLibrary,o=e.children,s=function(){var e=Object(r.useReducer)(k,{}),t=e[0],n=e[1],i=t.connector,o=t.provider,s=t.chainId,u=t.account,c=t.onError,f=t.error,d=Object(r.useRef)(-1);d.current+=1;var h=Object(r.useCallback)((function(e,t,r){void 0===r&&(r=!1);try{var i=d.current,o=!1;return Promise.resolve(y((function(){return Promise.resolve(e.activate().then((function(e){return o=!0,e}))).then((function(r){return Promise.resolve(w(e,r)).then((function(r){if(d.current>i)throw new x;n({type:b.ACTIVATE_CONNECTOR,payload:l({connector:e},r,{onError:t})})}))}))}),(function(i){if(i instanceof x)o&&e.deactivate();else{if(r)throw o&&e.deactivate(),i;t?(o&&e.deactivate(),t(i)):n({type:b.ERROR_FROM_ACTIVATION,payload:{connector:e,error:i}})}})))}catch(a){return Promise.reject(a)}}),[]),p=Object(r.useCallback)((function(e){n({type:b.ERROR,payload:{error:e}})}),[]),g=Object(r.useCallback)((function(){n({type:b.DEACTIVATE_CONNECTOR})}),[]),S=Object(r.useCallback)((function(e){try{if(!i)throw Error("This should never happen, it's just so Typescript stops complaining");var t=d.current;return Promise.resolve(function(){if(f)return y((function(){return Promise.resolve(w(i,e)).then((function(e){if(d.current>t)throw new x;n({type:b.UPDATE_FROM_ERROR,payload:e})}))}),(function(e){e instanceof x||(c?c(e):n({type:b.ERROR,payload:{error:e}}))}));var r=void 0===e.chainId?void 0:v(e.chainId);if(void 0!==r&&i.supportedChainIds&&!i.supportedChainIds.includes(r)){var o=new _(r,i.supportedChainIds);c?c(o):n({type:b.ERROR,payload:{error:o}})}else{var a="string"===typeof e.account?m(e.account):e.account;n({type:b.UPDATE,payload:{provider:e.provider,chainId:r,account:a}})}}())}catch(r){return Promise.reject(r)}}),[i,f,c]),T=Object(r.useCallback)((function(e){c?c(e):n({type:b.ERROR,payload:{error:e}})}),[c]),C=Object(r.useCallback)((function(){n({type:b.DEACTIVATE_CONNECTOR})}),[]);return Object(r.useEffect)((function(){return function(){i&&i.deactivate()}}),[i]),Object(r.useEffect)((function(){return i&&i.on(a.a.Update,S).on(a.a.Error,T).on(a.a.Deactivate,C),function(){i&&i.off(a.a.Update,S).off(a.a.Error,T).off(a.a.Deactivate,C)}}),[i,S,T,C]),{connector:i,provider:o,chainId:s,account:u,activate:h,setError:p,deactivate:g,error:f}}(),u=s.connector,c=s.provider,f=s.chainId,d=s.account,h=s.activate,p=s.setError,g=s.deactivate,S=s.error,T=void 0!==u&&void 0!==f&&void 0!==d&&!S,C=Object(r.useMemo)((function(){return T&&void 0!==f&&Number.isInteger(f)&&u?n(c,u):void 0}),[T,n,c,u,f]),A={connector:u,library:C,chainId:f,account:d,activate:h,setError:p,deactivate:g,active:T,error:S};return i.a.createElement(t,{value:A},o)}}var C=T("primary");function A(e){return Object(r.useContext)(function(e){return void 0===e&&(e="primary"),Object.keys(S).includes(e)||Object(o.default)(!1),S[e]}(e))}},,,function(e,t,n){"use strict";n.r(t),n.d(t,"defaultPath",(function(){return S})),n.d(t,"HDNode",(function(){return T})),n.d(t,"mnemonicToSeed",(function(){return C})),n.d(t,"mnemonicToEntropy",(function(){return A})),n.d(t,"entropyToMnemonic",(function(){return O})),n.d(t,"isValidMnemonic",(function(){return M}));var r=n(11),i=n(13),o=n(90),a=n(5),s=n(25),u=n(37),l=n(587),c=n(7),f=n(61),d=n(85),h=n(154),p=n(36),g=n(617),y=new(n(8).Logger)("hdnode/5.1.0"),v=s.a.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),m=Object(u.f)("Bitcoin seed");function b(e){return(1<=256)throw new Error("Depth too large!");return x(Object(a.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(a.hexlify)(this.depth),this.parentFingerprint,Object(a.hexZeroPad)(Object(a.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?Object(a.concat)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(k,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var n=this.path;n&&(n+="/"+(2147483647&t));var r=new Uint8Array(37);if(2147483648&t){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(Object(a.arrayify)(this.privateKey),1),n&&(n+="'")}else r.set(Object(a.arrayify)(this.publicKey));for(var i=24;i>=0;i-=8)r[33+(i>>3)]=t>>24-i&255;var o=Object(a.arrayify)(Object(d.a)(h.a.sha512,this.chainCode,r)),u=o.slice(0,32),l=o.slice(32),c=null,p=null;this.privateKey?c=w(s.a.from(u).add(this.privateKey).mod(v)):p=new f.SigningKey(Object(a.hexlify)(u))._addPoint(this.publicKey);var g=n,y=this.mnemonic;return y&&(g=Object.freeze({phrase:y.phrase,path:n,locale:y.locale||"en"})),new e(k,c,p,this.fingerprint,w(l),t,this.depth+1,g)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var n=this,r=0;r=2147483648)throw new Error("invalid path index - "+i);n=n._derive(2147483648+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);var a=parseInt(i);if(a>=2147483648)throw new Error("invalid path index - "+i);n=n._derive(a)}}return n}}],[{key:"_fromSeed",value:function(t,n){var r=Object(a.arrayify)(t);if(r.length<16||r.length>64)throw new Error("invalid seed");var i=Object(a.arrayify)(Object(d.a)(h.a.sha512,m,r));return new e(k,w(i.slice(0,32)),null,"0x00000000",w(i.slice(32)),0,0,n)}},{key:"fromMnemonic",value:function(t,n,r){return t=O(A(t,r=_(r)),r),e._fromSeed(C(t,n),{phrase:t,path:"m",locale:r.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var n=o.Base58.decode(t);82===n.length&&x(n.slice(0,78))===t||y.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var r=n[4],i=Object(a.hexlify)(n.slice(5,9)),s=parseInt(Object(a.hexlify)(n.slice(9,13)).substring(2),16),u=Object(a.hexlify)(n.slice(13,45)),l=n.slice(45,78);switch(Object(a.hexlify)(n.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(k,null,Object(a.hexlify)(l),i,u,s,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==l[0])break;return new e(k,Object(a.hexlify)(l.slice(1)),null,i,u,s,r,null)}return y.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function C(e,t){t||(t="");var n=Object(u.f)("mnemonic"+t,u.a.NFKD);return Object(l.a)(Object(u.f)(e,u.a.NFKD),n,2048,64,"sha512")}function A(e,t){t=_(t),y.checkNormalize();var n=t.split(e);if(n.length%3!==0)throw new Error("invalid mnemonic");for(var r=Object(a.arrayify)(new Uint8Array(Math.ceil(11*n.length/8))),i=0,o=0;o>3]|=1<<7-i%8),i++}var l=32*n.length/3,c=b(n.length/3);if((Object(a.arrayify)(Object(d.c)(r.slice(0,l/8)))[0]&c)!==(r[r.length-1]&c))throw new Error("invalid checksum");return Object(a.hexlify)(r.slice(0,l/8))}function O(e,t){if(t=_(t),(e=Object(a.arrayify)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var n=[0],r=11,i=0;i8?(n[n.length-1]<<=8,n[n.length-1]|=e[i],r-=8):(n[n.length-1]<<=r,n[n.length-1]|=e[i]>>8-r,n.push(e[i]&(1<<8-r)-1),r+=3);var o=e.length/4,s=Object(a.arrayify)(Object(d.c)(e))[0]&b(o);return n[n.length-1]<<=o,n[n.length-1]|=s>>8-o,t.join(n.map((function(e){return t.getWord(e)})))}function M(e,t){try{return A(e,t),!0}catch(n){}return!1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(123);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){"use strict";n.r(t);var r=n(192);n.d(t,"formatBytes32String",(function(){return r.a})),n.d(t,"parseBytes32String",(function(){return r.b}));var i=n(162);n.d(t,"nameprep",(function(){return i.a}));var o=n(37);n.d(t,"_toEscapedUtf8String",(function(){return o.d})),n.d(t,"toUtf8Bytes",(function(){return o.f})),n.d(t,"toUtf8CodePoints",(function(){return o.g})),n.d(t,"toUtf8String",(function(){return o.h})),n.d(t,"Utf8ErrorFuncs",(function(){return o.b})),n.d(t,"Utf8ErrorReason",(function(){return o.c})),n.d(t,"UnicodeNormalizationForm",(function(){return o.a}))},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n0&&r%1===0,"invalid connection throttle limit","connection.throttleLimit",r);var a="object"===typeof e?e.throttleCallback:null,s="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;h.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);var c={},y=null,v={method:"GET"},m=!1,b=12e4;if("string"===typeof e)y=e;else if("object"===typeof e){if(null!=e&&null!=e.url||h.throwArgumentError("missing URL","connection.url",e),y=e.url,"number"===typeof e.timeout&&e.timeout>0&&(b=e.timeout),e.headers)for(var w in e.headers)c[w.toLowerCase()]={key:w,value:String(e.headers[w])},["if-none-match","if-modified-since"].indexOf(w.toLowerCase())>=0&&(m=!0);if(v.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==y.substring(0,6)&&!0!==e.allowInsecureAuthentication&&h.throwError("basic authentication requires a secure https url",l.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:y,user:e.user,password:"[REDACTED]"});var x=e.user+":"+e.password;c.authorization={key:"Authorization",value:"Basic "+Object(o.b)(Object(u.f)(x))}}}t&&(v.method="POST",v.body=t,null==c["content-type"]&&(c["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==c["content-length"]&&(c["content-length"]={key:"Content-Length",value:String(t.length)}));var _={};Object.keys(c).forEach((function(e){var t=c[e];_[t.key]=t.value})),v.headers=_;var k=function(){var e=null;return{promise:new Promise((function(t,n){b&&(e=setTimeout((function(){null!=e&&(e=null,n(h.makeError("timeout",l.Logger.errors.TIMEOUT,{requestBody:g(v.body,_["content-type"]),requestMethod:v.method,timeout:b,url:y})))}),b))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),S=function(){return d(this,void 0,void 0,i.a.mark((function e(){var t,o,u,c,d,b,w,x,S;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t=300)&&(k.cancel(),h.throwError("bad response",l.Logger.errors.SERVER_ERROR,{status:o.statusCode,headers:o.headers,body:g(b,o.headers?o.headers["content-type"]:null),requestBody:g(v.body,_["content-type"]),requestMethod:v.method,url:y})),!n){e.next=52;break}return e.prev=29,e.next=32,n(b,o);case 32:return w=e.sent,k.cancel(),e.abrupt("return",w);case 37:if(e.prev=37,e.t1=e.catch(29),!(e.t1.throttleRetry&&ts)return void(a()&&r(new Error("retry limit reached")));var l=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));lt.ceiling&&(l=t.ceiling),setTimeout(i,l)}return null}),(function(e){a()&&r(e)}))}()}))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return v})),n.d(t,"f",(function(){return b})),n.d(t,"d",(function(){return x})),n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return C})),n.d(t,"e",(function(){return A}));var r=n(16),i=n(17),o=n(11),a=n(13),s=n(25),u=n(7),l=n(8),c=n(84),f=new l.Logger(c.a),d={},h={calldata:!0,memory:!0,storage:!0},p={calldata:!0,memory:!0};function g(e,t){if("bytes"===e||"string"===e){if(h[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&p[t])return!0;return(h[t]||"payable"===t)&&f.throwArgumentError("invalid modifier","name",t),!1}function y(e,t){for(var n in t)Object(u.defineReadOnly)(e,n,t[n])}var v=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),m=new RegExp(/^(.*)\[([0-9]*)\]$/),b=function(){function e(t,n){Object(o.a)(this,e),t!==d&&f.throwError("use fromString",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),y(this,n);var r=this.type.match(m);y(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:e.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return Object(a.a)(e,[{key:"format",value:function(e){if(e||(e=v.sighash),v[e]||f.throwArgumentError("invalid format type","format",e),e===v.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var n="";return"array"===this.baseType?(n+=this.arrayChildren.format(e),n+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==v.sighash&&(n+=this.type),n+="("+this.components.map((function(t){return t.format(e)})).join(e===v.full?", ":",")+")"):n+=this.type,e!==v.sighash&&(!0===this.indexed&&(n+=" indexed"),e===v.full&&this.name&&(n+=" "+this.name)),n}}],[{key:"from",value:function(t,n){return"string"===typeof t?e.fromString(t,n):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(d,{name:t.name||null,type:O(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,n){return function(t){return e.fromObject({name:t.name,type:t.type,indexed:t.indexed,components:t.components})}(function(e,t){var n=e;function r(t){f.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var n={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(n.indexed=!1),n}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&f.throwArgumentError("invalid human-readable ABI signature","value",e),n[1].match(/^[0-9]+$/)||f.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=s.a.from(n[1]),n[0]):e}function S(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view"}}))}function T(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&f.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&f.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||f.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&f.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&f.throwArgumentError("unable to determine stateMutability","value",e),t}var C=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"format",value:function(e){if(e||(e=v.sighash),v[e]||f.throwArgumentError("invalid format type","format",e),e===v.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===v.sighash&&f.throwError("cannot format a constructor for sighash",l.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===v.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isConstructorFragment(e))return e;"constructor"!==e.type&&f.throwArgumentError("invalid constructor object","value",e);var t=T(e);t.constant&&f.throwArgumentError("constructor cannot be constant","value",e);var r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(b.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.a.from(e.gas):null};return new n(d,r)}},{key:"fromString",value:function(e){var t={type:"constructor"},r=(e=k(e,t)).match(P);return r&&"constructor"===r[1].trim()||f.throwArgumentError("invalid constructor string","value",e),t.inputs=w(r[2].trim(),!1),S(r[3].trim(),t),n.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),n}(x),A=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"format",value:function(e){if(e||(e=v.sighash),v[e]||f.throwArgumentError("invalid format type","format",e),e===v.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==v.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===v.full?", ":",")+") ",e!==v.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isFunctionFragment(e))return e;"function"!==e.type&&f.throwArgumentError("invalid function object","value",e);var t=T(e),r={type:e.type,name:E(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(b.fromObject):[],outputs:e.outputs?e.outputs.map(b.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?s.a.from(e.gas):null};return new n(d,r)}},{key:"fromString",value:function(e){var t={type:"function"},r=(e=k(e,t)).split(" returns ");r.length>2&&f.throwArgumentError("invalid function string","value",e);var i=r[0].match(P);if(i||f.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&E(t.name),t.inputs=w(i[2],!1),S(i[3].trim(),t),r.length>1){var o=r[1].match(P);""==o[1].trim()&&""==o[3].trim()||f.throwArgumentError("unexpected tokens","value",e),t.outputs=w(o[2],!1)}else t.outputs=[];return n.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),n}(C);function O(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var M=new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");function E(e){return e&&e.match(M)||f.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var P=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},function(e,t,n){"use strict";n.r(t),n.d(t,"get",(function(){return l})),n.d(t,"createParser",(function(){return c})),n.d(t,"createStyleFunction",(function(){return h})),n.d(t,"compose",(function(){return g})),n.d(t,"system",(function(){return p})),n.d(t,"margin",(function(){return V})),n.d(t,"padding",(function(){return H})),n.d(t,"space",(function(){return U})),n.d(t,"color",(function(){return b})),n.d(t,"layout",(function(){return y})),n.d(t,"typography",(function(){return x})),n.d(t,"flexbox",(function(){return k})),n.d(t,"border",(function(){return M})),n.d(t,"background",(function(){return I})),n.d(t,"position",(function(){return R})),n.d(t,"grid",(function(){return C})),n.d(t,"shadow",(function(){return G})),n.d(t,"boxShadow",(function(){return J})),n.d(t,"textShadow",(function(){return J})),n.d(t,"variant",(function(){return W})),n.d(t,"buttonStyle",(function(){return q})),n.d(t,"textStyle",(function(){return Z})),n.d(t,"colorStyle",(function(){return K})),n.d(t,"borders",(function(){return E})),n.d(t,"width",(function(){return Y})),n.d(t,"height",(function(){return $})),n.d(t,"minWidth",(function(){return Q})),n.d(t,"minHeight",(function(){return ee})),n.d(t,"maxWidth",(function(){return te})),n.d(t,"maxHeight",(function(){return ne})),n.d(t,"size",(function(){return re})),n.d(t,"verticalAlign",(function(){return ie})),n.d(t,"display",(function(){return oe})),n.d(t,"overflow",(function(){return ae})),n.d(t,"overflowX",(function(){return se})),n.d(t,"overflowY",(function(){return ue})),n.d(t,"opacity",(function(){return le})),n.d(t,"fontSize",(function(){return ce})),n.d(t,"fontFamily",(function(){return fe})),n.d(t,"fontWeight",(function(){return de})),n.d(t,"lineHeight",(function(){return he})),n.d(t,"textAlign",(function(){return pe})),n.d(t,"fontStyle",(function(){return ge})),n.d(t,"letterSpacing",(function(){return ye})),n.d(t,"alignItems",(function(){return ve})),n.d(t,"alignContent",(function(){return me})),n.d(t,"justifyItems",(function(){return be})),n.d(t,"justifyContent",(function(){return we})),n.d(t,"flexWrap",(function(){return xe})),n.d(t,"flexDirection",(function(){return _e})),n.d(t,"flex",(function(){return ke})),n.d(t,"flexGrow",(function(){return Se})),n.d(t,"flexShrink",(function(){return Te})),n.d(t,"flexBasis",(function(){return Ce})),n.d(t,"justifySelf",(function(){return Ae})),n.d(t,"alignSelf",(function(){return Oe})),n.d(t,"order",(function(){return Me})),n.d(t,"gridGap",(function(){return Ee})),n.d(t,"gridColumnGap",(function(){return Pe})),n.d(t,"gridRowGap",(function(){return Ie})),n.d(t,"gridColumn",(function(){return De})),n.d(t,"gridRow",(function(){return Le})),n.d(t,"gridAutoFlow",(function(){return Re})),n.d(t,"gridAutoColumns",(function(){return Ne})),n.d(t,"gridAutoRows",(function(){return je})),n.d(t,"gridTemplateColumns",(function(){return Be})),n.d(t,"gridTemplateRows",(function(){return Fe})),n.d(t,"gridTemplateAreas",(function(){return ze})),n.d(t,"gridArea",(function(){return Ve})),n.d(t,"borderWidth",(function(){return He})),n.d(t,"borderStyle",(function(){return Ue})),n.d(t,"borderColor",(function(){return Ge})),n.d(t,"borderTop",(function(){return Je})),n.d(t,"borderRight",(function(){return Xe})),n.d(t,"borderBottom",(function(){return We})),n.d(t,"borderLeft",(function(){return qe})),n.d(t,"borderRadius",(function(){return Ze})),n.d(t,"backgroundImage",(function(){return Ke})),n.d(t,"backgroundSize",(function(){return Ye})),n.d(t,"backgroundPosition",(function(){return $e})),n.d(t,"backgroundRepeat",(function(){return Qe})),n.d(t,"zIndex",(function(){return et})),n.d(t,"top",(function(){return tt})),n.d(t,"right",(function(){return nt})),n.d(t,"bottom",(function(){return rt})),n.d(t,"left",(function(){return it})),n.d(t,"style",(function(){return ot}));var r=n(63),i=n.n(r),o=function(e,t){var n=i()({},e,t);for(var r in e){var o;e[r]&&"object"===typeof t[r]&&i()(n,((o={})[r]=i()(e[r],t[r]),o))}return n},a={breakpoints:[40,52,64].map((function(e){return e+"em"}))},s=function(e){return"@media screen and (min-width: "+e+")"},u=function(e,t){return l(t,e,e)},l=function(e,t,n,r,i){for(t=t&&t.split?t.split("."):[t],r=0;r1&&u.forEach((function(n){var i;r[n]=e(((i={})[n]=t[n],i))})),r},f=function(e,t,n,r,o){var a={};return r.slice(0,e.length).forEach((function(r,s){var u,l=e[s],c=t(r,n,o);l?i()(a,((u={})[l]=i()({},a[l],c),u)):i()(a,c)})),a},d=function(e,t,n,r,o){var a={};for(var u in r){var l=e[u],c=t(r[u],n,o);if(l){var f,d=s(l);i()(a,((f={})[d]=i()({},a[d],c),f))}else i()(a,c)}return a},h=function(e){var t=e.properties,n=e.property,r=e.scale,i=e.transform,o=void 0===i?u:i,a=e.defaultScale;t=t||[n];var s=function(e,n,r){var i={},a=o(e,n,r);if(null!==a)return t.forEach((function(e){i[e]=a})),i};return s.scale=r,s.defaults=a,s},p=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach((function(n){var r=e[n];t[n]=!0!==r?"function"!==typeof r?h(r):r:h({property:n,scale:n})})),c(t)},g=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r1?e:100*e+"%")}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0}),v=y,m={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},opacity:!0};m.bg=m.backgroundColor;var b=p(m),w=b,x=p({fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes",defaultScale:[12,14,16,20,24,32,48,64,72]},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0}),_=x,k=p({alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0}),S=k,T={space:[0,4,8,16,32,64,128,256,512]},C=p({gridGap:{property:"gridGap",scale:"space",defaultScale:T.space},gridColumnGap:{property:"gridColumnGap",scale:"space",defaultScale:T.space},gridRowGap:{property:"gridRowGap",scale:"space",defaultScale:T.space},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0}),A=C,O={border:{property:"border",scale:"borders"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders"},borderX:{properties:["borderLeft","borderRight"],scale:"borders"},borderY:{properties:["borderTop","borderBottom"],scale:"borders"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"}};O.borderTopLeftRadius={property:"borderTopLeftRadius",scale:"radii"},O.borderTopRightRadius={property:"borderTopRightRadius",scale:"radii"},O.borderBottomWidth={property:"borderBottomWidth",scale:"borderWidths"},O.borderBottomColor={property:"borderBottomColor",scale:"colors"},O.borderBottomStyle={property:"borderBottomStyle",scale:"borderStyles"},O.borderBottomLeftRadius={property:"borderBottomLeftRadius",scale:"radii"},O.borderBottomRightRadius={property:"borderBottomRightRadius",scale:"radii"},O.borderLeftWidth={property:"borderLeftWidth",scale:"borderWidths"},O.borderLeftColor={property:"borderLeftColor",scale:"colors"},O.borderLeftStyle={property:"borderLeftStyle",scale:"borderStyles"},O.borderRightWidth={property:"borderRightWidth",scale:"borderWidths"},O.borderRightColor={property:"borderRightColor",scale:"colors"},O.borderRightStyle={property:"borderRightStyle",scale:"borderStyles"};var M=p(O),E=M,P={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};P.bgImage=P.backgroundImage,P.bgSize=P.backgroundSize,P.bgPosition=P.backgroundPosition,P.bgRepeat=P.backgroundRepeat;var I=p(P),D=I,L={space:[0,4,8,16,32,64,128,256,512]},R=p({position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",defaultScale:L.space},right:{property:"right",scale:"space",defaultScale:L.space},bottom:{property:"bottom",scale:"space",defaultScale:L.space},left:{property:"left",scale:"space",defaultScale:L.space}}),N=R,j={space:[0,4,8,16,32,64,128,256,512]},B=function(e){return"number"===typeof e&&!isNaN(e)},F=function(e,t){if(!B(e))return l(t,e,e);var n=e<0,r=Math.abs(e),i=l(t,r,r);return B(i)?i*(n?-1:1):n?"-"+i:i},z={};z.margin={margin:{property:"margin",scale:"space",transform:F,defaultScale:j.space},marginTop:{property:"marginTop",scale:"space",transform:F,defaultScale:j.space},marginRight:{property:"marginRight",scale:"space",transform:F,defaultScale:j.space},marginBottom:{property:"marginBottom",scale:"space",transform:F,defaultScale:j.space},marginLeft:{property:"marginLeft",scale:"space",transform:F,defaultScale:j.space},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:F,defaultScale:j.space},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:F,defaultScale:j.space}},z.margin.m=z.margin.margin,z.margin.mt=z.margin.marginTop,z.margin.mr=z.margin.marginRight,z.margin.mb=z.margin.marginBottom,z.margin.ml=z.margin.marginLeft,z.margin.mx=z.margin.marginX,z.margin.my=z.margin.marginY,z.padding={padding:{property:"padding",scale:"space",defaultScale:j.space},paddingTop:{property:"paddingTop",scale:"space",defaultScale:j.space},paddingRight:{property:"paddingRight",scale:"space",defaultScale:j.space},paddingBottom:{property:"paddingBottom",scale:"space",defaultScale:j.space},paddingLeft:{property:"paddingLeft",scale:"space",defaultScale:j.space},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",defaultScale:j.space},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",defaultScale:j.space}},z.padding.p=z.padding.padding,z.padding.pt=z.padding.paddingTop,z.padding.pr=z.padding.paddingRight,z.padding.pb=z.padding.paddingBottom,z.padding.pl=z.padding.paddingLeft,z.padding.px=z.padding.paddingX,z.padding.py=z.padding.paddingY;var V=p(z.margin),H=p(z.padding),U=g(V,H),G=p({boxShadow:{property:"boxShadow",scale:"shadows"},textShadow:{property:"textShadow",scale:"shadows"}}),J=G,X=n(155),W=function(e){var t,n,r=e.scale,i=e.prop,o=void 0===i?"variant":i,a=e.variants,s=void 0===a?{}:a,u=e.key;(n=Object.keys(s).length?function(e,t,n){return Object(X.default)(l(t,e,null))(n.theme)}:function(e,t){return l(t,e,null)}).scale=r||u,n.defaults=s;var f=((t={})[o]=n,t);return c(f)},q=W({key:"buttons"}),Z=W({key:"textStyles",prop:"textStyle"}),K=W({key:"colorStyles",prop:"colors"}),Y=v.width,$=v.height,Q=v.minWidth,ee=v.minHeight,te=v.maxWidth,ne=v.maxHeight,re=v.size,ie=v.verticalAlign,oe=v.display,ae=v.overflow,se=v.overflowX,ue=v.overflowY,le=w.opacity,ce=_.fontSize,fe=_.fontFamily,de=_.fontWeight,he=_.lineHeight,pe=_.textAlign,ge=_.fontStyle,ye=_.letterSpacing,ve=S.alignItems,me=S.alignContent,be=S.justifyItems,we=S.justifyContent,xe=S.flexWrap,_e=S.flexDirection,ke=S.flex,Se=S.flexGrow,Te=S.flexShrink,Ce=S.flexBasis,Ae=S.justifySelf,Oe=S.alignSelf,Me=S.order,Ee=A.gridGap,Pe=A.gridColumnGap,Ie=A.gridRowGap,De=A.gridColumn,Le=A.gridRow,Re=A.gridAutoFlow,Ne=A.gridAutoColumns,je=A.gridAutoRows,Be=A.gridTemplateColumns,Fe=A.gridTemplateRows,ze=A.gridTemplateAreas,Ve=A.gridArea,He=E.borderWidth,Ue=E.borderStyle,Ge=E.borderColor,Je=E.borderTop,Xe=E.borderRight,We=E.borderBottom,qe=E.borderLeft,Ze=E.borderRadius,Ke=D.backgroundImage,Ye=D.backgroundSize,$e=D.backgroundPosition,Qe=D.backgroundRepeat,et=N.zIndex,tt=N.top,nt=N.right,rt=N.bottom,it=N.left,ot=function(e){var t=e.prop,n=e.cssProperty,r=e.alias,i=e.key,o=e.transformValue,a=e.scale,s=e.properties,u={};return u[t]=h({properties:s,property:n||t,scale:i,defaultScale:a,transform:o}),r&&(u[r]=u[t]),c(u)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(42);function i(e,t,n){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}},function(e,t,n){var r=n(68);e.exports=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},h=function(){return!("undefined"===typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},p=function(e){var t=h();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)};function g(e){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var S="mobile",T="tablet",C="smarttv",A="console",O="wearable",M=void 0,E={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},P={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},I={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},D=function(e,t,n,r){return function(e){for(var t=1;t1)&&!window.MSStream}(),ve=B(),me=p("iPhone"),be=p("iPod"),we=function(){var e=h(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"===typeof t&&/electron/.test(t)}(),xe=R(),_e=j()&&!R(),ke=c.name===P.Windows,Se=c.name===P.MAC_OS,Te=s.name===E.MIUI,Ce=s.name===E.SamsungBrowser;t.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return Z?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.BrowserTypes=E,t.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return W?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return z?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.CustomView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=e.condition,u=_(e,["renderWithFragment","children","viewClassName","style","condition"]);return s?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},u),n):null},t.IEView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return ne?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.IOSView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return Y?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return J?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.MobileView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return G?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.OsTypes=P,t.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return F?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.TabletView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return X?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.WearableView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return V?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,r=e.viewClassName,a=e.style,s=_(e,["renderWithFragment","children","viewClassName","style"]);return K?t?o.createElement(i.Fragment,null,n):o.createElement("div",m({className:r,style:a},s),n):null},t.browserName=se,t.browserVersion=ae,t.deviceDetect=function(){var e=L.isBrowser,t=L.isMobile,n=L.isTablet,r=L.isSmartTV,i=L.isConsole,o=L.isWearable;return e?function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:d(t.major),browserFullVersion:d(t.version),browserName:d(t.name),engineName:d(n.name),engineVersion:d(n.version),osName:d(r.name),osVersion:d(r.version),userAgent:d(i)}}(e,s,l,c,f):r?function(e,t,n,r){return{isSmartTV:e,engineName:d(t.name),engineVersion:d(t.version),osName:d(n.name),osVersion:d(n.version),userAgent:d(r)}}(r,l,c,f):i?function(e,t,n,r){return{isConsole:e,engineName:d(t.name),engineVersion:d(t.version),osName:d(n.name),osVersion:d(n.version),userAgent:d(r)}}(i,l,c,f):t||n?D(L,u,c,f):o?function(e,t,n,r){return{isWearable:e,engineName:d(t.name),engineVersion:d(t.version),osName:d(n.name),osVersion:d(n.version),userAgent:d(r)}}(o,l,c,f):void 0},t.deviceType=ge,t.engineName=ce,t.engineVersion=fe,t.fullBrowserVersion=oe,t.getUA=de,t.isAndroid=Z,t.isBrowser=W,t.isChrome=$,t.isChromium=U,t.isConsole=z,t.isDesktop=q,t.isEdge=he,t.isEdgeChromium=xe,t.isElectron=we,t.isFirefox=Q,t.isIE=ne,t.isIOS=Y,t.isIOS13=ye,t.isIPad13=ve,t.isIPhone13=me,t.isIPod13=be,t.isLegacyEdge=_e,t.isMIUI=Te,t.isMacOs=Se,t.isMobile=G,t.isMobileOnly=J,t.isMobileSafari=H,t.isOpera=te,t.isSafari=ee,t.isSamsungBrowser=Ce,t.isSmartTV=F,t.isTablet=X,t.isWearable=V,t.isWinPhone=K,t.isWindows=ke,t.isYandex=pe,t.mobileModel=le,t.mobileVendor=ue,t.osName=ie,t.osVersion=re,t.withOrientationChange=function(e){return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?k(e):t}(this,w(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(k(t)),t.onOrientationChange=t.onOrientationChange.bind(k(t)),t.onPageLoad=t.onPageLoad.bind(k(t)),t.state={isLandscape:!1,isPortrait:!1},t}var r,i,a;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(n,t),r=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"===typeof window?"undefined":g(window))&&G&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return o.createElement(e,m({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&y(r.prototype,i),a&&y(r,a),n}(o.Component)}},function(e,t,n){"use strict";n.r(t),n.d(t,"SigningKey",(function(){return f})),n.d(t,"recoverPublicKey",(function(){return d})),n.d(t,"computePublicKey",(function(){return h}));var r=n(11),i=n(13),o=n(289),a=n(5),s=n(7),u=new(n(8).Logger)("signing-key/5.1.0"),l=null;function c(){return l||(l=new o.a("secp256k1")),l}var f=function(){function e(t){Object(r.a)(this,e),Object(s.defineReadOnly)(this,"curve","secp256k1"),Object(s.defineReadOnly)(this,"privateKey",Object(a.hexlify)(t));var n=c().keyFromPrivate(Object(a.arrayify)(this.privateKey));Object(s.defineReadOnly)(this,"publicKey","0x"+n.getPublic(!1,"hex")),Object(s.defineReadOnly)(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),Object(s.defineReadOnly)(this,"_isSigningKey",!0)}return Object(i.a)(e,[{key:"_addPoint",value:function(e){var t=c().keyFromPublic(Object(a.arrayify)(this.publicKey)),n=c().keyFromPublic(Object(a.arrayify)(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=c().keyFromPrivate(Object(a.arrayify)(this.privateKey)),n=Object(a.arrayify)(e);32!==n.length&&u.throwArgumentError("bad digest length","digest",e);var r=t.sign(n,{canonical:!0});return Object(a.splitSignature)({recoveryParam:r.recoveryParam,r:Object(a.hexZeroPad)("0x"+r.r.toString(16),32),s:Object(a.hexZeroPad)("0x"+r.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=c().keyFromPrivate(Object(a.arrayify)(this.privateKey)),n=c().keyFromPublic(Object(a.arrayify)(h(e)));return Object(a.hexZeroPad)("0x"+t.derive(n.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function d(e,t){var n=Object(a.splitSignature)(t),r={r:Object(a.arrayify)(n.r),s:Object(a.arrayify)(n.s)};return"0x"+c().recoverPubKey(Object(a.arrayify)(e),r,n.recoveryParam).encode("hex",!1)}function h(e,t){var n=Object(a.arrayify)(e);if(32===n.length){var r=new f(n);return t?"0x"+c().keyFromPrivate(n).getPublic(!0,"hex"):r.publicKey}return 33===n.length?t?Object(a.hexlify)(n):"0x"+c().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?t?"0x"+c().keyFromPublic(n).getPublic(!0,"hex"):Object(a.hexlify)(n):u.throwArgumentError("invalid public or private key","key","[REDACTED]")}},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&S.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",w.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:o}),t}function A(e){return new Promise((function(t){setTimeout(t,e)}))}function O(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function M(e){return e?e.toLowerCase():e}var E={},P=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e,r,i){var o;if(Object(s.a)(this,n),S.checkNew(this instanceof n?this.constructor:void 0,n),o=t.call(this),e!==E)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return Object(y.defineReadOnly)(Object(l.a)(o),"provider",r),null==i&&(i=0),"string"===typeof i?(Object(y.defineReadOnly)(Object(l.a)(o),"_address",o.provider.formatter.address(i)),Object(y.defineReadOnly)(Object(l.a)(o),"_index",null)):"number"===typeof i?(Object(y.defineReadOnly)(Object(l.a)(o),"_index",i),Object(y.defineReadOnly)(Object(l.a)(o),"_address",null)):S.throwArgumentError("invalid address or index","addressOrIndex",i),o}return Object(u.a)(n,[{key:"connect",value:function(e){return S.throwError("cannot alter JSON-RPC Signer connection",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new I(E,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&S.throwError("unknown account #"+e._index,w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=Object(y.shallowCopy)(e);var n=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var r=Object(y.shallowCopy)(e);r.from=n,e.gasLimit=this.provider.estimateGas(r)}return Object(y.resolveProperties)({tx:Object(y.resolveProperties)(e),sender:n}).then((function(n){var r=n.tx,i=n.sender;null!=r.from?r.from.toLowerCase()!==i&&S.throwArgumentError("from address mismatch","transaction",e):r.from=i;var o=t.provider.constructor.hexlifyTransaction(r,{from:!0});return t.provider.send("eth_sendTransaction",[o]).then((function(e){return e}),(function(e){return C("sendTransaction",e,o)}))}))}},{key:"signTransaction",value:function(e){return S.throwError("signing transactions is unsupported",w.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return Object(b.poll)((function(){return t.provider.getTransaction(e).then((function(n){if(null!==n)return t.provider._wrapTransaction(n,e)}))}),{onceBlock:t.provider}).catch((function(t){throw t.transactionHash=e,t}))}))}},{key:"signMessage",value:function(e){return k(this,void 0,void 0,a.a.mark((function t(){var n,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?Object(v.f)(e):e,t.next=3,this.getAddress();case 3:return r=t.sent,t.next=6,this.provider.send("eth_sign",[r.toLowerCase(),Object(p.hexlify)(n)]);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"_signTypedData",value:function(e,t,n){return k(this,void 0,void 0,a.a.mark((function r(){var i,o,s=this;return a.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,g.a.resolveNames(e,t,n,(function(e){return s.provider.resolveName(e)}));case 2:return i=r.sent,r.next=5,this.getAddress();case 5:return o=r.sent,r.next=8,this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(g.a.getPayload(i.domain,t,i.value))]);case 8:return r.abrupt("return",r.sent);case 9:case"end":return r.stop()}}),r,this)})))}},{key:"unlock",value:function(e){return k(this,void 0,void 0,a.a.mark((function t(){var n,r;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.provider,t.next=3,this.getAddress();case 3:return r=t.sent,t.abrupt("return",n.send("personal_unlockAccount",[r.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),n}(d.a),I=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(){return Object(s.a)(this,n),t.apply(this,arguments)}return Object(u.a)(n,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(n){return t.provider.waitForTransaction(e,n)}}}))}}]),n}(P),D={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0},L=function(e){Object(c.a)(n,e);var t=Object(f.a)(n);function n(e,r){var i;Object(s.a)(this,n),S.checkNew(this instanceof n?this.constructor:void 0,n);var o=r;return null==o&&(o=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),i=t.call(this,o),e||(e=Object(y.getStatic)(i.constructor,"defaultUrl")()),"string"===typeof e?Object(y.defineReadOnly)(Object(l.a)(i),"connection",Object.freeze({url:e})):Object(y.defineReadOnly)(Object(l.a)(i),"connection",Object.freeze(Object(y.shallowCopy)(e))),i._nextId=42,i}return Object(u.a)(n,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return k(this,void 0,void 0,a.a.mark((function e(){var t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return n=Object(y.getStatic)(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",n(h.a.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",S.throwError("could not detect network",w.Logger.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",S.throwError("could not detect network",w.Logger.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new P(E,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var n=this,r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Object(y.deepCopy)(r),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];var o=Object(b.fetchJson)(this.connection,JSON.stringify(r),O).then((function(e){return n.emit("debug",{action:"response",request:r,response:e,provider:n}),e}),(function(e){throw n.emit("debug",{action:"response",error:e,request:r,provider:n}),e}));return i&&(this._cache[e]=o,setTimeout((function(){n._cache[e]=null}),0)),o}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[M(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[M(t.address),t.blockTag]];case"getCode":return["eth_getCode",[M(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[M(t.address),t.position,t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Object(y.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Object(y.getStatic)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=M(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return k(this,void 0,void 0,a.a.mark((function n(){var r;return a.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==(r=this.prepareRequest(e,t))&&S.throwError(e+" not implemented",w.Logger.errors.NOT_IMPLEMENTED,{operation:e}),n.prev=2,n.next=5,this.send(r[0],r[1]);case 5:return n.abrupt("return",n.sent);case 8:return n.prev=8,n.t0=n.catch(2),n.abrupt("return",C(e,n.t0,t));case 11:case"end":return n.stop()}}),n,this,[[2,8]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),Object(r.a)(Object(i.a)(n.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(n){return function r(){e.send("eth_getFilterChanges",[n]).then((function(n){if(e._pendingFilter!=t)return null;var r=Promise.resolve();return n.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",r=r.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),r.then((function(){return A(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){r()}),0),null;e.send("eth_uninstallFilter",[n])})).catch((function(e){}))}(),n})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),Object(r.a)(Object(i.a)(n.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var n=Object(y.shallowCopy)(D);if(t)for(var r in t)t[r]&&(n[r]=!0);Object(y.checkProperties)(e,n);var i={};return["gasLimit","gasPrice","type","nonce","value"].forEach((function(t){if(null!=e[t]){var n=Object(p.hexValue)(e[t]);"gasLimit"===t&&(t="gas"),i[t]=n}})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=Object(p.hexlify)(e[t]))})),e.accessList&&(i.accessList=Object(m.accessListify)(e.accessList)),i}}]),n}(_.a)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(235),i=n(77);var o=function(e){var t,n;function r(t){var n,r=(void 0===t?{}:t).supportedChainIds;return(n=e.call(this)||this).supportedChainIds=r,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.emitUpdate=function(e){this.emit(i.a.Update,e)},o.emitError=function(e){this.emit(i.a.Error,e)},o.emitDeactivate=function(){this.emit(i.a.Deactivate)},r}(r.EventEmitter)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n(11),i=n(13),o=n(16),a=n(17),s=(n(5),n(7)),u=new(n(8).Logger)("abstract-provider/5.1.0"),l=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,null,[{key:"isForkEvent",value:function(e){return!(!e||!e._isForkEvent)}}]),n}(s.Description),c=function(){function e(){Object(r.a)(this,e),u.checkAbstract(this instanceof e?this.constructor:void 0,e),Object(s.defineReadOnly)(this,"_isProvider",!0)}return Object(i.a)(e,[{key:"addListener",value:function(e,t){return this.on(e,t)}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"isProvider",value:function(e){return!(!e||!e._isProvider)}}]),e}()},function(e,t,n){"use strict";n.r(t),n.d(t,"encode",(function(){return u})),n.d(t,"decode",(function(){return f}));var r=n(5),i=n(8),o=new i.Logger("rlp/5.1.0");function a(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function s(e,t,n){for(var r=0,i=0;it+1+r&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:a}}function c(e,t){if(0===e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){var n=e[t]-247;t+1+n>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});var a=s(e,t+1,n);return t+1+n+a>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1+n,n+a)}if(e[t]>=192){var u=e[t]-192;return t+1+u>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),l(e,t,t+1,u)}if(e[t]>=184){var c=e[t]-183;t+1+c>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});var f=s(e,t+1,c);return t+1+c+f>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+c+f,result:Object(r.hexlify)(e.slice(t+1+c,t+1+c+f))}}if(e[t]>=128){var d=e[t]-128;return t+1+d>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),{consumed:1+d,result:Object(r.hexlify)(e.slice(t+1,t+1+d))}}return{consumed:1,result:Object(r.hexlify)(e[t])}}function f(e){var t=Object(r.arrayify)(e),n=c(t,0);return n.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),n.result}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a}));var r;function i(e,t){return t.major>e.major?r.MAJOR:t.majore.minor?r.MINOR:t.minore.patch?r.PATCH:r.NONE}function o(e,t){var n=e.reduce((function(e,t){return e[t.chainId]||(e[t.chainId]={}),e[t.chainId][t.address]=t,e}),{}),r=t.reduce((function(e,t){var r,i,o=null==(r=n[t.chainId])?void 0:r[t.address];if(o){var a=Object.keys(t).filter((function(e){return"address"!==e&&"chainId"!==e})).filter((function(e){return n=t[e],r=o[e],!(n===r||typeof n===typeof r&&Array.isArray(n)&&Array.isArray(r)&&n.every((function(e,t){return r[t]===e})));var n,r}));a.length>0&&(e.changed[t.chainId]||(e.changed[t.chainId]={}),e.changed[t.chainId][t.address]=a)}else e.added.push(t);e.index[t.chainId]?e.index[t.chainId][t.address]=!0:e.index[t.chainId]=((i={})[t.address]=!0,i);return e}),{added:[],changed:{},index:{}}),i=e.reduce((function(e,t){return r.index[t.chainId]&&r.index[t.chainId][t.address]||e.push(t),e}),[]);return{added:r.added,changed:r.changed,removed:i}}function a(e,t){var n=o(e,t);return n.removed.length>0?r.MAJOR:n.added.length>0?r.MINOR:Object.keys(n.changed).length>0?r.PATCH:r.NONE}!function(e){e[e.NONE=0]="NONE",e[e.PATCH=1]="PATCH",e[e.MINOR=2]="MINOR",e[e.MAJOR=3]="MAJOR"}(r||(r={}))},function(e,t,n){"use strict";!function(t){function n(e){return parseInt(e)===e}function r(e){if(!n(e.length))return!1;for(var t=0;t255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function a(e,t,n,r,i){null==r&&null==i||(e=e.slice?e.slice(r,i):Array.prototype.slice.call(e,r,i)),t.set(e,n)}var s={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},u=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],n=0;n>4]+e[15&i])}return n.join("")}}}(),l={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],f=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],m=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],b=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],x=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],S=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function T(e){for(var t=[],n=0;n>2,this._Ke[n][t%4]=o[t],this._Kd[e-n][t%4]=o[t];for(var a,s=0,u=i;u>16&255]<<24^f[a>>8&255]<<16^f[255&a]<<8^f[a>>24&255]^c[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^f[a>>16&255]<<16^f[a>>24&255]<<24;for(t=i/2+1;t>2,h=u%4,this._Ke[d][h]=o[t],this._Kd[e-d][h]=o[t++],u++}for(var d=1;d>24&255]^_[a>>16&255]^k[a>>8&255]^S[255&a]},C.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],r=T(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var a=1;a>24&255]^p[r[(i+1)%4]>>16&255]^g[r[(i+2)%4]>>8&255]^y[255&r[(i+3)%4]]^this._Ke[a][i];r=n.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(f[r[i]>>24&255]^s>>24),u[4*i+1]=255&(f[r[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(f[r[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(f[255&r[(i+3)%4]]^s);return u},C.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],r=T(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var a=1;a>24&255]^m[r[(i+3)%4]>>16&255]^b[r[(i+2)%4]>>8&255]^w[255&r[(i+1)%4]]^this._Kd[a][i];r=n.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(d[r[i]>>24&255]^s>>24),u[4*i+1]=255&(d[r[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[r[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&r[(i+1)%4]]^s);return u};var A=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new C(t)};A.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),n=o(16),r=0;r=0;--t)this._counter[t]=e%256,e>>=8},P.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},P.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var I=function e(t,n){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",n instanceof P||(n=new P(n)),this._counter=n,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new C(t)};I.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,r=0;r=0;d--){var h=a[d];"."===h?o(a,d):".."===h?(o(a,d),f++):f&&(o(a,d),f--)}if(!l)for(;f--;f)a.unshift("..");!l||""===a[0]||a[0]&&i(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},l=n(33);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function h(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(e,t,n,i){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function y(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=g(e,t,d(),w.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&t1)){var n=t[0];try{null==i[e]&&Object(w.defineReadOnly)(i,e,i[n])}catch(r){}null==i.functions[e]&&Object(w.defineReadOnly)(i.functions,e,i.functions[n]),null==i.callStatic[e]&&Object(w.defineReadOnly)(i.callStatic,e,i.callStatic[n]),null==i.populateTransaction[e]&&Object(w.defineReadOnly)(i.populateTransaction,e,i.populateTransaction[n]),null==i.estimateGas[e]&&Object(w.defineReadOnly)(i.estimateGas,e,i.estimateGas[n])}}))}return Object(c.a)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&S.throwError("contract not deployed",_.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||S.throwError("sending a transactions require a signer",_.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var n=Object(w.shallowCopy)(e||{});return["from","to"].forEach((function(e){null!=n[e]&&S.throwError("cannot override "+e,_.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})})),n.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(n)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new y.b(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Object(w.defineReadOnly)(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new D);if("event"===e)return this._normalizeRunningEvent(new I("event",null));if("*"===e)return this._normalizeRunningEvent(new R(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new L(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var n=e.topics[0];if("string"!==typeof n)throw new Error("invalid topic");var r=this.interface.getEvent(n);return this._normalizeRunningEvent(new L(this.address,this.interface,r,e.topics))}catch(o){}var i={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new I(P(i),i))}return this._normalizeRunningEvent(new R(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,n){var r=this,i=Object(w.deepCopy)(t);return i.removeListener=function(){n&&(e.removeListener(n),r._checkRunningEvents(e))},i.getBlock=function(){return r.provider.getBlock(t.blockHash)},i.getTransaction=function(){return r.provider.getTransaction(t.transactionHash)},i.getTransactionReceipt=function(){return r.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(i),i}},{key:"_addEventListener",value:function(e,t,n){var i=this;if(this.provider||S.throwError("events require a provider or a signer with a provider",_.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var o=function(n){var o=i._wrapEvent(e,n,t);if(null==o.decodeError)try{var a=e.getEmit(o);i.emit.apply(i,[e.filter].concat(Object(r.a)(a)))}catch(s){o.decodeError=s.error}null!=e.filter&&i.emit("event",o),null!=o.decodeError&&i.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=o,null!=e.filter&&this.provider.on(e.filter,o)}}},{key:"queryFilter",value:function(e,t,n){var r=this,i=this._getRunningEvent(e),o=Object(w.shallowCopy)(i.filter);return"string"===typeof t&&Object(b.isHexString)(t,32)?(null!=n&&S.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=n?n:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return r._wrapEvent(i,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,n){return e+t._runningEvents[n].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){var t=this;if(!this.provider)return[];if(null==e){var n=function(){var e=[];for(var n in t._runningEvents)t._runningEvents[n].listeners().forEach((function(t){e.push(t)}));return{v:e}}();if("object"===typeof n)return n.v}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var n=this._runningEvents[t];n.removeAllListeners(),this._checkRunningEvents(n)}return this}var r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return Object(v.getContractAddress)(e)}},{key:"getInterface",value:function(e){return p.b.isInterface(e)?e:new p.b(e)}},{key:"isIndexed",value:function(e){return p.a.isIndexed(e)}}]),e}(),j=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(){return Object(l.a)(this,n),t.apply(this,arguments)}return n}(N),B=function(){function e(t,n,r){Object(l.a)(this,e);var i=null;"0x"!==(i="string"===typeof n?n:Object(b.isBytes)(n)?Object(b.hexlify)(n):n&&"string"===typeof n.object?n.object:"!").substring(0,2)&&(i="0x"+i),(!Object(b.isHexString)(i)||i.length%2)&&S.throwArgumentError("invalid bytecode","bytecode",n),r&&!y.a.isSigner(r)&&S.throwArgumentError("invalid signer","signer",r),Object(w.defineReadOnly)(this,"bytecode",i),Object(w.defineReadOnly)(this,"interface",Object(w.getStatic)(this instanceof e?this.constructor:void 0,"getInterface")(t)),Object(w.defineReadOnly)(this,"signer",r||null)}return Object(c.a)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r=0)throw e;return h.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",f.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:n})}))),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&h.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=10,Object(c.resolveProperties)(n);case 10:return t.abrupt("return",t.sent);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||h.throwError("missing provider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),v=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e,i){var o;return Object(u.a)(this,n),h.checkNew(this instanceof n?this.constructor:void 0,n),o=t.call(this),Object(c.defineReadOnly)(Object(r.a)(o),"address",e),Object(c.defineReadOnly)(Object(r.a)(o),"provider",i||null),o}return Object(l.a)(n,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){h.throwError(e,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new n(this.address,e)}}]),n}(y)},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"}(r||(r={}))},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=n(80),i=n(234);function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),r=0;r>8,a=255&i;o?n.push(o,a):n.push(a)}else for(r=0;r>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var u=0,l=t;return u+=(l=l+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,u,l){var c=0,f=t;return c+=(f=f+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,u,l){return t+r+o+s+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){"use strict";var r=n(80),i=n(234);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var u=0,l=t;return u+=(l=l+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,u,l){var c=0,f=t;return c+=(f=f+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,u,l){return t+r+o+s+l>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=t;r.utils=n(82),r.common=n(132),r.sha=n(378),r.ripemd=n(382),r.hmac=n(383),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r="abi/5.1.2"},function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return f})),n.d(t,"a",(function(){return d}));var r=n(128),i=n.n(r),o=n(5),a=n(154),s=n(8),u=new s.Logger("sha2/5.1.0");function l(e){return"0x"+i.a.ripemd160().update(Object(o.arrayify)(e)).digest("hex")}function c(e){return"0x"+i.a.sha256().update(Object(o.arrayify)(e)).digest("hex")}function f(e){return"0x"+i.a.sha512().update(Object(o.arrayify)(e)).digest("hex")}function d(e,t,n){return a.a[e]||u.throwError("unsupported algorithm "+e,s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i.a.hmac(i.a[e],Object(o.arrayify)(t)).update(Object(o.arrayify)(n)).digest("hex")}},function(e,t,n){"use strict";var r=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function i(e,t){if(e.length!==t.length)return!1;for(var n=0;n2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&i.throwArgumentError("invalid value","value",e);var n=t[0],r="";for("-"===n.substring(0,1)&&(r="-",n=n.substring(1));"0"===n.substring(0,1);)n=n.substring(1);""===n&&(n="0");var o="";for(2===t.length&&(o="."+(t[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);for(var a=[];n.length;){if(n.length<=3){a.unshift(n);break}var s=n.length-3;a.unshift(n.substring(s)),n=n.substring(0,s)}return r+a.join(",")+o}function s(e,t){if("string"===typeof t){var n=o.indexOf(t);-1!==n&&(t=3*n)}return Object(r.b)(e,null!=t?t:18)}function u(e,t){if("string"!==typeof e&&i.throwArgumentError("value must be a string","value",e),"string"===typeof t){var n=o.indexOf(t);-1!==n&&(t=3*n)}return Object(r.c)(e,null!=t?t:18)}function l(e){return s(e,18)}function c(e){return u(e,18)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return B})),n.d(t,"a",(function(){return V}));var r=n(24),i=n(16),o=n(17),a=n(4),s=n.n(a),u=n(11),l=n(13),c=n(70),f=n(90),d=n(25),h=n(5),p=n(163),g=n(111),y=n(119),v=n(7),m=n(85),b=n(37),w=n(51),x=n(222),_=n.n(x),k=n(8),S=n(34),T=n(56),C=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},A=new k.Logger(S.a);function O(e){return null==e?"null":(32!==Object(h.hexDataLength)(e)&&A.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function M(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[O(e)]=!0}));var n=Object.keys(t);return n.sort(),n.join("|")}return O(e)})).join("&")}function E(e){if("string"===typeof e){if(e=e.toLowerCase(),32===Object(h.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+M(e);if(c.a.isForkEvent(e))throw A.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+M(e.topics||[])}throw new Error("invalid event - "+e)}function P(){return(new Date).getTime()}function I(e){return new Promise((function(t){setTimeout(t,e)}))}var D=["block","network","pending","poll"],L=function(){function e(t,n,r){Object(u.a)(this,e),Object(v.defineReadOnly)(this,"tag",t),Object(v.defineReadOnly)(this,"listener",n),Object(v.defineReadOnly)(this,"once",r)}return Object(l.a)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,n=e[1],r=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),i={};return r.length>0&&(i.topics=r),n&&"*"!==n&&(i.address=n),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||D.indexOf(this.tag)>=0}}]),e}(),R={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function N(e){return Object(h.hexZeroPad)(d.a.from(e).toHexString(),32)}function j(e){return f.Base58.encode(Object(h.concat)([e,Object(h.hexDataSlice)(Object(m.c)(Object(m.c)(e)),0,4)]))}var B=function(){function e(t,n,r){Object(u.a)(this,e),Object(v.defineReadOnly)(this,"provider",t),Object(v.defineReadOnly)(this,"name",r),Object(v.defineReadOnly)(this,"address",t.formatter.address(n))}return Object(l.a)(e,[{key:"_fetchBytes",value:function(e,t){return C(this,void 0,void 0,s.a.mark((function n(){var r,i,o,a;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r={to:this.address,data:Object(h.hexConcat)([e,Object(g.b)(this.name),t||"0x"])},n.next=3,this.provider.call(r);case 3:if("0x"!==(i=n.sent)){n.next=6;break}return n.abrupt("return",null);case 6:return o=d.a.from(Object(h.hexDataSlice)(i,0,32)).toNumber(),a=d.a.from(Object(h.hexDataSlice)(i,o,o+32)).toNumber(),n.abrupt("return",Object(h.hexDataSlice)(i,o+32,o+32+a));case 9:case"end":return n.stop()}}),n,this)})))}},{key:"_getAddress",value:function(e,t){var n=R[String(e)];if(null==n&&A.throwError("unsupported coin type: ".concat(e),k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")")}),"eth"===n.ilk)return this.provider.formatter.address(t);var r=Object(h.arrayify)(t);if(null!=n.p2pkh){var i=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){var o=parseInt(i[1],16);if(i[2].length===2*o&&o>=1&&o<=75)return j(Object(h.concat)([[n.p2pkh],"0x"+i[2]]))}}if(null!=n.p2sh){var a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return j(Object(h.concat)([[n.p2sh],"0x"+a[2]]))}}if(null!=n.prefix){var u=r[1],l=r[0];if(0===l?20!==u&&32!==u&&(l=-1):l=-1,l>=0&&r.length===2+u&&u>=1&&u<=75){var c=_.a.toWords(r.slice(2));return c.unshift(l),_.a.encode(n.prefix,c)}}return null}},{key:"getAddress",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n,r,i,o;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=9;break}return n={to:this.address,data:"0x3b3b57de"+Object(g.b)(this.name).substring(2)},t.next=5,this.provider.call(n);case 5:if("0x"!==(r=t.sent)&&r!==p.a){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(r));case 9:return t.next=11,this._fetchBytes("0xf1cb7e06",N(e));case 11:if(null!=(i=t.sent)&&"0x"!==i){t.next=14;break}return t.abrupt("return",null);case 14:return null==(o=this._getAddress(e,i))&&A.throwError("invalid or unsupported coin data",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:i}),t.abrupt("return",o);case 17:case"end":return t.stop()}}),t,this)})))}},{key:"getContentHash",value:function(){return C(this,void 0,void 0,s.a.mark((function e(){var t,n,r,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(t=e.sent)&&"0x"!==t){e.next=5;break}return e.abrupt("return",null);case 5:if(!(n=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){e.next=10;break}if(r=parseInt(n[3],16),n[4].length!==2*r){e.next=10;break}return e.abrupt("return","ipfs://"+f.Base58.encode("0x"+n[1]));case 10:if(!(i=t.match(/^0xe40101fa011b20([0-9a-f]*)$/))){e.next=14;break}if(64!==i[1].length){e.next=14;break}return e.abrupt("return","bzz://"+i[1]);case 14:return e.abrupt("return",A.throwError("invalid or unsupported content hash data",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t}));case 15:case"end":return e.stop()}}),e,this)})))}},{key:"getText",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n,r;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(b.f)(e),(n=Object(h.concat)([N(64),N(n.length),n])).length%32!==0&&(n=Object(h.concat)([n,Object(h.hexZeroPad)("0x",32-e.length%32)])),t.next=5,this._fetchBytes("0x59d1d43c",Object(h.hexlify)(n));case 5:if(null!=(r=t.sent)&&"0x"!==r){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",Object(b.h)(r));case 9:case"end":return t.stop()}}),t,this)})))}}]),e}(),F=null,z=1,V=function(e){Object(i.a)(n,e);var t=Object(o.a)(n);function n(e){var i;if(Object(u.a)(this,n),A.checkNew(this instanceof n?this.constructor:void 0,c.b),(i=t.call(this))._events=[],i._emitted={block:-2},i.formatter=(this instanceof n?this.constructor:void 0).getFormatter(),Object(v.defineReadOnly)(Object(r.a)(i),"anyNetwork","any"===e),i.anyNetwork&&(e=i.detectNetwork()),e instanceof Promise)i._networkPromise=e,e.catch((function(e){})),i._ready().catch((function(e){}));else{var o=Object(v.getStatic)(this instanceof n?this.constructor:void 0,"getNetwork")(e);o?(Object(v.defineReadOnly)(Object(r.a)(i),"_network",o),i.emit("network",o,null)):A.throwArgumentError("invalid network","network",e)}return i._maxInternalBlockNumber=-1024,i._lastBlockNumber=-2,i._pollingInterval=4e3,i._fastQueryDate=0,i}return Object(l.a)(n,[{key:"_ready",value:function(){return C(this,void 0,void 0,s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=this._network){e.next=17;break}if(t=null,!this._networkPromise){e.next=11;break}return e.prev=3,e.next=6,this._networkPromise;case 6:t=e.sent,e.next=11;break;case 9:e.prev=9,e.t0=e.catch(3);case 11:if(null!=t){e.next=15;break}return e.next=14,this.detectNetwork();case 14:t=e.sent;case 15:t||A.throwError("no network detected",k.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:Object(v.defineReadOnly)(this,"_network",t),this.emit("network",t,null));case 17:return e.abrupt("return",this._network);case 18:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"ready",get:function(){var e=this;return Object(w.poll)((function(){return e._ready().then((function(e){return e}),(function(e){if(e.code!==k.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}))}},{key:"_getInternalBlockNumber",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n,r,i,o,a=this;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return n=this._internalBlockNumber,t.prev=5,t.next=8,n;case 8:if(r=t.sent,!(P()-r.respTime<=e)){t.next=11;break}return t.abrupt("return",r.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==n){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return i=P(),o=Object(v.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,n=e.networkError;if(n)throw a._internalBlockNumber===o&&(a._internalBlockNumber=null),n;var r=P();return(t=d.a.from(t).toNumber())1e3)A.warn("network block skew detected; skipping block events"),this.emit("error",A.makeError("network block skew detected",k.Logger.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(i=this._emitted.block+1;i<=r;i++)this.emit("block",i);return this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=o._emitted[e];"pending"!==t&&r-t>12&&delete o._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,i=o.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(o._emitted["t:"+t]=e.blockNumber,o.emit(t,e),null):null})).catch((function(e){o.emit("error",e)}));n.push(i);break;case"filter":var a=e.filter;a.fromBlock=o._lastBlockNumber+1,a.toBlock=r;var s=o.getLogs(a).then((function(e){0!==e.length&&e.forEach((function(e){o._emitted["b:"+e.blockHash]=e.blockNumber,o._emitted["t:"+e.transactionHash]=e.blockNumber,o.emit(a,e)}))})).catch((function(e){o.emit("error",e)}));n.push(s)}})),this._lastBlockNumber=r,Promise.all(n).then((function(){o.emit("didPoll",t)})).catch((function(e){o.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return C(this,void 0,void 0,s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",A.throwError("provider does not support network detection",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return C(this,void 0,void 0,s.a.mark((function e(){var t,n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(n=e.sent,t.chainId===n.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,t),e.next=19,I(0);case 19:return e.abrupt("return",this._network);case 20:throw r=A.makeError("underlying network changed",k.Logger.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:n}),this.emit("error",r),r;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=P();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,n){return C(this,void 0,void 0,s.a.mark((function r(){var i,o=this;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t=1),r.next=3,this.getTransactionReceipt(e);case 3:if(!(((i=r.sent)?i.confirmations:0)>=t)){r.next=6;break}return r.abrupt("return",i);case 6:return r.abrupt("return",new Promise((function(r,i){var a=null,s=!1,u=function n(i){i.confirmations0&&(a=setTimeout((function(){s||(a=null,s=!0,o.removeListener(e,u),i(A.makeError("timeout exceeded",k.Logger.errors.TIMEOUT,{timeout:n})))}),n)).unref&&a.unref()})));case 7:case"end":return r.stop()}}),r,this)})))}},{key:"getBlockNumber",value:function(){return C(this,void 0,void 0,s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return C(this,void 0,void 0,s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",d.a.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",A.throwError("bad result from backend",k.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return C(this,void 0,void 0,s.a.mark((function n(){var r,i;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,Object(v.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getBalance",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",d.a.from(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",A.throwError("bad result from backend",k.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return C(this,void 0,void 0,s.a.mark((function n(){var r,i;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,Object(v.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getTransactionCount",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",d.a.from(i).toNumber());case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",A.throwError("bad result from backend",k.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return C(this,void 0,void 0,s.a.mark((function n(){var r,i;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,Object(v.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getCode",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",Object(h.hexlify)(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",A.throwError("bad result from backend",k.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,n){return C(this,void 0,void 0,s.a.mark((function r(){var i,o;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,Object(v.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then((function(e){return Object(h.hexValue)(e)}))});case 4:return i=r.sent,r.next=7,this.perform("getStorageAt",i);case 7:return o=r.sent,r.prev=8,r.abrupt("return",Object(h.hexlify)(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",A.throwError("bad result from backend",k.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t){var n=this;if(null!=t&&32!==Object(h.hexDataLength)(t))throw new Error("invalid response - sendTransaction");var r=e;return null!=t&&e.hash!==t&&A.throwError("Transaction hash mismatch from Provider.sendTransaction.",k.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),r.wait=function(t){return C(n,void 0,void 0,s.a.mark((function n(){var r;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return 0!==t&&(this._emitted["t:"+e.hash]="pending"),n.next=3,this.waitForTransaction(e.hash,t);case 3:if(null!=(r=n.sent)||0!==t){n.next=6;break}return n.abrupt("return",null);case 6:return this._emitted["t:"+e.hash]=r.blockNumber,0===r.status&&A.throwError("transaction failed",k.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:r}),n.abrupt("return",r);case 9:case"end":return n.stop()}}),n,this)})))},r}},{key:"sendTransaction",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n,r,i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return Object(h.hexlify)(e)}));case 4:return n=t.sent,r=this.formatter.transaction(e),t.prev=6,t.next=9,this.perform("sendTransaction",{signedTransaction:n});case 9:return i=t.sent,t.abrupt("return",this._wrapTransaction(r,i));case 13:throw t.prev=13,t.t0=t.catch(6),t.t0.transaction=r,t.t0.transactionHash=r.hash,t.t0;case 18:case"end":return t.stop()}}),t,this,[[6,13]])})))}},{key:"_getTransactionRequest",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n,r,i=this;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return n=t.sent,r={},["from","to"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?i._getAddress(e):null})))})),["gasLimit","gasPrice","value"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?d.a.from(e):null})))})),["type"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return null!=e?e:null})))})),n.accessList&&(r.accessList=this.formatter.accessList(n.accessList)),["data"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?Object(h.hexlify)(e):null})))})),t.t0=this.formatter,t.next=12,Object(v.resolveProperties)(r);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n,r=this;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,n={},null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(n[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(n[t]=r._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,Object(v.resolveProperties)(n);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"call",value:function(e,t){return C(this,void 0,void 0,s.a.mark((function n(){var r,i;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,Object(v.resolveProperties)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("call",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",Object(h.hexlify)(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",A.throwError("bad result from backend",k.Logger.errors.SERVER_ERROR,{method:"call",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"estimateGas",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n,r;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Object(v.resolveProperties)({transaction:this._getTransactionRequest(e)});case 4:return n=t.sent,t.next=7,this.perform("estimateGas",n);case 7:return r=t.sent,t.prev=8,t.abrupt("return",d.a.from(r));case 12:return t.prev=12,t.t0=t.catch(8),t.abrupt("return",A.throwError("bad result from backend",k.Logger.errors.SERVER_ERROR,{method:"estimateGas",params:n,result:r,error:t.t0}));case 15:case"end":return t.stop()}}),t,this,[[8,12]])})))}},{key:"_getAddress",value:function(e){return C(this,void 0,void 0,s.a.mark((function t(){var n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.resolveName(e);case 2:return null==(n=t.sent)&&A.throwError("ENS name not configured",k.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(e),")")}),t.abrupt("return",n);case 5:case"end":return t.stop()}}),t,this)})))}},{key:"_getBlock",value:function(e,t){return C(this,void 0,void 0,s.a.mark((function n(){var r,i,o=this;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,e;case 4:if(e=n.sent,r=-128,i={includeTransactions:!!t},!Object(h.isHexString)(e,32)){n.next=11;break}i.blockHash=e,n.next=23;break;case 11:return n.prev=11,n.t0=this.formatter,n.next=15,this._getBlockTag(e);case 15:n.t1=n.sent,i.blockTag=n.t0.blockTag.call(n.t0,n.t1),Object(h.isHexString)(i.blockTag)&&(r=parseInt(i.blockTag.substring(2),16)),n.next=23;break;case 20:n.prev=20,n.t2=n.catch(11),A.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e);case 23:return n.abrupt("return",Object(w.poll)((function(){return C(o,void 0,void 0,s.a.mark((function e(){var n,o,a,u,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getBlock",i);case 2:if(null!=(n=e.sent)){e.next=11;break}if(null==i.blockHash){e.next=7;break}if(null!=this._emitted["b:"+i.blockHash]){e.next=7;break}return e.abrupt("return",null);case 7:if(null==i.blockTag){e.next=10;break}if(!(r>this._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=32;break}o=null,a=0;case 14:if(!(ai.length)){t.next=24;break}return t.abrupt("return",null);case 24:return a=Object(b.h)(i.slice(0,o)),t.next=27,this.resolveName(a);case 27:if(t.sent==e){t.next=30;break}return t.abrupt("return",null);case 30:return t.abrupt("return",a);case 31:case"end":return t.stop()}}),t,this)})))}},{key:"perform",value:function(e,t){return A.throwError(e+" not implemented",k.Logger.errors.NOT_IMPLEMENTED,{operation:e})}},{key:"_startEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,n){var r=new L(E(e),t,n);return this._events.push(r),this._startEvent(r),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0;)n.push(i%this.base),i=i/this.base|0}for(var s="",u=0;0===t[u]&&u=0;--l)s+=this.alphabet[n[l]];return s}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var n=0;n>=8;for(;i>0;)t.push(255&i),i>>=8}for(var s=0;e[s]===this._leader&&s1?t-1:0),r=1;r=d.startTime+u.duration;else if(u.decay)g=h+v/(1-.998)*(1-Math.exp(-(1-.998)*(n-d.startTime))),(l=Math.abs(d.lastPosition-g)<.1)&&(p=g);else{c=void 0!==d.lastTime?d.lastTime:n,v=void 0!==d.lastVelocity?d.lastVelocity:u.initialVelocity,n>c+64&&(c=n);for(var m=Math.floor(n-c),b=0;bp:g=e);++n);return n-1}(e,o);return function(e,t,n,r,i,o,a,s,u){var l=u?u(e):e;if(ln){if("identity"===s)return l;"clamp"===s&&(l=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=o(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r;return l}(e,o[t],o[t+1],i[t],i[t+1],u,a,s,r.map)}}var H=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e,r,i,o){var a;return Object(u.a)(this,n),(a=t.call(this)).calc=void 0,a.payload=e instanceof S&&!(e instanceof n)?e.getPayload():Array.isArray(e)?e:[e],a.calc=V(r,i,o),a}return Object(l.a)(n,[{key:"getValue",value:function(){return this.calc.apply(this,Object(r.a)(this.payload.map((function(e){return e.getValue()}))))}},{key:"updateConfig",value:function(e,t,n){this.calc=V(e,t,n)}},{key:"interpolate",value:function(e,t,r){return new n(this,e,t,r)}}]),n}(S);var U=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r,i;return Object(u.a)(this,n),r=t.call(this),i=Object(o.a)(r),r.animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),i.value=e,t&&i.flush()},r.value=e,r.startPosition=e,r.lastPosition=e,r}return Object(l.a)(n,[{key:"flush",value:function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))}},{key:"clearStyles",value:function(){this.animatedStyles.clear()}},{key:"getValue",value:function(){return this.value}},{key:"interpolate",value:function(e,t,n){return new H(this,e,t,n)}}]),n}(k),G=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this)).payload=e.map((function(e){return new U(e)})),r}return Object(l.a)(n,[{key:"setValue",value:function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))}},{key:"getValue",value:function(){return this.payload.map((function(e){return e.getValue()}))}},{key:"interpolate",value:function(e,t){return new H(this,e,t)}}]),n}(S),J=0,X=function(){function e(){var t=this;Object(u.a)(this,e),this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return t.interpolations},this.id=J++}return Object(l.a)(e,[{key:"update",value:function(e){if(!e)return this;var t=w(e),n=t.delay,r=void 0===n?0:n,i=t.to,o=Object(d.a)(t,["delay","to"]);if(g.arr(i)||g.fun(i))this.queue.push(Object(f.a)({},o,{delay:r,to:i}));else if(i){var a={};Object.entries(i).forEach((function(e){var t=e[0],n=e[1],i=Object(f.a)({to:Object(c.a)({},t,n),delay:b(r,t)},o),s=a[i.delay]&&a[i.delay].to;a[i.delay]=Object(f.a)({},a[i.delay],i,{to:Object(f.a)({},s,i.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(o),this}},{key:"start",value:function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,i=e.to,o=void 0===i?{}:i;g.obj(r)&&(n.merged=Object(f.a)({},r,n.merged)),g.obj(o)&&(n.merged=Object(f.a)({},n.merged,o))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,s=Object(d.a)(t,["delay"]),u=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},l=g.arr(s.to)||g.fun(s.to);a?setTimeout((function(){r===n.guid&&(l?n.runAsync(s,u):n.diff(s).start(u))}),a):l?n.runAsync(s,u):n.diff(s).start(u)}))}else g.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,F.has(t)||F.add(t),B||(B=!0,M(L||z));return this}},{key:"stop",value:function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this}},{key:"pause",value:function(e){var t;return this.stop(!0),e&&(t=this,F.has(t)&&F.delete(t)),this}},{key:"runAsync",value:function(e,t){var n=this,r=this,i=(e.delay,Object(d.a)(e,["delay"])),o=this.local,a=Promise.resolve(void 0);if(g.arr(i.to))for(var s=function(e){var t=e,r=Object(f.a)({},i,w(i.to[t]));g.arr(r.config)&&(r.config=r.config[t]),a=a.then((function(){if(o===n.guid)return new Promise((function(e){return n.diff(r).start(e)}))}))},u=0;u0&&Q(k),g&&g(u,t,n))},onStart:v&&function(){return v(u,t)},onFrame:p&&function(e){return p(u,t,e)},delay:o,reset:l&&"enter"===t});d.update(h),k.current.paused||d.start()})),Object(h.useEffect)((function(){return k.current.mounted=_.current=!0,function(){k.current.mounted=_.current=!1,Array.from(k.current.instances).map((function(e){return e[1].destroy()})),k.current.instances.clear()}}),[]),k.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:k.current.instances.get(r).getValues()}}))}function Q(e,t){var n,r=e.current.deleted,o=Object(i.a)(r);try{var a=function(){var r=n.value.key,i=function(e){return e.key!==r};(g.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))};for(o.s();!(n=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}e.current.forceUpdate()}var ee=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(u.a)(this,n),void 0===e&&(e={}),r=t.call(this),!e.transform||e.transform instanceof k||(e=x.transform(e)),r.payload=e,r}return n}(T),te={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ne="[-+]?\\d*\\.?\\d+";function re(){for(var e=arguments.length,t=new Array(e),n=0;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function he(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=de(i,r,e+1/3),a=de(i,r,e),s=de(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function pe(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function ge(e){return(parseFloat(e)%360+360)%360/360}function ye(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ve(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t=function(e){var t;return"number"===typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ce.exec(e))?parseInt(t[1]+"ff",16)>>>0:te.hasOwnProperty(e)?te[e]:(t=ie.exec(e))?(pe(t[1])<<24|pe(t[2])<<16|pe(t[3])<<8|255)>>>0:(t=oe.exec(e))?(pe(t[1])<<24|pe(t[2])<<16|pe(t[3])<<8|ye(t[4]))>>>0:(t=ue.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=fe.exec(e))?parseInt(t[1],16)>>>0:(t=le.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ae.exec(e))?(255|he(ge(t[1]),ve(t[2]),ve(t[3])))>>>0:(t=se.exec(e))?(he(ge(t[1]),ve(t[2]),ve(t[3]))|ye(t[4]))>>>0:null}(e);if(null===t)return e;var n=(16711680&(t=t||0))>>>16,r=(65280&t)>>>8,i=(255&t)/255;return"rgba(".concat((4278190080&t)>>>24,", ").concat(n,", ").concat(r,", ").concat(i,")")}var be=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,we=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,xe=new RegExp("(".concat(Object.keys(te).join("|"),")"),"g"),_e={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ke=["Webkit","Ms","Moz","O"];function Se(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||_e.hasOwnProperty(e)&&_e[e]?(""+t).trim():t+"px"}_e=Object.keys(_e).reduce((function(e,t){return ke.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),_e);var Te={};N((function(e){return new ee(e)})),I("div"),E((function(e){var t=e.output.map((function(e){return e.replace(we,me)})).map((function(e){return e.replace(xe,me)})),n=t[0].match(be).map((function(){return[]}));t.forEach((function(e){e.match(be).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(be).map((function(t,r){return V(Object(f.a)({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(be,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,i){return"rgba(".concat(Math.round(t),", ").concat(Math.round(n),", ").concat(Math.round(r),", ").concat(i,")")}))}})),A(te),C((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,i=t.scrollTop,o=t.scrollLeft,a=Object(d.a)(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==i&&(e.scrollTop=i),void 0!==o&&(e.scrollLeft=o),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(u)){var l=0===u.indexOf("--"),c=Se(u,n[u],l);"float"===u&&(u="cssFloat"),l?e.style.setProperty(u,c):e.style[u]=c}for(var f in a){var h=s?f:Te[f]||(Te[f]=f.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));"undefined"!==typeof e.getAttribute(h)&&e.setAttribute(h,a[f])}}),(function(e){return e}));var Ce,Ae,Oe=(Ce=function(e){return Object(h.forwardRef)((function(t,n){var r=y(),i=Object(h.useRef)(!0),o=Object(h.useRef)(null),a=Object(h.useRef)(null),s=Object(h.useCallback)((function(e){var t=o.current;o.current=new j(e,(function(){var e=!1;a.current&&(e=x.fn(a.current,o.current.getAnimatedValue())),a.current&&!1!==e||r()})),t&&t.detach()}),[]);Object(h.useEffect)((function(){return function(){i.current=!1,o.current&&o.current.detach()}}),[]),Object(h.useImperativeHandle)(n,(function(){return R(a,i,r)})),s(t);var u,l=o.current.getValue(),c=(l.scrollTop,l.scrollLeft,Object(d.a)(l,["scrollTop","scrollLeft"])),v=(u=e,!g.fun(u)||u.prototype instanceof p.a.Component?function(e){return a.current=function(e,t){return t&&(g.fun(t)?t(e):g.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return p.a.createElement(e,Object(f.a)({},c,{ref:v}))}))},void 0===(Ae=!1)&&(Ae=!0),function(e){return(g.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=Ae?t[0].toLowerCase()+t.substring(1):t;return e[n]=Ce(n),e}),Ce)})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"])},function(e,t,n){var r=n(238);e.exports=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=r(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}},function(e,t,n){"use strict";n.r(t);var r=n(85);n.d(t,"computeHmac",(function(){return r.a})),n.d(t,"ripemd160",(function(){return r.b})),n.d(t,"sha256",(function(){return r.c})),n.d(t,"sha512",(function(){return r.d}));var i=n(154);n.d(t,"SupportedAlgorithm",(function(){return i.a}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(250);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(391);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=t.parseBytes32String=t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=void 0;var a=n(114);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return a.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return a.defaultAbiCoder}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return a.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return a.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return a.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return a.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return a.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return a.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return a.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return a.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return a.TransactionDescription}});var s=n(28);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return s.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return s.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return s.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return s.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return s.isAddress}});var u=o(n(147));t.base64=u;var l=n(90);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return l.Base58}});var c=n(5);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return c.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return c.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return c.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return c.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return c.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return c.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return c.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return c.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return c.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return c.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return c.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return c.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return c.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return c.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return c.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return c.stripZeros}});var f=n(108);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return f._TypedDataEncoder}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return f.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return f.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return f.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return f.namehash}});var d=n(46);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return d.entropyToMnemonic}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return d.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return d.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return d.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return d.mnemonicToSeed}});var h=n(140);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return h.getJsonWalletAddress}});var p=n(29);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var g=n(8);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return g.Logger}});var y=n(97);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return y.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return y.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return y.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return y.sha512}});var v=n(113);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return v.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return v.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return v.sha256}});var m=n(134);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return m.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return m.shuffled}});var b=n(7);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return b.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return b.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return b.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return b.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return b.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return b.shallowCopy}});var w=o(n(71));t.RLP=w;var x=n(61);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return x.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return x.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return x.SigningKey}});var _=n(48);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return _.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return _.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return _.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return _._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return _.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return _.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return _.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return _.Utf8ErrorFuncs}});var k=n(36);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return k.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return k.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return k.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return k.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return k.serialize}});var S=n(88);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return S.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return S.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return S.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return S.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return S.parseUnits}});var T=n(116);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return T.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return T.verifyTypedData}});var C=n(51);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return C._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return C.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return C.poll}});var A=n(97);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return A.SupportedAlgorithm}});var O=n(48);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return O.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return O.Utf8ErrorReason}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(28);function i(e){var t=null;try{t=JSON.parse(e)}catch(n){return!1}return t.encseed&&t.ethaddr}function o(e){var t=null;try{t=JSON.parse(e)}catch(n){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function a(e){if(i(e))try{return Object(r.getAddress)(JSON.parse(e).ethaddr)}catch(t){return null}if(o(e))try{return Object(r.getAddress)(JSON.parse(e).address)}catch(t){return null}return null}},function(e,t,n){e.exports=function(){"use strict";var e="millisecond",t="second",n="minute",r="hour",i="day",o="week",a="month",s="quarter",u="year",l="date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},h=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},p={s:h,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+h(r,2,"0")+":"+h(i,2,"0")},m:function e(t,n){if(t.date().'),m(n.containerRef.current,n.props)})),f(g(n),"pauseResume",(function(){var e=g(n),t=e.reset,r=e.restart,i=e.update,o=n.props.onPauseResume;n.instance.pauseResume(),o({reset:t,start:r,update:i})})),f(g(n),"reset",(function(){var e=g(n),t=e.pauseResume,r=e.restart,i=e.update,o=n.props.onReset;n.instance.reset(),o({pauseResume:t,start:r,update:i})})),f(g(n),"restart",(function(){n.reset(),n.start()})),f(g(n),"start",(function(){var e=g(n),t=e.pauseResume,r=e.reset,i=e.restart,o=e.update,a=n.props,s=a.delay,u=a.onEnd,l=a.onStart,c=function(){return n.instance.start((function(){return u({pauseResume:t,reset:r,start:i,update:o})}))};s>0?n.timeoutId=setTimeout(c,1e3*s):c(),l({pauseResume:t,reset:r,update:o})})),f(g(n),"update",(function(e){var t=g(n),r=t.pauseResume,i=t.reset,o=t.restart,a=n.props.onUpdate;n.instance.update(e),a({pauseResume:r,reset:i,start:o})})),f(g(n),"containerRef",a.createRef()),n}var n,r,i;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this.props,t=e.children,n=e.delay;this.instance=this.createInstance(),"function"===typeof t&&0!==n||this.start()}},{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.end,r=t.start,i=t.suffix,o=t.prefix,a=t.redraw,s=t.duration,u=t.separator,l=t.decimals,c=t.decimal;return s!==e.duration||n!==e.end||r!==e.start||i!==e.suffix||o!==e.prefix||u!==e.separator||l!==e.decimals||c!==e.decimal||a}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.end,r=t.start,i=t.suffix,o=t.prefix,a=t.duration,s=t.separator,u=t.decimals,l=t.decimal,c=t.preserveValue;a===e.duration&&r===e.start&&i===e.suffix&&o===e.prefix&&s===e.separator&&u===e.decimals&&l===e.decimal||(this.instance.reset(),this.instance=this.createInstance(),this.start()),n!==e.end&&(c||this.instance.reset(),this.instance.update(n))}},{key:"componentWillUnmount",value:function(){this.timeoutId&&clearTimeout(this.timeoutId),this.instance.reset()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.style,i=this.containerRef,o=this.pauseResume,s=this.reset,u=this.restart,l=this.update;return"function"===typeof t?t({countUpRef:i,pauseResume:o,reset:s,start:u,update:l}):a.createElement("span",{className:n,ref:i,style:r})}}])&&c(n.prototype,r),i&&c(n,i),t}(o.Component);f(b,"propTypes",{decimal:i.string,decimals:i.number,delay:i.number,easingFn:i.func,end:i.number.isRequired,formattingFn:i.func,onEnd:i.func,onStart:i.func,prefix:i.string,redraw:i.bool,separator:i.string,start:i.number,startOnMount:i.bool,suffix:i.string,style:i.object,useEasing:i.bool,preserveValue:i.bool}),f(b,"defaultProps",{decimal:".",decimals:0,delay:null,duration:null,easingFn:null,formattingFn:null,onEnd:function(){},onPauseResume:function(){},onReset:function(){},onStart:function(){},onUpdate:function(){},prefix:"",redraw:!1,separator:"",start:0,startOnMount:!0,suffix:"",style:void 0,useEasing:!0,preserveValue:!1});var w={innerHTML:null};t.default=b,t.useCountUp=function(e){var t=function(e){for(var t=1;t=0&&(t.throttleRetry=!0),t}return e.result}function J(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var n=new Error("invalid response");throw n.result=JSON.stringify(e),n}if(e.error){var r=new Error(e.error.message||"unknown error");throw e.error.code&&(r.code=e.error.code),e.error.data&&(r.data=e.error.data),r}return e.result}function X(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function W(e,t,n){if("call"===e&&t.code===b.Logger.errors.SERVER_ERROR){var r=t.error;if(r&&r.message.match("reverted")&&Object(B.isHexString)(r.data))return r.data}var i=t.message;throw t.code===b.Logger.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText)),(i=(i||"").toLowerCase()).match(/insufficient funds/)&&H.throwError("insufficient funds for intrinsic transaction cost",b.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/same hash was already imported|transaction nonce is too low/)&&H.throwError("nonce has already been used",b.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/another transaction with same nonce/)&&H.throwError("replacement fee too low",b.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/execution failed due to an exception/)&&H.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",b.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}var q=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,r){var i;Object(a.a)(this,n),H.checkNew(this instanceof n?this.constructor:void 0,n);var o="invalid";(i=t.call(this,e)).network&&(o=i.network.name);var s=null;switch(o){case"homestead":s="https://api.etherscan.io";break;case"ropsten":s="https://api-ropsten.etherscan.io";break;case"rinkeby":s="https://api-rinkeby.etherscan.io";break;case"kovan":s="https://api-kovan.etherscan.io";break;case"goerli":s="https://api-goerli.etherscan.io";break;default:throw new Error("unsupported network")}return Object(f.defineReadOnly)(Object(u.a)(i),"baseUrl",s),Object(f.defineReadOnly)(Object(u.a)(i),"apiKey",r||"9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB"),i}return Object(s.a)(n,[{key:"detectNetwork",value:function(){return V(this,void 0,void 0,p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var r=this,i=Object.create(null,{perform:{get:function(){return Object(g.a)(Object(y.a)(n.prototype),"perform",r)}}});return V(this,void 0,void 0,p.a.mark((function n(){var r,o,a,s,u,l,c,h,g,y,v,m=this;return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=this.baseUrl+"/api",o="",this.apiKey&&(o+="&apikey="+this.apiKey),a=function(e,t,n){return V(m,void 0,void 0,p.a.mark((function r(){var i,o,a,s=this;return p.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.emit("debug",{action:"request",request:e,provider:this}),i={url:e,throttleSlotInterval:1e3,throttleCallback:function(e,t){return s.isCommunityResource()&&Object(d.d)(),Promise.resolve(!0)}},o=null,t&&(i.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},o=Object.keys(t).map((function(e){return"".concat(e,"=").concat(t[e])})).join("&")),r.next=6,Object(z.fetchJson)(i,o,n||J);case 6:return a=r.sent,this.emit("debug",{action:"response",request:e,response:Object(f.deepCopy)(a),provider:this}),r.abrupt("return",a);case 9:case"end":return r.stop()}}),r,this)})))},n.t0=e,n.next="getBlockNumber"===n.t0?7:"getGasPrice"===n.t0?9:"getBalance"===n.t0?11:"getTransactionCount"===n.t0?14:"getCode"===n.t0?17:"getStorageAt"===n.t0?20:"sendTransaction"===n.t0?24:"getBlock"===n.t0?25:"getTransaction"===n.t0?31:"getTransactionReceipt"===n.t0?34:"call"===n.t0?37:"estimateGas"===n.t0?52:"getLogs"===n.t0?65:"getEtherPrice"===n.t0?90:99;break;case 7:return r+="?module=proxy&action=eth_blockNumber"+o,n.abrupt("return",a(r,null));case 9:return r+="?module=proxy&action=eth_gasPrice"+o,n.abrupt("return",a(r,null));case 11:return r+="?module=account&action=balance&address="+t.address,r+="&tag="+t.blockTag+o,n.abrupt("return",a(r,null,G));case 14:return r+="?module=proxy&action=eth_getTransactionCount&address="+t.address,r+="&tag="+t.blockTag+o,n.abrupt("return",a(r,null));case 17:return r+="?module=proxy&action=eth_getCode&address="+t.address,r+="&tag="+t.blockTag+o,n.abrupt("return",a(r,null));case 20:return r+="?module=proxy&action=eth_getStorageAt&address="+t.address,r+="&position="+t.position,r+="&tag="+t.blockTag+o,n.abrupt("return",a(r,null));case 24:return n.abrupt("return",a(r,{module:"proxy",action:"eth_sendRawTransaction",hex:t.signedTransaction,apikey:this.apiKey}).catch((function(e){return W("sendTransaction",e,t.signedTransaction)})));case 25:if(!t.blockTag){n.next=30;break}return r+="?module=proxy&action=eth_getBlockByNumber&tag="+t.blockTag,t.includeTransactions?r+="&boolean=true":r+="&boolean=false",r+=o,n.abrupt("return",a(r,null));case 30:throw new Error("getBlock by blockHash not implemented");case 31:return r+="?module=proxy&action=eth_getTransactionByHash&txhash="+t.transactionHash,r+=o,n.abrupt("return",a(r,null));case 34:return r+="?module=proxy&action=eth_getTransactionReceipt&txhash="+t.transactionHash,r+=o,n.abrupt("return",a(r,null));case 37:if("latest"===t.blockTag){n.next=39;break}throw new Error("EtherscanProvider does not support blockTag for call");case 39:return(s=U(t.transaction)).module="proxy",s.action="eth_call",s.apikey=this.apiKey,n.prev=43,n.next=46,a(r,s);case 46:return n.abrupt("return",n.sent);case 49:return n.prev=49,n.t1=n.catch(43),n.abrupt("return",W("call",n.t1,t.transaction));case 52:return(u=U(t.transaction)).module="proxy",u.action="eth_estimateGas",u.apikey=this.apiKey,n.prev=56,n.next=59,a(r,u);case 59:return n.abrupt("return",n.sent);case 62:return n.prev=62,n.t2=n.catch(56),n.abrupt("return",W("estimateGas",n.t2,t.transaction));case 65:return r+="?module=logs&action=getLogs",t.filter.fromBlock&&(r+="&fromBlock="+X(t.filter.fromBlock)),t.filter.toBlock&&(r+="&toBlock="+X(t.filter.toBlock)),t.filter.address&&(r+="&address="+t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&H.throwError("unsupported topic count",b.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(l=t.filter.topics[0])&&66===l.length||H.throwError("unsupported topic format",b.Logger.errors.UNSUPPORTED_OPERATION,{topic0:l}),r+="&topic0="+l)),r+=o,n.next=73,a(r,null,G);case 73:c=n.sent,h={},g=0;case 76:if(!(gt?null:(r+i)/2}function te(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(v.a.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return te(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var n=e[t];return n="function"===typeof n?"[function]":te(n),JSON.stringify(t)+":"+n})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var ne=1;function re(e){var t=null,n=null,r=new Promise((function(r){t=function(){n&&(clearTimeout(n),n=null),r()},n=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return r},wait:function(e){return r=r.then(e)}}}var ie=[b.Logger.errors.CALL_EXCEPTION,b.Logger.errors.INSUFFICIENT_FUNDS,b.Logger.errors.NONCE_EXPIRED,b.Logger.errors.REPLACEMENT_UNDERPRICED,b.Logger.errors.UNPREDICTABLE_GAS_LIMIT],oe=["address","args","errorArgs","errorSignature","method","transaction"];function ae(e,t){var n={weight:e.weight};return Object.defineProperty(n,"provider",{get:function(){return e.provider}}),e.start&&(n.start=e.start),t&&(n.duration=t-e.start),e.done&&(e.error?n.error=e.error:n.result=e.result||null),n}function se(e,t,n){var r=te;switch(t){case"getBlockNumber":return function(t){var n=t.map((function(e){return e.result})),r=ee(t.map((function(e){return e.result})),2);if(null!=r)return r=Math.ceil(r),n.indexOf(r+1)>=0&&r++,r>=e._highestBlockNumber&&(e._highestBlockNumber=r),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return ee(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":r=function(e){return null==e?null:((e=Object(f.shallowCopy)(e)).confirmations=-1,te(e))};break;case"getBlock":r=n.includeTransactions?function(e){return null==e?null:((e=Object(f.shallowCopy)(e)).transactions=e.transactions.map((function(e){return(e=Object(f.shallowCopy)(e)).confirmations=-1,e})),te(e))}:function(e){return null==e?null:te(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(n){var r={};n.forEach((function(t){var n=e(t.result);r[n]||(r[n]={count:0,result:t.result}),r[n].count++}));for(var i=Object.keys(r),o=0;o=t)return a.result}}}(r,e.quorum)}function ue(e,t){return K(this,void 0,void 0,p.a.mark((function n(){var r;return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null!=(r=e.provider).blockNumber&&r.blockNumber>=t||-1===t)){n.next=3;break}return n.abrupt("return",r);case 3:return n.abrupt("return",Object(z.poll)((function(){return new Promise((function(n,i){setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))}),{oncePoll:r}));case 4:case"end":return n.stop()}}),n)})))}function le(e,t,n,r){return K(this,void 0,void 0,p.a.mark((function i(){var o,a;return p.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=e.provider,i.t0=n,i.next="getBlockNumber"===i.t0||"getGasPrice"===i.t0?4:"getEtherPrice"===i.t0?5:"getBalance"===i.t0||"getTransactionCount"===i.t0||"getCode"===i.t0?8:"getStorageAt"===i.t0?13:"getBlock"===i.t0?18:"call"===i.t0||"estimateGas"===i.t0?23:"getTransaction"===i.t0||"getTransactionReceipt"===i.t0?28:"getLogs"===i.t0?29:35;break;case 4:return i.abrupt("return",o[n]());case 5:if(!o.getEtherPrice){i.next=7;break}return i.abrupt("return",o.getEtherPrice());case 7:return i.abrupt("break",35);case 8:if(!r.blockTag||!Object(B.isHexString)(r.blockTag)){i.next=12;break}return i.next=11,ue(e,t);case 11:o=i.sent;case 12:return i.abrupt("return",o[n](r.address,r.blockTag||"latest"));case 13:if(!r.blockTag||!Object(B.isHexString)(r.blockTag)){i.next=17;break}return i.next=16,ue(e,t);case 16:o=i.sent;case 17:return i.abrupt("return",o.getStorageAt(r.address,r.position,r.blockTag||"latest"));case 18:if(!r.blockTag||!Object(B.isHexString)(r.blockTag)){i.next=22;break}return i.next=21,ue(e,t);case 21:o=i.sent;case 22:return i.abrupt("return",o[r.includeTransactions?"getBlockWithTransactions":"getBlock"](r.blockTag||r.blockHash));case 23:if(!r.blockTag||!Object(B.isHexString)(r.blockTag)){i.next=27;break}return i.next=26,ue(e,t);case 26:o=i.sent;case 27:return i.abrupt("return",o[n](r.transaction));case 28:return i.abrupt("return",o[n](r.transactionHash));case 29:if(!((a=r.filter).fromBlock&&Object(B.isHexString)(a.fromBlock)||a.toBlock&&Object(B.isHexString)(a.toBlock))){i.next=34;break}return i.next=33,ue(e,t);case 33:o=i.sent;case 34:return i.abrupt("return",o.getLogs(a));case 35:return i.abrupt("return",Y.throwError("unknown method error",b.Logger.errors.UNKNOWN_ERROR,{method:n,params:r}));case 36:case"end":return i.stop()}}),i)})))}var ce=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(e,i){var o;Object(a.a)(this,n),Y.checkNew(this instanceof n?this.constructor:void 0,n),0===e.length&&Y.throwArgumentError("missing providers","providers",e);var s=e.map((function(e,t){if(r.b.isProvider(e)){var n=Object(d.c)(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:n,priority:1})}var i=Object(f.shallowCopy)(e);null==i.priority&&(i.priority=1),null==i.stallTimeout&&(i.stallTimeout=Object(d.c)(e)?2e3:750),null==i.weight&&(i.weight=1);var o=i.weight;return(o%1||o>512||o<1)&&Y.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),o),Object.freeze(i)})),l=s.reduce((function(e,t){return e+t.weight}),0);null==i?i=l/2:i>l&&Y.throwArgumentError("quorum will always fail; larger than total weight","quorum",i);var c=Q(s.map((function(e){return e.provider.network})));return null==c&&(c=new Promise((function(e,t){setTimeout((function(){o.detectNetwork().then(e,t)}),0)}))),o=t.call(this,c),Object(f.defineReadOnly)(Object(u.a)(o),"providerConfigs",Object.freeze(s)),Object(f.defineReadOnly)(Object(u.a)(o),"quorum",i),o._highestBlockNumber=-1,o}return Object(s.a)(n,[{key:"detectNetwork",value:function(){return K(this,void 0,void 0,p.a.mark((function e(){var t;return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",Q(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return K(this,void 0,void 0,p.a.mark((function n(){var r,i,o,a,s,u,l,c,d,h,g=this;return p.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("sendTransaction"!==e){n.next=13;break}return n.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:r=n.sent,i=0;case 5:if(!(i=g.quorum)){n.next=19;break}if(void 0===(y=a(h))){n.next=15;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),n.abrupt("return",{v:y});case 15:if(c){n.next=18;break}return n.next=18,re(100).getPromise();case 18:c=!1;case 19:if(v=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var n=t.error.code;return ie.indexOf(n)>=0&&(e[n]||(e[n]={error:t.error,weight:0}),e[n].weight+=t.weight),e}),{}),Object.keys(v).forEach((function(e){var t=v[e];if(!(t.weight18);a&&(n.weChat=!0);t.canvasSupported=!!document.createElement("canvas").getContext,t.svgSupported="undefined"!==typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!==typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,c);var f=c,d={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},h={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},p=Object.prototype.toString,g=Array.prototype,y=g.forEach,v=g.filter,m=g.slice,b=g.map,w=function(){}.constructor,x=w?w.prototype:null,_={};var k=2311;function S(){return k++}function T(){for(var e=[],t=0;t>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[u]+":0",i[l]+":0",r[1-u]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),o,i);if(a)return a(e,n,r),!0}return!1}function ze(e){return"CANVAS"===e.nodeName.toUpperCase()}var Ve="undefined"!==typeof window&&!!window.addEventListener,He=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ue=[];function Ge(e,t,n,r){return n=n||{},r||!f.canvasSupported?Je(e,t,n):f.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Je(e,t,n),n}function Je(e,t,n){if(f.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(ze(e)){var o=e.getBoundingClientRect();return n.zrX=r-o.left,void(n.zrY=i-o.top)}if(Fe(Ue,e,r,i))return n.zrX=Ue[0],void(n.zrY=Ue[1])}n.zrX=n.zrY=0}function Xe(e){return e||window.event}function We(e,t,n){if(null!=(t=Xe(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&Ge(e,i,t,n)}else{Ge(e,t,t,n);var o=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&He.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function qe(e,t,n,r){Ve?e.addEventListener(t,n,r):e.attachEvent("on"+t,n)}function Ze(e,t,n,r){Ve?e.removeEventListener(t,n,r):e.detachEvent("on"+t,n)}var Ke=Ve?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};function Ye(e){return 2===e.which||3===e.which}var $e=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o1&&i&&i.length>1){var a=Qe(i)/Qe(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function tt(){Ke(this.event)}var nt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return pe(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Le),rt=function(e,t){this.x=e,this.y=t},it=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ot=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o._hovered=new rt(0,0),o.storage=t,o.painter=n,o.painterRoot=i,r=r||new nt,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new De(o),o}return pe(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(it,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=st(this,t,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new rt(t,n):this.findHover(t,n),s=a.target,u=this.proxy;u.setCursor&&u.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==o&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new rt(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,o=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:tt}}(t,e,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(t,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(t,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"===typeof e[i]&&e[i].call(e,o),e.trigger&&e.trigger(t,o)})))}},t.prototype.findHover=function(e,t,n){for(var r=this.storage.getDisplayList(),i=new rt(e,t),o=r.length-1;o>=0;o--){var a=void 0;if(r[o]!==n&&!r[o].ignore&&(a=at(r[o],e,t))&&(!i.topTarget&&(i.topTarget=r[o]),"silent"!==a)){i.target=r[o];break}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new $e);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var o=new rt;o.target=r.target,this.dispatchToElement(o,i,r.event)}},t}(Le);function at(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1;r.silent&&(i=!0)}var s=r.__hostTarget;r=s||r.parent}return!i||"silent"}return!1}function st(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){ot.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=st(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Ce(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));var ut=ot;function lt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ct(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function ft(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],u=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=u,e}function dt(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function ht(e,t,n){var r=t[0],i=t[2],o=t[4],a=t[1],s=t[3],u=t[5],l=Math.sin(n),c=Math.cos(n);return e[0]=r*c+a*l,e[1]=-r*l+a*c,e[2]=i*c+s*l,e[3]=-i*l+c*s,e[4]=c*o+l*u,e[5]=c*u-l*o,e}function pt(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function gt(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=t[5],u=n*a-o*r;return u?(u=1/u,e[0]=a*u,e[1]=-o*u,e[2]=-r*u,e[3]=n*u,e[4]=(r*s-a*i)*u,e[5]=(o*i-n*s)*u,e):null}var yt=lt;function vt(e){return e>5e-5||e<-5e-5}var mt=[],bt=[],wt=[1,0,0,1,0,0],xt=Math.abs,_t=function(){function e(){}return e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return vt(this.rotation)||vt(this.x)||vt(this.y)||vt(this.scaleX-1)||vt(this.scaleY-1)},e.prototype.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),r=this.transform;n||t?(r=r||[1,0,0,1,0,0],n?this.getLocalTransform(r):yt(r),t&&(n?ft(r,e.transform,r):ct(r,e.transform)),this.transform=r,this._resolveGlobalScaleRatio(r)):r&&yt(r)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(mt);var n=mt[0]<0?-1:1,r=mt[1]<0?-1:1,i=((mt[0]-n)*t+n)/mt[0]||0,o=((mt[1]-r)*t+r)/mt[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],gt(this.invTransform,e)},e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3];vt(t-1)&&(t=Math.sqrt(t)),vt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),this.rotation=Math.atan2(-e[1]/n,e[0]/t),t<0&&n<0&&(this.rotation+=Math.PI,t=-t,n=-n),this.x=e[4],this.y=e[5],this.scaleX=t,this.scaleY=n}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(ft(bt,e.invTransform,t),t=bt);var n=this.originX,r=this.originY;(n||r)&&(wt[4]=n,wt[5]=r,ft(bt,t,wt),bt[4]-=n,bt[5]-=r,t=bt),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Me(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Me(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&xt(e[0]-1)>1e-10&&xt(e[3]-1)>1e-10?Math.sqrt(xt(e[0]*e[3]-e[2]*e[1])):1},e.getLocalTransform=function(e,t){yt(t=t||[]);var n=e.originX||0,r=e.originY||0,i=e.scaleX,o=e.scaleY,a=e.rotation||0,s=e.x,u=e.y;return t[4]-=n,t[5]-=r,t[0]*=i,t[1]*=o,t[2]*=i,t[3]*=o,t[4]*=i,t[5]*=o,a&&ht(t,t,a),t[4]+=n,t[5]+=r,t[4]+=s,t[5]+=u,t},e.initDefaultProps=function(){var t=e.prototype;t.x=0,t.y=0,t.scaleX=1,t.scaleY=1,t.originX=0,t.originY=0,t.rotation=0,t.globalScaleRatio=1}(),e}(),kt={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-kt.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*kt.bounceIn(2*e):.5*kt.bounceOut(2*e-1)+.5}},St=kt,Tt=function(){function e(e){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart}return e.prototype.step=function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),!this._paused){var n=(e-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var r=this.easing,i="string"===typeof r?St[r]:r,o="function"===typeof i?i(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(e),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=t},e.prototype._restart=function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e}(),Ct=function(e){this.value=e},At=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Ct(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Ot=function(){function e(e){this._list=new At,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Ct(t),a.key=e,n.insertEntry(a),r[e]=a}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Mt={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Et(e){return(e=Math.round(e))<0?0:e>255?255:e}function Pt(e){return e<0?0:e>1?1:e}function It(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Et(parseFloat(t)/100*255):Et(parseInt(t,10))}function Dt(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Pt(parseFloat(t)/100):Pt(parseFloat(t))}function Lt(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Rt(e,t,n){return e+(t-e)*n}function Nt(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function jt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Bt=new Ot(20),Ft=null;function zt(e,t){Ft&&jt(Ft,t),Ft=Bt.put(e,Ft||t.slice())}function Vt(e,t){if(e){t=t||[];var n=Bt.get(e);if(n)return jt(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Mt)return jt(t,Mt[r]),zt(e,t),t;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(Nt(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),zt(e,t),t):void Nt(t,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(Nt(t,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),zt(e,t),t):void Nt(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var u=r.substr(0,a),l=r.substr(a+1,s-(a+1)).split(","),c=1;switch(u){case"rgba":if(4!==l.length)return 3===l.length?Nt(t,+l[0],+l[1],+l[2],1):Nt(t,0,0,0,1);c=Dt(l.pop());case"rgb":return 3!==l.length?void Nt(t,0,0,0,1):(Nt(t,It(l[0]),It(l[1]),It(l[2]),c),zt(e,t),t);case"hsla":return 4!==l.length?void Nt(t,0,0,0,1):(l[3]=Dt(l[3]),Ht(l,t),zt(e,t),t);case"hsl":return 3!==l.length?void Nt(t,0,0,0,1):(Ht(l,t),zt(e,t),t);default:return}}Nt(t,0,0,0,1)}}function Ht(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Dt(e[1]),i=Dt(e[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return Nt(t=t||[],Et(255*Lt(a,o,n+1/3)),Et(255*Lt(a,o,n)),Et(255*Lt(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Ut(e,t){var n=Vt(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return qt(n,4===n.length?"rgba":"rgb")}}function Gt(e){var t=Vt(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Jt(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=t[i],s=t[o],u=r-i;return n[0]=Et(Rt(a[0],s[0],u)),n[1]=Et(Rt(a[1],s[1],u)),n[2]=Et(Rt(a[2],s[2],u)),n[3]=Pt(Rt(a[3],s[3],u)),n}}function Xt(e,t,n,r){var i,o=Vt(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),u=s-a,l=(s+a)/2;if(0===u)t=0,n=0;else{n=l<.5?u/(s+a):u/(2-s-a);var c=((s-r)/6+u/2)/u,f=((s-i)/6+u/2)/u,d=((s-o)/6+u/2)/u;r===s?t=d-f:i===s?t=1/3+c-d:o===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}var h=[360*t,n,l];return null!=e[3]&&h.push(e[3]),h}}(o),null!=t&&(o[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(o[1]=Dt(n)),null!=r&&(o[2]=Dt(r)),qt(Ht(o),"rgba")}function Wt(e,t){var n=Vt(e);if(n&&null!=t)return n[3]=Pt(t),qt(n,"rgba")}function qt(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function Zt(e,t){var n=Vt(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Kt=Array.prototype.slice;function Yt(e,t,n){return(t-e)*n+e}function $t(e,t,n,r){for(var i=t.length,o=0;oa)r.length=a;else for(var s=o;s=2&&this.interpolable},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t){e>=this.maxTime?this.maxTime=e:this._needsSort=!0;var n=this.keyframes,r=n.length;if(this.interpolable)if(L(t)){var i=function(e){return L(e&&e[0])?2:1}(t);if(r>0&&this.arrDim!==i)return void(this.interpolable=!1);if(1===i&&"number"!==typeof t[0]||2===i&&"number"!==typeof t[0][0])return void(this.interpolable=!1);if(r>0){var o=n[r-1];this._isAllValueEqual&&(1===i&&nn(t,o.value)||(this._isAllValueEqual=!1))}this.arrDim=i}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"===typeof t){var a=Vt(t);a?(t=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!==typeof t||isNaN(t))return void(this.interpolable=!1);if(this._isAllValueEqual&&r>0){o=n[r-1];(this.isValueColor&&!nn(o.value,t)||o.value!==t)&&(this._isAllValueEqual=!1)}}var s={time:e,value:t,percent:0};return this.keyframes.push(s),s},e.prototype.prepare=function(e){var t=this.keyframes;this._needsSort&&t.sort((function(e,t){return e.time-t.time}));for(var n=this.arrDim,r=t.length,i=t[r-1],o=0;o0&&o!==r-1&&tn(t[o].value,i.value,n);if(e&&this.needsAnimate()&&e.needsAnimate()&&n===e.arrDim&&this.isValueColor===e.isValueColor&&!e._finished){this._additiveTrack=e;var a=t[0].value;for(o=0;o=0&&!(o[n].percent<=t);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;nt);n++);n=Math.min(n-1,a-2)}var c=o[n+1],f=o[n];if(f&&c){this._lastFrame=n,this._lastFramePercent=t;var d=c.percent-f.percent;if(0!==d){var h=(t-f.percent)/d,p=r?this._additiveValue:l?cn:e[s];if((u>0||l)&&!p&&(p=this._additiveValue=[]),this.useSpline){var g=o[n][i],y=o[0===n?n:n-1][i],v=o[n>a-2?a-1:n+1][i],m=o[n>a-3?a-1:n+2][i];if(u>0)1===u?on(p,y,g,v,m,h,h*h,h*h*h):function(e,t,n,r,i,o,a,s){for(var u=t.length,l=t[0].length,c=0;c0)1===u?$t(p,f[i],c[i],h):function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a.5?t:e}(f[i],c[i],h),r?this._additiveValue=b:e[s]=b}r&&this._addToTarget(e)}}}},e.prototype._addToTarget=function(e){var t=this.arrDim,n=this.propName,r=this._additiveValue;0===t?this.isValueColor?(Vt(e[n],cn),Qt(cn,cn,r,1),e[n]=sn(cn)):e[n]=e[n]+r:1===t?Qt(e[n],e[n],r,1):2===t&&en(e[n],e[n],r,1)},e}(),dn=function(){function e(e,t,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n?T("Can' use additive animation on looped animation."):this._additiveAnimators=n}return e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t){return this.whenWithKeys(e,t,F(t))},e.prototype.whenWithKeys=function(e,t,n){for(var r=this._tracks,i=0;i0)){this._started=1;for(var n=this,r=[],i=0;i1){var a=o.pop();i.addKeyframe(a.time,e[r]),i.prepare(i.getAdditiveTrack())}}}},e}(),hn=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),pn=Math.min,gn=Math.max,yn=new hn,vn=new hn,mn=new hn,bn=new hn,wn=new hn,xn=new hn,_n=function(){function e(e,t,n,r){n<0&&isFinite(n)&&(e+=n,n=-n),r<0&&isFinite(r)&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=pn(e.x,this.x),n=pn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gn(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=gn(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=[1,0,0,1,0,0];return dt(i,i,[-t.x,-t.y]),pt(i,i,[n,r]),dt(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,o=r.x+r.width,a=r.y,s=r.y+r.height,u=t.x,l=t.x+t.width,c=t.y,f=t.y+t.height,d=!(op&&(p=b,gp&&(p=w,v=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return t.x=n.x*i+a,t.y=n.y*o+s,t.width=n.width*i,t.height=n.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}yn.x=mn.x=n.x,yn.y=bn.y=n.y,vn.x=bn.x=n.x+n.width,vn.y=mn.y=n.y+n.height,yn.transform(r),bn.transform(r),vn.transform(r),mn.transform(r),t.x=pn(yn.x,vn.x,mn.x,bn.x),t.y=pn(yn.y,vn.y,mn.y,bn.y);var u=gn(yn.x,vn.x,mn.x,bn.x),l=gn(yn.y,vn.y,mn.y,bn.y);t.width=u-t.x,t.height=l-t.y}else t!==n&&e.copy(t,n)},e}(),kn={},Sn="12px sans-serif";var Tn={measureText:function(e,t){return un||(un=P().getContext("2d")),ln!==t&&(ln=un.font=t||Sn),un.measureText(e)}};function Cn(e,t){var n=kn[t=t||Sn];n||(n=kn[t]=new Ot(500));var r=n.get(e);return null==r&&(r=Tn.measureText(e,t).width,n.put(e,r)),r}function An(e,t,n,r){var i=Cn(e,t),o=Pn(t),a=Mn(0,i,n),s=En(0,o,r);return new _n(a,s,i,o)}function On(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return An(i[0],t,n,r);for(var o=new _n(0,0,0,0),a=0;a=0?parseFloat(e)/100*t:parseFloat(e):e}function Dn(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,u=n.x,l=n.y,c="left",f="top";if(r instanceof Array)u+=In(r[0],n.width),l+=In(r[1],n.height),c=null,f=null;else switch(r){case"left":u-=i,l+=s,c="right",f="middle";break;case"right":u+=i+a,l+=s,f="middle";break;case"top":u+=a/2,l-=i,c="center",f="bottom";break;case"bottom":u+=a/2,l+=o+i,c="center";break;case"inside":u+=a/2,l+=s,c="center",f="middle";break;case"insideLeft":u+=i,l+=s,f="middle";break;case"insideRight":u+=a-i,l+=s,c="right",f="middle";break;case"insideTop":u+=a/2,l+=i,c="center";break;case"insideBottom":u+=a/2,l+=o-i,c="center",f="bottom";break;case"insideTopLeft":u+=i,l+=i;break;case"insideTopRight":u+=a-i,l+=i,c="right";break;case"insideBottomLeft":u+=i,l+=o-i,f="bottom";break;case"insideBottomRight":u+=a-i,l+=o-i,c="right",f="bottom"}return(e=e||{}).x=u,e.y=l,e.align=c,e.verticalAlign=f,e}var Ln=1;"undefined"!==typeof window&&(Ln=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Rn=Ln,Nn=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],jn={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},Bn={},Fn=new _n(0,0,0,0),zn=function(){function e(e){this.id=S(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.attachedTransform,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var u=!1;if(i.x=t.x,i.y=t.y,i.originX=t.originX,i.originY=t.originY,i.rotation=t.rotation,i.scaleX=t.scaleX,i.scaleY=t.scaleY,null!=n.position){var l=Fn;n.layoutRect?l.copy(n.layoutRect):l.copy(this.getBoundingRect()),r||l.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Bn,n,l):Dn(Bn,n,l),i.x=Bn.x,i.y=Bn.y,o=Bn.align,a=Bn.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var f=void 0,d=void 0;"center"===c?(f=.5*l.width,d=.5*l.height):(f=In(c[0],l.width),d=In(c[1],l.height)),u=!0,i.originX=-i.x+f+(r?0:l.x),i.originY=-i.y+d+(r?0:l.y)}}null!=n.rotation&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],u||(i.originX=-h[0],i.originY=-h[1]));var p=null==n.inside?"string"===typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;p&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,t.setDefaultTextStyle(g)),s&&t.dirtyStyle(),t.markRedraw()}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?"#ccc":"#333"},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"===typeof t&&Vt(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,qt(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},M(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"===typeof e)this.attrKV(e,t);else if(W(e))for(var n=F(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState("__zr_normal__",!1,e)},e.prototype.useState=function(t,n,r){var i="__zr_normal__"===t;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(I(o,t)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||i){i||this.saveCurrentToNormalState(s);var u=!(!s||!s.hoverLayer);return u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,n,!r&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(t,n),this._textGuide&&this._textGuide.useState(t,n),i?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~e.REDARAW_BIT),s}T("State "+t+" not exists.")}}},e.prototype.useStates=function(t,n){if(t.length){var r=[],i=this.currentStates,o=t.length,a=o===i.length;if(a)for(var s=0;s0,d),this._textContent&&this._textContent.useStates(t),this._textGuide&&this._textGuide.useStates(t),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~e.REDARAW_BIT)}else this.clearStates()},e.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=I(r,e),o=I(r,t)>=0;i>=0?o?r.splice(i,1):r[i]=t:n&&!o&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r=0&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],o=0;o8)&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),e}();function Vn(e,t,n,r,i){var o=[];!function e(t,n,r,i,o,a,s,u){for(var l=[],c=[],f=F(i),d=o.duration,h=o.delay,p=o.additive,g=o.setToFinal,y=!W(a),v=0;v0||o.force&&!s.length){for(var w=t.animators,x=[],_=0;_0&&n.during&&o[0].during((function(e,t){n.during(t)}));for(var d=0;d=0;)i++;return i-t}function Xn(e,t,n,r,i){for(r===t&&r++;r>>1])<0?u=o:s=o+1;var l=r-s;switch(l){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;l>0;)e[s+l]=e[s+l-1],l--}e[s]=a}}function Wn(e,t,n,r,i,o){var a=0,s=0,u=1;if(o(e,t[n+i])>0){for(s=r-i;u0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s),a+=i,u+=i}else{for(s=i+1;us&&(u=s);var l=a;a=i-u,u=i-l}for(a++;a>>1);o(e,t[n+c])>0?a=c+1:u=c}return u}function qn(e,t,n,r,i,o){var a=0,s=0,u=1;if(o(e,t[n+i])<0){for(s=i+1;us&&(u=s);var l=a;a=i-u,u=i-l}else{for(s=r-i;u=0;)a=u,(u=1+(u<<1))<=0&&(u=s);u>s&&(u=s),a+=i,u+=i}for(a++;a>>1);o(e,t[n+c])<0?u=c:a=c+1}return u}function Zn(e,t){var n,r,i,o=7,a=0;n=e.length;var s=[];function u(n){var u=r[n],l=i[n],c=r[n+1],f=i[n+1];i[n]=l+f,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var d=qn(e[c],e,u,l,0,t);u+=d,0!==(l-=d)&&0!==(f=Wn(e[u+l-1],e,c,f,f-1,t))&&(l<=f?function(n,r,i,a){var u=0;for(u=0;u=7||h>=7);if(p)break;g<0&&(g=0),g+=2}if((o=g)<1&&(o=1),1===r){for(u=0;u=0;u--)e[h+u]=e[d+u];return void(e[f]=s[c])}var p=o;for(;;){var g=0,y=0,v=!1;do{if(t(s[c],e[l])<0){if(e[f--]=e[l--],g++,y=0,0===--r){v=!0;break}}else if(e[f--]=s[c--],y++,g=0,1===--a){v=!0;break}}while((g|y)=0;u--)e[h+u]=e[d+u];if(0===r){v=!0;break}}if(e[f--]=s[c--],1===--a){v=!0;break}if(0!==(y=a-Wn(e[l],s,0,a,a-1,t))){for(a-=y,h=(f-=y)+1,d=(c-=y)+1,u=0;u=7||y>=7);if(v)break;p<0&&(p=0),p+=2}(o=p)<1&&(o=1);if(1===a){for(h=(f-=r)+1,d=(l-=r)+1,u=r-1;u>=0;u--)e[h+u]=e[d+u];e[f]=s[c]}else{if(0===a)throw new Error;for(d=f-(a-1),u=0;u1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}},forceMergeRuns:function(){for(;a>1;){var e=a-2;e>0&&i[e-1]=32;)t|=1&e,e>>=1;return e+t}(i);do{if((o=Jn(e,n,r,t))s&&(u=s),Xn(e,n,n+u,n+o,t),o=u}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var Yn=!1;function $n(){Yn||(Yn=!0)}function Qn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var er=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Qn}return e.prototype.traverse=function(e,t){for(var n=0;n0&&(l.__clipPaths=[]),isNaN(l.z)&&($n(),l.z=0),isNaN(l.z2)&&($n(),l.z2=0),isNaN(l.zlevel)&&($n(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var f=e.getTextGuideLine();f&&this._updateAndAddDisplayable(f,t,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),tr="undefined"!==typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},nr=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n.onframe=t.onframe||function(){},n}return pe(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._clipsHead?(this._clipsTail.next=e,e.prev=this._clipsTail,e.next=null,this._clipsTail=e):this._clipsHead=this._clipsTail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._clipsHead=n,n?n.prev=t:this._clipsTail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=(new Date).getTime()-this._pausedTime,n=t-this._time,r=this._clipsHead;r;){var i=r.next;r.step(t,n)?(r.ondestroy&&r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,tr((function t(){e._running&&(tr(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._clipsHead;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._clipsHead=this._clipsTail=null},t.prototype.isFinished=function(){return null==this._clipsHead},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new dn(e,t.loop);return this.addAnimator(n),n},t}(Le),rr=f.domSupported,ir=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:["touchstart","touchend","touchmove"],pointer:N(e,(function(e){var n=e.replace("mouse","pointer");return t.hasOwnProperty(n)?n:e}))}}(),or=["mousemove","mouseup"],ar=["pointermove","pointerup"],sr=!1;function ur(e){var t=e.pointerType;return"pen"===t||"touch"===t}function lr(e){e&&(e.zrByTouch=!0)}function cr(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var fr=function(e,t){this.stopPropagation=de,this.stopImmediatePropagation=de,this.preventDefault=de,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},dr={mousedown:function(e){e=We(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=We(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=We(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){cr(this,(e=We(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){sr=!0,e=We(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){sr||(e=We(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){lr(e=We(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),dr.mousemove.call(this,e),dr.mousedown.call(this,e)},touchmove:function(e){lr(e=We(this.dom,e)),this.handler.processGesture(e,"change"),dr.mousemove.call(this,e)},touchend:function(e){lr(e=We(this.dom,e)),this.handler.processGesture(e,"end"),dr.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&dr.click.call(this,e)},pointerdown:function(e){dr.mousedown.call(this,e)},pointermove:function(e){ur(e)||dr.mousemove.call(this,e)},pointerup:function(e){dr.mouseup.call(this,e)},pointerout:function(e){ur(e)||dr.mouseout.call(this,e)}};R(["click","dblclick","contextmenu"],(function(e){dr[e]=function(t){t=We(this.dom,t),this.trigger(e,t)}}));var hr={pointermove:function(e){ur(e)||hr.mousemove.call(this,e)},pointerup:function(e){hr.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function pr(e,t){var n=t.domHandlers;f.pointerEventsSupported?R(ir.pointer,(function(r){yr(t,r,(function(t){n[r].call(e,t)}))})):(f.touchEventsSupported&&R(ir.touch,(function(r){yr(t,r,(function(i){n[r].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),R(ir.mouse,(function(r){yr(t,r,(function(i){i=Xe(i),t.touching||n[r].call(e,i)}))})))}function gr(e,t){function n(n){yr(t,n,(function(r){r=Xe(r),cr(e,r.target)||(r=function(e,t){return We(e.dom,new fr(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}f.pointerEventsSupported?R(ar,n):f.touchEventsSupported||R(or,n)}function yr(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,qe(e.domTarget,t,n,r)}function vr(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Ze(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var mr=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},br=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new mr(t,dr),rr&&(r._globalHandlerScope=new mr(document,hr)),pr(r,r._localHandlerScope),r}return pe(t,e),t.prototype.dispose=function(){vr(this._localHandlerScope),rr&&vr(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,rr&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?gr(this,t):vr(t)}},t}(Le),wr=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return pe(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=I(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.addHover=function(e){},e.prototype.removeHover=function(e){},e.prototype.clearHover=function(){},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},e.prototype.resize=function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.pathToImage=function(e,t){if(this.painter.pathToImage)return this.painter.pathToImage(e,t)},e.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this.handler.off(e,t)},e.prototype.trigger=function(e,t){this.handler.trigger(e,t)},e.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t0){if(e<=t[0])return n[0];if(e>=t[1])return n[1]}else{if(e>=t[0])return n[0];if(e<=t[1])return n[1]}else{if(e===t[0])return n[0];if(e===t[1])return n[1]}return(e-t[0])/i*o+n[0]}function Or(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"===typeof e?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Mr(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Er(e){return e.sort((function(e,t){return e-t})),e}function Pr(e){var t=e.toString(),n=t.indexOf("e");if(n>0){var r=+t.slice(n+1);return r<0?-r:0}var i=t.indexOf(".");return i<0?0:t.length-1-i}function Ir(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),o=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-i+o,0),20);return isFinite(a)?a:20}function Dr(e){var t=2*Math.PI;return(e%t+t)%t}function Lr(e){return e>-1e-4&&e<1e-4}var Rr=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Nr(e){if(e instanceof Date)return e;if("string"===typeof e){var t=Rr.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}return null==e?new Date(NaN):new Date(Math.round(e))}function jr(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function Br(e,t){var n=jr(e),r=Math.pow(10,n),i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function Fr(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i}function zr(e){e.sort((function(e,t){return function e(t,n,r){return t.interval[r]=0||i&&I(i,s)<0)){var u=n.getShallow(s,t);null!=u&&(o[e[a][0]]=u)}}return o}}var _i=xi([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ki=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return _i(this,e,t)},e}(),Si=new Ot(50);function Ti(e){if("string"===typeof e){var t=Si.get(e);return t&&t.image}return e}function Ci(e,t,n,r,i){if(e){if("string"===typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=Si.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?!Oi(t=o.image)&&o.pending.push(a):((t=new Image).onload=t.onerror=Ai,Si.put(e,t.__cachedImgObj={image:t,pending:[a]}),t.src=t.__zrImageSrc=e),t}return e}return t}function Ai(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=a;u++)s-=a;var l=Cn(n,t);return l>s&&(n="",l=0),s=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=e,i}function Ii(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=Cn(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?Di(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=Cn(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function Di(e,t,n,r){for(var i=0,o=0,a=e.length;o0&&p+r.accumWidth>r.width&&(o=t.split("\n"),f=!0),r.accumWidth=p}else{var g=zi(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+h,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var y=0;y=33&&t<=255}(e)||!!Bi[e]}function zi(e,t,n,r,i){for(var o=[],a=[],s="",u="",l=0,c=0,f=0;fn:i+c+h>n)?c?(s||u)&&(p?(s||(s=u,u="",c=l=0),o.push(s),a.push(c-l),u+=d,s="",c=l+=h):(u&&(s+=u,c+=l,u="",l=0),o.push(s),a.push(c),s=d,c=h)):p?(o.push(u),a.push(l),u=d,l=h):(o.push(d),a.push(h)):(c+=h,p?(u+=d,l+=h):(u&&(s+=u,u="",l=0),s+=d))}else u&&(s+=u,c+=l),o.push(s),a.push(c),s="",u="",l=0,c=0}return o.length||s||(s=e,u="",l=0),u&&(s+=u),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}var Vi="__zr_style_"+Math.round(10*Math.random()),Hi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ui={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Hi[Vi]=!0;var Gi=["z","z2","invisible"],Ji=function(e){function t(t){return e.call(this,t)||this}return pe(t,e),t.prototype._init=function(t){for(var n=F(t),r=0;r-1e-8&&e<1e-8}function no(e){return e>1e-8||e<-1e-8}function ro(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function io(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function oo(e,t,n,r,i,o){var a=r+3*(t-n)-e,s=3*(n-2*t+e),u=3*(t-e),l=e-i,c=s*s-3*a*u,f=s*u-9*a*l,d=u*u-3*s*l,h=0;if(to(c)&&to(f)){if(to(s))o[0]=0;else(S=-u/s)>=0&&S<=1&&(o[h++]=S)}else{var p=f*f-4*c*d;if(to(p)){var g=f/c,y=-g/2;(S=-s/a+g)>=0&&S<=1&&(o[h++]=S),y>=0&&y<=1&&(o[h++]=y)}else if(p>0){var v=Ki(p),m=c*s+1.5*a*(-f+v),b=c*s+1.5*a*(-f-v);(S=(-s-((m=m<0?-Zi(-m,1/3):Zi(m,1/3))+(b=b<0?-Zi(-b,1/3):Zi(b,1/3))))/(3*a))>=0&&S<=1&&(o[h++]=S)}else{var w=(2*c*s-3*a*f)/(2*Ki(c*c*c)),x=Math.acos(w)/3,_=Ki(c),k=Math.cos(x),S=(-s-2*_*k)/(3*a),T=(y=(-s+_*(k+Yi*Math.sin(x)))/(3*a),(-s+_*(k-Yi*Math.sin(x)))/(3*a));S>=0&&S<=1&&(o[h++]=S),y>=0&&y<=1&&(o[h++]=y),T>=0&&T<=1&&(o[h++]=T)}}return h}function ao(e,t,n,r,i){var o=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,u=0;if(to(a)){if(no(o))(c=-s/o)>=0&&c<=1&&(i[u++]=c)}else{var l=o*o-4*a*s;if(to(l))i[0]=-o/(2*a);else if(l>0){var c,f=Ki(l),d=(-o-f)/(2*a);(c=(-o+f)/(2*a))>=0&&c<=1&&(i[u++]=c),d>=0&&d<=1&&(i[u++]=d)}}return u}function so(e,t,n,r,i,o){var a=(t-e)*i+e,s=(n-t)*i+t,u=(r-n)*i+n,l=(s-a)*i+a,c=(u-s)*i+s,f=(c-l)*i+l;o[0]=e,o[1]=a,o[2]=l,o[3]=f,o[4]=f,o[5]=c,o[6]=u,o[7]=r}function uo(e,t,n,r,i,o,a,s,u,l,c){var f,d,h,p,g,y=.005,v=1/0;$i[0]=u,$i[1]=l;for(var m=0;m<1;m+=.05)Qi[0]=ro(e,n,i,a,m),Qi[1]=ro(t,r,o,s,m),(p=Ae($i,Qi))=0&&p=0&&y1e-4)return s[0]=e-n,s[1]=t-r,u[0]=e+n,void(u[1]=t+r);if(_o[0]=wo(i)*n+e,_o[1]=bo(i)*r+t,ko[0]=wo(o)*n+e,ko[1]=bo(o)*r+t,l(s,_o,ko),c(u,_o,ko),(i%=xo)<0&&(i+=xo),(o%=xo)<0&&(o+=xo),i>o&&!a?o+=xo:ii&&(So[0]=wo(h)*n+e,So[1]=bo(h)*r+t,l(s,So,s),c(u,So,u))}var Io={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Do=[],Lo=[],Ro=[],No=[],jo=[],Bo=[],Fo=Math.min,zo=Math.max,Vo=Math.cos,Ho=Math.sin,Uo=Math.sqrt,Go=Math.abs,Jo=Math.PI,Xo=2*Jo,Wo="undefined"!==typeof Float32Array,qo=[];function Zo(e){return Math.round(e/Jo*1e8)/1e8%2*Jo}function Ko(e,t){var n=Zo(e[0]);n<0&&(n+=Xo);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Xo?i=n+Xo:t&&n-i>=Xo?i=n-Xo:!t&&n>i?i=n+(Xo-Zo(n-i)):t&&n0&&(this._ux=Go(n/Rn/e)||0,this._uy=Go(n/Rn/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this.addData(Io.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Go(e-this._xi)>this._ux||Go(t-this._yi)>this._uy||this._len<5;return this.addData(Io.L,e,t),this._ctx&&n&&(this._needsDash?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this.addData(Io.C,e,t,n,r,i,o),this._ctx&&(this._needsDash?this._dashedBezierTo(e,t,n,r,i,o):this._ctx.bezierCurveTo(e,t,n,r,i,o)),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this.addData(Io.Q,e,t,n,r),this._ctx&&(this._needsDash?this._dashedQuadraticTo(e,t,n,r):this._ctx.quadraticCurveTo(e,t,n,r)),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,o){qo[0]=r,qo[1]=i,Ko(qo,o),r=qo[0];var a=(i=qo[1])-r;return this.addData(Io.A,e,t,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=Vo(i)*n+e,this._yi=Ho(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Io.R,e,t,n,r),this},e.prototype.closePath=function(){this.addData(Io.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.setLineDash=function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,n=0;nl.length&&(this._expandData(),l=this.data);for(var c=0;c0&&h<=e||c<0&&h>=e||0===c&&(f>0&&p<=t||f<0&&p>=t);)h+=c*(n=o[r=this._dashIdx]),p+=f*n,this._dashIdx=(r+1)%g,c>0&&hu||f>0&&pl||a[r%2?"moveTo":"lineTo"](c>=0?Fo(h,e):zo(h,e),f>=0?Fo(p,t):zo(p,t));c=h-e,f=p-t,this._dashOffset=-Uo(c*c+f*f)},e.prototype._dashedBezierTo=function(e,t,n,r,i,o){var a,s,u,l,c,f=this._ctx,d=this._dashSum,h=this._dashOffset,p=this._lineDash,g=this._xi,y=this._yi,v=0,m=this._dashIdx,b=p.length,w=0;for(h<0&&(h=d+h),h%=d,a=0;a<1;a+=.1)s=ro(g,e,n,i,a+.1)-ro(g,e,n,i,a),u=ro(y,t,r,o,a+.1)-ro(y,t,r,o,a),v+=Uo(s*s+u*u);for(;mh);m++);for(a=(w-h)/v;a<=1;)l=ro(g,e,n,i,a),c=ro(y,t,r,o,a),m%2?f.moveTo(l,c):f.lineTo(l,c),a+=p[m]/v,m=(m+1)%b;m%2!==0&&f.lineTo(i,o),s=i-l,u=o-c,this._dashOffset=-Uo(s*s+u*u)},e.prototype._dashedQuadraticTo=function(e,t,n,r){var i=n,o=r;n=(n+2*e)/3,r=(r+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,r,i,o)},e.prototype.toStatic=function(){if(this._saveData){var e=this.data;e instanceof Array&&(e.length=this._len,Wo&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Ro[0]=Ro[1]=jo[0]=jo[1]=Number.MAX_VALUE,No[0]=No[1]=Bo[0]=Bo[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;en||Go(y)>r||f===t-1)&&(p=Math.sqrt(M*M+y*y),i=g,o=b);break;case Io.C:var v=e[f++],m=e[f++],b=(g=e[f++],e[f++]),w=e[f++],x=e[f++];p=lo(i,o,v,m,g,b,w,x,10),i=w,o=x;break;case Io.Q:p=yo(i,o,v=e[f++],m=e[f++],g=e[f++],b=e[f++],10),i=g,o=b;break;case Io.A:var _=e[f++],k=e[f++],S=e[f++],T=e[f++],C=e[f++],A=e[f++],O=A+C;f+=1;e[f++];h&&(a=Vo(C)*S+_,s=Ho(C)*T+k),p=zo(S,T)*Fo(Xo,Math.abs(A)),i=Vo(O)*S+_,o=Ho(O)*T+k;break;case Io.R:a=i=e[f++],s=o=e[f++],p=2*e[f++]+2*e[f++];break;case Io.Z:var M=a-i;y=s-o;p=Math.sqrt(M*M+y*y),i=a,o=s}p>=0&&(u[c++]=p,l+=p)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,u,l,c=this.data,f=this._ux,d=this._uy,h=this._len,p=t<1,g=0,y=0;if(!p||(this._pathSegLen||this._calculateLength(),u=this._pathSegLen,l=t*this._pathLen))e:for(var v=0;vf||Go(s-o)>d||v===h-1){if(p){if(g+(H=u[y++])>l){var w=(l-g)/H;e.lineTo(i*(1-w)+a*w,o*(1-w)+s*w);break e}g+=H}e.lineTo(a,s),i=a,o=s}break;case Io.C:var x=c[v++],_=c[v++],k=c[v++],S=c[v++],T=c[v++],C=c[v++];if(p){if(g+(H=u[y++])>l){so(i,x,k,T,w=(l-g)/H,Do),so(o,_,S,C,w,Lo),e.bezierCurveTo(Do[1],Lo[1],Do[2],Lo[2],Do[3],Lo[3]);break e}g+=H}e.bezierCurveTo(x,_,k,S,T,C),i=T,o=C;break;case Io.Q:x=c[v++],_=c[v++],k=c[v++],S=c[v++];if(p){if(g+(H=u[y++])>l){po(i,x,k,w=(l-g)/H,Do),po(o,_,S,w,Lo),e.quadraticCurveTo(Do[1],Lo[1],Do[2],Lo[2]);break e}g+=H}e.quadraticCurveTo(x,_,k,S),i=k,o=S;break;case Io.A:var A=c[v++],O=c[v++],M=c[v++],E=c[v++],P=c[v++],I=c[v++],D=c[v++],L=!c[v++],R=M>E?M:E,N=Go(M-E)>.001,j=P+I,B=!1;if(p)g+(H=u[y++])>l&&(j=P+I*(l-g)/H,B=!0),g+=H;if(N&&e.ellipse?e.ellipse(A,O,M,E,D,P,j,L):e.arc(A,O,R,P,j,L),B)break e;b&&(n=Vo(P)*M+A,r=Ho(P)*E+O),i=Vo(j)*M+A,o=Ho(j)*E+O;break;case Io.R:n=i=c[v],r=o=c[v+1],a=c[v++],s=c[v++];var F=c[v++],z=c[v++];if(p){if(g+(H=u[y++])>l){var V=l-g;e.moveTo(a,s),e.lineTo(a+Fo(V,F),s),(V-=F)>0&&e.lineTo(a+F,s+Fo(V,z)),(V-=z)>0&&e.lineTo(a+zo(F-V,0),s+z),(V-=F)>0&&e.lineTo(a,s+zo(z-V,0));break e}g+=H}e.rect(a,s,F,z);break;case Io.Z:if(p){var H;if(g+(H=u[y++])>l){w=(l-g)/H;e.lineTo(i*(1-w)+n*w,o*(1-w)+r*w);break e}g+=H}e.closePath(),i=n,o=r}}},e.CMD=Io,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._needsDash=!1,t._dashOffset=0,t._dashIdx=0,t._dashSum=0,t._ux=0,t._uy=0}(),e}();function $o(e,t,n,r,i,o,a){if(0===i)return!1;var s=i,u=0;if(a>t+s&&a>r+s||ae+s&&o>n+s||ot+f&&c>r+f&&c>o+f&&c>s+f||ce+f&&l>n+f&&l>i+f&&l>a+f||lt+l&&u>r+l&&u>o+l||ue+l&&s>n+l&&s>i+l||sn||c+li&&(i+=ra);var d=Math.atan2(u,s);return d<0&&(d+=ra),d>=r&&d<=i||d+ra>=r&&d+ra<=i}function oa(e,t,n,r,i,o){if(o>t&&o>r||oi?s:0}var aa=Yo.CMD,sa=2*Math.PI;var ua=[-1,-1,-1],la=[-1,-1];function ca(){var e=la[0];la[0]=la[1],la[1]=e}function fa(e,t,n,r,i,o,a,s,u,l){if(l>t&&l>r&&l>o&&l>s||l1&&ca(),h=ro(t,r,o,s,la[0]),d>1&&(p=ro(t,r,o,s,la[1]))),2===d?yt&&s>r&&s>o||s=0&&c<=1&&(i[u++]=c)}else{var l=a*a-4*o*s;if(to(l))(c=-a/(2*o))>=0&&c<=1&&(i[u++]=c);else if(l>0){var c,f=Ki(l),d=(-a-f)/(2*o);(c=(-a+f)/(2*o))>=0&&c<=1&&(i[u++]=c),d>=0&&d<=1&&(i[u++]=d)}}return u}(t,r,o,s,ua);if(0===u)return 0;var l=ho(t,r,o);if(l>=0&&l<=1){for(var c=0,f=co(t,r,o,l),d=0;dn||s<-n)return 0;var u=Math.sqrt(n*n-s*s);ua[0]=-u,ua[1]=u;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=sa-1e-4){r=0,i=sa;var c=o?1:-1;return a>=ua[0]+e&&a<=ua[1]+e?c:0}if(r>i){var f=r;r=i,i=f}r<0&&(r+=sa,i+=sa);for(var d=0,h=0;h<2;h++){var p=ua[h];if(p+e>a){var g=Math.atan2(s,p);c=o?1:-1;g<0&&(g=sa+g),(g>=r&&g<=i||g+sa>=r&&g+sa<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),d+=c)}}return d}function pa(e,t,n,r,i){for(var o,a,s,u,l=e.data,c=e.len(),f=0,d=0,h=0,p=0,g=0,y=0;y1&&(n||(f+=oa(d,h,p,g,r,i))),m&&(p=d=l[y],g=h=l[y+1]),v){case aa.M:d=p=l[y++],h=g=l[y++];break;case aa.L:if(n){if($o(d,h,l[y],l[y+1],t,r,i))return!0}else f+=oa(d,h,l[y],l[y+1],r,i)||0;d=l[y++],h=l[y++];break;case aa.C:if(n){if(Qo(d,h,l[y++],l[y++],l[y++],l[y++],l[y],l[y+1],t,r,i))return!0}else f+=fa(d,h,l[y++],l[y++],l[y++],l[y++],l[y],l[y+1],r,i)||0;d=l[y++],h=l[y++];break;case aa.Q:if(n){if(ea(d,h,l[y++],l[y++],l[y],l[y+1],t,r,i))return!0}else f+=da(d,h,l[y++],l[y++],l[y],l[y+1],r,i)||0;d=l[y++],h=l[y++];break;case aa.A:var b=l[y++],w=l[y++],x=l[y++],_=l[y++],k=l[y++],S=l[y++];y+=1;var T=!!(1-l[y++]);o=Math.cos(k)*x+b,a=Math.sin(k)*_+w,m?(p=o,g=a):f+=oa(d,h,o,a,r,i);var C=(r-b)*_/x+b;if(n){if(ia(b,w,_,k,k+S,T,t,C,i))return!0}else f+=ha(b,w,_,k,k+S,T,C,i);d=Math.cos(k+S)*x+b,h=Math.sin(k+S)*_+w;break;case aa.R:if(p=d=l[y++],g=h=l[y++],o=p+l[y++],a=g+l[y++],n){if($o(p,g,o,g,t,r,i)||$o(o,g,o,a,t,r,i)||$o(o,a,p,a,t,r,i)||$o(p,a,p,g,t,r,i))return!0}else f+=oa(o,g,o,a,r,i),f+=oa(p,a,p,g,r,i);break;case aa.Z:if(n){if($o(d,h,p,g,t,r,i))return!0}else f+=oa(d,h,p,g,r,i);d=p,h=g}}return n||(s=h,u=g,Math.abs(s-u)<1e-4)||(f+=oa(d,h,p,g,r,i)||0),0!==f}var ga=E({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Hi),ya={style:E({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ui.style)},va=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],ma=function(e){function t(t){return e.call(this,t)||this}return pe(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s.5?"#333":t>.2?"#eee":"#ccc"}if(e)return"#ccc"}return"#333"},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(G(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Zt(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=~t.SHAPE_CHANGED_BIT},t.prototype.createPathProxy=function(){this.path=new Yo(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,r=!e;if(r){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&t.SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||r){a.copy(e);var s=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;u=Math.max(u,null==l?4:l)}s>1e-10&&(a.width+=u/s,a.height+=u/s,a.x-=u/s/2,a.y-=u/s/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return pa(e,t,!0,n,r)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return pa(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=t.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"===typeof e?n[e]=t:M(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&t.SHAPE_CHANGED_BIT)},t.prototype.createStyle=function(e){return ce(ga,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=M({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,u=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=M({},r.shape),M(s,n.shape)):(s=M({},i?this.shape:r.shape),M(s,n.shape)):u&&(s=r.shape),s)if(o){this.shape=M({},this.shape);for(var l={},c=F(s),f=0;f0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return ce(ba,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=On(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(qi);wa.prototype.type="tspan";var xa=wa,_a=E({x:0,y:0},Hi),ka={style:E({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ui.style)};var Sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pe(t,e),t.prototype.createStyle=function(e){return ce(_a,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,i=(r=t.image)&&"string"!==typeof r&&r.width&&r.height?t.image:this.__image;if(!i)return 0;var o="width"===e?"height":"width",a=t[o];return null==a?i[e]:i[e]/i[o]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return ka},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new _n(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(qi);Sa.prototype.type="image";var Ta=Sa;var Ca=Math.round;function Aa(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(Ca(2*r)===Ca(2*i)&&(e.x1=e.x2=Ma(r,s,!0)),Ca(2*o)===Ca(2*a)&&(e.y1=e.y2=Ma(o,s,!0)),e):e}}function Oa(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Ma(r,s,!0),e.y=Ma(i,s,!0),e.width=Math.max(Ma(r+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(Ma(i+a,s,!1)-e.y,0===a?0:1),e):e}}function Ma(e,t,n){if(!t)return e;var r=Ca(2*e);return(r+Ca(t))%2===0?r/2:(r+(n?1:-1))/2}var Ea=function(){this.x=0,this.y=0,this.width=0,this.height=0},Pa={},Ia=function(e){function t(t){return e.call(this,t)||this}return pe(t,e),t.prototype.getDefaultShape=function(){return new Ea},t.prototype.buildPath=function(e,t){var n,r,i,o;if(this.subPixelOptimize){var a=Oa(Pa,t,this.style);n=a.x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,i=t.width,o=t.height;t.r?function(e,t){var n,r,i,o,a,s=t.x,u=t.y,l=t.width,c=t.height,f=t.r;l<0&&(s+=l,l=-l),c<0&&(u+=c,c=-c),"number"===typeof f?n=r=i=o=f:f instanceof Array?1===f.length?n=r=i=o=f[0]:2===f.length?(n=i=f[0],r=o=f[1]):3===f.length?(n=f[0],r=o=f[1],i=f[2]):(n=f[0],r=f[1],i=f[2],o=f[3]):n=r=i=o=0,n+r>l&&(n*=l/(a=n+r),r*=l/a),i+o>l&&(i*=l/(a=i+o),o*=l/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,u),e.lineTo(s+l-r,u),0!==r&&e.arc(s+l-r,u+r,r,-Math.PI/2,0),e.lineTo(s+l,u+c-i),0!==i&&e.arc(s+l-i,u+c-i,i,0,Math.PI/2),e.lineTo(s+o,u+c),0!==o&&e.arc(s+o,u+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,u+n),0!==n&&e.arc(s+n,u+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,i,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(ma);Ia.prototype.type="rect";var Da=Ia,La={fill:"#000"},Ra={style:E({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Ui.style)},Na=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=La,n.attr(t),n}return pe(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var t=0;td&&l){var h=Math.floor(d/u);n=n.slice(0,h)}var p=d,g=c;if(i&&(p+=i[0]+i[2],null!=g&&(g+=i[1]+i[3])),e&&a&&null!=g)for(var y=Pi(c,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v=0;v0,T=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),C=r.calculatedLineHeight,A=0;Au&&ji(n,e.substring(u,l),t,s),ji(n,r[2],t,s,r[1]),u=Mi.lastIndex}uo){x>0?(m.tokens=m.tokens.slice(0,x),y(m,w,b),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var A=_.width,O=null==A||"auto"===A;if("string"===typeof A&&"%"===A.charAt(A.length-1))I.percentWidth=A,c.push(I),I.contentWidth=Cn(I.text,T);else{if(O){var M=_.backgroundColor,E=M&&M.image;E&&Oi(E=Ti(E))&&(I.width=Math.max(I.width,E.width*C/E.height))}var P=p&&null!=i?i-w:null;null!=P&&P=0&&"right"===(A=b[C]).align;)this._placeToken(A,e,x,p,T,"right",y),_-=A.width,T-=A.width,C--;for(S+=(n-(S-h)-(g-T)-_)/2;k<=C;)A=b[k],this._placeToken(A,e,x,p,S+A.width/2,"center",y),S+=A.width,k++;p+=x}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var u=e.verticalAlign,l=r+n/2;"top"===u?l=r+e.height/2:"bottom"===u&&(l=r+n-e.height/2),!e.isLineHolder&&Ua(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,l-e.height/2,e.width,e.height);var c=!!s.backgroundColor,f=e.textPadding;f&&(i=Va(i,o,f),l-=e.height/2-f[0]-e.innerHeight/2);var d=this._getOrCreateChild(xa),h=d.createStyle();d.useStyle(h);var p=this._defaultStyle,g=!1,y=0,v=za("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,p.fill)),m=za("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||p.autoStroke&&!g?null:(y=2,p.stroke)),b=s.textShadowBlur>0||t.textShadowBlur>0;h.text=e.text,h.x=i,h.y=l,b&&(h.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,h.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",h.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,h.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),h.textAlign=o,h.textBaseline="middle",h.font=e.font||Sn,h.opacity=ee(s.opacity,t.opacity,1),m&&(h.lineWidth=ee(s.lineWidth,t.lineWidth,y),h.lineDash=Q(s.lineDash,t.lineDash),h.lineDashOffset=t.lineDashOffset||0,h.stroke=m),v&&(h.fill=v);var w=e.contentWidth,x=e.contentHeight;d.setBoundingRect(new _n(Mn(h.x,w,h.textAlign),En(h.y,x,h.textBaseline),w,x))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,u,l=e.backgroundColor,c=e.borderWidth,f=e.borderColor,d=G(l),h=e.borderRadius,p=this;if(d||c&&f){(a=this._getOrCreateChild(Da)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=r,g.width=i,g.height=o,g.r=h,a.dirtyShape()}if(d)(u=a.style).fill=l||null,u.fillOpacity=Q(e.fillOpacity,1);else if(l&&l.image){(s=this._getOrCreateChild(Ta)).onload=function(){p.dirtyStyle()};var y=s.style;y.image=l.image,y.x=n,y.y=r,y.width=i,y.height=o}c&&f&&((u=a.style).lineWidth=c,u.stroke=f,u.strokeOpacity=Q(e.strokeOpacity,1),u.lineDash=e.borderDash,u.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(u.strokeFirst=!0,u.lineWidth*=2));var v=(a||s).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||"transparent",v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=ee(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";if(e.fontSize||e.fontFamily||e.fontWeight){var n="";n="string"!==typeof e.fontSize||-1===e.fontSize.indexOf("px")&&-1===e.fontSize.indexOf("rem")&&-1===e.fontSize.indexOf("em")?isNaN(+e.fontSize)?"12px":e.fontSize+"px":e.fontSize,t=[e.fontStyle,e.fontWeight,n,e.fontFamily||"sans-serif"].join(" ")}return t&&ie(t)||e.textFont||e.font},t}(qi),ja={left:!0,right:1,center:1},Ba={top:1,bottom:1,middle:1};function Fa(e){if(e){e.font=Na.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||ja[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||Ba[n]?n:"top",e.padding&&(e.padding=ne(e.padding))}}function za(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function Va(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function Ha(e){var t=e.text;return null!=t&&(t+=""),t}function Ua(e){return!!(e.backgroundColor||e.borderWidth&&e.borderColor)}var Ga=Na,Ja=ni(),Xa=1,Wa={},qa=ni(),Za=["emphasis","blur","select"],Ka=["normal","emphasis","blur","select"];function Ya(e){return null!=e&&"none"!==e}var $a=new Ot(100);function Qa(e){if("string"!==typeof e)return e;var t=$a.get(e);return t||(t=Ut(e,-.1),$a.put(e,t)),t}function es(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function ts(e){es(e,"emphasis",2)}function ns(e){2===e.hoverState&&es(e,"normal",0)}function rs(e){es(e,"blur",1)}function is(e){1===e.hoverState&&es(e,"normal",0)}function os(e){e.selected=!0}function as(e){e.selected=!1}function ss(e,t,n){t(e,n)}function us(e,t,n){ss(e,t,n),e.isGroup&&e.traverse((function(e){ss(e,t,n)}))}function ls(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function cs(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&I(n,"select")>=0,o=!1;if(e instanceof ma){var a=qa(e),s=i&&a.selectFill||a.normalFill,u=i&&a.selectStroke||a.normalStroke;if(Ya(s)||Ya(u)){var l=(r=r||{}).style||{};!Ya(l.fill)&&Ya(s)?(o=!0,r=M({},r),(l=M({},l)).fill=Qa(s)):!Ya(l.stroke)&&Ya(u)&&(o||(r=M({},r),l=M({},l)),l.stroke=Qa(u)),r.style=l}}if(r&&null==r.z2){o||(r=M({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=I(e.currentStates,t)>=0,i=e.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a0){var o={dataIndex:i,seriesIndex:e.seriesIndex};null!=r&&(o.dataType=r),t.push(o)}}))})),t}function As(e,t,n){Is(e,!0),us(e,fs),Os(e,t,n)}function Os(e,t,n){var r=Ja(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var Ms=["emphasis","blur","select"],Es={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ps(e,t,n,r){n=n||"itemStyle";for(var i=0;i1&&(a*=zs(p),s*=zs(p));var g=(i===o?-1:1)*zs((a*a*(s*s)-a*a*(h*h)-s*s*(d*d))/(a*a*(h*h)+s*s*(d*d)))||0,y=g*a*h/s,v=g*-s*d/a,m=(e+n)/2+Hs(f)*y-Vs(f)*v,b=(t+r)/2+Vs(f)*y+Hs(f)*v,w=Xs([1,0],[(d-y)/a,(h-v)/s]),x=[(d-y)/a,(h-v)/s],_=[(-1*d-y)/a,(-1*h-v)/s],k=Xs(x,_);if(Js(x,_)<=-1&&(k=Us),Js(x,_)>=1&&(k=0),k<0){var S=Math.round(k/Us*1e6)/1e6;k=2*Us+S%2*Us}c.addData(l,m,b,a,s,w,k,f,o)}var qs=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Zs=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Ks=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pe(t,e),t.prototype.applyTransform=function(e){},t}(ma);function Ys(e){return null!=e.setData}function $s(e,t){var n=function(e){var t=new Yo;if(!e)return t;var n,r=0,i=0,o=r,a=i,s=Yo.CMD,u=e.match(qs);if(!u)return t;for(var l=0;lE*E+P*P&&(S=C,T=A),{cx:S,cy:T,x01:-c,y01:-f,x11:S*(i/x-1),y11:T*(i/x-1)}}var vu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},mu=function(e){function t(t){return e.call(this,t)||this}return pe(t,e),t.prototype.getDefaultShape=function(){return new vu},t.prototype.buildPath=function(e,t){!function(e,t){var n=pu(t.r,0),r=pu(t.r0||0,0),i=n>0;if(i||r>0){if(i||(n=r,r=0),r>n){var o=n;n=r,r=o}var a,s=!!t.clockwise,u=t.startAngle,l=t.endAngle;if(u===l)a=0;else{var c=[u,l];Ko(c,!s),a=du(c[0]-c[1])}var f=t.cx,d=t.cy,h=t.cornerRadius||0,p=t.innerCornerRadius||0;if(n>1e-4)if(a>su-1e-4)e.moveTo(f+n*lu(u),d+n*uu(u)),e.arc(f,d,n,u,l,!s),r>1e-4&&(e.moveTo(f+r*lu(l),d+r*uu(l)),e.arc(f,d,r,l,u,s));else{var g=du(n-r)/2,y=gu(g,h),v=gu(g,p),m=v,b=y,w=n*lu(u),x=n*uu(u),_=r*lu(l),k=r*uu(l),S=void 0,T=void 0,C=void 0,A=void 0;if((y>1e-4||v>1e-4)&&(S=n*lu(l),T=n*uu(l),C=r*lu(u),A=r*uu(u),a1e-4)if(b>1e-4){var R=yu(C,A,w,x,n,b,s),N=yu(S,T,_,k,n,b,s);e.moveTo(f+R.cx+R.x01,d+R.cy+R.y01),b1e-4&&a>1e-4)if(m>1e-4){R=yu(_,k,S,T,r,-m,s),N=yu(w,x,C,A,r,-m,s);e.lineTo(f+R.cx+R.x01,d+R.cy+R.y01),m=2){if(r&&"spline"!==r){var o=function(e,t,n,r){var i,o,a,s,u=[],l=[],c=[],f=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,h=e.length;dn-2?n-1:u+1],h=e[u>n-3?n-1:u+2]);var p=l*l,g=l*p;r.push([ku(c[0],f[0],d[0],h[0],l,p,g),ku(c[1],f[1],d[1],h[1],l,p,g)])}return r}(i,n)),e.moveTo(i[0][0],i[0][1]);s=1;for(var f=i.length;squ[1]){if(a=!1,i)return a;var l=Math.abs(qu[0]-Wu[1]),c=Math.abs(Wu[0]-qu[1]);Math.min(l,c)>r.len()&&(l0?u?t.animateFrom(n,{duration:p,delay:y||0,easing:g,done:o,force:!!o||!!a,scope:e,during:a}):t.animateTo(n,{duration:p,delay:y||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:e,during:a}):(t.stopAnimation(),!u&&t.attr(n),o&&o())}else t.stopAnimation(),!u&&t.attr(n),a&&a(1),o&&o()}function vl(e,t,n,r,i,o){yl("update",e,t,n,r,i,o)}function ml(e,t,n,r,i,o){yl("init",e,t,n,r,i,o)}function bl(e,t,n,r,i,o){_l(e)||yl("remove",e,t,n,r,i,o)}function wl(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),bl(e,{style:{opacity:0}},t,n,r)}function xl(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||wl(e,t,n,r)})):wl(e,t,n,r)}function _l(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Cl(e){return!e.isGroup}function Al(e,t,n){if(e&&t){var r=function(e){var t={};return e.traverse((function(e){Cl(e)&&e.anid&&(t[e.anid]=e)})),t}(e);t.traverse((function(e){if(Cl(e)&&e.anid){var t=r[e.anid];if(t){var o=i(e);e.attr(i(t)),vl(e,o,n,Ja(e).dataIndex)}}}))}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=M({},e.shape)),t}}function Ol(e,t){return N(e,(function(e){var n=e[0];n=el(n,t.x),n=tl(n,t.x+t.width);var r=e[1];return r=el(r,t.y),[n,r=tl(r,t.y+t.height)]}))}function Ml(e,t){var n=el(e.x,t.x),r=tl(e.x+e.width,t.x+t.width),i=el(e.y,t.y),o=tl(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}}function El(e,t,n){var r=M({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),E(i,n),new Ta(r)):ul(e.replace("path://",""),r,n,"center")}function Pl(e,t,n,r,i){for(var o=0,a=i[i.length-1];o=-1e-6)return!1;var p=e-i,g=t-o,y=Dl(p,g,l,c)/h;if(y<0||y>1)return!1;var v=Dl(p,g,f,d)/h;return!(v<0||v>1)}function Dl(e,t,n,r){return e*r-n*t}function Ll(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=G(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var u=e.formatterParamsExtra;u&&R(F(u),(function(e){fe(s,e)||(s[e]=u[e],s.$vars.push(e))}));var l=Ja(e.el);l.componentMainType=o,l.componentIndex=a,l.tooltipConfig={name:r,option:E({content:r,formatterParams:s},i)}}al("circle",nu),al("ellipse",ou),al("sector",bu),al("ring",_u),al("polygon",Au),al("polyline",Eu),al("rect",Da),al("line",Lu),al("bezierCurve",Fu),al("arc",Hu);var Rl={};function Nl(e,t){for(var n=0;n-1?"ZH":"EN";function hc(e,t){e=e.toUpperCase(),fc[e]=new ac(t),cc[e]=t}hc("EN",{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),hc("ZH",{time:{month:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],dayOfWeekAbbr:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53cd\u9009"}},toolbox:{brush:{title:{rect:"\u77e9\u5f62\u9009\u62e9",polygon:"\u5708\u9009",lineX:"\u6a2a\u5411\u9009\u62e9",lineY:"\u7eb5\u5411\u9009\u62e9",keep:"\u4fdd\u6301\u9009\u62e9",clear:"\u6e05\u9664\u9009\u62e9"}},dataView:{title:"\u6570\u636e\u89c6\u56fe",lang:["\u6570\u636e\u89c6\u56fe","\u5173\u95ed","\u5237\u65b0"]},dataZoom:{title:{zoom:"\u533a\u57df\u7f29\u653e",back:"\u533a\u57df\u7f29\u653e\u8fd8\u539f"}},magicType:{title:{line:"\u5207\u6362\u4e3a\u6298\u7ebf\u56fe",bar:"\u5207\u6362\u4e3a\u67f1\u72b6\u56fe",stack:"\u5207\u6362\u4e3a\u5806\u53e0",tiled:"\u5207\u6362\u4e3a\u5e73\u94fa"}},restore:{title:"\u8fd8\u539f"},saveAsImage:{title:"\u4fdd\u5b58\u4e3a\u56fe\u7247",lang:["\u53f3\u952e\u53e6\u5b58\u4e3a\u56fe\u7247"]}},series:{typeNames:{pie:"\u997c\u56fe",bar:"\u67f1\u72b6\u56fe",line:"\u6298\u7ebf\u56fe",scatter:"\u6563\u70b9\u56fe",effectScatter:"\u6d9f\u6f2a\u6563\u70b9\u56fe",radar:"\u96f7\u8fbe\u56fe",tree:"\u6811\u56fe",treemap:"\u77e9\u5f62\u6811\u56fe",boxplot:"\u7bb1\u578b\u56fe",candlestick:"K\u7ebf\u56fe",k:"K\u7ebf\u56fe",heatmap:"\u70ed\u529b\u56fe",map:"\u5730\u56fe",parallel:"\u5e73\u884c\u5750\u6807\u56fe",lines:"\u7ebf\u56fe",graph:"\u5173\u7cfb\u56fe",sankey:"\u6851\u57fa\u56fe",funnel:"\u6f0f\u6597\u56fe",gauge:"\u4eea\u8868\u76d8\u56fe",pictorialBar:"\u8c61\u5f62\u67f1\u56fe",themeRiver:"\u4e3b\u9898\u6cb3\u6d41\u56fe",sunburst:"\u65ed\u65e5\u56fe"}},aria:{general:{withTitle:"\u8fd9\u662f\u4e00\u4e2a\u5173\u4e8e\u201c{title}\u201d\u7684\u56fe\u8868\u3002",withoutTitle:"\u8fd9\u662f\u4e00\u4e2a\u56fe\u8868\uff0c"},series:{single:{prefix:"",withName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\uff0c\u8868\u793a{seriesName}\u3002",withoutName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\u3002"},multiple:{prefix:"\u5b83\u7531{seriesCount}\u4e2a\u56fe\u8868\u7cfb\u5217\u7ec4\u6210\u3002",withName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a\u8868\u793a{seriesName}\u7684{seriesType}\uff0c",withoutName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a{seriesType}\uff0c",separator:{middle:"\uff1b",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636e\u662f\u2014\u2014",partialData:"\u5176\u4e2d\uff0c\u524d{displayCnt}\u9879\u662f\u2014\u2014",withName:"{name}\u7684\u6570\u636e\u662f{value}",withoutName:"{value}",separator:{middle:"\uff0c",end:""}}}});var pc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},gc={year:"{yyyy}",month:"{yyyy}-{MM}",day:"{yyyy}-{MM}-{dd}",hour:"{yyyy}-{MM}-{dd} "+pc.hour,minute:"{yyyy}-{MM}-{dd} "+pc.minute,second:"{yyyy}-{MM}-{dd} "+pc.second,millisecond:pc.none},yc=["year","month","day","hour","minute","second","millisecond"],vc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function mc(e,t){return"0000".substr(0,t-(e+="").length)+e}function bc(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function wc(e,t,n,r){var i=Nr(e),o=i[kc(n)](),a=i[Sc(n)]()+1,s=Math.floor((a-1)/4)+1,u=i[Tc(n)](),l=i["get"+(n?"UTC":"")+"Day"](),c=i[Cc(n)](),f=(c-1)%12+1,d=i[Ac(n)](),h=i[Oc(n)](),p=i[Mc(n)](),g=(r instanceof ac?r:function(e){return fc[e]}(r||dc)||fc.EN).getModel("time"),y=g.get("month"),v=g.get("monthAbbr"),m=g.get("dayOfWeek"),b=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,mc(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,mc(u,2)).replace(/{d}/g,u+"").replace(/{eeee}/g,m[l]).replace(/{ee}/g,b[l]).replace(/{e}/g,l+"").replace(/{HH}/g,mc(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,mc(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,mc(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,mc(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,mc(p,3)).replace(/{S}/g,p+"")}function xc(e,t){var n=Nr(e),r=n[Sc(t)]()+1,i=n[Tc(t)](),o=n[Cc(t)](),a=n[Ac(t)](),s=n[Oc(t)](),u=0===n[Mc(t)](),l=u&&0===s,c=l&&0===a,f=c&&0===o,d=f&&1===i;return d&&1===r?"year":d?"month":f?"day":c?"hour":l?"minute":u?"second":"millisecond"}function _c(e,t,n){var r="number"===typeof e?Nr(e):e;switch(t=t||xc(e,n)){case"year":return r[kc(n)]();case"half-year":return r[Sc(n)]()>=6?1:0;case"quarter":return Math.floor((r[Sc(n)]()+1)/4);case"month":return r[Sc(n)]();case"day":return r[Tc(n)]();case"half-day":return r[Cc(n)]()/24;case"hour":return r[Cc(n)]();case"minute":return r[Ac(n)]();case"second":return r[Oc(n)]();case"millisecond":return r[Mc(n)]()}}function kc(e){return e?"getUTCFullYear":"getFullYear"}function Sc(e){return e?"getUTCMonth":"getMonth"}function Tc(e){return e?"getUTCDate":"getDate"}function Cc(e){return e?"getUTCHours":"getHours"}function Ac(e){return e?"getUTCMinutes":"getMinutes"}function Oc(e){return e?"getUTCSeconds":"getSeconds"}function Mc(e){return e?"getUTCSeconds":"getSeconds"}function Ec(e){return e?"setUTCFullYear":"setFullYear"}function Pc(e){return e?"setUTCMonth":"setMonth"}function Ic(e){return e?"setUTCDate":"setDate"}function Dc(e){return e?"setUTCHours":"setHours"}function Lc(e){return e?"setUTCMinutes":"setMinutes"}function Rc(e){return e?"setUTCSeconds":"setSeconds"}function Nc(e){return e?"setUTCSeconds":"setSeconds"}function jc(e){if(!Hr(e))return G(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Bc(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Fc=ne,zc=/([&<>"'])/g,Vc={"&":"&","<":"<",">":">",'"':""","'":"'"};function Hc(e){return null==e?"":(e+"").replace(zc,(function(e,t){return Vc[t]}))}function Uc(e,t,n){function r(e){return e&&ie(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?Nr(e):e;if(!isNaN(+s))return wc(s,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return J(e)?r(e):X(e)&&i(e)?e+"":"-";var u=Vr(e);return i(u)?jc(u):J(e)?r(e):"-"}var Gc=["a","b","c","d","e","f","g"],Jc=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Xc(e,t,n){H(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;or||u.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var y=d.height+(p?-p.y+d.y:0);(f=a+y)>i||u.newline?(o+=s+n,a=0,f=y,s=d.width):s=Math.max(s,d.width)}u.newline||(u.x=o,u.y=a,u.markRedraw(),"horizontal"===e?o=c+n:a=f+n)}))}var Qc=$c;V($c,"vertical"),V($c,"horizontal");function ef(e,t,n){n=Fc(n||0);var r=t.width,i=t.height,o=Or(e.left,r),a=Or(e.top,i),s=Or(e.right,r),u=Or(e.bottom,i),l=Or(e.width,r),c=Or(e.height,i),f=n[2]+n[0],d=n[1]+n[3],h=e.aspect;switch(isNaN(l)&&(l=r-s-d-o),isNaN(c)&&(c=i-u-f-a),null!=h&&(isNaN(l)&&isNaN(c)&&(h>r/i?l=.8*r:c=.8*i),isNaN(l)&&(l=h*c),isNaN(c)&&(c=l/h)),isNaN(o)&&(o=r-s-l-d),isNaN(a)&&(a=i-u-c-f),e.left||e.right){case"center":o=r/2-l/2-n[3];break;case"right":o=r-l-d}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-f}o=o||0,a=a||0,isNaN(l)&&(l=r-d-o-(s||0)),isNaN(c)&&(c=i-f-a-(u||0));var p=new _n(o+n[3],a+n[0],l,c);return p.margin=n,p}function tf(e,t,n,r,i){var o=!i||!i.hv||i.hv[0],a=!i||!i.hv||i.hv[1],s=i&&i.boundingMode||"all";if(o||a){var u;if("raw"===s)u="group"===e.type?new _n(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(u=e.getBoundingRect(),e.needLocalTransform()){var l=e.getLocalTransform();(u=u.clone()).applyTransform(l)}var c=ef(E({width:u.width,height:u.height},t),n,r),f=o?c.x-u.x:0,d=a?c.y-u.y:0;"raw"===s?(e.x=f,e.y=d):(e.x+=f,e.y+=d),e.markRedraw()}}function nf(e){var t=e.layoutMode||e.constructor.layoutMode;return W(t)?t:t?{type:t}:null}function rf(e,t,n){var r=n&&n.ignoreSize;!H(r)&&(r=[r,r]);var i=a(Yc[0],0),o=a(Yc[1],1);function a(n,i){var o={},a=0,l={},c=0;if(Zc(n,(function(t){l[t]=e[t]})),Zc(n,(function(e){s(t,e)&&(o[e]=l[e]=t[e]),u(o,e)&&a++,u(l,e)&&c++})),r[i])return u(t,n[1])?l[n[2]]=null:u(t,n[2])&&(l[n[1]]=null),l;if(2!==c&&a){if(a>=2)return o;for(var f=0;f=0;a--)o=A(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return ui(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(ac);yi(uf,ac),wi(uf),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=hi(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var o=hi(n).main;e.hasSubTypes(n)&&t[o]&&(i=t[o](r))}return i}}(uf),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,i,o){if(e.length){var a=function(e){var r={},i=[];return R(e,(function(o){var a=n(r,o),s=function(e,t){var n=[];return R(e,(function(e){I(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&i.push(o),R(s,(function(e){I(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);I(t.successor,e)<0&&t.successor.push(o)}))})),{graph:r,noEntryList:i}}(r),s=a.graph,u=a.noEntryList,l={};for(R(e,(function(e){l[e]=!0}));u.length;){var c=u.pop(),f=s[c],d=!!l[c];d&&(i.call(o,c,f.originalDeps.slice()),delete l[c]),R(f.successor,d?p:h)}R(l,(function(){throw new Error("")}))}function h(e){s[e].entryCount--,0===s[e].entryCount&&u.push(e)}function p(e){l[e]=!0,h(e)}}}(uf,(function(e){var t=[];R(uf.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=N(t,(function(e){return hi(e).main})),"dataset"!==e&&I(t,"dataset")<=0&&t.unshift("dataset");return t}));var lf=uf,cf="";"undefined"!==typeof navigator&&(cf=navigator.platform||"");var ff="rgba(0, 0, 0, 0.2)",df={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ff,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ff,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ff,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ff,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ff,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ff,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:cf.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},hf=ue(["tooltip","label","itemName","itemId","seriesName"]),pf=1,gf=2,yf=3,vf=ni();function mf(e,t,n){var r={},i=wf(t);if(!i||!e)return r;var o,a,s=[],u=[],l=t.ecModel,c=vf(l).datasetMap,f=i.uid+"_"+n.seriesLayoutBy;R(e=e.slice(),(function(t,n){var i=W(t)?t:e[n]={name:t};"ordinal"===i.type&&null==o&&(o=n,a=p(i)),r[i.name]=[]}));var d=c.get(f)||c.set(f,{categoryWayDim:a,valueWayDim:0});function h(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}(r,a):n;if((c=c||n)&&c.length){var f=c[u];return i&&(l[i]=f),s.paletteIdx=(u+1)%c.length,f}}var If=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new ac(r),this._locale=new ac(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=Rf(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Rf(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):Cf(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&R(a,(function(e){n=!0,this._mergeOption(e,t)}),this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=ue(),s=t&&t.replaceMergeMainTypeMap;vf(this).datasetMap=ue(),R(e,(function(e,t){null!=e&&(lf.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?C(e):A(n[t],e,!0))})),s&&s.each((function(e,t){lf.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),lf.topologicalTravel(o,lf.getAllClassMainTypes(),(function(t){var o=function(e,t,n){var r=kf.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,Jr(e[t])),a=r.get(t),u=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",l=Zr(a,o,u);(function(e,t,n){R(e,(function(e){var r=e.newOption;W(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(l,t,lf),n[t]=null,r.set(t,null),i.set(t,0);var c=[],f=[],d=0;R(l,(function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=lf.getClass(t,e.keyInfo.subType,!o);if(!a)return;if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=M({componentIndex:n},e.keyInfo);M(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(c.push(r.option),f.push(r),d++):(c.push(void 0),f.push(void 0))}),this),n[t]=c,r.set(t,f),i.set(t,d),"series"===t&&Sf(this)}),this),this._seriesIndices||Sf(this)},t.prototype.getOption=function(){var e=C(this.option);return R(e,(function(t,n){if(lf.hasClass(n)){for(var r=Jr(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!ei(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}})),delete e["\0_ec_inner"],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.getLocale=function(e){return this.getLocaleModel().get(e)},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(null==t)for(var i=0;i=t:"max"===n?e<=t:e===t})(r[a],e,o)||(i=!1)}})),i}var Uf=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(R(Jr(e.series),(function(e){e&&e.data&&Z(e.data)&&oe(e.data)})),R(Jr(e.dataset),(function(e){e&&e.source&&Z(e.source)&&oe(e.source)}))),e=C(e);var r=this._optionBackup,i=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,u=e.options,l=e.media,c=!!e.media,f=!!(u||s||a&&a.timeline);a?(i=a).timeline||(i.timeline=s):((f||c)&&(e.options=e.media=null),i=e);c&&H(l)&&R(l,(function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}));function d(e){R(t,(function(t){t(e,n)}))}return d(i),R(u,(function(e){return d(e)})),R(o,(function(e){return d(e.option)})),{baseOption:i,timelineOptions:u||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],C(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=C(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],u=[];if(!o.length&&!a)return u;for(var l=0,c=o.length;l=0;p--){var g=e[p];if(s||(f=g.data.rawIndexOf(g.stackedByDimension,c)),f>=0){var y=g.data.getByRawIndex(g.stackResultDimension,f);if(d>=0&&y>0||d<=0&&y<0){d+=y,h=y;break}}}return r[0]=d,r[1]=h,r}));a.hostModel.setData(u),t.data=u}))}var cd,fd,dd,hd,pd,gd=function(e){this.data=e.data||("keyedColumns"===e.sourceFormat?{}:[]),this.sourceFormat=e.sourceFormat||"unknown",this.seriesLayoutBy=e.seriesLayoutBy||"column",this.startIndex=e.startIndex||0,this.dimensionsDefine=e.dimensionsDefine,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.encodeDefine=e.encodeDefine,this.metaRawOption=e.metaRawOption};function yd(e){return e instanceof gd}function vd(e,t,n,r){n=n||wd(e);var i=t.seriesLayoutBy,o=function(e,t,n,r,i){var o,a;if(!e)return{dimensionsDefine:xd(i),startIndex:a,dimensionsDetectedCount:o};if("arrayRows"===t){var s=e;"auto"===r||null==r?_d((function(e){null!=e&&"-"!==e&&(G(e)?null==a&&(a=1):a=0)}),n,s,10):a=X(r)?r:r?1:0,i||1!==a||(i=[],_d((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:"row"===n?s.length:s[0]?s[0].length:null}else if("objectRows"===t)i||(i=function(e){var t,n=0;for(;nl&&(l=h)}s[0]=u,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t=1)&&(e=1),e}a===u&&s===l||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=u,this._modDataCount=l;var f=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,h=Math.min(null!=f?this._dueIndex+f:1/0,this._dueEnd);if(!r&&(o||d1&&r>0?s:a}};return o;function a(){return t=e?null:ot},gte:function(e,t){return e>=t}},Xd=function(){function e(e,t){if("number"!==typeof t){0,Vd("")}this._opFn=Jd[e],this._rvalFloat=Vr(t)}return e.prototype.evaluate=function(e){return"number"===typeof e?this._opFn(e,this._rvalFloat):this._opFn(Vr(e),this._rvalFloat)},e}(),Wd=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=typeof e,r=typeof t,i="number"===n?e:Vr(e),o="number"===r?t:Vr(t),a=isNaN(i),s=isNaN(o);if(a&&(i=this._incomparable),s&&(o=this._incomparable),a&&s){var u="string"===n,l="string"===r;u&&(i=l?e:0),l&&(o=u?t:0)}return io?-this._resultLT:0},e}(),qd=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Vr(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=Vr(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function Zd(e,t){return"eq"===e||"ne"===e?new qd("eq"===e,t):fe(Jd,e)?new Xd(e,t):null}var Kd=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return Hd(e,t)},e}();function Yd(e){if(!rh(e.sourceFormat)){0,Vd("")}return e.data}function $d(e){var t=e.sourceFormat,n=e.data;if(!rh(t)){0,Vd("")}if("arrayRows"===t){for(var r=[],i=0,o=n.length;i9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(ah(n)){var o=n,a=void 0,s=void 0,u=void 0;if(i){var l=r[0];l.prepareSource(),a=(u=l.getSource()).data,s=u.sourceFormat,t=[l._getVersionSign()]}else s=Z(a=o.get("data",!0))?"typedArray":"original",t=[];var c=this._getSourceMetaRawOption(),f=u?u.metaRawOption:null;e=[vd(a,{seriesLayoutBy:Q(c.seriesLayoutBy,f?f.seriesLayoutBy:null),sourceHeader:Q(c.sourceHeader,f?f.sourceHeader:null),dimensions:Q(c.dimensions,f?f.dimensions:null)},s,o.get("encode",!0))]}else{var d=n;if(i){var h=this._applyTransform(r);e=h.sourceList,t=h.upstreamSignList}else{e=[vd(d.get("source",!0),this._getSourceMetaRawOption(),null,null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){1!==e.length&&sh("")}var o,a=[],s=[];return R(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||sh(""),a.push(t),s.push(e._getVersionSign())})),r?t=function(e,t,n){var r=Jr(e),i=r.length;i||Vd("");for(var o=0,a=i;o1||t>0&&!e.noHeader,r=0;R(e.blocks,(function(e){dh(e).planLayout(e);var t=e.__gapLevelBetweenSubBlocks;t>=r&&(r=t+(!n||t&&("section"!==e.type||e.noHeader)?0:1))})),e.__gapLevelBetweenSubBlocks=r},build:function(e,t,n,r){var i=t.noHeader,o=gh(t),a=function(e,t,n,r){var i=[],o=t.blocks||[];re(!o||H(o)),o=o||[];var a=e.orderMode;if(t.sortBlocks&&a){o=o.slice();var s={valueAsc:"asc",valueDesc:"desc"};if(fe(s,a)){var u=new Wd(s[a],null);o.sort((function(e,t){return u.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===a&&o.reverse()}var l=gh(t);if(R(o,(function(t,n){var o=dh(t).build(e,t,n>0?l.html:0,r);null!=o&&i.push(o)})),!i.length)return;return"richText"===e.renderMode?i.join(l.richText):yh(i.join(""),n)}(e,t,i?n:o.html,r);if(i)return a;var s=Uc(t.header,"ordinal",e.useUTC),u=uh(r,e.renderMode).nameStyle;return"richText"===e.renderMode?vh(e,s,u)+o.richText+a:yh('
'+Hc(s)+"
"+a,n)}},nameValue:{planLayout:function(e){e.__gapLevelBetweenSubBlocks=0},build:function(e,t,n,r){var i=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,u=t.name,l=t.value,c=e.useUTC;if(!o||!a){var f=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),d=o?"":Uc(u,"ordinal",c),h=t.valueType,p=a?[]:H(l)?N(l,(function(e,t){return Uc(e,H(h)?h[t]:h,c)})):[Uc(l,H(h)?h[0]:h,c)],g=!s||!o,y=!s&&o,v=uh(r,i),m=v.nameStyle,b=v.valueStyle;return"richText"===i?(s?"":f)+(o?"":vh(e,d,m))+(a?"":function(e,t,n,r,i){var o=[i],a=r?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(t.join(" "),o)}(e,p,g,y,b)):yh((s?"":f)+(o?"":function(e,t,n){return''+Hc(e)+""}(d,!s,m))+(a?"":function(e,t,n,r){var i=n?"10px":"20px";return''+N(e,(function(e){return Hc(e)})).join("  ")+""}(p,g,y,b)),n)}}}};function ph(e,t,n,r,i,o){if(e){var a=dh(e);a.planLayout(e);var s={useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t};return a.build(s,e,0,o)}}function gh(e){var t=e.__gapLevelBetweenSubBlocks;return{html:lh[t],richText:ch[t]}}function yh(e,t){return'
'+e+'
'}function vh(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function mh(e,t){return Wc(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function bh(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var wh=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Ur()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,i=function(e,t){var n=G(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return G(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};H(t)?R(t,(function(e){return M(n,e)})):M(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function xh(e){var t,n,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,u=o.getData(),l=u.mapDimensionsAll("defaultedTooltip"),c=l.length,f=o.getRawValue(a),d=H(f),h=mh(o,a);if(c>1||d&&!c){var p=function(e,t,n,r,i){var o=t.getData(),a=j(e,(function(e,t,n){var r=o.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],u=[],l=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?l.push(fh("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),u.push(n.type)))}return r.length?R(r,(function(e){c(Ld(o,n,e),e)})):R(e,c),{inlineValues:s,inlineValueTypes:u,blocks:l}}(f,o,a,l,h);t=p.inlineValues,n=p.inlineValueTypes,r=p.blocks,i=p.inlineValues[0]}else if(c){var g=u.getDimensionInfo(l[0]);i=t=Ld(u,a,l[0]),n=g.type}else i=t=d?f[0]:f;var y=Qr(o),v=y&&o.name||"",m=u.getName(a),b=s?v:m;return fh("section",{header:v,noHeader:s||!y,sortParam:i,blocks:[fh("nameValue",{markerType:"item",markerColor:h,name:b,noName:!ie(b),value:t,valueType:n})].concat(r||[])})}var _h=ni();function kh(e,t){return e.getName(t)||e.getId(t)}var Sh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return a(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Bd({count:Ch,reset:Ah}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(_h(this).sourceManager=new ih(this)).prepareSource();var r=this.getInitialData(e,n);Mh(r,this),this.dataTask.context.data=r,_h(this).dataBeforeProcessed=r,Th(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=nf(this),r=n?of(e):{},i=this.subType;lf.hasClass(i)&&(i+="Series"),A(e,t.getTheme().get(this.subType)),A(e,this.getDefaultOption()),Xr(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&rf(e,r,n)},t.prototype.mergeOption=function(e,t){e=A(this.option,e,!0),this.fillDataTextStyle(e.data);var n=nf(this);n&&rf(this.option,e,n);var r=_h(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Mh(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,_h(this).dataBeforeProcessed=i,Th(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Z(e))for(var t=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Mf.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n)for(var r=this.getData(t),i=0;i=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;return n&&n[kh(this.getData(t),e)]||!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option.selectedMode,o=t.length;if(i&&o)if("multiple"===i)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s0&&this._innerSelect(e,t)}},t.registerClass=function(e){return lf.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.useColorPaletteOnData=!1,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(lf);function Th(e){var t=e.name;Qr(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return R(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function Ch(e){return e.model.getRawData().count()}function Ah(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Oh}function Oh(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Mh(e,t){R(u(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,V(Eh,t))}))}function Eh(e,t){var n=Ph(e);return n&&n.setOutputEnd((t||this).count()),t}function Ph(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}D(Sh,Nd),D(Sh,Mf),yi(Sh,lf);var Ih=Sh,Dh=function(){function e(){this.group=new xr,this.uid=uc("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.blurSeries=function(e,t){},e}();pi(Dh),wi(Dh);var Lh=Dh;function Rh(){var e=ni();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}var Nh=ni(),jh=Rh(),Bh=function(){function e(){this.group=new xr,this.uid=uc("viewChart"),this.renderTask=Bd({plan:Vh,reset:Hh}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){zh(e.getData(),r,"emphasis")},e.prototype.downplay=function(e,t,n,r){zh(e.getData(),r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.markUpdateMethod=function(e,t){Nh(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function Fh(e,t,n){e&&("emphasis"===t?ps:gs)(e,n)}function zh(e,t,n){var r=ti(e,t),i=t&&null!=t.highlightKey?function(e){var t=Wa[e];return null==t&&Xa<=32&&(t=Wa[e]=Xa++),t}(t.highlightKey):null;null!=r?R(Jr(r),(function(t){Fh(e.getItemGraphicEl(t),n,i)})):e.eachItemGraphicEl((function(e){Fh(e,n,i)}))}function Vh(e){return jh(e.model)}function Hh(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&Nh(i).updateMethod,u=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==u&&a[u](t,n,r,i),Uh[u]}pi(Bh),wi(Bh);var Uh={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Gh=Bh,Jh="\0__throttleOriginMethod",Xh="\0__throttleRate";function Wh(e,t,n){var r,i,o,a,s,u=0,l=0,c=null;function f(){l=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var d=function(){for(var e=[],d=0;d=0?f():c=setTimeout(f,-i),u=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}function qh(e,t,n,r){var i=e[t];if(i){var o=i[Jh]||i,a=i["\0__throttleType"];if(i[Xh]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=Wh(o,n,"debounce"===r))[Jh]=o,i["\0__throttleType"]=r,i[Xh]=n}return i}}var Zh=ni(),Kh={itemStyle:xi(nc,!0),lineStyle:xi(Ql,!0)},Yh={lineStyle:"stroke",itemStyle:"fill"};function $h(e,t){var n=e.visualStyleMapper||Kh[t];return n||Kh.itemStyle}function Qh(e,t){var n=e.visualDrawType||Yh[t];return n||"fill"}var ep={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=$h(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Qh(e,r),u=o[s],l=U(u)?u:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||l||c){var f=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=f,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||"function"===typeof o.fill?f:o.fill,o.stroke="auto"===o.stroke||"function"===typeof o.stroke?f:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&l)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=M({},o);i[s]=l(r),t.setItemVisual(n,"style",i)}}}},tp=new ac,np={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=$h(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){tp.option=n[r];var a=i(tp);M(e.ensureUniqueItemVisual(t,"style"),a),tp.option.decal&&(e.setItemVisual(t,"decal",tp.option.decal),tp.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},rp={performRawSeries:!0,overallReset:function(e){var t=ue();e.eachSeries((function(e){if(e.useColorPaletteOnData){var n=t.get(e.type);n||(n={},t.set(e.type,n)),Zh(e).scope=n}})),e.eachSeries((function(t){if(t.useColorPaletteOnData&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},i=t.getData(),o=Zh(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=Qh(t,a);i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var u=i.ensureUniqueItemVisual(a,"style"),l=n.getName(e)||e+"",c=n.count();u[s]=t.getColorFromPalette(l,o,c)}}))}}))}},ip=Math.PI;var op=function(){function e(e,t,n,r){this._stageTaskMap=ue(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=ue();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;R(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});re(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}R(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var u=o._stageTaskMap.get(e.uid),l=u.seriesTaskMap,c=u.overallTask;if(c){var f,d=c.agentStubMap;d.each((function(e){a(r,e)&&(e.dirty(),f=!0)})),f&&c.dirty(),o.updatePayload(c,n);var h=o.getPerformArgs(c,r.block);d.each((function(e){e.perform(h)})),c.perform(h)&&(i=!0)}else l&&l.each((function(s,u){a(r,s)&&s.dirty();var l=o.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(l)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=ue(),s=e.seriesType,u=e.getTargetSeries;function l(t){var s=t.uid,u=a.set(s,o&&o.get(s)||Bd({plan:cp,reset:fp,count:pp}));u.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,u)}e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):u&&u(n,r).each(l)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||Bd({reset:ap});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=ue(),u=e.seriesType,l=e.getTargetSeries,c=!0,f=!1;function d(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(f=!0,Bd({reset:sp,onDirty:lp})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}re(!e.createOnAllSeries,""),u?n.eachRawSeriesByType(u,d):l?l(n,r).each(d):(c=!1,R(n.getSeries(),d)),f&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return U(e)&&(e={overallReset:e,seriesType:gp(e)}),e.uid=uc("stageHandler"),t&&(e.visualType=t),e},e}();function ap(e){e.overallReset(e.ecModel,e.api,e.payload)}function sp(e){return e.overallProgress&&up}function up(){this.agent.dirty(),this.getDownstream().dirty()}function lp(){this.agent&&this.agent.dirty()}function cp(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function fp(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Jr(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?N(t,(function(e,t){return hp(t)})):dp}var dp=hp(0);function hp(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o0&&c===i.length-l.length){var f=i.slice(0,c);"data"!==f&&(t.mainType=f,t[l.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,u=t.dataQuery;return l(s,o,"mainType")&&l(s,o,"subType")&&l(s,o,"index","componentIndex")&&l(s,o,"name")&&l(s,o,"id")&&l(u,i,"name")&&l(u,i,"dataIndex")&&l(u,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),Ap={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendSymbol&&n.setVisual("legendSymbol",e.legendSymbol),e.hasSymbolVisual){var r=e.get("symbol"),i=e.get("symbolSize"),o=e.get("symbolKeepAspect"),a=e.get("symbolRotate"),s=e.get("symbolOffset"),u=U(r),l=U(i),c=U(a),f=U(s),d=u||l||c||f,h=!u&&r?r:e.defaultSymbol,p=l?null:i,g=c?null:a,y=f?null:s;if(n.setVisual({legendSymbol:e.legendSymbol||h,symbol:h,symbolSize:p,symbolKeepAspect:o,symbolRotate:g,symbolOffset:y}),!t.isSeriesFiltered(e))return{dataEach:d?function(t,n){var o=e.getRawValue(n),d=e.getDataParams(n);u&&t.setItemVisual(n,"symbol",r(o,d)),l&&t.setItemVisual(n,"symbolSize",i(o,d)),c&&t.setItemVisual(n,"symbolRotate",a(o,d)),f&&t.setItemVisual(n,"symbolOffset",s(o,d))}:null}}}};function Op(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n);default:0}}function Mp(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:0}}function Ep(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r);break;default:0}}var Pp=2*Math.PI,Ip=Yo.CMD,Dp=["top","right","bottom","left"];function Lp(e,t,n,r,i){var o=n.width,a=n.height;switch(e){case"top":r.set(n.x+o/2,n.y-t),i.set(0,-1);break;case"bottom":r.set(n.x+o/2,n.y+a+t),i.set(0,1);break;case"left":r.set(n.x-t,n.y+a/2),i.set(-1,0);break;case"right":r.set(n.x+o+t,n.y+a/2),i.set(1,0)}}function Rp(e,t,n,r,i,o,a,s,u){a-=e,s-=t;var l=Math.sqrt(a*a+s*s),c=(a/=l)*n+e,f=(s/=l)*n+t;if(Math.abs(r-i)%Pp<1e-4)return u[0]=c,u[1]=f,l-n;if(o){var d=r;r=na(i),i=na(d)}else r=na(r),i=na(i);r>i&&(i+=Pp);var h=Math.atan2(s,a);if(h<0&&(h+=Pp),h>=r&&h<=i||h+Pp>=r&&h+Pp<=i)return u[0]=c,u[1]=f,l-n;var p=n*Math.cos(r)+e,g=n*Math.sin(r)+t,y=n*Math.cos(i)+e,v=n*Math.sin(i)+t,m=(p-a)*(p-a)+(g-s)*(g-s),b=(y-a)*(y-a)+(v-s)*(v-s);return m0){t=t/180*Math.PI,Vp.fromArray(e[0]),Hp.fromArray(e[1]),Up.fromArray(e[2]),hn.sub(Gp,Vp,Hp),hn.sub(Jp,Up,Hp);var n=Gp.len(),r=Jp.len();if(!(n<.001||r<.001)){Gp.scale(1/n),Jp.scale(1/r);var i=Gp.dot(Jp);if(Math.cos(t)1&&hn.copy(qp,Up),qp.toArray(e[1])}}}}function Kp(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,Vp.fromArray(e[0]),Hp.fromArray(e[1]),Up.fromArray(e[2]),hn.sub(Gp,Hp,Vp),hn.sub(Jp,Up,Hp);var r=Gp.len(),i=Jp.len();if(!(r<.001||i<.001))if(Gp.scale(1/r),Jp.scale(1/i),Gp.dot(t)=a)hn.copy(qp,Up);else{qp.scaleAndAdd(Jp,o/Math.tan(Math.PI/2-s));var u=Up.x!==Hp.x?(qp.x-Hp.x)/(Up.x-Hp.x):(qp.y-Hp.y)/(Up.y-Hp.y);if(isNaN(u))return;u<0?hn.copy(qp,Hp):u>1&&hn.copy(qp,Up)}qp.toArray(e[1])}}}function Yp(e,t,n,r){var i="normal"===n,o=i?e:e.ensureState(n);o.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?e.useStyle(s):o.style=s}function $p(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=Ce(r[0],r[1]),o=Ce(r[1],r[2]);if(!i||!o)return e.lineTo(r[1][0],r[1][1]),void e.lineTo(r[2][0],r[2][1]);var a=Math.min(i,o)*n,s=Oe([],r[1],r[0],a/i),u=Oe([],r[1],r[2],a/o),l=Oe([],s,u,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(u[0],u[1],u[0],u[1],r[2][0],r[2][1])}else for(var c=1;c0&&o&&_(-f/a,0,a);var y,v,m=e[0],b=e[a-1];return w(),y<0&&k(-y,.8),v<0&&k(v,.8),w(),x(y,v,1),x(v,y,-1),w(),y<0&&S(-y),v<0&&S(v),l}function w(){y=m.rect[t]-r,v=i-b.rect[t]-b.rect[n]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){_(r*n,0,a);var i=r+e;i<0&&k(-i*n,1)}else k(-e*n,1)}}function _(n,r,i){0!==n&&(l=!0);for(var o=r;o0)for(u=0;u0;u--){_(-(o[u-1]*f),u,a)}}}function S(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?_(n,0,r+1):_(-n,a-r-1,a),(e-=n)<=0)return}}function ng(e,t,n,r){return tg(e,"y","height",t,n,r)}function rg(e){if(e){for(var t=[],n=0;n=0&&n.attr(h.oldLayoutSelect),I(l,"emphasis")>=0&&n.attr(h.oldLayoutEmphasis)),vl(n,s,t,a)}else if(n.attr(s),!Wl(n).valueAnimation){var c=Q(n.style.opacity,1);n.style.opacity=0,ml(n,{style:{opacity:c}},t,a)}if(h.oldLayout=s,n.states.select){var f=h.oldLayoutSelect={};lg(f,s,cg),lg(f,n.states.select,cg)}if(n.states.emphasis){var d=h.oldLayoutEmphasis={};lg(d,s,cg),lg(d,n.states.emphasis,cg)}Zl(n,a,u,t,t)}if(r&&!r.ignore&&!r.invisible){i=(h=ug(r)).oldLayout;var h,p={points:r.shape.points};i?(r.attr({shape:i}),vl(r,{shape:p},t)):(r.setShape(p),r.style.strokePercent=0,ml(r,{style:{strokePercent:1}},t)),h.oldLayout=p}},e}();function dg(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:"series",subType:e,query:n},(function(e){r.push(e.seriesIndex)})),r}R([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],(function(e){t(e[0],(function(t,r,i){t=M({},t),i.dispatchAction(M(t,{type:e[1],seriesIndex:n(r,t)}))}))}))}function hg(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t=e.seriesIndex,r=i.selected,a=0;a0?(t=t||1,"dashed"===e?[4*t,2*t]:"dotted"===e?[t]:X(e)?[e]:H(e)?e:null):null}var Mg=new Yo(!0);function Eg(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function Pg(e){var t=e.fill;return null!=t&&"none"!==t}function Ig(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Dg(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Lg(e,t,n){var r=Ci(t.image,t.__image,n);if(Oi(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"===typeof DOMMatrix&&i.setTransform){var o=new DOMMatrix;o.rotateSelf(0,0,(t.rotation||0)/Math.PI*180),o.scaleSelf(t.scaleX||1,t.scaleY||1),o.translateSelf(t.x||0,t.y||0),i.setTransform(o)}return i}}var Rg=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ng=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function jg(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){o||(zg(e,i),o=!0);var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?Hi.opacity:a}(r||t.blend!==n.blend)&&(o||(zg(e,i),o=!0),e.globalCompositeOperation=t.blend||Hi.blend);for(var s=0;s0&&Og(n.lineDash,n.lineWidth),_=n.lineDashOffset,k=!!e.setLineDash,S=t.getGlobalScale();if(l.setScale(S[0],S[1],t.segmentIgnoreThreshold),x){var T=n.strokeNoScale&&t.getLineScale?t.getLineScale():1;T&&1!==T&&(x=N(x,(function(e){return e/T})),_/=T)}var C=!0;(u||t.__dirty&ma.SHAPE_CHANGED_BIT||x&&!k&&i)&&(l.setDPR(e.dpr),s?l.setContext(null):(l.setContext(e),C=!1),l.reset(),x&&!k&&(l.setLineDash(x),l.setLineDashOffset(_)),t.buildPath(l,t.shape,r),l.toStatic(),t.pathUpdated()),C&&l.rebuildPath(e,s?a:1),x&&k&&(e.setLineDash(x),e.lineDashOffset=_),r||(n.strokeFirst?(i&&Dg(e,n),o&&Ig(e,n)):(o&&Ig(e,n),i&&Dg(e,n))),x&&k&&e.setLineDash([])}(e,t,h,d),d&&(n.batchFill=h.fill||"",n.batchStroke=h.stroke||"")):t instanceof xa?(3!==n.lastDrawType&&(u=!0,n.lastDrawType=3),Bg(e,t,l,u,n),function(e,t,n){var r=n.text;if(null!=r&&(r+=""),r){e.font=n.font||Sn,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var i=void 0;if(e.setLineDash){var o=n.lineDash&&n.lineWidth>0&&Og(n.lineDash,n.lineWidth),a=n.lineDashOffset;if(o){var s=n.strokeNoScale&&t.getLineScale?t.getLineScale():1;s&&1!==s&&(o=N(o,(function(e){return e/s})),a/=s),e.setLineDash(o),e.lineDashOffset=a,i=!0}}n.strokeFirst?(Eg(n)&&e.strokeText(r,n.x,n.y),Pg(n)&&e.fillText(r,n.x,n.y)):(Pg(n)&&e.fillText(r,n.x,n.y),Eg(n)&&e.strokeText(r,n.x,n.y)),i&&e.setLineDash([])}}(e,t,h)):t instanceof Ta?(2!==n.lastDrawType&&(u=!0,n.lastDrawType=2),function(e,t,n,r,i){jg(e,Vg(t,i.inHover),n&&Vg(n,i.inHover),r,i)}(e,t,l,u,n),function(e,t,n){var r=t.__image=Ci(n.image,t.__image,t,t.onload);if(r&&Oi(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),u=r.width/r.height;if(null==a&&null!=s?a=s*u:null==s&&null!=a?s=a/u:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,c=n.sy||0;e.drawImage(r,l,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var f=a-(l=n.sx),d=s-(c=n.sy);e.drawImage(r,l,c,f,d,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,h)):t instanceof Qu&&(4!==n.lastDrawType&&(u=!0,n.lastDrawType=4),function(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=r.length;o=4&&(u={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(u&&null!=a&&null!=s&&(l=gy(u,{x:0,y:0,width:a,height:s}),!t.ignoreViewBox)){var d=r;(r=new xr).add(d),d.scaleX=d.scaleY=l.scale,d.x=l.x,d.y=l.y}return t.ignoreRootClip||null==a||null==s||r.setClipPath(new Da({shape:{x:0,y:0,width:a,height:s}})),{root:r,width:a,height:s,viewBoxRect:u,viewBoxTransform:l,named:i}},e.prototype._parseNode=function(e,t,n,r,i,o){var a,s=e.nodeName.toLowerCase(),u=r;if("defs"===s&&(i=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=t;else{if(!i){var l=Gg[s];if(l&&fe(Gg,s)){a=l.call(this,e,t);var c=e.getAttribute("name");if(c){var f={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(f),"g"===s&&(u=f)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:s,el:a});t.add(a)}}var d=ny[s];if(d&&fe(ny,s)){var h=d.call(this,e),p=e.getAttribute("id");p&&(this._defs[p]=h)}}if(a&&a.isGroup)for(var g=e.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,u,i,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},e.prototype._parseText=function(e,t){var n=new xa({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});oy(t,n),sy(e,n,this._defsUsePending,!1,!1),function(e,t){var n=t.__selfStyle;if(n){var r=n.textBaseline,i=r;r&&"auto"!==r?"baseline"===r?i="alphabetic":"before-edge"===r||"text-before-edge"===r?i="top":"after-edge"===r||"text-after-edge"===r?i="bottom":"central"!==r&&"mathematical"!==r||(i="middle"):i="alphabetic",e.style.textBaseline=i}var o=t.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),e.style.textAlign=s)}}(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=o;var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=void(Gg={g:function(e,t){var n=new xr;return oy(t,n),sy(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Da;return oy(t,n),sy(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new nu;return oy(t,n),sy(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new Lu;return oy(t,n),sy(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new ou;return oy(t,n),sy(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n,r=e.getAttribute("points");r&&(n=ay(r));var i=new Au({shape:{points:n||[]},silent:!0});return oy(t,i),sy(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n,r=e.getAttribute("points");r&&(n=ay(r));var i=new Eu({shape:{points:n||[]},silent:!0});return oy(t,i),sy(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new Ta;return oy(t,n),sy(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",r=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(o);var a=new xr;return oy(t,a),sy(e,a,this._defsUsePending,!1,!0),a},tspan:function(e,t){var n=e.getAttribute("x"),r=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",a=new xr;return oy(t,a),sy(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),a},path:function(e,t){var n=Qs(e.getAttribute("d")||"");return oy(t,n),sy(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),e}(),ny={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),n=parseInt(e.getAttribute("y1")||"0",10),r=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),o=new Ju(t,n,r,i);return ry(e,o),iy(e,o),o},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),n=parseInt(e.getAttribute("cy")||"0",10),r=parseInt(e.getAttribute("r")||"0",10),i=new Xu(t,n,r);return ry(e,i),iy(e,i),i}};function ry(e,t){"userSpaceOnUse"===e.getAttribute("gradientUnits")&&(t.global=!0)}function iy(e,t){for(var n=e.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var r=n.getAttribute("offset"),i=void 0;i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};py(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:a})}n=n.nextSibling}}function oy(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),E(t.__inheritedStyle,e.__inheritedStyle))}function ay(e){for(var t=fy(e),n=[],r=0;r0;o-=2){var a=r[o],s=r[o-1],u=void 0;switch(i=i||[1,0,0,1,0,0],s){case"translate":u=fy(a),dt(i,i,[parseFloat(u[0]),parseFloat(u[1]||"0")]);break;case"scale":u=fy(a),pt(i,i,[parseFloat(u[0]),parseFloat(u[1]||u[0])]);break;case"rotate":u=fy(a),ht(i,i,-parseFloat(u[0])/180*Math.PI);break;case"skew":u=fy(a);break;case"matrix":u=fy(a),i[0]=parseFloat(u[0]),i[1]=parseFloat(u[1]),i[2]=parseFloat(u[2]),i[3]=parseFloat(u[3]),i[4]=parseFloat(u[4]),i[5]=parseFloat(u[5])}}t.setLocalTransform(i)}}(e,t),py(e,a,s),r||function(e,t,n){for(var r=0;r<$g.length;r++){var i=$g[r];null!=(o=e.getAttribute(i))&&(t[Yg[i]]=o)}for(r=0;r>1^-(1&s),u=u>>1^-(1&u),i=s+=i,o=u+=o,r.push([s/n,u/n])}return r}function Ty(e,t){return N(B((e=function(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;null==n&&(n=1024);for(var r=t.features,i=0;i0})),(function(e){var n=e.properties,r=e.geometry,i=[];if("Polygon"===r.type){var o=r.coordinates;i.push({type:"polygon",exterior:o[0],interiors:o.slice(1)})}"MultiPolygon"===r.type&&R(o=r.coordinates,(function(e){e[0]&&i.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var a=new wy(n[t||"name"],i,n.cp);return a.properties=n,a}))}for(var Cy=[126,25],Ay=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Oy=0;Oy0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.setOption=function(e,t,n){if(this._disposed)_v(this.id);else{var r,i,o;if(Hy(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this.__flagInMainProcess=!0,!this._model||t){var a=new Uf(this._api),s=this._theme,u=this._model=new Nf;u.scheduler=this._scheduler,u.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},Cv),pv(this,o),n?(this.__optionUpdated={silent:r},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(Ky(this),Qy.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,rv.call(this,r),iv.call(this,r))}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Gy&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){if(f.canvasSupported)return(e=M({},e||{})).pixelRatio=e.pixelRatio||this.getDevicePixelRatio(),e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},t.prototype.getSvgDataURL=function(){if(f.svgSupported){var e=this._zr;return R(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],i=this;zy(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return zy(r,(function(e){e.group.ignore=!1})),o}_v(this.id)},t.prototype.getConnectedDataURL=function(e){if(this._disposed)_v(this.id);else if(f.canvasSupported){var t="svg"===e.type,n=this.group,r=Math.min,i=Math.max;if(Dv[n]){var o=1/0,a=1/0,s=-1/0,u=-1/0,l=[],c=e&&e.pixelRatio||this.getDevicePixelRatio();R(Iv,(function(c,f){if(c.group===n){var d=t?c.getZr().painter.getSvgDom().innerHTML:c.getRenderedCanvas(C(e)),h=c.getDom().getBoundingClientRect();o=r(h.left,o),a=r(h.top,a),s=i(h.right,s),u=i(h.bottom,u),l.push({dom:d,left:h.left,top:h.top})}}));var d=(s*=c)-(o*=c),h=(u*=c)-(a*=c),p=P(),g=Cr(p,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:h}),t){var y="";return zy(l,(function(e){var t=e.left-o,n=e.top-a;y+=''+e.dom+""})),g.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Da({shape:{x:0,y:0,width:d,height:h},style:{fill:e.connectedBackgroundColor}})),zy(l,(function(e){var t=new Ta({style:{x:e.left*c-o,y:e.top*c-a,image:e.dom}});g.add(t)})),g.refreshImmediately(),p.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},t.prototype.convertToPixel=function(e,t){return ev(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return ev(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return R(ii(this._model,e),(function(e,r){r.indexOf("Models")>=0&&R(e,(function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){var o=this._chartsMap[e.__viewId];o&&o.containPoint&&(n=n||o.containPoint(t,e))}else 0}),this)}),this),!!n;_v(this.id)},t.prototype.getVisual=function(e,t){var n=ii(this._model,e,{defaultMainType:"series"});var r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?Op(r,i,t):Mp(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;zy(xv,(function(e){var t=function(t){var n,i=r.getModel(),o=t.target;if("globalout"===e?n={}:o&&pg(o,(function(e){var t=Ja(e);if(t&&null!=t.dataIndex){var r=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType)||{},!0}if(t.eventData)return n=M({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var u=a&&null!=s&&i.getComponent(a,s),l=u&&r["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:l},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),zy(Sv,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),zy(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(hg("map","selectchanged",t,r,e),hg("pie","selectchanged",t,r,e)):"select"===e.fromAction?(hg("map","selected",t,r,e),hg("pie","selected",t,r,e)):"unselect"===e.fromAction&&(hg("map","unselected",t,r,e),hg("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?_v(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)_v(this.id);else{this._disposed=!0,li(this.getDom(),Rv,"");var e=this._api,t=this._model;zy(this._componentsViews,(function(n){n.dispose(t,e)})),zy(this._chartsViews,(function(n){n.dispose(t,e)})),this._zr.dispose(),delete Iv[this.id]}},t.prototype.resize=function(e){if(this._disposed)_v(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),r=e&&e.silent;this.__flagInMainProcess=!0,n&&Ky(this),Qy.update.call(this,{type:"resize",animation:M({duration:0},e&&e.animation)}),this.__flagInMainProcess=!1,rv.call(this,r),iv.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)_v(this.id);else if(Hy(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),Pv[e]){var n=Pv[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?_v(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=M({},e);return t.type=Sv[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)_v(this.id);else if(Hy(t)||(t={silent:!!t}),kv[e.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(e);else{var n=t.silent;nv.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&f.browser.weChat&&this._throttledZrFlush(),rv.call(this,n),iv.call(this,n)}},t.prototype.updateLabelLayout=function(){var e=this._labelManager;e.updateLayoutConfig(this._api),e.layout(this._api),e.processLabelsOverall()},t.prototype.appendData=function(e){if(this._disposed)_v(this.id);else{var t=e.seriesIndex;0,this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){for(var t=[],n=e.currentStates,r=0;r0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.group.traverse((function(t){if(t.states&&t.states.emphasis){if(_l(t))return;if(t instanceof ma&&function(e){var t=qa(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(i){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Ky=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),Yy(e,!0),Yy(e,!1),t.plan()},Yy=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,u=0;ut.get("hoverLayerThreshold")&&!f.node&&!f.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.group.traverse((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,i)},fv=function(e,t){zy(Ov,(function(n){n(e,t)}))},gv=function(e){e.__needsUpdateStatus=!0,e.getZr().wakeUp()},yv=function(t){t.__needsUpdateStatus&&(t.getZr().storage.traverse((function(t){_l(t)||e(t)})),t.__needsUpdateStatus=!1)},dv=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return a(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){ps(t,n),gv(e)},n.prototype.leaveEmphasis=function(t,n){gs(t,n),gv(e)},n.prototype.enterBlur=function(t){ys(t),gv(e)},n.prototype.leaveBlur=function(t){vs(t),gv(e)},n.prototype.enterSelect=function(t){ms(t),gv(e)},n.prototype.leaveSelect=function(t){bs(t),gv(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(Bf))(e)},hv=function(e){function t(e,t){for(var n=0;n=0)){Uv.push(n);var o=wp.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function Jv(e,t){Pv[e]=t}var Xv=function(e){var t=(e=C(e)).type;t||Vd("");var n=t.split(":");2!==n.length&&Vd("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,th.set(t,e)};Hv(2e3,ep),Hv(4500,np),Hv(4500,rp),Hv(2e3,Ap),Hv(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){var n=e.getItemModel(t),r=n.getShallow("symbol",!0),i=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolOffset",!0),s=n.getShallow("symbolKeepAspect",!0);null!=r&&e.setItemVisual(t,"symbol",r),null!=i&&e.setItemVisual(t,"symbolSize",i),null!=o&&e.setItemVisual(t,"symbolRotate",o),null!=a&&e.setItemVisual(t,"symbolOffset",a),null!=s&&e.setItemVisual(t,"symbolKeepAspect",s)}:null}}}),Hv(7e3,(function(e,t){e.eachRawSeries((function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=qg(n,t))}));var i=r.getVisual("decal");if(i)r.getVisual("style").decal=qg(i,t)}}))})),Fv(ud),zv(900,(function(e){var t=ue();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),t.each(ld)})),Jv("default",(function(e,t){E(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new xr,r=new Da({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i,o=new Ga({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Da({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new Hu({shape:{startAngle:-ip/2,endAngle:-ip/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*ip/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*ip/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&i.setShape({cx:u,cy:l}),a.setShape({x:u-s,y:l-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),Vv({type:"highlight",event:"highlight",update:"highlight"},de),Vv({type:"downplay",event:"downplay",update:"downplay"},de),Vv({type:"select",event:"select",update:"select"},de),Vv({type:"unselect",event:"unselect",update:"unselect"},de),Vv({type:"toggleSelect",event:"toggleSelect",update:"toggleSelect"},de),Bv("light",_p),Bv("dark",Tp);var Wv=[],qv={registerPreprocessor:Fv,registerProcessor:zv,registerPostInit:function(e){Uy(Av,e)<0&&e&&Av.push(e)},registerPostUpdate:function(e){Uy(Ov,e)<0&&e&&Ov.push(e)},registerAction:Vv,registerCoordinateSystem:function(e,t){zf.register(e,t)},registerLayout:function(e,t){Gv(Mv,e,t,1e3,"layout")},registerVisual:Hv,registerTransform:Xv,registerLoading:Jv,registerMap:function(e,t,n){Ny(e,t,n)},PRIORITY:Jy,ComponentModel:lf,ComponentView:Lh,SeriesModel:Ih,ChartView:Gh,registerComponentModel:function(e){lf.registerClass(e)},registerComponentView:function(e){Lh.registerClass(e)},registerSeriesModel:function(e){Ih.registerClass(e)},registerChartView:function(e){Gh.registerClass(e)},registerSubTypeDefaulter:function(e,t){lf.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){!function(e,t){kr[e]=t}(e,t)}};function Zv(e){H(e)?R(e,(function(e){Zv(e)})):I(Wv,e)>=0||(Wv.push(e),U(e)&&(e={install:e}),e.install(qv))}function Kv(){return!1}function Yv(e,t,n){var r=P(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var $v=function(e){function t(t,n,r){var i,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||Rn,"string"===typeof t?i=Yv(t,n,r):W(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(i.onselectstart=Kv,a.webkitUserSelect="none",a.userSelect="none",a.webkitTapHighlightColor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=n,o.config=null,o.dpr=r,o}return pe(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=Yv("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,u=new _n(0,0,0,0);function l(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new _n(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,r=1/0,i=0,l=0;l=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&u.restore()};if(f)if(0===f.length)d=s.__endIndex;else for(var w=h.dpr,x=0;x0&&e>r[0]){for(s=0;se);s++);a=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var u=a.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.__painter=this}else T("Layer of zlevel "+e+" is not valid")},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r0?.01:0),this._needsManuallyCompositing),l.__builtin__||T("ZLevel "+u+" has been used by unkown layer "+l.id),l!==o&&(l.__used=!0,l.__startIndex!==i&&(l.__dirty=!0),l.__startIndex=i,l.incremental?l.__drawIndex=-1:l.__drawIndex=i,t(i),o=l),s.__dirty&Gn.REDARAW_BIT&&!s.__inHover&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,R(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?A(n[e],t,!0):n[e]=t;for(var r=0;r=r&&u+1>=i){for(var l=[],c=0;c=r&&f+1>=i)return im(u.components);s[a]=u}else s[a]=void 0}var p;o++}for(;o<=a;){var d=f();if(d)return d}}(e,t,n)}var am=Math.round,sm=Math.sin,um=Math.cos,lm=Math.PI,cm=2*Math.PI,fm=180/lm;function dm(e){return am(1e3*e)/1e3}function hm(e){return am(1e4*e)/1e4}function pm(e){return e<1e-4&&e>-1e-4}function gm(e,t){t&&ym(e,"transform","matrix("+dm(t[0])+","+dm(t[1])+","+dm(t[2])+","+dm(t[3])+","+hm(t[4])+","+hm(t[5])+")")}function ym(e,t,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&e.setAttribute(t,n)}function vm(e,t,n){var r=null==t.opacity?1:t.opacity;if(n instanceof Ta)e.style.opacity=r+"";else{if(function(e){var t=e.fill;return null!=t&&"none"!==t}(t)){var i=t.fill;ym(e,"fill",i="transparent"===i?"none":i),ym(e,"fill-opacity",(null!=t.fillOpacity?t.fillOpacity*r:r)+"")}else ym(e,"fill","none");if(function(e){var t=e.stroke;return null!=t&&"none"!==t}(t)){var o=t.stroke;ym(e,"stroke",o="transparent"===o?"none":o);var a=t.lineWidth,s=t.strokeNoScale?n.getLineScale():1;ym(e,"stroke-width",(s?a/s:0)+""),ym(e,"paint-order",t.strokeFirst?"stroke":"fill"),ym(e,"stroke-opacity",(null!=t.strokeOpacity?t.strokeOpacity*r:r)+"");var u=t.lineDash&&a>0&&Og(t.lineDash,a);if(u){var l=t.lineDashOffset;s&&1!==s&&(u=N(u,(function(e){return e/s})),l&&(l=am(l/=s))),ym(e,"stroke-dasharray",u.join(",")),ym(e,"stroke-dashoffset",(l||0)+"")}else ym(e,"stroke-dasharray","");t.lineCap&&ym(e,"stroke-linecap",t.lineCap),t.lineJoin&&ym(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&ym(e,"stroke-miterlimit",t.miterLimit+"")}else ym(e,"stroke","none")}}var mm=function(){function e(){}return e.prototype.reset=function(){this._d=[],this._str=""},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,o){this._add("C",e,t,n,r,i,o)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add("Q",e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,o){this.ellipse(e,t,n,n,0,r,i,o)},e.prototype.ellipse=function(e,t,n,r,i,o,a,s){var u=0===this._d.length,l=a-o,c=!s,f=Math.abs(l),d=pm(f-cm)||(c?l>=cm:-l>=cm),h=l>0?l%cm:l%cm+cm,p=!1;p=!!d||!pm(f)&&h>=lm===!!c;var g=hm(e+n*um(o)),y=hm(t+r*sm(o));d&&(l=c?cm-1e-4:1e-4-cm,p=!0,u&&this._d.push("M",g,y));var v=hm(e+n*um(o+l)),m=hm(t+r*sm(o+l));if(isNaN(g)||isNaN(y)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(fm)||isNaN(v)||isNaN(m))return"";this._d.push("A",hm(n),hm(r),am(i*fm),+p,+c,v,m)},e.prototype.rect=function(e,t,n,r){this._add("M",e,t),this._add("L",e+n,t),this._add("L",e+n,t+r),this._add("L",e,t+r),this._add("L",e,t)},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,r,i,o,a,s,u){this._d.push(e);for(var l=1;l=0;--n)if(t[n]===e)return!0;return!1}),r}return null}return n[0]},e.prototype.doUpdate=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"===typeof t&&t(e);else{var r=this.add(e);r&&(e[this._domName]=r)}}},e.prototype.add=function(e){return null},e.prototype.addDom=function(e){var t=this.getDefs(!0);e.parentNode!==t&&t.appendChild(e)},e.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},e.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return R(this._tagNames,(function(n){for(var r=e.getElementsByTagName(n),i=0;i-1){var s=Vt(a)[3],u=Gt(a);o.setAttribute("stop-color","#"+u),o.setAttribute("stop-opacity",s+"")}else o.setAttribute("stop-color",n[r].color);t.appendChild(o)}e.__dom=t},t.prototype.markUsed=function(t){if(t.style){var n=t.style.fill;n&&n.__dom&&e.prototype.markDomUsed.call(this,n.__dom),(n=t.style.stroke)&&n.__dom&&e.prototype.markDomUsed.call(this,n.__dom)}},t}(km);function Om(e){return e&&(!!e.image||!!e.svgElement)}var Mm=new yg,Em=function(e){function t(t,n){return e.call(this,t,n,["pattern"],"__pattern_in_use__")||this}return pe(t,e),t.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var n=this;R(["fill","stroke"],(function(r){var i=t.style[r];if(Om(i)){var o=n.getDefs(!0),a=Mm.get(i);a?o.contains(a)||n.addDom(a):a=n.add(i),n.markUsed(t);var s=a.getAttribute("id");e.setAttribute(r,"url(#"+s+")")}}))}},t.prototype.add=function(e){if(Om(e)){var t=this.createElement("pattern");return e.id=null==e.id?this.nextId++:e.id,t.setAttribute("id","zr"+this._zrId+"-pattern-"+e.id),t.setAttribute("x","0"),t.setAttribute("y","0"),t.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(e,t),this.addDom(t),t}},t.prototype.update=function(e){if(Om(e)){var t=this;this.doUpdate(e,(function(){var n=Mm.get(e);t.updateDom(e,n)}))}},t.prototype.updateDom=function(e,t){var n=e.svgElement;if(n instanceof SVGElement)n.parentNode!==t&&(t.innerHTML="",t.appendChild(n),t.setAttribute("width",e.svgWidth+""),t.setAttribute("height",e.svgHeight+""));else{var r=void 0,i=t.getElementsByTagName("image");if(i.length){if(!e.image)return void t.removeChild(i[0]);r=i[0]}else e.image&&(r=this.createElement("image"));if(r){var o=void 0;if("string"===typeof e.image?o=e.image:e.image instanceof HTMLImageElement?o=e.image.src:e.image instanceof HTMLCanvasElement&&(o=e.image.toDataURL()),o){r.setAttribute("href",o),r.setAttribute("x","0"),r.setAttribute("y","0");var a=Ci(o,r,{dirty:function(){}},(function(e){t.setAttribute("width",e.width+""),t.setAttribute("height",e.height+"")}));a&&a.width&&a.height&&(t.setAttribute("width",a.width+""),t.setAttribute("height",a.height+"")),t.appendChild(r)}}}var s="translate("+(e.x||0)+", "+(e.y||0)+") rotate("+(e.rotation||0)/Math.PI*180+") scale("+(e.scaleX||1)+", "+(e.scaleY||1)+")";t.setAttribute("patternTransform",s),Mm.set(e,t)},t.prototype.markUsed=function(t){t.style&&(Om(t.style.fill)&&e.prototype.markDomUsed.call(this,Mm.get(t.style.fill)),Om(t.style.stroke)&&e.prototype.markDomUsed.call(this,Mm.get(t.style.stroke)))},t}(km);function Pm(e){var t=e.__clipPaths;return t&&t.length>0}var Im=function(e){function t(t,n){var r=e.call(this,t,n,"clipPath","__clippath_in_use__")||this;return r._refGroups={},r._keyDuplicateCount={},r}return pe(t,e),t.prototype.markAllUnused=function(){for(var t in e.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[t]);this._keyDuplicateCount={}},t.prototype._getClipPathGroup=function(e,t){if(Pm(e)){var n=e.__clipPaths,r=this._keyDuplicateCount,i=function(e){var t=[];if(e)for(var n=0;n0){var n=this.getDefs(!0),r=t[0],i=void 0,o=void 0;r._dom?(o=r._dom.getAttribute("id"),i=r._dom,n.contains(i)||n.appendChild(i)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(i),r._dom=i),this.getSvgProxy(r).brush(r);var a=this.getSvgElement(r);i.innerHTML="",i.appendChild(a),e.setAttribute("clip-path","url(#"+o+")"),t.length>1&&this.updateDom(i,t.slice(1))}else e&&e.setAttribute("clip-path","none")},t.prototype.markUsed=function(t){var n=this;t.__clipPaths&&R(t.__clipPaths,(function(t){t._dom&&e.prototype.markDomUsed.call(n,t._dom)}))},t.prototype.removeUnused=function(){e.prototype.removeUnused.call(this);var t={};for(var n in this._refGroups){var r=this._refGroups[n];this.isDomUnused(r)?r.parentNode&&r.parentNode.removeChild(r):t[n]=r}this._refGroups=t},t}(km),Dm=function(e){function t(t,n){var r=e.call(this,t,n,["filter"],"__filter_in_use__","_shadowDom")||this;return r._shadowDomMap={},r._shadowDomPool=[],r}return pe(t,e),t.prototype._getFromPool=function(){var e=this._shadowDomPool.pop();if(!e){(e=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++);var t=this.createElement("feDropShadow");e.appendChild(t),this.addDom(e)}return e},t.prototype.update=function(e,t){if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(t.style)){var n=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(t),r=t._shadowDom=this._shadowDomMap[n];r||(r=this._getFromPool(),this._shadowDomMap[n]=r),this.updateDom(e,t,r)}else this.remove(e,t)},t.prototype.remove=function(e,t){null!=t._shadowDom&&(t._shadowDom=null,e.style.filter="")},t.prototype.updateDom=function(e,t,n){var r=n.children[0],i=t.style,o=t.getGlobalScale(),a=o[0],s=o[1];if(a&&s){var u=i.shadowOffsetX||0,l=i.shadowOffsetY||0,c=i.shadowBlur,f=i.shadowColor;r.setAttribute("dx",u/a+""),r.setAttribute("dy",l/s+""),r.setAttribute("flood-color",f);var d=c/2/a+" "+c/2/s;r.setAttribute("stdDeviation",d),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),t._shadowDom=n;var h=n.getAttribute("id");e.style.filter="url(#"+h+")"}},t.prototype.removeUnused=function(){if(this.getDefs(!1)){var e=this._shadowDomPool;for(var t in this._shadowDomMap){var n=this._shadowDomMap[t];e.push(n)}this._shadowDomMap={}}},t}(km);function Lm(e){return parseInt(e,10)}function Rm(e){return e instanceof ma?bm:e instanceof Ta?wm:e instanceof xa?_m:bm}function Nm(e,t){return t&&e&&t.parentNode!==e}function jm(e,t,n){if(Nm(e,t)&&n){var r=n.nextSibling;r?e.insertBefore(t,r):e.appendChild(t)}}function Bm(e,t){if(Nm(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function Fm(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function zm(e){return e.__svgEl}function Vm(e){return function(){T('In SVG mode painter not support method "'+e+'"')}}var Hm=function(){function e(e,t,n,r){this.type="svg",this.refreshHover=Vm("refreshHover"),this.pathToImage=Vm("pathToImage"),this.configLayer=Vm("configLayer"),this.root=e,this.storage=t,this._opts=n=M({},n||{});var i=tm("svg");i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),i.setAttribute("version","1.1"),i.setAttribute("baseProfile","full"),i.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=tm("g");i.appendChild(o);var a=tm("g");i.appendChild(a),this._gradientManager=new Am(r,a),this._patternManager=new Em(r,a),this._clipPathManager=new Im(r,a),this._shadowManager=new Dm(r,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=i,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,e.appendChild(s),s.appendChild(i),this.resize(n.width,n.height),this._visibleList=[]}return e.prototype.getType=function(){return"svg"},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.getSvgRoot=function(){return this._svgRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},e.prototype.setBackgroundColor=function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=tm("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},e.prototype.createSVGElement=function(e){return tm(e)},e.prototype.paintOne=function(e){var t=Rm(e);return t&&t.brush(e),zm(e)},e.prototype._paintList=function(e){var t=this._gradientManager,n=this._patternManager,r=this._clipPathManager,i=this._shadowManager;t.markAllUnused(),n.markAllUnused(),r.markAllUnused(),i.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=e.length,u=[],l=0;l\n\r<"))},e}();function Um(e){return null==e?0:e.length||1}function Gm(e){return e}var Jm=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||Gm,this._newKeyGetter=r||Gm,this.context=i,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o1){var l=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(l,o)}else 1===u?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a1&&1===f)this._updateManyToOne&&this._updateManyToOne(l,u),r[s]=null;else if(1===c&&f>1)this._updateOneToMany&&this._updateOneToMany(l,u),r[s]=null;else if(1===c&&1===f)this._update&&this._update(l,u),r[s]=null;else if(c>1)for(var d=0;d1)for(var a=0;av[1]&&(v[1]=y)}t&&(this._nameList[h]=t[p],this._dontMakeIdFromName||nb(this,h))}this._rawCount=this._count=s,this._extent={},Zm(this)},e.prototype._initDataFromProvider=function(e,t,n){if(!(e>=t)){for(var r=this._rawData,i=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,u=this._nameList,l=this._idList,c=this._rawExtent,f="original"===r.getSource().sourceFormat,d=0;dx[1]&&(x[1]=w)}if(f&&!r.pure&&y){var _=y.name;null==u[v]&&null!=_&&(u[v]=$r(_,null));var k=y.id;null==l[v]&&null!=k&&(l[v]=$r(k,null))}this._dontMakeIdFromName||nb(this,v)}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent={},Zm(this)}},e.prototype.count=function(){return this._count},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=0&&t=0&&t=0&&ta&&(a=u)}return r=[o,a],this._extent[e]=r,r},e.prototype.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){cb(e)?M(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getSum=function(e){var t=0;if(this._storage[e])for(var n=0,r=this.count();n=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&ne))return o;i=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._storage[e],i=[];if(!r)return i;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,u=0,l=this.count();u=0&&a<0)&&(o=f,a=c,s=0),c===a&&(i[s++]=u))}return i.length=s,i},e.prototype.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],n=0;n=f&&x<=d||isNaN(x))&&(s[u++]=g),g++}p=!0}else if(2===o){y=h[c[0]];var m=h[c[1]],b=e[r[1]][0],w=e[r[1]][1];for(v=0;v=f&&x<=d||isNaN(x))&&(_>=b&&_<=w||isNaN(_))&&(s[u++]=g),g++}p=!0}}if(!p)if(1===o)for(v=0;v=f&&x<=d||isNaN(x))&&(s[u++]=k)}else for(v=0;ve[C][1])&&(S=!1)}S&&(s[u++]=this.getRawIndex(v))}return uw[1]&&(w[1]=b)}}}return a},e.prototype.downSample=function(e,t,n,r){for(var i=ib(this,[e]),o=i._storage,a=[],s=lb(1/t),u=o[e],l=this.count(),c=i._rawExtent[e],f=new(Km(this))(l),d=0,h=0;hl-h&&(s=l-h,a.length=s);for(var p=0;pc[1]&&(c[1]=y),f[d++]=v}return i._count=d,i._indices=f,i.getRawIndex=Qm,i},e.prototype.lttbDownSample=function(e,t){var n,r,i,o=ib(this,[]),a=o._storage[e],s=this.count(),u=new(Km(this))(s),l=0,c=lb(1/t),f=this.getRawIndex(0);u[l++]=f;for(var d=1;dn&&(n=r,i=k)}u[l++]=i,f=i}return u[l++]=this.getRawIndex(s-1),o._count=l,o._indices=u,o.getRawIndex=Qm,o},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new ac(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Jm(e?e.getIndices():[],this.getIndices(),(function(t){return eb(e,t)}),(function(e){return eb(t,e)}))},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},cb(e)?M(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(H(i=this.getVisual(t))?i=i.slice():cb(i)&&(i=M({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,cb(t)?M(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){if(cb(e))for(var n in e)e.hasOwnProperty(n)&&this.setLayout(n,e[n]);else this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?M(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel;if(t){var r=Ja(t);r.dataIndex=e,r.dataType=this.dataType,r.seriesIndex=n&&n.seriesIndex,"group"===t.type&&t.traverse(ab,t)}this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},e.prototype.cloneShallow=function(t){t||(t=new e(fb(this.dimensions,this.getDimensionInfo,this),this.hostModel));if(t._storage=this._storage,t._storageArr=this._storageArr,sb(t,this),this._indices){var n=this._indices.constructor;if(n===Array){var r=this._indices.length;t._indices=new n(r);for(var i=0;i65535?hb:gb},Ym=function(e,t,n,r){var i=db[t.type],o=t.name;if(r){var a=e[o],s=a&&a.length;if(s!==n){for(var u=new i(n),l=0;l=0?this._indices[e]:-1},eb=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=tb(e,e._idDimIdx,e._idOrdinalMeta,t)),null==n&&(n="e\0\0"+t),n},rb=function(e){return H(e)||(e=null!=e?[e]:[]),e},function(e,t){for(var n=0;n=0?(a[c]=n(s[c]),o._rawExtent[c]=ob(),o._extent[c]=null):a[c]=s[c],u.push(a[c]))}return o},ob=function(){return[1/0,-1/0]},ab=function(e){var t=Ja(e),n=Ja(this);t.seriesIndex=n.seriesIndex,t.dataIndex=n.dataIndex,t.dataType=n.dataType},sb=function(e,t){R(yb.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,R(vb,(function(n){e[n]=C(t[n])})),e._calculationInfo=M({},t._calculationInfo)},nb=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=tb(e,i,e._nameOrdinalMeta,t)),null==s&&null!=o&&(r[t]=s=tb(e,o,e._idOrdinalMeta,t)),null==s&&null!=a){var u=e._nameRepeatCount,l=u[a]=(u[a]||0)+1;s=a,l>1&&(s+="__ec__"+l),r[t]=s}}}(),e}();function bb(e,t,n){if(n||null!=t.get(e)){for(var r=0;null!=t.get(e+r);)r++;e+=r}return t.set(e,!0),e}var wb=function(e,t,n){yd(t)||(t=md(t)),n=n||{},e=(e||[]).slice();for(var r=(n.dimsDef||[]).slice(),i=ue(),o=ue(),a=[],s=function(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return R(t,(function(e){var t;W(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))})),i}(t,e,r,n.dimCount),u=0;u-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},t}(Ih);function Mb(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=Ld(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,u=t.mapDimension(s),l=t.mapDimension(a),c="x"===s||"radius"===s?1:0,f=N(e.dimensions,(function(e){return t.mapDimension(e)})),d=!1,h=t.getCalculationInfo("stackResultDimension");return Tb(t,f[0])&&(d=!0,f[0]=h),Tb(t,f[1])&&(d=!0,f[1]=h),{dataDimsForPoint:f,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:u,baseDim:l,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Bb(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var Fb="undefined"!==typeof Float32Array,zb=Fb?Float32Array:Array;function Vb(e){return H(e)?Fb?new Float32Array(e):e:new zb(e)}var Hb=Math.min,Ub=Math.max;function Gb(e,t){return isNaN(e)||isNaN(t)}function Jb(e,t,n,r,i,o,a,s,u){for(var l,c,f,d,h,p,g=n,y=0;y=i||g<0)break;if(Gb(v,m)){if(u){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,m),f=v,d=m;else{var b=v-l,w=m-c;if(b*b+w*w<.5){g+=o;continue}if(a>0){var x=g+o,_=t[2*x],k=t[2*x+1],S=y+1;if(u)for(;Gb(_,k)&&S=r||Gb(_,k))h=v,p=m;else{C=_-l,A=k-c;var E=v-l,P=_-v,I=m-c,D=k-m,L=void 0,R=void 0;"x"===s?(L=Math.abs(E),R=Math.abs(P),h=v-L*a,p=m,O=v+L*a,M=m):"y"===s?(L=Math.abs(I),R=Math.abs(D),h=v,p=m-L*a,O=v,M=m+L*a):(L=Math.sqrt(E*E+I*I),h=v-C*a*(1-(T=(R=Math.sqrt(P*P+D*D))/(R+L))),p=m-A*a*(1-T),M=m+A*a*T,O=Hb(O=v+C*a*T,Ub(_,v)),M=Hb(M,Ub(k,m)),O=Ub(O,Hb(_,v)),p=m-(A=(M=Ub(M,Hb(k,m)))-m)*L/R,h=Hb(h=v-(C=O-v)*L/R,Ub(l,v)),p=Hb(p,Ub(c,m)),O=v+(C=v-(h=Ub(h,Hb(l,v))))*R/L,M=m+(A=m-(p=Ub(p,Hb(c,m))))*R/L)}e.bezierCurveTo(f,d,h,p,v,m),f=O,d=M}else e.lineTo(v,m)}l=v,c=m,g+=o}return y}var Xb=function(){this.smooth=0,this.smoothConstraint=!0},Wb=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return a(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Xb},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Gb(n[2*i-2],n[2*i-1]);i--);for(;r=0){var y=a?(c-r)*g+r:(l-n)*g+n;return a?[e,y]:[y,e]}n=l,r=c;break;case o.C:l=i[u++],c=i[u++],f=i[u++],d=i[u++],h=i[u++],p=i[u++];var v=a?oo(n,l,f,h,e,s):oo(r,c,d,p,e,s);if(v>0)for(var m=0;m=0){y=a?ro(r,c,d,p,b):ro(n,l,f,h,b);return a?[e,y]:[y,e]}}n=h,r=p}}},t}(ma),qb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(Xb),Zb=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return a(t,e),t.prototype.getDefaultShape=function(){return new qb},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&Gb(n[2*o-2],n[2*o-1]);o--);for(;ir)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return R(o.getViewLabels(),(function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function aw(e,t){return[e[2*t],e[2*t+1]]}function sw(e,t,n,r){if(Qb(t,"cartesian2d")){var i=r.getModel("endLabel"),o=i.get("show"),a=i.get("valueAnimation"),s=r.getData(),u={lastFrameIndex:0},l=o?function(n,r){e._endLabelOnDuring(n,r,s,u,a,i,t)}:null,c=t.getBaseAxis().isHorizontal(),f=Kb(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=u.originalX&&t.attr({x:u.originalX,y:u.originalY})}),l);if(!r.get("clip",!0)){var d=f.shape,h=Math.max(d.width,d.height);c?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,f),f}return Yb(t,n,r)}var uw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.init=function(){var e=new xr,t=new Nb;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem,o=this.group,a=e.getData(),s=e.getModel("lineStyle"),u=e.getModel("areaStyle"),l=a.getLayout("points")||[],c="polar"===i.type,f=this._coordSys,d=this._symbolDraw,h=this._polyline,p=this._polygon,g=this._lineGroup,y=e.get("animation"),v=!u.isEmpty(),m=u.get("origin"),b=jb(i,a,m),w=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=Vb(2*r),o=0;o=0;o--){var a=n[o].dimension,s=e.dimensions[a],u=e.getDimensionInfo(s);if("x"===(r=u&&u.coordDim)||"y"===r){i=n[o];break}}if(i){var l=t.getAxis(r),c=N(i.stops,(function(e){return{offset:0,coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),f=c.length,d=i.outerColors.slice();f&&c[0].coord>c[f-1].coord&&(c.reverse(),d.reverse());var h=c[0].coord-10,p=c[f-1].coord+10,g=p-h;if(g<.001)return"transparent";R(c,(function(e){e.offset=(e.coord-h)/g})),c.push({offset:f?c[f-1].offset:.5,color:d[1]||"transparent"}),c.unshift({offset:f?c[0].offset:.5,color:d[0]||"transparent"});var y=new Ju(0,0,0,0,c,!0);return y[r]=h,y[r+"2"]=p,y}}}(a,i)||a.getVisual("style")[a.getVisual("drawType")];h&&f.type===i.type&&T===this._step?(v&&!p?p=this._newPolygon(l,w):p&&!v&&(g.remove(p),p=this._polygon=null),c||this._initOrUpdateEndLabel(e,i,Wc(C)),g.setClipPath(sw(this,i,!1,e)),x&&d.updateData(a,{isIgnore:_,clipShape:S,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),ew(this._stackedOnPoints,w)&&ew(this._points,l)||(y?this._doUpdateAnimation(a,w,i,n,T,m):(T&&(l=iw(l,i,T),w&&(w=iw(w,i,T))),h.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:w})))):(x&&d.updateData(a,{isIgnore:_,clipShape:S,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),y&&this._initSymbolLabelAnimation(a,i,S),T&&(l=iw(l,i,T),w&&(w=iw(w,i,T))),h=this._newPolyline(l),v&&(p=this._newPolygon(l,w)),c||this._initOrUpdateEndLabel(e,i,Wc(C)),g.setClipPath(sw(this,i,!0,e)));var A=e.get(["emphasis","focus"]),O=e.get(["emphasis","blurScope"]);(h.useStyle(E(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),Ps(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);Ja(h).seriesIndex=e.seriesIndex,As(h,A,O);var M=rw(e.get("smooth")),P=e.get("smoothMonotone"),I=e.get("connectNulls");if(h.setShape({smooth:M,smoothMonotone:P,connectNulls:I}),p){var D=a.getCalculationInfo("stackedOnSeries"),L=0;p.useStyle(E(u.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),D&&(L=rw(D.get("smooth"))),p.setShape({smooth:M,stackedOnSmooth:L,smoothMonotone:P,connectNulls:I}),Ps(p,e,"areaStyle"),Ja(p).seriesIndex=e.seriesIndex,As(p,A,O)}var j=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=j)})),this._polyline.onHoverStateChange=j,this._data=a,this._coordSys=i,this._stackedOnPoints=w,this._points=l,this._step=T,this._valueOrigin=m},t.prototype.dispose=function(){},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=ti(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var u=a[2*o],l=a[2*o+1];if(isNaN(u)||isNaN(l))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(u,l))return;(s=new Ib(i,o)).x=u,s.y=l,s.setZ(e.get("zlevel"),e.get("z"));var c=s.getSymbolPath().getTextContent();c&&(c.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Gh.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=ti(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Gh.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;ls(this._polyline,e),t&&ls(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Wb({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Zb({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,u=s.get("animationDuration");"function"===typeof u&&(u=u(null));var l=s.get("animationDelay")||0,c="function"===typeof l?l(null):l;e.eachItemGraphicEl((function(e,o){var s=e;if(s){var f=[e.x,e.y],d=void 0,h=void 0,p=void 0;if(i){var g=n,y=t.pointToCoord(f);r?(d=g.startAngle,h=g.endAngle,p=-y[1]/180*Math.PI):(d=g.r0,h=g.r,p=y[0])}else{var v=n;r?(d=v.x,h=v.x+v.width,p=e.x):(d=v.y+v.height,h=v.y,p=e.y)}var m=h===d?0:(p-d)/(h-d);a&&(m=1-m);var b="function"===typeof l?l(o):u*m+c,w=s.getSymbolPath(),x=w.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:b}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:b}),w.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(r.get("show")){var i=e.getData(),o=this._polyline,a=this._endLabel;a||((a=this._endLabel=new Ga({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var s=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(i.getLayout("points"));s>=0&&(Bl(o,Fl(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:s,defaultText:function(e,t,n){return null!=n?Eb(i,n):Mb(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s=this._endLabel,u=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout("points"),c=n.hostModel,f=c.get("connectNulls"),d=o.get("precision"),h=o.get("distance")||0,p=a.getBaseAxis(),g=p.isHorizontal(),y=p.inverse,v=t.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,b=(g?h:0)*(y?-1:1),w=(g?0:-h)*(y?-1:1),x=g?"x":"y",_=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,u=-1,l=0;l=t||r>=t&&i<=t){u=l;break}s=l,r=i}else r=i;return{range:[s,u],t:(t-r)/(i-r)}}(l,m,x),k=_.range,S=k[1]-k[0],T=void 0;if(S>=1){if(S>1&&!f){var C=aw(l,k[0]);s.attr({x:C[0]+b,y:C[1]+w}),i&&(T=c.getRawValue(k[0]))}else{(C=u.getPointOn(m,x))&&s.attr({x:C[0]+b,y:C[1]+w});var A=c.getRawValue(k[0]),O=c.getRawValue(k[1]);i&&(T=fi(n,d,A,O,_.t))}r.lastFrameIndex=k[0]}else{var M=1===e||r.lastFrameIndex>0?k[0]:0;C=aw(l,M);i&&(T=c.getRawValue(M)),s.attr({x:C[0]+b,y:C[1]+w})}i&&Wl(s).setLabelText(T)}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o){var a=this._polyline,s=this._polygon,u=e.hostModel,l=function(e,t,n,r,i,o,a,s){for(var u=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],c=[],f=[],d=[],h=[],p=[],g=[],y=jb(i,t,a),v=(jb(o,e,s),e.getLayout("points")||[]),m=t.getLayout("points")||[],b=0;b3e3||s&&nw(f,h)>3e3)return a.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:h}));a.shape.__points=l.current,a.shape.points=c;var p={shape:{points:d}};l.current!==c&&(p.shape.__points=l.next),a.stopAnimation(),vl(a,p,u),s&&(s.setShape({points:c,stackedOnPoints:f}),s.stopAnimation(),vl(s,{shape:{stackedOnPoints:h}},u),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],y=l.status,v=0;vt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),u=o.getOtherAxis(s),l=s.getExtent(),c=n.getDevicePixelRatio(),f=Math.abs(l[1]-l[0])*(c||1),d=Math.round(a/f);if(d>1){"lttb"===i&&e.setData(r.lttbDownSample(r.mapDimension(u.dim),1/d));var h=void 0;"string"===typeof i?h=cw[i]:"function"===typeof i&&(h=i),h&&e.setData(r.downSample(r.mapDimension(u.dim),1/d,h,fw))}}}}}var hw="undefined"!==typeof Float32Array?Float32Array:Array;function pw(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function gw(e){return e.dim+e.index}function yw(e,t){var n=[];return t.eachSeriesByType(e,(function(e){_w(e)&&!kw(e)&&n.push(e)})),n}function vw(e){var t=function(e){var t={};R(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.mapDimension(n.dim),a=0,s=r.count();a0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return R(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,s=t[a],u=Math.abs(o[1]-o[0]),l=i.scale.getExtent(),c=Math.abs(l[1]-l[0]);r=s?u/c*s:u}else{var f=e.getData();r=Math.abs(o[1]-o[0])/f.count()}var d=Or(e.get("barWidth"),r),h=Or(e.get("barMaxWidth"),r),p=Or(e.get("barMinWidth")||1,r),g=e.get("barGap"),y=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:d,barMaxWidth:h,barMinWidth:p,barGap:g,barCategoryGap:y,axisKey:gw(i),stackId:pw(e)})})),mw(n)}function mw(e){var t={};R(e,(function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var u=e.barWidth;u&&!a[s].width&&(a[s].width=u,u=Math.min(o.remainedWidth,u),o.remainedWidth-=u);var l=e.barMaxWidth;l&&(a[s].maxWidth=l);var c=e.barMinWidth;c&&(a[s].minWidth=c);var f=e.barGap;null!=f&&(o.gap=f);var d=e.barCategoryGap;null!=d&&(o.categoryGap=d)}));var n={};return R(t,(function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,o=e.categoryGap;if(null==o){var a=F(r).length;o=Math.max(35-4*a,15)+"%"}var s=Or(o,i),u=Or(e.gap,1),l=e.remainedWidth,c=e.autoWidthCount,f=(l-s)/(c+(c-1)*u);f=Math.max(f,0),R(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,l-=r+u*r,c--}else{var r=f;t&&tr&&(r=n),r!==f&&(e.width=r,l-=r+u*r,c--)}})),f=(l-s)/(c+(c-1)*u),f=Math.max(f,0);var d,h=0;R(r,(function(e,t){e.width||(e.width=f),d=e,h+=e.width*(1+u)})),d&&(h-=d.width*u);var p=-h/2;R(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:p,width:e.width},p+=e.width*(1+u)}))})),n}function bw(e,t,n){if(e&&t){var r=e[gw(t)];return null!=r&&null!=n?r[pw(n)]:r}}function ww(e,t){var n=yw(e,t),r=vw(n),i={};R(n,(function(e){var t=e.getData(),n=e.coordinateSystem,o=n.getBaseAxis(),a=pw(e),s=r[gw(o)][a],u=s.offset,l=s.width,c=n.getOtherAxis(o),f=e.get("barMinHeight")||0;i[a]=i[a]||[],t.setLayout({bandWidth:s.bandWidth,offset:u,size:l});for(var d=t.mapDimension(c.dim),h=t.mapDimension(o.dim),p=Tb(t,d),g=c.isHorizontal(),y=Sw(o,c,p),v=0,m=t.count();v=0?"p":"n",_=y;p&&(i[a][w]||(i[a][w]={p:y,n:y}),_=i[a][w][x]);var k,S=void 0,T=void 0,C=void 0,A=void 0;if(g)S=_,T=(k=n.dataToPoint([b,w]))[1]+u,C=k[0]-y,A=l,Math.abs(C).5||(c=.5),{progress:function(e,t){for(var f,d=e.count,h=new hw(2*d),p=new hw(2*d),g=new hw(d),y=[],v=[],m=0,b=0;null!=(f=e.next());)v[l]=t.get(a,f),v[1-l]=t.get(s,f),y=n.dataToPoint(v,null,y),p[m]=u?r.x+r.width:y[0],h[m++]=y[0],p[m]=u?y[1]:r.y+r.height,h[m++]=y[1],g[b++]=f;t.setLayout({largePoints:h,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:Sw(i,o,!1),backgroundStart:u?r.x:r.y,valueAxisHorizontal:u})}}}}};function _w(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function kw(e){return e.pipelineContext&&e.pipelineContext.large}function Sw(e,t,n){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var Tw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.getInitialData=function(e,t){return Ab(this.getSource(),this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e){var t=this.coordinateSystem;if(t){var n=t.dataToPoint(t.clampData(e)),r=this.getData(),i=r.getLayout("offset"),o=r.getLayout("size");return n[t.getBaseAxis().isHorizontal()?0:1]+=i+o/2,n}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(Ih);Ih.registerClass(Tw);var Cw=Tw,Aw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.getInitialData=function(){return Ab(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=lc(Cw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Cw),Ow=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Mw=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return a(t,e),t.prototype.getDefaultShape=function(){return new Ow},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,u=t.startAngle,l=t.endAngle,c=t.clockwise,f=Math.cos(u),d=Math.sin(u),h=Math.cos(l),p=Math.sin(l);(c?l-u<2*Math.PI:u-l<2*Math.PI)&&(e.moveTo(f*i+n,d*i+r),e.arc(f*s+n,d*s+r,a,-Math.PI+u,u,!c)),e.arc(n,r,o,u,l,!c),e.moveTo(h*o+n,p*o+r),e.arc(h*s+n,p*s+r,a,l-2*Math.PI,l-Math.PI,!c),0!==i&&(e.arc(n,r,i,l,u,c),e.moveTo(f*i+n,p*i+r)),e.closePath()},t}(ma),Ew=[0,0],Pw=Math.max,Iw=Math.min;var Dw=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return a(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");("cartesian2d"===i||"polar"===i)&&(this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._incrementalRenderLarge(e,t)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,u=e.coordinateSystem,l=u.getBaseAxis();"cartesian2d"===u.type?i=l.isHorizontal():"polar"===u.type&&(i="angle"===l.dim);var c=e.isAnimationEnabled()?e:null,f=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();0;if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,u);f&&this._enableRealtimeSort(f,a,n);var d=e.get("clip",!0)||f,h=function(e,t){var n=e.getArea&&e.getArea();if(Qb(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(u,a);o.removeClipPath();var p=e.get("roundCap",!0),g=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),v=y.get("borderRadius")||0,m=[],b=this._backgroundEls,w=r&&r.isInitSort,x=r&&"changeAxisOrder"===r.type;function _(e){var t=jw[u.type](a,e),n=function(e,t,n){return new("polar"===e.type?bu:Da)({shape:Uw(t,n,e),silent:!0,z2:0})}(u,i,t);return n.useStyle(y.getItemStyle()),"cartesian2d"===u.type&&n.setShape("r",v),m[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=jw[u.type](a,t,n);if(g&&_(t),a.hasValue(t)){var s=!1;d&&(s=Lw[u.type](h,r));var y=Rw[u.type](e,a,t,r,i,c,l.model,!1,p);Bw(y,a,t,n,r,e,i,"polar"===u.type),w?y.attr({shape:r}):f?Nw(f,c,y,r,t,i,!1,!1):ml(y,{shape:r},e,t),a.setItemGraphicEl(t,y),o.add(y),y.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),k=jw[u.type](a,t,r);if(g){var S=void 0;0===b.length?S=_(n):((S=b[n]).useStyle(y.getItemStyle()),"cartesian2d"===u.type&&S.setShape("r",v),m[t]=S);var T=jw[u.type](a,t);vl(S,{shape:Uw(i,T,u)},c,t)}var C=s.getItemGraphicEl(n);if(!a.hasValue(t))return o.remove(C),void(C=null);var A=!1;d&&(A=Lw[u.type](h,k))&&o.remove(C),C||(C=Rw[u.type](e,a,t,k,i,c,l.model,!!C,p)),x||Bw(C,a,t,r,k,e,i,"polar"===u.type),w?C.attr({shape:k}):f?Nw(f,c,C,k,t,i,!0,x):vl(C,{shape:k},e,t,null),a.setItemGraphicEl(t,C),C.ignore=A,o.add(C)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&xl(n,e,t)})).execute();var k=this._backgroundGroup||(this._backgroundGroup=new xr);k.removeAll();for(var S=0;So)return!0;o=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i,animation:{duration:0}})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){xl(t,e,Ja(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Gh),Lw={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=Pw(t.x,e.x),s=Iw(t.x+t.width,i),u=Pw(t.y,e.y),l=Iw(t.y+t.height,o),c=si?s:a,t.y=f&&u>o?l:u,t.width=c?0:s-a,t.height=f?0:l-u,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=Iw(t.r,e.r),o=Pw(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},Rw={cartesian2d:function(e,t,n,r,i,o,a,s,u){var l=new Da({shape:M({},r),z2:1});(l.__dataIndex=n,l.name="item",o)&&(l.shape[i?"height":"width"]=0);return l},polar:function(e,t,n,r,i,o,a,s,u){var l=r.startAngle0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle}}};function Bw(e,t,n,r,i,o,a,s){var u=t.getItemVisual(n,"style");s||e.setShape("r",r.get(["itemStyle","borderRadius"])||0),e.useStyle(u);var l=r.getShallow("cursor");if(l&&e.attr("cursor",l),!s){var c=a?i.height>0?"bottom":"top":i.width>0?"left":"right",f=Fl(r);Bl(e,f,{labelFetcher:o,labelDataIndex:n,defaultText:Mb(o.getData(),n),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:c}),ql(e.getTextContent(),f,o.getRawValue(n),(function(e){return Eb(t,e)}))}var d=r.getModel(["emphasis"]);As(e,d.get("focus"),d.get("blurScope")),Ps(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",R(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var Fw=function(){},zw=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return a(t,e),t.prototype.getDefaultShape=function(){return new Fw},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.__startPoint,i=this.__baseDimIdx,o=0;o=f&&y<=d&&(u<=v?c>=u&&c<=v:c>=v&&c<=u))return a[h]}return-1}(this,e.offsetX,e.offsetY);Ja(this).dataIndex=t>=0?t:null}),30,!1);function Uw(e,t,n){if(Qb(n,"cartesian2d")){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var o=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:o.r0,r:e?i.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var Gw=Dw;var Jw=2*Math.PI,Xw=Math.PI/180;function Ww(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),i=function(e,t){return ef(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,n),o=e.get("center"),a=e.get("radius");H(a)||(a=[0,a]),H(o)||(o=[o,o]);var s=Or(i.width,n.getWidth()),u=Or(i.height,n.getHeight()),l=Math.min(s,u),c=Or(o[0],s)+i.x,f=Or(o[1],u)+i.y,d=Or(a[0],l/2),h=Or(a[1],l/2),p=-e.get("startAngle")*Xw,g=e.get("minAngle")*Xw,y=0;t.each(r,(function(e){!isNaN(e)&&y++}));var v=t.getSum(r),m=Math.PI/(v||y)*2,b=e.get("clockwise"),w=e.get("roseType"),x=e.get("stillShowZeroSum"),_=t.getDataExtent(r);_[0]=0;var k=Jw,S=0,T=p,C=b?1:-1;if(t.setLayout({viewRect:i,r:h}),t.each(r,(function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:b,cx:c,cy:f,r0:d,r:w?NaN:h});else{(r="area"!==w?0===v&&x?m:e*m:Jw/y)n?a:o,c=Math.abs(u.label.y-n);if(c>l.maxY){var f=u.label.x-t-u.len2*i,d=r+u.len,p=Math.abs(f)0?"right":"left":E>0?"left":"right"}var z=y.get("rotate");if(I="number"===typeof z?z*(Math.PI/180):z?E<0?-M+Math.PI:-M:0,o=!!I,d.x=T,d.y=C,d.rotation=I,d.setStyle({verticalAlign:"middle"}),D){d.setStyle({align:O});var V=d.states.select;V&&(V.x+=d.x,V.y+=d.y)}else{var H=d.getBoundingRect().clone();H.applyTransform(d.getComputedTransform());var U=(d.style.margin||0)+2.1;H.y-=U/2,H.height+=U,i.push({label:d,labelLine:p,position:v,len:k,len2:S,minTurnAngle:_.get("minTurnAngle"),maxSurfaceAngle:_.get("maxSurfaceAngle"),surfaceNormal:new hn(E,P),linePoints:A,textAlign:O,labelDistance:m,labelAlignTo:b,edgeDistance:w,bleedMargin:x,rect:H})}s.setTextConfig({inside:D})}})),!o&&e.get("avoidLabelOverlap")&&function(e,t,n,r,i,o,a,s){for(var u=[],l=[],c=Number.MAX_VALUE,f=-Number.MAX_VALUE,d=0;d0){for(var u=o.getItemLayout(0),l=1;isNaN(u&&u.startAngle)&&l=n.r0}},t.type="pie",t}(Gh);function nx(e,t,n){t=H(t)&&{coordDimensions:t}||M({},t);var r=e.getSource(),i=xb(r,t),o=new mb(i,e);return o.initData(r,n),o}var rx=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),ix=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.useColorPaletteOnData=!0,t}return a(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rx(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return nx(this,{coordDimensions:["value"],encodeDefaulter:V(bf,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=[];return n.each(n.mapDimension("value"),(function(e){i.push(e)})),r.percent=function(e,t,n){if(!e[t])return 0;var r=j(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===r)return 0;for(var i=Math.pow(10,n),o=N(e,(function(e){return(isNaN(e)?0:e)/r*i*100})),a=100*i,s=N(o,(function(e){return Math.floor(e)})),u=j(s,(function(e,t){return e+t}),0),l=N(o,(function(e,t){return e-s[t]}));uc&&(c=l[d],f=d);++s[f],l[f]=0,++u}return s[t]/i}(i,t,n.hostModel.get("percentPrecision")),r.$vars.push("percent"),r},t.prototype._defaultLabelLine=function(e){Xr(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Ih);var ox=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return a(t,e),t.prototype.getInitialData=function(e,t){return Ab(this.getSource(),this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},t}(Ih),ax=function(){},sx=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.getDefaultShape=function(){return new ax},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,o=i.shape,a=e.getContext?e.getContext():e;if(a&&r[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=0;s--){var u=2*s,l=r[u]-o/2,c=r[u+1]-a/2;if(e>=l&&t>=c&&e<=l+o&&t<=c+a)return s}return-1},t}(ma),ux=function(){function e(){this.group=new xr}return e.prototype.isPersistent=function(){return!this._incremental},e.prototype.updateData=function(e,t){this.group.removeAll();var n=new sx({rectHover:!0,cursor:"default"});n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,!1,t),this.group.add(n),this._incremental=null},e.prototype.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("points");this.group.eachChild((function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),r=4*e.startIndex*2;t=new Float32Array(t.buffer,r,n)}e.setShape("points",t)}))}},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new Qu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},e.prototype.incrementalUpdate=function(e,t,n){var r;this._incremental?(r=new sx,this._incremental.addDisplayable(r,!0)):((r=new sx({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(r)),r.setShape({points:t.getLayout("points")}),this._setCommon(r,t,!!this._incremental,n)},e.prototype._setCommon=function(e,t,n,r){var i=t.hostModel;r=r||{};var o=t.getVisual("symbolSize");e.setShape("size",o instanceof Array?o:[o,o]),e.softClipShape=r.clipShape||null,e.symbolProxy=Tg(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<4;e.useStyle(i.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),u=s&&s.fill;if(u&&e.setColor(u),!n){var l=Ja(e);l.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){l.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>=0&&(l.dataIndex=n+(e.startIndex||0))}))}},e.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},e.prototype._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()},e}(),lx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=lw("").reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new ux:new Nb,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(Gh),cx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(lf),fx=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),dx=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ai).models[0]},t.type="cartesian2dAxis",t}(lf);D(dx,fx);var hx={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},px=A({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},hx),gx=A({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},hx),yx={category:px,value:gx,time:A({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},gx),log:E({scale:!0,logBase:10},gx)};function vx(e){return W(e)&&null!=e.value?e.value:e+""}var mx=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&N(r,vx);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if("string"!==typeof e&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=ue(this.categories))},e}(),bx={value:1,category:1,time:1,log:1};function xx(e,t,n,r){R(bx,(function(i,o){var s=A(A({},yx[o],!0),r,!0),u=function(e){function n(){for(var n=[],r=0;rt[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();wi(kx);var Sx=kx,Tx=Mr;function Cx(e,t,n,r){var i={},o=e[1]-e[0],a=i.interval=Br(o/t,!0);null!=n&&ar&&(a=i.interval=r);var s=i.intervalPrecision=Ax(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Ox(e,0,t),Ox(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[Tx(Math.ceil(e[0]/a)*a,s),Tx(Math.floor(e[1]/a)*a,s)],e),i}function Ax(e){return Pr(e)+2}function Ox(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function Mx(e,t){return e>=t[0]&&e<=t[1]}function Ex(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function Px(e,t){return e*(t[1]-t[0])+t[0]}var Ix=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new mx({})),H(r)&&(r=new mx({categories:N(r,(function(e){return W(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return a(t,e),t.prototype.parse=function(e){return"string"===typeof e?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Mx(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return Ex(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(Px(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.niceTicks=function(){},t.prototype.niceExtent=function(){},t.type="ordinal",t}(Sx);Sx.registerClass(Ix);var Dx=Ix,Lx=Mr,Rx=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return a(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Mx(e,this._extent)},t.prototype.normalize=function(e){return Ex(e,this._extent)},t.prototype.scale=function(e){return Px(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ax(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:Lx(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;ir[0]&&c0)for(var s=0;s=0;--s)if(u[l]){o=u[l];break}o=o||a.none}if(H(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return wc(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=[];if(!t)return r;r.push({value:n[0],level:0});var i=this.getSetting("useUTC"),o=function(e,t,n,r){var i=vc,o=0;function a(e,t,n,i,o,a,s){for(var u=new Date(t),l=t,c=u[i]();l1&&0===l&&o.unshift({value:o[0].value-d})}}for(l=0;l=r[0]&&v<=r[1]&&c++)}var m=(r[1]-r[0])/t;if(c>1.5*m&&f>m/1.5)break;if(u.push(g),c>m||e===i[d])break}l=[]}}}var b;0;var w=B(N(u,(function(e){return B(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),x=[],_=w.length-1;for(d=0;dn&&(this._approxInterval=n);var o=Bx.length,a=Math.min(function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function zx(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function Vx(e){return(e/=36e5)>12?12:e>6?6:e>3.5?4:e>2?2:1}function Hx(e,t){return(e/=t?6e4:1e3)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Ux(e){return Br(e,!0)}function Gx(e,t,n){var r=new Date(e);switch(bc(t)){case"year":case"month":r[Pc(n)](0);case"day":r[Ic(n)](1);case"hour":r[Dc(n)](0);case"minute":r[Lc(n)](0);case"second":r[Rc(n)](0),r[Nc(n)](0)}return r.getTime()}Sx.registerClass(jx);var Jx=jx,Xx=Sx.prototype,Wx=Nx.prototype,qx=Pr,Zx=Mr,Kx=Math.floor,Yx=Math.ceil,$x=Math.pow,Qx=Math.log,e_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Nx,t._interval=0,t}return a(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return N(Wx.getTicks.call(this,e),(function(e){var t=e.value,i=Mr($x(this.base,t));return i=t===n[0]&&this._fixMin?n_(i,r[0]):i,{value:i=t===n[1]&&this._fixMax?n_(i,r[1]):i}}),this)},t.prototype.setExtent=function(e,t){var n=this.base;e=Qx(e)/Qx(n),t=Qx(t)/Qx(n),Wx.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=Xx.getExtent.call(this);t[0]=$x(e,t[0]),t[1]=$x(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=n_(t[0],n[0])),this._fixMax&&(t[1]=n_(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=Qx(e[0])/Qx(t),e[1]=Qx(e[1])/Qx(t),Xx.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.niceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r,i=(r=n,Math.pow(10,jr(r)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var o=[Mr(Yx(t[0]/i)*i),Mr(Kx(t[1]/i)*i)];this._interval=i,this._niceExtent=o}},t.prototype.niceExtent=function(e){Wx.niceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Mx(e=Qx(e)/Qx(this.base),this._extent)},t.prototype.normalize=function(e){return Ex(e=Qx(e)/Qx(this.base),this._extent)},t.prototype.scale=function(e){return e=Px(e,this._extent),$x(this.base,e)},t.type="log",t}(Sx),t_=e_.prototype;function n_(e,t){return Zx(e,qx(t))}t_.getMinorTicks=Wx.getMinorTicks,t_.getLabel=Wx.getLabel,Sx.registerClass(e_);var r_=e_,i_=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]s&&(a=NaN,s=NaN);var c=Y(a)||Y(s)||e&&!r;this._needCrossZero&&(a>0&&s>0&&!u&&(a=0),a<0&&s<0&&!l&&(s=0));var f=this._determinedMin,d=this._determinedMax;return null!=f&&(a=f,u=!0),null!=d&&(s=d,l=!0),{min:a,max:s,minFixed:u,maxFixed:l,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[a_[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[o_[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),o_={min:"_determinedMin",max:"_determinedMax"},a_={min:"_dataMin",max:"_dataMax"};function s_(e,t,n){var r=e.rawExtentInfo;return r||(r=new i_(e,t,n),e.rawExtentInfo=r,r)}function u_(e,t){return null==t?null:Y(t)?NaN:e.parse(t)}function l_(e,t){var n=e.type,r=s_(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=yw("bar",a),u=!1;if(R(s,(function(e){u=u||e.getBaseAxis()===t.axis})),u){var l=vw(s),c=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=bw(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;R(a,(function(e){s=Math.min(e.offset,s)}));var u=-1/0;R(a,(function(e){u=Math.max(e.offset+e.width,u)})),s=Math.abs(s),u=Math.abs(u);var l=s+u,c=t-e,f=c/(1-(s+u)/o)-c;return{min:e-=f*(s/l),max:t+=f*(u/l)}}(i,o,t,l);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function c_(e,t){var n=l_(e,t),r=n.extent,i=t.get("splitNumber");e instanceof r_&&(e.base=t.get("logBase"));var o=e.type;e.setExtent(r[0],r[1]),e.niceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?t.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?t.get("maxInterval"):null});var a=t.get("interval");null!=a&&e.setInterval&&e.setInterval(a)}function f_(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Dx({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new Jx({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Sx.getClass(t)||Nx)}}function d_(e){var t,n,r=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):"string"===typeof r?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):"function"===typeof r?(t=r,function(n,r){return null!=i&&(r=n.value-i),t(h_(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function h_(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function p_(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new _n(e.x,e.y,o,a)}function g_(e){var t=e.get("interval");return null==t?"auto":t}function y_(e){return"category"===e.type&&0===g_(e.getLabelModel())}function v_(e,t){var n={};return R(e.mapDimensionsAll(t),(function(t){n[Cb(e,t)]=!0})),F(n)}var m_=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return N(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),B(this.getAxes(),(function(t){return t.scale.type===e}))},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),b_=["x","y"];function w_(e){return"interval"===e.type||"time"===e.type}var x_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=b_,t}return a(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(w_(e)&&w_(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var u=(o[0]-i[0])/a,l=(o[1]-i[1])/s,c=i[0]-n[0]*u,f=i[1]-r[0]*l,d=this._transform=[u,0,0,l,c,f];this._invTransform=gt([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return Me(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r)),n[1]=a.toGlobalCoord(a.dataToCoord(i)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){if(t=t||[],this._invTransform)return Me(t,e,this._invTransform);var n=this.getAxis("x"),r=this.getAxis("y");return t[0]=n.coordToData(n.toLocalCoord(e[0])),t[1]=r.coordToData(r.toLocalCoord(e[1])),t},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]),i=Math.max(e[0],e[1])-n,o=Math.max(t[0],t[1])-r;return new _n(n,r,i,o)},t}(m_),__=ni();function k_(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=T_(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=d_(e);return{labels:N(t,(function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function S_(e,t){return"category"===e.type?function(e,t){var n,r,i=C_(e,"ticks"),o=g_(t),a=A_(i,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(U(o))n=E_(e,o,!0);else if("auto"===o){var s=T_(e,e.getLabelModel());r=s.labelCategoryInterval,n=N(s.labels,(function(e){return e.tickValue}))}else n=M_(e,r=o,!0);return O_(i,o,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:N(e.scale.getTicks(),(function(e){return e.value}))}}function T_(e,t){var n,r,i=C_(e,"labels"),o=g_(t),a=A_(i,o);return a||(U(o)?n=E_(e,o):(r="auto"===o?function(e){var t=__(e).autoInterval;return null!=t?t:__(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=M_(e,r)),O_(i,o,{labels:n,labelCategoryInterval:r}))}function C_(e,t){return __(e)[t]||(__(e)[t]=[])}function A_(e,t){for(var n=0;n1&&c/u>2&&(l=Math.round(Math.ceil(l/u)*u));var f=y_(e),d=a.get("showMinLabel")||f,h=a.get("showMaxLabel")||f;d&&l!==o[0]&&g(o[0]);for(var p=l;p<=o[1];p+=u)g(p);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return h&&p-u!==o[1]&&g(o[1]),s}function E_(e,t,n){var r=e.scale,i=d_(e),o=[];return R(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var P_=[0,1];function I_(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var D_=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return Ir(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&I_(n=n.slice(),r.count()),Ar(e,P_,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&I_(n=n.slice(),r.count());var i=Ar(e,n,P_,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=N(S_(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var o,a,s=e.getExtent();if(1===i)t[0].coord=s[0],o=t[1]={coord:s[0]};else{var u=t[i-1].tickValue-t[0].tickValue,l=(t[i-1].coord-t[0].coord)/u;R(t,(function(e){e.coord-=l/2}));var c=e.scale.getExtent();a=1+c[1]-t[i-1].tickValue,o={coord:t[i-1].coord+l*a},t.push(o)}var f=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],o.coord)&&(r?o.coord=s[1]:t.pop());r&&d(o.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Mr(e),t=Mr(t),f?e>t:e0&&e<100||(e=5),N(this.scale.getMinorTicks(e),(function(e){return N(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return k_(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=d_(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,o=i.getExtent(),a=i.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var u=o[0],l=e.dataToCoord(u+1)-e.dataToCoord(u),c=Math.abs(l*Math.cos(r)),f=Math.abs(l*Math.sin(r)),d=0,h=0;u<=o[1];u+=s){var p,g,y=On(n({value:u}),t.font,"center","top");p=1.3*y.width,g=1.3*y.height,d=Math.max(d,p,7),h=Math.max(h,g,7)}var v=d/c,m=h/f;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var b=Math.max(0,Math.floor(Math.min(v,m))),w=__(e.model),x=e.getExtent(),_=w.lastAutoInterval,k=w.lastTickCount;return null!=_&&null!=k&&Math.abs(_-b)<=1&&Math.abs(k-a)<=1&&_>b&&w.axisExtent0===x[0]&&w.axisExtent1===x[1]?b=_:(w.lastTickCount=a,w.lastAutoInterval=b,w.axisExtent0=x[0],w.axisExtent1=x[1]),b}(this)},e}(),L_=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return a(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(D_);function R_(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,u=a?"onZero":s,l=i.dim,c=r.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,p="x"===l?[f[2]-h,f[3]+h]:[f[0]-h,f[1]+h];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===l?p[d[u]]:f[0],"x"===l?p[d[u]]:f[3]],o.rotation=Math.PI/2*("x"===l?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?p[d[s]]-p[d.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),$(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===u?-y:y,o.z2=1,o}function N_(e){return"cartesian2d"===e.get("coordinateSystem")}function j_(e){var t={xAxisModel:null,yAxisModel:null};return R(t,(function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,ai).models[0];t[r]=o})),t}function B_(e,t){return e.getCoordSysModel()===t}function F_(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),u=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=u)z_(o[u])&&(i=o[u]);else for(var l in o)if(o.hasOwnProperty(l)&&z_(o[l])&&!r[c(o[l])]){i=o[l];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function z_(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}(e)}var V_=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=b_,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model),R(n.x,(function(e){c_(e.scale,e.model)})),R(n.y,(function(e){c_(e.scale,e.model)}));var r={};R(n.x,(function(e){F_(n,"y",e,r)})),R(n.y,(function(e){F_(n,"x",e,r)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=ef(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){R(a,(function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?o.x:o.y)}))}s(),i&&(R(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();i=n instanceof Dx?n.count():(r=n.getTicks()).length;var a,s=e.getLabelModel(),u=d_(e),l=1;i>40&&(l=Math.ceil(i/40));for(var c=0;c0?"top":"bottom",r="center"):Lr(o-H_)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),G_={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],u=[o[1],0];a&&(Me(s,s,a),Me(u,u,a));var l=M({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Lu({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:u[0],y2:u[1]},style:l,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});c.anid="line",n.add(c);var f=t.get(["axisLine","symbol"]),d=t.get(["axisLine","symbolSize"]),h=t.get(["axisLine","symbolOffset"])||0;if("number"===typeof h&&(h=[h,h]),null!=f){"string"===typeof f&&(f=[f,f]),"string"!==typeof d&&"number"!==typeof d||(d=[d,d]);var p=d[0],g=d[1];R([{rotate:e.rotation+Math.PI/2,offset:h[0],r:0},{rotate:e.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((s[0]-u[0])*(s[0]-u[0])+(s[1]-u[1])*(s[1]-u[1]))}],(function(t,r){if("none"!==f[r]&&null!=f[r]){var i=Tg(f[r],-p/2,-g/2,p,g,l.stroke,!0),o=t.r+t.offset;i.attr({rotation:t.rotate,x:s[0]+o*Math.cos(e.rotation),y:s[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}}))}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var s=o.getModel("lineStyle"),u=r.tickDirection*o.get("length"),l=q_(i.getTicksCoords(),t.transform,u,E(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;cf[1]?-1:1,h=["start"===s?f[0]-d*c:"end"===s?f[1]+d*c:(f[0]+f[1])/2,W_(s)?e.labelOffset+u*c:0],p=t.get("nameRotate");null!=p&&(p=p*H_/180),W_(s)?o=U_.innerTextLayout(e.rotation,null!=p?p:e.rotation,u):(o=function(e,t,n,r){var i,o,a=Dr(n-e),s=r[0]>r[1],u="start"===t&&!s||"start"!==t&&s;Lr(a-H_/2)?(o=u?"bottom":"top",i="center"):Lr(a-1.5*H_)?(o=u?"top":"bottom",i="center"):(o="middle",i=a<1.5*H_&&a>H_/2?u?"left":"right":u?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(e.rotation,s,p||0,f),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=l.getFont(),y=t.get("nameTruncate",!0)||{},v=y.ellipsis,m=$(e.nameTruncateMaxWidth,y.maxWidth,a),b=new Ga({x:h[0],y:h[1],rotation:o.rotation,silent:U_.isLabelSilent(t),style:zl(l,{text:i,font:g,overflow:"truncate",width:m,ellipsis:v,fill:l.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:l.get("align")||o.textAlign,verticalAlign:l.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Ll({el:b,componentModel:t,itemName:i}),b.__fullText=i,b.anid="name",t.get("triggerEvent")){var w=U_.makeAxisEventDataBase(t);w.targetType="axisName",w.name=i,Ja(b).eventData=w}r.add(b),b.updateTransform(),n.add(b),b.decomposeTransform()}}};function J_(e){e&&(e.ignore=!0)}function X_(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=lt([]);return ht(i,i,-e.rotation),n.applyTransform(ft([],i,e.getLocalTransform())),r.applyTransform(ft([],i,t.getLocalTransform())),n.intersect(r)}}function W_(e){return"middle"===e||"center"===e}function q_(e,t,n,r,i){for(var o=[],a=[],s=[],u=0;u=0||e===t}function $_(e){var t=Q_(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=ek(n);null==o&&(i.status=s?"show":"hide");var u=r.getExtent().slice();u[0]>u[1]&&u.reverse(),(null==a||a>u[1])&&(a=u[1]),a0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var d=a;null!=f.color&&(d=E({color:f.color},a));var h=A(C(f),{boundaryGap:e,splitNumber:t,scale:n,axisLine:r,axisTick:i,axisLabel:o,name:f.text,nameLocation:"end",nameGap:l,nameTextStyle:d,triggerEvent:c},!1);if(s||(h.name=""),"string"===typeof u){var p=h.name;h.name=u.replace("{value}",null!=p?p:"")}else"function"===typeof u&&(h.name=u(h.name,h));var g=new ac(h,null,this.ecModel);return D(g,fx.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=f},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:A({lineStyle:{color:"#bbb"}},_k.axisLine),axisLabel:kk(_k.axisLabel,!1),axisTick:kk(_k.axisTick,!1),splitLine:kk(_k.splitLine,!0),splitArea:kk(_k.splitArea,!0),indicator:[]},t}(lf),Tk=["axisLine","axisTickLabel","axisName"],Ck=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem;R(N(t.getIndicatorAxes(),(function(e){return new Z_(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(e){R(Tk,e.add,e),this.group.add(e.getGroup())}),this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var r=e.get("shape"),i=e.getModel("splitLine"),o=e.getModel("splitArea"),a=i.getModel("lineStyle"),s=o.getModel("areaStyle"),u=i.get("show"),l=o.get("show"),c=a.get("color"),f=s.get("color"),d=H(c)?c:[c],h=H(f)?f:[f],p=[],g=[];if("circle"===r)for(var y=n[0].getTicksCoords(),v=t.cx,m=t.cy,b=0;bn[0]&&isFinite(f)&&isFinite(n[0]))}else{a.getTicks().length-1>i&&(l=o(l));f=Mr((c=Math.ceil(n[1]/l)*l)-l*i);a.setExtent(f,c),a.setInterval(l)}}))},e.prototype.convertToPixel=function(e,t,n){return null},e.prototype.convertFromPixel=function(e,t,n){return null},e.prototype.containPoint=function(e){return!1},e.create=function(t,n){var r=[];return t.eachComponent("radar",(function(i){var o=new e(i,t,n);r.push(o),i.coordinateSystem=o})),t.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("radarIndex")||0])})),r},e.dimensions=[],e}();function Mk(e){e.registerCoordinateSystem("radar",Ok),e.registerComponentModel(Sk),e.registerComponentView(Ck),e.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each((function(e){t.setItemVisual(e,"legendSymbol","roundRect")})),t.setVisual("legendSymbol","roundRect")}})}var Ek="\0_ec_interaction_mutex";function Pk(e,t){return!!Ik(e)[t]}function Ik(e){return e[Ek]||(e[Ek]={})}function Dk(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(Ke(r.event),Lk(e,t,n,r,i))}function Lk(e,t,n,r,i){i.isAvailableBehavior=z(Rk,null,n,r),e.trigger(t,i)}function Rk(e,t,n){var r=n[e];return!e||r&&(!G(r)||t.event[r+"Key"])}Vv({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var Nk=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=z(n._mousedownHandler,n),i=z(n._mousemoveHandler,n),o=z(n._mouseupHandler,n),a=z(n._mousewheelHandler,n),s=z(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=E(C(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return a(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(Ye(e)||e.target&&e.target.draggable)){var t=e.offsetX,n=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,n)&&(this._x=t,this._y=n,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&Rk("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!Pk(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,o=t-r,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Ke(e.event),Lk(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Ye(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=Rk("zoomOnMouseWheel",e,this._opt),n=Rk("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;Dk(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var u=Math.abs(r);Dk(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(u>3?.4:u>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){Pk(this._zr,"globalPan")||Dk(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(Le);function jk(e,t,n){var r=e.target;r.x+=t,r.y+=n,r.dirty()}function Bk(e,t,n,r){var i=e.target,o=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,o){var s=o.min||0,u=o.max||1/0;a=Math.max(Math.min(u,a),s)}var l=a/e.zoom;e.zoom=a,i.x-=(n-i.x)*(l-1),i.y-=(r-i.y)*(l-1),i.scaleX*=l,i.scaleY*=l,i.dirty()}var Fk={axisPointer:1,tooltip:1,brush:1};function zk(e,t,n){var r=t.getComponentByElement(e.topTarget),i=r&&r.coordinateSystem;return r&&r!==n&&!Fk.hasOwnProperty(r.mainType)&&i&&i.model!==n}var Vk=["rect","circle","line","ellipse","polygon","polyline","path"],Hk=ue(Vk),Uk=ue(Vk.concat(["g"])),Gk=ue(Vk.concat(["g"])),Jk=ni();function Xk(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function Wk(e,t,n,r){var i=r.getModel("itemStyle"),o=r.getModel(["emphasis","itemStyle"]),a=r.getModel(["blur","itemStyle"]),s=r.getModel(["select","itemStyle"]),u=Xk(i),l=Xk(o),c=Xk(s),f=Xk(a),d=e.data;if(d){var h=d.getItemVisual(n,"style"),p=d.getItemVisual(n,"decal");e.isVisualEncodedByVisualMap&&h.fill&&(u.fill=h.fill),p&&(u.decal=qg(p,e.api))}t.setStyle(u),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=l,t.ensureState("select").style=c,t.ensureState("blur").style=f,fs(t)}function qk(e,t,n,r,i,o,a){var s=e.data,u=e.isGeo,l=s&&isNaN(s.get(s.mapDimension("value"),o)),c=s&&s.getItemLayout(o);if(u||l||c&&c.showLabel){var f=u?n:o,d=void 0;(!s||o>=0)&&(d=i);var h=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Bl(t,Fl(r),{labelFetcher:d,labelDataIndex:f,defaultText:n},h);var p=t.getTextContent();if(p&&(Jk(p).ignore=p.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}!function(e,t,n){Ja(e).dataIndex=t,Ja(e).dataType=n}(t,o,null),t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function Zk(e,t,n,r,i,o){e.data?e.data.setItemGraphicEl(o,t):Ja(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:n,region:r&&r.option||{}}}function Kk(e,t,n,r,i){e.data||Ll({el:t,componentModel:i,itemName:n,itemTooltipOption:r.get("tooltip")})}function Yk(e,t,n,r,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var o=r.getModel("emphasis"),a=o.get("focus");return As(t,a,o.get("blurScope")),e.isGeo&&function(e,t,n){var r=Ja(e);r.componentMainType=t.mainType,r.componentIndex=t.componentIndex,r.componentHighDownName=n}(t,i,n),a}var $k=function(){function e(e){var t=new xr;this.uid=uc("ec_map_draw"),this._controller=new Nk(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new xr),t.add(this._svgGroup=new xr)}return e.prototype.draw=function(e,t,n,r,i){var o="geo"===e.mainType,a=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},(function(t){a||t.getHostGeoModel()!==e||(a=t.getData())}));var s=e.coordinateSystem,u=this._regionsGroup,l=this.group,c=s.getTransformInfo(),f=c.raw,d=c.roam;!u.childAt(0)||i?(l.x=d.x,l.y=d.y,l.scaleX=d.scaleX,l.scaleY=d.scaleY,l.dirty()):vl(l,d,e);var h=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,p={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:h,isGeo:o,transformInfoRaw:f};"geoJSON"===s.resourceType?this._buildGeoJSON(p):"geoSVG"===s.resourceType&&this._buildSVG(p),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,r)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=ue(),n=this._regionsGroup,r=e.transformInfoRaw,i=e.mapOrGeoModel,o=e.data,a=function(e){return[e[0]*r.scaleX+r.x,e[1]*r.scaleY+r.y]};n.removeAll(),R(e.geo.regions,(function(r){var s=r.name,u=i.getRegionModel(s),l=o?o.indexOfName(s):null,c=t.get(s),f=!!c;f||(c=t.set(s,new xr),n.add(c));var d=new Uu({segmentIgnoreThreshold:1,shape:{paths:[]}});c.add(d),f||(Zk(e,c,s,u,i,l),Kk(e,c,s,u,i),Yk(e,c,s,u,i)),R(r.geometries,(function(e){if("polygon"===e.type){for(var t=[],n=0;n-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(Ih);function tS(e){var t={};e.eachSeriesByType("map",(function(e){var n=e.getHostGeoModel(),r=n?"o"+n.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)})),R(t,(function(e,t){for(var n=function(e,t){var n={};return R(e,(function(e){e.each(e.mapDimension("value"),(function(t,r){var i="ec-"+e.getName(r);n[i]=n[i]||[],isNaN(t)||n[i].push(t)}))})),e[0].map(e[0].mapDimension("value"),(function(r,i){for(var o,a="ec-"+e[0].getName(i),s=0,u=1/0,l=-1/0,c=n[a].length,f=0;f1?(s.width=a,s.height=a/h):(s.height=a,s.width=a*h),s.y=o[1]-s.height/2,s.x=o[0]-s.width/2;else{var g=e.getBoxLayoutParams();g.aspect=h,s=ef(g,{width:f,height:d})}this.setViewRect(s.x,s.y,s.width,s.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}var fS=new(function(){function e(){this.dimensions=lS.prototype.dimensions}return e.prototype.create=function(e,t){var n=[];e.eachComponent("geo",(function(e,r){var i=e.get("map"),o=new lS(i+r,i,{nameMap:e.get("nameMap"),nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale")});o.zoomLimit=e.get("scaleLimit"),n.push(o),e.coordinateSystem=o,o.model=e,o.resize=cS,o.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}}));var r={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();r[t]=r[t]||[],r[t].push(e)}})),R(r,(function(e,r){var i=N(e,(function(e){return e.get("nameMap")})),o=new lS(r,r,{nameMap:O(i),nameProperty:e[0].get("nameProperty"),aspectScale:e[0].get("aspectScale")});o.zoomLimit=$.apply(null,N(e,(function(e){return e.get("scaleLimit")}))),n.push(o),o.resize=cS,o.resize(e[0],t),R(e,(function(e){e.coordinateSystem=o,function(e,t){R(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}(o,e)}))})),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),o=ue(),a=0;a=0;){var o=t[n];o.hierNode.prelim+=r,o.hierNode.modifier+=r,i+=o.hierNode.change,r+=o.hierNode.shift+i}}(e);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-o):e.hierNode.prelim=o}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=function(e,t,n,r){if(t){for(var i=e,o=e,a=o.parentNode.children[0],s=t,u=i.hierNode.modifier,l=o.hierNode.modifier,c=a.hierNode.modifier,f=s.hierNode.modifier;s=wS(s),o=xS(o),s&&o;){i=wS(i),a=xS(a),i.hierNode.ancestor=e;var d=s.hierNode.prelim+f-o.hierNode.prelim-l+r(s,o);d>0&&(kS(_S(s,e,n),e,d),l+=d,u+=d),f+=s.hierNode.modifier,l+=o.hierNode.modifier,u+=i.hierNode.modifier,c+=a.hierNode.modifier}s&&!wS(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-u),o&&!xS(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=l-c,n=e)}return n}(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function vS(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function mS(e){return arguments.length?e:SS}function bS(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function wS(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function xS(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function _S(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function kS(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function SS(e,t){return e.parentNode===t.parentNode?1:2}var TS=function(){this.parentPoint=[],this.childPoints=[]},CS=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new TS},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,o=n[0],a=n[r-1];if(1===r)return e.moveTo(i[0],i[1]),void e.lineTo(o[0],o[1]);var s=t.orient,u="TB"===s||"BT"===s?0:1,l=1-u,c=Or(t.forkPosition,1),f=[];f[u]=i[u],f[l]=i[l]+(a[l]-i[l])*c,e.moveTo(i[0],i[1]),e.lineTo(f[0],f[1]),e.moveTo(o[0],o[1]),f[u]=o[u],e.lineTo(f[0],f[1]),f[u]=a[u],e.lineTo(f[0],f[1]),e.lineTo(a[0],a[1]);for(var d=1;dm.x)||(w-=Math.PI);var k=x?"left":"right",S=s.getModel("label"),T=S.get("rotate"),C=T*(Math.PI/180),A=y.getTextContent();A&&(y.setTextConfig({position:S.get("position")||k,rotation:null==T?-w:C,origin:"center"}),A.setStyle("verticalAlign","middle"))}var O=s.get(["emphasis","focus"]),M="ancestor"===O?a.getAncestorsIndices():"descendant"===O?a.getDescendantIndices():null;M&&(Ja(n).focus=M),function(e,t,n,r,i,o,a,s){var u=t.getModel(),l=e.get("edgeShape"),c=e.get("layout"),f=e.getOrient(),d=e.get(["lineStyle","curveness"]),h=e.get("edgeForkPosition"),p=u.getModel("lineStyle").getLineStyle(),g=r.__edge;if("curve"===l)t.parentNode&&t.parentNode!==n&&(g||(g=r.__edge=new Fu({shape:ES(c,f,d,i,i)})),vl(g,{shape:ES(c,f,d,o,a)},e));else if("polyline"===l)if("orthogonal"===c){if(t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var y=t.children,v=[],m=0;mt&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}();var HS=function(){function e(e){this.type="tree",this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;no&&(o=e.depth)}));var a=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:o;return i.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=a})),i.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],o=r.getNodeByDataIndex(e),a=o.getValue(),s=o.name;o&&o!==i;)s=o.parentNode.name+"."+s,o=o.parentNode;return fh("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},t.type="series.tree",t.layoutMode="box",t.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(Ih);function GS(e,t){for(var n,r=[e];n=r.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var o=i.length-1;o>=0;o--)r.push(i[o])}}function JS(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var n=function(e,t){return ef(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=n;var r=e.get("layout"),i=0,o=0,a=null;"radial"===r?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,a=mS((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(i=n.width,o=n.height,a=mS());var s=e.getData().tree.root,u=s.children[0];if(u){!function(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,r,i=[t];n=i.pop();)if(r=n.children,n.isExpand&&r.length)for(var o=r.length-1;o>=0;o--){var a=r[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(s),function(e,t,n){for(var r,i=[e],o=[];r=i.pop();)if(o.push(r),r.isExpand){var a=r.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=e),e.depth>f.depth&&(f=e)}));var d=l===c?1:a(l,c)/2,h=d-l.getLayout().x,p=0,g=0,y=0,v=0;if("radial"===r)p=i/(c.getLayout().x+d+h),g=o/(f.depth-1||1),GS(u,(function(e){y=(e.getLayout().x+h)*p,v=(e.depth-1)*g;var t=bS(y,v);e.setLayout({x:t.x,y:t.y,rawX:y,rawY:v},!0)}));else{var m=e.getOrient();"RL"===m||"LR"===m?(g=o/(c.getLayout().x+d+h),p=i/(f.depth-1||1),GS(u,(function(e){v=(e.getLayout().x+h)*g,y="LR"===m?(e.depth-1)*p:i-(e.depth-1)*p,e.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(p=i/(c.getLayout().x+d+h),g=o/(f.depth-1||1),GS(u,(function(e){y=(e.getLayout().x+h)*p,v="TB"===m?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:y,y:v},!0)})))}}}(e,t)}))}function XS(e){e.eachSeriesByType("tree",(function(e){var t=e.getData();t.tree.eachNode((function(e){var n=e.getModel().getModel("itemStyle").getItemStyle();M(t.ensureUniqueItemVisual(e.dataIndex,"style"),n)}))}))}function WS(e,t,n){if(e&&I(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if("string"===typeof i&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var o=e.targetNodeId;if(null!=o&&(i=r.getNodeById(o)))return{node:i}}}function qS(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function ZS(e,t){return I(qS(e),t)>=0}function KS(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var YS=function(){},$S=["treemapZoomToNode","treemapRender","treemapMove"];function QS(e){var t=e.getData().tree,n={};t.eachNode((function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=Ef(e.ecModel,r.name||r.dataIndex+"",n);t.setVisual("decal",i)}))}var eT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return a(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};!function e(t){var n=0;R(t.children,(function(t){e(t);var r=t.value;H(r)&&(r=r[0]),n+=r}));var r=t.value;H(r)&&(r=r[0]);(null==r||isNaN(r))&&(r=n);r<0&&(r=0);H(t.value)?t.value[0]=r:t.value=r}(n);var r=e.levels||[],i=this.designatedVisualItemStyle={},o=new ac({itemStyle:i},this,t),a=N((r=e.levels=function(e,t){var n,r,i=Jr(t.get("color")),o=Jr(t.get(["aria","decal","decals"]));if(!i)return;R(e=e||[],(function(e){var t=new ac(e),i=t.get("color"),o=t.get("decal");(t.get(["itemStyle","color"])||i&&"none"!==i)&&(n=!0),(t.get(["itemStyle","decal"])||o&&"none"!==o)&&(r=!0)}));var a=e[0]||(e[0]={});n||(a.color=i.slice());!r&&o&&(a.decal=o.slice());return e}(r,t))||[],(function(e){return new ac(e,o,t)}),this),s=HS.createTree(n,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=s.getNodeByDataIndex(t),r=a[n.depth];return e.parentModel=r||o,e}))}));return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return fh("nameValue",{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=KS(r,this),n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},M(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=ue(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){QS(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(Ih);function tT(e,t,n,r,i,o){var a=[[i?e:e-5,t],[e+n,t],[e+n,t+r],[i?e:e-5,t+r]];return!o&&a.splice(2,0,[e+n+5,t+r/2]),!i&&a.push([e,t+r/2]),a}function nT(e,t,n){Ja(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&KS(n,t)}}var rT=function(){function e(e){this.group=new xr,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),i.get("show")&&n){var a=i.getModel("itemStyle"),s=a.getModel("textStyle"),u={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,u,s),this._renderContent(e,u,a,s,r),tf(o,u.pos,u.box)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=$r(r.getModel().get("name"),""),o=n.getTextRect(i),a=Math.max(o.width+16,t.emptyItemWidth);t.totalWidth+=a+8,t.renderList.push({node:r,text:i,width:a})}},e.prototype._renderContent=function(e,t,n,r,i){for(var o=0,a=t.emptyItemWidth,s=e.get(["breadcrumb","height"]),u=function(e,t,n){var r=t.width,i=t.height,o=Or(e.left,r),a=Or(e.top,i),s=Or(e.right,r),u=Or(e.bottom,i);return(isNaN(o)||isNaN(parseFloat(e.left)))&&(o=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=r),(isNaN(a)||isNaN(parseFloat(e.top)))&&(a=0),(isNaN(u)||isNaN(parseFloat(e.bottom)))&&(u=i),n=Fc(n||0),{width:Math.max(s-o-n[1]-n[3],0),height:Math.max(u-a-n[0]-n[2],0)}}(t.pos,t.box),l=t.totalWidth,c=t.renderList,f=c.length-1;f>=0;f--){var d=c[f],h=d.node,p=d.width,g=d.text;l>u.width&&(l-=p-a,p=a,g=null);var y=new Au({shape:{points:tT(o,0,p,s,f===c.length-1,0===f)},style:E(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ga({style:{text:g,fill:r.getTextColor(),font:r.getFont()}}),textConfig:{position:"inside"},z2:1e5,onclick:V(i,h)});y.disableLabelAnimation=!0,this.group.add(y),nT(y,e,h),o+=p+8}},e.prototype.remove=function(){this.group.removeAll()},e}(),iT=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){--t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var i=r.getLayout();if(!i)return;var o=new _n(i.x,i.y,i.width,i.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];dt(s,s,[-(t-=a.x),-(n-=a.y)]),pt(s,s,[e.scale,e.scale]),dt(s,s,[t,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",(function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if("zoomToNode"===n)t._zoomToNode(r);else if("link"===n){var o=i.hostTree.data.getItemModel(i.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&qc(a,s)}}}}}),this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new rT(this.group))).render(e,t,n.node,(function(t){"animating"!==r._state&&(ZS(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))}))},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(r){var i=this._storage.background[r.getRawIndex()];if(i){var o=i.transformCoordToLocal(e,t),a=i.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:r,offsetX:o[0],offsetY:o[1]}}}),this),n},t.type="treemap",t}(Gh),fT=R,dT=W,hT=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=C(t);this.type=r,this.mappingMethod=n,this._normalizeData=kT[n];var o=e.visualHandlers[r];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(pT(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,R(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(fT(t,(function(e,t){n[e]=t})),!H(r)){var i=[];W(r)?fT(r,(function(e,t){var r=n[t];i[null!=r?r:-1]=e})):i[-1]=r,r=_T(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(i):pT(i,!0):(re("linear"!==n||i.dataExtent),pT(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return z(this._normalizeData,this)},e.listVisualTypes=function(){return F(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){W(e)?R(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=H(t)?[]:W(t)?{}:(i=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a})),o},e.retrieveVisuals=function(t){var n,r={};return t&&fT(e.visualHandlers,(function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(H(e))e=e.slice();else{if(!dT(e))return[];var t=[];fT(e,(function(e,n){t.push(n)})),e=t}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,a=t.length;ol[1]&&(l[1]=u);var c=t.get("colorMappingBy"),f={type:a.name,dataExtent:l,visual:a.range};"color"!==f.type||"index"!==c&&"id"!==c?f.mappingMethod="linear":(f.mappingMethod="category",f.loop=!0);var d=new TT(f);return CT(d).drColorMappingBy=c,d}(0,o,a,0,c,p);R(p,(function(t,n){if(t.depth>=r.length||t===r[t.depth]){var a=function(e,t,n,r,i,o){var a=M({},t);if(i){var s=i.type,u="color"===s&&CT(i).drColorMappingBy,l="index"===u?r:"id"===u?o.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=i.mapValueToVisual(l)}return a}(o,c,t,n,g,i);e(t,a,r,i)}}))}else u=OT(c),f.fill=u}(t,{},e.getViewRoot().getAncestors(),e)}};function OT(e){var t=MT(e,"color");if(t){var n=MT(e,"colorAlpha"),r=MT(e,"colorSaturation");return r&&(t=Xt(t,null,null,r)),n&&(t=Wt(t,n)),t}}function MT(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function ET(e,t){var n=e.get(t);return H(n)&&n.length?{name:t,range:n}:null}var PT=Math.max,IT=Math.min,DT=$,LT=R,RT=["itemStyle","borderWidth"],NT=["itemStyle","gapWidth"],jT=["upperLabel","show"],BT=["upperLabel","height"],FT={seriesType:"treemap",reset:function(e,t,n,r){var i=n.getWidth(),o=n.getHeight(),a=e.option,s=ef(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),u=a.size||[],l=Or(DT(s.width,u[0]),i),c=Or(DT(s.height,u[1]),o),f=r&&r.type,d=WS(r,["treemapZoomToNode","treemapRootToNode"],e),h="treemapRender"===f||"treemapMove"===f?r.rootRect:null,p=e.getViewRoot(),g=qS(p);if("treemapMove"!==f){var y="treemapZoomToNode"===f?function(e,t,n,r,i){var o,a=(t||{}).node,s=[r,i];if(!a||a===n)return s;var u=r*i,l=u*e.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var c=0,f=o.children,d=0,h=f.length;d9007199254740991&&(l=9007199254740991),a=o}la[1]&&(a[1]=t)}))):a=[NaN,NaN];return{sum:r,dataExtent:a}}(t,a,s);if(0===l.sum)return e.viewChildren=[];if(l.sum=function(e,t,n,r,i){if(!r)return n;for(var o=e.get("visibleMin"),a=i.length,s=a,u=a-1;u>=0;u--){var l=i["asc"===r?a-u-1:u].getValue();l/n*tr&&(r=a));var u=e.area*e.area,l=t*t*n;return u?PT(l*r/u,u/(l*i)):1/0}function VT(e,t,n,r,i){var o=t===n.width?0:1,a=1-o,s=["x","y"],u=["width","height"],l=n[s[o]],c=t?e.area/t:0;(i||c>n[u[a]])&&(c=n[u[a]]);for(var f=0,d=e.length;fr&&(r=t);var o=r%2?r+2:r+3;i=[];for(var a=0;a0&&(v[0]=-v[0],v[1]=-v[1]);var b=y[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var w=-Math.atan2(y[1],y[0]);u[0].8?"left":l[0]<-.8?"right":"center",f=l[1]>.8?"top":l[1]<-.8?"bottom":"middle";break;case"start":n.x=-l[0]*h+s[0],n.y=-l[1]*p+s[1],c=l[0]>.8?"right":l[0]<-.8?"left":"center",f=l[1]>.8?"bottom":l[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=h*b+s[0],n.y=s[1]+x,c=y[0]<0?"right":"left",n.originX=-h*b,n.originY=-x;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=m[0],n.y=m[1]+x,c="center",n.originY=-x;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-h*b+u[0],n.y=u[1]+x,c=y[0]>=0?"right":"left",n.originX=h*b,n.originY=-x}n.scaleX=n.scaleY=r,n.setStyle({verticalAlign:n.__verticalAlign||f,align:n.__align||c})}}}function _(e,t){var n=e.__specifiedRotation;if(null==n){var r=o.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(xr);function _C(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["emphasis","lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),labelStatesModels:Fl(t)}}function kC(e){return isNaN(e[0])||isNaN(e[1])}function SC(e){return!kC(e[0])&&!kC(e[1])}var TC=function(){function e(e){this.group=new xr,this._LineCtor=e||xC}return e.prototype.isPersistent=function(){return!0},e.prototype.updateData=function(e){var t=this,n=this.group,r=this._lineData;this._lineData=e,r||n.removeAll();var i=_C(e);e.diff(r).add((function(n){t._doAdd(e,n,i)})).update((function(n,o){t._doUpdate(r,e,o,n,i)})).remove((function(e){n.remove(r.getItemGraphicEl(e))})).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=_C(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var r=e.start;r=0?r+=l:r-=l:p>=0?r-=l:r+=l}return r}function DC(e,t){var n=[],r=po,i=[[],[],[]],o=[[],[]],a=[];t/=2,e.eachEdge((function(e,s){var u=e.getLayout(),l=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");u.__original||(u.__original=[ve(u[0]),ve(u[1])],u[2]&&u.__original.push(ve(u[2])));var f=u.__original;if(null!=u[2]){if(ye(i[0],f[0]),ye(i[1],f[2]),ye(i[2],f[1]),l&&"none"!==l){var d=rC(e.node1),h=IC(i,f[0],d*t);r(i[0][0],i[1][0],i[2][0],h,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],h,n),i[0][1]=n[3],i[1][1]=n[4]}if(c&&"none"!==c){d=rC(e.node2),h=IC(i,f[1],d*t);r(i[0][0],i[1][0],i[2][0],h,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],h,n),i[1][1]=n[1],i[2][1]=n[2]}ye(u[0],i[0]),ye(u[1],i[2]),ye(u[2],i[1])}else{if(ye(o[0],f[0]),ye(o[1],f[1]),we(a,o[1],o[0]),Se(a,a),l&&"none"!==l){d=rC(e.node1);be(o[0],o[0],a,d*t)}if(c&&"none"!==c){d=rC(e.node2);be(o[1],o[1],a,-d*t)}ye(u[0],o[0]),ye(u[1],o[1])}}))}function LC(e){return"view"===e.type}var RC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.init=function(e,t){var n=new Nb,r=new TC,i=this.group;this._controller=new Nk(t.getZr()),this._controllerHost={target:i},i.add(n.group),i.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=e.coordinateSystem;this._model=e;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(LC(i)){var u={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?s.attr(u):vl(s,u,e)}DC(e.getGraph(),nC(e));var l=e.getData();o.updateData(l);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var f=e.forceLayout,d=e.get(["force","layoutAnimation"]);f&&this._startForceLayoutIteration(f,d),l.graph.eachNode((function(e){var t=e.dataIndex,n=e.getGraphicEl(),i=e.getModel();n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",(function(){f&&(f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,d),f.setFixed(t),l.setItemLayout(t,[n.x,n.y]))})).on("dragend",(function(){f&&f.setUnfixed(t)})),n.setDraggable(o&&!!f),"adjacency"===i.get(["emphasis","focus"])&&(Ja(n).focus=e.getAdjacentDataIndices())})),l.graph.eachEdge((function(e){var t=e.getGraphicEl();"adjacency"===e.getModel().get(["emphasis","focus"])&&(Ja(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})}));var h="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),p=l.getLayout("cx"),g=l.getLayout("cy");l.eachItemGraphicEl((function(e,t){var n=l.getItemModel(t).get(["label","rotate"])||0,r=e.getSymbolPath();if(h){var i=l.getItemLayout(t),o=Math.atan2(i[1]-g,i[0]-p);o<0&&(o=2*Math.PI+o);var a=i[0]=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof BC||(t=this._nodesMap[NC(t)]),t){for(var i="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(i=0,o=r.length;i=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}D(BC,zC("hostGraph","data")),D(FC,zC("hostGraph","edgeData"));var VC=jC;function HC(e,t,n,r,i){for(var o=new VC(r),a=0;a "+d)),l++)}var h,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)h=Ab(e,n);else{var g=zf.get(p),y=g&&g.dimensions||[];I(y,"value")<0&&y.concat(["value"]);var v=xb(e,{coordDimensions:y});(h=new mb(v,n)).initData(e)}var m=new mb(["value"],n);return m.initData(u,s),i&&i(h,m),zS({mainData:h,struct:o,structAttr:"graph",datas:{node:h,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var UC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return a(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new rx(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),Xr(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n,r=e.edges||e.links||[],i=e.data||e.nodes||[],o=this;if(i&&r){WT(n=this)&&(n.__curvenessList=[],n.__edgeMap={},qT(n));var a=HC(i,r,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e){var t=o._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var n=ac.prototype.getModel;function r(e,t){var r=n.call(this,e,t);return r.resolveParentPath=i,r}function i(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",(function(e){return e.resolveParentPath=i,e.getModel=r,e}))}));return R(a.edges,(function(e){!function(e,t,n,r){if(WT(n)){var i=ZT(e,t,n),o=n.__edgeMap,a=o[KT(i)];o[i]&&!a?o[i].isForward=!0:a&&o[i]&&(a.isForward=!0,o[i].isForward=!1),o[i]=o[i]||[],o[i].push(r)}}(e.node1,e.node2,this,e.dataIndex)}),this),a.data}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var r=this.getData(),i=this.getDataParams(e,n),o=r.graph.getEdgeByIndex(e),a=r.getName(o.node1.dataIndex),s=r.getName(o.node2.dataIndex),u=[];return null!=a&&u.push(a),null!=s&&u.push(s),fh("nameValue",{name:u.join(" > "),value:i.value,noValue:null==i.value})}return xh({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=N(this.option.categories||[],(function(e){return null!=e.value?e:M({value:0},e)})),t=new mb(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e)}))},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Ih),GC={type:"graphRoam",event:"graphRoam",update:"none"};var JC=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},XC=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return a(t,e),t.prototype.getDefaultShape=function(){return new JC},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,o=t.width,a=t.angle,s=t.x-n(a)*o*(o>=i/3?1:2),u=t.y-r(a)*o*(o>=i/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,u),e.lineTo(t.x+n(a)*o,t.y+r(a)*o),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(a)*o,t.y-r(a)*o),e.lineTo(s,u)},t}(ma);function WC(e,t){var n=null==e?"":e+"";return t&&("string"===typeof t?n=t.replace("{value}",n):"function"===typeof t&&(n=t(e))),n}var qC=2*Math.PI,ZC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get(["axisLine","lineStyle","color"]),i=function(e,t){var n=e.get("center"),r=t.getWidth(),i=t.getHeight(),o=Math.min(r,i);return{cx:Or(n[0],t.getWidth()),cy:Or(n[1],t.getHeight()),r:Or(e.get("radius"),o/2)}}(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){for(var o=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,u=-e.get("endAngle")/180*Math.PI,l=e.getModel("axisLine"),c=l.get("roundCap")?Mw:bu,f=l.get("show"),d=l.getModel("lineStyle"),h=d.get("width"),p=(u-s)%qC||u===s?(u-s)%qC:qC,g=s,y=0;f&&y=e&&(0===t?0:r[t-1][0]).8?"bottom":"middle",align:l<-.4?"left":l>.4?"right":"center"},{inheritColor:L}),silent:!0}))}if(m.get("show")&&E!==w){I=(I=m.get("distance"))?I+u:u;for(var R=0;R<=x;R++){l=Math.cos(S),c=Math.sin(S);var N=new Lu({shape:{x1:l*(p-I)+d,y1:c*(p-I)+h,x2:l*(p-k-I)+d,y2:c*(p-k-I)+h},silent:!0,style:O});"auto"===O.stroke&&N.setStyle({stroke:r((E+R/x)/w)}),f.add(N),S+=C}S-=C}else S+=T}},t.prototype._renderPointer=function(e,t,n,r,i,o,a,s,u){var l=this.group,c=this._data,f=this._progressEls,d=[],h=e.get(["pointer","show"]),p=e.getModel("progress"),g=p.get("show"),y=e.getData(),v=y.mapDimension("value"),m=+e.get("min"),b=+e.get("max"),w=[m,b],x=[o,a];function _(t,n){var r,o=y.getItemModel(t).getModel("pointer"),a=Or(o.get("width"),i.r),s=Or(o.get("length"),i.r),u=e.get(["pointer","icon"]),l=o.get("offsetCenter"),c=Or(l[0],i.r),f=Or(l[1],i.r),d=o.get("keepAspect");return(r=u?Tg(u,c-a/2,f-s,a,s,null,d):new XC({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:f}})).rotation=-(n+Math.PI/2),r.x=i.cx,r.y=i.cy,r}function k(e,t){var n=p.get("roundCap")?Mw:bu,r=p.get("overlap"),a=r?p.get("width"):u/y.count(),l=r?i.r-a:i.r-(e+1)*a,c=r?i.r:i.r-e*a,f=new n({shape:{startAngle:o,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:c}});return r&&(f.z2=b-y.get(v,e)%b),f}(g||h)&&(y.diff(c).add((function(t){if(h){var n=_(t,o);ml(n,{rotation:-(Ar(y.get(v,t),w,x,!0)+Math.PI/2)},e),l.add(n),y.setItemGraphicEl(t,n)}if(g){var r=k(t,o),i=p.get("clip");ml(r,{shape:{endAngle:Ar(y.get(v,t),w,x,i)}},e),l.add(r),d[t]=r}})).update((function(t,n){if(h){var r=c.getItemGraphicEl(n),i=r?r.rotation:o,a=_(t,i);a.rotation=i,vl(a,{rotation:-(Ar(y.get(v,t),w,x,!0)+Math.PI/2)},e),l.add(a),y.setItemGraphicEl(t,a)}if(g){var s=f[n],u=k(t,s?s.shape.endAngle:o),m=p.get("clip");vl(u,{shape:{endAngle:Ar(y.get(v,t),w,x,m)}},e),l.add(u),d[t]=u}})).execute(),y.each((function(e){var t=y.getItemModel(e),n=t.getModel("emphasis");if(h){var i=y.getItemGraphicEl(e),o=y.getItemVisual(e,"style"),a=o.fill;if(i instanceof Ta){var s=i.style;i.useStyle(M({image:s.image,x:s.x,y:s.y,width:s.width,height:s.height},o))}else i.useStyle(o),"pointer"!==i.type&&i.setColor(a);i.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===i.style.fill&&i.setStyle("fill",r(Ar(y.get(v,e),w,[0,1],!0))),i.z2EmphasisLift=0,Ps(i,t),As(i,n.get("focus"),n.get("blurScope"))}if(g){var u=d[e];u.useStyle(y.getItemVisual(e,"style")),u.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),u.z2EmphasisLift=0,Ps(u,t),As(u,n.get("focus"),n.get("blurScope"))}})),this._progressEls=d)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),i=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=Tg(i,t.cx-r/2+Or(o[0],t.r),t.cy-r/2+Or(o[1],t.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var o=this,a=e.getData(),s=a.mapDimension("value"),u=+e.get("min"),l=+e.get("max"),c=new xr,f=[],d=[],h=e.isAnimationEnabled();a.diff(this._data).add((function(e){f[e]=new Ga({silent:!0}),d[e]=new Ga({silent:!0})})).update((function(e,t){f[e]=o._titleEls[t],d[e]=o._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),o=a.get(s,t),p=new xr,g=r(Ar(o,[u,l],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var v=y.get("offsetCenter"),m=i.cx+Or(v[0],i.r),b=i.cy+Or(v[1],i.r);(A=f[t]).attr({style:zl(y,{x:m,y:b,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:g})}),p.add(A)}var w=n.getModel("detail");if(w.get("show")){var x=w.get("offsetCenter"),_=i.cx+Or(x[0],i.r),k=i.cy+Or(x[1],i.r),S=Or(w.get("width"),i.r),T=Or(w.get("height"),i.r),C=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:g,A=d[t],O=w.get("formatter");A.attr({style:zl(w,{x:_,y:k,text:WC(o,O),width:isNaN(S)?null:S,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:C})}),ql(A,{normal:w},o,(function(e){return WC(e,O)})),h&&Zl(A,t,a,e,{getFormattedLabel:function(e,t,n,r,i,a){return WC(a?a.interpolatedValue:o,O)}}),p.add(A)}c.add(p)})),this.group.add(c),this._titleEls=f,this._detailEls=d},t.type="gauge",t}(Gh),KC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n.useColorPaletteOnData=!0,n}return a(t,e),t.prototype.getInitialData=function(e,t){return nx(this,["value"])},t.type="series.gauge",t.defaultOption={zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(Ih);var YC=["itemStyle","opacity"],$C=function(e){function t(t,n){var r=e.call(this)||this,i=r,o=new Eu,a=new Ga;return i.setTextContent(a),r.setTextGuideLine(o),r.updateData(t,n,!0),r}return a(t,e),t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=e.getItemModel(t),o=e.getItemLayout(t),a=i.getModel("emphasis"),s=i.get(YC);s=null==s?1:s,this.useStyle(e.getItemVisual(t,"style")),this.style.lineJoin="round",n?(this.setShape({points:o.points}),this.style.opacity=0,ml(this,{style:{opacity:s}},r,t)):vl(this,{style:{opacity:s},shape:{points:o.points}},r,t),Ps(this,i),this._updateLabel(e,t),As(this,a.get("focus"),a.get("blurScope"))},t.prototype._updateLabel=function(e,t){var n=this.getTextGuideLine(),r=this.getTextContent(),i=e.hostModel,o=e.getItemModel(t),a=e.getItemLayout(t).label,s=e.getItemVisual(t,"style"),u=s.fill;Bl(r,Fl(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:s.opacity,defaultText:e.getName(t)},{normal:{align:a.textAlign,verticalAlign:a.verticalAlign}}),this.setTextConfig({local:!0,inside:!!a.inside,insideStroke:u,outsideFill:u});var l=a.linePoints;n.setShape({points:l}),this.textGuideLineConfig={anchor:l?new hn(l[0][0],l[0][1]):null},vl(r,{style:{x:a.x,y:a.y}},i,t),r.attr({rotation:a.rotation,originX:a.x,originY:a.y,z2:10}),Qp(this,eg(o),{stroke:u})},t}(Au),QC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return a(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,o=this.group;r.diff(i).add((function(e){var t=new $C(r,e);r.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),o.add(n),r.setItemGraphicEl(e,n)})).remove((function(t){xl(i.getItemGraphicEl(t),e,t)})).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Gh),eA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.useColorPaletteOnData=!0,n}return a(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new rx(z(this.getData,this),z(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return nx(this,{coordDimensions:["value"],encodeDefaulter:V(bf,this)})},t.prototype._defaultLabelLine=function(e){Xr(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return r.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,r.$vars.push("percent"),r},t.type="series.funnel",t.defaultOption={zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(Ih);function tA(e,t){e.eachSeriesByType("funnel",(function(e){var n=e.getData(),r=n.mapDimension("value"),i=e.get("sort"),o=function(e,t){return ef(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),a=e.get("orient"),s=o.width,u=o.height,l=function(e,t){for(var n=e.mapDimension("value"),r=e.mapArray(n,(function(e){return e})),i=[],o="ascending"===t,a=0,s=e.count();a5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&pA(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function pA(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var gA=dA,yA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&A(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){R(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];R(B(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(lf),vA=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.type=i||"value",a.axisIndex=o,a}return a(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(D_);function mA(e,t,n,r,i,o){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=wA(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var s=Math.abs(t[1]-t[0]);s=wA(s,[0,a]),i=o=wA(s,[i,o]),r=0}t[0]=wA(t[0],n),t[1]=wA(t[1],n);var u=bA(t,r);t[r]+=e;var l,c=i||0,f=n.slice();return u.sign<0?f[0]+=c:f[1]-=c,t[r]=wA(t[r],f),l=bA(t,r),null!=i&&(l.sign!==u.sign||l.spano&&(t[1-r]=t[r]+l.sign*o),t}function bA(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function wA(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var xA=R,_A=Math.min,kA=Math.max,SA=Math.floor,TA=Math.ceil,CA=Mr,AA=Math.PI;function OA(e,t){return _A(kA(e,t[0]),t[1])}function MA(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function EA(e,t){var n,r,i=t.layoutLength,o=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,u=t.winInnerIndices,l=s,c=!1;return e=n&&o<=n+t.axisLength&&a>=r&&a<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var r=n.getData();xA(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(r,r.mapDimension(e)),c_(t.scale,t.model)}),this)}}),this)},e.prototype.resize=function(e,t){this._rect=ef(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,r=["x","y"],i=["width","height"],o=t.get("layout"),a="horizontal"===o?0:1,s=n[i[a]],u=[0,s],l=this.dimensions.length,c=OA(t.get("axisExpandWidth"),u),f=OA(t.get("axisExpandCount")||0,[0,l]),d=t.get("axisExpandable")&&l>3&&l>f&&f>1&&c>0&&s>0,h=t.get("axisExpandWindow");h?(e=OA(h[1]-h[0],u),h[1]=h[0]+e):(e=OA(c*(f-1),u),(h=[c*(t.get("axisExpandCenter")||SA(l/2))-e/2])[1]=h[0]+e);var p=(s-e)/(l-f);p<3&&(p=0);var g=[SA(CA(h[0]/c,1))+1,TA(CA(h[1]/c,1))-1],y=p/c*h[0];return{layout:o,pixelDimIndex:a,layoutBase:n[r[a]],layoutLength:s,axisBase:n[r[1-a]],axisLength:n[i[1-a]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:p,axisExpandWindow:h,axisCount:l,winInnerIndices:g,axisExpandWindow0Pos:y}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each((function(e){var t=[0,r.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),xA(n,(function(t,n){var o=(r.axisExpandable?EA:MA)(n,r),a={horizontal:{x:o.position,y:r.axisLength},vertical:{x:0,y:o.position}},s={horizontal:AA/2,vertical:0},u=[a[i].x+e.x,a[i].y+e.y],l=s[i],c=[1,0,0,1,0,0];ht(c,c,l),dt(c,c,u),this._axesLayout[t]={position:u,rotation:l,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){null==n&&(n=0),null==r&&(r=e.count());var i=this._axesMap,o=this.dimensions,a=[],s=[];R(o,(function(t){a.push(e.mapDimension(t)),s.push(i.get(t).model)}));for(var u=this.hasAxisBrushed(),l=n;li*(1-c[0])?(u="jump",a=s-i*(1-c[2])):(a=s-i*c[1])>=0&&(a=s-i*(1-c[1]))<=0&&(a=0),(a*=t.axisExpandWidth/l)?mA(a,r,o,"all"):u="none";else{var d=r[1]-r[0];(r=[kA(0,o[1]*s/d-d/2)])[1]=_A(o[1],r[0]+d),r[0]=r[1]-d}return{axisExpandWindow:r,behavior:u}},e}();var IA={create:function(e,t){var n=[];return e.eachComponent("parallel",(function(r,i){var o=new PA(r,e,t);o.name="parallel_"+i,o.resize(r,t),r.coordinateSystem=o,o.model=r,n.push(o)})),e.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var t=e.getReferringComponents("parallel",ai).models[0];e.coordinateSystem=t.coordinateSystem}})),n}},DA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return a(t,e),t.prototype.getAreaSelectStyle=function(){return xi([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=C(e);if(t)for(var n=t.length-1;n>=0;n--)Er(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var r=0,i=t.length;r6}(e)||o){if(a&&!o){"single"===s.brushMode&&YA(e);var u=C(s);u.brushType=pO(u.brushType,a),u.panelId=!0===a?null:a.panelId,o=e._creatingCover=UA(e,u),e._covers.push(o)}if(o){var l=vO[pO(e._brushType,a)];o.__brushOption.range=l.getCreatingRange(cO(e,o,e._track)),r&&(GA(e,o),l.updateCommon(e,o)),JA(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&ZA(e,t,n)&&YA(e)&&(i={isEnd:r,removeOnClick:!0});return i}function pO(e,t){return"auto"===e?t.defaultBrushType:e}var gO={mousedown:function(e){if(this._dragging)yO(this,e);else if(!e.target||!e.target.draggable){fO(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=ZA(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,i=e._covers,o=ZA(e,t,n);if(!e._dragging)for(var a=0;a=0&&(o[i[a].depth]=new ac(i[a],this,t));if(r&&n)return HC(r,n,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,o=n.levelModels[i];o&&(e.parentModel=o)}return e})),t.wrapMethod("getItemModel",(function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,o=n.levelModels[i];o&&(e.parentModel=o)}return e}))})).data},t.prototype.setNodePosition=function(e,t){var n=this.option.data[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||null==e}if("edge"===n){var i=this.getDataParams(e,n),o=i.data,a=i.value;return fh("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:r(a)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,u=this.getDataParams(e,n).data.name;return fh("nameValue",{name:null!=u?u+"":null,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){this.option},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(null==r.value&&"node"===n){var i=this.getGraph().getNodeByIndex(t).getLayout().value;r.value=i}return r},t.type="series.sankey",t.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(Ih);function DO(e,t){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),r=e.get("nodeGap"),i=function(e,t){return ef(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=i;var o=i.width,a=i.height,s=e.getGraph(),u=s.nodes,l=s.edges;!function(e){R(e,(function(e){var t=UO(e.outEdges,HO),n=UO(e.inEdges,HO),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)}))}(u),function(e,t,n,r,i,o,a,s,u){(function(e,t,n,r,i,o,a){for(var s=[],u=[],l=[],c=[],f=0,d=0;d=0;v&&y.depth>h&&(h=y.depth),g.setLayout({depth:v?y.depth:f},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mf-1?h:f-1;a&&"left"!==a&&function(e,t,n,r){if("right"===t){for(var i=[],o=e,a=0;o.length;){for(var s=0;s0;o--)NO(s,u*=.99,a),RO(s,i,n,r,a),GO(s,u,a),RO(s,i,n,r,a)}(e,t,o,i,r,a,s),function(e,t){var n="vertical"===t?"x":"y";R(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]}))})),R(e,(function(e){var t=0,n=0;R(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),R(e.inEdges,(function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy}))}))}(e,s)}(u,l,n,r,o,a,0!==B(u,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))}function LO(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function RO(e,t,n,r,i){var o="vertical"===i?"x":"y";R(e,(function(e){var a,s,u;e.sort((function(e,t){return e.getLayout()[o]-t.getLayout()[o]}));for(var l=0,c=e.length,f="vertical"===i?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+u,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),l=s.getLayout()[o]+s.getLayout()[f]+t;if((u=l-t-("vertical"===i?r:n))>0){a=s.getLayout()[o]-u,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0),l=a;for(d=c-2;d>=0;--d)(u=(s=e[d]).getLayout()[o]+s.getLayout()[f]+t-l)>0&&(a=s.getLayout()[o]-u,"vertical"===i?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),l=s.getLayout()[o]}}))}function NO(e,t,n){R(e.slice().reverse(),(function(e){R(e,(function(e){if(e.outEdges.length){var r=UO(e.outEdges,jO,n)/UO(e.outEdges,HO);if(isNaN(r)){var i=e.outEdges.length;r=i?UO(e.outEdges,BO,n)/i:0}if("vertical"===n){var o=e.getLayout().x+(r-VO(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(r-VO(e,n))*t;e.setLayout({y:a},!0)}}}))}))}function jO(e,t){return VO(e.node2,t)*e.getValue()}function BO(e,t){return VO(e.node2,t)}function FO(e,t){return VO(e.node1,t)*e.getValue()}function zO(e,t){return VO(e.node1,t)}function VO(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function HO(e){return e.getValue()}function UO(e,t,n){for(var r=0,i=e.length,o=-1;++or&&(r=t)})),R(t,(function(t){var i=new TT({type:"color",mappingMethod:"linear",dataExtent:[n,r],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),o=t.getModel().get(["itemStyle","color"]);null!=o?(t.setVisual("color",o),t.setVisual("style",{fill:o})):(t.setVisual("color",i),t.setVisual("style",{fill:i}))}))}}))}var XO=function(){function e(){}return e.prototype.getInitialData=function(e,t){var n,r,i=t.getComponent("xAxis",this.get("xAxisIndex")),o=t.getComponent("yAxis",this.get("yAxisIndex")),a=i.get("type"),s=o.get("type");"category"===a?(e.layout="horizontal",n=i.getOrdinalMeta(),r=!0):"category"===s?(e.layout="vertical",n=o.getOrdinalMeta(),r=!0):e.layout=e.layout||"horizontal";var u=["x","y"],l="horizontal"===e.layout?0:1,c=this._baseAxisDim=u[l],f=u[1-l],d=[i,o],h=d[l].get("type"),p=d[1-l].get("type"),g=e.data;if(g&&r){var y=[];R(g,(function(e,t){var n;H(e)?(n=e.slice(),e.unshift(t)):H(e.value)?(n=e.value.slice(),e.value.unshift(t)):n=e,y.push(n)})),e.data=y}var v=this.defaultValueDimensions,m=[{name:c,type:Wm(h),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:Wm(p),dimsDef:v.slice()}];return nx(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:V(mf,m,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),WO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return a(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(Ih);D(WO,XO,!0);var qO=WO,ZO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this.group,o=this._data;this._data||i.removeAll();var a="horizontal"===e.get("layout")?1:0;r.diff(o).add((function(e){if(r.hasValue(e)){var t=$O(r.getItemLayout(e),r,e,a,!0);r.setItemGraphicEl(e,t),i.add(t)}})).update((function(e,t){var n=o.getItemGraphicEl(t);if(r.hasValue(e)){var s=r.getItemLayout(e);n?QO(s,n,r,e):n=$O(s,r,e,a),i.add(n),r.setItemGraphicEl(e,n)}else i.remove(n)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=r},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},t.type="boxplot",t}(Gh),KO=function(){},YO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return a(t,e),t.prototype.getDefaultShape=function(){return new KO},t.prototype.buildPath=function(e,t){var n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();rg){var w=[v,b];r.push(w)}}}return{boxData:n,outliers:r}}(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var aM=["color","borderColor"],sM=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout("isSimpleBox"),o=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||r.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(o&&fM(s,a))return;var u=cM(a,n,!0);ml(u,{shape:{points:a.ends}},e,n),dM(u,t,n,i),r.add(u),t.setItemGraphicEl(n,u)}})).update((function(a,u){var l=n.getItemGraphicEl(u);if(t.hasValue(a)){var c=t.getItemLayout(a);o&&fM(s,c)?r.remove(l):(l?vl(l,{shape:{points:c.ends}},e,a):l=cM(c,a),dM(l,t,a,i),r.add(l),t.setItemGraphicEl(a,l))}else r.remove(l)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)})).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),yM(e,this.group);var t=e.get("clip",!0)?$b(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){for(var n,r=t.getData(),i=r.getLayout("isSimpleBox");null!=(n=e.next());){var o=cM(r.getItemLayout(n),n);dM(o,r,n,i),o.incremental=!0,this.group.add(o)}},t.prototype._incrementalRenderLarge=function(e,t){yM(t,this.group,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(Gh),uM=function(){},lM=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return a(t,e),t.prototype.getDefaultShape=function(){return new uM},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(ma);function cM(e,t,n){var r=e.ends;return new lM({shape:{points:n?hM(r,e):r},z2:100})}function fM(e,t){for(var n=!0,r=0;r0?"borderColor":"borderColor0"])||n.get(["itemStyle",e>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(aM);t.useStyle(o),t.style.fill=null,t.style.stroke=i}var mM=sM,bM=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return a(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Ih);D(bM,XO,!0);var wM=bM;function xM(e){e&&H(e.series)&&R(e.series,(function(e){W(e)&&"k"===e.type&&(e.type="candlestick")}))}var _M=["itemStyle","borderColor"],kM=["itemStyle","borderColor0"],SM=["itemStyle","color"],TM=["itemStyle","color0"],CM={seriesType:"candlestick",plan:Rh(),performRawSeries:!0,reset:function(e,t){function n(e,t){return t.get(e>0?SM:TM)}function r(e,t){return t.get(e>0?_M:kM)}e.getData();if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var i;null!=(i=e.next());){var o=t.getItemModel(i),a=t.getItemLayout(i).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=r(a,o)||s.fill,M(t.ensureUniqueItemVisual(i,"style"),s)}}}}},AM="undefined"!==typeof Float32Array?Float32Array:Array;function OM(e,t,n,r,i){return n>r?-1:n0?e.get(i,t-1)<=r?1:-1:1}var MM={seriesType:"candlestick",plan:Rh(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),r=function(e,t){var n,r=e.getBaseAxis(),i="category"===r.type?r.getBandWidth():(n=r.getExtent(),Math.abs(n[1]-n[0])/t.count()),o=Or(Q(e.get("barMaxWidth"),i),i),a=Or(Q(e.get("barMinWidth"),1),i),s=e.get("barWidth");return null!=s?Or(s,i):Math.max(Math.min(i/2,o),a)}(e,n),i=["x","y"],o=n.mapDimension(i[0]),a=n.mapDimensionsAll(i[1]),s=a[0],u=a[1],l=a[2],c=a[3];if(n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),!(null==o||a.length<4))return{progress:e.pipelineContext.large?function(e,n){var r,i,a=new AM(4*e.count),f=0,d=[],h=[];for(;null!=(i=e.next());){var p=n.get(o,i),g=n.get(s,i),y=n.get(u,i),v=n.get(l,i),m=n.get(c,i);isNaN(p)||isNaN(v)||isNaN(m)?(a[f++]=NaN,f+=3):(a[f++]=OM(n,i,g,y,u),d[0]=p,d[1]=v,r=t.dataToPoint(d,null,h),a[f++]=r?r[0]:NaN,a[f++]=r?r[1]:NaN,d[1]=m,r=t.dataToPoint(d,null,h),a[f++]=r?r[1]:NaN)}n.setLayout("largePoints",a)}:function(e,n){var i;for(;null!=(i=e.next());){var a=n.get(o,i),f=n.get(s,i),d=n.get(u,i),h=n.get(l,i),p=n.get(c,i),g=Math.min(f,d),y=Math.max(f,d),v=_(g,a),m=_(y,a),b=_(h,a),w=_(p,a),x=[];k(x,m,0),k(x,v,1),x.push(T(w),T(m),T(b),T(v)),n.setItemLayout(i,{sign:OM(n,i,f,d,u),initBaseline:f>d?m[1]:v[1],ends:x,brushRect:S(h,p,a)})}function _(e,n){var r=[];return r[0]=n,r[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function k(e,t,n){var i=t.slice(),o=t.slice();i[0]=gl(i[0]+r/2,1,!1),o[0]=gl(o[0]-r/2,1,!0),n?e.push(i,o):e.push(o,i)}function S(e,t,n){var i=_(e,n),o=_(t,n);return i[0]-=r/2,o[0]-=r/2,{x:i[0],y:i[1],width:r,height:o[1]-i[1]}}function T(e){return e[0]=gl(e[0],1),e}}}}};function EM(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}var PM=function(e){function t(t,n){var r=e.call(this)||this,i=new Ib(t,n),o=new xr;return r.add(i),r.add(o),r.updateData(t,n),r}return a(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=this.childAt(1),i=0;i<3;i++){var o=Tg(t,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var a=-i/3*e.period+e.effectOffset;o.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(a).start(),o.animateStyle(!0).when(e.period,{opacity:0}).delay(a).start(),r.add(o)}EM(r,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),r=["symbolType","period","rippleScale"],i=0;i0&&(a=this._getLineLength(r)/u*1e3),(a!==this._period||s!==this._loop)&&(r.stopAnimation(),a>0)){var c=void 0;c="function"===typeof l?l(n):l,r.__t>0&&(c=-a*r.__t),r.__t=0;var f=r.animate("",s).when(a,{__t:1}).delay(c).during((function(){i._updateSymbolPosition(r)}));s||f.done((function(){i.remove(r)})),f.start()}this._period=a,this._loop=s}},t.prototype._getLineLength=function(e){return Ce(e.__p1,e.__cp1)+Ce(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t,o=[e.x,e.y],a=o.slice(),s=co,u=fo;o[0]=s(t[0],r[0],n[0],i),o[1]=s(t[1],r[1],n[1],i);var l=u(t[0],r[0],n[0],i),c=u(t[1],r[1],n[1],i);e.rotation=-Math.atan2(c,l)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;ot);o++);o=Math.min(o-1,i-2)}var s=(t-r[o])/(r[o+1]-r[o]),u=n[o],l=n[o+1];e.x=u[0]*(1-s)+s*l[0],e.y=u[1]*(1-s)+s*l[1];var c=l[0]-u[0],f=l[1]-u[1];e.rotation=-Math.atan2(f,c)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(LM),jM=function(){this.polyline=!1,this.curveness=0,this.segs=[]},BM=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new jM},t.prototype.buildPath=function(e,t){var n=t.segs,r=t.curveness;if(t.polyline)for(var i=0;i0){e.moveTo(n[i++],n[i++]);for(var a=1;a0){var f=(s+l)/2-(u-c)*r,d=(u+c)/2-(l-s)*r;e.quadraticCurveTo(f,d,l,c)}else e.lineTo(l,c)}},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var l=r[s++],c=r[s++],f=1;f0){if(ea(l,c,(l+d)/2-(c-h)*i,(c+h)/2-(d-l)*i,d,h,o,e,t))return a}else if($o(l,c,d,h,o,e,t))return a;a++}return-1},t}(ma),FM=function(){function e(){this.group=new xr}return e.prototype.isPersistent=function(){return!this._incremental},e.prototype.updateData=function(e){this.group.removeAll();var t=new BM({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new Qu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},e.prototype.incrementalUpdate=function(e,t){var n=new BM;n.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(n,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=e.start,this.group.add(n))},e.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;e.setShape({polyline:r.get("polyline"),curveness:r.get(["lineStyle","curveness"])}),e.useStyle(r.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");if(i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null),!n){var o=Ja(e);o.seriesIndex=r.seriesIndex,e.on("mousemove",(function(t){o.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>0&&(o.dataIndex=n+e.__startIndex)}))}},e.prototype._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()},e}(),zM={seriesType:"lines",plan:Rh(),reset:function(e){var t=e.coordinateSystem,n=e.get("polyline"),r=e.pipelineContext.large;return{progress:function(i,o){var a=[];if(r){var s=void 0,u=i.end-i.start;if(n){for(var l=0,c=i.start;c ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(Ih);function XM(e){return e instanceof Array||(e=[e,e]),e}var WM={seriesType:"lines",reset:function(e){var t=XM(e.get("symbol")),n=XM(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",t&&t[0]),r.setVisual("toSymbol",t&&t[1]),r.setVisual("fromSymbolSize",n&&n[0]),r.setVisual("toSymbolSize",n&&n[1]),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),r=XM(n.getShallow("symbol",!0)),i=XM(n.getShallow("symbolSize",!0));r[0]&&e.setItemVisual(t,"fromSymbol",r[0]),r[1]&&e.setItemVisual(t,"toSymbol",r[1]),i[0]&&e.setItemVisual(t,"fromSymbolSize",i[0]),i[1]&&e.setItemVisual(t,"toSymbolSize",i[1])}:null}}};var qM=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=P();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,o){var a=this._getBrush(),s=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),l=this.pointSize+this.blurSize,c=this.canvas,f=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var h=0;h0){var T=o(v)?s:u;v>0&&(v=v*k+_),b[w++]=T[S],b[w++]=T[S+1],b[w++]=T[S+2],b[w++]=T[S+3]*v*256}else w+=4}return f.putImageData(m,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=P()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,a=0;a<256;a++)e[t](a/255,!0,i),r[o++]=i[0],r[o++]=i[1],r[o++]=i[2],r[o++]=i[3];return r},e}();function ZM(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var KM=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(r=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):ZM(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(ZM(i)?this.render(t,n,r):this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0))},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,i){var o,a,s,u,l=e.coordinateSystem;if(Qb(l,"cartesian2d")){var c=l.getAxis("x"),f=l.getAxis("y");0,o=c.getBandWidth(),a=f.getBandWidth(),s=c.scale.getExtent(),u=f.scale.getExtent()}for(var d=this.group,h=e.getData(),p=e.getModel(["emphasis","itemStyle"]).getItemStyle(),g=e.getModel(["blur","itemStyle"]).getItemStyle(),y=e.getModel(["select","itemStyle"]).getItemStyle(),v=Fl(e),m=e.get(["emphasis","focus"]),b=e.get(["emphasis","blurScope"]),w=Qb(l,"cartesian2d")?[h.mapDimension("x"),h.mapDimension("y"),h.mapDimension("value")]:[h.mapDimension("time"),h.mapDimension("value")],x=n;xs[1]||Tu[1])continue;var C=l.dataToPoint([S,T]);_=new Da({shape:{x:Math.floor(Math.round(C[0])-o/2),y:Math.floor(Math.round(C[1])-a/2),width:Math.ceil(o),height:Math.ceil(a)},style:k})}else{if(isNaN(h.get(w[1],x)))continue;_=new Da({z2:1,shape:l.dataToRect([h.get(w[0],x)]).contentShape,style:k})}var A=h.getItemModel(x);if(h.hasItemOption){var O=A.getModel("emphasis");p=O.getModel("itemStyle").getItemStyle(),g=A.getModel(["blur","itemStyle"]).getItemStyle(),y=A.getModel(["select","itemStyle"]).getItemStyle(),m=O.get("focus"),b=O.get("blurScope"),v=Fl(A)}var M=e.getRawValue(x),E="-";M&&null!=M[2]&&(E=M[2]+""),Bl(_,v,{labelFetcher:e,labelDataIndex:x,defaultOpacity:k.opacity,defaultText:E}),_.ensureState("emphasis").style=p,_.ensureState("blur").style=g,_.ensureState("select").style=y,As(_,m,b),_.incremental=i,i&&(_.states.emphasis.hoverLayer=!0),d.add(_),h.setItemGraphicEl(x,_)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new qM;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var u=e.getViewRect().clone(),l=e.getRoamTransform();u.applyTransform(l);var c=Math.max(u.x,0),f=Math.max(u.y,0),d=Math.min(u.width+u.x,r.getWidth()),h=Math.min(u.height+u.y,r.getHeight()),p=d-c,g=h-f,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=c,i[1]-=f,i.push(r),i})),m=n.getExtent(),b="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(m,n.option.range):function(e,t,n){var r=e[1]-e[0],i=(t=N(t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}))).length,o=0;return function(e){var r;for(r=o;r=0;r--){var a;if((a=t[r].interval)[0]<=e&&e<=a[1]){o=r;break}}return r>=0&&r0?1:o<0?-1:0}(n,o,i,r,f),function(e,t,n,r,i,o,a,s,u,l){var c,f=u.valueDim,d=u.categoryDim,h=Math.abs(n[d.wh]),p=e.getItemVisual(t,"symbolSize");c=H(p)?p.slice():null==p?["100%","100%"]:[p,p];c[d.index]=Or(c[d.index],h),c[f.index]=Or(c[f.index],r?h:Math.abs(o)),l.symbolSize=c,(l.symbolScale=[c[0]/s,c[1]/s])[f.index]*=(u.isHorizontal?-1:1)*a}(e,t,i,o,0,f.boundingLength,f.pxSign,l,r,f),function(e,t,n,r,i){var o=e.get($M)||0;o&&(eE.attr({scaleX:t[0],scaleY:t[1],rotation:n}),eE.updateTransform(),o/=eE.getLineScale(),o*=t[r.valueDim.index]);i.valueLineWidth=o}(n,f.symbolScale,u,r,f);var d=f.symbolSize,h=n.get("symbolOffset");return H(h)&&(h=[Or(h[0],d[0]),Or(h[1],d[1])]),function(e,t,n,r,i,o,a,s,u,l,c,f){var d=c.categoryDim,h=c.valueDim,p=f.pxSign,g=Math.max(t[h.index]+s,0),y=g;if(r){var v=Math.abs(u),m=$(e.get("symbolMargin"),"15%")+"",b=!1;m.lastIndexOf("!")===m.length-1&&(b=!0,m=m.slice(0,m.length-1));var w=Or(m,t[h.index]),x=Math.max(g+2*w,0),_=b?0:2*w,k=Hr(r),S=k?r:vE((v+_)/x);x=g+2*(w=(v-S*g)/2/(b?S:S-1)),_=b?0:2*w,k||"fixed"===r||(S=l?vE((Math.abs(l)+_)/x):0),y=S*x-_,f.repeatTimes=S,f.symbolMargin=w}var T=p*(y/2),C=f.pathPosition=[];C[d.index]=n[d.wh]/2,C[h.index]="start"===a?T:"end"===a?u-T:u/2,o&&(C[0]+=o[0],C[1]+=o[1]);var A=f.bundlePosition=[];A[d.index]=n[d.xy],A[h.index]=n[h.xy];var O=f.barRectShape=M({},n);O[h.wh]=p*Math.max(Math.abs(n[h.wh]),Math.abs(C[h.index]+T)),O[d.wh]=n[d.wh];var E=f.clipShape={};E[d.xy]=-n[d.xy],E[d.wh]=c.ecSize[d.wh],E[h.xy]=0,E[h.wh]=n[h.wh]}(n,d,i,o,0,h,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,r,f),f}function nE(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function rE(e){var t=e.symbolPatternSize,n=Tg(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function iE(e,t,n,r){var i=e.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,u=t.valueDim,l=n.repeatTimes||0,c=0,f=o[t.valueDim.index]+a+2*n.symbolMargin;for(pE(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=l,c0:r<0)&&(i=l-1-e),t[u.index]=f*(i-l/2+.5)+s[u.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function oE(e,t,n,r){var i=e.__pictorialBundle,o=e.__pictorialMainPath;o?gE(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(o=e.__pictorialMainPath=rE(n),i.add(o),gE(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function aE(e,t,n){var r=M({},t.barRectShape),i=e.__pictorialBarRect;i?gE(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new Da({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(i))}function sE(e,t,n,i){if(n.symbolClip){var o=e.__pictorialClipPath,a=M({},n.clipShape),s=t.valueDim,u=n.animationModel,l=n.dataIndex;if(o)vl(o,{shape:a},u,l);else{a[s.wh]=0,o=new Da({shape:a}),e.__pictorialBundle.setClipPath(o),e.__pictorialClipPath=o;var c={};c[s.wh]=n.clipShape[s.wh],r[i?"updateProps":"initProps"](o,{shape:c},u,l)}}}function uE(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=lE,n.isAnimationEnabled=cE,n}function lE(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function cE(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function fE(e,t,n,r){var i=new xr,o=new xr;return i.add(o),i.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?iE(i,t,n):oE(i,0,n),aE(i,n,r),sE(i,t,n,r),i.__pictorialShapeStr=hE(e,n),i.__pictorialSymbolMeta=n,i}function dE(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var o=[];pE(r,(function(e){o.push(e)})),r.__pictorialMainPath&&o.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),R(o,(function(e){bl(e,{scaleX:0,scaleY:0},n,t,(function(){r.parent&&r.parent.remove(r)}))})),e.setItemGraphicEl(t,null)}function hE(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function pE(e,t,n){R(e.__pictorialBundle.children(),(function(r){r!==e.__pictorialBarRect&&t.call(n,r)}))}function gE(e,t,n,i,o,a){t&&e.attr(t),i.symbolClip&&!o?n&&e.attr(n):n&&r[o?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,a)}function yE(e,t,n){var r=n.dataIndex,i=n.itemModel,o=i.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),u=i.getModel(["select","itemStyle"]).getItemStyle(),l=i.getShallow("cursor"),c=o.get("focus"),f=o.get("blurScope"),d=o.get("scale");pE(e,(function(e){if(e instanceof Ta){var t=e.style;e.useStyle(M({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState("emphasis");r.style=a,d&&(r.scaleX=1.1*e.scaleX,r.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=u,l&&(e.cursor=l),e.z2=n.z2}));var h=t.valueDim.posDesc[+(n.boundingLength>0)];Bl(e.__pictorialBarRect,Fl(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:Mb(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:h}),As(e,c,f)}function vE(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var mE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),o=this._data,a=e.coordinateSystem,s=a.getBaseAxis().isHorizontal(),u=a.master.getRect(),l={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:s,valueDim:QM[+s],categoryDim:QM[1-+s]};return i.diff(o).add((function(e){if(i.hasValue(e)){var t=uE(i,e),n=tE(i,e,t,l),o=fE(i,l,n);i.setItemGraphicEl(e,o),r.add(o),yE(o,l,n)}})).update((function(e,t){var n=o.getItemGraphicEl(t);if(i.hasValue(e)){var a=uE(i,e),s=tE(i,e,a,l),u=hE(i,s);n&&u!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var r=n.animationModel,i=n.dataIndex;vl(e.__pictorialBundle,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?iE(e,t,n,!0):oE(e,t,n,!0);aE(e,n,!0),sE(e,t,n,!0)}(n,l,s):n=fE(i,l,s,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,r.add(n),yE(n,l,s)}else r.remove(n)})).remove((function(e){var t=o.getItemGraphicEl(e);t&&dE(o,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get("animation")?r&&r.eachItemGraphicEl((function(t){dE(r,Ja(t).dataIndex,e,t)})):n.removeAll()},t.type="pictorialBar",t}(Gh),bE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return a(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=lc(Cw.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(Cw);var wE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return a(t,e),t.prototype.render=function(e,t,n){var r=e.getData(),i=this,o=this.group,a=e.getLayerSeries(),s=r.getLayout("layoutInfo"),u=s.rect,l=s.boundaryGap;function c(e){return e.name}o.x=0,o.y=u.y+l[0];var f=new Jm(this._layersSeries||[],a,c,c),d=[];function h(t,n,s){var u=i._layers;if("remove"!==t){for(var l,c,f=[],h=[],p=a[n].indices,g=0;go&&(o=s),r.push(s)}for(var l=0;lo&&(o=f)}return{y0:i,max:o}}(u),c=l.y0,f=n/l.max,d=o.length,h=o[0].indices.length,p=0;pMath.PI/2?"right":"left"):_&&"center"!==_?"left"===_?(v=i.r0+x,a>Math.PI/2&&(_="right")):"right"===_&&(v=i.r-x,a>Math.PI/2&&(_="left")):(v=(i.r+i.r0)/2,_="center"),h.style.align=_,h.style.verticalAlign=p(o,"verticalAlign")||"middle",h.x=v*s+i.cx,h.y=v*u+i.cy;var k=p(o,"rotate"),S=0;"radial"===k?(S=-a)<-Math.PI/2&&(S+=Math.PI):"tangential"===k?(S=Math.PI/2-a)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"===typeof k&&(S=k*Math.PI/180),h.rotation=S})),c.dirtyStyle()},t}(bu);var TE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n,r){var i=this;this.seriesModel=e,this.api=n,this.ecModel=t;var o=e.getData(),a=o.tree.root,s=e.getViewRoot(),u=this.group,l=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var f=this._oldChildren||[];!function(r,i){if(0===r.length&&0===i.length)return;function s(e){return e.getId()}function c(s,c){!function(r,i){l||!r||r.getValue()||(r=null);if(r!==a&&i!==a)if(i&&i.piece)r?(i.piece.updateData(!1,r,e,t,n),o.setItemGraphicEl(r.dataIndex,i.piece)):function(e){if(!e)return;e.piece&&(u.remove(e.piece),e.piece=null)}(i);else if(r){var s=new SE(r,e,t,n);u.add(s),o.setItemGraphicEl(r.dataIndex,s)}}(null==s?null:r[s],null==c?null:i[c])}new Jm(i,r,s,s).add(c).update(c).remove(V(c,null)).execute()}(c,f),function(r,o){o.depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new SE(r,e,t,n),u.add(i.virtualPiece)),o.piece.off("click"),i.virtualPiece.on("click",(function(e){i._rootToNode(o.parentNode)}))):i.virtualPiece&&(u.remove(i.virtualPiece),i.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",(function(t){var n=!1;e.seriesModel.getViewRoot().eachNode((function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get("nodeClick");if("rootToNode"===i)e._rootToNode(r);else if("link"===i){var o=r.getModel(),a=o.get("link");if(a)qc(a,o.get("target",!0)||"_blank")}n=!0}}))}))},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,o=Math.sqrt(r*r+i*i);return o<=n.r&&o>=n.r0}},t.type="sunburst",t}(Gh);var CE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return a(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};!function e(t){var n=0;R(t.children,(function(t){e(t);var r=t.value;H(r)&&(r=r[0]),n+=r}));var r=t.value;H(r)&&(r=r[0]);(null==r||isNaN(r))&&(r=n);r<0&&(r=0);H(t.value)?t.value[0]=r:t.value=r}(n);var r=N(e.levels||[],(function(e){return new ac(e,this,t)}),this),i=HS.createTree(n,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=i.getNodeByDataIndex(t),o=r[n.depth];return o&&(e.parentModel=o),e}))}));return i.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=KS(r,this),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){QS(this)},t.type="series.sunburst",t.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"},t}(Ih),AE=Math.PI/180;function OE(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),r=e.get("radius");H(r)||(r=[0,r]),H(t)||(t=[t,t]);var i=n.getWidth(),o=n.getHeight(),a=Math.min(i,o),s=Or(t[0],i),u=Or(t[1],o),l=Or(r[0],a/2),c=Or(r[1],a/2),f=-e.get("startAngle")*AE,d=e.get("minAngle")*AE,h=e.getData().tree.root,p=e.getViewRoot(),g=p.depth,y=e.get("sort");null!=y&&function e(t,n){var r=t.children||[];t.children=function(e,t){if("function"===typeof t){var n=N(e,(function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}}));return n.sort((function(e,n){return t(e.params,n.params)})),N(n,(function(t){return e[t.index]}))}var r="asc"===t;return e.sort((function(e,t){var n=(e.getValue()-t.getValue())*(r?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(r?-1:1):n}))}(r,n),r.length&&R(t.children,(function(t){e(t,n)}))}(p,y);var v=0;R(p.children,(function(e){!isNaN(e.getValue())&&v++}));var m=p.getValue(),b=Math.PI/(m||v)*2,w=p.depth>0,x=p.height-(w?-1:1),_=(c-l)/(x||1),k=e.get("clockwise"),S=e.get("stillShowZeroSum"),T=k?1:-1;if(w){var C=l,A=l+_,O=2*Math.PI;h.setLayout({angle:O,startAngle:f,endAngle:f+O,clockwise:k,cx:s,cy:u,r0:C,r:A})}!function e(t,n){if(t){var r=n;if(t!==h){var i=t.getValue(),o=0===m&&S?b:i*b;o1;)i=i.parentNode;var o=n.getColorFromPalette(i.name||i.dataIndex+"",t);return e.depth>1&&"string"===typeof o&&(o=Ut(o,(e.depth-1)/(r-1)*.5)),o}(i,e,r.root.height)),M(n.ensureUniqueItemVisual(i.dataIndex,"style"),o)}))}))}function EE(e,t){return t=t||[0,0],N(["x","y"],(function(n,r){var i=this.getAxis(n),o=t[r],a=e[r]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a))}),this)}function PE(e,t){return t=t||[0,0],N([0,1],(function(n){var r=t[n],i=e[n]/2,o=[],a=[];return o[n]=r-i,a[n]=r+i,o[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function IE(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function DE(e,t){return t=t||[0,0],N(["Radius","Angle"],(function(n,r){var i=this["get"+n+"Axis"](),o=t[r],a=e[r]/2,s="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function LE(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||fe(e,"text")))}function RE(e,t,n){var r,i,o,a=e;if("text"===t)o=a;else{o={},fe(a,"text")&&(o.text=a.text),fe(a,"rich")&&(o.rich=a.rich),fe(a,"textFill")&&(o.fill=a.textFill),fe(a,"textStroke")&&(o.stroke=a.textStroke),i={type:"text",style:o,silent:!0},r={};var s=fe(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),fe(a,"textPosition")&&(r.position=a.textPosition),fe(a,"textOffset")&&(r.offset=a.textOffset),fe(a,"textRotation")&&(r.rotation=a.textRotation),fe(a,"textDistance")&&(r.distance=a.textDistance)}return NE(o,e),R(o.rich,(function(e){NE(e,e)})),{textConfig:r,textContent:i}}function NE(e,t){t&&(t.font=t.textFont||t.font,fe(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),fe(t,"textAlign")&&(e.align=t.textAlign),fe(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),fe(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),fe(t,"textWidth")&&(e.width=t.textWidth),fe(t,"textHeight")&&(e.height=t.textHeight),fe(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),fe(t,"textPadding")&&(e.padding=t.textPadding),fe(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),fe(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),fe(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),fe(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),fe(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),fe(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),fe(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function jE(e,t,n){var r=e;r.textPosition=r.textPosition||n.position||"inside",null!=n.offset&&(r.textOffset=n.offset),null!=n.rotation&&(r.textRotation=n.rotation),null!=n.distance&&(r.textDistance=n.distance);var i=r.textPosition.indexOf("inside")>=0,o=e.fill||"#000";BE(r,t);var a=null==r.textFill;return i?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=o),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,R(t.rich,(function(e){BE(e,e)})),r}function BE(e,t){t&&(fe(t,"fill")&&(e.textFill=t.fill),fe(t,"stroke")&&(e.textStroke=t.fill),fe(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),fe(t,"font")&&(e.font=t.font),fe(t,"fontStyle")&&(e.fontStyle=t.fontStyle),fe(t,"fontWeight")&&(e.fontWeight=t.fontWeight),fe(t,"fontSize")&&(e.fontSize=t.fontSize),fe(t,"fontFamily")&&(e.fontFamily=t.fontFamily),fe(t,"align")&&(e.textAlign=t.align),fe(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),fe(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),fe(t,"width")&&(e.textWidth=t.width),fe(t,"height")&&(e.textHeight=t.height),fe(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),fe(t,"padding")&&(e.textPadding=t.padding),fe(t,"borderColor")&&(e.textBorderColor=t.borderColor),fe(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),fe(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),fe(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),fe(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),fe(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),fe(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),fe(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),fe(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),fe(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),fe(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var FE=Yo.CMD,zE=2*Math.PI,VE=["x","y"],HE=["width","height"],UE=[];function GE(e,t){return Math.abs(e-t)<1e-5}function JE(e){var t,n,r,i,o,a=e.data,s=e.len(),u=[],l=0,c=0,f=0,d=0;function h(e,n){t&&t.length>2&&u.push(t),t=[e,n]}function p(e,n,r,i){GE(e,r)&&GE(n,i)||t.push(e,n,r,i,r,i)}function g(e,n,r,i,o,a){var s=Math.abs(n-e),u=4*Math.tan(s/4)/3,l=nS:A2&&u.push(t),u}function XE(e,t){var n=e.length,r=t.length;if(n===r)return[e,t];for(var i=n0)for(var x=r/n,_=-r/2;_<=r/2;_+=x){var k=Math.sin(_),S=Math.cos(_),T=0;for(b=0;bf.width?1:0,i=HE[r],o=VE[r],a=f[i]/t,s=f[o],u=0;ur[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),o=n.dataToAngle(r[1]),a=e.coordToPoint([i,o]);return a.push(i,o*Math.PI/180),a},size:z(DE,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}},wP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return Ab(this.getSource(),this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=cP(r).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},t}(Ih),xP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n,r){var i=this._data,o=e.getData(),a=this.group,s=VP(e,o,t,n),u=e.__transientTransitionOpt;if(!u||null!=u.from&&null!=u.to){var l=new nI(e,u),c=u?"multiple":"oneToOne";new Jm(i?i.getIndices():[],o.getIndices(),_P(i,c,u&&u.from),_P(o,c,u&&u.to),null,c).add((function(t){UP(n,null,t,s(t,r),e,a,o,null)})).remove((function(t){$P(i.getItemGraphicEl(t),e,a)})).update((function(t,u){l.reset("oneToOne");var c=i.getItemGraphicEl(u);l.findAndAddFrom(c),l.hasFrom()&&(tI(c,a),c=null),UP(n,c,t,s(t,r),e,a,o,l),l.applyMorphing()})).updateManyToOne((function(t,u){l.reset("manyToOne");for(var c=0;c=0){!s&&(s=i[e]={});var p=F(u);for(f=0;f=0){var h=e.getAnimationStyleProps(),p=h?h.style:null;if(p){!a&&(a=i.style={});var g=F(r);for(c=0;c=d;h--)$P(t.childAt(h),i,t)}(e,t,n,r,i,s),u>=0?o.replaceAt(t,u):o.add(t),t}function JP(e,t){var n,r=cP(e),i=t.type,o=t.shape,a=t.style;return null!=i&&i!==r.customGraphicType||"path"===i&&((n=o)&&(fe(n,"pathData")||fe(n,"d")))&&QP(o)!==r.customPathData||"image"===i&&fe(a,"image")&&a.image!==r.customImagePath}function XP(e,t,n){var r=t?WP(e,t):e,i=t?qP(e,r,"emphasis"):e.style,o=e.type,a=r?r.textConfig:null,s=e.textContent,u=s?t?WP(s,t):s:null;if(i&&(n.isLegacy||LE(i,o,!!a,!!u))){n.isLegacy=!0;var l=RE(i,o,!t);!a&&l.textConfig&&(a=l.textConfig),!u&&l.textContent&&(u=l.textContent)}if(!t&&u){var c=u;!c.type&&(c.type="text")}var f=t?n[t]:n.normal;f.cfg=a,f.conOpt=u}function WP(e,t){return t?e?e[t]:null:e}function qP(e,t,n){var r=t&&t.style;return null==r&&"emphasis"===n&&e&&(r=e.styleEmphasis),r}function ZP(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function KP(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,i=null!=t?n.oldChildren[t]:null;GP(n.api,i,n.dataIndex,r,n.seriesModel,n.group,0,n.morphPreparation)}function YP(e){var t=this.context;$P(t.oldChildren[e],t.seriesModel,t.group)}function $P(e,t,n){if(e){var r=cP(e).leaveToProps;r?vl(e,r,t,{cb:function(){n.remove(e)}}):n.remove(e)}}function QP(e){return e&&(e.pathData||e.d)}function eI(e){return e&&e instanceof ma}function tI(e,t){e&&t.remove(e)}var nI=function(){function e(e,t){this._fromList=[],this._toList=[],this._toElOptionList=[],this._allPropsFinalList=[],this._toDataIndices=[],this._morphConfigList=[],this._seriesModel=e,this._transOpt=t}return e.prototype.hasFrom=function(){return!!this._fromList.length},e.prototype.findAndAddFrom=function(e){if(e&&(cP(e).canMorph&&this._fromList.push(e),e.isGroup))for(var t=e.childrenRef(),n=0;n=n?r-a:o;this._manyToOneForSingleTo(i,a>=r?null:a,s)}else if("oneToMany"===e)for(var u=Math.max(1,Math.floor(n/r)),l=0,c=0;l=n?n-l:u;this._oneToManyForSingleFrom(l,f,c>=r?null:c)}},e.prototype._oneToOneForSingleTo=function(e,t){var n,r=this._toList[e],i=this._toElOptionList[e],o=this._toDataIndices[e],a=this._allPropsFinalList[e],s=this._fromList[t],u=this._getOrCreateMorphConfig(o),l=u.duration;if(s&&tP(s)){if(TP(r,a,i.style),l){var c=nP([s],r,u,rI);this._processResultIndividuals(c,e,null)}}else{var f=l&&s&&(s!==r||(eP(n=s)||tP(n)))?s:null,d={};AP("shape",r,f,i,d,!1),AP("extra",r,f,i,d,!1),MP(r,f,i,d,!1),EP(r,f,i,i.style,d,!1),TP(r,a,i.style),f&&YE(f,r,u),CP(r,o,i,this._seriesModel,d,!1)}},e.prototype._manyToOneForSingleTo=function(e,t,n){var r=this._toList[e],i=this._toElOptionList[e];TP(r,this._allPropsFinalList[e],i.style);var o=this._getOrCreateMorphConfig(this._toDataIndices[e]);if(o.duration&&null!=t){for(var a=[],s=t;sa)return!0;if(o){var s=Q_(e).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,i){var o=t.pointer;if(o){var a=iI(e).pointerEl=new r[o.type](oI(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=iI(e).labelEl=new Ga(oI(t.label));e.add(i),uI(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=iI(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=iI(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),uI(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return i&&r.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=El(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Ke(e.event)},onmousedown:aI(this._onHandleDragMove,this,0,0),drift:aI(this._onHandleDragMove,this),ondragend:aI(this._onHandleDragEnd,this)}),r.add(i)),cI(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");H(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,qh(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){sI(this._axisPointerModel,!t&&this._moveAnimation,this._handle,lI(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(lI(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(lI(r)),iI(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function dI(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}function hI(e,t,n,r,i){var o=pI(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Fc(a.get("padding")||0),u=a.getFont(),l=On(o,u),c=i.position,f=l.width+s[1]+s[3],d=l.height+s[0]+s[2],h=i.align;"right"===h&&(c[0]-=f),"center"===h&&(c[0]-=f/2);var p=i.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(e,t,n,r){var i=r.getWidth(),o=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,f,d,r);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:zl(a,{text:o,font:u,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function pI(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:h_(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)})),G(a)?o=a.replace("{value}",o):U(a)&&(o=a(s))}return o}function gI(e,t,n){var r=[1,0,0,1,0,0];return ht(r,r,n.rotation),dt(r,r,n.position),Sl([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function yI(e,t,n,r,i,o){var a=Z_.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),hI(t,r,i,o,{position:gI(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function vI(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function mI(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function bI(e,t,n,r,i,o){return{cx:e,cy:t,r0:n,r:r,startAngle:i,endAngle:o,clockwise:!0}}var wI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.grid,s=r.get("type"),u=xI(a,o).getOtherAxis(o).getGlobalExtent(),l=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=dI(r),f=_I[s](o,l,u);f.style=c,e.graphicKey=f.type,e.pointer=f}yI(t,e,R_(a.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=R_(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=gI(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=xI(o,i).getOtherAxis(i).getGlobalExtent(),u="x"===i.dim?0:1,l=[e.x,e.y];l[u]+=t[u],l[u]=Math.min(a[1],l[u]),l[u]=Math.max(a[0],l[u]);var c=(s[1]+s[0])/2,f=[c,c];f[u]=l[u];return{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:f,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][u]}},t}(fI);function xI(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var _I={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:vI([t,n[0]],[t,n[1]],kI(e))}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:"Rect",shape:mI([t-r/2,n[0]],[r,i],kI(e))}}};function kI(e){return"x"===e.dim?0:1}var SI=wI,TI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="axisPointer",t.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(lf),CI=ni(),AI=R;function OI(e,t,n){if(!f.node){var r=t.getZr();CI(r).records||(CI(r).records={}),function(e,t){if(CI(e).initialized)return;function n(n,r){e.on(n,(function(n){var i=function(e){var t={showTip:[],hideTip:[]};return{dispatchAction:function n(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))},pendings:t}}(t);AI(CI(e).records,(function(e){e&&r(e,n,i.dispatchAction)})),function(e,t){var n,r=e.showTip.length,i=e.hideTip.length;r?n=e.showTip[r-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)}))}CI(e).initialized=!0,n("click",V(EI,"click")),n("mousemove",V(EI,"mousemove")),n("globalout",MI)}(r,t),(CI(r).records[e]||(CI(r).records[e]={})).handler=n}}function MI(e,t,n){e.handler("leave",null,n)}function EI(e,t,n,r){t.handler(e,n,r)}function PI(e,t){if(!f.node){var n=t.getZr();(CI(n).records||{})[e]&&(CI(n).records[e]=null)}}var II=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";OI("axisPointer",n,(function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){PI("axisPointer",t)},t.prototype.dispose=function(e,t){PI("axisPointer",t)},t.type="axisPointer",t}(Lh);function DI(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=ti(o,e);if(null==a||a<0||H(a))return{point:[]};var s=o.getItemGraphicEl(a),u=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(a)||[];else if(u&&u.dataToPoint)if(e.isStacked){var l=u.getBaseAxis(),c=u.getOtherAxis(l).dim,f=l.dim,d="x"===c||"radius"===c?1:0,h=o.mapDimension(f),p=[];p[d]=o.get(h,a),p[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=u.dataToPoint(p)||[]}else r=u.dataToPoint(o.getValues(N(u.dimensions,(function(e){return o.mapDimension(e)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var LI=ni();function RI(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e,a=e.dispatchAction||z(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){zI(i)&&(i=DI({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var u=zI(i),l=o.axesInfo,c=s.axesInfo,f="leave"===r||zI(i),d={},h={},p={list:[],map:{}},g={showPointer:V(jI,h),showTooltip:V(BI,p)};R(s.coordSysMap,(function(e,t){var n=u||e.containPoint(i);R(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(l,e);if(!f&&n&&(!l||o)){var a=o&&o.value;null!=a||u||(a=r.pointToData(i)),null!=a&&NI(e,a,g,!1,d)}}))}));var y={};return R(c,(function(e,t){var n=e.linkGroup;n&&!h[t]&&R(n.axesInfo,(function(t,r){var i=h[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,FI(t),FI(e)))),y[e.key]=o}}))})),R(y,(function(e,t){NI(c[t],e,g,!0,d)})),function(e,t,n){var r=n.axesInfo=[];R(t,(function(t,n){var i=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(i.status="show"),i.value=o.value,i.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})}))}(h,c,d),function(e,t,n,r){if(zI(t)||!e.list.length)return void r({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(p,i,e,a),function(e,t,n){var r=n.getZr(),i=LI(r).axisPointerLastHighlights||{},o=LI(r).axisPointerLastHighlights={};R(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&R(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var a=[],s=[];R(i,(function(e,t){!o[t]&&s.push(e)})),R(o,(function(e,t){!i[t]&&a.push(e)})),s.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),a.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:a})}(c,0,n),d}}function NI(e,t,n,r,i){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,i=e,o=[],a=Number.MAX_VALUE,s=-1;return R(t.seriesModels,(function(t,u){var l,c,f=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(f,e,n);c=d.dataIndices,l=d.nestestValue}else{if(!(c=t.getData().indicesOfNearest(f[0],e,"category"===n.type?.5:null)).length)return;l=t.getData().get(f[0],c[0])}if(null!=l&&isFinite(l)){var h=e-l,p=Math.abs(h);p<=a&&((p=0&&s<0)&&(a=p,s=h,i=l,o.length=0),R(c,(function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:o,snapToValue:i}}(t,e),s=a.payloadBatch,u=a.snapToValue;s[0]&&null==i.seriesIndex&&M(i,s[0]),!r&&e.snap&&o.containData(u)&&null!=u&&(t=u),n.showPointer(e,t,s),n.showTooltip(e,a,u)}else n.showPointer(e,t)}function jI(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function BI(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var u=t.coordSys.model,l=tk(u),c=e.map[l];c||(c=e.map[l]={coordSysId:u.id,coordSysIndex:u.componentIndex,coordSysType:u.type,coordSysMainType:u.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function FI(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function zI(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function VI(e){rk.registerAxisPointerClass("CartesianAxisPointer",SI),e.registerComponentModel(TI),e.registerComponentView(II),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!H(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=K_(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},RI)}var HI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),u=o.dataToCoord(t),l=r.get("type");if(l&&"none"!==l){var c=dI(r),f=UI[l](o,a,u,s);f.style=c,e.graphicKey=f.type,e.pointer=f}var d=function(e,t,n,r,i){var o=t.axis,a=o.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var u,l,c,f=r.getRadiusAxis().getExtent();if("radius"===o.dim){var d=[1,0,0,1,0,0];ht(d,d,s),dt(d,d,[r.cx,r.cy]),u=Sl([a,-i],d);var h=t.getModel("axisLabel").get("rotate")||0,p=Z_.innerTextLayout(s,h*Math.PI/180,-1);l=p.textAlign,c=p.textVerticalAlign}else{var g=f[1];u=r.coordToPoint([g+i,a]);var y=r.cx,v=r.cy;l=Math.abs(u[0]-y)/g<.3?"center":u[0]>y?"left":"right",c=Math.abs(u[1]-v)/g<.3?"middle":u[1]>v?"top":"bottom"}return{position:u,align:l,verticalAlign:c}}(t,n,0,a,r.get(["label","margin"]));hI(e,n,r,i,d)},t}(fI);var UI={line:function(e,t,n,r){return"angle"===e.dim?{type:"Line",shape:vI(t.coordToPoint([r[0],n]),t.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r){var i=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:bI(t.cx,t.cy,r[0],r[1],(-n-i/2)*o,(i/2-n)*o)}:{type:"Sector",shape:bI(t.cx,t.cy,n-i/2,n+i/2,0,2*Math.PI)}}},GI=HI,JI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},t}(lf),XI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ai).models[0]},t.type="polarAxis",t}(lf);D(XI,fx);var WI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="angleAxis",t}(XI),qI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="radiusAxis",t}(XI),ZI=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return a(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(D_);ZI.prototype.dataToRadius=D_.prototype.dataToCoord,ZI.prototype.radiusToData=D_.prototype.coordToData;var KI=ZI,YI=ni(),$I=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return a(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this.getLabelModel(),t=this.scale,n=t.getExtent(),r=t.count();if(n[1]-n[0]<1)return 0;var i=n[0],o=this.dataToCoord(i+1)-this.dataToCoord(i),a=Math.abs(o),s=On(null==i?"":i+"",e.getFont(),"center","top"),u=Math.max(s.height,7)/a;isNaN(u)&&(u=1/0);var l=Math.max(0,Math.floor(u)),c=YI(this.model),f=c.lastAutoInterval,d=c.lastTickCount;return null!=f&&null!=d&&Math.abs(f-l)<=1&&Math.abs(d-r)<=1&&f>l?l=f:(c.lastTickCount=r,c.lastAutoInterval=l),l},t}(D_);$I.prototype.dataToAngle=D_.prototype.dataToCoord,$I.prototype.angleToData=D_.prototype.coordToData;var QI=$I;function eD(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var tD=function(){function e(e){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new KI,this._angleAxis=new QI,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){return this["_"+e+"Axis"]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),o=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);r.inverse?o=a-360:a=o+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var u=Math.atan2(-n,t)/Math.PI*180,l=ua;)u+=360*l;return[s,u]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,i=n*n+r*r,o=this.r,a=this.r0;return i<=o*o&&i>=a*a}}},e.prototype.convertToPixel=function(e,t,n){return eD(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return eD(t)===this?this.pointToData(n):null},e}();function nD(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();R(v_(t,"radius"),(function(e){i.scale.unionExtentFromData(t,e)})),R(v_(t,"angle"),(function(e){r.scale.unionExtentFromData(t,e)}))}})),c_(r.scale,r.model),c_(i.scale,i.model),"category"===r.type&&!r.onBand){var o=r.getExtent(),a=360/r.scale.count();r.inverse?o[1]+=a:o[1]-=a,r.setExtent(o[0],o[1])}}function rD(e,t){if(e.type=t.get("type"),e.scale=f_(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),function(e){return"angleAxis"===e.mainType}(t)){e.inverse=e.inverse!==t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}t.axis=e,e.model=t}var iD={dimensions:tD.prototype.dimensions,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,r){var i=new tD(r+"");i.update=nD;var o=i.getRadiusAxis(),a=i.getAngleAxis(),s=e.findAxisModel("radiusAxis"),u=e.findAxisModel("angleAxis");rD(o,s),rD(a,u),function(e,t,n){var r=t.get("center"),i=n.getWidth(),o=n.getHeight();e.cx=Or(r[0],i),e.cy=Or(r[1],o);var a=e.getRadiusAxis(),s=Math.min(i,o)/2,u=t.get("radius");null==u?u=[0,"100%"]:H(u)||(u=[0,u]);var l=[Or(u[0],s),Or(u[1],s)];a.inverse?a.setExtent(l[1],l[0]):a.setExtent(l[0],l[1])}(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e})),e.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",ai).models[0];0,e.coordinateSystem=t.coordinateSystem}})),n}},oD=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function aD(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function sD(e){return e.getRadiusAxis().inverse?0:1}function uD(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var lD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return a(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=N(n.getViewLabels(),(function(e){e=C(e);var t=n.scale,r="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(r),e}));uD(s),uD(o),R(oD,(function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||cD[t](this.group,e,r,o,a,i,s)}),this)}},t.type="angleAxis",t}(rk),cD={axisLine:function(e,t,n,r,i,o){var a,s=t.getModel(["axisLine","lineStyle"]),u=sD(n),l=u?0:1;(a=0===o[l]?new nu({shape:{cx:n.cx,cy:n.cy,r:o[u]},style:s.getLineStyle(),z2:1,silent:!0}):new _u({shape:{cx:n.cx,cy:n.cy,r:o[u],r0:o[l]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,e.add(a)},axisTick:function(e,t,n,r,i,o){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),u=o[sD(n)],l=N(r,(function(e){return new Lu({shape:aD(n,[u,u+s],e.coord)})}));e.add(fl(l,{style:E(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,r,i,o){if(i.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),u=(a.get("inside")?-1:1)*s.get("length"),l=o[sD(n)],c=[],f=0;fp?"left":"right",v=Math.abs(h[1]-g)/d<.3?"middle":h[1]>g?"top":"bottom";if(s&&s[f]){var m=s[f];W(m)&&m.textStyle&&(a=new ac(m.textStyle,u,u.ecModel))}var b=new Ga({silent:Z_.isLabelSilent(t),style:zl(a,{x:h[0],y:h[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:y,verticalAlign:v})});if(e.add(b),c){var w=Z_.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=r.rawLabel,Ja(b).eventData=w}}),this)},splitLine:function(e,t,n,r,i,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),u=0;s=s instanceof Array?s:[s];for(var l=[],c=0;c=0?"p":"n",C=w;m&&(r[s][S]||(r[s][S]={p:w,n:w}),C=r[s][S][T]);var A=void 0,O=void 0,M=void 0,E=void 0;if("radius"===f.dim){var P=f.dataToCoord(k)-w,I=o.dataToCoord(S);Math.abs(P)=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),r=[],i="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),r[i]=t.toGlobalCoord(t.dataToCoord(+e)),r[1-i]=0===i?n.y+n.height/2:n.x+n.width/2,r},e.prototype.convertToPixel=function(e,t,n){return ID(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return ID(t)===this?this.pointToData(n):null},e}();var LD={create:function(e,t){var n=[];return e.eachComponent("singleAxis",(function(r,i){var o=new DD(r,e,t);o.name="single_"+i,o.resize(r,t),r.coordinateSystem=o,n.push(o)})),e.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",ai).models[0];e.coordinateSystem=t&&t.coordinateSystem}})),n},dimensions:DD.prototype.dimensions},RD=["x","y"],ND=["width","height"],jD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o=n.axis,a=o.coordinateSystem,s=zD(a,1-FD(o)),u=a.dataToPoint(t)[0],l=r.get("type");if(l&&"none"!==l){var c=dI(r),f=BD[l](o,u,s);f.style=c,e.graphicKey=f.type,e.pointer=f}yI(t,e,kD(n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=kD(t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=gI(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.coordinateSystem,a=FD(i),s=zD(o,a),u=[e.x,e.y];u[a]+=t[a],u[a]=Math.min(s[1],u[a]),u[a]=Math.max(s[0],u[a]);var l=zD(o,1-a),c=(l[1]+l[0])/2,f=[c,c];return f[a]=u[a],{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:f,tooltipOption:{verticalAlign:"middle"}}},t}(fI),BD={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:vI([t,n[0]],[t,n[1]],FD(e))}},shadow:function(e,t,n){var r=e.getBandWidth(),i=n[1]-n[0];return{type:"Rect",shape:mI([t-r/2,n[0]],[r,i],FD(e))}}};function FD(e){return e.isHorizontal()?0:1}function zD(e,t){var n=e.getRect();return[n[RD[t]],n[RD[t]]+n[ND[t]]]}var VD=jD,HD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="single",t}(Lh);function UD(e,t){var n,r=e.cellSize;1===(n=H(r)?r:e.cellSize=[r,r]).length&&(n[1]=n[0]);var i=N([0,1],(function(e){return function(e,t){return null!=e[Yc[t][0]]||null!=e[Yc[t][1]]&&null!=e[Yc[t][2]]}(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));rf(e,t,{type:"box",ignoreSize:i})}var GD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.init=function(t,n,r){var i=of(t);e.prototype.init.apply(this,arguments),UD(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),UD(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(lf),JD={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]},XD={EN:["S","M","T","W","T","F","S"],CN:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},WD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){var r=this.group;r.removeAll();var i=e.coordinateSystem,o=i.getRangeInfo(),a=i.getOrient();this._renderDayRect(e,o,r),this._renderLines(e,o,a,r),this._renderYearText(e,o,a,r),this._renderMonthText(e,a,r),this._renderWeekText(e,o,a,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel("itemStyle").getItemStyle(),o=r.getCellWidth(),a=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var u=r.dataToRect([s],!1).tl,l=new Da({shape:{x:u[0],y:u[1],width:o,height:a},cursor:"default",style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,o=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),u=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,c=0;l.time<=t.end.time;c++){d(l.formatedDate),0===c&&(l=o.getDateInfo(t.start.y+"-"+t.start.m));var f=l.date;f.setMonth(f.getMonth()+1),l=o.getDateInfo(f)}function d(t){i._firstDayOfMonth.push(o.getDateInfo(t)),i._firstDayPoints.push(o.dataToRect([t],!1).tl);var u=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(u[0]),i._blpoints.push(u[u.length-1]),s&&i._drawSplitline(u,a,r)}d(o.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,u,n),a,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,u,n),a,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i="horizontal"===n?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new Eu({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),o=[],a=0;a<7;a++){var s=r.getNextNDay(i.time,a),u=r.dataToRect([s.time],!1);o[2*s.day]=u.tl,o[2*s.day+1]=u["horizontal"===n?"bl":"tr"]}return o},t.prototype._formatterLabel=function(e,t){return"string"===typeof e&&e?(n=e,R(t,(function(e,t){n=n.replace("{"+t+"}",r?Hc(e):e)})),n):"function"===typeof e?e(t):t.nameMap;var n,r},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var o=t[0],a=t[1],s=["center","bottom"];"bottom"===r?(a+=i,s=["center","top"]):"left"===r?o-=i:"right"===r?(o+=i,s=["center","top"]):a-=i;var u=0;return"left"!==r&&"right"!==r||(u=Math.PI/2),{rotation:u,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel("yearLabel");if(i.get("show")){var o=i.get("margin"),a=i.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],u=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,f={top:[u,s[c][1]],bottom:[u,s[1-c][1]],left:[s[1-c][0],l],right:[s[c][0],l]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var h=i.get("formatter"),p={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(h,p),y=new Ga({z2:30,style:zl(i,{text:g})});y.attr(this._yearTextPositionControl(y,f[a],n,a,o)),r.add(y)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var o="left",a="top",s=e[0],u=e[1];return"horizontal"===n?(u+=i,t&&(o="center"),"start"===r&&(a="bottom")):(s+=i,t&&(a="middle"),"start"===r&&(o="right")),{x:s,y:u,align:o,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n){var r=e.getModel("monthLabel");if(r.get("show")){var i=r.get("nameMap"),o=r.get("margin"),a=r.get("position"),s=r.get("align"),u=[this._tlpoints,this._blpoints];G(i)&&(i=JD[i.toUpperCase()]||[]);var l="start"===a?0:1,c="horizontal"===t?0:1;o="start"===a?-o:o;for(var f="center"===s,d=0;d=r.start.time&&n.timea.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var r=Math.floor(n[1].time/864e5)-Math.floor(n[0].time/864e5)+1,i=new Date(n[0].time),o=i.getDate(),a=n[1].date.getDate();i.setDate(o+r-1);var s=i.getDate();if(s!==a)for(var u=i.getTime()-n[1].time>0?1:-1;(s=i.getDate())!==a&&(i.getTime()-n[1].time)*u>0;)r-=u,i.setDate(s-u);var l=Math.floor((r+n[0].day+6)/7),c=t?1-l:l-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:r,weeks:l,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||0===e&&tr.lweek)return null;var i=7*(e-1)-r.fweek+t,o=new Date(r.start.time);return o.setDate(+r.start.d+i),this.getDateInfo(o)},e.create=function(t,n){var r=[];return t.eachComponent("calendar",(function(i){var o=new e(i,t,n);r.push(o),i.coordinateSystem=o})),t.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=r[e.get("calendarIndex")||0])})),r},e.dimensions=["time","value"],e}();var KD=ni(),YD={path:null,compoundPath:null,group:xr,image:Ta,text:Ga},$D=function(e){var t=e.graphic;H(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])},QD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return a(t,e),t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,i=n.elements=t?[]:n.elements,o=[];this._flatten(r,o,null);var a=Zr(i,o,"normalMerge"),s=this._elOptionsToUpdate=[];R(a,(function(e,t){var n=e.newOption;n&&(s.push(n),function(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var r=M({},n),i=e[t],o=n.$action||"merge";if("merge"===o){if(i)A(i,r,!0),rf(i,r,{ignoreSize:!0}),af(n,i);else e[t]=r}else"replace"===o?e[t]=r:"remove"===o&&i&&(e[t]=null)}(i,t,n),function(e,t){if(!e)return;if(e.hv=t.hv=[rL(t,["left","right"]),rL(t,["top","bottom"])],"group"===e.type){var n=e,r=t;null==n.width&&(n.width=r.width=0),null==n.height&&(n.height=r.height=0)}}(i[t],n))}),this);for(var u=i.length-1;u>=0;u--)null==i[u]?i.splice(u,1):delete i[u].$action},t.prototype._flatten=function(e,t,n){R(e,(function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;"group"===e.type&&r&&this._flatten(r,t,e),delete e.children}}),this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(lf),eL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.init=function(){this._elMap=ue()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group;R(t,(function(t){var i=$r(t.id,null),o=null!=i?n.get(i):null,a=$r(t.parentId,null),s=null!=a?n.get(a):r,u=t.type,l=t.style;"text"===u&&l&&t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=l.verticalAlign=l.align=null);var c=t.textContent,f=t.textConfig;if(l&&LE(l,u,!!f,!!c)){var d=RE(l,u,!0);!f&&d.textConfig&&(f=t.textConfig=d.textConfig),!c&&d.textContent&&(c=d.textContent)}var h=function(e){return e=M({},e),R(["id","parentId","$action","hv","bounding","textContent"].concat(Kc),(function(t){delete e[t]})),e}(t);var p=t.$action||"merge";"merge"===p?o?o.attr(h):tL(i,s,h,n):"replace"===p?(nL(o,n),tL(i,s,h,n)):"remove"===p&&nL(o,n);var g=n.get(i);if(g&&c)if("merge"===p){var y=g.getTextContent();y?y.attr(c):g.setTextContent(new Ga(c))}else"replace"===p&&g.setTextContent(new Ga(c));if(g){var v=KD(g);v.__ecGraphicWidthOption=t.width,v.__ecGraphicHeightOption=t.height,function(e,t,n){var r=Ja(e).eventData;e.silent||e.ignore||r||(r=Ja(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});r&&(r.info=n.info)}(g,e,t),Ll({el:g,componentModel:e,itemName:g.name,itemTooltipOption:t.tooltip})}}))}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,i=this._elMap,o=t.getWidth(),a=t.getHeight(),s=0;s=0;s--){var f,d,h;if(h=null!=(d=$r((f=n[s]).id,null))?i.get(d):null){var p=h.parent;c=KD(p);tf(h,f,p===r?{width:o,height:a}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:f.hv,boundingMode:f.bounding})}}},t.prototype._clear=function(){var e=this._elMap;e.each((function(t){nL(t,e)})),this._elMap=ue()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(Lh);function tL(e,t,n,r){var i=n.type;var o=new(fe(YD,i)?YD[i]:sl(i))(n);t.add(o),r.set(e,o),KD(o).__ecGraphicId=e}function nL(e,t){var n=e&&e.parent;n&&("group"===e.type&&e.traverse((function(e){nL(e,t)})),t.removeKey(KD(e).__ecGraphicId),n.remove(e))}function rL(e,t){var n;return R(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}var iL=["x","y","radius","angle","single"],oL=["cartesian2d","polar","singleAxis"];function aL(e){return e+"Axis"}function sL(e,t){var n,r=ue(),i=[],o=ue();e.eachComponent({mainType:"dataZoom",query:t},(function(e){o.get(e.uid)||s(e)}));do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis((function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)})),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis((function(e,t){(r.get(e)||r.set(e,[]))[t]=!0}))}return i}function uL(e){var t=e.ecModel,n={infoList:[],infoMap:ue()};return e.eachTargetAxis((function(e,r){var i=t.getComponent(aL(e),r);if(i){var o=i.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(i)}}})),n}var lL=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}();function cL(e){var t={};return R(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}var fL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return a(t,e),t.prototype.init=function(e,t,n){var r=cL(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=cL(e);A(this.option,e,!0),A(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;R([["start","startValue"],["end","endValue"]],(function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)}),this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=ue();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each((function(e){e.indexList.length&&(this._noTarget=!1)}),this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return R(iL,(function(n){var r=this.getReferringComponents(aL(n),si);if(r.specified){t=!0;var i=new lL;R(r.models,(function(e){i.add(e.componentIndex)})),e.set(n,i)}}),this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i="vertical"===t?"y":"x";o(n.findComponents({mainType:i+"Axis"}),i)}r&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var i=t[0];if(i){var o=new lL;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",ai).models[0];a&&R(t,(function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",ai).models[0]&&o.add(e.componentIndex)}))}}}r&&R(iL,(function(t){if(r){var i=n.findComponents({mainType:aL(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new lL;o.add(i[0].componentIndex),e.set(t,o),r=!1}}}),this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis((function(t){!e&&(e=t)}),this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");R([["start","startValue"],["end","endValue"]],(function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")}))},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis((function(t,n){null==e&&(e=this.ecModel.getComponent(aL(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){R(n.indexList,(function(n){e.call(t,r,n)}))}))},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(aL(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;R([["start","startValue"],["end","endValue"]],(function(r){null==e[r[0]]&&null==e[r[1]]||(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])}),this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;R(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r=0}(t)){var n=aL(this._dimName),r=t.getReferringComponents(n,ai).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}}),this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return C(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];gL(["start","end"],(function(u,l){var c=e[u],f=e[u+"Value"];"percent"===i[l]?(null==c&&(c=o[l]),f=r.parse(Ar(c,o,n))):(t=!0,c=Ar(f=null==f?n[l]:r.parse(f),n,o)),s[l]=f,a[l]=c})),yL(s),yL(a);var u=this._minMaxSpan;function l(e,t,n,i,o){var a=o?"Span":"ValueSpan";mA(0,e,n,"all",u["min"+a],u["max"+a]);for(var s=0;s<2;s++)t[s]=Ar(e[s],n,i,!0),o&&(t[s]=r.parse(t[s]))}return t?l(s,a,n,o,!1):l(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];gL(n,(function(e){!function(e,t,n){t&&R(v_(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var i=e.getAxisModel(),o=s_(i.axis.scale,i,r).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&gL(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);r.length&&("weakFilter"===i?t.filterSelf((function(e){for(var n,i,a,s=0;so[1];if(l&&!c&&!f)return!0;l&&(a=!0),c&&(n=!0),f&&(i=!0)}return a&&n&&i})):gL(r,(function(n){if("empty"===i)e.setData(t=t.map(n,(function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN})));else{var r={};r[n]=o,t.selectRange(r)}})),gL(r,(function(e){t.setApproximateExtent(o,e)})))}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;gL(["min","max"],(function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=Ar(n[0]+o,n,[0,100],!0):null!=i&&(o=Ar(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=Ir(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}(),mL={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,i){var o=e.getComponent(aL(r),i);t(r,i,o,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new vL(t,r,o,e),n.push(i.__dzAxisProxy))}));var r=ue();return R(n,(function(e){R(e.getTargetSeriesModels(),(function(e){r.set(e.uid,e)}))})),r},overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(t,n){e.getAxisProxy(t,n).reset(e)})),e.eachTargetAxis((function(n,r){e.getAxisProxy(n,r).filterData(e,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var bL=!1;function wL(e){bL||(bL=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,mL),function(e){e.registerAction("dataZoom",(function(e,t){R(sL(t,e),(function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}))}(e),e.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function xL(e){e.registerComponentModel(dL),e.registerComponentView(pL),wL(e)}var _L=function(){},kL={};function SL(e,t){kL[e]=t}function TL(e){return kL[e]}var CL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;R(this.option.feature,(function(e,n){var r=TL(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),A(e,r.defaultOption))}))},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(lf);function AL(e,t){var n=Fc(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new Da({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}var OL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),e.get("show")){var o=+e.get("itemSize"),a=e.get("feature")||{},s=this._features||(this._features={}),u=[];R(a,(function(e,t){u.push(t)})),new Jm(this._featureNames||[],u).add(l).update(l).remove(V(l,null)).execute(),this._featureNames=u,function(e,t,n){var r=t.getBoxLayoutParams(),i=t.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=ef(r,o,i);Qc(t.get("orient"),e,t.get("itemGap"),a.width,a.height),tf(e,r,o,i)}(i,e,n),i.add(AL(i.getBoundingRect(),e)),i.eachChild((function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),u=s&&s.states.emphasis;if(u&&!U(u)&&t){var l=u.style||(u.style={}),c=On(t,Ga.makeFont(l)),f=e.x+i.x,d=!1;e.y+i.y+o+c.height>n.getHeight()&&(a.position="top",d=!0);var h=d?-5-c.height:o+8;f+c.width/2>n.getWidth()?(a.position=["100%",h],l.align="right"):f-c.width/2<0&&(a.position=[0,h],l.align="left")}}))}function l(l,c){var f,d=u[l],h=u[c],p=a[d],g=new ac(p,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===d&&(p.title=r.newTitle),d&&!h){if(function(e){return 0===e.indexOf("my")}(d))f={onclick:g.option.onclick,featureName:d};else{var y=TL(d);if(!y)return;f=new y}s[d]=f}else if(!(f=s[h]))return;if(f.uid=uc("toolbox-feature"),f.model=g,f.ecModel=t,f.api=n,f instanceof _L){if(!d&&h)return void(f.dispose&&f.dispose(t,n));if(!g.get("show")||f.unusable)return void(f.remove&&f.remove(t,n))}!function(r,a,s){var u,l,c=r.getModel("iconStyle"),f=r.getModel(["emphasis","iconStyle"]),d=a instanceof _L&&a.getIcons?a.getIcons():r.get("icon"),h=r.get("title")||{};"string"===typeof d?(u={})[s]=d:u=d;"string"===typeof h?(l={})[s]=h:l=h;var p=r.iconPaths={};R(u,(function(s,u){var d=El(s,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(c.getItemStyle()),d.ensureState("emphasis").style=f.getItemStyle();var h=new Ga({style:{text:l[u],align:f.get("textAlign"),borderRadius:f.get("textBorderRadius"),padding:f.get("textPadding"),fill:null},ignore:!0});d.setTextContent(h),Ll({el:d,componentModel:e,itemName:u,formatterParamsExtra:{title:l[u]}}),d.__title=l[u],d.on("mouseover",(function(){var t=f.getItemStyle(),n="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";h.setStyle({fill:f.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:f.get("textBackgroundColor")}),d.setTextConfig({position:f.get("textPosition")||n}),h.ignore=!e.get("showTitle"),ps(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",u])&&gs(this),h.hide()})),("emphasis"===r.get(["iconStatus",u])?ps:gs)(d),i.add(d),d.on("click",z(a.onclick,a,t,n,u)),p[u]=d}))}(g,f,d),g.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?ps:gs)(r[e])},f instanceof _L&&f.render&&f.render(g,t,n,r)}},t.prototype.updateView=function(e,t,n,r){R(this._features,(function(e){e instanceof _L&&e.updateView&&e.updateView(e.model,t,n,r)}))},t.prototype.remove=function(e,t){R(this._features,(function(n){n instanceof _L&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){R(this._features,(function(n){n instanceof _L&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(Lh),ML=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),o=i?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!==typeof MouseEvent||!f.browser.newEdge&&(f.browser.ie||f.browser.edge))if(window.navigator.msSaveOrOpenBlob||i){var s=a.split(","),u=s[0].indexOf("base64")>-1,l=i?decodeURIComponent(s[1]):s[1];u&&(l=atob(l));var c=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var d=l.length,h=new Uint8Array(d);d--;)h[d]=l.charCodeAt(d);var p=new Blob([h]);window.navigator.msSaveOrOpenBlob(p,c)}else{var g=document.createElement("iframe");document.body.appendChild(g);var y=g.contentWindow,v=y.document;v.open("image/svg+xml","replace"),v.write(l),v.close(),y.focus(),v.execCommand("SaveAs",!0,c),document.body.removeChild(g)}}else{var m=n.get("lang"),b='',w=window.open();w.document.write(b),w.document.title=r}else{var x=document.createElement("a");x.download=r+"."+o,x.target="_blank",x.href=a;var _=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});x.dispatchEvent(_)}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocale(["toolbox","saveAsImage","lang"])}},t}(_L);ML.prototype.unusable=!f.canvasSupported;var EL=ML,PL=[["line","bar"],["stack"]],IL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return R(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get(["seriesIndex",n]);if(DL[n]){var o,a={series:[]};R(PL,(function(e){I(e,n)>=0&&R(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},(function(e){var t=e.subType,i=e.id,o=DL[n](t,i,e,r);o&&(E(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var u=s.getAxesByScale("ordinal")[0];if(u){var l=u.dim+"Axis",c=e.getReferringComponents(l,ai).models[0].componentIndex;a[l]=a[l]||[];for(var f=0;f<=c;f++)a[l][c]=a[l][c]||{};a[l][c].boundaryGap="bar"===n}}})),"stack"===n&&(o=A({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title)),t.dispatchAction({type:"changeMagicType",currentType:n,newOption:a,newTitle:o,featureName:"magicType"})}},t}(_L),DL={line:function(e,t,n,r){if("bar"===e)return A({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return A({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i="__ec_magicType_stack__"===n.get("stack");if("line"===e||"bar"===e)return r.setIconStatus("stack",i?"normal":"emphasis"),A({id:t,stack:i?"":"__ec_magicType_stack__"},r.get(["option","stack"])||{},!0)}};Vv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));var LL=IL,RL=new Array(60).join("-");function NL(e){var t=[];return R(e,(function(e,n){var r=e.categoryAxis,i=e.valueAxis.dim,o=[" "].concat(N(e.series,(function(e){return e.name}))),a=[r.model.getCategories()];R(e.series,(function(e){var t=e.getRawData();a.push(e.getRawData().mapArray(t.mapDimension(i),(function(e){return e})))}));for(var s=[o.join("\t")],u=0;u=0)return!0}(e)){var i=function(e){for(var t=e.split(/\n+/g),n=[],r=N(jL(t.shift()).split(BL),(function(e){return{name:e,data:[]}})),i=0;i=0)&&e(i,r._targetInfoList)}))}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=nR[e.brushType](0,n,t);e.__rangeOffset={offset:iR[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){R(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&R(r.coordSyses,(function(r){var i=nR[e.brushType](1,r,e.range);n(e,i.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){R(e,(function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r=nR[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?iR[e.brushType](r.values,i.offset,function(e,t){var n=aR(e),r=aR(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}(r.xyMinMax,i.xyMinMax)):r.values}}),this)},e.prototype.makePanelOpts=function(e,t){return N(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:wO(r),isTargetByCursor:_O(r,e,n.coordSysModel),getLinearBrushOtherExtent:xO(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&I(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=$L(t,e),i=0;ie[1]&&e.reverse(),e}function $L(e,t){return ii(e,t,{includeMainTypes:ZL})}var QL={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=ue(),a={},s={};(n||r||i)&&(R(n,(function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0})),R(r,(function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0})),R(i,(function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),o.each((function(e){var i=e.coordinateSystem,o=[];R(i.getCartesians(),(function(e,t){(I(n,e.getAxis("x").model)>=0||I(r,e.getAxis("y").model)>=0)&&o.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:tR.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){R(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:tR.geo})}))}},eR=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],tR={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(kl(e)),t}},nR={lineX:V(rR,0),lineY:V(rR,1),rect:function(e,t,n){var r=t[qL[e]]([n[0][0],n[1][0]]),i=t[qL[e]]([n[0][1],n[1][1]]),o=[YL([r[0],i[0]]),YL([r[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:N(n,(function(n){var i=t[qL[e]](n);return r[0][0]=Math.min(r[0][0],i[0]),r[1][0]=Math.min(r[1][0],i[1]),r[0][1]=Math.max(r[0][1],i[0]),r[1][1]=Math.max(r[1][1],i[1]),i})),xyMinMax:r}}};function rR(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=YL(N([0,1],(function(e){return t?i.coordToData(i.toLocalCoord(r[e])):i.toGlobalCoord(i.dataToCoord(r[e]))}))),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var iR={lineX:V(oR,0),lineY:V(oR,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return N(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function oR(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function aR(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var sR,uR,lR=KL,cR=R,fR="\0_ec_\0"+"toolbox-dataZoom_",dR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new bO(n.getZr()),this._brushController.on("brush",z(this._onBrush,this)).mount()),function(e,t,n,r,i){var o=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(o="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=o,e.setIconStatus("zoom",o?"emphasis":"normal");var a=new lR(pR(e),t,{include:["grid"]}).makePanelOpts(i,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,n),function(e,t){e.setIconStatus("back",function(e){return JL(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){hR[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new lR(pR(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,(function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(i("x",n,t[0]),i("y",n,t[1])):i({lineX:"x",lineY:"y"}[r],n,t)}})),function(e,t){var n=JL(e);UL(t,(function(t,r){for(var i=n.length-1;i>=0;i--){if(n[i][r])break}if(i<0){var o=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(o){var a=o.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),n.push(t)}(r,n),this._dispatchZoomAction(n)}function i(e,t,i){var o=t.getAxis(e),a=o.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)})),r}(e,a,r),u=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(i=mA(0,i.slice(),o.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:i[0],endValue:i[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];cR(e,(function(e,n){t.push(C(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(_L),hR={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=JL(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return UL(n,(function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n]){r[n]=e;break}})),r}(this.ecModel))}};function pR(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}sR="dataZoom",uR=function(e){var t=e.getComponent("toolbox",0);if(t){var n=t.getModel(["feature","dataZoom"]),r=[],i=ii(e,pR(n));return cR(i.xAxisModels,(function(e){return o(e,"xAxis","xAxisIndex")})),cR(i.yAxisModels,(function(e){return o(e,"yAxis","yAxisIndex")})),r}function o(e,t,i){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:fR+t+o};a[i]=o,r.push(a)}},re(null==kf.get(sR)&&uR),kf.set(sR,uR);var gR=dR;var yR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(lf);function vR(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function mR(e){if(f.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n-1?(o+="top:50%",a+="translateY(-50%) rotate("+("left"===i?-225:-45)+"deg)"):(o+="left:50%",a+="translateX(-50%) rotate("+("top"===i?225:45)+"deg)");var s=t+" solid 1px;";return'
'}(n.get("backgroundColor"),r,i)),G(e))o.innerHTML=e;else if(e){o.innerHTML="",H(e)||(e=[e]);for(var a=0;a=0;o--){var a=e[o];a&&(a instanceof ac&&(a=a.get("tooltip",!0)),G(a)&&(a={formatter:a}),a&&(r=new ac(a,r,i)))}return r}function BR(e,t){return e.dispatchAction||z(t.dispatchAction,t)}function FR(e){return"center"===e||"middle"===e}var zR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.init=function(e,t){if(!f.node){var n,r=e.getComponent("tooltip"),i=r.get("renderMode");this._renderMode="auto"===(n=i)?f.domSupported?"html":"richText":n||"html",this._tooltipContent="richText"===this._renderMode?new IR(t):new OR(t.getDom(),t,{appendToBody:r.get("appendToBody",!0)})}},t.prototype.render=function(e,t,n){if(!f.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n,this._alwaysShowContent=e.get("alwaysShowContent");var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");OI("itemTooltip",this._api,DR((function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(e,t,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!f.node){var i=BR(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r=oi(e).queryOptionMap,i=r.keys()[0];if(!i||"series"===i)return;var o,a=ui(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;if(n.getViewOfComponentModel(a).group.traverse((function(t){var n=Ja(t).tooltipConfig;if(n&&n.name===e.name)return o=t,!0})),o)return{componentMainType:i,componentIndex:a.componentIndex,el:o}}(r,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y){var u=NR;u.x=r.x,u.y=r.y,u.update(),Ja(u).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:u},i)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=DI(r,t),c=l.point[0],d=l.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:l.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(BR(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s)if("axis"===jR([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var i,o;this._lastDataByCoordSys=null,pg(n,(function(e){return null!=Ja(e).dataIndex?(i=e,!0):null!=Ja(e).tooltipConfig?(o=e,!0):void 0}),!0),i?this._showSeriesItemTooltip(e,i,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=z(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=jR([t.tooltipOption],r),a=this._renderMode,s=[],u=fh("section",{blocks:[],noHeader:!0}),l=[],c=new wh;LR(e,(function(e){LR(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),r=e.value;if(t&&null!=r){var i=pI(r,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),o=fh("section",{header:i,noHeader:!ie(i),sortBlocks:!0,blocks:[]});u.blocks.push(o),R(e.seriesDataIndices,(function(u){var f=n.getSeriesByIndex(u.seriesIndex),d=u.dataIndexInside,h=f.getDataParams(d);h.axisDim=e.axisDim,h.axisIndex=e.axisIndex,h.axisType=e.axisType,h.axisId=e.axisId,h.axisValue=h_(t.axis,{value:r}),h.axisValueLabel=i,h.marker=c.makeTooltipMarker("item",Wc(h.color),a);var p=jd(f.formatTooltip(d,!0,null));p.markupFragment&&o.blocks.push(p.markupFragment),p.markupText&&l.push(p.markupText),s.push(h)}))}}))})),u.blocks.reverse(),l.reverse();var f=t.position,d=o.get("order"),h=ph(u,c,a,d,n.get("useUTC"),o.get("textStyle"));h&&l.unshift(h);var p="richText"===a?"\n\n":"
",g=l.join(p);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(o,f,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",i[0],i[1],f,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Ja(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,u=i.dataIndex,l=i.dataType,c=s.getData(l),f=this._renderMode,d=e.positionDefault,h=jR([c.getItemModel(u),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=h.get("trigger");if(null==p||"item"===p){var g=s.getDataParams(u,l),y=new wh;g.marker=y.makeTooltipMarker("item",Wc(g.color),f);var v=jd(s.formatTooltip(u,!1,l)),m=h.get("order"),b=v.markupFragment?ph(v.markupFragment,y,f,m,r.get("useUTC"),h.get("textStyle")):v.markupText,w="item_"+s.name+"_"+u;this._showOrMove(h,(function(){this._showTooltipContent(h,b,g,w,e.offsetX,e.offsetY,e.position,e.target,y)})),n({type:"showTip",dataIndexInside:u,dataIndex:c.getRawIndex(u),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=Ja(t),i=r.tooltipConfig.option;if(G(i)){i={content:i,formatter:i}}var o=[i],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&o.push(a);var s=e.positionDefault,u=jR(o,this._tooltipModel,s?{position:s}:null),l=u.get("content"),c=Math.random()+"",f=new wh;this._showOrMove(u,(function(){var n=C(u.get("formatterParams")||{});this._showTooltipContent(u,l,n,c,e.offsetX,e.offsetY,e.position,t,f)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,u){if(this._ticket="",e.get("showContent")&&e.get("show")){var l=this._tooltipContent,c=e.get("formatter");a=a||e.get("position");var f=t,d=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c&&G(c)){var h=e.ecModel.get("useUTC"),p=H(n)?n[0]:n;f=c,p&&p.axisType&&p.axisType.indexOf("time")>=0&&(f=wc(p.axisValue,f,h)),f=Xc(f,n,!0)}else if(U(c)){var g=DR((function(t,r){t===this._ticket&&(l.setContent(r,u,e,d,a),this._updatePosition(e,a,i,o,l,n,s))}),this);this._ticket=r,f=c(n,r,g)}l.setContent(f,u,e,d,a),l.show(e,d),this._updatePosition(e,a,i,o,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||H(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:H(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),u=this._api.getHeight();t=t||e.get("position");var l=i.getSize(),c=e.get("align"),f=e.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),U(t)&&(t=t([n,r],o,i.el,d,{viewSize:[s,u],contentSize:l.slice()})),H(t))n=RR(t[0],s),r=RR(t[1],u);else if(W(t)){var h=t;h.width=l[0],h.height=l[1];var p=ef(h,{width:s,height:u});n=p.x,r=p.y,c=null,f=null}else if(G(t)&&a){var g=function(e,t,n){var r=n[0],i=n[1],o=0,a=0,s=t.width,u=t.height;switch(e){case"inside":o=t.x+s/2-r/2,a=t.y+u/2-i/2;break;case"top":o=t.x+s/2-r/2,a=t.y-i-10;break;case"bottom":o=t.x+s/2-r/2,a=t.y+u+10;break;case"left":o=t.x-r-10-5,a=t.y+u/2-i/2;break;case"right":o=t.x+s+10+5,a=t.y+u/2-i/2}return[o,a]}(t,d,l);n=g[0],r=g[1]}else{g=function(e,t,n,r,i,o,a){var s=n.getOuterSize(),u=s.width,l=s.height;null!=o&&(e+u+o+2>r?e-=u+o:e+=o);null!=a&&(t+l+a>i?t-=l+a:t+=a);return[e,t]}(n,r,i,s,u,c?null:20,f?null:20);n=g[0],r=g[1]}if(c&&(n-=FR(c)?l[0]/2:"right"===c?l[0]:0),f&&(r-=FR(f)?l[1]/2:"bottom"===f?l[1]:0),vR(e)){g=function(e,t,n,r,i){var o=n.getOuterSize(),a=o.width,s=o.height;return e=Math.min(e+a,r)-a,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,i,s,u);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&LR(t,(function(t,r){var i=t.dataByAxis||[],o=(e[r]||{}).dataByAxis||[];(n=n&&i.length===o.length)&&LR(i,(function(e,t){var r=o[t]||{},i=e.seriesDataIndices||[],a=r.seriesDataIndices||[];(n=n&&e.value===r.value&&e.axisType===r.axisType&&e.axisId===r.axisId&&i.length===a.length)&&LR(i,(function(e,t){var r=a[t];n=n&&e.seriesIndex===r.seriesIndex&&e.dataIndex===r.dataIndex}))}))})),this._lastDataByCoordSys=e,!!n},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){f.node||(this._tooltipContent.dispose(),PI("itemTooltip",t))},t.type="tooltip",t}(Lh);var VR=["rect","polygon","keep","clear"];function HR(e,t){var n=Jr(e?e.brush:[]);if(n.length){var r=[];R(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(r=r.concat(t))}));var i=e&&e.toolbox;H(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var o=i.feature||(i.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,r),function(e){var t={};R(e,(function(e){t[e]=1})),e.length=0,R(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,VR)}}var UR=R;function GR(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function JR(e,t,n){var r={};return UR(t,(function(t){var i=r[t]=function(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}();UR(e[t],(function(e,r){if(TT.isValidType(r)){var o={type:r,visual:e};n&&n(o,t),i[r]=new TT(o),"opacity"===r&&((o=C(o)).type="colorAlpha",i.__hidden.__alphaForOpacity=new TT(o))}}))})),r}function XR(e,t,n){var r;R(n,(function(e){t.hasOwnProperty(e)&&GR(t[e])&&(r=!0)})),r&&R(n,(function(n){t.hasOwnProperty(n)&&GR(t[n])?e[n]=C(t[n]):delete e[n]}))}var WR={lineX:qR(0),lineY:qR(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&vy(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,o=e.y,a=e.width,s=e.height,u=r[0];return!!(vy(r,i,o)||vy(r,i+a,o)||vy(r,i,o+s)||vy(r,i+a,o+s)||_n.create(e).contain(u[0],u[1])||Pl(i,o,i+a,o,r)||Pl(i,o,i,o+s,r)||Pl(i+a,o,i+a,o+s,r)||Pl(i,o+s,i+a,o+s,r))||void 0}}};function qR(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,r){if(t){var i=r.range;return ZR(t[e],i)}},rect:function(r,i,o){if(r){var a=o.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]t[0][1]&&(t[0][1]=o[0]),o[1]t[1][1]&&(t[1][1]=o[1])}return t&&nN(t)}};function nN(e){return new _n(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var rN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new bO(t.getZr())).on("brush",z(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){YR(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:C(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:C(n),$from:t})},t.type="brush",t}(Lh);function iN(e,t){return A({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new ac(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var oN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return a(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&XR(n,e,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=N(e,(function(e){return iN(this.option,e)}),this))},t.prototype.setBrushOption=function(e){this.brushOption=iN(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(lf),aN=["rect","polygon","lineX","lineY","keep","clear"],sN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(e,t,n){var r,i,o;t.eachComponent({mainType:"brush"},(function(e){r=e.brushType,i=e.brushOption.brushMode||"single",o=o||!!e.areas.length})),this._brushType=r,this._brushMode=i,R(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?o:t===r)?"emphasis":"normal")}))},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return R(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:aN.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocale(["toolbox","brush","title"])}},t}(_L);var uN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return a(t,e),t.type="title",t.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(lf),lN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Q(e.get("textBaseline"),e.get("textVerticalAlign")),u=new Ga({style:zl(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=u.getBoundingRect(),c=e.get("subtext"),f=new Ga({style:zl(o,{text:c,fill:o.getTextColor(),y:l.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),h=e.get("sublink"),p=e.get("triggerEvent",!0);u.silent=!d&&!p,f.silent=!h&&!p,d&&u.on("click",(function(){qc(d,"_"+e.get("target"))})),h&&f.on("click",(function(){qc(h,"_"+e.get("subtarget"))})),Ja(u).eventData=Ja(f).eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(u),c&&r.add(f);var g=r.getBoundingRect(),y=e.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=ef(y,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),r.x=v.x,r.y=v.y,r.markRedraw();var m={align:a,verticalAlign:s};u.setStyle(m),f.setStyle(m),g=r.getBoundingRect();var b=v.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var x=new Da({shape:{x:g.x-b[3],y:g.y-b[0],width:g.width+b[1]+b[3],height:g.height+b[0]+b[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type="title",t}(Lh);var cN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return a(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],r=t.axisType,i=this._names=[];"category"===r?(e=[],R(n,(function(t,n){var r,o=$r(qr(t),"");W(t)?(r=C(t)).value=n:r=n,e.push(r),i.push(o)}))):e=n;var o={category:"ordinal",time:"time",value:"number"}[r]||"number";(this._data=new mb([{name:"value",type:o}],this)).initData(e,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(lf),fN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="timeline.slider",t.defaultOption=lc(cN.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(cN);D(fN,Nd.prototype);var dN=fN,hN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="timeline",t}(Lh),pN=function(e){function t(t,n,r,i){var o=e.call(this,t,n,r)||this;return o.type=i||"value",o}return a(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(D_),gN=Math.PI,yN=ni();function vN(e,t,n,r,i,o){var a=t.get("color");i?(i.setColor(a),n.add(i),o&&o.onUpdate(i)):((i=Tg(e.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(i),o&&o.onCreate(i));var s=t.getItemStyle(["color"]);i.setStyle(s),r=A({rectHover:!0,z2:100},r,!0);var u=e.get("symbolSize");u=u instanceof Array?u.slice():[+u,+u],r.scaleX=u[0]/2,r.scaleY=u[1]/2;var l=e.get("symbolOffset");l&&(r.x=r.x||0,r.y=r.y||0,r.x+=Or(l[0],u[0]),r.y+=Or(l[1],u[1]));var c=e.get("symbolRotate");return r.rotation=(c||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function mN(e,t,n,r,i,o){if(!e.dragging){var a=i.getModel("checkpointStyle"),s=r.dataToCoord(i.getData().get("value",n));if(o||!a.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var u={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},u),t&&t.animateTo({shape:{x2:s}},u)}}}var bN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var r=this._layout(e,n),i=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return fh("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},R(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](r,i,a,e)}),this),this._renderAxisLabel(r,o,a,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,r,i,o,a=e.get(["label","position"]),s=e.get("orient"),u=function(e,t){return ef(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t),l={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?u.y+u.height/2=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:gN/2},d="vertical"===s?u.height:u.width,h=e.getModel("controlStyle"),p=h.get("show",!0),g=p?h.get("itemSize"):0,y=p?h.get("itemGap"):0,v=g+y,m=e.get(["label","rotate"])||0;m=m*gN/180;var b=h.get("position",!0),w=p&&h.get("showPlayBtn",!0),x=p&&h.get("showPrevBtn",!0),_=p&&h.get("showNextBtn",!0),k=0,S=d;"left"===b||"bottom"===b?(w&&(r=[0,0],k+=v),x&&(i=[k,0],k+=v),_&&(o=[S-g,0],S-=v)):(w&&(r=[S-g,0],S-=v),x&&(i=[0,0],k+=v),_&&(o=[S-g,0],S-=v));var T=[k,S];return e.get("inverse")&&T.reverse(),{viewRect:u,mainLength:d,orient:s,rotation:f[s],labelRotation:m,labelPosOpt:n,labelAlign:e.get(["label","align"])||l[s],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||c[s],playPosition:r,prevBtnPosition:i,nextBtnPosition:o,axisExtent:T,controlSize:g,controlGap:y}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if("vertical"===e.orient){var o=[1,0,0,1,0,0],a=i.x,s=i.y+i.height;dt(o,o,[-a,-s]),ht(o,o,-gN/2),dt(o,o,[a,s]),(i=i.clone()).applyTransform(o)}var u=y(i),l=y(n.getBoundingRect()),c=y(r.getBoundingRect()),f=[n.x,n.y],d=[r.x,r.y];d[0]=f[0]=u[0][0];var h,p=e.labelPosOpt;null==p||G(p)?(v(f,l,u,1,h="+"===p?0:1),v(d,c,u,1,1-h)):(v(f,l,u,1,h=p>=0?0:1),d[1]=f[1]+p);function g(e){e.originX=u[0][0]-e.x,e.originY=u[1][0]-e.y}function y(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}n.setPosition(f),r.setPosition(d),n.rotation=r.rotation=e.rotation,g(n),g(r)},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get("axisType"),i=function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Dx({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new Jx({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new Nx}}(t,r);i.getTicks=function(){return n.mapArray(["value"],(function(e){return{value:e}}))};var o=n.getDataExtent("value");i.setExtent(o[0],o[1]),i.niceTicks();var a=new pN("value",i,e.axisExtent,r);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new xr;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get(["lineStyle","show"])){var o=new Lu({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:M({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(o);var a=this._progressLine=new Lu({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:E({lineCap:"round",lineWidth:o.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,o=r.getData(),a=n.scale.getTicks();this._tickSymbols=[],R(a,(function(e){var a=n.dataToCoord(e.value),s=o.getItemModel(e.value),u=s.getModel("itemStyle"),l=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),f={x:a,y:0,onclick:z(i._changeTimeline,i,e.value)},d=vN(s,u,t,f);d.ensureState("emphasis").style=l.getItemStyle(),d.ensureState("progress").style=c.getItemStyle(),As(d);var h=Ja(d);s.get("tooltip")?(h.dataIndex=e.value,h.dataModel=r):h.dataIndex=h.dataModel=null,i._tickSymbols.push(d)}))},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get("show")){var o=r.getData(),a=n.getViewLabels();this._tickLabels=[],R(a,(function(r){var a=r.tickValue,s=o.getItemModel(a),u=s.getModel("label"),l=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),f=n.dataToCoord(r.tickValue),d=new Ga({x:f,y:0,rotation:e.labelRotation-e.rotation,onclick:z(i._changeTimeline,i,a),silent:!1,style:zl(u,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState("emphasis").style=zl(l),d.ensureState("progress").style=zl(c),t.add(d),As(d),yN(d).dataIndex=a,i._tickLabels.push(d)}))}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,o=e.rotation,a=r.getModel("controlStyle").getItemStyle(),s=r.getModel(["emphasis","controlStyle"]).getItemStyle(),u=r.getPlayState(),l=r.get("inverse",!0);function c(e,n,u,l){if(e){var c=In(Q(r.get(["controlStyle",n+"BtnSize"]),i),i),f=function(e,t,n,r){var i=r.style,o=El(e.get(["controlStyle",t]),r||{},new _n(n[0],n[1],n[2],n[3]));i&&o.setStyle(i);return o}(r,n+"Icon",[0,-c/2,c,c],{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-o:0,rectHover:!0,style:a,onclick:u});f.ensureState("emphasis").style=s,t.add(f),As(f)}}c(e.nextBtnPosition,"next",z(this._changeTimeline,this,l?"-":"+")),c(e.prevBtnPosition,"prev",z(this._changeTimeline,this,l?"+":"-")),c(e.playPosition,u?"stop":"play",z(this._handlePlayClick,this,!u),!0)},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),o=r.getCurrentIndex(),a=i.getItemModel(o).getModel("checkpointStyle"),s=this,u={onCreate:function(e){e.draggable=!0,e.drift=z(s._handlePointerDrag,s),e.ondragend=z(s._handlePointerDragend,s),mN(e,s._progressLine,o,n,r,!0)},onUpdate:function(e){mN(e,s._progressLine,o,n,r)}};this._currentPointer=vN(a,a,this._mainGroup,{},this._currentPointer,u)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=Er(this._axis.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(a[o]=+a[o].toFixed(f)),[a,c]}var EN={min:V(MN,"min"),max:V(MN,"max"),average:V(MN,"average"),median:V(MN,"median")};function PN(e,t){var n=e.getData(),r=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!H(t.coord)&&r){var i=r.dimensions,o=IN(t,n,r,e);if((t=C(t)).type&&EN[t.type]&&o.baseAxis&&o.valueAxis){var a=I(i,o.baseAxis.dim),s=I(i,o.valueAxis.dim),u=EN[t.type](n,o.baseDataDim,o.valueDataDim,a,s);t.coord=u[0],t.value=u[1]}else{for(var l=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],c=0;c<2;c++)EN[l[c]]&&(l[c]=RN(n,n.mapDimension(i[c]),l[c]));t.coord=l}}return t}function IN(e,t,n,r){var i={};return null!=e.valueIndex||null!=e.valueDim?(i.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=n.getAxis(function(e,t){var n=e.getData(),r=n.dimensions;t=n.getDimension(t);for(var i=0;i=0&&"number"===typeof u&&(u=+u.toFixed(Math.min(p,20))),d.coord[c]=h.coord[c]=u,i=[d,h,{type:a,valueIndex:r.valueIndex,value:u}]}else i=[]}var g=[PN(e,i[0]),PN(e,i[1]),M({},i[2])];return g[2].type=g[2].type||null,A(g[2],g[0]),A(g[2],g[1]),g};function UN(e){return!isNaN(e)&&!isFinite(e)}function GN(e,t,n,r){var i=1-e,o=r.dimensions[e];return UN(t[i])&&UN(n[i])&&t[e]===n[e]&&r.getAxis(o).containData(t[e])}function JN(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(GN(1,n,r,e)||GN(0,n,r,e)))return!0}return DN(e,t[0])&&DN(e,t[1])}function XN(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),u=Or(s.get("x"),i.getWidth()),l=Or(s.get("y"),i.getHeight());if(isNaN(u)||isNaN(l)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,f=e.get(c[0],t),d=e.get(c[1],t);o=a.dataToPoint([f,d])}if(Qb(a,"cartesian2d")){var h=a.getAxis("x"),p=a.getAxis("y");c=a.dimensions;UN(e.get(c[0],t))?o[0]=h.toGlobalCoord(h.getExtent()[n?0:1]):UN(e.get(c[1],t))&&(o[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(u)||(o[0]=u),isNaN(l)||(o[1]=l)}else o=[u,l];e.setItemLayout(t,o)}var WN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=AN.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),i=VN(t).from,o=VN(t).to;i.each((function(t){XN(i,t,!0,e,n),XN(o,t,!1,e,n)})),r.each((function(e){r.setItemLayout(e,[i.getItemLayout(e),o.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,u=s.get(o)||s.set(o,new TC);this.group.add(u.group);var l=function(e,t,n){var r;r=e?N(e&&e.dimensions,(function(e){return E({name:e},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{})})):[{name:"value",type:"float"}];var i=new mb(r,n),o=new mb(r,n),a=new mb([],n),s=N(n.get("data"),V(HN,t,e,n));e&&(s=B(s,V(JN,e)));var u=e?LN:function(e){return e.value};return i.initData(N(s,(function(e){return e[0]})),null,u),o.initData(N(s,(function(e){return e[1]})),null,u),a.initData(N(s,(function(e){return e[2]}))),a.hasItemOption=!0,{from:i,to:o,line:a}}(i,e,t),c=l.from,f=l.to,d=l.line;VN(t).from=c,VN(t).to=f,t.setData(d);var h=t.get("symbol"),p=t.get("symbolSize"),g=t.get("symbolRotate"),y=t.get("symbolOffset");function v(t,n,i){var o=t.getItemModel(n);XN(t,n,i,e,r);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Mp(a,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:Q(o.get("symbolOffset"),y[i?0:1]),symbolRotate:Q(o.get("symbolRotate",!0),g[i?0:1]),symbolSize:Q(o.get("symbolSize"),p[i?0:1]),symbol:Q(o.get("symbol",!0),h[i?0:1]),style:s})}H(h)||(h=[h,h]),H(p)||(p=[p,p]),H(g)||(g=[g,g]),H(y)||(y=[y,y]),l.from.each((function(e){v(c,e,!0),v(f,e,!1)})),d.each((function(e){var t=d.getItemModel(e).getModel("lineStyle").getLineStyle();d.setItemLayout(e,[c.getItemLayout(e),f.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),d.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:f.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(e,"symbolOffset"),toSymbolRotate:f.getItemVisual(e,"symbolRotate"),toSymbolSize:f.getItemVisual(e,"symbolSize"),toSymbol:f.getItemVisual(e,"symbol"),style:t})})),u.updateData(d),l.line.eachItemGraphicEl((function(e,n){e.traverse((function(e){Ja(e).dataModel=t}))})),this.markKeep(u),u.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(jN);var qN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markArea",t.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(AN),ZN=ni(),KN=function(e,t,n,r){var i=PN(e,r[0]),o=PN(e,r[1]),a=i.coord,s=o.coord;a[0]=$(a[0],-1/0),a[1]=$(a[1],-1/0),s[0]=$(s[0],1/0),s[1]=$(s[1],1/0);var u=O([{},i,o]);return u.coord=[i.coord,o.coord],u.x0=i.x,u.y0=i.y,u.x1=o.x,u.y1=o.y,u};function YN(e){return!isNaN(e)&&!isFinite(e)}function $N(e,t,n,r){var i=1-e;return YN(t[i])&&YN(n[i])}function QN(e,t){var n=t.coord[0],r=t.coord[1];return!!(Qb(e,"cartesian2d")&&n&&r&&($N(1,n,r)||$N(0,n,r)))||(DN(e,{coord:n,x:t.x0,y:t.y0})||DN(e,{coord:r,x:t.x1,y:t.y1}))}function ej(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),u=Or(s.get(n[0]),i.getWidth()),l=Or(s.get(n[1]),i.getHeight());if(isNaN(u)||isNaN(l)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(n,t));else{var c=[h=e.get(n[0],t),p=e.get(n[1],t)];a.clampData&&a.clampData(c,c),o=a.dataToPoint(c,!0)}if(Qb(a,"cartesian2d")){var f=a.getAxis("x"),d=a.getAxis("y"),h=e.get(n[0],t),p=e.get(n[1],t);YN(h)?o[0]=f.toGlobalCoord(f.getExtent()["x0"===n[0]?0:1]):YN(p)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(u)||(o[0]=u),isNaN(l)||(o[1]=l)}else o=[u,l];return o}var tj=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];var nj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=AN.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each((function(t){var i=N(tj,(function(i){return ej(r,t,i,e,n)}));r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape("points",i)}))}}),this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,u=s.get(o)||s.set(o,{group:new xr});this.group.add(u.group),this.markKeep(u);var l=function(e,t,n){var r,i;e?(r=N(e&&e.dimensions,(function(e){var n=t.getData();return E({name:e},n.getDimensionInfo(n.mapDimension(e))||{})})),i=new mb(N(["x0","y0","x1","y1"],(function(e,t){return{name:e,type:r[t%2].type}})),n)):i=new mb(r=[{name:"value",type:"float"}],n);var o=N(n.get("data"),V(KN,t,e,n));e&&(o=B(o,V(QN,e)));var a=e?function(e,t,n,r){return e.coord[Math.floor(r/2)][r%2]}:function(e){return e.value};return i.initData(o,null,a),i.hasItemOption=!0,i}(i,e,t);t.setData(l),l.each((function(t){var n=N(tj,(function(n){return ej(l,t,n,e,r)})),o=i.getAxis("x").scale,s=i.getAxis("y").scale,u=o.getExtent(),c=s.getExtent(),f=[o.parse(l.get("x0",t)),o.parse(l.get("x1",t))],d=[s.parse(l.get("y0",t)),s.parse(l.get("y1",t))];Er(f),Er(d);var h=!!(u[0]>f[1]||u[1]d[1]||c[1]=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolSize:"auto",inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",decal:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(lf),ij=V,oj=R,aj=xr;function sj(e,t,n,r){cj(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),lj(e,t,n,r)}function uj(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r0?2:0:l[d]=y}var h=t.getModel("lineStyle"),p=Ql.concat([["inactiveColor"],["inactiveWidth"]]),g={};for(c=0;c0?2:0:g[d]=y}if("auto"===l.fill&&(l.fill=i.fill),"auto"===l.stroke&&(l.stroke=i.fill),"auto"===g.stroke&&(g.stroke=i.fill),!a){var v=t.get("inactiveBorderWidth"),m=l[e.indexOf("empty")>-1?"fill":"stroke"];l.lineWidth="auto"===v?i.lineWidth>0&&m?2:0:l.lineWidth,l.fill=t.get("inactiveColor"),l.stroke=t.get("inactiveBorderColor"),g.stroke=n.get("inactiveColor"),g.lineWidth=n.get("inactiveWidth")}return{itemStyle:l,lineStyle:g}}(u=g||u||"roundRect",r,i.getModel("lineStyle"),a,s,c,h),v=new aj,m=r.getModel("textStyle");"function"!==typeof e.getLegendIcon||g?v.add(function(e){var t=e.symbolType||"roundRect",n=Tg(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:f,itemHeight:d,symbolType:u,symbolKeepAspect:p,itemStyle:y.itemStyle,lineStyle:y.lineStyle})):v.add(e.getLegendIcon({itemWidth:f,itemHeight:d,symbolType:u,symbolKeepAspect:p,itemStyle:y.itemStyle,lineStyle:y.lineStyle}));var b="left"===o?f+5:-5,w=o,x=i.get("formatter"),_=t;"string"===typeof x&&x?_=x.replace("{name}",null!=t?t:""):"function"===typeof x&&(_=x(t));var k=r.get("inactiveColor");v.add(new Ga({style:zl(m,{text:_,x:b,y:d/2,fill:h?m.getTextColor():k,align:w,verticalAlign:"middle"})}));var S=new Da({shape:v.getBoundingRect(),invisible:!0}),T=r.getModel("tooltip");return T.get("show")&&Ll({el:S,componentModel:i,itemName:t,itemTooltipOption:T.option}),v.add(S),v.eachChild((function(e){e.silent=!0})),S.silent=!l,this.getContentGroup().add(v),As(v),v.__legendDataIndex=n,v},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Qc(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var u=a.getBoundingRect(),l=[-u.x,-u.y];if(s.markRedraw(),a.markRedraw(),i){Qc("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),f=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),h=e.getOrient().index,p=0===h?"width":"height",g=0===h?"height":"width",y=0===h?"y":"x";"end"===o?f[h]+=u[p]+d:l[h]+=c[p]+d,f[1-h]+=u[g]/2-c[g]/2,s.x=f[0],s.y=f[1],a.x=l[0],a.y=l[1];var v={x:0,y:0};return v[p]=u[p]+d+c[p],v[g]=Math.max(u[g],c[g]),v[y]=Math.min(0,c[y]+f[1-h]),v}return a.x=l[0],a.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Lh);function dj(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;nn[i],p=[-f.x,-f.y];t||(p[r]=u[s]);var g=[0,0],y=[-d.x,-d.y],v=Q(e.get("pageButtonGap",!0),e.get("itemGap",!0));h&&("end"===e.get("pageButtonPosition",!0)?y[r]+=n[i]-d[i]:g[r]+=d[i]+v);y[1-r]+=f[o]/2-d[o]/2,u.setPosition(p),l.setPosition(g),c.setPosition(y);var m={x:0,y:0};if(m[i]=h?n[i]:f[i],m[o]=Math.max(f[o],d[o]),m[a]=Math.min(0,d[a]+y[1-r]),l.__rectSize=n[i],h){var b={x:0,y:0};b[i]=Math.max(n[i]-d[i]-v,0),b[o]=m[o],l.setClipPath(new Da({shape:b})),l.__rectSize=b[i]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(e);return null!=w.pageIndex&&vl(u,{x:w.contentPosition[0],y:w.contentPosition[1]},h?e:null),this._updatePageInfoView(e,w),m},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")}));var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",G(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=mj[i],a=bj[i],s=this._findTargetItemIndex(t),u=n.children(),l=u[s],c=u.length,f=c?1:0,d={contentPosition:[n.x,n.y],pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return d;var h=m(l);d.contentPosition[i]=-h.s;for(var p=s+1,g=h,y=h,v=null;p<=c;++p)(!(v=m(u[p]))&&y.e>g.s+r||v&&!b(v,g.s))&&(g=y.i>g.i?y:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),y=v;for(p=s-1,g=h,y=h,v=null;p>=-1;--p)(v=m(u[p]))&&b(y,v.s)||!(g.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(fj);function xj(e){Zv(pj),e.registerComponentModel(yj),e.registerComponentView(wj),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}var _j=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="dataZoom.inside",t.defaultOption=lc(fL.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(fL),kj=ni();function Sj(e,t,n){kj(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}function Tj(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function Cj(e,t){e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Aj(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function Oj(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=kj(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=ue());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){R(uL(e).infoList,(function(n){var i=n.model.uid,o=r.get(i)||r.set(i,function(e,t){var n={model:t,containsPoint:V(Aj,t),dispatchAction:V(Cj,e),dataZoomInfoMap:null,controller:null},r=n.controller=new Nk(e.getZr());return R(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(i){if(t.isAvailableBehavior(i.model.option)){var o=(i.getRange||{})[e],a=o&&o(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&r.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=ue())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var o=i.keys()[0];null!=o&&(t=i.get(o))}if(t){var a=function(e){var t,n={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return e.each((function(e){var i=e.model,o=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");n["type_"+o]>n["type_"+t]&&(t=o),r=r&&i.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),qh(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else Tj(r,e)}))}))}var Mj=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return a(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),Sj(r,t,{pan:z(Ej.pan,this),zoom:z(Ej.zoom,this),scrollMove:z(Ej.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=kj(e).coordSysRecordMap,r=n.keys(),i=0;i0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],l=Math.max(1/r.scale,0);o[0]=(o[0]-u)*l+u,o[1]=(o[1]-u)*l+u;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return mA(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1]?o:void 0}},pan:Pj((function(e,t,n,r,i,o){var a=Ij[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:Pj((function(e,t,n,r,i,o){return Ij[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta}))};function Pj(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return mA(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var Ij={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,r,i){var o=n.axis,a={},s=i.model.coordinateSystem,u=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,r,i){var o=n.axis,a=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},Dj=Mj;function Lj(e){wL(e),e.registerComponentModel(_j),e.registerComponentView(Dj),Oj(e)}var Rj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=lc(fL.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(fL),Nj=Da,jj=["line","bar","candlestick","scatter"],Bj={easing:"cubicOut",duration:100};function Fj(e){return"vertical"===e?"ns-resize":"ew-resize"}var zj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return a(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=z(this._onBrush,this),this._onBrushEnd=z(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),qh(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){var n=e[t];n&&n[Jh]&&(e[t]=n[Jh])}(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new xr;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o="horizontal"===this._orient?{right:i.width-r.x-r.width,top:i.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=of(e.option);R(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=o[e])}));var s=ef(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],"vertical"===this._orient&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr("horizontal"!==n||i?"horizontal"===n&&i?{scaleY:a?1:-1,scaleX:-1}:"vertical"!==n||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new Nj({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new Nj({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:z(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=e.series,r=n.getRawData(),i=n.getShadowDim?n.getShadowDim():e.otherDim;if(null!=i){var o=r.getDataExtent(i),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,u=[0,t[1]],l=[0,t[0]],c=[[t[0],0],[0,0]],f=[],d=l[1]/(r.count()-1),h=0,p=Math.round(r.count()/t[0]);r.each([i],(function(e,t){if(p>0&&t%p)h+=d;else{var n=null==e||isNaN(e)||""===e,r=n?0:Ar(e,o,u,!0);n&&!s&&t?(c.push([c[c.length-1][0],0]),f.push([f[f.length-1][0],0])):!n&&s&&(c.push([h,0]),f.push([h,0])),c.push([h,r]),f.push([h,r]),h+=d,s=n}}));for(var g=this.dataZoomModel,y=0;y<3;y++){var v=m(1===y);this._displayables.sliderGroup.add(v),this._displayables.dataShadowSegs.push(v)}}}function m(e){var t=g.getModel(e?"selectedDataBackground":"dataBackground"),n=new xr,r=new Au({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new Eu({shape:{points:f},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(i,o){R(e.getAxisProxy(i,o).getTargetSeriesModels(),(function(e){if(!n&&!(!0!==t&&I(jj,e.get("type"))<0)){var a,s=r.getComponent(aL(i),o).axis,u={x:"y",y:"x",radius:"angle",angle:"radius"}[i],l=e.coordinateSystem;null!=u&&l.getOtherAxis&&(a=l.getOtherAxis(s).inverse),u=e.getData().mapDimension(u),n={thisAxis:s,series:e,thisDim:i,otherDim:u,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,u=a.get("borderRadius")||0,l=a.get("brushSelect"),c=t.filler=new Nj({silent:l,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new Nj({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:u},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),R([0,1],(function(t){var o=a.get("handleIcon");!_g[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Tg(o,-1,0,2,2,null,!0);s.attr({cursor:Fj(this._orient),draggable:!0,drift:z(this._onDragMove,this,t),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1),z2:5});var u=s.getBoundingRect(),l=a.get("handleSize");this._handleHeight=Or(l,this._size[1]),this._handleWidth=u.width/u.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),As(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var f=a.getModel("textStyle");e.add(r[t]=new Ga({silent:!0,invisible:!0,style:zl(f,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:f.getTextColor(),font:f.getFont()}),z2:10}))}),this);var f=c;if(l){var d=Or(a.get("moveHandleSize"),o[1]),h=t.moveHandle=new Da({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),p=.8*d,g=t.moveHandleIcon=Tg(a.get("moveHandleIcon"),-p/2,-p/2,p,p,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,h.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(d,10));(f=t.moveZone=new Da({invisible:!0,shape:{y:o[1]-y,height:d+y}})).on("mouseover",(function(){s.enterEmphasis(h)})).on("mouseout",(function(){s.leaveEmphasis(h)})),i.add(h),i.add(g),i.add(f)}f.attr({draggable:!0,cursor:Fj(this._orient),drift:z(this._onDragMove,this,"all"),ondragstart:z(this._showDataInfo,this,!0),ondragend:z(this._onDragEnd,this),onmouseover:z(this._showDataInfo,this,!0),onmouseout:z(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Ar(e[0],[0,100],t,!0),Ar(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];mA(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?Ar(o.minSpan,a,i,!0):null,null!=o.maxSpan?Ar(o.maxSpan,a,i,!0):null);var s=this._range,u=this._range=Er([Ar(r[0],i,a,!0),Ar(r[1],i,a,!0)]);return!s||s[0]!==u[0]||s[1]!==u[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=Er(n.slice()),i=this._size;R([0,1],(function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],u=0;ut[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new hn(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100];this._range=Er([Ar(n.x,r,i,!0),Ar(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Ke(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new Nj({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),u=a.transformCoordToLocal(o.x,o.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:u[0],y:0,width:s[0]-u[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?Bj:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=uL(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(hL);function Vj(e){e.registerComponentModel(Rj),e.registerComponentView(zj),wL(e)}var Hj={get:function(e,t,n){var r=C((Uj[e]||{})[t]);return n&&H(r)?r[r.length-1]:r}},Uj={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Gj=Hj,Jj=TT.mapVisual,Xj=TT.eachVisual,Wj=H,qj=R,Zj=Er,Kj=Ar,Yj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return a(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;f.canvasSupported||(n.realtime=!1),!t&&XR(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=z(e,this),this.controllerVisuals=JR(this.option.controller,t,e),this.targetVisuals=JR(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=Jr(e),t},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),(function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)}),this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},t.prototype.formatValueText=function(e,t,n){var r,i=this.option,o=i.precision,a=this.dataBound,s=i.formatter;n=n||["<",">"],H(e)&&(e=e.slice(),r=!0);var u=t?e:r?[l(e[0]),l(e[1])]:l(e);return G(s)?s.replace("{value}",r?u[0]:u).replace("{value2}",r?u[1]:u):U(s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+u[1]:e[1]===a[1]?n[1]+" "+u[0]:u[0]+" - "+u[1]:u;function l(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,t=Zj([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimension=function(e){var t=this.option.dimension,n=e.dimensions;if(null!=t||n.length){if(null!=t)return e.getDimension(t);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var o=r[i];if(!e.getDimensionInfo(o).isCalculationCoord)return o}}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),i=t.controller||(t.controller={});A(r,n),A(i,n);var o=this.isCategory();function a(n){Wj(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,i),function(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},qj(r,(function(e,t){if(TT.isValidType(t)){var n=Gj.get(t,"inactive",o);null!=n&&(i[t]=n,"color"!==t||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}})))}.call(this,r,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),i=this.getItemSymbol()||"roundRect";qj(this.stateList,(function(a){var s=this.itemSize,u=e[a];u||(u=e[a]={color:o?r:[r]}),null==u.symbol&&(u.symbol=t&&C(t)||(o?i:[i])),null==u.symbolSize&&(u.symbolSize=n&&C(n)||(o?s[0]:[s[0],s[0]])),u.symbol=Jj(u.symbol,(function(e){return"none"===e?i:e}));var l=u.symbolSize;if(null!=l){var c=-1/0;Xj(l,(function(e){e>c&&(c=e)})),u.symbolSize=Jj(l,(function(e){return Kj(e,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,i)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(lf),$j=[20,140];function Qj(e,t,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,i=n[0],o=[],a=0;a<=200&&it[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)}),this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Er((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var r=[],i=n.getData();i.each(this.getDataDimension(i),(function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)}),this),t.push({seriesId:n.id,dataIndex:r})}),this),t},t.prototype.getVisualMeta=function(e){var t=Qj(this,"outOfRange",this.getExtent()),n=Qj(this,"inRange",this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var o=0,a=0,s=n.length,u=t.length;ae[1])break;n.push({color:this.getControllerVisual(o,"color",t),offset:i/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new xr("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,o=n.handleLabels,a=r.itemSize,s=r.getExtent();aB([0,1],(function(u){var l=i[u];l.setStyle("fill",t.handlesColor[u]),l.y=e[u];var c=oB(e[u],[0,a[1]],s,!0),f=this.getControllerVisual(c,"symbolSize");l.scaleX=l.scaleY=f/a[0],l.x=a[0]-f/2;var d=Sl(n.handleLabelPoints[u],kl(l,this.group));o[u].setStyle({x:d[0],y:d[1],text:r.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,o=i.getExtent(),a=i.itemSize,s=[0,a[1]],u=this._shapes,l=u.indicator;if(l){l.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),f=this.getControllerVisual(e,"symbolSize"),d=oB(e,o,s,!0),h=a[0]-f/2,p={x:l.x,y:l.y};l.y=d,l.x=h;var g=Sl(u.indicatorLabelPoint,kl(l,this.group)),y=u.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",u.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+i.formatValueText(t),verticalAlign:m?v:"middle",align:m?"center":v});var b={x:h,y:d,style:{fill:c}},w={style:{x:g[0],y:g[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:"cubicInOut",additive:!0};l.x=p.x,l.y=p.y,l.animateTo(b,x),y.animateTo(w,x)}else l.attr(b),y.attr(w);this._firstShowIndicator=!1;var _=this._shapes.handleLabels;if(_)for(var k=0;k<_.length;k++)this._api.enterBlur(_[k])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=sB(uB(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],o=n.getExtent();e=sB(uB(i[0],e),i[1]);var a=function(e,t,n){var r=6,i=e.get("hoverLinkDataSize");i&&(r=oB(i,t,n,!0)/2);return r}(n,o,i),s=[e-a,e+a],u=oB(e,i,o,!0),l=[oB(s[0],i,o,!0),oB(s[1],i,o,!0)];s[0]i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(u,l[1],"< ",a):l[1]===1/0?this._showIndicator(u,l[0],"> ",a):this._showIndicator(u,u,"\u2248 ",a));var c=this._hoverLinkDataIndices,f=[];(t||cB(n))&&(f=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var d=function(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[o(n),o(r)];function i(e,t,n){for(var r=0,i=e.length;r0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(hB,pB),R(gB,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(mB))}function _B(e){e.registerComponentModel(eB),e.registerComponentView(dB),xB(e)}var kB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return a(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],SB[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual((function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=C(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=N(this._pieceList,(function(e){return e=C(e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=TT.listVisualTypes(),i=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}R(t.pieces,(function(e){R(r,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),R(n,(function(e,n){var r=!1;R(this.stateList,(function(e){r=r||o(t,e,n)||o(t.target,e,n)}),this),!r&&R(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=Gj.get(n,"inRange"===e?"active":"inactive",i)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,(function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)}),this),"single"===n.selectedMode){var o=!1;R(r,(function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(o?i[n]=!1:o=!0)}),this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=C(e)},t.prototype.getValueState=function(e){var t=TT.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries((function(r){var i=[],o=r.getData();o.each(this.getDataDimension(o),(function(t,r){TT.findPieceIndex(t,n)===e&&i.push(r)}),this),t.push({seriesId:r.id,dataIndex:i})}),this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,i=this._pieceList.slice();if(i.length){var o=i[0].interval[0];o!==-1/0&&i.unshift({interval:[-1/0,o]}),(o=i[i.length-1].interval[1])!==1/0&&i.push({interval:[o,1/0]})}else i.push({interval:[-1/0,1/0]});var a=-1/0;return R(i,(function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])}),this),{stops:t,outerColors:n}}function s(i,o){var a=r.getRepresentValue({interval:i});o||(o=r.getValueState(a));var s=e(a,o);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=lc(Yj.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(Yj),SB={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var o=(r[1]-r[0])/i;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a","\u2265"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function TB(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var CB=kB,AB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return a(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,i=r.getFont(),o=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,u=this._getViewData(),l=u.endsText,c=$(t.get("showLabel",!0),!l);l&&this._renderEndsText(e,l[0],s,c,a),R(u.viewPieceList,(function(r){var u=r.piece,l=new xr;l.onclick=z(this._onItemClick,this,u),this._enableHoverLink(l,r.indexInModelPieceList);var f=t.getRepresentValue(u);if(this._createItemSymbol(l,f,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(f);l.add(new Ga({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:u.text,verticalAlign:"middle",align:a,font:i,fill:o,opacity:"outOfRange"===d?.5:1}}))}e.add(l)}),this),l&&this._renderEndsText(e,l[1],s,c,a),Qc(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:iB(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return rB(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var o=new xr,a=this.visualMapModel.textStyleModel;o.add(new Ga({style:{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?i:"center",text:t,font:a.getFont(),fill:a.getTextColor()}})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=N(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),r=e.get("orient"),i=e.get("inverse");return("horizontal"===r?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(Tg(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=C(n.selected),i=t.getSelectedMapKey(e);"single"===n.selectedMode?(r[i]=!0,R(r,(function(e,t){r[t]=t===i}))):r[i]=!r[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})},t.type="visualMap.piecewise",t}(tB);function OB(e){e.registerComponentModel(CB),e.registerComponentView(AB),xB(e)}var MB={label:{enabled:!0},decal:{show:!1}},EB=ni(),PB={};function IB(e,t){var n=e.getModel("aria");if(n.get("enabled")){var r=C(MB);A(r.label,e.getLocaleModel().get("aria"),!1),A(n.option,r,!1),function(){if(n.getModel("decal").get("show")){var t=ue();e.eachSeries((function(e){if(e.useColorPaletteOnData){var n=t.get(e.type);n||(n={},t.set(e.type,n)),EB(e).scope=n}})),e.eachRawSeries((function(t){if(!e.isSeriesFiltered(t))if("function"!==typeof t.enableAriaDecal){var n=t.getData();if(t.useColorPaletteOnData){var r=t.getRawData(),i={},o=EB(t).scope;n.each((function(e){var t=n.getRawIndex(e);i[t]=e}));var a=r.count();r.each((function(e){var s=i[e],u=r.getName(e)||e+"",c=Ef(t.ecModel,u,o,a),f=n.getItemVisual(s,"decal");n.setItemVisual(s,"decal",l(f,c))}))}else{var s=Ef(t.ecModel,t.name,PB,e.getSeriesCount()),u=n.getVisual("decal");n.setVisual("decal",l(u,s))}}else t.enableAriaDecal();function l(e,t){var n=e?M(M({},t),e):t;return n.dirty=!0,n}}))}}(),function(){var r=e.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=E(o.option,r),!o.get("enabled"))return;var a=t.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,u=e.getSeriesCount(),l=o.get(["data","maxCount"])||10,c=o.get(["series","maxCount"])||10,f=Math.min(u,c);if(u<1)return;var d=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();if(d){var h=o.get(["general","withTitle"]);s=i(h,{title:d})}else s=o.get(["general","withoutTitle"]);var p=[],g=u>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=i(g,{seriesCount:u}),e.eachSeries((function(t,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(b=t.subType,e.getLocaleModel().get(["series","typeNames"])[b]||"\u81ea\u5b9a\u4e49\u56fe")});var s=t.getData();if(s.count()>l)r+=i(o.get(["data","partialData"]),{displayCnt:l});else r+=o.get(["data","allData"]);for(var c=[],d=0;d":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},RB=function(){function e(e){var t;if(null==(this._condVal=G(e)?new RegExp(e):(t=e,"[object RegExp]"===p.call(t)?e:null))){0,Vd("")}}return e.prototype.evaluate=function(e){var t=typeof e;return"string"===t?this._condVal.test(e):"number"===t&&this._condVal.test(e+"")},e}(),NB=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),jB=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t256)throw new Error("invalid number type - "+t);return o&&(f=256),n=r.a.from(n).toTwos(f),Object(i.zeroPad)(n,f/8)}if(a=t.match(u)){var d=parseInt(a[1]);if(String(d)!==a[1]||0===d||d>32)throw new Error("invalid bytes type - "+t);if(Object(i.arrayify)(n).byteLength!==d)throw new Error("invalid value for "+t);return o?Object(i.arrayify)((n+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):n}if((a=t.match(c))&&Array.isArray(n)){var h=a[1];if(parseInt(a[2]||String(n.length))!=n.length)throw new Error("invalid value for "+t);var p=[];return n.forEach((function(t){p.push(e(h,t,!0))})),Object(i.concat)(p)}throw new Error("invalid type - "+t)}(e,t[o]))})),Object(i.hexlify)(Object(i.concat)(n))}function d(e,t){return Object(o.keccak256)(f(e,t))}function h(e,t){return Object(a.c)(f(e,t))}},function(e,t,n){"use strict";n.r(t);var r=n(52);n.d(t,"ConstructorFragment",(function(){return r.a})),n.d(t,"EventFragment",(function(){return r.b})),n.d(t,"Fragment",(function(){return r.d})),n.d(t,"FunctionFragment",(function(){return r.e})),n.d(t,"ParamType",(function(){return r.f})),n.d(t,"FormatTypes",(function(){return r.c}));var i=n(135);n.d(t,"AbiCoder",(function(){return i.a})),n.d(t,"defaultAbiCoder",(function(){return i.b}));var o=n(133);n.d(t,"Interface",(function(){return o.b})),n.d(t,"Indexed",(function(){return o.a}));var a=n(41);n.d(t,"checkResultErrors",(function(){return a.d})),n.d(t,"LogDescription",(function(){return o.c})),n.d(t,"TransactionDescription",(function(){return o.d}))},function(e,t,n){"use strict";function r(e,t,n,r){var i=r?" !== ":" === ",o=r?" || ":" && ",a=r?"!":"",s=r?"":"!";switch(e){case"null":return t+i+"null";case"array":return a+"Array.isArray("+t+")";case"object":return"("+a+t+o+"typeof "+t+i+'"object"'+o+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+s+"("+t+" % 1)"+o+t+i+t+(n?o+a+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(n?o+a+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}e.exports={copy:function(e,t){for(var n in t=t||{},e)t[n]=e[n];return t},checkDataType:r,checkDataTypes:function(e,t,n){switch(e.length){case 1:return r(e[0],t,n,!0);default:var i="",a=o(e);for(var s in a.array&&a.object&&(i=a.null?"(":"(!"+t+" || ",i+="typeof "+t+' !== "object")',delete a.null,delete a.array,delete a.object),a.number&&delete a.integer,a)i+=(i?" && ":"")+r(s,t,n,!0);return i}},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var n=[],r=0;r=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var s=o,l=i.split("/"),c=0;c1024||e%1)&&a.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return u.getRandomValues(t),Object(r.arrayify)(t)}u&&u.getRandomValues||(a.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(e){return a.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})}).call(this,n(79))},function(e,t,n){var r=t;r.utils=n(81),r.common=n(131),r.sha=n(371),r.ripemd=n(375),r.hmac=n(376),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){e.exports=n(545)},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,l=[],c=!1,f=-1;function d(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&h())}function h(){if(!c){var e=s(d);c=!0;for(var t=l.length;t;){for(u=l,l=[];++f1)for(var n=1;n=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o1&&v.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}var i=this.functions[p.e.fromString(e).format()];return i||v.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if(Object(l.isHexString)(e)){var t=e.toLowerCase();for(var n in this.events)if(t===this.getEventTopic(n))return this.events[n];v.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var r=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===r}));return 0===i.length?v.throwArgumentError("no matching event","name",r):i.length>1&&v.throwArgumentError("multiple matching events","name",r),this.events[i[0]]}var o=this.events[p.b.fromString(e).format()];return o||v.throwArgumentError("no matching event","signature",e),o}},{key:"getSighash",value:function(e){return"string"===typeof e&&(e=this.getFunction(e)),Object(d.getStatic)(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),Object(d.getStatic)(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=Object(l.arrayify)(t);return Object(l.hexlify)(n.slice(0,4))!==this.getSighash(e)&&v.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",Object(l.hexlify)(n)),this._decodeParams(e.inputs,n.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(l.hexlify)(Object(l.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=Object(l.arrayify)(t),r=null,i=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch(o){}break;case 4:"0x08c379a0"===Object(l.hexlify)(n.slice(0,4))&&(i="Error(string)",r=this._abiCoder.decode(["string"],n.slice(4))[0])}return v.throwError("call revert exception",g.Logger.errors.CALL_EXCEPTION,{method:e.format(),errorSignature:i,errorArgs:[r],reason:r})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(l.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&v.throwError("too many arguments for "+e.format(),g.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var r=[];e.anonymous||r.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?Object(c.a)(t):"bytes"===e.type?Object(f.keccak256)(Object(l.hexlify)(t)):("address"===e.type&&n._abiCoder.encode(["address"],[t]),Object(l.hexZeroPad)(Object(l.hexlify)(t),32))};for(t.forEach((function(t,n){var o=e.inputs[n];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?v.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((function(e){return i(o,e)}))):r.push(i(o,t)):null!=t&&v.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}},{key:"encodeEventLog",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e));var r=[],i=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&v.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)r.push(Object(c.a)(s));else if("bytes"===e.type)r.push(Object(f.keccak256)(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(n._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:r}}},{key:"decodeEventLog",value:function(e,t,n){if("string"===typeof e&&(e=this.getEvent(e)),null!=n&&!e.anonymous){var r=this.getEventTopic(e);Object(l.isHexString)(n[0],32)&&n[0].toLowerCase()===r||v.throwError("fragment/topic mismatch",g.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:r,value:n[0]}),n=n.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(p.f.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=n?this._abiCoder.decode(i,Object(l.concat)(n)):null,u=this._abiCoder.decode(o,t,!0),c=[],f=0,d=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)c[t]=new w({_isIndexed:!0,hash:null});else if(a[t])c[t]=new w({_isIndexed:!0,hash:s[d++]});else try{c[t]=s[d++]}catch(r){c[t]=r}else try{c[t]=u[f++]}catch(r){c[t]=r}if(e.name&&null==c[e.name]){var n=c[t];n instanceof Error?Object.defineProperty(c,e.name,{get:function(){throw x("property ".concat(JSON.stringify(e.name)),n)}}):c[e.name]=n}}));for(var h=function(e){var t=c[e];t instanceof Error&&Object.defineProperty(c,e,{get:function(){throw x("index ".concat(e),t)}})},y=0;y=0?i:"")+"]",u=-1===i||e.dynamic;return(a=t.call(this,"array",s,o,u)).coder=e,a.length=i,a}return Object(i.a)(n,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],n=0;ne._data.length&&g.throwError("insufficient data length",s.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var n=[],r=0;r256||r%8!==0)&&D.throwArgumentError("invalid "+n[1]+" bit length","param",e),new O(r/8,"int"===n[1],e.name)}if(n=e.type.match(L)){var i=parseInt(n[1]);return(0===i||i>32)&&D.throwArgumentError("invalid bytes length","param",e),new S(i,e.name)}return D.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new l.b(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new l.c(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,n=e.map((function(e){return t._getCoder(I.f.from(e))}));return new P(n,"_").defaultValue()}},{key:"encode",value:function(e,t){var n=this;e.length!==t.length&&D.throwError("types/values length mismatch",s.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var r=e.map((function(e){return n._getCoder(I.f.from(e))})),i=new P(r,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,n){var r=this,i=e.map((function(e){return r._getCoder(I.f.from(e))}));return new P(i,"_").decode(this._getReader(Object(o.arrayify)(t),n))}}]),e}(),j=new N},,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"decryptCrowdsale",(function(){return w})),n.d(t,"decryptKeystore",(function(){return _.a})),n.d(t,"decryptKeystoreSync",(function(){return _.b})),n.d(t,"encryptKeystore",(function(){return _.c})),n.d(t,"isCrowdsaleWallet",(function(){return x.b})),n.d(t,"isKeystoreWallet",(function(){return x.c})),n.d(t,"getJsonWalletAddress",(function(){return x.a})),n.d(t,"decryptJsonWallet",(function(){return k})),n.d(t,"decryptJsonWalletSync",(function(){return S}));var r=n(11),i=n(13),o=n(16),a=n(17),s=n(73),u=n.n(s),l=n(28),c=n(5),f=n(29),d=n(587),h=n(37),p=n(7),g=n(8),y=n(183),v=n(30),m=new g.Logger(y.a),b=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"isCrowdsaleAccount",value:function(e){return!(!e||!e._isCrowdsaleAccount)}}]),n}(p.Description);function w(e,t){var n=JSON.parse(e);t=Object(v.a)(t);var r=Object(l.getAddress)(Object(v.c)(n,"ethaddr")),i=Object(v.b)(Object(v.c)(n,"encseed"));i&&i.length%16===0||m.throwArgumentError("invalid encseed","json",e);for(var o=Object(c.arrayify)(Object(d.a)(t,t,2e3,32,"sha256")).slice(0,16),a=i.slice(0,16),s=i.slice(16),p=new u.a.ModeOfOperation.cbc(o,a),g=u.a.padding.pkcs7.strip(Object(c.arrayify)(p.decrypt(s))),y="",w=0;we.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(42),i=n(121);var o=n(159);function a(e,t,n){return(a=Object(o.a)()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Object(i.a)(o,n.prototype),o}).apply(null,arguments)}function s(e){var t="function"===typeof Map?new Map:void 0;return(s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return a(e,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,e)})(e)}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"utf8";return"utf8"===t||"utf-8"===t?i.decode(e):"ascii"===t?o(e):r(t).encode(e)}},function(e,t,n){"use strict";var r=n(96);e.exports=function(e,t){t||(t=e.reduce((function(e,t){return e+t.length}),0));var n,i=new Uint8Array(t),o=0,a=r(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}},function(e,t,n){"use strict";var r=Object.freeze({identity:0,cidv1:1,cidv2:2,cidv3:3,ip4:4,tcp:6,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,dccp:33,"murmur3-128":34,"murmur3-32":35,ip6:41,ip6zone:42,path:47,multicodec:48,multihash:49,multiaddr:50,multibase:51,dns:53,dns4:54,dns6:55,dnsaddr:56,protobuf:80,cbor:81,raw:85,"dbl-sha2-256":86,rlp:96,bencode:99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,sctp:132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,docid:206,"stellar-block":208,"stellar-tx":209,md4:212,md5:213,bmt:214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,zeronet:230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"bls12_381-g1g2-pub":238,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,udp:273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,udt:301,utp:302,unix:400,p2p:421,ipfs:421,https:443,onion:444,onion3:445,garlic64:446,garlic32:447,tls:448,quic:460,ws:477,wss:478,"p2p-websocket-star":479,http:480,json:512,messagepack:513,"libp2p-peer-record":769,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"p256-pub":4608,"p384-pub":4609,"p521-pub":4610,"ed448-pub":4611,"x448-pub":4612,"ed25519-priv":4864,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332,"skynet-ns":11639056});e.exports={baseTable:r}},function(e,t,n){"use strict";t.TextEncoder="undefined"!==typeof TextEncoder?TextEncoder:n(237).TextEncoder,t.TextDecoder="undefined"!==typeof TextDecoder?TextDecoder:n(237).TextDecoder},,function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.sha256="sha256",e.sha512="sha512"}(r||(r={}))},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0)return i(e,t,t);var n=Math.abs(t),r=i(e,n,n);return"string"===typeof r?"-"+r:-1*r},f=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","top","bottom","left","right"].reduce((function(e,t){var n;return r({},e,((n={})[t]=c,n))}),{}),d=function(e){return function(t){var n={},r=i(t,"breakpoints",o),a=[null].concat(r.map((function(e){return"@media screen and (min-width: "+e+")"})));for(var s in e){var u="function"===typeof e[s]?e[s](t):e[s];if(null!=u)if(Array.isArray(u))for(var l=0;l256||t[2]&&t[2]!==String(r))&&y.throwArgumentError("invalid numeric width","type",e);var i=x.mask(n?r-1:r),o=n?i.add(w).mul(m):b;return function(t){var n=u.a.from(t);return(n.lt(o)||n.gt(i))&&y.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),Object(l.hexZeroPad)(n.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var f=parseInt(a[1]);return(0===f||f>32||a[1]!==String(f))&&y.throwArgumentError("invalid bytes width","type",e),function(t){return Object(l.arrayify)(t).length!==f&&y.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=Object(l.arrayify)(e),n=t.length%32;return n?Object(l.hexConcat)([t,v.slice(n)]):Object(l.hexlify)(t)}(t)}}switch(e){case"address":return function(e){return Object(l.hexZeroPad)(Object(s.getAddress)(e),32)};case"bool":return function(e){return e?_:k};case"bytes":return function(e){return Object(c.keccak256)(e)};case"string":return function(e){return Object(p.a)(e)}}return null}function M(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var E=function(){function e(t){Object(o.a)(this,e),Object(f.defineReadOnly)(this,"types",Object.freeze(Object(f.deepCopy)(t))),Object(f.defineReadOnly)(this,"_encoderCache",{}),Object(f.defineReadOnly)(this,"_types",{});var n={},r={},i={};Object.keys(t).forEach((function(e){n[e]={},r[e]=[],i[e]={}}));var a=function(e){var i={};t[e].forEach((function(o){i[o.name]&&y.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),O(a)||(r[a]||y.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),r[a].push(e),n[e][a]=!0)}))};for(var s in t)a(s);var u=Object.keys(r).filter((function(e){return 0===r[e].length}));for(var l in 0===u.length?y.throwArgumentError("missing primary type","types",t):u.length>1&&y.throwArgumentError("ambiguous primary types or unused types: ".concat(u.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),Object(f.defineReadOnly)(this,"primaryType",u[0]),function e(o,a){a[o]&&y.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(n[o]).forEach((function(t){r[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var c=Object.keys(i[l]);c.sort(),this._types[l]=M(l,t[l])+c.map((function(e){return M(e,t[e])})).join("")}}return Object(a.a)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,n=O(e);if(n)return n;var r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){var i=r[1],o=this.getEncoder(i),a=parseInt(r[3]);return function(e){a>=0&&e.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var n=e.map(o);return t._types[i]&&(n=n.map(c.keccak256)),Object(c.keccak256)(Object(l.hexConcat)(n))}}var s=this.types[e];if(s){var u=Object(p.a)(this._types[e]);return function(e){var n=s.map((function(n){var r=n.name,i=n.type,o=t.getEncoder(i)(e[r]);return t._types[i]?Object(c.keccak256)(o):o}));return n.unshift(u),Object(l.hexConcat)(n)}}return y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||y.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return Object(c.keccak256)(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,n){var r=this;if(O(e))return n(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&y.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return r._visit(o,e,n)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=r._visit(a,t[o],n),e}),{}):y.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,n,r){return e.from(n).hashStruct(t,r)}},{key:"hashDomain",value:function(t){var n=[];for(var r in t){var i=S[r];i||y.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(r)),"domain",t),n.push({name:r,type:i})}return n.sort((function(e,t){return T.indexOf(e.name)-T.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:n},t)}},{key:"encode",value:function(t,n,r){return Object(l.hexConcat)(["0x1901",e.hashDomain(t),e.from(n).hash(r)])}},{key:"hash",value:function(t,n,r){return Object(c.keccak256)(e.encode(t,n,r))}},{key:"resolveNames",value:function(t,n,r,o){return g(this,void 0,void 0,i.a.mark((function a(){var s,u,c;return i.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:t=Object(f.shallowCopy)(t),s={},t.verifyingContract&&!Object(l.isHexString)(t.verifyingContract,20)&&(s[t.verifyingContract]="0x"),(u=e.from(n)).visit(r,(function(e,t){return"address"!==e||Object(l.isHexString)(t,20)||(s[t]="0x"),t})),a.t0=i.a.keys(s);case 6:if((a.t1=a.t0()).done){a.next=13;break}return c=a.t1.value,a.next=10,o(c);case 10:s[c]=a.sent,a.next=6;break;case 13:return t.verifyingContract&&s[t.verifyingContract]&&(t.verifyingContract=s[t.verifyingContract]),r=u.visit(r,(function(e,t){return"address"===e&&s[t]?s[t]:t})),a.abrupt("return",{domain:t,value:r});case 16:case"end":return a.stop()}}),a)})))}},{key:"getPayload",value:function(t,n,r){e.hashDomain(t);var i={},o=[];T.forEach((function(e){var n=t[e];null!=n&&(i[e]=A[e](n),o.push({name:e,type:S[e]}))}));var a=e.from(n),s=Object(f.shallowCopy)(n);return s.EIP712Domain?y.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):s.EIP712Domain=o,a.encode(r),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(r,(function(e,t){if(e.match(/^bytes(\d*)/))return Object(l.hexlify)(Object(l.arrayify)(t));if(e.match(/^u?int/))return u.a.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&y.throwArgumentError("invalid string","value",t),t}return y.throwArgumentError("unsupported type","type",e)}))}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r="hash/5.1.0"},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(37);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});var n=0,r={};return e.split(",").forEach((function(e){var i=e.split(":");n+=parseInt(i[0],16),r[n]=t(i[1])})),r}function o(e){var t=0;return e.split(",").map((function(e){var n=e.split("-");return 1===n.length?n[1]="0":""===n[1]&&(n[1]="1"),{l:t+parseInt(n[0],16),h:t=parseInt(n[1],16)}}))}function a(e,t){for(var n=0,r=0;r=(n+=i.l)&&e<=n+i.h&&(e-n)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-n))continue;return i}}return null}var s=o("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),u="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),l=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],c=i("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),f=i("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),d=i("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],n=0;n=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=a(e,l);if(t)return[e+t.s];var n=c[e];if(n)return n;var r=f[e];if(r)return[e+r[0]];var i=d[e];return i||null}(e);return t||[e]})),n=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(n=Object(r.g)(Object(r.e)(n),r.a.NFKC)).forEach((function(e){if(a(e,h))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),n.forEach((function(e){if(a(e,s))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var i=Object(r.e)(n);if("-"===i.substring(0,1)||"--"===i.substring(2,4)||"-"===i.substring(i.length-1))throw new Error("invalid hyphen");if(i.length>63)throw new Error("too long");return i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r="0x0000000000000000000000000000000000000000000000000000000000000000"},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(69);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return(u=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&a(i,n.prototype),i}).apply(null,arguments)}function l(e){var t="function"===typeof Map?new Map:void 0;return(l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)})(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var f=function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t.message="The user rejected the request.",t}return i(t,e),t}(l(Error));function d(e){var t=e.supportedChainIds,n=e.rpc;return t||(n?Object.keys(n).map((function(e){return Number(e)})):void 0)}var h=function(e){function t(t){var n;return(n=e.call(this,{supportedChainIds:d(t)})||this).config=t,n.handleChainChanged=n.handleChainChanged.bind(c(n)),n.handleAccountsChanged=n.handleAccountsChanged.bind(c(n)),n.handleDisconnect=n.handleDisconnect.bind(c(n)),n}i(t,e);var r=t.prototype;return r.handleChainChanged=function(e){this.emitUpdate({chainId:e})},r.handleAccountsChanged=function(e){this.emitUpdate({account:e[0]})},r.handleDisconnect=function(){this.emitDeactivate(),this.walletConnectProvider&&(this.walletConnectProvider.stop(),this.walletConnectProvider.removeListener("chainChanged",this.handleChainChanged),this.walletConnectProvider.removeListener("accountsChanged",this.handleAccountsChanged),this.walletConnectProvider=void 0),this.emitDeactivate()},r.activate=function(){try{var e=this,t=function(){function t(){return Promise.resolve(e.walletConnectProvider.enable().then((function(e){return e[0]})).catch((function(e){if("User closed modal"===e.message)throw new f;throw e}))).then((function(t){return e.walletConnectProvider.on("disconnect",e.handleDisconnect),e.walletConnectProvider.on("chainChanged",e.handleChainChanged),e.walletConnectProvider.on("accountsChanged",e.handleAccountsChanged),{provider:e.walletConnectProvider,account:t}}))}var n=function(){if(!e.walletConnectProvider.wc.connected)return Promise.resolve(e.walletConnectProvider.wc.createSession({chainId:e.supportedChainIds&&e.supportedChainIds.length>0?e.supportedChainIds[0]:1})).then((function(){e.emit("URI_AVAILABLE",e.walletConnectProvider.wc.uri)}))}();return n&&n.then?n.then(t):t()},r=function(){if(!e.walletConnectProvider)return Promise.resolve(Promise.all([n.e(0),n.e(5),n.e(8)]).then(n.t.bind(null,588,7)).then((function(e){var t;return null!=(t=null==e?void 0:e.default)?t:e}))).then((function(t){e.walletConnectProvider=new t(e.config)}))}();return Promise.resolve(r&&r.then?r.then(t):t())}catch(i){return Promise.reject(i)}},r.getProvider=function(){try{return Promise.resolve(this.walletConnectProvider)}catch(e){return Promise.reject(e)}},r.getChainId=function(){try{return Promise.resolve(this.walletConnectProvider.send("eth_chainId"))}catch(e){return Promise.reject(e)}},r.getAccount=function(){try{return Promise.resolve(this.walletConnectProvider.send("eth_accounts").then((function(e){return e[0]})))}catch(e){return Promise.reject(e)}},r.deactivate=function(){this.walletConnectProvider&&(this.walletConnectProvider.stop(),this.walletConnectProvider.removeListener("disconnect",this.handleDisconnect),this.walletConnectProvider.removeListener("chainChanged",this.handleChainChanged),this.walletConnectProvider.removeListener("accountsChanged",this.handleAccountsChanged))},r.close=function(){try{var e;return Promise.resolve(null==(e=this.walletConnectProvider)?void 0:e.close()).then((function(){}))}catch(t){return Promise.reject(t)}},t}(r.a)},,,,,,,,,,,,,,function(e,t,n){"use strict";t.a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},function(e,t,n){"use strict";t.a=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){(function(e,n){var r="[object Arguments]",i="[object Map]",o="[object Object]",a="[object Set]",s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,l=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[r]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[i]=p["[object Number]"]=p[o]=p["[object RegExp]"]=p[a]=p["[object String]"]=p["[object WeakMap]"]=!1;var g="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,v=g||y||Function("return this")(),m=t&&!t.nodeType&&t,b=m&&"object"==typeof n&&n&&!n.nodeType&&n,w=b&&b.exports===m&&g.process,x=function(){try{return w&&w.binding("util")}catch(e){}}(),_=x&&x.isTypedArray;function k(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n-1},se.prototype.set=function(e,t){var n=this.__data__,r=de(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ue.prototype.clear=function(){this.__data__={hash:new ae,map:new(W||se),string:new ae}},ue.prototype.delete=function(e){return Ce(this,e).delete(e)},ue.prototype.get=function(e){return Ce(this,e).get(e)},ue.prototype.has=function(e){return Ce(this,e).has(e)},ue.prototype.set=function(e,t){return Ce(this,e).set(e,t),this},le.prototype.add=le.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},le.prototype.has=function(e){return this.__data__.has(e)},ce.prototype.clear=function(){this.__data__=new se},ce.prototype.delete=function(e){return this.__data__.delete(e)},ce.prototype.get=function(e){return this.__data__.get(e)},ce.prototype.has=function(e){return this.__data__.has(e)},ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof se){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this;n=this.__data__=new ue(r)}return n.set(e,t),this};var he,pe,ge=(he=function(e,t){return e&&ye(e,t,qe)},function(e,t){if(null==e)return e;if(!Ve(e))return he(e,t);for(var n=e.length,r=pe?n:-1,i=Object(e);(pe?r--:++rs))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var c=-1,f=!0,d=1&i?new le:void 0;for(o.set(e,t),o.set(t,e);++c-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function Ge(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Je(e){return!!e&&"object"==typeof e}function Xe(e){return"symbol"==typeof e||Je(e)&&"[object Symbol]"==B.call(e)}var We=_?function(e){return function(t){return e(t)}}(_):function(e){return Je(e)&&Ue(e.length)&&!!p[B.call(e)]};function qe(e){return Ve(e)?fe(e):_e(e)}function Ze(e){return e}n.exports=function(e,t){return function e(t,n,r,i,o){var a=-1,s=t.length;for(r||(r=Me),o||(o=[]);++a0&&r(u)?n>1?e(u,n-1,r,i,o):S(o,u):i||(o[o.length]=u)}return o}(function(e,t){return(ze(e)?k:ke)(e,xe(t))}(e,t),1)}}).call(this,n(79),n(189)(e))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r="json-wallets/5.1.0"},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(64),a=n(117);t.a=function(e){var t=e.children,n=e.type,s=void 0===n?"reach-portal":n,u=Object(r.useRef)(null),l=Object(r.useRef)(null),c=Object(r.useState)()[1];return Object(o.f)((function(){if(u.current){var e=u.current.ownerDocument;return l.current=null===e||void 0===e?void 0:e.createElement(s),e.body.appendChild(l.current),c({}),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}}),[s]),l.current?Object(a.createPortal)(t,l.current):i.a.createElement("span",{ref:u})}},function(e,t,n){"use strict";var r=n(426),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,a,s,u,l=!1;t||(t={}),t.debug;try{if(o=r(),a=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=e,u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),"undefined"===typeof n.clipboardData){window.clipboardData.clearData();var r=i[t.format]||i.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(u),a.selectNodeContents(u),s.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(c){try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(c){n=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(n,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(a):s.removeAllRanges()),u&&document.body.removeChild(u),o()}return l}},function(e,t,n){"use strict";(function(t){!function(n){function r(e){var t=new Uint32Array([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]),n=1779033703,r=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,l=1541459225,c=new Uint32Array(64);function f(e){for(var f=0,d=e.length;d>=64;){var h=n,p=r,g=i,y=o,v=a,m=s,b=u,w=l,x=void 0,_=void 0,k=void 0,S=void 0,T=void 0;for(_=0;_<16;_++)k=f+4*_,c[_]=(255&e[k])<<24|(255&e[k+1])<<16|(255&e[k+2])<<8|255&e[k+3];for(_=16;_<64;_++)S=((x=c[_-2])>>>17|x<<15)^(x>>>19|x<<13)^x>>>10,T=((x=c[_-15])>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,c[_]=(S+c[_-7]|0)+(T+c[_-16]|0)|0;for(_=0;_<64;_++)S=(((v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&m^~v&b)|0)+(w+(t[_]+c[_]|0)|0)|0,T=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&g^p&g)|0,w=b,b=m,m=v,v=y+S|0,y=g,g=p,p=h,h=S+T|0;n=n+h|0,r=r+p|0,i=i+g|0,o=o+y|0,a=a+v|0,s=s+m|0,u=u+b|0,l=l+w|0,f+=64,d-=64}}f(e);var d,h=e.length%64,p=e.length/536870912|0,g=e.length<<3,y=h<56?56:120,v=e.slice(e.length-h,e.length);for(v.push(128),d=h+1;d>>24&255),v.push(p>>>16&255),v.push(p>>>8&255),v.push(p>>>0&255),v.push(g>>>24&255),v.push(g>>>16&255),v.push(g>>>8&255),v.push(g>>>0&255),f(v),[n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255]}function i(e,t,n){e=e.length<=64?e:r(e);var i,o=64+t.length+4,a=new Array(o),s=new Array(64),u=[];for(i=0;i<64;i++)a[i]=54;for(i=0;i=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;n>=32;)l(),u=u.concat(r(s.concat(r(a)))),n-=32;return n>0&&(l(),u=u.concat(r(s.concat(r(a))).slice(0,n))),u}function o(e,t,n,r,i){var o;for(l(e,16*(2*n-1),i,0,16),o=0;o<2*n;o++)u(e,16*o,i,16),s(i,r),l(i,0,e,t+16*o,16);for(o=0;o>>32-t}function s(e,t){l(e,0,t,0,16);for(var n=8;n>0;n-=2)t[4]^=a(t[0]+t[12],7),t[8]^=a(t[4]+t[0],9),t[12]^=a(t[8]+t[4],13),t[0]^=a(t[12]+t[8],18),t[9]^=a(t[5]+t[1],7),t[13]^=a(t[9]+t[5],9),t[1]^=a(t[13]+t[9],13),t[5]^=a(t[1]+t[13],18),t[14]^=a(t[10]+t[6],7),t[2]^=a(t[14]+t[10],9),t[6]^=a(t[2]+t[14],13),t[10]^=a(t[6]+t[2],18),t[3]^=a(t[15]+t[11],7),t[7]^=a(t[3]+t[15],9),t[11]^=a(t[7]+t[3],13),t[15]^=a(t[11]+t[7],18),t[1]^=a(t[0]+t[3],7),t[2]^=a(t[1]+t[0],9),t[3]^=a(t[2]+t[1],13),t[0]^=a(t[3]+t[2],18),t[6]^=a(t[5]+t[4],7),t[7]^=a(t[6]+t[5],9),t[4]^=a(t[7]+t[6],13),t[5]^=a(t[4]+t[7],18),t[11]^=a(t[10]+t[9],7),t[8]^=a(t[11]+t[10],9),t[9]^=a(t[8]+t[11],13),t[10]^=a(t[9]+t[8],18),t[12]^=a(t[15]+t[14],7),t[13]^=a(t[12]+t[15],9),t[14]^=a(t[13]+t[12],13),t[15]^=a(t[14]+t[13],18);for(var r=0;r<16;++r)e[r]+=t[r]}function u(e,t,n,r){for(var i=0;i=256)return!1}return!0}function f(e,t){if("number"!==typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,n,r,a,s,d,h){if(r=f(r,"N"),a=f(a,"r"),s=f(s,"p"),d=f(d,"dkLen"),0===r||0!==(r&r-1))throw new Error("N must be power of 2");if(r>2147483647/128/a)throw new Error("N too large");if(a>2147483647/128/s)throw new Error("r too large");if(!c(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!c(n))throw new Error("salt must be an array or buffer");n=Array.prototype.slice.call(n);for(var p=i(e,n,128*s*a),g=new Uint32Array(32*s*a),y=0;yP&&(n=P);for(var c=0;cP&&(n=P);for(var y=0;y>0&255),p.push(g[L]>>8&255),p.push(g[L]>>16&255),p.push(g[L]>>24&255);var R=i(e,p,d);return h&&h(null,1,R),R}h&&I(t)};if(!h)for(;;){var L=D();if(void 0!=L)return L}D()}var h={scrypt:function(e,t,n,r,i,o,a){return new Promise((function(s,u){var l=0;a&&a(0),d(e,t,n,r,i,o,(function(e,t,n){if(e)u(e);else if(n)a&&1!==l&&a(1),s(new Uint8Array(n));else if(a&&t!==l)return l=t,a(t)}))}))},syncScrypt:function(e,t,n,r,i,o){return new Uint8Array(d(e,t,n,r,i,o))}};e.exports=h}()}).call(this,n(337).setImmediate)},function(e,t,n){"use strict";var r=n(239),i=n(261),o=n(471),a=n(472),s=n(262),u=n(479);var l=n(480),c=n(484);e.exports=r({addPrefix:function(e,t){var n;if(e instanceof Uint8Array)n=s.varintUint8ArrayEncode(e);else{if(!a[e])throw new Error("multicodec not recognized");n=a[e]}return u([n,t],n.length+t.length)},rmPrefix:function(e){return i.decode(e),e.slice(i.decode.bytes)},getCodec:function(e){var t=i.decode(e),n=o.get(t);if(void 0===n)throw new Error("Code ".concat(t," not found"));return n},getName:function(e){return o.get(e)},getNumber:function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return i.decode(t)},getCode:function(e){return i.decode(e)},getCodeVarint:function(e){var t=a[e];if(void 0===t)throw new Error("Codec `"+e+"` not found");return t},getVarint:function(e){return i.encode(e)},print:c},l)},function(e,t,n){"use strict";var r=n(485),i=n(489),o=n(493).names,a=n(149),s=n(199),u=n(150),l={};for(var c in o){var f=c;l[o[f]]=f}function d(e){if(!(e instanceof Uint8Array))throw new Error("multihash must be a Uint8Array");if(e.length<2)throw new Error("multihash too short. must be > 2 bytes.");var t=i.decode(e);if(!g(t))throw new Error("multihash unknown function code: 0x".concat(t.toString(16)));e=e.slice(i.decode.bytes);var n=i.decode(e);if(n<0)throw new Error("multihash invalid length: ".concat(n));if((e=e.slice(i.decode.bytes)).length!==n)throw new Error("multihash length inconsistent: 0x".concat(a(e,"base16")));return{code:t,name:l[t],length:n,digest:e}}function h(e){var t=e;if("string"===typeof e){if(void 0===o[e])throw new Error("Unrecognized hash function named: ".concat(e));t=o[e]}if("number"!==typeof t)throw new Error("Hash function code should be a number. Got: ".concat(t));if(void 0===l[t]&&!p(t))throw new Error("Unrecognized function code: ".concat(t));return t}function p(e){return e>0&&e<16}function g(e){return!!p(e)||!!l[e]}function y(e){d(e)}e.exports={names:o,codes:Object.freeze(l),toHexString:function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return a(e,"base16")},fromHexString:function(e){return s(e,"base16")},toB58String:function(e){if(!(e instanceof Uint8Array))throw new Error("must be passed a Uint8Array");return a(r.encode("base58btc",e)).slice(1)},fromB58String:function(e){var t=e instanceof Uint8Array?a(e):e;return r.decode("z"+t)},decode:d,encode:function(e,t,n){if(!e||void 0===t)throw new Error("multihash encode requires at least two args: digest, code");var r=h(t);if(!(e instanceof Uint8Array))throw new Error("digest should be a Uint8Array");if(null==n&&(n=e.length),n&&e.length!==n)throw new Error("digest length should be equal to specified length.");var o=i.encode(r),a=i.encode(n);return u([o,a,e],o.length+a.length+e.length)},coerceCode:h,isAppCode:p,validate:y,prefix:function(e){return y(e),e.subarray(0,2)},isValidCode:g}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(5);function i(e){e=atob(e);for(var t=[],n=0;n31)throw new Error("bytes32 string must be less than 32 bytes");return Object(i.hexlify)(Object(i.concat)([t,r.a]).slice(0,32))}function s(e){var t=Object(i.arrayify)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var n=31;0===t[n-1];)n--;return Object(o.h)(t.slice(0,n))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(5),i=n(29),o=n(37),a="\x19Ethereum Signed Message:\n";function s(e){return"string"===typeof e&&(e=Object(o.f)(e)),Object(i.keccak256)(Object(r.concat)([Object(o.f)(a),Object(o.f)(String(e.length)),e]))}},function(e,t,n){"use strict";var r=function(){};e.exports=r},,function(e,t,n){"use strict";e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n>>0,l=new Uint8Array(o);e[n];){var c=t[e.charCodeAt(n)];if(255===c)return;for(var f=0,d=o-1;(0!==c||f>>0,l[d]=c%256>>>0,c=c/256>>>0;if(0!==c)throw new Error("Non-zero carry");i=f,n++}if(" "!==e[n]){for(var h=o-i;h!==o&&0===l[h];)h++;for(var p=new Uint8Array(r+(o-h)),g=r;h!==o;)p[g++]=l[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var u=(o-i)*l+1>>>0,c=new Uint8Array(u);i!==o;){for(var f=t[i],d=0,h=u-1;(0!==f||d>>0,c[h]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=d,i++}for(var p=u-r;p!==u&&0===c[p];)p++;for(var g=s.repeat(n);p1&&void 0!==arguments[1]?arguments[1]:"utf8";return"utf8"===t||"utf-8"===t?i.encode(e):"ascii"===t?o(e):r(t).decode(e)}},function(e,t,n){"use strict";var r=n(96),i=n(152),o=i.TextEncoder,a=new(0,i.TextDecoder),s=new o;e.exports={decodeText:function(e){return a.decode(e)},encodeText:function(e){return s.encode(e)},concat:function(e,t){var n,i=new Uint8Array(t),o=0,a=r(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;i.set(s,o),o+=s.length}}catch(u){a.e(u)}finally{a.f()}return i}}},function(e,t,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(t){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(C){s=null}var u=function(){throw new o},l=s?function(){try{return u}catch(e){try{return s(arguments,"callee").get}catch(t){return u}}}():u,c=n(496)(),f=Object.getPrototypeOf||function(e){return e.__proto__},d={},h="undefined"===typeof Uint8Array?void 0:f(Uint8Array),p={"%AggregateError%":"undefined"===typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":c?f([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"===typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"===typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"===typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?f(f([][Symbol.iterator]())):void 0,"%JSON%":"object"===typeof JSON?JSON:void 0,"%Map%":"undefined"===typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&c?f((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?void 0:Promise,"%Proxy%":"undefined"===typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&c?f((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?f(""[Symbol.iterator]()):void 0,"%Symbol%":c?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":l,"%TypedArray%":h,"%TypeError%":o,"%Uint8Array%":"undefined"===typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?void 0:WeakSet},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n(202),v=n(499),m=y.call(Function.call,Array.prototype.concat),b=y.call(Function.apply,Array.prototype.splice),w=y.call(Function.call,String.prototype.replace),x=y.call(Function.call,String.prototype.slice),_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,k=/\\(\\)?/g,S=function(e){var t=x(e,0,1),n=x(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return w(e,_,(function(e,t,n,r){i[i.length]=n?w(r,k,"$1"):t||e})),i},T=function(e,t){var n,i=e;if(v(g,i)&&(i="%"+(n=g[i])[0]+"%"),v(p,i)){var s=p[i];if(s===d&&(s=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=f(i.prototype))}return p[t]=n,n}(i)),"undefined"===typeof s&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!==typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof t)throw new o('"allowMissing" argument must be a boolean');var n=S(e),i=n.length>0?n[0]:"",a=T("%"+i+"%",t),u=a.name,l=a.value,c=!1,f=a.alias;f&&(i=f[0],b(n,m([0,1],f)));for(var d=1,h=!0;d=n.length){var _=s(l,g);l=(h=!!_)&&"get"in _&&!("originalValue"in _.get)?_.get:l[g]}else h=v(l,g),l=l[g];h&&!c&&(p[u]=l)}}return l}},function(e,t,n){"use strict";var r=n(498);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:o,RFC3986:a}},function(e,t,n){"use strict";var r=n(506),i=n(205),o=n(115),a=n(267),s=n(508);function u(e,t,n){var r=this._refs[n];if("string"==typeof r){if(!this._refs[r])return u.call(this,e,t,r);r=this._refs[r]}if((r=r||this._schemas[n])instanceof a)return p(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i,o,s,c=l.call(this,t,n);return c&&(i=c.schema,t=c.root,s=c.baseId),i instanceof a?o=i.validate||e.call(this,i.schema,t,void 0,s):void 0!==i&&(o=p(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,s)),o}function l(e,t){var n=r.parse(t),i=y(n),o=g(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==o){var s=m(i),u=this._refs[s];if("string"==typeof u)return c.call(this,e,u,n);if(u instanceof a)u.validate||this._compile(u),e=u;else{if(!((u=this._schemas[s])instanceof a))return;if(u.validate||this._compile(u),s==m(t))return{schema:u,root:e,baseId:o};e=u}if(!e.schema)return;o=g(this._getId(e.schema))}return d.call(this,n,o,e.schema,e)}function c(e,t,n){var r=l.call(this,e,t);if(r){var i=r.schema,o=r.baseId;e=r.root;var a=this._getId(i);return a&&(o=b(o,a)),d.call(this,n,o,i,e)}}e.exports=u,u.normalizeId=m,u.fullPath=g,u.url=b,u.ids=function(e){var t=m(this._getId(e)),n={"":t},a={"":g(t,!1)},u={},l=this;return s(e,{allKeys:!0},(function(e,t,s,c,f,d,h){if(""!==t){var p=l._getId(e),g=n[c],y=a[c]+"/"+f;if(void 0!==h&&(y+="/"+("number"==typeof h?h:o.escapeFragment(h))),"string"==typeof p){p=g=m(g?r.resolve(g,p):p);var v=l._refs[p];if("string"==typeof v&&(v=l._refs[v]),v&&v.schema){if(!i(e,v.schema))throw new Error('id "'+p+'" resolves to more than one schema')}else if(p!=m(y))if("#"==p[0]){if(u[p]&&!i(e,u[p]))throw new Error('id "'+p+'" resolves to more than one schema');u[p]=e}else l._refs[p]=y}n[t]=g,a[t]=y}})),u},u.inlineRef=p,u.schema=l;var f=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,n,r){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),a=1;a>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function u(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=s(t)^r>>5}for(t=s(t),n=0;nt)return"Exceeds length limit";var n=e.toLowerCase(),r=e.toUpperCase();if(e!==n&&e!==r)return"Mixed-case string "+e;var o=(e=n).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var a=e.slice(0,o),l=e.slice(o+1);if(l.length<6)return"Data too short";var c=u(a);if("string"===typeof c)return c;for(var f=[],d=0;d=l.length||f.push(p)}return 1!==c?"Invalid checksum for "+e:{prefix:a,words:f}}function c(e,t,n,r){for(var i=0,o=0,a=(1<=n;)o-=n,s.push(i>>o&a);if(r)o>0&&s.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=u(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var o=e+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");i=s(i)^l,o+=r.charAt(l)}for(a=0;a<6;++a)i=s(i);for(i^=1,a=0;a<6;++a){o+=r.charAt(i>>5*(5-a)&31)}return o},toWordsUnsafe:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=c(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=c(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},function(e,t,n){e.exports=function e(t){"use strict";var n=/^\0+/g,r=/[\0\r\f]/g,i=/: */g,o=/zoo|gra/,a=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,u=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,c=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,h=/\W+/g,p=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,y=/:(read-only)/g,v=/\s+(?=[{\];=:>])/g,m=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,w=/\s{2,}/g,x=/([^\(])(:+) */g,_=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,T=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,O=/([^-])(image-set\()/,M="-webkit-",E="-moz-",P="-ms-",I=59,D=125,L=123,R=40,N=41,j=10,B=13,F=32,z=45,V=42,H=44,U=58,G=47,J=1,X=1,W=0,q=1,Z=1,K=1,Y=0,$=0,Q=0,ee=[],te=[],ne=0,re=null,ie=0,oe=1,ae="",se="",ue="";function le(e,t,i,o,a){for(var s,u,c=0,f=0,d=0,h=0,v=0,m=0,b=0,w=0,_=0,S=0,T=0,C=0,A=0,O=0,E=0,P=0,Y=0,te=0,re=0,fe=i.length,ve=fe-1,me="",be="",we="",xe="",_e="",ke="";E0&&(be=be.replace(r,"")),be.trim().length>0)){switch(b){case F:case 9:case I:case B:case j:break;default:be+=i.charAt(E)}b=I}if(1===Y)switch(b){case L:case D:case I:case 34:case 39:case R:case N:case H:Y=0;case 9:case B:case j:case F:break;default:for(Y=0,re=E,v=b,E--,b=I;re0&&(++E,b=v);case L:re=fe}}switch(b){case L:for(v=(be=be.trim()).charCodeAt(0),T=1,re=++E;E0&&(be=be.replace(r,"")),m=be.charCodeAt(1)){case 100:case 109:case 115:case z:s=t;break;default:s=ee}if(re=(we=le(t,s,we,m,a+1)).length,Q>0&&0===re&&(re=be.length),ne>0&&(u=ge(3,we,s=ce(ee,be,te),t,X,J,re,m,a,o),be=s.join(""),void 0!==u&&0===(re=(we=u.trim()).length)&&(m=0,we="")),re>0)switch(m){case 115:be=be.replace(k,pe);case 100:case 109:case z:we=be+"{"+we+"}";break;case 107:we=(be=be.replace(p,"$1 $2"+(oe>0?ae:"")))+"{"+we+"}",we=1===Z||2===Z&&he("@"+we,3)?"@"+M+we+"@"+we:"@"+we;break;default:we=be+we,112===o&&(xe+=we,we="")}else we="";break;default:we=le(t,ce(t,be,te),we,o,a+1)}_e+=we,C=0,Y=0,O=0,P=0,te=0,A=0,be="",we="",b=i.charCodeAt(++E);break;case D:case I:if((re=(be=(P>0?be.replace(r,""):be).trim()).length)>1)switch(0===O&&((v=be.charCodeAt(0))===z||v>96&&v<123)&&(re=(be=be.replace(" ",":")).length),ne>0&&void 0!==(u=ge(1,be,t,e,X,J,xe.length,o,a,o))&&0===(re=(be=u.trim()).length)&&(be="\0\0"),v=be.charCodeAt(0),m=be.charCodeAt(1),v){case 0:break;case 64:if(105===m||99===m){ke+=be+i.charAt(E);break}default:if(be.charCodeAt(re-1)===U)break;xe+=de(be,v,m,be.charCodeAt(2))}C=0,Y=0,O=0,P=0,te=0,be="",b=i.charCodeAt(++E)}}switch(b){case B:case j:if(f+h+d+c+$===0)switch(S){case N:case 39:case 34:case 64:case 126:case 62:case V:case 43:case G:case z:case U:case H:case I:case L:case D:break;default:O>0&&(Y=1)}f===G?f=0:q+C===0&&107!==o&&be.length>0&&(P=1,be+="\0"),ne*ie>0&&ge(0,be,t,e,X,J,xe.length,o,a,o),J=1,X++;break;case I:case D:if(f+h+d+c===0){J++;break}default:switch(J++,me=i.charAt(E),b){case 9:case F:if(h+c+f===0)switch(w){case H:case U:case 9:case F:me="";break;default:b!==F&&(me=" ")}break;case 0:me="\\0";break;case 12:me="\\f";break;case 11:me="\\v";break;case 38:h+f+c===0&&q>0&&(te=1,P=1,me="\f"+me);break;case 108:if(h+f+c+W===0&&O>0)switch(E-O){case 2:112===w&&i.charCodeAt(E-3)===U&&(W=w);case 8:111===_&&(W=_)}break;case U:h+f+c===0&&(O=E);break;case H:f+d+h+c===0&&(P=1,me+="\r");break;case 34:case 39:0===f&&(h=h===b?0:0===h?b:h);break;case 91:h+f+d===0&&c++;break;case 93:h+f+d===0&&c--;break;case N:h+f+c===0&&d--;break;case R:if(h+f+c===0){if(0===C)switch(2*w+3*_){case 533:break;default:T=0,C=1}d++}break;case 64:f+d+h+c+O+A===0&&(A=1);break;case V:case G:if(h+c+d>0)break;switch(f){case 0:switch(2*b+3*i.charCodeAt(E+1)){case 235:f=G;break;case 220:re=E,f=V}break;case V:b===G&&w===V&&re+2!==E&&(33===i.charCodeAt(re+2)&&(xe+=i.substring(re,E+1)),me="",f=0)}}if(0===f){if(q+h+c+A===0&&107!==o&&b!==I)switch(b){case H:case 126:case 62:case 43:case N:case R:if(0===C){switch(w){case 9:case F:case j:case B:me+="\0";break;default:me="\0"+me+(b===H?"":"\0")}P=1}else switch(b){case R:O+7===E&&108===w&&(O=0),C=++T;break;case N:0==(C=--T)&&(P=1,me+="\0")}break;case 9:case F:switch(w){case 0:case L:case D:case I:case H:case 12:case 9:case F:case j:case B:break;default:0===C&&(P=1,me+="\0")}}be+=me,b!==F&&9!==b&&(S=b)}}_=w,w=b,E++}if(re=xe.length,Q>0&&0===re&&0===_e.length&&0===t[0].length==0&&(109!==o||1===t.length&&(q>0?se:ue)===t[0])&&(re=t.join(",").length+2),re>0){if(s=0===q&&107!==o?function(e){for(var t,n,i=0,o=e.length,a=Array(o);i1)){if(d=u.charCodeAt(u.length-1),h=n.charCodeAt(0),t="",0!==c)switch(d){case V:case 126:case 62:case 43:case F:case R:break;default:t=" "}switch(h){case 38:n=t+se;case 126:case 62:case 43:case F:case N:case R:break;case 91:n=t+n+se;break;case U:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(K>0){n=t+n.substring(8,f-1);break}default:(c<1||s[c-1].length<1)&&(n=t+se+n)}break;case H:t="";default:n=f>1&&n.indexOf(":")>0?t+n.replace(x,"$1"+se+"$2"):t+n+se}u+=n}a[i]=u.replace(r,"").trim()}return a}(t):t,ne>0&&void 0!==(u=ge(2,xe,s,e,X,J,re,o,a,o))&&0===(xe=u).length)return ke+xe+_e;if(xe=s.join(",")+"{"+xe+"}",Z*W!=0){switch(2!==Z||he(xe,2)||(W=0),W){case 111:xe=xe.replace(y,":-moz-$1")+xe;break;case 112:xe=xe.replace(g,"::"+M+"input-$1")+xe.replace(g,"::-moz-$1")+xe.replace(g,":-ms-input-$1")+xe}W=0}}return ke+xe+_e}function ce(e,t,n){var r=t.trim().split(c),i=r,o=r.length,a=e.length;switch(a){case 0:case 1:for(var s=0,u=0===a?"":e[0]+" ";s0&&q>0)return i.replace(d,"$1").replace(f,"$1"+ue);break;default:return e.trim()+i.replace(f,"$1"+e.trim())}default:if(n*q>0&&i.indexOf("\f")>0)return i.replace(f,(e.charCodeAt(0)===U?"":"$1")+e.trim())}return e+i}function de(e,t,n,r){var l,c=0,f=e+";",d=2*t+3*n+4*r;if(944===d)return function(e){var t=e.length,n=e.indexOf(":",9)+1,r=e.substring(0,n).trim(),i=e.substring(n,t-1).trim();switch(e.charCodeAt(9)*oe){case 0:break;case z:if(110!==e.charCodeAt(10))break;default:var o=i.split((i="",s)),a=0;for(n=0,t=o.length;a64&&f<90||f>96&&f<123||95===f||f===z&&l.charCodeAt(1)!==z))switch(isNaN(parseFloat(l))+(-1!==l.indexOf("("))){case 1:switch(l){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:l+=ae}}c[n++]=l}i+=(0===a?"":",")+c.join(" ")}}return i=r+i+";",1===Z||2===Z&&he(i,1)?M+i+i:i}(f);if(0===Z||2===Z&&!he(f,1))return f;switch(d){case 1015:return 97===f.charCodeAt(10)?M+f+f:f;case 951:return 116===f.charCodeAt(3)?M+f+f:f;case 963:return 110===f.charCodeAt(5)?M+f+f:f;case 1009:if(100!==f.charCodeAt(4))break;case 969:case 942:return M+f+f;case 978:return M+f+E+f+f;case 1019:case 983:return M+f+E+f+P+f+f;case 883:return f.charCodeAt(8)===z?M+f+f:f.indexOf("image-set(",11)>0?f.replace(O,"$1"+M+"$2")+f:f;case 932:if(f.charCodeAt(4)===z)switch(f.charCodeAt(5)){case 103:return M+"box-"+f.replace("-grow","")+M+f+P+f.replace("grow","positive")+f;case 115:return M+f+P+f.replace("shrink","negative")+f;case 98:return M+f+P+f.replace("basis","preferred-size")+f}return M+f+P+f+f;case 964:return M+f+P+"flex-"+f+f;case 1023:if(99!==f.charCodeAt(8))break;return l=f.substring(f.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),M+"box-pack"+l+M+f+P+"flex-pack"+l+f;case 1005:return o.test(f)?f.replace(i,":"+M)+f.replace(i,":"+E)+f:f;case 1e3:switch(c=(l=f.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(c)){case 226:l=f.replace(_,"tb");break;case 232:l=f.replace(_,"tb-rl");break;case 220:l=f.replace(_,"lr");break;default:return f}return M+f+P+l+f;case 1017:if(-1===f.indexOf("sticky",9))return f;case 975:switch(c=(f=e).length-10,d=(l=(33===f.charCodeAt(c)?f.substring(0,c):f).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(l.charCodeAt(8)<111)break;case 115:f=f.replace(l,M+l)+";"+f;break;case 207:case 102:f=f.replace(l,M+(d>102?"inline-":"")+"box")+";"+f.replace(l,M+l)+";"+f.replace(l,P+l+"box")+";"+f}return f+";";case 938:if(f.charCodeAt(5)===z)switch(f.charCodeAt(6)){case 105:return l=f.replace("-items",""),M+f+M+"box-"+l+P+"flex-"+l+f;case 115:return M+f+P+"flex-item-"+f.replace(T,"")+f;default:return M+f+P+"flex-line-pack"+f.replace("align-content","").replace(T,"")+f}break;case 973:case 989:if(f.charCodeAt(3)!==z||122===f.charCodeAt(4))break;case 931:case 953:if(!0===A.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?de(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):f.replace(l,M+l)+f.replace(l,E+l.replace("fill-",""))+f;break;case 962:if(f=M+f+(102===f.charCodeAt(5)?P+f:"")+f,n+r===211&&105===f.charCodeAt(13)&&f.indexOf("transform",10)>0)return f.substring(0,f.indexOf(";",27)+1).replace(a,"$1"+M+"$2")+f}return f}function he(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10),i=e.substring(n+1,e.length-1);return re(2!==t?r:r.replace(C,"$1"),i,t)}function pe(e,t){var n=de(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function ge(e,t,n,r,i,o,a,s,u,l){for(var c,f=0,d=t;f0&&(ae=i.replace(h,91===o?"":"-")),o=1,1===q?ue=i:se=i;var a,s=[ue];ne>0&&void 0!==(a=ge(-1,n,s,s,X,J,0,0,0,0))&&"string"==typeof a&&(n=a);var u=le(ee,s,n,0,0);return ne>0&&void 0!==(a=ge(-2,u,s,s,X,J,u.length,0,0,0))&&"string"!=typeof(u=a)&&(o=0),ae="",ue="",se="",W=0,X=1,J=1,Y*o==0?u:u.replace(r,"").replace(v,"").replace(m,"$1").replace(b,"$1").replace(w," ")}return me.use=function e(t){switch(t){case void 0:case null:ne=te.length=0;break;default:if("function"==typeof t)te[ne++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n0&&void 0!==arguments[0]?arguments[0]:this.multibaseName;if(this.string&&0!==this.string.length&&t===this.multibaseName)return this.string;if(0===this.version){if("base58btc"!==t)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()");e=o.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version");e=c(a.encode(t,this.bytes))}return t===this.multibaseName&&Object.defineProperty(this,"string",{value:e}),e}},{key:Symbol.for("nodejs.util.inspect.custom"),value:function(){return"CID("+this.toString()+")"}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&f(this.multihash,e.multihash)}}],[{key:"validateCID",value:function(e){var t=u.checkCIDComponents(e);if(t)throw new Error(t)}},{key:"isCID",value:function(t){return t instanceof e||Boolean(t&&t[p])}}]),e}();g.codecs=d,e.exports=g},,,function(e,t,n){"use strict";var r,i=(r=n(584))&&r.__esModule?r:{default:r};function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n"']/g,B=RegExp(N.source),F=RegExp(j.source),z=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,X=/[\\^$.*+?()[\]{}|]/g,W=RegExp(X.source),q=/^\s+/,Z=/\s/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Y=/\{\n\/\* \[wrapped with (.+)\] \*/,$=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,ue=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ce=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",ge="["+he+"]",ye="["+de+"]",ve="\\d+",me="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",we="[^\\ud800-\\udfff"+he+ve+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xe="\\ud83c[\\udffb-\\udfff]",_e="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",Te="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ce="(?:"+be+"|"+we+")",Ae="(?:"+Te+"|"+we+")",Oe="(?:"+ye+"|"+xe+")"+"?",Me="[\\ufe0e\\ufe0f]?"+Oe+("(?:\\u200d(?:"+[_e,ke,Se].join("|")+")[\\ufe0e\\ufe0f]?"+Oe+")*"),Ee="(?:"+[me,ke,Se].join("|")+")"+Me,Pe="(?:"+[_e+ye+"?",ye,ke,Se,pe].join("|")+")",Ie=RegExp("['\u2019]","g"),De=RegExp(ye,"g"),Le=RegExp(xe+"(?="+xe+")|"+Pe+Me,"g"),Re=RegExp([Te+"?"+be+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[ge,Te,"$"].join("|")+")",Ae+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[ge,Te+Ce,"$"].join("|")+")",Te+"?"+Ce+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Te+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Ee].join("|"),"g"),Ne=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Be=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fe=-1,ze={};ze[T]=ze[C]=ze[A]=ze[O]=ze[M]=ze[E]=ze["[object Uint8ClampedArray]"]=ze[P]=ze[I]=!0,ze[u]=ze[l]=ze[k]=ze[c]=ze[S]=ze[f]=ze[d]=ze[h]=ze[g]=ze[y]=ze[v]=ze[m]=ze[b]=ze[w]=ze[_]=!1;var Ve={};Ve[u]=Ve[l]=Ve[k]=Ve[S]=Ve[c]=Ve[f]=Ve[T]=Ve[C]=Ve[A]=Ve[O]=Ve[M]=Ve[g]=Ve[y]=Ve[v]=Ve[m]=Ve[b]=Ve[w]=Ve[x]=Ve[E]=Ve["[object Uint8ClampedArray]"]=Ve[P]=Ve[I]=!0,Ve[d]=Ve[h]=Ve[_]=!1;var He={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,Ge=parseInt,Je="object"==typeof e&&e&&e.Object===Object&&e,Xe="object"==typeof self&&self&&self.Object===Object&&self,We=Je||Xe||Function("return this")(),qe=t&&!t.nodeType&&t,Ze=qe&&"object"==typeof r&&r&&!r.nodeType&&r,Ke=Ze&&Ze.exports===qe,Ye=Ke&&Je.process,$e=function(){try{var e=Ze&&Ze.require&&Ze.require("util").types;return e||Ye&&Ye.binding&&Ye.binding("util")}catch(t){}}(),Qe=$e&&$e.isArrayBuffer,et=$e&&$e.isDate,tt=$e&&$e.isMap,nt=$e&&$e.isRegExp,rt=$e&&$e.isSet,it=$e&&$e.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function Rt(e,t){for(var n=e.length;n--&&xt(t,e[n],0)>-1;);return n}function Nt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var jt=Ct({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Bt=Ct({"&":"&","<":"<",">":">",'"':""","'":"'"});function Ft(e){return"\\"+He[e]}function zt(e){return Ne.test(e)}function Vt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Ht(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var Kt=function e(t){var n=(t=null==t?We:Kt.defaults(We.Object(),t,Kt.pick(We,Be))).Array,r=t.Date,i=t.Error,Z=t.Function,de=t.Math,he=t.Object,pe=t.RegExp,ge=t.String,ye=t.TypeError,ve=n.prototype,me=Z.prototype,be=he.prototype,we=t["__core-js_shared__"],xe=me.toString,_e=be.hasOwnProperty,ke=0,Se=function(){var e=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Te=be.toString,Ce=xe.call(he),Ae=We._,Oe=pe("^"+xe.call(_e).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Me=Ke?t.Buffer:void 0,Ee=t.Symbol,Pe=t.Uint8Array,Le=Me?Me.allocUnsafe:void 0,Ne=Ht(he.getPrototypeOf,he),He=he.create,Je=be.propertyIsEnumerable,Xe=ve.splice,qe=Ee?Ee.isConcatSpreadable:void 0,Ze=Ee?Ee.iterator:void 0,Ye=Ee?Ee.toStringTag:void 0,$e=function(){try{var e=Qi(he,"defineProperty");return e({},"",{}),e}catch(t){}}(),mt=t.clearTimeout!==We.clearTimeout&&t.clearTimeout,Ct=r&&r.now!==We.Date.now&&r.now,Yt=t.setTimeout!==We.setTimeout&&t.setTimeout,$t=de.ceil,Qt=de.floor,en=he.getOwnPropertySymbols,tn=Me?Me.isBuffer:void 0,nn=t.isFinite,rn=ve.join,on=Ht(he.keys,he),an=de.max,sn=de.min,un=r.now,ln=t.parseInt,cn=de.random,fn=ve.reverse,dn=Qi(t,"DataView"),hn=Qi(t,"Map"),pn=Qi(t,"Promise"),gn=Qi(t,"Set"),yn=Qi(t,"WeakMap"),vn=Qi(he,"create"),mn=yn&&new yn,bn={},wn=Ao(dn),xn=Ao(hn),_n=Ao(pn),kn=Ao(gn),Sn=Ao(yn),Tn=Ee?Ee.prototype:void 0,Cn=Tn?Tn.valueOf:void 0,An=Tn?Tn.toString:void 0;function On(e){if(Ga(e)&&!Da(e)&&!(e instanceof In)){if(e instanceof Pn)return e;if(_e.call(e,"__wrapped__"))return Oo(e)}return new Pn(e)}var Mn=function(){function e(){}return function(t){if(!Ua(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function En(){}function Pn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function In(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Kn(e,t,n,r,i,o){var a,s=1&t,l=2&t,d=4&t;if(n&&(a=i?n(e,r,i,o):n(e)),void 0!==a)return a;if(!Ua(e))return e;var _=Da(e);if(_){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&_e.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return vi(e,a)}else{var D=no(e),L=D==h||D==p;if(ja(e))return fi(e,s);if(D==v||D==u||L&&!i){if(a=l||L?{}:io(e),!s)return l?function(e,t){return mi(e,to(e),t)}(e,function(e,t){return e&&mi(t,xs(t),e)}(a,e)):function(e,t){return mi(e,eo(e),t)}(e,Xn(a,e))}else{if(!Ve[D])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case k:return di(e);case c:case f:return new r(+e);case S:return function(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case T:case C:case A:case O:case M:case E:case"[object Uint8ClampedArray]":case P:case I:return hi(e,n);case g:return new r;case y:case w:return new r(e);case m:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case x:return i=e,Cn?he(Cn.call(i)):{}}var i}(e,D,s)}}o||(o=new jn);var R=o.get(e);if(R)return R;o.set(e,a),Za(e)?e.forEach((function(r){a.add(Kn(r,t,n,r,e,o))})):Ja(e)&&e.forEach((function(r,i){a.set(i,Kn(r,t,n,i,e,o))}));var N=_?void 0:(d?l?Xi:Ji:l?xs:ws)(e);return st(N||e,(function(r,i){N&&(r=e[i=r]),Un(a,i,Kn(r,t,n,i,e,o))})),a}function Yn(e,t,n){var r=n.length;if(null==e)return!r;for(e=he(e);r--;){var i=n[r],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function $n(e,t,n){if("function"!=typeof e)throw new ye(o);return wo((function(){e.apply(void 0,n)}),t)}function Qn(e,t,n,r){var i=-1,o=ft,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=ht(t,Pt(n))),r?(o=dt,a=!1):t.length>=200&&(o=Dt,a=!1,t=new Nn(t));e:for(;++i-1},Ln.prototype.set=function(e,t){var n=this.__data__,r=Gn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(hn||Ln),string:new Dn}},Rn.prototype.delete=function(e){var t=Yi(this,e).delete(e);return this.size-=t?1:0,t},Rn.prototype.get=function(e){return Yi(this,e).get(e)},Rn.prototype.has=function(e){return Yi(this,e).has(e)},Rn.prototype.set=function(e,t){var n=Yi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Nn.prototype.add=Nn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nn.prototype.has=function(e){return this.__data__.has(e)},jn.prototype.clear=function(){this.__data__=new Ln,this.size=0},jn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},jn.prototype.get=function(e){return this.__data__.get(e)},jn.prototype.has=function(e){return this.__data__.has(e)},jn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ln){var r=n.__data__;if(!hn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rn(r)}return n.set(e,t),this.size=n.size,this};var er=xi(ur),tr=xi(lr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function rr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?or(s,t-1,n,r,i):pt(i,s):r||(i[i.length]=s)}return i}var ar=_i(),sr=_i(!0);function ur(e,t){return e&&ar(e,t,ws)}function lr(e,t){return e&&sr(e,t,ws)}function cr(e,t){return ct(t,(function(t){return za(e[t])}))}function fr(e,t){for(var n=0,r=(t=si(t,e)).length;null!=e&&nt}function gr(e,t){return null!=e&&_e.call(e,t)}function yr(e,t){return null!=e&&t in he(e)}function vr(e,t,r){for(var i=r?dt:ft,o=e[0].length,a=e.length,s=a,u=n(a),l=1/0,c=[];s--;){var f=e[s];s&&t&&(f=ht(f,Pt(t))),l=sn(f.length,l),u[s]=!r&&(t||o>=120&&f.length>=120)?new Nn(s&&f):void 0}f=e[0];var d=-1,h=u[0];e:for(;++d=s)return u;var l=n[r];return u*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Xe.call(s,u,1),Xe.call(e,u,1);return e}function Rr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;ao(i)?Xe.call(e,i,1):Qr(e,i)}}return e}function Nr(e,t){return e+Qt(cn()*(t-e+1))}function jr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Qt(t/2))&&(e+=e)}while(t);return n}function Br(e,t){return xo(go(e,t,Xs),e+"")}function Fr(e){return Fn(Ms(e))}function zr(e,t){var n=Ms(e);return So(n,Zn(t,0,n.length))}function Vr(e,t,n,r){if(!Ua(e))return e;for(var i=-1,o=(t=si(t,e)).length,a=o-1,s=e;null!=s&&++io?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i>>1,a=e[o];null!==a&&!Ya(a)&&(n?a<=t:a=200){var l=t?null:ji(e);if(l)return Gt(l);a=!1,i=Dt,u=new Nn}else u=t?[]:s;e:for(;++r=r?e:Jr(e,t,n)}var ci=mt||function(e){return We.clearTimeout(e)};function fi(e,t){if(t)return e.slice();var n=e.length,r=Le?Le(n):new e.constructor(n);return e.copy(r),r}function di(e){var t=new e.constructor(e.byteLength);return new Pe(t).set(new Pe(e)),t}function hi(e,t){var n=t?di(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function pi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e===e,o=Ya(e),a=void 0!==t,s=null===t,u=t===t,l=Ya(t);if(!s&&!l&&!o&&e>t||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,a&&so(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=he(t);++r-1?i[o?t[a]:a]:void 0}}function Ai(e){return Gi((function(t){var n=t.length,r=n,i=Pn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new ye(o);if(i&&!s&&"wrapper"==qi(a))var s=new Pn([],!0)}for(r=s?r:n;++r1&&b.reverse(),f&&ls))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,d=!0,h=2&n?new Nn:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(K,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return st(s,(function(n){var r="_."+n[0];t&n[1]&&!ft(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(Y);return t?t[1].split($):[]}(r),n)))}function ko(e){var t=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function So(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,qo(e,n)}));function ta(e){var t=On(e);return t.__chain__=!0,t}function na(e,t){return t(e)}var ra=Gi((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return qn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof In&&ao(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Pn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var ia=bi((function(e,t,n){_e.call(e,n)?++e[n]:Wn(e,n,1)}));var oa=Ci(Io),aa=Ci(Do);function sa(e,t){return(Da(e)?st:er)(e,Ki(t,3))}function ua(e,t){return(Da(e)?ut:tr)(e,Ki(t,3))}var la=bi((function(e,t,n){_e.call(e,n)?e[n].push(t):Wn(e,n,[t])}));var ca=Br((function(e,t,r){var i=-1,o="function"==typeof t,a=Ra(e)?n(e.length):[];return er(e,(function(e){a[++i]=o?ot(t,e,r):mr(e,t,r)})),a})),fa=bi((function(e,t,n){Wn(e,n,t)}));function da(e,t){return(Da(e)?ht:Ar)(e,Ki(t,3))}var ha=bi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var pa=Br((function(e,t){if(null==e)return[];var n=t.length;return n>1&&so(e,t[0],t[1])?t=[]:n>2&&so(t[0],t[1],t[2])&&(t=[t[0]]),Ir(e,or(t,1),[])})),ga=Ct||function(){return We.Date.now()};function ya(e,t,n){return t=n?void 0:t,Fi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function va(e,t){var n;if("function"!=typeof t)throw new ye(o);return e=rs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ma=Br((function(e,t,n){var r=1;if(n.length){var i=Ut(n,Zi(ma));r|=32}return Fi(e,r,t,n,i)})),ba=Br((function(e,t,n){var r=3;if(n.length){var i=Ut(n,Zi(ba));r|=32}return Fi(t,r,e,n,i)}));function wa(e,t,n){var r,i,a,s,u,l,c=0,f=!1,d=!1,h=!0;if("function"!=typeof e)throw new ye(o);function p(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function g(e){return c=e,u=wo(v,t),f?p(e):s}function y(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function v(){var e=ga();if(y(e))return m(e);u=wo(v,function(e){var n=t-(e-l);return d?sn(n,a-(e-c)):n}(e))}function m(e){return u=void 0,h&&r?p(e):(r=i=void 0,s)}function b(){var e=ga(),n=y(e);if(r=arguments,i=this,l=e,n){if(void 0===u)return g(l);if(d)return ci(u),u=wo(v,t),p(l)}return void 0===u&&(u=wo(v,t)),s}return t=os(t)||0,Ua(n)&&(f=!!n.leading,a=(d="maxWait"in n)?an(os(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),b.cancel=function(){void 0!==u&&ci(u),c=0,r=l=i=u=void 0},b.flush=function(){return void 0===u?s:m(ga())},b}var xa=Br((function(e,t){return $n(e,1,t)})),_a=Br((function(e,t,n){return $n(e,os(t)||0,n)}));function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ye(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ka.Cache||Rn),n}function Sa(e){if("function"!=typeof e)throw new ye(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ka.Cache=Rn;var Ta=ui((function(e,t){var n=(t=1==t.length&&Da(t[0])?ht(t[0],Pt(Ki())):ht(or(t,1),Pt(Ki()))).length;return Br((function(r){for(var i=-1,o=sn(r.length,n);++i=t})),Ia=br(function(){return arguments}())?br:function(e){return Ga(e)&&_e.call(e,"callee")&&!Je.call(e,"callee")},Da=n.isArray,La=Qe?Pt(Qe):function(e){return Ga(e)&&hr(e)==k};function Ra(e){return null!=e&&Ha(e.length)&&!za(e)}function Na(e){return Ga(e)&&Ra(e)}var ja=tn||ou,Ba=et?Pt(et):function(e){return Ga(e)&&hr(e)==f};function Fa(e){if(!Ga(e))return!1;var t=hr(e);return t==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Wa(e)}function za(e){if(!Ua(e))return!1;var t=hr(e);return t==h||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Va(e){return"number"==typeof e&&e==rs(e)}function Ha(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ua(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ga(e){return null!=e&&"object"==typeof e}var Ja=tt?Pt(tt):function(e){return Ga(e)&&no(e)==g};function Xa(e){return"number"==typeof e||Ga(e)&&hr(e)==y}function Wa(e){if(!Ga(e)||hr(e)!=v)return!1;var t=Ne(e);if(null===t)return!0;var n=_e.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xe.call(n)==Ce}var qa=nt?Pt(nt):function(e){return Ga(e)&&hr(e)==m};var Za=rt?Pt(rt):function(e){return Ga(e)&&no(e)==b};function Ka(e){return"string"==typeof e||!Da(e)&&Ga(e)&&hr(e)==w}function Ya(e){return"symbol"==typeof e||Ga(e)&&hr(e)==x}var $a=it?Pt(it):function(e){return Ga(e)&&Ha(e.length)&&!!ze[hr(e)]};var Qa=Li(Cr),es=Li((function(e,t){return e<=t}));function ts(e){if(!e)return[];if(Ra(e))return Ka(e)?Wt(e):vi(e);if(Ze&&e[Ze])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ze]());var t=no(e);return(t==g?Vt:t==b?Gt:Ms)(e)}function ns(e){return e?(e=os(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function rs(e){var t=ns(e),n=t%1;return t===t?n?t-n:t:0}function is(e){return e?Zn(rs(e),0,4294967295):0}function os(e){if("number"==typeof e)return e;if(Ya(e))return NaN;if(Ua(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ua(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Et(e);var n=oe.test(e);return n||se.test(e)?Ge(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function as(e){return mi(e,xs(e))}function ss(e){return null==e?"":Yr(e)}var us=wi((function(e,t){if(fo(t)||Ra(t))mi(t,ws(t),e);else for(var n in t)_e.call(t,n)&&Un(e,n,t[n])})),ls=wi((function(e,t){mi(t,xs(t),e)})),cs=wi((function(e,t,n,r){mi(t,xs(t),e,r)})),fs=wi((function(e,t,n,r){mi(t,ws(t),e,r)})),ds=Gi(qn);var hs=Br((function(e,t){e=he(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&so(t[0],t[1],i)&&(r=1);++n1),t})),mi(e,Xi(e),n),r&&(n=Kn(n,7,Hi));for(var i=t.length;i--;)Qr(n,t[i]);return n}));var Ts=Gi((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return ys(e,n)}))}(e,t)}));function Cs(e,t){if(null==e)return{};var n=ht(Xi(e),(function(e){return[e]}));return t=Ki(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var As=Bi(ws),Os=Bi(xs);function Ms(e){return null==e?[]:It(e,ws(e))}var Es=Si((function(e,t,n){return t=t.toLowerCase(),e+(n?Ps(t):t)}));function Ps(e){return Fs(ss(e).toLowerCase())}function Is(e){return(e=ss(e))&&e.replace(le,jt).replace(De,"")}var Ds=Si((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ls=Si((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Rs=ki("toLowerCase");var Ns=Si((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var js=Si((function(e,t,n){return e+(n?" ":"")+Fs(t)}));var Bs=Si((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Fs=ki("toUpperCase");function zs(e,t,n){return e=ss(e),void 0===(t=n?void 0:t)?function(e){return je.test(e)}(e)?function(e){return e.match(Re)||[]}(e):function(e){return e.match(Q)||[]}(e):e.match(t)||[]}var Vs=Br((function(e,t){try{return ot(e,void 0,t)}catch(n){return Fa(n)?n:new i(n)}})),Hs=Gi((function(e,t){return st(t,(function(t){t=Co(t),Wn(e,t,ma(e[t],e))})),e}));function Us(e){return function(){return e}}var Gs=Ai(),Js=Ai(!0);function Xs(e){return e}function Ws(e){return kr("function"==typeof e?e:Kn(e,1))}var qs=Br((function(e,t){return function(n){return mr(n,e,t)}})),Zs=Br((function(e,t){return function(n){return mr(e,n,t)}}));function Ks(e,t,n){var r=ws(t),i=cr(t,r);null!=n||Ua(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=cr(t,ws(t)));var o=!(Ua(n)&&"chain"in n)||!!n.chain,a=za(e);return st(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=vi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Ys(){}var $s=Pi(ht),Qs=Pi(lt),eu=Pi(vt);function tu(e){return uo(e)?Tt(Co(e)):function(e){return function(t){return fr(t,e)}}(e)}var nu=Di(),ru=Di(!0);function iu(){return[]}function ou(){return!1}var au=Ei((function(e,t){return e+t}),0),su=Ni("ceil"),uu=Ei((function(e,t){return e/t}),1),lu=Ni("floor");var cu=Ei((function(e,t){return e*t}),1),fu=Ni("round"),du=Ei((function(e,t){return e-t}),0);return On.after=function(e,t){if("function"!=typeof t)throw new ye(o);return e=rs(e),function(){if(--e<1)return t.apply(this,arguments)}},On.ary=ya,On.assign=us,On.assignIn=ls,On.assignInWith=cs,On.assignWith=fs,On.at=ds,On.before=va,On.bind=ma,On.bindAll=Hs,On.bindKey=ba,On.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Da(e)?e:[e]},On.chain=ta,On.chunk=function(e,t,r){t=(r?so(e,t,r):void 0===t)?1:an(rs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=n($t(i/t));oi?0:i+n),(r=void 0===r||r>i?i:rs(r))<0&&(r+=i),r=n>r?0:is(r);n>>0)?(e=ss(e))&&("string"==typeof t||null!=t&&!qa(t))&&!(t=Yr(t))&&zt(e)?li(Wt(e),0,n):e.split(t,n):[]},On.spread=function(e,t){if("function"!=typeof e)throw new ye(o);return t=null==t?0:an(rs(t),0),Br((function(n){var r=n[t],i=li(n,0,t);return r&&pt(i,r),ot(e,this,i)}))},On.tail=function(e){var t=null==e?0:e.length;return t?Jr(e,1,t):[]},On.take=function(e,t,n){return e&&e.length?Jr(e,0,(t=n||void 0===t?1:rs(t))<0?0:t):[]},On.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Jr(e,(t=r-(t=n||void 0===t?1:rs(t)))<0?0:t,r):[]},On.takeRightWhile=function(e,t){return e&&e.length?ti(e,Ki(t,3),!1,!0):[]},On.takeWhile=function(e,t){return e&&e.length?ti(e,Ki(t,3)):[]},On.tap=function(e,t){return t(e),e},On.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ye(o);return Ua(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),wa(e,t,{leading:r,maxWait:t,trailing:i})},On.thru=na,On.toArray=ts,On.toPairs=As,On.toPairsIn=Os,On.toPath=function(e){return Da(e)?ht(e,Co):Ya(e)?[e]:vi(To(ss(e)))},On.toPlainObject=as,On.transform=function(e,t,n){var r=Da(e),i=r||ja(e)||$a(e);if(t=Ki(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Ua(e)&&za(o)?Mn(Ne(e)):{}}return(i?st:ur)(e,(function(e,r,i){return t(n,e,r,i)})),n},On.unary=function(e){return ya(e,1)},On.union=Go,On.unionBy=Jo,On.unionWith=Xo,On.uniq=function(e){return e&&e.length?$r(e):[]},On.uniqBy=function(e,t){return e&&e.length?$r(e,Ki(t,2)):[]},On.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?$r(e,void 0,t):[]},On.unset=function(e,t){return null==e||Qr(e,t)},On.unzip=Wo,On.unzipWith=qo,On.update=function(e,t,n){return null==e?e:ei(e,t,ai(n))},On.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ei(e,t,ai(n),r)},On.values=Ms,On.valuesIn=function(e){return null==e?[]:It(e,xs(e))},On.without=Zo,On.words=zs,On.wrap=function(e,t){return Ca(ai(t),e)},On.xor=Ko,On.xorBy=Yo,On.xorWith=$o,On.zip=Qo,On.zipObject=function(e,t){return ii(e||[],t||[],Un)},On.zipObjectDeep=function(e,t){return ii(e||[],t||[],Vr)},On.zipWith=ea,On.entries=As,On.entriesIn=Os,On.extend=ls,On.extendWith=cs,Ks(On,On),On.add=au,On.attempt=Vs,On.camelCase=Es,On.capitalize=Ps,On.ceil=su,On.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=os(n))===n?n:0),void 0!==t&&(t=(t=os(t))===t?t:0),Zn(os(e),t,n)},On.clone=function(e){return Kn(e,4)},On.cloneDeep=function(e){return Kn(e,5)},On.cloneDeepWith=function(e,t){return Kn(e,5,t="function"==typeof t?t:void 0)},On.cloneWith=function(e,t){return Kn(e,4,t="function"==typeof t?t:void 0)},On.conformsTo=function(e,t){return null==t||Yn(e,t,ws(t))},On.deburr=Is,On.defaultTo=function(e,t){return null==e||e!==e?t:e},On.divide=uu,On.endsWith=function(e,t,n){e=ss(e),t=Yr(t);var r=e.length,i=n=void 0===n?r:Zn(rs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},On.eq=Ma,On.escape=function(e){return(e=ss(e))&&F.test(e)?e.replace(j,Bt):e},On.escapeRegExp=function(e){return(e=ss(e))&&W.test(e)?e.replace(X,"\\$&"):e},On.every=function(e,t,n){var r=Da(e)?lt:nr;return n&&so(e,t,n)&&(t=void 0),r(e,Ki(t,3))},On.find=oa,On.findIndex=Io,On.findKey=function(e,t){return bt(e,Ki(t,3),ur)},On.findLast=aa,On.findLastIndex=Do,On.findLastKey=function(e,t){return bt(e,Ki(t,3),lr)},On.floor=lu,On.forEach=sa,On.forEachRight=ua,On.forIn=function(e,t){return null==e?e:ar(e,Ki(t,3),xs)},On.forInRight=function(e,t){return null==e?e:sr(e,Ki(t,3),xs)},On.forOwn=function(e,t){return e&&ur(e,Ki(t,3))},On.forOwnRight=function(e,t){return e&&lr(e,Ki(t,3))},On.get=gs,On.gt=Ea,On.gte=Pa,On.has=function(e,t){return null!=e&&ro(e,t,gr)},On.hasIn=ys,On.head=Ro,On.identity=Xs,On.includes=function(e,t,n,r){e=Ra(e)?e:Ms(e),n=n&&!r?rs(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),Ka(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&xt(e,t,n)>-1},On.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:rs(n);return i<0&&(i=an(r+i,0)),xt(e,t,i)},On.inRange=function(e,t,n){return t=ns(t),void 0===n?(n=t,t=0):n=ns(n),function(e,t,n){return e>=sn(t,n)&&e=-9007199254740991&&e<=9007199254740991},On.isSet=Za,On.isString=Ka,On.isSymbol=Ya,On.isTypedArray=$a,On.isUndefined=function(e){return void 0===e},On.isWeakMap=function(e){return Ga(e)&&no(e)==_},On.isWeakSet=function(e){return Ga(e)&&"[object WeakSet]"==hr(e)},On.join=function(e,t){return null==e?"":rn.call(e,t)},On.kebabCase=Ds,On.last=Fo,On.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=rs(n))<0?an(r+i,0):sn(i,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):wt(e,kt,i,!0)},On.lowerCase=Ls,On.lowerFirst=Rs,On.lt=Qa,On.lte=es,On.max=function(e){return e&&e.length?rr(e,Xs,pr):void 0},On.maxBy=function(e,t){return e&&e.length?rr(e,Ki(t,2),pr):void 0},On.mean=function(e){return St(e,Xs)},On.meanBy=function(e,t){return St(e,Ki(t,2))},On.min=function(e){return e&&e.length?rr(e,Xs,Cr):void 0},On.minBy=function(e,t){return e&&e.length?rr(e,Ki(t,2),Cr):void 0},On.stubArray=iu,On.stubFalse=ou,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return!0},On.multiply=cu,On.nth=function(e,t){return e&&e.length?Pr(e,rs(t)):void 0},On.noConflict=function(){return We._===this&&(We._=Ae),this},On.noop=Ys,On.now=ga,On.pad=function(e,t,n){e=ss(e);var r=(t=rs(t))?Xt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ii(Qt(i),n)+e+Ii($t(i),n)},On.padEnd=function(e,t,n){e=ss(e);var r=(t=rs(t))?Xt(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=cn();return sn(e+i*(t-e+Ue("1e-"+((i+"").length-1))),t)}return Nr(e,t)},On.reduce=function(e,t,n){var r=Da(e)?gt:At,i=arguments.length<3;return r(e,Ki(t,4),n,i,er)},On.reduceRight=function(e,t,n){var r=Da(e)?yt:At,i=arguments.length<3;return r(e,Ki(t,4),n,i,tr)},On.repeat=function(e,t,n){return t=(n?so(e,t,n):void 0===t)?1:rs(t),jr(ss(e),t)},On.replace=function(){var e=arguments,t=ss(e[0]);return e.length<3?t:t.replace(e[1],e[2])},On.result=function(e,t,n){var r=-1,i=(t=si(t,e)).length;for(i||(i=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=sn(e,4294967295);e-=4294967295;for(var i=Mt(r,t=Ki(t));++n=o)return e;var s=n-Xt(r);if(s<1)return r;var u=a?li(a,0,s).join(""):e.slice(0,s);if(void 0===i)return u+r;if(a&&(s+=u.length-s),qa(i)){if(e.slice(s).search(i)){var l,c=u;for(i.global||(i=pe(i.source,ss(re.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;u=u.slice(0,void 0===f?s:f)}}else if(e.indexOf(Yr(i),s)!=s){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},On.unescape=function(e){return(e=ss(e))&&B.test(e)?e.replace(N,Zt):e},On.uniqueId=function(e){var t=++ke;return ss(e)+t},On.upperCase=Bs,On.upperFirst=Fs,On.each=sa,On.eachRight=ua,On.first=Ro,Ks(On,function(){var e={};return ur(On,(function(t,n){_e.call(On.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),On.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){On[e].placeholder=On})),st(["drop","take"],(function(e,t){In.prototype[e]=function(n){n=void 0===n?1:an(rs(n),0);var r=this.__filtered__&&!t?new In(this):this.clone();return r.__filtered__?r.__takeCount__=sn(n,r.__takeCount__):r.__views__.push({size:sn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},In.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;In.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ki(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");In.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");In.prototype[e]=function(){return this.__filtered__?new In(this):this[n](1)}})),In.prototype.compact=function(){return this.filter(Xs)},In.prototype.find=function(e){return this.filter(e).head()},In.prototype.findLast=function(e){return this.reverse().find(e)},In.prototype.invokeMap=Br((function(e,t){return"function"==typeof e?new In(this):this.map((function(n){return mr(n,e,t)}))})),In.prototype.reject=function(e){return this.filter(Sa(Ki(e)))},In.prototype.slice=function(e,t){e=rs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new In(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=rs(t))<0?n.dropRight(-t):n.take(t-e)),n)},In.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},In.prototype.toArray=function(){return this.take(4294967295)},ur(In.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=On[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(On.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,s=t instanceof In,u=a[0],l=s||Da(t),c=function(e){var t=i.apply(On,pt([e],a));return r&&f?t[0]:t};l&&n&&"function"==typeof u&&1!=u.length&&(s=l=!1);var f=this.__chain__,d=!!this.__actions__.length,h=o&&!f,p=s&&!d;if(!o&&l){t=p?t:new In(this);var g=e.apply(t,a);return g.__actions__.push({func:na,args:[c],thisArg:void 0}),new Pn(g,f)}return h&&p?e.apply(this,a):(g=this.thru(c),h?r?g.value()[0]:g.value():g)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ve[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);On.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Da(i)?i:[],e)}return this[n]((function(n){return t.apply(Da(n)?n:[],e)}))}})),ur(In.prototype,(function(e,t){var n=On[t];if(n){var r=n.name+"";_e.call(bn,r)||(bn[r]=[]),bn[r].push({name:t,func:n})}})),bn[Oi(void 0,2).name]=[{name:"wrapper",func:void 0}],In.prototype.clone=function(){var e=new In(this.__wrapped__);return e.__actions__=vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vi(this.__views__),e},In.prototype.reverse=function(){if(this.__filtered__){var e=new In(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},In.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Da(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},On.prototype.plant=function(e){for(var t,n=this;n instanceof En;){var r=Oo(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},On.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof In){var t=e;return this.__actions__.length&&(t=new In(this)),(t=t.reverse()).__actions__.push({func:na,args:[Uo],thisArg:void 0}),new Pn(t,this.__chain__)}return this.thru(Uo)},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ze&&(On.prototype[Ze]=function(){return this}),On}();We._=Kt,void 0===(i=function(){return Kt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(79),n(189)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return rt})),n.d(t,"b",(function(){return tt}));var r=n(0),i=n.n(r),o=n(184),a=n(64),s=n(35),u=n(20),l=n(18),c=n.n(l);function f(e,t){return function(e,t){var n=Object(r.useState)((function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}}))[0];return n.callback=t,n.facade}(t,(function(t){return e.forEach((function(e){return function(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}(e,t)}))}))}var d={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},h=function(e){var t=e.children;return r.createElement(r.Fragment,null,r.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:d}),t,t&&r.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:d}))};h.propTypes={},h.defaultProps={children:null};var p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter((function(e,n){return!t.has(n)}))}(M(function e(t){return t.parentNode?e(t.parentNode):t}(t).querySelectorAll('[data-focus-lock="'+n+'"]:not([data-focus-lock-disabled="disabled"])'))):[t]),e}),[])},I=function(e){return Boolean(M(e.querySelectorAll("iframe")).some((function(e){return e===document.activeElement})))},D=function(e){var t=document&&document.activeElement;return!(!t||t.dataset&&t.dataset.focusGuard)&&P(e).reduce((function(e,n){return e||n.contains(t)||I(n)}),!1)},L=function(e){return"INPUT"===e.tagName&&"radio"===e.type},R=function(e,t){return L(e)&&e.name?function(e,t){return t.filter(L).filter((function(t){return t.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,t):e},N=function(e){return e[0]&&e.length>1?R(e[0],e):e[0]},j=function(e,t){return e.length>1?e.indexOf(R(e[t],e)):t},B=function e(t,n){var r=t.get(n);if(void 0!==r)return r;var i=function(e,t){return!e||e===document||e&&e.nodeType===Node.DOCUMENT_NODE||!((n=window.getComputedStyle(e,null))&&n.getPropertyValue&&("none"===n.getPropertyValue("display")||"hidden"===n.getPropertyValue("visibility")))&&t(e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode);var n}(n,e.bind(void 0,t));return t.set(n,i),i},F=function(e){return Boolean(e&&e.dataset&&e.dataset.focusGuard)},z=function(e){return!F(e)},V=function(e){return Boolean(e)},H=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=F(n);if(!(e.indexOf(n)>=0)){var u=t.indexOf(n),l=r?t.indexOf(r):u,c=r?e.indexOf(r):-1,f=u-l,d=t.indexOf(o),h=t.indexOf(a),p=function(e){var t=new Set;return e.forEach((function(n){return t.add(R(n,e))})),e.filter((function(e){return t.has(e)}))}(t),g=p.indexOf(n)-(r?p.indexOf(r):u),y=j(e,0),v=j(e,i-1);return-1===u||-1===c?"NEW_FOCUS":!f&&c>=0?c:u<=d&&s&&Math.abs(f)>1?v:u>=h&&s&&Math.abs(f)>1?y:f&&Math.abs(g)>1?c:u<=d?v:u>h?y:f?Math.abs(f)>1?c:(i+c+f)%i:void 0}},U=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},G=function(e,t,n){return M(e).map((function(e,t){return{node:e,index:t,tabIndex:n&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!t||e.tabIndex>=0})).sort(U)},J=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),X=J+", [data-focus-guard]",W=function(e,t){return e.reduce((function(e,n){return e.concat(M(n.querySelectorAll(t?X:J)),n.parentNode?M(n.parentNode.querySelectorAll(J)).filter((function(e){return e===n})):[])}),[])},q=function(e,t){return M(e).filter((function(e){return B(t,e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Z=function(e,t,n){return G(q(W(e,n),t),!0,n)},K=function(e,t){return G(q(W(e),t),!1)},Y=function(e,t){return q(function(e){var t=e.querySelectorAll("[data-autofocus-inside]");return M(t).map((function(e){return W([e])})).reduce((function(e,t){return e.concat(t)}),[])}(e),t)},$=function e(t,n){return void 0===n&&(n=[]),n.push(t),t.parentNode&&e(t.parentNode,n),n},Q=function(e,t){for(var n=$(e),r=$(t),i=0;i=0)return o}return!1},ee=function(e,t,n){var r=E(e),i=E(t),o=r[0],a=!1;return i.filter(Boolean).forEach((function(e){a=Q(a||e,e)||a,n.filter(Boolean).forEach((function(e){var t=Q(o,e);t&&(a=!a||t.contains(a)?t:Q(t,a))}))})),a},te=function(e,t){var n=document&&document.activeElement,r=P(e).filter(z),i=ee(n||e,e,r),o=new Map,a=K(r,o),s=Z(r,o).filter((function(e){var t=e.node;return z(t)}));if(s[0]||(s=a)[0]){var u,l=K([i],o).map((function(e){return e.node})),c=function(e,t){var n=new Map;return t.forEach((function(e){return n.set(e.node,e)})),e.map((function(e){return n.get(e)})).filter(V)}(l,s),f=c.map((function(e){return e.node})),d=H(f,l,n,t);if("NEW_FOCUS"===d){var h=a.map((function(e){return e.node})).filter((u=function(e,t){return e.reduce((function(e,n){return e.concat(Y(n,t))}),[])}(r,o),function(e){return e.autofocus||e.dataset&&!!e.dataset.autofocus||u.indexOf(e)>=0}));return{node:h&&h.length?N(h):N(f)}}return void 0===d?d:c[d]}},ne=0,re=!1,ie=function(e,t){var n,r=te(e,t);if(!re&&r){if(ne>2)return re=!0,void setTimeout((function(){re=!1}),1);ne++,(n=r.node).focus(),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus(),ne--}};function oe(e){var t=window.setImmediate;"undefined"!==typeof t?t(e):setTimeout(e,1)}var ae=function(){return document&&document.activeElement===document.body||document&&M(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},se=null,ue=null,le=null,ce=!1,fe=function(){return!0};function de(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(o!==e)return;i=null}}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var he=function(e){return e&&"current"in e?e.current:e},pe=function(){var e,t=!1;if(se){var n=se,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,u=r||le&&le.portaledElement,l=document&&document.activeElement;if(u){var c=[u].concat(a.map(he).filter(Boolean));if(l&&!function(e){return(se.whiteList||fe)(e)}(l)||(i||(s?Boolean(ce):"meanwhile"===ce)||!ae()||!ue&&o)&&(!u||D(c)||(e=l,le&&le.portaledElement===e)||(document&&!ue&&l&&!o?(l.blur&&l.blur(),document.body.focus()):(t=ie(c,ue),le={})),ce=!1,ue=document&&document.activeElement),document){var f=document&&document.activeElement,d=function(e){var t=P(e).filter(z),n=ee(e,e,t),r=new Map,i=Z([n],r,!0),o=Z(t,r).filter((function(e){var t=e.node;return z(t)})).map((function(e){return e.node}));return i.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:o.indexOf(t)>=0,guard:F(t)}}))}(c),h=d.map((function(e){return e.node})).indexOf(f);h>-1&&(d.filter((function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),de(h,d.length,1,d),de(h,-1,-1,d))}}}return t},ge=function(e){pe()&&e&&(e.stopPropagation(),e.preventDefault())},ye=function(){return oe(pe)},ve=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(le={observerNode:n,portaledElement:t})},me=function(){ce="just",setTimeout((function(){ce="meanwhile"}),0)};b.assignSyncMedium(ve),w.assignMedium(ye),x.assignMedium((function(e){return e({moveFocusInside:ie,focusInside:D})}));var be=O((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!se&&(document.addEventListener("focusin",ge,!0),document.addEventListener("focusout",ye),window.addEventListener("blur",me));var n=se,r=n&&t&&t.id===n.id;se=t,n&&!r&&(n.onDeactivation(),e.filter((function(e){return e.id===n.id})).length||n.returnFocus(!t)),t?(ue=null,r&&n.observed===t.observed||t.onActivation(),pe(),oe(pe)):(document.removeEventListener("focusin",ge,!0),document.removeEventListener("focusout",ye),window.removeEventListener("blur",me),ue=null)}))((function(){return null})),we=r.forwardRef((function(e,t){return r.createElement(T,Object(u.a)({sideCar:be,ref:t},e))})),xe=T.propTypes||{};xe.sideCar,Object(s.a)(xe,["sideCar"]);we.propTypes={};var _e=we;var ke=function(){return(ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n